PageSourceSearch

https://www.policyadvisor.com/static/contact_details-DNol10ka.js

js policyadvisor.com collected 2026-09-25 04:30:43 UTC 16,586 bytes, 1 lines download raw bytes

1import{M as N}from"./main_layout-CLva1cEV.js";import{F as q}from"./Field-Ck27gdWV.js";import{_ as x,aj as L,ah as U,I as T,cP as A,d1 as B,B as M,l as R,d2 as W,r as d,o as m,c as S,w as I,b as a,h as r,g as _,d as g,e as f,n as v,k as j,t as H,cS as u,cT as c,d3 as y,cU as z,cR as K,d4 as E,d5 as Y,d6 as G,d7 as J,x as C,D as Q,y as X,al as Z}from"./index-tRSMm6rk.js";import{L as $}from"./label_with_info_icon-Di0voml9.js";import{L as ee}from"./liquidLayout-Cqa74TXC.js";import"./authorization-DOJV-u7N.js";import"./TextBelowField-BmNy7MDJ.js";import"./protipIcon-BINqbVix.js";import"./progress_bar-Di8EYnV7.js";import"./insurance_progress_bar-DO6KSx8x.js";import"./Button-HGhA6WZ2.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="aef7eddc-3a2e-409a-9f19-0e6b430592b2",t._sentryDebugIdIdentifier="sentry-dbid-aef7eddc-3a2e-409a-9f19-0e6b430592b2")}catch{}})();var F={PRIVACY_URL:"/privacy-policy/",TERMS_URL:"/terms-of-service/"};const te={name:"ContactDetails",mixins:[W],setup(){const{honeypotValue:t,honeypotError:e,guardAgainstBot:o,honeypotPayload:n}=Z();return{honeypotValue:t,honeypotError:e,guardAgainstBot:o,honeypotPayload:n}},components:{LiquidLayout:ee,BaseMask:R,LabelWithInfoIcon:$,BaseInput:M,Field:q,MainLayout:N,PhoneNumber:B,OtpField:A,Form:T,HoneypotField:U,HoneypotError:L},data(){return{first_name:localStorage.getItem("first_name")||"",last_name:localStorage.getItem("last_name")||"",full_name:localStorage.getItem("full_name")||"",email:localStorage.getItem("email")||"",phone:localStorage.getItem("phone")||"",province:localStorage.getItem(this.localStorageKeyForProvince(this.product_type=="travel"))||"",product_type:localStorage.getItem("product_type")||"",sub_product_type:localStorage.getItem("sub_product_type")||null,otp:null,receivedOtp:!1,errorMsg:null,requestOtpCountdown:60,countdownInterval:null,hasCountryCode:!0,countryCode:localStorage.getItem("country_code")||"+1",processType:"independent_otp",submitDisabled:!1,disableEmailPhoneFields:!1,btnText:"Continue",loading:!1,loadingUserDetails:!1,canadianPhone:"no",accountPhoneFormatted:null}},mounted(){this.$store.commit("otp/setOtpSentStatus",!1),this.authorized&&(this.loadingUserDetails=!0,this.disableEmailPhoneFields=!0,this.getActor().then(t=>{var e,o,n,i,l,p,h;(e=t==null?void 0:t.data)!=null&&e.email&&(this.email=(o=t==null?void 0:t.data)==null?void 0:o.email,this.first_name=(n=t==null?void 0:t.data)==null?void 0:n.first_name,this.last_name=(i=t==null?void 0:t.data)==null?void 0:i.last_name,this.full_name=(l=t==null?void 0:t.data)==null?void 0:l.full_name,[this.countryCode,this.phone]=this.splitCountryCodeAndPhone((p=t==null?void 0:t.data)==null?void 0:p.phone)),this.accountPhoneFormatted=(h=t==null?void 0:t.data)!=null&&h.phone?this.formatPhoneNumber(t.data.phone):null,localStorage.setItem("email",this.email),localStorage.setItem("first_name",this.first_name),localStorage.setItem("last_name",this.last_name),localStorage.setItem("phone",this.phone),localStorage.setItem("full_name",this.full_name)}).catch(()=>{this.disableEmailPhoneFields=!1}).finally(()=>{this.loadingUserDetails=!1})),this.product_type=localStorage.getItem("product_type"),this.sub_product_type=localStorage.getItem("sub_product_type"),this.province=localStorage.getItem(this.localStorageKeyForProvince(this.product_type=="travel"))},computed:{...X("auth",["authorized"]),buildFullName(){var e,o;return`${((e=this.first_name)==null?void 0:e.trim())||""} ${((o=this.last_name)==null?void 0:o.trim())||""}`.trim()||(this.full_name||"").trim()}},methods:{...C("actor",["getActor"]),...Q("account",["SET_REVISITED_AT"]),...C("account",["validEmail","register"]),...C("auth",["newUserFlow","login"]),enableFields(){this.disableEmailPhoneFields=!1,this.receivedOtp=!1,this.otp=null,this.resetOtpCountdown(),this.submitDisabled=!1,this.loading=!1},handleBack(){this.$router.push({name:"scheduleMeeting",query:this.$route.query})},handlePrivacyClick(){window.open(F.PRIVACY_URL,"_blank")},handleTermsClick(){window.open(F.TERMS_URL,"_blank")},handleSubmit(){if(!(this.loading||this.loadingUserDetails||this.submitDisabled)&&this.guardAgainstBot()){if(this.full_name=this.buildFullName,localStorage.setItem("full_name",this.buildFullName),localStorage.setItem("email",this.email),localStorage.setItem("first_name",this.first_name),localStorage.setItem("last_name",this.last_name),localStorage.setItem("phone",this.phoneWithCountryCode||this.phone),this.canSkipOtpForAuthorizedMatchingContact()){this.continueToCalendarWithoutOtp();return}
1this.authorized||localStorage.setItem("schedule_user_type","new_user"),this.handleOtp()}},canSkipOtpForAuthorizedMatchingContact(){return!this.authorized||this.loadingUserDetails||!this.accountPhoneFormatted?!1:this.formatPhoneNumber(`${this.countryCode}-${this.phone}`)===this.accountPhoneFormatted},validateCombinedName(){var e;const t=J(this.buildFullName);return t===!0?!0:((e=this.$refs.form)==null||e.setFieldError("firstName",t),!1)},showIdentityValidationError(t){if(!E(t))return!1;const e=Y(t)==="email"?"email":"firstName";return G(this.$refs.form,t,e)},resetSubmitState(){this.submitDisabled=!1,this.disableEmailPhoneFields=!1,this.loading=!1},continueToCalendarWithoutOtp(){this.submitDisabled=!0,this.$refs.form.validate().then(t=>{if(!t.valid){this.submitDisabled=!1;return}if(!this.validateCombinedName()){this.submitDisabled=!1;return}localStorage.setItem("schedule_user_type","existing_user"),localStorage.setItem("email",this.email),localStorage.setItem("first_name",this.first_name),localStorage.setItem("last_name",this.last_name),localStorage.setItem("phone",this.phone),localStorage.setItem("full_name",this.buildFullName),this.countryCode&&localStorage.setItem("country_code",this.countryCode),this.$router.push({name:"scheduleMeetingCalendar",query:this.$route.query})})},handleOtp(){this.receivedOtp?this.verifyOtp():this.getOtp()},verifyOtp(){this.submitDisabled=!0,this.disableEmailPhoneFields=!0,this.$refs.form.validate().then(async t=>{if(!t.valid){this.submitDisabled=!1,this.loading=!1;return}if(!this.validateCombinedName()){this.resetSubmitState();return}const e=await this.checkIfAccountExistsWithPassword(this.email.toLowerCase(),this.phoneWithCountryCode);e.data.existing_email?(e.data.existing_phone?localStorage.setItem("schedule_user_type","existing_user"):localStorage.setItem("schedule_user_type","existing_user_with_different_phone"),this.loginUser()):K.verifyOtp(this.email.toLowerCase(),this.otp.replace(/,/gi,""),this.phoneWithCountryCode,"independent_otp").then(o=>{var n;return this.setRevisitedAt((n=o.data)==null?void 0:n.revisited_at),this.registerUser().then(()=>{this.$router.push({name:"scheduleMeetingCalendar",query:this.$route.query})})}).catch(o=>{E(o)||u(o)||this.handleOtpFailure(o)})})},loginUser(){let t={email:this.email.toLowerCase(),otp:this.otp.replace(/,/gi,""),mobile:this.phoneWithCountryCode,process:"independent_otp",phone_verified_by_otp:"yes"};return new Promise(e=>{this.login(t).then(o=>{this.$router.push({name:"scheduleMeetingCalendar",query:this.$route.query}),e()}).catch(o=>this.handleOtpFailure(o))})},handleOtpFailure(t){this.submitDisabled=!0,t.response.data.error&&(t.response.data.error=="Incorrect access code entered"?this.$refs.form.setFieldError("otp","Incorrect access code entered"):t.response.data.error=="Access code has expired"?this.$refs.form.setFieldError("otp","Access code has expired. Request new code."):u(t)&&this.$refs.form.setFieldError("email",c))},registerUser(t="yes",e=null){var n;let o={first_name:this.first_name,last_name:this.last_name,full_name:this.buildFullName,phone:this.phoneWithCountryCode,email:this.email.toLowerCase(),phone_verified_by_otp:t,requested_a_quote:"yes"};return e&&(o.note=e),this.register(this.honeypotPayload({account:o,crm_lead_source:"Schedule A Call - Incomplete",crm_lead_status:"Lead Received",crm_lead_province:this.province,crm_lead_product_type:this.product_type,registration_context:z({sourceOverride:"schedule_meeting_flow",routeName:(n=this.$route)==null?void 0:n.name})})).then(i=>{var l;return u(i)?((l=this.$refs.form)==null||l.setFieldError("email",c),this.resetSubmitState(),Promise.reject(i)):this.showIdentityValidationError(i)?(this.resetSubmitState(),Promise.reject(i)):(i==null?void 0:i.status)===200?(this.externalScriptEnabled()&&(hj("formSubmitSuccessful"),this.$ma.trackEvent({fb_event:"CompleteRegistration"})),sessionStorage.removeItem("call_me_checked"),i):(this.resetSubmitState(),Promise.reject(i))})},getOtp(){this.submitDisabled=!0,this.$refs.form.validate().then(t=>{if(!t.valid){this.submitDisabled=!1,this.disableEmailPhoneFields=!1,this.loading=!1,this.focusOnError();return}if(!this.validateCombinedName()){this.resetSubmitState();return}this.loading=!0,this.disableEmailPhoneFields=!0,this.processType=="independent_otp"?this.validEmail(this.email.toLowerCase()).then(()=>
1this.validatePhoneEmailAndContinue()).catch(e=>{u(e)&&this.$refs.form.setFieldError("email",c),this.resetSubmitState()}):this.isValidLogin().then(()=>{this.validatePhoneEmailAndContinue()}).catch(e=>{u(e)&&this.$refs.form.setFieldError("email",c),this.resetSubmitState()})})},sendOtp(t){if(!this.errors.has("phoneNumber-number")&&!this.errors.has("email")){if(this.shouldSkipOtpSmsForSelectedCountry(this.countryCode)){this.registerUser("no",y).then(()=>{this.$router.push({name:"scheduleMeetingCalendar",query:this.$route.query})}).catch(()=>{this.submitDisabled=!1,this.loading=!1});return}this.requestOtp(t).then(e=>{e.data.message=="success"?(this.receivedOtp=!0,this.$emit("otpStatus",!0),this.$store.commit("otp/setOtpSentStatus",!0),this.submitDisabled=!1,this.loading=!1):this.shouldContinueWithoutOtp(e.data)&&this.registerUser("no",y).then(()=>{this.$router.push({name:"scheduleMeetingCalendar",query:this.$route.query})}).catch(()=>{})}).catch(e=>{if(this.shouldContinueWithoutOtpFromError(e)){this.registerUser("no",y).then(()=>{this.$router.push({name:"scheduleMeetingCalendar",query:this.$route.query})}).catch(()=>{this.submitDisabled=!1,this.loading=!1});return}this.submitDisabled=!1,this.loading=!1})}else this.submitDisabled=!1,this.loading=!1},validatePhoneEmailAndContinue(){const t=this.hasCountryCode&&this.countryCode?`${this.countryCode}-${this.phone}`:this.phone;this.canadianPhone=this.hasCountryCode&&this.countryCode?"no":"yes";const e=this.processType!=="independent_otp";let o={email:this.email,phone:this.formatPhoneNumber(t),canadian_phone:this.canadianPhone,process:this.processType},n=[this.isPhoneValid("phone-number",this.canadianPhone,t,e)];n.push(this.checkIfEmailValid("email")),Promise.all(n).then(()=>this.sendOtp(o)).catch(i=>{u(i)&&this.$refs.form.setFieldError("email",c),this.submitDisabled=!1,this.loading=!1,this.disableEmailPhoneFields=!1})},enableSubmitButton(t){this.submitDisabled=t},resetOtpCountdown(){clearInterval(this.countdownInterval),this.requestOtpCountdown=60}},watch:{email(){var t;this.email=(t=this.email)==null?void 0:t.toLowerCase()},receivedOtp(t){t?this.btnText="Verify":this.btnText="Continue"}}},ie={class:"row justify-content-center"},se={class:"form_wrapper"},ae={class:"form-group schedule-call-padding"},oe={class:"col-sm-6 pl0"},le={class:"col-sm-6 px-0 py-0"},ne={class:"pl0 email-container"},re={class:"d-grid-columns email-grid"},de={key:0,class:"field-with-edit-toggle mt25"},he={class:"px-0 py-0"},ue={class:"d-grid-columns phone-grid"},me={key:0,class:"field-with-edit-toggle mt25"},ce={key:0,class:"loader loader--big"},pe={class:v("form__subtitle schedule-call-margin")},fe={class:"button",align:"center"},be=["disabled"];function _e(t,e,o,n,i,l){const p=d("font-awesome-icon"),h=d("LabelWithInfoIcon"),b=d("BaseInput"),w=d("PhoneNumber"),P=d("OtpField"),O=d("HoneypotField"),k=d("HoneypotError"),D=d("Form"),V=d("MainLayout");return m(),S(V,{estimated:!0,showHeaderMenu:!0},{default:I(()=>[a("span",{class:"back",onClick:e[0]||(e[0]=(...s)=>l.handleBack&&l.handleBack(...s))},[r(p,{icon:["fa","chevron-left"],class:"fa-lg blue-color"}),e[14]||(e[14]=a("span",{class:"back__text"},"BACK",-1))]),e[19]||(e[19]=a("div",{class:"row justify-content-center"},[a("div",{class:"col-md-12"},[a("h3",{class:"form__title"},"Schedule a call with one of our experts"),a("p",{class:"form__subtitle mb20"}," Please provide your contact information. "),a("p",{class:"form__subtitle mb20 font-weight-bold"},[_(" Need quotes in a hurry? Call on "),a("a",{href:"tel:18886019980",class:"blue_link underline"},"+1-888-601-9980")])])],-1)),r(D,{ref:"form"},{default:I(()=>[a("div",ie,[a("div",se,[a("div",ae,[a("div",oe,[r(h,{label:"First name",tooltip:""}),r(b,{id:"firstName",name:"firstName",modelValue:i.first_name,"onUpdate:modelValue":e[1]||(e[1]=s=>i.first_name=s),rules:"required|alpha_spaces|min:2|max:100","data-vv-as":"First name",maxLength:"100",placeholder:"e.g. John"},null,8,["modelValue"])]),a("div",le,[r(h,{label:"Last name",tooltip:""}),r(b,{id:"lastName",name:"lastName",modelValue:i.last_name,"onUpdate:modelValue":e[2]||(e[2]=s=>i.last_name=s),rules:"required|alpha_spaces|min:2|max:100","data-vv-as":"Last name",maxLength:"100",placeholder:"e.g. Smith"},null,8,["modelValue"])])]),a("div",ne,[a("div",re,[r(h,{label:"Email",tooltip:""}),!i.loading&&!i.loadingUserDetails?(m(),g("div",de,[a("span",{class:"edit-btn font-weight-bold",onClick:e[3]||(e[3]=(...s)=>l.enableFields&&l.enableFields(...s))},"Edit")])):f("",!0)]),r(b,{type:"email",id:"primaryEmail",rules:"required|email",modelValue:i.email,"onUpdate:modelValue":e[4]||(e[4]=s=>i.email=s),name:"email",placeholder:"E.g. [email protected]",disabled:i.disableEmailPhoneFields},null,8,["modelValue","disabled"])]),a("div",he,[a("div",ue,[r(h,{label:"Phone number (verification code will be sent to this phone)",tooltip:""}),!i.loading&&!i.loadingUserDetails?(m(),g("div",me,[a("span",{class:"edit-btn font-weight-bold",onClick:e[5]||(e[5]=(...s)=>l.enableFields&&l.enableFields(...s))},"Edit")])):f("",!0)]),r(w,{id:"phoneNumber",name:"phoneNumber",modelValue:i.phone,"onUpdate:modelValue":e[6]||(e[6]=s=>i.phone=s),countryCode:i.countryCode,"onUpdate:countryCode":e[7]||
1(e[7]=s=>i.countryCode=s),hasCountryCode:!0,label:"",numberPlaceholder:"Phone Number",disabled:i.receivedOtp||i.disableEmailPhoneFields,onlyCountryCodeDisabled:!t.showCountryCode(),class:"!mb-0 md:!grid-cols-1 md:!gap-0 xl:!gap-0"},null,8,["modelValue","countryCode","disabled","onlyCountryCodeDisabled"]),i.receivedOtp?(m(),S(P,{key:0,label:"Verification code",modelValue:i.otp,"onUpdate:modelValue":e[8]||(e[8]=s=>i.otp=s),email:i.email,phone:i.phone,countryCode:i.countryCode,hasCountryCode:i.hasCountryCode,onEnableSubmitButton:e[9]||(e[9]=s=>l.enableSubmitButton(s)),processType:i.processType,requestOtp:t.requestOtp,requestOtpCountdown:i.requestOtpCountdown,onResetOtpCountdown:l.resetOtpCountdown,placeholder:"Enter verification code sent on phone"},null,8,["modelValue","email","phone","countryCode","hasCountryCode","processType","requestOtp","requestOtpCountdown","onResetOtpCountdown"])):f("",!0)]),i.loading||i.loadingUserDetails?(m(),g("div",ce,e[15]||(e[15]=[a("div",{class:"lds-ring"},[a("div",{class:"lds-ring__animate"})],-1)]))):f("",!0),e[18]||(e[18]=a("div",{class:v("form__subtitle schedule-call-margin")}," You will be prompted to select date and time on next page. ",-1)),a("div",pe,[e[16]||(e[16]=_(" By providing your phone number here, you are agreeing to be contacted via SMS and phone and agree to our ")),a("span",{class:"form__highlight color-primary d-inline-block p-0",onClick:e[10]||(e[10]=(...s)=>l.handleTermsClick&&l.handleTermsClick(...s))}," Terms of Service"),e[17]||(e[17]=_(" and  ")),a("span",{class:"form__highlight color-primary d-inline-block p-0",onClick:e[11]||(e[11]=(...s)=>l.handlePrivacyClick&&l.handlePrivacyClick(...s))},"Privacy Policy")]),r(O,{modelValue:n.honeypotValue,"onUpdate:modelValue":e[12]||(e[12]=s=>n.honeypotValue=s),id:"maiden-name-schedule-contact"},null,8,["modelValue"]),r(k,{message:n.honeypotError},null,8,["message"]),a("div",fe,[a("button",{class:v(["btn btn--primary",["btn","btn--primary",{"btn--disable":i.submitDisabled||i.loadingUserDetails}]]),type:"submit",id:"get_otp_btn",disabled:i.submitDisabled||i.loadingUserDetails,onClick:e[13]||(e[13]=j((...s)=>l.handleSubmit&&l.handleSubmit(...s),["prevent"]))},H(i.btnText),11,be)])])])],void 0,!0),_:1},512)],void 0,!0),_:1})}const ke=x(te,[["render",_e],["__scopeId","data-v-10555136"]]);export{ke 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.