PageSourceSearch

https://halalgen.ai/assets/feature-movies-CRdAWBcp.js

js halalgen.ai collected 2026-10-05 12:08:58 UTC 37,109 bytes, 5 lines download raw bytes

1import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{D as t,Dt as n,M as r,R as i,U as a,Yt as o,bt as s,en as c,f as l,ft as u,gt as d,mt as f,ot as p,p as m,r as h,tt as g,v as _}from"./feature-ads-I9A0VzNL.js";import{a as v,r as y}from"./feature-canvas-DFLJXWoD.js";import{c as b,d as x,l as S}from"./feature-cinema-BNBkw95C.js";import{i as C}from"./feature-billing-vcNlJAML.js";import{A as w,b as T}from"./feature-assets-D7wfjTPG.js";var E=d(`FolderOpen`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),D=e(c(),1),O=s();function k({assets:e,onRefresh:t,onAddToTimeline:i}){let[o,s]=(0,D.useState)(``),[c,l]=(0,D.useState)(!1);return(0,O.jsxs)(`div`,{className:`h-full flex flex-col bg-[#030407] border-r-2 border-white/10`,children:[(0,O.jsxs)(`div`,{className:`p-8 space-y-6 border-b-2 border-white/10 relative overflow-hidden bg-[#10141D]/50`,children:[(0,O.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-1 bg-[#25D0C8]/30`}),(0,O.jsx)(`label`,{className:`text-[10px] font-black uppercase text-white/50 tracking-[0.4em]`,children:`Asset Creation`}),(0,O.jsx)(`div`,{className:`relative group p-1 rounded-2xl bg-[#020305] border-2 border-white/10 focus-within:border-[#25D0C8]/50 transition-all`,children:(0,O.jsx)(`textarea`,{value:o,onChange:e=>s(e.target.value),placeholder:`Cinematic drone shot of...`,className:`w-full h-24 bg-transparent p-4 text-xs text-white/90 outline-none placeholder:text-white/20 resize-none transition-all`})}),(0,O.jsx)(`button`,{onClick:async()=>{if(o){l(!0);try{await n(`/api/movies/generate`,`POST`,{prompt:o,provider:`Veo31Std`,duration:5}),s(``),t()}catch(e){alert(e.message)}finally{l(!1)}}},disabled:c,className:`w-full py-4 btn-specular-cta text-white font-black text-[10px] uppercase rounded-xl flex items-center justify-center gap-3 transition-all active:scale-95 disabled:opacity-20 border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-xl`,children:c?(0,O.jsx)(a,{className:`animate-spin text-white`,size:16}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(r,{size:16,className:`text-white`}),` Synthesize Clip`]})})]}),(0,O.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-8 space-y-6 custom-scrollbar`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between pb-2 border-b-2 border-white/10`,children:[(0,O.jsx)(`label`,{className:`text-[10px] font-black uppercase text-white/50 tracking-[0.4em]`,children:`Vault Library`}),(0,O.jsxs)(`span`,{className:`text-[9px] font-mono text-white/40`,children:[e.length,` items`]})]}),(0,O.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:e.map(e=>(0,O.jsx)(`div`,{className:`group relative aspect-video bg-[#030407] rounded-2xl border-2 border-white/10 overflow-hidden shadow-2xl transition-all hover:border-[#25D0C8]/40`,children:e.status===`completed`?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`video`,{src:e.video_url,className:`w-full h-full object-cover opacity-60 group-hover:opacity-80 transition-opacity`}),(0,O.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-[#030407]/80 to-transparent`}),(0,O.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all transform scale-90 group-hover:scale-100`,children:(0,O.jsx)(`button`,{onClick:()=>i(e),className:`w-12 h-12 flex items-center justify-center rounded-full bg-[#25D0C8] text-white shadow-2xl hover:bg-[#20b8b1] border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] transition-all`,children:(0,O.jsx)(T,{size:24,strokeWidth:3})})}),(0,O.jsxs)(`div`,{className:`absolute bottom-3 left-4 right-4 flex items-center justify-between pointer-events-none`,children:[(0,O.jsx)(`span`,{className:`text-[8px] font-black text-white/60 uppercase tracking-widest truncate max-w-[70%]`,children:e.prompt}),(0,O.jsx)(`span`,{className:`text-[8px] font-mono text-[#25D0C8] bg-[#25D0C8]/10 border border-[#25D0C8]/20 px-2 py-0.5 rounded`,children:`5s`})]})]}):(0,O.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 bg-[#030407]`,children:[(0,O.jsx)(`div`,{className:`w-12 h-12 rounded-full border-2 border-white/10 flex items-center justify-center`,children:(0,O.jsx)(a,{className:`animate-spin text-[#25D0C8]`,size:20})}),(0,O.jsx)(`span`,{className:`text-[8px] uppercase font-black text-white/30 tracking-[0.2em]`,children:e.status})]})},e.id))})]})]})}function A({activeClip:e}){return e?(0,O.jsx)(`div`,{className:`flex-1 p-8 flex items-center justify-center`,children:(0,O.jsxs)(`div`,{className:`relative aspect-video w-full max-w-4xl bg-black rounded-2xl overflow-hidden shadow-2xl border border-white/10`,children:[(0,O.jsx)(`video`,{src:e.videoUrl,controls:!0,autoPlay:!0,className:`w-full h-full object-contain`},e.videoUrl),(0,O.jsxs)(`div`,{className:`absolute top-4 left-4 px-3 py-1 bg-black/60 backdrop-blur-md rounded-full text-[9px] font-black uppercase text-halal-teal border border-halal-teal/30`,children:[`Preview: `,e.name]})]})}):(0,O.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-white/10 font-black uppercase tracking-[0.5em]`,children:`No Clip Selected`})}function j({selectedClip:e,onUpdate:t}){return e?(0,O.jsxs)(`div`,{className:`h-full border-l-2 border-white/10 bg-[#030407] flex flex-col`,children:[(0,O.jsxs)(`div`,{className:`p-4 border-b-2 border-white/10`,children:[(0,O.jsx)(`h3`,{className:`text-[10px] font-black uppercase tracking-widest text-white/50 mb-1`,children:`Properties`}),(0,O.jsx)(`h2`,{className:`text-sm font-bold truncate text-white`,children:e.name})]}),(0,O.jsxs)(`div`,{className:`p-4 space-y-6 overflow-y-auto custom-scrollbar`,children:[(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(`label`,{className:`text-[10px] font-bold uppercase text-white/40 block`,children:`Clip Name`}),(0,O.jsx)(`input`,{type:`text`,value:e.name,onChange:e=>t({name:e.target.value}),className:`w-full bg-[#020305] border-2 border-white/15 rounded-xl px-3 py-2 text-xs text-white focus:border-[#25D0C8] outline-none transition-colors`})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(`label`,{className:`text-[10px] font-bold uppercase text-white/40 block`,children:`Start Time`}),(0,O.jsx)(`input`,{type:`number`,step:`0.1`,value:e.startTime,onChange:e=>t({startTime:parseFloat(e.target.value)}),className:`w-full bg-[#020305] border-2 border-white/15 rounded-xl px-3 py-2 text-xs text-white focus:border-[#25D0C8] outline-none font-mono transition-colors`})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(`label`,{className:`text-[10px] font-bold uppercase text-white/40 block`,children:`Duration (s)`}),(0,O.jsx)(`input`,{type:`number`,step:`0.1`,value:e.duration,onChange:e=>t({duration:parseFloat(e.target.value)}),className:`w-full bg-[#020305] border-2 border-white/15 rounded-xl px-3 py-2 text-xs text-white focus:border-[#25D0C8] outline-none font-mono transition-colors`})]})]}),(0,O.jsxs)(`div`,{className:`space-y-3 pt-4 border-t-2 border-white/10`,children:[(0,O.jsx)(`label`,{className:`text-[10px] font-bold uppercase text-white/40 block`,children:`Transform`}),(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsxs)(`div`,{className:`flex justify-between text-xs text-white/60`,children:[(0,O.jsx)(`span`,{children:`Scale`}),(0,O.jsx)(`span`,{className:`font-mono`,children:`100%`})]}),(0,O.jsx)(`input`,{type:`range`,className:`w-full accent-[#25D0C8]`,defaultValue:100})]})]})]})]}):(0,O.jsx)(`div`,{className:`h-full border-l-2 border-white/10 bg-[#030407] flex items-center justify-center`,children:(0,O.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-widest text-white/30`,children:`Select a clip`})})}function M({clips:e,onSelectClip:t,onGenerateClip:n,selectedClipId:i,totalDuration:a}){let[o,s]=(0,D.useState)(window.innerWidth<768?3:5);(0,D.useEffect)(()=>{let e=()=>{s(window.innerWidth<768?3:5)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let c=a*o,l=(0,D.useMemo)(()=>{let e=[],t=Math.floor(a/10);for(let n=0;n<=t;n++){let t=n*10;e.push({left:t*o,isMajor:t%30==0,label:`${t}s`})}return e},[a,o]),u=(0,D.useRef)(null);return(0,O.jsxs)(`div`,{className:`h-64 md:h-80 bg-[#030407] border-t-2 border-white/10 flex flex-col select-none relative overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`flex items-center h-10 md:h-12 px-4 md:px-6 border-b-2 border-white/10 bg-[#10141D] justify-between relative z-20`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 md:gap-6`,children:[(0,O.jsxs)(`div`,{className:`flex flex-col`,children:[(0,O.jsx)(`span`,{className:`text-[7px] md:text-[8px] font-black uppercase text-white/40 tracking-[0.3em] leading-none mb-1`,children:`Timeline`}),(0,O.jsx)(`span`,{className:`text-[9px] md:text-[10px] font-black uppercase text-white tracking-widest leading-none`,children:`Master Track`})]}),(0,O.jsx)(`div`,{className:`h-4 w-px bg-white/10 hidden xs:block`}),(0,O.jsxs)(`div`,{className:`hidden xs:flex items-center gap-2.5 px-3 py-1 rounded-full bg-[#25D0C8]/10 border border-[#25D0C8]/30`,children:[(0,O.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-[#25D0C8] shadow-[0_0_8px_rgba(37,208,200,0.6)] animate-pulse`}),(0,O.jsx)(`span`,{className:`text-[8px] font-black text-[#25D0C8] uppercase tracking-widest`,children:`Logic Lock`})]})]}),(0,O.jsx)(`div`,{className:`flex items-center gap-4`,children:(0,O.jsx)(`div`,{className:`px-2 md:px-3 py-1 rounded-md bg-[#020305] border border-white/10 font-mono text-[9px] md:text-[10px] text-white/60 tracking-widest`,children:new Date(a*1e3).toISOString().substr(11,8)})})]}),(0,O.jsx)(`div`,{ref:u,onWheel:e=>{u.current&&(u.current.scrollLeft+=e.deltaY)},className:`flex-1 overflow-x-auto no-scrollbar relative bg-[#030407] touch-pan-x`,children:(0,O.jsxs)(`div`,{className:`relative h-full`,style:{width:`${c+(window.innerWidth<768?100:400)}px`},children:[(0,O.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-8 border-b border-white/10 bg-[#030407]/90 backdrop-blur-md z-10 sticky`,children:l.map((e,t)=>(0,O.jsx)(`div`,{className:`absolute bottom-0 border-l border-white/10`,style:{left:`${e.left}px`,height:e.isMajor?`100%`:`30%`},children:e.isMajor&&(0,O.jsx)(`span`,{className:`absolute top-2 left-2 text-[6px] md:text-[7px] font-black text-white/30 uppercase tracking-tighter whitespace-nowrap`,children:e.label})},t))}),(0,O.jsx)(`div`,{className:`absolute inset-0 pt-8 pointer-events-none opacity-20`,children:(0,O.jsx)(`div`,{className:`h-full w-full bg-[repeating-linear-gradient(90deg,transparent,transparent_49px,rgba(255,255,255,0.02)_50px)]`})}),(0,O.jsx)(`div`,{className:`pt-10 md:pt-12 px-4 md:px-10 relative h-full`,children:e.map(a=>{let s=i===a.id,c=!a.videoUrl;return(0,O.jsxs)(`button`,{onClick:()=>t(a),style:{left:`${a.startTime*o}px`,width:`${a.duration*o}px`},className:`absolute top-6 h-32 md:h-44 rounded-2xl md:rounded-3xl transition-all flex flex-col overflow-hidden group shadow-2xl
2                                        ${s?`border-2 border-[#25D0C8] bg-[#10141D] z-20 shadow-[0_0_25px_rgba(37,208,200,0.2)]`:`border-2 border-white/10 hover:border-white/25 bg-[#030407]`}
3                                        ${c?`surface-matte border-dashed`:``}
4                                    `,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between px-3 md:px-5 py-2 md:py-3 bg-[#020305]/60 border-b border-white/10`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`div`,{className:`w-1 md:w-1.5 h-1 md:h-1.5 rounded-full ${c?`bg-white/20`:`bg-[#25D0C8]`}`}),(0,O.jsxs)(`span`,{className:`text-[7px] md:text-[8px] font-black text-white/50 uppercase tracking-widest`,children:[`Shot `,e.indexOf(a)+1]})]}),(0,O.jsxs)(`span`,{className:`text-[7px] md:text-[8px] font-mono text-white/30`,children:[a.duration,`s`]})]}),(0,O.jsx)(`div`,{className:`flex-1 relative flex flex-col overflow-hidden`,children:c?(0,O.jsxs)(`div`,{className:`relative z-10 h-full flex flex-col p-3 md:p-6`,children:[(0,O.jsx)(`p`,{className:`text-[9px] md:text-xs font-medium text-white/70 leading-relaxed text-left italic line-clamp-2 md:line-clamp-3`,children:a.name}),(0,O.jsx)(`div`,{className:`mt-auto opacity-0 md:group-hover:opacity-100 transition-all transform translate-y-2 group-hover:translate-y-0`,children:(0,O.jsxs)(`div`,{onClick:e=>{e.stopPropagation(),n?.(a.id)},className:`flex items-center gap-2 px-3 md:px-4 py-1.5 md:py-2 rounded-lg md:rounded-xl bg-[#25D0C8] text-white text-[8px] md:text-[9px] font-black uppercase w-fit cursor-pointer hover:bg-[#20b8b1] transition-all border border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)]`,children:[(0,O.jsx)(r,{size:10}),` Synthesize`]})})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`video`,{src:a.videoUrl,className:`absolute inset-0 w-full h-full object-cover opacity-40 group-hover:opacity-60 transition-opacity pointer-events-none`}),(0,O.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-[#030407]/90 via-trans
4parent to-transparent`}),(0,O.jsx)(`div`,{className:`absolute bottom-2 md:bottom-3 left-3 md:left-4 right-3 md:right-4`,children:(0,O.jsx)(`p`,{className:`text-[7px] md:text-[9px] font-bold text-white/60 truncate uppercase tracking-widest`,children:a.name})})]})}),(0,O.jsx)(`div`,{className:`h-0.5 md:h-1 w-full bg-white/5`,children:(0,O.jsx)(`div`,{className:`h-full transition-all duration-1000 ${c?`w-0`:`w-full bg-[#25D0C8]`}`})})]},a.id)})}),(0,O.jsx)(`div`,{className:`absolute top-0 bottom-0 left-0 w-px bg-[#25D0C8] z-30 pointer-events-none`,children:(0,O.jsx)(`div`,{className:`absolute top-0 -left-[3px] md:-left-[5px] w-1.5 md:w-2.5 h-6 md:h-8 bg-[#25D0C8] rounded-b-md shadow-[0_0_20px_rgba(37,208,200,0.8)]`})})]})})]})}var N=({step:e,setStep:n,balance:o,topupBalance:s,tier:c,showPricing:d,setShowPricing:g,profile:_,movieLocked:v,videoModels:y,durationList:T,idea:E,setIdea:D,duration:N,setDuration:P,model:F,setModel:I,loading:L,assets:R,timeline:z,setTimeline:B,selectedClip:V,setSelectedClip:H,estCost:U,showPrompt:W,setShowPrompt:G,refreshAssets:K,launchProduction:q,addToTimeline:J,handleGenerateClip:Y})=>(0,O.jsxs)(`div`,{className:`h-screen bg-[#030407] text-white font-sans overflow-hidden flex flex-col relative pt-32 md:pt-36`,children:[d&&(0,O.jsx)(`div`,{className:`fixed inset-0 z-[1000] bg-black/80 backdrop-blur-sm flex items-center justify-center`,children:(0,O.jsx)(`div`,{className:`w-full h-full max-w-7xl mx-auto relative`,children:(0,O.jsx)(C,{onBack:()=>g(!1)})})}),(0,O.jsx)(h,{balance:o,topupBalance:s,tier:c,onPricingClick:()=>g(!0)}),e===`vision`&&(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 relative overflow-hidden`,children:[(0,O.jsx)(`div`,{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-[#25D0C8]/5 blur-[120px] rounded-full pointer-events-none`}),(0,O.jsxs)(`div`,{className:`max-w-3xl w-full space-y-12 relative z-10`,children:[(0,O.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,O.jsx)(`div`,{className:`inline-flex p-4 rounded-3xl bg-[#020305] border-2 border-white/10 mb-6 shadow-2xl`,children:(0,O.jsx)(i,{className:`text-[#25D0C8]`,size:32})}),(0,O.jsxs)(`h2`,{className:`text-6xl font-black tracking-tighter text-white`,children:[`Capture the `,(0,O.jsx)(`span`,{className:`text-[#25D0C8]`,children:`Unseen`}),`.`]}),(0,O.jsx)(`p`,{className:`text-white/40 text-lg font-medium tracking-tight`,children:`HalalGen AI will synthesize your narrative into a production-grade scenario.`})]}),(0,O.jsx)(`div`,{className:`group relative p-1 rounded-[3rem] bg-gradient-to-b from-white/10 to-transparent shadow-2xl min-h-[120px] flex items-center justify-center`,children:W?(0,O.jsxs)(`div`,{className:`w-full relative bg-[#030407] border-2 border-white/15 rounded-[2.8rem] overflow-hidden shadow-2xl`,children:[(0,O.jsx)(`div`,{className:`absolute top-0 left-0 w-full h-full bg-[radial-gradient(circle_at_0%_0%,rgba(255,255,255,0.03)_0%,transparent_50%)] pointer-events-none`}),(0,O.jsx)(`textarea`,{autoFocus:!0,value:E,onChange:e=>D(e.target.value),placeholder:`Describe the setting, the plot, and the atmosphere...`,className:`w-full h-64 bg-transparent p-12 text-2xl font-medium text-white/90 outline-none resize-none placeholder:text-white/20 transition-all leading-relaxed relative z-10`})]}):(0,O.jsxs)(`button`,{onClick:()=>G(!0),className:`px-12 py-8 bg-[#030407] border-2 border-white/15 rounded-[2.5rem] text-xl font-black uppercase tracking-[0.2em] text-white/70 hover:text-white hover:border-[#25D0C8]/40 hover:bg-[#030407] transition-all flex items-center gap-4 group cursor-pointer shadow-xl`,children:[(0,O.jsx)(r,{size:24,className:`text-[#25D0C8] group-hover:animate-pulse`}),`Start Your Vision`]})}),W&&(0,O.jsxs)(`button`,{onClick:()=>n(`specs`),disabled:E.length<10,className:`w-full py-6 btn-specular-cta text-white font-black uppercase tracking-[0.3em] text-xs rounded-2xl border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-xl transition-all disabled:opacity-20 active:scale-95 flex items-center justify-center gap-4 cursor-pointer`,children:[`Configure Synthesis `,(0,O.jsx)(w,{size:16})]})]})]}),e===`specs`&&(0,O.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-6`,children:(0,O.jsxs)(`div`,{className:`max-w-4xl w-full grid grid-cols-1 md:grid-cols-2 gap-16`,children:[(0,O.jsxs)(`div`,{className:`space-y-12`,children:[(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(`h3`,{className:`text-[10px] font-black uppercase tracking-[0.4em] text-[#25D0C8] flex items-center gap-2`,children:[(0,O.jsx)(p,{size:12}),` Select duration`]}),(0,O.jsx)(`div`,{className:`grid grid-cols-3 gap-4`,children:T.map(e=>(0,O.jsx)(`button`,{onClick:()=>P(e.value),className:`py-4 rounded-xl border-2 transition-all font-black text-xs cursor-pointer ${N===e.value?`bg-[#25D0C8] border-[#25D0C8] text-white shadow-md`:`bg-[#020305] border-white/10 text-white/60 hover:border-white/25 hover:text-white`}`,children:e.label},e.id))})]}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(`h3`,{className:`text-[10px] font-black uppercase tracking-[0.4em] text-halal-teal flex items-center gap-2`,children:[(0,O.jsx)(t,{size:12}),` Generation Engine`]}),(0,O.jsx)(`div`,{className:`space-y-3`,children:y.map(e=>(0,O.jsxs)(`button`,{onClick:()=>I(e),className:`w-full p-6 rounded-2xl border-2 text-left flex justify-between items-center transition-all cursor-pointer ${F.id===e.id?`bg-[#25D0C8]/15 border-[#25D0C8] ring-2 ring-[#25D0C8]/30 shadow-lg`:`bg-[#030407] border-white/10 opacity-70 hover:opacity-100 hover:border-white/20`}`,children:[(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`p`,{className:`font-black text-sm uppercase tracking-wide text-white`,children:e.name}),S(e.id,`movies`)&&(0,O.jsx)(l,{size:`xs`,text:b(e.id)||`NEW`})]}),(0,O.jsx)(`p`,{className:`text-[10px] font-medium text-white/50`,children:e.desc})]}),(0,O.jsxs)(`span`,{className:`text-[10px] font-mono bg-[#030407] border border-white/10 px-2 py-1 rounded text-[#25D0C8] font-bold`,children:[e.tps,` TK/S`]})]},e.id))})]})]}),(0,O.jsxs)(`div`,{className:`bg-[#030407] border-2 border-white/15 rounded-[3rem] p-10 flex flex-col justify-between shadow-2xl relative overflow-hidden group`,children:[(0,O.jsx)(`div`,{className:`absolute top-0 right-0 w-32 h-32 bg-[#25D0C8]/10 blur-[80px] -mr-10 -mt-10`}),(0,O.jsxs)(`div`,{className:`space-y-8 relative z-10`,children:[(0,O.jsx)(`p`,{className:`text-[10px] font-black uppercase tracking-[0.5em] text-white/30`,children:`Production Quote`}),(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex justify-between border-b border-white/10 pb-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-bold text-white/50`,children:`Scenes:`}),(0,O.jsxs)(`span`,{className:`text-xs font-black text-white`,children:[N/10,` Segments`]})]}),(0,O.jsxs)(`div`,{className:`flex justify-between border-b border-white/10 pb-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-bold text-white/50`,children:`Continuity Mode:`}),(0,O.jsx)(`span`,{className:`text-xs font-black text-white`,children:`Frame Lock Active`})]})]}),(0,O.jsxs)(`div`,{className:`pt-6`,children:[(0,O.jsx)(`span`,{className:`text-[10px] font-black uppercase text-[#25D0C8] tracking-[0.2em]`,children:`Estimated Budget`}),(0,O.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,O.jsx)(`span`,{className:`text-6xl font-black tracking-tightest text-white`,children:U.toLocaleStr
4ing()}),(0,O.jsx)(`span`,{className:`text-xl font-bold text-white/30 uppercase tracking-widest`,children:`TK`})]})]})]}),(0,O.jsx)(`div`,{className:`space-y-4 pt-10`,children:v||x(_)?(0,O.jsxs)(`button`,{onClick:()=>g(!0),className:`w-full py-5 bg-gradient-to-r from-[#C59B27] via-[#DFB742] to-[#996515] text-white font-black uppercase tracking-[0.3em] text-[11px] rounded-2xl border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-xl flex items-center justify-center gap-3 hover:scale-[1.02] active:scale-95 transition-all cursor-pointer`,children:[(0,O.jsx)(m,{locked:!0,className:`w-4 h-4 text-white`}),(0,O.jsx)(`span`,{children:`Upgrade Plan to Generate`}),(0,O.jsx)(u,{size:14,className:`text-white`})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{onClick:q,disabled:L||o<U,className:`w-full py-5 btn-specular-cta text-white font-black uppercase tracking-[0.3em] rounded-2xl border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-xl flex items-center justify-center gap-3 hover:scale-[1.02] active:scale-95 transition-all disabled:opacity-50 cursor-pointer`,children:[L?(0,O.jsx)(a,{size:16,className:`animate-spin text-white`}):(0,O.jsx)(r,{size:16,className:`text-white`}),L?`Generating Scenario...`:`Begin Production [${U.toLocaleString()} TK]`]}),o<U&&(0,O.jsxs)(`button`,{onClick:()=>g(!0),className:`w-full flex items-center justify-center gap-2 text-[10px] text-red-400 font-bold uppercase hover:bg-white/5 p-2 rounded-lg transition-colors cursor-pointer`,children:[(0,O.jsx)(f,{size:14}),` Insufficient Funds - Top Up Now`]})]})})]})]})}),e===`studio`&&(0,O.jsxs)(`div`,{className:`flex-1 flex flex-row overflow-hidden bg-[#030407]`,children:[(0,O.jsx)(`div`,{className:`w-80 flex-shrink-0 border-r-2 border-white/10 bg-[#030407] h-full`,children:(0,O.jsx)(k,{assets:R,onAddToTimeline:J,onRefresh:K})}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col bg-[#030407] overflow-hidden border-b-2 border-white/10`,children:[(0,O.jsx)(A,{activeClip:V||z[0]}),(0,O.jsx)(M,{clips:z,totalDuration:N,onSelectClip:H,onGenerateClip:Y,selectedClipId:V?.id})]}),(0,O.jsx)(`div`,{className:`w-72 flex-shrink-0 border-l-2 border-white/10 bg-[#030407] h-full`,children:(0,O.jsx)(j,{selectedClip:V,onUpdate:e=>{B(t=>t.map(t=>t.id===V?.id?{...t,...e}:t))}})})]})]}),P=({step:e,setStep:n,balance:o,topupBalance:s,tier:c,showPricing:d,setShowPricing:_,profile:y,movieLocked:T,videoModels:N,durationList:P,idea:F,setIdea:I,duration:L,setDuration:R,model:z,setModel:B,loading:V,assets:H,timeline:U,setTimeline:W,selectedClip:G,setSelectedClip:K,estCost:q,showPrompt:J,setShowPrompt:Y,refreshAssets:X,launchProduction:Z,addToTimeline:ee,handleGenerateClip:te})=>{let[Q,$]=(0,D.useState)(`timeline`);return(0,O.jsxs)(`div`,{className:`min-h-screen bg-[#030407] text-white font-sans flex flex-col relative pb-[max(2rem,env(safe-area-inset-bottom))]`,children:[d&&(0,O.jsx)(`div`,{className:`fixed inset-0 z-[1000] bg-black/90 backdrop-blur-md flex items-center justify-center p-2`,children:(0,O.jsx)(`div`,{className:`w-full h-full max-w-lg mx-auto relative overflow-y-auto`,children:(0,O.jsx)(C,{onBack:()=>_(!1)})})}),(0,O.jsx)(h,{balance:o,topupBalance:s,tier:c,onPricingClick:()=>_(!0)}),e===`vision`&&(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center px-4 py-6 relative overflow-hidden`,children:[(0,O.jsx)(`div`,{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 h-72 bg-[#25D0C8]/10 blur-[90px] rounded-full pointer-events-none`}
4),(0,O.jsxs)(`div`,{className:`w-full max-w-md space-y-6 relative z-10`,children:[(0,O.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,O.jsx)(`div`,{className:`inline-flex p-3 rounded-2xl bg-[#020305] border-2 border-white/10 mb-2 shadow-xl`,children:(0,O.jsx)(i,{className:`text-[#25D0C8]`,size:24})}),(0,O.jsxs)(`h2`,{className:`text-3xl font-black tracking-tight text-white`,children:[`Capture the `,(0,O.jsx)(`span`,{className:`text-[#25D0C8]`,children:`Unseen`}),`.`]}),(0,O.jsx)(`p`,{className:`text-white/40 text-xs font-medium leading-relaxed`,children:`HalalGen AI synthesizes your narrative into an episodic multi-scene production scenario.`})]}),(0,O.jsx)(`div`,{className:`group relative p-1 rounded-3xl bg-gradient-to-b from-white/10 to-transparent shadow-xl min-h-[110px] flex items-center justify-center`,children:J?(0,O.jsx)(`div`,{className:`w-full relative bg-[#030407] rounded-[1.8rem] overflow-hidden border-2 border-white/15 shadow-xl`,children:(0,O.jsx)(`textarea`,{autoFocus:!0,value:F,onChange:e=>I(e.target.value),placeholder:`Describe the story setting, plot arc, characters and mood...`,className:`w-full h-44 bg-transparent p-5 text-sm font-medium text-white/90 outline-none resize-none placeholder:text-white/20 leading-relaxed`})}):(0,O.jsxs)(`button`,{onClick:()=>Y(!0),className:`w-full py-6 px-6 bg-[#030407] border-2 border-white/15 rounded-[1.8rem] text-sm font-black uppercase tracking-[0.15em] text-white/70 active:scale-95 transition-all flex items-center justify-center gap-3 shadow-lg`,children:[(0,O.jsx)(r,{size:20,className:`text-[#25D0C8] animate-pulse`}),`Start Your Vision`]})}),J&&(0,O.jsxs)(`button`,{onClick:()=>n(`specs`),disabled:F.length<10,className:`w-full py-4 btn-specular-cta text-white font-black uppercase tracking-[0.2em] text-xs rounded-xl border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-lg active:scale-95 disabled:opacity-20 flex items-center justify-center gap-2`,children:[`Configure Synthesis `,(0,O.jsx)(w,{size:14})]})]})]}),e===`specs`&&(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col px-4 py-4 max-w-lg mx-auto w-full space-y-6`,children:[(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsxs)(`h3`,{className:`text-[10px] font-black uppercase tracking-[0.3em] text-[#25D0C8] flex items-center gap-1.5`,children:[(0,O.jsx)(p,{size:12}),` Select duration`]}),(0,O.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:P.map(e=>(0,O.jsx)(`button`,{onClick:()=>R(e.value),className:`py-3 rounded-xl border-2 transition-all font-black text-xs active:scale-95 ${L===e.value?`bg-[#25D0C8] border-[#25D0C8] text-white shadow-md`:`bg-[#020305] border-white/10 text-white/70 hover:border-white/25 hover:text-white`}`,children:e.label},e.id))})]}),(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsxs)(`h3`,{className:`text-[10px] font-black uppercase tracking-[0.3em] text-[#25D0C8] flex items-center gap-1.5`,children:[(0,O.jsx)(t,{size:12}),` Generation Engine`]}),(0,O.jsx)(`div`,{className:`space-y-2`,children:N.map(e=>(0,O.jsxs)(`button`,{onClick:()=>B(e),className:`w-full p-4 rounded-xl border-2 text-left flex justify-between items-center transition-all active:scale-98 ${z.id===e.id?`bg-[#25D0C8]/15 border-[#25D0C8] ring-2 ring-[#25D0C8]/20 shadow-md`:`bg-[#030407] border-white/10 opacity-80`}`,children:[(0,O.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`p`,{className:`font-black text-xs uppercase tracking-wide text-white`,children:e.name}),S(e.id,`movies`)&&(0,O.jsx)(l,{size:`xs`,text:b(e.id)||`NEW`})]}),(0,O.jsx)(`p`,{className:`text-[9px] text-white/50`,children:e.desc})]}),(0,O.jsxs)(`span`,{className:`text-[9px] font-mono bg-[#030407] border border-white/10 px-2 py-0.5 rounded text-[#25D0C8] font-bold shrink-0 ml-2`,children:[e.tps,` TK/S`]})]},e.id))})]}),(0,O.jsxs)(`div`,{className:`bg-[#030407] border-2 border-white/15 rounded-2xl p-5 shadow-2xl space-y-5 relative overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between border-b border-white/10 pb-2.5`,children:[(0,O.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-wider text-white/50`,children:`Scenes`}),(0,O.jsxs)(`span`,{className:`text-xs font-black text-white`,children:[L/10,` Segments`]})]}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between border-b border-white/10 pb-2.5`,children:[(0,O.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-wider text-white/50`,children:`Continuity Mode`}),(0,O.jsx)(`span`,{className:`text-xs font-black text-[#25D0C8]`,children:`Frame Lock Active`})]}),(0,O.jsxs)(`div`,{className:`flex items-baseline justify-between pt-1`,children:[(0,O.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-wider text-[#25D0C8]`,children:`Estimated Budget`}),(0,O.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[(0,O.jsx)(`span`,{className:`text-3xl font-black tracking-tight text-white`,children:q.toLocaleStr
4ing()}),(0,O.jsx)(`span`,{className:`text-xs font-bold text-white/30`,children:`TK`})]})]}),(0,O.jsx)(`div`,{className:`pt-2 space-y-2`,children:T||x(y)?(0,O.jsxs)(`button`,{onClick:()=>_(!0),className:`w-full py-4 bg-gradient-to-r from-[#C59B27] via-[#DFB742] to-[#996515] text-white font-black uppercase tracking-[0.2em] text-[10px] rounded-xl border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-lg flex items-center justify-center gap-2 active:scale-95`,children:[(0,O.jsx)(m,{locked:!0,className:`w-3.5 h-3.5 text-white`}),(0,O.jsx)(`span`,{children:`Upgrade Plan to Generate`}),(0,O.jsx)(u,{size:13,className:`text-white`})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`button`,{onClick:Z,disabled:V||o<q,className:`w-full py-4 btn-specular-cta text-white font-black uppercase tracking-[0.2em] text-xs rounded-xl border-2 border-white/20 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)] shadow-xl flex items-center justify-center gap-2 active:scale-95 disabled:opacity-40`,children:[V?(0,O.jsx)(a,{size:15,className:`animate-spin text-white`}):(0,O.jsx)(r,{size:15,className:`text-white`}),V?`Generating Scenario...`:`Begin Production [${q.toLocaleString()} TK]`]}),o<q&&(0,O.jsxs)(`button`,{onClick:()=>_(!0),className:`w-full flex items-center justify-center gap-1.5 text-[10px] text-red-400 font-bold uppercase p-1.5 rounded-lg active:scale-95`,children:[(0,O.jsx)(f,{size:13}),` Insufficient Funds - Top Up Now`]})]})})]})]}),e===`studio`&&(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-[#030407]`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-around border-b-2 border-white/10 bg-[#030407] px-2 py-2 shrink-0`,children:[(0,O.jsxs)(`button`,{onClick:()=>$(`timeline`),className:`flex items-center gap-1.5 px-3 py-2 rounded-xl text-[10px] font-black uppercase tracking-wider transition-all ${Q===`timeline`?`bg-[#25D0C8] text-white shadow-md`:`text-white/60 hover:text-white`}`,children:[(0,O.jsx)(g,{size:13}),` Timeline`]}),(0,O.jsxs)(`button`,{onClick:()=>$(`assets`),className:`flex items-center gap-1.5 px-3 py-2 rounded-xl text-[10px] font-black uppercase tracking-wider transition-all ${Q===`assets`?`bg-[#25D0C8] text-white shadow-md`:`text-white/60 hover:text-white`}`,children:[(0,O.jsx)(E,{size:13}),` Assets (`,H.length,`)`]}),(0,O.jsxs)(`button`,{onClick:()=>$(`properties`),className:`flex items-center gap-1.5 px-3 py-2 rounded-xl text-[10px] font-black uppercase tracking-wider transition-all ${Q===`properties`?`bg-[#25D0C8] text-white shadow-md`:`text-white/60 hover:text-white`}`,children:[(0,O.jsx)(v,{size:13}),` Properties `,G&&`•`]}
4)]}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative`,children:[Q===`timeline`&&(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,O.jsx)(`div`,{className:`h-44 sm:h-56 shrink-0 border-b border-white/5 bg-black flex items-center justify-center p-2`,children:(0,O.jsx)(A,{activeClip:G||U[0]})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,O.jsx)(M,{clips:U,totalDuration:L,onSelectClip:e=>{K(e)},onGenerateClip:te,selectedClipId:G?.id})})]}),Q===`assets`&&(0,O.jsx)(`div`,{className:`flex-1 overflow-hidden h-full`,children:(0,O.jsx)(k,{assets:H,onAddToTimeline:e=>{ee(e),$(`timeline`)},onRefresh:X})}),Q===`properties`&&(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto h-full`,children:(0,O.jsx)(j,{selectedClip:G,onUpdate:e=>{W(t=>t.map(t=>t.id===G?.id?{...t,...e}:t))}})})]})]})]})},F=[{id:`HappyHorse1`,name:`HappyHorse-1.0`,tps:108,desc:`Lightning fast DMD-2 distillation with AV sync.`},{id:`Wan27Video`,name:`Wan 2.7`,tps:76,desc:`9-Grid multi-reference structural control.`},{id:`Sora2Base`,name:`Sora 2 (Base)`,tps:250,desc:`Optimized for storyboards & natural motion.`},{id:`Veo31`,name:`Veo 3.1 (Cinema)`,tps:80,desc:`The gold standard for architectural visuals.`},{id:`Kling3`,name:`Kling 3.0 Standard`,tps:300,desc:`Advanced physical motion synthesis.`}].filter(e=>e.id!==`Wan27Video`),I=[{id:`180`,label:`3 Mins`,value:180},{id:`300`,label:`5 Mins`,value:300},{id:`600`,label:`10 Mins`,value:600},{id:`1800`,label:`30 Mins`,value:1800},{id:`3600`,label:`1 Hour`,value:3600},{id:`7200`,label:`2 Hours`,value:7200}],L=`halalgen_movie_project`;function R(){o();let[e,t]=(0,D.useState)(()=>typeof window<`u`?window.innerWidth<1024:!1);(0,D.useEffect)(()=>{let e=()=>t(window.innerWidth<1024);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let[r,i]=(0,D.useState)(`vision`),[a,s]=(0,D.useState)(0),[c,l]=(0,D.useState)(0),[u,d]=(0,D.useState)(`free`),[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(null),{locked:g}=_(u,`ihsan`,()=>p(!0)),[v,b]=(0,D.useState)({}),x=F.map(e=>({...e,tps:v[e.id]?.base||e.tps})),[S,C]=(0,D.useState)(``),[w,T]=(0,D.useState)(300),[E,k]=(0,D.useState)(x[1]),[A,j]=(0,D.useState)(!1),[M,R]=(0,D.useState)(!1);(0,D.useEffect)(()=>{let e=x.find(e=>e.id===E.id);e&&e.tps!==E.tps&&k(e)},[v]);let[z,B]=(0,D.useState)([]),[V,H]=(0,D.useState)([]),[U,W]=(0,D.useState)(null),G=async()=>{try{B((await n(`/api/movies/history`)).jobs||[])}catch(e){console.error(e)}};(0,D.useEffect)(()=>{G(),Promise.all([n(`/api/balance`),n(`/api/pricing`),n(`/api/profile`)]).then(([e,t,n])=>{s(e.balance),l(e.topupBalance||0),d(e.tier||`free`),b(t.pricing||{}),h(n)}).catch(console.error)},[]),(0,D.useEffect)(()=>{try{let e=localStorage.getItem(L);if(e){let t=JSON.parse(e);if(Date.now()-t.savedAt<864e5){C(t.idea),T(t.duration);let e=F.find(e=>e.id===t.modelId);e&&k(e),t.timeline&&t.timeline.length>0&&(H(t.timeline),i(`studio`))}}}catch{}},[]),(0,D.useEffect)(()=>{if(!(V.length===0&&!S))try{let e={idea:S,duration:w,modelId:E.id,timeline:V,savedAt:Date.now()};localStorage.setItem(L,JSON.stringify(e))}catch{}},[V,S,w,E.id]);let K={step:r,setStep:i,balance:a,topupBalance:c,tier:u,showPricing:f,setShowPricing:p,profile:m,movieLocked:g,videoModels:x,durationList:I,idea:S,setIdea:C,duration:w,setDuration:T,model:E,setModel:k,loading:A,assets:z,timeline:V,setTimeline:H,selectedClip:U,setSelectedClip:W,estCost:w*E.tps,showPrompt:M,setShowPrompt:R,refreshAssets:G,launchProduction:async()=>{if(g){p(!0);return}j(!0);try{H(((await n(`/api/movies/scenario`,`POST`,{prompt:S,durationMinutes:w/60})).scenario||``).split(`
5`).map((e,t)=>({id:crypto.randomUUID(),assetId:``,name:e,startTime:t*10,duration:10,videoUrl:``})).filter(e=>e.name.length>5)),i(`studio`),y.logFeatureUse(`MOVIE_STUDIO`,{duration:w,model:E.id})}catch(e){alert(e.message)}finally{j(!1)}},addToTimeline:e=>{if(e.status!==`completed`)return;let t=V.length>0?V.reduce((e,t)=>Math.max(e,t.startTime+t.duration),0):0,n={id:crypto.randomUUID(),assetId:e.id,startTime:t,duration:e.duration||5,videoUrl:e.video_url,name:e.prompt};if(n.startTime+n.duration>w){alert(`Clip exceeds project duration. Please increase project length.`);return}H([...V,n])},handleGenerateClip:async e=>{if(g){p(!0);return}let t=V.findIndex(t=>t.id===e);if(t===-1)return;let r=V[t];if(r.videoUrl)return;let i=[...V].sort((e,t)=>
5e.startTime-t.startTime),a=i.findIndex(t=>t.id===e),o;for(let e=a-1;e>=0;e--)if(i[e].videoUrl){o=i[e].videoUrl;break}try{let t=await n(`/api/movies/generate`,`POST`,{prompt:r.name,duration:r.duration,aspectRatio:`16:9`,provider:E.id,startImageUrl:o});if(!t.jobId)throw Error(`No Job ID returned`);let i=setInterval(async()=>{try{let r=await n(`/api/movies/status/${t.jobId}`);r.status===`completed`?(clearInterval(i),H(t=>t.map(t=>t.id===e?{...t,videoUrl:r.videoUrl,assetId:r.id}:t)),n(`/api/balance`).then(e=>s(e.balance))):r.status===`failed`&&(clearInterval(i),alert(`Generation failed: `+r.error))}catch{clearInterval(i)}},5e3)}catch(e){alert(`Generation error: `+e.message)}}};return e?(0,O.jsx)(P,{...K}):(0,O.jsx)(N,{...K})}export{E as n,R as t};

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.