1import{o as g,s as d,b as f,_ as i,e as y,a as b}from"./schemas.CXWE_NhA.js";const h=g({firstName:d().check(i(1,"First name is required")),lastName:d().check(i(1,"Last name is required")),company:f(d()),email:d().check(i(1,"Email address is required"),y("Please enter a valid email address")),message:d().check(i(1,"Message is required"))}),l=["firstName","lastName","email","message"];function p(){for(const s of l){const e=document.getElementById(s),t=document.querySelector(`[data-error="${s}"]`);e.classList.remove("border-red-500"),e.classList.add("border-gray-300"),t.classList.add("hidden"),t.textContent=""}}function N(s,e){const t=document.getElementById(s),r=document.querySelector(`[data-error="${s}"]`);t&&r&&(t.classList.remove("border-gray-300"),t.classList.add("border-red-500"),r.textContent=e,r.classList.remove("hidden"))}const m=document.getElementById("contact-form"),c=document.getElementById("submit-btn"),n=document.getElementById("form-status");m.classList.remove("hidden");for(const s of l){const e=document.getElementById(s);e.addEventListener("input",()=>{const t=document.querySelector(`[data-error="${s}"]`);e.classList.remove("border-red-500"),e.classList.add("border-gray-300"),t.classList.add("hidden"),t.textContent=""})}m.addEventListener("submit",async s=>{s.preventDefault(),p(),n.className="hidden";const e=new FormData(m),t={firstName:e.get("firstName"),lastName:e.get("lastName"),company:e.get("company"),email:e.get("email"),message:e.get("message"),"cf-turnstile-response":e.get("cf-turnstile-response")||void 0},r=b(h,t);if(!r.success){for(const o of r.error.issues){const u=o.path[0];l.includes(u)&&N(u,o.message)}const a=r.error.issues[0];a&&document.getElementById(a.path[0])?.focus();return}c.disabled=!0,c.textContent="Sending...";try{const a=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),o=await a.json();a.ok?(n.className="rounded-lg border border-green-300 bg-green-50 p-4 text-sm text-green-700",n.textContent="Thank y
1ou! Your message has been sent.",m.reset(),window.turnstile&&window.turnstile.reset()):(n.className="rounded-lg border border-red-300 bg-red-50 p-4 text-sm text-red-700",n.textContent=o.error||"Something went wrong. Please try again.")}catch{n.className="rounded-lg border border-red-300 bg-red-50 p-4 text-sm text-red-700",n.textContent="Network error. Please check your connection and try again."}finally{c.disabled=!1,c.textContent="Send Message"}});
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.