PageSourceSearch

https://luoji.cn/fe/assets/NewDubbingSpace-3f21b852.js

js luoji.cn collected 2026-10-05 11:05:39 UTC 31,108 bytes, 1 lines download raw bytes

1var Y=(T,e,t)=>new Promise((o,l)=>{var h=u=>{try{r(t.next(u))}catch(m){l(m)}},x=u=>{try{r(t.throw(u))}catch(m){l(m)}},r=u=>u.done?o(u.value):Promise.resolve(u.value).then(h,x);r((t=t.apply(T,e)).next())});import{V as J,c as P,r as M,af as ce,a6 as a,Z as v,$ as n,a1 as i,ac as R,ad as w,a8 as I,a0 as f,ag as ne,a3 as S,ae as le,a7 as L,a4 as H,a5 as ie,a2 as he,al as Z,_ as q,aj as N,Y as ue,as as ge,X as K,aq as pe,u as ve,aA as ye,i as xe}from"./vendor-575eae6c.js";import{u as fe}from"./audiox-1d5faee6.js";import{_ as be,h as V}from"./hotkeys.esm-6eea0069.js";import{S as F}from"./Spinner-31d64d94.js";import{E as U,g as O,C as z,h as we}from"./audiox_models-5f79f9a8.js";import{P as ke,u as _e}from"./index-27244a51.js";import{u as W,S as $,D as Se}from"./audiox_dubbing_space-12b0dc95.js";import{u as me,R as se,h as oe,M as ae,y as ee}from"./edition-1c8f25a3.js";import{d as Te,e as Ce}from"./filedownload_utils-5f35422c.js";import{f as Pe}from"./format_utils-478be9d3.js";import{a as De,_ as Ee}from"./CornerBubble-05c348d7.js";import{r as $e,_ as Oe,a as Ie,b as Le,c as Re,D as Ne,d as Me,e as Ae,f as Xe}from"./DubbingSpaceLHSEditor-18f03679.js";import{r as Be}from"./ChevronDownIcon-49ee61b6.js";import{U as Ve,h as re,G as He,V as Je,S as We}from"./transition-353b64db.js";import{P as G,_ as je,a as Ye,b as ze}from"./UpdatePlaybackRateModal.vue_vue_type_script_setup_true_lang-447154f5.js";import{r as Fe}from"./LanguageIcon-4fa1d80d.js";import"./audiox_service-50bb327a.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-85b7d836.js";import"./v4-7fe747c7.js";import"./description-5a13e3d6.js";import"./TextArea.vue_vue_type_script_setup_true_lang-709fae59.js";import"./EllipsisVerticalIcon-6f70e25e.js";import"./Vue3DraggableResizable-34ce8632.js";import"./Slider.vue_vue_type_script_setup_true_lang-39df1582.js";import"./Toggle.vue_vue_type_script_setup_true_lang-486bb61a.js";import"./label-58a85e2a.js";import"./PlayIcon-372a642d.js";import"./InformationCircleIcon-1f149768.js";import"./index-bebe8bde.js";import"./FileUploader.vue_vue_type_script_setup_true_lang-a6ee2a20.js";import"./Select.vue_vue_type_script_setup_true_lang-abef0349.js";import"./PlusIcon-801b4f15.js";import"./SubtitleEditor.vue_vue_type_style_index_0_lang-8fc1b775.js";import"./CursorArrowRippleIcon-fc34cded.js";import"./Input.vue_vue_type_script_setup_true_lang-de129afd.js";import"./createLucideIcon-bc05acf5.js";import"./SpeakerWaveIcon-1bfc50af.js";const Ue={class:"h-16 p-4 box-border flex justify-between border-b"},Ge=["src"],Ke={class:"grow min-w-0 flex items-center justify-center"},qe=["title"],Ze={class:"flex items-center"},Qe={class:"relative mr-0.5"},et={key:0,class:"absolute -top-1 -right-1 w-3.5 h-3.5 text-[10px] font-semibold text-white bg-red-500 rounded-full flex items-center justify-center"},tt={class:"py-1"},it={key:0,class:"text-gray-400 text-xs py-2 px-4 font-normal whitespace-nowrap"},nt={key:0,class:"select-none w-32 text-gray-400 text-sm py-2 px-4 font-normal whitespace-normal break-words break-all"},lt={key:1,class:"max-h-96 overflow-y-auto"},st={class:"w-auto table-auto divide-y divide-gray-300"},ot={class:"divide-y divide-gray-200"},at={class:"py-4 pl-4 pr-2.5 text-sm font-semibold text-right whitespace-normal break-words break-all"},rt={key:0,class:"rounded ring-1 py-0.5 px-1 ring-gray-300 ml-2"},dt={class:"rounded ring-1 py-0.5 px-1 ring-gray-300 ml-2"},ct={class:"rounded ring-1 py-0.5 px-1 ring-gray-300 ml-2"},ut={class:"font-normal text-gray-500 text-right mt-2"},gt={class:"relative py-4 pl-3 pr-4 w-32 text-center text-sm font-medium whitespace-normal break-words break-all"},pt=["onClick"],ft={class:"py-1"},bt=n("div",{class:"fixed inset-0 bg-black bg-opacity-25"},null,-1),mt={class:"fixed inset-0 overflow-y-auto"},ht={class:"flex min-h-full items-center justify-center p-4 text-center"},vt={class:"mt-2"},yt={class:"text-sm text-gray-500"},xt={class:"mt-4 flex justify-end space-x-3"},wt=J({__name:"NewDubbingSpaceHeader",setup(T){const e=W(),t=fe(),o=me(),l=P(()=>e.exportJobs.filter(b=>b.status===U.PENDING||b.status===U.PROCESSING).length),h=P({get(){var d;return((d=e.editingDubbingJob)==null?void 0:d.title)||""},set(d){e.saveDubbingJobTitle(d)}}),x=M(!1),r=M(!1),u=M("video"),m=()=>Y(this,null,function*(){var D;u.value==="video"?yield e.createExportJob(!0,!0,"wav"):u.value==="audio"?yield e.createExportJob(!0,!1,"wav"):u.value==="subtitle"&&(yield e.exportSubtitle(!1,!0));const d=(D=e.editingDubbingJob)==null?void 0:D._id;if(!d)return;const b=yield t.getDubbingJob(d);b&&(e.setEditingDubbingJob(b),window.opener&&window.opener.postMessage({type:"dubbing_update"},"*"))});return(d,b)=>{const D=ce("router-link");return a(),v(H,null,[n("div",Ue,[!i(o).isDemo&&!i(o).isPlatform?(a(),R(D,{key:0,to:i(ke).LITE},{default:w(()=>[n("img",{class:"h-full",src:d.$t("brand.audioxLogoImgWText")},null,8,Ge)]),_:1},8,["to"])):I("",!0),n("div",Ke,[n("div",{class:"mr-2",title:i(e).isSavingDubbingJob?"":d.$t("audiox.dubbing.autoSaved")},[i(e).isSavingDubbingJob?(a(),R(F,{key:0,class:"h-6 w-6 text-gray-400","aria-hidden":"true"})):(a(),R(i(De),{key:1,class:"h-6 w-6 text-gray-400","aria-hidden":"true"}))],8,qe),f(be,{modelValue:h.value,"onUpdate:modelValue":b[0]||(b[0]=y=>h.value=y),disabled:i(e).isSavingDubbingJob,placeholder:d.$t("audiox.dubbing.untitled"),"text-class":"text-gray-500 text-sm"},null,8,["modelValue","disabled","placeholder"])]),n("div",Ze,[f(i(ae),{as:"div",class:"relative inline-block text-left mr-8"},{default:w(()=>[n("div",null,[f(i(se),{class:"inline-flex w-full group items-center justify-center gap-x-1.5 rounded-md px-2.5 py-2 text-sm font-semibold text-gray-600 hover:text-gray-800 hover:bg-gray-50 disabled:bg-transparent disabled:hover:bg-transparent",disabled:i(e).isBouncingJob,onClick:i(e).syncExportJobs},{default:w(()=>[n("div",Qe,[(a(),R(ne(i(e).isBouncingJob?F:i($e)),{class:"h-6 w-6 group-hover:text-gray-500 text-gray-400","aria-hidden":"true"})),l.value>0?(a(),v("span",et,S(l.value),1)):I("",!0)]),n("span",null,S(d.$t("audiox.dubbing.exportQueue")),1)]),_:1},8,["disabled","onClick"])]),f(le,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:w(()=>[f(i(oe),{class:L(["absolute right-0 z-10 mt-1 w-auto origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",[i(e).exportJobs.length===0?"w-32":"min-w-[24rem] max-w-[40rem]"]])},{default:w(()=>[n("div",tt,[i(e).isSyncingExportJobs?(a(),v("div",it,S(d.$t("common.loading")),1)):(a(),v(H,{key:1},[i(e).exportJobs.length===0?(a(),v("div",nt,S(d.$t("audiox.dubbing.exportQueueEmpty")),1)):(a(),v("div",lt,[n("table",st,[n("tbody",ot,[(a(!0),v(H,null,ie(i(e).exportJobs,y=>(a(),v("tr",{key:y._id},[n("td",at,[n("div",null,[y.exportSettings.outputVideo?(a(),v("span",rt,S(d.$t("audiox.dubbing.exportSettings.outputVideo")),1)):I("",!0),n("span",dt,S(y.exportSettings.mixAllTracks?d.$t("audiox.dubbing.exportSettings.mixAllTracks"):d.$t("audiox.dubbing.exportSettings.exportTracks")),1),n("span",ct,S(y.exportSettings.outputAudioFormat),1)]),n("p",ut,S(i(Pe)((Date.now()-y.createTimestamp)/1e3)),1)]),n("td",gt,[n("a",{class:L(["ml-2 -my-2 p-2 rounded-md font-semibold hover:bg-gray-50 disabled:text-gray-400 disabled:hover:text-gray-400 cursor-pointer break-words break-all block",[y.status===i(U).COMPLETED?"text-indigo-600 hover:text-indigo-700":"text-gray-400"]]),onClick:E=>{var A;return y.status===i(U).COMPLETED&&i(Te)(y.signedUrl||"",`${h.value}(${(A=i(e).editingDubbingJob)==null?void 0:A.targetLanguage})${i(Ce)(y.outputFileObjectKey||"")}`)}},S(d.$t(`audiox.dubbing.exportStatus.${y.status}`)),11,pt)])]))),128))])])]))],64))])]),_:1},8,["class"])]),_:1})]),_:1}),f(i(ae),{as:"div",class:"relative inline-block text-left"},{default:w(()=>[n("div",null,[f(i(se),{class:"inline-flex w-full items-center justify-center gap-x-1.5 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white hover:bg-indigo-500 disabled:bg-gray-400 disabled:hover:bg-gray-400",disabled:i(e).isBouncingJob||l.value>0},{default:w(()=>[n("span",null,S(l.value>0?d.$t("audiox.dubbing.exportStatus.PROCESSING"):d.$t("audiox.dubbing.export")),1),(a(),R(ne(i(e).isBouncingJob?F:i(Be)),{class:"ml-0.5 h-4 w-4 text-gray-100","aria-hidden":"true"}))]),_:1},8,["disabled"])]),f(le,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:w(()=>[f(i(oe),{class:"absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:w(()=>[n("div",ft,[i(e).isVideoJob?(a(),R(i(ee),{key:0},{default:w(({active:y})=>[n("button",{class:L([y?"bg-gray-100 text-gray-900":"text-gray-700","w-full text-right block px-4 py-2 text-sm"]),onClick:b[1]||(b[1]=()=>{var E;u.value="video",((E=i(e).editingDubbingJob)==null?void 0:E.status)==="EXPORTED"||r.value?m():x.value=!0})},S(d.$t("audiox.dubbing.exportVideo")),3)]),_:1})):I("",!0),f(i(ee),null,{default:w(({active:y})=>[n("button",{class:L([y?"bg-gray-100 text-gray-900":"text-gray-700","w-full text-right block px-4 py-2 text-sm"]),onClick:b[2]||(b[2]=()=>{var E;u.value="audio",((E=i(e).editingDubbingJob)==null?void 0:E.status)==="EXPORTED"||r.value?m():x.value=!0})}
1,S(d.$t("audiox.dubbing.exportAudio")),3)]),_:1}),f(i(ee),null,{default:w(({active:y})=>[n("button",{class:L([y?"bg-gray-100 text-gray-900":"text-gray-700","block w-full px-4 py-2 text-right text-sm"]),onClick:b[3]||(b[3]=()=>{var E;u.value="subtitle",((E=i(e).editingDubbingJob)==null?void 0:E.status)==="EXPORTED"||r.value?m():x.value=!0})},S(d.$t("audiox.dubbing.exportTranslationSubtitle")),3)]),_:1})])]),_:1})]),_:1})]),_:1})])]),f(i(We),{appear:"",show:x.value&&r.value===!1,as:"template"},{default:w(()=>[f(i(Ve),{as:"div",class:"relative z-50",style:{"margin-top":"-10vh"},onClose:b[6]||(b[6]=()=>{x.value=!1,r.value=!0})},{default:w(()=>[f(i(re),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:w(()=>[bt]),_:1}),n("div",mt,[n("div",ht,[f(i(re),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:w(()=>[f(i(He),{class:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all"},{default:w(()=>[f(i(Je),{as:"h3",class:"text-lg font-medium leading-6 text-gray-900"},{default:w(()=>[he(S(d.$t("audiox.dubbing.confirmExport")),1)]),_:1}),n("div",vt,[n("p",yt,S(d.$t("audiox.dubbing.confirmDetail")),1)]),n("div",xt,[n("button",{type:"button",class:"inline-flex justify-center rounded-md border border-transparent bg-blue-100 px-4 py-2 text-sm font-medium text-blue-900 hover:bg-blue-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",onClick:b[4]||(b[4]=()=>{x.value=!1,r.value=!0,m()})},S(d.$t("audiox.dubbing.confirm")),1),n("button",{type:"button",class:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2",onClick:b[5]||(b[5]=y=>x.value=!1)},S(d.$t("common.cancel")),1)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"])],64)}}}),kt=["data-voiceclip"],_t=n("div",{class:"overflow-x-hidden"},null,-1),St={key:0,class:"absolute top-0 left-0 w-full max-h-8 flex justify-end box-border p-1 pointer-events-none"},Tt={class:"text-xs text-indigo-600 p-0.5 bg-indigo-200/50 rounded backdrop-blur-md backdrop-opacity-80"},Ct={key:1,class:"absolute top-0 left-0 bg-white/50 text-blue-600 backdrop-filter backdrop-blur-lg rounded-md flex h-full w-full items-center justify-center pointer-events-none"},Pt=J({__name:"NewTranscriptionClip",props:{clip:{type:Object,required:!0},track:{type:Object,required:!0},index:{type:Number,required:!0}},setup(T){const e=T,t=W(),o=P({get:()=>t.draggingClipId===e.clip.id&&t.draggingClipTrackTypes.indexOf(O.TRANSCRIPTION)>=0?t.draggingClipSide:null,set:s=>{t.setDraggingClipId(e.clip.id),t.setDraggingClipSide(s),s?t.setDraggingClipTrackTypes([O.TRANSCRIPTION]):t.setDraggingClipTrackTypes([])}}),l=P({get:()=>t.draggingClipId===e.clip.id&&t.draggingClipTrackTypes.indexOf(O.TRANSCRIPTION)>=0?t.draggingClipOffsetX:0,set:s=>{t.draggingClipId===e.clip.id&&t.setDraggingClipOffsetX(s)}});let h=!1,x=0;const r=()=>{h||(h=!0,document.addEventListener("mousemove",B),document.addEventListener("mouseup",c))},u=()=>{h&&(document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",c),h=!1)},m=(s,p)=>{o.value||(o.value=s,x=p.clientX,l.value=0,r())},d=P(()=>e.index===0?0:e.track.clips[e.index-1].end),b=P(()=>e.index===e.track.clips.length-1?t.editingDubbingJob.duration:e.track.clips[e.index+1].start),D=P(()=>t.getPxBySeconds(e.clip.start)+(o.value==="left"||o.value==="center"?l.value:0)),y=P(()=>t.getPxBySeconds(e.clip.end)+(o.value==="right"||o.value==="center"?l.value:0)),E=P(()=>o.value!=="center"?0:l.value),A=P(()=>y.value-D.value),B=s=>{if(o.value){let p=s.clientX-x;const _=t.getPxBySeconds(e.clip.start),X=t.getPxBySeconds(e.clip.end);if(o.value==="left"){const j=_+p;p=Math.max(t.getPxBySeconds(d.value),j)-_}else if(o.value==="right"){const j=X+p;p=Math.min(t.getPxBySeconds(b.value),j)-X}else if(o.value==="center"){const j=_+p,Q=X+p;j<t.getPxBySeconds(d.value)?p=t.getPxBySeconds(d.value)-_:Q>t.getPxBySeconds(b.value)&&(p=t.getPxBySeconds(b.value)-X)}l.value=p}},c=()=>{t.modifyEditingJobTracks(s=>Y(this,null,function*(){if(o.value==="left"||o.value==="center")for(const p of s)for(const _ of p.clips)_.id===e.clip.id&&(_.start=Math.max(d.value,t.getSecondsByPx(D.value)));if(o.value==="right"||o.value==="center")for(const p of s)for(const _ of p.clips)_.id===e.clip.id&&(_.end=Math.min(b.value,t.getSecondsByPx(y.value)));for(const p of s)for(const _ of p.clips)_.id===e.clip.id&&((o.value==="left"||o.value==="center")&&(_.start=Math.max(d.value,t.getSecondsByPx(D.value))),(o.value==="right"||o.value==="center")&&(_.end=Math.min(b.value,t.getSecondsByPx(y.value))),o.value==="center"&&(_.audioStart+=t.getSecondsByPx(l.value)));return s})),o.value=null,l.value=0,u()};Z(()=>{u()});const g=P(()=>t.getPxBySeconds(e.clip.audioStart)-D.value+E.value),C=P(()=>t.busyClipIds.has(e.clip.id)),k=P(()=>{var s;
1return t.editingDubbingClipId===e.clip.id||((s=t.editingDubbingTrack)==null?void 0:s.id)===e.track.id});return(s,p)=>(a(),v("div",{class:L(["group ring-1 ring-inset bg-blue-50 ring-blue-400 hover:ring-blue-600 box-border hover:opacity-100 focus-within:opacity-100 transition-opacity",[k.value?"opacity-100":"opacity-75",C.value?"opacity-50 pointer-events-none":""]]),style:N({width:`${A.value}px`,left:`${D.value}px`}),"data-voiceclip":e.clip.id},[f(Oe,{track:T.track,clip:T.clip,width:A.value,"audio-left-offset-px":g.value,"is-editing":k.value},{middle:w(()=>[_t]),_:1},8,["track","clip","width","audio-left-offset-px","is-editing"]),n("div",{class:L(["absolute top-0 left-0 w-2 h-full cursor-ew-resize hover:border-l-4 hover:border-l-blue-600",[o.value&&l.value!==0?"opacity-0":"opacity-100"]]),onMousedown:p[0]||(p[0]=_=>m("left",_))},null,34),n("div",{class:L(["absolute top-0 right-0 w-2 h-full cursor-ew-resize hover:border-r-4 hover:border-r-blue-600",[o.value&&l.value!==0?"opacity-0":"opacity-100"]]),onMousedown:p[1]||(p[1]=_=>m("right",_))},null,34),i(q).isNumber(T.clip.speechSpeed)?(a(),v("div",St,[n("div",Tt,S(`${T.clip.speechSpeed.toFixed(2)}x`),1)])):I("",!0),C.value?(a(),v("div",Ct,[f(F,{class:"w-5 h-5 shrink-0"})])):I("",!0)],14,kt))}}),Dt={class:"relative h-full"},Et=["width","height"],$t=["width","height"],Ot=["height"],It=["height","x"],Lt=["height","x"],Rt=["height","x"],Nt=["height","x"],Mt=["width","height"],At=J({__name:"NewDubbingTrackContent",props:{track:{type:Object,required:!0}},setup(T){const e=T,t=M(null),o=P(()=>e.track.clips),l=W();ue(()=>{t.value&&l.syncScrollService.registerElement(t.value,$.TimelineContentX,!0,!1,!0)}),Z(()=>{t.value&&l.syncScrollService.unregisterElement(t.value,$.TimelineContentX)});const h=r=>{if(r.preventDefault(),t.value){if(Math.abs(r.deltaX)>Math.abs(r.deltaY))t.value.scrollLeft=Math.min(t.value.scrollLeft+r.deltaX,t.value.scrollWidth-t.value.clientWidth+1),l.syncScrollService.setLeadElement($.TimelineContentX,t.value),l.syncScrollService.sync($.TimelineContentX,t.value),l.updateTimelineStartEndFromTimelineContainerPositions();else if(Math.abs(r.deltaY)>Math.abs(r.deltaX))if(r.altKey||r.metaKey)if(r.ctrlKey)l.applyZoomYDelta(-r.deltaY);else{const u=r.clientX-t.value.getBoundingClientRect().left+t.value.scrollLeft,m=l.spaceTimelinePxPerSecond;l.applyZoomXDelta(-r.deltaY);const d=l.spaceTimelinePxPerSecond,b=u*(d/m),D=t.value.scrollLeft+b-u;t.value.scrollLeft=Math.min(D,t.value.scrollWidth-t.value.clientWidth+1),l.syncScrollService.setLeadElement($.TimelineContentX,t.value),l.syncScrollService.sync($.TimelineContentX,t.value),l.updateTimelineStartEndFromTimelineContainerPositions()}else l.syncScrollService.applyScroll($.TimelineY,0,r.deltaY)}},x=P(()=>{if(!l.editingDubbingJob)return[];if(e.track.type===O.ORIGINAL_VOCAL){const r=o.value.map((u,m)=>({clip:u,displayType:z.WAVEFORM,index:m,track:e.track}));for(const u of l.editingDubbingJob.tracks)u.type===O.TRANSCRIPTION&&u.clips.forEach((m,d)=>{for(const b of o.value)if(m.refClipId===b.id){r.push({clip:m,displayType:z.REFERENCE_VOCAL,index:d,track:u});break}});return r}else return e.track.type===O.TRANSCRIPTION?o.value.map((r,u)=>({clip:r,displayType:z.TRANSCRIPTION,index:u,track:e.track})):o.value.map((r,u)=>({clip:r,displayType:z.WAVEFORM,index:u,track:e.track}))});return(r,u)=>(a(),v("div",{ref_key:"containerel",ref:t,"data-trackcontent":"1",class:"relative overflow-hidden",onWheel:h},[n("div",{class:"h-full py-0.5 box-border",style:N({width:`${i(l).totalTimelineWidthPx}px`})},[n("div",Dt,[(a(),v("svg",{class:"absolute -top-0.5",width:i(l).totalTimelineWidthPx,height:i(l).trackContentHeightPx,style:{left:"0"}},[n("defs",null,[n("pattern",{id:"main-timeline-grid-0",x:"0",y:"0",width:i(l).spaceTimelinePxPerSecond*5,height:i(l).trackContentHeightPx,patternUnits:"userSpaceOnUse"},[n("rect",{width:"1",height:i(l).trackContentHeightPx,class:"fill-gray-200/70",x:"0",y:"0"},null,8,Ot),n("rect",{width:"1",height:i(l).trackContentHeightPx,class:"fill-gray-200/70",x:i(l).spaceTimelinePxPerSecond,y:"0"},null,8,It),n("rect",{width:"1",height:i(l).trackContentHeightPx,class:"fill-gray-200/70",x:i(l).spaceTimelinePxPerSecond*2,y:"0"},null,8,Lt),n("rect",{width:"1",height:i(l).trackContentHeightPx,class:"fill-gray-200/70",x:i(l).spaceTimelinePxPerSecond*3,y:"0"},null,8,Rt),n("rect",{width:"1",height:i(l).trackContentHeightPx,class:"fill-gray-200/70",x:i(l).spaceTimelinePxPerSecond*4,y:"0"},null,8,Nt)],8,$t)]),n("rect",{fill:"url(#main-timeline-grid-0)",x:"0",y:"0",width:i(l).totalTimelineWidthPx,height:i(l).trackContentHeightPx},null,8,Mt)],8,Et)),(a(!0),v(H,null,ie(x.value,m=>(a(),v(H,{key:m.clip.id},[m.displayType===i(z).TRANSCRIPTION?(a(),R(Pt,{key:0,class:"absolute h-full rounded-md",track:m.track,index:m.index,clip:m.clip},null,8,["track","index","clip"])):m.displayType===i(z).REFERENCE_VOCAL?(a(),R(Ie,{key:1,class:L(["absolute h-full rounded-md",[i(l).showTrackPayload?"":"hidden"]]),track:m.track,index:m.index,clip:m.clip},null,8,["class","track","index","clip"])):(a(),v("div",{key:2,class:L(["absolute h-full rounded-md ring-1 ring-inset",[T.track.type===i(O).BACKGROUND?"bg-stone-50 ring-stone-400 text-stone-400":"bg-fuchsia-50 ring-fuchsia-400 text-fuchsia-400"]]),style:N({width:`${i(l).getPxBySeconds(m.clip.end-m.clip.start)}px`})},null,6))],64))),128))])],4),ge(r.$slots,"overlay")],544))}}),Xt={class:"grow min-w-0"},Bt={key:1,class:"text-sm mb-2 py-1.5 px-2.5 text-gray-500 font-semibold"},Vt=J({__name:"NewDubbingTrackControls",props:{track:{type:Object,required:!0}},setup(T){const e=T,t=W(),o=P({get(){return we(e.track)},set(h){t.setTrackName(e.track.id,h)}}),l=h=>{h.preventDefault(),Math.abs(h.deltaY)>Math.abs(h.deltaX)&&(h.altKey||h.metaKey?h.ctrlKey&&t.applyZoomYDelta(-h.deltaY):t.syncScrollService.applyScroll($.TimelineY,0,h.deltaY))};
1return(h,x)=>(a(),v("div",{class:"py-2.5 pr-2 pl-1 box-border border-r flex overflow-hidden",onWheel:l},[n("div",Xt,[T.track.type===i(O).TRANSCRIPTION?(a(),R(be,{key:0,modelValue:o.value,"onUpdate:modelValue":x[0]||(x[0]=r=>o.value=r),class:"text-sm mb-2 text-gray-500 font-semibold w-full break-all",truncate:!1,placeholder:o.value,"input-class":"w-full text-sm","show-edit-icon":!0},null,8,["modelValue","placeholder"])):(a(),v("div",Bt,S(o.value),1))])],32))}}),Ht=J({__name:"NewDubbingTrack",props:{track:{type:Object,required:!0}},setup(T){const e=T,t=W(),o=P(()=>e.track.type===O.TRANSCRIPTION||e.track.type===O.ORIGINAL_VOCAL?t.trackContentHeightPx:Math.min(Se,t.trackContentHeightPx));return(l,h)=>(a(),v("div",{class:"flex box-border border-b",style:N({height:`${o.value}px`})},[f(Vt,{class:"h-full shrink-0",track:T.track,style:N({width:`${i(t).trackControlsWidthPx}px`})},null,8,["track","style"]),f(At,{class:"grow h-full",track:T.track},{overlay:w(()=>[ge(l.$slots,"content-overlay")]),_:3},8,["track"])],4))}}),Jt={key:0,class:"relative h-full"},Wt={class:"absolute bg-white/80 dark:bg-gray-800/95 backdrop-filter backdrop-blur-lg top-0 left-0 flex h-10 shrink-0 w-full z-20"},jt={class:"flex-1 h-full relative has-tooltip"},Yt={class:"tooltip w-48 left-0 bottom-full mb-1"},zt={class:"flex-1 h-full relative has-tooltip"},Ft={class:"tooltip w-48 left-0 bottom-full mb-1"},Ut=n("div",{class:"absolute top-0 left-[-5.5px] w-[3px] h-0 border-transparent border-t-gray-800 border-t-[7px] border-b-[7px] border-l-[6px] border-r-[6px]"},null,-1),Gt=n("div",{class:"absolute top-0 left-[-5.5px] w-[3px] h-0 border-transparent border-t-gray-800 border-t-[7px] border-b-[7px] border-l-[6px] border-r-[6px]"},null,-1),Kt=["data-trackid","data-speakerindex"],qt={class:"absolute bottom-0 w-full left-0 h-3 flex items-center"},Zt={class:"h-full bg-white/60 dark:bg-gray-800/95 backdrop-filter backdrop-blur-lg grow min-w"},Qt={key:1,class:"flex justify-center items-center p-8"},ei=J({__name:"NewDubbingSpaceTimelineEditor",setup(T){const e=W(),t=M(null),o=M(null),l=M(null);let h=!1;const x=M(null);function r(){const c=document.querySelector("[data-trackcontent]");return c!=null?c:t.value}function u(c){const g=r();if(!g)return;const C=g.clientWidth,k=g.scrollLeft,s=g.scrollWidth,p=e.getPxBySeconds(c.start),_=e.getPxBySeconds(c.end),X=(p+_)/2;if(X>=k&&X<=k+C)return;const Q=Math.max(0,Math.min(X-C/2,Math.max(0,s-C)));g.scrollLeft=Q,e.syncScrollService.setLeadElement($.TimelineContentX,g),e.syncScrollService.sync($.TimelineContentX,g),e.updateTimelineStartEndFromTimelineContainerPositions()}function m(c){if(!o.value||!c)return;const g=o.value,C=g.scrollTop,k=g.clientHeight,s=c.offsetTop,p=s+c.offsetHeight;if(s>=C&&p<=C+k)return;const X=Math.max(0,s-k/2);g.scrollTop=X}K(()=>e.playheadTime,()=>Y(this,null,function*(){const g=e.playingSubtitles[0];if(!g||g.id===x.value)return;x.value=g.id,yield pe(),u(g);const C=e.findTrackAndClip(g.id),k=o.value;let s=null;C!=null&&C.track&&k&&(s=k.querySelector(`[data-trackid="${C.track.id}"]`),!s&&typeof C.track.speakerIndex=="number"&&(s=k.querySelector(`[data-speakerindex="${C.track.speakerIndex}"]`))),m(s)}));const d=()=>{t.value&&!h&&(h=!0,e.syncScrollService.registerElement(t.value,$.TimelineContentX,!0,!1))},b=()=>{t.value&&h&&(e.syncScrollService.unregisterElement(t.value,$.TimelineContentX),h=!1)},D=()=>{o.value&&e.syncScrollService.registerElement(o.value,$.TimelineY,!1,!0)},y=()=>{o.value&&e.syncScrollService.unregisterElement(o.value,$.TimelineY)};K(()=>t.value,(c,g)=>{c!==g&&(c?d():b())}),K(()=>o.value,(c,g)=>{c!==g&&(c?D():y())}),ue(()=>{d(),D(),window.addEventListener("mousedown",E)}),Z(()=>{b(),y(),window.removeEventListener("mousedown",E)});const E=c=>{const g=c.target.closest("[data-voiceclip]");g?e.setEditingDubbingClipId(g.dataset.voiceclip):l.value&&l.value.contains(c.target)&&e.setEditingDubbingClipId(null)},A=c=>{c.preventDefault(),t.value&&(Math.abs(c.deltaX)>Math.abs(c.deltaY)?(t.value.scrollLeft=Math.min(t.value.scrollLeft+c.deltaX,t.value.scrollWidth-t.value.clientWidth+1),e.syncScrollService.setLeadElement($.TimelineContentX,t.value),e.syncScrollService.sync($.TimelineContentX,t.value),e.updateTimelineStartEndFromTimelineContainerPositions()):Math.abs(c.deltaY)>Math.abs(c.deltaX)&&(c.altKey||c.metaKey)&&(c.ctrlKey?e.applyZoomYDelta(-c.deltaY):(e.applyZoomXDelta(-c.deltaY),e.updateTimelineStartEndFromTimelineContainerPositions())))},B=P(()=>{var c;return(c=e.editingDubbingJob)==null?void 0:c.tracks.filter(g=>g.type!==O.BACKGROUND&&"speakerIndex"in g&&g.speakerIndex!=null)});return(c,g)=>{const C=ce("font-awesome-icon");return a(),v("div",{ref_key:"timelineeditorel",ref:l,class:"select-none"},[i(e).editingDubbingJob?(a(),v("div",Jt,[n("div",Wt,[i(e).editingDubbingJob.status!=="EXPORTED"?(a(),v("div",{key:0,class:"h-full shrink-0 border-b border-t border-r box-border flex",style:N({width:`${i(e).trackControlsWidthPx}px`})},[n("div",jt,[n("button",{class:L(["hover:bg-indigo-50 hover:text-indigo-600 w-full h-full box-border flex items-center justify-center",[i(e).isAllOriginalTrackOn?"text-indigo-600 bg-indigo-50":"text-gray-600"]]),onClick:g[0]||(g[0]=k=>i(e).switchToAllOriginalOrDub(i(O).ORIGINAL_VOCAL))},[f(C,{class:"h-4 w-4 shrink-0",icon:["far","waveform-lines"]})],2),n("span",Yt,S(c.$t("audiox.dubbing.onlyOriginalVocal")),1)]),n("div",zt,[n("button",{class:L(["hover:bg-indigo-50 hover:text-indigo-600 w-full h-full box-border flex items-center justify-center",[i(e).isAllDubTrackOn?"text-indigo-600 bg-indigo-50":"text-gray-600"]]),onClick:g[1]||(g[1]=k=>i(e).switchToAllOriginalOrDub(i(O).TRANSCRIPTION))},[f(i(Fe),{class:"h-4 w-4 shrink-0"})],2),n("span",Ft,S(c.$t("audiox.dubbing.onlyDubbedVocal")),1)])],4)):I("",!0),n("div",{ref_key:"timelinecontainerel",ref:t,"data-trackcontent":"",class:"min-w-0 grow h-full relative overflow-hidden",onWheel:A},[f(Le),f(G,{style:N({left:`${i(e).getPxBySeconds(i(e).playheadTime)}px`}),class:"pointer-events-none z-20"},{default:w(()=>[Ut]),_:1},8,["style"]),i(q).isNumber(i(e).hoverPlayheadTime)?(a(),R(G,{key:0,style:N({left:`${i(e).getPxBySeconds(i(e).hoverPlayheadTime)}px`}),class:"opacity-20 pointer-events-none"},{default:w(()=>[Gt]),_:1},8,["style"])):I("",!0)],544)]),i(e).editingDubbingJob.status!=="EXPORTED"?(a(),v("div",{key:0,ref_key:"trackscontainerel",ref:o,class:"pt-10 pb-3 box-border h-full overflow-x-hidden overflow-y-auto"},[(a(!0),v(H,null,ie(B.value,k=>{var s;return a(),v("div",{key:k.id,"data-trackid":k.id,"data-speakerindex":(s=k.speakerIndex)!=null?s:""},[f(Ht,{track:k},{"content-overlay":w(()=>[f(G,{style:N({left:`${i(e).getPxBySeconds(i(e).playheadTime)}px`}),class:"pointer-events-none z-20"},null,8,["style"]),i(q).isNumber(i(e).hoverPlayheadTime)?(a(),R(G,{key:0,style:N({left:`${i(e).getPxBySeconds(i(e).hoverPlayheadTime)}px`}),class:"opacity-30 pointer-events-none"},null,8,["style"])):I("",!0)]),_:2},1032,["track"])],8,Kt)}),128))],512)):I("",!0),n("div",qt,[i(e).editingDubbingJob.status!=="EXPORTED"?(a(),v("div",{key:0,class:"border-r h-full",style:N({width:`${i(e).trackControlsWidthPx}px`})},null,4)):I("",!0),n("div",Zt,[f(Re)])])])):(a(),v("div",Qt,[f(F,{class:"h-8 w-8"}
1)]))],512)}}}),ti={class:"flex flex-col h-full"},ii=n("div",{class:"h-0.5 w-full group-hover:bg-indigo-600 transition-colors delay-100"},null,-1),ni=[ii],li={key:1},te=200,de=64,ji=J({__name:"NewDubbingSpace",setup(T){const e=fe(),t=W(),o=ve(),l=_e(),h=me(),x=P(()=>{var s;return((s=t.editingDubbingJob)==null?void 0:s.status)==="EXPORTED"});let r=!1;const u=M(null),m=M(0),d=M(0),b=s=>{s.preventDefault(),t.undoDubbingJobEdit()},D=s=>{s.preventDefault(),t.redoDubbingJobEdit()},y=s=>{const p=s.key.toLowerCase();(s.ctrlKey||s.metaKey)&&(p==="q"?(s.preventDefault(),t.dubCurrentClip()):p==="l"&&h.isDemo?(s.preventDefault(),t.editingDubbingClipId&&t.startRevisingClipTranslation(t.editingDubbingClipId)):p==="m"?(s.preventDefault(),t.editingDubbingClipId&&t.startRevisingClipSpeed(t.editingDubbingClipId)):p==="arrowleft"||p==="left"?(s.preventDefault(),t.switchToAllOriginalOrDub(O.ORIGINAL_VOCAL)):(p==="arrowright"||p==="right")&&(s.preventDefault(),t.switchToAllOriginalOrDub(O.TRANSCRIPTION)))},E=()=>{t.nudgeX(-100)},A=()=>{t.nudgeX(100)};ye(()=>Y(this,null,function*(){if(!o.params.jobId)return;const s=yield e.getDubbingJob(o.params.jobId);s&&(t.setEditingDubbingJob(s),e.syncVoiceList(),t.syncVoicesInProjectLibrary(),t.syncExportJobs(),h.setIsLite(!0),window.location.pathname.startsWith("/dubbing")&&(h.setIsPlatform(!0),document.title=xe.t("demo.title")),V("ctrl+z,command+z",b),V("ctrl+shift+z,command+shift+z",D),V("left",E),V("right",A),window.addEventListener("keydown",y))})),Z(()=>{V.unbind("ctrl+z,command+z",b),V.unbind("ctrl+shift+z,command+shift+z",D),V.unbind("left",E),V.unbind("right",A),window.removeEventListener("keydown",y),k()});const B=s=>{u.value&&t.setTimelineHeightPx(Math.min(window.innerHeight-te-de,d.value-(s.clientY-m.value)))},c=()=>{k()},g=s=>{C(),m.value=s.clientY,d.value=u.value.clientHeight,B(s)},C=()=>{r||(r=!0,window.addEventListener("mousemove",B),window.addEventListener("mouseup",c))},k=()=>{r&&(window.removeEventListener("mousemove",B),window.removeEventListener("mouseup",c),r=!1)};return K(()=>t.editingDubbingJob,(s,p)=>Y(this,null,function*(){yield pe(),requestAnimationFrame(()=>{s&&!p&&u.value&&t.setTimelineHeightPx(Math.min(window.innerHeight-te-de,u.value.clientHeight))})})),(s,p)=>(a(),v("div",ti,[i(l).currentUser?(a(),v(H,{key:0},[f(wt),n("div",{class:"flex items-center grow bg-gray-50",style:N({minHeight:`${te}px`})},[x.value?I("",!0):(a(),R(Ae,{key:0,class:"w-72 h-full"})),f(Ne,{class:L(`h-full ${x.value?"":"max-h-56 sm:max-h-96"} grow min-w-[300px] sm:min-w[400px]`)},null,8,["class"]),x.value?I("",!0):(a(),R(Xe,{key:1,class:"w-72 xl:w-80 h-full"}))],4),n("div",{ref_key:"timelineeditorcontainerel",ref:u,class:L(["border-t border-box min-h-0 flex flex-col relative",[i(q).isNumber(i(t).timelineHeightPx)?"shrink-0":""]]),style:N({height:x.value?"120px":`${i(t).timelineHeightPx}px`})},[f(Me),f(ei,{class:"min-h-0 grow"}),x.value?I("",!0):(a(),v("div",{key:0,class:"h-3 w-full absolute top-0 left-0 group cursor-ns-resize select-none",onMousedown:g},ni,32))],6),f(je),f(Ye),f(ze),f(Ee)],64)):(a(),v("div",li))]))}});export{ji 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.