1import{a as Xe}from"./chunk-COSIALV3.js";import"./chunk-5DIXYIJI.js";import"./chunk-NPWVC5SJ.js";import{a as Ie,b as Re,c as Ae,d as Ne}from"./chunk-3SRXJQQO.js";import{a as Ve}from"./chunk-TLFTY37Y.js";import{a as Be}from"./chunk-EX4CPEOB.js";import{a as ze}from"./chunk-5HD2AQT6.js";import"./chunk-U24YWVWJ.js";import{a as Fe}from"./chunk-LG7N4FE5.js";import{a as De}from"./chunk-D6T6G6QZ.js";import{a as B,b as qe}from"./chunk-OVCWHT7Y.js";import{a as J,c as We,d as Z}from"./chunk-JR5DJG4E.js";import"./chunk-SKGABSSQ.js";import"./chunk-BBSFPT24.js";import{a as je}from"./chunk-G7Z7SMDL.js";import{a as $e}from"./chunk-2E2X7527.js";import"./chunk-WFYNTHGL.js";import"./chunk-5YFHEGGG.js";import"./chunk-RNCW2XXP.js";import"./chunk-TWJQMWIK.js";import"./chunk-D3L6YWMV.js";import"./chunk-DQMWNNZW.js";import{a as He}from"./chunk-7AGMXXVT.js";import{a as Le}from"./chunk-BQO3XEN2.js";import{d as Q}from"./chunk-ZOAXQM5T.js";import{a as U}from"./chunk-IW7W4SCH.js";import"./chunk-QCTD6DGZ.js";import"./chunk-CH7T3VOC.js";import"./chunk-SGJKUX27.js";import"./chunk-RQTLD533.js";import"./chunk-UUXAEEXA.js";import"./chunk-GEEXCTHZ.js";import{d as Y,e as L}from"./chunk-NRTRCDEI.js";import{a as ke}from"./chunk-MGEUT3N6.js";import"./chunk-7HTO7K5D.js";import{P as Pe,R as Oe,ba as Te,ca as Ee,e as G}from"./chunk-XYLHP2M3.js";import{c as Se}from"./chunk-KKSMGAKS.js";import{f as Me}from"./chunk-N7OY7Y5O.js";import{$b as v,Bc as ve,Fb as he,Ga as a,Gb as fe,Gc as be,Ha as le,Hb as $,Ib as q,Jb as W,Lb as p,Mb as h,Nb as D,Ra as w,Vb as xe,Xa as Ce,Yb as j,_ as b,ac as S,bc as ye,cc as we,da as g,ea as C,eb as k,fb as f,ga as _e,gb as x,gc as X,ha as ge,hc as P,ib as ue,jb as O,kb as T,kc as M,lb as l,lc as m,mb as d,mc as K,nb as r,ob as u,pa as R,qa as F,sb as pe,tb as y,vb as _,xb as c}from"./chunk-KQ7RPBAQ.js";import"./chunk-QXIBXHVB.js";var ee=class o{disabled=m(!1);downloadProfiles=M();downloadComparison=M();static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-candidate-download-report-dropdown"]],hostAttrs:[1,"candidate-download-report-dropdown"],inputs:{disabled:[1,"disabled"]},outputs:{downloadProfiles:"downloadProfiles",downloadComparison:"downloadComparison"},decls:14,vars:9,consts:[["menu","matMenu"],["icon","download","size","s","hoverIcon","download-hover","appearance","download-button",3,"label","ariaLabel","disabled","matMenuTriggerFor"],["xPosition","before","yPosition","below",1,"hc-menu","hc-menu--download-report",3,"overlapTrigger"],["type","button","mat-menu-item","",3,"click"],["svgIcon","download","aria-hidden","true"]],template:function(e,n){if(e&1&&(u(0,"app-action-button",1),v(1,"translate"),v(2,"translate"),d(3,"mat-menu",2,0)(5,"button",3),_("click",function(){return n.downloadProfiles.emit()}),u(6,"mat-icon",4),d(7,"span"),p(8,"Download candidate profile reports"),r()(),u(9,"mat-divider"),d(10,"button",3),_("click",function(){return n.downloadComparison.emit()}),u(11,"mat-icon",4),d(12,"span"),p(13,"Download candidate comparison report"),r()()()),e&2){let i=$(4);l("label",S(1,5,"candidate.comparison.downloadReport"))("ariaLabel",S(2,7,"candidate.comparison.downloadReport"))("disabled",n.disabled())("matMenuTriggerFor",i),a(3),l("overlapTrigger",!1)}},dependencies:[ke,De,G,Ee,Te,L],styles:[`.candidate-download-report-dropdown{display:inline-block}.candidate-download-report-dropdown app-action-button{min-width:168px}.candidate-download-report-dropdown .action-button{width:100%;box-sizing:border-box} 2`],encapsulation:2,changeDetection:0})};var ne=class o{disabled=m(!1);engagementId=m(null);minLimit=m.required();maxLimit=m.required();selectedComparisonIds=m.required();pushSelectedCandidate=M();displayError=M();reportsService=b($e);engagementStore=b(Q);onCandidateSelected(t){let e=this.minLimit(),n=this.maxLimit(),i=this.selectedComparisonIds().length;if(i>=n){let s=`A minimum of ${e} and a maximum of ${n} candidates are required for comparison.`;this.displayError.emit(s);return}i>=e&&this.pushSelectedCandidate.emit(t)}async onDownloadProfiles(){let t=this.engagementId();if(t)try{await this.reportsService.downloadCandidateProfileReports(t,this.selectedComparisonIds(),{companyName:this.engagementStore.selectedEngagement()?.companyName})}catch(e){console.error("Failed to download candidate profile reports.",e)}}async onDownloadComparison(){let t=this.engagementId();if(t)try{await this.reportsService.downloadCandidateComparisonReport(t,this.selectedComparisonIds(),{companyName:this.engagementStore.selectedEngagement()?.companyName})}catch(e){console.error("Failed to download candidate comparison report.",e)}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-candidate-comparison-header"]],inputs:{disabled:[1,"disabled"],engagementId:[1,"engagementId"],minLimit:[1,"minLimit"],maxLimit:[1,"maxLimit"],selectedComparisonIds:[1,"selectedComparisonIds"]},outputs:{pushSelectedCandidate:"pushSelectedCandidate",displayError:"displayError"},decls:7,vars:3,consts:[[1,"candidate-comparison-header"],[1,"candidate-comparison-header__wrap"],[1,"candidate-comparison-header__title"],[3,"downloadProfiles","downloadComparison","disabled"],[1,"candidate-comparison-header__search"],[3,"candidateSelected","engagementId","filterComparisonCandidates"]],template:function(e,n){e&1&&(d(0,"header",0)(1,"div",1)(2,"h2",2),p(3,"Candidate Comparison"),r(),d(4,"app-candidate-download-report-dropdown",3),_("downloadProfiles",function(){return n.onDownloadProfiles()})("downloadComparison",function(){return n.onDownloadComparison()}),r(),d(5,"div",4)(6,"app-candidate-search",5),_("candidateSelected",function(s){return n.onCandidateSelected(s)}),r()()()()),e&2&&(a(4),l("disabled",n.disabled()),a(2),l("engagementId",n.engagementId())("filterComparisonCandidates",n.selectedComparisonIds()))},dependencies:[ee,Xe],styles:["[_nghost-%COMP%]{display:block;width:100%}
2.candidate-comparison-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;align-self:stretch;width:100%;min-height:36px;box-sizing:border-box}.candidate-comparison-header__wrap[_ngcontent-%COMP%]{display:flex;align-items:center;align-content:center;gap:0 12px;flex:1 0 0;flex-wrap:nowrap;min-width:0;min-height:34px;box-sizing:border-box}@media(min-width:1024px){.candidate-comparison-header__wrap[_ngcontent-%COMP%]{min-width:950px;flex-direction:row}}@media(max-width:768px){.candidate-comparison-header__wrap[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:16px 0}}.candidate-comparison-header__title[_ngcontent-%COMP%]{margin:0;font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:500;font-size:28px;color:#002136;font-style:normal;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:34px;flex:1}.candidate-comparison-header__search[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;gap:8px;margin-left:auto}@media(max-width:768px){.candidate-comparison-header__search[_ngcontent-%COMP%]{margin-left:0}}"],changeDetection:0})};function Ge(o,t){if(o&1){let e=y();d(0,"button",3),_("click",function(){g(e);let i=c();return C(i.onRemoveCandidate(i.candidate().contactId))}),u(1,"img",4),r()}if(o&2){let e=c();l("disabled",e.total()<=2)}}function Ue(o,t){if(o&1){let e=y();d(0,"div",2)(1,"div",5)(2,"button",6),_("click",function(){g(e);let i=c();return C(i.onSelectProfile())}),p(3),r(),d(4,"span",7),p(5),r()(),pe(6,8),r()}if(o&2){let e=c(),n=$(2);a(2),k("aria-label",e.profileAriaLabel()),a(),D(" ",e.candidate().name," "),a(2),h(e.candidate().location),a(),l("ngTemplateOutlet",n)}}function Qe(o,t){if(o&1){let e=y();d(0,"div",9)(1,"button",10),_("click",function(){g(e);let i=c();return C(i.onSelectProfile())}),u(2,"app-candidate-avatar",11),r(),pe(3,8),r(),d(4,"div",12)(5,"button",6),_("click",function(){g(e);let i=c();return C(i.onSelectProfile())}),p(6),r(),d(7,"span",7),p(8),r(),d(9,"span",13),p(10),r(),d(11,"span",14),p(12),r()()}if(o&2){let e=c(),n=$(2);a(),k("aria-label",e.profileAriaLabel()),a(),l("name",e.candidate().name)("initials",e.candidate().initials)("stage",e.candidate().stage)("active",e.candidate().active??!0),a(),l("ngTemplateOutlet",n),a(2),k("aria-label",e.profileAriaLabel()),a(),D(" ",e.candidate().name," "),a(2),h(e.candidate().location),a(2),h(e.candidate().title),a(2),h(e.candidate().company)}}var oe=class o{candidate=m.required();total=m.required();removeCandidate=M();hideHeader=m(!1);isStuck=m(!1);profileSelected=M();profileAriaLabel=P(()=>`Open profile for ${this.candidate().name}`);onRemoveCandidate(t){this.removeCandidate.emit(t)}onSelectProfile(){let{contactId:t}=this.candidate();t&&this.profileSelected.emit(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-candidate-comparison-card"]],hostVars:2,hostBindings:function(e,n){e&2&&W("is-stuck",n.isStuck())},inputs:{candidate:[1,"candidate"],total:[1,"total"],hideHeader:[1,"hideHeader"],isStuck:[1,"isStuck"]},outputs:{removeCandidate:"removeCandidate",profileSelected:"profileSelected"},decls:5,vars:1,consts:[["deleteButton",""],[1,"candidate-comparison-card"],[1,"candidate-comparison-card__sticky-row"],["type","button","aria-label","Remove from comparison",1,"candidate-comparison-card__delete",3,"click","disabled"],["ngSrc","/icons/trash.svg","alt","Delete","width","16","height","16","priority",""],[1,"candidate-comparison-card__info","candidate-comparison-card__info--sticky"],["type","button",1,"candidate-comparison-card__name",3,"click"],[1,"candidate-comparison-card__location"],[3,"ngTemplateOutlet"],[1,"candidate-comparison-card__header"],["type","button",1,"candidate-comparison-card__avatar",3,"click"],[3,"name","initials","stage","active"],[1,"candidate-comparison-card__info"],[1,"candidate-comparison-card__title"],[1,"candidate-comparison-card__company"]],template:function(e,n){e&1&&(d(0,"div",1),Ce(1,Ge,2,1,"ng-template",null,0,we),f(3,Ue,7,4,"div",2)(4,Qe,13,11),r()),e&2&&(a(3),x(n.hideHeader()?3:4))},dependencies:[be,ve,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;height:auto;min-height:min-content}.candidate-comparison-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;flex:1 1 auto;width:100%;min-height:min-content;height:auto;box-sizing:border-box}.candidate-comparison-card__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;align-self:stretch;width:100%;min-height:40px;height:auto;margin-bottom:6px}
2.candidate-comparison-card__delete[_ngcontent-%COMP%]{display:flex;width:32px;height:32px;padding:4px;border:none;cursor:pointer;justify-content:center;align-items:center;gap:10px;border-radius:20px;background:#fff}.candidate-comparison-card__delete[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.candidate-comparison-card__delete[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0}.candidate-comparison-card__avatar[_ngcontent-%COMP%]{appearance:none;background:none;border:none;padding:0;cursor:pointer;flex-shrink:0}.candidate-comparison-card__avatar[_ngcontent-%COMP%]:focus-visible{outline:2px solid #334255;outline-offset:2px;border-radius:40px}.candidate-comparison-card__info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;width:100%;max-width:100%;min-width:0;align-self:stretch}.candidate-comparison-card__info[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block}.candidate-comparison-card__name[_ngcontent-%COMP%]{appearance:none;background:none;border:none;padding:0;text-align:left;color:#1a212e;font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:18px;font-style:normal;font-weight:800;line-height:normal;width:100%;max-width:100%;text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:none;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font;white-space:normal;overflow:visible;text-overflow:unset;word-break:break-word;overflow-wrap:anywhere;cursor:pointer}.candidate-comparison-card__location[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:350;line-height:normal;color:#334255;white-space:normal;overflow:visible;text-overflow:unset;word-break:break-word;overflow-wrap:anywhere;margin-bottom:16px}.candidate-comparison-card__sticky-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;width:100%;min-width:0}.candidate-comparison-card__sticky-row[_ngcontent-%COMP%] .candidate-comparison-card__delete[_ngcontent-%COMP%]{flex-shrink:0}.candidate-comparison-card__info--sticky[_ngcontent-%COMP%]{flex:1;min-width:0}.candidate-comparison-card__info--sticky[_ngcontent-%COMP%] .candidate-comparison-card__location[_ngcontent-%COMP%]{margin-bottom:0}.candidate-comparison-card__title[_ngcontent-%COMP%], .candidate-comparison-card__company[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:14px;color:#334255;white-space:normal;overflow:visible;text-overflow:unset;word-break:break-word;overflow-wrap:anywhere;width:100%;max-width:100%}.candidate-comparison-card__title[_ngcontent-%COMP%]{font-weight:500}.candidate-comparison-card__company[_ngcontent-%COMP%]{font-weight:350}.is-stuck[_nghost-%COMP%]{display:flex;align-items:center;min-height:min-content}.is-stuck[_nghost-%COMP%] .candidate-comparison-card[_ngcontent-%COMP%]{justify-content:center;width:100%}.is-stuck[_nghost-%COMP%] .candidate-comparison-card__sticky-row[_ngcontent-%COMP%]{align-items:center;gap:16px;width:100%;min-height:min-content}.is-stuck[_nghost-%COMP%] .candidate-comparison-card__sticky-row[_ngcontent-%COMP%] .candidate-comparison-card__delete[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0;align-self:center}.is-stuck[_nghost-%COMP%] .candidate-comparison-card__info--sticky[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;min-height:min-content}.is-stuck[_nghost-%COMP%] .candidate-comparison-card__info--sticky[_ngcontent-%COMP%] .candidate-comparison-card__location[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};var Je=o=>({num:o}),Ze=(o,t)=>t.contactId;function et(o,t){if(o&1){let e=y();d(0,"div",4)(1,"app-candidate-comparison-card",5),_("removeCandidate",function(i){g(e);let s=c();return C(s.onRemoveCandidateCard(i))})("profileSelected",function(i){g(e);let s=c();return C(s.profileSelected.emit(i))}),r()()}if(o&2){let e=t.$implicit,n=t.$index,i=t.$count,s=c();W("candidate-comparison-strip__candidate-cell--last",n===i-1),a(),l("candidate",e)("total",s.total())("hideHeader",s.hideCardHeader())("isStuck",s.isStuck())}}var ie=class o{candidates=m.required();total=m.required();hideCardHeader=m(!1);isStuck=m(!1);removeCandidateCard=M();profileSelected=M();onRemoveCandidateCard(t){this.removeCandidateCard.emit(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-candidate-comparison-strip"]],hostVars:2,hostBindings:function(e,n){e&2&&W("is-stuck",n.isStuck())},inputs:{candidates:[1,"candidates"],total:[1,"total"],hideCardHeader:[1,"hideCardHeader"],isStuck:[1,"isStuck"]},outputs:{removeCandidateCard:"removeCandidateCard",profileSelected:"profileSelected"},decls:7,vars:6,consts:[[1,"candidate-comparison-strip"],[1,"candidate-comparison-strip__count-cell"],[1,"candidate-comparison-strip__total"],[1,"candidate-comparison-strip__candidate-cell",3,"candidate-comparison-strip__candidate-cell--last"],[1,"candidate-comparison-strip__candidate-cell"],[3,"removeCandidate","profileSelected","candidate","total","hideHeader","isStuck"]],template:function(e,n){e&1&&(d(0,"div",0)(1,"div",1)(2,"span",2),p(3),v(4,"translate"),r()(),O(5,et,2,6,"div",3,Ze),r()),e&2&&(a(3),h(ye(4,1,"candidate.comparison.numCandidates",j(4,Je,n.total()))),a(2),T(n.candidates())
2)},dependencies:[oe,L],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:100%;height:auto}.candidate-comparison-strip[_ngcontent-%COMP%]{display:grid;grid-template-columns:var(--comparison-grid-columns);align-items:stretch;width:100%;max-width:100%;min-width:var(--comparison-grid-min-width);height:auto;box-sizing:border-box;border-bottom:1px solid rgba(100,106,124,.2);border-bottom-left-radius:10px;border-bottom-right-radius:10px}.candidate-comparison-strip__count-cell[_ngcontent-%COMP%], .candidate-comparison-strip__candidate-cell[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;background-color:#f3f8f9;padding:16px;border-top:1px solid rgba(100,106,124,.2)}.candidate-comparison-strip__count-cell[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:16px;border-left:1px solid rgba(100,106,124,.2);border-radius:8px 0 0 8px;min-width:0}.candidate-comparison-strip__total[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:16px;font-weight:500;color:#1a212e;white-space:nowrap}.candidate-comparison-strip__candidate-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;min-width:0;border-left:1px solid rgba(100,106,124,.2)}.candidate-comparison-strip__candidate-cell[_ngcontent-%COMP%] app-candidate-comparison-card[_ngcontent-%COMP%]{flex:1 1 auto;width:100%;min-height:min-content}.candidate-comparison-strip__candidate-cell--last[_ngcontent-%COMP%]{border-right:1px solid rgba(100,106,124,.2);border-radius:0 10px 10px 0}.is-stuck[_nghost-%COMP%] .candidate-comparison-strip[_ngcontent-%COMP%]{min-height:78px;height:auto}.is-stuck[_nghost-%COMP%] .candidate-comparison-strip__count-cell[_ngcontent-%COMP%], .is-stuck[_nghost-%COMP%] .candidate-comparison-strip__candidate-cell[_ngcontent-%COMP%]{min-height:78px;height:auto}.is-stuck[_nghost-%COMP%] .candidate-comparison-strip__count-cell[_ngcontent-%COMP%]{align-items:center}.is-stuck[_nghost-%COMP%] .candidate-comparison-strip__candidate-cell[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start}.is-stuck[_nghost-%COMP%] .candidate-comparison-strip__candidate-cell[_ngcontent-%COMP%] app-candidate-comparison-card[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;min-height:min-content}"],changeDetection:0})};var ae={noCommentText:"No comment provided.",noDataText:"No data available for this section.",noCommentsAvailable:"No comments available"},re={"not-rated":"candidate.comparison.ratings.notRated","needs-development":"candidate.comparison.ratings.needsDevelopment","meets-expectations":"candidate.comparison.ratings.meetsExpectations","exceeds-expectations":"candidate.comparison.ratings.exceedsExpectations"};var tt=(o,t)=>t.candidate.contactId;function nt(o,t){if(o&1&&(d(0,"span",17),p(1),r()),o&2){let e=c().$implicit;a(),D("| ",e.candidate.company)}}function ot(o,t){if(o&1&&(d(0,"p",18),p(1),r()),o&2){let e=c().$implicit;a(),h(e.comment)}}function it(o,t){if(o&1&&(d(0,"p",18),p(1),r()),o&2){let e=c(3);a(),h(e.comparisonConstants.noCommentText)}}function at(o,t){if(o&1&&(d(0,"div",8)(1,"div",11),u(2,"app-rating-pill",12),d(3,"span",13),p(4),v(5,"translate"),r()(),d(6,"span",14),p(7),r(),d(8,"span",15)(9,"span",16),p(10),r(),f(11,nt,2,1,"span",17),r(),f(12,ot,2,1,"p",18)(13,it,2,1,"p",18),r()),o&2){let e=t.$implicit,n=c(2);a(2),l("value",e.rating),a(2),h(S(5,6,n.RATING_TRANSLATION_KEYS[e.rating])),a(3),h(e.candidate.name),a(3),D("",e.candidate.title," "),a(),x(e.candidate.company?11:-1),a(),x(e.comment?12:13)}}function rt(o,t){if(o&1){let e=y();d(0,"div",1),_("click",function(i){g(e);let s=c();return C(s.onBackdropClick(i))}),r(),d(1,"aside",2),_("keydown.escape",function(){g(e);let i=c();return C(i.onEscape())}),d(2,"div",3)(3,"h2",4),p(4),r(),d(5,"button",5,0),_("click",function(){g(e);let i=c();return C(i.onClose())}),u(7,"mat-icon",6),r()(),d(8,"div",7),O(9,at,14,8,"div",8,tt),r(),d(11,"div",9)(12,"button",10),_("click",function(){g(e);let i=c();return C(i.onClose())}),p(13),v(14,"translate"),r()()()}if(o&2){let e=c();a(),l("cdkTrapFocusAutoCapture",!0),k("aria-label",e.row().label+" comments"),a(3),h(e.row().label),a(5),T(e.entries()),a(4),D(" ",S(14,4,"candidate.comparison.close")," ")}}var de=class o{comparisonConstants=ae;RATING_TRANSLATION_KEYS=re;row=m.required();candidates=m.required();open=m(!1);closed=M();entries=P(()=>{let t=this.row();return this.candidates().map(n=>{let i=t.ratings.find(s=>s.contactId===n.contactId);return{candidate:n,rating:i?.value??J,comment:i?.comment??""}})});
2onClose(){this.closed.emit()}onEscape(){this.open()&&this.onClose()}onBackdropClick(t){t.target.classList.contains("comments-drawer__backdrop")&&this.onClose()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-comments-drawer"]],inputs:{row:[1,"row"],candidates:[1,"candidates"],open:[1,"open"]},outputs:{closed:"closed"},decls:1,vars:1,consts:[["closeBtn",""],["aria-hidden","true",1,"comments-drawer__backdrop",3,"click"],["role","dialog","aria-modal","true","cdkTrapFocus","",1,"comments-drawer",3,"keydown.escape","cdkTrapFocusAutoCapture"],[1,"comments-drawer__header"],[1,"comments-drawer__title"],["type","button","aria-label","Close comments drawer",1,"comments-drawer__close-icon",3,"click"],["svgIcon","delete","aria-hidden","true",1,"close-icon"],[1,"comments-drawer__body"],[1,"comments-drawer__entry"],[1,"comments-drawer__footer"],["type","button",1,"comments-drawer__close-button",3,"click"],[1,"comments-drawer__entry-header"],["size","small",3,"value"],[1,"comments-drawer__rating-label"],[1,"comments-drawer__candidate-name"],[1,"comments-drawer__candidate-info"],[1,"comments-drawer__candidate-title"],[1,"comments-drawer__candidate-company"],[1,"comments-drawer__comment-text"]],template:function(e,n){e&1&&f(0,rt,15,6),e&2&&x(n.open()?0:-1)},dependencies:[Oe,Pe,G,Z,L],styles:[".comments-drawer__backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:999;opacity:.9;background:#fff}.comments-drawer[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;z-index:1000;display:flex;flex-direction:column;background:#fff;box-shadow:0 2px 24px #646a7c33;animation:_ngcontent-%COMP%_slide-in .2s ease-out;width:682px;height:calc(100vh - 64px);padding:32px 40px;overflow-y:auto}@media(max-width:768px){.comments-drawer[_ngcontent-%COMP%]{width:92%;padding:32px 16px}}@keyframes _ngcontent-%COMP%_slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.comments-drawer__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:24px}.comments-drawer__title[_ngcontent-%COMP%]{margin:0;font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:500;font-size:22px;line-height:normal;color:#1a212e;flex:1 0 0}.comments-drawer__close-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;border:none;border-radius:50%;background:transparent;cursor:pointer;color:#1a212e;transition:transform .6s cubic-bezier(.175,.885,.32,1.275);transform-origin:center}.comments-drawer__close-icon[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{width:24px;height:24px;font-size:24px;color:currentColor}.comments-drawer__close-icon[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{stroke-width:1}.comments-drawer__close-icon[_ngcontent-%COMP%]:hover{background:url(/icons/close-hover.svg) no-repeat center;background-color:#fff;color:transparent}.comments-drawer__close-icon[_ngcontent-%COMP%]:focus-visible{outline:2px solid #1a212e;outline-offset:2px}.comments-drawer__body[_ngcontent-%COMP%]{flex:1;padding:0}.comments-drawer__entry[_ngcontent-%COMP%]{display:flex;min-width:280px;max-width:800px;flex-direction:column;align-items:flex-start;align-self:stretch;border-bottom:1px solid rgba(100,106,124,.2);padding:24px 0}.comments-drawer__entry[_ngcontent-%COMP%]:last-child{border-bottom:none}.comments-drawer__entry-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding-bottom:12px}.comments-drawer__rating-label[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:500;font-size:14px;color:#646a7c}.comments-drawer__candidate-name[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:18px;font-style:normal;font-weight:800;line-height:24px;text-decoration:underline;color:#0b0c10}.comments-drawer__candidate-info[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:24px;color:#002136}.comments-drawer__candidate-company[_ngcontent-%COMP%]{color:#002136;font-weight:350}.comments-drawer__comment-text[_ngcontent-%COMP%]{margin:0;font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:350;font-size:16px;line-height:24px;color:#646a7c}.comments-drawer__footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;align-self:stretch;border-top:1px solid rgba(0,33,54,.2);padding-top:16px;margin-top:10px}.comments-drawer__close-button[_ngcontent-%COMP%]{display:flex;width:98px;
2height:40px;padding:8px 25px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #334255;cursor:pointer;font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:16px;font-style:normal;font-weight:350;line-height:24px;color:#002136;background:none;transition:all .5s}.comments-drawer__close-button[_ngcontent-%COMP%]:hover{width:88px;padding:8px 10px}.comments-drawer__close-button[_ngcontent-%COMP%]:focus-visible{outline:2px solid #18768c;outline-offset:2px}"],changeDetection:0})};var dt=(o,t)=>t.label,ct=(o,t)=>t.contactId;function st(o,t){if(o&1&&(d(0,"span",4),u(1,"app-rating-pill",8),d(2,"span",9),p(3),v(4,"translate"),r()()),o&2){let e=t.$implicit,n=c();a(),l("value",e),a(2),h(S(4,2,n.RATING_TRANSLATION_KEYS[e]))}}function lt(o,t){if(o&1&&(d(0,"div",5),p(1),r()),o&2){let e=c();a(),D(" ",e.comparisonConstants.noDataText," ")}}function pt(o,t){if(o&1){let e=y();d(0,"app-link",16),v(1,"translate"),_("action",function(){g(e);let i=c().$implicit,s=c(2);return C(s.onShowComments(i))}),r()}if(o&2){let e=c().$implicit;l("text",S(1,2,"candidate.comparison.showComments"))("ariaLabel","Show comments for "+e.label)}}function mt(o,t){if(o&1&&(d(0,"span",14),p(1),r()),o&2){let e=c(3);a(),h(e.comparisonConstants.noCommentsAvailable)}}function _t(o,t){if(o&1&&(d(0,"div",15),u(1,"app-rating-pill",17),r()),o&2){let e=t.$implicit,n=c().$implicit,i=c(2);a(),l("value",i.getRating(n,e.contactId))}}function gt(o,t){if(o&1&&(d(0,"div",10)(1,"div",11)(2,"span",12),p(3),r(),f(4,pt,2,4,"app-link",13)(5,mt,2,1,"span",14),r(),O(6,_t,2,1,"div",15,ct),r()),o&2){let e=t.$implicit,n=c(2);a(2),l("title",xe(e.label)),a(),h(e.label),a(),x(n.hasComments(e)?4:5),a(2),T(n.candidates())}}function Ct(o,t){if(o&1&&(d(0,"div",6),O(1,gt,8,4,"div",10,dt),r()),o&2){let e=c();k("aria-label",e.section().title+" ratings"),a(),T(e.section().rows)}}function ut(o,t){if(o&1){let e=y();d(0,"app-comments-drawer",18),_("closed",function(){g(e);let i=c();return C(i.onDrawerClosed())}),r()}if(o&2){let e=c();l("row",e.drawerRow())("candidates",e.candidates())("open",e.drawerOpen())}}var ce=class o{section=m.required();candidates=m.required();comparisonConstants=ae;RATING_TRANSLATION_KEYS=re;translate=b(Y);document=b(ge);legendValues=We;langChange=Se(this.translate.onLangChange,{initialValue:null});SECTION_TITLE_KEYS={"Pivotal Expertise & Business Impact":"candidate.comparison.sections.pivotal","Leadership Capabilities":"candidate.comparison.sections.leadership","Agility & Potential":"candidate.comparison.sections.agilityPotential"};translatedTitle=P(()=>{this.langChange();let t=this.SECTION_TITLE_KEYS[this.section().title];return t?this.translate.instant(t):this.section().title});drawerOpen=R(!1);drawerRow=R(null);triggerElement=null;triggerRowLabel=null;ratingsByRow=new WeakMap;getRatingsMap(t){let e=this.ratingsByRow.get(t);if(e)return e;let n=new Map(t.ratings.map(i=>[i.contactId,i.value]));return this.ratingsByRow.set(t,n),n}getRating(t,e){return this.getRatingsMap(t).get(e)??J}hasComments(t){return t.ratings.some(e=>!!e.comment&&e.comment.length>0)}getShowCommentsTriggerByLabel(t){let e=`Show comments for ${t}`;return Array.from(this.document.querySelectorAll("button.hc-link")).find(n=>n.getAttribute("aria-label")===e)??null}highlightRestoredTrigger(t){this.document.querySelectorAll("button.hc-link.focus-restored-highlight").forEach(n=>n.classList.remove("focus-restored-highlight")),t.classList.add("focus-restored-highlight");let e=()=>{t.classList.remove("focus-restored-highlight"),t.removeEventListener("blur",e)};t.addEventListener("blur",e)}onShowComments(t){this.triggerRowLabel=t.label,this.triggerElement=this.document.activeElement instanceof HTMLElement?this.document.activeElement:null,this.drawerRow.set(t),this.drawerOpen.set(!0)}onDrawerClosed(){let t=this.triggerElement,e=this.triggerRowLabel;this.drawerOpen.set(!1),this.drawerRow.set(null),this.triggerElement=null,this.triggerRowLabel=null,setTimeout(()=>{let i=(e!==null?this.getShowCommentsTriggerByLabel(e):null)??t;i&&(i.focus(),this.highlightRestoredTrigger(i))},0)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-comparison-body-section"]],inputs:{section:[1,"section"],candidates:[1,"candidates"]},decls:11,vars:6,consts:[[1,"comparison-section",3,"expanded","hideToggle","disabled"],[1,"comparison-section__header","rating-header"],[1,"comparison-section__title"],["aria-label","Rating legend",1,"comparison-section__legend"],[1,"comparison-section__legend-item"],["role","status",1,"comparison-section__empty"],["role","table",1,"comparison-section__table-wrapper"],[3,"row","candidates","open"],["size","small",3,"value"],[1,"comparison-section__legend-label"],["role","row",1,"comparison-section__table-row"],["role","rowheader",1,"comparison-section__label-cell"],[1,"comparison-section__row-label",3,"title"],["variant","action","icon","chevron-right","iconPosition","right",1,"comparison-section__show-comments",3,"text","ariaLabel"],["aria-label","No comments available",1,"comparison-section__no-comments"],["role","cell",1,"comparison-section__candidate-cell"],["variant","action","icon","chevron-right","iconPosition","right",1,"comparison-section__show-comments",3,"action","text","ariaLabel"],["size","large",3,"value"],[3,"closed","row","candidates","open"]
2],template:function(e,n){e&1&&(d(0,"mat-expansion-panel",0)(1,"mat-expansion-panel-header",1)(2,"mat-panel-title")(3,"span",2),p(4),r()(),d(5,"span",3),O(6,st,5,4,"span",4,ue),r()(),f(8,lt,2,1,"div",5)(9,Ct,3,1,"div",6),r(),f(10,ut,1,3,"app-comments-drawer",7)),e&2&&(l("expanded",!0)("hideToggle",!0)("disabled",!0),a(4),h(n.translatedTitle()),a(2),T(n.legendValues),a(2),x(n.section().rows.length===0||n.candidates().length===0?8:9),a(2),x(n.drawerRow()?10:-1))},dependencies:[Ie,Re,U,Ae,Z,de,L],styles:['[_nghost-%COMP%]{display:block;width:100%;max-width:100%;min-width:var(--comparison-grid-min-width)}.comparison-section[_ngcontent-%COMP%]{border-radius:8px;box-shadow:none;overflow:unset;width:100%;max-width:100%;min-width:var(--comparison-grid-min-width);--mat-expansion-container-background-color: transparent}.comparison-section[_ngcontent-%COMP%]:not([class*=mat-elevation-z]){box-shadow:none}.comparison-section.mat-expanded[_ngcontent-%COMP%] .comparison-section__header[_ngcontent-%COMP%], .rating-header[_ngcontent-%COMP%]{background:#ebedf1}.comparison-section__header[_ngcontent-%COMP%]{position:sticky;left:0;z-index:2;height:54px;--mat-expansion-header-collapsed-state-height: 54px;--mat-expansion-header-expanded-state-height: 54px;padding:0 16px;background-color:#ebedf1;touch-action:pan-x pan-y;box-sizing:border-box;min-width:var(--comparison-grid-min-width);width:100%}.comparison-section__header[_ngcontent-%COMP%]:before, .comparison-section__header[_ngcontent-%COMP%]:after{background:transparent}.comparison-section__header[_ngcontent-%COMP%]:hover, .comparison-section__header[_ngcontent-%COMP%]:active{background-color:#d9dce1}.comparison-section__header[aria-expanded=true][_ngcontent-%COMP%]{margin-bottom:var(--candidate-comparison-content-gap, 24px)}.comparison-section__header[_ngcontent-%COMP%] .mat-content[_ngcontent-%COMP%]{align-items:center;overflow:visible}.comparison-section__title[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:500;font-size:16px;line-height:normal;font-style:normal;color:#1a212e;min-width:204px;flex:1 0 0}.comparison-section__legend[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin-left:auto}.comparison-section__legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px}.comparison-section__legend-label[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:500;font-size:14px;line-height:normal;color:#1a212e;white-space:nowrap}.comparison-section__table-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:16px 0;gap:var(--candidate-comparison-content-gap, 24px);overflow:visible}.comparison-section__table-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:var(--comparison-grid-columns);width:100%;min-width:var(--comparison-grid-min-width);min-height:72px;overflow:visible}.comparison-section__table-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.comparison-section__label-cell[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;position:relative;min-width:0;padding-right:8px}.comparison-section__row-label[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:800;font-size:16px;line-height:24px;color:#334255;font-style:normal;max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comparison-section__show-comments[_ngcontent-%COMP%]{--app-link-padding: 2px 11px 2px 0}.comparison-section__candidate-cell[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-family:Avenir,Avenir Next,Arial,sans-serif;padding:16px 0;position:relative;min-width:0;overflow:visible;border-left:1px solid rgba(100,106,124,.2)}.comparison-section__candidate-cell[_ngcontent-%COMP%]:last-child{border-right:1px solid rgba(100,106,124,.2)}.comparison-section__table-row[_ngcontent-%COMP%]:not(:last-child) .comparison-section__candidate-cell[_ngcontent-%COMP%]:after{content:"";position:absolute;left:-1px;top:100%;width:1px;height:var(--candidate-comparison-content-gap, 24px);background-color:#646a7c33;pointer-events:none}.comparison-section__table-row[_ngcontent-%COMP%]:not(:last-child) .comparison-section__candidate-cell[_ngcontent-%COMP%]:last-child:after{width:calc(100% + 2px);background:linear-gradient(to right,rgba(100,106,124,.2) 0,rgba(100,106,124,.2) 1px,transparent 1px,transparent calc(100% - 1px),rgba(100,106,124,.2) calc(100% - 1px),rgba(100,106,124,.2) 100%)}.comparison-section__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:32px 16px;font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:14px;color:#646a7c}.comparison-section__no-comments[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:350;line-height:normal;align-self:stretch;color:#334255}@media(max-width:899px){.comparison-section__legend-item[_ngcontent-%COMP%]:nth-child(3){display:block}.comparison-section__legend-item[_ngcontent-%COMP%]:nth-child(3) app-rating-pill[_ngcontent-%COMP%]{padding-right:6px}.comparison-section__header[_ngcontent-%COMP%]{height:auto;--mat-expansion-header-collapsed-state-height: auto;--mat-expansion-header-expanded-state-height: auto;display:flex;padding:16px;align-items:center;align-content:center;gap:16px;align-self:stretch;flex-wrap:wrap}.comparison-section__header[aria-expanded=true][_ngcontent-%COMP%]{margin-bottom:var(--candidate-comparison-content-gap, 24px)}.comparison-section__legend-label[_ngcontent-%COMP%]{padding-right:8px}}@media(max-width:768px){.comparison-section__legend[_ngcontent-%COMP%]{display:block}.comparison-section__legend-item[_ngcontent-%COMP%]{padding:16px 8px 0 0;line-height:20px}.comparison-section__label-cell[_ngcontent-%COMP%]{padding-left:10px}}'],changeDetection:0})};function ht(o,t){if(!o)return B;let e=o[t]?.trim();if(!e||e===B)return B;let n=o.currency?.trim();return n?`${n} ${e}`:e}function Ke(o){return{title:"Compensation",rows:qe.map(({label:t,key:e})=>({label:t,key:e,valueMap:Object.fromEntries(o.map(n=>[n.contactId,ht(n.compensation,e)]))}))}}var ft=(o,t)=>t.label,xt=(o,t)=>t.contactId;function yt(o,t){if(o&1&&(d(0,"div",6)(1,"span",7),p(2),r()()),o&2){let e=t.$implicit,n=c().$implicit,i=c();a(2),h(i.translateValue(n.valueMap[e.contactId]))}}function wt(o,t){if(o&1&&(d(0,"div",3)(1,"div",4)(2,"span",5),p(3),v(4,"translate"),r()(),O(5,yt,3,1,"div",6,xt),r()),o&2){let e=t.$implicit,n=c();a(3),h(S(4,1,e.label)),a(2),T(n.candidates())}}var se=class o{candidates=m.required();translate=b(Y);section=P(()=>{let t=this.candidates();return Ke(t)});translateValue(t){return t===B?this.translate.instant("candidate.comparison.compensation.tbd"):t}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-compensation-section"]],inputs:{candidates:[1,"candidates"]},decls:7,vars:7,consts:[[1,"compensation-section"],[3,"title","expanded"],["role","table",1,"compensation-section__table-wrapper"],["role","row",1,"compensation-section__table-row"],["role","rowheader",1,"compensation-section__label-cell"],[1,"compensation-section__row-label"],["role","cell",1,"compensation-section__candidate-cell"],[1,"compensation-section__value"]],template:function(e,n){e&1&&(d(0,"div",0)(1,"app-expansion-panel",1),v(2,"translate"),d(3,"div",2),v(4,"translate"),O(5,wt,7,3,"div",3,ft),r()()()),e&2&&(a(),l("title",S(2,3,"candidate.comparison.compensation.title"))("expanded",!0),a(2),k("aria-label",S(4,5,"candidate.comparison.compensation.title")),a(2),T(n.section().rows))},dependencies:[Ne,L],styles:['[_nghost-%COMP%]{display:block;width:100%;min-width:var(--comparison-grid-min-width)}.compensation-section[_ngcontent-%COMP%]{width:100%;min-width:var(--comparison-grid-min-width)}.compensation-section__table-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;min-width:var(--comparison-grid-min-width);padding:16px 0;margin-top:var(--candidate-comparison-content-gap, 24px);gap:var(--candidate-comparison-content-gap, 24px);overflow:visible}.compensation-section__table-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:var(--comparison-grid-columns);width:100%;min-width:var(--comparison-grid-min-width);min-height:72px;
2height:auto;overflow:visible}.compensation-section__label-cell[_ngcontent-%COMP%], .compensation-section__candidate-cell[_ngcontent-%COMP%]{position:relative;min-width:0}.compensation-section__label-cell[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding-right:8px}.compensation-section__row-label[_ngcontent-%COMP%]{font-family:Avenir,Avenir Next,Arial,sans-serif;font-weight:800;color:#334255;font-size:16px;line-height:24px;display:block;white-space:normal;overflow:visible;word-break:break-word}.compensation-section__candidate-cell[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-family:Avenir,Avenir Next,Arial,sans-serif;padding:16px 0;overflow:visible;border-left:1px solid rgba(100,106,124,.2)}.compensation-section__candidate-cell[_ngcontent-%COMP%]:last-child{border-right:1px solid rgba(100,106,124,.2)}.compensation-section__table-row[_ngcontent-%COMP%]:not(:last-child) .compensation-section__candidate-cell[_ngcontent-%COMP%]:after{content:"";position:absolute;left:-1px;top:100%;width:1px;height:var(--candidate-comparison-content-gap, 24px);background-color:#646a7c33;pointer-events:none}.compensation-section__table-row[_ngcontent-%COMP%]:not(:last-child) .compensation-section__candidate-cell[_ngcontent-%COMP%]:last-child:after{width:calc(100% + 2px);background:linear-gradient(to right,rgba(100,106,124,.2) 0,rgba(100,106,124,.2) 1px,transparent 1px,transparent calc(100% - 1px),rgba(100,106,124,.2) calc(100% - 1px),rgba(100,106,124,.2) 100%)}.compensation-section__value[_ngcontent-%COMP%]{color:#334255;white-space:nowrap;font-size:16px;font-weight:500;line-height:24px;font-variant-numeric:tabular-nums}@media(max-width:768px){.compensation-section__label-cell[_ngcontent-%COMP%]{padding-left:10px}}'],changeDetection:0})};var bt=["stripStickyContainer"],Mt=["stripViewport"],St=["comparisonTableScroll"],Pt=o=>["/engagements",o,"candidates"];function Ot(o,t){o&1&&u(0,"app-link",5),o&2&&l("link",j(1,Pt,t))}function Tt(o,t){o&1&&u(0,"app-spinner",7)}function Et(o,t){if(o&1){let e=y();d(0,"app-error-state",11),_("retry",function(){g(e);let i=c(2);return C(i.store.loadComparison(i.id()))}),r()}if(o&2){let e=c(2);l("errorTitle","Failed to load candidate comparison. "+e.store.error())}}function kt(o,t){if(o&1&&u(0,"app-error-state",10),o&2){let e=c(2);l("errorTitle","Failed to load candidate comparison. "+e.store.error())}}function Lt(o,t){if(o&1&&f(0,Et,1,1,"app-error-state",9)(1,kt,1,1,"app-error-state",10),o&2){let e=c();x(e.id()?0:1)}}function Dt(o,t){if(o&1){let e=y();d(0,"app-inline-error",22),_("dismissed",function(){g(e);let i=c(2);return C(i.showInlineError.set(""))}),r()}if(o&2){let e=c(2);l("message",e.showInlineError())}}function It(o,t){o&1&&u(0,"app-spinner",7)}function Rt(o,t){if(o&1){let e=y();d(0,"app-error-state",23),_("retry",function(){g(e);let i=c(2);return C(i.id()&&i.store.loadComparison(i.id()))}),r()}if(o&2){let e=c(2);l("errorTitle","Failed to load comparison quadrants. "+e.store.quadrantError())}}function At(o,t){if(o&1&&u(0,"app-comparison-body-section",25),o&2){let e=c(3);l("section",t)("candidates",e.orderedComparedCandidates())}}function Nt(o,t){if(o&1&&u(0,"app-comparison-body-section",25),o&2){let e=c(3);l("section",t)("candidates",e.orderedComparedCandidates())}}function zt(o,t){if(o&1&&u(0,"app-comparison-body-section",25),o&2){let e=c(3);l("section",t)("candidates",e.orderedComparedCandidates())}}function Vt(o,t){if(o&1&&u(0,"app-compensation-section",26),o&2){let e=c(3);l("candidates",e.orderedComparedCandidates())}}function Ht(o,t){if(o&1){let e=y();d(0,"div",24,2),_("scroll",function(i){g(e);let s=c(2);return C(s.onComparisonTableScroll(i))}),f(2,At,1,2,"app-comparison-body-section",25),f(3,Nt,1,2,"app-comparison-body-section",25),f(4,zt,1,2,"app-comparison-body-section",25),f(5,Vt,1,1,"app-compensation-section",26),r()}if(o&2){let e,n,i,s=c(2);q("margin-top",s.comparisonStripSpacerHeight()?-s.comparisonStripSpacerHeight():null,"px"),a(2),x((e=s.store.pivotalSection())?2:-1,e),a(),x((n=s.store.leadershipSection())?3:-1,n),a(),x((i=s.store.agilityPotentialSection())?4:-1,i),a(),x(s.showCompensationSection()?5:-1)}}function Bt(o,t){if(o&1){let e=y();d(0,"div",12)(1,"div",13),_("stuckChange",function(i){g(e);let s=c();return C(s.onComparisonStripStickyChange(i))}),r(),d(2,"div",14,0)(4,"div",15,1)(6,"div",16)(7,"app-candidate-comparison-strip",17),_("removeCandidateCard",function(i){g(e);let s=c();return C(s.onRemoveCandidateCard(i))})("profileSelected",function(i){g(e);let s=c();return C(s.onCandidateProfileSelected(i))}),r()()()(),u(8,"div",18),f(9,Dt,1,1,"app-inline-error",19),f(10,It,1,0,"app-spinner",7)(11,Rt,1,1,"app-error-state",20)(12,Ht,6,6,"div",21),r()}if(o&2){let e,n=c();q("--comparison-candidate-count",n.orderedComparedCandidates().length),a(),l("appStickyObserverStuckExitBuffer",n.STRIP_STICKY_EXIT_BUFFER_PX),a(5),q("transform",n.comparisonScrollOffsetTransform()),a(),l("candidates",n.orderedComparedCandidates())("total",n.store.total())("hideCardHeader",n.isComparisonStripSticky())("isStuck",n.isComparisonStripSticky()),a(),q("height",n.comparisonStripSpacerHeight(),"px"),a(),x(n.showInlineError()?9:-1),a(),x((e=n.store.quadrantState())==="loading"?10:e==="error"?11:e==="loaded"?12:-1)}}var Ye=class o{id=m(null);contactId=m([]);store=b(Ve);candidatesStore=b(ze);router=b(Me);showInlineError=R("");STRIP_STICKY_EXIT_BUFFER_PX=6;isComparisonStripSticky=R(!1);comparisonStripSpacerHeight=R(0);comparisonScrollLeft=R(0);comparisonScrollOffsetTransform=P(()=>`translateX(-${this.comparisonScrollLeft()}px)`);injector=b(_e);
2stripStickyContainerRef=K("stripStickyContainer");stripViewportRef=K("stripViewport");comparisonTableScrollRef=K("comparisonTableScroll");unbindComparisonScrollListeners=null;activeComparisonDragCleanup=null;engagementStore=b(Q);showCompensationSection=P(()=>{let t=this.engagementStore.selectedEngagementState(),e=this.engagementStore.selectedEngagement();return t!=="loaded"||e?.isBoD?!1:this.orderedComparedCandidates().some(i=>i.compensation!==null)});orderedComparedCandidates=this.store.orderedComparedCandidates;isHeaderDisabled=P(()=>{let t=this.candidatesStore.selectedContactIds().length;return this.store.state()!=="loaded"||!this.id()||t<this.store.minComparisonLimit()||t>this.store.maxComparisonLimit()});constructor(){F(()=>{let t=this.id(),e=this.contactId(),n=Array.isArray(e)?e:e?[e]:[],i=this.store.minComparisonLimit(),s=this.store.maxComparisonLimit();this.candidatesStore.setSelectedContactIds(n),this.showInlineError.set(""),!!t&&n.length>=i&&n.length<=s?X(()=>{this.store.loadComparison(t)}):X(()=>this.store.reset())}),F(()=>{let t=this.id();t&&X(()=>{this.engagementStore.selectedEngagement()?.id!==t&&this.engagementStore.loadEngagementById(t)})}),F(()=>{this.store.state()!=="loaded"&&(this.isComparisonStripSticky.set(!1),this.comparisonStripSpacerHeight.set(0),this.comparisonScrollLeft.set(0))}),F(t=>{if(this.store.quadrantState()!=="loaded"){this.unbindComparisonScrollListeners?.(),this.unbindComparisonScrollListeners=null;return}le(()=>{this.bindComparisonScrollListeners()},{injector:this.injector}),t(()=>{this.unbindComparisonScrollListeners?.(),this.unbindComparisonScrollListeners=null})})}bindComparisonScrollListeners(){this.unbindComparisonScrollListeners?.();let t=this.comparisonTableScrollRef()?.nativeElement;if(!t)return;let e=E=>{this.handleComparisonPointerDown(E,t)},n={capture:!0,passive:!1},i={capture:!0};t.addEventListener("pointerdown",e,i);let s=this.stripViewportRef()?.nativeElement,I=null,A=null;s&&(I=E=>{this.handleStripWheel(E,t)},A=E=>{this.handleComparisonPointerDown(E,t)},s.addEventListener("wheel",I,n),s.addEventListener("pointerdown",A,i));let H=()=>{this.applyComparisonHorizontalScroll(t,t.scrollLeft)};window.addEventListener("resize",H),this.unbindComparisonScrollListeners=()=>{this.cancelActiveComparisonDrag(),t.removeEventListener("pointerdown",e,i),s&&I&&A&&(s.removeEventListener("wheel",I,n),s.removeEventListener("pointerdown",A,i)),window.removeEventListener("resize",H)}}handleComparisonPointerDown(t,e){t.button!==0||this.shouldIgnoreComparisonDrag(t)||this.startComparisonHorizontalDrag(t,e)}handleStripWheel(t,e){let n=this.getHorizontalWheelDelta(t);if(n===0)return;let i=this.normalizeWheelDeltaToPixels(t,n,e);this.scrollComparisonByDelta(e,i),this.syncComparisonScrollPosition(e),t.cancelable&&t.preventDefault()}applyComparisonHorizontalScroll(t,e){let n=Math.max(t.scrollWidth-t.clientWidth,0),i=Math.max(0,Math.min(e,n)),s=t.style.scrollBehavior;t.style.scrollBehavior="auto",t.scrollLeft=i,t.style.scrollBehavior=s,this.syncComparisonScrollPosition(t)}scrollComparisonByDelta(t,e){let n=Math.max(t.scrollWidth-t.clientWidth,0);t.scrollLeft=Math.max(0,Math.min(t.scrollLeft+e,n))}syncComparisonScrollPosition(t){this.comparisonScrollLeft.set(t.scrollLeft)}startComparisonHorizontalDrag(t,e){this.cancelActiveComparisonDrag();let n=t.pointerId,i=!1,s=e.scrollLeft,I=t.clientX,A=N=>{if(N.pointerId!==n)return;let me=N.clientX-I;I=N.clientX,me!==0&&(i=!0,s-=me,this.applyComparisonHorizontalScroll(e,s),N.preventDefault())},H=()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",E),document.removeEventListener("pointercancel",E),this.activeComparisonDragCleanup===H&&(this.activeComparisonDragCleanup=null)},E=N=>{N.pointerId===n&&(i&&N.preventDefault(),H())};this.activeComparisonDragCleanup=H,document.addEventListener("pointermove",A),document.addEventListener("pointerup",E),document.addEventListener("pointercancel",E)}cancelActiveComparisonDrag(){this.activeComparisonDragCleanup?.(),this.activeComparisonDragCleanup=null}onDisplayError(t){this.showInlineError.set(t)}onComparisonTableScroll(t){this.syncComparisonScrollPosition(t.target)}onStripWheel(t){let e=this.comparisonTableScrollRef()?.nativeElement;e&&this.handleStripWheel(t,e)}onStripPointerDown(t){let e=this.comparisonTableScrollRef()?.nativeElement;e&&this.handleComparisonPointerDown(t,e)}onComparisonStripStickyChange(t){if(!t){this.comparisonStripSpacerHeight.set(0),this.isComparisonStripSticky.set(!1);return}let e=this.stripStickyContainerRef()?.nativeElement.offsetHeight??0;this.isComparisonStripSticky.set(!0),e&&le(()=>{let n=this.stripStickyContainerRef()?.nativeElement;!n||!this.isComparisonStripSticky()||this.comparisonStripSpacerHeight.set(Math.max(e-n.offsetHeight,0))},{injector:this.injector})}async onPushSelectedCandidate(t){let e=this.id();e&&(await this.store.addCandidate(t.contactId,e),await this.router.navigate([],{queryParams:{contactId:this.candidatesStore.selectedContactIds()},queryParamsHandling:"merge",replaceUrl:!0}))}onRemoveCandidateCard(t){this.store.removeCandidate(t);let e=this.candidatesStore.selectedContactIds();this.router.navigate([],{queryParams:{contactId:e},queryParamsHandling:"merge",replaceUrl:!0})}onCandidateProfileSelected(t){let e=this.id();if(!e)return;let i=this.store.orderedComparedCandidates().map(s=>s.contactId);this.router.navigate(["/engagements",e,"candidates",t,"background"],{queryParams:{contactId:i}})}getHorizontalWheelDelta(t){return t.deltaX!==0&&Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.shiftKey&&t.deltaY!==0?t.deltaY:0}normalizeWheelDeltaToPixels(t,e,n){switch(t.deltaMode){case WheelEvent.DOM_DELTA_LINE:return e*this.getWheelLineSize(n);case WheelEvent.DOM_DELTA_PAGE:return e*n.clientWidth;default:return e}}getWheelLineSize(t){let e=Number.parseFloat(getComputedStyle(t).lineHeight);return Number.isFinite(e)&&e>0?e:16}shouldIgnoreComparisonDrag(t){let e=t.target;return e instanceof Element?!!e.closest("button, a, app-link, .comparison-section__show-comments, .candidate-comparison-card__delete, .candidate-comparison-card__name"):!0}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-candidate-comparison-layout"]],viewQuery:function(e,n){e&1&&he(n.stripStickyContainerRef,bt,5)(n.stripViewportRef,Mt,5)(n.comparisonTableScrollRef,St,5),e&2&&fe(3)},inputs:{id:[1,"id"],contactId:[1,"contactId"]},decls:7,vars:7,consts:[["stripStickyContainer",""],["stripViewport",""],["comparisonTableScroll",""],[1,"candidate-comparison-layout"],[1,"candidate-comparison-layout__back"],["variant","link","text","Return to candidate list","icon","chevron-left","ariaLabel","Return to candidate list",1,"return-candidate-button-padding",3,"link"],[3,"pushSelectedCandidate","displayError","disabled","engagementId","minLimit","maxLimit","selectedComparisonIds"],["centered",""],[1,"candidate-comparison-layout__loaded-content",3,"--comparison-candidate-count"],["retryLabel","Retry","retryAriaLabel","Retry loading candidate comparison","alertAriaLabel","Failed to load candidate comparison",3,"errorTitle"],["alertAriaLabel","Failed to load candidate comparison",3,"errorTitle"],["retryLabel","Retry","retryAriaLabel","Retry loading candidate comparison","alertAriaLabel","Failed to load candidate comparison",3,"retry","errorTitle"],[1,"candidate-comparison-layout__loaded-content"],["appStickyObserver","","aria-hidden","true",1,"candidate-comparison-layout__strip-sticky-se
2ntinel",3,"stuckChange","appStickyObserverStuckExitBuffer"],[1,"candidate-comparison-layout__strip-sticky"],[1,"candidate-comparison-layout__strip-viewport"],[1,"candidate-comparison-layout__strip-track"],[3,"removeCandidateCard","profileSelected","candidates","total","hideCardHeader","isStuck"],["aria-hidden","true",1,"candidate-comparison-layout__strip-sticky-spacer"],[3,"message"],["retryLabel","Retry","retryAriaLabel","Retry loading comparison quadrants","alertAriaLabel","Failed to load comparison quadrants",3,"errorTitle"],[1,"candidate-comparison-layout__strip-content-offset","candidate-comparison-layout__horizontal-scroll",3,"marginTop"],[3,"dismissed","message"],["retryLabel","Retry","retryAriaLabel","Retry loading comparison quadrants","alertAriaLabel","Failed to load comparison quadrants",3,"retry","errorTitle"],[1,"candidate-comparison-layout__strip-content-offset","candidate-comparison-layout__horizontal-scroll",3,"scroll"],[3,"section","candidates"],[3,"candidates"]],template:function(e,n){if(e&1&&(d(0,"div",3)(1,"div",4),f(2,Ot,1,3,"app-link",5),r(),d(3,"app-candidate-comparison-header",6),_("pushSelectedCandidate",function(s){return n.onPushSelectedCandidate(s)})("displayError",function(s){return n.onDisplayError(s)}),r(),f(4,Tt,1,0,"app-spinner",7)(5,Lt,2,1)(6,Bt,13,13,"div",8),r()),e&2){let i,s;a(2),x((i=n.id())?2:-1,i),a(),l("disabled",n.isHeaderDisabled())("engagementId",n.id())("minLimit",n.store.minComparisonLimit())("maxLimit",n.store.maxComparisonLimit())("selectedComparisonIds",n.candidatesStore.selectedContactIds()),a(),x((s=n.store.state())==="loading"?4:s==="error"?5:s==="loaded"?6:-1)}},dependencies:[ne,ce,ie,Le,He,je,se,Fe,U],styles:["[_nghost-%COMP%]{display:block;width:100%}.candidate-comparison-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;width:100%;max-width:1376px;padding:40px 32px 64px;margin:0 auto;box-sizing:border-box;min-height:282px}@media(max-width:1024px){.candidate-comparison-layout[_ngcontent-%COMP%]{padding:32px 24px 64px;gap:20px}}@media(max-width:768px){.candidate-comparison-layout[_ngcontent-%COMP%]{padding:24px 16px 64px;gap:16px}}@media(max-width:375px){.candidate-comparison-layout[_ngcontent-%COMP%]{padding:16px 12px 64px;gap:12px;min-height:unset}}@media(max-width:3850px){.candidate-comparison-layout[_ngcontent-%COMP%]{max-width:2480px!important}}.candidate-comparison-layout__back[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;align-self:stretch}.return-candidate-button-padding[_ngcontent-%COMP%]{--app-link-padding: 2px 11px 2px 0}.candidate-comparison-layout__strip-sticky-sentinel[_ngcontent-%COMP%]{width:100%;height:1px;margin-top:-1px;margin-bottom:calc(-1 * var(--candidate-comparison-content-gap, 24px))}.candidate-comparison-layout__strip-sticky-spacer[_ngcontent-%COMP%]{width:100%;flex-shrink:0;pointer-events:none;margin-top:calc(-1 * var(--candidate-comparison-content-gap, 24px))}.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{--comparison-label-column-width: 240px;--comparison-candidate-column-min-width: 260px;--comparison-grid-columns: var(--comparison-label-column-width) repeat( var(--comparison-candidate-count, 1), minmax(var(--comparison-candidate-column-min-width), 1fr) );--comparison-grid-min-width: calc( var(--comparison-label-column-width) + var(--comparison-candidate-count, 1) * var(--comparison-candidate-column-min-width) );--candidate-comparison-content-gap: 24px;display:flex;flex-direction:column;gap:var(--candidate-comparison-content-gap);width:100%;min-width:0}@media(max-width:768px){.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{--comparison-candidate-column-min-width: 240px}}@media(max-width:375px){.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{--comparison-label-column-width: 208px;--comparison-candidate-column-min-width: 280px}}.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{overflow-anchor:none}@media(max-width:1024px){.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{--candidate-comparison-content-gap: 20px}}@media(max-width:768px){.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{--candidate-comparison-content-gap: 16px}}@media(max-width:375px){.candidate-comparison-layout__loaded-content[_ngcontent-%COMP%]{--candidate-comparison-content-gap: 12px}}.candidate-comparison-layout__strip-viewport[_ngcontent-%COMP%]{width:100%;overflow-x:clip;overflow-clip-margin:1px;touch-action:pan-y;cursor:grab;-webkit-user-select:none;user-select:none}.candidate-comparison-layout__strip-viewport[_ngcontent-%COMP%]:active{cursor:grabbing}.candidate-comparison-layout__strip-viewport[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .candidate-comparison-layout__strip-viewport[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .candidate-comparison-layout__strip-viewport[_ngcontent-%COMP%] app-link[_ngcontent-%COMP%], .candidate-comparison-layout__strip-viewport[_ngcontent-%COMP%] .candidate-comparison-card__name[_ngcontent-%COMP%]{cursor:pointer}.candidate-comparison-layout__strip-track[_ngcontent-%COMP%]{width:100%;will-change:transform}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%]{width:100%;overflow-x:auto;overflow-y:visible;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;cursor:grab}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%]:active{cursor:grabbing}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] app-compensation-section[_ngcontent-%COMP%]{display:block;width:100%;min-width:var(--comparison-grid-min-width);max-width:none}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .comparison-section__header[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .hc-expansion-panel-header[_ngcontent-%COMP%]{cursor:grab;touch-action:pan-x pan-y;box-sizing:border-box;min-width:var(--comparison-grid-min-width);width:100%}
2.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .comparison-section__header[_ngcontent-%COMP%]:active, .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .hc-expansion-panel-header[_ngcontent-%COMP%]:active{cursor:grabbing}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .comparison-section[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .hc-expansion-panel[_ngcontent-%COMP%]{width:100%;min-width:var(--comparison-grid-min-width);max-width:none;overflow:visible}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .comparison-section__table-wrapper[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .comparison-section__table-row[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .comparison-section__candidate-cell[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .compensation-section__table-wrapper[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .compensation-section__table-row[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .compensation-section__candidate-cell[_ngcontent-%COMP%]{overflow:visible}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .mat-expansion-panel-body[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] .hc-expansion-panel[_ngcontent-%COMP%] .mat-expansion-panel-body[_ngcontent-%COMP%]{overflow:visible;min-width:var(--comparison-grid-min-width)}.candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] app-link[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .candidate-comparison-layout__horizontal-scroll[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer}.candidate-comparison-layout__strip-content-offset[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--candidate-comparison-content-gap);width:100%}.candidate-comparison-layout__strip-sticky[_ngcontent-%COMP%]{position:sticky;top:0;z-index:50;width:100%;max-width:100%;align-self:stretch;box-sizing:border-box;background:var(--mat-sys-surface);backface-visibility:hidden;contain:layout style}"],changeDetection:0})};export{Ye as CandidateComparisonLayoutComponent};
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.