PageSourceSearch

https://tickbig.com/assets/Notification-D91-uPd-.js

js tickbig.com collected 2026-09-24 14:57:26 UTC 29,002 bytes, 1 lines download raw bytes

1import{j as a,r as A}from"./react-DjP1ANNA.js";import{cW as K,cX as X,F as D,cY as O,i as M,u as g,g as C,$ as Y,t as E,cZ as ss,a9 as R,c_ as Q,c$ as w,d0 as as,d1 as z,a3 as k,d2 as q,aW as ns,d3 as rs,d4 as os,_ as cs,d5 as Z,d6 as U,d7 as m,d8 as es,I as is,j as ls}from"./index-BVgXFSN9.js";import{u as S,a as T}from"./react-redux-CvGH35IU.js";import"./@lottiefiles-BW4ya4wF.js";import"./crypto-js-BQRu_zAZ.js";import"./socket.io-client-BGdex47s.js";import{A as V,F as ds,y as ts,J as fs,t as ps}from"./@mui-Cpwdqv5S.js";import"./react-toastify-mV4AXyxU.js";import"./@babel-DLSbV39L.js";import"./react-dom-CH1r7ODx.js";import"./react-router-dom-B-I8Kkrm.js";import"./react-router-BLLygtAF.js";import"./@remix-run-yqlN7Vj_.js";import"./axios-BimPEqV4.js";import"./redux-BECV-Nlq.js";import"./redux-persist-C5kDgR2m.js";import"./@reduxjs-Cpep842i.js";import"./redux-thunk-ClJT1hhx.js";import"./react-helmet-async-BK4tB33I.js";import"./react-fast-compare-CbukUWDo.js";import"./invariant-CvSiY3tr.js";import"./shallowequal--AeqoEPp.js";import"./react-ga4-vDwhweBP.js";import"./jspdf-BNIpv04V.js";import"./fflate-EnPhvkmS.js";import"./styled-components-Cz_yWE8X.js";import"./react-is-DcfIKM1A.js";import"./@emotion-BMnXlmzl.js";import"./hoist-non-react-statics-B-49tuQ9.js";import"./stylis-FDnFs_-n.js";import"./react-infinite-scroll-component-zxdVSlM8.js";import"./react-chat-elements-DcSu28hc.js";import"./dompurify-Bq0E5Q3l.js";import"./emoji-picker-react-C8AahYtu.js";import"./flairup-CpvKgcza.js";import"./react-hook-form-BGrmxbtY.js";import"./otp-input-react-d_JYOq3_.js";import"./react-select-CV5rslID.js";import"./@floating-ui-D6mDMy8Y.js";import"./use-isomorphic-layout-effect-f5bfSEtN.js";import"./memoize-one-BdPwpGay.js";import"./dayjs-ByzvYeBt.js";import"./jszip-BlU_Vd2G.js";import"./@e965-BR7518fZ.js";import"./file-saver-B72EZ2em.js";import"./react-to-print-Y8s0l9m2.js";import"./html2canvas-CBrSDip1.js";import"./@react-google-maps-mug9B72a.js";import"./lodash-pQOYHdgg.js";import"./react-simple-typewriter-ldWg-Jcc.js";import"./react-circular-progressbar-Bv_m6Qu3.js";import"./react-swipeable-views-Dinl_PID.js";import"./prop-types-BE-839HU.js";import"./warning-C20GYw-A.js";import"./react-swipeable-views-core-_gFpKrjL.js";import"./react-quill-BNkyPIyx.js";import"./quill-BGuB3LiM.js";import"./swiper-Br_ZBqpF.js";import"./react-responsive-carousel-4RjJB35h.js";import"./react-easy-swipe-hxMy2-lg.js";import"./classnames-DzlfNvT2.js";import"./@hookform-CWJHxq4r.js";import"./react-card-flip-DR_S2qIS.js";import"./react-cropper-Bexj_cHZ.js";import"./cropperjs-CH_N_9NM.js";import"./copy-to-clipboard-ljHEMGi2.js";import"./toggle-selection-BHUZwh74.js";import"./react-phone-number-input-B1gYhXcx.js";import"./libphonenumber-js-91HKQ04p.js";import"./input-format-DJEsyv6L.js";import"./country-flag-icons-D4lwPBzr.js";import"./react-scroll-8VRGKgkn.js";import"./lodash.throttle-C9QyS3WI.js";import"./react-hover-video-player-Czw9SE1t.js";/* empty css                                  */import"./bootstrap-Dz-rzKL8.js";/* empty css                      */import"./use-sync-external-store-Bv2BUH2l.js";import"./clsx-B-dksMZM.js";import"./react-transition-group-CxNLX-ix.js";import"./@popperjs-BQBsAJpH.js";import"./jss-CFGRwE_1.js";import"./is-in-browser-I-S1O4Zl.js";import"./jss-plugin-rule-value-function-BFRIntEn.js";import"./jss-plugin-global-BYzrZYyJ.js";import"./jss-plugin-nested-D_ejpMkQ.js";import"./jss-plugin-camel-case-B3itHn0h.js";import"./hyphenate-style-name-HOLnhz8K.js";import"./jss-plugin-default-unit-DI8ZotHi.js";import"./jss-plugin-vendor-prefixer-CJNl0PRb.js";import"./css-vendor-DxT3DpbQ.js";import"./jss-plugin-props-sort-D2CdvUsV.js";import"./engine.io-client-BY_6WtMP.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";const _s=async()=>K.get(X).then(s=>s.data).catch(s=>{throw s}),W=async(s,n)=>K.patch(X+`/${s}`,{count:n}).then(c=>c.data).catch(c=>{throw c});function B({senderAvatar:s,senderTickbigLink:n,senderFName:c,handleProfileClick:p,notificationType:x,updateStatus:d,senderSubType:N}){return a.jsxs("div",{className:"notify__top-container",children:[a.jsx("div",{className:"flex-shrink-1 ",children:a.jsx(V,{src:s||D(N),alt:O,className:"border rounded-circle border-1 notify__img"})}),a.jsx("div",{className:"notify__name-container",children:a.jsxs("div",{className:"link",children:[x==="PROJECT_REF"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c})," included",a.jsx("span",{className:"notify__name--text",children:"you as a Verifier for one of his projects."})]}),x==="PROJECT_REF_STATUS"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c})," ",a.jsxs("span",{className:"notify__name--text",children:[d," your Project Verification request."]})]}),x==="NEW_Follow_Request"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsxs("span",{className:"notify__name--text",children:["You have a Follow Request from"," "]}),a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c})]}),x==="FOLLOW_ACCEPTED"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c})," ",a.jsx("span",{className:"notify__name--text",children:"accepted y
1our Follow Request."})]}),x==="NEW_ADMIN"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c}),a.jsx("span",{className:"notify__name--text",children:"added you as an admin."})]}),x==="UPDATE_ADMIN"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c}),a.jsx("span",{className:"notify__name--text",children:" updated your admin access."})]}),x==="DELETE_ADMIN"&&a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",onClick:()=>p(n),children:c}),a.jsx("span",{className:"notify__name--text",children:" removed you from being an admin."})]})]})})]})}function hs({item:s,allNotifications:n}){var h,_,f,j,v,I;const c=S(),{errorToast:p,successToast:x,warningToast:d,errorHandle:N}=M(),{userProfile:e}=T(u=>u.profile),{user:o}=T(u=>u.auth),{gotoProfile:t,gotoNotifications:r}=g(),l=async(u,F)=>{var y;try{let b=await ss(u);(b==null?void 0:b.statusCode)===R&&(c(Q((y=b==null?void 0:b.data)==null?void 0:y.otherUser,"friendAdd")),c(w(F)),n())}catch(b){N(b)}},i=async(u,F)=>{var b,P,G,$,H;let y=await as(u);y&&(y==null?void 0:y.statusCode)===R&&(c(Q(u,"IncomingRemove")),(b=e==null?void 0:e.user)!=null&&b._id&&(u===((P=e==null?void 0:e.user)==null?void 0:P._id)&&c(z(o,"PendingRemove")),o===((G=e==null?void 0:e.user)==null?void 0:G._id)&&c(z(u,"IncomingRemove"))),($=y==null?void 0:y.data)!=null&&$.notificId&&c(w((H=y==null?void 0:y.data)==null?void 0:H.notificId)),n())};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsx(B,{senderAvatar:(h=s==null?void 0:s.senderId)==null?void 0:h.avatar,handleProfileClick:t,senderTickbigLink:(_=s==null?void 0:s.senderId)==null?void 0:_.tickbigLink,senderFName:C((f=s==null?void 0:s.senderId)==null?void 0:f.firstName),notificationType:s.notificationType,senderSubType:(j=s==null?void 0:s.sender)==null?void 0:j.subType}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:s.notificationType==="NEW_Follow_Request"?a.jsxs(a.Fragment,{children:[a.jsx(Y,{onClickFn:l,arg1:(v=s==null?void 0:s.senderId)==null?void 0:v._id,arg2:s._id,cssStyle:"notificationcard__btn",name:"Accept"}),a.jsx(Y,{onClickFn:i,arg1:(I=s==null?void 0:s.senderId)==null?void 0:I._id,arg2:s._id,cssStyle:"edit-btnn",name:"Decline"})]}):a.jsx(a.Fragment,{})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})]})]})})}function L({senderAvatar:s,senderFName:n,children:c,senderSubType:p}){return a.jsxs("div",{className:"notify__top-container",children:[a.jsx("div",{className:"flex-shrink-1",children:a.jsx(V,{src:s||D(p),alt:O,className:"border rounded-circle border-1 notify__img"})}),a.jsx("div",{className:"notify__name-container",children:a.jsx("p",{className:"notify__name",children:c})})]})}function J({onClickFn:s,altText:n,imgSrc:c,cssStyle:p,arg1:x,arg2:d,arg3:N,name:e}){return a.jsxs("button",{className:p,onClick:()=>s(x,d,N),children:[c&&n&&a.jsx("img",{src:c,alt:n}),e]})}function xs({item:s}){var e,o,t,r,l;const{user:n}=T(i=>i.auth),c=S(),{gotoProfile:p,gotoNotifications:x,gotoJobDash:d}=g(),N=async(i,h,_)=>{const f=await W(k(h),_);(f==null?void 0:f.statusCode)===R&&(c(_===1?w(h):q(h,n)),d({_id:i}))};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsxs(L,{senderAvatar:(e=s==null?void 0:s.senderId)==null?void 0:e.avatar,senderFName:C((o=s==null?void 0:s.senderId)==null?void 0:o.firstName),senderSubType:(t=s==null?void 0:s.senderId)==null?void 0:t.subType,children:[a.jsx("b",{className:"cp notify__name--sender",onClick:()=>{var i;return p((i=s==null?void 0:s.senderId)==null?void 0:i.tickbigLink)},children:C((r=s==null?void 0:s.senderId)==null?void 0:r.firstName)})," ",a.jsx("span",{className:"notify__name--text",children:"applied to your Job"})]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:a.jsx(J,{onClickFn:N,arg1:s==null?void 0:s.content,arg2:s==null?void 0:s._id,arg3:(l=s==null?void 0:s.receiverId)==null?void 0:l.length,cssStyle:"notificationcard__btn",name:"View Applications"})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s==null?void 0:s.createdAt)})})]})]})})}function Ns({tabState:s,setTabState:n}){var x;const c=d=>{n({value:d})},p=d=>{n({value:d.target.value})};return a.jsx(a.Fragment,{children:a.jsx("section",{className:"notificationNavbar",children:a.jsx("div",{className:"row",children:a.jsx("div",{className:"col-12",children:a.jsxs("div",{className:"notificationNavbar__article-1",children:[a.jsxs("div",{className:"notificationNavbar__article-1-content",children:[a.jsx(ns,{}),a.jsx("span",{children:"Notifications"})]}),a.jsxs("div",{className:"display-flex-aljc-center",children:[a.jsx("div",{className:"d-block d-md-none",children:a.jsx(ds,{sx:{m:1,minWidth:120}
1,children:a.jsx(ts,{labelId:"demo-customized-select-label",id:"demo-customized-select",value:s.value,IconComponent:fs,onChange:p,input:a.jsx(rs,{}),sx:{"& .MuiSelect-icon":{color:"rgb(167, 170, 171)"}},children:(x=os)==null?void 0:x.map(d=>a.jsx(ps,{value:d.value,children:d.label}))})})}),a.jsxs("div",{className:"profile__reviews-filter d-none d-md-block",children:[a.jsx("button",{onClick:()=>c("all"),className:s.value==="all"?"profile__reviews-filter-listActive profile__reviews-filter-list":void 0,children:"All"}),a.jsx("button",{onClick:()=>c("profile"),className:s.value==="profile"?"profile__reviews-filter-listActive profile__reviews-filter-list":void 0,children:"Profile"}),a.jsx("button",{onClick:()=>c("jobs"),className:s.value==="jobs"?"profile__reviews-filter-listActive profile__reviews-filter-list":void 0,children:"Jobs"}),a.jsx("button",{onClick:()=>c("projects"),className:s.value==="projects"?"profile__reviews-filter-listActive profile__reviews-filter-list":void 0,children:"Projects"}),a.jsx("button",{onClick:()=>c("fundraisings"),className:s.value==="fundraisings"?"profile__reviews-filter-listActive profile__reviews-filter-list":void 0,children:"Fundraising"}),a.jsx("button",{onClick:()=>c("investings"),className:s.value==="investings"?"profile__reviews-filter-listActive profile__reviews-filter-list":void 0,children:"Investing"})]})]})]})})})})})}function js({item:s}){var N,e,o,t,r;const{gotoProjectDash:n}=g();T(l=>l.auth);const c=S(),{gotoProfile:p,gotoNotifications:x}=g(),d=async(l,i,h)=>{var f,j;const _=await W(k(i),h);_&&(_==null?void 0:_.statusCode)===R&&(((j=(f=_==null?void 0:_.data)==null?void 0:f.project)==null?void 0:j.engagementType)==="ProjectType"?(c(w(i)),n({_id:l})):(c(w(i)),n({_id:l})))};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsxs(L,{senderAvatar:(N=s==null?void 0:s.senderId)==null?void 0:N.avatar,senderFName:C((e=s==null?void 0:s.senderId)==null?void 0:e.firstName),senderSubType:(o=s==null?void 0:s.senderId)==null?void 0:o.subType,children:[a.jsx("b",{className:"cp",onClick:()=>{var l;return p((l=s==null?void 0:s.senderId)==null?void 0:l.tickbigLink)},children:C((t=s==null?void 0:s.senderId)==null?void 0:t.firstName)})," ","applied to your Project"]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:a.jsx(J,{onClickFn:d,arg1:s==null?void 0:s.content,arg2:s==null?void 0:s._id,arg3:(r=s==null?void 0:s.receiverId)==null?void 0:r.length,cssStyle:"notificationcard__btn",name:"View Applications"})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})]})]})})}function us({item:s}){var e,o,t,r,l;const{user:n}=T(i=>i.auth),c=S(),{gotoProfile:p,gotoSingleFundraising:x}=g(),d=s==null?void 0:s.notificationType.split("_")[0],N=async(i,h,_)=>{const f=await W(k(h),_);(f==null?void 0:f.statusCode)===R&&(c(_===1?w(h):q(h,n)),x(i))};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsxs(L,{senderAvatar:(e=s==null?void 0:s.senderId)==null?void 0:e.avatar,senderFName:C((o=s==null?void 0:s.senderId)==null?void 0:o.firstName),senderSubType:(t=s==null?void 0:s.senderId)==null?void 0:t.subType,children:[a.jsx("b",{className:"cp",onClick:()=>{var i;return p((i=s==null?void 0:s.senderId)==null?void 0:i.tickbigLink)},children:C((r=s==null?void 0:s.senderId)==null?void 0:r.firstName)})," ",d,"d your Fundraise"]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:a.jsx(J,{onClickFn:N,arg1:s==null?void 0:s.content,arg2:s==null?void 0:s._id,arg3:(l=s==null?void 0:s.receiverId)==null?void 0:l.length,cssStyle:"notificationcard__btn",name:"View Fundraise"})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})]})]})})}function vs({item:s}){var e,o,t,r,l;const n=S(),{user:c}=T(i=>i.auth),{gotoProfile:p,gotoNotifications:x,gotoInvestingDash:d}=g(),N=async(i,h,_)=>{const f=await W(k(h),_);(f==null?void 0:f.statusCode)===R&&(n(_===1?w(h):q(h,c)),d(i))};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsxs(L,{senderAvatar:(e=s==null?void 0:s.senderId)==null?void 0:e.avatar,senderFName:C((o=s==null?void 0:s.senderId)==null?void 0:o.firstName),senderSubType:(t=s==null?void 0:s.senderId)==null?void 0:t.subType,children:[a.jsx("b",{className:"cp",onClick:()=>{var i;return p((i=s==null?void 0:s.senderId)==null?void 0:i.tickbigLink)},children:C((r=s==null?void 0:s.senderId)==null?void 0:r.firstName)})," ","pitched to your Investing"]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:a.jsx(J,{onClickFn:N,arg1:s==null?void 0:s.content,arg2:s==null?void 0:s._id,arg3:(l=s==null?void 0:s.receiverId)==null?void 0:l.length,cssStyle:"notificationcard__btn",name:"View Application"})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})]})]})})}function ys({item:s}){var l,i,h,_,f;const n=S(),{user:c}=T(j=>j.auth),{gotoProfile:p,gotoNotifications:x,gotoFullJob:d,gotoFullProject:N,gotoSingleFundraising:e,gotoSingleInvesting:o}=g(),t=s==null?void 0:s.notificationType.split("_")[1],r=async(j,v,I)=>{k(j);const u=await W(k(v),I);(u==null?void 0:u.statusCode)===R&&(n(I===1?w(v):q(v,c)),(s==null?void 0:s.notificationType)==="NEW_JOB_POSTED"?d(j):(s==null?void 0:s.notificationType)==="NEW_PROJECT_POSTED"?N(j):(s==null?void 0:s.notificationType)==="NEW_FUNDRAISING_POSTED"?e(j):(s==null?void 0:s.notificationType)==="NEW_INVESTING_POSTED"&&o(j))};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsxs(L,{senderAvatar:(l=s==null?void 0:s.senderId)==null?void 0:l.avatar,senderFName:C((i=s==null?void 0:s.senderId)==null?void 0:i.firstName),senderSubType:(h=s==null?void 0:s.senderId)==null?void 0:h.subType,children:["Your admin"," ",a.jsx("b",{className:"cp",onClick:()=>{var j;return p((j=s==null?void 0:s.senderId)==null?void 0:j.tickbigLink)},children:C((_=s==null?void 0:s.senderId)==null?void 0:_.firstName)})," ","posted a ",a.jsx("b",{children:t})," on behalf of you."]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:a.jsx(J,{onClickFn:r,arg1:s==null?void 0:s.content,arg2:s==null?void 0:s._id,arg3:(f=s==null?void 0:s.receiverId)==null?void 0:f.length,cssStyle:"notificationcard__btn",name:"View Applications"})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})]})]})})}function bs({item:s}){var r,l,i,h;const n=S(),{errorToast:c,successToast:p,warningToast:x,errorHandle:d}=M(),{gotoProfile:N,gotoNotifications:e,gotoAdmin:o}=g(),t=async _=>{try{const f=await W(k(_),1);f&&(f==null?void 0:f.statusCode)===R&&n(w(_)),o()}catch(f){d(f)}};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsx(B,{senderAvatar:(r=s==null?void 0:s.senderId)==null?void 0:r.avatar,handleProfileClick:N,senderTickbigLink:(l=s==null?void 0:s.senderId)==null?void 0:l.tickbigLink,senderFName:C((i=s==null?void 0:s.senderId)==null?void 0:i.firstName),notificationType:s.notificationType,senderSubType:(h=s==null?void 0:s.sender)==null?void 0:h.subType}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsx("div",{children:a.jsx(a.Fragment,{children:s.notificationType!=="DELETE_ADMIN"&&a.jsx(cs,{cssStyle:"notificationcard__btn",onClickFn:t,arg:s._id,name:"View My Permissions"})})}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})]})]})})}function gs({item:s}){var p,x,d,N;const{gotoProfile:n}=g();T(e=>e.auth);let c=JSON.parse(s.content);return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"notify",children:[a.jsx(B,{senderAvatar:(p=s==null?void 0:s.senderId)==null?void 0:p.avatar,handleProfileClick:n,senderTickbigLink:(x=s==null?void 0:s.senderId)==null?void 0:x.tickbigLink,senderFName:C((d=s==null?void 0:s.senderId)==null?void 0:d.firstName),notificationType:s.notificationType,updateStatus:c==null?void 0:c.updateStatus,senderSubType:(N=s==null?void 0:s.sender)==null?void 0:N.subType}),a.jsx("div",{className:"display-flex-aic-jcsb notification-flex",children:a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(s.createdAt)})})})]})})}const Cs="/assets/No%20notification-CBtGceGj.svg";function Ts({index:s,item:n}){var l,i,h,_,f,j;S(),M(),T(v=>v.profile),T(v=>v.auth);const{gotoProfile:c,gotoNotifications:p,gotoAmboReport:x}=g(),[d,N]=A.useState(!1),e=()=>N(!1),o=(n==null?void 0:n.content)||"{}",t=JSON.parse(o),r=A.useCallback(async()=>{try{const v=await Z(t==null?void 0:t.providerChatId,t==null?void 0:t.srid,t==null?void 0:t.RequesterName);N(!0)}catch(v){console.error("Error in handleOpenAndNotify:",v)}},[]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"notify",children:[a.jsxs("div",{className:"notify__top-container",children:[a.jsx("div",{className:"flex-shrink-1 ",children:a.jsx(V,{src:(l=n==null?void 0:n.senderId)!=null&&l.avatar?(i=n==null?void 0:n.senderId)==null?void 0:i.avatar:
1D((h=n==null?void 0:n.sender)==null?void 0:h.subType),alt:O,className:"border rounded-circle border-1 notify__img"})}),a.jsx("div",{className:"notify__name-container",children:a.jsx("div",{className:"link",children:a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",children:(_=n==null?void 0:n.senderId)==null?void 0:_.firstName})," ",a.jsx("span",{className:"notify__name--text",children:"viewed your contact details."})]})})})]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsxs("div",{children:[a.jsx("button",{className:"notificationcard__btn",onClick:r,children:"View Contact"}),a.jsx("button",{className:"edit-btnn",onClick:()=>x(t==null?void 0:t.srid),children:"View Results"})]}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(n.createdAt)})})]})]}),a.jsx(U,{open:d,handleClose:e,email:(f=t==null?void 0:t.ans)==null?void 0:f.email,mobile:(j=t==null?void 0:t.ans)==null?void 0:j.mobile})]})}function Es({index:s,item:n}){var t,r,l,i,h,_;const{gotoProvider:c}=g(),[p,x]=A.useState(!1),d=()=>x(!1),N=(n==null?void 0:n.content)||"{}",e=JSON.parse(N),o=A.useCallback(async()=>{try{const f=await m(e==null?void 0:e.serviceRequestChatId,e==null?void 0:e.spid,e==null?void 0:e.serviceRequesterName);x(!0)}catch(f){console.error("Error in handleOpenAndNotify:",f)}},[]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"notify",children:[a.jsxs("div",{className:"notify__top-container",children:[a.jsx("div",{className:"flex-shrink-1 ",children:a.jsx(V,{src:(t=n==null?void 0:n.senderId)!=null&&t.avatar?(r=n==null?void 0:n.senderId)==null?void 0:r.avatar:D((l=n==null?void 0:n.sender)==null?void 0:l.subType),alt:O,className:"border rounded-circle border-1 notify__img"})}),a.jsx("div",{className:"notify__name-container",children:a.jsx("div",{className:"link",children:a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",children:(i=n==null?void 0:n.senderId)==null?void 0:i.firstName})," ",a.jsx("span",{className:"notify__name--text",children:"viewed your contact details."})]})})})]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsxs("div",{children:[a.jsx("button",{className:"notificationcard__btn",onClick:o,children:"View Contact"}),a.jsx("button",{className:"edit-btnn",onClick:()=>c(),children:"View Results"})]}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(n.createdAt)})})]})]}),a.jsx(U,{open:p,handleClose:d,email:(h=e==null?void 0:e.ans)==null?void 0:h.email,mobile:(_=e==null?void 0:e.ans)==null?void 0:_.mobile})]})}function Is({index:s,item:n}){var r,l,i,h,_,f,j,v,I,u,F;const{gotoProvider:c,gotoAmboReport:p}=g(),[x,d]=A.useState(!1),N=()=>d(!1),e=(n==null?void 0:n.content)||"{}",o=JSON.parse(e);console.log("Parsed content:",o);const t=A.useCallback(async()=>{try{const y=await m(o==null?void 0:o.serviceRequestChatId,o==null?void 0:o.spid,o==null?void 0:o.serviceProviderName);d(!0)}catch(y){console.error("Error in handleOpenAndNotify:",y)}},[]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"notify",children:[a.jsxs("div",{className:"notify__top-container",children:[a.jsx("div",{className:"flex-shrink-1 ",children:a.jsx(V,{src:(r=n==null?void 0:n.senderId)!=null&&r.avatar?(l=n==null?void 0:n.senderId)==null?void 0:l.avatar:D((i=n==null?void 0:n.sender)==null?void 0:i.subType),alt:O,className:"border rounded-circle border-1 notify__img"})}),a.jsx("div",{className:"notify__name-container",children:a.jsx("div",{className:"link",children:a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",children:(h=n==null?void 0:n.senderId)==null?void 0:h.firstName})," ",a.jsxs("span",{className:"notify__name--text",children:["placed bid for your ",(_=o==null?void 0:o.requestChat)==null?void 0:_.serviceList," Service Request."]})]})})})]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsxs("div",{children:[a.jsx("button",{className:"notificationcard__btn",onClick:t,children:"View Contact"}),a.jsx("button",{className:"edit-btnn",onClick:()=>p(o==null?void 0:o.serviceRequestChatId),children:"View Results"})]}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(n.createdAt)})})]})]}),a.jsx(U,{open:x,handleClose:N,email:(v=(j=(f=o==null?void 0:o.providerChat)==null?void 0:f.inside)==null?void 0:j.answers)==null?void 0:v.email,mobile:(F=(u=(I=o==null?void 0:o.providerChat)==null?void 0:I.inside)==null?void 0:u.answers
1)==null?void 0:F.mobile})]})}function As({index:s,item:n}){var r,l,i,h,_,f,j,v,I,u,F,y,b;const{gotoProvider:c}=g(),{userDetails:p}=T(P=>P.auth),[x,d]=A.useState(!1),N=()=>d(!1),e=(n==null?void 0:n.content)||"{}",o=JSON.parse(e);console.log("Parsed content Accepted:",o);const t=A.useCallback(async()=>{try{const P=await Z(o==null?void 0:o.serviceRequestChatId,o==null?void 0:o.spid,p==null?void 0:p.username);d(!0)}catch(P){console.error("Error in handleOpenAndNotify:",P)}},[]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"notify",children:[a.jsxs("div",{className:"notify__top-container",children:[a.jsx("div",{className:"flex-shrink-1 ",children:a.jsx(V,{src:(r=n==null?void 0:n.senderId)!=null&&r.avatar?(l=n==null?void 0:n.senderId)==null?void 0:l.avatar:D((i=n==null?void 0:n.sender)==null?void 0:i.subType),alt:O,className:"border rounded-circle border-1 notify__img"})}),a.jsx("div",{className:"notify__name-container",children:a.jsx("div",{className:"link",children:a.jsxs("p",{className:"notify__name cp",children:[a.jsx("b",{className:"notify__name--sender",children:(h=n==null?void 0:n.senderId)==null?void 0:h.firstName})," ",a.jsxs("span",{className:"notify__name--text",children:["accepted your bid for ",(j=(f=(_=o==null?void 0:o.serviceRequestChat)==null?void 0:_.inside)==null?void 0:f.answers)==null?void 0:j.serviceList," Service."]})]})})})]}),a.jsxs("div",{className:"display-flex-aic-jcsb notification-flex",children:[a.jsxs("div",{children:[a.jsx("button",{className:"notificationcard__btn",onClick:t,children:"View Contact"}),a.jsx("button",{className:"edit-btnn",onClick:()=>c(),children:"View Results"})]}),a.jsx("div",{className:"notification__time",children:a.jsx("p",{children:E(n.createdAt)})})]})]}),a.jsx(U,{open:x,handleClose:N,email:(u=(I=(v=o==null?void 0:o.serviceRequestChat)==null?void 0:v.inside)==null?void 0:I.answers)==null?void 0:u.email,mobile:(b=(y=(F=o==null?void 0:o.serviceRequestChat)==null?void 0:F.inside)==null?void 0:y.answers)==null?void 0:b.mobile})]})}function jn(){const s=S(),{errorHandle:n}=M(),{stateNotifications:c,loading:p,tab:x}=T(r=>r.notifys),[d,N]=A.useState({value:"all"}),e=A.useCallback(async()=>{var r,l;try{let i=await _s();s(es((r=i==null?void 0:i.data)==null?void 0:r.notificationresult)),s(is((l=i==null?void 0:i.data)==null?void 0:l.unseenNotifications))}catch(i){n(i)}},[s]);let o=d.value==="all"?c:null;return d!=="all"&&(()=>{d.value==="jobs"?o=c==null?void 0:c.filter(r=>["NEW_JOB_APPLY","NEW_JOB_POSTED"].includes(r==null?void 0:r.notificationType)):d.value==="projects"?o=c==null?void 0:c.filter(r=>["NEW_PROJECT_APPLY","NEW_PROJECT_POSTED"].includes(r==null?void 0:r.notificationType)):d.value==="fundraisings"?o=c==null?void 0:c.filter(r=>["NEW_FUNDRAISING_POSTED","SuperLike_FUNDRAISING","Like_FUNDRAISING","UnLike_FUNDRAISING"].includes(r==null?void 0:r.notificationType)):d.value==="investings"?o=c==null?void 0:c.filter(r=>["INVESTING_PITCHED","NEW_INVESTING_POSTED"].includes(r==null?void 0:r.notificationType)):d.value==="profile"&&(o=c==null?void 0:c.filter(r=>["NEW_ADMIN","UPDATE_ADMIN","DELETE_ADMIN","PROJECT_REF","PROJECT_REF_STATUS","NEW_Follow_Request","FOLLOW_ACCEPTED","SERVICE_REQ_CONTACT_VIEWED","SERVICE_PROV_CONTACT_VIEWED"].includes(r==null?void 0:r.notificationType)))})(),ls(()=>{e(1)},[e]),a.jsx(a.Fragment,{children:a.jsxs("main",{className:"notification",children:[a.jsx("section",{className:"notification__nav-content",children:a.jsx(Ns,{tabState:d,setTabState:N})}),a.jsx("hr",{style:{border:"1px solid #8c9395",color:"#8c9395",margin:"0"}}),(o==null?void 0:o.length)>0?a.jsx("section",{className:"mb-3 notification__cards",children:o==null?void 0:o.map((r,l)=>a.jsxs(a.Fragment,{children:[["FOLLOW_ACCEPTED","NEW_Follow_Request"].includes(r.notificationType)&&a.jsx(hs,{item:r,allNotifications:e}),["NEW_ADMIN","UPDATE_ADMIN","DELETE_ADMIN"].includes(r.notificationType)&&a.jsx(bs,{item:r},l),r.notificationType==="NEW_JOB_APPLY"&&a.jsx(xs,{item:r},l),r.notificationType==="NEW_PROJECT_APPLY"&&a.jsx(js,{item:r},l),["Like_FUNDRAISING","SuperLike_FUNDRAISING"].includes(r.notificationType)&&a.jsx(us,{item:r},l),r.notificationType==="INVESTING_PITCHED"&&a.jsx(vs,{item:r},l),["PROJECT_REF","PROJECT_REF_STATUS"].includes(r.notificationType)&&a.jsx(gs,{item:r},l),r.notificationType==="SERVICE_REQ_CONTACT_VIEWED"&&a.jsx(Ts,{index:l,item:r}),r.notificationType==="SERVICE_PROV_CONTACT_VIEWED"&&a.jsx(Es,{index:l,item:r}),r.notificationType==="SERVICE_PROV_PLACED_BID"&&a.jsx(Is,{index:l,item:r}),r.notificationType==="SERVICE_REQU_ACCEPTED_BID"&&a.jsx(As,{index:l,item:r}),["NEW_JOB_POSTED","NEW_PROJECT_POSTED","NEW_FUNDRAISING_POSTED","NEW_INVESTING_POSTED"].includes(r.notificationType)&&a.jsx(ys,{item:r},l)]}))}):a.jsxs("section",{className:"display-flex-aljc-center mb-3",style:{flexDirection:"column"},children:[a.jsx("img",{src:Cs,alt:"no notification"}),a.jsx("p",{className:"no_notify",children:"All clear! No new notifications at the moment."})]})]})})}export{jn as default};

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.