PageSourceSearch

https://beacontrustee.co.in/build/assets/ContactSmall-9BUM_Yck.js

js beacontrustee.co.in collected 2026-10-05 04:00:28 UTC 6,094 bytes, 1 lines download raw bytes

1import{u as F,r as g,j as e}from"./app-BAKrTxXE.js";import{F as v,I as j,S as C,M as t,a as S,T as c,R as W}from"./JourneyContact-D3_Z93hy.js";import{k as u,T as R,B as A}from"./Button-CEFT3iJt.js";function P({service_list:M}){const{data:l,setData:o,post:_,processing:m,errors:E,reset:I,clearErrors:p}=F({service:"",first_name:"",last_name:"",email:"",phone:"",location:"",message:"",recaptcha:""}),[h,d]=g.useState({}),x=g.useRef(null),a=r=>h[r]||E[r]||"",s=r=>{const{name:i,value:b}=r.target;i==="phone"?o(i,b.replace(/\D/g,"").slice(0,10)):o(i,b),p(i),h[i]&&d(y=>({...y,[i]:""}))},k=r=>{o("recaptcha",r||""),p("recaptcha"),h.recaptcha&&d(i=>({...i,recaptcha:""}))},L=()=>{const r={};return l.service||(r.service="Please select a service"),l.first_name.trim()||(r.first_name="First name is required"),l.last_name.trim()||(r.last_name="Last name is required"),l.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l.email)||(r.email="Enter a valid email address"):r.email="Email is required",l.phone.trim()?/^\d{10}$/.test(l.phone)||(r.phone="Enter a valid 10 digit mobile number"):r.phone="Phone number is required",l.location||(r.location="Please select a location"),l.message.trim()||(r.message="Message is required"),l.recaptcha||(r.recaptcha="Please verify you are not a robot"),d(r),Object.keys(r).length===0},T=r=>{r.preventDefault(),L()&&_("/common/save_contact",{preserveScroll:!0,onSuccess:()=>{I(),d({}),x.current?.reset(),o("recaptcha","")},onError:()=>{x.current?.reset(),o("recaptcha","")}})},n={"& .MuiOutlinedInput-root":{backgroundColor:"#fff",borderRadius:"8px","& fieldset":{borderColor:"#d1d5db"},"&:hover fieldset":{borderColor:"#b5924d"},"&.Mui-focused fieldset":{borderColor:"#b5924d",borderWidth:"2px"}},"& .MuiInputLabel-root":{backgroundColor:"#fff",padding:"0 8px",borderRadius:"4px",color:"#6b7280",fontWeight:500},"& .MuiInputLabel-root.Mui-focused":{color:"#b5924d"},"& .MuiInputLabel-shrink":{backgroundColor:"#fff",padding:"0 8px",borderRadius:"4px"},"& .MuiFormHelperText-root":{marginLeft:0}},f={"& .MuiOutlinedInput-root":{backgroundColor:"#fff",borderRadius:"8px","& fieldset":{borderColor:"#d1d5db"},"&:hover fieldset":{borderColor:"#b5924d"},"&.Mui-focused fieldset":{borderColor:"#b5924d",borderWidth:"2px"}},"& .MuiInputLabel-root":{backgroundColor:"#fff",padding:"0 8px",borderRadius:"4px",color:"#6b7280",fontWeight:500},"& .MuiInputLabel-root.Mui-focused":{color:"#b5924d"},"& .MuiInputLabel-shrink":{backgroundColor:"#fff",padding:"0 8px",borderRadius:"4px"},"& .MuiSvgIcon-root":{color:"#6b7280"},"& .MuiFormHelperText-root":{marginLeft:0}};return e.jsxs("div",{className:"border lg:mt-24 mt-4 bg-black/40 border-white/20 rounded-3xl p-5 max-w-xl",children:[e.jsx("h2",{className:"text-2xl font-bold text-center text-[#e0ac3f] mb-4",children:"CONTACT US"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs(v,{fullWidth:!0,size:"small",error:!!a("service"),sx:f,children:[e.jsx(j,{id:"contact-small-service-label",children:"Select Service *"}),e.jsx(C,{name:"service",labelId:"contact-small-service-label",label:"Select Service *",value:l.service,onChange:s,children:M?.map(r=>e.jsx(t,{value:r.security_name,children:r.security_name},r.id))}),a("service")&&e.jsx(S,{children:a("service")})]}),e.jsx(c,{fullWidth:!0,size:"small",label:"First Name",name:"first_name",value:l.first_name,onChange:s,error:!!a("first_name"),helperText:a("first_name"),autoComplete:"given-name",sx:n}),e.jsx(c,{fullWidth:!0,size:"small",label:"Last Name",name:"last_name",value:l.last_name,onChange:s,error:!!a("last_name"),helperText:a("last_name"),autoComplete:"family-name",sx:n}),e.jsxs(v,{fullWidth:!0,size:"small",error:!!a("location"),sx:f,children:[e.jsx(j,{id:"contact-small-location-label",children:"Select Location *"}),e.jsxs(C,{name:"location",labelId:"contact-small-location-label",label:"Select Location *",value:l.location,onChange:s,children:[e.jsx(t,{value:"",children:"Select Location"}),e.jsx(t,{value:"Mumbai",children:"Mumbai"}),e.jsx(t,{value:"Ahmedabad",children:"Ahmedabad"}),e.jsx(t,{value:"Bangalore",children:"Bangalore"}),e.jsx(t,{value:"Chennai",children:"Chennai"}),e.jsx(t,{value:"Delhi",children:"Delhi"}),e.jsx(t,{value:"Hyderabad",children:"Hyderabad"}),e.jsx(t,{value:"IFSC_Gandhinagar",children:"IFSC Gandhinagar"}),e.jsx(t,{value:"Jaipur",children:"Jaipur"}),e.jsx(t,{value:"Pune",children:"Pune"}),e.jsx(t,{value:"Singapore",children:"Singapore"}),e.jsx(t,{value:"Dubai",children:"Dubai"}),e.jsx(t,{value:"Mauritius",children:"Mauritius"})]}),a("location")&&e.jsx(S,{children:a("location")})]}),e.jsx("div",{children:e.jsx(u,{sx:{display:"flex",justifyContent:{xs:"flex-start",md:"center"}},children:e.jsxs(u,{children:[e.jsx(u,{sx:{width:304*.82,height:78*.82,overflow:"hidden"},children:e.jsx(u,{sx:{transform:"scale(0.82)",transformOrigin:"0 0"},children:e.jsx(W,{ref:x,sitekey:"6Lc7MswrAAAAAGEvEodsAk-VUUNrPVHA9Ff_YEYh",onChange:k,onExpired:()=>o("recaptcha",""),onErrored:()=>o("recaptcha","")})})}),a("recaptcha")&&e.jsx(R,{sx:{color:"#ff8a80",fontSize:"11px",mt:.5,ml:.5},children:a("recaptcha")})]})})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(c,{fullWidth:!0,size:"small",label:"Email Address",name:"email",value:l.email,onChange:s,error:!!a("email"),helperText:a("email"),autoComplete:"email",sx:n}),e.jsx(c,{fullWidth:!0,size:"small",label:"Phone Number",name:"phone",value:l.phone,onChange:s,error:!!a("phone"),helperText:a("phone"),autoComplete:"tel",sx:n}),e.jsx(c,{fullWidth:!0,size:"small",multiline:!0,rows:3,label:"Message",name:"message",value:l.message,onChange:s,error:!!a("message"),helperText:a("message"),autoComplete:"off",sx:{...n,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#d1d5db"}}}),e.jsx(A,{fullWidth:!0,variant:"contained",disabled:m,onClick:T,"aria-label":m?"Submitting contact form":"Submit c
1ontact form",sx:{backgroundColor:"#b5924d",textTransform:"capitalize",height:"42px",fontWeight:600,"&:hover":{backgroundColor:"#6d531c"}},children:m?"Submitting...":"Submit"})]})]})]})}export{P as C};

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.