PageSourceSearch

https://app.apilayer.com/assets/Login-_NXJs08j.js

js apilayer.com collected 2026-10-02 17:14:43 UTC 7,050 bytes, 1 lines download raw bytes

1import{m as z,a as D,r as d,_ as H,j as e,B as a,T as s,n as m,E as h,F as k,t as B,s as F,ai as W,I as V,aj as _,ak as q,af as E,a1 as $,J as f,aq as J,ar as U,bp as X,bq as Y}from"./index-ZVevB0tA.js";import{A as K,L as x}from"./AuthHeader-fWqFlFpD.js";import{S as Q,a as Z}from"./github-DXGosNq-.js";const oo=z(o=>({root:{height:"100vh",width:"100vw",padding:"24px 0",overflowY:"auto",overflowX:"hidden",background:"radial-gradient(60% 50% at bottom center,rgba(92, 159, 249, 0.78) 0%, #EEF1F4 100%)",[o.breakpoints.down("md")]:{padding:"19px 16px 27px",background:"#F5F7FB"}},loginBox:{width:"438px",border:"1px solid #E4EBEF",background:o.palette.common.white,color:o.palette.navy[500],borderRadius:"8px",padding:"24px",margin:"100px auto 0",[o.breakpoints.down("md")]:{width:"100%",margin:"38px auto 0"}},TopBoxBtns:{display:"flex",flexDirection:"column",gap:"24px","& h2":{fontFamily:"OpenSauceOne-Bold"}},signInBtns:{display:"flex",gap:"24px",paddingRight:"15px",[o.breakpoints.down("md")]:{flexDirection:"column",gap:16,paddingRight:0},"& button":{height:"40px",fontFamily:"Inter-SemiBold",fontSize:"12px",width:"calc((100% - 24px) / 2)",textTransform:"none",borderRadius:"4px",outline:"none",gap:"8px",letterSpacing:"0px",[o.breakpoints.down("md")]:{width:"100%"},"& .MuiButton-startIcon":{marginRight:"0px"},"&:nth-child(1)":{background:"#212528 !important",color:o.palette.common.white},"&:nth-child(2)":{border:"1px solid #747775",color:"#1f1f1f",background:o.palette.common.white}}},form:{"& .MuiFormControl-root:nth-child(1)":{marginBottom:"16px"}},formControl:{width:"100%",display:"flex",gap:"4px","& label":{fontFamily:"OpenSauceOne-Medium",fontSize:"13px",color:o.palette.navy[500]},"& .MuiInputBase-formControl":{border:`1px solid ${o.palette.navy[200]}`,borderRadius:"4px",height:"40px","& input":{fontFamily:"OpenSauceOne-Regular",fontSize:"12px",padding:" 0px 8px",color:o.palette.navy[500],caretColor:o.palette.blue[500],"&::placeholder":{color:o.palette.navy[300],opacity:1},"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #fff inset",WebkitTextFillColor:o.palette.navy[500],transition:"background-color 9999s ease-in-out 0s"}},"& fieldset":{display:"none"},"& .MuiInputAdornment-root button":{padding:"0px","& svg":{width:"16px",height:"16px",color:o.palette.navy[300]},"&:focus":{outline:"none"}},"&.Mui-focused":{borderColor:o.palette.blue[500]}}},loginBtnBox:{marginTop:"24px",display:"flex",flexDirection:"column",gap:"3px","& h6":{fontSize:"12px",color:"#00000",textAlign:"center"}},Link:{"&.MuiLink-root":{textDecoration:"none",fontSize:"12px",color:o.palette.blue[500],fontFamily:"OpenSauceOne-Bold"}},legalText:{"&.MuiTypography-root":{margin:"auto",marginBottom:"11px",textAlign:"center",fontSize:"11px",color:o.palette.navy[400],fontFamily:"OpenSauceOne-Medium",letterSpacing:"-0.2px"}},link:{"&.MuiLink-root":{textDecoration:"underline",fontSize:"11px",color:o.palette.blue[400],fontFamily:"OpenSauceOne-Medium"}},logInBtn:{"&.MuiButton-root":{height:"40px",borderRadius:"4px",textTransform:"capitalize",backgroundColor:o.palette.blue[500],color:o.palette.common.white,"&.Mui-disabled":{color:"#D9E7F7",background:"#A1C4F1"},"&:focus":{outline:"none"}}},errorPlaceholderBox:{minHeight:"32px"},topErrorRow:{display:"flex",alignItems:"top",gap:"4px",color:o.palette.red[500],minHeight:"32px",margin:"16px 0px",borderRadius:"4px",background:"#FEE1E2",padding:"8px","& svg":{fontSize:"16px"},"& a":{color:o.palette.red[500],textDecorationColor:"red"},"& h5":{fontSize:"12px"}},errorRow:{display:"flex",alignItems:"center",gap:"4px",color:o.palette.red[500],"& svg":{fontSize:"16px"},"& h5":{fontSize:"12px"}}}));function no(){const o=oo(),{login:v,loginWithGoogle:I,loginWithGithub:L}=D(),[l,R]=d.useState(!1),[p,r]=d.useState(""),[g,b]=d.useState(!1),[u,w]=d.useState(!1),{register:y,handleSubmit:N,setError:O,watch:j,formState:{errors:t,isSubmitting:c}}=H({mode:"onTouched",resolver:$(Y),defaultValues:{email:"",password:""}}),C=j("email"),M=j("password");d.useEffect(()=>{p&&r("")},[C,M]);const T=async i=>{try{r(""),await v(i.email,i.password)}catch(n){if(n instanceof J){const S=U(n,O);S&&r(S);return}const P=f(n);n instanceof X?r(n.message):r(P.message||"An error occurred. Please try again.")}},A=async()=>{try{r(""),b(!0),await I()}catch(i){b(!1);const n=f(i);r(n.message||"Failed to initiate Google login. Please try again.")}},G=async()=>{try{r(""),w(!0),await L()}catch(i){w(!1);const n=f(i);r(n.message||"Failed to initiate GitHub login. Please try again.")}};return e.jsxs(a,{className:o.root,children:[e.jsx(K,{}),e.jsxs(a,{className:o.loginBox,children:[e.jsxs(a,{className:o.TopBoxBtns,children:[e.jsx(s,{variant:"h2",children:"Welcome to APILayer"}
1),e.jsxs(a,{className:o.signInBtns,children:[e.jsx(m,{disableRipple:!0,startIcon:e.jsx(Q,{}),onClick:G,disabled:c||g||u,children:u?"Redirecting...":"Sign in with GitHub"}),e.jsx(m,{disableRipple:!0,startIcon:e.jsx(Z,{}),onClick:A,disabled:c||g||u,children:g?"Redirecting...":"Sign in with Google"})]})]}),e.jsx(a,{className:o.errorPlaceholderBox,children:p&&e.jsxs(a,{className:o.topErrorRow,role:"alert",children:[e.jsx(h,{}),e.jsx(s,{variant:"h5",component:"span",children:p})]})}),e.jsxs("form",{className:o.form,onSubmit:N(T),children:[e.jsxs(k,{className:o.formControl,children:[e.jsx(B,{htmlFor:"emailField",children:"Email"}),e.jsx(F,{type:"email",id:"emailField",placeholder:"Enter email",error:!!t.email,...y("email")}),t.email&&e.jsxs(a,{className:o.errorRow,role:"alert",children:[e.jsx(h,{}),e.jsx(s,{variant:"h5",children:t.email.message})]})]}),e.jsxs(k,{className:o.formControl,children:[e.jsx(B,{htmlFor:"passwordField",children:"Password"}),e.jsx(F,{type:l?"text":"password",id:"passwordField",placeholder:"Enter password",error:!!t.password,...y("password"),InputProps:{endAdornment:e.jsx(W,{position:"end",children:e.jsx(V,{disableTouchRipple:!0,onClick:()=>R(!l),"aria-label":l?"Hide password":"Show password","aria-pressed":l,children:l?e.jsx(_,{}):e.jsx(q,{})})})}}),t.password&&e.jsxs(a,{className:o.errorRow,role:"alert",children:[e.jsx(h,{}),e.jsx(s,{variant:"h5",children:t.password.message})]})]}),e.jsx(a,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center"},children:e.jsx(x,{component:E,to:"/forgot-password",className:o.Link,sx:{display:"inline-block"},children:"Forgot Password?"})}),e.jsxs(a,{className:o.loginBtnBox,children:[e.jsx(m,{type:"submit",disableRipple:!0,className:o.logInBtn,disabled:c||!!p,children:c?"Logging in...":"Login"}),e.jsxs(s,{component:"p",className:o.legalText,children:["By continuing, you agree to our"," ",e.jsx(x,{href:"https://www.ideracorp.com/Legal/Terms-of-Use",target:"_blank",rel:"noopener noreferrer",className:o.link,children:"Terms"})," and ",e.jsx(x,{href:"https://www.ideracorp.com/legal/APILayer",target:"_blank",rel:"noopener noreferrer",className:o.link,children:"Privacy Policy"})]}),e.jsxs(s,{variant:"h6",children:["Don't have an account?"," ",e.jsx(x,{className:o.Link,component:E,to:"/signup",children:"Sign up"})]})]})]})]})]})}export{no 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.