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]="e6759ee6-d202-431c-984c-c0952bfd63dd",e._sentryDebugIdIdentifier="sentry-dbid-e6759ee6-d202-431c-984c-c0952bfd63dd")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6563],{414:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var o=n(37876),i=n(42556),r=n(70406),l=n(84818),a=n(58667);function c(e){let{templateVars:t,user:n}=e;return(0,o.jsx)(i.mc,{style:{paddingTop:2*a.gutterWidth,paddingBottom:2*a.gutterWidth},children:(0,o.jsxs)(r.eB,{style:{fontFamily:"DefaultSerif"},children:[(0,o.jsx)("h1",{className:"h3",children:"Connections"}),(0,o.jsx)(l.Ay,{incoming:t.incoming,outgoing:t.outgoing,accepted:t.accepted,colleagues:t.colleagues,user:n,showPendingQuote:!0})]})})}},31042:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/connections",function(){return n(414)}])},70406:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>d,Uq:()=>s,c8:()=>a,eB:()=>g,lZ:()=>c,mP:()=>l,oA:()=>u,qJ:()=>h});var o=n(30388),i=n(42556),r=n(58667);let l=(0,o.Ay)(i.mc).withConfig({componentId:"sc-a2a9ca8c-0"})(["padding-top:","px;padding-bottom:","px;"],2*r.gutterWidth,2*r.gutterWidth),a=(0,o.Ay)(i.VP).attrs({xs:"100%",md:"50%"}).withConfig({componentId:"sc-a2a9ca8c-1"})(["text-decoration:none;display:block;text-align:center;line-height:2.6em;"," :before{","}"],e=>e.active?(0,o.AH)(["color:",";background-color:",";"],e.theme.secondaryColor.text,e.theme.secondaryColor.backgroundDark):(0,o.AH)(["color:",";background-color:",";:hover{background-color:",";}"],e.theme.secondaryColor.background,e.theme.neutralColor.backgroundDark,e.theme.neutralColor.backgroundDarker),e=>void 0!==e.number&&(0,o.AH)(["position:relative;top:50%;transform:translateY(-50%);border-radius:1em;margin-right:1em;line-height:normal;float:right;display:inline-block;min-width:1em;padding:3px 7px;content:'","';color:",";background-color:",";"],e.number,e.theme.neutralColor.background,e.theme.neutralColor.textWeaker)),c=o.Ay.div.withConfig({componentId:"sc-a2a9ca8c-2"})(["background-color:",";"],e=>{let{theme:t}=e;return t.neutralColor.background}),s=(0,o.Ay)(i.mc).withConfig({componentId:"sc-a2a9ca8c-3"})(["display:flex;align-items:center;padding:","px 0;"],3*r.gutterWidth),d=o.Ay.h1.attrs({className:"h3"}).withConfig({componentId:"sc-a2a9ca8c-4"})(["display:inline-block;margin:0 0 0 ","px;"],2*r.gutterWidth),u=o.Ay.i.attrs(e=>{let{icon:t}=e;return{className:"fa fa-5x ".concat(t)}}).withConfig({componentId:"sc-a2a9ca8c-5"})(["color:",";"],e=>{let{theme:t}=e;return t.primaryColor.background}),g=o.Ay.div.withConfig({componentId:"sc-a2a9ca8c-6"})(["padding:","px;background-color:",";border:1px solid ",";margin-bottom:","px;box-shadow:0 2px 8px rgba(0,0,0,0.15);"],2*r.gutterWidth,e=>{let{theme:t}=e;return t.neutralColor.background},e=>{let{theme:t}=e;return t.neutralColor.backgroundDarkest},2*r.gutterWidth),h=o.Ay.div.withConfig({componentId:"sc-a2a9ca8c-7"})(["flex-basis:100%;& > div{color:white;background-color:",";padding:2px 4px;border-radius:3px;margin-top:5px;display:inline-block;font-size:75%;}"],e=>{let{theme:t}=e;return t.secondaryColor.background})},84818:(e,t,n)=>{"use strict";n.d(t,{VA:()=>D,Ay:()=>N});var o=n(37876),i=n(14232),r=n(68989),l=n(30388),a=n(79418),c=n(64392),s=n(21073),d=n(12124),u=n(58667);let g=l.Ay.section.withConfig({componentId:"sc-6ff06842-0"})(["&:not(:first-child){margin-top:","px;}"],u.gutterWidth),h=l.Ay.div.withConfig({componentId:"sc-6ff06842-1"})(["display:flex;align-items:baseline;flex-wrap:wrap;gap:","px ","px;margin-bottom:","px;"],u.gutterWidth/2,u.gutterWidth,u.gutterWidth/2),p=l.Ay.h3.withConfig({componentId:"sc-6ff06842-2"})(["margin:0;font-size:1.0625rem;font-weight:600;line-height:1.35;color:",";"],e=>{let{theme:t}=e;return t.neutralColor.textWeaker}),m=l.Ay.a.withConfig({componentId:"sc-6ff06842-3"})(["font-size:0.875rem;font-weight:400;line-height:1.35;color:",";text-decoration:none;white-space:nowrap;cursor:pointer;&:hover{color:",";text-decoration:underline;}"],e=>{let{theme:t}=e;return t.neutralColor.textWeak},e=>{let{theme:t}=e;return t.neutralColor.textWeaker}),f=l.Ay.p.withConfig({componentId:"sc-6ff06842-4"})(["margin:0;color:",";font-size:0.9375rem;"],e=>{let{theme:t}=e;return t.neutralColor.textWeaker}),x=l.Ay.div.withConfig({componentId:"sc-6ff06842-5"})(["display:flex;align-items:flex-start;justify-content:space-between;gap:","px;margin-bottom:","px;"],u.gutterWidth,u.gutterWidth/2),b=l.Ay.h3.withConfig({componentId:"sc-6ff06842-6"})(["margin:0;font-size:1.0625rem;font-weight:600;line-height:1.35;color:",";"],e=>{let{theme:t}=e;return t.neutralColor.textWeaker}),C=l.Ay.button.withConfig({componentId:"sc-6ff06842-7"})(["border:none;background:none;padding:0;margin:0;line-height:1;cursor:pointer;color:",";&:hover{color:",";}"],e=>{let{theme:t}=e;return t.neutralColor.textWeaker},e=>{let{theme:t}=e;return t.neutralColor.text}),y=l.Ay.div.withConfig({componentId:"sc-6ff06842-8"})(["max-height:70vh;overflow-y:auto;"]),w=l.Ay.input.withConfig({componentId:"sc-6ff06842-9"})(["display:block;width:100%;box-sizing:border-box;margin-bottom:","px;padding:","px ","px;font-size:0.875rem;line-height:1.35;border:1px solid ",";border-radius:4px;"],u.gutterWidth/2,u.gutterWidth/4,u.gutterWidth/2,e=>{let{theme:{invertColors:t,neutralColor:{textWeaker:n,textWeakest:o}}}=e;return t?n:o});function k(e){let{title:t,onClose:n,search:i,children:r}=e;return(0,o.jsxs)(d.A,{onClickOutside:n,children:[(0,o.jsxs)(x,{children:[(0,o.jsx)(b,{children:t}),(0,o.jsx)(C,{type:"button","aria-label":"Close",onClick:n,children:(0,o.jsx)("i",{className:"fas faw fa-times"})})]}),i,(0,o.jsx)(y,{children:r})]})}function v(e,t){return(null==e?void 0:e.type)==="User"&&t?{href:t.href(e),route:t.route}:{}}function j(e){let{title:t,items:n=[],totalDocs:r=0,previewLimit:l,section:a,emptyMessage:d,getConnectionProps:u,userLinkPattern:x}=e,[b,C]=(0,i.useState)(!1),[y,j]=(0,i.useState)(null),[A,I]=(0,i.useState)(!1),[D,W]=(0,i.useState)(""),_=e=>(0,o.jsx)(c.A.asConnection,{...(e=>{let t=e.isSender?e.receiver:e.sender;return{...e,...(null==u?void 0:u(e))||{},...v(t,x),onConnectionChange:()=>{var t;return t=e.id,void j(e=>e?e.filter(e=>e.id!==t):e)}}})(e)},e.id),N=n.slice(0,l),P=(0,i.useMemo)(()=>
1{if(!y)return null;let e=D.trim().toLowerCase();return e?y.filter(t=>(function(e){let t=e.isSender?e.receiver:e.sender;return"".concat(t.firstName," ").concat(t.lastName).toLowerCase()})(t).includes(e)):y},[y,D]),L=async()=>{if(C(!0),!y){I(!0);try{let e=await (0,s.A)("/connections?section=".concat(a));j(e.data||[])}finally{I(!1)}}};return(0,o.jsxs)(g,{children:[(0,o.jsxs)(h,{children:[(0,o.jsx)(p,{children:t}),r>l&&(0,o.jsxs)(m,{href:"#",onClick:e=>{e.preventDefault(),L()},children:["See all (",r,")"]})]}),N.length?N.map(_):(0,o.jsx)(f,{children:d}),b&&(0,o.jsxs)(k,{title:t,onClose:()=>{C(!1),j(null),W("")},search:!A&&(null==y?void 0:y.length)>0&&(0,o.jsx)(w,{type:"search",placeholder:"Search by name",value:D,onChange:e=>W(e.target.value)}),children:[A&&(0,o.jsx)("p",{children:"Loading..."}),!A&&(null==P?void 0:P.length)?P.map(_):null,!A&&(null==y?void 0:y.length)&&!(null==P?void 0:P.length)&&(0,o.jsx)("p",{children:"No matches found"}),!A&&y&&!y.length&&(0,o.jsx)("p",{children:d})]})]})}function A(e){let{colleagues:t=[],previewLimit:n,showChatIcon:r=!1,userLinkPattern:l}=e,[a,s]=(0,i.useState)(!1),d=t.slice(0,n),u=e=>(0,o.jsx)(c.A.asUser,{...e,showChatIcon:r,...v(e,l)},e.id);return(0,o.jsxs)(g,{children:[(0,o.jsxs)(h,{children:[(0,o.jsx)(p,{children:"Colleagues"}),t.length>n&&(0,o.jsxs)(m,{href:"#",onClick:e=>{e.preventDefault(),s(!0)},children:["See all (",t.length,")"]})]}),d.map(u),a&&(0,o.jsx)(k,{title:"Colleagues",onClose:()=>s(!1),children:t.map(u)})]})}let I={incoming:5,outgoing:5,accepted:10,colleagues:10},D={incoming:3,outgoing:3,accepted:5,colleagues:3},W={data:[],totalDocs:0};function _(e,t){var n;return{data:(n=((null==e?void 0:e.data)||[]).filter(e=>e.sender&&e.receiver),t&&n.length?[...n].sort((e,n)=>e.id===t?-1:+(n.id===t)):n),totalDocs:(null==e?void 0:e.totalDocs)||0}}function N(e){let{incoming:t=W,outgoing:n=W,accepted:c=W,colleagues:s=[],user:d,showPendingQuote:u=!1,highlightId:g,getConnectionProps:h,userLinkPattern:p,previewLimits:m}=e,{mentor:f}=(0,i.useContext)(l.Dx),x=(0,a.t)(),b={...I,...m},C=((null==d?void 0:d.isMentor)||(null==d?void 0:d.isManager))&&s.length>0,y=(0,i.useMemo)(()=>({incoming:_(t,g),outgoing:_(n,g),accepted:_(c,g)}),[t,n,c,g]);return(0,o.jsxs)(o.Fragment,{children:[u&&(null==d?void 0:d.isUser)&&function(e){let{incoming:t,outgoing:n}=e;return((null==t?void 0:t.totalDocs)||0)>0||((null==n?void 0:n.totalDocs)||0)>0}(y)&&(0,o.jsx)(r.A,{secondary:!0,children:(0,o.jsxs)("h6",{style:{marginBottom:0},children:["Accepting a connection with ",f.mentorTitlePlural," allow them to edit your profile."]})}),y.incoming.totalDocs>0&&(0,o.jsx)(j,{title:"Incoming Requests",items:y.incoming.data,totalDocs:y.incoming.totalDocs,previewLimit:b.incoming,section:"incoming",getConnectionProps:h,userLinkPattern:p}),y.outgoing.totalDocs>0&&(0,o.jsx)(j,{title:"Outgoing Requests",items:y.outgoing.data,totalDocs:y.outgoing.totalDocs,previewLimit:b.outgoing,section:"outgoing",getConnectionProps:h,userLinkPattern:p}),C&&(0,o.jsx)(A,{colleagues:s,previewLimit:b.colleagues,showChatIcon:x,userLinkPattern:p}),(0,o.jsx)(j,{title:"Connections",items:y.accepted.data,totalDocs:y.accepted.totalDocs,previewLimit:b.accepted,section:"accepted",emptyMessage:"No connections yet",getConnectionProps:h,userLinkPattern:p})]})}}},e=>{e.O(0,[5838,2127,636,6593,8792],()=>e(e.s=31042)),_N_E=e.O()}]); 2//# sourceMappingURL=connections-f9a399491e4cd2ca.js.map
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.