1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3911],{19056:(e,t,a)=>{a.d(t,{H:()=>l});var r=a(77565);function l(e,t){var a;let l,g,f=null!=(a=null==t?void 0:t.additionalDigits)?a:2,N=function(e){let t,a={},r=e.split(n.dateTimeDelimiter);if(r.length>2)return a;if(/:/.test(r[0])?t=r[0]:(a.date=r[0],t=r[1],n.timeZoneDelimiter.test(a.date)&&(a.date=e.split(n.timeZoneDelimiter)[0],t=e.substr(a.date.length,e.length))),t){let e=n.timezone.exec(t);e?(a.time=t.replace(e[1],""),a.timezone=e[1]):a.time=t}return a}(e);if(N.date){let e=function(e,t){let a=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(a);if(!r)return{year:NaN,restDateString:""};let l=r[1]?parseInt(r[1]):null,n=r[2]?parseInt(r[2]):null;return{year:null===n?l:100*n,restDateString:e.slice((r[1]||r[2]).length)}}(N.date,f);l=function(e,t){var a,r,l,n,s,o,d;if(null===t)return new Date(NaN);let g=e.match(i);if(!g)return new Date(NaN);let f=!!g[4],N=m(g[1]),h=m(g[2])-1,y=m(g[3]),p=m(g[4]),D=m(g[5])-1;if(f){return(a=p,r=D,a>=1&&a<=53&&r>=0&&r<=6)?function(e,t,a){let r=new Date(0);r.setUTCFullYear(e,0,4);let l=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+((t-1)*7+a+1-l)),r}(t,p,D):new Date(NaN)}{let e=new Date(0);return(l=t,n=h,s=y,n>=0&&n<=11&&s>=1&&s<=(u[n]||(c(l)?29:28))&&(o=t,(d=N)>=1&&d<=(c(o)?366:365)))?(e.setUTCFullYear(t,h,Math.max(N,y)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!l||isNaN(l.getTime()))return new Date(NaN);let h=l.getTime(),y=0;if(N.time&&isNaN(y=function(e){var t,a,l;let n=e.match(s);if(!n)return NaN;let i=d(n[1]),o=d(n[2]),m=d(n[3]);return(t=i,a=o,l=m,24===t?0===a&&0===l:l>=0&&l<60&&a>=0&&a<60&&t>=0&&t<25)?i*r.s0+o*r.Cg+1e3*m:NaN}(N.time)))return new Date(NaN);if(N.timezone){if(isNaN(g=function(e){var t;if("Z"===e)return 0;let a=e.match(o);if(!a)return 0;let l="+"===a[1]?-1:1,n=parseInt(a[2]),i=a[3]&&parseInt(a[3])||0;return(t=i)>=0&&t<=59?l*(n*r.s0+i*r.Cg):NaN}(N.timezone)))return new Date(NaN)}else{let e=new Date(h+y),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return new Date(h+y+g)}let n={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},i=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,s=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,o=/^([+-])(\d{2})(?::?(\d{2}))?$/;function m(e){return e?parseInt(e):1}function d(e){return e&&parseFloat(e.replace(",","."))||0}let u=[31,null,31,30,31,30,31,31,30,31,30,31];function c(e){return e%400==0||e%4==0&&e%100!=0}},32078:(e,t,a)=>{a.d(t,{f:()=>n});var r=a(43371),l=a(93673);function n(e,t){let a=(0,r.a)(e);return isNaN(t)?(0,l.w)(e,NaN):(t&&a.setDate(a.getDate()+t),a)}},93911:(e,t,a)=>{a.r(t),a.d(t,{default:()=>D});var r=a(95155),l=a(12115),n=a(19056),i=a(32078),s=a(43371),o=a(93673),m=a(54420),d=a(91031),u=a(62418),c=a(86790),g=a(21806),f=a(89821);let N={date:(0,f.k)({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:(0,f.k)({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:(0,f.k)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},h={code:"en-GB",formatDistance:d.B,formatLong:N,formatRelative:u.o,localize:c.k,match:g.Y,options:{weekStartsOn:1,firstWeekContainsDate:4}};var y=a(6081);let p=e=>{let{candidate:t}=e,[a,d]=(0,l.useState)([]),[u,c]=(0,l.useState)(!0),g=async()=>{if(!(null==t?void 0:t._id)){console.log("No candidate ID provided."),c(!1);return}try{c(!0);let e=await (0,y.nr)("/applications/".concat(t._id));if(!e.ok)throw Error("Failed to fetch stage history.");let a=e.data;console.log("Fetched data:",a),d(a.stageHistory||[])}catch(e){console.error("Error fetching stage history:",e.message),d([])}finally{c(!1)}};(0,l.useEffect)(()=>{g()},[t]);let f=(0,l.useMemo)(()=>{if(console.log("Debugging stageHistory state:",a),!a||!Array.isArray(a))return console.log("StageHistory is invali
1d or empty:",a),[];let e=a.map(e=>(console.log("Processing entry:",e),{timestamp:e.timestamp,localizedTime:(e=>{try{let t=(0,n.H)(e),a=function(e,t){let{years:a=0,months:r=0,weeks:l=0,days:n=0,hours:m=0,minutes:d=0,seconds:u=0}=t,c=(0,s.a)(e),g=r||a?function(e,t){let a=(0,s.a)(e);if(isNaN(t))return(0,o.w)(e,NaN);if(!t)return a;let r=a.getDate(),l=(0,o.w)(e,a.getTime());return(l.setMonth(a.getMonth()+t+1,0),r>=l.getDate())?l:(a.setFullYear(l.getFullYear(),l.getMonth(),r),a)}(c,r+12*a):c,f=n||l?(0,i.f)(g,n+7*l):g;return(0,o.w)(e,f.getTime()+1e3*(u+60*(d+60*m)))}(t,{hours:3});return(0,m.GP)(a,"d MMM yyyy, h:mm a",{locale:h})}catch(e){return console.error("Error in localizeDate:",e),"Invalid Date"}})(e.timestamp),text:"Applied"===e.status?"Application Submitted":"Moved to ".concat(e.status," Stage")})).sort((e,t)=>new Date(t.timestamp)-new Date(e.timestamp));return console.log("Sorted timeline items:",e),e},[a]);return u?(0,r.jsx)("div",{className:"bg-white shadow rounded-lg p-4 mt-4 text-center text-gray-500",children:"Loading timeline..."}):(0,r.jsxs)("div",{className:"bg-white shadow rounded-lg p-4 mt-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Timeline"}),(0,r.jsxs)("div",{className:"relative pl-8",children:[(0,r.jsx)("div",{className:"absolute top-0 bottom-0 left-4 w-0.5 bg-gray-300"}),f.length>0?f.map((e,t)=>(0,r.jsxs)("div",{className:"mb-8 relative",children:[(0,r.jsx)("span",{className:"absolute left-4 top-1/2 transform -translate-x-1/2 -translate-y-1/2 w-4 h-4 bg-green-600 rounded-full"}),(0,r.jsxs)("div",{className:"ml-8",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-700",children:e.text}),(0,r.jsx)("p",{className:"text-xs text-gray-400",children:e.localizedTime})]})]},t)):(0,r.jsx)("p",{className:"text-gray-500 text-center",children:"No timeline events available."})]})]})};p.displayName="TimelineTab";let D=l.memo(p)}}]);
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.