1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4385],{4385:(e,t,s)=>{s.r(t),s.d(t,{default:()=>g});var l=s(47477),r=s(2193),a=s(84976),i=s(10248),o=s(44407),n=s(56839),c=s(47386),d=s(74420),x=s(13889),m=s(61270),u=s(71265),h=s(43254),p=s(61623),b=s(9310);let f=(0,a.default)(()=>s.e(31470).then(s.bind(s,76232)),{loadableGenerated:{webpack:()=>[76232]},ssr:!1});function g({open:e,onOpenChange:t,onDelete:s,showHistoryHint:a=!1,video:j}){let w=(0,x.c)("components.modal.video-detail"),v=(0,x.c)("components.modal.video-history");(0,n.A)(e=>e.userInfo);let[N,y]=(0,r.useState)(!1),[k,C]=(0,r.useState)(!1),S=async()=>{j.url&&(0,u.PE)(j.url,`video-${j.id}.mp4`)},A=async()=>{if(!N){y(!0);try{let e=await (0,i.l)(j.id);200===e.code?((0,o.DX)(),m.oR.success(e.msg||v("delete-success")),s?.(),t(!1)):m.oR.error(e.msg||v("delete-fail"))}catch(e){m.oR.error(e.message||v("delete-fail"))}finally{y(!1)}}};return(0,l.jsxs)(h.lG,{open:e,onOpenChange:t,children:[(0,l.jsx)(h.ZJ,{children:(0,l.jsx)(h.Cf,{className:"h-[calc(100vh-24px)] max-h-[700px] w-[calc(100vw-16px)] max-w-[1452px] border-none bg-transparent p-0 shadow-none sm:max-w-[1452px]",showCloseButton:!1,overlayClassName:"bg-black/80",hiddenTitle:w("title"),children:(0,l.jsxs)("div",{className:"border-color-b1 flex h-full w-full flex-col overflow-y-auto rounded-lg border shadow-lg lg:flex-row lg:overflow-hidden",children:[(0,l.jsx)("div",{className:"flex w-full shrink-0 items-center justify-center bg-black p-3 lg:h-full lg:flex-1 lg:p-6",children:(0,l.jsx)("video",{src:j.url,poster:j.posterUrl,controls:!0,autoPlay:!0,className:"max-h-[50vh] max-w-full rounded object-contain lg:max-h-[576px]"})}),(0,l.jsxs)("div",{className:"border-color-b1 flex w-full flex-col border-t bg-[#16171b] lg:h-full lg:border-t-0 lg:border-l lg:w-[450px] lg:shrink-0",children:[(0,l.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-[#34353b] p-3",children:[(0,l.jsx)("h2",{className:"text-2xl leading-8 font-medium text-white capitalize",children:w("title")}),(0,l.jsx)("button",{type:"button",onClick:()=>t(!1),className:"flex h-9 w-9 cursor-pointer items-center justify-center rounded-[3px] transition-colors hover:bg-white/10",children:(0,l.jsx)(c.A,{className:"h-5 w-5 text-white"})})]}),(0,l.jsxs)("div",{className:"custom-scrollbar flex flex-1 flex-col gap-3 overflow-y-auto p-3",children:[(0,l.jsx)(p.mL,{prompt:j.prompt,translationKey:"components.modal.video-detail"}),(0,l.jsx)(p.EK,{modelName:j.modelName}),(j.createTime||void 0!==j.credit||j.resolution||j.duration)&&(0,l.jsx)("div",{className:"flex flex-col gap-2 rounded-lg bg-[#1c1d23] p-3",children:(0,l.jsxs)("div",{className:"flex flex-col gap-1.5 text-sm text-gray-300",children:[j.createTime&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("span",{className:"text-gray-400",children:[w("generatedTime"),": "]}),(0,l.jsx)("span",{children:(e=>{if(!e)return"";let t=new Date(e),s=t.getFullYear(),l=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${l}-${r}`})(j.createTime)})]}),void 0!==j.credit&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("span",{className:"text-gray-400",children:[w("credit"),": "]}),(0,l.jsxs)("span",{children:["$",j.credit.toFixed(4)]})]}),j.resolution&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("span",{className:"text-gray-400",children:[w("resolution"),": "]}),(0,l.jsx)("span",{children:j.resolution})]}),j.duration&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("span",{className:"text-gray-400",children:[w("duration"),": "]}),(0,l.jsxs)("span",{children:[j.duration,"s"]})]})]})}),a&&(0,l.jsx)("div",{className:"rounded-lg bg-[#1c1d23] p-3",children:(0,l.jsx)("p",{className:"text-sm text-gray-400",children:w("historyHint")})})]}),(0,l.jsx)("div",{className:"flex shrink-0 flex-col gap-2 border-t border-[#34353b] p-3",children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("button",{type:"button",onClick:S,className:"flex h-[42px] flex-1 cursor-pointer items-center justify-center gap-2 rounded-lg bg-[#1c1d23] transition-colors hover:bg-[#252629]",children:[(0,l.jsx)(d.A,{className:"h-5 w-5 text-white"}),(0,l.jsx)("span",{className:"text-sm text-white",children:w("download")})]}),(0,l.jsx)(b.A,{mediaId:j.taskId?void 0:j.id,taskId:j.taskId,mediaType:"video",modelName:j.modelName},j.id),(0,l.jsx)(p.et,{onClick:()=>{C(!0)},disabled:N})]})})]})]})})}
1),(0,l.jsx)(f,{open:k,setOpen:C,callback:A})]})}},9310:(e,t,s)=>{s.d(t,{A:()=>b});var l=s(47477),r=s(2193),a=s(86736),i=s(21218);async function o(e,t,s){return(0,a.wi)("/feedback/media",{method:"POST",body:JSON.stringify({mediaId:e,mediaType:t,content:s})})}async function n(e,t,s,l){let r=1;for(;;){let a=await (0,i.J)(e,{media_type:s,model_name:l,pageNum:r,pageSize:30}),o=a.rows.find(e=>e.task_id===t);if(o)return o.id;if(0===a.rows.length||30*r>=a.total)return;r+=1}}var c=s(56839);let d=(0,s(61133).A)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]);var x=s(13889),m=s(61270),u=s(43254),h=s(62236),p=s(59343);function b({mediaId:e,taskId:t,mediaType:s,modelName:a}){let i=(0,x.c)("components.modal.media-report"),f=(0,c.A)(e=>e.auth),g=(0,r.useId)(),j=(0,r.useRef)(!1),[w,v]=(0,r.useState)(!1),[N,y]=(0,r.useState)(""),[k,C]=(0,r.useState)(!1),S=e=>{!j.current&&(v(e),e||y(""))},A=async l=>{if(l.preventDefault(),!j.current&&N.trim()){j.current=!0,C(!0);try{let l=e||(t&&f?.access_token?await n(f.access_token,t,s,a):void 0);if(!l)return void m.oR.error(i("unavailable"));let r=await o(l,s,N.trim());if(200!==r.code)return void m.oR.error(i("error"));m.oR.success(i("success")),v(!1),y("")}catch{m.oR.error(i("error"))}finally{j.current=!1,C(!1)}}};return(0,l.jsxs)(u.lG,{open:w,onOpenChange:S,children:[(0,l.jsxs)("button",{type:"button",onClick:()=>S(!0),title:i("button"),"aria-label":i("button"),className:"flex h-[42px] cursor-pointer items-center justify-center gap-2 rounded-lg bg-[#1c1d23] px-3 text-sm text-white transition-colors hover:bg-[#252629]",children:[(0,l.jsx)(d,{className:"h-4 w-4"}),i("button")]}),(0,l.jsxs)(u.Cf,{className:"border-color-b1 w-[calc(100vw-32px)] rounded-xl bg-[#16171b] p-5 sm:max-w-[420px]",children:[(0,l.jsx)(u.L3,{className:"pr-6 text-white",children:i("title")}),(0,l.jsx)(u.rr,{className:"text-sm text-[#cfcfcf]",children:i("description")}),(0,l.jsxs)("form",{onSubmit:A,className:"flex flex-col gap-4",children:[(0,l.jsx)("label",{htmlFor:g,className:"text-sm text-white",children:i("label")}),(0,l.jsx)(h.T,{id:g,value:N,onChange:e=>y(e.target.value),placeholder:i("placeholder"),required:!0,disabled:k,className:"custom-scrollbar min-h-32 max-h-64 resize-y rounded-lg border-[#34353b] bg-[#111214] text-white"}),(0,l.jsxs)("div",{className:"flex gap-3",children:[(0,l.jsx)("button",{type:"button",onClick:()=>S(!1),disabled:k,className:"h-10 flex-1 cursor-pointer rounded-lg bg-white/10 text-sm text-white/70 disabled:cursor-not-allowed disabled:opacity-50",children:i("cancel")}),(0,l.jsxs)("button",{type:"submit",disabled:k||!N.trim(),className:"bg-color-main flex h-10 flex-1 cursor-pointer items-center justify-center gap-2 rounded-lg text-sm text-white disabled:cursor-not-allowed disabled:opacity-50",children:[k&&(0,l.jsx)(p.A,{className:"size-4"}),k?i("submitting"):i("submit")]})]})]})]})]})}}}]);
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.