1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="d88d7d65-e819-eda8-cb74-e08e161514f1")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,298413,e=>{e.v({appbtn__container:"AppButton-module-scss-module__BAeQja__appbtn__container"})},676688,e=>{"use strict";var r=e.i(843476),s=e.i(464571),t=e.i(343794),i=e.i(298413);e.s(["default",0,function({children:e,type:o="primary",htmlType:n="submit",classes:a,style:l,isLoading:c,isDisabled:d,onClick:u}){return(0,r.jsx)(s.Button,{type:o,htmlType:n,style:l,className:(0,t.default)([i.default.appbtn__container,a]),loading:c,disabled:d,onClick:u,children:e})}])},843342,e=>{"use strict";var r=e.i(843476),s=e.i(428677),t=e.i(808613),i=e.i(311451);e.s(["default",0,function({label:e,name:o,placeholder:n,rules:a,classNames:l,addonBefore:c,onChangeHandler:d,dependencies:u}){return(0,r.jsx)(t.Form.Item,{hasFeedback:!0,label:e,name:o,dependencies:u,rules:a,validateTrigger:"onBlur",wrapperCol:{span:24,className:"flex"},rootClassName:l?.root,children:"password"!==o&&"oldPassword"!==o&&"newPassword"!==o&&"confirmPassword"!==o?(0,r.jsx)(i.Input,{classNames:l,placeholder:n,prefix:c,onChange:d}):(0,r.jsx)(i.Input.Password,{classNames:l,placeholder:"Enter your password",onChange:d,iconRender:e=>(0,r.jsx)("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:e?(0,r.jsx)(s.Icon,{icon:"ri:eye-line",color:"#323232",fontSize:20}):(0,r.jsx)(s.Icon,{icon:"ri:eye-off-line",color:"#323232",fontSize:20})})})})}])},966648,e=>{"use strict";var r=e.i(843476),s=e.i(947039),t=e.i(271645),i=e.i(657688),o=e.i(522016),n=e.i(618566),a=e.i(676688),l=e.i(843342),c=e.i(580304),d=e.i(464571);e.i(943329);var u=e.i(149065);function m(){let{signIn:e}=(0,c.useSession)(),s=async()=>{try{await e(u.SignInProviderTypes.APPLE)}catch(e){console.error("Apple sign-in error:",e)}};return(0,r.jsxs)(d.Button,{onClick:s,className:"flex min-h-12 w-full max-w-[300px] items-center justify-center gap-2 rounded-lg bg-black px-4 py-3 font-medium text-white transition-colors duration-200 hover:bg-gray-800",children:[(0,r.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91 1.09.03 2.04.64 2.7 1.51-2.35 1.39-1.98 4.99.4 5.91.9.35 1.96.31 2.95.16-.08.25-.16.5-.25.75zM13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),"Continue with Apple"]})}var g=e.i(428677),p=e.i(244783),h=e.i(50448),f=e.i(178654),x=e.i(312361),_=e.i(808613),b=e.i(621192),y=e.i(343794);e.i(488474);var w=e.i(566510),j=e.i(39839);e.i(411839);var v=e.i(953166),S=e.i(384773);function N(){let{signIn:e,status:s}=(0,c.useSession)(),[i,o]=(0,t.useState)(!1),n=async()=>{try{o(!0);let r=await e(u.SignInProviderTypes.GOOGLE);r.ok?console.log("Google OAuth initiated"):console.error("Google sign-in error:",r.error)}catch(e){console.error("Google sign-in error:",e)}finally{o(!1)}};return(0,r.jsxs)(d.Button,{onClick:n,loading:i,disabled:i||"loading"===s,className:"flex h-auto w-full items-center justify-center gap-2 rounded border-gray-400 py-2",children:[!i&&(0,r.jsx)(g.Icon,{icon:"flat-color-icons:google",fontSize:20}),"Continue with Google"]})}var E=e.i(693936),F=e.i(214576),I=e.i(226020);function P(){let{notification:e}=(0,p.useNotification)(),{setLoading:s}=(0,c.useSession)(),i=(0,t.useRef)(null),[o,n]=(0,t.useState)(0),[a,l]=(0,t.useState)(),[d,u]=(0,t.useState)();return(0,t.useEffect)(()=>{(async()=>{let[e,r]=await (0,F.generateNonce)();l(e),u(r)})()},[]),(0,t.useEffect)(()=>{let e=()=>{i.current&&n(i.current.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,r.jsx)("div",{ref:i,className:(0,y.default)([I.default.googleBtnContainer,"relative min-h-[55px] w-full"]),children:d&&o>0?(0,r.jsx)(E.GoogleLogin,{onSuccess:r=>{(async()=>{s();try{if(!r.credential){e.error({message:"Google Sign-In Failed",description:"No credential received from Google"}),s(!0);return}let{error:t}=await F.clientAuthService.signInWithGoogleOneTap(r.credential,a);if(t){e.error({message:"Google Sign-In Failed",description:t.message}),s(!0);return}e.success({message:"Success",description:"Signed in with Google"})}catch(r){console.error("Google sign-in error:",r),e.error({message:"Google Sign-In Failed",description:r.message||"An error occurred during sign-in"}),s(!0)}})()},onError:()=>{e.error({message:"Google Sign-In Failed",description:"Please try again"})}
2,nonce:d,theme:"outline",size:"large",width:o-10,text:"signin_with",shape:"rectangular"}):(0,r.jsx)(N,{})})}function k({onModalClose:e}){let j=(0,n.useSearchParams)(),E=(0,h.useDeviceInfo)(),{variant:F,setVariant:G}=(0,s.useAuthPopup)(),{executeRecaptcha:A}=(0,w.useReCaptcha)(),[B,L]=(0,t.useState)(!1),[D]=(0,t.useState)(!0),{notification:z}=(0,p.useNotification)(),[O,M]=(0,t.useState)(!1),{status:K,sendMagicLink:T}=(0,c.useSession)(),J=j.has("test-login")&&"true"===j.get("test-login"),U=(0,t.useCallback)(async e=>{if(await A(F).catch(e=>{z.error({message:"Error",description:e.message})})){L(!0);try{let r="signup"===F?e.first_name:void 0,s="signup"===F?e.last_name:void 0,t=await T(e.email,r,s);if(t.ok)M(!0),z.success({message:"Magic Link Sent",description:"Check your email for a login link. It may take a few minutes to arrive."});else{if(t.error?.includes("Signups not allowed for otp")){z.error({message:"Failed to send magic link",description:"Account does not exist Please enter your First and Last Name to create an account"}),G(v.SignupFlowVariant.SIGN_UP);return}z.error({message:"Error",description:t.error||"Failed to send magic link"})}}catch(e){z.error({message:"Error",description:e.message})}finally{L(!1)}}},[F,A,G,z,T]);return(0,r.jsxs)("div",{className:"h-full px-2 sm:px-0",children:[(0,r.jsxs)("div",{className:"relative flex justify-center py-4 sm:py-8",children:[(0,r.jsx)(i.default,{src:"https://cdn.buy.ca/static-content/assets/home/logo.png",alt:"logo",width:108,height:32}),(0,r.jsx)(d.Button,{onClick:e,className:"absolute right-4 top-1/2 h-10 w-10 min-w-10 -translate-y-1/2 rounded-full sm:right-8",type:"text",children:(0,r.jsx)(g.Icon,{icon:"radix-icons:cross-1",color:"#fff",fontSize:18})})]}),(0,r.jsxs)("div",{className:(0,y.default)([I.default.registration__card,"rounded-2xl border-[1px] border-[#E1E1E1] p-0 px-2.5 py-3 sm:px-[45px] sm:py-10"]),children:[(0,r.jsxs)("div",{className:"mb-8 flex flex-col items-center",children:[(0,r.jsxs)("h1",{className:"mb-1 text-center text-[23px] font-bold text-[#363636] sm:mb-2.5 sm:text-[31px]",children:["signup"===F?"Sign up":"Log in"," to your account"]}),(0,r.jsx)("p",{className:"text-center text-xs font-normal text-[#666666] sm:text-sm",children:"Log in to unlock the full potential of the Buy.ca platform, including 21 years of property history data, AI-powered visual and voice search, and many other advanced features."})]}),(0,r.jsxs)("div",{className:"flex w-full flex-col items-center justify-center gap-4",children:[(E.isIos||E.isMacOs||J)&&(0,r.jsx)(m,{}),(J||["development","localhost"].includes(S.env.APP_ENV))&&(0,r.jsx)(N,{}),(0,r.jsx)(P,{})]}),(0,r.jsx)(x.Divider,{className:`${I.default.card__divider} my-0 !py-4 sm:!py-6`,children:"or"}),(0,r.jsxs)(_.Form,{initialValues:"signup"!==F?{remember:!0}:{},onFinish:U,onFinishFailed:e=>{z.error({message:"Error",description:String(e)})},layout:"vertical",className:(0,y.default)([I.default.registration__form]),children:["signup"===F&&(0,r.jsxs)(b.Row,{gutter:16,children:[(0,r.jsx)(f.Col,{span:12,children:(0,r.jsx)(l.default,{classNames:{input:"shadow-none min-h-[38px]"},label:"First name",name:"first_name",placeholder:"Enter your First Name",rules:[{required:!0,message:"Please input your First Name!"}]})}),(0,r.jsx)(f.Col,{span:12,children:(0,r.jsx)(l.default,{classNames:{input:"shadow-none min-h-[38px]"},label:"Last name",name:"last_name",placeholder:"Enter your Last Name",rules:[{required:!0,message:"Please input your Last Name!"}]})})]}),(0,r.jsx)(l.default,{classNames:{input:"!bg-white !border-none shadow-none min-h-[38px]"},label:"Email address",name:"email",placeholder:"Enter your email",rules:[{required:!0,message:"Please input your email address or username!"}]}),(0,r.jsx)(_.Form.Item,{className:"!mb-0 mt-6",children:O&&D?(0,r.jsx)(C,{onFinish:()=>M(!1)}):(0,r.jsx)(a.default,{classes:"!h-auto !px-5 !py-3 border-b-none",isDisabled:B||K===u.AuthStatus.LOADING,isLoading:B||K===u.AuthStatus.LOADING,children:D?"Send Magic Link":"signup"!==F?"Sign In":"Create Account"})})]}),(0,r.jsxs)("h3",{className:I.default.info__txt,children:["signup"!==F?"Donât have an account":"Already have an account","?"," ",(0,r.jsx)("span",{onClick:()=>{G(F===v.SignupFlowVariant.SIGN_UP?v.SignupFlowVariant.SIGN_IN:v.SignupFlowVariant.SIGN_UP)},children:F!==v.SignupFlowVariant.SIGN_UP?"Sign up":"Sign in"})]}),(0,r.jsxs)("p",{className:"mt-3 text-center text-xs",children:["By signing up for a Buy.ca account you agree to"," ",S.env.NEXT_PUBLIC_APP_NAME,"'s"," ",(0,r.jsx)(o.default,{href:"/terms-of-service",className:"text-blue-500 hover:underline",target:"_blank",children:"Terms of Use"})," and  ",(0,r.jsx)(o.default,{href:"/privacy-policy",className:"text-blue-500 hover:underline",target:"_blank",children:"Privacy Policy"}),", as well as those of our partners, subsidiaries and brokerage that we operate within."]})]})]})}function C({onFinish:e}){let[s,{startCountdown:i,stopCountdown:n,resetCountdown:a}]=(0,j.useCountdown)({countStart:30,countStop:0,intervalMs:1e3});return(0,t.useEffect)(()=>(i(),()=>{n(),a()}),[]),(0,t.useEffect)(()=>{0===s&&e()},[s]),(0,r.jsxs)("div",{className:"flex w-full flex-col items-center justify-center gap-4 roun
2ded-lg border border-solid border-[#E1E1E1] bg-[#F9FAFB] px-4 py-6",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 min-w-12 items-center justify-center rounded-full bg-[#ECFDF5]",children:(0,r.jsx)(g.Icon,{icon:"fluent:mail-unread-28-regular",fontSize:24,color:"#2C6E4A"})}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,r.jsx)("h3",{className:"text-base font-bold text-[#363636] sm:text-lg",children:"Magic Link Sent"}),(0,r.jsx)("p",{className:"max-w-[280px] text-xs font-normal text-[#666666] sm:text-sm",children:"Check your email for a login link. It may take a few minutes to arrive."})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-white px-4 py-2",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-[#666666]",children:"Resend in"}),(0,r.jsxs)("span",{className:"text-sm font-bold text-[#363636]",children:[`${s<10?"0":""}${s}`,"s"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(o.default,{href:"https://mail.google.com",target:"_blank",className:"flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-[#E3E3E3] bg-white transition-colors hover:border-primary hover:bg-[#EAF0ED]",title:"Open Gmail",children:(0,r.jsx)(g.Icon,{icon:"mdi:gmail",fontSize:20,color:"#EA4335"})}),(0,r.jsx)(o.default,{href:"https://outlook.live.com",target:"_blank",className:"flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-[#E3E3E3] bg-white transition-colors hover:border-primary hover:bg-[#EAF0ED]",title:"Open Outlook",children:(0,r.jsx)(g.Icon,{icon:"mdi:microsoft-outlook",fontSize:20,color:"#0078D4"})}),(0,r.jsx)(o.default,{href:"https://mail.yahoo.com",target:"_blank",className:"flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-[#E3E3E3] bg-white transition-colors hover:border-primary hover:bg-[#EAF0ED]",title:"Open Yahoo Mail",children:(0,r.jsx)(g.Icon,{icon:"mdi:yahoo",fontSize:20,color:"#6001D2"})}),(0,r.jsx)(o.default,{href:"https://www.icloud.com/mail",target:"_blank",className:"flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-[#E3E3E3] bg-white transition-colors hover:border-primary hover:bg-[#EAF0ED]",title:"Open iCloud Mail",children:(0,r.jsx)(g.Icon,{icon:"ic:baseline-apple",fontSize:20,color:"#555555"})}),(0,r.jsx)(o.default,{href:"https://mail.proton.me",target:"_blank",className:"flex h-10 w-10 items-center justify-center rounded-lg border border-solid border-[#E3E3E3] bg-white transition-colors hover:border-primary hover:bg-[#EAF0ED]",title:"Open ProtonMail",children:(0,r.jsx)(g.Icon,{icon:"simple-icons:protonmail",fontSize:18,color:"#6D4AFF"})})]})]})}var G=e.i(608856);e.s(["default",0,function(){let{isPopupOpen:e,showHidePopup:t,setIsAuthPopupOpen:i}=(0,s.useAuthPopup)();return(0,r.jsx)(G.Drawer,{title:"Basic Drawer",onClose:()=>{t()},open:e,placement:"top",destroyOnHidden:!0,height:"100%",zIndex:1500,classNames:{body:"p-0 bg-white",header:"hidden"},children:(0,r.jsx)(k,{onModalClose:()=>i({status:!1,variant:v.SignupFlowVariant.SIGN_UP})})})}],966648)},678109,function(e){e.n(e.i(966648))},226020,e=>{e.v({brand__container:"signupFlow-module-scss-module__PKJSrG__brand__container",card__divider:"signupFlow-module-scss-module__PKJSrG__card__divider",card__title:"signupFlow-module-scss-module__PKJSrG__card__title",googleBtnContainer:"signupFlow-module-scss-module__PKJSrG__googleBtnContainer",hereImage:"signupFlow-module-scss-module__PKJSrG__hereImage",info__txt:"signupFlow-module-scss-module__PKJSrG__info__txt",registration__card:"signupFlow-module-scss-module__PKJSrG__registration__card",registration__form:"signupFlow-module-scss-module__PKJSrG__registration__form",socail__bt
2n:"signupFlow-module-scss-module__PKJSrG__socail__btn"})}]); 3 4//# debugId=d88d7d65-e819-eda8-cb74-e08e161514f1
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.