PageSourceSearch

https://irfaqraza.com/_next/static/chunks/pages/notifications-c5440f52043944fd.js

js irfaqraza.com collected 2026-09-25 22:43:53 UTC 50,226 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4412],{6204:(e,l,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications",function(){return n(73469)}])},58313:(e,l,n)=>{"use strict";n.d(l,{A:()=>v});var t=n(37876),o=n(14232),i=n(34321),r=n(68827),s=n(71297),a=n(69198),d=n(63819),c=n(65777),u=n(70657),T=n(94296),m=n(16495),I=n(78063),f=n(5078),p=n(21639);let v=(0,o.memo)(function(e){let{postId:l,commentId:n,selectedMention:v,setShowReplyCommentBox:N=()=>{},handleCommentsUpdateOnLocal:x=()=>{},updatePostStateOnLocal:O=()=>{},autofocusArea:E,commentType:A,smallerSize:P=!1,autoHideCommentBox:C=!1,showToast:j=!1,editableValue:h,isClickOnUpvoteProject:_=!1,post:y={}}=e,R=A===m.COMMENT_TYPES.SCROLL,S=A===m.COMMENT_TYPES.PROJECTS,[g,L]=(0,o.useState)(S&&_),b=(0,o.useRef)(),[D,U]=(0,o.useState)(!1),[Y,F]=(0,o.useState)(""),{handlePublishTrigger:w}=(0,f.A)(),k=async(e,t)=>{var o,c,f,p,v;if(await w()&&((0,d.validateRichText)({htmlText:e||""})||t))try{U(!0);let r={activityId:l,comment:e?(0,I.sanitizeRichText)(e):null,replyTo:n};if(A&&(r.type=A),t&&(r.images=[t]),R&&(r.postId=l,delete r.activityId),null==h?void 0:h.id){await i.Af.editComment({id:h.id,comment:e}),x(m.COMMENT_ACTIONS.EDIT_COMMENT,{comment:e,id:h.id}),null==b||null==(c=b.current)||c.clearContent(),j&&s.A.SuccessToast(a.A.SCROLL.commentEdited),C&&N(!1);return}let d=R?await i.mi.addComment(r):await i.Af.giveCommentOnActivity(r);x(m.COMMENT_ACTIONS.ADD_NEW_COMMENT,{comment:e,id:d.data.id,replyTo:n,type:A,images:t?["".concat(m.CLOUDFRONT_PROD_S3).concat(t)]:[]}),O("COMMENT_COUNT",{id:l}),null==b||null==(o=b.current)||o.clearContent(),C&&N(!1),L(!1);let f=A===m.default.INTEGRATION_TYPE_NAMES.PROJECTS;if(R||f){let e;R&&(e=T.Ay.COMMENTED_POST),f&&(e=T.Ay.COMMENTED_PROJECT),e&&u.A.capture(e,{from:m.SCROLL_CONSTANTS.POSTED_FROM.WEB})}}catch(e){F((null==e||null==(v=e.response)||null==(p=v.data)||null==(f=p.error)?void 0:f.message)||r.A.GLOBAL.wrong)}finally{U(!1),F("")}};return(0,t.jsx)(c.A,{id:n?"reply-comment-box":"create-comment-box",uniqueId:n||l,ref:b,smallerSize:P,autofocusArea:E,selectedMention:v,postComment:k,loading:D,error:Y,editableValue:h,showImageUploader:!0,placeholder:R?"Post your comment":"Share your feedback!",customActionButton:S?p.Ay.Carbon:null,projectCommentExpand:g,setProjectCommentExpand:L,isProject:S,post:y,onChange:()=>{F("")}},"makenewcommentbox-".concat(_," "))})},65206:(e,l,n)=>{"use strict";n.d(l,{QS:()=>i,Wr:()=>r,x7:()=>s});var t=n(16495),o=n(63819);let i=e=>{if(e.length)return 1===e.length?e[0]:2===e.length?e.join(" and "):3===e.length?"".concat(e.slice(0,2).join(", ")," and ").concat(e[2]):"".concat(e.slice(0,3).join(", ")," and ").concat(e.length-3," ").concat(o.default.addPlural({word:"other",count:e.length-3}))},r=e=>{var l,n,o,i,r,s,a,d,c,u;let T=(null==e||null==(l=e.content)?void 0:l.activityId)||(null==e?void 0:e.activityId),m=T?t.APP_PATHS.postDetails(T):null;if((null==e||null==(n=e.content)?void 0:n.activityTypeName)===t.default.INTEGRATION_TYPE_NAMES.PROJECTS&&(null==e||null==(o=e.content)?void 0:o.link)&&(m=(null==e||null==(r=e.content)?void 0:r.link)||""),[t.NOTIFICATION_TYPE.MENTION_ACTIVITY,t.NOTIFICATION_TYPE.MENTION_COMMENT,t.NOTIFICATION_TYPE.ACTIVITY_COMMENT,t.NOTIFICATION_TYPE.COMMENT_KUDOS,t.NOTIFICATION_TYPE.COMMENT_REPLY].includes(null==e?void 0:e.type)&&(null==e||null==(i=e.content)?void 0:i.commentId))switch(null==e||null==(s=e.content)?void 0:s.activityTypeName){case t.COMMENT_TYPES.BLOG:m=t.APP_PATHS.blogComment({blogURL:null==e||null==(a=e.content)?void 0:a.blogURL,commentId:null==e||null==(d=e.content)?void 0:d.commentId});break;case t.default.INTEGRATION_TYPE_NAMES.PROJECTS:m=t.APP_PATHS.projectComment({projectUrl:null==e||null==(c=e.content)?void 0:c.link,commentId:null==e||null==(u=e.content)?void 0:u.commentId});break;default:m=t.APP_PATHS.postComment({postId:T,commentId:e.content.commentId})}return m},s={UPVOTED_POST:"upvoted your post.",PROFILE_VIEW:"viewed your profile.",FOLLOWING_YOU:"started following you.",COMMENTED_ON_YOUR:"commented on your",VOTED_POLL:"voted on your Poll.",ANSWERED_QUIZ:"answered your Quiz.",UPVOTED_ARTICLE:"liked your article.",upvotedProjectMessage:e=>e?"upvoted your project - ".concat(e,"."):"upvoted your Project."}},73469:(e,l,n)=>{"use strict";n.r(l),n.d(l,{default:()=>ed});var t=n(37876),o=n(2171),i=n(14232),r=n(77328),s=n.n(r),a=n(61330),d=n.n(a),c=n(88798),u=n(89099),T=n(17652),m=n(34321),I=n(89311),f=n(48230),p=n.n(f),v=n(16495),N=n(63819),x=n(83872),O=n(4755),E=n(28857);let A=e=>{let{timestamp:l}=e;return l?(0,t.jsx)("span",{className:"text-xxs text-gray-500 ml-auto",children:(0,N.universalDateFormatter)(l)}):null},P=e=>{let l=(0,u.useRouter)(),{readAt:n}=e,[o,r]=(0,i.useState)(n),{notificationUrl:s,icon:a,profileHandle:d="",profilePicture:c="",userInfo:T,notificationText:m,comment:I="",timestamp:f,postCaption:N,multipleUsers:x=!1,senders:P=[],sender:C,hideProfilePicture:j=!1,action:h="",onClick:_=()=>{},onRead:y=()=>{}}=e,R=()=>{o||(r(new Date),y())},S=T||"".concat((null==C?void 0:C.firstName)||""," ").concat((null==C?void 0:C.lastName)||""),g=P;return P.length>10&&(g=P.slice(0,10)),window.innerWidth<768&&P&&(null==P?void 0:P.length)>0&&(g=P.slice(0,5)),(0,t.jsxs)("div",{onClick:()=>{_(),s&&l.push(s)},onKeyDown:e=>{"Enter"===e.key&&(_(),s&&l.push(s))},tabIndex:0,role:"link",className:"flex items-start w-full px-4 py-3 sm:px-6 border-b-1 border-primaryBorder cursor-pointer sm:hover:bg-gray-25 text-left ".concat(!o&&"bg-gray-50"),onMouseOver:()=>R(),onFocus:()=>R(),children:[(0,t.jsx)("div",{className:"w-8 h-8 flex items-center",children:(0,t.jsx)("p",{className:"".concat(o?"text-gray-400":"text-gray-1k"," "),children:a})}),x?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"w-full ".concat((null==g?void 0:g.length)>1?"":"flex"),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("div",{className:"flex gap-1",children:g.map(e=>(0,t.jsx)(E.A,{profileHandle:null==e?void 0:e.profileHandle,position:"-left-36",children:(0,t.jsx)(p(),{href:v.APP_PATHS.userProfile({profileHandle:null==e?void 0:e.profileHandle}),onClick:e=>e.stopPropagation(),className:"mr-0.5 w-full flex items-start justify-between",children:(0,t.jsx)(O.Ay.Smaller,{image:null==e?void 0:e.profilePicture,verified:null==e?void 0:e.verified,idVerified:null==e?void 0:e.idVerifiedAt},null==e?void 0:e.profileHandle)},"".concat(null==e?void 0:e.profileHandle,"-").concat(f))},"".concat(null==e?void 0:e.profileHandle,"-").concat(f)))}),(null==g?void 0:g.length)>1&&(0,t.jsx)(A,{timestamp:f})]}),(0,t.jsxs)("div",{className:"flex w-full items-center",children:[(0,t.jsx)("div",{className:"text-sm text-gray-500 ".concat((null==g?void 0:g.length)===1?"ml-1":"mt-1"),children:m}),(null==g?void 0:g.length)===1&&(0,t.jsx)(A,{timestamp:f})]})]}),(0,t.jsx)("div",{children:N})]}):(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex text-sm gap-2",children:[!j&&(0,t.jsx)("div",{className:"flex justify-between",children:(0,t.jsx)("span",{onClick:e=>e.stopPropagation(),role:"none",className:"w-8 h-8",children:(0,t.jsx)(E.A,{profileHandle:(null==C?void 0:C.profileHandle)||d,children:(0,t.jsx)(p(),{className:"mr-1",href:v.APP_PATHS.userProfile({profileHandle:(null==C?void 0:C.profileHandle)||d}),children:(0,t.jsx)(O.Ay.Smaller,{image:(null==C?void 0:C.profilePicture)||c,verified:null==C?void 0:C.verified,idVerified:null==C?void 0:C.idVerifiedAt},"".concat(null==C?void 0:C.profileHandle,"-").concat(f))})})})}),(0,t.jsxs)("div",{className:"my-1.5 w-full",children:[(0,t.jsxs)("div",{children:[S&&(0,t.jsx)("span",{onClick:e=>e.stopPropagation(),role:"none",children:(0,t.jsx)(E.A,{profileHandle:(null==C?void 0:C.profileHandle)||d,children:(0,t.jsx)(p(),{className:"font-semibold hover:underline text-gray-1k",href:v.APP_PATHS.userProfile({profileHandle:(null==C?void 0:C.profileHandle)||d}),children:S})})}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:m})]}),I,h&&h]}),(0,t.jsx)("span",{className:"ml-auto my-1.5",children:(0,t.jsx)(A,{timestamp:f})})]}),(0,t.jsx)("div",{children:N})]})]})};
1var C=n(58313),j=n(445),h=n(16416),_=n(70657),y=n(94296),R=n(78063),S=n(65206),g=n(4282),L=n(25498),b=n(21639),D=n(71297);let U=e=>{let{comment:l}=e;return(0,t.jsx)(R.default,{html:l,className:"text-gray-700 link-break text-sm py-1 pl-2 border-l-2 border-primaryBorder mt-1 blockquote",as:"blockquote"})},Y=e=>{let{title:l,caption:n,imageExist:o,videoExist:i}=e;return l||n?(0,t.jsxs)("div",{className:"link-break flex flex-col gap-1 pt-0.5",children:[l?(0,t.jsx)(I.default.SemiBoldText,{sm:!0,className:"paragraph-clamp",children:l}):null,n?(0,t.jsx)("div",{children:(0,t.jsx)(I.default.NormalText,{sm:!0,textColor:"text-gray-700",className:"paragraph-clamp3 break-words",children:n})}):null,o?(0,t.jsx)("div",{children:(0,t.jsx)(I.default.MutedText,{sm:!0,textColor:"text-gray-500",children:"Image"})}):null,i?(0,t.jsx)("div",{children:(0,t.jsx)(I.default.MutedText,{sm:!0,textColor:"text-gray-500",children:"Video"})}):null]}):null},F=e=>{let{projectId:l,isAccepted:n,isRejected:o,notificationId:r}=e,[s,a]=(0,i.useState)(n),[d,c]=(0,i.useState)(o),[u,T]=(0,i.useState)(!1),[I,f]=(0,i.useState)(!1);(0,i.useEffect)(()=>{a(n),c(o)},[n,o]);let p=async()=>{try{T(!0),await m._x.respondToCollaboratorRequest({projectId:l,action:v.PROJECT_CONSTANTS.COLLABORATOR_REQUEST_ACTION.ACCEPT,notificationId:r}),a(!0),D.A.SuccessToast("Collaborator request accepted")}catch(e){D.A.ErrorToast("Failed to accept collaborator request")}finally{T(!1)}},N=async()=>{try{f(!0),await m._x.respondToCollaboratorRequest({projectId:l,action:v.PROJECT_CONSTANTS.COLLABORATOR_REQUEST_ACTION.REJECT,notificationId:r}),c(!0),D.A.SuccessToast("Collaborator request rejected")}catch(e){D.A.ErrorToast("Failed to reject collaborator request")}finally{f(!1)}};return s||d?null:(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex gap-2 items-center mt-2 w-max",role:"none",onClick:e=>null==e?void 0:e.stopPropagation(),onKeyDown:e=>{(null==e?void 0:e.key)==="Enter"&&(null==e||e.stopPropagation())},children:[s?null:(0,t.jsx)(b.Ay.Primary,{small:!0,loading:u,onClick:()=>p(),disabled:u,children:"Accept"}),(0,t.jsx)(b.Ay.Red,{small:!0,loading:I,onClick:()=>N(),disabled:I,children:"Reject"})]})})},w=e=>{var l;let{postId:n,commentId:o,sender:r,isLiked:s,isComment:a,isPost:d,replyTo:c,senderId:u,isScroll:T,notification:I}=e,[f,p]=(0,i.useState)(!1),[N,x]=(0,i.useState)(s),O={name:"".concat(null==r?void 0:r.firstName," ").concat(null==r?void 0:r.lastName),username:null==r?void 0:r.profileHandle,pid:u},E=async()=>{if(a){let e={ids:[o]};try{x(e=>!e),s?await m.Af.removeALikeFromComment(e):await m.Af.giveALikeToComment(e)}catch(e){x(e=>!e)}}if(d)try{s?await m.mi.removePostUpvote(n):await m.mi.upvotePost(n),x(e=>!e)}catch(e){}},A=(0,i.useId)();return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex gap-2 items-center mt-2 w-max",role:"none",onClick:e=>null==e?void 0:e.stopPropagation(),onKeyDown:e=>{(null==e?void 0:e.key)==="Enter"&&(null==e||e.stopPropagation())},children:[(0,t.jsx)(j.B9.CommentLike,{isActive:N,onClick:E}),(0,t.jsx)(j.B9.CommentReply,{onClick:()=>p(!f)})]}),f&&(0,t.jsx)("div",{className:"mt-2 mb-0 w-full",role:"none",onClick:e=>null==e?void 0:e.stopPropagation(),onKeyDown:e=>{(null==e?void 0:e.key)==="Enter"&&(null==e||e.stopPropagation())},children:(0,t.jsx)(C.A,{postId:n,commentId:c,autofocusArea:!1,smallerSize:!0,autoHideCommentBox:!0,showToast:!0,setShowReplyCommentBox:p,scroll:T,commentType:T?v.COMMENT_TYPES.SCROLL:null==I||null==(l=I.content)?void 0:l.activityTypeName,selectedMention:O},A)})]})},k=e=>{switch(e){case h.A.APPLICANT_ACTIVITY_TYPE.SHORTLISTED:return(0,t.jsx)(x.CheckIcon,{size:20});case h.A.APPLICANT_ACTIVITY_TYPE.REJECTED:return(0,t.jsx)(x.CloseXIcon,{size:20,color:"currentColor"});default:return(0,t.jsx)(x.NotesIcon,{size:20})}},M=()=>{"undefined"!=typeof document&&(document.getElementById(v.USER_STREAK.MOB_PANEL_ID).click(),document.getElementById(v.USER_STREAK.WEB_PANEL_ID).click())},H=e=>{var l,n,o,i,r;let{notification:s,singleNotificationText:a,clubbedNotificationText:d}=e,c=null==(l=s.senders)?void 0:l.length,u=c>=1?c-1:c,T=N.default.getDisplayName((null==s||null==(n=s.senders)?void 0:n[0])||(null==s?void 0:s.sender))||"Peerlist User",m=(null==s||null==(i=s.senders)||null==(o=i[0])?void 0:o.profileHandle)||(null==s||null==(r=s.sender)?void 0:r.profileHandle)||"",I=(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{onClick:e=>e.stopPropagation(),role:"none",children:(0,t.jsx)(E.A,{profileHandle:m,position:"-left-32",children:(0,t.jsx)(p(),{href:"/".concat(m),className:"font-semibold hover:underline text-gray-1k",children:T})})})," ",a]});return u>=1&&(I=(0,t.jsxs)("p",{children:[(0,t.jsxs)("span",{onClick:e=>e.stopPropagation(),role:"none",children:[(0,t.jsx)(E.A,{profileHandle:m,position:"-left-32",children:(0,t.jsx)(p(),{href:"/".concat(m),className:"font-semibold hover:underline text-gray-1k",children:T})})," "]}),"and"," ",(0,t.jsxs)("span",{className:"font-semibold text-gray-1k",children:[u," ",u>1?"others":"other"]})," ",d]})),I},V=function(e){var l,n,o,i,r,s,a,d,c,u,T,m,f,O,A,C,j,R,b,D,V,J,z,B,W,G,K,Q,q,X,Z,$,ee,el,en,et,eo,ei,er,es,ea,ed,ec,eu,eT,em,eI,ef,ep,ev,eN,ex,eO,eE,eA,eP,eC,ej,eh,e_,ey,eR,eS,eg,eL,eb,eD,eU,eY,eF,ew,ek,eM,eH,eV,eJ,ez,eB,eW,eG,eK,eQ,eq,eX,eZ,e$,e0,e1,e2,e7,e8,e3,e5,e6,e4,e9,le,ll,ln,lt,lo,li,lr,ls,la,ld,lc,lu,lT,lm,lI,lf,lp,lv,lN,lx,lO,lE,lA,lP,lC,lj,lh,l_,ly,lR,lS,lg,lL,lb,lD,lU,lY,lF,lw,lk,lM,lH,lV,lJ,lz,lB,lW,lG;let{notification:lK,userData:lQ,onRead:lq=()=>{}}=e,{id:lX,updatedAt:lZ,createdAt:l$}=lK,{handleInviteFlow:l0}=(0,L.A)(),l1=(e=>{if(e){var l;let n=e.toUpperCase();if(e===v.COMMENT_TYPES.BLOG)return"article";let t=v.default.ENABLED_INTEGRATIONS.find(e=>e.name.toUpperCase()===n);return((null==t?void 0:t.name)!==v.default.INTEGRATION_TYPE_NAMES.PROJECTS&&(null==t?void 0:t.name)!=="projects"||(null==lK||null==(l=lK.content)?void 0:l.link))&&t?null==t?void 0:t.label:"post"}return"post"})(null==lK||null==(l=lK.content)?void 0:l.activityTypeName),l2=(0,S.Wr)(lK);switch(lK.type){case v.NOTIFICATION_TYPE.ACTIVITY_KUDOS:{let e=H({notification:lK,singleNotificationText:S.x7.UPVOTED_POST,clubbedNotificationText:S.x7.UPVOTED_POST});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.ArrowUpIcon,{size:20}),notificationText:e,timestamp:lZ,multipleUsers:!0,senders:lK.senders,readAt:null==lK?void 0:lK.readAt,postCaption:(0,t.jsx)(Y,{caption:null==lK||null==(n=lK.content)?void 0:n.activityCaption,title:null==lK||null==(o=lK.content)?void 0:o.activityPostTitle,imageExist:null==lK||null==(i=lK.content)?void 0:i.imageExist,videoExist:null==lK||null==(r=lK.content)?void 0:r.videoExist})},lX)}case v.NOTIFICATION_TYPE.SCHEDULED_SCROLL_POST_PUBLISHED:{let e=(0,t.jsx)("span",{onClick:e=>e.stopPropagation(),role:"none",children:"Your scheduled post is now live."});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:v.APP_PATHS.postDetails(null==lK||null==(s=lK.content)?void 0:s.activityId),icon:(0,t.jsx)(x.ScheduleCheckIcon,{size:20}),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,hideProfilePicture:!0,postCaption:(0,t.jsx)(Y,{caption:null==lK||null==(a=lK.content)?void 0:a.activityCaption,title:null==lK||null==(d=lK.content)?void 0:d.activityPostTitle,imageExist:null==lK||null==(c=lK.content)?void 0:c.imageExist,videoExist:null==lK||null==(u=lK.content)?void 0:u.videoExist})},lX)}case v.NOTIFICATION_TYPE.PROFILE_VIEW:{let e=H({notification:lK,singleNotificationText:S.x7.PROFILE_VIEW,clubbedNotificationText:S.x7.PROFILE_VIEW});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:v.APP_PATHS.profileVisitors,icon:(0,t.jsx)(x.OpenEyeIcon,{size:20}),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,notificationText:e,multipleUsers:!0,senders:lK.senders},lX)}case v.NOTIFICATION_TYPE.VERIFICATION_REQUEST:{let e=e=>{let{name:l,profileHandle:n}=e,o=h.A.APP_PATHS.PROFILE_RELATIVE(n);return(0,t.jsxs)(t.Fragment,{children:["requested to verify their association with"," ",(0,t.jsx)(p(),{href:o,className:"hover:underline text-gray-1k font-semibold",children:l})]})},l=H({notification:lK,singleNotificationText:e({name:lK.content.organizationName,profileHandle:lK.content.profileHandle}),clubbedNotificationText:e({name:lK.content.organizationName,profileHandle:lK.content.profileHandle})});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:h.A.APP_PATHS.teams,icon:(0,t.jsx)(x.VerifiedIcon,{size:20,color:"currentColor"}),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,notificationText:l,multipleUsers:!0,senders:lK.senders},lX)}case v.NOTIFICATION_TYPE.FOLLOWS:{let e=H({notification:lK,singleNotificationText:S.x7.FOLLOWING_YOU,clubbedNotificationText:S.x7.FOLLOWING_YOU});
1return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:"/network",icon:(0,t.jsx)(x.UserAddIcon,{size:20,color:"currentColor"}),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,notificationText:e,senders:lK.senders,multipleUsers:!0},lX)}case v.NOTIFICATION_TYPE.ACTIVITY_COMMENT:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.CommentIcon,{size:20,innerLineClass:"text-transparent"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(T=lK.sender)?void 0:T.profilePicture,userInfo:"".concat(null==lK||null==(m=lK.sender)?void 0:m.firstName," ").concat(null==lK||null==(f=lK.sender)?void 0:f.lastName),notificationText:" ".concat(S.x7.COMMENTED_ON_YOUR," ").concat(null==l1?void 0:l1.toLowerCase()).concat((null==lK||null==(O=lK.content)?void 0:O.projectTitle)?" - ".concat(null==lK||null==(A=lK.content)?void 0:A.projectTitle):"","."),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(C=lK.content)?void 0:C.comment)&&(0,t.jsx)(U,{comment:null==lK||null==(j=lK.content)?void 0:j.comment}),action:(0,t.jsx)(w,{postId:null==lK||null==(R=lK.content)?void 0:R.activityId,commentId:null==lK||null==(b=lK.content)?void 0:b.commentId,sender:null==lK?void 0:lK.sender,replyTo:(null==lK||null==(D=lK.content)?void 0:D.replyTo)||(null==lK||null==(V=lK.content)?void 0:V.commentId),isLiked:null==lK||null==(J=lK.content)?void 0:J.isLiked,senderId:null==lK?void 0:lK.senderId,isComment:!0,notification:lK,isScroll:"post"===l1})},lX);case v.NOTIFICATION_TYPE.MENTION_COMMENT:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.AtIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(z=lK.sender)?void 0:z.profilePicture,userInfo:"".concat(null==lK||null==(B=lK.sender)?void 0:B.firstName," ").concat(null==lK||null==(W=lK.sender)?void 0:W.lastName),notificationText:" mentioned you in comment.",timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(G=lK.content)?void 0:G.comment)&&(0,t.jsx)(U,{comment:null==lK||null==(K=lK.content)?void 0:K.comment}),action:(0,t.jsx)(w,{postId:null==lK||null==(Q=lK.content)?void 0:Q.activityId,commentId:null==lK||null==(q=lK.content)?void 0:q.commentId,sender:null==lK?void 0:lK.sender,replyTo:(null==lK||null==(X=lK.content)?void 0:X.replyTo)||(null==lK||null==(Z=lK.content)?void 0:Z.commentId),isLiked:null==lK||null==($=lK.content)?void 0:$.isLiked,senderId:null==lK?void 0:lK.senderId,notification:lK,isComment:!0})},lX);case v.NOTIFICATION_TYPE.ADDED_HIRING_NOTE:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:N.default.getRecruiterViewURL(null==lK||null==(ee=lK.content)?void 0:ee.companyName,null==lK||null==(el=lK.content)?void 0:el.jobId)||"",icon:k(null==lK||null==(en=lK.content)?void 0:en.noteType),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(et=lK.sender)?void 0:et.profilePicture,userInfo:"".concat(null==lK||null==(eo=lK.sender)?void 0:eo.firstName," ").concat(null==lK||null==(ei=lK.sender)?void 0:ei.lastName),notificationText:(e=>{let{applicant:l,type:n}=e,o="added a note for";switch(n){case h.A.APPLICANT_ACTIVITY_TYPE.SHORTLISTED:o="shortlisted";break;case h.A.APPLICANT_ACTIVITY_TYPE.REJECTED:o="rejected"}return(0,t.jsxs)("span",{onClick:e=>e.stopPropagation(),role:"none",children:[" ",o," ",(0,t.jsx)(I.default.SemiBoldText,{sm:!0,className:"inline",children:l&&(null==l?void 0:l.profileHandle)?(0,t.jsx)(E.A,{profileHandle:null==l?void 0:l.profileHandle,position:"-left-32",children:(0,t.jsxs)(p(),{href:v.APP_PATHS.userProfile({profileHandle:null==l?void 0:l.profileHandle}),className:"capitalize font-semibold hover:underline text-gray-1k",children:[null==l?void 0:l.firstName," ",null==l?void 0:l.lastName]})}):"candidate"}),"'s job application","."]})})({applicant:null==lK||null==(er=lK.content)?void 0:er.applicant,type:null==lK||null==(es=lK.content)?void 0:es.noteType,applicantCount:null==lK||null==(ea=lK.content)?void 0:ea.applicantCount}),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(ed=lK.content)?void 0:ed.note)&&(0,t.jsx)(U,{comment:null==lK||null==(ec=lK.content)?void 0:ec.note})},lX);case v.NOTIFICATION_TYPE.CANDIDATE_STATUS:{let e=null==lK||null==(eT=lK.content)||null==(eu=eT.applicants)?void 0:eu.length,l=" ".concat((null==lK||null==(eI=lK.content)||null==(em=eI.noteType)?void 0:em.toLowerCase())||""," ").concat(e<=1?"a":e," ").concat(N.default.addPlural({word:"candidate",count:e}),".");return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:N.default.getRecruiterVie
1wURL(null==lK||null==(ef=lK.content)?void 0:ef.companyName,null==lK||null==(ep=lK.content)?void 0:ep.jobId)||"",icon:k(null==lK||null==(ev=lK.content)?void 0:ev.noteType),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(eN=lK.sender)?void 0:eN.profilePicture,userInfo:"".concat(null==lK||null==(ex=lK.sender)?void 0:ex.firstName," ").concat(null==lK||null==(eO=lK.sender)?void 0:eO.lastName),notificationText:l,timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.POST_REPOSTED:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:lK.content.activityId?v.APP_PATHS.postDetails(lK.content.activityId):v.APP_PATHS.scroll,icon:(0,t.jsx)(x.ReloadIcon,{size:18}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(eE=lK.sender)?void 0:eE.profilePicture,userInfo:"".concat(null==lK||null==(eA=lK.sender)?void 0:eA.firstName," ").concat(null==lK||null==(eP=lK.sender)?void 0:eP.lastName),notificationText:" has reposted your post.",timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(eC=lK.content)?void 0:eC.activityCaption)&&(0,t.jsx)(U,{comment:null==lK||null==(ej=lK.content)?void 0:ej.activityCaption}),action:(0,t.jsx)(w,{postId:null==lK||null==(eh=lK.content)?void 0:eh.activityId,commentId:null==lK||null==(e_=lK.content)?void 0:e_.commentId,sender:null==lK?void 0:lK.sender,isLiked:null==lK||null==(ey=lK.content)?void 0:ey.isLiked,senderId:null==lK?void 0:lK.senderId,notification:lK,isPost:!0})},lX);case v.NOTIFICATION_TYPE.VIDEO_REPOSTED:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:lK.content.activityId?v.APP_PATHS.postDetails(lK.content.activityId):v.APP_PATHS.scroll,icon:(0,t.jsx)(x.VideoIcon,{size:18}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(eR=lK.sender)?void 0:eR.profilePicture,userInfo:"".concat(null==lK||null==(eS=lK.sender)?void 0:eS.firstName," ").concat(null==lK||null==(eg=lK.sender)?void 0:eg.lastName),notificationText:" has reposted your video.",timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(eL=lK.content)?void 0:eL.activityCaption)&&(0,t.jsx)(U,{comment:null==lK||null==(eb=lK.content)?void 0:eb.activityCaption}),action:(0,t.jsx)(w,{postId:null==lK||null==(eD=lK.content)?void 0:eD.activityId,commentId:null==lK||null==(eU=lK.content)?void 0:eU.commentId,sender:null==lK?void 0:lK.sender,isLiked:null==lK||null==(eY=lK.content)?void 0:eY.isLiked,senderId:null==lK?void 0:lK.senderId,notification:lK,isPost:!0})},lX);case v.NOTIFICATION_TYPE.PROJECT_SUBMITTED_TO_FOLLOWERS:{let e=(0,t.jsxs)(I.default.NormalText,{as:"span",sm:!0,children:[" ","launched"," ",(0,t.jsxs)("strong",{children:[(null==lK||null==(eF=lK.content)?void 0:eF.projectTitle)||"a project"," "]})," ","on Peerlist Launchpad."]}),l=(null==lK||null==(ew=lK.content)?void 0:ew.link)?lK.content.link:N.default.getProjectURL({username:null==lK||null==(ek=lK.sender)?void 0:ek.profileHandle,slug:lK.content.projectSlug});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l||v.APP_PATHS.launchpad,icon:(0,t.jsx)(x.Rocket2Icon,{size:18}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(eM=lK.sender)?void 0:eM.profilePicture,userInfo:"".concat(null==lK||null==(eH=lK.sender)?void 0:eH.firstName," ").concat(null==lK||null==(eV=lK.sender)?void 0:eV.lastName),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.POST_RESHARED:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:"/scroll/post/".concat(lK.content.activityId),icon:(0,t.jsx)(x.ReshareIcon,{size:18}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(eJ=lK.sender)?void 0:eJ.profilePicture,userInfo:"".concat(null==lK||null==(ez=lK.sender)?void 0:ez.firstName," ").concat(null==lK||null==(eB=lK.sender)?void 0:eB.lastName),notificationText:" has reshared your post.",timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX);case v.NOTIFICATION_TYPE.MENTION_ACTIVITY:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.AtIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(eW=lK.sender)?void 0:eW.profilePicture,userInfo:"".concat(null==lK||null==(eG=lK.sender)?void 0:eG.firstName," ").concat(null==lK||null==(eK=lK.sender)?void 0:eK.lastName),notificationText:" mentioned you in a ".concat(l1,"."),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(eQ=lK.content)?void 0:eQ.activityCaption)&&(0,t.jsx)(U,{comment:null==lK||null==(eq=lK.content)?void 0:eq.activityCaption}),action:(0,t.jsx)(w,{postId:null==lK||null==(eX=lK.content)?void 0:eX.activityId,commentId:null==lK||null==(eZ=lK.content)?void 0:eZ.commentId,sender:null==lK?void 0:lK.sender,isLiked:null==lK||null==(e$=lK.content)?void 0:e$.isLiked,senderId:null==lK?void 0:lK.senderId,notification:lK,isPost:!0})},lX);case v.NOTIFICATION_TYPE.ADD_AS_COLLABORATOR:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:N.default.getProjectURL({username:null==lK||null==(e0=lK.sender)?void 0:e0.profileHandle,slug:null==lK||null==(e1=lK.content)?void 0:e1.slug}),icon:(0,t.jsx)(x.GroupIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(e2=lK.sender)?void 0:e2.profilePicture,userInfo:"".concat(null==lK||null==(e7=lK.sender)?void 0:e7.firstName," ").concat(null==lK||null==(e8=lK.sender)?void 0:e8.lastName),notificationText:" added you as a Collaborator in project.",timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX);case v.NOTIFICATION_TYPE.PROJECT_COLLABORATOR_REQUEST:{let e=(0,t.jsxs)(I.default.NormalText,{as:"span",sm:!0,children:[" ","
1is inviting you to be a collaborator on their project:"," ",(0,t.jsx)("strong",{children:(null==lK||null==(e3=lK.content)?void 0:e3.projectTitle)||"a project"}),"."]});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.ProjectsIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(e5=lK.sender)?void 0:e5.profilePicture,userInfo:"".concat(null==lK||null==(e6=lK.sender)?void 0:e6.firstName," ").concat(null==lK||null==(e4=lK.sender)?void 0:e4.lastName),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,action:(0,t.jsx)(F,{projectId:null==lK||null==(e9=lK.content)?void 0:e9.projectId,notificationId:lX,isAccepted:null==lK||null==(le=lK.content)?void 0:le.isAccepted,isRejected:null==lK||null==(ll=lK.content)?void 0:ll.isRejected})},lX)}case v.NOTIFICATION_TYPE.PROJECT_COLLABORATOR_REQUEST_ACCEPTED:{let e=(0,t.jsxs)(I.default.NormalText,{as:"span",sm:!0,children:[" ","has accepted your collaboration request for"," ",(0,t.jsx)("strong",{children:(null==lK||null==(ln=lK.content)?void 0:ln.projectTitle)||"a project"}),"."]});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.ProjectsIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(lt=lK.sender)?void 0:lt.profilePicture,userInfo:"".concat(null==lK||null==(lo=lK.sender)?void 0:lo.firstName," ").concat(null==lK||null==(li=lK.sender)?void 0:li.lastName),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.PROJECT_COLLABORATOR_REQUEST_REJECTED:{let e=(0,t.jsxs)(I.default.NormalText,{as:"span",sm:!0,children:[" ","has rejected your collaboration request for"," ",(0,t.jsx)("strong",{children:(null==lK||null==(lr=lK.content)?void 0:lr.projectTitle)||"a project"}),"."]});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.ProjectsIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(ls=lK.sender)?void 0:ls.profilePicture,userInfo:"".concat(null==lK||null==(la=lK.sender)?void 0:la.firstName," ").concat(null==lK||null==(ld=lK.sender)?void 0:ld.lastName),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.PROJECT_RATINGS_ADDED:{let e=H({notification:lK,singleNotificationText:(0,t.jsxs)(t.Fragment,{children:["shared feedback on"," ",(0,t.jsx)("strong",{children:(null==lK||null==(lc=lK.content)?void 0:lc.projectTitle)||"your project"}),"."]}),clubbedNotificationText:(0,t.jsxs)(t.Fragment,{children:["shared their feedback on"," ",(0,t.jsx)("strong",{children:(null==lK||null==(lu=lK.content)?void 0:lu.projectTitle)||"your project"}),"."]})});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.UnionOutlineIcon,{size:20,color:"currentColor"}),senders:null==lK?void 0:lK.senders,multipleUsers:!0,profilePicture:null==lK||null==(lT=lK.sender)?void 0:lT.profilePicture,userInfo:"".concat(null==lK||null==(lm=lK.sender)?void 0:lm.firstName," ").concat(null==lK||null==(lI=lK.sender)?void 0:lI.lastName),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.COMMENT_KUDOS:{let e=(null==lK||null==(lf=lK.content)?void 0:lf.activityTypeName)===v.COMMENT_TYPES.BLOG,l=" liked your comment on ".concat(e?"an":"a"," ").concat((null==l1?void 0:l1.toLowerCase())||"",".");return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l2,icon:(0,t.jsx)(x.ArrowUpIcon,{size:20,stroke:1.8}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(lp=lK.sender)?void 0:lp.profilePicture,userInfo:"".concat(null==lK||null==(lv=lK.sender)?void 0:lv.firstName," ").concat(null==lK||null==(lN=lK.sender)?void 0:lN.lastName),notificationText:l,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,comment:(null==lK||null==(lx=lK.content)?void 0:lx.comment)&&(0,t.jsx)(U,{comment:null==lK||null==(lO=lK.content)?void 0:lO.comment})},lX)}case v.NOTIFICATION_TYPE.APPLIED_TO_JOB:{let e=(null==lK||null==(lE=lK.content)?void 0:lE.jobTitle)?"".concat(null==lK||null==(lA=lK.content)?void 0:lA.jobTitle," role"):"position in your company",l=H({notification:lK,singleNotificationText:"has applied for the ".concat(e,"."),clubbedNotificationText:"have applied for the ".concat(e,".")}
1),n=N.default.getRecruiterViewURL(null==lK||null==(lP=lK.content)?void 0:lP.company,null==lK||null==(lC=lK.content)?void 0:lC.jobId);return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:"".concat(n),icon:(0,t.jsx)(x.BriefCaseIcon,{size:20,color:"currentColor"}),notificationText:l,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,multipleUsers:!0,senders:lK.senders},lX)}case v.NOTIFICATION_TYPE.VOTED_ON_POLL:{let e=H({notification:lK,singleNotificationText:S.x7.VOTED_POLL,clubbedNotificationText:S.x7.VOTED_POLL});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:"/scroll/post/".concat(null==(lj=lK.content)?void 0:lj.activityId),icon:(0,t.jsx)(x.PollIcon,{size:20}),notificationText:e,timestamp:lZ,multipleUsers:!0,senders:lK.senders,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.ANSWERED_QUIZ:{let e=H({notification:lK,singleNotificationText:S.x7.ANSWERED_QUIZ,clubbedNotificationText:S.x7.ANSWERED_QUIZ});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:"/scroll/post/".concat(lK.activityId||(null==(lh=lK.content)?void 0:lh.activityId)),icon:(0,t.jsx)(x.QuizIcon,{size:20}),notificationText:e,timestamp:lZ,multipleUsers:!0,senders:lK.senders,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.POLL_RESULTS_ARE_OUT:{let e=(0,t.jsxs)("p",{children:["The poll you voted for by"," ",(0,t.jsxs)("span",{role:"none",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)(E.A,{sender:null==lK?void 0:lK.sender,children:(0,t.jsx)(p(),{href:v.APP_PATHS.userProfile({profileHandle:null==lK||null==(l_=lK.sender)?void 0:l_.profileHandle}),className:"capitalize font-semibold hover:underline text-gray-1k",children:"".concat(null==lK||null==(ly=lK.sender)?void 0:ly.firstName," ").concat(null==lK||null==(lR=lK.sender)?void 0:lR.lastName)})})," "]}),"is closed and the results are in!"]});return(null==lK||null==(lS=lK.sender)?void 0:lS.profileHandle)===(null==lQ?void 0:lQ.profileHandle)&&(e=(0,t.jsx)("span",{onClick:e=>e.stopPropagation(),role:"none",children:"Your poll is closed and the final results are in!"})),(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:"/scroll/post/".concat(null==lK||null==(lg=lK.content)?void 0:lg.activityId),icon:(0,t.jsx)(x.PollIcon,{size:20}),notificationText:e,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,profilePicture:null==lK||null==(lL=lK.sender)?void 0:lL.profilePicture,hideProfilePicture:(null==lK||null==(lb=lK.sender)?void 0:lb.profileHandle)===(null==lQ?void 0:lQ.profileHandle)},lX)}case v.NOTIFICATION_TYPE.UPVOTED_PROJECT:{let e=H({notification:lK,singleNotificationText:S.x7.upvotedProjectMessage(null==lK||null==(lD=lK.content)?void 0:lD.projectTitle),clubbedNotificationText:S.x7.upvotedProjectMessage(null==lK||null==(lU=lK.content)?void 0:lU.projectTitle)}),l=null==lK||null==(lY=lK.content)?void 0:lY.link;return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:l,icon:(0,t.jsx)(x.ArrowUpIcon,{size:20}),notificationText:e,timestamp:lZ,multipleUsers:!0,senders:lK.senders,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.BLOG_LIKED:{let e=H({notification:lK,singleNotificationText:"liked your article.",clubbedNotificationText:"liked your article."});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:null==lK||null==(lF=lK.content)?void 0:lF.blogURL,icon:(0,t.jsx)(x.HeartIcon,{size:20}),notificationText:e,timestamp:lZ,multipleUsers:!0,senders:lK.senders,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.BLOG_VIEWS_MILESTONE:{let e="Congrats, your article has been viewed more than ".concat(null==lK||null==(lw=lK.content)?void 0:lw.milestone," times! \uD83C\uDF89");return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:null==lK||null==(lk=lK.content)?void 0:lk.blogURL,icon:(0,t.jsx)(x.OpenEyeIcon,{size:20}),notificationText:e,timestamp:lZ||l$,hideProfilePicture:!0,senders:lK.senders,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.PROJECT_COMPETITION:{let{project:e,competingProjectNames:l,rank:n,movedHigher:o}=lK.content,i=o?(0,t.jsxs)("span",{className:"text-gray-1k",children:["Your Project ",(0,t.jsx)("strong",{children:e.title})," has jumped to the"," ",(0,t.jsxs)("strong",{children:["#",n]})," spot, overtaking"," ",(0,t.jsx)("strong",{children:(0,S.QS)(l)})]}):(0,t.jsxs)("span",{className:"text-gray-1k",children:["Your Project ",(0,t.jsx)("strong",{children:e.title})," has fallen to the"," ",(0,t.jsxs)("strong",{children:["#",n]})," spot, overtaken by"," ",(0,t.jsx)("strong",{children:(0,S.QS)(l)})]}),r=v.APP_PATHS.launchpad;return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:r,icon:o?(0,t.jsx)(x.GraphUpIcon,{size:20}):(0,t.jsx)(x.GraphDownIcon,{size:20}),notificationText:i,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,hideProfilePicture:!0,onClick:()=>{_.A.capture(y.Ay.CLICKED_PROJECT_COMPETE_NOTIF)}},lX)}case v.NOTIFICATION_TYPE.STREAK_MILESTONE_ACHIEVED:{let{milestone:e,title:l}=lK.content;if(!e||!l)return null;let n=(0,t.jsxs)(I.default.NormalText,{sm:!0,as:"span",textColor:"text-gray-1k",children:["You’re on a"," ",(0,t.jsxs)(I.default.SemiBoldText,{sm:!0,as:"span",children:[e||0,"-day streak!"]})," ","Reward unlocked: ",l||""]});return(0,t.jsx)(P,{id:lX,onRead:lq,icon:(0,t.jsx)(x.FireIcon,{size:20}),notificationText:n,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,hideProfilePicture:!0,onClick:()=>{_.A.capture(y.Ay.CLICKED_STREAK_MILESTONE_ACHIEVED_NOTIF),M()}},lX)}case v.NOTIFICATION_TYPE.STREAK_MILESTONE_BROKEN:{let{currentStreak:e}=lK.content;if(!e)return null;let l=(0,t.jsxs)(I.default.NormalText,{sm:!0,as:"span",textColor:"text-gray-1k",children:["Your ",e,"-day streak has ended. Restore now before it’s gone!"]});return(0,t.jsx)(P,{id:lX,onRead:lq,icon:(0,t.jsx)(x.FireIcon,{size:20}),notificationText:l,timestamp:lZ,readAt:null==lK?void 0:lK.readAt,hideProfilePicture:!0,onClick:()=>{_.A.capture(y.Ay.CLICKED_STREAK_MILESTONE_BROKEN_NOTIF),M()}},lX)}case v.NOTIFICATION_TYPE.PROJECT_UPVOTE_MILESTONE:{let{upvotesCount:e,project:l}=(null==lK?void 0:lK.content)||{};if(!e||!(null==l?void 0:l.projectURL)||!(null==l?void 0:l.title))return null;let n=g.Ay.getUpvoteMilestoneNotifTexts({upvotesCount:e,projectName:null==l?void 0:l.title,firstName:null==lQ?void 0:lQ.firstName});if(!n.description)return;let o=null==l?void 0:l.projectURL;return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:o,icon:(0,t.jsx)(x.MedalIcon,{size:20,color:"currentColor"}),notificationText:n.description,timestamp:lZ||l$,readAt:null==lK?void 0:lK.readAt,hideProfilePicture:!0,onClick:()=>{_.A.capture(y.Ay.CLICKED_PROJECT_UPVOTE_MILESTONE)}},lX)}case v.NOTIFICATION_TYPE.VERIFICATION_APPROVED:{let e=h.A.APP_PATHS.PROFILE_RELATIVE(null==lK||null==(lM=lK.sender)?void 0:lM.profileHandle),l=(0,t.jsxs)("span",{role:"none",onClick:e=>e.stopPropagation(),children:["Your association with"," ",(0,t.jsx)(p(),{href:e,className:"hover:underline",children:(0,t.jsx)(I.default.SemiBoldText,{as:"span",sm:!0,children:null==lK||null==(lH=lK.sender)?void 0:lH.name})})," ","has been verified."]}),n=v.APP_PATHS.userProfileSubPage({profileHandle:null==lQ?void 0:lQ.profileHandle,subPage:v.APP_PATHS.resume});return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:n,icon:(0,t.jsx)(x.VerifiedIcon,{size:20,color:"currentColor"}),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,notificationText:l,profilePicture:(null==lK||null==(lV=lK.sender)?void 0:lV.profilePicture)||v.CDNImage.emptyCompanyDP},lX)}case v.NOTIFICATION_TYPE.VOUCH:return(0,t.jsx)(P,{id:lX,onRead:lq,notificationUrl:v.APP_PATHS.userProfileVouch({profileHandle:null==lK||null==(lJ=lK.sender)?void 0:lJ.profileHandle,vouchedFor:null==lQ?void 0:lQ.profileHandle}),icon:(0,t.jsx)(x.MedalIcon,{size:20,color:"currentColor"}),sender:null==lK?void 0:lK.sender,profilePicture:null==lK||null==(lz=lK.sender)?void 0:lz.profilePicture,userInfo:"".concat(null==lK||null==(lB=lK.sender)?void 0:lB.firstName," ").concat(null==lK||null==(lW=lK.sender)?void 0:lW.lastName),notificationText:" vouched for you on their profile! \uD83C\uDF89",timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX);case v.NOTIFICATION_TYPE.INVITE_JOINED:{let e=null==lK?void 0:lK.sender;return(0,t.jsx)(P,{id:lX,onRead:lq,icon:(0,t.jsx)(x.UserAddIcon,{size:20}),sender:e,profilePicture:null==e?void 0:e.profilePicture,userInfo:"".concat(N.default.getDisplayName(e)),onClick:()=>{l0()},notificationText:" joined Peerlist using your invite.",timestamp:lZ,readAt:null==lK?void 0:lK.readAt},lX)}case v.NOTIFICATION_TYPE.WALLET_REWARD_MILESTONE:return(0,t.jsx)(P,{id:lX,onRead:lq,icon:(0,t.jsx)(x.GiftIcon,{size:20}),notificationText:(0,t.jsxs)(t.Fragment,{children:["You've earned"," ",(0,t.jsxs)(I.default.SemiBoldText,{sm:!0,as:"span",children:["$",null==lK||null==(lG=lK.content)?void 0:lG.amount]})," ","in rewards. Redeem them now in the Peerlist Store!"]}),timestamp:lZ,readAt:null==lK?void 0:lK.readAt,onClick:()=>{l0()},hideProfilePicture:!0},lX);default:return null}};var J=n(47553),z=n(68827),B=n(58385),W=n(57994),G=n(50803),K=n(98150),Q=n(11023),q=n(6318);let X=[{label:"Upvoted your post",id:v.NOTIFICATION_TYPE.ACTIVITY_KUDOS,selected:!0},{label:"Commented on your post",id:v.NOTIFICATION_TYPE.ACTIVITY_COMMENT,selected:!0},{label:"Mentioned you in a post",id:v.NOTIFICATION_TYPE.MENTION_ACTIVITY,selected:!0},{label:"Liked a comment on a post",id:v.NOTIFICATION_TYPE.COMMENT_KUDOS,selected:!0},{label:"Mentioned you in a comment",id:v.NOTIFICATION_TYPE.MENTION_COMMENT,selected:!0},{label:"Voted on your poll",id:v.NOTIFICATION_TYPE.VOTED_ON_POLL,selected:!0},{label:"Answered your quiz",id:v.NOTIFICATION_TYPE.ANSWERED_QUIZ,selected:!0},{label:"Reshared your post",id:v.NOTIFICATION_TYPE.POST_RESHARED,selected:!0},{label:"Reposted your post",id:v.NOTIFICATION_TYPE.POST_REPOSTED,selected:!0},{label:"Reposted your video",id:v.NOTIFICATION_TYPE.VIDEO_REPOSTED,selected:!0},{label:"Poll results are out",id:v.NOTIFICATION_TYPE.POLL_RESULTS_ARE_OUT,selected:!0},{label:"Scheduled posts are live",id:v.NOTIFICATION_TYPE.SCHEDULED_SCROLL_POST_PUBLISHED,selected:!0}],Z=[{label:"Someone viewed your profile",id:v.NOTIFICATION_TYPE.PROFILE_VIEW,selected:!0},{label:"Someone followed you",id:v.NOTIFICATION_TYPE.FOLLOWS,selected:!0},{label:"Upvoted your Project",id:v.NOTIFICATION_TYPE.UPVOTED_PROJECT,selected:!0},{label:"Project ranking updates",id:v.NOTIFICATION_TYPE.PROJECT_COMPETITION,selected:!0},{label:"Project upvote milestones",id:v.NOTIFICATION_TYPE.PROJECT_UPVOTE_MILESTONE,selected:!0},{label:"Article view milestones",id:v.NOTIFICATION_TYPE.BLOG_VIEWS_MILESTONE,selected:!0},{label:"Liked your article",id:v.NOTIFICATION_TYPE.BLOG_LIKED,selected:!0},{label:"Verification request Approved",id:v.NOTIFICATION_TYPE.VERIFICATION_APPROVED,selected:!0},{label:"Streak unlocked rewards",id:v.NOTIFICATION_TYPE.STREAK_MILESTONE_ACHIEVED,selected:!0},{label:"Streak ended",id:v.NOTIFICATION_TYPE.STREAK_MILESTONE_BROKEN,selected:!0},{label:"Project launched by someone you follow",id:v.NOTIFICATION_TYPE.PROJECT_SUB
1MITTED_TO_FOLLOWERS,selected:!0},{label:"Joined using your invite",id:v.NOTIFICATION_TYPE.INVITE_JOINED,selected:!0},{label:"Rewards earned",id:v.NOTIFICATION_TYPE.WALLET_REWARD_MILESTONE,selected:!0},{label:"Project collaboration request",id:v.NOTIFICATION_TYPE.PROJECT_COLLABORATOR_REQUEST,selected:!0},{label:"Project collaboration request accepted",id:v.NOTIFICATION_TYPE.PROJECT_COLLABORATOR_REQUEST_ACCEPTED,selected:!0},{label:"Project collaboration request rejected",id:v.NOTIFICATION_TYPE.PROJECT_COLLABORATOR_REQUEST_REJECTED,selected:!0},{label:"Project ratings added",id:v.NOTIFICATION_TYPE.PROJECT_RATINGS_ADDED,selected:!0}],$=[{label:"Applied to a job you posted",id:v.NOTIFICATION_TYPE.APPLIED_TO_JOB,selected:!1},{label:"Hiring activity and notes",id:v.NOTIFICATION_TYPE.ADDED_HIRING_NOTE,selected:!1},{label:"Verification Requests",id:v.NOTIFICATION_TYPE.VERIFICATION_REQUEST,selected:!0}],ee={label:"Vouched for you",id:v.NOTIFICATION_TYPE.VOUCH,selected:K.A.isVouchEnabled(),hide:!K.A.isVouchEnabled()};K.A.isVouchEnabled()&&Z.push(ee);let el="SCROLL",en="PROFILE",et="ADMINS",eo=()=>{let e=JSON.parse(JSON.stringify(X)),l=JSON.parse(JSON.stringify(Z)),n=JSON.parse(JSON.stringify($));return[...e.filter(e=>e.selected),...l.filter(e=>e.selected),...n.filter(e=>e.selected)]},ei=e=>{let{options:l,label:n="",onChange:o=()=>{}}=e,r=(0,i.useRef)(),[s,a]=(0,i.useState)(l||[]),d=(s||[]).filter(e=>e.selected)||0;return(0,i.useEffect)(()=>{a(l)},[l]),l.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[n?(0,t.jsx)(I.default.SemiBoldText,{sm:!0,children:n}):null,(0,t.jsx)(Q.A,{width:"w-[300px] ",triggerClassName:"w-full",btnClassName:"w-full",dropdownButton:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(b.Ay.CarbonOutline,{className:"w-full justify-between",medium:!0,iconRight:(0,t.jsx)(x.ChevronDownIcon,{size:18}),children:(0,t.jsx)(I.default.NormalText,{sm:!0,children:d.length===s.length?"All":"".concat(d.length," selected")})})}),onClose:()=>{r.current&&(r.current=!1,o(s))},children:(0,t.jsx)("div",{className:"overflow-y-auto max-h-72 overflow-hidden",children:null==s?void 0:s.map(e=>(null==e?void 0:e.hide)?null:(0,t.jsxs)(Q.e.Item,{onClick:l=>{l.preventDefault(),l.stopPropagation();let n=s.map(l=>l.id===e.id?{...l,selected:!l.selected}:l);r.current=!0,a(n)},className:"flex items-center gap-0.5",children:[(0,t.jsx)(G.A,{id:"notification-filter-".concat(e.id),value:!!e.selected,onChange:()=>{}}),(0,t.jsx)(I.default.MediumText,{sm:!0,className:"ml-2",children:e.label})]},null==e?void 0:e.id))})})]}):null},er=function(e){let{setSelectedNotificationFilters:l,toggleRightPanel:n}=e,{appData:r}=(0,o.useSelector)(e=>e.AppData),[s,a]=(0,i.useState)({[el]:X,[en]:Z,[et]:$}),d=()=>{let e=JSON.parse(JSON.stringify(X)),n=JSON.parse(JSON.stringify(Z)),t=JSON.parse(JSON.stringify($));a({[el]:e,[en]:n,[et]:t}),l([...e.filter(e=>e.selected),...n.filter(e=>e.selected),...t.filter(e=>e.selected)])},c=(e,n)=>{a({...s,[e]:n});let t=[];Object.keys(s).forEach(l=>{l===e?t.push(...n.filter(e=>e.selected)):t.push(...s[l].filter(e=>e.selected))}),l(t)};return(0,i.useEffect)(()=>{d()},[]),(0,t.jsx)(W.A.Right,{showSidePanel:n,className:"overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex flex-col gap-10",children:[(0,t.jsx)(q.A,{pageSource:v.PARTNER_WIDGET_SOURCE.NOTIFICATIONS,hideDefaultAd:!0}),(0,t.jsxs)("div",{className:"mb-10",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)(I.default.SemiBoldText,{sm:!0,children:"Filter by"}),(0,t.jsx)(b.Ay.CarbonOutline,{small:!0,onClick:()=>{d()},children:"Reset"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(ei,{options:s[el],label:"Scroll",onChange:e=>c(el,e)}),(0,t.jsx)(ei,{options:s[en],label:"Profile",onChange:e=>c(en,e)}),(null==r?void 0:r.isCompanyAdmin)?(0,t.jsx)(ei,{options:s[et],label:"Company admin",onChange:e=>c(et,e)}):null]})]})]})})};var es=n(34217);let ea=()=>{let[e,l]=(0,i.useState)(!1),[n,r]=(0,i.useState)(!0),[a,f]=(0,i.useState)(""),{appData:p}=(0,o.useSelector)(e=>e.AppData),[v,O]=(0,i.useState)(Date.now()),E=(0,o.useDispatch)(),[A,P]=(0,i.useState)(eo()||[]),[C,j]=(0,i.useState)([]),h=(0,o.useSelector)(T.JO),_=(0,o.useSelector)(T.XY),y=async function(){var e,l,n,t;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;try{if(r(!0),!o)return;let l=i.map(e=>e.id),n=await m.nJ.getV2Notifications({timeSince:o,filters:l,limit:(null==C?void 0:C.length)===0?10:50});if(null==(e=n.data)?void 0:e.success){let e=n.data.data.notifications||[],t=[...e,...C].filter(e=>l.includes(e.type)),o=(0,N.sortData)(t,"updatedAt");if((null==e?void 0:e.length)>0){let l=new Date(e[0].updatedAt);
1e.forEach(e=>{let n=new Date(e.updatedAt);n<l&&(l=n)});let n=new Date(l).valueOf()-1;O(n)}0===e.length&&O(null);let i=d()(o,"id");j(i)}}catch(e){O(null),f((null==e||null==(t=e.response)||null==(n=t.data)||null==(l=n.error)?void 0:l.message)||z.A.GLOBAL.wrong)}finally{r(!1)}},R=async e=>{try{var l;if(!e)return;let n=await m.nJ.getV2Notification(e);if(null==(l=n.data)?void 0:l.success){let l=n.data.data.notification;l.id===e&&A.some(e=>e.id===l.type)&&j(n=>{let t=n.filter(l=>l.id!==e);return[l,...t]})}}catch(e){}};(0,i.useEffect)(()=>{if(p.firstName){y();try{m.nJ.readNotifications({all:!0}),E(T.PH.updateUnreadCount(0))}catch(e){}}},[p.id]),(0,i.useEffect)(()=>{_&&R(_)},[_]);let{query:{key:S}}=(0,u.useRouter)();(0,i.useEffect)(()=>{S&&(j([]),y(Date.now()))},[S]);let g=async e=>{try{await m.nJ.readNotifications({id:e}),E(T.PH.decUnreadCount()),j(l=>l.map(l=>(l.id===e&&(l.readAt=new Date),l)))}catch(e){}},L=(0,N.getPageTitleWithNotificationCount)({title:"Peerlist | Notifications",unreadCount:h});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s(),{children:(0,t.jsx)("title",{children:L})}),(0,t.jsxs)(W.A.Center,{children:[(0,t.jsxs)(W.A.CenterTop,{children:[(0,t.jsx)(W.A.PageHeading,{children:"Notifications"}),!n&&(null==C?void 0:C.length)>0||eo().length!==A.length?(0,t.jsx)(b.Ay.CarbonOutline,{circular:!0,onClick:()=>l(e=>!e),className:"block lg:hidden my-4 ml-2",children:e?(0,t.jsx)(x.CloseXIcon,{size:18}):(0,t.jsx)(x.FilterIcon,{size:18})}):null]}),(0,t.jsxs)("div",{className:"mb-20 lg:mb-0",children:[(null==C?void 0:C.length)>0?(0,t.jsx)(c.aY,{useWindowScroll:!0,data:C,itemContent:(e,l)=>(0,t.jsx)(V,{notification:l,userData:p,onRead:()=>g(l.id)},l.id),overscan:{main:2e3,reverse:2e3},endReached:()=>{!n&&v&&y()}}):null,n?(0,t.jsx)("div",{className:"flex flex-col gap-4 px-4 sm:px-6 ",children:Array((null==C?void 0:C.length)>0?7:15).fill(null).map((e,l)=>(0,t.jsxs)("div",{className:"flex animate-pulse py-3 items-center",children:[(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"w-5 h-5 bg-gray-200 rounded-full"})}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"w-8 h-8 bg-gray-200 rounded-full ml-2"})}),(0,t.jsx)("div",{className:"flex flex-col w-full ml-2",children:(0,t.jsx)("div",{className:"h-5 w-full rounded-sm bg-gray-200"})})]},"skeleton-loader-".concat(l+1)))}):null,n||(null==C?void 0:C.length)!==0?null:(0,t.jsx)(es.A.EmptyState,{icon:(0,t.jsx)(B.A.EmptyNotifications,{}),title:"No-tifications",description:eo().length!==A.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400 text-xs",children:"You don't have any notifications for these filters."}),(0,t.jsxs)("span",{className:"lg:hidden text-gray-400 text-xs",children:["\xa0You can\xa0",(0,t.jsx)("button",{className:"text-green",onClick:()=>l(!0),type:"button",children:"change filters\xa0"}),"to see more notifications."]})]}):(0,t.jsx)("span",{className:"text-gray-400",children:"You don't have any notifications."})}),a&&(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(I.ErrorText,{children:a})})]})]}),(0,t.jsx)(er,{toggleRightPanel:e,setSelectedNotificationFilters:e=>{if(0===e.length){j([]),P([]);return}let l=A.map(e=>e.id),n=e.map(e=>e.id);if(n.filter(e=>!l.includes(e))>0||l.length!==n.length){let l=Date.now(),n=[...e];O(l),P(n),y(l,n)}}})]})};ea.layout="user";let ed=(0,J.A)(ea)}},e=>{e.O(0,[8798,3662,6318,5777,636,6593,8792],()=>e(e.s=6204)),_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.