1import{u as De,c6 as ct,br as ft,j as e,S as xt,c7 as ht,b as pt,c8 as gt,c9 as ut,bU as mt,c0 as bt,ca as jt,cb as vt,cc as yt,cd as St,r as Q,c2 as fe,s as Ct,c3 as kt,ce as zt,cf as wt,am as Te,an as We,b0 as Be,b1 as It,cg as Rt,ch as L,ci as ee}from"./index--siChAZm.js";import{u as At,r as s,L as B}from"./react-vendor-B-clOVnp.js";import{X as Fe,G as oe,C as Et,a as Pt,H as Dt,ab as Le,bt as we,t as w,ci as Tt,r as C,i as He,aF as xe,aa as $e,w as E,$ as Ie,p as Wt,n as Bt,s as he,bs as Ne,aA as Ft}from"./icons-BCLA8W0j.js";import{A as Lt}from"./AvaliarEmpresasPendentesDrawer-5I_WcJFk.js";import{A as Ht}from"./AgendamentoDrawer-tnvdH6Yl.js";import{C as $t}from"./ChatDrawer-CxtfCn__.js";import{S as Nt,L as Vt}from"./LoadingValue-BuFAzSIi.js";import{C as Ot}from"./CardPendenciasFreelancer-BUptHnr_.js";import{S as Mt}from"./SuporteChatDrawer-DPVceAZX.js";import{E as _t}from"./EntrevistaCltConfirmacao-B0jTHBH_.js";import{f as Ut}from"./dataHoraBrasil-CF_Rw_UK.js";import{C as Ve}from"./Circle-CRzbH3Dh.js";import{u as Jt}from"./hooks-QKnm-Iwc.js";import"./CancelarTrabalhoModal-DeiP10nl.js";import"./ImageLightbox-Br-jnYUy.js";import"./textoNegrito-Cf8JeTGw.js";import"./circle-CTTQ_XKB.js";const A="#031D44",te="#00DBEB";function Yt({aberto:a,onFechar:i,onResgatado:n}){const{token:r}=De(),g=At(),b=s.useRef(null),[c,y]=s.useState(null),[j,u]=s.useState(""),[v,P]=s.useState(!1),[D,U]=s.useState(!1),[J,Y]=s.useState(!1);if(s.useEffect(()=>{if(!a||!r)return;let k=!1;return y(null),u(""),P(!1),Y(!1),(async()=>{const W=await ct(r);k||W?.video?.disponivel&&(y(W.video),u(W.slot||""))})(),()=>{k=!0}},[a,r]),!a)return null;const I=c?.tipo==="link",$=I?ft(c.urlExterna):null,Z=c&&(!I||I&&!$),se=c?I?c.urlExterna:c?.url?`${c.url}?token=${encodeURIComponent(r)}`:"":"";function re(){j&&ht(r,j)}function T(){b.current&&(P(!0),b.current.play().catch(()=>P(!1)))}async function ne(){if(!(D||!await pt({titulo:"Resgatar seu presente",mensagem:"Você vai ativar 30 dias do plano Profissional de cortesia agora. A contagem dos 30 dias começa imediatamente. Deseja continuar?",textoConfirmar:"Resgatar agora",textoCancelar:"Agora não"}))){U(!0);try{await gt(r),Y(!0),n?.()}catch(W){await ut(W.message||"Não foi possÃvel resgatar o presente.")}finally{U(!1)}}}function q(){i?.(),g("/minha-jornada")}return e.jsxs("div",{onClick:k=>{k.target===k.currentTarget&&i?.()},style:{position:"fixed",inset:0,zIndex:1e5,background:"rgba(3, 29, 68, 0.82)",display:"flex",alignItems:"center",justifyContent:"center",padding:16,animation:"pjFadeIn 180ms ease-out"},children:[e.jsx("style",{children:` 2 @keyframes pjFadeIn { from { opacity: 0 } to { opacity: 1 } } 3 @keyframes pjPopIn { from { transform: scale(0.96); opacity: 0 } to { transform: scale(1); opacity: 1 } } 4 `}),e.jsxs("div",{style:{background:"#fff",borderRadius:20,maxWidth:400,width:"100%",padding:"18px 18px 20px",boxShadow:"0 20px 60px rgba(0,0,0,0.4)",animation:"pjPopIn 220ms ease-out",maxHeight:"94vh",overflowY:"auto",position:"relative"},children:[e.jsx("button",{onClick:()=>i?.(),"aria-label":"Fechar",style:{position:"absolute",top:10,right:10,zIndex:2,background:"rgba(3,29,68,0.06)",border:"none",cursor:"pointer",width:34,height:34,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(Fe,{size:18,color:A})}),J?e.jsxs("div",{style:{textAlign:"center",padding:"8px 4px"},children:[e.jsx(Pt,{size:56,color:"#16a34a",style:{margin:"4px auto 12px"}}),e.jsx("strong",{style:{display:"block",fontSize:18,color:A,marginBottom:6},children:"Presente resgatado!"}),e.jsxs("p",{style:{margin:"0 0 18px",fontSize:14,lineHeight:1.5,color:"#374151"},children:["Você agora tem ",e.jsx("strong",{children:"30 dias do plano Profissional"}),". Conheça a Jornada PRO e dê o primeiro passo rumo ao seu primeiro trabalho."]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[e.jsx("button",{onClick:q,style:{background:te,color:A,border:"none",padding:"14px 16px",borderRadius:12,fontSize:15.5,fontWeight:800,cursor:"pointer"},children:"Conhecer a jornada"}),e.jsx("button",{onClick:()=>
4i?.(),style:{background:"#fff",color:A,border:"2px solid #e2e8f0",padding:"12px 16px",borderRadius:12,fontSize:15,fontWeight:700,cursor:"pointer"},children:"Fechar"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[e.jsx(oe,{size:22,color:te}),e.jsx("strong",{style:{fontSize:16,color:A},children:"Um presente pra você"})]}),c&&e.jsxs("div",{style:{background:"#0B1220",borderRadius:14,aspectRatio:"9 / 16",position:"relative",overflow:"hidden",marginBottom:14,border:"1px solid #e2e8f0",display:"flex",alignItems:"center",justifyContent:"center",maxWidth:320,marginLeft:"auto",marginRight:"auto",width:"100%"},children:[I&&$&&e.jsx("iframe",{src:$,title:"Convite Jornada PRO",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,style:{width:"100%",height:"100%",border:0}}),Z&&e.jsxs(e.Fragment,{children:[e.jsx("video",{ref:b,src:se,controls:v,playsInline:!0,onEnded:re,onPlay:()=>P(!0),style:{width:"100%",height:"100%",objectFit:"contain",background:"#000",display:v?"block":"none"}}),!v&&e.jsx("button",{onClick:T,"aria-label":"Reproduzir vÃdeo",style:{background:te,border:"none",cursor:"pointer",width:72,height:72,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 8px 20px rgba(0,219,235,0.35)",position:"absolute"},children:e.jsx(Et,{size:42,color:"#fff",strokeWidth:1.6})})]})]}),e.jsxs("p",{style:{margin:"0 0 16px",fontSize:14,lineHeight:1.5,color:A,textAlign:"center"},children:["Você ganhou ",e.jsx("strong",{children:"30 dias do plano Profissional"})," de cortesia para começar a se candidatar e conquistar seu primeiro trabalho."]}),e.jsx("button",{onClick:ne,disabled:D,style:{background:te,color:A,border:"none",padding:"14px 16px",borderRadius:12,fontSize:15.5,fontWeight:800,cursor:D?"not-allowed":"pointer",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:8,opacity:D?.7:1},children:D?e.jsxs(e.Fragment,{children:[e.jsx(xt,{size:16,color:A})," Resgatandoâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{size:18})," Aceitar presente"]})})]})]})]})}const Zt="#031D44",qt="#00C4D4";function Gt({token:a}){const[i,n]=s.useState(!1),[r,g]=s.useState(0),[b,c]=s.useState(!1),y=s.useRef(!0),j=s.useCallback(async()=>{if(a)try{const u=await mt(a);if(!y.current)return;const v=!!u.conversa?.aberta;n(v),g(v&&u.naoLidas||0)}catch{}},[a]);return s.useEffect(()=>{y.current=!0,j();let u=null;const v=()=>{document.visibilityState==="visible"&&j(),u=setTimeout(v,2e4)};return u=setTimeout(v,2e4),()=>{y.current=!1,u&&clearTimeout(u)}},[j]),!i&&!b?null:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>c(!0),style:Kt,"aria-label":"Abrir chat de suporte",title:"Suporte",children:[e.jsx(Dt,{size:24,color:"#fff"}),r>0&&e.jsx("span",{style:Xt,children:r>9?"9+":r})]}),e.jsx(Mt,{aberto:b,perfil:"freelancer",token:a,tituloParte:"Suporte FreelaCerto",onFechar:()=>{c(!1),j()},onMudou:j})]})}const Kt={position:"fixed",right:18,bottom:86,zIndex:250,width:56,height:56,borderRadius:"50%",background:Zt,border:`2px solid ${qt}`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 6px 18px rgba(3,29,68,0.35)"},Xt={position:"absolute",top:-4,right:-4,minWidth:20,height:20,padding:"0 5px",borderRadius:999,background:"#ef4444",color:"#fff",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff"},f="#031D44",m="#00C4D4",ae=a=>Number(a||0).toLocaleString("pt-BR",{style:"currency",currency:"BRL"}),M=a=>a?new Date(a).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):null,Re=(()=>{const a=new Date;return a.setDate(a.getDate()+7),a.setHours(18,0,0,0),a})();function Oe(){const a=Jt();return s.useEffect(()=>{const i=setTimeout(()=>a.invalidateSize(),50);return()=>clearTimeout(i)},[a]),null}const Me=It.divIcon({className:"",html:`<div class="radar-wrapper"> 5 <div class="radar-ring radar-ring-1"></div> 6 <div class="radar-ring radar-ring-2"></div> 7 <div class="radar-ring radar-ring-3"></div> 8 <div class="radar-dot"></div> 9 </div>`,iconSize:[180,180],iconAnchor:[90,90]});
9function _e({lat:a,lng:i,onInfoClick:n}){const r=s.useMemo(()=>[a,i],[a,i]);return e.jsxs("div",{onClick:n,style:{borderRadius:12,overflow:"hidden",border:"1px solid #d1fae5",marginBottom:16,boxShadow:"0 2px 8px rgba(0,196,212,0.10)",cursor:"pointer",isolation:"isolate"},children:[e.jsx("div",{style:{position:"relative",height:190},children:e.jsxs(Te,{center:r,zoom:9,style:{height:190,width:"100%"},scrollWheelZoom:!1,zoomControl:!1,attributionControl:!1,dragging:!1,doubleClickZoom:!1,touchZoom:!1,keyboard:!1,children:[e.jsx(We,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),e.jsx(Ve,{center:r,radius:25e3,pathOptions:{color:m,fillColor:m,fillOpacity:.22,weight:2,opacity:.55}}),e.jsx(Be,{position:r,icon:Me}),e.jsx(Oe,{})]})}),e.jsxs("div",{style:{background:"#f0fdf4",padding:"8px 14px",display:"flex",alignItems:"center",gap:10,borderTop:"1px solid #d1fae5"},children:[e.jsx("span",{className:"radar-status-dot"}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#065f46",lineHeight:1.2},children:"Online"}),e.jsx("div",{style:{fontSize:11,color:"#6b7280",lineHeight:1.2},children:"Você está recebendo oportunidades nesta área"})]}),e.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:4,color:"#00C4D4",flexShrink:0},"aria-label":"Entender como funciona",children:e.jsx(Ft,{size:18})})]})]})}function Qt({lat:a,lng:i,onFechar:n}){const r=s.useMemo(()=>[a,i],[a,i]);return e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:n,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.45)",zIndex:1200}}),e.jsxs("div",{style:{position:"fixed",bottom:0,left:"50%",transform:"translateX(-50%)",width:"100%",maxWidth:600,maxHeight:"90vh",background:"#fff",borderRadius:"18px 18px 0 0",zIndex:1201,display:"flex",flexDirection:"column"},children:[e.jsxs("div",{style:{flexShrink:0},children:[e.jsx("div",{style:{display:"flex",justifyContent:"center",paddingTop:10},children:e.jsx("div",{style:{width:36,height:4,borderRadius:2,background:"#d1d5db"}})}),e.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"4px 14px 0"},children:e.jsx("button",{onClick:n,style:{background:"none",border:"none",cursor:"pointer",padding:4},children:e.jsx(Fe,{size:20,color:"#6b7280"})})})]}),e.jsxs("div",{style:{overflowY:"auto",flex:1,minHeight:0},children:[e.jsx("div",{style:{height:220,flexShrink:0,margin:"12px 0 0"},children:e.jsxs(Te,{center:r,zoom:9,style:{height:220,width:"100%"},scrollWheelZoom:!1,zoomControl:!1,attributionControl:!1,dragging:!1,doubleClickZoom:!1,touchZoom:!1,keyboard:!1,children:[e.jsx(We,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),e.jsx(Ve,{center:r,radius:25e3,pathOptions:{color:m,fillColor:m,fillOpacity:.22,weight:2,opacity:.55}}),e.jsx(Be,{position:r,icon:Me}),e.jsx(Oe,{})]})}),e.jsxs("div",{style:{padding:"20px 18px 36px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#f0fdf4",border:"1px solid #bbf7d0",borderRadius:10,padding:"10px 14px",marginBottom:20},children:[e.jsx("span",{className:"radar-status-dot",style:{flexShrink:0}}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#065f46"},children:"Você está ativo e apto!"}),e.jsx("div",{style:{fontSize:12,color:"#374151"},children:"Seu cadastro foi aprovado e você já está recebendo oportunidades dentro desta área."})]})]}),e.jsxs("div",{style:{marginBottom:18},children:[e.jsx("div",{style:{fontSize:14,fontWeight:700,color:f,marginBottom:6},children:"ð Não é um catálogo de vagas"}),e.jsxs("div",{style:{fontSize:13,color:"#374151",lineHeight:1.6},children:["O FreelaCerto ",e.jsx("strong",{children:"não é um portal onde você precisa buscar vagas em uma lista"}),". Aqui o sistema funciona ao contrário: assim que uma empresa publicar uma vaga na(s) profissão(ões) que você configurou e deixou ativa no perfil, a oportunidade chegará automaticamente até você."]})]}),e.jsxs("div",{style:{marginBottom:18},children:[e.jsx("div",{style:{fontSize:14,fontWeight:700,color:f,marginBottom:6},children:"ð Ative as notificações"}),e.jsxs("div",{style:{fontSize:13,color:"#374151",lineHeight:1.6},children:["Recomendamos manter as notificações push ativadas. As propostas chegam em tempo real e ",e.jsx("strong",{children:"profissionais que se candidatam mais rápido têm maior chance de ser escolhidos"})," pela empresa."]})]}),e.jsxs("div",{style:{background:"linear-gradient(135deg, #031D44 0%, #00C4D4 100%)",borderRadius:10,padding:"12px 14px",marginBottom:18,display:"flex",alignItems:"flex-start",ga
9p:10},children:[e.jsx("span",{style:{fontSize:20,flexShrink:0},children:"â"}),e.jsxs("div",{style:{fontSize:13,color:"#fff",lineHeight:1.6},children:[e.jsx("strong",{children:"Freelancers PRO recebem as vagas antes"})," e têm prioridade de visualização por parte dos contratantes."]})]}),e.jsxs("div",{style:{background:"#fffbeb",border:"1px solid #fde68a",borderRadius:10,padding:"12px 14px"},children:[e.jsx("div",{style:{fontSize:14,fontWeight:700,color:"#92400e",marginBottom:8},children:"ð Entenda o processo"}),e.jsxs("div",{style:{fontSize:13,color:"#374151",lineHeight:1.7},children:["Ao receber uma proposta, ",e.jsx("strong",{children:"você ainda não foi selecionado"}),". O fluxo é:"]}),e.jsx("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:6},children:[["1","Você recebe a proposta e se candidata"],["2","A empresa analisa os candidatos e escolhe"],["3","Após a seleção, o trabalho é confirmado e você tem o compromisso"]].map(([g,b])=>e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:10},children:[e.jsx("span",{style:{width:22,height:22,borderRadius:"50%",background:m,color:"#fff",fontSize:11,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:1},children:g}),e.jsx("span",{style:{fontSize:13,color:"#374151",lineHeight:1.5},children:b})]},g))})]})]})]})]})]})}function ea({nome:a}){const i={background:"linear-gradient(90deg,#f3f4f6 0%,#e5e7eb 50%,#f3f4f6 100%)",backgroundSize:"200% 100%",animation:"lvShimmer 1.4s ease-in-out infinite",borderRadius:6};return e.jsxs("div",{style:{paddingBottom:100},children:[e.jsxs("div",{style:Ye,children:[e.jsx(Le,{size:18,color:m}),e.jsxs("h1",{style:{margin:0,fontSize:17},children:["Olá, ",a,"!"]})]}),e.jsxs("div",{style:{borderRadius:12,overflow:"hidden",border:"1px solid #d1fae5",marginBottom:16,boxShadow:"0 2px 8px rgba(0,196,212,0.10)"},children:[e.jsx("div",{style:{...i,height:190,borderRadius:0}}),e.jsxs("div",{style:{background:"#f0fdf4",padding:"8px 14px",display:"flex",alignItems:"center",gap:10,borderTop:"1px solid #d1fae5"},children:[e.jsx("div",{style:{...i,width:10,height:10,borderRadius:"50%",flexShrink:0}}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5},children:[e.jsx("div",{style:{...i,height:12,width:52}}),e.jsx("div",{style:{...i,height:10,width:210}})]})]})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:10,marginBottom:18},children:[f,m].map((n,r)=>e.jsxs("div",{style:{background:"#fff",padding:12,borderRadius:8,border:"1px solid #e5e7eb",borderLeft:`4px solid ${n}`},children:[e.jsx("div",{style:{...i,height:10,width:"65%",marginBottom:10}}),e.jsx("div",{style:{...i,height:26,width:"30%"}})]},r))}),e.jsxs("div",{style:{marginBottom:18},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[e.jsx("div",{style:{...i,height:11,width:220}}),e.jsx("div",{style:{...i,height:11,width:55}})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[0,1].map(n=>e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",padding:12,background:"#fff",border:"1px solid #e5e7eb",borderRadius:10},children:[e.jsxs("div",{style:{width:50,display:"flex",flexDirection:"column",alignItems:"center",gap:4,borderRight:"1px solid #f3f4f6",paddingRight:8},children:[e.jsx("div",{style:{...i,height:26,width:34}}),e.jsx("div",{style:{...i,height:8,width:26}})]}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:8},children:[e.jsx("div",{style:{...i,height:13,width:"50%"}}),e.jsx("div",{style:{...i,height:11,width:"65%"}}),e.jsx("div",{style:{...i,height:10,width:"40%"}})]})]},n))})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:8,marginTop:14},children:[0,1,2].map(n=>e.jsxs("div",{style:{background:"#fff",border:"1px solid #e5e7eb",borderRadius:10,padding:"14px 6px",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[e.jsx("div",{style:{...i,width:22,height:22,borderRadius:"50%"}}),e.jsx("div",{style:{...i,height:10,width:"55%"}}
9)]},n))})]})}function Ea(){const{token:a,usuario:i}=De(),n=i?._id||"anon",[r,g]=s.useState(bt),[b,c]=s.useState(null),[y,j]=s.useState(null),[u,v]=s.useState(null),[P,D]=s.useState(null),[U,J]=s.useState(!1),[Y,I]=s.useState(!1),[$,Z]=s.useState(!1),[se,re]=s.useState(0),[T,ne]=s.useState(()=>Rt()?.modo||null),q=s.useMemo(()=>{const t=Re,l=new Date(Re.getTime()+5*36e5);return{id:"tutorial-demonstracao",status:T==="analise"?"candidatada":"enviada",empresa:{nome:"Espaço Eventos (demonstração)"},evento:{tipoHabilidade:"Auxiliar de eventos",dataInicio:t.toISOString(),dataFinal:l.toISOString(),valor:150,vestimenta:"Calça preta e camisa branca",descricao:"Ajude na organização e recepção dos convidados.",intermediada:!1},endereco:{enderecoCompleto:"Expo Unimed Curitiba",bairro:"Campo Comprido",cidade:"Curitiba",estado:"PR",lat:-25.4456,lng:-49.3152},distanciaKm:4.2}},[T]);s.useEffect(()=>{const t=l=>{const d=l.detail?.ativo?l.detail.modo:null;ne(d),["detalhes","candidatura","analise"].includes(d)?c({...q,status:d==="analise"?"candidatada":"enviada"}):c(o=>o?.id==="tutorial-demonstracao"?null:o)};return window.addEventListener("tutorial-freelancer-estado",t),()=>window.removeEventListener("tutorial-freelancer-estado",t)},[q]);const k=s.useCallback(async()=>{if(!(!a||r.vagasClt===!1))try{const t=await fetch("/api/freelancer/vagas-clt",{headers:{Authorization:`Bearer ${a}`}});if(!t.ok)return;const l=await t.json();re(jt(n,l.vagas||[]))}catch{}},[a,n,r.vagasClt]);s.useEffect(()=>{k();const t=()=>k();return window.addEventListener("vagas-clt-leitura-alterada",t),()=>window.removeEventListener("vagas-clt-leitura-alterada",t)},[k]);const W=s.useCallback(async()=>{const t=await vt(a);if(t.error)throw new Error(t.error);return{proximos:t.proximos||[],vagas:t.vagas||[],contadores:t.contadores||{},pendencias:t.pendencias||null,checkinPendente:t.checkinPendente||{abertos:[],proximos:[]},checkoutPendente:t.checkoutPendente||{abertos:[]},entrevistasProximas:t.entrevistasProximas||[],entrevistasPendentes:t.entrevistasPendentes||[],perfilStats:t.perfilStats||null,radar:t.radar||{ativo:!1}}},[a]),qe=s.useCallback(async()=>({propostas:(await yt(a)).propostas||[]}),[a]),Ge=s.useCallback(async()=>({eventos:(await St(a)).eventos||[]}),[a]),Ke=s.useCallback(async()=>{const t={Authorization:`Bearer ${a}`,"x-bubble-version":localStorage.getItem("bubble_version")||"live"};return{recentes:(await(await fetch("/api/freelancer/home/recentes",{headers:t})).json()).recentes||[]}},[a]),{dados:le,atualizando:Xe,doCache:Qe,erro:et,recarregar:R}=Q({chave:`freelancerHome:home:v2:${n}`,fetcher:W,ativa:!!a}),{dados:ge,atualizando:tt,doCache:at,recarregar:F}=Q({chave:`freelancerHome:propostas:${n}`,fetcher:qe,ativa:!!a}),{dados:ot,recarregar:de}=Q({chave:`freelancerHome:avaliarEmp:${n}`,fetcher:Ge,ativa:!!a}),{dados:ue,recarregar:it}=Q({chave:`freelancerHome:recentes:${n}`,fetcher:Ke,ativa:!!a}),x=le||{proximos:[],contadores:{},entrevistasProximas:[],entrevistasPendentes:[],pendencias:null,checkinPendente:{abertos:[],proximos:[]},checkoutPendente:{abertos:[]},radar:{ativo:!1}},ce=x.checkinPendente?.abertos||[],st=x.checkinPendente?.proximos||[],me=x.checkoutPendente?.abertos||[],G=x.entrevistasProximas||[],be=x.entrevistasPendentes||[],N=ge?.propostas||[],je=et?.message||"",[ve,rt]=s.useState(new Set),ye=ot?.eventos||[],Se=ve.size===0?ye:ye.filter(t=>!ve.has(t.eventoId)),K=Se.length;s.useEffect(()=>{const t=l=>{const d=l?.detail?.eventoId;d&&rt(o=>new Set(o).add(d)),de()};return window.addEventListener("avaliacoes-empresa-pendentes-changed",t),()=>window.removeEventListener("avaliacoes-empresa-pendentes-changed",t)},[de]);const X=!le&&!Qe&&Xe,Ce=!ge&&!at&&tt;fe(()=>{L(),R()},60*1e3,!!a),fe(()=>{ee(),F()},30*1e3,!!a),fe(()=>it(),180*1e3,!!a),Ct(s.useCallback(()=>{L(),ee(),R(),F()},[R,F])),s.useEffect(()=>{if(!a)return;const t=localStorage.getItem("bubble_version")||"live",l=`/api/freelancer/propostas/stream?token=${encodeURIComponent(a)}&bubble_version=${t}`,d=new EventSource(l);return d.onmessage=()=>{ee(),F(),L(),R()},()=>{d.close()}},[a,F,R]);const nt=s.useRef(0);s.useEffect(()=>{nt.current++},[N]);function lt(t,l){l==="recusada"?c(null):l==="candidatada"&&c(d=>d&&d.id===t?{...d,status:"candidatada"}:d),ee(),F()}s.useEffect(()=>{let t=!1;return kt(a).then(l=>{t||g(l)}).catch(()=>{}),()=>{t=!0}},[a]);const V=s.useCallback(async()=>
9{if(a)try{const t=await zt(a),l=t?.diag||{},d=t?.acao||null;D(d)}catch{}},[a]);s.useEffect(()=>{V()},[V]),s.useEffect(()=>{const t=()=>V();return window.addEventListener("jornada-presente-resgatado",t),()=>window.removeEventListener("jornada-presente-resgatado",t)},[V]);const ke=i?.primeiroNome||i?.nome?.split(" ")[0]||"Freelancer";return e.jsxs("div",{style:{padding:20,maxWidth:900,margin:"0 auto",paddingBottom:100},children:[X?e.jsx(ea,{nome:ke}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-tutorial":"home-demonstracao",children:[e.jsxs("div",{style:Ye,children:[e.jsx(Le,{size:18,color:m}),e.jsxs("h1",{style:{margin:0,fontSize:17},children:["Olá, ",ke,"!"]})]}),T==="home"&&e.jsx(fa,{})]}),T!=="home"&&e.jsxs(e.Fragment,{children:[x.radar?.ativo&&e.jsx(_e,{lat:x.radar.lat,lng:x.radar.lng,onInfoClick:()=>Z(!0)}),x.radar?.ativo&&$&&e.jsx(Qt,{lat:x.radar.lat,lng:x.radar.lng,onFechar:()=>Z(!1)}),je&&e.jsx("div",{style:ca,children:je}),be.length>0&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:9,marginBottom:14},children:be.map(t=>e.jsx(_t,{vagaId:t.vagaId,entrevista:t,titulo:t.titulo,empresaNome:t.empresaNome,onAtualizar:()=>(L(),R())},`${t.vagaId}:${t.entrevistaEm}`))}),G.length>0&&e.jsxs("div",{style:aa,children:[e.jsxs("div",{style:oa,children:[e.jsxs("h2",{style:ia,children:[e.jsx(we,{size:15,color:"#b45309"}),G.some(t=>t.emAndamento)?"Entrevista em andamento":"Entrevista próxima"]}),e.jsx("span",{style:sa,children:G.some(t=>t.emAndamento)?"agora":"próximas 24h"})]}),G.map(t=>e.jsxs(B,{to:`/entrevista-clt/${t.vagaId}/${encodeURIComponent(t.freelancerBubbleId||i?._id||"")}`,style:ra,children:[e.jsx("div",{style:na,children:e.jsx(we,{size:20,color:"#b45309"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:800,color:"#78350f"},children:t.titulo||"Entrevista CLT"}),e.jsx("div",{style:{fontSize:12,color:"#92400e"},children:t.empresaNome}),e.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:4,fontSize:12,color:"#78350f"},children:[e.jsxs("span",{style:p,children:[e.jsx(w,{size:11})," ",t.emAndamento?"Começou":""," ",Ut(t.entrevistaEm)]}),e.jsxs("span",{style:p,children:[e.jsx(Tt,{size:11})," Clique para entrar na videochamada"]})]})]}),e.jsx(C,{size:18,color:"#b45309"})]},`${t.vagaId}:${t.entrevistaEm}`))]}),me.length>0&&e.jsx("div",{style:{marginBottom:14,display:"flex",flexDirection:"column",gap:8},children:me.map(t=>e.jsxs(B,{to:t.tipo==="avulsa"?`/checkin-avulso/${t.eventoId}`:`/checkin/${t.escalaId}/${t.diaId}`,style:Ue,children:[e.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"#dbeafe",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(He,{size:20,color:"#1d4ed8"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:800,color:"#1e3a8a"},children:"Check-out disponÃvel agora"}),e.jsxs("div",{style:{fontSize:12,color:"#1e40af"},children:[t.funcao," · ",t.empresaNome,t.horarioFim?` · até ${t.horarioFim}`:""]})]}),e.jsx(C,{size:18,color:"#1d4ed8"})]},`co-ab-${t.tipo==="avulsa"?t.eventoId:t.diaId}`))}),ce.length>0&&e.jsx("div",{style:{marginBottom:14,display:"flex",flexDirection:"column",gap:8},children:ce.map(t=>e.jsxs(B,{to:t.tipo==="avulsa"?`/checkin-avulso/${t.eventoId}`:`/checkin/${t.escalaId}/${t.diaId}`,style:ta,children:[e.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"#dcfce7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(xe,{size:20,color:"#16a34a"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:800,color:"#065f46"},children:"Check-in disponÃvel agora â
"}),e.jsxs("div",{style:{fontSize:12,color:"#166534"},children:[t.funcao," · ",t.empresaNome]})]}),e.jsx(C,{size:18,color:"#16a34a"})]},`ck-ab-${t.tipo==="avulsa"?t.eventoId:t.diaId}`))}),e.jsx(Ot,{pendencias:x.pendencias}),K>0&&e.jsxs("button",{type:"button",onClick:()=>I(!0),style:Je,children:[e.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"#fef3c7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx($e,{size:20,color:"#f59e0b",fill:"#f59e0b"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:700,color:f},children:K===1?"Avalie a empresa":`Avalie ${K} empresas`}),e.jsxs("div",{style:{fontSize:12,color:"#6b7280"},children:["Conte como foi trabalhar ",K===1?"no seu último evento":"nos seus últimos eventos","."]})]}),e.jsx(C,{size:18,color:"#9ca3af"})]}),e.jsxs("div",{"data-tutorial":"modelo-freelacerto",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:10,marginBottom:18},children:[e.jsx(ie,{titulo:"Próximos trabalhos",loading:X,valor:x.contadores.proximos??0,cor:f}),e.jsx(ie,{titulo:"Vagas disponÃveis",loading:Ce,valor:N.length,cor:m,destaque:!Ce&&N.length>0})]}),["vaga","detalhes","candidatura","analise"].includes(T)&&e.jsx(_,{titulo:e.jsxs(e.Fragment,{children:[e.jsx(Ie,{size:13,color:"#16a34a",style:{verticalAlign:-2,marginRight:4}}),"Proposta de demonstração"]}),children:e.jsxs("div",{"data-tutorial":"vaga-demonstracao",style:{...Ae,border:"2px s
9olid #00C4D4",background:"#f0fdff"},children:[e.jsx("div",{style:{width:44,height:44,borderRadius:10,background:"#dffbfe",display:"flex",alignItems:"center",justifyContent:"center",color:f,fontWeight:800,flexShrink:0},children:"E"}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:700,color:f},children:"Auxiliar de eventos"}),e.jsx("div",{style:{fontSize:12,color:"#6b7280"},children:"Espaço Eventos ⢠Exemplo, nenhuma ação real"}),e.jsxs("div",{style:{display:"flex",gap:10,marginTop:4,fontSize:12,color:"#6b7280",flexWrap:"wrap"},children:[e.jsxs("span",{style:p,children:[e.jsx(w,{size:11})," Sábado, 18h"]}),e.jsxs("span",{style:p,children:[e.jsx(E,{size:11,color:"#16a34a"})," ",e.jsx("strong",{style:{color:"#16a34a"},children:"R$ 150,00"})]})]})]}),e.jsx(C,{size:16,color:"#00A7B7"})]})}),N.length>0&&e.jsx(_,{titulo:e.jsxs(e.Fragment,{children:[e.jsx(Ie,{size:13,color:"#16a34a",style:{verticalAlign:-2,marginRight:4}}),"Propostas pra você"]}),verMais:"/freelancer/historico",children:N.slice(0,3).map(t=>e.jsxs("button",{type:"button",onClick:()=>c(t),style:Ae,children:[t.empresa?.logotipo?e.jsx("img",{src:t.empresa.logotipo,alt:"",style:{width:44,height:44,borderRadius:10,objectFit:"cover",flexShrink:0}}):e.jsx("div",{style:{width:44,height:44,borderRadius:10,background:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",color:"#6b7280",fontWeight:700,flexShrink:0},children:(t.empresa?.nome||"E").charAt(0)}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:700,color:f},children:t.evento?.tipoHabilidade||"Vaga"}),e.jsx("div",{style:{fontSize:12,color:"#6b7280"},children:t.empresa?.nome||"Empresa"}),e.jsxs("div",{style:{display:"flex",gap:10,marginTop:4,fontSize:12,color:"#6b7280",flexWrap:"wrap"},children:[e.jsxs("span",{style:p,children:[e.jsx(w,{size:11})," ",new Date(t.evento?.dataInicio).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]}),e.jsxs("span",{style:p,children:[e.jsx(E,{size:11,color:"#16a34a"})," ",e.jsx("strong",{style:{color:"#16a34a"},children:ae(t.evento?.valor)})]}),t.distanciaKm!=null&&e.jsxs("span",{style:p,children:[e.jsx(Wt,{size:11,color:m})," ",Number(t.distanciaKm).toFixed(1)," km"]})]})]}),t.status==="candidatada"?e.jsx("span",{style:{fontSize:10,fontWeight:700,color:"#065f46",background:"#ecfdf5",border:"1px solid #a7f3d0",padding:"3px 8px",borderRadius:999},children:"AGUARDANDO"}):e.jsx(C,{size:16,color:"#9ca3af"})]},t.id))}),ue?.recentes?.length>0&&e.jsx(_,{titulo:e.jsxs(e.Fragment,{children:[e.jsx(Bt,{size:13,color:"#9ca3af",style:{verticalAlign:-2,marginRight:4}}),"Recentes"]}),children:ue.recentes.map(t=>{const l={expirou:{label:"Expirou",bg:"#f3f4f6",color:"#6b7280",border:"#d1d5db"},preenchida:{label:"Preenchido por outro freelancer",bg:"#eff6ff",color:"#1d4ed8",border:"#bfdbfe"},cancelada:{label:"Cancelada",bg:"#fff7ed",color:"#b45309",border:"#fde68a"},conflito:{label:"Conflito",bg:"#fffbeb",color:"#92400e",border:"#fde68a"}}[t.motivo]||{label:t.motivo,bg:"#f3f4f6",color:"#6b7280",border:"#d1d5db"},d=t.dataInicio?new Date(t.dataInicio):null,o=d?d.toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):null;return e.jsxs("div",{style:la,children:[e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600,color:"#374151",fontSize:14},children:t.funcao}),e.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:t.empresaNome}),(o||t.valor)&&e.jsxs("div",{style:{display:"flex",gap:10,marginTop:3,fontSize:12,color:"#9ca3af",flexWrap:"wrap"},children:[o&&e.jsxs("span",{style:p,children:[e.jsx(w,{size:11})," ",o]}),t.valor>0&&e.jsxs("span",{style:p,children:[e.jsx(E,{size:11})," ",ae(t.valor)]})]})]}),e.jsx("span",{style:{fontSize:10,fontWeight:700,padding:"3px 8px",borderRadius:999,whiteSpace:"nowrap",background:l.bg,color:l.color,border:`1px solid ${l.border}`},children:l.label})]},t.eventoId)})}),(()=>{if(X)return null;const t=["Cancelado","Expirado","Finalizado","ConcluÃdo"],l=Date.now(),d=x.proximos.filter(o=>{if(o.acontecendoAgora)return!0;try{const h=o.data?new Date(o.data).getTime():null,S=o.dataFinal?new Date(o.dataFinal).getTime():null;return!!(h&&S&&l>=h&&l<=S&&!t.includes((o.status||"").toString()))}catch{return!1}});return d.length===0?null:e.jsxs("div",{style:{marginBottom:18},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:e.jsxs("h2",{style:{fontSize:13,margin:0,textTransform:"uppercase",letterSpacing:"0.06em",color:"#065f46",display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#16a34a",display:"inline-block",boxShadow:"0 0 0 3px #bbf7d0",animation:"lvPulse 1.5s ease-in-out infinite"}}),"Trabalhando agora"]})}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:d.map(o=>{const h=o.tipo==="avulsa",S=h?`and:${o.eventoId}`:`and:${o.diaId}`,O=e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:44,height:44,borderRadius:10,flexShrink:0,background:"#dcfce7",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(he,{size:20,color:"#16a34a"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:700,color:"#065f46"},children:o.funcao}),e.jsx("div",{style:{fontSize:13,color:"#166534"},children:o.empresaNome}),e.jsxs("div",{style:{display:"flex",gap:10,marginTop:3,fontSize:12,color:"#4ade80",flexWrap:"wrap"},children:[(o.horarioInicio||M(o.data))&&e.jsxs("span",{style:p,children:[e.jsx(w,{size:11,color:"#16a34a"})," ",o.horarioInicio||M(o.data),o.dataFinal?` â ${M(o.dataFinal)}`:""]}),o.valor>0&&e.jsxs("span",{style:p,children:[e.jsx(E,{size:11,color:"#16a34a"})," ",e.jsx("strong",{style:{color:"#15803d"},children:ae(o.valor)})]})]})]}),h?o.mensagensNaoLidas>0&&e.jsx("span",{style:Pe,children:o.mensagensNaoLidas>9?"9+":o.mensagensNaoLidas}):e.jsx(C,{size:16,color:"#16a34a"})]});return h?e.jsx("button",{type:"button",onClick:()=>j(o),style:{...Ee,position:"relative",width:"100%",textAlign:"left",cursor:"pointer",font:"inherit"},children:O},S):e.jsx(B,{to:`/escalas/${o.escalaId}`,style:Ee,children:O},S)})})]})})(),e.jsx(_,{titulo:"Próximos trabalhos confirmados",verMais:"/freelancer/agenda",children:X?e.jsx(Nt,{linhas:2,altura:70}):(()=>{const t=["Cancelado","Expirado","Finalizado","ConcluÃdo"],l=Date.now(),d=x.proximos.filter(o=>{if(o.acontecendoAgora)return!1;try{const h=o.data?new Date(o.data).getTime():null,S=o.dataFinal?new Date(o.dataFinal).getTime():null;if(h&&S&&l>=h&&l<=S&&!t.includes((o.status||"").toString()))return!1}catch{}return!0});return d.length===0?e.jsx("div",{style:da,children:"Você não tem trabalhos confirmados nos próximos 30 dias."}):d.map(o=>{const h=o.tipo==="avulsa",S=h?`av:${o.eventoId}`:o.diaId,O=ce.some(z=>h?z.tipo==="avulsa"&&z.eventoId===o.eventoId:z.tipo!=="avulsa"&&z.diaId===o.diaId),dt=!O&&st.some(z=>h?z.tipo==="avulsa"&&z.eventoId===o.eventoId:z.tipo!=="avulsa"&&z.diaId===o.diaId),ze=e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:Ze,children:[e.jsx("div",{style:{fontSize:24,fontWeight:800,color:f,lineHeight:1},children:String(new Date(o.data).getDate()).padStart(2,"0")}),e.jsx("div",{style:{fontSize:10,textTransform:"uppercase",color:"#6b7280"},children:new Date(o.data).toLocaleDateString("pt-BR",{month:"short"}).replace(".","")})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:700,color:f},children:o.funcao}),e.jsx("div",{style:{fontSize:13,color:"#374151"},children:o.empresaNome}),e.jsxs("div",{style:{display:"flex",gap:10,marginTop:4,fontSize:12,color:"#6b7280"},children:[(o.horarioInicio||M(o.data))&&e.jsxs("span",{style:p,children:[e.jsx(w,{size:11})," ",o.horarioInicio||M(o.data)]}),e.jsxs("span",{style:p,children:[e.jsx(E,{size:11})," ",ae(o.valor)]})]}),O&&e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:6,background:"#dcfce7",border:"1px solid #86efac",borderRadius:6,padding:"2px 7px"},children:[e.jsx(xe,{size:11,color:"#16a34a"}),e.jsx("span",{style:{fontSize:11,color:"#15803d",fontWeight:700},children:"Check-in disponÃvel agora"})]}),dt&&e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:4,marginTop:6,background:"#fef3c7",border:"1px solid #fde68a",borderRadius:6,padding:"2px 7px"},children:[e.jsx(xe,{size:11,color:"#b45309"}),e.jsx("span",{style:{fontSize:11,color:"#92400e",fontWeight:600},children:"Check-in abre em breve"})]})]}),h?o.mensagensNaoLidas>0&&e.jsx("span",{style:Pe,children:o.mensagensNaoLidas>9?"9+":o.mensagensNaoLidas}):e.jsx(C,{size:16,color:"#9ca3af"})]});return h?e.jsx("button",{type:"button",onClick:()=>j(o),style:{...pe,position:"relative",width:"100%",textAlign:"left",cursor:"pointer",font:"inherit"},children:ze},S):e.jsx(B,{to:`/escalas/${o.escalaId}`,style:pe,children:ze},S)})})()}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:8,marginTop:14}
9,children:[P==="jornada"&&e.jsx(H,{to:"/minha-jornada",icon:oe,label:"Jornada PRO",destaque:!0}),P==="presente"&&e.jsx(H,{onClick:()=>J(!0),icon:oe,label:"Presente PRO",destaque:!0}),e.jsx(H,{to:"/freelancer/agenda",icon:Ne,label:"Agenda"}),r.vagasClt&&e.jsx(H,{to:"/freelancer/vagas-clt",icon:he,label:"Vagas CLT",badgeDot:se>0}),e.jsx(H,{to:"/freelancer/historico",icon:w,label:"Histórico"}),e.jsx(H,{to:"/freelancer/estatisticas",icon:E,label:"EstatÃsticas"})]})]})]}),e.jsx(Yt,{aberto:U,onFechar:()=>J(!1),onResgatado:V}),e.jsx(wt,{proposta:b,modoTutorial:b?.id==="tutorial-demonstracao",onFechar:()=>c(null),onAcaoCompleta:lt}),e.jsx(Ht,{item:y,token:a,perfilStats:le?.perfilStats||null,onFechar:()=>j(null),onConversar:t=>{j(null),v(t)},onCancelado:()=>{L(),R()}}),e.jsx($t,{aberto:!!u,eventoId:u?.eventoId,freelancerUserBubbleId:i?._id,token:a,perfil:"freelancer",tituloParte:u?.empresaNome,onFechar:()=>{v(null),L(),R()}}),e.jsx(Lt,{aberto:Y,onFechar:()=>I(!1),pendentes:Se,token:a,onConcluido:de}),e.jsx(Gt,{token:a})]})}const Ue={display:"flex",gap:12,alignItems:"center",padding:12,background:"#eff6ff",border:"2px solid #93c5fd",borderRadius:10,textDecoration:"none",color:"inherit",boxShadow:"0 2px 6px rgba(29,78,216,0.12)"},ta={display:"flex",gap:12,alignItems:"center",padding:12,background:"#f0fdf4",border:"2px solid #86efac",borderRadius:10,textDecoration:"none",color:"inherit",boxShadow:"0 2px 6px rgba(22,163,74,0.12)"},Je={display:"flex",gap:12,alignItems:"center",padding:12,background:"#fffbeb",border:"1px solid #fde68a",borderRadius:10,width:"100%",textAlign:"left",cursor:"pointer",font:"inherit",color:"inherit",marginBottom:14},aa={marginBottom:14,padding:10,background:"#fffbeb",border:"2px solid #fcd34d",borderRadius:12,boxShadow:"0 2px 8px rgba(180,83,9,0.10)"},oa={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:8,padding:"0 2px"},ia={display:"flex",alignItems:"center",gap:5,margin:0,color:"#92400e",fontSize:13,textTransform:"uppercase",letterSpacing:"0.04em"},sa={color:"#92400e",background:"#fef3c7",border:"1px solid #fcd34d",borderRadius:999,padding:"3px 7px",fontSize:10,fontWeight:700,whiteSpace:"nowrap"},ra={display:"flex",gap:10,alignItems:"center",padding:11,background:"#fff",border:"1px solid #fde68a",borderRadius:9,textDecoration:"none",color:"inherit"},na={width:40,height:40,borderRadius:10,background:"#fef3c7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},Ae={display:"flex",gap:12,alignItems:"center",padding:12,background:"#fff",border:"1px solid #e5e7eb",borderRadius:10,width:"100%",textAlign:"left",cursor:"pointer",font:"inherit",color:"inherit"},Ee={display:"flex",gap:12,alignItems:"center",padding:12,background:"#f0fdf4",border:"2px solid #86efac",borderRadius:10,textDecoration:"none",color:"inherit",boxShadow:"0 2px 8px rgba(22,163,74,0.10)"},la={display:"flex",gap:12,alignItems:"center",padding:"10px 12px",background:"#fafafa",border:"1px solid #e5e7eb",borderRadius:10},Ye={display:"flex",alignItems:"center",gap:10,background:f,color:"#fff",padding:"10px 16px",borderRadius:999,marginBottom:16,width:"fit-content"},pe={display:"flex",gap:12,alignItems:"center",padding:12,background:"#fff",border:"1px solid #e5e7eb",borderRadius:10,textDecoration:"none",color:"inherit"},Pe={position:"absolute",top:8,right:8,minWidth:20,height:20,padding:"0 5px",display:"inline-flex",alignItems:"center",justifyContent:"center",background:"#ef4444",color:"#fff",fontSize:11,fontWeight:800,borderRadius:999,lineHeight:1},Ze={width:50,textAlign:"center",borderRight:"1px solid #f3f4f6",paddingRight:8},p={display:"inline-flex",alignItems:"center",gap:3},da={padding:14,color:"#6b7280",background:"#fff",border:"1px dashed #d1d5db",borderRadius:8,fontSize:13},ca={background:"#fee2e2",color:"#991b1b",padding:10,borderRadius:8,marginBottom:10};function ie({titulo:a,valor:i,cor:n,destaque:r,loading:g}){return e.jsxs("div",{style:{background:r?"#f0fdf4":"#fff",padding:12,borderRadius:8,border:r?`1px solid ${n}`:"1px solid #e5e7eb",borderLeft:`4px solid ${n}`},children:[e.jsx("div",{style:{fontSize:11,color:r?n:"#6b7280",textTransform:"uppercase",fontWeight:r?700:500},children:a}),e.jsx("div",{style:{fontSize:24,fontWeight:700,color:r?n:f,marginTop:4,minHeight:28},children:e.jsx(Vt,{loading:g,value:i,cor:r?n:f,tamanho:22})})]})}function fa(){return e.jsxs("div",{style:{marginBottom:16}
9,children:[e.jsx(_e,{lat:-3.1190275,lng:-60.0217314,onInfoClick:()=>{}}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,marginBottom:14},children:[e.jsxs("div",{style:{...Ue,cursor:"default"},children:[e.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"#dbeafe",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(He,{size:20,color:"#1d4ed8"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:800,color:"#1e3a8a"},children:"Check-out disponÃvel agora"}),e.jsx("div",{style:{fontSize:12,color:"#1e40af"},children:"Auxiliar de eventos · Espaço Eventos"})]}),e.jsx(C,{size:18,color:"#1d4ed8"})]}),e.jsxs("div",{style:{...Je,cursor:"default",marginBottom:0},children:[e.jsx("div",{style:{width:40,height:40,borderRadius:10,background:"#fef3c7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx($e,{size:20,color:"#f59e0b",fill:"#f59e0b"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:700,color:f},children:"Avalie a empresa"}),e.jsx("div",{style:{fontSize:12,color:"#6b7280"},children:"Conte como foi trabalhar no seu último evento."})]}),e.jsx(C,{size:18,color:"#9ca3af"})]})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:10,marginBottom:18},children:[e.jsx(ie,{titulo:"Próximos trabalhos",valor:1,cor:f}),e.jsx(ie,{titulo:"Vagas disponÃveis",valor:1,cor:m,destaque:!0})]}),e.jsx(_,{titulo:"Próximos trabalhos confirmados",children:e.jsxs("div",{style:{...pe,cursor:"default"},children:[e.jsxs("div",{style:Ze,children:[e.jsx("div",{style:{fontSize:24,fontWeight:800,color:f,lineHeight:1},children:"07"}),e.jsx("div",{style:{fontSize:10,textTransform:"uppercase",color:"#6b7280"},children:"set"})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:700,color:f},children:"Auxiliar de eventos"}),e.jsx("div",{style:{fontSize:13,color:"#374151"},children:"Espaço Eventos"}),e.jsxs("div",{style:{display:"flex",gap:10,marginTop:4,fontSize:12,color:"#6b7280"},children:[e.jsxs("span",{style:p,children:[e.jsx(w,{size:11})," 18:00"]}),e.jsxs("span",{style:p,children:[e.jsx(E,{size:11})," R$ 150,00"]})]})]}),e.jsx(C,{size:16,color:"#9ca3af"})]})}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:8,marginTop:14},children:[[Ne,"Agenda"],[w,"Histórico"],[E,"EstatÃsticas"],[he,"Vagas CLT"]].map(([a,i])=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:4,padding:"12px 4px",borderRadius:10,background:"#fff",border:"1px solid #e5e7eb",color:f},children:[e.jsx(a,{size:19,color:m}),e.jsx("span",{style:{fontSize:10,textAlign:"center"},children:i})]},i))})]})}function _({titulo:a,verMais:i,children:n}){return e.jsxs("div",{style:{marginBottom:18},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[e.jsx("h2",{style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.06em",margin:0},children:a}),i&&e.jsx(B,{to:i,style:{fontSize:12,color:f,textDecoration:"none",fontWeight:600},children:"Ver tudo â"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:n})]})}function H({to:a,onClick:i,icon:n,label:r,destaque:g,badgeDot:b=!1}){const c={display:"flex",flexDirection:"column",alignItems:"center",gap:4,padding:"14px 6px",borderRadius:10,textDecoration:"none",color:f,cursor:"pointer",font:"inherit",position:"relative",background:g?"#ecfeff":"#fff",border:g?`1.5px solid ${m}`:"1px solid #e5e7eb"},y=e.jsxs(e.Fragment,{children:[e.jsx(n,{size:22,color:m}),e.jsx("span",{style:{fontSize:12,fontWeight:g?700:600},children:r}),b&&e.jsx("span",{style:xa,"aria-label":"Há novas vagas CLT"})]});return i?e.jsx("button",{type:"button",onClick:i,style:c,children:y}):e.jsx(B,{to:a,style:c,children:y})}const xa={position:"absolute",top:8,right:8,width:10,height:10,borderRadius:"50%",background:"#ef4444",border:"2px solid #fff"};export{Ea as default};
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.