1import{u as $,_ as J,a as K}from"./DD7To3wp.js";import{u as Q}from"./C0Ubsy79.js";import{_ as X,a as Y,f as Z,c as R,L as ee,i as M,r as i,l as A,A as ae,V as oe,W as te,b as _,d as t,z as x,t as S,x as B,F as se,e as D,D as ne,M as E,a7 as ie,o as u,S as re}from"./BDnUSEef.js";import{a as ce}from"./t6juRa4C.js";import{u as le}from"./COA9nO0L.js";import"./BF0SKpg-.js";import"./DmuQeVwv.js";import"./CRjYQqLs.js";import"./oNp9vAV-.js";import"./qySGUADn.js";const de={class:"container"},ue={class:"container mis-postulaciones-page padding-cabecera"},me={class:"fw-bold text-quinternary-black mb-4 mx-3 mx-md-0 d-flex flex-row gap-1"},pe={key:0,class:"bg-premium-v2 rounded-pill text-white px-2 py-2 h6",title:"Datos de tu cuenta Premium"},fe={key:0,class:"spinner-border text-primary",role:"status"},_e=!1,I=150,ve={__name:"mis-postulaciones",async setup(ge){var k;let o,m;const h=Y(),L=Z(),N=Q(),{obtenerMisPostulaciones:T,obtenerPrepostulacion:O}=ce(),{normalizarPostulacion:v}=$(),V=R(()=>h.login).value.id;ee({link:[{rel:"stylesheet",href:"/css/_config-tema-logica-base.css",crossorigin:""}]});const{obtenerCandidato:H}=le(),w=R(()=>N.tienePremium),F=async()=>{await U()},j=()=>{re("/trabajo-empleo")},{data:g}=([o,m]=M(()=>E("obtener-candidato",()=>{var e;return H((e=h.obtenerLogin)==null?void 0:e.id)})),o=await o,m(),o),z=i(((k=g.value)==null?void 0:k.cvCompleto)||!1),p=i(0),r=i(!1),b=i(!0),s=i(null),f=i([]),q=async()=>await O(),P=async(e=0)=>await T({cantidadResultados:20,idCandidato:V,idDominio:L.obtenerConfigPortal.idDominio,orden:"FECHA_DESC",pagina:e}),{data:G,refresh:U}=([o,m]=M(async()=>E("mis-postulaciones-combinadas",async()=>{p.value=0;const[e,a]=await Promise.all([q(),P(0)]),c=(e||[]).map((d,y)=>v(d,"BNE",y)),l=((a==null?void 0:a.postulaciones)||[]).map((d,y)=>v(d,"PORTAL",y,a.totalRanking));return b.value=(a==null?void 0:a.paginaActual)<(a==null?void 0:a.cantidadPaginas)-1,[...c,...l]})),o=await o,m(),o);A(G,e=>{e&&(f.value=[...e])},{immediate:!0});const C=async()=>{if(!(r.value||!b.value)){r.value=!0,p.value++;try{const e=await P(p.value),a=((e==null?void 0:e.postulaciones)||[]).map((c,l)=>v(c,"PORTAL",l,e.totalRanking));b.value=(e==null?void 0:e.paginaActual)<(e==null?void 0:e.cantidadPaginas)-1,f.value.push(...a)}catch{p.value--}finally{r.value=!1,ie(()=>{W()&&C()})}}},W=()=>{if(!s.value)return!1;const e=s.value.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight;return e.top<=a+I};let n=null;return ae(()=>{n=new IntersectionObserver(e=>{e[0].isIntersecting&&!r.value&&C()},{rootMargin:`${I}px`}),s.value&&n.observe(s.value)}),A(s,e=>{e&&n&&n.observe(e)}),oe(()=>{n&&n.disconnect()}),(e,a)=>{const c=te("font-awesome-icon"),l=J,d=K;return u(),_("div",de,[t("section",ue,[a[3]||(a[3]=t("div",{class:"row md-flex"},[t("a",{href:"/dashboard",class:"text-primary-portal mb-3"},[t("i",{class:"fa-solid fa-arrow-left me-2"}),x("Ir al dashboard")])],-1)),t("h1",me,[w.value?(u(),_("div",pe,[a[0]||(a[0]=x(" Premium ")),S(c,{icon:"fa-solid fa-rocket",class:""})])):B("",!0),a[1]||(a[1]=x(" Mis postulaciones "))]),f.value.length>0?(u(),_(se,{key:0},[S(l,{postulaciones:f.value,"es-premium":w.value,"cv-completo":z.value,"id-candidato":D(g).id,"id-pers
1ona":D(g).idPersona,onRecargarPostulaciones:F},null,8,["postulaciones","es-premium","cv-completo","id-candidato","id-persona"]),t("div",{ref_key:"bottomRef",ref:s,class:"d-flex justify-content-center py-4"},[r.value?(u(),_("div",fe,a[2]||(a[2]=[t("span",{class:"visually-hidden"},"Cargando...",-1)]))):B("",!0)],512)],64)):(u(),ne(d,{key:1,"es-dashboard":_e,onVerEmpleos:j}))])])}}},Se=X(ve,[["__scopeId","data-v-848ea415"]]);export{Se 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.