1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7150],{56978:(e,a,t)=>{t.d(a,{Lk:()=>l,MJ:()=>u,zB:()=>d});var n=t(85664),r=t(43136),s=t(11444),i=t(63276),o=t(80166);function l(e){let{schema:a,...t}=e;return(0,o.mN)({...t,resolver:(0,r.u)(a)})}t(87214),t(96777);let c=i.createContext({});function d(e){let{...a}=e;return(0,n.jsx)(c.Provider,{value:{name:a.name},children:(0,n.jsx)(o.xI,{...a})})}let m=i.createContext({}),u=e=>{let{ref:a,...t}=e,{error:r,formDescriptionId:l,formItemId:d,formMessageId:u}=(()=>{let e=i.useContext(c),a=i.useContext(m),{formState:t,getFieldState:n}=(0,o.xW)(),r=n(e.name,t),{id:s}=a;return{formDescriptionId:"".concat(s,"-form-item-description"),formItemId:"".concat(s,"-form-item"),formMessageId:"".concat(s,"-form-item-message"),id:s,name:e.name,...r}})();return(0,n.jsx)(s.DX,{"aria-describedby":r?"".concat(l," ").concat(u):l,"aria-invalid":!!r,id:d,ref:a,...t})};u.displayName="FormControl"},74370:(e,a,t)=>{t.d(a,{_N:()=>c,tR:()=>d});var n=t(97239),r=t(82452);let s=/[^a-z0-9]+/g,i=/^_+|_+$/g,o={arrange_viewing:"Arrange Viewing",book_valuation:"Book a Valuation Form",contact:"Contact Form",instant_valuation:"Instant Valuation Form",register:"Register Form",virtual_valuation:"Virtual Valuation Form"};function l(e,a,t){let{gtmEvent:s}=t;s&&(0,n.sendGTMEvent)({event:"generate_lead",value:a}),r.f0("Lead",{content_name:e})}function c(e,a){l(e,o[e],a)}function d(e,a){l(e.toLowerCase().replace(s,"_").replace(i,"")||"custom_form",e,a)}},75691:(e,a,t)=>{t.d(a,{y:()=>l});var n=t(85664),r=t(88253),s=t(96777);let i=(0,r.F)(["absolute inset-0 rounded-full border-3 border-transparent"],{defaultVariants:{color:"primary"},variants:{color:{primary:"border-b-primary",secondary:"border-b-secondary",white:"border-b-white"}}}),o=(0,r.F)([""],{defaultVariants:{size:"default"},variants:{size:{default:"size-32",lg:"size-48",sm:"size-26",xs:"size-20"}}});function l(e){let{color:a,size:t}=e;return(0,n.jsxs)("div",{className:(0,s.cn)("relative flex items-center justify-center rounded-full",o({size:t})),children:[(0,n.jsx)("div",{className:(0,s.cn)(i({color:a}),o({size:t}),"animate-[0.8s_ease_0s_infinite_normal_none_running_spin]")}),(0,n.jsx)("div",{className:(0,s.cn)(i({color:a}),o({size:t}),"animate-[0.8s_linear_0s_infinite_normal_none_running_spin] border-dotted opacity-50")})]})}},77150:(e,a,t)=>{t.r(a),t.d(a,{ArrangeViewing:()=>_});var n=t(85664),r=t(17334),s=t(76392),i=t.n(s),o=t(89309),l=t(63276),c=t(80166),d=t(30396),m=t(96777),u=t(74348),h=t(16172);function f(e){let{department:a,phoneNumber:t,propertyUrl:r,theme:s}=e,i="Please connect me to the ".concat(a," department I'm interested in this property: ").concat(r),o=t.replace(/[^0-9]/g,""),l="https://wa.me/".concat(o,"?text=").concat(encodeURIComponent(i));return(0,n.jsx)("a",{className:(0,m.cn)((0,h.r)({size:"beam"===s?"default":"duplex"===s?"lg":"md",theme:s,variant:"whatsapp"}),"block w-full"),href:l,rel:"noreferrer",target:"_blank",children:(0,n.jsxs)("span",{className:"relative flex w-full items-center justify-center",children:[(0,n.jsx)(u.I,{className:"size-24",name:"fa/whatsapp"}),(0,n.jsx)("span",{className:"ml-10",children:"Enquire via Whatsapp"})]})})}var p=t(97763),b=t(16003),g=t(56978),x=t(81072),v=t(75691),y=t(77832),w=t(74370),j=t(69368);let N=d.Ik({consent:d.Yj(),date:d.Yj().optional(),email:d.Yj().min(5,{message:"Please enter your email"}).email({message:"Please enter a valid email"}),fullName:d.Yj().min(2,{message:"Please enter your full name"}),phone:d.Yj().min(5,{message:"Please enter your phone number"}),somethingToSell:d.zM(),time:d.Yj().optional()});function _(e){var a,t,s;let{branch:d,department:_,gtmEvent:k,hideDateTimeViewing:S,propertyAddress:I,propertyId:T,referenceId:z,showSomethingToSell:P,textColor:C,theme:F,useWhatsappForm:V,viewingButtonLabel:E,whatsappPhoneNumber:q}=e,L=(0,o.usePathname)(),Y=(0,g.Lk)({defaultValues:{consent:"",date:"",somethingToSell:!1,time:""},schema:N}),{formState:A,handleSubmit:O,register:R,setValue:M,trigger:J}=Y,[W,B]=(0,l.useState)(!1),[U,$]=(0,l.useState)(!1),[D,G]=(0,l.useState)(!1),[H,X]=(0,l.useState)(),[
1K,Q]=(0,l.useState)(),Z=(0,j.rf)(L);async function ee(e){B(!0);let a={1:e.fullName,2:e.email,3:e.phone,6:d,"7.1":e.consent,8:I,9:T,10:z,somethingToSell:e.somethingToSell,source_url:Z,...!S&&{4:e.date,5:e.time}},t=await fetch("/api/forms/arrange-viewing",{body:JSON.stringify(a),method:"POST"}),{status:n}=await t.json();200===n&&(B(!1),G(!0),(0,w._N)("arrange_viewing",{gtmEvent:k}))}async function ea(){if($(!0),!await J())return void $(!1);let e=Y.getValues(),a={1:e.fullName,2:e.email,3:e.phone,6:d,"7.1":e.consent,8:I,9:T,10:z,somethingToSell:e.somethingToSell,source_url:Z,sourceName:"WhatsApp",...!S&&{4:e.date,5:e.time}},t=await fetch("/api/forms/arrange-viewing",{body:JSON.stringify(a),method:"POST"}),{status:n}=await t.json();if(200===n){if((0,w._N)("arrange_viewing",{gtmEvent:k}),q&&1){let a="Hi, my name is ".concat(e.fullName,". Please connect me to the ").concat(_," department as I would like to view a property on your site.").concat(e.somethingToSell?" I would like to discuss selling my property as well.":""," The property I'm interested in is: ").concat(Z),t=q.replace(/[^0-9]/g,""),n="https://wa.me/".concat(t,"?text=").concat(encodeURIComponent(a));window.location.href=n,$(!1)}}else $(!1)}return(0,l.useEffect)(()=>{H&&(M("date",(0,r.GP)(H,"LLL dd, y")||""),J("date"))},[H,M,J]),(0,l.useEffect)(()=>{K&&(M("time",K||""),J("time"))},[K,M,J]),(0,n.jsxs)(n.Fragment,{children:[D?(0,n.jsxs)(p.y,{labelsTextColor:C,theme:F,title:"Thank you for your enquiry",children:["One of our team will be in touch shortly to confirm the time for your viewing. Please feel free to"," ",(0,n.jsx)(i(),{className:"border-transparent border-b-2 bg-[0_111%] bg-[length:100%_0%] bg-gradient-to-b from-secondary/10 to-secondary/15 bg-no-repeat font-bold text-primary transition-all duration-300 hover:border-secondary hover:bg-[length:100%_88%]",href:"/register",children:"register"})," ","with us and we will notify you of similar properties as they come on the market."]}):(0,n.jsxs)(c.Op,{...Y,children:[(0,n.jsx)("h2",{className:(0,m.cn)("mb-20 font-bold text-18 leading-normal tracking-[0.06px] md:text-20 lg:text-24","fascia"===F?"text-white":"text-primary","gable"!==F&&"font-body"),style:{color:C||void 0},children:"Arrange Viewing"}),(0,n.jsxs)("form",{id:"form-arrange-viewing",onSubmit:O(ee),children:[(0,n.jsx)("div",{className:"mb-15",children:(0,n.jsx)(x.p,{error:null==(a=A.errors.fullName)?void 0:a.message,label:"Full Name",theme:F,...R("fullName")})}),(0,n.jsx)("div",{className:"mb-15",children:(0,n.jsx)(x.p,{error:null==(t=A.errors.email)?void 0:t.message,label:"Email Address",theme:F,type:"email",...R("email")})}),(0,n.jsx)("div",{className:"mb-15",children:(0,n.jsx)(x.p,{error:null==(s=A.errors.phone)?void 0:s.message,label:"Telephone",theme:F,...R("phone")})}),(0,n.jsx)("div",{className:(0,m.cn)("mb-15",S&&"hidden"),children:(0,n.jsx)(b.l,{onSelect:X,selected:H,theme:F})}),(0,n.jsx)("div",{className:(0,m.cn)("mb-15",S&&"hidden"),children:(0,n.jsx)(y.A,{onSelect:Q,selected:K,theme:F})}),(0,n.jsx)("div",{className:(0,m.cn)("mb-12",!P&&"hidden"),children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("input",{className:(0,m.cn)("size-24 shrink-0 cursor-pointer border-2 border-bordergray text-secondary shadow-none ring-0 hover:border-green-2 hover:ring-0 focus:border-green-2 focus:shadow-none focus:outline-none focus:ring-0","fascia"!==F&&"rounded-6"),id:"somethingToSell",type:"checkbox",...R("somethingToSell")}),(0,n.jsx)("label",{className:(0,m.cn)("cursor-pointer pl-15 text-17 leading-normal","fascia"===F&&"text-white"),htmlFor:"somethingToSell",style:{color:C||void 0},children:"I have a property to sell"})]})}),(0,n.jsx)("div",{className:"mb-22",children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("input",{className:(0,m.cn)("size-24 shrink-0 cursor-pointer border-2 border-bordergray text-secondary shadow-none ring-0 hover:border-green-2 hover:ring-0 focus:border-green-2 focus:shadow-none focus:outline-none focus:ring-0","fascia"!==F&&"rounded-6"),id:"consent",type:"checkbox",value:"I would like to be updated with the latest market information and new properties.",...R("consent")}),(0,n.jsxs)("label",{className:(0,m.cn)("cursor-pointer pl-15 text-17 leading-normal","fascia"===F&&"text-white"),htmlFor:"consent",style:{color:C||void 0},children:["I would like to be updated with the latest market information and new properties. You can unsubscribe at any time."," ",(0,n.jsx)(i(),{className:(0,m.cn)("border-transparent border-b-2 bg-[0_111%] bg-[length:100%_0%] bg-gradient-to-b from-secondary/10 to-secondary/15 bg-no-repeat font-bold transition-all duration-300 hover:border-secondary hover:bg-[length:100%_88%]","fascia"===F?"text-secondary":"text-primary"),href:"/privacy-policy",style:{color:C||void 0},target:"_blank",children:"Privacy Policy"}),"."]})]})}),(0,n.jsxs)("div",{className:(0,m.cn)("chalet"===F&&"-mx-24 -mb-24"),children:[(0,n.jsxs)(h.$,{className:"w-full","data-busy":W?"true":"false",disabled:W,icon:"beam"!==F?"send":void 0,size:"beam"===F?"default":"duplex"===F?"lg":"md",theme:F,type:"submit",variant:"beam"===F||"fascia"===F?"secondary":"primary",children:[(0,n.jsx)("span",{className:(0,m.cn)(W&&"opacity-0"),dangerouslySetInnerHTML:{__html:V?"Enquire via Email":null!=E?E:"Request Viewing"}}),(0,n.jsx)("div",{className:(0,m.cn)("-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 flex transition-all",W?"visible opacity-1":"invisible opacity-0"),children:(0,n.jsx)(v.y,{color:"white"})})]}),!!q&&!!V&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mt-10 text-center",children:"or"}),(0,n.jsx)("div",{className:(0,m.cn)("mt-10","chalet"!==F&&"pb-15"),children:(0,n.jsxs)(h.$,{className:"w-full","data-busy":U?"true":"false",disabled:U,onClick:ea,size:"beam"===F?"default":"duplex"===F?"lg":"md",theme:F,type:"button",variant:"whatsapp",children:[(0,n.jsxs)("span",{className:(0,m.cn)("relative flex w-full items-center justify-center",U&&"opacity-0"),children:[(0,n.jsx)(u.I,{className:"size-24",name:"fa/whatsapp"}),(0,n.jsx)("span",{className:"ml-15",children:"Enquire via Whatsapp"})]}),(0,n.jsx)("div",{className:(0,m.cn)("-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2 flex transition-all",U?"visible opacity-1":"invisible opacity-0"),children:(0,n.jsx)(v.y,{color:"white"})})]})})]})]})]})]}),!!q&&!V&&(0,n.jsx)("div",{className:(0,m.cn)("pb-15 md:pb-0","chalet"===F?"-mx-24 -mb-30 mt-35":"mt-20"),children:(0,n.jsx)(f,{department:_,phoneNumber:q,propertyUrl:Z,theme:F})})]})}},82452:(e,a,t)=>{function n(){void 0!==window.fbq&&window.fbq("track","PageView")}function r(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==window.fbq&&window.fbq("track",e,a)}t.d(a,{JR:()=>n,f0:()=>r})}}]);
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.