PageSourceSearch

https://remax.net/assets/login-Bhevpckx.js

js remax.net collected 2026-10-05 07:56:55 UTC 10,779 bytes, 1 lines download raw bytes

1import{r as d,w as z,a as X,u as $,L as H}from"./chunk-UVKPFVEO-BZSKWuzL.js";import{j as t}from"./jsx-runtime-u17CrQMm.js";import{K as Y,M as q,A as J,E as C,u as Q,e as Z,s as c,L as ee,B as I,F as te,f as L,g as R,h as T,i as P,I as O,j as D,N as se}from"./test-ids-EOINTSvq.js";import{u as re}from"./okta-react.esm-BmWt6tlP.js";import{c as ae,d as ne,e as ie,f as oe,g as le}from"./dialog-e7GeYF-u.js";import{o as i,I as u,c as S,d as ce,L as de,t as ue}from"./index-bODj3Lt_.js";import{g as W,s as me}from"./sync-authenticated-user-5_QF-Wti.js";import{c as he,L as pe}from"./loader-circle-iijtn9uX.js";import{E as xe,a as fe}from"./x-DJVJDQf-.js";import"./index-BM4MnF-L.js";import"./AuthSdkError-8Mm8HnnD.js";import"./user-service-Cix8TzQS.js";const ge=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],we=he("play",ge);var Se="AspectRatio",V=d.forwardRef((e,s)=>{const{ratio:r=1/1,style:a,...o}=e;return t.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/r}%`},"data-radix-aspect-ratio-wrapper":"",children:t.jsx(Y.div,{...o,ref:s,style:{...a,position:"absolute",top:0,right:0,bottom:0,left:0}})})});V.displayName=Se;var ye=V;const be=ye;async function Ne(){const s=(await i.tokenManager.getTokens()).idToken?.claims;return new Set([s?.sub,s?.uid].map(q).filter(Boolean))}async function je(){try{const e=await i.session.get(),s=typeof e.userId=="string"?e.userId.trim():"";return e.status!=="ACTIVE"||!s?!1:(await Ne()).has(s)}catch{return!1}}async function ke(e){if(e.cancel)try{await e.cancel()}catch{}}async function ve(e,s){try{if(await je())return!1;const r=await i.signInWithCredentials({username:e.username,password:e.password}),a=r.sessionToken?.trim();return r.status!=="SUCCESS"||!a?(await ke(r),!1):(await i.signInWithRedirect({sessionToken:a,originalUri:`${window.location.origin}${W(s)}`}),!0)}catch{return!1}}const h="Unable to continue sign in. Please try again.",Ee="Your sign-in session expired. Please try again.",Ae=6;let f=null;function p(){i.transactionManager.clear()}function N(e){return!!e.messages?.some(s=>s.i18n?.key==="idx.session.expired"||/session has expired/i.test(s.message??""))}function M(e){if(!e||typeof e!="object")return!1;const s=e;if((s.errorCode??s.xhr?.responseJSON?.errorCode)==="E0000022")return!0;const a=String(s.errorSummary??s.xhr?.responseJSON?.errorSummary??"");return/does not support the provided HTTP method/i.test(a)}function j(){return p(),{kind:"error",message:Ee,restartCredentials:!0}}function _(e,s){return e?.map(a=>a.message).find(Boolean)??s}async function Ce(e){i.tokenManager.setTokens(e),await i.authStateManager.updateAuthState(),await me()}function B(e){return e.nextStep??e.availableSteps?.[0]}function Ie(e,s){if(e.authenticator?.key===S.OKTA_PASSWORD||e.authenticator?.type==="password")return!0;const r=e.relatesTo?.value;if(r?.key===S.OKTA_PASSWORD||r?.type==="password")return!0;const a=s.context?.currentAuthenticatorEnrollment?.value;return a?.key===S.OKTA_PASSWORD||a?.type==="password"}function F(e,s){return e.status!==u.PENDING?!1:B(e)?.name===s}async function Le(e,s){let r=e;for(let a=0;a<Ae;a++){if(r.status!==u.PENDING)return r;const o=B(r),n=o?.name;if(!n||!o)return r;if(n==="identify"){if(r=await i.idx.proceed({step:n,username:s.username,password:s.password}),F(r,"identify"))return r;continue}if(n==="select-authenticator-authenticate"){r=await i.idx.proceed({step:n,authenticator:S.OKTA_PASSWORD});continue}if(n==="challenge-authenticator"&&Ie(o,r)){if(r=await i.idx.proceed({step:n,password:s.password}),F(r,"challenge-authenticator"))return r;continue}if(n==="keep-me-signed-in"){r=await i.idx.proceed({step:n,rememberMe:!1});continue}return r}return r}async function U(e,s,r){return N(e)?j():e.status===u.SUCCESS?e.tokens?(await Ce(e.tokens),{kind:"success",ssoRedirect:await ve(s,r)}):(p(),{kind:"error",message:h,restartCredentials:!0}):e.status===u.PENDING?{kind:"error",message:_(e.messages,h)}:e.status===u.FAILURE||e.status===u.TERMINAL||e.status===u.CANCELED?{kind:"error",message:_(e.messages,h)}:{kind:"error",message:h}}async function b(e){p();let s=await i.idx.authenticate({autoRemediate:!1});return s.status===u.PENDING&&(s=await Le(s,e)),s}async function Re(e,s){try{let r=await b(e);return N(r)&&(r=await b(e)),await U(r,e,s)}catch(r){if(!M(r))return{kind:"error",message:h};p();try{const a=await b(e);return N(a)?j():await U(a,e,s)}catch(a){return p(),M(a)?j():{kind:"error",message:h}}}}async function Te(e,s){return f||(f=Re(e,s?.returnTo).finally(()=>{f=null}),f)}const Pe=J({username:C().min(1,"Email is required").email("Enter a valid email address"),password:C().min(1,"Password is required")});function $e(){return[{title:"Sign in"},{name:"description",content:"Sign in to SkyView"}]}const He=z(function(){const{authState:s,oktaAuth:r}=re(),a=X(),o=$(),n=d.useMemo(()=>{const l=new URLSearchParams(a.search);return W(l.get("returnTo"))}
1,[a.search]),[Oe,k]=d.useState({kind:"credentials"}),[v,E]=d.useState(!1),[y,G]=d.useState(!1),[x,A]=d.useState(!1),g=Q({resolver:Z(Pe),defaultValues:{username:"",password:""}});if(d.useEffect(()=>{p(),ce()},[]),d.useEffect(()=>{s?.isAuthenticated&&(x||o(n,{replace:!0}))},[s?.isAuthenticated,o,n,x]),s===null)return t.jsx("main",{className:"flex flex-1 items-center justify-center p-4 text-foreground","data-testid":c("login","loading"),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(pe,{className:"h-5 w-5 animate-spin text-muted-foreground","aria-hidden":"true"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking session…"})]})});const K=async l=>{if(x)return;A(!0);let w=!1;try{const m=await Te(l,{returnTo:n});if(k(m),m.kind==="success"){if(m.ssoRedirect){w=!0;return}o(n,{replace:!0});return}if(m.kind==="error"){if(r.authStateManager.getAuthState()?.isAuthenticated){o(n,{replace:!0});return}ue.error(m.message),m.restartCredentials&&k({kind:"credentials"})}}finally{w||A(!1)}};return t.jsxs("main",{className:"relative z-10 flex min-h-0 flex-1 flex-col","data-testid":c("login","route"),children:[t.jsx("div",{className:"absolute right-4 top-4 z-20",children:t.jsx(ee,{})}),t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-6",children:t.jsxs("div",{className:"mx-auto flex min-h-full w-full max-w-md flex-col justify-center space-y-6",children:[t.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/5 p-5 text-center backdrop-blur-sm",children:[t.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-[#8fbfeb]",children:"MAXCENTER IS NOW SKYVIEW"}),t.jsx("p",{className:"mt-1 text-lg font-bold text-white",children:"You're right where you belong"}),t.jsx("p",{className:"mt-2 text-[13px] leading-5 text-white/65",children:"Same account, same tools, new AI experience."}),t.jsxs(I,{type:"button",variant:"outline",onClick:()=>E(!0),className:"mt-4 h-9 rounded-full border-white/30 bg-transparent px-4 text-[13px] text-white hover:bg-white/10 hover:text-white","data-testid":c("login","watch-video"),children:[t.jsx(we,{className:"h-4 w-4","aria-hidden":"true"}),"Watch the 12-second video"]})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("a",{href:"/","data-testid":c("login","logo-link"),children:t.jsx("img",{src:"/remax-logo-64.png",alt:"RE/MAX",className:"mx-auto mb-4 h-12 w-auto"})}),t.jsx("h1",{className:"text-2xl font-bold text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.3)]",children:"Sign in to SkyView℠"}),t.jsx("p",{className:"mt-2 text-sm text-white/70",children:"Access your REMAX account and AI platform"}),t.jsxs("p",{className:"mt-1 text-sm text-white/50",children:["Need assistance? Call or text"," ",t.jsx("a",{href:"tel:888-398-7171",className:"text-white/70 transition-colors hover:text-white/90",children:"888-398-7171"})]})]}),t.jsx(te,{...g,children:t.jsxs("form",{onSubmit:l=>{g.handleSubmit(K)(l)},className:"space-y-4 rounded-2xl border border-white/15 bg-black/20 p-6 backdrop-blur-sm","data-testid":c("login","credentials-form"),children:[t.jsx(L,{control:g.control,name:"username",render:({field:l})=>t.jsxs(R,{children:[t.jsx(T,{className:"block pb-1 text-white",children:"Email"}),t.jsx(P,{children:t.jsx(O,{...l,type:"email",className:"rounded-full border-white/15 bg-black/20 px-4 py-2.5 text-white placeholder:text-white/40",placeholder:"[email protected]",autoComplete:"username"})}),t.jsx(D,{})]})}),t.jsx(L,{control:g.control,name:"password",render:({field:l})=>t.jsxs(R,{children:[t.jsx(T,{className:"block pb-1 text-white",children:"Password"}),t.jsxs("div",{className:"relative",children:[t.jsx(P,{children:t.jsx(O,{...l,type:y?"text":"password",className:"rounded-full border-white/15 bg-black/20 px-4 py-2.5 pr-11 text-white placeholder:text-white/40",autoComplete:"current-password",placeholder:"••••••••"})}),t.jsx("button",{type:"button",onClick:()=>G(w=>!w),className:"absolute right-3 top-1/2 -translate-y-1/2 text-white/50 transition-colors hover:text-white/80","aria-label":y?"Hide password":"Show password",children:y?t.jsx(xe,{size:18}):t.jsx(fe,{size:18})})]}),t.jsx(se,{className:"text-white/60",children:t.jsx(H,{to:"/forgot-password",className:"transition-colors hover:text-white/90","data-testid":c("login","forgot-password"),children:"Forgot password?"})}),t.jsx(D,{})]})}
1),t.jsx(I,{type:"submit",disabled:x,className:"w-full rounded-full bg-foreground py-2.5 font-semibold text-background transition-opacity hover:opacity-80 disabled:opacity-30",children:x?"Please wait…":"Sign in"})]})}),t.jsxs("p",{className:"text-center text-sm text-white/60",children:["Don't have an account?"," ",t.jsx("a",{href:"https://maxcenter.remax.net/register",className:"font-medium text-white underline underline-offset-2 transition-colors hover:text-white/80","data-testid":c("login","sign-up"),children:"Sign up"})]}),t.jsx(ae,{open:v,onOpenChange:E,children:t.jsxs(ne,{"data-testid":c("login","video-modal"),className:"w-[calc(100vw-2rem)] max-w-2xl gap-0 overflow-hidden rounded-2xl border-white/10 bg-black/90 p-0 text-white backdrop-blur-md [&>button]:text-white/60",children:[t.jsxs(ie,{className:"border-b border-white/10 px-5 py-4 text-left",children:[t.jsx(oe,{className:"text-base font-semibold text-white",children:"Welcome to SkyView"}),t.jsx(le,{className:"sr-only",children:"SkyView introduction video."})]}),t.jsx("div",{className:"p-5",children:t.jsx(be,{ratio:16/9,className:"overflow-hidden rounded-lg border border-white/10 bg-black",children:v?t.jsx("iframe",{src:de,title:"Welcome to SkyView introduction video",className:"h-full w-full border-0",allow:"autoplay; fullscreen; encrypted-media; picture-in-picture",allowFullScreen:!0,"data-testid":c("login","video-player")}):null})})]})})]})})]})});export{He as default,$e as meta};

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.