PageSourceSearch

https://vidwave.ai/_next/static/chunks/9543-8ee0dd9382e0da9a.js

js vidwave.ai collected 2026-10-05 13:26:01 UTC 15,222 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9543,6422,8760],{6422:function(e,t,a){a.r(t);var r=a(7437),o=a(2265),l=a(6691),s=a.n(l);let i=(0,o.memo)(e=>{let{isOpen:t,onClose:a,canClose:l=!0,variant:i="default"}=e,n="studio"===i,[c,d]=(0,o.useState)(""),[h,x]=(0,o.useState)(""),[u,g]=(0,o.useState)("email"),[m,f]=(0,o.useState)(!1),[p,b]=(0,o.useState)("");if((0,o.useEffect)(()=>{if(t){let e=localStorage.getItem("referral_code"),t="true"===localStorage.getItem("referral_signup_flow"),a=`${window.location.pathname}${window.location.search}${window.location.hash}`,r=localStorage.getItem("postLoginRedirect");e&&t?localStorage.setItem("postLoginRedirect","/pricing?referral=1"):"/pricing"===window.location.pathname&&r&&r.startsWith("/subscription")||localStorage.setItem("postLoginRedirect",a||"/")}},[t]),!t)return null;let w="https://vidwaveai-backend-production.up.railway.app",handleSendOtp=async e=>{if(e.preventDefault(),c){f(!0),b("");try{let e=await fetch(`${w}/api/auth/send-otp`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c,referral_code:localStorage.getItem("referral_code")||void 0})}),t=await e.json();e.ok?g("otp"):b(t.error||"Failed to send OTP")}catch(e){b("Connection error. Please try again.")}finally{f(!1)}}},handleVerifyOtp=async e=>{if(e.preventDefault(),h){f(!0),b("");try{let e=await fetch(`${w}/api/auth/verify-otp`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c,otp:h})}),t=await e.json();if(e.ok){localStorage.setItem("access_token",t.access_token),localStorage.setItem("user",JSON.stringify(t.user));let e=localStorage.getItem("postLoginRedirect")||`${window.location.pathname}${window.location.search}${window.location.hash}`;localStorage.removeItem("postLoginRedirect"),localStorage.removeItem("referral_signup_flow"),window.location.href=e}else b(t.error||"Invalid verification code")}catch(e){b("Connection error. Please try again.")}finally{f(!1)}}};return(0,r.jsxs)("div",{className:`fixed inset-0 z-[120] flex items-center justify-center p-4 ${n?"font-sans":""}`,children:[(0,r.jsx)("div",{className:`absolute inset-0 backdrop-blur-sm ${n?"bg-slate-900/40":"bg-black/60"}`,onClick:l?a:void 0}),(0,r.jsxs)("div",{className:n?"relative w-full max-w-md bg-white rounded-3xl shadow-xl overflow-hidden border border-slate-200 font-display":"relative w-full max-w-md bg-gradient-to-b from-gray-900 to-gray-800 rounded-3xl shadow-2xl overflow-hidden border border-white/10",children:[l&&(0,r.jsx)("button",{onClick:a,className:n?"absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-slate-100 hover:bg-slate-200 transition-colors text-slate-500 z-10":"absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 transition-colors text-white z-10",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"p-8 pt-10",children:[(0,r.jsx)("div",{className:"flex justify-center mb-6",children:(0,r.jsx)(s(),{src:n?"/VidWave-logo.svg":"/vidwave-logo-white.svg",alt:"Vidwave",width:160,height:45,className:"h-10 w-auto"})}),(0,r.jsx)("h2",{className:n?"text-2xl font-display font-extrabold text-slate-900 text-center mb-1":"text-2xl font-bold text-white text-center mb-1",children:"email"===u?n?"Sign In to Continue":"Welcome Back":"Verify Email"}),(0,r.jsx)("p",{className:`text-sm text-center mb-8 ${n?"text-slate-500":"text-gray-400"}`,children:"email"===u?n?"Your free trial was used on this device. Log in to keep creating product videos.":"Sign in to create amazing AI videos":`We've sent a code to ${c}`}),(0,r.jsx)("div",{className:"space-y-4",children:"email"===u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>{try{let e=localStorage.getItem("referral_code"),t="true"===localStorage.getItem("referral_signup_flow"),a=e&&t?"/pricing?referral=1":localStorage.getItem("postLoginRedirect")||`${window.location.pathname}${window.location.search}${window.location.hash}`;localStorage.setItem("postLoginRedirect",a||"/");let r=`${w}/api/auth/google?redirect=${encodeURIComponent(a||"/")}`;e&&(r+=`&ref=${encodeURIComponent(e)}`),window.location.href=r}catch{window.location.href=`${w}/api/auth/google`}},className:n?"w-full flex items-center justify-center gap-3 px-6 py-3.5 bg-slate-950 rounded-2xl text-white font-bold hover:bg-slate-800 transition-all shadow-lg active:scale-[0.98]":"w-full flex items-center justify-center gap-3 px-6 py-3.5 bg-white rounded-2xl text-gray-900 font-bold hover:bg-gray-50 transition-all shadow-lg active:scale-[0.98]",children:[(0,r.jsxs)("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),(0,r.jsx)("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),(0,r.jsx)("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),(0,r.jsx)("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),(0,r.jsxs)("div",{className:"relative flex items-center py-2",children:[(0,r.jsx)("div",{className:`flex-grow border-t ${n?"border-slate-200":"border-white/10"}`}),(0,r.jsx)("span",{className:`flex-shrink mx-4 text-[10px] font-bold uppercase tracking-widest ${n?"text-slate-400":"text-gray-500"}`,children:"or email"}),(0,r.jsx)("div",{className:`flex-grow border-t ${n?"border-slate-200":"border-white/10"}`})]}),(0,r.jsxs)("form",{onSubmit:handleSendOtp,className:"space-y-4",children:[(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)("input",{type:"email",value:c,onChange:e=>d(e.target.value),placeholder:"Enter your email",className:n?"w-full px-5 py-3.5 bg-white border border-slate-200 rounded-2xl text-slate-900 placeholder-slate-400 focus:outline-none focus:border-brand-500 transition-all text-sm":"w-full px-5 py-3.5 bg-white/5 border border-white/10 rounded-2xl text-white placeholder-gray-500 focus:outline-none focus:border-blue-500 transition-all text-sm",required:!0})}),p&&(0,r.jsx)("p",{className:"text-red-500 text-xs font-bold text-center",children:p}),(0,r.jsx)("button",{type:"submit",disabled:m,className:n?"w-full py-3.5 bg-[#0284c7] rounded-2xl text-white font-bold hover:bg-brand-700 transition-all shadow-lg active:scale-[0.98] disabled:opacity-50":"w-full py-3.5 bg-blue-600 rounded-2xl text-white font-bold hover:bg-blue-700 transition-all shadow-lg shadow-blue-600/20 active:scale-[0.98] disabled:opacity-50",children:m?"Sending...":"Send Login Code"})]})]}):(0,r.jsxs)("form",{onSubmit:handleVerifyOtp,className:"space-y-4",children:[(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)("input",{type:"text",value:h,onChange:e=>x(e.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"Enter 6-digit code",className:n?"w-full px-5 py-4 bg-white border border-slate-200 rounded-2xl text-slate-900 text-center text-2xl font-black tracking-[0.5em] placeholder-slate-400 focus:outline-none focus:border-brand-500 transition-all":"w-full px-5 py-4 bg-white/5 border border-white/10 rounded-2xl text-white text-center text-2xl font-black tracking-[0.5em] placeholder-gray-500 focus:outline-none focus:border-blue-500 transition-all",required:!0,autoFocus:!0})}),p&&(0,r.jsx)("p",{className:"text-red-500 text-xs font-bold text-center",children:p}),(0,r.jsx)("button",{type:"submit",disabled:m,className:n?"w-full py-4 bg-slate-950 rounded-2xl text-white font-bold hover:bg-slate-800 transition-all shadow-xl active:scale-[0.98] disabled:opacity-50":"w-full py-4 bg-blue-600 rounded-2xl text-white font-bold hover:bg-blue-700 transition-all shadow-xl shadow-blue-600/20 active:scale-[0.98] disabled:opacity-50",children:m?"Verifying...":"
1Verify & Login"}),(0,r.jsx)("button",{type:"button",onClick:()=>g("email"),className:n?"w-full text-slate-500 text-xs font-bold hover:text-slate-900 transition-colors":"w-full text-gray-400 text-xs font-bold hover:text-white transition-colors",children:"Change Email Address"})]})}),(0,r.jsxs)("p",{className:`mt-8 text-[10px] text-center leading-relaxed ${n?"text-slate-400":"text-gray-500"}`,children:["By signing in, you agree to our"," ",(0,r.jsx)("a",{href:"/terms",className:n?"text-brand-600 hover:underline":"text-blue-500 hover:underline",children:"Terms"})," and"," ",(0,r.jsx)("a",{href:"/privacy",className:n?"text-brand-600 hover:underline":"text-blue-500 hover:underline",children:"Privacy Policy"})]})]})]})]})});i.displayName="LoginPopup",t.default=i},9543:function(e,t,a){a.r(t),a.d(t,{default:function(){return Navbar}});var r=a(7437),o=a(1396),l=a.n(o),s=a(6691),i=a.n(s),n=a(2265),c=a(6422),d=a(1184);function Navbar(e){let{fluid:t=!1,onGetStartedClick:a}=e,[o,s]=(0,n.useState)(!1),[h,x]=(0,n.useState)(""),[u,g]=(0,n.useState)(!1),[m,f]=(0,n.useState)(!1),[p,b]=(0,n.useState)(null),[w,v]=(0,n.use
1State)(!1),y=(0,n.useCallback)(async()=>{try{let e=localStorage.getItem("access_token");if(!e){s(!1);return}let t=await fetch("https://vidwaveai-backend-production.up.railway.app/api/auth/me",{headers:{Authorization:`Bearer ${e}`}});if(t.ok){let e=await t.json();s(!0),x(e.user.email),b(e.user.credits||0)}else s(!1),localStorage.removeItem("access_token")}catch(e){s(!1)}},[]);(0,n.useEffect)(()=>{v(!0);{let e=new URLSearchParams(window.location.search),t=e.get("signup"),a=e.get("ref");"true"===t&&(g(!0),a&&(localStorage.setItem("referral_code",a),localStorage.setItem("referral_signup_flow","true"),localStorage.setItem("postLoginRedirect","/pricing?referral=1")))}let e=new URLSearchParams(window.location.search),t=e.get("access_token");if(t){localStorage.setItem("access_token",t);let e=localStorage.getItem("postLoginRedirect");if(e&&(localStorage.removeItem("postLoginRedirect"),localStorage.removeItem("referral_signup_flow"),e!==`${window.location.pathname}${window.location.search}`)){window.location.assign(e);return}window.history.replaceState({},document.title,window.location.pathname)}y();let handleRefresh=()=>y();return window.addEventListener("refresh-user-data",handleRefresh),()=>{window.removeEventListener("refresh-user-data",handleRefresh)}},[y]);let handleLogout=()=>{localStorage.removeItem("access_token"),s(!1),x("")},j=(0,n.useCallback)(()=>{g(!0)},[]),N=(0,n.useCallback)(()=>{g(!1)},[]),k=(0,n.useCallback)(()=>{f(!0)},[]),S=(0,n.useCallback)(()=>{f(!1)},[]),C=(0,n.useCallback)(()=>{a?a():j()},[a,j]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("nav",{className:"fixed top-0 w-full z-50 bg-white/90 backdrop-blur-xl border-b border-gray-100 shadow-sm","aria-label":"Main navigation",children:(0,r.jsx)("div",{className:t?"w-full px-4 sm:px-6 lg:px-8":"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"flex justify-between items-center h-16 md:h-20",children:[(0,r.jsx)(l(),{href:"/",className:"flex items-center gap-2 group shrink-0",children:(0,r.jsx)(i(),{src:"/VidWave-logo.svg",alt:"Vidwave Logo",width:200,height:57,className:"w-[130px] sm:w-[160px] md:w-[200px] h-auto",style:{aspectRatio:"420/120"},priority:!0})}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-8",suppressHydrationWarning:!0,children:[(0,r.jsxs)(l(),{href:"/seedance-2",className:"text-sm font-bold text-blue-600 hover:text-blue-700 transition-colors flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-600 animate-pulse"}),"Seedance 2.0"]}),(0,r.jsx)(l(),{href:"/ugc/create",className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"AI UGC"}),(0,r.jsx)(l(),{href:"/generate",className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"Text to AI Video"}),(0,r.jsx)(l(),{href:"/pricing",className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"Pricing"}),(0,r.jsx)(l(),{href:"/blogs",className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"Blog"}),w?o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l(),{href:"/videos",className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"My Videos"}),(0,r.jsxs)(l(),{href:"/subscription/buy-credits",className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-blue-50 border border-blue-100 hover:bg-blue-100 transition-all group/credits",children:[(0,r.jsx)("div",{className:"w-5 h-5 rounded-full bg-blue-600 flex items-center justify-center text-[10px] text-white",children:(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,r.jsxs)("span",{className:"text-sm font-bold text-blue-700",children:[null!==p?p:"0"," credits"]}),(0,r.jsx)("svg",{className:"w-3 h-3 text-blue-400 group-hover/credits:translate-x-0.5 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})]}),(0,r.jsx)(l(),{href:"/profile",className:"flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors",children:(0,r.jsx)("div",{className:"w-9 h-9 rounded-full bg-gradient-to-br from-blue-600 to-purple-600 flex items-center justify-center text-white text-sm font-semibold shadow-md",children:h?h.charAt(0).toUpperCase():"U"})}),(0,r.jsx)("button",{onClick:handleLogout,className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"Logout"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:j,className:"text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors",children:"Login"}),(0,r.jsx)("button",{onClick:C,className:"px-6 py-2.5 bg-gradient-to-r from-blue-600 to-purple-600 text-white text-sm font-semibold rounded-full hover:shadow-lg hover:scale-105 transition-all",children:"Get Started Free"})]}):(0,r.jsx)("div",{className:"flex items-center gap-8",children:(0,r.jsx)("div",{className:"w-20 h-8"})})]}),(0,r.jsx)("button",{onClick:k,className:"md:hidden p-2 text-gray-600 hover:text-gray-900 transition-colors","aria-label":"Open menu",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})})}),(0,r.jsx)(c.default,{isOpen:u,onClose:N}),(0,r.jsx)(d.default,{isOpen:m,onClose:S,onOpenLogin:j,onGetStartedClick:a?()=>{S(),a()}:void 0,isLoggedIn:o,userEmail:h,onLogout:handleLogout})]})}}}]);

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.