PageSourceSearch

https://www.brasas.com.br/_frsh/js/94ea031ad3cfd1279dfd8d40d3ce7466cf8463f8/chunk-2KNXYGFS.js

js brasas.com.br collected 2026-09-27 09:06:49 UTC 4,891 bytes, 7 lines download raw bytes

1import{a as G}from"./chunk-Q2PMERDE.js";import{a as r,b as D,c as M,e as P,f as j,g as B}from"./chunk-45ZTDV7B.js";import{a as A,b as F}from"./chunk-KXAJ3EFO.js";import{a as l,b as y}from"./chunk-ALRN7ENX.js";import{a as e}from"./chunk-X6IOVEKU.js";import{d as N}from"./chunk-6QKRXUVD.js";function d({label:a,value:s,checked:i=!1,onChange:g,name:n}){return e("div",{className:"flex gap-2",children:[e("input",{type:"checkbox",name:n,value:s,checked:i,onChange:m=>g?.(m.target.checked)}),e("label",{className:"text-base font-normal text-black-500 leading-6",children:a})]})}var W={HomeForm:{TextInputs:[{label:"Full Name",placeholder:"Enter your name"},{label:"Celphone/Whatsapp",placeholder:"(dd) xxxxx-xxxx"},{label:"E-mail",placeholder:"Enter your email"}],SelectInputs:[{label:"State",placeholder:"Select a state",options:[{name:"Rio de Janeiro",value:"rj"},{name:"Distrito Federal",value:"df"},{name:"Esp\xEDrito Santo",value:"es"},{name:"Goi\xE1s",value:"go"},{name:"Minas Gerais",value:"mg"},{name:"S\xE3o Paulo",value:"sp"},{name:"I'm a foreigner",value:"foreigner"}]}],AcceptTerm:"I AGREE TO RECEIVE BRASAS OFFERS AND COMMUNICATIONS THROUGH?",CommunicationOptions:[{name:"Whatsapp",value:"whatsapp"},{name:"Phone",value:"telefone"},{name:"E-mail",value:"email"}],SendButtonText:"Submit"}};var H={HomeForm:{TextInputs:[{label:"Nome Completo",placeholder:"Insira seu nome"},{label:"Celular/Whatsapp",placeholder:"(dd) xxxxx-xxxx"},{label:"E-mail",placeholder:"Insira seu e-mail"}],SelectInputs:[{label:"Estado",placeholder:"Selecione um estado",options:[{name:"Rio de Janeiro",value:"rj"},{name:"Distrito Federal",value:"df"},{name:"Esp\xEDrito Santo",value:"es"},{name:"Goi\xE1s",value:"go"},{name:"Minas Gerais",value:"mg"},{name:"S\xE3o Paulo",value:"sp"},{name:"Sou Estrangeiro",value:"foreigner"}]}],AcceptTerm:"CONCORDO EM RECEBER COMUNICA\xC7\xD5ES DE OFERTAS DO BRASAS ATRAV\xC9S DE?",CommunicationOptions:[{name:"Whatsapp",value:"whatsapp"},{name:"Telefone",value:"telefone"},{name:"E-mail",value:"email"}],SendButtonText:"Enviar"}};function X(a){let[s,i]=l("pt-BR");y(()=>{let t=A("language");if(!t){let o=navigator.language||navigator.languages[0];F(o)}i(t)},[]);let n=s==="pt-BR"?H:W,m=[{name:"Rio de Janeiro",value:"rj"},{name:"Distrito Federal",value:"df"},{name:"Esp\xEDrito Santo",value:"es"},{name:"Goi\xE1s",value:"go"},{name:"Minas Gerais",value:"mg"},{name:"S\xE3o Paulo",value:"sp"},{name:"Sou Estrangeiro",value:"foreigner"}],[V,f]=l(!1),[h,x]=l(""),[v,b]=l(""),[S,E]=l(""),[C,I]=l(""),[c,k]=l({}),[R,u]=l(""),[$,T]=l(null),[q,O]=l(!1),[w,L]=l(null),J=(t,o)=>{k(p=>({...p,[t]:o})),u("")},U=`
2  Nome: ${h}
3  Email: ${v}
4  Telefone: ${S}
5  Estado: ${C}
6  Op\xE7\xF5es Selecionadas: ${Object.keys(c)}
7`,z=async t=>{if(t.preventDefault(),$===null){O(!0);return}if(!Object.values(c).some(p=>p)){u("Selecione pelo menos uma op\xE7\xE3o de comunica\xE7\xE3o");return}await D.site.actions.sendEmail({RecipientsEmailArr:a.RecipientsEmailArr,CopyToArr:a.CopyToArr,subject:a.subject,data:U})===200&&f(!0),u(""),x(""),b(""),E(""),I(""),k({}),O(!1),window.grecaptcha&&w!==null&&(window.grecaptcha.reset(w),T(null))};return e(N,{children:[e("section",{className:"relative flex justify-center",children:e("form",{id:"home-page-form",onSubmit:t=>z(t),className:"absolute z-40 -top-28 bg-white flex flex-col items-center gap-8 border-gray-100 rounded-2xl p-8 xl:min-w-[55rem]",children:[e("span",{className:"font-bold text-xl",children:a.formTitle}),e("div",{className:"w-full grid grid-cols-1 xl:grid-cols-2 gap-x-8 gap-y-4",children:[e(r,{label:a.nameInput.label,placeholder:a.nameInput.placeholder,value:h,setValue:x,mask:j,required:!0,name:"name"}),e(r,{label:a.telInput.label,placeholder:a.telInput.placeholder,value:S,setValue:E,required:!0,type:"tel",maxLength:15,mask:B,name:"phone"}),e(r,{label:a.emailInput.label,placeholder:a.emailInput.placeholder,value:v,setValue:b,required:!0,type:"email",name:"email"}),e(G,{label:a.stateInput.label,placeholder:a.stateInput.placeholder,options:m,bgColor:"gray",onChangeFunction:I,value:C,required:!0,name:"estado"})]}),e("div",{className:"flex flex-col w-full items-start gap-2",children:[e("span",{className:"text-sm font-semibold text-black-500 uppercase leading-6",children:a.acceptanceTermText}),e("div",{className:"flex flex-col xl:flex-row xl:items-center gap-2 xl:gap-8",children:n.HomeForm.CommunicationOptions.map(t=>e(d,{label:t.name,value:t.value,name:"comunicacao",checked:c[t.value]||!1,onChange:o=>J(t.value,o)},t.value))}),R&&e("p",{className:"text-red-500 text-sm mt-1",children:R})]}),e(P,{setToken:T,setWidgetId:L,warnRecaptcha:q}),e("button",{className:"bg-blue-300 text-white hover:bg-white hover:text-blue-300 transition duration-300 border border-transparent hover:border-blue-300 rounded-lg w-full xl:w-fit px-6 py-3",children:n.HomeForm.SendButtonText})]})}),V&&e(M,{onClose:()=>f(!1)})]})}export{X as a};

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.