1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f84a72d4-61eb-5487-973a-c88dab82899d")}catch(e){}}(); 3(self.webpackChunkclient=self.webpackChunkclient||[]).push([["5220"],{64748(e,t,s){s.d(t,{y:()=>b});var r=s(98153),i=s(15526),n=s(48830),a=s(75841),o=s(84190),d=s(28138),c=s(65052),h=s(15654),l=s(36580),p=s(38792),u=s.n(p),v=s(22613),f=s(45482);class b{constructor(){this.data=new n.c(e=>{var t=(t,s)=>{s&&("reading-letter"===s.source||"overlay-reading-letter"===s.source)&&s.data&&s.data.letterId?e.next({attendeeId:t,replyLetterId:s.data.letterId,source:s.source,letterCategory:"reply"}):e.next({attendeeId:t,replyLetterId:null,source:(null==s?void 0:s.source)==="recommendation"?"recommendation":null,letterCategory:(null==s?void 0:s.source)==="recommendation"?"by-recommendation":"new"})},s=()=>{e.next(null)};return r.A.sync("event.communication.letter.selected",t).on("event.overlay.letter.deactivated",s).on("event.communication.read-letter.selected",s).on("event.communication.chat.selected",s).on("event.sidebar.closed",s).on("event.sidebar.chat.closed",s),()=>{r.A.removeListener("event.communication.letter.selected",t).removeListener("event.overlay.letter.deactivated",s).removeListener("event.communication.read-letter.selected",s).removeListener("event.communication.chat.selected",s).removeListener("event.sidebar.closed",s).removeListener("event.sidebar.chat.closed",s)}}).pipe((0,o.n)(e=>!e||null!=e&&e.replyLetterId||(null==e?void 0:e.letterCategory)==="by-recommendation"?(0,a.of)(e):f.Session.shared().userId.pipe((0,o.n)(t=>v.p.shared(t).hasRecommendationFor(e.attendeeId).pipe((0,d.T)(t=>t?Object.assign({},e,{letterCategory:"follow-up"}):e))))),(0,c.Z)(null),(0,h.F)(u()),(0,l.t)({refCount:!0,bufferSize:1}))}}b.shared=(0,i.G)(()=>new b)},10853(e,t,s){s.d(t,{j:()=>d});var r=s(15526),i=s(48830),n=s(15654),a=s(36580),o=s(98153);class d{constructor(){this.visible=new i.c(e=>{e.next(!1);var t=()=>{e.next(!0)},s=()=>{e.next(!1)};return o.A.states("event.chat.voice.panel.opened",t,"event.chat.voice.panel.closed",s),()=>{o.A.removeStates("event.chat.voice.panel.opened",t,"event.chat.voice.panel.closed",s)}}).pipe((0,n.F)(),(0,a.t)(1))}}d.shared=(0,r.G)(()=>new d)},9453(e,t,s){s.d(t,{l:()=>a});var r=s(15526),i=s(97156),n=s(15654);class a{constructor(){this.visibleSubject=new i.t(!1),this.visible=this.visibleSubject.asObservable().pipe((0,n.F)())}setVisible(e){this.visibleSubject.next(e)}}a.shared=(0,r.G)(()=>new a)},84835(e,t,s){s.d(t,{i:()=>W});var r=s(58731),i=s(29109),n=s(14321),a=s(13462),o=s(20287),d=s(15526),c=s(97156),h=s(8733),l=s(75841),p=s(48830),u=s(82788),v=s(56607),f=s(17524),b=s(34578),m=s(15654),S=s(84190),g=s(50626),I=s(28138),w=s(44383),y=s(65052),x=s(53940),C=s(41392),j=s(56177),T=s(92453),P=s(36580),F=s(94375),A=s(45482),B=s(43751),D=s(10845),E=s(67276),k=s(56388),O=s(86013),L=s(32194),M=s(13230),U=s(22605),z=s(25871),R=s(21050),G=s(66382),V=s(10621),_="call-motivation-popup",J="call-motivation-popup-blocked-until",Q=F.b.day;class W{constructor(e){this.popupBlockedUntil=new c.t(0),this.hideMotivationPopupEvent=new h.B,this.offerAttendeeSubject=new c.t(void 0),this.offerCache={},this.userId=e,this.activeChatsMotivationPopupShownState={},this.callPopUpEnabled=a.T.shared().callMotivationPopup.enabled.pipe((0,m.F)(),(0,S.n)(e=>e?A.Session.shared().userIsUsual:(0,l.of)(!1))),this.offerBlockingReasonSubject=ne
3w h.B,this.offerBlockingReason=this.offerBlockingReasonSubject.asObservable()}start(e){var t=new p.c(()=>{var e=new u.yU;return e.add(r.y.shared(_,this.userId).load(J).safeSubscribe(e=>{e&&e>Date.now()&&this.popupBlockedUntil.next(e)})),e.add(i.u.shared(this.userId).activeChats.pipe((0,g.J)(),(0,I.T)(e=>{var[t,s]=e;return t.filter(e=>!s.includes(e))})).safeSubscribe(e=>{e.forEach(e=>{this.activeChatsMotivationPopupShownState[e]&&delete this.activeChatsMotivationPopupShownState[e],R.J.shared("chat").clearAttendeeState(e)})})),e.add(this.hideMotivationPopupEvent.pipe((0,w.S)((e,t)=>"accept"===t.action?0:e+1,0),(0,y.Z)(0)).safeSubscribe(e=>{if(e>=3){var t=Date.now()+Q;this.popupBlockedUntil.next(t),r.y.shared(_,this.userId).store(J,t).safeSubscribe()}})),e.add(this.offerAttendeeSubject.asObservable().pipe((0,g.J)(),(0,x.p)(e=>{var[t,s]=e;return!!t&&!s})).safeSubscribe(e=>{var[t]=e;R.J.shared("chat").notifyClosed("video",Date.now(),t)})),e.add(G.j.shared().chatAttendee.pipe((0,S.n)(e=>e?this.chatIsActive(e).pipe((0,S.n)(t=>t?this.videoAvailable(e).pipe((0,C.B)(100),(0,m.F)()):v.w)):v.w)).safeSubscribe(e=>{R.J.shared("chat").setVideoAvailable(e)})),e});e.add(this.callPopUpEnabled.pipe((0,m.F)(),(0,S.n)(e=>e?t:v.w)).safeSubscribe())}chatIsActive(e){return i.u.shared(this.userId).statusOfChatWith(e).pipe((0,I.T)(t=>(t||this.offerBlockingReasonSubject.next({attendeeId:e,reason:"chat-inactive"}),!!t)),(0,m.F)())}videoAvailable(e){return this.callPopUpEnabled.pipe((0,S.n)(t=>t?z.L.shared(this.userId).videoPromoAllowed(e,"mopup").pipe((0,S.n)(t=>t?(0,f.z)([n.f.shared(e).userIsFeaturedMember,this.chatIsActive(e),this.attendeeAvailableForCall(e),this.motivationPopupIsBlockedByUser(),this.motivationPopupIsBlockedByCall(e),this.callExists(),O.H.shared(this.userId).blockedByUser(e),L.T.shared().visible,k.E.shared(e).video.pipe((0,I.T)(e=>!!e))]).pipe((0,I.T)(t=>{var[s,r,i,n,a,o,d,c,h]=t;return[s&&r&&i&&!a&&!this.activeChatsMotivationPopupShownState[e]&&!o&&!d&&!c&&h,n]}),(0,I.T)(t=>{var[s,r]=t;return s&&r&&this.offerBlockingReasonSubject.next({attendeeId:e,reason:"blocked-by-user"}),s&&!r})):(0,l.of)(!1))):(0,l.of)(!1)),(0,m.F)())}attendeeAvailableForCall(e){return(0,f.z)([U.g.shared(this.userId).canCallTo(e,!0,!1),M.N.shared(this.userId).callIsAvailable(e,!0,!1)]).pipe((0,I.T)(e=>{var[t,s]=e;return t||s}),(0,m.F)())}motivationPopupIsBlockedByUser(){return this.popupBlockedUntil.pipe((0,I.T)(e=>(e||0)-Date.now()>0),(0,m.F)())}motivationPopupIsBlockedByCall(e){return(0,f.z)([o.u.shared(this.userId).calls((0,l.of)(1),e),a.T.shared().callMotivationPopup.daysOfNoVideochatToShow]).pipe((0,I.T)(e=>{var[t,s]=e,r=t.items[0];return!!r&&Date.now()-r.date.getTime()<s*F.b.day}),(0,m.F)())}callExists(){return(0,f.z)([E.M.shared(this.userId).state,B.Y.shared().get(D.A,this.userId).store.rxState()]).pipe((0,I.T)(e=>{var[t,s]=e;return"idle"!==t.status||"idle"!==s.status}),(0,m.F)())}offer(e){return this.offerCache[e]||(this.offerCache[e]=this.videoAvailable(e).pipe((0,S.n)(t=>t?R.J.shared("chat").canShowVideo().pipe((0,x.p)(e=>e),(0,j.s)(1),(0,S.n)(()=>(0,b.h)(k.E.shared(e).video.pipe((0,T.M)(e=>{e&&R.J.shared("chat").notifyShown("video")})),this.hideMotivationPopupEvent.pipe((0,x.p)(t=>t.attendeeId===e),(0,I.T)(()=>void 0))))):(0,l.of)(void 0)),(0,m.F)(V.L),(0,P.t)({refCount:!0,bufferSize:1}),(0,T.M)(t=>{this.offerAttendeeSubject.next(t?e:void 0)}))),this.offerCache[e]}accept(e){this.hideMotivationPopupEvent.next({attendeeId:e,action:"accept",timestamp:Date.now()})}reject(e){this.hideMotivationPopupEvent.next({attendeeId:e,action:"reject",timestamp:Date.now()})}motivationVideoShowed(e){this.activeChatsMotivationPopupShownState[e]=!0}}W.shared=(0,d.G)(e=>new W(e))},84419(e,t,s){s.d(t,{f:()=>n});var r=s(15526),i=s(12640);class n{constructor(e){this.logOfferDeclined=(e,t)=>{i._.shared(this.userId).logEvent("offer-to-videochat-declined",{attendeeId:e,cta:t}).safeSubscribe()},this.logOfferShowed=(e,t,s)=>{i._.shared(this.userId).logEvent("offer-to-videochat-showed",{attendeeId:e,cta:t,options:s}).safeSubscribe()},this.logOfferAccepted=(e,t,s)=>{i._.shared(this.userId).logEvent("offer-to-videochat-accepted",{attendeeId:e,cta:t,options:s}).safeSubscribe()},this.userId=e}logOfferBlocked(e,t,s){i._.shared(this.userId).logEvent("offer-to-videochat-blocked",{attendeeId:e,reason:t,cta:s}).safeSubscribe()}}n.shared=(0,r.G)(e=>new n(e))},26355(e,t,s){s.d(t,{d:()=>n});var r=s(15526),i=s(12640);
3class n{constructor(e){this.userId=e}logLetterRecommendationModalShown(e){i._.shared(this.userId).logEvent("send-letter-recommendation-modal-shown",Object.assign({"user-id":this.userId,"attendee-ids":e.attendeeIds,trigger:e.trigger},e.recommendationDisplayId&&{"recommendation-display-id":e.recommendationDisplayId})).safeSubscribe()}logLetterRecommendationUserSkip(e){i._.shared(this.userId).logEvent("send-letter-recommendation-user-skip",Object.assign({"user-id":this.userId,"attendee-ids":e.attendeeIds,reason:e.reason,trigger:e.trigger},e.recommendationDisplayId&&{"recommendation-display-id":e.recommendationDisplayId})).safeSubscribe()}logLetterRecommendationModalCompleted(e){i._.shared(this.userId).logEvent("send-letter-recommendation-modal-completed",{"user-id":this.userId,"recommendation-display-id":e.recommendationDisplayId}).safeSubscribe()}logLetterRecommendationStartRemoval(e){i._.shared(this.userId).logEvent("send-letter-recommendation-start-removal",{"user-id":this.userId,"recommendation-display-id":e.recommendationDisplayId,"attendee-id":e.attendeeId}).safeSubscribe()}logLetterRecommendationCancelRemoval(e){i._.shared(this.userId).logEvent("send-letter-recommendation-cancel-removal",{"user-id":this.userId,"recommendation-display-id":e.recommendationDisplayId,"attendee-id":e.attendeeId}).safeSubscribe()}}n.shared=(0,r.G)(e=>new n(e))},917(e,t,s){s.d(t,{Gj:()=>U});var r=s(59562),i=s(39971),n=s(15526),a=s(30495),o=s(50846),d=s(79942);class c extends o.Q{constructor(e){super("dialogs.mailbox.letter.recommendations",e,t=>(0,a.Yq)(a.jI.shared().users.reminders.get,e,Object.assign({},t,{type:"letter"})).pipe((0,d.vV)(e=>{var{users:t}=e;return{data:t.map(e=>{var{id:t}=e;return t}),ttl:0}})))}}c.shared=(0,n.G)(e=>new c(e));var h=s(8733),l=s(97156),p=s(17524),u=s(75841),v=s(58731),f=s(22998),b=s(15654),m=s(65052),S=s(84190),g=s(28138),I=s(36580),w=s(56177),y=s(92453),x=s(94375),C=s(10621),j=s(32248),T=s(85712),P=s(99185),F="dialogs.mailbox.letter.recommendations",A="skipTime",B="recommendationTime",D="proceededToSending",E="remainingReplies",k="displayId",O="postponedUsers",L=3*x.b.hour,M=24*x.b.hour;class U{constructor(e){this.refreshContactsSubject=new h.B,this.refreshProceededToSendingSubject=new h.B,this.displayIdSubject=new l.t(null),this.completedSubject=ne
3w h.B,this.fetchedContacts=new l.t(null),this.postponedUsers=new l.t([]),this.displayId=this.displayIdSubject.asObservable().pipe((0,b.F)()),this.completed=this.completedSubject.asObservable().pipe((0,b.F)()),this.userId=e,this.persistence=v.y.shared(F,e),this.remotePersistence=f.w.shared(F,e),this.contacts=this.refreshContactsSubject.asObservable().pipe((0,m.Z)(null),(0,S.n)(()=>(0,p.z)([this.persistence.load(A),this.persistence.load(B),this.persistence.load(E).pipe((0,d.vV)(e=>null!=e?e:10))])),(0,S.n)(e=>{var[t,s,r]=e;return s&&Date.now()-s<M||t&&Date.now()-t<L?(0,u.of)([]):this.getContacts(r).pipe((0,S.n)(e=>{if(!e.length||r<=0)return this.finish().asObservable().pipe((0,g.T)(()=>[]));var t=e.slice(0,r),s=Math.min(r,t.length);return this.persistence.store(E,s).asObservable().pipe((0,g.T)(()=>t))}),(0,S.n)(e=>e.length?this.createDisplayId().asObservable().pipe((0,g.T)(()=>e)):(0,u.of)(e)))}),(0,b.F)(C.L),(0,I.t)({bufferSize:1,refCount:!0})),this.proceededToLetterSending=this.refreshProceededToSendingSubject.pipe((0,m.Z)(null),(0,S.n)(()=>this.persistence.load(D).asObservable().pipe((0,g.T)(e=>!!e))),(0,b.F)(),(0,I.t)({bufferSize:1,refCount:!0})),this.sendLetterUserIsOnline=this.proceededToLetterSending.pipe((0,S.n)(e=>e?T.y.shared().data.pipe((0,g.T)(e=>(null==e?void 0:e.source)==="recommendation")):(0,u.of)(!1)),(0,S.n)(e=>e?this.contacts:(0,u.of)([])),(0,S.n)(e=>e.length?j.R.shared(e[0]).cachedPresence.pipe((0,g.T)(e=>{var{online:t}=e;return t})):(0,u.of)(!1)),(0,b.F)())}getContacts(e){return this.fetchedContacts.pipe((0,w.s)(1),(0,S.n)(t=>t?(0,u.of)(t):(0,p.z)([c.shared(this.userId).data({select:e}),this.remotePersistence.load(O)]).pipe((0,g.T)(e=>{var[t,s]=e;return this.postponedUsers.next(s||[]),this.reorderContactsWithPostponed(t,s||[])}),(0,y.M)(e=>this.fetchedContacts.next(e)))))}reorderContactsWithPostponed(e,t){var s=new Set(t),r=new Set(e);return[...e.filter(e=>!s.has(e)),...t.filter(e=>r.has(e))]}start(){return this.persistence.store(D,!0).pipe((0,d.ex)(()=>this.refreshProceededToSendingSubject.next()))}remove(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,p.z)([this.persistence.load(E),this.fetchedContacts.pipe((0,w.s)(1))]).toSingle().pipe((0,d.Fg)(t=>{var[s,r]=t;return s?e?r&&0!==r.length?P.P.shared(this.userId).addTag(r[0],"users.reminders.skipped..letter").pipe((0,d.ex)(()=>{this.fetchedContacts.next(null)}),(0,d.Fg)(()=>this.getContacts(s).toSingle()),(0,d.ex)(()=>{this.refreshContactsSubject.next()}),(0,d.vV)(()=>void 0)):i.v.just(void 0):1===s?this.finish():this.persistence.store(E,s-1).pipe((0,d.ex)(()=>{var e;this.fetchedContacts.next(null!=(e=null==r?void 0:r.slice(1))?e:null),this.refreshContactsSubject.next()})):i.v.just(void 0)}))}finish(){var e=Date.now();return(0,p.z)([this.displayId.toSingle(),this.persistence.store(D,!1),this.persistence.store(B,e),this.persistence.store(E,10),this.clearDisplayId()]).toSingle().pipe((0,d.ex)(e=>{var[t]=e;this.fetchedContacts.next(null),this.postponedUsers.next([]),this.refreshContactsSubject.next(),this.refreshProceededToSendingSubject.next(),this.completedSubject.next(t)}),(0,d.Fg)(()=>this.remotePersistence.store(O,null)))}close(){var e=Date.now();return(0,p.z)([this.persistence.store(D,!1),this.persistence.store(A,e),this.clearDisplayId()]).toSingle().pipe((0,d.ex)(()=>{this.fetchedContacts.next(null),this.refreshContactsSubject.next(),this.refreshProceededToSendingSubject.next()}),(0,d.vV)(()=>void 0))}postpone(){return(0,p.z)([this.fetchedContacts.pipe((0,w.s)(1)),this.postponedUsers.pipe((0,w.s)(1))]).toSingle().pipe((0,d.Fg)(e=>{var[t,s]=e;if(!t||0===t.length)return i.v.just();var r=t[0],n=[...(s||[]).filter(e=>e!==r),r],a=this.reorderContactsWithPostponed(t,n);return this.postponedUsers.next(n),this.fetchedContacts.next(a),this.refreshContactsSubject.next(),this.remotePersistence.store(O,n)}),(0,d.vV)(()=>void 0))}createDisplayId(){return this.persistence.load(k).pipe((0,d.Fg)(e=>{if(e)return i.v.just(e);var t=(0,r.A)();return this.persistence.store(k,t).pipe((0,d.vV)(()=>t))}),(0,d.ex)(e=>this.displayIdSubject.next(e)))}clearDisplayId(){return this.persistence.clear(k).pipe((0,d.ex)(()=>this.displayIdSubject.next(null)))}}U.shared=(0,n.G)(e=>new U(e))}
3,85712(e,t,s){s.d(t,{y:()=>r.y});var r=s(64748)},31249(e,t,s){s.d(t,{j:()=>r.j});var r=s(10853)},27616(e,t,s){s.d(t,{zr:()=>w});var r=s(13462),i=s(91885),n=s(89218),a=s(75841),o=s(17524),d=s(79942),c=s(84190),h=s(28138),l=s(15654),p=s(36580),u=s(15526),v=s(22998),f=s(66382),b=s(94375),m=s(4938),S="text-to-speech-button-onboarding",g="first-shown",I="last-shown";class w extends n.D{constructor(e){super(),this.userId=e,this.canOffer=r.T.shared().textToSpeechEnabled.pipe((0,c.n)(e=>e?(0,o.z)([v.w.shared(S,this.userId).data(),f.j.shared().chatAttendee,m.E.shared().currentTime().asObservable()]).pipe((0,h.T)(e=>{var t,s,[r,i,n]=e;if(!i)return!1;var a=null==(t=r[S])?void 0:t[g],o=null==(s=r[S])?void 0:s[I];return!a||!(n-a>b.b.week||o&&m.E.shared().isSameDaySync(new Date(o),new Date(n)))})):(0,a.of)(!1))).pipe((0,l.F)(),(0,p.t)({bufferSize:1,refCount:!0}))}accept(){return m.E.shared().currentTime().pipe((0,d.Fg)(e=>v.w.shared(S,this.userId).store(I,e).pipe((0,d.AB)(i.Q.success()))))}reject(){return m.E.shared().currentTime().pipe((0,d.Fg)(e=>v.w.shared(S,this.userId).store(I,e).pipe((0,d.AB)(i.Q.success()))))}start(){return m.E.shared().currentTime().pipe((0,d.Fg)(e=>v.w.shared(S,this.userId).store(g,e).pipe((0,d.AB)(i.Q.success({})))))}}w.shared=(0,u.G)(e=>new w(e))},27680(e,t,s){s.d(t,{XN:()=>g});var r=s(13462),i=s(91885),n=s(89218),a=s(75841),o=s(79942),d=s(84190),c=s(50626),h=s(28138),l=s(15654),p=s(36580),u=s(15526),v=s(22998),f=s(66382),b=s(31249),m="text-to-speech-farewell-onboarding",S="shown";class g extends n.D{constructor(e){super(),this.userId=e,this.canOffer=r.T.shared().textToSpeechEnabled.pipe((0,d.n)(e=>e?f.j.shared().chatAttendee.pipe((0,d.n)(e=>e?v.w.shared(m,this.userId).data().pipe((0,d.n)(e=>{var t;return(null==(t=e[m])?void 0:t[S])?(0,a.of)(!1):b.j.shared().visible.pipe((0,c.J)(),(0,h.T)(e=>{var[t,s]=e;return!s&&t}))})):(0,a.of)(!1))):(0,a.of)(!1)),(0,l.F)(),(0,p.t)({bufferSize:1,refCount:!0}))}start(){return v.w.shared(m,this.userId).store(S,!0).pipe((0,o.AB)(i.Q.success({})))}}g.shared=(0,u.G)(e=>new g(e))}}]); 4//# sourceMappingURL=sourcemaps/5220.5e3435c578b09b43.js.map 5//# debugId=f84a72d4-61eb-5487-973a-c88dab82899d
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.