PageSourceSearch

https://cdn.ridewithgps.com/rwgps-javascripts/prod/assets/useNotifications-Dd8BFMiG.js

js ridewithgps.com collected 2026-09-24 08:43:10 UTC 2,522 bytes, 1 lines download raw bytes

1import{d as e,ft as t,h as n,jt as r}from"./currentUser-ZLh-7H7g.js";import{a as i}from"./util-Es43GprZ.js";import{a}from"./pickBy-eigzzLED.js";import{t as o}from"./dist-3bNpuHVG.js";import{r as s,t as c}from"./notificationsQuery-DHXRIUNh.js";import{t as l}from"./Notification-BQrQTwr9.js";import{r as u}from"./bylineLink-BDZNCsWa.js";var d=o();function f(e){return{id:e.id,title:e.title,richTitle:e.rich_title,lockscreenHint:e.lockscreen_hint,image:e.image,icon:e.icon,body:e.body,type:l(e.type)?e.type:void 0,actorId:e.actor_id??void 0,imageTarget:e.image_target,textTarget:e.text_target,ctaPrimary:e.cta_primary,ctaSecondary:e.cta_secondary,updatedAt:e.updated_at,readStatus:e.read_status,archived:e.archived}}var p=e=>new Map((e??[]).filter(e=>e.type===`user`).map(e=>[e.id,{accountLevel:e.user?.account_level,subject:u({bylineSubject:e.user?.byline_subject})}]));function m(t){let o=(0,d.c)(27),l;o[0]===t?l=o[1]:(l=t===void 0?{}:t,o[0]=t,o[1]=l);let{enabled:u}=l,f=u===void 0?!0:u,m=r(),S,C;if(o[2]===Symbol.for(`react.memo_cache_sentinel`)){let t=e();C=i,S=c(n(t)?t.notifications:void 0),o[2]=S,o[3]=C}else S=o[2],C=o[3];let w;o[4]===f?w=o[5]:(w={...S,enabled:f},o[4]=f,o[5]=w);let{data:T,isPlaceholderData:E,isError:D,hasNextPage:O,fetchNextPage:k}=C(w),A;o[6]===T?.pages?A=o[7]:(A=T?.pages??[],o[6]=T?.pages,o[7]=A);let j=A,M,N,P;if(o[8]!==j){let e=new Map(j.flatMap(x).map(b));N=Array.from(e.values()).sort(y),M=p(j.flatMap(v)),P=N.filter(_).map(g),o[8]=j,o[9]=M,o[10]=N,o[11]=P}else M=o[9],N=o[10],P=o[11];let F=P,I;o[12]===m?I=o[13]:(I={mutationFn:h,onMutate:e=>s(m,e,`seen`),onError:(e,t)=>s(m,t,`unseen`)},o[12]=m,o[13]=I);let L=a(I),R;o[14]===m?R=o[15]:(R=()=>{m.prefetchInfiniteQuery(c())},o[14]=m,o[15]=R);let z=R,B=T!==void 0&&!E,V;return o[16]!==M||o[17]!==k||o[18]!==O||o[19]!==D||o[20]!==L.mutate||o[21]!==N||o[22]!==j.length||o[23]!==z||o[24]!==B||o[25]!==F?(V={orderedNotifications:N,actors:M,fetched:B,isError:D,hasNextPage:O,fetchNextPage:k,pageCount:j.length,numUnread:F.length,unseenIds:F,prefetchNotifications:z,markNotificationsSeen:L.mutate},o[16]=M,o[17]=k,o[18]=O,o[19]=D,o[20]=L.mutate,o[21]=N,o[22]=j.length,o[23]=z,o[24]=B,o[25]=F,o[26]=V):V=o[26],V}function h(e){return t(`/notifications/mark_seen`,{seen_ids:e})}function g(e){return e.id}function _(e){return e.readStatus===`unseen`}function v(e){return e.extras??[]}function y(e,t){return!e.updatedAt||!t.updatedAt?0:t.updatedAt.localeCompare(e.updatedAt)}function b(e){return[e.id,f(e)]}function x(e){return e.results}export{m as t};

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.