1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8626],{92476:function(e,t,a){var r=a(8946);a.o(r,"noop")&&a.d(t,{noop:function(){return r.noop}})},73227:function(e,t,a){var r=a(57437),n=a(4670),o=a(55327),i=a(96085),s=a.n(i),l=a(2265),c=a(82282),d=a.n(c),u=a(85446),p=a.n(u),h=a(26157),m=a.n(h),f=a(58824),x=a.n(f);t.Z=({options:e,label:t,helpText:a="",colSize:i=12,containerHeight:c,autoHeightPerBarPx:u=40,autoHeightMinPx:h=320,autoHeightMaxPx:f=5200,autoHeightPaddingPx:v=300,minPointWidthPx:b=30})=>{let g=(0,l.useRef)(!1);g.current||(g.current=!0,p()(d()),x()(d()),m()(d()));let j=(0,l.useRef)(null),[y,E]=(0,l.useState)(()=>Math.max(function(e){if(!e)return 0;if(Array.isArray(e)){let t=e[0];return Array.isArray(t?.categories)?t.categories.length:0}return Array.isArray(e.categories)?e.categories.length:0}(e.xAxis),function(e){if(!e||!("data"in e))return 0;let{data:t}=e;return Array.isArray(t)?t.length:0}(function(e){let t=e.series;if(Array.isArray(t)&&0!==t.length)return t[0]}(e)),1)),S=()=>{let e=j.current?.chart;if(!e)return;let t=function(e){let t=new Set;for(let a of(e.series??[]).filter(e=>!1!==e.visible))for(let e of a.points??[]){let a="string"==typeof e.name&&e.name||"string"==typeof e.category&&e.category||("number"==typeof e.category?String(e.category):"");a&&t.add(a)}let a=e.xAxis?.[0]?.categories?.length??0,r=e.yAxis?.[0]?.categories?.length??0;return Math.max(t.size,a,r,1)}(e);E(e=>e===t?e:t)},C=()=>{setTimeout(()=>requestAnimationFrame(S),0)},N=(0,l.useMemo)(()=>{let t=e.plotOptions?.bar?.pointWidth??0,a=e.plotOptions?.column?.pointWidth??0;return{...e,plotOptions:{...e.plotOptions,bar:{...e.plotOptions?.bar,pointWidth:Math.max(t,b)},column:{...e.plotOptions?.column,pointWidth:Math.max(a,b)}}}},[e,b]),w=(0,l.useMemo)(()=>{if(c)return c;let e=N?.chart?.type;if(!("bar"===e||"column"===e))return`${h}px`;let t=Math.min(f,Math.max(h,Math.max(y,1)*u+v));return`${t}px`},[N?.chart?.type,c,y,u,h,f,v]);return(0,l.useEffect)(()=>{let e=j.current?.chart;e&&(e.update(N,!0,!0),C())},[N]),(0,l.useEffect)(()=>{if(c)return;let e=j.current?.chart;if(!e)return;let t=function(e){let t=Number(String(e).replace("px","").trim());return Number.isFinite(t)?t:0}(w);t&&(e.setSize(void 0,t,!1),e.reflow())},[w,c]),(0,l.useEffect)(()=>{let e=j.current?.chart;if(!e)return;let t=function(){C()};return d().addEvent(e,"load",t),d().addEvent(e,"redraw",t),d().addEvent(e,"drilldown",t),d().addEvent(e,"afterDrilldown",t),d().addEvent(e,"drillup",t),d().addEvent(e,"afterDrillup",t),d().addEvent(e,"drillupall",t),()=>{d().removeEvent(e,"load",t),d().removeEvent(e,"redraw",t),d().removeEvent(e,"drilldown",t),d().removeEvent(e,"afterDrilldown",t),d().removeEvent(e,"drillup",t),d().removeEvent(e,"afterDrillup",t),d().removeEvent(e,"drillupall",t)}},[]),(0,r.jsx)(n.Z,{md:i,sm:"12",children:(0,r.jsxs)(o.Z,{children:[(0,r.jsxs)(o.Z.Title,{children:[t,""!==a?(0,r.jsx)("i",{className:"bi bi-question-circle",title:a,style:{cursor:"help"}}):null]}),(0,r.jsx)(o.Z.Body,{className:"p-0",children:(0,r.jsx)(s(),{ref:j,highcharts:d(),allowChartUpdate:!1,containerProps:{style:{height:w}},options:N})})]})})}},28626:function(e,t,a){a.r(t),a.d(t,{RawHTMLChart:function(){return $},default:function(){return T}});var r,n,o=a(57437),i=a(2265),s=a(53630),l=a(99737),c=a(24402),d=a(4670),u=a(24076),p=a(43786),h=a(21119),m=a(73203),f=a(34178),x=a(75481),v=a(51298),b=a(44104),g=a(79652),j=a(73227),y=a(10853),E=a(2559);let S=(0,E.Ps)` 2 query Enquete($cd: Long!) { 3 enqueteSingle(cdEnquete: $cd) { 4 CdEnquete 5 NmTitulo 6 IdImagem 7 DtPublicacaoInicial 8 DtPublicacaoFinal 9 StAberta 10 DmTipoValidacaoVoto 11 StExigeDocumento 12 StExibirResultado 13 CdEnqueteOpcaoVotada 14 Opcoes(order: { CdEnqueteOpcao: ASC }) { 15 CdEnqueteOpcao 16 NmEqueteOpcao 17 NuVotos 18 } 19 } 20 } 21`;var C=a(82282),N=a.n(C),w=a(50991),k=a(97875),A=a(26457),q=a(89087),V=a(42541),I=a(16779),_=a(99376);(r=n||(n={}))[r.VotoComSucesso=1]="VotoComSucesso",r[r.EnqueteEncerrada=2]="EnqueteEncerrada",r[r.InternautaNaoAutenticado=3]="InternautaNaoAutenticado",r[r.InternautaJaVotou=4]="InternautaJaVotou",r[r.InternautaSemDocumento=5]="InternautaSemDocumento",r[r.InternautaDocInvalido=6]="InternautaDocInvalido",r[r.IPJaVotou=7]="IPJaVotou",r[r.CaptchaInvalido=8]="CaptchaInvalido";let $=({series:e})=>{let t=(0,i.useMemo)(()=>e.reduce((e,t)=>
21t.value+e,0),[e]);return e.length>0&&(0,o.jsxs)("div",{className:"resultado",children:[(0,o.jsxs)("p",{className:"resultado_totalVotos",children:["Total de votos: ",t]}),(0,o.jsx)("div",{id:"div_resultado_valores",className:"resultado_valores",children:e.map(e=>(0,o.jsxs)("p",{children:[`${e.label} - ${e.value>0?Math.round(e.value/t*100):0}%`,(0,o.jsx)("img",{className:"ms-2",src:"/images/enq_result_barra.gif",style:{width:`${e.value>0?e.value/t*100:0}%`,height:"15px"},alt:`${e.label}`})]},e.id))})]})},O=({series:e,chartType:t})=>{let a=e.map(e=>[e.label,e.value||0]),r=e.map(e=>e.label),n=(0,i.useMemo)(()=>e.reduce((e,t)=>t.value+e,0),[e]);return(0,o.jsx)(j.Z,{colSize:12,options:{lang:{decimalPoint:",",thousandsSep:"."},chart:{plotShadow:!1,type:t},credits:{enabled:!1},title:{text:"Vota\xe7\xe3o"},subtitle:{text:"Total de votos: "+n},xAxis:{categories:r,title:{text:null}},yAxis:{min:0,title:{text:"",align:"high"},labels:{formatter:function(){let e=+this.value/n*100;return N().numberFormat(e,0,",")+"%"},overflow:"justify"}},tooltip:"pie"===t&&{pointFormat:"<b>{point.percentage:.1f}%</b>, {series.name}: {point.y}"}||void 0,plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0},bar:{dataLabels:{enabled:!0,formatter:function(){return 0===n?"0%":`${Math.round((this.y||0)/n*100)}%`}}}},legend:{enabled:"pie"===t},series:[{type:t,name:"Votos",colorByPoint:!0,data:a}]}})},D=({name:e,options:t,seriesData:a,isOpen:r,opcaoVotada:n})=>{let{fieldName:s,registerField:l}=(0,m.U$)(e),c=null!==n,d=(0,i.useRef)(n??void 0),[u,p]=(0,i.useState)(n??void 0);(0,i.useEffect)(()=>{null!==n&&(d.current=n,p(n))},[n]),(0,i.useEffect)(()=>
21{l({name:s,getValue:()=>d.current,clearValue:()=>{d.current=void 0,p(void 0)}})},[s,l]);let h=(0,i.useMemo)(()=>a?a.reduce((e,t)=>e+t.value,0):0,[a]),f=(0,i.useMemo)(()=>a&&a.length>0?Math.max(...a.map(e=>e.value)):0,[a]),x=e=>{if(!a||0===h)return 0;let t=a.find(t=>t.id===e);return t?Math.round(t.value/h*100):0};return(0,o.jsx)("div",{className:`poll-options${a?" poll-voted":""}`,children:t.map(e=>{let t=x(e.key),n=a?.find(t=>t.id===e.key),i=!!a&&n?.value===f&&f>0;return(0,o.jsxs)("label",{className:`poll-option${i?" is-winner":""}`,children:[r&&!a&&(0,o.jsx)("input",{type:"radio",name:s,value:e.value,checked:u===e.key,disabled:c,onChange:()=>{c||(d.current=e.key,p(e.key))}}),(0,o.jsx)("span",{className:"poll-option-label",children:e.label}),(0,o.jsxs)("span",{className:"poll-option-pct",children:[t,"%"]}),(0,o.jsx)("div",{className:"poll-option-bar",children:(0,o.jsx)("div",{className:"poll-option-fill",style:{width:`${t}%`}})})]},e.key)})})},R=e=>(0,x.Ry)({CdEnqueteOpcao:(0,x.Rx)().typeError("Selecione uma op\xe7\xe3o antes de votar.").required("O tipo \xe9 obrigat\xf3rio"),CaptchaToken:(0,x.Z_)().when([],{is:()=>e,then:e=>e.required("A resolu\xe7\xe3o do Captcha \xe9 obrigat\xf3ria").trim(),otherwise:e=>e.optional().notRequired().nullable()})}).required();var T=(0,i.forwardRef)(function({CdEnquete:e,Data:t,Init:a=!0,IdAtividade:r},n){let m="EnqueteID_"+e,[x,j]=(0,q.fP)([m]),E=r===s.AtividadesPublico.default.IdAtividade,[C,N]=(0,i.useState)(null),[$,T]=(0,i.useState)(!1),[Z,F]=i.useState([0,110]),[P,M]=i.useState("pie"),[L,z]=i.useState(0),[B,G]=(0,i.useState)(!1),W=(0,i.useMemo)(()=>`enquete_${e}_${r}`,[e,r]),H=(0,_.useRouter)(),{isAuthenticated:U,carregandoSessao:J}=(0,V.$)(),[K,Q]=(0,i.useState)(!1),[Y,X]=(0,i.useState)({isShown:!1}),[ee,et]=(0,i.useState)(t||null),[ea,er]=(0,i.useState)(null),[en,eo]=(0,i.useState)(null),ei=(0,i.useMemo)(()=>{if(null!==en)return en;let e=ee?.CdEnqueteOpcaoVotada;return null!=e?Number(e):null},[en,ee]),es=null!==ei,el=(0,i.useRef)(!0),[ec,{loading:ed}]=(0,I.t)(S,{notifyOnNetworkStatusChange:!1}),eu=(t,{isFilterEnabled:a,newestIdadesRange:r,newestDmSexo:n}={isFilterEnabled:!1})=>{t?.preventDefault();let o=new URLSearchParams;if(void 0!==a?a:$){let e=void 0!==n?n:L;void 0!==e&&e>0&&o.append("dmSexoInternauta",`${e}`);let t=r&&void 0!==r[0]&&r[0]||void 0!==Z[0]&&Z[0]||void 0;void 0!==t&&o.append("idadeInicial",`${t}`);let a=r&&void 0!==r[1]&&r[1]||void 0!==Z[1]&&Z[1]||void 0;void 0!==a&&o.append("idadeFinal",`${a}`)}w.W.Get(k.QP.enquete.resultado(e)+"?"+o.toString()).then(e=>{N(e.map(e=>({id:e.CdEnqueteOpcao,value:(void 0!==a?a:$)?e.NuVotosInternuata||0:e.NuVotosOpcao,label:e.NmEnqueteOpcao})))})};(0,i.useEffect)(()=>{!t&&a&&e&&el.current&&(el.current=!1,(async()=>{ec({variables:{cd:e}}).then(e=>{let t=e.data?.enqueteSingle?.[0];t&&(et(t),t.StAberta||eu())})})())}),(0,i.useEffect)(()=>{ee&&ee.DmTipoValidacaoVoto===h.px.Captcha&&!ea&&fetch(`/api/config/captcha/?idAtividade=${r}`).then(e=>e.json()).then(e=>er(e)).catch(()=>er({}))},[ee,ea,r]);let ep=i.useRef(null),eh=()=>{Y.closeCallback?.(),X({isShown:!1})},em=e=>{T(e.target.checked),eu(void 0,{isFilterEnabled:e.target.checked})},ef=(0,i.useRef)(-1),ex=e=>{F(e),clearTimeout(ef.current),ef.current=setTimeout(()=>eu(void 0,{isFilterEnabled:!0,newestIdadesRange:e}),500)},ev=e=>{z(parseInt(e.target.value,10)),eu(void 0,{isFilterEnabled:!0,newestDmSexo:parseInt(e.target.value,10)})};return ed&&(0,o.jsx)(y.Z,{})||(0,o.jsxs)("div",{ref:n,children:[(0,o.jsxs)(l.Z,{show:K,onHide:()=>Q(!1),centered:!0,children:[(0,o.jsx)(l.Z.Body,{children:(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(d.Z,{md:12,className:"text-center",children:(0,o.jsx)("i",{className:"bi bi-exclamation-triangle-fill",style:{fontSize:"3em",color:"#efa700"}})}),(0,o.jsxs)(d.Z,{md:12,className:"text-center",children:["Voc\xea precisa efetuar login para fazer a solicita\xe7\xe3o.",(0,o.jsx)(v.Z,{})]})]})}),(0,o.jsx)(l.Z.Footer,{children:(0,o.jsx)(u.Z,{variant:"primary",onClick:()=>Q(!1),children:"Ok"})})]}),(0,o.jsxs)(l.Z,{show:Y.isShown,onHide:()=>eh(),centered:!0,children:[(0,o.jsx)(l.Z.Body,{children:(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(d.Z,{md:12,className:"text-center",children:1===Y.status?(0,o.jsx)("i",{className:"bi bi-check-circle-fill",style:{fontSize:"3em",color:"#198754"}}):(0,o.jsx)("i",{className:"bi bi-exclamation-triangle-fill",style:{fontSize:"3em",color:"#efa700"}})}),(0,o.jsx)(d.Z,{md:12,className:"text-center",children:Y.message})]})}),(0,o.jsx)(l.Z.Footer,{children:(0,o.jsx)(u.Z,{variant:"primary",onClick:()=>eh(),children:"Ok"})})]}),ee&&(0,o.jsxs)(b.j,{Schema:R(ee.DmTipoValidacaoVoto===h.px.Captcha&&!!ea?.SiteKey),onSubmit:(t,{reset:a})=>{if(ee){if(ee.DmTipoValidacaoVoto===h.px.LoginInternauta&&!U){if(J)return;Q(!0)}ee.DmTipoValidacaoVoto!==h.px.LoginInternauta&&void 0!==x[m]&&X({isShown:!0,closeCallback:()=>a(),message:"A opera\xe7\xe3o foi cancelada. Voc\xea j\xe1 votou hoje nesta enquete.",status:4}),B||(G(!0),w.W.Post(k.QP.enquete.votar,{CdEnquete:e,CdEnqueteOpcao:t.CdEnqueteOpcao,CaptchaToken:t.CaptchaToken,
21CaptchaAction:W}).then(r=>{let n="Ocorreu um erro durante a opera\xe7\xe3o de voto. Tente novamente, ou caso o erro persista, entre em contato com o suporte.",o=A.Z;switch(r.data.status){case 1:if(n="A opera\xe7\xe3o foi realizada com \xeaxito. Agradecemos o seu voto.",ee.StExibirResultado&&eu(),o=()=>a(),(U||ee.DmTipoValidacaoVoto===h.px.LoginInternauta)&&void 0!==t.CdEnqueteOpcao&&eo(Number(t.CdEnqueteOpcao)),ee.DmTipoValidacaoVoto===h.px.LoginInternauta){let t=new Date;t.setDate(t.getDate()+1),t.setHours(0,0,0,0),j(m,`${e}`,{path:"/",expires:t,sameSite:!0})}break;case 2:n="Esta enquete est\xe1 encerrada.";break;case 3:n="Voc\xea precisa efetuar login para participar desta enquete.",Q(!0);return;case 4:n="Prezado internauta, voc\xea j\xe1 votou nesta enquete. \xc9 permitido participar apenas uma vez desta vota\xe7\xe3o.",o=()=>a();break;case 5:n=r.data.docsRequired.length>1?"Para participar desta vota\xe7\xe3o \xe9 necess\xe1rio cadastrar pelo menos um dos documentos: {0}.".replace("{0}",r.data.docsRequired.join(", ")):"Para participar desta vota\xe7\xe3o \xe9 necess\xe1rio cadastrar o documento {0}.".replace("{0}",r.data.docsRequired.join(", ")),o=()=>{H.push(s.AtividadesPublico.int_cad.Route)};break;case 6:n="Voc\xea n\xe3o est\xe1 autorizado a participar desta vota\xe7\xe3o. Entre em contato atrav\xe9s do Atendimento caso deseje participar desta enquete.",o=()=>a();break;case 7:n="A opera\xe7\xe3o foi cancelada. Voc\xea j\xe1 votou hoje nesta enquete.",o=()=>a();break;case 8:n="O c\xf3digo informado para o CAPTCHA \xe9 inv\xe1lido.",o=()=>a()}X({isShown:!0,closeCallback:o,message:n,status:r.data.status})}).finally(()=>G(!1)))}},ref:ep,children:[(0,o.jsxs)("div",{className:"poll-card",children:[(0,o.jsx)("div",{className:"poll-question",children:ee.NmTitulo}),(0,o.jsx)(D,{name:"CdEnqueteOpcao",options:(ee.Opcoes||[]).map(e=>({key:e.CdEnqueteOpcao,value:`${e.CdEnqueteOpcao}`,label:e.NmEqueteOpcao})),seriesData:C,isOpen:!!ee.StAberta,opcaoVotada:ei}),ee.StAberta&&ee.DmTipoValidacaoVoto===h.px.Captcha&&ea?.SiteKey&&(0,o.jsx)("div",{className:"mt-2",children:(0,o.jsx)(g.Z,{name:"CaptchaToken",action:W,siteKey:ea.SiteKey})}),(0,o.jsxs)("div",{className:"poll-actions",children:[ee.StAberta&&(0,o.jsxs)("button",{className:"poll-submit",type:"submit",disabled:B||es,children:[B&&(0,o.jsx)("span",{className:"spinner-border spinner-border-sm me-1",role:"status","aria-hidden":"true"}),B&&"Aguarde..."||es&&"Voc\xea j\xe1 votou"||"Votar"]}),ee.StExibirResultado&&ee.StAberta&&(0,o.jsx)("button",{className:"btn btn-link btn-sm p-0 ms-2 text-secondary",type:"button",onClick:eu,children:"Ver resultado parcial"}),C&&(0,o.jsxs)("span",{className:"poll-total ms-auto",children:[C.reduce((e,t)=>e+t.value,0).toLocaleString("pt-BR")," votos"]})]})]}),!E&&C&&(0,o.jsxs)("div",{className:"mt-3",children:[(0,o.jsxs)("div",{className:"grafico_filtros",children:[ee.DmTipoValidacaoVoto===h.px.LoginInternauta&&(0,o.jsxs)("label",{className:"selecao_dados_pessoais",htmlFor:`chk_filtrarDadosPessoais_${e}`,children:[(0,o.jsx)("input",{type:"checkbox",onChange:e=>em(e),checked:$,id:`chk_filtrarDadosPessoais_${e}`,title:"Permitir filtrar dados pelo perfil dos participantes"}),"Filtrar por perfil de participante"]}),$&&(0,o.jsxs)("div",{className:"dados_pessoais",children:[(0,o.jsx)("p",{children:"*Filtro se aplica somente aos participantes que informaram os dados pessoais"}),(0,o.jsxs)("label",{className:"sexo",children:[(0,o.jsx)("label",{htmlFor:`ddl_sexo_${e}`,children:"G\xeanero:"}),(0,o.jsxs)(p.Z,{id:`ddl_sexo_${e}`,className:"form-control",value:L&&`${L}`||void 0,onChange:e=>ev(e),children:[(0,o.jsx)("option",{value:"0",children:"Todos"}),(0,o.jsx)("option",{value:"1",children:"Masculino"}),(0,o.jsx)("option",{value:"2",children:"Feminino"})]})]}),(0,o.jsxs)("div",{id:"div_filtro_idade",className:"idade",children:[(0,o.jsx)("label",{htmlFor:`range_idade_${e}`,children:"Idade"}),(0,o.jsxs)("div",{id:`range_idade_${e}`,children:[(0,o.jsx)("span",{className:"div_filtro_idade_info",children:`Idade de ${Z[0]} a ${Z[1]} anos `}),(0,o.jsx)("div",{className:"mt-5",style:{display:"flex",justifyContent:"center",flexWrap:"wrap"},children:(0,o.jsx)(f.Range,{values:Z,step:1,min:0,max:110,onChange:e=>ex(e),renderTrack:({props:e,children:t})=>(0,o.jsx)("div",{onMouseDown:e.onMouseDown,onTouchStart:e.onTouchStart,style:{...e.style,height:"36px",display:"flex",width:"100%"}
21,children:(0,o.jsx)("div",{ref:e.ref,style:{height:"5px",width:"100%",borderRadius:"4px",background:(0,f.getTrackBackground)({values:Z,colors:["#ccc","#548BF4","#ccc"],min:0,max:110}),alignSelf:"center"},children:t})}),renderThumb:({index:e,props:t,isDragged:a})=>(0,i.createElement)("div",{...t,key:t.key,style:{...t.style,height:"42px",width:"42px",borderRadius:"4px",backgroundColor:"#FFF",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 6px #AAA"},children:[(0,o.jsx)("div",{style:{position:"absolute",top:"-28px",color:"#fff",fontWeight:"bold",fontSize:"14px",fontFamily:"Arial,Helvetica Neue,Helvetica,sans-serif",padding:"4px",borderRadius:"4px",backgroundColor:"#548BF4"},children:Z[e].toFixed(0)}),(0,o.jsx)("div",{style:{height:"16px",width:"5px",backgroundColor:a?"#548BF4":"#CCC"}})]})})})]})]})]}),(0,o.jsx)("div",{children:(0,o.jsxs)("label",{className:"tipo_grafico",children:[(0,o.jsx)("label",{htmlFor:`ddl_tipoGrafico_${e}`,children:"Tipo de Gr\xe1fico"}),(0,o.jsxs)(p.Z,{className:"form-control",id:`ddl_tipoGrafico_${e}`,value:P,onChange:e=>M(e.target.value),children:[(0,o.jsx)("option",{value:"bar",children:"Barras"}),(0,o.jsx)("option",{value:"pie",children:"Pizza"})]})]})})]}),(0,o.jsx)(O,{series:C,chartType:P})]})]})]})})},79652:function(e,t,a){var r=a(57437),n=a(2265),o=a(40745),i=a(54320),s=a(73203);t.Z=({name:e,action:t,siteKey:a,onCaptchaSolved:l})=>{let c=(0,n.useRef)(),d=(0,n.useRef)(null),u=(0,n.useRef)(null),{fieldName:p,registerField:h,error:m}=(0,s.U$)(e),f=(0,n.useContext)(o.Z);if(null==f)throw Error("GLOBAL_APP_CONTEXT_MISSING");let x=(0,n.useCallback)(e=>{u.current&&(u.current.value=e),"function"==typeof l&&l(e)},[l]),v=(0,n.useCallback)(()=>{d.current&&window.grecaptcha&&void 0===c.current&&(c.current=window.grecaptcha.enterprise.render(d.current,{sitekey:a,callback:x,action:t}).toString())},[t,x,a]);return(0,n.useEffect)(()=>{f.initCaptchaDependencies(v)},[f,v]),(0,n.useEffect)(()=>{h({name:p,ref:u,getValue:e=>e.current?.value,setValue(e,t){e.current&&(e.current.value=t||"")},clearValue(e){e.current&&(e.current.value=""),window.grecaptcha&&void 0!==c.current&&window.grecaptcha.enterprise.reset(parseInt(c.current,10))}})},[p,h]),(0,r.jsxs)("div",{className:"form-group mb-2",children:[(0,r.jsx)("div",{ref:d,id:`captcha_wrapper_${(0,i.uniqueId)()}`}),(0,r.jsx)("input",{name:e,ref:u,type:"hidden",className:m&&"is-invalid"||""}),m&&m.split("\n").map(e=>(0,r.jsx)("div",{className:"invalid-feedback",children:e},`error_message_${(0,i.uniqueId)()}`))]})}},66468:function(e,t,a){var r=a(57437);t.Z=({errors:e,title:t="Erro de Validacao!",description:a="Verifique os campos obrigatorios marcados em vermelho:",dismissible:n=!0,className:o,...i})=>{let s=Object.values(e||{}).filter(Boolean);return 0===s.length?null:(0,r.jsxs)("aside",{className:`alert alert-danger alert-dismissible fade show ${o||""}`,role:"alert",...i,children:[(0,r.jsx)("strong",{children:t})," ",a,(0,r.jsx)("ul",{className:"mb-0",children:s.map((e,t)=>(0,r.jsx)("li",{children:e},`validation-error-item-${t}`))}),n&&(0,r.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"alert","aria-label":"Close"})]})}},10221:function(e,t,a){a.d(t,{j:function(){return u}});var r=a(57437),n=a(75481),o=a(2265),i=a(4908),s=a(24402),l=a(26139),c=a(61631),d=a(92476);let u=(0,o.forwardRef)(({children:e,onSubmit:t,Schema:a,onValidationErros:u=d.noop,...p},h)=>{let m=(0,o.useRef)(null),f=e=>{m.current?.setErrors({}),m.current?.reset(e)};(0,o.useImperativeHandle)(h,()=>({...m.current||{},resetDataAndErrors:f}));let x=async function(e,r,o){try{u(null);let n=null!=a&&await a.validate(e,{stripUnknown:!0,strict:!1,abortEarly:!1,context:{currentData:e}})||e;m.current?.setErrors({}),t(n,r,o)}catch(t){let e={};t instanceof n.p8?(t.inner.forEach(t=>{t.path&&(e[t.path]=t.message)}),m.current&&m.current.setErrors(e),u(e),c.k.log("Yup.ValidationError: ",{err:t,validationErrors:e})):t instanceof Error?c.k.error("VALIDATION FAILS",t.message):c.k.error("VALIDATION FAILS IN GENERIC WAY",t)}};return(0,r.jsx)(l.l,{...p,ref:m,onSubmit:x,children:(0,r.jsx)(i.gz,{value:{Schema:a,FormRef:m},children:(0,r.jsx)(s.Z,{children:e})})})})},44104:function(e,t,a){a.d(t,{j:function(){return r.j},u:function(){return n.Z}});var r=a(10221),n=a(66468)},4908:function(e,t,a){a.d(t,{gz:function(){return n}});let r=a(2265).createContext({}),n=r.Provider;r.Consumer,t.ZP=r},40745:function(e,t,a){a.d(t,{m:function(){return d}});var r=a(57437),n=a(2265),o=a(48667),i=a(56184),s=a(54320);let l=n.createContext({}),c=l.Provider,d=({children:e})=>
21{let[t,a]=(0,n.useState)(),l=(0,n.useRef)(`gCaptcha_callback_${(0,s.uniqueId)()}`),d=(0,n.useRef)(!1),u=(0,n.useRef)([]),[p,h]=(0,n.useState)(!1),m=(0,n.useCallback)(()=>{d.current=!0,u.current.forEach(e=>e()),u.current=[]},[]),f=(0,n.useCallback)(e=>{d.current?e():u.current.includes(e)||u.current.push(e),h(!0)},[]);return(0,n.useEffect)(()=>{let e=l.current;return window[e]=m,()=>{delete window[e]}},[m]),(0,n.useEffect)(()=>{fetch(i.v6).then(e=>e.json()).then(e=>a(e))},[]),(0,r.jsxs)(c,{value:{initCaptchaDependencies:f,GeralConfig:t},children:[p&&(0,r.jsx)(o.default,{src:`https://www.google.com/recaptcha/enterprise.js?onload=${l.current}&render=explicit`,strategy:"afterInteractive"}),e]})};t.Z=l}}]);
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.