PageSourceSearch

https://app.spaitial.ai/assets/login-BDI2As6z-344d37dac6c1.js

js spaitial.ai collected 2026-10-02 05:13:39 UTC 4,826 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0f713-a018-7302-9e88-7cde8550b1ae")}catch(e){}}();import{r as j,j as e}from"./react-D8xgUSms-344d37dac6c1.js";import{v,L as i}from"./tanstack-router-CEQu-TrB-344d37dac6c1.js";import{u as S,a as b}from"./use-server-mutation-B1VPrijK-344d37dac6c1.js";import{i as F,l as P,I as x,B as p,c as R,d as L,u as C,h as k,e as E}from"./index-_TbRVc-i-344d37dac6c1.js";import{u as O,O as D}from"./oauth-provider-buttons-Dv64ZCTr-344d37dac6c1.js";import{C as A,a as T,b as B,c as q,d as z}from"./card---lX5YBe-344d37dac6c1.js";import{F as H,a as G,b as u,c as f,d as g}from"./field-DWWyvf56-344d37dac6c1.js";import{_ as I,q as M}from"./icons-rJxGrmf1-344d37dac6c1.js";import"./posthog-CTdkyuxI-344d37dac6c1.js";import"./tanstack-query-DTiRSa1W-344d37dac6c1.js";import"./radix-Dn5s4LcD-344d37dac6c1.js";import"./supabase-BcuDcHL0-344d37dac6c1.js";function W({className:a,redirectTo:r,...c}){const d=v(),n=F(r)?r:void 0,l=S({fn:b(P),onSuccess:async s=>{s.data.error||(await d.invalidate(),n?d.navigate({to:n}):d.navigate({to:"/worlds",search:{create:!0}}))}}),[m,w]=j.useState(!1),o=O(),y=s=>{s.preventDefault();const h=new FormData(s.currentTarget);l.mutate({data:{email:h.get("email"),password:h.get("password")}})},N=s=>{o.start(s,n)},t=l.status==="pending"||o.isPending;return e.jsxs("div",{className:R("flex flex-col gap-6",a),...c,children:[e.jsxs(A,{children:[e.jsxs(T,{className:"text-center",children:[e.jsx(B,{className:"text-xl",role:"heading","aria-level":1,children:"Welcome back"}),e.jsx(q,{children:"Login with Apple, Google, or your email account"})]}),e.jsx(z,{children:e.jsx("form",{onSubmit:y,children:e.jsxs(H,{children:[e.jsx(D,{onOAuth:N,pendingProvider:o.pendingProvider,disabled:t}),o.error&&e.jsx("div",{className:"text-sm text-destructive text-center",children:o.error}),e.jsx(G,{className:"*:data-[slot=field-separator-content]:bg-card",children:"Or continue with email"}),e.jsxs(u,{children:[e.jsx(f,{htmlFor:"email",children:"Email"}),e.jsx(x,{id:"email",name:"email",type:"email",placeholder:"[email protected]",required:!0,disabled:t})]}),e.jsxs(u,{children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(f,{htmlFor:"password",children:"Password"}),e.jsx(i,{to:"/forgot-password",className:"ml-auto text-sm underline-offset-4 hover:underline",children:"Forgot your password?"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(x,{id:"password",name:"password",type:m?"text":"password",required:!0,disabled:t,className:"pr-10"}),e.jsx(p,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute right-0 top-0 h-full px-3 text-muted-foreground hover:text-foreground",onClick:()=>w(s=>!s),disabled:t,"aria-label":m?"Hide password":"Show password",children:m?e.jsx(I,{className:"size-4"}):e.jsx(M,{className:"size-4"})})]})]}),l.data?.error&&e.jsx("div",{className:"text-sm text-destructive text-center",children:l.data.message}),e.jsxs(u,{children:[e.jsx(p,{type:"submit",disabled:t,children:t?"Logging in...":"Login"}),e.jsxs(g,{className:"text-center",children:["Don't have an account?"," ",e.jsx(i,{to:"/signup",search:{redirect:n},className:"underline underline-offset-4 hover:text-primary",children:"Sign up"})]})]})]})})})]}),e.jsxs(g,{className:"px-6 text-center",children:["By clicking continue, you agree to our"," ",e.jsx(i,{to:"/terms",className:"underline underline-offset-4 hover:text-primary",children:"Terms of Service"})," ","and"," ",e.jsx(i,{to:"/privacy",className:"underline underline-offset-4 hover:text-primary",children:"Privacy Policy"}),". See our"," ",e.jsx(i,{to:"/cookies",className:"underline underline-offset-4 hover:text-primary",children:"Cookie Policy"}),"."]})]})}function _(){const a=v();return j.useEffect(()=>{window.location.hash&&k({hash:window.location.hash,onSuccess:async r=>{window.history.replaceState(null,"",r),await a.navigate({to:"/reset-password"})},onError:async()=>{await a.navigate({to:"/forgot-password",search:{reason:E}})}})},[a]),null}function re(){const{redirect:a}=L.useSearch(),{theme:r}
1=C(),c=r==="light"?"/logo/spatial-logo-full-white.png":"/logo/spaitial-logo-full.png";return e.jsxs("div",{className:"flex min-h-svh w-full flex-col",children:[e.jsx(_,{}),e.jsx("div",{className:"p-6",children:e.jsx(i,{to:"/",className:"inline-flex items-center gap-2.5",children:e.jsx("img",{src:c,alt:"Spaitial",className:"h-8 w-auto"})})}),e.jsx("div",{className:"flex flex-1 items-center justify-center p-6 md:p-10",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsx(W,{redirectTo:a})})})]})}export{re as component};
2
3//# chunkId=01a0f713-a018-7302-9e88-7cde8550b1ae

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.