1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8184],{59048:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/connect/profile/[id]",function(){return n(82220)}])},39738:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(85893),s=n(40645),a=n.n(s),l=n(45697),o=n.n(l),r=n(17352);function d(e){let{item:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:t.icon,style:{padding:"2px"}}),(0,i.jsx)("span",{children:t.text})]})}function c(e){let{items:t,onItemClick:n,id:s,...l}=e;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{"data-testid":"button-ellipsis-".concat(s),"data-qa":"button-ellipsis-".concat(s," ").concat(l["data-qa"]),className:"jsx-9e84e8eb00e79a40 ellipsis",children:[(0,i.jsx)(r.u,{id:s,className:"noPrint ellipsis",onItemClick:n,items:t,itemRender:e=>{let{item:t}=e;return(0,i.jsx)(d,{item:t})},fillMode:"flat",rounded:"full",iconClass:"fa-ellipsis fa-light icon-30",popupSettings:{anchorAlign:{horizontal:"center",vertical:"bottom"},popupAlign:{horizontal:"right",vertical:"top"},popupClass:"ellipsis"}}),(0,i.jsx)(a(),{id:"9e84e8eb00e79a40",children:".k-popup.k-menu-popup{padding:14px 4px;border:0;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.k-link:hover{background-color:transparent!important}"})]})})}d.propTypes={item:o().object.isRequired},c.propTypes={items:o().array.isRequired,onItemClick:o().func.isRequired,id:o().string.isRequired}},12218:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(85893),s=n(40645),a=n.n(s),l=n(57747),o=n(67294);function r(e){let{children:t,className:n="",legend:s,handleChange:r,name:d,selectedCondition:c,multiSelect:u=!1}=e,x=o.Children.map(t,e=>o.isValidElement(e)?(0,o.cloneElement)(e,{name:d,type:u?"checkbox":"radio",onChange:e=>{r(e.target.value)},checked:c(e.props.value)}):e);return(0,i.jsxs)("fieldset",{className:"jsx-6f7f93f09c8cedb8 "+(n||""),children:[s&&(0,i.jsx)("legend",{style:{margin:"12px 0"},className:"jsx-6f7f93f09c8cedb8 h5",children:s}),(0,i.jsx)(l.xu,{display:"grid",gridTemplateColumns:{base:"1fr",md:"1fr 1fr"},gap:"0px 74px",children:x}),(0,i.jsx)(a(),{id:"6f7f93f09c8cedb8",children:"fieldset.jsx-6f7f93f09c8cedb8{border:none;padding:0}"})]})}},60103:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(85893),s=n(40645),a=n.n(s),l=n(14e3);function o(e){let{value:t="",label:n="",dotSize:s=10,radioSize:o=20,type:r="radio",...d}=e;return(0,i.jsxs)("label",{htmlFor:t,"data-qa":"".concat(d["data-qa"],"-label"),className:a().dynamic([["8f25a478624ed88a",[o,o,"1px","1px",s,s,s,s/2]]])+" optionRow",children:[(0,i.jsx)(l.x,{className:"bodyTextSmall",marginY:3,textAlign:"start",children:n}),(0,i.jsx)("input",{id:t,value:t,"data-qa":d["data-qa"],type:r,...d,className:a().dynamic([["8f25a478624ed88a",[o,o,"1px","1px",s,s,s,s/2]]])+" "+(d&&null!=d.className&&d.className||"sr-only")}),(0,i.jsx)("span",{className:a().dynamic([["8f25a478624ed88a",[o,o,"1px","1px",s,s,s,s/2]]])+" "+"inputBtn ".concat(r)}),(0,i.jsx)(a(),{id:"8f25a478624ed88a",dynamic:[o,o,"1px","1px",s,s,s,s/2],children:".optionRow.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid var(--gray-200);gap:10px}.inputBtn.__jsx-style-dynamic-selector{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;height:".concat(o,"px;width:").concat(o,"px;border:solid ").concat("1px"," var(--gray-300);position:relative}input.__jsx-style-dynamic-selector:checked+.inputBtn.__jsx-style-dynamic-selector{border:solid ").concat("1px",' var(--color-primary)}.inputBtn.radio.__jsx-style-dynamic-selector:after{content:"";position:absolute;display:none;width:').concat(s,"px;height:").concat(s,'px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;background:var(--color-primary)}input.__jsx-style-dynamic-selector:checked+.inputBtn.__jsx-style-dynamic-selector:after{display:block}.inputBtn.radio.__jsx-style-dynamic-selector{-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.inputBtn.checkbox.__jsx-style-dynamic-selector{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input.__jsx-style-dynamic-selector:checked+.inputBtn.checkbox.__jsx-style-dynamic-selector{background:var(--color-primary);border-color:var(--color-primary)}input.__jsx-style-dynamic-selector:checked+.inputBtn.checkbox.__jsx-style-dynamic-selector:after{content:"";position:absolute;width:').concat(s,"px;height:").concat(s/2,"px;margin-bottom:2px;border-left:2px solid white;border-bottom:2px solid white;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}")})]})}n(67294)},62106:function(e,t,n){"use strict";var i=n(85893);n(67294);var s=n(71434),a=n(41420),l=n(57747),o=n(34292),r=n(11163),d=n(4162),c=n(22878),u=n(39738);let x=e=>{let{siteId:t,relationship:n,onEditSurvey:o,onUpdateSuggestion:x,isMobile:h,declineSuggestedModal:m,declineRequestedModal:p,deleteMatchModal:g}=e,b=(0,r.useRouter)(),j=!h,E=null==n?void 0:n.type,f="suggestion"===E,y=f&&(null==n?void 0:n.requestSent),I=f&&(null==n?void 0:n.requestReceived),v=j&&"match"===E,S=j&&f&&!y&&!I,C=j&&f&&!y&&I,T=j&&f&&y;return(0,i.jsxs)(i.Fragment,{children:["self"===E&&j&&(0,i.jsxs)(l.xu,{display:"flex",gap:2,width:t&&o?455:227.5,children:[t&&(0,i.jsx)(c.Z,{size:a.i.MEDIUM,onClick:()=>b.push((0,d.G3)(d.Z6.SITE_HOME_PAGE,t)),"data-qa":"view-my-caringbridge-button",className:"alternative",fullWidth:!0,children:"View My CaringBridge"}),!!o&&(0,i.jsx)(c.Z,{size:a.i.MEDIUM,onClick:o,"data-qa":"matching-profile-edit-button",className:"secondary",fullWidth:!0,children:"Edit Responses"})]}),v&&(0,i.jsxs)(l.xu,{display:"flex",gap:2,width:455,children:[(0,i.jsx)(c.Z,{size:a.i.MEDIUM,"data-qa":"chat-with-match-button",fullWidth:!0,className:"alternative",onClick:()=>{b.push({pathname:d.Z6.CONNECT_CHAT,query:{id:n.channelUrl}},void 0,{shallow:!0})},children:"Chat"}),(0,i.jsx)(c.Z,{size:a.i.MEDIUM,"data-qa":"remove-connection-button",fullWidth:!0,className:"secondary",onClick:()=>g.setIsShowing(!0),children:"Remove Connection"})]}),S&&(0,i.jsxs)(l.xu,{display:"flex",gap:2,width:455,children:[(0,i.jsx)(c.Z,{size:a.i.MEDIUM,onClick:()=>x("REQUEST"),"data-qa":"request-to-connect-button",fullWidth:!0,className:"alternative",children:"Request to Connect"}),(0,i.jsx)(c.Z,{size:a.i.MEDIUM,"data-qa":"decline-suggested-button",fullWidth:!0,className:"secondary",onClick:()=>m.setIsShowing(!0),children:"Decline Suggested"})]}),C&&(0,i.jsxs)(l.xu,{display:"flex",gap:2,width:455,children:[(0,i.jsx)(c.Z,{size:a.i.MEDIUM,onClick:()=>x("ACCEPT"),"data-qa":"accept-button",fullWidth:!0,className:"alternative",children:"Accept"}),(0,i.jsx)(c.Z,{size:a.i.MEDIUM,"data-qa":"decline-button",fullWidth:!0,className:"secondary",onClick:()=>p.setIsShowing(!0),children:"Decline"})]}),T&&(0,i.jsx)(c.Z,{size:a.i.MEDIUM,"data-qa":"invite-sent-button",disabled:!0,className:"alternative",children:"Invite Sent"}),h&&!!o&&(0,i.jsx)(s.Z,{onClick:o,size:a.i.SMALL,icon:(0,i.jsx)("i",{className:"fa-pen fa-light"}),"data-qa":"matching-profile-edit-button",children:"Edit"}),h&&(null==n?void 0:n.type)==="match"&&(0,i.jsx)(u.Z,{items:[{mode:"DELETE",text:"Remove Connection"}],onItemClick:()=>g.setIsShowing(!0),id:"editConnection","data-qa":"edit-connection-ellipsis-button"})]})};t.Z=e=>{let{backRoute:t,backLabel:n,siteId:c,relationship:u,onEditSurvey:h,onUp
1dateSuggestion:m,isMobile:p,declineSuggestedModal:g,declineRequestedModal:b,deleteMatchModal:j}=e,E=(0,r.useRouter)();return(0,i.jsx)(l.xu,{backgroundColor:"#EBE1E5",position:"relative",zIndex:2,children:(0,i.jsxs)(o.U,{paddingX:"2%",justify:"space-between",height:"60px",children:[(0,i.jsx)(s.Z,{onClick:()=>{E.push(t)},size:a.i.SMALL,icon:(0,i.jsx)("i",{className:"fa-arrow-left fa-light"}),children:n||(t===d.Z6.HOME?"Home":"Back")}),(0,i.jsx)(x,{siteId:c,relationship:u,onEditSurvey:h,onUpdateSuggestion:m,isMobile:p,declineSuggestedModal:g,declineRequestedModal:b,deleteMatchModal:j})]})})}},82220:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return J}});var i=n(85893),s=n(11163),a=n.n(s),l=n(4162),o=n(99392),r=n(67294),d=n(98303),c=n(57747),u=n(5674),x=n(55281),h=n(14e3),m=n(93717),p=n(5460),g=n(34292),b=n(8250),j=n(41420),E=n(22878),f=n(47526),y=e=>{let{name:t,responseMap:n,photoPublicId:s,isMobile:a,showInvited:l}=e;return(0,i.jsx)(g.U,{align:"center",position:"relative",bg:"var(--color-primary)",height:"106px",zIndex:0,children:(0,i.jsxs)(g.U,{className:"connectLayout",children:[(0,i.jsx)(c.xu,{position:"relative",top:"30px",left:"16px",height:140,children:(0,i.jsx)(f.Z,{width:128,publicId:s})}),(0,i.jsx)(c.xu,{position:"absolute",bottom:a?"50%":"20%",right:a?"-25%":"-12%",width:a?"40vh":"65vh",height:a?"40vh":"65vh",borderRadius:"full",bg:"rgba(176, 100, 134, 1)",opacity:.3,zIndex:1}),(0,i.jsxs)(x.K,{spacing:0,paddingTop:"16px",paddingLeft:"22px",children:[(0,i.jsx)(h.x,{color:"var(--berry-bridge-200)",margin:0,className:"bodyTextExtraLarge",children:t}),(0,i.jsx)(h.x,{color:"white",margin:0,className:"bodyTextSmall",children:n.CURRENT_SITUATION}),l&&(0,i.jsx)(c.xu,{backgroundColor:"var(--success-50)",borderRadius:"24px",position:"absolute",top:"90%",children:(0,i.jsx)(h.x,{color:"var(--success-500)",fontSize:"14px",paddingX:"10px",paddingY:"2px",margin:"0",fontWeight:500,children:"Invited"})})]})]})})},I=n(43537),v=n(50319),S=n(37887),C=n(7169),T=n(61922),w=n(62106),N=n(23918),R=n(24027);let M=(0,R.I)({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"}),_=(0,R.I)({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"}),k=(0,R.I)({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,
111.823a.25.25,0,0,1,0,.354Z"}),A=e=>{let{headerText:t,bodyText:n,onClose:s,isError:a}=e;return(0,i.jsxs)(c.xu,{bg:a?"var(--error-200)":"var(--success-50)",color:a?"var(--error-700)":"var(--success-500)",px:"12px",py:"10px",borderRadius:"var(--radius-medium)",minW:"380px",display:"flex",gap:"8px",alignItems:"flex-start",children:[(0,i.jsx)(h.x,{m:0,children:a?(0,i.jsx)(M,{color:"var(--error-500)"}):(0,i.jsx)(_,{color:"var(--green-200)"})}),(0,i.jsxs)(c.xu,{children:[(0,i.jsx)(h.x,{m:0,fontWeight:"bold",children:t}),(0,i.jsx)(h.x,{m:0,children:n}),(0,i.jsx)(h.x,{m:0,onClick:s,textDecoration:"underline",children:"Close"})]}),(0,i.jsx)(h.x,{m:0,onClick:s,children:(0,i.jsx)(k,{color:a?"var(--error-700)":"var(--success-500)"})})]})},O=(0,r.createContext)(null),B=()=>{let e=(0,r.useContext)(O);if(!e)throw Error("useToast must be used within ToastProvider");return e},D=e=>{let{children:t}=e,[n,s]=(0,r.useState)([]),a=(0,r.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[]),l=(0,r.useCallback)(e=>{let{id:t,headerText:n,bodyText:i,duration:l=5e3,isError:o=!1}=e;s(e=>[...e,{id:t,headerText:n,bodyText:i,duration:l,isError:o}]),l&&setTimeout(()=>a(t),l)},[a]),o=(0,r.useCallback)(e=>{let{id:t,headerText:n,bodyText:i,duration:s}=e;l({id:t,headerText:n,bodyText:i,duration:s,isError:!0})},[l]);return(0,i.jsxs)(O.Provider,{value:{showToast:l,showErrorToast:o},children:[t,(0,i.jsx)(c.xu,{position:"fixed",top:"1em",left:"50%",transform:"translateX(-50%)",zIndex:1e4,children:(0,i.jsx)(x.K,{spacing:3,children:n.map(e=>(0,i.jsx)(A,{headerText:e.headerText,bodyText:e.bodyText,onClose:()=>a(e.id),isError:e.isError},e.id))})})]})};var Z=n(48783),q=n(57169),L=n(32883),P=n(76248),U=n(28618),G=n(12218),z=n(60103),Y=e=>{let{isShowing:t,setIsShowing:n,toggleModal:s,title:a,subtitle:l,buttonText:o,onConfirm:d}=e,[u,x]=(0,r.useState)(),[p,g]=(0,r.useState)();return(0,i.jsx)(P.Z,{isShowing:t,setIsShowing:n,"data-qa":"delete-connection-modal",children:(0,i.jsx)(U.Z,{style:{maxWidth:"790px",marginTop:"20px",marginBottom:"20px",position:"relative"},children:(0,i.jsxs)(Z.g,{gap:9,children:[(0,i.jsxs)(Z.g,{gap:2,children:[(0,i.jsx)(h.x,{className:"h4",textAlign:"center",marginBottom:0,children:a}),(0,i.jsx)(h.x,{textAlign:"center",m:0,children:l})]}),(0,i.jsxs)(Z.g,{children:[(0,i.jsx)(h.x,{m:0,mr:"auto",fontWeight:500,children:"Select the primary reason you declined this connection."}),(0,i.jsx)(G.Z,{name:"deleteConnectionOptionGroup",handleChange:e=>x(e),selectedCondition:e=>e===u,multiSelect:!1,children:[{key:"DIAGNOSIS_OR_SYMPTOMS",value:"Different diagnosis, stage, or symptoms"},{key:"EXPERIENCE",value:"Different caregiving or personal experience"},{key:"AGE_OR_BACKGROUND",value:"Location, age, or life background felt different"},{key:"OTHER",value:"Other reason"}].map(e=>(0,i.jsx)(z.Z,{value:e.key,"data-qa":"surveyOption",label:e.value,type:"radio"},e.key))})]}),(0,i.jsxs)(c.xu,{width:"100%",children:[(0,i.jsx)(m.k,{flexDir:"row",gap:1,children:(0,i.jsx)(h.x,{fontWeight:500,children:"What would help us suggest a better connection? (optional)"})}),(0,i.jsx)(q.g,{value:p,onChange:e=>g(e.target.value),placeholder:"Share anything that could help us suggest more meaningful matches.",borderColor:"var(--gray-200)",_placeholder:{fontStyle:"normal"},minH:146})]}),(0,i.jsxs)(c.xu,{width:"100%",textAlign:"center",children:[(0,i.jsx)(h.x,{color:"red.500",children:"This action cannot be undone."}),(0,i.jsx)(E.Z,{size:j.i.MEDIUM,"data-qa":"delete-connection-modal-button",fullWidth:!0,style:{marginBottom:"10px"},onClick:()=>d(u,p),children:o}),(0,i.jsx)(L.r,{textDecoration:"underline",color:"var(--button-blue-500) !important",className:"bodyTextSmall",onClick:s,children:"Cancel"})]})]})})})},H=n(63168),W=n(24418),V=e=>{let{isShowing:t,setIsShowing:n,toggleModal:s,onConfirm:a}=e;return(0,i.jsx)(P.Z,{isShowing:t,setIsShowing:n,"data-qa":"remove-enrollment-modal",children:(0,i.jsxs)(U.Z,{style:{maxWidth:"360px",position:"relative"},children:[(0,i.jsx)(W.Z,{onClick:s,"data-qa":"close-enrollment-modal"}),(0,i.jsxs)(Z.g,{children:[(0,i.jsx)(h.x,{className:"h5",textAlign:"center",marginBottom:0,children:"Remove Enrollment?"}),(0,i.jsx)(h.x,{textAlign:"center",children:"You will lose your connections and chat history. Your CaringBridge profile and page will remain unchanged."}),(0,i.jsx)(h.x,{color:"red.500",children:"This action cannot be undone."}),(0,i.jsx)(E.Z,{size:j.i.MEDIUM,"data-qa":"remove-enrollment-modal-button",fullWidth:!0,onClick:a,children:"Confirm and Remove"}),(0,i.jsx)(L.r,{textDecoration:"underline",color:"var(--button-blue-500) !important",className:"bodyTextSmall",marginTop:2,onClick:s,children:"Cancel"})]})]})})};let F=e=>{let{label:t,value:n,includeBottomLine:s=!0}=e;return(0,i.jsx)(i.Fragment,{children:n&&(0,i.jsxs)(c.xu,{px:4,children:[(0,i.jsxs)(g.U,{py:2,children:[t&&(0,i.jsxs)(h.x,{className:"fontExtraSmall",margin:0,children:[t,":"]}),(0,i.jsx)(h.x,{className:"bodyTextExtraSmall",margin:0,children:n})]}),s&&(0,i.jsx)(c.xu,{h:"1px",bg:"gray.200",width:"100%"})]})})},K=e=>{let{title:t,children:n}=e;return(0,i.jsxs)(x.K,{children:[(0,i.jsx)(h.x,{className:"h6",children:t}),(0,i.jsx)(c.xu,{bg:"white",borderRadius:"10px",shadow:"md",children:n})]})};var X=e=>{var t;let{userId:n}=e,a=(0,s.useRouter)(),o=(0,d.S)({base:!0,md:!1}),{showToast:g,showErrorToast:f}=B(),R=(0,H.Z)(),M=(0,H.Z)(),_=(0,H.Z)(),k=(0,H.Z)(),{myMatchingProfileResponseMap:A,myMatchingProfile:O,matchingSurvey:D,refetchMatches:Z,refetchSuggestions:q,refetchSurvey:L,suggestions:P,matches:U}=(0,b.d)(),[G,z]=(0,r.useState)(null),[W,{loading:X}]=(0,v.D)(I._V,{onCompleted:e=>{var t;(null==e?void 0:null===(t=e.deleteMatchingProfile)||void 0===t?void 0:t.success)&&L().finally(()=>{a.push(l.Z6.HOME)})},onError:()=>{f({id:"delete-profile-error",headerText:"Something went wrong",bodyText:"Could not remove enrollment. Please try again."})}}),[J,Q]=(0,r.useState)(null),$=function(e){let{myMatchingProfile:t,suggestions:n,matches:i}=(0,b.d)();
1if(!e||e===(null==t?void 0:t.userId))return{type:"self"};let s=null==i?void 0:i.find(t=>t.matchingProfile.userId===e);if(s)return{type:"match",matchId:s.matchId,channelUrl:s.extChatGroupId};let a=null==n?void 0:n.find(t=>t.matchingProfile.userId===e);return a?{type:"suggestion",suggestionId:a.suggestionId,requestSent:a.requestSent,requestReceived:!!a.connectRequestedAt}:null}(n),ee=(null==$?void 0:$.type)==="self",et=(null==$?void 0:$.type)==="suggestion",en=(null==$?void 0:$.type)==="match",ei=et&&(null==$?void 0:$.requestReceived),es=et&&(null==$?void 0:$.requestSent),ea=et?null==$?void 0:$.suggestionId:en?null==$?void 0:$.matchId:void 0,{data:el,loading:eo}=(0,S.a)(I.HT,{variables:{query:{matchingUserId:n}},skip:ee}),[er,{loading:ed}]=(0,v.D)(I.z1),ec=async(e,t,n)=>{try{await er({variables:{input:{id:ea,action:e,dismissedReason:t,additionalFeedback:n}}})}catch(e){f({id:"".concat(ea,"-suggestion-error"),headerText:"Something went wrong",bodyText:"Could not update connection. Please try again."});return}switch(await q(),e){case"REQUEST":g({id:ea,headerText:"Success!",bodyText:"Your invitation to connect with ".concat(G.name," has been sent.")});break;case"ACCEPT":g({id:ea,headerText:"Success!",bodyText:"You have accepted the invitation to connect with ".concat(G.name)}),await Z();break;case"DISMISS":case"REJECT":a.push(l.Z6.CONNECT_HOME)}},[eu,{loading:ex}]=(0,v.D)(I.$0,{onCompleted:()=>{Z().finally(()=>{a.push(l.Z6.CONNECT_HOME)})},onError:()=>{f({id:"".concat(ea,"-match-error"),headerText:"Something went wrong",bodyText:"Could not remove connection. Please try again."})}}),eh=async(e,t,n)=>{await eu({variables:{input:{id:ea,action:e,deletedReason:t,additionalFeedback:n}}})},em=()=>{let e=new URLSearchParams({surveyId:D.id});a.push("".concat(l.Z6.SURVEYS,"/matching?").concat(e))};if((0,r.useEffect)(()=>{if(null==$?void 0:$.type){if("self"===$.type){z(O),Q(A);return}if(null==el?void 0:el.getMatchingProfile){let e=el.getMatchingProfile;z(e),e.responses&&Q((0,C.Av)(e.responses))}}},[null==$?void 0:$.type,n,null==el?void 0:el.getMatchingProfile,O,A]),eo||ed||ex||X)return(0,i.jsx)(c.xu,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",children:(0,i.jsx)(T.ZP,{})});let ep=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.some(e=>{let t=J[e];return Array.isArray(t)?t.length>0:!!t})};return $&&J?(0,i.jsxs)(N.Z,{children:[(0,i.jsx)(w.Z,{backRoute:l.Z6.CONNECT_HOME,siteId:ee&&O.siteId,relationship:$,onEditSurvey:ee&&(P.length>0||U.length>0)?em:void 0,onUpdateSuggestion:ec,isMobile:o,declineSuggestedModal:R,declineRequestedModal:M,deleteMatchModal:_}),(0,i.jsx)(y,{name:null==G?void 0:G.name,photoPublicId:null==G?void 0:null===(t=G.photo)||void 0===t?void 0:t.publicId,responseMap:J,isMobile:o,showInvited:"suggestion"===$.type&&$.requestSent}),(0,i.jsxs)(c.xu,{className:"connectLayout",marginY:"5%",children:[(0,i.jsxs)(u.M,{columns:{base:1,sm:2,md:3,lg:4},minChildWidth:"300px",mt:"4",spacing:8,children:[ep("CURRENT_SITUATION","CAREGIVER_DIAGNOSIS_DEMENTIA","PATIENT_DIAGNOSIS_DEMENTIA","CAREGIVER_DIAGNOSIS_CANCER","PATIENT_DIAGNOSIS_CANCER","CAREGIVER_RELATION","CAREGIVER_SYMPTOMPS","PATIENT_SYMPTOMS","CAREGIVER_BEHAVIORAL_SYMPTOMS","PATIENT_BEHAVIORAL_SYMPTOMS","CAREGIVER_YEARS","PATIENT_SYMPTOM_YEARS")&&(0,i.jsxs)(K,{title:"Status",children:[(0,i.jsx)(F,{label:"Current Status",value:J.CURRENT_SITUATION}),(0,i.jsx)(F,{label:"Current Diagnosis",value:J.CAREGIVER_DIAGNOSIS_DEMENTIA||J.PATIENT_DIAGNOSIS_DEMENTIA||J.CAREGIVER_DIAGNOSIS_CANCER||J.PATIENT_DIAGNOSIS_CANCER}),(0,i.jsx)(F,{label:"Relation",value:(0,C.Bx)(J.CAREGIVER_RELATION)}),(0,i.jsx)(F,{label:"Symptoms",value:(0,C.Bx)(J.CAREGIVER_SYMPTOMPS||J.PATIENT_SYMPTOMS)}),(0,i.jsx)(F,{label:"Behavioral",value:(0,C.Bx)(J.CAREGIVER_BEHAVIORAL_SYMPTOMS||J.PATIENT_BEHAVIORAL_SYMPTOMS)}),(0,i.jsx)(F,{label:"Years of Condition",value:(0,C.Bx)(J.CAREGIVER_YEARS||J.PATIENT_SYMPTOM_YEARS),includeBottomLine:!1})]}),ep("CHILDREN_AT_HOME","TRAITS","TOPICS_TO_DISCUSS","RELIGIOUS_BELIEFS")&&(0,i.jsxs)(K,{title:"Getting to Know You",children:[(0,i.jsx)(F,{label:"Children at home",value:J.CH
1ILDREN_AT_HOME}),(0,i.jsx)(F,{label:"Traits",value:(0,C.Bx)(J.TRAITS)}),(0,i.jsx)(F,{label:"Topics to discuss",value:(0,C.Bx)(J.TOPICS_TO_DISCUSS)}),(0,i.jsx)(F,{label:"Religious beliefs",value:(0,C.Bx)(J.RELIGIOUS_BELIEFS),includeBottomLine:!1})]}),ep("GENDER","RACE","YEAR_OF_BIRTH")&&(0,i.jsxs)(K,{title:"Demographics",children:[(0,i.jsx)(F,{label:"Gender",value:J.GENDER}),(0,i.jsx)(F,{label:"Race",value:(0,C.Bx)(J.RACE)}),(0,i.jsx)(F,{label:"Birth Year",value:J.YEAR_OF_BIRTH,includeBottomLine:!1})]}),J.WELL_BEING&&(0,i.jsxs)(x.K,{children:[(0,i.jsx)(h.x,{className:"h6",children:"Impacts to Well-Being"}),(0,i.jsx)(c.xu,{bg:"white",borderRadius:"10px",shadow:"md",children:(0,i.jsx)(F,{value:J.WELL_BEING,includeBottomLine:!1})})]}),J.FAVORITE_HOBBIES&&(0,i.jsxs)(x.K,{children:[(0,i.jsx)(h.x,{className:"h6",children:"Hobbies"}),(0,i.jsx)(c.xu,{bg:"white",borderRadius:"10px",shadow:"md",children:(0,i.jsx)(F,{value:J.FAVORITE_HOBBIES,includeBottomLine:!1})})]}),J.GRATEFUL_FOR&&(0,i.jsxs)(x.K,{children:[(0,i.jsx)(h.x,{className:"h6",children:"Gratitude"}),(0,i.jsx)(c.xu,{bg:"white",borderRadius:"10px",shadow:"md",children:(0,i.jsx)(F,{value:J.GRATEFUL_FOR,includeBottomLine:!1})})]}),J.ANYTHING_ELSE&&(0,i.jsxs)(x.K,{children:[(0,i.jsx)(h.x,{className:"h6",children:"Anything else?"}),(0,i.jsx)(c.xu,{bg:"white",borderRadius:"10px",shadow:"md",children:(0,i.jsx)(F,{value:J.ANYTHING_ELSE,includeBottomLine:!1})})]})]}),(0,i.jsx)(c.xu,{mt:"3.7em",children:(0,i.jsxs)(u.M,{columns:{base:1,sm:2,md:3,lg:4},minChildWidth:"300px",spacing:8,children:[(null==G?void 0:G.siteId)&&(0,i.jsx)(x.K,{onClick:()=>a.push((0,l.G3)(l.Z6.SITE_HOME_PAGE,G.siteId)),children:(0,i.jsxs)(m.k,{direction:"column",textAlign:"center",bg:"rgba(218, 229, 234, 0.6)",borderRadius:"10px",shadow:"md",cursor:"pointer",h:"100%",children:[(0,i.jsxs)(h.x,{className:"h6",color:"var(--navy)",my:"25",children:["View"," ",ee?"My":"".concat(G.name.split(" ")[0],"'s")," ","CaringBridge"]}),(0,i.jsx)(p.E,{src:"/img/people-back-shoulder-holding.svg",alt:"",width:172,m:"auto"})]})}),(0,i.jsx)(c.xu,{display:{base:"none",sm:"block"}}),(0,i.jsx)(c.xu,{display:{base:"none",md:"block"}}),(0,i.jsx)(c.xu,{display:{base:"none",lg:"block"}})]})}),(0,i.jsx)(m.k,{justifyContent:"end",children:ee&&(0,i.jsx)(m.k,{marginTop:o?"3.7em":"auto",children:(0,i.jsx)("button",{className:"button--asLink button--isClear",style:{marginLeft:"auto"},"data-qa":"matching-remove-enrollment",onClick:()=>k.setIsShowing(!0),children:"Remove Enrollment"})})})]}),o&&(0,i.jsx)(c.xu,{position:"fixed",bottom:"0",left:"0",right:"0",bg:"var(--gray-0)",zIndex:1e3,p:4,boxShadow:"var(--box-sha
1dow)",children:ee?(0,i.jsxs)(c.xu,{display:"flex",width:"100%",gap:4,children:[(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,onClick:()=>a.push(l.Z6.CONNECT_HOME),"data-qa":"community-hub-button",className:"secondary",fullWidth:!0,children:(0,i.jsx)(h.x,{margin:0,className:"bodyTextExtraSmall",children:"Community Hub"})}),(P.length>0||U.length>0)&&em&&(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,onClick:em,"data-qa":"edit-responses-button",className:"alternative",fullWidth:!0,children:(0,i.jsx)(h.x,{margin:0,className:"bodyTextExtraSmall",children:"Edit Responses"})})]}):(0,i.jsx)(c.xu,{display:"flex",width:"100%",gap:4,justifyContent:"center",children:en?(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,"data-qa":"chat-with-connection-button",className:"alternative",fullWidth:!0,onClick:()=>{a.push({pathname:l.Z6.CONNECT_CHAT,query:{id:$.channelUrl}},void 0,{shallow:!0})},children:(0,i.jsxs)(h.x,{margin:0,className:"bodyTextExtraSmall",children:["Chat with ",null==G?void 0:G.name]})}):(0,i.jsxs)(i.Fragment,{children:[es&&(0,i.jsx)(h.x,{color:"var(--success-400)",margin:0,children:"Invite Sent"}),ei&&!es&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,onClick:()=>ec("ACCEPT"),"data-qa":"accept-requested-connection-button",className:"alternative",fullWidth:!0,children:(0,i.jsx)(h.x,{margin:0,className:"bodyTextExtraSmall",children:"Accept"})}),(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,"data-qa":"decline-requested-connection-button",className:"secondary",fullWidth:!0,onClick:()=>M.setIsShowing(!0),children:(0,i.jsx)(h.x,{margin:0,className:"bodyTextExtraSmall",children:"Decline"})})]}),!ei&&!es&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,onClick:()=>ec("REQUEST"),"data-qa":"request-connection-button",className:"alternative",fullWidth:!0,children:(0,i.jsx)(h.x,{margin:0,className:"bodyTextExtraSmall",children:"Request to Connect"})}),(0,i.jsx)(E.Z,{size:o?j.i.MOBILE:j.i.MEDIUM,"data-qa":"decline-suggested-button",className:"secondary",fullWidth:!0,onClick:()=>R.setIsShowing(!0),children:(0,i.jsx)(h.x,{margin:0,className:"bodyTextExtraSmall",children:"Decline Suggested"})})]})]})})}),(0,i.jsx)(Y,{isShowing:R.isShowing,setIsShowing:R.setIsShowing,toggleModal:R.toggleModal,title:"Help us Connect You Better",subtitle:"Your feedback helps us better understand what feels meaningful to you so we can suggest connections who may feel more aligned with your journey.",buttonText:"Confirm and Decline",onConfirm:(e,t)=>ec("DISMISS",e,t)}),(0,i.jsx)(Y,{isShowing:M.isShowing,setIsShowing:M.setIsShowing,toggleModal:M.toggleModal,title:"Help us Connect You Better",subtitle:"Your feedback helps us better understand what feels meaningful to you so we can suggest connections who may feel more aligned with your journey.",buttonText:"Confirm and Decline",onConfirm:(e,t)=>ec("REJECT",e,t)}),(0,i.jsx)(Y,{isShowing:_.isShowing,setIsShowing:_.setIsShowing,toggleModal:_.toggleModal,title:"Remove Connection?",subtitle:"You will no longer be connected or able to continue chat conversations. Previous messages will be removed.",buttonText:"Remove Connection",onConfirm:(e,t)=>eh("DELETE",e,t)}),(0,i.jsx)(V,{isShowing:k.isShowing,setIsShowing:k.setIsShowing,toggleModal:k.toggleModal,onConfirm:W})]}):null};function J(){let{id:e}=(0,s.useRouter)().query;return(0,o.c)(o.T.MATCHING_SURVEY)?(0,i.jsx)(D,{children:(0,i.jsx)(X,{userId:"".concat(e)})}):(a().push(l.Z6.HOME),null)}},24027:function(e,t,n){"use strict";n.d(t,{I:function(){return o}});var i=n(36948),s=n(16554),a=n(67294),l=n(85893);function o(e){let{viewBox:t="0 0 24 24",d:n,displayName:o,defaultProps:r={}}=e,d=a.Children.toArray(e.path),c=(0,s.G)((e,s)=>(0,l.jsx)(i.J,{ref:s,viewBox:t,...r,...e,children:d.length?d:(0,l.jsx)("path",{fill:"currentColor",d:n})}));return c.displayName=o,c}},32883:function(e,t,n){"use strict";n.d(t,{r:function(){return d}});var i=n(16554),s=n(77030),a=n(33179),l=n(59235),o=n(25432),r=n(85893),d=(0,i.G)(function(e,t){let n=(0,s.mq)("Link",e),{className:i,isExternal:d,...c}=(0,a.Lr)(e);return(0,r.jsx)(l.m.a,{target:d?"_blank":void 0,rel:d?"noopener":void 0,ref:t,className:(0,o.cx
1)("chakra-link",i),...c,__css:n})});d.displayName="Link"}},function(e){e.O(0,[5680,7536,8764,3953,6418,7352,1609,1445,4389,9357,5017,2780,3263,4472,3918,2888,9774,179],function(){return e(e.s=59048)}),_N_E=e.O()}]);
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.