1"use strict";(self.webpackChunksimply_salad=self.webpackChunksimply_salad||[]).push([[755],{6319:function(e,a,t){t.r(a),t.d(a,{Head:function(){return x},default:function(){return f}});var l=t(6540),n=t(5588);function o({name:e,value:a,maxLength:t,onChange:n,type:o,placeholder:r,cls:i,required:s=!1,pattern:m,min:c,id:p,label:d,ariaLabel:u}){const g=p||e||`input2-${o}-${Math.random().toString(36).substr(2,9)}`;return l.createElement("div",null,d&&l.createElement("label",{htmlFor:g,className:"sr-only"},d),l.createElement("input",{id:g,className:`${i} border-[0.95px] border-d7 bg-no-repeat bg-[rgba(217,217,217,0.19)] px-5 lg:px-8 2xl:px-[48px] py-4 2xl:py-[21px] w-full rounded-[13px]`,name:e,type:o,placeholder:r,value:a,onChange:n,required:s,maxLength:t,pattern:m,min:c,"aria-label":u||d||r}))}function r(e){const{name:a,value:t,onChange:n,children:o,cls:r,required:i=!1}=e;return l.createElement("select",Object.assign({name:a,className:`${r} appearance-none border-[0.95px] border-d7 bg-no-repeat bg-[right_34px_top_50%] bg-[url('../assets/svgs/downArrow.svg')] bg-[rgba(217,217,217,0.19)] px-5 lg:px-8 2xl:px-[48px] py-4 2xl:py-[21px] w-full rounded-[13px]`,value:t,onChange:n,required:i},e),o)}var i=({name:e,value:a,onChange:t,type:n,placeholder:o,cls:r,required:i=!1,label:s,ariaLabel:m,id:c})=>{const p=(0,l.useId)(),d=c||(e?`textarea-${String(e)}`:`textarea-${String(p).replace(/:/g,"")}`);return l.createElement("textarea",{id:d,className:`${r} border-[0.95px] border-d7 bg-no-repeat bg-[rgba(217,217,217,0.19)] px-5 lg:px-8 2xl:px-[48px] py-4 2xl:py-[21px] w-full rounded-[13px]`,placeholder:o,value:a,rows:5,onChange:t,name:e,required:i,"aria-label":m||s||o||e})},s=t(888);var m=({formName:e,data:a})=>{const{0:t,1:n}=(0,l.useState)(!1),{0:m,1:c}=(0,l.useState)({name:"",email:"",phone:"",how_can_we_help:"",location:"",message:""}),p=e=>{const{name:a,value:t}=e.target;c({...m,[a]:t})};return l.createElement("div",null,l.createElement("form",{className:"grid grid-cols-1 lg:grid-cols-2 gap-x-6 xl:gap-x-[52px] gap-y-6 mt-[50px]",onSubmit:a=>{a.preventDefault(),n(!0);const t={data:{type:e,name:`${m.name}`,email:m.email,phone:m.phone,how_can_we_help:m.how_can_we_help,location:m.location,message:m.message,date:(new Date).toUTCString(),website:window.location.origin},sheetID:37};fetch("https://leads.civsav.com/template/contact",{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then(e=>e.json()).then(a=>{n(!1),s.oR.success("The Contact info submitted successfully. Thanks! "),"undefined"!=typeof window&&window.dataLayer&&window.dataLayer.push({event:"submit_contact_form",formType:e}),c({name:"",email:"",phone:"",how_can_we_help:"",location:"",message:""})}).catch(()=>{s.oR.error("Something went wrong! Please try again"),n(!1)})}},l.createElement(o,{cls:"max-w-full",type:"text",name:"name",placeholder:"Name",required:!0,value:m.name,onChange:p}),l.createElement(o,{cls:"max-w-full",type:"email",name:"email",placeholder:"Email",required:!0,value:m.email,onChange:p}),l.createElement("div",{className:"lg:col-span-2"},l.createElement(o,{cls:"max-w-full",type:"tel",name:"phone",placeholder:"Phone Number",required:!0,value:m.phone,onChange:p})),l.createElement(r,{cls:"max-w-full",value:m.how_can_we_help,name:"how_can_we_help",onChange:p,required:!0},l.createElement("option",{value:"",defaultValue:""},"How can we help you?"),a.howCanWeHelp.map((e,a)=>l.createElement("option",{key:a,value:e},e))),l.createElement(r,{cls:"max-w-full h-fit",value:m.location,name:"location",onChange:p,required:!0},l.createElement("option",{value:"",defaultValue:""},"Which location is this regarding?"),a.location.map((e,a)=>l.createElement("option",{key:a,value:e},e))),l.createElement("div",{className:"lg:col-span-2"},l.createElement(i,{cls:"max-w-full",type:"text",name:"message",required:!0,placeholder:"Your message here",value:m.message,onChange:p})),l.createElement("div",{className:"mt-12 text-center lg:col-span-2"},l.createElement("button",{className:"border-[2.5px] border-solid border-primary rounded-[7px] py-3 2xl:py-5 px-16 text-black 2xl:leading-[29px] font-semibold text-lg 2xl:text-2xl hover:bg-primary hover:text-white transition-colors duration-150 ease-linear cursor-pointer",type:"submit",disabled:t},t?"Please Wait...":"Submit"))))};var c=({formName:e,data:a})=>{const{0:t,1:n}=(0,l.useState)(!1),{0:m,1:c}
1=(0,l.useState)({name:"",email:"",phone:"",position:"",location:"",address:"",file:"",message:""}),p=e=>{const{name:a,value:t}=e.target;c({...m,[a]:t})};return l.createElement("div",null,l.createElement("form",{className:"grid grid-cols-1 lg:grid-cols-2 gap-x-6 xl:gap-x-[52px] gap-y-6 mt-[50px]",onSubmit:async a=>{a.preventDefault(),n(!0);try{let a="";m.file&&(a=await(async e=>{try{const a=await fetch("/.netlify/functions/uploadFile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileType:e.type,fileName:e.name})});if(!a.ok)throw new Error("Failed to get upload URL");const{uploadUrl:t,fileUrl:l}=await a.json();if(!(await fetch(t,{method:"PUT",body:e,headers:{"Content-Type":e.type,"Access-Control-Allow-Origin":"*"},mode:"cors"})).ok)throw new Error("Failed to upload file");return l}catch(a){throw console.error("Error uploading file:",a),a}})(m.file));const t={data:{type:e,name:m.name,email:m.email,phone:m.phone,position:m.position,location:m.location,address:m.address,file:a,message:m.message,date:(new Date).toUTCString(),website:window.location.origin},sheetID:38},l=await fetch("https://leads.civsav.com/template/contact",{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}});if(!l.ok)throw new Error("Failed to submit form");await l.json();s.oR.success("The form submitted successfully. Thanks!"),"undefined"!=typeof window&&window.dataLayer&&window.dataLayer.push({event:"submit_contact_form",formType:e}),c({name:"",email:"",phone:"",position:"",location:"",address:"",file:"",message:""})}catch(t){console.error("Form submission error:",t),s.oR.error("Something went wrong! Please try again")}finally{n(!1)}}},l.createElement(o,{cls:"max-w-full",type:"text",name:"name",placeholder:"Name",required:!0,value:m.fname,onChange:p}),l.createElement(o,{cls:"max-w-full",type:"email",name:"email",placeholder:"Email",required:!0,value:m.email,onChange:p}),l.createElement(o,{cls:"max-w-full",type:"tel",name:"phone",placeholder:"Phone Number",required:!0,value:m.phone,onChange:p}),l.createElement(r,{cls:"max-w-full h-fit",value:m.position,name:"position",onChange:p,required:!0},l.createElement("option",{value:"",defaultValue:""},"What position are you applying for?"),a.positionApplyingFor.map((e,a)=>e&&l.createElement("option",{key:a,value:e},e))),l.createElement(r,{cls:"max-w-full h-fit",value:m.location,name:"location",onChange:p,required:!0},l.createElement("option",{value:"",defaultValue:""},"Which location are you applying to?"),a.location.map((e,a)=>e&&l.createElement("option",{key:a,value:e},e))),l.createElement(o,{cls:"max-w-full",type:"tel",name:"address",placeholder:"What part of LA do you live in?",required:!0,value:m.address,onChange:p}),l.createElement("div",{className:"relative lg:col-span-2"},l.createElement("input",{type:"file",id:"resume",name:"resume",accept:".pdf,.doc,.docx",onChange:e=>{var a;const t=null===(a=e.target.files)||void 0===a?void 0:a[0];if(t){if(t.size>5242880)return void s.oR.error("File size must be less than 5MB");const e=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];if(null==e||!e.includes(t.type))return void s.oR.error("Please upload a PDF or Word document");c({...m,file:t})}},className:"block w-full px-5 lg:px-8 2xl:px-[48px] py-4 text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-medium file:bg-gray-100 file:text-gray-700 hover:file:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-200 rounded-lg border border-gray-200 cursor-pointer bg-[rgba(217,217,217,0.19)]"}),l.createElement("p",{className:"mt-1 text-xs text-gray-500"},"Accepted formats: PDF, DOC, DOCX (Max 5MB)")),l.createElement("div",{className:"lg:col-span-2"},l.createElement(i,{cls:"max-w-full",type:"text",name:"message",placeholder:"Tell us something about yourself",value:m.message,onChange:p})),l.createElement("div",{className:"mt-12 text-center lg:col-span-2"},l.createElement("button",{className:"border-[2.5px] border-solid border-primary rounded-[7px] py-3 2xl:py-5 px-16 text-black 2xl:leading-[29px] font-semibold text-lg 2xl:text-2xl hover:bg-primary hover:text-white transition-colors duration-150 ease-linear cursor-pointer",type:"submit",disabled:t},t?"Please Wait...":"Submit"))))};var p=({formName:e,data:a})=>{const{0:t,1:n}=(0,l.useState)(!1),{0:m,1:c}
1=(0,l.useState)({name:"",email:"",phone:"",how_can_we_help:"",location:"",message:""}),p=e=>{const{name:a,value:t}=e.target;c({...m,[a]:t})};return l.createElement("div",null,l.createElement("form",{className:"grid grid-cols-1 lg:grid-cols-2 gap-x-6 xl:gap-x-[52px] gap-y-6 mt-[50px]",onSubmit:a=>{a.preventDefault(),n(!0);const t={data:{type:e,name:`${m.name}`,email:m.email,phone:m.phone,how_can_we_help:m.how_can_we_help,location:m.location,message:m.message,date:(new Date).toUTCString(),website:window.location.origin},sheetID:39};fetch("https://leads.civsav.com/template/contact",{method:"POST",body:JSON.stringify(t),headers:{"Content-type":"application/json; charset=UTF-8"}}).then(e=>e.json()).then(a=>{n(!1),s.oR.success("The Contact info submitted successfully. Thanks! "),"undefined"!=typeof window&&window.dataLayer&&window.dataLayer.push({event:"submit_contact_form",formType:e}),c({name:"",email:"",phone:"",how_can_we_help:"",location:"",message:""})}).catch(()=>{s.oR.error("Something went wrong! Please try again"),n(!1)})}},l.createElement(o,{cls:"max-w-full",type:"text",name:"name",placeholder:"Name",required:!0,value:m.name,onChange:p}),l.createElement(o,{cls:"max-w-full",type:"email",name:"email",placeholder:"Email",required:!0,value:m.email,onChange:p}),l.createElement("div",{className:"lg:col-span-2"},l.createElement(o,{cls:"max-w-full",type:"tel",name:"phone",placeholder:"Phone Number",required:!0,value:m.phone,onChange:p})),l.createElement(r,{cls:"max-w-full",value:m.how_can_we_help,name:"how_can_we_help",onChange:p,required:!0},l.createElement("option",{value:"",defaultValue:""},"How can we help you?"),a.howCanWeHelp.map((e,a)=>l.createElement("option",{key:a,value:e},e))),l.createElement(r,{cls:"max-w-full h-fit",value:m.location,name:"location",onChange:p,required:!0},l.createElement("option",{value:"",defaultValue:""},"Which location is this regarding?"),a.location.map((e,a)=>l.createElement("option",{key:a,value:e},e))),l.createElement("div",{className:"lg:col-span-2"},l.createElement(i,{cls:"max-w-full",type:"text",name:"message",required:!0,placeholder:"Your message here",value:m.message,onChange:p})),l.createElement("div",{className:"mt-12 text-center lg:col-span-2"},l.createElement("button",{className:"border-[2.5px] border-solid border-primary rounded-[7px] py-3 2xl:py-5 px-16 text-black 2xl:leading-[29px] font-semibold text-lg 2xl:text-2xl hover:bg-primary hover:text-white transition-colors duration-150 ease-linear cursor-pointer",type:"submit",disabled:t},t?"Please Wait...":"Submit"))))};var d=({data:e})=>{const a=["Feedback","Catering","Join our Team"],{0:t,1:n}=(0,l.useState)(0);return l.createElement("div",{className:"w-full mt-10 lg:mt-0"},l.createElement("div",{className:"w-full grid grid-cols-1 sm:grid-cols-3 gap-5 text-lg sm:text-xl lg:text-2xl"},null==a?void 0:a.map((e,a)=>l.createElement("button",{key:a,onClick:()=>n(a),className:"py-5 border-b-2 basis-1/3 border-solid font-semibold transition-all duration-200 ease-linear text-white flex items-center justify-center rounded "+(t===a?"border-b-primary bg-primary":"border-b-transparent text-black/60 bg-primary/80")},e))),0===t&&l.createElement(p,{data:e.feedbackForm,formName:a[t]}),1===t&&l.createElement(m,{data:e.catering,formName:a[t]}),2===t&&l.createElement(c,{data:e.joinTeam,formName:a[t]}))},u=t(4032);var g=({data:e})=>{var a,t,o,r,i;return l.createElement("section",{className:"py-[38px] w-full h-full px-5 sm:px-10 xl:px-20 flex flex-col lg:flex-row gap-x-6 lg:gap-x-[62px]"},l.createElement("div",{className:"max-w-[680px] w-full space-y-6 lg:basis-5/12"},l.createElement("h2",{className:"text-4xl lg:text-5xl lg:leading-10 font-semibold flex items-center justify-center w-fit"},e.leftIcon&&l.createElement("img",{src:e.leftIcon.asset.url||"/placeholder.svg",alt:"",className:"w-9 sm:w-12 h-9 sm:h-12 mr-2 object-contain"}),e.formTitle,e.rightIcon&&l.createElement("img",{src:e.rightIcon.asset.url||"/placeholder.svg",alt:"",className:"w-9 sm:w-12 h-9 sm:h-12 ml-2 object-contain"})),l.createElement("div",{className:"text-xl font-medium"},l.createElement(u.RK,{value:e._rawFormDescription})),e.formImage.asset&&l.createElement(n.G,{image:null==e||null===(a=e.formImage)||void 0===a||null===(t=a.asset)||void 0===t?void 0:t.gatsbyImageData,alt:(null==e||null===(o=e.formImage)||void 0===o?void 0:o.alt)||(null==e||null===(r=e.formImage)||void 0===r||null===(i=r.asset)||void 0===i?void 0:i.altText),objectFit:"contain",style:{width:"100%"}})),l.createElement("div",{className:"w-full lg:basis-7/12"},l.createElement(d,{data:e})))},h=t(3830);function x({location:e,data:a}){var t;return l.createElement(h.A,{location:e,data:null==a||null===(t=a.sanityContactPage)||void 0===t?void 0:t.seo})}var f=({data:e})=>{const a=e.sanityContactPage;return l.createElement("div",null,l.createElement(g,{data:a}))}}}]); 2//# sourceMappingURL=component---src-pages-contact-jsx-fbea64258ca9c48ab386.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.