PageSourceSearch

https://flows.super.ai/assets/signin-DQ9kjvaL.js

js super.ai collected 2026-09-25 18:17:20 UTC 31,396 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]="f68b3285-2e3e-418b-b385-c7db03b3103c")}catch(e){}}();import{x as Ie,y as Ae,w as ie,r as i,j as t,c as M,B as A,cm as oe,q as be,br as Q,c5 as X,ae as Pe,cn as Le,co as _e,u as Re,a as Fe,b as Me,c6 as Oe,I as Ue,cp as He,cq as ze,cr as Be,cs as qe,ct as ye,aN as $e}from"./index-BFiNvylu.js";import{u as Ge}from"./useDelayedFlag-DYRavHl-.js";import{s as De,O as We,S as le,R as ce}from"./authProvisioning-On8eheUx.js";import{R as Ke}from"./RequestAccessForm-DdvKRpWp.js";import{A as Ve}from"./AssentNotice-CAZUU26j.js";import{c as ue,b as de,C as fe,a as me,d as he}from"./card-B9yqEqNl.js";import{L as ne}from"./label-3D9CUkkK.js";import{P as pe}from"./password-input-EYdxXgfM.js";import{n as ae}from"./email-yUml_Ca6.js";import{g as Ye}from"./landingPageRedirect-C1ILPfJW.js";import"./form-Bw3S76bS.js";import"./textarea-Dpweut0T.js";import"./eye-off-Zz4QHTam.js";import"./eye-C69H_dq1.js";const ve=()=>[{url:"/api/auth/captcha-config"}];async function Ze(a={}){const{client:e=ie,...s}=a;return(await e({method:"GET",url:"/api/auth/captcha-config",baseURL:"VITE_API_URL",...s})).data}function Qe(a={}){const e=ve();return Ae({queryKey:e,queryFn:async({signal:s})=>(a.signal=s,Ze(a))})}function Je(a={}){const{query:e={},client:s={}}=a??{},{client:n,...r}=e,c=r?.queryKey??ve(),l=Ie({...Qe(s),queryKey:c,...r},n);return l.queryKey=c,l}async function Xe(a,e={}){const{client:s=ie,...n}=e;return(await s({method:"GET",url:"/api/auth/login-method",baseURL:"VITE_API_URL",params:a,...n})).data}async function et(a,e={}){const{client:s=ie,...n}=e;return(await s({method:"GET",url:"/api/auth/signup-email-policy",baseURL:"VITE_API_URL",params:a,...n})).data}const V="Verification is temporarily unavailable. Please try again shortly.",tt="Verification failed. Please try again.",nt="Human verification",at="Try again",Y="Verifying...";var st=i.forwardRef(({as:a="div",...e},s)=>t.jsx(a,{...e,ref:s}));const rt="https://challenges.cloudflare.com/turnstile/v0/api.js",it="cf-turnstile-script",Ce="onloadTurnstileCallback",je=a=>!!document.getElementById(a),ot=({render:a="explicit",onLoadCallbackName:e=Ce,scriptOptions:{nonce:s="",defer:n=!0,async:r=!0,id:c="",appendTo:l,onError:u,crossOrigin:h=""}={}})=>{let p=c||"cf-turnstile-script";if(je(p))return;let f=document.createElement("script");f.id=p,f.src=`${rt}?onload=${e}&render=${a}`,!document.querySelector(`script[src="${f.src}"]`)&&(f.defer=!!n,f.async=!!r,s&&f.setAttribute("nonce",s),h&&(f.crossOrigin=h),u&&(f.onerror=u,delete window[e]),(l==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(f))},se={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65}};function lt(a){if(a!=="invisible")return a}function ct(a=it){let[e,s]=i.useState(!1);return i.useEffect(()=>{let n=()=>{je(a)&&s(!0)},r=new MutationObserver(n);return r.observe(document,{childList:!0,subtree:!0}),n(),()=>{r.disconnect()}},[a]),e}let J="unloaded",Ee;const ut=new Promise((a,e)=>{Ee={resolve:a,reject:e},J==="ready"&&a(void 0)}),ge=(a=Ce)=>(J==="unloaded"&&(J="loading",window[a]=()=>{Ee.resolve(),J="ready",delete window[a]}),ut),ke=i.forwardRef((a,e)=>{let{scriptOptions:s,options:n={},siteKey:r,onWidgetLoad:c,onSuccess:l,onExpire:u,onError:h,onBeforeInteractive:p,onAfterInteractive:f,onUnsupported:v,onTimeout:k,onLoadScript:P,id:o,style:_,as:C="div",injectScript:T=!0,rerenderOnCallbackChange:w=!1,...R}=a,S=n.size,g=i.useMemo(()=>{if(S===void 0)return{};let d=se[S];return n.appearance==="interaction-only"?{...d,height:"auto"}:d},[S,n.appearance]),y=n.execution==="execute"?se.invisible:g,[O,E]=i.useState(y),m=i.useRef(null),[U,I]=i.useState(!1),b=i.useRef(void 0),j=i.useRef(!1),q=o||"cf-turnstile",H=i.useRef({onSuccess:l,onError:h,onExpire:u,onBeforeInteractive:p,onAfterInteractive:f,onUnsupported:v,onTimeout:k});i.useEffect(()=>{w||(H.current={onSuccess:l,onError:h,onExpire:u,onBeforeInteractive:p,onAfterInteractive:f,onUnsupported:v,onTimeout:k})});let K=s?.id||"cf-turnstile-script",D=ct(K),$=s?.onLoadCallbackName||"onloadTurnstileCallback",W=i.useMemo(()=>({sitekey:r,action:n.action,cData:n.cData,theme:n.theme||"auto",language:n.language||"auto",tabindex:n.tabIndex,"response-field":n.responseField,"response-field-name":n.responseFieldName,size:lt(S),retry:n.retry||"auto","retry-interval":n.retryInterval||8e3,"refresh-expired":n.refreshExpired||"auto","refresh-timeout":n.refreshTimeout||"auto",execution:n.execution||"render",appearance:n.appearance||"always","feedback-enabled":n.feedbackEnabled??!0,"offlabel-show-privacy":n.offlabelShowPrivacy??!0,"offlabel-show-help":n.offlabelShowHelp??!0,callback:d=>{j.current=!0,w?l?.(d):H.current.onSuccess?.(d)},"error-callback":w?h:(...d)=>H.current.onError?.(...d),"expired-callback":w?u:(...d)=>H.current.onExpire?.(...d),"before-interactive-callback":w?p:(...d)=>H.current.onBeforeInteractive?.(...d),"after-interactive-callback":w?f:(...d)=>H.current.onAfterInteractive?.(...d),"unsupported-callback":w?v:(...d)=>H.current.onUnsupported?.(...d),"timeout-callback":w?k:(...d)=>H.current.onTimeout?.(...d)}),[n.action,n.appearance,n.cData,n.execution,n.language,n.refreshExpired,n.responseField,n.responseFieldName,n.retry,n.retryInterval,n.tabIndex,n.theme,n.feedbackEnabled,n.offlabelShowPrivacy,n.offlabelShowHelp,n.refreshTimeout,r,S,w,w?l:null,w?h:null,w?u:null,w?p:null,w?f:null,w?v:null,w?k:null]),z=i.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return i.useEffect(function(){T&&!U&&(ge($),ot({onLoadCallbackName:$,scriptOptions:{...s,id:K}}))},[T,U,s,K,$]),i.useEffect(function(){J!=="ready"&&ge($).then(()=>I(!0)).catch(console.error)},[$]),i.useEffect(function(){if(!m.current||!U)return;let d=!1;return(async()=>
1{if(d||!m.current)return;let B=window.turnstile.render(m.current,W);b.current=B,E(y),b.current&&c?.(b.current)})(),()=>{d=!0,b.current&&(window.turnstile.remove(b.current),j.current=!1)}},[q,U,W,y]),i.useImperativeHandle(e,()=>{let{turnstile:d}=window;return{getResponse(){if(!d?.getResponse||!b.current||!z()){console.warn("Turnstile has not been loaded");return}return d.getResponse(b.current)},async getResponsePromise(B=3e4,te=100){return new Promise((x,N)=>{let L,F=async()=>{if(j.current&&window.turnstile&&b.current)try{let G=window.turnstile.getResponse(b.current);return L&&clearTimeout(L),G?x(G):N(Error("No response received"))}catch(G){return L&&clearTimeout(L),console.warn("Failed to get response",G),N(Error("Failed to get response"))}L||=setTimeout(()=>{L&&clearTimeout(L),N(Error("Timeout"))},B),await new Promise(G=>setTimeout(G,te)),await F()};F()})},reset(){if(!d?.reset||!b.current||!z()){console.warn("Turnstile has not been loaded");return}E(y);try{j.current=!1,d.reset(b.current)}catch(B){console.warn(`Failed to reset Turnstile widget ${b.current}`,B)}},remove(){if(!d?.remove||!b.current||!z()){console.warn("Turnstile has not been loaded");return}E(se.invisible),j.current=!1,d.remove(b.current),b.current=null},render(){if(!d?.render||!m.current||!z()||b.current){console.warn("Turnstile has not been loaded or container not found");return}let B=d.render(m.current,W);return b.current=B,b.current&&c?.(b.current),E(y),B},execute(){if(n.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!d?.execute||!m.current||!b.current||!z()){console.warn("Turnstile has not been loaded or container not found");return}d.execute(m.current),E(g)},isExpired(){return!d?.isExpired||!b.current||!z()?(console.warn("Turnstile has not been loaded"),!1):d.isExpired(b.current)}}},[b,n.execution,W,m,z,U,c,y,g]),i.useEffect(()=>{if(U||!D)return;if(window.turnstile){I(!0);return}let d=setInterval(()=>{window.turnstile&&(I(!0),clearInterval(d))},50);return()=>{clearInterval(d)}},[U,D]),i.useEffect(()=>{E(y)},[y]),i.useEffect(()=>{!D||typeof P!="function"||P()},[D]),t.jsx(st,{ref:m,as:C,id:q,style:{...O,..._},...R})});ke.displayName="Turnstile";const dt={appearance:"interaction-only",execution:"render",size:"flexible",refreshExpired:"auto",responseField:!1};function ft(a){const e=M.c(23),{siteKey:s,widgetRef:n,renderKey:r,blocked:c,failed:l,onWidgetLoad:u,onSuccess:h,onExpire:p,onError:f,onTimeout:v,onUnsupported:k,onScriptError:P,onBeforeInteractive:o,onAfterInteractive:_,onRetry:C}=a;let T;e[0]!==P?(T={onError:P},e[0]=P,e[1]=T):T=e[1];const w=T;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{id:"signin-captcha-label",className:"sr-only",children:nt}),e[2]=R):R=e[2];let S;e[3]!==_||e[4]!==o||e[5]!==f||e[6]!==p||e[7]!==h||e[8]!==v||e[9]!==k||e[10]!==u||e[11]!==r||e[12]!==w||e[13]!==s||e[14]!==n?(S=s&&t.jsx(ke,{ref:n,siteKey:s,options:dt,scriptOptions:w,onWidgetLoad:u,onSuccess:h,onExpire:p,onError:f,onTimeout:v,onUnsupported:k,onBeforeInteractive:o,onAfterInteractive:_},r),e[3]=_,e[4]=o,e[5]=f,e[6]=p,e[7]=h,e[8]=v,e[9]=k,e[10]=u,e[11]=r,e[12]=w,e[13]=s,e[14]=n,e[15]=S):S=e[15];let g;e[16]!==c||e[17]!==l||e[18]!==C?(g=(c||l)&&t.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-1 text-sm font-medium text-red-500","data-e2e-id":"signin-captcha-error",children:[t.jsx("span",{children:c?V:tt}),l&&t.jsx(A,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-sm font-medium",onClick:C,"data-e2e-id":"signin-captcha-retry",children:at})]}),e[16]=c,e[17]=l,e[18]=C,e[19]=g):g=e[19];let y;return e[20]!==S||e[21]!==g?(y=t.jsxs("div",{role:"group","aria-labelledby":"signin-captcha-label",className:"flex flex-col gap-2","data-e2e-id":"signin-captcha",children:[R,S,g]}),e[20]=S,e[21]=g,e[22]=y):y=e[22],y}const xe=25e3,mt=8e3,ht=500;function pt(a){return/^(110|400)\d{3}$/.test(a??"")}
1class Z extends Error{constructor(){super("Captcha verification is unavailable"),this.name="CaptchaUnavailableError"}}const gt=100,xt=(a=>{const e=AbortSignal.timeout(mt);return oe({...a,signal:a.signal?AbortSignal.any([a.signal,e]):e})});function wt(){const a=i.useRef(null),[e,s]=i.useState("loading"),[n,r]=i.useState(0),[c,l]=i.useState(!1),u=i.useRef(0),h=i.useRef(-1),p=i.useRef(e);p.current=e;const f=i.useRef(!0);i.useEffect(()=>(f.current=!0,()=>{f.current=!1}),[]);const v=Je({query:{staleTime:1/0,gcTime:1/0,retry:1,refetchOnWindowFocus:!1,meta:{skipGlobalErrorHandler:!0}},client:{client:xt}}),k=v.data,P=v.isError?"":k?.site_key??"";let o;v.isPending?o="loading":v.isError||k?.enabled===!1?o="disabled":P?o=e:o="unavailable";const _=o==="ready"&&!c,C=Ge(_,ht);i.useEffect(()=>{if(o!=="ready"||c)return;const g=setTimeout(()=>s(y=>y==="ready"?"failed":y),xe);return()=>clearTimeout(g)},[o,n,c]);const T=i.useCallback(()=>{u.current+=1,r(g=>g+1),s(g=>g==="unavailable"?g:"loading"),l(!1)},[]),w=i.useCallback(async()=>{if(h.current<0)return;const g=Date.now()+xe;for(;h.current!==u.current;){const y=p.current;if(y==="unavailable"||y==="failed")throw new Z;if(!f.current||Date.now()>=g)throw new Z;await new Promise(O=>setTimeout(O,gt))}},[]),R=i.useCallback(async()=>{if(o==="disabled")return;if(o==="unavailable"||o==="failed")throw new Z;await w();let g;try{g=await a.current?.getResponsePromise()}catch{throw new Z}if(!g)throw new Z;return g},[o,w]);return{status:o,required:o!=="disabled",blocked:o==="unavailable",failed:o==="failed",pending:o==="loading",canSubmit:o==="disabled"||o==="solved",verifying:o==="loading"||o==="ready",checking:_,awaitingHuman:o==="ready"&&c,showChecking:C,siteKey:P||null,widgetProps:{siteKey:P,widgetRef:a,renderKey:n,onWidgetLoad:()=>s("ready"),onSuccess:()=>{h.current=u.current,s("solved")},onExpire:()=>{u.current+=1,s("ready"),l(!1)},onError:g=>s(pt(g)?"unavailable":"failed"),onTimeout:()=>s("failed"),onUnsupported:()=>s("unavailable"),onScriptError:()=>s("unavailable"),onBeforeInteractive:()=>l(!0),onAfterInteractive:()=>l(!1)},getToken:R,reset:T}}function bt(a){const e=M.c(3),{className:s}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",transform:"scale(64)",fill:"#1B1F23",d:"M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z"}),e[0]=n):n=e[0];let r;return e[1]!==s?(r=t.jsx("svg",{className:s,viewBox:"0 0 1024 1024",fill:"none","aria-hidden":"true",children:n}),e[1]=s,e[2]=r):r=e[2],r}function yt(a){const e=M.c(3),{className:s}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("g",{transform:"translate(-123.97696 -123.92475)",children:[t.jsx("path",{fill:"#E24329",d:"M292.778,434.892l62.199-191.322H230.669L292.778,434.892z"}),t.jsx("path",{fill:"#FCA326",d:"M143.549,243.57l-18.941,58.126c-1.714,5.278,0.137,11.104,4.661,14.394l163.509,118.801L143.549,243.57z"}),t.jsx("path",{fill:"#E24329",d:"M143.549,243.57h87.12l-37.494-115.224c-1.919-5.895-10.282-5.895-12.27,0L143.549,243.57z"}),t.jsx("path",{fill:"#FCA326",d:"M442.097,243.57l18.873,58.126c1.714,5.278-0.137,11.104-4.661,14.394L292.778,434.892L442.097,243.57z"}),t.jsx("path",{fill:"#E24329",d:"M442.097,243.57h-87.12l37.425-115.224c1.919-5.895,10.282-5.895,12.27,0L442.097,243.57z"}),t.jsx("polygon",{fill:"#FC6D26",points:"292.778,434.892 354.977,243.57 442.097,243.57"}),t.jsx("polygon",{fill:"#FC6D26",points:"292.778,434.892 143.549,243.57 230.669,243.57"})]}),e[0]=n):n=e[0];let r;return e[1]!==s?(r=t.jsx("svg",{className:s,viewBox:"15.573 4.421 306.546 306.546","aria-hidden":"true",children:n}),e[1]=s,e[2]=r):r=e[2],r}function vt(a){const e=M.c(6),{className:s}=a;let n,r,c,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.27-4.74 3.27-8.1Z"}),r=t.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.84A
111 11 0 0 0 12 23Z"}),c=t.jsx("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84Z"}),l=t.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.06l3.66 2.84C6.71 7.3 9.14 5.38 12 5.38Z"}),e[0]=n,e[1]=r,e[2]=c,e[3]=l):(n=e[0],r=e[1],c=e[2],l=e[3]);let u;return e[4]!==s?(u=t.jsxs("svg",{className:s,viewBox:"0 0 24 24","aria-hidden":"true",children:[n,r,c,l]}),e[4]=s,e[5]=u):u=e[5],u}function Ct(a){const e=M.c(3),{className:s}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("g",{fill:"none",fillRule:"evenodd",children:[t.jsx("path",{fill:"#007EBB",d:"M8,72 L64,72 C68.418278,72 72,68.418278 72,64 L72,8 C72,3.581722 68.418278,-8.11624501e-16 64,0 L8,0 C3.581722,8.11624501e-16 -5.41083001e-16,3.581722 0,8 L0,64 C5.41083001e-16,68.418278 3.581722,72 8,72 Z"}),t.jsx("path",{fill:"#FFF",d:"M62,62 L51.315625,62 L51.315625,43.8021149 C51.315625,38.8127542 49.4197917,36.0245323 45.4707031,36.0245323 C41.1746094,36.0245323 38.9300781,38.9261103 38.9300781,43.8021149 L38.9300781,62 L28.6333333,62 L28.6333333,27.3333333 L38.9300781,27.3333333 L38.9300781,32.0029283 C38.9300781,32.0029283 42.0260417,26.2742151 49.3825521,26.2742151 C56.7356771,26.2742151 62,30.7644705 62,40.051212 L62,62 Z M16.349349,22.7940133 C12.8420573,22.7940133 10,19.9296567 10,16.3970067 C10,12.8643566 12.8420573,10 16.349349,10 C19.8566406,10 22.6970052,12.8643566 22.6970052,16.3970067 C22.6970052,19.9296567 19.8566406,22.7940133 16.349349,22.7940133 Z M11.0325521,62 L21.769401,62 L21.769401,27.3333333 L11.0325521,27.3333333 L11.0325521,62 Z"})]}),e[0]=n):n=e[0];let r;return e[1]!==s?(r=t.jsx("svg",{className:s,viewBox:"0 0 72 72","aria-hidden":"true",children:n}),e[1]=s,e[2]=r):r=e[2],r}function jt(a){const e=M.c(6),{className:s}=a;let n,r,c,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("path",{fill:"#F25022",d:"M2 2h9.5v9.5H2z"}),r=t.jsx("path",{fill:"#7FBA00",d:"M12.5 2H22v9.5h-9.5z"}),c=t.jsx("path",{fill:"#00A4EF",d:"M2 12.5h9.5V22H2z"}),l=t.jsx("path",{fill:"#FFB900",d:"M12.5 12.5H22V22h-9.5z"}),e[0]=n,e[1]=r,e[2]=c,e[3]=l):(n=e[0],r=e[1],c=e[2],l=e[3]);let u;return e[4]!==s?(u=t.jsxs("svg",{className:s,viewBox:"0 0 24 24","aria-hidden":"true",children:[n,r,c,l]}),e[4]=s,e[5]=u):u=e[5],u}const Se=[{provider:"google",slug:"google",label:"Continue with Google",icon:t.jsx(vt,{className:"size-4"})},{provider:"azure",slug:"microsoft",label:"Continue with Microsoft",icon:t.jsx(jt,{className:"size-4"}),scopes:"email profile"},{provider:"linkedin_oidc",slug:"linkedin",label:"Continue with LinkedIn",icon:t.jsx(Ct,{className:"size-4"})},{provider:"github",slug:"github",label:"Continue with GitHub",icon:t.jsx(bt,{className:"size-4"})},{provider:"gitlab",slug:"gitlab",label:"Continue with GitLab",icon:t.jsx(yt,{className:"size-4"})}];function Et(a){const e=new URL("/auth/callback",window.location.origin);e.searchParams.set(We,a);const s=new URLSearchParams(window.location.search).get(le);return s&&e.searchParams.set(le,s),e.toString()}function kt(a){return a?Se.find(e=>e.slug===a)??null:null}const St=()=>{const a=M.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e={mutationFn:Tt},a[0]=e):e=a[0],be(e)};function Nt(a){const e=M.c(7),{e2eIdPrefix:s,disabled:n,pendingProvider:r,onSelect:c}=a,l=n===void 0?!1:n,u=r===void 0?null:r;let h;e[0]!==l||e[1]!==s||e[2]!==c||e[3]!==u?(h=Se.map(f=>t.jsx(A,{variant:"outline",type:"button",size:"icon",className:"size-11 rounded-xl [&_svg]:size-5",disabled:l,"aria-label":f.label,title:f.label,"data-e2e-id":`${s}-${f.slug}`,onClick:()=>c(f),children:u===f.provider?t.jsx(Q,{className:"animate-spin"}):f.icon},f.provider)),e[0]=l,e[1]=s,e[2]=c,e[3]=u,e[4]=h):h=e[4];let p;return e[5]!==h?(p=t.jsx("div",{className:"flex justify-center gap-3",children:h}),e[5]=h,e[6]=p):p=e[6],p}async function Tt(a){De(window.location.pathname);const{error:e}=await X.auth.signInWithOAuth({provider:a.provider,options:{redirectTo:Et(a.slug),...a.scopes?{scopes:a.scopes}:{}}});if(e)throw new Error(e.message)}const It="Key terms";function At(a){const e=M.c(12),{docs:s}=a,[n,r]=i.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>r(Pt),e[0]=c):c=e[0];const l=`size-3 transition-transform ${n?"rotate-180":""}`;let u;e[1]!==l?(u=t.jsx(Pe,{className:l,"aria-hidden":!0}),e[1]=l,e[2]=u):u=e[2];let h;e[3]!==n||e[4]!==u?(h=t.jsxs(A,{type:"button",variant:"link",className:"h-auto p-0 text-xs","aria-expanded":n,onClick:c,"data-e2e-id":"signin-key-terms-toggle",children:[It,u]}),e[3]=n,e[4]=u,e[5]=h):h=e[5];let p;e[6]!==s||e[7]!==n?(p=n?t.jsxs("div",{className:"mt-2 space-y-1 text-left leading-relaxed","data-e2e-id":"signin-key-terms-content",children:[t.jsxs("p",{children:["The super.AI platform is provided by Super.AI Inc.",s.traderAddress?`, ${s.traderAddress}`:"",". You can reach us at"," ",t.jsx("a",{href:`mailto:${s.traderContactEmail}`,className:"underline underline-offset-2","data-e2e-id":"signin-key-terms-contact",children:s.traderContactEmail}),"."]}),t.jsx("p",{children:"Your account starts on a free trial with a one-off credit allowance; the trial never refreshes, and your content stays readable once it is spent."}),t.jsx("p",{children:"No monetary price is charged for the trial, and n
1o payment method is collected to start one. Paid plans are optional and priced at checkout."}),t.jsxs("p",{children:["You can close your account at any time. Consumers in the EU, EEA and UK have a statutory right to withdraw within 14 days; the"," ",t.jsx("a",{href:s.tosUrl,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2","data-e2e-id":"signin-key-terms-terms-link",children:s.documentsPublished?"Self-Service Terms of Service":"Terms"})," ","explain how."]})]}):null,e[6]=s,e[7]=n,e[8]=p):p=e[8];let f;return e[9]!==h||e[10]!==p?(f=t.jsxs("div",{className:"text-center text-xs","data-e2e-id":"signin-key-terms",children:[h,p]}),e[9]=h,e[10]=p,e[11]=f):f=e[11],f}function Pt(a){return!a}async function Lt(a,e,s){const n=e&&Le(e)?e:null,{data:r}=await X.auth.mfa.getAuthenticatorAssuranceLevel();if(r?.currentLevel==="aal1"&&r.nextLevel==="aal2"){s({to:"/mfa-required",search:n?{redirect:n}:{}});return}const l=_e(a),u=l.status==="authenticated"?await Ye(l):{to:"/"};n&&!(u.to==="/chat"&&!n.startsWith("/chat"))?s({to:n}):s(u)}const _t={undeliverable_email:"That domain can’t receive email, so we’d have no way to reach you. Please double-check the address.",disposable_email:"Temporary email addresses tend to self-destruct, and your account would go with them. Please use an inbox that sticks around.",personal_email_not_allowed:"Nothing personal, but personal email addresses can’t sign up here. Use your work email, or slip in through LinkedIn, GitHub, or GitLab instead.",academic_email_not_allowed:"University and school addresses can’t sign up here. Use your work email, or slip in through LinkedIn, GitHub, or GitLab instead."},we=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Ne(){return`${window.location.origin}/auth/callback`}class ee extends Error{reason;constructor(e,s){super(s),this.reason=e}}function re(a){return/security purposes.*\d+ seconds/i.test(a)?"We just sent you an email. Check your inbox, or try again in a minute.":/captcha protection/i.test(a)?V:a}async function Te(a){try{const e=await et({email:a},{client:oe});if(!e.allowed)throw new ee(e.reason??"",_t[e.reason??""]??"This email can’t be used to sign up.")}catch(e){if(e instanceof ee)throw e}}const Rt=()=>{const a=M.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e={meta:{skipGlobalErrorHandler:!0},mutationFn:Mt},a[0]=e):e=a[0],be(e)};function Ft(){const a=Re(),e=Fe({from:"/(authentication)/signin"}),s=Me(),[n,r]=i.useState(e.email??""),[c,l]=i.useState(!1),[u,h]=i.useState(!1),[p,f]=i.useState(!1),[v,k]=i.useState(""),[P,o]=i.useState(null),[_,C]=i.useState(!1),[T,w]=i.useState(!1),[R,S]=i.useState(null),[g,y]=i.useState(null),O=St(),E=Rt(),m=wt(),U=Oe(),I=ae(n),b=we.test(I),j=O.isPending||E.isPending||u||_,q=!j&&m.verifying,H=O.isPending?O.variables.provider:null;function K(x){ze({provider:x.slug},s),E.reset(),O.mutate(x)}const D=i.useRef(!1);i.useEffect(()=>{if(D.current)return;const x=kt(e.provider);x&&(D.current=!0,K(x))},[]);function $(){l(!1),f(!1),k(""),o(null),w(!1),E.reset(),m.reset()}async function W(x){const N=ae(x);h(!0),E.reset();try{if((await Xe({email:N},{client:oe})).method==="sso_required"){a({to:"/sso-login",search:{email:N,...e.redirect?{redirect:e.redirect}:{}}});return}l(!0)}catch{l(!0)}finally{h(!1)}}const z=i.useRef(!1);i.useEffect(()=>{z.current||(z.current=!0,e.email&&we.test(ae(e.email))&&W(e.email))},[]);async function d(){o(null),Be({email_domain:qe(I)},s);let x;try{x=await m.getToken()}catch{o(V);return}E.mutate({email:I,...x?{captchaToken:x}:{}},{onSuccess:()=>y({note:null}),onError:N=>{m.reset(),N instanceof ee&&ce.has(N.reason)&&S(I)}})}async function B(){if(v.length<8){o("Password must be at least 8 characters.");return}C(!0),o(null);let x;try{x=await m.getToken()}catch{o(V),C(!1);return}const{data:{session:N},error:L}=await X.auth.signInWithPassword({email:I,password:v,...x?{options:{captchaToken:x}}:{}}
1);if(L||!N){o(L?re(L.message):"Sign-in failed. Please try again."),m.reset(),C(!1);return}await Lt(N,e.redirect,a),C(!1)}async function te(){if(v.length<8){o("Password must be at least 8 characters.");return}C(!0),o(null);try{await Te(I)}catch(F){F instanceof ee&&ce.has(F.reason)?S(I):F instanceof Error&&o(F.message),C(!1);return}let x;try{x=await m.getToken()}catch{o(V),C(!1);return}const{error:N}=await X.auth.signUp({email:I,password:v,options:{emailRedirectTo:Ne(),data:{marketing_attribution:ye()},...x?{captchaToken:x}:{}}});if(m.reset(),!N){y({note:null}),C(!1);return}if(("status"in N?N.status:void 0)===409){let F;try{F=await m.getToken()}catch{o(V),C(!1);return}E.mutate({email:I,...F?{captchaToken:F}:{}},{onSuccess:()=>y({note:"You already have an account, so we emailed you a sign-in link instead."}),onError:G=>{m.reset(),o(G.message)},onSettled:()=>C(!1)});return}o(re(N.message)),C(!1)}return R?t.jsx(Ke,{email:R,onBackToSignup:()=>{S(null),C(!1),E.reset()}}):g?t.jsxs(ue,{children:[t.jsxs(de,{className:"text-center",children:[t.jsx(fe,{className:"text-xl",children:"Check your inbox"}),t.jsxs(me,{className:"text-sm leading-relaxed",children:["We sent a secure link to"," ",t.jsx("span",{className:"font-medium",children:I}),". Open it and you’re in. New accounts are created automatically."]})]}),t.jsxs(he,{className:"flex flex-col gap-3",children:[g.note&&t.jsx("div",{className:"rounded-md border bg-muted/50 p-3 text-sm text-muted-foreground","data-e2e-id":"signin-sent-note",children:g.note}),t.jsx(A,{variant:"secondary",className:"w-full","data-e2e-id":"signin-sent-back",onClick:()=>{y(null),$()},children:"Use a different method"})]})]}):t.jsxs(ue,{children:[t.jsxs(de,{className:"text-center",children:[t.jsx(fe,{className:"text-xl",children:"Welcome to super.AI"}),t.jsx(me,{className:"text-sm leading-relaxed",children:"Sign in or create your account"})]}),t.jsx(he,{children:t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:x=>{x.preventDefault(),!(!b||j)&&(c?p?B():T?te():d():W(n))},children:[t.jsx(Nt,{e2eIdPrefix:"signin",disabled:j,pendingProvider:H,onSelect:K}),O.error&&t.jsx("div",{className:"text-center text-sm font-medium text-red-500",children:O.error.message}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-0 flex items-center",children:t.jsx("span",{className:"w-full border-t"})}),t.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:t.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"or with email"})})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(ne,{htmlFor:"signin-email",children:"Email"}),t.jsx(Ue,{id:"signin-email",type:"email",autoComplete:"email",placeholder:"[email protected]",value:n,disabled:j,"data-e2e-id":"signin-email",onChange:x=>{r(x.target.value),c&&$()}})]}),m.required&&t.jsx(ft,{...m.widgetProps,blocked:m.blocked,failed:m.failed,onRetry:m.reset}),!c&&t.jsxs(t.Fragment,{children:[t.jsxs(A,{type:"submit",className:"w-full",disabled:j||!b||m.checking||m.awaitingHuman,"aria-busy":m.showChecking,"data-e2e-id":"signin-continue",children:[u||m.showChecking?t.jsx(Q,{className:"size-4 animate-spin"}):null,m.showChecking?Y:"Continue"]}),t.jsx("span",{role:"status","aria-live":"polite",className:"sr-only","data-e2e-id":"signin-captcha-status",children:m.showChecking?Y:""})]}),c&&t.jsxs(t.Fragment,{children:[p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(ne,{htmlFor:"signin-password",children:"Password"}),t.jsx(pe,{id:"signin-password",autoFocus:!0,autoComplete:"current-password",placeholder:"Enter your password",value:v,disabled:j,"data-e2e-id":"signin-password",onChange:x=>k(x.target.value)})]}),T&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(ne,{htmlFor:"signin-new-password",children:"Create a password"}),t.jsx(pe,{id:"signin-new-password",autoFocus:!0,autoComplete:"new-password",placeholder:"At least 8 characters",value:v,disabled:j,"data-e2e-id":"signin-new-password",onChange:x=>k(x.target.value)})]}),!p&&!T&&t.jsxs(A,{type:"submit",className:"w-full gap-2",disabled:j||!m.canSubmit,"data-e2e-id":"signin-magic-link-button",children:[E.isPending||q?t.jsx(Q,{className:"size-4 animate-spin"}):t.jsx(He,{className:"size-4"}),q?Y:"Email me a secure link"]}),p&&t.jsxs(t.Fragment,{children:[t.jsxs(A,{type:"submit",className:"w-full",disabled:j||v.length===0||!m.canSubmit,"data-e2e-id":"signin-submit",children:[_||q?t.jsx(Q,{className:"size-4 animate-spin"}):null,q?Y:"Sign in"]}),t.jsx(A,{type:"button",variant:"link",className:"h-auto p-0 text-muted-foreground",disabled:j||!m.canSubmit,"data-e2e-id":"signin-magic-link-instead",onClick:()=>{d()},children:E.isPending?"Sending…":"Email me a link instead"})]}),T&&t.jsxs(t.Fragment,{children:[t.jsxs(A,{type:"submit",className:"w-full",disabled:j||v.length===0||!m.canSubmit,"data-e2e-id":"signin-create-password-submit",children:[_||q?t.jsx(Q,{className:"size-4 animate-spin"}):null,q?Y:"Create account"]}),t.jsx(A,{type:"button",variant:"link",className:"h-auto p-0 text-muted-foreground",disabled:j,"data-e2e-id":"signin-use-magic-link",onClick:()=>{w(!1),k(""),o(null)},children:"Use the email link instead"})]}),!p&&!T&&t.jsxs("div",{className:"flex items-center justify-center gap-3 text-sm",children:[t.jsx(A,{type:"button",variant:"link",className:"h-auto p-0 text-muted-foreground",disabled:j,"data-e2e-id":"signin-create-password-button",onClick:()=>{o(null),w(!0)},children:"Create a password instead"}
1),t.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"·"}),t.jsx(A,{type:"button",variant:"link",className:"h-auto p-0 text-muted-foreground",disabled:j,"data-e2e-id":"signin-have-password",onClick:()=>{k(""),o(null),f(!0)},children:"I have a password"})]}),(P||E.error)&&t.jsx("div",{role:"alert",className:"text-sm font-medium text-red-500","data-e2e-id":"signin-error",children:P??E.error?.message})]}),t.jsx(Ve,{docs:U,"data-e2e-id":"signin-assent"}),t.jsx(At,{docs:U}),t.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-sm text-muted-foreground",children:[t.jsx(A,{variant:"link",className:"h-auto p-0",type:"button","data-e2e-id":"signin-sso",onClick:()=>a({to:"/sso-login",search:e.redirect?{redirect:e.redirect}:void 0}),children:"Use single sign-on (SSO)"}),t.jsx("span",{"aria-hidden":!0,children:"·"}),t.jsx(A,{variant:"link",className:"h-auto p-0",type:"button","data-e2e-id":"signin-forgot-password",onClick:()=>a({to:"/forgot-password",search:e.redirect?{redirect:e.redirect}:void 0}),children:"Forgot your password?"})]})]})})]})}async function Mt(a){const{email:e,captchaToken:s}=a;await Te(e);const{error:n}=await X.auth.signInWithOtp({email:e,options:{emailRedirectTo:Ne(),shouldCreateUser:!0,data:{marketing_attribution:ye()},...s?{captchaToken:s}:{}}});if(n)throw new Error(re(n.message))}function Ot(){const a=M.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10",children:t.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-6",children:[t.jsxs($e,{to:"/",className:"flex flex-row items-center gap-2 self-center font-medium","data-e2e-id":"signin-home-link",children:[t.jsx("img",{src:"/superai-logo.webp",alt:"Super.AI",className:"size-12"}),"Super.AI Flows"]}),t.jsx(Ft,{})]})}),a[0]=e):e=a[0],e}const Jt=Ot;export{Jt as component};
2
3//# chunkId=f68b3285-2e3e-418b-b385-c7db03b3103c

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.