),r(e)})}));aU.meta={name:"aiAlphaDigestMarkCompleteFetcher",key:"createFetcherAiAlphaDigestMarkCompleteFetcher",description:"ai.alpha.digest.markComplete generated fetcher"};let aH=(0,aL.A)("ai.alpha.digest.markUnread generated fetcher",(e,a,t)=>new aM.S((n,r)=>{let{abortSignal:l,reason:s,...i}=t,c=(0,aB.VA)(i);e((0,aP.apiCall)({method:"ai.alpha.digest.markUnread",args:c,abortSignal:l,reason:s})).then(e=>{n(e)}).catch(e=>{(0,aO.A)({getState:a}).error(`API call to ai.alpha.digest.markUnread
						with reason ${s} failed, initiated by generated fetcher`),r(e)})}));aH.meta={name:"aiAlphaDigestMarkUnreadFetcher",key:"createFetcherAiAlphaDigestMarkUnreadFetcher",description:"ai.alpha.digest.markUnread generated fetcher"};let aF=(0,aL.A)("ai.alpha.digest.info generated fetcher",(e,a,t)=>new aM.S((n,r)=>{let{abortSignal:l,reason:s,...i}=t,c=(0,aB.VA)(i);e((0,aP.apiCall)({method:"ai.alpha.digest.info",args:c,abortSignal:l,reason:s})).then(e=>{n(e)}).catch(e=>{(0,aO.A)({getState:a}).error(`API call to ai.alpha.digest.info
						with reason ${s} failed, initiated by generated fetcher`),r(e)})}));aF.meta={name:"aiAlphaDigestInfoFetcher",key:"createFetcherAiAlphaDigestInfoFetcher",description:"ai.alpha.digest.info generated fetcher"};let aG=(0,eT.Ay)("Fetch a single daily digest by id",async(e,a,{id:t})=>{e((0,eD.aW)(!0));try{let a=await e(aF({reason:"get-digest",digestId:t}));if(!a.ok||!a.digest)return void(0,aO.A)({label:"daily-digest"}).error(Error("response not ok or no digest fetched"));let n=(0,aB.XK)(a.digest);e((0,eD.Fb)({dailyDigest:n}))}catch{(0,aO.A)({label:"daily-digest"}).error(Error("error fetching digests"))}e((0,eD.aW)(!1))});aG.meta={name:"fetchDailyDigest",key:"createThunkFetchDailyDigest",description:"Fetch a single daily digest by id"};let aY=(0,eT.Ay)("Mark daily digest as read",async(e,a,{dailyDigest:t,markAllChannelDigests:n})=>{let r=(0,en.lT)(a()),l=(0,en.xI)(a());if(!r&&(0,m.A)(l)&&(t&&!t.completed||n)){e((0,eD.Dr)({dailyDigestId:t.id,isRead:!0}));try{(await e(aU({reason:"mark-digest-complete",digestId:t.id,markAllChannelDigests:n}))).ok||(0,aO.A)({label:"daily-digest"}).error(Error("failed to mark daily digest as complete"))}catch{(0,aO.A)({label:"daily-digest"}).error(Error("error marking daily digest complete"))}}});aY.meta={name:"markDailyDigestRead",key:"createThunkMarkDailyDigestRead",description:"Mark daily digest as read"};let az=(0,eT.Ay)("Mark channel digest as read. Also marks daily digest if all channel digests are read",async(e,a,{dailyDigest:t,channelDigestId:n})=>{let r=t.channelDigests?.find(e=>e.id===n);if(r&&!r.completed){e((0,eD.Je)({dailyDigestId:t.id,channelDigestReadStates:{[n]:!0},channelDigestInteractedStates:{[n]:!0}}));let r=(0,en.Pq)(a());if(r?.id!==t.id)return;r&&!r.completed&&r.channelDigests?.every(e=>e.completed)&&e(aY({dailyDigest:r}));try{(await e(aU({reason:"mark-digest-complete",channelDigestId:n}))).ok||(0,aO.A)({label:"daily-digest"}).error(Error("failed to mark channel digest as complete"))}catch{(0,aO.A)({label:"daily-digest"}).error(Error("error marking channel digest complete"))}}});az.meta={name:"markChannelDigestRead",key:"createThunkMarkChannelDigestRead",description:"Mark channel digest as read. Also marks daily digest if all channel digests are read"};let aV=(0,eT.Ay)("Mark digest as unread",async(e,a,{dailyDigest:t})=>{let n={};t?.channelDigests?.forEach(e=>{n[e.id]=!1}),e((0,eD.Je)({dailyDigestId:t.id,channelDigestReadStates:n})),e((0,eD.Dr)({dailyDigestId:t.id,isRead:!1}));try{if(!(await e(aH({reason:"mark-digest-unread",digestId:t.id}))).ok)throw Error("error")}catch{(0,aO.A)({label:"daily-digest"}).error(Error("error marking digest unread")),e(aG({id:t.id}))}});aV.meta={name:"markDigestUnread",key:"createThunkMarkDigestUnread",description:"Mark digest as unread"};let aq=(0,eT.Ay)("Mark channel digest as unread",async(e,a,{dailyDigest:t,channelDigestId:n})=>{let r=t.channelDigests?.find(e=>e.id===n);if(r&&r.completed){e((0,eD.Je)({dailyDigestId:t.id,channelDigestReadStates:{[n]:!1}})),t.completed&&e((0,eD.Dr)({dailyDigestId:t.id,isRead:!1}));try{if(!(await e(aH({reason:"mark-channel-digest-unread",channelDigestId:n}))).ok)throw Error("error")}catch{(0,aO.A)({label:"daily-digest"}).error(Error("error marking channel digest unread")),e(aG({id:t.id}))}}});aq.meta={name:"markChannelDigestUnread",key:"createThunkMarkChannelDigestUnread",description:"Mark channel digest as unread"};var a$=t(0xc938b90e),aW=t(0x1380694ee),aK=t(0xafce781a),aj=t(0x19895585a),aX=((n=aX||{}).GENERATING_INITIAL_DIGEST="GENERATING_INITIAL_DIGEST",n.LOADING="LOADING",n.EMPTY="EMPTY",n.PAUSED="PAUSED",n.CONTENT="CONTENT",n),aZ=((r=aZ||{})[r.Header=0]="Header",r[r.OnboardingBanner=1]="OnboardingBanner",r[r.ChannelDigest=2]="ChannelDigest",r[r.Footer=3]="Footer",r[r.LoadingState=4]="LoadingState",r[r.NuxBanner=5]="NuxBanner",r);let Recap=({navigatedFromNuxCoachmark:e})=>{let a=(0,s.wA)(),t=(0,x.d4)(eo.hS),n=(0,x.d4)(eo.YX),r=(0,x.d4)(e=>(0,Z.W2)(e)?.id),[i,v]=(0,l.useState)(!0),[T,L]=(0,l.useState)({}),[O,B]=(0,l.useState)(!1),[U,H]=(0,l.useState)(!1),[F,G]=(0,l.useState)(!1),[Y,z]=(0,l.useState)(void 0),V=(0,x.d4)(e=>(0,ec.ty)(e,M.S2))||eV.q.LIKE_YOUR_SIDEBAR,{isOpen:q}=(0,w.A)(S.ze.SLACK_AI_RECAP_MUTING_NUX_BANNER,S.xu.SLACK_AI_RECAP_HEADER);(0,p.A)(()=>{(async()=>{try{await a((0,ef.b)({interactions:[{component:eg.G7.SlackAiRecapMutingNuxBanner,type:eg.X8.Dismiss},{component:eg.G7.SlackAiRecap,type:eg.X8.Click}],reason:"slackAiRecapMutingNuxBanner"})),await a((0,aK.iR)({event:{type:S.jo.REQUEST_SPACES,spaces:[S.xu.SLACK_AI_RECAP_HEADER]}}))}catch(e){(0,E.getGenericLogger)().error(Error(`Failed to load megaphone: ${e}`))}finally{v(!1)}})()}),(0,p.A)(()=>{n&&a((0,ew.$)())}),(0,l.useEffect)(()=>{!t&&r&&a((0,j.o)({...(0,X.pr)(r),options:{dangerouslyIgnoreTargetContainerLogic:!0}}))},[a,t,r]);let{recommendedChannelIds:$,fetchRecommendedChannels:W}=(0,ap.U)(),K=(0,x.d4)(en.HH),J=(0,x.d4)(en.Dc),Q=(0,x.d4)(en.lT),ee=(0,x.d4)(en.Qk),ea=(0,x.d4)(en.Pq),er=(0,x.d4)(en._D),el=(0,x.d4)(en.ip),es=(0,x.d4)(en.Fo),ei=(0,x.d4)(en.tP),ed=(0,x.d4)(en.vh),[em,eu]=(0,l.useState)([]),ep=(0,x.Z2)(aW.VH),e_=(0,R.k)(),eh=(0,k.Q)({getChannelSectionPref:e_,orderedChannelSections:ep}),eE=(0,x.d4)(en.xI),[ey,eA]=(0,l.useState)({}),{sidebarSectionsOrdered:eN}=eh,eC=(0,l.useRef)({orderedChannelIds:[]}),eb=(0,l.useMemo)(()=>{let e=eN.flatMap(e=>e.channelsOrdered);if(V!==eV.q.LIKE_YOUR_SIDEBAR)return e.reduce((e,a,t)=>(e[a]=t,e),{});eC.current.digestId!==ea?.id&&(eC.current={digestId:ea?.id,orderedChannelIds:[...e]});let a=eC.current.orderedChannelIds,t=e.filter(e=>!a.includes(e));return[...a,...t].reduce((e,a,t)=>(e[a]=t,e),{})},[eN,V,ea?.id]);(0,l.useEffect)(()=>{let e=Array.from(new Set([...eE,...0===eE.length&&Q?ed?.map(e=>e.channel_id)??[]:[]]));eu(a=>Q&&a.length&&0===e.length?a:e.length?e:[])},[Q,eE,ed]);let[ex,ek]=(0,l.useState)(null);(0,l.useEffect)(()=>()=>{(Q||eE.length>0)&&a(ez())},[a,Q,eE]),(0,l.useEffect)(()=>{ek(e=>{if(null===e)return el;let a=!1,t={...e};return Object.keys(er).forEach(e=>{void 0===t[e]&&(t[e]=el?.[e],a=!0)}),a?t:e})},[er,el]);let eI=(0,l.useMemo)(()=>{let e;if(!ea||ee)return;let a=ea.channelDigests||g.Ml;if(n&&(e=ea.channelDigests||g.Ml,a=Object.values((0,o.A)(e,"channelId")).map(e=>(0,d.A)(e,"fireAt"))),ea.isPreview||K)return a;if(n){let e=(Q?Object.keys(er).filter(e=>em.includes(e)&&!a.some(a=>a.channelId===e)):[]).map(e=>({id:`placeholder-${e}`,channelSummaryId:`placeholder-channel-summary-${e}`,fireAt:0,channelId:e,startTimestamp:0,endTimestamp:0,completed:!1,priorityScore:0})),t=[...a,...e];return(Y||z(a.filter(e=>e.completed).map(e=>e.id)),V===eV.q.NEWEST)?t.filter(e=>er[e.channelId]).sort((e,a)=>{let t=Y?.includes(e.id)??!1,n=Y?.includes(a.id)??!1;if(!t&&n)return -1;if(t&&!n)return 1;let r=ex?.[e.channelId],l=ex?.[a.channelId];return r&&!l?-1:!r&&l?1:r&&l&&r!==l?parseFloat(l)-parseFloat(r):e.priorityScore+a.priorityScore}):[...t].sort((e,a)=>eb[e.channelId]-eb[a.channelId]).filter(e=>er[e.channelId])}return a.filter(e=>er[e.channelId])},[ea,ee,K,n,Q,er,ex,em,Y,V,eb]);(0,l.useEffect)(()=>{if(!eI||!n)return;let e={};(eI.forEach(({channelId:a,fireAt:t})=>{e[a]=t}),0===Object.keys(ey).length)?eA(e):(eE.filter(a=>void 0!==ey[a]&&ey[a]<e[a]).forEach(e=>a((0,eD._4)(e))),(Object.keys(e).some(a=>e[a]!==ey[a])||Object.keys(ey).some(a=>void 0===e[a]))&&eA(e))},[eI,eE,ey,a,n]),(0,l.useEffect)(()=>{if(!eI||!n||!eE.length)return;let e=eI.filter(e=>eE.includes(e.channelId)).map(e=>e.id);e.length>0&&z(a=>a?a.filter(a=>!e.includes(a)):a)},[eI,eE,n]);let eS=eI?eI.length:0,eT=(0,x.d4)(eR.m),eM=(0,l.useMemo)(()=>!er||Object.keys(er).every(e=>!eT?.[e]),[er,eT]),eP=(0,l.useMemo)(()=>ea&&eI?eI.map(e=>e.id):g.Ml,[eI,ea]),eL="footer-row",eO=(0,x.d4)(en.fc),[eB,eU]=(0,l.useState)(eO),eH=(0,x.d4)(e=>!(0,ec.ty)(e,"a11y_animations")),eF=(0,x.d4)(e=>(0,ec.ty)(e,"first_seen_preview_recap_ts"));(0,p.A)(()=>{a((0,e4.AZ)({pref:"first_seen_preview_recap_ts",value:ea?.fireAt}))},!eF&&ea?.isPreview);let eY=!eF||ea?.fireAt===eF;(0,p.A)(()=>{W()},ea?.isPreview&&!eY);let eq=(0,l.useCallback)((e,t)=>{ea&&(L({...T,...e.reduce((e,a)=>(e[a]=!t,e),{})}),e.forEach(e=>{t?a(az({dailyDigest:ea,channelDigestId:e})):a(aq({dailyDigest:ea,channelDigestId:e}))}))},[ea,a,T]),e$=[...eP],eW=(0,l.useCallback)(()=>{if(!ea)return;let e={};ea?.channelDigests?.forEach(a=>{e[a.id]=!0}),L(e),a(aV({dailyDigest:ea})),B(!0),z([])},[ea,a]),eK=(0,l.useCallback)(()=>{ea&&(L({}),a(aY({dailyDigest:ea,markAllChannelDigests:!0})))},[ea,a]);e$.push(eL);let ej=(0,l.useRef)(),eX=(0,l.useCallback)(e=>{ej.current=e},[]),eZ=eP.length<=3?250:125,{isLastRowSeen:eJ,isScrolledToBottom:eQ,setListContainerRef:e0,getRowContainerRefSetter:e1,onScrollList:e2,rowSeen:e5,scrollToTop:e6,trackedDigestId:e3,scrollContainerHeight:e8,rowScrollDataRef:e9,isScrolledToTop:e7,hasSufficientScroll:ae,firstVisibleRow:aa,didReachMarkAsReadBoundary:at}=useScrollTracking({listRef:ej,rowIds:e$,suppressAnimation:eH,digestId:ea?.id,bottomReadBoundary:eZ,didNavigateToFirstUnread:F}),an=(0,l.useMemo)(()=>{if(!ea||!eI)return;let e=eI.findIndex(e=>e.id===aa);return -1!==e?eI.slice(0,e):[]},[eI,ea,aa]),ar=(0,N.J)(),as=(()=>{let{getViewSet:e}=(0,l.useContext)(b.A),a=(0,x.d4)(e);return a?.primary?.viewType===C.D.DailyDigest})(),ai=(0,_.A)(as);(0,l.useEffect)(()=>{let e=(0,aw.en)().getState(),a=e?.mainWindowHistory[aj.N2]?.previousIndex===null;if(!ea||!ea.channelDigests||ai&&!a||!ej||F)return;let t=eI?.find(e=>!e.completed);n&&V===eV.q.NEWEST?setTimeout(()=>{e6({forceSupressAnimations:!0}),G(!0)},50):t?setTimeout(()=>{q||ej.current?.scrollToKey(t.id,{animate:!1,offset:-300}),G(!0)},100):G(!0)},[ea,as,ai,ej,F,q,e6,n,V,eI]);let ac=(0,l.useMemo)(()=>{if(an)return[...an].reverse().find(e=>!e.completed)||null},[an]),ao=(0,l.useMemo)(()=>an?an.filter(e=>!e.completed).length:0,[an]),ad=(0,l.useCallback)(()=>{ea&&ea.channelDigests&&ac&&ej?.current?.scrollToKey(ac.id,{animate:!0,offset:-50})},[ac,ea]);(0,l.useEffect)(()=>{eO||eU(eO)},[e3,eO]);let am=(0,x.d4)(en.uq),au=(0,x.d4)(en.Tz),a_=(0,x.d4)(en.Bt),ah=(0,l.useMemo)(()=>ea?{mainEmoji:(0,al.Gx)(ea),allEmojis:(0,al.wU)(ea)}:null,[ea]);(0,p.A)(()=>{a_&&a((0,eD.Zn)(!1))},a_),(0,p.A)(()=>{ea&&!ea.isPreview&&a((0,a$.V)({component:eg.G7.SlackAiRecap}))},!!ea),(0,l.useEffect)(()=>{ea&&at&&!U&&ae&&(H(!0),a(aY({dailyDigest:ea,markAllChannelDigests:!0})))},[U,ea,at,a,ae]),(0,l.useEffect)(()=>{!am&&ea&&!ea.completed&&eJ&&e3===ea.id&&F&&0===Object.keys(T).length&&a(aY({dailyDigest:ea}))},[a,ea,am,eJ,e3,F,T]),(0,l.useEffect)(()=>{if(!am&&ea&&ea.channelDigests&&e5&&e5!==eL&&F){let e=ea.channelDigests.find(e=>e.id===e5),t=em.includes(e5);!e||e.completed||T[e.id]||t||a(az({dailyDigest:ea,channelDigestId:e5}))}},[T,a,ea,am,e5,F,em]);let ag=(0,l.useMemo)(()=>(({isWaitingForInitialDigest:e,isWaitingForRecapRefresh:a,isDailyDigestLoading:t,areDigestedChannelsLoading:n,channelDigests:r,isRecapStaleOrEmpty:l,hidePreviewRecap:s,isRecapPausedForInactivity:i,digestedChannels:c})=>{let o=Object.values(c??{}).some(e=>e);if(i&&o)return"PAUSED";if(e)return"GENERATING_INITIAL_DIGEST";let d=t||n,m=(!r||0===r.length||l||s)&&!d;return void 0!==r||!d||i||m||a?m&&!e?"EMPTY":"CONTENT":"LOADING"})({isWaitingForInitialDigest:J,isWaitingForRecapRefresh:Q,isDailyDigestLoading:am,areDigestedChannelsLoading:ee,channelDigests:eI,isRecapStaleOrEmpty:ei,hidePreviewRecap:au,isRecapPausedForInactivity:es,digestedChannels:er}),[J,Q,am,ee,eI,ei,au,es,er]),af=(0,_.A)(ag);(0,l.useEffect)(()=>{let e=ed?.length||0;if(n&&"EMPTY"===ag&&!J&&!Q&&e>0){let e=ed.map(e=>e.channel_id);a((0,eD.Nb)(!0)),a((0,ev._)({newContentRefresh:n,reason:"recap-empty-state",streamingChannelIds:e}))}},[ag,ed,ea,n,J,Q,a]),(0,l.useEffect)(()=>{"CONTENT"===af||F||G(!0)},[af,ag,F]);let ay=(0,l.useMemo)(()=>{let e=(!eI||eI?.length===0||ei||au)&&!(am||ee);if(!ea?.id&&!e)return[];if("GENERATING_INITIAL_DIGEST"===ag)return[{type:1,id:"recap-onboarding-banner-row",channelDigest:null,channelDigests:null,containerRefSetter:null},{type:0,id:"header-row",channelDigest:null,channelDigests:null,containerRefSetter:null},{type:4,id:"loading-state-row",channelDigest:null,channelDigests:null,containerRefSetter:null}];if(!eI)return[];let a=[];return a.push({type:1,id:"recap-onboarding-banner-row",channelDigest:null,channelDigests:null,containerRefSetter:null}),n&&!ea?.isPreview&&q&&eM&&a.push({type:5,id:"nux-banner",channelDigest:null,channelDigests:null,containerRefSetter:null}),ea?.isPreview||a.push({type:0,id:"header-row",channelDigest:null,channelDigests:null}),a.push(...eI.map(e=>({type:2,id:e.id,channelDigest:e,channelDigests:null,containerRefSetter:e1({rowId:e.id,isLast:!1})}))),a.push({type:3,id:eL,channelDigest:null,channelDigests:null,containerRefSetter:e1({rowId:eL,isLast:!0})}),a},[eM,eI,ei,au,am,ee,ea?.id,ea?.isPreview,ag,n,q,e1]),aA=(0,l.useCallback)(a=>{let t=ay[a];return ea&&0===t.type?l.createElement(aS,{dailyDigest:ea,numVisibleRecapCards:eS,unreadChannels:ed,sidebarChannelOrderMap:eb,isRecapMutingNuxBannerOpen:q,isMegaphoneSpaceLoading:i}):1===t.type?l.createElement(RecapOnboardingBanner,{navigatedFromNuxCoachmark:e,isFirstPreviewRecap:eY,dailyDigest:ea,digestedChannelIds:$,showLoadingStateVariant:"LOADING"===ag||"GENERATING_INITIAL_DIGEST"===ag}):5===t.type?l.createElement(I.A,D):ea&&2===t.type&&t.channelDigest?l.createElement(eG,{dailyDigestId:ea.id,channelDigest:t.channelDigest,isPreviouslyRead:n&&Y?.includes(t.channelDigest.id),containerRefSetter:t.containerRefSetter,onClickChangeReadState:eq,showMarkReadButton:T[t.channelDigest.id],isPreview:ea?.isPreview,className:a===ay.length-2?"is-last":"",isLoadingInNewContent:em.includes(t.channelDigest.channelId),hasNewContent:ed.some(e=>e.channel_id===t.channelDigest.channelId),unreadChannels:ed}):ea&&3===t.type&&t.containerRefSetter?l.createElement(aN,{dailyDigest:ea,containerRefSetter:t.containerRefSetter,emojiToDisplay:eH&&ah?ah.mainEmoji:null,scrollToTop:e6,scrollContainerHeight:e8,onClickSetDigestUnread:eW,onClickSetDigestRead:eK,hasSufficientScroll:ae,numVisibleRecapCards:eS}):4===t.type?l.createElement(DigestLoadingState,null):null},[ay,ea,eS,ed,e,eY,$,ag,q,n,Y,eq,T,em,eH,ah,e6,e8,eW,eK,ae,eb,i]),aC=(0,l.useCallback)(e=>{let a=aA(e);return ar?l.createElement("div",{className:"p-daily_digest__list_item_container"},l.createElement("div",{className:"p-daily_digest__list_item"},a)):a},[aA,ar]);(0,l.useEffect)(()=>{q&&setTimeout(()=>{e6({forceSupressAnimations:!0})},50)},[q,e6]);let ab=(0,l.useMemo)(()=>{let e=ae??!1;return!!ea&&!ar&&"CONTENT"===ag&&e},[ea,ar,ag,ae]),ax=(0,l.useMemo)(()=>!O&&ao>0&&!!ea,[O,ao,ea]),aR=(0,l.useMemo)(()=>{let e=ea?.channelDigests?.every(e=>e.completed);return ea&&!am&&!J&&!Q&&!eH&&!eB&&e3===ea.id&&!(0,m.A)(ea.channelDigests)&&e},[ea,am,J,Q,eH,eB,e3]),ak=(0,l.useMemo)(()=>"GENERATING_INITIAL_DIGEST"!==ag&&"CONTENT"!==ag?null:l.createElement("div",{className:c()("p-daily_digest",{"p-daily_digest--activity_inbox":ar}),ref:e0},!ar&&l.createElement(RecapBackground,{listRef:ej}),!ar&&l.createElement(RecapPageHeader,{className:ab||e7?void 0:"p-recap_page_header--border",sortPreference:V,shouldShowSortPreference:n,unreadChannels:ed,recapFireAt:ea?.fireAt}),ab&&eI&&l.createElement(RecapProgressBar,{channelDigests:eI,rowScrollDataRef:e9,bottomReadBoundary:eZ,listRef:ej,className:e7?void 0:"p-recap_progress_bar-visible"}),ax&&l.createElement(RecapPill,{onClick:ad,unreadCount:ao}),l.createElement("div",{className:"full_height p-daily_digest__list"},l.createElement(u.A,null,({width:e,height:a})=>l.createElement(y.A,{ref:eX,className:c()({"p-channel_digest_container--single_column":e<570}),key:`${ea?.id}${a_}${q}${ag}`,width:e,height:a,keys:ay.map(e=>e.id),rowRenderer:aC,autoScrollmarkTrackingId:A.S.DAILY_DIGEST,animateOnScroll:!1,onScroll:e2}))),ea&&aR&&l.createElement(aE,{dailyDigest:ea,isScrollEnd:eQ,celebrationEmojis:ah})),[ag,ar,e0,ab,e7,V,n,ed,eI,e9,eZ,ax,ad,ao,ea,aR,eQ,ah,eX,a_,q,ay,aC,e2]);return t?l.createElement(h.A,{clogImpression:!0,eventId:et.EventId.NATIVE_AI,uiPage:et.UiPage.SLACK_AI_RECAP,elementName:ea?.isPreview?P.H.DIGEST_PREVIEW:P.H.DIGEST_VIEW,slackAiDailyDigestId:ea?.id},(()=>{switch(ag){case"LOADING":return l.createElement("div",{className:"p-daily_digest_empty_state"},l.createElement(f.A,{size:"jumbo",assertive:!1}));case"EMPTY":return l.createElement(DailyDigestEmptyState,null);case"PAUSED":return l.createElement(DailyDigestPausedState,null);case"GENERATING_INITIAL_DIGEST":case"CONTENT":return ak;default:return null}})()):null};Recap.displayName="Recap";let aJ=l.memo(Recap);var aQ=t(0x182c9b0b0);let RecapView=({view:e})=>l.createElement(aJ,{navigatedFromNuxCoachmark:e?.params?.navigatedFromNuxCoachmark});RecapView.displayName="RecapView";let a0=l.memo((0,aQ.A)(RecapView))},0x21d6cb466:e=>{e.exports={recapHeaderRowTitle:"recapHeaderRowTitle__lB9yU"}},0x1bc518ac8:e=>{e.exports={descriptionText:"descriptionText__ytX7H",button:"button__FhZDW",titleText:"titleText__qslwM",buttonText:"buttonText___2a7h",heroBannerWrapper:"heroBannerWrapper__c_FEj"}},0x14d967a4a:e=>{e.exports={muteEducationBanner:"muteEducationBanner__1YUn5"}},0x1de6c65e6:e=>{e.exports={root:"root__mRcTJ"}},0x3cfe8351:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>N});var n=t(0xbad225b5),r=t(0x16cf1da63),l=t(0x40c0d834),s=t(0x20482ad21),i=t(0x11a296110),c=t(0x19709d5e1),o=t(0x1550c1995);let d=t.p+"recap-mute-edcuation-banner-image-dark-mode-62b31f7.png",m=t.p+"recap-mute-edcuation-banner-image-ab92d35.png";var u=t(0x24357b9d4),p=t(0x3711e82d),_=t(0x226892387),h=t(0x1fb2d2a87),g=t(0x20061cab9),E=t(0x5b1935a6),f=t(0x14d967a4a),y=t.n(f);let A=new s.Ay("assistant"),RecapMuteEducationBanner=()=>{let e=(0,r.wA)(),a=(0,_.d4)(e=>"dark"===(0,h.to)(e)),t=(0,n.useCallback)(()=>{e((0,g.Ay)({spaceName:E.xu.SLACK_AI_RECAP_HEADER,action:E.hw.DISMISS}))},[e]),s=(0,n.useCallback)(()=>{e((0,o.N)({onSaveChanges:t,onCloseModal:t,isOpenedFromMutingEducationBanner:!0,forceOnboardingMode:!0}))},[t,e]);(0,u.A)(E.ze.SLACK_AI_RECAP_MUTING_NUX_BANNER);let f=n.createElement(n.Fragment,null,n.createElement("p",{style:{width:"80%"}},A.t("With recap keeping you in the loop, you can stay focused and get to them later, without fear of missing out.")),n.createElement(i.Ay,{type:"primary","data-qa":"daily-digest-choose-channels-button",onClick:s},A.t("Choose Channels to Mute")));return n.createElement(l.A,{uiComponentName:p.UiComponentName.SLACK_AI_RECAP_MUTING_NUX_BANNER,clogImpression:!0},n.createElement(c.H,{showBanner:!0,title:A.t("Mute recap channels for a quieter sidebar"),content:f,primaryImgSrc:a?d:m,onCloseBanner:t,wrapperClassName:y().muteEducationBanner}))};RecapMuteEducationBanner.displayName="RecapMuteEducationBanner";let N=RecapMuteEducationBanner},0x8aa90051:(e,a,t)=>{"use strict";t.r(a),t.d(a,{BaseRecapRealTimeNuxBanner:()=>BaseRecapRealTimeNuxBanner,default:()=>S});var n=t(0xbad225b5),r=t(0x16cf1da63),l=t(0x40c0d834),s=t(0x20482ad21),i=t(0x11a296110),c=t(0x2501a2cee),o=t(0x4c96e5d9),d=t(0x19709d5e1),m=t(0xf51a7b0e),u=t(0x1b3ecb90f),p=t(0x201f2115b),_=t(0x1ae0f3789),h=t(0x3711e82d),g=t(0x1ccef1c6f),E=t(0x226892387),f=t(0x1e3eb45fd),y=t(0x365a4cc3),A=t(0x13674a330),N=t(0x1472af90a),C=t(0x18632f75a),b=t(0x1bc518ac8),x=t.n(b);let R=new s.Ay("assistant"),k=N.G7.SlackAiRealTimeRecapNuxBanner,I={eventId:h.EventId.NATIVE_AI,onClick:{enableClogAction:!0},elementName:h.UiComponentName.SLACK_AI_REAL_TIME_RECAP_NUX_BANNER_REFRESH_BUTTON},BaseRecapRealTimeNuxBanner=({dismissNotification:e,onClickRefreshRecap:a,channelCount:t,recapChannelCount:r,refreshButtonTooltip:s})=>{let p=(0,n.useMemo)(()=>n.createElement("div",{className:"position_relative"},n.createElement("div",{className:"margin_bottom_100"},R.t("Anytime your recap channels have new messages, refresh to get the latest.")),n.createElement("div",{className:x().descriptionText},R.t("{recapChannelCount, plural, =1 {# recap channel} other {# recap channels}} have summaries ready to roll.  Refresh to see the latest from {channelCount} more.",{recapChannelCount:r,channelCount:t})),n.createElement("div",null,n.createElement(o.Ay,{tip:s,position:"top"},n.createElement(i.Ay,{type:"primary","data-qa":"recap-refresh-channels-button",onClick:a,autoClogProps:I,className:x().button},n.createElement("span",{className:x().buttonText},n.createElement(c.Ah,{name:"ai-sparkle",inline:!0}),R.t("Refresh {channelCount, plural, =1 {# Channel} other {# Channels}}",{channelCount:t})))))),[t,a,r,s]),_=(0,n.useMemo)(()=>n.createElement("span",{className:x().titleText},R.t("Your daily recap has a fresh update"),n.createElement(u.Ay,{text:"tangerine",emojiSize:u.lw.LARGE})),[]);return n.createElement(l.A,{uiComponentName:h.UiComponentName.SLACK_AI_REAL_TIME_RECAP_NUX_BANNER,clogImpression:!0},n.createElement(d.H,{showBanner:!0,title:_,primaryImgSrc:"",content:p,onCloseBanner:e,backgroundColor:"lagoon",variation:m.C.column,canBeClosed:!1,wrapperClassName:x().heroBannerWrapper}))};BaseRecapRealTimeNuxBanner.displayName="BaseRecapRealTimeNuxBanner";let RecapRealTimeNuxBanner=()=>{let e=(0,r.wA)(),a=(0,E.d4)(f.YX),t=(0,E.d4)(y.qQ),l=(0,n.useMemo)(()=>{let e=t.slice(0,5).join(", "),a=t.length-5;return t.length>5?R.t("New messages in {channelList} and {numberOfOtherChannels, plural, =1 {# more channel} other {# more channels}}",{channelList:e,numberOfOtherChannels:a}):R.t("New messages in {channelList}",{channelList:e})},[t]),s=(0,n.useCallback)(()=>{e((0,C.z)({component:k,type:N.X8.Click,reason:"slackAiRealTimeRecapNuxBanner"}))},[e]),i=(0,E.d4)(y.vh),c=(0,E.d4)(y.Pq),o=(0,n.useMemo)(()=>c?.channelDigests?.length||0,[c]),d=(0,E.d4)(e=>(0,g.ty)(e,p.S2))||_.q.LIKE_YOUR_SIDEBAR,m=(0,n.useMemo)(()=>i?.map(e=>e.channel_id)??[],[i]),u=(0,n.useMemo)(()=>m?.length,[m]),h=(0,E.d4)(e=>(0,y.Av)(e,m,d)),b=(0,n.useCallback)(()=>{i&&c&&(e((0,A.P)({channelIds:m,digestId:c.id,streamingChannelId:h})),s())},[i,c,e,m,h,s]);return a&&u?n.createElement(BaseRecapRealTimeNuxBanner,{dismissNotification:s,onClickRefreshRecap:b,channelCount:u,recapChannelCount:o,refreshButtonTooltip:l}):null};RecapRealTimeNuxBanner.displayName="RecapRealTimeNuxBanner";let S=RecapRealTimeNuxBanner},0xe23e8bad:(e,a,t)=>{"use strict";t.d(a,{Gx:()=>getEmojiForDigest,Qw:()=>i,sV:()=>getTitleForEmoji,wU:()=>getPossibleEmojisForDigest});var n=t(0x6affae29),r=t(0x20482ad21),l=t(0x10d264244);let s=new r.Ay("assistant"),i=["tea","dolphin","coffee","train2","rolled_up_newspaper","fire","wave","zap","cookie","rainbow","trophy","love_letter"],c=["sunny","handshake","thumbsup","raised_hands","star"];function getTitleForEmoji(e){switch(e){case"tea":return s.t("Cozy up");case"dolphin":return s.t("Let\u2019s dive in");case"coffee":return s.t("Goes best with a beverage");case"train2":return s.t("All aboard the recap express");case"rolled_up_newspaper":return s.t("Extra, extra!");case"fire":return s.t("Hot off the presses");case"wave":return s.t("Pleasant perusing");case"zap":return s.t("Your speed read awaits");case"cookie":return s.t("Enjoy with a snack");case"rainbow":return s.t("It\u2019s a beautiful day for skimming");case"trophy":return s.t("Look at you go");case"love_letter":return s.t("Delivered with love");case"sunny":return s.t("Welcome back \u2014 let\u2019s ease in");case"handshake":return s.t("Welcome back \u2014 recap has you covered");case"thumbsup":return s.t("You missed some days, but not a beat");case"raised_hands":return s.t("Welcome back \u2014 you\u2019ve got this");case"star":return s.t("You\u2019re back \u2014 it\u2019s recap\u2019s time to shine");default:(0,n.Kh)(e)}}function doesRecapSpanOver3Days(e){let a=(0,l.$4)(e.startTimestamp,{returnMoment:!0});return(0,l.$4)(e.endTimestamp-1,{returnMoment:!0}).diff(a,"days")>=3}function getEmojiForDigest(e){let a=e.id.split("").reduce((e,a)=>e+a.charCodeAt(0),0);return doesRecapSpanOver3Days(e)?c[a%c.length]:i[a%i.length]}function getPossibleEmojisForDigest(e){return doesRecapSpanOver3Days(e)?[...c,...i]:[...i]}},0x1ce4b4f7c:(e,a,t)=>{"use strict";t.d(a,{A:()=>F});var n=t(0xbad225b5),r=t(0x16cf1da63),l=t(0x120c268ad),s=t.n(l),i=t(0x20482ad21),c=t(0x1faa3f1ac),o=t(0x1c659cbb1),d=t(0x6cc5eee0),m=t(0x113cdbbd7),u=t(0xa67b3699),p=t(0x78704cb5),_=t(0x5eedb646),h=t(0x1cefa8f4c),g=t(0x344bb842),E=t(0x2501a2cee),f=t(0x4c96e5d9),y=t(0x1ccef1c6f),A=t(0x226892387),N=t(0x14149c126);let C=new i.Ay("assistant"),b={opacity:0},x={opacity:1},R={duration:.1};function AiSummaryDetailsSectionButton({hasContent:e,toggleExpandableView:a,isStreaming:t,isExpanded:r,hasFinishedHeadersReveal:l,autoClogProps:s,isInline:i,topicTitle:c}){let o=(0,A.d4)(e=>"on"===(0,N._Z)(e,"slack_ai_a11y_fixes")),d=(0,A.d4)(e=>!(0,y.ty)(e,"a11y_animations")),m=r?C.t("Less detail"):C.t("More detail");if(!e&&!t)return null;if(t&&!l)return n.createElement("div",{className:"p-ai_summary_detail_section__button p-ai_summary_detail_section__button--invisible"},n.createElement("div",null));let u=!d&&t;return n.createElement(f.Ay,{"aria-label":m,tip:m},n.createElement(h.P.div,{className:i?"p-ai_summary_detail_section__button_container--inline":"",initial:u?b:void 0,animate:u?x:void 0,transition:u?R:void 0},n.createElement(g.A,{onClick:a,"aria-label":m,"aria-expanded":r,className:"p-ai_summary_detail_section__button",autoClogProps:s,"aria-describedby":o?c:void 0},n.createElement(E.Ah,{name:r?"caret-up":"caret-down",inline:!0,size:"20"}))))}AiSummaryDetailsSectionButton.displayName="AiSummaryDetailsSectionButton";var k=t(0xc96baf58),I=t(0x1c403364b),S=t(0x3796a18c),v=t(0x1b481369f),T=t(0x1d9627ee3),D=t(0x14ea3ce99);function AiSummaryFile({fileId:e}){let a=(0,r.wA)(),t=(0,A.d4)(a=>(0,D.Lp)(a,e)),l=(0,n.useCallback)(()=>{a((0,T.A)({fileId:e}))},[a,e]);return t?n.createElement(v.A,{className:"p-ai_summary_detail_section__file_list_item",file:t,onClick:l,key:t.id},n.createElement(I.A,{file:t,id:t.id,detailType:S.s.OWNER_TIMESTAMP,allowLiveTitle:!1,hasHighlightMarkers:!0})):null}AiSummaryFile.displayName="AiSummaryFile";var w=t(0x238b287cf),M=t(0x3711e82d),P=t(0x1400f598e),L=t(0x365a4cc3),O=t(0x1ff1aef05),B=t(0x1f48e3aa4);let U=new i.Ay("assistant"),H={size:o.RG.verySmall,isInteractive:!1},AiSummaryDetailsSection=({topic:e,topicIndex:a,aiSummaryId:t,aiSummaryStatus:l,channelDigestId:i,dailyDigestId:o,channelId:h,summaryClogData:g,displayExpandButtonInline:E=!1,hideMoreDetailsLabel:f=!1,showMoreDetailsDecoration:N=!1,showTopicAsCitationLink:C,onExpandCollapse:b,isStreaming:x,hasFinishedHeadersReveal:R,alwaysExpanded:I=!1,displayContentOnly:S=!1,onStreamingAnimationEnd:v,enableStreamingAnimation:T=!1,shouldStartStreamingAnimating:D=!1,totalTopicsCount:F=0,isMultiChannelUnreads:G=!1,isTopicOnly:Y=!1})=>{let z,V=(0,A.d4)(e=>!(0,y.ty)(e,"a11y_animations")),q=(0,r.wA)(),$=(0,w.A)(),W=e.blocks?.some(e=>e.elements?.some(e=>e.elements?.length>0)),K=(0,n.useMemo)(()=>q((0,O.a)({topic:e})),[q,e]),[j,X]=(0,n.useState)(e.isExpanded||I||!1),[Z,J]=(0,n.useState)(!1),[Q,ee]=(0,n.useState)(!1),ea=(0,n.useCallback)(()=>{J(!0)},[]),et=(0,n.useCallback)(()=>{v&&v(),ee(!0)},[v]);(0,n.useEffect)(()=>{T&&D&&Z&&v&&!e.subheading&&(F>a+1||l===B.nM.Complete)&&v()},[T,Z,D,e.subheading,a,F,v,l]);let en=(0,n.useCallback)(()=>{X(!j),q((0,P.a9)({aiSummaryId:t,channelDigestId:i,dailyDigestId:o,topicIndex:a,isExpanded:!j})),b?.(!j)},[j,q,t,i,o,a,b]),er=(0,A.Z2)(e=>(0,L.JU)(e,{channelId:h})),el=(0,n.useCallback)(e=>{$.track(M.EventId.NATIVE_AI,{contexts:{ui_context:{action:M.UiAction.CLICK,ui_properties:{element_type:p.Q[e.link_type||"internal"],element_value:e?.appId}}},...g})},[$,g]),es=(0,n.useMemo)(()=>({eventId:M.EventId.NATIVE_AI,onClick:{enableClogAction:!0},elementName:_.H.SUMMARY_DETAIL_VIEW_CONTENT_SECTION,elementValue:a.toString(),action:j?M.UiAction.COLLAPSE:M.UiAction.EXPAND,...g,...er}),[er,g,a,j]);N&&(z=e.users?.[0]?.[0]==="<"?e.users.map(e=>e.substring(2,e.length-1)):e.users);let ei=(0,n.useMemo)(()=>T&&D&&F>a+2,[T,D,F,a]),ec=T&&x&&Q||R;return n.createElement("div",{className:s()("p-ai_summary_detail_section",{"p-ai_summary_detail_section--no-animation":V,"p-ai_summary_detail_section--no-bottom-margin":Y}),"data-qa":"summary_detail_section"},S?null:n.createElement("div",{className:"p-ai_summary_detail_section__header_section"},n.createElement("div",{className:"p-ai_summary_detail_section__header"},n.createElement("div",{className:"p-ai_summary_detail_section__header_content"},C&&K?n.createElement(c.A,{href:K,className:"p-ai_summary_detail_section__heading_text"},n.createElement(d.A,{text:e.topic})):n.createElement(n.Fragment,null,T?n.createElement(k.A,{className:s()("p-ai_summary_detail_section__heading_text",{"p-ai_summary_detail_section__heading_text--short_summary":Y}),text:e.topic,onAnimationEnd:ea,shouldStartStreamingAnimating:D,enableStreamingAnimation:T,shouldSpeedUpAnimation:ei,isMultiChannelUnreads:G}):n.createElement(d.A,{className:s()("p-ai_summary_detail_section__heading_text",{"p-ai_summary_detail_section__heading_text--short_summary":Y}),text:e.topic,clogLinkClick:el})),e.subheading&&n.createElement("div",{className:"p-ai_summary_detail_section__subheading"},T?n.createElement(k.A,{text:e.subheading,shouldStartStreamingAnimating:D&&Z,onAnimationEnd:et,enableStreamingAnimation:T,shouldSpeedUpAnimation:ei}):n.createElement(d.A,{text:e.subheading}),E&&n.createElement(AiSummaryDetailsSectionButton,{hasFinishedHeadersReveal:ec,isExpanded:j,isStreaming:x,toggleExpandableView:en,isInline:!0,autoClogProps:es,hasContent:W,topicTitle:e.topic}))),!E&&n.createElement(AiSummaryDetailsSectionButton,{hasFinishedHeadersReveal:ec,isExpanded:j,isStreaming:x,toggleExpandableView:en,autoClogProps:es,hasContent:W,topicTitle:e.topic}))),j&&n.createElement("div",{className:"p-ai_summary_detail_section__content"},!f&&n.createElement("div",{className:"p-ai_summary_detail_section__details"},U.t("More details")),!W&&x&&n.createElement("div",null,n.createElement("div",{className:"p-ai_summary_detail_section__skeleton p-ai_summary_detail_section__skeleton--large"}),n.createElement("div",{className:"p-ai_summary_detail_section__skeleton p-ai_summary_detail_section__skeleton--large"}),n.createElement("div",{className:"p-ai_summary_detail_section__skeleton p-ai_summary_detail_section__skeleton--small"})),W&&n.createElement(p.c,{blocks:e.blocks,blocksContainerContext:m.pi.ai_summary}),N&&n.createElement("div",{className:"p-ai_summary_detail_section__decoration"},n.createElement(u.A,{className:"p-ai_summary_detail_section__decoration_facepile",maxNumFaces:3,avatarOuterHeight:20,avatarOuterWidth:20,avatarProps:H,memberIds:z}),n.createElement("span",{className:"p-ai_summary_detail_section__decoration_metadata"},U.t("{numPeople, plural, =1 {{numPeople} person} other {{numPeople} people}} sent {numMessages, plural, =1 {{numMessages} message} other {{numMessages} messages}}",{numPeople:e.users?.length,numMessages:e.messageCount}))),e.files?.length>0?n.createElement(n.Fragment,null,n.createElement("div",{className:"p-ai_summary_detail_section__files"},U.t("Files shared")),n.createElement("div",{className:"p-ai_summary_detail_section__file_list"},e.files.map(e=>n.createElement(AiSummaryFile,{key:e.file.id,fileId:e.file.id})))):null))};AiSummaryDetailsSection.displayName="AiSummaryDetailsSection";let F=n.memo(AiSummaryDetailsSection)},0x1ff1aef05:(e,a,t)=>{"use strict";t.d(a,{a:()=>l});var n=t(0x20b4dda68);function getCitationLinksInBlocks(e){let a=/^\[\d+?\]$/,t=[];return e?.[0]?.type!==n.WP.rich_text||e?.[0]?.elements?.[0]?.elements?.forEach(e=>{"elements"in e&&e?.elements?.forEach(e=>{e?.type==="link"&&e?.text&&a.test(e?.text)&&t.push({text:e.text,url:e.url})})}),t}var r=t(0x6e20c837);let l=(0,t(0x11c82607b).Ay)("Given a summary topic, get the oldest citation link from it",(e,a,{topic:t})=>{let n=a(),l=getCitationLinksInBlocks(t.blocks);if(!l.length)return null;let s="",i="";return l.forEach(({url:e})=>{let a=(0,r.$N)(n,e);a?.ts&&(!i||a.ts<i)&&(i=a.ts,s=e)}),s});l.meta={name:"getOldestCitationLinkFromTopic",key:"createThunkGetOldestCitationLinkFromTopic",description:"Given a summary topic, get the oldest citation link from it"}},0x13674a330:(e,a,t)=>{"use strict";t.d(a,{P:()=>i});var n=t(0x158bdfb1b),r=t(0x11c82607b),l=t(0x1400f598e),s=t(0x1f48e3aa4);let i=(0,r.Ay)("Refresh recap",async(e,a,{channelIds:t,digestId:r,streamingChannelId:i})=>{if(0!==t.length){t.forEach(a=>e((0,l.h8)(a))),e((0,l.nW)(!0));try{let c=await e((0,n._)({newContentRefresh:!0,reason:"refresh-recap",refreshChannelIds:t,refreshDigestId:r,streamingChannelIds:[i]})),o=a()?.aiSummary?.unreadRecapChannels;o&&e((0,l.$v)({channels:o.filter(e=>!t.includes(e.channel_id))})),e((0,l.S2)({id:c?.streaming_summary_ids?.[0]||"",channelId:i,type:s.Tj.Recap})),e((0,l.mm)(!0))}catch{e((0,l.nW)(!1)),t.forEach(a=>e((0,l._4)(a)))}}});i.meta={name:"refreshRecap",key:"createThunkRefreshRecap",description:"Refresh recap"}},0x579f81ad:(e,a,t)=>{"use strict";t.d(a,{O:()=>L});var n=t(0xbad225b5),r=t(0x139aa1a7),l=t(0x1fa01bf86),s=t(0x1a84f8520),i=t(0x16cf1da63),c=t(0x20482ad21),o=t(0x11a296110),d=t(0x6e87d4ec),m=t(0x167c26d3),u=t(0x1fdec3e16),p=t(0x1550c1995),_=t(0xe1644a69),h=t(0x1ecc7f772),g=t(0x226892387),E=t(0x217553e42);let f=new c.Ay("assistant"),ToggleRecapChannelToast=({channelId:e,isDigested:a,wasChannelPreviouslyMuted:t,hasApiErrors:r,skipMutingCopy:l})=>{let s,c=(0,n.useRef)(null),y=(0,g.d4)(a=>(0,E.OL)(a,e)),A=(0,i.wA)(),N=(0,h.Mn)(y),C="",b=`#${N||"channel"}`;r?s=a?f.rt("Something went wrong. <b>{channelNameText}</b> not added to future recaps",{channelNameText:b}):f.rt("Something went wrong. <b>{channelNameText}</b> not removed from future recaps",{channelNameText:b}):r||(a?l?(s=f.rt("<b>{channelNameText}</b> added to future recaps",{channelNameText:b}),C=f.t("Manage channels")):t?s=f.rt("<b>{channelNameText}</b> added to future recaps",{channelNameText:b}):(s=l?f.rt("<b>{channelNameText}</b> added to future recaps and muted",{channelNameText:b}):f.rt("{channelNameText} added to future recaps and muted",{channelNameText:b}),C=f.t("Manage muting")):s=l?f.rt("<b>{channelNameText}</b> removed from future recap",{channelNameText:b}):t?f.rt("<b>{channelNameText}</b> removed from future recap and unmuted",{channelNameText:b}):f.rt("<b>{channelNameText}</b> removed from future recap",{channelNameText:b}));let x=(0,n.useCallback)(()=>{A((0,p.N)()),c.current?.hideToast()},[A]),R=(0,n.useMemo)(()=>n.createElement(o.Nm,{className:"p-ai_summary_ready_toast__item",onClick:x},n.createElement("span",{className:"p-ai_summary_ready_toast__subtitle"},n.createElement(u.A,{lines:1},C))),[x,C]),k=(0,_.T)({type:"summary"});return C?n.createElement(m.A,{svgIconProps:k,svgIconClassName:"p-ai_summary_ready_toast__icon",customButton:R,ref:c,duration:3e3},n.createElement("div",{className:"flex_one overflow_hidden"},n.createElement("div",null,s))):n.createElement(d.A,{duration:3e3,svgIconProps:k},n.createElement("span",{className:""},s))};ToggleRecapChannelToast.displayName="ToggleRecapChannelToast";var y=t(0xbaaab71e),A=t(0x94a64c46),N=t(0x12901f3b2),C=t(0x3711e82d),b=t(0x45012309),x=t(0x1ec68d6a3),R=t(0x11c82607b),k=t(0x8baf11b5),I=t(0x1ccef1c6f),S=t(0x1400f598e),v=t(0x1e3eb45fd),T=t(0x365a4cc3),D=t(0xb2eafc44),w=t(0x25366f1fb),M=t(0x16ffed5ab),P=t(0x19895585a);let L=(0,R.Ay)("Adds or removes a channel from daily digest",async(e,a,{channelId:t,isDigested:i,skipMuting:c},o)=>{let d,m=0,u=a(),p=(0,T.Pq)(u),_=(0,T.T7)(u),h=(0,v.YX)(u),{getViewSet:g}=o(y.U),E=g(u)||{},f=E?.[P.mq.Primary]?.viewType===r.D.DailyDigest,R=(0,k.B)(u,t);!i&&!p?.isPreview&&(e((0,S.pt)({channelId:t})),(0,I.ty)(u,"a11y_animations")&&f&&(m=300)),setTimeout(async()=>{let r;e((0,S.mt)({channelId:t,isDigested:i})),p?.isPreview&&!_&&e((0,S.d9)(!0));let o=!1;try{let a=i?await e((0,A.G)({reason:"add-to-daily-digest",channelId:t,unmutedChannels:c&&!R?[t]:[]})):await e((0,N.I)({reason:"remove-from-daily-digest",channelId:t}));h&&e((0,D.$)()),(d=a.ok&&i&&!_&&f)&&e((0,w.P)({targetChannelId:t})),(0,l.Y)(u)&&a.ok&&(0,b.eo)({state:u}).track(C.EventId.CHANNEL_NOTIFICATION_SETTINGS_SET_MUTE,{value:i,entry_point:"recap"}),a.ok||((0,x.A)({label:"daily-digest"}).error(Error("Failed to toggle daily digest for channel")),o=!0)}catch(e){r=e?.data?.error,(0,x.A)({label:"daily-digest"}).error(Error("Error toggling daily digest for channel")),o=!0}finally{if(!d){let a;a=r===A.L.ChannelSubscriptionLimitReached?n.createElement(s.P,{channelIds:[t]}):(({channelId:e,isDigested:a,hasApiErrors:t,wasChannelPreviouslyMuted:r,skipMutingCopy:l})=>n.createElement(ToggleRecapChannelToast,{channelId:e,isDigested:a,wasChannelPreviouslyMuted:r,hasApiErrors:t,skipMutingCopy:l}))({channelId:t,isDigested:i,hasApiErrors:o,wasChannelPreviouslyMuted:R,skipMutingCopy:c}),e((0,M.M)({element:a}))}e((0,S.pt)({channelId:null})),o&&(e((0,S.mt)({channelId:t,isDigested:!i})),p&&p.isPreview&&(0,T.T7)(a())&&e((0,S.d9)(!1)))}},m)});L.meta={name:"toggleDailyDigestForChannel",key:"createThunkToggleDailyDigestForChannel",description:"Adds or removes a channel from daily digest"}}}]);
//# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-daily-digest-view.db9ff88ec2710be3ab82.min.js.mapØA
—Eoúô