PageSourceSearch

https://mstudio.ai/build/assets/RegisterPage.B1sQlrEA.js

js mstudio.ai collected 2026-10-05 12:17:50 UTC 12,579 bytes, 2 lines download raw bytes

1import{r as E}from"./rolldown-runtime.C1f3BsDW.js";import{t as w}from"./inertia.BE4YqsTM.js";import"./http.DWpeO7Ui.js";import{Gr as y,I as G,Jt as W,Kt as $,Qr as q,W as Z,_r as V,h as J,r as K}from"./icons.ChOq_Y4q.js";import{t as Q}from"./react-core.CAMe6Z4j.js";import"./utils.CgzVjNgC.js";import"./state.L8kQliOB.js";import{Bt as Y,i as H,k as X}from"./entry-client.DX3aUoe5.js";import{n as p}from"./input.GzdAc1Aj.js";import"./dist.DxccqHSW.js";import{t as g}from"./label.D8t8fk_6.js";import{n as S,t as k}from"./SEO.gPDL2mFy.js";import{t as C}from"./CtaMicrocopy.D3zGPrw8.js";import{t as _}from"./logo.7ZVhR9ER.js";import{t as P}from"./Card.CbhBZ5MF.js";import{t as ee}from"./GoogleSignIn.BispkxKX.js";var a=E(q(),1),e=E(Q(),1),te=[{label:"8+ characters",test:s=>s.length>=8},{label:"Uppercase letter",test:s=>/[A-Z]/.test(s)},{label:"Lowercase letter",test:s=>/[a-z]/.test(s)},{label:"Number",test:s=>/[0-9]/.test(s)}],se=s=>s.length<8?"Password must be at least 8 characters":/[A-Z]/.test(s)?/[a-z]/.test(s)?/[0-9]/.test(s)?null:"Password must contain at least one number":"Password must contain at least one lowercase letter":"Password must contain at least one uppercase letter",m={starter:"Starter",professional:"Professional",studio:"Studio"},re=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,h=()=>{if(typeof window>"u")return"/dashboard";const s=new URLSearchParams(window.location.search),r=s.get("redirect");if(r&&Y(r)&&r.length<=255)return r;const i=s.get("template");if(i&&re.test(i))return`/dashboard/new?format=${i}`;const d=s.get("plan");return d&&m[d]?`/pricing?plan=${d}`:"/dashboard"};const ae=()=>{const{register:s,isLoading:r,error:i,clearError:d,isAuthenticated:L}=H(),[A,R]=(0,a.useState)(!1),j=A&&L;(0,a.useEffect)(()=>{R(!0)},[]),(0,a.useEffect)(()=>{j&&!r&&(window.location.href=h())},[j,r]);const[f,F]=(0,a.useState)(""),[x,T]=(0,a.useState)(""),[o,B]=(0,a.useState)(""),[M,O]=(0,a.useState)(!1),[b,u]=(0,a.useState)(""),[U,N]=(0,a.useState)(!1),[l,z]=(0,a.useState)(null);(0,a.useEffect)(()=>{const t=new URLSearchParams(window.location.search).get("plan");t&&m[t]&&z(t)},[]);const v=t=>{typeof window>"u"||(window.dataLayer=window.dataLayer??[],window.dataLayer.push({event:"signup_ui_completed",sign_up_method:t,user_role:"customer",plan_type:l??"none",referral_code:"NEW",marketing_optin:!0,timestamp:new Date().toISOString()}))},I=t=>{t&&v("google"),window.location.href=h()},D=async t=>{if(t.preventDefault(),u(""),d(),!f||!x||!o){u("Fill in every field.");return}const c=se(o);if(c){u(c);return}try{const n=h();(await s(f,x,o,o,n==="/dashboard"?"/pricing":n)).requiresVerification&&(v("email"),N(!0))}catch(n){u(n instanceof Error?n.message:"Could not create your account. Try again.")}};return U?(0,e.jsxs)("main",{id:"main-content",className:"min-h-screen bg-background flex items-center justify-center p-6",children:[(0,e.jsx)(k,{...S.register}),(0,e.jsx)("div",{className:"w-full max-w-md animate-fade-in",children:(0,e.jsxs)(P,{variant:"default",padding:"lg",className:"rounded-xl border-border bg-card/90 text-center shadow-raised-lg backdrop-blur-sm",children:[(0,e.jsx)("div",{className:"flex justify-center mb-6",children:(0,e.jsx)("div",{className:"h-16 w-16 rounded-lg bg-success/10 flex items-center justify-center",children:(0,e.jsx)(V,{className:"h-8 w-8 text-success","aria-hidden":"true"})})}),(0,e.jsx)("h2",{className:"text-2xl font-bold text-foreground mb-2",children:"Check your email"}),(0,e.jsxs)("p",{className:"text-muted-foreground mb-6",children:["We've sent a verification link to"," ",(0,e.jsx)("strong",{className:"text-foreground",children:x}),". Open the link to verify your account."]}),l&&m[l]&&h().startsWith("/pricing?plan=")&&(0,e.jsxs)("p",{className:"text-sm text-primary mb-6",children:["Once you verify, we'll take you straight to your"," ",m[l]," plan."]}),(0,e.jsxs)("p",{className:"text-sm text-muted-foreground mb-6",children:["Didn't receive the email? Check your spam folder or"," ",(0,e.jsx)("button",{type:"button",onClick:()=>N(!1),className:"rounded-md text-primary outline-none transition-colors hover:text-primary/80 focus-visible:ring-[3px] focus-visible:ring-ring/50",children:"try again"})]}),(0,e.jsxs)(w,{href:"/login",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,e.jsx)(y,{className:"h-4 w-4","aria-hidden":"true"}),"Back to log in"]}),(0,e.jsx)(C,{className:"mt-6"})]})})]}):(0,e.jsxs)("main",{id:"main-content",className:"min-h-screen bg-background flex",children:[(0,e.jsx)(k,{...S.register}),(0,e.jsxs)("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden",children:[(0,e.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/20 via-background to-accent/10"}),(0,e.jsx)("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`linear-gradient(hsl(0 0% 100% / 0.1) 1px, transparent 1px),
2                                         linear-gradient(90deg, hsl(0 0% 100% / 0.1) 1px, transparent 1px)`,backgroundSize:"64px 64px"}}),(0,e.jsx)("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-primary/20 rounded-lg blur-[128px]"}),(0,e.jsx)("div",{className:"absolute bottom-1/4 right-1/4 w-64 h-64 bg-accent/20 rounded-lg blur-[96px]"}),(0,e.jsxs)("div",{className:"relative z-10 flex flex-col justify-between p-12 w-full",children:[(0,e.jsx)("a",{href:"/",children:(0,e.jsx)(_,{className:"h-5"})}),(0,e.jsxs)("div",{className:"space-y-8",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("h1",{className:"text-4xl lg:text-5xl font-bold text-foreground mb-4 leading-tight",children:["Turn your script",(0,e.jsx)("span",{className:"text-gradient block",children:"into a film."})]}),(0,e.jsx)("p",{className:"text-lg text-muted-foreground max-w-md",children:"Storyboard, video, voice, and sound — all in one workspace."})]}),(0,e.jsx)("div",{className:"space-y-4",children:[{icon:G,text:"First cut in one session."},{icon:K,text:"30+ director styles to choose from"},{icon:Z,text:"Full commercial rights on all content"}].map((t,c)=>(0,e.jsxs)("div",{className:"flex items-center gap-3 text-muted-foreground",children:[(0,e.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-secondary",children:(0,e.jsx)(t.icon,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),(0,e.jsx)("span",{className:"text-sm",children:t.text})]},c))})]}),(0,e.jsx)("div",{className:"glass-effect rounded-xl p-6",children:(0,e.jsxs)("div",{className:"grid grid-cols-3 gap-6 text-center",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-2xl font-bold text-foreground",children:"1"}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Session from script to final cut"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-2xl font-bold text-foreground",children:"16"}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Voice languages"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-2xl font-bold text-foreground",children:"24h"}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"100% refund window"})]})]})})]})]}),(0,e.jsx)("div",{className:"flex-1 flex items-center justify-center p-6 lg:p-12",children:(0,e.jsxs)("div",{className:"w-full max-w-md animate-fade-in",children:[(0,e.jsx)("div",{className:"flex justify-center mb-8 lg:hidden",children:(0,e.jsx)("a",{href:"/",children:(0,e.jsx)(_,{className:"h-5"})})}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 mb-6 lg:hidden text-center",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-lg font-bold text-foreground",children:"1"}),(0,e.jsx)("p",{className:"text-2xs text-muted-foreground",children:"Session to cut"})]}),(0,e.jsx)("div",{className:"w-px h-8 bg-border"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-lg font-bold text-foreground",children:"16"}),(0,e.jsx)("p",{className:"text-2xs text-muted-foreground",children:"Languages"})]}),(0,e.jsx)("div",{className:"w-px h-8 bg-border"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-lg font-bold text-foreground",children:"24h"}),(0,e.jsx)("p",{className:"text-2xs text-muted-foreground",children:"Refund window"})]})]}),l&&(0,e.jsxs)("div",{className:"mb-6 flex items-center justify-between gap-3 rounded-xl border border-primary/30 bg-primary/10 px-4 py-3",children:[(0,e.jsxs)("p",{className:"text-sm text-foreground",children:["Continuing to the"," ",(0,e.jsx)("span",{className:"font-semibold",children:m[l]})," ","plan — create your account to finish checkout."]}),(0,e.jsx)("a",{href:"/pricing",className:"shrink-0 text-xs font-medium text-primary transition-colors hover:text-primary/80",children:"Change"})]}),(0,e.jsxs)(P,{variant:"default",padding:"lg",className:"rounded-xl border-border bg-card/60 shadow-raised-lg",children:[(0,e.jsxs)("div",{className:"text-center mb-8",children:[(0,e.jsx)("h2",{className:"text-2xl font-bold text-foreground mb-2",children:"Create your account"}),(0,e.jsx)("p",{className:"text-muted-foreground",children:"Sign up, then pick a plan to start making your film."})]}),(0,e.jsx)(ee,{onSuccess:I,buttonClassName:"font-semibold",buttonLabel:"Continue with Google"}),(0,e.jsx)("div",{className:"relative my-6",children:(0,e.jsx)("div",{className:"relative flex justify-center",children:(0,e.jsx)("span",{className:"px-4 text-xs text-muted-foreground uppercase tracking-wider",children:"or continue with email"})})}),(0,e.jsxs)("form",{onSubmit:D,className:"space-y-4",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(g,{htmlFor:"name",children:"Full name"}),(0,e.jsx)(p,{id:"name",type:"text",name:"name",placeholder:"Your name…",autoComplete:"name",value:f,onChange:t=>F(t.target.value),icon:(0,e.jsx)(J,{className:"h-4 w-4","aria-hidden":"true"}),className:"bg-background/85",disabled:r})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(g,{htmlFor:"email",children:"Email"}),(0,e.jsx)(p,{id:"email",type:"email",name:"email",placeholder:"[email protected]…",autoComplete:"email",inputMode:"email",spellCheck:!1,value:x,onChange:t=>T(t.target.value),icon:(0,e.jsx)($,{className:"h-4 w-4","aria-hidden":"true"}),className:"bg-background/85",disabled:r})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(g,{htmlFor:"password",children:"Password"}),(0,e.jsx)(p,{id:"password",type:"password",revealable:!0,name:"password",placeholder:"Create a strong password…",autoComplete:"new-password",value:o,onChange:t=>B(t.target.value),onFocus:()=>O(!0),icon:(0,e.jsx)(W,{className:"h-4 w-4","aria-hidden":"true"}),disabled:r,className:"bg-background/85"}),M&&(0,e.jsx)("div",{className:"grid grid-cols-2 gap-1 pt-1","aria-label":"Password requirements",children:te.map(({label:t,test:c})=>{const n=c(o);return(0,e.jsxs)("div",{className:`flex items-center gap-1.5 text-xs transition-colors ${n?"text-success":"text-muted-foreground"}`,children:[(0,e.jsx)("div",{className:`h-1.5 w-1.5 rounded-lg shrink-0 transition-colors ${n?"bg-success":"bg-muted-foreground
2/40"}`}),t]},t)})})]}),(b||i)&&(0,e.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 border border-destructive/20",role:"status","aria-live":"polite",children:[(0,e.jsx)("div",{className:"h-2 w-2 rounded-lg bg-destructive"}),(0,e.jsx)("p",{className:"text-sm text-destructive",children:b||i})]}),(0,e.jsx)(X,{type:"submit",className:"w-full font-semibold",disabled:r,isLoading:r,children:"Create account"}),(0,e.jsx)(C,{className:"mt-4"})]}),(0,e.jsxs)("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Already have an account?"," ",(0,e.jsx)(w,{href:"/login",className:"text-primary hover:text-primary/80 font-medium transition-colors",children:"Log in"})]})]}),(0,e.jsxs)("div",{className:"mt-8 space-y-4",children:[(0,e.jsxs)("p",{className:"text-center text-xs text-muted-foreground",children:["By creating an account, you agree to our"," ",(0,e.jsx)("a",{href:"/terms",className:"text-foreground/70 hover:text-foreground transition-colors",children:"Terms of Service"})," ","and"," ",(0,e.jsx)("a",{href:"/privacy",className:"text-foreground/70 hover:text-foreground transition-colors",children:"Privacy Policy"})]}),(0,e.jsx)("div",{className:"text-center",children:(0,e.jsxs)("a",{href:"/",className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,e.jsx)(y,{className:"h-4 w-4","aria-hidden":"true"}),"Back to home"]})})]})]})})]})};var ve=ae;export{ae as RegisterPage,ve 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.