PageSourceSearch

https://studypod.app/_next/static/chunks/app/(dashboard)/login/page-cb2a0cb2fb1aa108.js

js studypod.app collected 2026-09-24 14:33:09 UTC 13,131 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{73139:function(e,t,n){Promise.resolve().then(n.bind(n,24934)),Promise.resolve().then(n.bind(n,41735))},27648:function(e,t,n){"use strict";n.d(t,{default:function(){return r.a}});var s=n(72972),r=n.n(s)},24934:function(e,t,n){"use strict";n.d(t,{LoginPageForm:function(){return i}});var s=n(57437),r=n(6011),a=n(2265),l=n(43549),c=n(99376);function i(e){let{}=e,t=(0,l.$)(),n=(0,c.useRouter)();return(0,a.useEffect)(()=>{if(t)return n.refresh()},[n,t]),(0,s.jsx)(r.U,{})}},87759:function(e,t,n){"use strict";n.d(t,{Z:function(){return i},g:function(){return r}});var s,r,a=n(57437);n(2265);var l=n(53335);function c(e){let{type:t,children:n,className:s,...r}=e;switch(t){case"hero":return(0,a.jsx)("h1",{className:(0,l.m6)("font-hero text-3xl my-2 text-secondary font-bold ".concat(s||""," ")),...r,children:n});case"h1":return(0,a.jsx)("h1",{className:(0,l.m6)("text-2xl my-1 text-secondary font-hero font-bold ".concat(s||"")),...r,children:n});case"h2":return(0,a.jsx)("h2",{className:(0,l.m6)("font-hero text-xl text-secondary font-bold ".concat(s||"")),...r,children:n});case"h3":return(0,a.jsx)("h3",{className:(0,l.m6)("text text-secondary font-body font-bold ".concat(s||"")),...r,children:n});case"p":return(0,a.jsx)("p",{className:(0,l.m6)("font-body text-secondary font-small ".concat(s||"")),...r,children:n});case"footer":return(0,a.jsx)("p",{className:(0,l.m6)("font-body text-xs text-secondary font-small ".concat(s||"")),...r,children:n});case"span":return(0,a.jsx)("span",{className:(0,l.m6)("text-sm text-secondary font-body ".concat(s||"")),children:n});case"link":return(0,a.jsx)("p",{className:(0,l.m6)("text underline text-link ".concat(s||"")),...r,children:n});default:return(0,a.jsx)("span",{className:(0,l.m6)("text-sm text-secondary ".concat(s||"")),...r,children:n})}}(s=r||(r={})).H1="h1",s.H2="h2",s.H3="h3",s.HERO="hero",s.P="p",s.FOOTER="footer",s.LINK="link",s.SPAN="span";let i=e=>{let{...t}=e;return(0,a.jsx)(c,{...t})}},49467:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var s=n(57437),r=n(87759);n(2265);var a=n(53335);function l(e){let{onClick:t,containerClassName:n,className:l,children:c,...i}=e;return(0,s.jsx)("button",{onClick:t,className:n,children:(0,s.jsx)(r.Z,{type:r.g.LINK,className:(0,a.m6)("underline",l),...i,children:c})})}},43549:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var s=n(80605);function r(){var e;let{data:t}=(0,s.useSession)();return null==t?void 0:null===(e=t.user)||void 0===e?void 0:e.sub}},6011:function(e,t,n){"use strict";n.d(t,{U:function(){return R}});var s=n(57437),r=n(87759),a=n(2265),l=n(93253),c=n(27648);let i=()=>(0,s.jsxs)("div",{className:"flex flex-col mt-3",children:[(0,s.jsx)(r.Z,{type:r.g.FOOTER,className:"text-center mt-5",children:"By signing up, you agree to our"}),(0,s.jsxs)("div",{className:"flex flex-row self-center",children:[(0,s.jsx)(c.default,{href:l.ms,children:(0,s.jsx)(r.Z,{className:"font-bold underline",type:r.g.FOOTER,children:"Terms of Service"})}),(0,s.jsx)("span",{className:"w-1"}),(0,s.jsx)(r.Z,{type:r.g.FOOTER,children:"and"}),(0,s.jsx)("span",{className:"w-1"}),(0,s.jsx)(c.default,{href:l.sH,target:"_blank",children:(0,s.jsx)(r.Z,{className:"font-bold underline",type:r.g.FOOTER,children:"Privacy Policy"})})]})]});var o=n(80605),u=n(60399),A=n(74900),d=n(33145);let x=e=>{let{connection:t}=e,l=n(77246),c=(0,a.useCallback)(()=>{(0,o.signIn)("apple")},[]),i=(0,a.useCallback)(()=>{(0,o.signIn)("google")},[]);switch(t){case"apple":return(0,s.jsx)("button",{onClick:c,className:"rounded-full bg-secondary block px-10 py-3 w-[300px]",children:(0,s.jsxs)("div",{className:"row flex items-center justify-center",children:[(0,s.jsx)(u.W,{icon:A.l.Apple,className:"pr-5 text-primary text-2xl"}),(0,s.jsx)(r.Z,{className:"text-primary font-bold",children:"Continue with Apple"})]})});case"google-oauth2":return(0,s.jsx)("button",{onClick:i,className:"rounded-full bg-primary block px-10 py-3 w-[300px]",children:(0,s.jsxs)("div",{className:"row flex items-center justify-center",children:[(0,s.jsx)(d.default,{src:l,alt:"Google image",width:40,height:40,className:"pr-4"}),(0,s.jsx)(r.Z,{className:"text-secondary font-bold",children:"Continue with Google"})]})});default:return null}};n(28356),n(13421);var h=n(29501),m=n(56741),p=n(13590),f=n(31229),g=n(30341);let y=(0,f.Ry)({phone:f.ZP.preprocess(g.g,f.ZP.string().nonempty({message:"Phone cannot be empty"}))});function b(e){let{onSuccess:t}=e,{handleSubmit:n,formState:{errors:r},control:l}=(0,h.cI)({resolver:(0,p.F)(y)}),c=(0,a.useCallback)(async e=>{try{await (0,o.signIn)("sms",{redirect:!1,phone:e.phone},{phone:e.phone}),t(e.phone)}catch(e){console.error(e)}},[t]);return(0,s.jsxs)("form",{className:"relative",onSubmit:n(c),children:[(0,s.jsx)(h.Qr,{name:"phone",control:l,rules:{required:!0},render:e=>
1{let{field:{onChange:t,value:n}}=e;return(0,s.jsx)(m.ZP,{international:!0,defaultCountry:"GB",value:n,id:"phone",onChange:t})}}),r.phone&&(0,s.jsx)("span",{className:"text-secondary",children:"This field is required"}),(0,s.jsx)("button",{className:"bg-secondary text-sm text-primary py-1 px-2 rounded-2xl absolute top-2.5 right-2",type:"submit",children:"Submit"})]})}var j=n(49467);let N=["0","1","2","3"];function v(e){let{onSendCode:t,phoneNumber:n,onShow:l}=e,[c,i]=(0,a.useState)({input0:"",input1:"",input2:"",input3:""}),o=(0,a.useRef)([]);(0,a.useEffect)(()=>{c.input0&&c.input1&&c.input2&&c.input3&&t("".concat(c.input0).concat(c.input1).concat(c.input2).concat(c.input3))},[c,t,n]);let u=(0,a.useCallback)((e,t)=>{var n,s,r,a,l,c;switch(t){case 0:i(t=>({...t,input0:e.target.value})),e.target.value.length&&(i(e=>({...e,input1:""})),null===(s=o.current)||void 0===s||null===(n=s[1])||void 0===n||n.focus());break;case 1:i(t=>({...t,input1:e.target.value})),e.target.value.length&&(i(e=>({...e,input2:""})),null===(a=o.current)||void 0===a||null===(r=a[2])||void 0===r||r.focus());break;case 2:i(t=>({...t,input2:e.target.value})),e.target.value.length&&(i(e=>({...e,input3:""})),null===(c=o.current)||void 0===c||null===(l=c[3])||void 0===l||l.focus());break;case 3:i(t=>({...t,input3:e.target.value}));break;default:return null}},[]);return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex justify-center items-center",children:N.map((e,t)=>(0,s.jsx)("input",{ref:e=>o.current[t]=e,maxLength:1,value:c["input".concat(e)],onFocus:e=>e.target.select(),onChange:e=>u(e,t),className:"text-secondary w-16 h-16 border-2 border-gray-300 mx-1 focus:outline-none focus:border-gray text-center text-2xl font-bold"},e))}),(0,s.jsx)(j.A,{onClick:l,className:"text-center text-secondary block",containerClassName:"my-2 block w-full"}),(0,s.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,s.jsx)(r.Z,{children:"If your co
1de is not delivered for any reason,"}),(0,s.jsx)(r.Z,{className:"text-bold underline text-secondary text-center",type:r.g.FOOTER,children:"Send us email on: [email protected]"})]})]})}function w(){let[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(""),[l,c]=(0,a.useState)(null),i=(0,a.useCallback)(e=>{t(!0),r(e)},[]),u=(0,a.useCallback)(()=>{t(!1)},[]),A=(0,a.useCallback)(async e=>{c(null);try{let t=await (0,o.signIn)("sms",{redirect:!1,phone:n,code:e,callbackUrl:"".concat("https://dashboard.studypod.app","/home")},{phone:n,code:e});(null==t?void 0:t.ok)||c("Sign-in failed. Please check the code and try again.")}catch(e){console.error("handleSendCode",e),c("An error occurred during sign-in.")}},[n]);return(0,s.jsxs)("div",{children:[e?(0,s.jsx)(v,{onSendCode:A,phoneNumber:n,onShow:u}):(0,s.jsx)(b,{onSuccess:i}),l&&(0,s.jsx)("p",{className:"text-center text-warning pt-2",children:l})]})}n(89023);let C=(0,f.Ry)({email:f.ZP.preprocess(g.g,f.ZP.string().nonempty({message:"Email cannot be empty"}))});function S(e){let{onSuccess:t}=e,{handleSubmit:n,register:r,formState:{errors:l,isSubmitting:c,isValid:i},reset:u,setFocus:A,control:d}=(0,h.cI)({resolver:(0,p.F)(C)}),x=(0,a.useCallback)(async e=>{try{await (0,o.signIn)("email",{redirect:!1,email:e.email},{email:e.email}),t(e.email)}catch(e){console.error(e)}},[t]);return(0,s.jsxs)("form",{className:"bg-primary p-2 px-2 rounded-full w-[300px] flex",onSubmit:n(x),children:[(0,s.jsx)("input",{placeholder:"Email",className:"bg-primary px-2 py-1 rounded-2xl text-secondary placeholder-secondary-400 w-full",type:"text",...r("email")}),l.email&&(0,s.jsx)("span",{className:"text-secondary",children:"This field is required"}),(0,s.jsx)("button",{className:"bg-secondary text-sm text-primary px-2 rounded-2xl py-1",type:"submit",children:"Submit"})]})}var k=n(99376);function E(){let[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(""),[l,c]=(0,a.useState)(null);(0,k.useRouter)();let i=(0,a.useCallback)(e=>{t(!0),c(null),r(e)},[]),u=(0,a.useCallback)(()=>{t(!1)},[]),A=(0,a.useCallback)(async e=>{c(null);
1try{let t=await (0,o.signIn)("email",{redirect:!1,email:n,code:e,id:"email",callbackUrl:"".concat("https://dashboard.studypod.app","/home")});(null==t?void 0:t.ok)||c("Sign-in failed. Please check the code and try again.")}catch(e){console.error(e),c("An error occurred during sign-in.")}},[n]);return(0,s.jsxs)("div",{children:[e?(0,s.jsx)(v,{onSendCode:A,phoneNumber:n,onShow:u}):(0,s.jsx)(S,{onSuccess:i}),l&&(0,s.jsx)("p",{className:"text-warning text-center pt-2",children:l})]})}function R(){return(0,s.jsxs)("div",{className:"h-auto w-full bg-playground justify-center flex flex-col gap-4 flex-1 p-4 rounded-3xl",children:[(0,s.jsxs)("div",{className:"p-4 rounded-3xl",children:[(0,s.jsx)(r.Z,{type:r.g.HERO,className:"text-center leading-4",children:"Sign up or Log in"}),(0,s.jsx)(r.Z,{type:r.g.P,className:"text-center pt-2",children:"We got you"})]}),(0,s.jsxs)("div",{className:"gap-3 flex flex-col items-center",children:[(0,s.jsx)(x,{connection:"apple"}),(0,s.jsx)(x,{connection:"google-oauth2"}),(0,s.jsx)(E,{}),(0,s.jsx)(r.Z,{type:r.g.H2,className:"text-center",children:"or"}),(0,s.jsx)(w,{})]}),(0,s.jsx)(i,{})]})}},41735:function(e,t,n){"use strict";n.d(t,{StartJourney:function(){return i}});var s=n(57437),r=n(33145);n(2265);let a={images:{emptyDecksList:n(57505),faces:n(19789),defaultProfileImage:n(60497)}};var l=n(87759);let{faces:c}=a.images;function i(){return(0,s.jsxs)("div",{className:"hidden sm:flex h-auto w-auto md:h-full md:w-full justify-center flex-col bg-primary flex-1",children:[(0,s.jsx)(r.default,{src:c,alt:"Login",className:"self-center w-2/3"}),(0,s.jsx)("span",{className:"h-5"}),(0,s.jsx)(l.Z,{type:l.g.HERO,className:"text-center text-2xl",children:"Start your journey with us"})]})}},93253:function(e,t,n){"use strict";n.d(t,{ms:function(){return s},sH:function(){return r}});let s="https://studypod.app/terms.html",r="https://studypod.app/privacy.html"},30341:function(e,t,n){"use strict";function s(e){return"string"==typeof e?e.trim():e}n.d(t,{g:function(){return s}})},89023:function(){},13421:function(){},77246:function(e,t,n){"use strict";n.r(t),t.default={src:"/_next/static/media/google.85789975.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAclBMVEVMaXEje+4seu7/UQAcevwIvGD/DwCCjIT1Ng8rdegRp20Ax2H+3QAAuF//DgD/DAC9M0j/DwAAxGTi1w0se+v9ywPf2w7/SwAAxWD/yQD/UQAArGj/VgAjgtQArGEjf88A2WhC3lAHr4X/fwAxgP//XgCJ971rAAAAIHRSTlMA4vrmNCz8BzLiEeb5sVq0I+KL6q3qq4v6q/r6sejilsKzlk0AAAAJcEhZcwAACxMAAAsTAQCanBgAAABGSURBVHicBcEFAsAgDASwgwFtkbm7/v+LSwBeZ1cwwNmXVS4HpmegkokQOzJKiSA2ZES0Rn/V3h9vCxvOsN+bAWwal2TxA3HCA1vFxV5dAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},60497:function(e,t,n){"use strict";n.r(t),t.default={src:"/_next/static/media/defaultProfileImage.e1595cd5.png",height:512,width:512,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAGFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWNxwqAAAACHRSTlOKAZYXMkImgiPAdmcAAAAJcEhZcwAADyoAAA8qAd4tywgAAAAySURBVHicJcqxDcAADMMwyU7S/z8uim4ciJOEkUu1GZ5RPcBrzw/b7odusgeLf3YDjC8WNACXOpCiMAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},57505:function(e,t,n){"use strict";n.r(t),t.default={src:"/_next/static/media/emptyState.6bd77791.png",height:274,width:253,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAASFBMVEV9d3f09PSmpabp6em+g2scGRrVztUSEhInIybv7+/T0tMeGRqze2YlISJjY2PNjHBDP0H29vZzcHCDgYHl5eWkoaEWERNeW1xMGI44AAAAF3RSTlMBpVS3toQRCxjW5cB6sUVmdXzQp6fx8WEklhkAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA8SURBVHicJcpJFoAgDMDQMEhbUAEHuP9NfWo2fxNE+OuXc7uSQra7CRrMsgfxxzwToGUs76dl+6xxjfAAMI8BfuBDrPAAAAAASUVORK5CYII=",blurWidth:7,blurHeight:8}},19789:function(e,t,n){"use strict";n.r(t),t.default={src:"/_next/static/media/faces.8c482ee7.png",height:721,width:723,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAIVBMVEUAAAARDQ0dGhoBAQEAAAACAgJFQ0MBAQEAAAAAAABubm4VVGGJAAAAC3RSTlMBDxoijUcwnzJ9WERwmGcAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA1SURBVHicHcvJEcAwDMNAkJTko/+CMw72DYCYV1WPLbRWzR2TypYN+8g5CyQpO6DI3e/Sjw8afQCt+GN3pQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}}},function(e){e.O(0,[8636,3335,8197,2972,605,3145,6663,1555,4105,2971,2117,1744],function(){return e(e.s=73139)}),_N_E=e.O()}]);

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.