PageSourceSearch

https://www.atlanticbay.com/component---src-templates-mb-individual-referral-js-a7565a2e33c08161cab9.js

js atlanticbay.com collected 2026-09-24 10:46:54 UTC 17,217 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[2081],{38426:function(e,t,a){a.r(t),a.d(t,{Head:function(){return _},default:function(){return y}});var n=a(67294),r=a(28264),l=a(20574),o=a(38032);function i(){const e=(0,l.useStaticQuery)("3447353846");return n.createElement("div",{className:"h-[415px] relative"},n.createElement(r.Xdg,{backgroundImage:e.HeroBackgroundBlue.childImageSharp.gatsbyImageData}),n.createElement("div",{className:"grid grid-cols-1 grid-rows-1 h-full justify-items-center max-w-[1152px] mx-auto min-desktop4:grid-cols-[auto_auto]"},n.createElement("h1",{className:"col-start-1 col-end-2 justify-self-center leading-[29px] text-center max-w-full mt-[168px] row-start-1 row-end-2 w-[267px] z-[10] min-tablet1:leading-[42px] min-tablet1:w-[385px] min-desktop4:justify-self-start min-desktop4:leading-[49px] min-desktop4:mt-[92px] min-desktop4:w-[451px]"},n.createElement("span",{className:"font-variant-numeric--primary font-[800] font-['akagi-pro'] leading-[29px] text-[32px] text-arctic-blue-1 text-center uppercase min-tablet1:leading-[42px] min-tablet1:text-[46px] min-desktop4:leading-[49px] min-desktop4:text-[54px]"},"Start building"),n.createElement("span",{className:"font-variant-numeric--primary bg-white flex flex-col font-[400] font-['mascot-mvb'] h-[53px] items-center justify-center leading-[29px] [padding-inline:10px] text-[60px] text-arctic-blue text-center min-tablet1:h-[76px] min-tablet1:leading-[42px] min-tablet1:text-[86px] min-desktop4:h-[89px] min-desktop4:leading-[49px] min-desktop4:text-[101px]"},"your future")," ",n.createElement("span",{className:"font-variant-numeric--primary font-[800] font-['akagi-pro'] leading-[29px] text-[32px] text-arctic-blue-1 text-center uppercase min-tablet1:leading-[42px] min-tablet1:text-[38px] min-desktop4:leading-[49px] min-desktop4:text-[44px]"},"One step at a time")),n.createElement(o.G,{alt:"a mom, dad with moving boxes, and a child",className:"col-start-1 col-end-2 mt-[51px] row-start-1 row-end-2 min-tablet1:!hidden",image:e.HeroForegroundMobile.childImageSharp.gatsbyImageData}),n.createElement(o.G,{alt:"a mom, dad with moving boxes, and a child",className:"col-start-1 col-end-2 row-start-1 row-end-2 hidden min-tablet1:!block min-desktop4:col-start-2 min-desktop4:col-end-3",image:e.HeroForegroundDesktop.childImageSharp.gatsbyImageData})),n.createElement("div",{className:"absolute bottom-0 h-[179px] w-full z-[20]"},n.createElement(r.Xdg,{backgroundImage:e.HeroBackgroundTexture.childImageSharp.gatsbyImageData})))}var s=a(80706),c=a(57422),m=a(7763),d=a(54700),u=a(69868),p=a(30862),f=a(66380),x=a(46445),h=a(68471),g=a(86824);function b(e){var t,a,l;const[o,i]=n.useState(0),{control:b,handleSubmit:y,register:_,formState:{errors:v,defaultValues:E},watch:w,reset:k,setFocus:N}=(0,m.cI)({mode:"onTouched"}),S=w(),F="font-semibold leading-[44px] text-balance text-[36px] -tracking-[.72px]",D="font-semibold leading-[72px] text-balance text-[56px] -tracking-[1px]",I=[{description:{text:n.createElement(n.Fragment,null,"If you’re here, it’s because someone you know trusts us — and now we’d love to help you too. Please share their name, then click Start to begin a quick, three-step form.")},fieldGroups:[{fields:[{name:"referrer_first_name",placeholder:"First Name",type:"name",errorMessage:"Please enter the first name of the person who referred you."},{name:"referrer_last_name",placeholder:"Last Name",type:"name",errorMessage:"Please enter the last name of the person who referred you."}],heading:{text:"Who Told You About Us?"}}],heading:{classes:{default:D},text:n.createElement(n.Fragment,null,"Excited to Work with You!")}
1,useTabToNextField:!0},{description:{text:n.createElement(n.Fragment,null,"We’re always here to make things simple. Start by sharing your information so I can reach out and guide you through your next steps.")},consent:{fields:[{className:"bg-grey-1 flex flex-col !mb-0 [--lineHeight:16px] [&_label]:!leading-[var(--lineHeight)] [&_label]:!text-[14px] [&_label]:!text-grey-7 [&_label]:before:!top-[calc(var(--lineHeight)/2)]",errorMessage:"Please read the terms and conditions and check the box to agree.",field:"checkbox",id:"terms",labelText:"I have read and agree to the terms and conditions",name:"terms",rules:{required:!0}}],text:n.createElement(g.Z,{disclosure:"sms"})},fieldGroups:[{fields:[{name:"first_name",placeholder:"First Name",type:"name",errorMessage:"Please enter your first name."},{name:"last_name",placeholder:"Last Name",type:"name",errorMessage:"Please enter your last name."},{name:"email",placeholder:"Email Address",type:"email"},{name:"phone_cell",placeholder:"Phone Number",type:"phone"}],heading:{text:"Contact Information"}}],heading:{classes:{default:F},text:n.createElement(n.Fragment,null,"Your Contact Details")},useTabToNextField:!0},{description:{text:n.createElement(n.Fragment,null,"We’re always here to make things simple. Start by sharing your information so I can reach out and guide you through your next steps.")},fieldGroups:[{fields:[{field:"radio",labelText:"Purchase",name:"purchase_or_refinance",value:"purchase",id:"purchase",errorMessage:"Please select an option.",rules:{required:!0}},{field:"radio",labelText:"Refinance",name:"purchase_or_refinance",value:"refinance",id:"refinance",hideErrorMessage:!0}],heading:{text:"Are you interested in a Purchasing or Refinancing?"}},{fields:[{defaultValue:[1e3,2e3],name:"desired_monthly_payment",field:"range",label:"Desired Monthly Payment",max:5e3,min:800,step:100}],heading:{text:"What monthly payment range feels comfortable for you?"}}],heading:{classes:{default:F},text:n.createElement(n.Fragment,null,"Your Loan Needs")}},{description:{text:n.createElement(n.Fragment,null,"Almost there! Knowing your location helps us know how to serve you — right where you are.")},fieldGroups:[{fields:[{classes:{default:"[&:focus-within_[class*=placeholder]]:hidden"},field:"select",name:"state_of_home_purchase",placeholder:"State",selectOptions:e.bankerData.licenses.map((e=>{const t=e.slice(0,2);return{value:t,text:t}})),rules:{required:!0},errorMessage:"Please select a state."},{classes:{default:"[&:focus-within_[class*=placeholder]]:hidden"},disabled:!S.state_of_home_purchase,field:"select",name:"city_of_home_purchase",selectOptions:S.state_of_home_purchase?(0,f.MC)(S.state_of_home_purchase.value).sort(((e,t)=>e.name>t.name?1:e.name===t.name?0:-1)).map((e=>{let{name:t}=e,a=(0,p.Q)(t.toLowerCase());return{text:a,value:a}})):[],placeholder:"City",rules:{required:!0},errorMessage:"Please select a city."}],heading:{text:"Location Information"}}],heading:{classes:{default:F},text:n.createElement(n.Fragment,null,"Your Property’s Location")}},{description:{text:n.createElement(n.Fragment,null,"Your information has been received. I will reach out soon to help you take the next step toward your home goals. And — most importantly — thank you for trusting Atlantic Bay!")},heading:{classes:{default:D},text:n.createElement(n.Fragment,null,"Thank you!")},icon:n.createElement("div",{className:"bg-pacific-blue flex h-[120px] items-center justify-center rounded-full self-center w-[120px]"},n.createElement(x.Z,{className:"stroke-grey-1 h-[33px] w-[47px]",strokeWidth:5}))}];n.useEffect((()=>{let e={};I.forEach((t=>{var a;null===(a=t.fieldGroups)||void 0===a||a.forEach((t=>{t.fields.forEach((t=>{let{defaultValue:a,name:n}=t;e[n]||(e[n]=a||"")}))}))})),k(e)}),[]);const[T,j]=n.useState(!1),O=n.useRef(null),$=t=>{y((async a=>{if(O.current.scrollIntoView(),t<I.length-1)i(t);else try{j(!0);const t=(e=>{let{formData:t,mbEmail:a}=e;const n="[email protected]";let r="[email protected]"===t.email?n:a||n;return{customFields:{desired_monthly_payment:Array.isArray(t.desired_monthly_payment)?`${c.oB.format(t.desired_monthly_payment[0]).replace("$","")}-${c.oB.format(t.desired_monthly_payment[1]).replace("$","")}`:void 0,original_lead_source:"MB-Web-Referral",location_of_home_purchase:t.city_of_home_purchase&&t.state_of_home_purchase?`${t.city_of_home_purchase.value}, ${t.state_of_home_purchase.value}
1`:void 0,purchase_or_refinance:t.purchase_or_refinance?t.purchase_or_refinance:void 0,referrer_name_:`${t.referrer_first_name} ${t.referrer_last_name}`},email:t.email,first_name:t.first_name||"N/A",last_name:t.last_name||"N/A",owner:{email:r},phone_cell:t.phone_cell,source:"Website Lead"}})({formData:a,mbEmail:e.bankerData.crmEmail});await(0,c.Zp)({contactData:t,optInData:{phone_number:a.phone_cell,user:{...t.owner}}}),i(I.length-1),j(!1)}catch(n){console.error(n),j(!1)}}),(e=>{T&&j(!1)}))()};return n.createElement("div",{className:"bg-grey-1 [padding-block:50px_100px]"},n.createElement("div",{className:"grid gap-[46px] justify-items-center max-w-[1152px] mx-auto w-full min-desktop4:grid-cols-[1fr_auto] "},n.createElement("div",{className:"bg-white flex flex-col gap-[16px] justify-center max-w-full min-h-[806px] [padding:32px_43px] relative rounded-[12px] w-[346px] min-tablet2:w-[646px] min-desktop4:w-auto",ref:O},n.createElement(s.Z,{classes:{progressContainer:"bg-pacific-blue rounded-tl-[12px] "+(o===I.length-1?"rounded-tr-[12px]":""),componentContainer:"absolute bg-white left-0 top-0 max-w-full"},totalSteps:I.length-1,currentStep:o}),I[o].icon&&I[o].icon,n.createElement("h3",{className:(0,u.m6)(`font-variant-numeric--primary sans text-center text-grey-8 ${(null===(t=I[o].heading.classes)||void 0===t?void 0:t.default)||""}`)},I[o].heading.text),n.createElement("div",{className:(0,u.m6)(`font-variant-numeric--primary text-center text-grey-5 ${(null===(a=I[o].description.classes)||void 0===a?void 0:a.default)||""}`)},I[o].description.text),o>0&&o<I.length-1&&n.createElement("div",{className:"font-variant-numeric--primary bg-pacific-blue font-bold leading-[20px] [margin-block:39px] [padding:3px_9px] rounded-[100px] self-center text-[16px] text-grey-1 uppercase"},"Step ",o," of ",I.length-2),null===(l=I[o].fieldGroups)||void 0===l?void 0:l.map((e=>{var t,a;let l=[];var i;I[o].useTabToNextField&&(null===(i=I[o].fieldGroups)||void 0===i||i.forEach((e=>{e.fields.forEach((e=>{let{name:t}=e;-1===l.indexOf(t)&&l.push(t)}))})));return n.createElement("div",{key:`field-group-${e.fields[0].name}`,className:(0,u.m6)("flex flex-wrap gap-[24px] [padding-block:30px] "+(null!==(t=e.classes)&&void 0!==t&&t.default,""))},n.createElement("div",{className:(0,u.m6)(`font-variant-numeric--primary font-semibold leading-[28px] text-[20px] text-grey-8 w-full ${(null===(a=e.heading.classes)||void 0===a?void 0:a.default)||""}`)},e.heading.text),e.fields.map((e=>{var t;return"range"!==e.field?n.createElement(r.eSA,Object.assign({key:e.id||e.name,className:(0,u.m6)(`[&.outlined-field]:mb-0 [&_label]:text-grey-5 ${e.hideErrorMessage?"[&_.message-container]:hidden":""} ${(null===(t=e.classes)||void 0===t?void 0:t.default)||""}`),control:b,errors:v,watch:w,register:_,Controller:m.Qr,setFocus:N,groupedFieldNames:l,useTabToNextField:I[o].useTabToNextField&&(!e.field||"input"===e.field)},e)):n.createElement("div",{className:" w-full",key:`range-${e.name}`},n.createElement("div",{className:"flex justify-between mb-[16px] [&_*]:font-variant-numeric--primary [&_*]:leading-[44px] [&_*]:text-[20px] [&_*]:text-grey-5 [&_*]:-tracking-[.4px]"},n.createElement("div",null,c.oB.format(S[e.name]?S[e.name][0]:E[e.name][0])," ","-"," ",c.oB.format(S[e.name]?S[e.name][1]:E[e.name][1]))),n.createElement(m.Qr,{control:b,name:e.name,rules:{required:!0},render:t=>{let{field:a}=t;const r={...a,...e};return n.createElement(d.Z,Object.assign({},r,{className:"!h-[6px] w-full [&]:!bg-[rgba(0,_60,_72,_0.16)] [&_div]:!bg-[#278DE5]  [&_[class*=thumb]]:border-[6px] [&_[class*=thumb]]:border-white [&_[class*=thumb]]:shadow-sm [&_[class*=thumb]]:!h-[32px] [&_[class*=thumb]]:!w-[32px] ",onInput:e=>{a.onChange(e)}}))}}))})))})),I[o].consent&&n.createElement("div",{className:"flex flex-col gap-[14px] [padding-block:30px]"},I[o].consent.fields.map((e=>{var t;return n.createElement(r.eSA,Object.assign({key:e.id||e.name,className:(0,u.m6)(`[&.outlined-field]:mb-0 [&_label]:!text-grey-5 ${(null===(t=e.classes)||void 0===t?void 0:t.default)||""}`),control:b,errors:v,watch:w,register:_,Controller:m.Qr},e))})),n.createElement("div",{className:"[&_*]:font-variant-numeric--primary [&_*]:leading-[21px] [&_*]:text-[10px] [&_*]:text-grey-6 [&_a]:text-pacific-blue [&_a]:underline [&_*:last-child]:mb-0"},I[o].consent.text)),o<I.length-1&&n.createElement("div",{className:"@container flex flex-wrap gap-[18px] justify-center"},o>0&&n.createElement("button",{className:"button button--tertiary w-full @[387px]:w-auto",onClick:()=>$(o-1)},"Go Back"),n.createElement("button",{className:"button button--primary w-full @[387px]:w-auto",onClick:()=>$(o+1)},0===o?"Start":o===I.length-2?T?n.createElement(h.Z,{className:"animate-spin",color:"#fff"}):"Submit":"Next Step"))),n.createElement("div",{className:"bg-white flex flex-col gap-[30px] items-center p-[48px] rounded-[6px] w-[346px] min-tablet2:w-[646px] min-desktop4:self-start min-desktop4:w-[434px]"},n.createElement("h5",{className:"font-variant-numeric--primary sans font-semibold leading-[28px] text-center text-grey-5 text-[22px] tracking-[.22px]"},"Reach out to me if you have any questions:"),n.createElement(r.eEH,{professional:e.bankerData,height:220,width:220}),n.createElement("div",null,n.createElement("div",{className:"font-variant-numeric--primary flex flex-col font-semibold gap-[21px] leading-[50px] text-balance text-center text-grey-8 text-[44px] -tracking-[.88px]"},e.bankerData.name),n.createElement("div",{className:"font-variant-numeric--primary leading-[32px] text-balance text-center text-grey-7 text-[22px] tracking-[.22px]"},e.bankerData.jobTitle)),n.createElement("div",{className:"flex flex-col gap-[5px] [&_*]:caption [&_*]:font-variant-numeric--primary [&_*]:text-grey-6 [&_*]:text-center"},n.createElement("div",null,"NMLS #",e.bankerData.nmls),n.createElement(r.cME,{licenses:e.bankerData.licenses,stateSpecificLicense:e.bankerData.stateSpecificLicense})),n.createElement("div",{className:"font-variant-numeric--primary flex flex-col gap-[10px] leading-[20px] text-balance text-center text-grey-7 text-[16px] underline"},n.createElement("a",{href:`mailto:${e.bankerData.email}`},e.bankerData.email),n.createElement("a",{href:`tel:${e.bankerData.phone}`},e.bankerData.phoneText)))))}function y(e){const[t,a]=n.useState(null);return n.useEffect((()=>{const t=new URLSearchParams(e.location.search);if(t){const e=t.get("external_id");a(e)}}),[]),n.createElement(n.Fragment,null,n.createElement(i,null),n.createElement(b,{bankerData:e.bankerData,externalId:t}))}const _=e=>n.createElement(r.HJq,{title:"Refer Friends & Family | Atlantic Bay Mortgage Referral",description:"Know someone buying or refinancing a home? Refer them to Atlantic Bay—trusted by you for expert mortgage guidance your friends and family can count on.",slug:e.location.pathname.replace(/^\//,"").replace(/\/$/,"")})},68471:function(e,t,a){var n=a(67294),r=a(45697),l=a.n(r);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},o.apply(this,arguments)}function i(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=(0,n.forwardRef)((function(e,t){var a=e.color,r=void 0===a?"currentColor":a,l=e.size,s=void 0===l?24:l,c=i(e,["color","size"]);return n.createElement("svg",o({ref:t,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),n.createElement("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),n.createElement("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),n.createElement("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),n.createElement("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),n.createElement("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),n.createElement("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),n.createElement("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),n.createElement("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"}))}));
1s.propTypes={color:l().string,size:l().oneOfType([l().string,l().number])},s.displayName="Loader",t.Z=s},30862:function(e,t,a){a.d(t,{Q:function(){return s}});var n=/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i,r=/[^\s:–—-]+|./g,l=/\s/,o=/.(?=[A-Z]|\..)/,i=/[A-Za-z0-9\u00C0-\u00FF]/;function s(e){for(var t,a="";null!==(t=r.exec(e));){var s=t[0],c=t.index;o.test(s)||n.test(s)&&0!==c&&c+s.length!==e.length||":"===e.charAt(c+s.length)&&!l.test(e.charAt(c+s.length+1))?a+=s:a+=s.replace(i,(function(e){return e.toUpperCase()}))}return a}}}]);
2//# sourceMappingURL=component---src-templates-mb-individual-referral-js-a7565a2e33c08161cab9.js.map

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.