1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7ff4cfa1-264a-45e2-95f3-8a02ccbb1b0f",e._sentryDebugIdIdentifier="sentry-dbid-7ff4cfa1-264a-45e2-95f3-8a02ccbb1b0f")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2065],{78948:function(e,t){t.Z={src:"/_next/static/media/logo.bb7e6916.svg",height:39,width:140,blurWidth:0,blurHeight:0}},72065:function(e,t,a){a.r(t),a.d(t,{default:function(){return es}});var n=a(52322),i=a(12524),o=a.n(i),r=a(5632),s=a(2784),l=a(47477),c=a(18966),d=a(2369),u=a(92942),h=a(36160),m=a.n(h),p=a(62202),f=a(47023),g=a(71896),x=a(83557),v=a(64256),b=a(39111),w=a(56847),y=a(49374);let j={position:"top-center"},S=e=>{let{count:t}=e;return t?(0,n.jsx)("div",{"aria-hidden":"true",className:"absolute top-0 right-0 h-3 w-3 rounded-100 bg-red border border-white"}):null},A=e=>{let{notification:t,onMarkAsRead:a,showBorder:i}=e,r=(0,y.U4)(t),s=(0,y.di)(t);return(0,n.jsxs)("li",{className:o()("w-full relative flex-row group text-sm border-gray-200 px-3 py-3 flex items-start cursor-pointer hover:bg-gray-50",{"border-b":i}),children:[(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"mr-2 text-lg text-blue-600 flex-shrink-0",icon:d.RLE,size:"1x"}),(0,n.jsxs)("span",{className:"flex flex-col flex-1 min-w-0",children:[(0,n.jsx)("span",{className:"text-sm text-gray-700 font-medium leading-none mb-1",children:r}),(0,n.jsx)("span",{className:"text-sm text-gray-600 capitalize leading-tight",children:s})]}),(0,n.jsx)("button",{"aria-label":'Mark "'.concat(r,'" as read'),className:"appearance-none absolute hidden group-hover:flex top-0 right-0 w-[40px] h-full bg-blue-200 hover:bg-blue-dark text-blue-dark hover:text-white justify-center items-center transition-colors",onClick:()=>a(t),type:"button",children:(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"text-lg text-current",icon:d.FFp,size:"1x"})})]})},P=e=>{let{href:t,icon:a,children:i,showBorder:r=!0}=e;return(0,n.jsx)("li",{className:"flex w-full flex-col",role:"none",children:(0,n.jsxs)("a",{className:o()("text-sm font-medium px-3 py-3 hover:bg-blue-50 transition-colors",{"border-b border-gray-200":r}),href:t,role:"menuitem",children:[(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"mr-2",icon:a,size:"sm"}),i]})})},N=e=>{let{user:t,openSidebar:a,sidebarIsOpen:i,isCollapsed:r,urls:c,profileMenuItems:h,onLogout:N,headerSlot:k,notificationsEnabled:I}=e,C=(0,l.JX)(),E=void 0!==I?I:!!(null==t?void 0:t.uid),{data:M}=(0,w.F7)({userId:null==t?void 0:t.uid,paginate:10,page:1,status:"new",type:"notification",enabled:E}),{markAsRead:R}=(0,w.$b)(null==t?void 0:t.uid),_=(0,s.useMemo)(()=>M?Array.isArray(M)?M:M.data||[]:[],[M]),F=(0,s.useMemo)(()=>m()(_)?[]:_.filter(e=>!(0,y.Ri)(e)),[_]),T=(0,s.useMemo)(()=>F.slice(0,6),[F]),D=(0,s.useMemo)(()=>(0,y.k9)(_),[_]),O=(0,s.useCallback)(e=>{R.mutate({userId:null==t?void 0:t.uid,notificationId:e.id},{onSuccess:()=>{p.toast.success("Notification marked as read.",j)},onError:()=>{p.toast.error("Failed to mark notification as read.",j)}})},[R,null==t?void 0:t.uid]),L=(0,s.useCallback)(e=>{e.preventDefault(),null==N||N()},[N]),U=(0,s.useMemo)(()=>o()("mobile-nav-toggle-wrapper flex items-center left-4 right-auto",{"md:hidden":i,active:i&&C}),[i,C]),W=D>4,z=(0,l.lF)({isCollapsed:r,isMobile:C,isSidebarVisible:i});return(0,n.jsxs)("header",{className:"fixed top-0 right-0 z-[99] flex items-center pl-20 md:pl-6 px-6 py-1 md:py-2 lg:px-12 h-[50px] md:h-14 lg:h-16 bg-white border-b transition-all duration-300",style:{left:z},children:[(0,n.jsx)("button",{"aria-label":"Toggle sidebar",className:U,onClick:a,type:"button",children:(0,n.jsx)("span",{className:"block mobile-nav-toggle",children:(0,n.jsx)("span",{className:"block mobile-nav"})})}),!!k&&k,(0,n.jsx)("div",{className:"flex-1"}),(0,n.jsxs)("div",{className:"flex h-full items-center ml-auto gap-[30px]",children:[(0,n.jsx)("a",{"aria-label":"View all notifications. ".concat(D," unread"),className:"md:hidden",href:null==c?void 0:c.updates,children:(0,n.jsxs)("div",{className:"h-6 w-6 relative",children:[(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"h-6 w-6",icon:d.qmU}),(0,n.jsx)(S,{count:D})]})}),(0,n.jsxs)(x.h_,{alignment:"end",className:"hidden md:flex",justify:"end",minWidth:"300px",topOffSet:"40px",children:[(0,n.jsx)(v.Z,{"aria-label":"Notifications. ".concat(D," unread"),children:(0,n.jsxs)("div",{className:"h-6 w-6 relative",children:[(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"h-6 w-6",icon:d.qmU}),(0,n.jsx)(S,{count:D})]})}),(0,n.jsx)(b.Z,{children:(0,n.jsxs)("div",{className:"w-full flex flex-col bg-white rounded border",children:[!!T.length&&(0,n.jsx)("ul",{className:"w-full list-none flex flex-col",children:T.map((e,t)=>(0,n.jsx)(A,{notification:e,onMarkAsRead:O,showBorder:t+1<T.length},e.id))}),!!(W||D>0)&&(0,n.jsx)("div",{className:"w-full px-4 py-2 flex flex-col gap-2 border-t border-gray-200",children:!!W&&(0,n.jsx)(f.Z,{afterIcon:(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"text-xs ml-2",icon:d.eFW}),design:"plain",fullWidth:!0,href:null==c?void 0:c.updates,children:"View All Updates"})}),!T.length&&(0,n.jsx)("div",{className:"w-full px-4 py-6 text-center text-sm text-gray-500",children:"No new notifications"})]})})]}),(0,n.jsxs)(x.h_,{alignment:"right",justify:"end",minWidth:"300px",topOffSet:"50px",children:[(0,n.jsx)(v.Z,{"aria-label":"User profile menu. Signed in as ".concat((null==t?void 0:t.name)||"user"),children:(0,n.jsx)("div",{className:"flex justify-center items-center group",children:(0,n.jsx)(g.Z,{rounded:!0,size:"sm",user:t})})}),(0,n.jsx)(b.Z,{children:(0,n.jsxs)("ul",{className:"w-full list-none flex flex-col rounded-md border border-t-0 bg-white",role:"menu",children:[(0,n.jsx)("li",{className:"flex w-full flex-col justify-center text-center bg-blue-dark rounded-t-md",role:"presentation",children:(0,n.jsxs)("div",{className:"flex flex-col border-b text-sm font-semibold text-white px-3 pb-2 mt-2 mb-0",children:[(0,n.jsx)("span",{className:"text-inherit leading-tight text-sm",children:null==t?void 0:t.name}),(0,n.jsx)("span",{className:"text-inherit font-normal text-sm",children:null==t?void 0:t.email})]})}),null==h?void 0:h.map((e,t)=>(0,n.jsx)(P,{href:e.href,icon:e.icon,showBorder:t<h.length-1,children:e.label},e.label)),(0,n.jsx)("li",{className:"flex w-full flex-col",role:"none",children:(0,n.jsxs)("button",{className:"appearance-none px-3 py-3 text-base text-left md:text-sm font-medium hover:bg-blue-50 transition-colors",onClick:L,role:"menuitem",type:"button",children:[(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:"mr-2",icon:d.byT,size:"sm"}),m()(t)?"Login":"Logout"]})})]})})]})]})]})};var k=a(96577),I=a.n(k),C=a(39097),E=a.n(C),M=a(47413),R=(0,s.memo)(e=>{let{isCollapsed:t,isActiveRoute:a,onAction:i,onExpandSidebar:r,title:l,path:c,icon:h,activePath:m,exactMatch:p,subMenu:f,subMenuItems:g,newWindow:x,dataTour:v,type:b}
1=e,[w,y]=(0,s.useState)(!1);(0,s.useEffect)(()=>{g&&!t&&y(null==g?void 0:g.some(e=>a(e.activePath,e.exactMatch)))},[t,a,g]),(0,s.useEffect)(()=>{t&&y(!1)},[t]);let j=o()("w-full flex items-center py-[10px] rounded-[10px] font-medium text-sm transition-all duration-200",{"justify-center px-2":t,"px-5 gap-3":!t}),S="text-blue bg-blue-50",A="text-gray-700/80 hover:text-blue";if(t){let e=f?a(m,!1):a(m,p);return"action"===b?(0,n.jsx)("button",{className:o()(j,A),"data-tooltip-content":l,"data-tooltip-id":"sidebar-tooltip",onClick:()=>null==i?void 0:i(),type:"button",children:(0,n.jsx)(u.FontAwesomeIcon,{className:"text-lg",icon:h})}):f?(0,n.jsx)("button",{className:o()(j,A),onClick:e=>{e.stopPropagation(),null==r||r()},type:"button",children:(0,n.jsx)(u.FontAwesomeIcon,{className:"text-lg",icon:h})}):(0,n.jsx)(E(),{className:o()(j,e?S:A),"data-tooltip-content":l,"data-tooltip-id":"sidebar-tooltip","data-tour":v,href:c||"#",rel:x?"noopener noreferrer":void 0,target:x?"_blank":void 0,children:(0,n.jsx)(u.FontAwesomeIcon,{className:"text-lg",icon:h})})}if(f){var P;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{"aria-expanded":w,className:o()(j,a(m,!1)?S:A,{"rounded-t-[10px] rounded-b-0":w}),"data-tour":v,onClick:()=>y(!w),type:"button",children:[(0,n.jsx)(u.FontAwesomeIcon,{className:"text-lg",icon:h}),l,(0,n.jsx)(u.FontAwesomeIcon,{"aria-hidden":"true",className:o()("text-sm ml-auto animated",{"rotate-180":w}),icon:d.ptq})]}),!!w&&(0,n.jsx)("ul",{className:"w-full flex flex-col pl-7 animated fadeInDown bg-blue-50 rounded-b",children:null==g?void 0:null===(P=g.filter(e=>e.isShow))||void 0===P?void 0:P.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(E(),{className:o()("w-full flex items-center py-[10px] px-5 font-medium text-sm gap-3 hover:text-blue",a(null==e?void 0:e.activePath,null==e?void 0:e.exactMatch)?"text-blue":"text-gray-700/80"),href:(null==e?void 0:e.path)||"#",rel:(null==e?void 0:e.newWindow)?"noopener noreferrer":void 0,target:(null==e?void 0:e.newWindow)?"_blank":void 0,children:null==e?void 0:e.title})},null==e?void 0:e.title))})]})}return"action"===b?(0,n.jsxs)("button",{className:o()(j,A),onClick:()=>null==i?void 0:i(),type:"button",children:[(0,n.jsx)(u.FontAwesomeIcon,{className:"text-lg",icon:h}),l]}):(0,n.jsxs)(E(),{className:o()(j,a(m,p)?S:A),"data-tour":v,href:c||"#",rel:x?"noopener noreferrer":void 0,target:x?"_blank":void 0,children:[(0,n.jsx)(u.FontAwesomeIcon,{className:"text-lg",icon:h}),l]})}),_=e=>{var t;let{show:a,isMobile:i,isCollapsed:r,onToggleCollapse:s,onHide:l,menuItems:c,logo:h,badge:m,footer:p,onLogout:f,isActiveRoute:g,expandOnSubMenuClick:x}=e,v=o()("block fixed top-0 bottom-0 left-0 z-[99999] bg-white border-r transition-all duration-300",{"-translate-x-full overflow-hidden":!a,"translate-x-0 overflow-visible":a,"w-[180px] xl:w-[250px]":!r,"w-[70px]":r}),b=()=>{x&&r&&(null==s||s()),i&&r&&(null==l||l())};return(0,n.jsxs)("nav",{"aria-label":"Main navigation",className:v,children:[!i&&(0,n.jsx)("button",{"aria-label":r?"Expand sidebar":"Collapse sidebar",className:"absolute top-6 -right-4 w-[30px] h-[30px] p-[2px] rounded-full bg-white border shadow-sm text-gray-500 hover:bg-blue-dark hover:text-white transition-colors z-50",onClick:()=>{null==s||s()},type:"button",children:(0,n.jsx)(u.FontAwesomeIcon,{className:o()("text-base transition-transform",{"rotate-180":r}),icon:d.A35})}),(0,n.jsxs)("div",{className:"flex flex-col h-full justify-between",children:[(0,n.jsxs)("div",{className:"flex flex-col overflow-y-auto pt-6 px-3",children:[(0,n.jsx)("div",{className:"flex items-center justify-center logo-wrapper",children:(0,n.jsxs)(E(),{className:"flex items-center justify-center",href:"/",children:[!!(r&&(null==h?void 0:h.collapsed))&&(0,n.jsx)(I(),{alt:"Elevolt",className:"logo rounded-lg",height:h.collapsed.height,src:h.collapsed.src,style:{objectFit:"contain"},width:h.collapsed.width}),!!(!r&&(null==h?void 0:h.expanded))&&(0,n.jsx)(I(),{alt:"Elevolt",className:"logo",height:h.expanded.height,src:h.expanded.src,style:{objectFit:"contain"},width:h.expanded.width})]})}),!!(!r&&m)&&(0,n.jsx)("div",{className:"flex items-center justify-center",children:m}),(0,n.jsx)("ul",{className:"w-full flex flex-col pt-6 gap-1",children:null==c?void 0:null===(t=c.filter(e=>e.isShow))||void 0===t?void 0:t.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(R,{...e,isActiveRoute:g,isCollapsed:r,onAction:"action"===e.type?f:void 0,onExpandSidebar:b})},null==e?void 0:e.title))})]}),!!p&&(0,n.jsx)("div",{className:"border-t",children:p(r)})]}),!!r&&(0,n.jsx)(M.u,{id:"sidebar-tooltip",place:"right"})]})},F=e=>{let{menuItems:t,urls:a,profileMenuItems:i,onLogout:d,sidebarLogo:u,sidebarBadge:h,sidebarFooter:m,headerSlot:p,initialCollapsed:f=!1,isActiveRoute:g,expandOnSubMenuClick:x=!1,notificationsEnabled:v,autoHideOnNavigate:b=!0,children:w}=e,{user:y}
1=(0,c.Eu)(),j=(0,r.useRouter)(),S=(0,l.JX)(),[A,P]=(0,s.useState)(!0),[k,I]=(0,s.useState)(f);(0,s.useEffect)(()=>{P(!S),S&&I(!1)},[S]),(0,s.useEffect)(()=>{if(!b)return;let e=()=>{S&&A&&P(!1)};return j.events.on("routeChangeStart",e),()=>{j.events.off("routeChangeStart",e)}},[j.events,S,A,b]);let C=(0,s.useCallback)(()=>{I(e=>!e)},[]),E=(0,s.useCallback)(()=>{P(e=>!e)},[]),M=o()("min-h-[calc(100vh-64px)] mt-[50px] md:mt-14 lg:mt-16 transition-all duration-300 pb-4",{"ml-0 w-full":S||!A,"ml-[70px] w-[calc(100%-70px)]":!S&&A&&k,"ml-[180px] xl:ml-[250px] w-[calc(100%-180px)] xl:w-[calc(100%-250px)]":!S&&A&&!k});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_,{badge:h,expandOnSubMenuClick:x,footer:m,isActiveRoute:g,isCollapsed:k,isMobile:S,logo:u,menuItems:t,onHide:E,onLogout:d,onToggleCollapse:C,show:A}),!!(S&&A)&&(0,n.jsx)("div",{"aria-hidden":"true",className:"fixed inset-0 bg-black/50 z-[99998] transition-opacity duration-300",onClick:E}),(0,n.jsx)(N,{headerSlot:p,isCollapsed:k,notificationsEnabled:v,onLogout:d,openSidebar:E,profileMenuItems:i,sidebarIsOpen:A,urls:a,user:y}),(0,n.jsx)("main",{className:M,children:w})]})},T=a(43493),D=a(38043),O=a(60808),L=a(38785),U=a(59417),W=a(44943),z=a(99603),B=a(13980),G=a.n(B);let q=e=>{let{subscription:t,isCollapsed:a=!1,billingUrl:i="/settings/plan-billing"}=e;if(!t)return null;let{type:o,name:r,status:s,isExpiringSoon:l,isInGracePeriod:c,daysUntilExpiry:d}=t,u=W.Ue[o]||{name:r,color:"gray"},h=W.Du[s]||s,m=l||c,p=c?{icon:U.eHv,color:"text-red-500",bgColor:"bg-red-50"}:l?{icon:U.SZw,color:"text-yellow-500",bgColor:"bg-yellow-50"}:"active"===s?{icon:U.f8k,color:"text-green-500",bgColor:"bg-green-50"}:{icon:U.SZw,color:"text-gray-400",bgColor:"bg-gray-50"};return a?(0,n.jsx)(E(),{href:i,children:(0,n.jsx)("div",{className:"w-8 h-8 rounded-full ".concat(p.bgColor," flex items-center justify-center cursor-pointer mx-auto"),title:"Plan: ".concat(u.name," - ").concat(h).concat(m?" (Action required)":""),children:(0,n.jsx)(z.G,{className:p.color,icon:p.icon})})}):(0,n.jsx)(E(),{href:i,children:(0,n.jsxs)("div",{className:"p-3 rounded-lg ".concat(p.bgColor," cursor-pointer hover:opacity-80 transition-opacity"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"w-10 h-10 rounded-full bg-white flex items-center justify-center ".concat(p.color),children:(0,n.jsx)(z.G,{icon:p.icon})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("p",{className:"text-sm font-medium text-gray-900 truncate",children:["Plan: ",u.name]}),(0,n.jsx)("p",{className:"text-xs ".concat(m?"text-red-600 font-medium":"text-gray-500"),children:c?"Grace Period":l?"".concat(d," days left"):h})]})]}),!!m&&(0,n.jsx)("p",{className:"text-xs text-red-600 mt-2",children:c?"Renew to restore full access":"Subscription expiring soon"})]})})};q.propTypes={billingUrl:G().string,isCollapsed:G().bool,subscription:G().shape({daysUntilExpiry:G().number,isExpiringSoon:G().bool,isInGracePeriod:G().bool,status:G().string,type:G().string.isRequired})};var Z=a(11319),H=a.n(Z),J=a(84475);a(73117);var V=e=>{var t,a,i,o,r,l,c,d,u;let{isOpen:h,setIsOpen:m,user:p}
1=e,[f]=(0,s.useState)("e-command-pallette"),[g,x]=(0,s.useState)(""),v=(0,Z.filterItems)([{heading:"Main",id:"home",items:[{id:"dashboard",children:"Dashboard",icon:"HomeIcon",href:"/hr/".concat(null==p?void 0:null===(t=p.tenant)||void 0===t?void 0:t.name,"/"),show:!0},{id:"request-timeoff",children:"Request Timeoff",icon:"LifebuoyIcon",href:"/hr/".concat(null==p?void 0:null===(a=p.tenant)||void 0===a?void 0:a.name,"/time-off"),show:!0},{id:"directory",children:"Company Directory",icon:"UserGroupIcon",href:"/hr/".concat(null==p?void 0:null===(i=p.tenant)||void 0===i?void 0:i.name,"/directory"),show:!0},{id:"post",children:"Post a Job",icon:"FolderPlusIcon",href:"/hr/".concat(null==p?void 0:null===(o=p.tenant)||void 0===o?void 0:o.name,"/post"),show:(0,T.userIsAdmin)(p)&&(0,T.userCan)(p,"manage-job-posts")},{id:"tasks",children:"Manage Tasks",icon:"RectangleStackIcon",href:"/hr/".concat(null==p?void 0:null===(r=p.tenant)||void 0===r?void 0:r.name,"/tasks"),show:!0},{id:"profile",children:"Personal Details",icon:"UserIcon",href:"/hr/".concat(null==p?void 0:null===(l=p.tenant)||void 0===l?void 0:l.name,"/profile"),show:!0},{id:"performance",children:"Performance",icon:"ChartBarIcon",href:"/hr/".concat(null==p?void 0:null===(c=p.tenant)||void 0===c?void 0:c.name,"/performance"),show:!0},{id:"new-workflows",children:"Create a Workflow",icon:"DocumentPlusIcon",href:"/hr/".concat(null==p?void 0:null===(d=p.tenant)||void 0===d?void 0:d.name,"/workflows/new"),show:(0,T.userCan)(p,"manage-users")},{id:"settings",children:"Account Settings",icon:"CogIcon",href:"/hr/".concat(null==p?void 0:null===(u=p.tenant)||void 0===u?void 0:u.name,"/company-account"),show:(0,T.userIsAdmin)(p)}]},{heading:"Other",id:"advanced",items:[{id:"help",children:"Help Center",icon:"QuestionMarkCircleIcon",href:"https://support.elevolt.co.ke",show:!0},{id:"log-out",children:"Log out",icon:"ArrowRightOnRectangleIcon",onClick:()=>{(0,J.kS)()},show:!0}]}],g);return(0,n.jsx)(H(),{isOpen:h,onChangeOpen:m,onChangeSearch:x,page:f,search:g,children:(0,n.jsx)(H().Page,{id:"e-command-pallette",children:v.length?v.map(e=>(0,n.jsx)(H().List,{heading:e.heading,children:e.items.map(e=>{let{id:t,show:a,...i}=e;return(0,n.jsx)(n.Fragment,{children:a?(0,n.jsx)(H().ListItem,{index:(0,Z.getItemIndex)(v,t),...i},t):null})})},e.id)):(0,n.jsx)(H().FreeSearchAction,{})})})},K=e=>{let{user:t}=e,[a,i]=(0,s.useState)(!1);return(0,Z.useHandleOpenCommandPalette)(i),(0,n.jsx)("div",{className:"flex items-center w-full h-full z-50",children:(0,n.jsxs)("div",{className:"relative w-full h-full flex items-center",children:[(0,n.jsx)("span",{className:"sr-only",children:"Search"}),(0,n.jsxs)("button",{"aria-label":"Open command palette",className:"absolute inset-y-0 left-0 flex items-center",onClick:()=>i(!0),type:"button",children:[(0,n.jsx)(z.G,{"aria-hidden":"true",className:"h-5 w-5 text-slate-400",icon:U.wn1}),(0,n.jsx)("span",{className:"bg-gray-100 rounded leading-none p-1 ml-3 font-medium text-sm",children:"â + K"})]}),(0,n.jsx)(V,{isOpen:a,setIsOpen:i,user:t})]})})},Y=a(78948),X=a(58122);let{userCan:Q,userHasRole:$,userIsAdmin:ee}=T,et=e=>{let{tenantName:t,user:a,isModuleVisible:n=()=>!0}=e,i=(0,X.u)()&&n("payroll"),o=i&&Q(a,"manage-users"),r=(Q(a,"manage-users")||Q(a,"manage-job-posts"))&&n("ats"),s=Q(a,"manage-users")||Q(a,"manage-goals"),l=Q(a,"view_team_reviews"),c=Q(a,"hear_review_appeals");return[{title:"Dashboard",path:"/hr/".concat(t),icon:U.J9Y,activePath:"/",isShow:!0,dataTour:"sidebar-dashboard"},{title:"Hiring",path:"/hr/".concat(t,"/hiring"),icon:U.FKd,activePath:"hiring",isShow:r,dataTour:"sidebar-hiring",subMenu:!0,subMenuItems:[{title:"All Job Posts",path:"/hr/".concat(t,"/hiring/"),activePath:"hiring",isShow:!0},{title:"Post a Job",path:"/hr/".concat(t,"/hiring/post"),activePath:"hiring",isShow:Q(a,"manage-job-posts")},{title:"Careers Widget",path:"/hr/".concat(t,"/hiring/careers-widgets"),activePath:"careers-widgets",isShow:Q(a,"manage-job-posts")}]},{title:"Directory",path:"/hr/".concat(t,"/directory"),icon:U.FVb,activePath:"directory",isShow:Q(a,"manage-users")&&n("hris"),subMenu:!0,subMenuItems:[{title:"Team Directory",path:"/hr/".concat(t,"/directory"),activePath:"directory",isShow:!0}
1,{title:"Invitations",path:"/hr/".concat(t,"/directory/invitations"),activePath:"invitations",isShow:Q(a,"manage-users")}]},{title:"Organisation",path:"/hr/".concat(t,"/organisation/departments"),icon:U.Hw7,activePath:"organisation",isShow:Q(a,"manage_org_structure")&&n("hris"),dataTour:"sidebar-organisation",subMenu:!0,subMenuItems:[{title:"Departments",path:"/hr/".concat(t,"/organisation/departments"),activePath:"departments",isShow:!0},{title:"People & reporting lines",path:"/hr/".concat(t,"/organisation/people"),activePath:"people",isShow:!0},{title:"Reconciliation",path:"/hr/".concat(t,"/organisation/reconciliation"),activePath:"reconciliation",isShow:!0}]},{title:"Time-off",path:"/hr/".concat(t,"/time-off"),icon:U.SZw,activePath:"time-off",isShow:n("timeoff"),subMenu:Q(a,"manage-users"),dataTour:"sidebar-time-off",subMenuItems:[{title:"My Time-off",path:"/hr/".concat(t,"/time-off/"),activePath:"time-off",isShow:Q(a,"manage-users")},{title:"Review Requests",path:"/hr/".concat(t,"/time-off/requests"),activePath:"time-off",isShow:Q(a,"manage-users")}]},{title:"Workflows",path:"/hr/".concat(t,"/workflows"),icon:U._3l,activePath:"workflows",isShow:Q(a,"manage-users"),dataTour:"sidebar-workflows"},{title:"E-Signatures",path:"/hr/".concat(t,"/e-signatures/requests"),icon:U.rxY,activePath:"e-signatures",isShow:Q(a,"manage-documents")&&n("signatures"),dataTour:"sidebar-e-signatures",subMenu:!0,subMenuItems:[{title:"Requests",path:"/hr/".concat(t,"/e-signatures/requests"),activePath:"requests",isShow:!0},{title:"Templates",path:"/hr/".concat(t,"/e-signatures/templates"),activePath:"templates",isShow:Q(a,"manage-documents")}]},{title:"Tasks",path:"/hr/".concat(t,"/tasks"),icon:U.OGB,activePath:"tasks",isShow:!0,dataTour:"sidebar-tasks"},{title:"Calendar",path:"/hr/".concat(t,"/calendar"),icon:U.Ry6,activePath:"calendar",isShow:!0,dataTour:"sidebar-calendar"},{title:"Profile",path:"/hr/".concat(t,"/profile"),icon:U.U6l,activePath:"profile",isShow:!0,subMenu:!0,dataTour:"sidebar-profile",subMenuItems:[{title:"Personal Details",path:"/hr/".concat(t,"/profile/"),activePath:"profile",isShow:!0},{title:"Employment Profile",path:"/hr/".concat(t,"/profile/employment-profile"),activePath:"employment-profile",isShow:!0},{title:"Documents",path:"/hr/".concat(t,"/profile/documents"),activePath:"documents",isShow:!0},{title:"My Signatures",path:"/hr/".concat(t,"/my-signatures"),activePath:"my-signatures",isShow:!0},{title:"My Payslips",path:"/hr/".concat(t,"/profile/payslips"),activePath:"payslips",isShow:i},{title:"Payment Accounts",path:"/hr/".concat(t,"/profile/payment-accounts"),activePath:"payment-accounts",isShow:i},{title:"P9 Tax Certificates",path:"/hr/".concat(t,"/profile/p9-certificates"),activePath:"p9-certificates",isShow:i}]},{title:"Performance",path:"/hr/".concat(t,"/performance"),activePath:"performance",icon:U.Wpq,isShow:n("performance"),dataTour:"sidebar-performance",subMenu:!0,subMenuItems:[{title:"Goals & Feedback",path:"/hr/".concat(t,"/performance"),activePath:"performance",exactMatch:!0,isShow:!0},{title:"Reviews",path:"/hr/".concat(t,"/performance/reviews"),activePath:"reviews",isShow:!0},{title:"Review cycles",path:"/hr/".concat(t,"/performance/cycles"),activePath:"cycles",isShow:s},{title:"Appeals",path:"/hr/".concat(t,"/performance/appeals"),activePath:"performance/appeals",isShow:c},{title:"My team",path:"/hr/".concat(t,"/performance/team"),activePath:"performance/team",isShow:l}]},{title:"Payroll",path:"/hr/".concat(t,"/payroll"),icon:U.aj4,activePath:"payroll",isShow:o,dataTour:"sidebar-payroll",subMenu:!0,subMenuItems:[{title:"Dashboard",path:"/hr/".concat(t,"/payroll"),activePath:"payroll",isShow:!0},{title:"Adjustments",path:"/hr/".concat(t,"/payroll/adjustments"),activePath:"adjustments",isShow:Q(a,"manage-users")},{title:"Compliance",path:"/hr/".concat(t,"/payroll/compliance"),activePath:"compliance",isShow:Q(a,"manage-users"),icon:U.I85},{title:"Disbursements",path:"/hr/".concat(t,"/payroll/disbursements"),activePath:"disbursements",isShow:Q(a,"manage-users")}]},{title:"Settings",icon:U.gr5,activePath:"settings",isShow:!0,subMenu:!0,dataTour:"sidebar-settings",subMenuItems:[{title:"Company Account",path:"/hr/".concat(t,"/settings/company-account"),activePath:"company-account",isShow:ee(a)}
1,{title:"HR Portal",path:"/hr/".concat(t,"/settings/portal-settings"),activePath:"portal-settings",isShow:Q(a,"manage-settings")},{title:"Access Controls",path:"/hr/".concat(t,"/settings/access-controls"),activePath:"access-controls",isShow:ee(a)},{title:"TimeOff & Policies",path:"/hr/".concat(t,"/settings/timeoff-policy"),activePath:"timeoff-policy",isShow:$(a,["hr_manager","admin"])&&n("timeoff")},{title:"Statutory Registrations",path:"/hr/".concat(t,"/settings/statutory-registrations"),activePath:"statutory-registrations",isShow:o},{title:"Payment Providers",path:"/hr/".concat(t,"/settings/payment-providers"),activePath:"payment-providers",isShow:o},{title:"Account Documents",path:"/hr/".concat(t,"/settings/documents"),activePath:"documents",isShow:ee(a)},{title:"Billing & Payment",path:"/hr/".concat(t,"/settings/plan-billing"),activePath:"plan-billing",isShow:ee(a)},{title:"Business Verification",path:"/hr/".concat(t,"/settings/verification"),activePath:"verification",isShow:ee(a)},{title:"Account Security",path:"/hr/".concat(t,"/settings/security-settings"),activePath:"security-settings",isShow:ee(a)},{title:"Notifications & Emails",path:"/hr/".concat(t,"/settings/notifications"),activePath:"notifications",isShow:ee(a)}]},{title:"Reports",path:"/hr/".concat(t,"/reports"),icon:U.Wpq,activePath:"reports",isShow:ee(a)||Q(a,"manage-users")||Q(a,"manage-job-posts")||Q(a,"manage-documents"),subMenu:!0,dataTour:"sidebar-reports",subMenuItems:[{title:"Hiring Reports",path:"/hr/".concat(t,"/reports/hiring"),activePath:"hiring-reports",isShow:r},{title:"Signature Reports",path:"/hr/".concat(t,"/reports/signatures"),activePath:"signature-reports",isShow:Q(a,"manage-users")&&n("signatures")},{title:"Download Center",path:"/hr/".concat(t,"/reports/downloads"),activePath:"downloads",isShow:Q(a,"manage-users")||Q(a,"manage-job-posts")||Q(a,"manage_review_cycles")}]},{title:"Help",path:"".concat("https://support.elevolt.co.ke","/employers"),icon:U.Fuz,activePath:"help",isShow:!0,newWindow:!0,dataTour:"sidebar-help"},{title:"Logout",path:"#",icon:U.mXR,activePath:"#",isShow:!0,type:"action"}]},ea=e=>{let t=e.length;for(;t>0&&"/"===e[t-1];)t-=1;return e.slice(0,t)},en=function(){let{pathname:e,asPath:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if("/"===a)return"/hr/[tenant]"===e;if(n){let[e]=String(null!=t?t:"").split(/[?#]/);return ea(e).endsWith("/".concat(a))}return null==t?void 0:t.includes(a)},{userHasVerifiedEmail:ei}=T,eo={expanded:{src:Y.Z,width:150,height:50},collapsed:{src:{src:"/_next/static/media/favicon.2f953a0c.png",height:115,width:115,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAe1BMVEW6i4YJS5z/kwAETqFIl9AFKX0ATrEbmenvkx/2mxVKk8txr9TrmSABRZvjzBtGkszUAFXjFT1Ek84ETJwMRpQASKv/AAwARbn/nhD3mB40kNjrED3lDzv/kgvsGjrsGTz4FzHlGToBUaX6ES80od7/GSL6DCBFmNTzGzxlBYS5AAAAJ3RSTlMF0zbzTxs+ONpJfht/ThvSG33kfH+iKjCc/qZPUaDrzKbSoKGcPD89I5FBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAARklEQVR4nAXBhQGAMAADsDIfc9zd/r+QBMvoteCswATb1SUYvO1VRisOMivSZoeAHIJs9u2Gyd+wfinCIb/OBA3qjHyiVj+GQgPmGiOIbgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},width:40,height:40}},er=e=>{let{isCollapsed:t,isOnTenantRoute:a,tenantName:i,user:o}=e,{subscriptionType:r,subscriptionName:s,isInGracePeriod:l,isExpiringSoon:c,daysUntilExpiry:d,hasActiveSubscription:u}=(0,L.T)(null==o?void 0:o.tenant_id,{enabled:!!(null==o?void 0:o.tenant_id)&&a&&(0,T.userIsAdmin)(o)}),h=u?{type:r,name:s,status:l?"grace_period":"active",isExpiringSoon:c,isInGracePeriod:l,daysUntilExpiry:d}:null;return a&&h?(0,n.jsx)("div",{className:"p-3",children:(0,n.jsx)(q,{billingUrl:"/hr/".concat(i,"/settings/plan-billing"),isCollapsed:t,subscription:h})}):null};var es=e=>{var t,a;let i=(0,r.useRouter)(),{user:o}=(0,c.Eu)(),{mutate:l}=(0,D.aU)(),{isModuleVisible:d}=(0,O.Z)(),u=null==o?void 0:null===(t=o.tenant)||void 0===t?void 0:t.name,h=(0,s.useMemo)(()=>({updates:"/hr/".concat(u,"/updates"),dashboard:"/hr/".concat(u),profile:"/hr/".concat(u,"/profile"),settings:"/hr/".concat(u,"/settings/company-account")}
1),[u]),p=(0,s.useMemo)(()=>[{href:"/hr/".concat(u),icon:U.J9Y,label:"Dashboard"},{href:"/hr/".concat(u,"/profile"),icon:U.ILF,label:"My Profile"},{href:"/hr/".concat(u,"/settings/company-account"),icon:U.b7W,label:"Settings"}],[u]),f=(0,s.useMemo)(()=>et({user:o,tenantName:u,isModuleVisible:d}),[o,u,d]),g=(0,s.useCallback)((e,t)=>en({pathname:null==i?void 0:i.pathname,asPath:null==i?void 0:i.asPath},e,t),[null==i?void 0:i.pathname,null==i?void 0:i.asPath]),x=(0,s.useCallback)(()=>{l()},[l]),v=!!((null==o?void 0:o.uid)&&!m()(null==o?void 0:o.tenant)&&ei(o)),b=null==i?void 0:null===(a=i.pathname)||void 0===a?void 0:a.startsWith("/hr/[tenant]"),w=(0,s.useMemo)(()=>m()(null==o?void 0:o.tenant)||!b?null:(0,n.jsx)("span",{className:"text-xs p-1 px-2 mt-2 bg-blue text-white rounded-full font-medium font-display",children:o.tenant.display_name}),[null==o?void 0:o.tenant,b]),y=(0,s.useCallback)(e=>(0,n.jsx)(er,{isCollapsed:e,isOnTenantRoute:b,tenantName:u,user:o}),[b,u,o]),j=(0,s.useMemo)(()=>(0,n.jsx)(K,{user:o}),[o]);return(0,n.jsx)(F,{headerSlot:j,isActiveRoute:g,menuItems:f,notificationsEnabled:v,onLogout:x,profileMenuItems:p,sidebarBadge:w,sidebarFooter:y,sidebarLogo:eo,urls:h,children:e.children})}},58122:function(e,t,a){a.d(t,{u:function(){return i}});var n=a(34406);let i=()=>"true"===n.env.NEXT_PUBLIC_ENABLE_PAYROLL},60808:function(e,t,a){a.d(t,{Z:function(){return u}});var n=a(87686),i=a(60418),o=a(2784),r=a(47477),s=a(82036),l=a(84475),c=a(18966);let d=()=>"".concat(s.JW,"tenant/").concat((0,r.d_)(),"/modules"),u=()=>{var e;let{user:t,updateUser:a}=(0,c.Eu)(),s=null==t?void 0:null===(e=t.tenant)||void 0===e?void 0:e.module_preferences,u=(0,o.useCallback)(e=>(null==s?void 0:s[e])!==!1,[s]),h=(0,n.D)({mutationFn:async e=>{if(!(0,r.Xu)())throw Error("Missing tenant cookie");return(await i.Z.post(d(),{module_preferences:e},{headers:{...(0,l.g0)({realm:"hr"})}})).data},onSuccess:e=>{if(!(null==e?void 0:e.module_preferences))throw Error("module_preferences missing from response");a({tenant:{...null==t?void 0:t.tenant,module_preferences:e.module_preferences}})}});return{isModuleVisible:u,preferences:s,setPreferences:h,isSaving:h.isPending}}},56847:function(e,t,a){a.d(t,{$b:function(){return p},F7:function(){return m}});var n=a(59820),i=a(78298),o=a(14010),r=a(87686),s=a(60418),l=a(62202),c=a(82036),d=a(84475),u=a(49374);let h=async e=>{let{userId:t,query:a={}}=e,n=new URLSearchParams(a).toString();try{let e=await s.Z.get("".concat(c.JW,"user/").concat(t,"/notifications?").concat(n),{headers:{...(0,d.g0)({realm:"hr"})}});return{...e.data,data:e.data.data.map(u.WE)}}catch(e){var i;if((null===(i=e.response)||void 0===i?void 0:i.status)===401)return[];throw e}},m=e=>{let{userId:t,paginate:a=10,page:o=1,status:r,type:s="notification",enabled:l=!0}=e;return(0,n.a)({queryKey:["notifications",t,r,s,a,o],placeholderData:i.Wk,enabled:l&&!!t,queryFn:()=>h({userId:t,query:{paginate:a,page:o,...r&&{status:r},...s&&{type:s}}}),retry:!1})},p=e=>{let t=(0,o.NL)();return{markAsRead:(0,r.D)({mutationFn:async e=>{let{userId:t,notificationId:a}=e;return(await s.Z.post("".concat(c.JW,"user/").concat(t,"/notifications/").concat(a,"/read"),{},{headers:{...(0,d.g0)({realm:"hr"})}})).data},onSuccess:(e,a)=>{l.default.success("Marked as read"),t.invalidateQueries({queryKey:["notifications",a.userId]})},onError:()=>{l.default.error("Failed to mark as read")}}),deleteNotification:(0,r.D)({mutationFn:async e=>{let{userId:t,notificationId:a}=e;return(await s.Z.delete("".concat(c.JW,"user/").concat(t,"/notifications/").concat(a),{headers:{...(0,d.g0)({realm:"hr"})}})).data},onSuccess:(e,a)=>{l.default.success("Notification deleted"),t.invalidateQueries({queryKey:["notifications",a.userId]})},onError:()=>{l.default.error("Failed to delete notification")}}),markAllAsRead:(0,r.D)({mutationFn:async e=>{let{userId:t}=e;return(await s.Z.post("".concat(c.JW,"user/").concat(t,"/notifications/read-all"),{},{headers:{...(0,d.g0)({realm:"hr"})}})).data},onSuccess:(e,a)=>{t.invalidateQueries({queryKey:["notifications",a.userId]})},onError:()=>{l.default.error("Failed to mark all as read")}})}}},44943:function(e,t,a){a.d(t,{$b:function(){return n},BO:function(){return h},C:function(){return l},Du:function(){return s},UY:function(){return r},Ue:function(){return c},VB:function(){return o},Wo:function(){return i},Yb:function(){return d},tK:function(){return u}});let n={SIGNATURES:"addon_signatures",PERFORMANCE:"addon_performance",PAYROLL:"addon_payroll",AI_ANALYSIS:"addon_ai_analysis"},i={PENDING:"pending",PAID:"paid",CANCELLED:"cancelled",OVERDUE:"overdue"},o={ATS:"ats",HRIS:"hris",TIMEOFF:"timeoff",PERFORMANCE:"performance",PAYROLL:"payroll",SIGNATURES:"signatures",REPORTS:"reports"},r={pending:"warning",paid:"success",cancelled:"secondary",overdue:"danger"},s={pending_payment:"Pending Payment",active:"Active",expired:"Expired",cancelled:"Cancelled",suspended:"Suspended"},l={[i.PENDING]:"Pending",[i.PAID]:"Paid",[i.CANCELLED]:"Cancelled",[i.OVERDUE]:"Overdue"},c={spark:{name:"Spark",color:"blue",icon:"file-alt"},surge:{name:"Surge",color:"purple",icon:"file-signature"},volt:{name:"Volt",color:"yellow",icon:"crown"},trial:{name:"Free Trial",color:"gray",icon:"clock"},team:{name:"Team",color:"blue",icon:"rocket"},business:{name:"Business",color:"green",icon:"building"},scale:{name:"Scale",color:"purple",icon:"star"},enterprise:{name:"Enterprise",color:"gold",icon:"crown"},addon_signatures:{name:"E-Signatures",color:"indigo",icon:"pen"},addon_performance:{name:"Performance",color:"orange",icon:"chart-line"},addon_payroll:{name:"Payroll",color:"green",icon:"money-bill"},addon_ai_analysis:{name:"AI Analysis",color:"pink",icon:"brain"}},d=[{type:"addon_signatures",name:"E-Signatures",price:3900},{type:"addon_performance",name:"Performance Management",price:6500},{type:"addon_payroll",name:"Payroll",price:13e3},{type:"addon_ai_analysis",name:"AI Analysis Pack",price:3900}],u={ats:{name:"ATS",description:"Applicant Tracking System"},hris:{name:"HRIS",description:"HR Information System"},timeoff:{name:"Leave Management",description:"Time off and leave requests"},performance:{name:"Performance Management",description:"Goals, feedback and 360 review cycles"},payroll:{name:"Payroll",description:"Payroll and compensation"},signatures:{name:"E-Signatures",description:"Digital document signing"},reports:{name:"Reports",description:"Analytics and reporting"}},h={FLAT:"flat",PER_USER:"per_user",CUSTOM:"custom"}},49374:function(e,t,a){a.d(t,{Ri:function(){return i},Rz:function(){return s},U4:function(){return o},WE:function(){return n},di:function(){return r},k9:function(){return c}});let n=e=>{var t,a,n,i;return{...e,status:e.read_at?"read":"new",title:null===(t=e.data)||void 0===t?void 0:t.t
1itle,description:null===(a=e.data)||void 0===a?void 0:a.description,message:null===(n=e.data)||void 0===n?void 0:n.description,action:null===(i=e.data)||void 0===i?void 0:i.action}},i=e=>null!==e.read_at&&void 0!==e.read_at,o=e=>{var t,a;if(null===(t=e.data)||void 0===t?void 0:t.title)return e.data.title;if(e.title)return e.title;if("App\\Notifications\\SubscriptionCancelledNotification"===e.type){let t=null===(a=e.data)||void 0===a?void 0:a.subscription_name;return t?"".concat(t," subscription cancelled"):"Subscription cancelled"}return"Notification"},r=e=>{var t,a,n;return(null===(t=e.data)||void 0===t?void 0:t.description)||e.description||e.message||(null===(a=e.data)||void 0===a?void 0:a.message)||(null===(n=e.data)||void 0===n?void 0:n.reason)},s=e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.action)||e.action},l=e=>e.filter(e=>!i(e)),c=e=>l(e).length}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.