const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["scripts/ContactsSection-DfK40ez8.js","scripts/index-qazYPOM_.js","scripts/edit_icon-B5tZm8Mh.js","scripts/Suggestion-BzeFLwDg.js","scripts/NoIndexPage-DlQCslrr.js","scripts/BreadcrumbNav-GYSyRF7g.js","scripts/Skeleton-iZakU_NP.js","scripts/ErrorDisplay-LzvTY-IO.js","scripts/SkillsSection-DknnwdZY.js","scripts/arrow_icon-profile-bHDSeDx8.js","scripts/InfoTooltip-CRJzs_dZ.js","scripts/CharacteristicsSection-Dc9M4V0c.js","scripts/ExperienceSection-DDySsovO.js","scripts/useToggleCollapse-CKCfZbmQ.js","scripts/EducationSection-D5jLGzot.js","scripts/GoalsSection-DYfaqt8p.js","scripts/EditContacts-BYDdfVOF.js","scripts/SuccessTooltip-FMxTV4G7.js","scripts/ErrorTooltip-CvjJMd6x.js","scripts/Textarea-8nMpJW4y.js","scripts/ProfilePicUpload-BGo4q8sq.js","scripts/EditSkills-Rah5DdN-.js","scripts/SearchBar-AirayL2g.js","scripts/plus_icon-lI4fCOmN.js","scripts/close_icon-white--p3WzVVb.js","scripts/EditCharacteristics-CfxHHn0V.js","scripts/file_icon-black-xbZryB4v.js","scripts/Notification-DUieYXc4.js","scripts/EditExperience-DC1Y2so5.js","scripts/fileOpener-BBfUqHFd.js","scripts/checkbox_icon-DggvYMuz.js","scripts/ToggleButton-B-rNxH0d.js","scripts/bin_icon-nMxXyS1M.js","scripts/EditEducation-DojEub7W.js","scripts/EditGoals-CSnRWajV.js"])))=>i.map(i=>d[i]);
import{j as e,u as le,a as B,b as ne,c as ce,r,f as D,d as oe,e as re,H as de,B as _e,g as he,R as xe,_ as f,h as pe}from"./index-qazYPOM_.js";import{N as me}from"./NoIndexPage-DlQCslrr.js";import{B as fe}from"./BreadcrumbNav-GYSyRF7g.js";import{S as i}from"./Skeleton-iZakU_NP.js";import{ErrorDisplayPage as je}from"./ErrorDisplay-LzvTY-IO.js";const ge=10,Ne=20,ue=30,be=15,we=15,ve=10,ye=5,Ee=5;function G(t){var _,d,o,a;if(!t)return 0;let s=0;const l=12;return t.name&&t.name.trim()!==""&&s++,t.surname&&t.surname.trim()!==""&&s++,t.dateOfBirth&&t.dateOfBirth.trim()!==""&&s++,t.city&&t.city.trim()!==""&&s++,(_=t.preferredPosition)!=null&&_.positionName&&t.preferredPosition.positionName.trim()!==""&&s++,t.aboutMyself&&t.aboutMyself.trim()!==""&&s++,t.email&&t.email.trim()!==""&&s++,(d=t.contacts)!=null&&d.phoneNumber&&t.contacts.phoneNumber.trim()!==""&&s++,(o=t.contacts)!=null&&o.website&&t.contacts.website.trim()!==""&&s++,(a=t.contacts)!=null&&a.additionalContact&&t.contacts.additionalContact.trim()!==""&&s++,t.sex&&t.sex!=="SEX_UNSPECIFIED"&&s++,t.workSearchStatus&&t.workSearchStatus!=="WORK_SEARCH_STATUS_UNSPECIFIED"&&s++,Math.round(s/l*100)}function X(t,s){if(!t)return 0;let l=0;((s==null?void 0:s.some(n=>n.type==="TEST_TYPE_SKILL"&&n.status==="TEST_STATUS_COMPLETED"))??!1)&&(l+=50);const o=(t.skills||[]).filter(n=>n.skillName&&n.skillName.trim()!=="").length,a=Math.min(o,ye)*10;return l+=a,l}function J(t,s){if(!t||!t.personalQualities)return 0;let l=0;((s==null?void 0:s.some(a=>a.type==="TEST_TYPE_QUALITY"&&a.status==="TEST_STATUS_COMPLETED"))??!1)&&(l+=50);const d=t.personalQualities.filter(a=>a.qualityName&&a.qualityName.trim()!==""),o=Math.min(d.length,Ee)*10;return l+=o,l}function Z(t){if(!t||t.length===0)return 0;let s=0,l=0;t.forEach(a=>{var j,b,g,N,C,T,A,w,$,v,m,L;let n=0,p=6;(b=(j=a.experienceCompany)==null?void 0:j.companyName)!=null&&b.trim()&&n++,(g=a.companySector)!=null&&g.trim()&&n++,(C=(N=a.experiencePosition)==null?void 0:N.positionName)!=null&&C.trim()&&n++,(T=a.responsibilities)!=null&&T.trim()&&n++;const k=((A=a.hireDate)==null?void 0:A.split("-"))||[];if((w=k[0])!=null&&w.trim()&&n++,($=k[1])!=null&&$.trim()&&n++,!(a.stillWorking??!a.retirementDate)){p+=2;const R=((v=a.retirementDate)==null?void 0:v.split("-"))||[];(m=R[0])!=null&&m.trim()&&n++,(L=R[1])!=null&&L.trim()&&n++}s+=n,l+=p});let _=0;l>0&&(_=Math.round(s/l*50));const d=t.some(a=>a.verified||a.documentFiles&&a.documentFiles.length>0),o=_+(d?50:0);return Math.min(o,100)}function ee(t){if(!t||t.length===0)return 0;let s=0,l=0;t.forEach(a=>{var h,j,b,g,N;let n=0,p=4;(h=a.organization)!=null&&h.trim()&&n++,(j=a.degree)!=null&&j.trim()&&n++,(b=a.specialization)!=null&&b.trim()&&n++,(g=a.startYear)!=null&&g.trim()&&n++,(a.stillEducating??!a.graduationYear)||(p+=1,(N=a.graduationYear)!=null&&N.trim()&&n++),s+=n,l+=p});let _=0;l>0&&(_=Math.round(s/l*50));const d=t.some(a=>a.verified||a.documentFiles&&a.documentFiles.length>0),o=_+(d?50:0);return Math.min(o,100)}function se(t){if(!t)return 0;let s=0;const l=5;return t.goalPositions&&t.goalPositions.some(_=>{var d;return(d=_.positionName)==null?void 0:d.trim()})&&s++,t.preferredIncome&&t.preferredIncome.trim()&&s++,t.preferredBusinessFields&&t.preferredBusinessFields.some(_=>{var d;return(d=_.fieldName)==null?void 0:d.trim()})&&s++,t.officeType&&t.officeType!=="OFFICE_TYPE_UNSPECIFIED"&&s++,t.workingSchedule&&t.workingSchedule!=="WORKING_SCHEDULE_UNSPECIFIED"&&s++,Math.round(s/l*100)}function Se(t,s){if(!t)return 0;const l=G(t),_=X(t,s),d=J(t,s),o=Z(t.experiences),a=ee(t.educations),n=se(t.goals),p=l*ge/100+_*Ne/100+d*ue/100+o*be/100+a*we/100+n*ve/100;return Math.round(p)}const ke="_progress_bar_container_1dqbr_1",Ce="_progress_bar_1dqbr_1",Te="_progress_bar_fill_standart_1dqbr_17",Ie="_progress_bar_fill_accent_1dqbr_24",Pe="_progress_bar_text_1dqbr_31",I={progress_bar_container:ke,progress_bar:Ce,progress_bar_fill_standart:Te,progress_bar_fill_accent:Ie,progress_bar_text:Pe},U=t=>{const{progress:s,label:l=`${s}%`,accent:_=!1,className:d="",percentageDisplay:o=!0}=t,a=_?I.progress_bar_fill_accent:I.progress_bar_fill_standart,n=[I.progress_bar_container,d].filter(Boolean).join(" ");return e.jsxs("div",{className:n,children:[e.jsx("div",{className:I.progress_bar,children:e.jsx("div",{className:a,style:{width:`${s}%`}})}),o&&e.jsx("span",{className:`${I.progress_bar_text} h3`,children:l})]})},Ae="_profile__section_9uc07_1",$e="_profile__section_header_9uc07_10",Le="_profile__section_header_container_9uc07_19",Re="_profile__section_title_9uc07_27",De="_profile__section_content_container_9uc07_37",Oe="_contacts__section_list_9uc07_68",P={profile__section:Ae,profile__section_header:$e,profile__section_header_container:Le,profile__section_title:Re,profile__section_content_container:De,contacts__section_list:Oe},M=()=>e.jsxs("section",{className:`${P.profile__section} contacts__section`,id:"contacts",children:[e.jsxs("div",{className:P.profile__section_header,children:[e.jsxs("div",{className:P.profile__section_header_container,children:[e.jsx(i,{width:"300px",height:"36px"}),e.jsx(i,{width:"32px",height:"32px",variant:"circle"})]}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsx("div",{className:P.profile__section_content_container,children:e.jsxs("ul",{className:P.contacts__section_list,children:[Array.from({length:2}).map((t,s)=>e.jsxs("li",{className:"contacts__section-list-item",style:{display:"flex",flexDirection:"column",gap:"6px"},children:[e.jsx(i,{width:"80px",height:"16px"}),e.jsx(i,{width:"220px",height:"20px"})]},`contact-skel-${s}`)),e.jsx(i,{width:"100%",height:"40px"})]})})]}),W=()=>e.jsxs("section",{className:"profile__section skills__section",id:"skills-skeleton",children:[e.jsxs("div",{className:"profile__section-header",children:[e.jsxs("div",{className:"profile__section-header-container",children:[e.jsx(i,{width:"280px",height:"36px"}),e.jsx(i,{width:"32px",height:"32px",variant:"circle"})]}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsx("div",{className:"profile__section-content-container",children:e.jsx("ul",{className:"tags__list",style:{display:"flex",flexWrap:"wrap",gap:"10px"},children:Array.from({length:4}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:"0",border:"none"},children:e.jsx(i,{width:`${80+s*15}px`,height:"32px",style:{borderRadius:"16px"}})},`skill-tag-skel-${s}`))})})]}),q=()=>e.jsxs("section",{className:"profile__section characteristics__section",id:"qualities-skeleton",children:[e.jsxs("div",{className:"profile__section-header",children:[e.jsxs("div",{className:"profile__section-header-container",children:[e.jsx(i,{width:"250px",height:"36px"}),e.jsx(i,{width:"32px",height:"32px",variant:"circle"})]}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsx("div",{className:"profile__section-content-container",children:e.jsx("ul",{className:"tags__list",style:{display:"flex",flexWrap:"wrap",gap:"10px"},children:Array.from({length:4}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:"0",border:"none",display:"flex",alignItems:"center",gap:"8px"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`quality-tag-skel-${s}`))})})]}),Fe="_experience__container_16fbe_1",ze="_experience__list_16fbe_9",Be="_experience__list_item_16fbe_22",Ue="_experience__item_header_16fbe_35",Me="_experience__title_16fbe_44",We="_experience__subtitle_16fbe_49",qe="_experience__date_16fbe_54",Ve="_experience__info_container_16fbe_59",He="_collapsed_16fbe_70",Qe="_experience__info_list_16fbe_74",Ye="_experience__info_list_item_16fbe_86",S={experience__container:Fe,experience__list:ze,experience__list_item:Be,experience__item_header:Ue,experience__title:Me,experience__subtitle:We,experience__date:qe,experience__info_container:Ve,collapsed:He,experience__info_list:Qe,experience__info_list_item:Ye},V=()=>e.jsxs("li",{className:S.experience__list_item,children:[e.jsxs("div",{className:S.experience__item_header,children:[e.jsx(i,{width:"60%",height:"24px"}),e.jsx(i,{width:"45%",height:"18px"}),e.jsx(i,{width:"35%",height:"18px"})]}),e.jsxs("div",{className:`${S.experience__info_container} ${S.collapsed}`,children:[e.jsx("div",{children:e.jsx(i,{width:"100px",height:"16px"})}),e.jsx("div",{children:e.jsx(i,{width:"100px",height:"16px"})})]}),e.jsx("div",{children:e.jsx(i,{width:"100px",height:"20px"})})]}),H=()=>e.jsxs("section",{className:"profile__section experience__section",id:"experience-skeleton",children:[e.jsxs("div",{className:"profile__section-header",children:[e.jsxs("div",{className:"profile__section-header-container",children:[e.jsx(i,{width:"230px",height:"36px"}),e.jsx(i,{width:"32px",height:"32px",variant:"circle"})]}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsx("div",{className:"profile__section-content-container",children:e.jsx("div",{className:S.experience__container,children:e.jsxs("ul",{className:S.experience__list,children:[e.jsx(V,{}),e.jsx(V,{})]})})})]}),Ke="_education__list_1nc29_9",Ge="_education__list_item_1nc29_22",Xe="_education__title_1nc29_44",Je="_education__subtitle_1nc29_49",Ze="_education__date_1nc29_54",ie={education__list:Ke,education__list_item:Ge,education__title:Xe,education__subtitle:Je,education__date:Ze},Q=()=>e.jsxs("li",{className:ie.education__list_item,children:[e.jsx(i,{width:"70%",height:"24px"}),e.jsx(i,{width:"55%",height:"18px"}),e.jsx(i,{width:"40%",height:"18px"})]}),Y=()=>e.jsxs("section",{className:"profile__section education__section",id:"education-skeleton",children:[e.jsxs("div",{className:"profile__section-header",children:[e.jsxs("div",{className:"profile__section-header-container",children:[e.jsx(i,{width:"200px",height:"36px"}),e.jsx(i,{width:"32px",height:"32px",variant:"circle"})]}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsxs("div",{className:"profile__section-content-container",children:[e.jsxs("ul",{className:ie.education__list,children:[e.jsx(Q,{showVerified:!0}),e.jsx(Q,{})]}),e.jsx(i,{width:"100%",height:"40px"})]})]}),es="_goals__section_list_item_jy9l4_13",ss="_goals__title_jy9l4_22",is="_goals__content_jy9l4_27",ts="_goals__info_container_jy9l4_36",as="_goals__additional_info_container_jy9l4_44",u={goals__section_list_item:es,goals__title:ss,goals__content:is,goals__info_container:ts,goals__additional_info_container:as},K=()=>e.jsxs("section",{className:"profile__section goals__section",id:"goals-skeleton",children:[e.jsxs("div",{className:"profile__section-header",children:[e.jsxs("div",{className:"profile__section-header-container",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"32px",height:"32px",variant:"circle"})]}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsxs("div",{className:"profile__section-content-container",children:[e.jsxs("div",{className:u.goals__section_list_item,children:[e.jsx(i,{width:"120px",height:"28px",style:{marginBottom:12}}),e.jsxs("div",{className:u.goals__content,children:[e.jsxs("div",{className:u.goals__info_container,children:[e.jsx(i,{width:"80px",height:"16px"}),e.jsx(i,{width:"180px",height:"20px"})]}),e.jsxs("div",{className:u.goals__info_container,children:[e.jsx(i,{width:"80px",height:"16px"}),e.jsx(i,{width:"120px",height:"20px"})]})]})]}),e.jsxs("div",{className:u.goals__section_list_item,children:[e.jsx(i,{width:"180px",height:"28px",style:{marginBottom:12}}),e.jsx("div",{className:u.goals__content,children:e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px"},children:Array.from({length:3}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${80+s*15}px`,height:"32px",style:{borderRadius:"16px"}})},`goal-tag-skel-${s}`))})})]}),e.jsxs("div",{className:u.goals__section_list_item,children:[e.jsx(i,{width:"160px",height:"28px",style:{marginBottom:12}}),e.jsx("div",{className:u.goals__content,children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{className:u.goals__additional_info_container,children:[e.jsx(i,{width:"70px",height:"14px"}),e.jsx(i,{width:"220px",height:"18px",style:{marginTop:8}})]},`goal-additional-skel-${s}`))})]})]})]}),ls=()=>e.jsxs("section",{className:"edit-profile__section",children:[e.jsxs("div",{className:"edit-contacts__subsection",children:[e.jsx("div",{className:"edit__section-header",children:e.jsxs("div",{className:"edit__header-content",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"100%",height:"8px"})]})}),e.jsxs("div",{className:"main-info__container",children:[e.jsx(i,{variant:"circle",width:"80px",height:"80px"}),e.jsxs("div",{className:"profile__info-header-content",children:[e.jsx(i,{width:"180px",height:"28px"}),e.jsx(i,{width:"120px",height:"18px",style:{marginTop:8}})]})]})]}),e.jsx("div",{className:"edit-contacts__subsection",children:e.jsxs("form",{className:"edit__form",children:[e.jsxs("fieldset",{className:"main__info-fieldset",children:[e.jsx(i,{width:"180px",height:"24px"}),Array.from({length:4}).map((t,s)=>e.jsxs("div",{children:[e.jsx(i,{width:"90px",height:"16px"}),e.jsx(i,{width:"100%",height:"32px"})]},`main-info-skel-${s}`))]}),e.jsxs("fieldset",{className:"main__info-fieldset",children:[e.jsx(i,{width:"120px",height:"24px"}),Array.from({length:4}).map((t,s)=>e.jsxs("div",{children:[e.jsx(i,{width:"90px",height:"16px"}),e.jsx(i,{width:"100%",height:"32px"})]},`contacts-info-skel-${s}`))]}),e.jsx("div",{className:"form__bottom",children:e.jsx(i,{width:"140px",height:"40px"})})]})})]}),ns=()=>e.jsxs("section",{className:"edit-profile__section",children:[e.jsxs("div",{className:"edit-skills__subsection",children:[e.jsxs("div",{className:"edit__header-content",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsx(i,{width:"100%",height:"40px"}),e.jsxs("div",{className:"edit__skills-container",children:[e.jsx(i,{width:"200px",height:"24px"}),e.jsx("div",{className:"edit__skills-content-container edit__skills-content-container-dark",children:e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:Array.from({length:4}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`main-quality-skel-${s}`))})})]}),e.jsxs("div",{className:"edit__skills-container",children:[e.jsx(i,{width:"160px",height:"24px"}),e.jsx("div",{className:"edit__skills-content-container-outlined",children:e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:Array.from({length:3}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`verified-quality-skel-${s}`))})})]}),e.jsx("div",{className:"form__bottom",children:e.jsx(i,{width:"140px",height:"40px"})})]}),e.jsxs("div",{className:"edit-skills__subsection tests__subsection",children:[e.jsx(i,{width:"240px",height:"32px"}),e.jsx("div",{className:"tests__list-container",children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{className:"test__container",children:[e.jsxs("div",{className:"test__container-header",children:[e.jsxs("div",{className:"test__headar-content",children:[e.jsx(i,{width:"120px",height:"24px"}),e.jsx(i,{width:"100px",height:"18px",style:{marginLeft:16}})]}),e.jsx(i,{width:"100%",height:"16px"})]}),e.jsx(i,{width:"100px",height:"32px"})]},`test-skel-${s}`))})]})]}),cs=()=>e.jsxs("section",{className:"edit-profile__section",children:[e.jsxs("div",{className:"edit-characteristics__subsection",children:[e.jsxs("div",{className:"edit__header-content",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"100%",height:"8px"})]}),e.jsx(i,{width:"100%",height:"40px"}),e.jsxs("div",{className:"edit__characteristics-container",children:[e.jsx(i,{width:"200px",height:"24px"}),e.jsx("div",{className:"edit__characteristics-content-container edit__characteristics-content-container-dark",children:e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:Array.from({length:4}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`main-quality-skel-${s}`))})})]}),e.jsxs("div",{className:"edit__characteristics-container",children:[e.jsx(i,{width:"160px",height:"24px"}),e.jsx("div",{className:"edit__characteristics-content-container-outlined",children:e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:Array.from({length:3}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`verified-quality-skel-${s}`))})})]}),e.jsx("div",{className:"form__bottom",children:e.jsx(i,{width:"140px",height:"40px"})})]}),e.jsxs("div",{className:"edit-characteristics__subsection tests__subsection",children:[e.jsx(i,{width:"240px",height:"32px"}),e.jsx("div",{className:"tests__list-container",children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{className:"test__container",children:[e.jsxs("div",{className:"test__container-header",children:[e.jsxs("div",{className:"test__headar-content",children:[e.jsx(i,{width:"120px",height:"24px"}),e.jsx(i,{width:"100px",height:"18px",style:{marginLeft:16}})]}),e.jsx(i,{width:"100%",height:"16px"})]}),e.jsx(i,{width:"100px",height:"32px"})]},`test-skel-${s}`))})]})]}),os=()=>e.jsx("section",{className:"edit-profile__section",children:e.jsxs("div",{className:"edit-experience__subsection",children:[e.jsx("div",{className:"edit__section-header",children:e.jsxs("div",{className:"edit__header-content",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"100%",height:"8px"})]})}),e.jsxs("form",{className:"edit__form",children:[Array.from({length:1}).map((t,s)=>e.jsxs("fieldset",{className:"main__info-fieldset edit__experience-fieldset",children:[e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"100px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"100px",height:"18px"}),e.jsx(i,{width:"100%",height:"60px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsx(i,{width:"100%",height:"60px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsx(i,{width:"120px",height:"36px"}),e.jsx(i,{width:"120px",height:"36px"})]})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsx(i,{width:"120px",height:"36px"}),e.jsx(i,{width:"120px",height:"36px"})]})]})]},`exp-skel-${s}`)),e.jsx(i,{width:"220px",height:"40px"})]})]})}),rs=()=>e.jsx("section",{className:"edit-profile__section",children:e.jsxs("div",{className:"edit-experience__subsection",children:[e.jsx("div",{className:"edit__section-header",children:e.jsxs("div",{className:"edit__header-content",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"100%",height:"8px"})]})}),e.jsxs("form",{className:"edit__form",children:[Array.from({length:1}).map((t,s)=>e.jsxs("fieldset",{className:"main__info-fieldset edit__experience-fieldset",children:[e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"100px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"100px",height:"18px"}),e.jsx(i,{width:"100%",height:"60px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsx(i,{width:"100%",height:"60px"})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsx(i,{width:"120px",height:"36px"}),e.jsx(i,{width:"120px",height:"36px"})]})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsx(i,{width:"120px",height:"36px"}),e.jsx(i,{width:"120px",height:"36px"})]})]})]},`exp-skel-${s}`)),e.jsx(i,{width:"220px",height:"40px"})]})]})}),ds=()=>e.jsx("form",{children:e.jsxs("section",{className:"edit-profile__section",children:[e.jsxs("div",{className:"edit-goals__subsection",children:[e.jsx("div",{className:"edit__section-header",children:e.jsxs("div",{className:"edit__header-content",children:[e.jsx(i,{width:"220px",height:"36px"}),e.jsx(i,{width:"100%",height:"8px"})]})}),e.jsxs("div",{className:"input__area",children:[e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"100px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"}),e.jsx(i,{width:"220px",height:"16px"})]}),e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:Array.from({length:2}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`goal-pos-skel-${s}`))})]}),e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"80px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"})]}),e.jsxs("div",{className:"input__area",children:[e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"120px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"}),e.jsx(i,{width:"220px",height:"16px"})]}),e.jsx("ul",{className:"tags__list",style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:Array.from({length:3}).map((t,s)=>e.jsx("li",{className:"tags__list-item",style:{padding:0,border:"none"},children:e.jsx(i,{width:`${90+s*10}px`,height:"32px",style:{borderRadius:"16px"}})},`goal-sphere-skel-${s}`))})]})]}),e.jsxs("div",{className:"edit-goals__subsection",children:[e.jsx(i,{width:"200px",height:"28px"}),Array.from({length:2}).map((t,s)=>e.jsxs("fieldset",{className:"main__info-fieldset edit__goal-fieldset",children:[e.jsxs("label",{className:"body-2 form__label",children:[e.jsx(i,{width:"80px",height:"18px"}),e.jsx(i,{width:"100%",height:"36px"})]}),e.jsx(i,{width:"120px",height:"36px"})]},`goal-fieldset-skel-${s}`)),e.jsx(i,{width:"220px",height:"40px"})]})]})}),_s=r.lazy(()=>f(()=>import("./ContactsSection-DfK40ez8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),hs=r.lazy(()=>f(()=>import("./SkillsSection-DknnwdZY.js"),__vite__mapDeps([8,1,2,9,3,10,4,5,6,7]))),xs=r.lazy(()=>f(()=>import("./CharacteristicsSection-Dc9M4V0c.js"),__vite__mapDeps([11,1,2,9,3,10,4,5,6,7]))),ps=r.lazy(()=>f(()=>import("./ExperienceSection-DDySsovO.js"),__vite__mapDeps([12,1,2,13,9,3,4,5,6,7]))),ms=r.lazy(()=>f(()=>import("./EducationSection-D5jLGzot.js"),__vite__mapDeps([14,1,2,9,3,4,5,6,7]))),fs=r.lazy(()=>f(()=>import("./GoalsSection-DYfaqt8p.js"),__vite__mapDeps([15,1,2,9,3,4,5,6,7]))),js=r.lazy(()=>f(()=>import("./EditContacts-BYDdfVOF.js"),__vite__mapDeps([16,1,17,18,19,3,20,4,5,6,7]))),gs=r.lazy(()=>f(()=>import("./EditSkills-Rah5DdN-.js"),__vite__mapDeps([21,1,22,23,24,17,18,13,3,10,4,5,6,7]))),Ns=r.lazy(()=>f(()=>import("./EditCharacteristics-CfxHHn0V.js"),__vite__mapDeps([25,1,22,23,24,17,18,13,3,10,26,27,4,5,6,7]))),us=r.lazy(()=>f(()=>import("./EditExperience-DC1Y2so5.js"),__vite__mapDeps([28,1,17,18,19,29,30,31,3,10,32,4,5,6,7]))),bs=r.lazy(()=>f(()=>import("./EditEducation-DojEub7W.js"),__vite__mapDeps([33,1,17,18,3,29,30,31,32,10,4,5,6,7]))),ws=r.lazy(()=>f(()=>import("./EditGoals-CSnRWajV.js"),__vite__mapDeps([34,1,24,17,32,3,18,4,5,6,7]))),O={contacts:{title:"основной информации",EditComponent:js,EditSkeleton:ls},characteristics:{title:"личных качеств",EditComponent:Ns,EditSkeleton:cs},skills:{title:"знаний и навыков",EditComponent:gs,EditSkeleton:ns},experience:{title:"опыта работы",EditComponent:us,EditSkeleton:os},education:{title:"образования",EditComponent:bs,EditSkeleton:rs},goals:{title:"карьерных целей",EditComponent:ws,EditSkeleton:ds}},vs=[{id:"contacts",label:"Основная информация",href:"#contacts"},{id:"characteristics",label:"Личные качества",href:"#characteristics"},{id:"skills",label:"Знания и навыки",href:"#skills"},{id:"experience",label:"Опыт работы",href:"#experience"},{id:"education",label:"Образование",href:"#education"},{id:"goals",label:"Карьерные цели",href:"#goals"}];function ys(){var F,z;const t=le(),{profile:s,tests:l,infoprofileScore:_,infologicaScore:d}=B(c=>c.user),{userId:o,isLoading:a,isAuthenticated:n}=B(c=>c.auth),p=ne(),{section:k}=ce(),h=k||null,[j,b]=r.useState(!1),[g,N]=r.useState(null),C=r.useRef(!1);r.useEffect(()=>{window.scrollTo(0,0)},[h]);const T=r.useCallback((c=!1)=>{o&&((c||!s)&&t(D(o)),(c||!l)&&t(oe(o)),(c||_===null||d===null)&&t(re(o)))},[o,s,l,_,d,t]);r.useEffect(()=>{o&&!C.current&&(T(),C.current=!0)},[o,T]);const A=c=>{const x=c==="profile"?"/profile":`/profile/edit/${c}`;p(x),N(null),window.scrollTo({top:0,behavior:"smooth"})},w=c=>{N(c)},$=c=>{c&&o&&t(D(o)),g&&A(g)},v=async c=>{if(!o)throw new Error("Applicant ID not found to save changes.");if(Object.keys(c).length===0){(h==="experience"||h==="education")&&o&&t(D(o));return}b(!0);try{const x=await t(pe({applicantId:o,data:c})).unwrap();if(x&&x.user)return x.user}catch(x){throw console.error("ProfilePage: Failed to save and refresh changes",x),x}finally{b(!1)}},m=r.useMemo(()=>({contacts:G(s),skills:X(s,l),characteristics:J(s,l),experience:Z(s==null?void 0:s.experiences),education:ee(s==null?void 0:s.educations),goals:se(s==null?void 0:s.goals),total:Se(s,l)}),[s,l]),L=h?[{label:"Профиль",onClick:c=>{c.preventDefault(),w("profile")}},{label:`Редактирование ${((F=O[h])==null?void 0:F.title)||"раздела"}`,isCurrent:!0}]:[],R=()=>e.jsx("div",{className:"profile",id:"profile-top",children:e.jsx("main",{className:"main",children:e.jsxs("div",{className:"profile__info-container",children:[e.jsxs("div",{className:"profile__info-header",children:[e.jsx(i,{variant:"circle",width:"80px",height:"80px"}),e.jsxs("div",{className:"profile__info-header-content",children:[e.jsx(i,{width:"200px",height:"32px"}),e.jsx(i,{width:"120px",height:"24px",style:{marginTop:"8px"}})]})]}),e.jsx(M,{}),e.jsx(q,{}),e.jsx(W,{}),e.jsx(H,{}),e.jsx(Y,{}),e.jsx(K,{})]})})});if(a||n&&!s)return R();if(!n)return e.jsx(je,{code:403});const te=()=>{if(!h||!s)return null;const x=O[h].EditComponent,y={user:s,onSave:v,isSaving:j,onCancel:()=>w("profile"),confirmBack:g!==null,onConfirmNavigation:$,onCancelNavigation:()=>N(null)};switch(h){case"characteristics":return e.jsx(x,{...y,personalQualities:s.personalQualities??[],onSave:E=>v({personalQualities:E})});case"skills":return e.jsx(x,{...y,skills:s.skills??[],onSave:E=>v({skills:E})});case"goals":return e.jsx(x,{...y,onSave:E=>v({goals:E})});case"contacts":case"experience":case"education":default:return e.jsx(x,{...y})}};return e.jsxs(e.Fragment,{children:[e.jsx(me,{}),e.jsxs("div",{className:"profile",children:[e.jsx(de,{title:`HT Platform | ${h?"Редактирование профиля":"Профиль"}`}),h&&e.jsxs("div",{className:"breadcrumb-container container",children:[e.jsx(fe,{className:"profile__breadcrumbnav",items:L}),e.jsx(_e,{className:"back-to-profile__button",variant:"rounded-accent",onClick:()=>w("profile"),disabled:j,children:"Назад в Профиль"})]}),e.jsxs("main",{className:"main",children:[h===null?e.jsxs("div",{className:"profile__info-container",id:"profile-top",children:[e.jsxs("div",{className:"profile__info-header",id:"contacts",children:[e.jsx("div",{className:"avatar__container",children:e.jsx("img",{className:"user__avatar",src:(s==null?void 0:s.avatarUrl)||he,alt:(s==null?void 0:s.name)||"User avatar"})}),e.jsxs("div",{className:"profile__info-header-content",children:[e.jsxs("h1",{className:"profile__info-header-title h2",children:[(s==null?void 0:s.name)||"Пользователь"," ",(s==null?void 0:s.surname)||""]}),e.jsx("p",{className:"profile__info-header-subtitle body-3",children:((z=s==null?void 0:s.preferredPosition)==null?void 0:z.positionName)||"Должность не указана"})]})]}),e.jsxs("div",{className:"aside__header-mobile",children:[e.jsxs("div",{className:"aside__header-info",children:[e.jsx("h3",{className:"aside__title h3",children:"Заполненность профиля"}),e.jsxs("span",{className:`progress__bar-text h3 ${m.total<75?"progress__bar-text-red":"progress__bar-text-green"}`,children:[m.total,"%"]})]}),e.jsx(U,{progress:m.total,accent:!0,percentageDisplay:!1})]}),e.jsx(r.Suspense,{fallback:e.jsx(M,{}),children:s&&e.jsx(_s,{user:s,completeness:m.contacts,onEdit:()=>p("/profile/edit/contacts")})}),e.jsx(r.Suspense,{fallback:e.jsx(q,{}),children:e.jsx(xs,{personalQualities:(s==null?void 0:s.personalQualities)??[],onEdit:()=>p("/profile/edit/characteristics"),completeness:m.characteristics})}),e.jsx(r.Suspense,{fallback:e.jsx(W,{}),children:e.jsx(hs,{skills:(s==null?void 0:s.skills)??[],onEdit:()=>p("/profile/edit/skills"),completeness:m.skills})}),e.jsx(r.Suspense,{fallback:e.jsx(H,{}),children:e.jsx(ps,{experience:s==null?void 0:s.experiences,onEdit:()=>p("/profile/edit/experience"),completeness:m.experience})}),e.jsx(r.Suspense,{fallback:e.jsx(Y,{}),children:e.jsx(ms,{education:(s==null?void 0:s.educations)??[],onEdit:()=>p("/profile/edit/education")})}),e.jsx(r.Suspense,{fallback:e.jsx(K,{}),children:e.jsx(fs,{userGoals:s==null?void 0:s.goals,onEdit:()=>p("/profile/edit/goals"),completeness:m.goals})})]}):e.jsx("div",{className:"profile__edit-form-container",children:e.jsx(r.Suspense,{fallback:xe.createElement(O[h].EditSkeleton),children:te()})}),e.jsx("div",{className:"profile__sidebar-wrapper",children:e.jsxs("aside",{className:"profile__fullness-container",children:[e.jsxs("div",{className:"aside__header",children:[e.jsxs("div",{className:"aside__header-info",children:[e.jsx("h3",{className:"aside__title h3",children:"Заполненность профиля"}),e.jsxs("span",{className:`progress__bar-text h3 ${m.total<75?"progress__bar-text-red":"progress__bar-text-green"}`,children:[m.total,"%"]})]}),e.jsx(U,{progress:m.total,accent:!0,percentageDisplay:!1})]}),e.jsx("ul",{className:"aside__list",children:vs.map(c=>e.jsx("li",{className:`aside__list-item ${h===c.id?"aside__list-item--active":""}`,children:e.jsxs("a",{className:"aside__list-item-link-container",href:h===null?c.href:"#",onClick:x=>{if(x.preventDefault(),!j)if(h===null){const y=document.querySelector(c.href);if(y){const ae=y.getBoundingClientRect().top+window.pageYOffset-120;window.scrollTo({top:ae,behavior:"smooth"})}}else h!==c.id?w(c.id):window.scrollTo({top:0,behavior:"smooth"})},children:[e.jsx("span",{className:"aside__list-item-text body-1",children:c.label}),e.jsxs("span",{className:"aside__list-item-percent",children:[m[c.id],"%"]})]})},c.id))})]})})]})]})]})}const Ps=Object.freeze(Object.defineProperty({__proto__:null,ProfilePage:ys},Symbol.toStringTag,{value:"Module"}));export{U as P,S as a,ie as b,u as c,ee as g,Ps as i,P as s};