PageSourceSearch

https://beagentive.ai/assets/index-Cuacezip.js

js beagentive.ai collected 2026-10-05 11:51:27 UTC 11,715 bytes, 1 lines download raw bytes

1import{ln as te,le as ie,ho as ce,ks as le,ih as o,l3 as de,lf as me,iG as ge,hh as e,bM as he,cw as d,t as _,bb as ue,hp as _e,cX as V,e2 as l,I as $,R as N,bw as F,B as v,j7 as pe}from"./index-BVmjHMb3.js";import{C as H}from"./CheckCircle-DWChpkvJ.js";import{P as Q}from"./PanoramaFishEye-D8gKB7PU.js";import{E as ke}from"./ErrorMessage-CSBoUS0H.js";import{I as B}from"./InputAdornment-BkOH08AS.js";const be=()=>{const C=te();return ie({mutationFn:ce,onSuccess:()=>{C.invalidateQueries({queryKey:["login"]})}})},xe="_loginPage_hrbqd_120",Le="_mojoWatermark_hrbqd_132",je="_topErrorBanner_hrbqd_150",Ie="_signupContainer_hrbqd_156",fe="_learnMoreLink_hrbqd_165",Ne="_signupLink_hrbqd_166",ve="_learnMoreButton_hrbqd_169",Be="_signupButton_hrbqd_170",Ce="_loginRoot_hrbqd_204",qe="_titleBlock_hrbqd_216",we="_bannerLogo_hrbqd_222",Ee="_tagline_hrbqd_226",ye="_loginForm_hrbqd_237",Pe="_magicLinkPanel_hrbqd_245",Se="_magicLinkPanelInner_hrbqd_253",Ae="_magicLinkIconWrap_hrbqd_259",Fe="_magicLinkSpinner_hrbqd_270",Me="_magicLinkTitle_hrbqd_274",Re="_magicLinkBody_hrbqd_281",Te="_emailField_hrbqd_291",Oe="_passwordField_hrbqd_292",We="_notchedOutline_hrbqd_399",ze="_errorOutline_hrbqd_404",Ge="_inputElement_hrbqd_409",De="_errorInput_hrbqd_434",Ue="_inputIcon_hrbqd_442",Ke="_activatedBadge_hrbqd_455",Ve="_checkIcon_hrbqd_465",$e="_passwordToggleButton_hrbqd_471",He="_passwordIcon_hrbqd_482",Qe="_toggleIcon_hrbqd_489",Ye="_errorIcon_hrbqd_499",Xe="_errorBadge_hrbqd_507",Je="_PasswordErrorIcon_hrbqd_518",Ze="_loginFooter_hrbqd_539",en="_termsContainer_hrbqd_544",nn="_termsCheckbox_hrbqd_554",sn="_termsCheckboxIcon_hrbqd_570",rn="_termsCheckboxCheckedIcon_hrbqd_576",an="_termsText_hrbqd_582",on="_termsLink_hrbqd_590",tn="_loginActions_hrbqd_598",cn="_leftSide_hrbqd_605",ln="_loginButton_hrbqd_611",dn="_disabled_hrbqd_628",mn="_buttonLoader_hrbqd_636",gn="_forgetButton_hrbqd_639",hn="_magicLinkButton_hrbqd_660",un="_magicLinkIcon_hrbqd_259",_n="_magicLinkLabel_hrbqd_683",pn="_generalError_hrbqd_701",n={loginPage:xe,mojoWatermark:Le,topErrorBanner:je,signupContainer:Ie,learnMoreLink:fe,signupLink:Ne,learnMoreButton:ve,signupButton:Be,loginRoot:Ce,titleBlock:qe,bannerLogo:we,tagline:Ee,loginForm:ye,magicLinkPanel:Pe,magicLinkPanelInner:Se,magicLinkIconWrap:Ae,magicLinkSpinner:Fe,magicLinkTitle:Me,magicLinkBody:Re,emailField:Te,passwordField:Oe,notchedOutline:We,errorOutline:ze,inputElement:Ge,errorInput:De,inputIcon:Ue,activatedBadge:Ke,checkIcon:Ve,passwordToggleButton:$e,passwordIcon:He,toggleIcon:Qe,errorIcon:Ye,errorBadge:Xe,PasswordErrorIcon:Je,loginFooter:Ze,termsContainer:en,termsCheckbox:nn,termsCheckboxIcon:sn,termsCheckboxCheckedIcon:rn,termsText:an,termsLink:on,loginActions:tn,leftSide:cn,loginButton:ln,disabled:dn,buttonLoader:mn,forgetButton:gn,magicLinkButton:hn,magicLinkIcon:un,magicLinkLabel:_n,generalError:pn},In=()=>{const{isAuthenticated:C,setSession:Y,logout:X,userData:L}=le(),[r,M]=o.useState(""),[g,R]=o.useState(""),[p,q]=o.useState(null),[h,j]=o.useState(null),[t,w]=o.useState(null),[J,I]=o.useState(null),[Z,E]=o.useState(!1),[y,ee]=o.useState(!1),[u,P]=o.useState("password_flow"),[k,T]=o.useState(!1),[c,O]=o.useState(!1),[i,W]=o.useState(!0),m=de(),f=me(),{mutate:ne,isPending:b}=be(),se=()=>{I(null);const s=new URLSearchParams(m.search);s.delete("reason");const a=s.toString();f({pathname:m.pathname,search:a?`?${a}`:""},{replace:!0})};if(C){const s=ge({userData:{...L,email:(L==null?void 0:L.email)||r},context:"public",currentPath:m.pathname});if(s)return e.jsx(he,{to:s,state:{from:m}})}const z=()=>{q(""),j(""),I(null),ne({email:r,password:g},{onSuccess:({data:{state:s,...a}})=>{var x;Y({state:s,...a}),M(""),R(""),P("initial"),f(((x=m.state)==null?void 0:x.from)||"/")},onError:s=>{var x,G,D,U,K;console.error("Login failed:",s);const a=((G=(x=s==null?void 0:s.response)==null?void 0:x.data)==null?void 0:G.error)||{};(D=a.email)!=null&&D.length&&j(a.email[0]),(U=a.password)!=null&&U.length&&q(a.password[0]),(K=a.non_field_errors)!=null&&K.length&&w(a.non_field_errors[0]),X()}})},S=async()=>{if(w(null),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r.trim())){j("Enter a valid email address."),v.error("Enter a valid email address.");return}if(!i){v.error("Please accept the Terms of Service to continue.");return}O(!0),P("magic_link");try{await pe(r.trim()),T(!0),v.success("Sign-in link sent. Check your email.")}catch(a){console.error("Magic login link failed:",a),w("Could not send a sign-in link. Please try again."),v.error("Could not send a sign-in link. Please try again.")}finally{O(!1)}};o.useEffect(()=>
1{if(new URLSearchParams(m.search).get("reason")==="inactive"){I("Your account is currently inactive. Please contact your administrator or support team.");return}I(null)},[m.search]),o.useEffect(()=>{const s=a=>{if(!(a.key!=="Enter"||!i)){if(u==="magic_link"){r&&!c&&!k&&S();return}r&&g&&!b&&z()}};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[r,g,i,b,c,k,u]);const re=()=>{const s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;r.length&&s.test(r)?E(!0):E(!1)},ae=()=>{f("/forget")};let A;r.trim()?i||(A="Accept the terms to continue"):A="Enter your email address";const oe=()=>c&&!k?e.jsxs("div",{className:n.magicLinkPanelInner,children:[e.jsx(N,{size:22,className:n.magicLinkSpinner}),e.jsxs("div",{children:[e.jsx("p",{className:n.magicLinkTitle,children:"Sending sign-in link…"}),e.jsx("p",{className:n.magicLinkBody,children:"This only takes a moment."})]})]}):k?e.jsxs("div",{className:n.magicLinkPanelInner,children:[e.jsx("div",{className:n.magicLinkIconWrap,children:e.jsx(F,{size:20,"aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("p",{className:n.magicLinkTitle,children:"Check your inbox"}),e.jsxs("p",{className:n.magicLinkBody,children:["We sent a sign-in link to ",e.jsx("strong",{children:r.trim()}),". Open it to continue — it expires in about an hour."]})]})]}):e.jsxs("div",{className:n.magicLinkPanelInner,children:[e.jsx("div",{className:n.magicLinkIconWrap,children:e.jsx(F,{size:20,"aria-hidden":!0})}),e.jsxs("div",{children:[e.jsx("p",{className:n.magicLinkTitle,children:"Sign in with email"}),e.jsx("p",{className:n.magicLinkBody,children:"We’ll email a one-time link. No password needed."})]})]});return e.jsxs("div",{className:n.loginPage,children:[e.jsx(d.MojoIcon,{className:n.mojoWatermark,"aria-hidden":"true"}),e.jsx(ke,{title:"Account Access Issue",message:J,onDismiss:se,className:n.topErrorBanner}),e.jsxs("div",{className:n.signupContainer,children:[e.jsx("a",{href:"https://beagentive.com",target:"_blank",rel:"noopener noreferrer",className:n.learnMoreLink,children:e.jsx(_,{disableRipple:!0,className:n.learnMoreButton,children:"Learn More"})}),e.jsx(ue,{to:"#",className:n.signupLink,onClick:s=>{s.preventDefault(),f("/signup")},children:e.jsx(_,{disableRipple:!0,className:n.signupButton,children:"Sign Up"})})]}),e.jsxs("div",{className:n.loginRoot,children:[e.jsxs("div",{className:n.titleBlock,children:[e.jsx("img",{src:_e,alt:"Agentive",className:n.bannerLogo,draggable:!1}),e.jsx("p",{className:n.tagline,children:"Agentic AI GTM and Revenue Orchestration"})]}),e.jsxs("div",{className:n.loginForm,children:[e.jsx(V,{fullWidth:!0,variant:"outlined",name:"email",placeholder:"Your email address",value:r,onChange:s=>{M(s.target.value),j(null)},error:!!h||t,onBlur:re,className:n.emailField,InputProps:{startAdornment:e.jsx(B,{position:"start",children:e.jsx(d.UserIcon,{className:l(n.inputIcon,{[n.errorIcon]:!!h||t})})}),endAdornment:e.jsxs(B,{position:"end",children:[Z&&!h&&!t&&e.jsx("div",{className:n.activatedBadge,children:e.jsx(d.CheckmarkIcon,{className:n.checkIcon})}),(h||t)&&e.jsx("div",{className:n.errorBadge,children:e.jsx(d.CloseIcon,{className:n.PasswordErrorIcon})})]}),classes:{notchedOutline:l(n.notchedOutline,{[n.errorOutline]:!!h||t}),input:l(n.inputElement,{[n.errorInput]:!!h||t})}}}),u==="magic_link"&&e.jsx("div",{className:n.magicLinkPanel,role:"status","aria-live":"polite",children:oe()}),u==="password_flow"&&e.jsxs(e.Fragment,{children:[e.jsx(V,{fullWidth:!0,variant:"outlined",placeholder:"Password",type:y?"text":"password",name:"password",value:g,onChange:s=>{R(s.target.value),q(null)},error:!!p||t,className:n.passwordField,InputProps:{startAdornment:e.jsx(B,{position:"start",children:e.jsx(d.KeyIcon,{className:l(n.inputIcon,{[n.errorIcon]:!!p||t})})}),endAdornment:e.jsx(B,{position:"end",children:e.jsxs("div",{className:n.passwordIcon,children:[e.jsx(_,{className:n.passwordToggleButton,onClick:()=>ee(!y),children:y?e.jsx(d.ShowPasswordIcon,{className:n.toggleIcon}):e.jsx(d.HidePasswordIcon,{className:n.toggleIcon})}),(p||t)&&e.jsx("div",{className:n.errorBadge,children:e.jsx(d.CloseIcon,{className:n.PasswordErrorIcon})})]})}),classes:{notchedOutline:l(n.notchedOutline,{[n.errorOutline]:!!p||t}),input:l({[n.inputElement]:!0,[n.errorInput]:!!p||t})}}}),e.jsx("div",{className:n.errorWrapper,children:e.jsx("span",{className:n.generalError,style:{visibility:t?"visible":"hidden"},children:t||"Error"})})]})]}),u==="password_flow"&&e.jsxs("div",{className:n.loginFooter,children:[e.jsxs("div",{className:n.termsContainer,children:[e.jsx($,{id:"login-terms",checked:i,onChange:s=>W(s.target.checked),className:n.termsCheckbox,icon:e.jsx(Q,{className:n.termsCheckboxIcon}),checkedIcon:e.jsx(H,{className:n.termsCheckboxCheckedIcon})}),e.jsxs("label",{htmlFor:"login-terms",className:n.termsText,children:["By continuing, you agree to our"," ",e.jsx("a",{href:"https://beagentive.com/terms-and-conditions",target:"_blank",rel:"noopener noreferrer",className:n.termsLink,children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:"https://beagentive.com/privacy",target:"_blank",rel:"noopener noreferrer",className:n.termsLink,children:"Privacy Policy"})]})]}),e.jsxs("div",{className:n.loginActions,children:[e.jsx("div",{className:n.leftSide,children:e.jsx("button",{type:"button",className:n.forgetButton,onClick:ae,children:"forgot your password"})}),e.jsxs(_,{disableRipple:!0,disabled:!r||!g||!i||b,className:l(n.loginButton,{[n.disabled]:!r||!g||!i||b}),onClick:z,children:[b&&e.jsx(N,{size:16,className:n.buttonLoader}),"Login"]})]}),e.jsxs(_,{disableRipple:!0,disabled:!r.trim()||!i||c,className:l(n.magicLinkButton,{[n.disabled]:!r.trim()||!i||c}),title:A,onClick:S,children:[c?e.jsx(N,{size:16,className:n.buttonLoader}
1):e.jsx(F,{size:18,"aria-hidden":!0,className:n.magicLinkIcon}),e.jsx("span",{className:n.magicLinkLabel,children:"Sign in with magic link"})]})]}),u==="magic_link"&&e.jsxs("div",{className:n.loginFooter,children:[e.jsxs("div",{className:n.termsContainer,children:[e.jsx($,{id:"login-magic-terms",checked:i,onChange:s=>W(s.target.checked),className:n.termsCheckbox,icon:e.jsx(Q,{className:n.termsCheckboxIcon}),checkedIcon:e.jsx(H,{className:n.termsCheckboxCheckedIcon})}),e.jsxs("label",{htmlFor:"login-magic-terms",className:n.termsText,children:["By continuing, you agree to our"," ",e.jsx("a",{href:"https://beagentive.com/terms-and-conditions",target:"_blank",rel:"noopener noreferrer",className:n.termsLink,children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:"https://beagentive.com/privacy",target:"_blank",rel:"noopener noreferrer",className:n.termsLink,children:"Privacy Policy"})]})]}),e.jsxs("div",{className:n.loginActions,children:[e.jsx("div",{className:n.leftSide,children:e.jsx("button",{type:"button",className:n.forgetButton,onClick:()=>{P("password_flow"),T(!1)},children:"use password instead"})}),e.jsxs(_,{disableRipple:!0,disabled:!r||!i||c,className:l(n.loginButton,{[n.disabled]:!r||!i||c}),onClick:S,children:[c&&e.jsx(N,{size:16,className:n.buttonLoader}),k?"Resend sign-in link":"Send sign-in link"]})]})]})]})]})};export{In 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.