PageSourceSearch

https://sprayfoamremovaladvice.co.uk/_nuxt/cGZwig2S.js

js sprayfoamremovaladvice.co.uk collected 2026-10-04 09:50:07 UTC 12,773 bytes, 1 lines download raw bytes

1import{c as a,b as y,p as x,T as w,e,q as i,g as n,v as m,n as d,t as p,f as u,y as k,z as q,m as S,A,j as v,_ as z,l as o,B as V}from"./jLo4S8jQ.js";import{t as M}from"./BXHLX68l.js";const P={class:"bg-white rounded-2xl shadow-xl p-8 border border-gray-100"},B={key:0,class:"mb-6 bg-green-50 border border-green-200 rounded-lg p-4"},L={key:0,class:"mb-6 bg-red-50 border border-red-200 rounded-lg p-4"},R={class:"flex items-center"},j={class:"text-sm text-red-700"},U={class:"grid md:grid-cols-2 gap-4"},F={key:0,class:"mt-1 text-sm text-red-600"},_={key:0,class:"mt-1 text-sm text-red-600"},D={class:"grid md:grid-cols-2 gap-4"},E={key:0,class:"mt-1 text-sm text-red-600"},I={key:0,class:"mt-1 text-sm text-red-600"},O={key:0,class:"mt-1 text-sm text-red-600"},$={class:"space-y-3"},H={key:0,class:"w-2.5 h-2.5 bg-blue-600 rounded-full"},Z={key:0,class:"w-2.5 h-2.5 bg-blue-600 rounded-full"},G={class:"flex items-center"},W={class:"bg-gray-50 rounded-lg p-4 text-sm text-gray-600"},J={class:"flex items-start"},K={class:"flex items-center justify-between"},Q=["disabled"],Y={key:0,class:"flex items-center justify-center"},X={key:1,class:"flex items-center justify-center"},re={__name:"CertificationContactForm",setup(ee){const s=v({firstName:"",lastName:"",email:"",phone:"",postcode:"",serviceType:"",message:"",urgent:!1}),r=v({}),f=v(!1),N=v(!1),b=v(!1),g=v(""),C=()=>(r.value={},s.value.firstName.trim()||(r.value.firstName="First name is required"),s.value.lastName.trim()||(r.value.lastName="Last name is required"),/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s.value.email)||(r.value.email="Please enter a valid email address"),(!/^[\d\s\-\+\(\)]+$/.test(s.value.phone)||s.value.phone.length<10)&&(r.value.phone="Please enter a valid phone number"),/^[A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2}$/i.test(s.value.postcode)||(r.value.postcode="Please enter a valid UK postcode"),Object.keys(r.value).length===0),T=async()=>{if(C()){f.value=!0,b.value=!1,g.value="";try{M({source:"certification-form",citationType:"form-submission",context:"spray-foam-certification-request"});const c=await $fetch("/api/contact/certification-inquiry",{method:"POST",body:{...s.value,source:"certification-page",timestamp:new Date().toISOString()}});if(c.success)typeof fbq<"u"&&fbq("track","Lead",{content_name:"Certification Contact Form",content_category:"Certification Request",service_type:s.value.serviceType,urgent:s.value.urgent}),V("/contact/thank-you?type=certification");else throw new Error(c.message||"Failed to submit form")}catch(c){b.value=!0,g.value=c.message||"Please try again or call us directly"}finally{f.value=!1}}};return(c,t)=>{const h=z;return o(),a("div",P,[y(w,{"enter-active-class":"transition ease-out duration-300","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-200","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:x(()=>[N.value?(o(),a("div",B,[...t[9]||(t[9]=[e("div",{class:"flex items-center"},[e("svg",{class:"w-5 h-5 text-green-600 mr-3",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})]),e("div",null,[e("p",{class:"font-semibold text-green-800"},"Thank you for your inquiry!"),e("p",{class:"text-sm text-green-700"},"A certified specialist will contact you within 24 hours.")])],-1)])])):u("",!0)]),_:1}),y(w,{"enter-active-class":"transition ease-out duration-300","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-200","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:x(()=>[b.value?(o(),a("div",L,[e("div",R,[t[11]||(t[11]=e("svg",{class:"w-5 h-5 text-red-600 mr-3",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),e("div",null,[t[10]||(t[10]=e("p",{class:"font-semibold text-red-800"},"Something went wrong",-1)),e("p",j,p(g.value),1)])])])):u("",!0)]),_:1}),e("form",{onSubmit:A(T,["prevent"]),class:"space-y-6"},[e("div",U,[e("div",null,[t[12]||(t[12]=e("label",{for:"firstName",class:"block text-sm font-semibold text-gray-700 mb-2"},[i(" First Name "),e("span",{class:"text-red-500"},"*")],-1)),n(e("input",{id:"firstName","onUpdate:modelValue":t[0]||(t[0]=l=>s.value.firstName=l),type:"text",required:"",class:d(["w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",{"border-red-500":r.value.firstName}]),placeholder:"John"},null,2),[[m,s.value.firstName]]),r.value.firstName?(o(),a("p",F,p(r.value.firstName),1)):u("",!0)]),e("div",null,[t[13]||(t[13]=e("label",{for:"lastName",class:"block text-sm font-semibold text-gray-700 mb-2"},[i(" Last Name "),e("span",{class:"text-red-500"},"*")],-1)),n(e("input",{id:"lastName","onUpdate:modelValue":t[1]||(t[1]=l=>s.value.lastName=l),type:"text",required:"",class:d(["w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",{"border-red-500":r.value.lastName}]),placeholder:"Smith"},null,2),[[m,s.value.lastName]]),r.value.lastName?(o(),a("p",_,p(r.value.lastName),1)):u("",!0)])]),e("div",D,[e("div",null,[t[14]||(t[14]=e("label",{for:"email",class:"block text-sm font-semibold text-gray-700 mb-2"},[i(" Email Address "),e("span",{class:"text-red-500"},"*")],-1)),n(e("input",{id:"email","onUpdate:modelValue":t[2]||(t[2]=l=>s.value.email=l),type:"email",required:"",class:d(["w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",{"border-red-500":r.value.email}]),placeholder:"[email protected]"},null,2),[[m,s.value.email]]),r.value.email?(o(),a("p",E,p(r.value.email),1)):u("",!0)]),e("div",null,[t[15]||(t[15]=e("label",{for:"phone",class:"block text-sm font-semibold text-gray-700 mb-2"},[i(" Phone Number "),e("span",{class:"text-red-500"},"*")],-1)),n(e("input",{id:"phone","onUpdate:modelValue":t[3]||(t[3]=l=>s.value.phone=l),type:"tel",required:"",class:d(["w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",{"border-red-500":r.value.phone}]),placeholder:"07123 456789"},null,2),[[m,s.value.phone]]),r.value.phone?(o(),a("p",I,p(r.value.phone),1)):u("",!0)])]),e("div",null,[t[16]||(t[16]=e("label",{for:"postcode",class:"block text-sm font-semibold text-gray-700 mb-2"}
1,[i(" Property Postcode "),e("span",{class:"text-red-500"},"*")],-1)),n(e("input",{id:"postcode","onUpdate:modelValue":t[4]||(t[4]=l=>s.value.postcode=l),type:"text",required:"",class:d(["w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",{"border-red-500":r.value.postcode}]),placeholder:"SW1A 1AA"},null,2),[[m,s.value.postcode]]),r.value.postcode?(o(),a("p",O,p(r.value.postcode),1)):u("",!0)]),e("div",null,[t[19]||(t[19]=e("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},[i(" Service Required "),e("span",{class:"text-red-500"},"*")],-1)),e("div",$,[e("label",{class:d(["flex items-center p-4 border border-gray-300 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors",{"border-blue-500 bg-blue-50":s.value.serviceType==="assessment"}])},[n(e("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>s.value.serviceType=l),type:"radio",value:"assessment",class:"sr-only",required:""},null,512),[[k,s.value.serviceType]]),e("span",{class:d(["w-5 h-5 mr-3 border-2 rounded-full flex items-center justify-center",s.value.serviceType==="assessment"?"border-blue-600":"border-gray-400"])},[s.value.serviceType==="assessment"?(o(),a("span",H)):u("",!0)],2),t[17]||(t[17]=e("div",{class:"flex-1"},[e("p",{class:"font-semibold text-gray-900"},"Spray Foam Assessment Only"),e("p",{class:"text-sm text-gray-600"},"Professional inspection and certification report")],-1))],2),e("label",{class:d(["flex items-center p-4 border border-gray-300 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors",{"border-blue-500 bg-blue-50":s.value.serviceType==="removal"}])},[n(e("input",{"onUpdate:modelValue":t[6]||(t[6]=l=>s.value.serviceType=l),type:"radio",value:"removal",class:"sr-only",required:""},null,512),[[k,s.value.serviceType]]),e("span",{class:d(["w-5 h-5 mr-3 border-2 rounded-full flex items-center justify-center",s.value.serviceType==="removal"?"border-blue-600":"border-gray-400"])},[s.value.serviceType==="removal"?(o(),a("span",Z)):u("",!0)],2),t[18]||(t[18]=e("div",{class:"flex-1"},[e("p",{class:"font-semibold text-gray-900"},"Assessment & Removal Quote"),e("p",{class:"text-sm text-gray-600"},"Full inspection plus certified removal service quote")],-1))],2)])]),e("div",null,[t[20]||(t[20]=e("label",{for:"message",class:"block text-sm font-semibold text-gray-700 mb-2"}," Additional Information ",-1)),n(e("textarea",{id:"message","onUpdate:modelValue":t[7]||(t[7]=l=>s.value.message=l),rows:"4",class:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"Please provide any additional details about your spray foam situation..."},null,512),[[m,s.value.message]])]),e("div",null,[e("label",G,[n(e("input",{"onUpdate:modelValue":t[8]||(t[8]=l=>s.value.urgent=l),type:"checkbox",class:"w-5 h-5 text-blue-600 border-gray-300 rounded focus:ring-blue-500"},null,512),[[q,s.value.urgent]]),t[21]||(t[21]=e("span",{class:"ml-3 text-sm text-gray-700"}," This is urgent - I have a pending property sale/mortgage application ",-1))])]),e("div",W,[e("p",J,[t[23]||(t[23]=e("svg",{class:"w-5 h-5 text-gray-400 mr-2 mt-0.5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),t[24]||(t[24]=i(" Your information will be used to connect you with certified spray foam removal specialists. We will not share your details with any other parties. By submitting this form, you agree to our ",-1)),y(h,{to:"/privacy-policy",class:"text-blue-600 hover:underline"},{default:x(()=>[...t[22]||(t[22]=[i("Privacy Policy",-1)])]),_:1}),t[25]||(t[25]=i(". ",-1))])]),e("div",K,[e("button",{type:"submit",disabled:f.value,class:"flex-1 bg-gradient-to-r from-blue-600 to-blue-700 text-white font-semibold py-4 px-8 rounded-lg hover:from-blue-700 hover:to-blue-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed"},[f.value?(o(),a("span",X,[...t[27]||(t[27]=[e("svg",{class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",f
1ill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),i(" Submitting... ",-1)])])):(o(),a("span",Y,[...t[26]||(t[26]=[i(" Get Certified Assessment ",-1),e("svg",{class:"w-5 h-5 ml-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 8l4 4m0 0l-4 4m4-4H3"})],-1)])]))],8,Q)]),t[28]||(t[28]=S('<div class="mt-6 flex items-center justify-center space-x-6 text-sm text-gray-500"><span class="flex items-center"><svg class="w-4 h-4 mr-1 text-green-500" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg> SSL Secured </span><span class="flex items-center"><svg class="w-4 h-4 mr-1 text-green-500" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg> GDPR Compliant </span></div>',1))],32)])}}};export{re 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.