PageSourceSearch

https://air.thalus.ai/assets/login-C1Eg1x3X.js

js thalus.ai collected 2026-10-05 13:41:56 UTC 11,200 bytes, 1 lines download raw bytes

1import{t as e}from"./key-round-4Uk9bRO_.js";import{t}from"./mail-DFzEknPf.js";import{$n as n,B as r,Br as i,By as a,Cc as o,Cx as s,Dc as c,Ec as l,G as u,Gn as d,Gv as f,Hr as p,Jb as m,Jo as h,Kb as g,Kn as _,Kr as v,Ky as y,Oc as b,Py as x,Qy as S,R as C,Sc as w,Tc as T,Uv as E,Xr as D,Y as O,Yb as k,gx as A,ib as j,jc as M,js as N,kc as P,ly as F,mb as I,ox as L,q as R,qn as z,qr as ee,rb as te,sb as B,ux as V,vx as ne,wc as re,wx as H}from"./index-Ch8WObnx.js";import{r as ie,t as U}from"./Hooks-BX2jknnh.js";import{i as W,r as G,t as K}from"./field-WryrvH9P.js";import{t as q}from"./input-4HxfSZ8Q.js";import{t as J}from"./auth-BOGPcFSN.js";import{i as ae,n as oe,r as se,t as ce}from"./tabs-CjOfAKe1.js";import{t as Y}from"./form-heading-CsDbS_K8.js";import{a as le,i as X,n as ue,r as de,t as fe}from"./input-otp-8DlNrTGv.js";var Z=V(),pe=r(``),me=r(``),he=r(``),ge=r(`request`),_e=C()(x(`login.cooldown`)(function*(e,t){for(let n=e;n>0;n--)t.setSelf(O(n)),yield*y(B(1));return 0}),{initialValue:0}),ve=F(z),ye=F(d),be=F(_),xe=e=>S({try:()=>i({data:e}),catch:D}),Se=e=>S({try:()=>p({data:e}),catch:D}),Ce=e=>S({try:()=>v({data:e}),catch:D}),we=C()(x(`login.submit`)(function*(e){return yield*xe(yield*ve({email:Q(e,`email`)?.trim(),password:Q(e,`password`)}).pipe(a(()=>new J)))})),Te=C()(x(`login.requestOtp`)(function*(e,t){let n=yield*Se(yield*ye({email:Q(e,`email`)?.trim()}).pipe(a(()=>new J)));return t.set(he,``),t.set(ge,`verify`),t.set(_e,30),n})),Ee=C()(x(`login.verifyOtp`)(function*(e){return yield*Ce(yield*be({email:Q(e,`email`)?.trim(),otp:Q(e,`code`)}).pipe(a(()=>new J)))}));function Q(e,t){let n=e.get(t);return typeof n==`string`?n:void 0}var $=H();function De(){let e=(0,Z.c)(45),[t,n]=U(pe),[r,i]=U(me),a=s(),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={from:`/auth/login`},e[0]=o):o=e[0];let{returnTo:c}=ne(o),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={mode:`promiseExit`},e[1]=l):l=e[1];let[d,f]=U(we,l),p;e[2]!==t||e[3]!==r?(p=t.trim().length>0&&r.length>0,e[2]=t,e[3]=r,e[4]=p):p=e[4];let m=p,g;e[5]!==c||e[6]!==a||e[7]!==f?(g=async e=>{let t=await f(e);te(t)&&ee(a,t.value,c)},e[5]=c,e[6]=a,e[7]=f,e[8]=g):g=e[8];let _=g,v;e[9]===d?v=e[10]:(v=u(d)?Ae(d.cause):void 0,e[9]=d,e[10]=v);let y=v,b;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(Y,{title:`Sign in to your account`,description:P}),e[11]=b):b=e[11];let x;e[12]===y?x=e[13]:(x=y?(0,$.jsx)(ke,{title:`Sign in failed`,message:y}):void 0,e[12]=y,e[13]=x);let S=!!y,C;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(W,{htmlFor:`password-email`,children:`Email`}),e[14]=C):C=e[14];let w=!!y,T;e[15]===n?T=e[16]:(T=e=>n(e.currentTarget.value),e[15]=n,e[16]=T);let E;e[17]!==t||e[18]!==T||e[19]!==w?(E=(0,$.jsx)(q,{id:`password-email`,name:`email`,type:`email`,className:`h-auto w-full rounded-lg border px-4 py-2.5 text-base focus-visible:ring-4 focus-visible:ring-thalus-purple/20 md:text-base`,placeholder:`[email protected]`,autoComplete:`username`,value:t,"aria-invalid":w,onChange:T,required:!0}),e[17]=t,e[18]=T,e[19]=w,e[20]=E):E=e[20];let D;e[21]!==E||e[22]!==S?(D=(0,$.jsxs)(K,{"data-invalid":S,children:[C,E]}),e[21]=E,e[22]=S,e[23]=D):D=e[23];let O=!!y,k;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsx)(W,{htmlFor:`password`,children:`Password`}),(0,$.jsx)(A,{to:`/auth/forgot-password`,className:`text-sm text-muted-foreground underline underline-offset-4`,children:`Forgot?`})]}),e[24]=k):k=e[24];let j=!!y,M;e[25]===i?M=e[26]:(M=e=>i(e.currentTarget.value),e[25]=i,e[26]=M);let F;e[27]!==r||e[28]!==j||e[29]!==M?(F=(0,$.jsx)(q,{id:`password`,name:`password`,type:`password`,className:`h-auto w-full rounded-lg border px-4 py-2.5 text-base focus-visible:ring-4 focus-visible:ring-thalus-purple/20 md:text-base`,autoComplete:`current-password`,placeholder:`••••••••••••••••`,minLength:8,value:r,"aria-invalid":j,onChange:M,required:!0}),e[27]=r,e[28]=j,e[29]=M,e[30]=F):F=e[30];let I;e[31]!==O||e[32]!==F?(I=(0,$.jsxs)(K,{"data-invalid":O,children:[k,F]}),e[31]=O,e[32]=F,e[33]=I):I=e[33];let L;e[34]!==D||e[35]!==I?(L=(0,$.jsxs)(G,{className:`gap-4`,children:[D,I]}),e[34]=D,e[35]=I,e[36]=L):L=e[36];let R=!m||d.waiting,z=d.waiting?`Signing in...`:`Sign in`,B;e[37]!==R||e[38]!==z?(B=(0,$.jsx)(h,{type:`submit`,className:N,disabled:R,children:z}),e[37]=R,e[38]=z,e[39]=B):B=e[39];let V;return e[40]!==_||e[41]!==L||e[42]!==B||e[43]!==x?(V=(0,$.jsxs)(`div`,{className:`space-y-6`,children:[b,(0,$.jsxs)(`form`,{action:_,className:`space-y-4`,children:[x,L,B]})]}),e[40]=_,e[41]=L,e[42]=B,e[43]=x,e[44]=V):V=e[44],V}function Oe(){let e=(0,Z.c)(38),[t,n]=U(pe),[r,i]=U(he),[a,l]=U(ge),d=s(),f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(f={from:`/auth/login`},e[0]=f):f=e[0];let{returnTo:p}=ne(f),m;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(m={mode:`promiseExit`},e[1]=m):m=e[1];let[g,_]=U(Te,m),v;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(v={mode:`promiseExit`},e[2]=v):v=e[2];let[y,x]=U(Ee,v),S=ie(_e),C;e[3]===S?C=e[4]:(C=R(S)?S.value:0,e[3]=S,e[4]=C);let E=C,D;e[5]===t?D=e[6]:(D=t.trim(),e[5]=t,e[6]=D);let O=D.length>0,k;e[7]===r?k=e[8]:(k=r.trim(),e[7]=r,e[8]=k);let A=k.length===6,j;e[9]===_?j=e[10]:(j=async e=>{await _(e)},e[9]=_,e[10]=j);let M=j,P;e[11]!==p||e[12]!==d||e[13]!==x?(P=async e=>{let t=await x(e);te(t)&&ee(d,t.value,p)},e[11]=p,e[12]=d,e[13]=x,e[14]=P):P=e[14];let F=P,I;e[15]!==t||e[16]!==_?(I=()=>{let e=new FormData;e.set(`email`,t),_(e)},e[15]=t,e[16]=_,e[17]=I):I=e[17];let L=I,z;e[18]===g?z=e[19]:(z=u(g)?Ae(g.cause):void 0,e[18]=g,e[19]=z);let B=z,V;e[20]===y?V=e[21]:(V=u(y)?Ae(y.cause):void 0,e[20]=y,e[21]=V);let H=a===`request`?B:V,G;return e[22]!==O||e[23]!==A||e[24]!==r||e[25]!==E||e[26]!==t||e[27]!==H||e[28]!==L||e[29]!==M||e[30]!==g.waiting||e[31]!==i||e[32]!==n||e[33]!==l||e[34]!==a||e[35]!==F||e[36]!==y?(G=(0,$.jsx)(`div`,{className:`space-y-6`,children:a===`request`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Y,{title:`Sign in to your account`,description:re}),(0,$.jsxs)(`form`,{action:M,className:`space-y-4`,children:[H?(0,$.jsx)(ke,{title:`Could not send code`,message:H}):void 0,(0,$.jsxs)(K,{"data-invalid":!!H,children:[(0,$.jsx)(W,{htmlFor:`otp-email`,children:`Email`}),(0,$.jsx)(q,{id:`otp-email`,name:`email`,type:`email`,className:`h-auto w-full rounded-lg border px-4 py-2.5 text-base focus-visible:ring-4 focus-visible:ring-thalus-purple/20 md:text-base`,placeholder:`[email protected]`,autoComplete:`email`,value:t,"aria-invalid":!!H,onChange:e=>n(e.currentTarget.value),required:!0})]}),(0,$.jsx)(h,{type:`submit`,className:N,disabled:!O||g.waiting,children:g.waiting?o:w})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Y,{title:`Sign in to your account`,description:`${c} ${t}. ${b}`}),(0,$.jsxs)(`form`,{action:F,className:`space-y-4`,children:[H?(0,$.jsx)(ke,{title:`Could not verify code`,message:H}):void 0,(0,$.jsx)(`input`,{type:`hidden`,name:`email`,value:t}),(0,$.jsxs)(K,{"data-invalid":!!H,children:[(0,$.jsx)(W,{htmlFor:`otp-code`,children:`Code`}),(0,$.jsxs)(fe,{id:`otp-code`,name:`code`,maxLength:6,inputMode:`numeric`,pattern:le,autoComplete:`one-time-code`,value:r,"aria-invalid":!!H,onChange:i,containerClassName:`justify-center`,required:!0,children:[(0,$.jsxs)(ue,{children:[(0,$.jsx)(X,{index:0}),(0,$.jsx)(X,{index:1}),(0,$.jsx)(X,{index:2})]}),(0,$.jsx)(de,{}),(0,$.jsxs)(ue,{children:[(0,$.jsx)(X,{index:3}),(0,$.jsx)(X,{index:4}),(0,$.jsx)(X,{index:5})]})]})]}),(0,$.jsx)(h,{type:`submit`,className:N,disabled:!A||y.waiting,children:y.waiting?`Verifying...`:`Verify & continue`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Didn't receive a code?`}),(0,$.jsx)(h,{type:`button`,variant:`link`,className:`h-auto p-0 text-sm`,disabled:g.waiting||E>0,onClick:L,children:E>0?`Resend in ${E}s`:g.waiting?`Resending...`:T})]}),(0,$.jsx)(h,{type:`button`,variant:`ghost`,className:`w-full`,onClick:()=>{i(``),l(`request`)},children:`Change email`})]})]})}),e[22]=O,e[23]=A,e[24]=r,e[25]=E,e[26]=t,e[27]=H,e[28]=L,e[29]=M,e[30]=g.waiting,e[31]=i,e[32]=n,e[33]=l,e[34]=a,e[35]=F,e[36]=y,e[37]=G):G=e[37],G}function ke(e){let t=(0,Z.c)(8),{title:n,message:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(L,{}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,$.jsx)(k,{children:n}),t[1]=n,t[2]=a);let o;t[3]===r?o=t[4]:(o=(0,$.jsx)(m,{children:r}),t[3]=r,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,$.jsxs)(g,{variant:`destructive`,className:`rounded-lg`,children:[i,a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Ae(e){let t=j(e);if(I(t))return`We could not complete this request right now. Please try again in a moment.`;let n=t.value;switch(n._tag){case`air/UnauthorizedError`:return`Check the details you entered and try again.`;case`air/ForbiddenError`:return(n.message??``).toLowerCase().includes(`csrf`)?`Refresh the page and try again.`:`This account does not have access to an AIR workspace.`;case`air/RateLimitedError`:return n.retryAfter===void 0?`Too many attempts. Try again in a bit.`:`Too many attempts. Try again in ${Math.ceil(n.retryAfter)} seconds.`;case`air/AuthUnavailableError`:case`air-web/AuthTransportError`:return`We could not complete this request right now. Please try again in a moment.`;default:return n.message??`Check the details you entered and try again.`}}function je(){let r=(0,Z.c)(9),{showSignupLink:i}=n.useLoaderData(),a;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsxs)(ae,{value:`otp`,className:`text-base leading-none`,children:[(0,$.jsx)(t,{}),l]}),r[0]=a):a=r[0];let o;r[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(se,{variant:`line`,className:`grid w-full grid-cols-2 group-data-horizontal/tabs:h-11`,children:[a,(0,$.jsxs)(ae,{value:`password`,className:`text-base leading-none`,children:[(0,$.jsx)(e,{}),`Password`]})]}),r[1]=o):o=r[1];let s;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(oe,{value:`otp`,children:(0,$.jsx)(Oe,{})}),r[2]=s):s=r[2];let c;r[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(ce,{defaultValue:`otp`,className:`gap-4`,children:[o,s,(0,$.jsx)(oe,{value:`password`,children:(0,$.jsx)(De,{})})]}),r[3]=c):c=r[3];let u;r[4]===i?u=r[5]:(u=i?(0,$.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`New to AIR?`,` `,(0,$.jsx)(A,{to:M,className:`text-thalus-purple underline underline-offset-4`,children:`Create account`})]}):null,r[4]=i,r[5]=u);let d;r[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsxs)(`p`,{className:`text-center text-xs text-muted-foreground`,children:[(0,$.jsx)(A,{to:E,className:`text-thalus-purple/90 hover:text-thalus-purple hover:underline underline-offset-4`,children:`Privacy Policy`}),(0,$.jsx)(`span`,{className:`mx-2 text-slate-300`,children:`·`}),(0,$.jsx)(A,{to:f,className:`text-thalus-purple/90 hover:text-thalus-purple hover:underline underline-offset-4`,children:`Terms of Service`})]}),r[6]=d):d=r[6];let p;return r[7]===u?p=r[8]:(p=(0,$.jsxs)(`div`,{className:`space-y-6`,children:[c,u,d]}),r[7]=u,r[8]=p),p}export{je as component};

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.