).then(e=>{o(e)}).catch(e=>{(0,R.Ay)({getState:t}).error(`API call to lists.updateMyItemReminder
						with reason ${n} failed, initiated by generated fetcher`),r(e)})}));S.meta={name:"listsUpdateMyItemReminderFetcher",key:"createFetcherListsUpdateMyItemReminderFetcher",description:"lists.updateMyItemReminder generated fetcher"};var M=a(0x70de3606),F=a(0x11c82607b),B=a(0x13654559a),P=a(0x18519d643),O=a(0xbddcdea8);let L=(0,F.Ay)("Updates the reminder due date for the record assigned to the current user",async(e,t,{listId:a,recordId:o,dateValue:r,wasOverdue:l})=>{try{await e(S({listId:a,reason:"update-assigned-item",recordId:o,dateDue:r||0}));let n=(0,h.hK)(r),s=null!=n&&0!==n&&(0,h.Jv)({dateInput:n,isInSeconds:!0});if(l&&!r||s&&!l||l&&r&&!s){let a=(0,P.PG)(t()),o=a.incompleteOverdueAssignedCount;l&&!r?o=Math.max(0,o-1):s&&!l?o+=1:l&&r&&!s&&(o=Math.max(0,o-1)),e((0,O.L)({counts:{todos_count:a.todosCount,incomplete_todos_count:a.incompleteTodosCount,incomplete_overdue_todos_count:a.incompleteOverdueTodosCount,completed_todos_this_week_count:a.completedTodosThisWeekCount,completed_todos_this_month_count:a.completedTodosThisMonthCount,incomplete_overdue_assigned_count:o}}))}let i=(0,E.qO)(t()),d=[];d.push(...Object.values(i));let c=d.map(e=>e.record.id===o?{...e,record:{...e.record,assignedToMeReminderTimestamp:r}}:e),u=(0,E.ll)(t(),a,o);return u&&(u.assignedToMeReminderTimestamp=r,e((0,B.$W)({listId:a,record:u,listsPerfTwoEnabled:(0,M.SP)(t())}))),e((0,B.w$)({myItems:c}))}catch(e){return(0,R.Ay)({label:"lists"}).error("error updating assigned item reminder due date",e),null}});L.meta={name:"updateMyAssignedItemReminder",key:"createThunkUpdateMyAssignedItemReminder",description:"Updates the reminder due date for the record assigned to the current user"};var H=a(0x1a93a04c0),V=a.n(H);let G=new d.Ay("lists");var U=((o={}).EditItem="edit_item",o.OpenRecord="open_item",o.OpenThread="open_thread",o.SetTag="set_tag",o.SetDate="set_date",o.SetReminder="set_reminder",o.AddToMyTodos="add_to_my_todos",o.MoveUpDown="move_up_down",o.MoreActions="more_actions",o);let z=r.memo(({listId:e,row:t,recordId:a,toolbarActions:o,showToolbarOnHover:n,onOpenItem:d,onAddToMyTasks:w,onHideToolbar:I,onEditItem:N,trackClog:R,extraClogProps:D,isAssignedToYouTask:S,hasReminder:M})=>{let F=(0,l.wA)(),[B,P]=(0,r.useState)(!1),O=(0,_.A)({listId:e,recordId:a,trackClog:R,shouldUseTimestamp:!0}),H=(0,h.hK)(t.assignedToMeReminderTimestamp),U=null!=H&&0!==H&&(0,h.Jv)({dateInput:H,isInSeconds:!1}),z=(0,r.useCallback)(async(t,o)=>{e&&await F(L({listId:e,recordId:a,dateValue:o,wasOverdue:U}))},[e,F,a,U]),K=(0,r.useMemo)(()=>({...D?{...D}:{},entryPoint:k.cy}),[D]),$=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__show_detail_view_button",onClick:{enableClogAction:!0},entryPoint:k.cy,uiStep:k.m3}),[]),j=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__edit_item_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),Y=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__show_message_view_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),q=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__set_tag_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),W=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__set_date_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),Z=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__set_reminder_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),J=(0,r.useCallback)(()=>{let{reference:e}=t;if(e&&(0,x.fw)(e)){let t=e?.message;t&&F((0,T.A)({channelId:t.channel_id,ts:t.ts}))}},[F,t]),X=(0,r.useCallback)(t=>{let l=o.find(e=>"more_actions"===e.actionKey);return r.createElement(f.a,{listId:e,recordId:a,showDeleteConfirmationModal:l?.itemProps?.showDeleteConfirmationModal,...t})},[e,a,o]),Q=(0,r.useCallback)(a=>r.createElement(C.d,{listId:e,handleFieldUpdate:S?z:O,column:t.dueDateField,currentTimestamp:S?(0,h.sq)(t.assignedToMeReminderTimestamp):t.dueDateValue,extraClogProps:K,...a}),[e,S,z,O,t.dueDateField,t.assignedToMeReminderTimestamp,t.dueDateValue,K]),ee=(0,r.useCallback)(e=>{e.stopPropagation()},[]),et=(0,r.useCallback)(()=>{P(!0)},[]),ea=(0,r.useCallback)(()=>{P(!1)},[]),eo=(0,v.d4)(t=>!!e&&(0,E.XF)(t,{listRecord:{listId:e,rowId:a}})),er=(0,r.useMemo)(()=>eo?G.t("Remove to-do"):G.t("Add to-do"),[eo]),el=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"add_to_my_todos_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),en=(0,r.useMemo)(()=>({eventId:A.EventId.SLACK_LISTS,elementName:"todo_item__toolbar_button__more_actions_button",onClick:{enableClogAction:!0},entryPoint:k.cy}),[]),es=G.t("Open to-do"),ei=G.t("Edit to-do"),ed=G.t("Open message"),ec=G.t("Set tag"),eu=G.t("Set date"),em=M?G.t("Edit reminder"):G.t("Set reminder"),ep=G.t("More actions"),eg=(0,r.useMemo)(()=>o.map(({actionKey:e,customLabel:a})=>{switch(e){case"open_item":return{key:e,type:"button",tooltipCopy:a||es,"aria-label":a||es,callback:d||i.A,children:r.createElement(p.Ah,{name:"sidebar",inline:!0,size:"20"}),autoClogProps:$,showOnHover:!1,hide:!t.reference};case"edit_item":return{key:e,type:"button",tooltipCopy:a||ei,"aria-label":a||ei,callback:N||i.A,children:r.createElement(p.Ah,{name:"edit",inline:!0,size:"20"}),autoClogProps:j,showOnHover:!1};case"open_thread":return{key:e,type:"button",tooltipCopy:a||ed,"aria-label":a||ed,callback:J||i.A,children:r.createElement(p.Ah,{name:"arrow-right-channel",inline:!0,size:"20"}),autoClogProps:Y,hide:!(t.reference&&(0,x.fw)(t.reference))};case"set_tag":return{key:e,type:"menu",tooltipCopy:a||ec,"aria-label":a||ec,children:r.createElement(p.Ah,{name:"tag",inline:!0,size:"20"}),autoClogProps:q};case"set_date":return{key:e,type:"menu",tooltipCopy:a||eu,"aria-label":a||eu,children:r.createElement(p.Ah,{name:"calendar",inline:!0,size:"20"}),autoClogProps:W};case"set_reminder":return{key:e,type:"menu",tooltipCopy:a||em,"aria-label":a||em,callbackMenuTrigger:ee,renderMenuCallback:Q,children:r.createElement(p.Ah,{name:"clock",inline:!0,size:"20"}),autoClogProps:Z,showOnHover:!1};case"add_to_my_todos":return{key:e,type:"button",tooltipCopy:a||er,"aria-label":a||er,className:s()(V().addToMyTodosButton,"p-todos_action_toolbar__action--always_visible",{[V().addToMyTodosButtonColorFill]:eo}),callback:w,children:eo?r.createElement(p.Ah,{name:"check-circle-filled",size:"20"}):r.createElement(p.Ah,{name:"check-circle",size:"20"}),autoClogProps:el};case"more_actions":return{key:e,type:"menu",tooltipCopy:ep,"aria-label":ep,callbackMenuTrigger:ee,renderMenuCallback:X,children:r.createElement(p.Ah,{name:"ellipsis-vertical-filled",size:"20"}),autoClogProps:en,showOnHover:!1};default:throw Error(`Unhandled toolbar action: ${e}`)}}).filter(({hide:e=!1})=>!e),[o,ep,ee,X,en,es,d,$,ei,N,j,ed,J,Y,t.reference,ec,q,eu,W,em,Q,Z,er,eo,w,el]);return r.createElement("div",{className:s()({[V().todosActionToolbar]:!n,[V().borderContainer]:!n,"c-message_actions__container":!n,[V().forceDisplay]:B&&!n,"p-todo_row__actions":n,[V().actionsContainer]:n}),role:"group",id:`todos-action-toolbar--${a}`,onClick:n?ee:void 0},eg.map(e=>{let o=`${a}--${e.key}`;switch(e.type){case"button":return r.createElement(g.Ay,{key:o,tip:e.tooltipCopy,position:"top"},r.createElement(c.Nm,{className:s()(V().actionButton,"c-icon_button","c-icon_button--default",V().defaultButtonColor,e.className,{"p-todos_actions_toolbar__hover_button":e.showOnHover}),onClick:e.callback,autoClogProps:e.autoClogProps},e.children));case"menu":{if(!e.children)return null;let l=r.createElement(g.Ay,{key:o,tip:e.tooltipCopy,position:"top"},r.createElement(u.A,{className:s()(V().actionButton,V().defaultButtonColor,e.className,{"p-todos_actions_toolbar__hover_button":e.showOnHover,[V().forceDisplay]:B}),size:"small","aria-label":e.tooltipCopy},e.children));if("set_date"===e.key){if(!t.listId||!t.dueDateField)return null;return r.createElement(b.Y,{listId:t.listId,recordId:a,column:t.dueDateField,onPopoverClose:I,shouldUseTimestamp:!0},l)}if("set_tag"===e.key){if(!t.listId||!t.viewId||!t.selectField)return null;return r.createElement(y.A,{key:o,listId:t.listId,viewId:t.viewId,column:t.selectField,value:t.selectValue,onPopoverClose:I,handleFieldUpdate:O,extraClogProps:K},l)}if(!e.renderMenuCallback||!e.callbackMenuTrigger)return null;return r.createElement(m.A,{renderMenu:e.renderMenuCallback,position:"bottom-right",onClick:e.callbackMenuTrigger,onPopoverOpen:et,onPopoverClose:ea,key:o},l)}default:throw Error(`Unhandled toolbar action type: ${e.type}`)}}))})},0x123d047e1:(e,t,a)=>{"use strict";a.d(t,{D5:()=>getGroupColor,GT:()=>s,Vy:()=>findRecordIndex,eP:()=>getGroupingKeys,eq:()=>reorderGroupsForTodos,fC:()=>getTargetGroupFieldPayload,zT:()=>getDateFilter});var o=a(0x239539849),r=a(0x16bc7ad6),l=a(0x13d718530),n=a(0x153cbdf74);let s="--todos-empty-key--",reorderGroupsForTodos=({groupBy:e,groupRowsByKey:t})=>{if(!e||0===t.size)return t;let a=Array.from(t.entries());e.key===n.$.TodoDueDate&&a.sort(([e],[t])=>{if(e===s)return -1;if(t===s)return 1;let a=new Date(e),o=new Date(t);return isNaN(a.getTime())||isNaN(o.getTime())?0:a.getTime()-o.getTime()});let r=new Map(a),l=t.get(o.Ce.Later);l&&(r.delete(o.Ce.Later),r.set(o.Ce.Later,l));let i=t.get(s);return i?(r.delete(s),new Map([[s,i],...r])):r},findRecordIndex=({records:e,recordId:t})=>e.findIndex(e=>e.id===t),getDateFilter=({activeFilters:e})=>e.find(e=>e.key===n.$.TodoDueDate),getGroupingKeys=({activeFilters:e,groupByField:t,tagColumn:a})=>{if(t.type===n.$.TodoDueDate){let t=Object.values(o.Ce),a=getDateFilter({activeFilters:e}),r=t;return(a?.values?.length??0)>0&&(r=t.filter(e=>a?.values.includes(e))),r.filter(e=>e!==o.Ce.Overdue)}let r=t?.options?.choices?.map(e=>e.value),l=(({activeFilters:e,tagColumn:t})=>e.find(e=>e.key===t?.key))({activeFilters:e,tagColumn:a});return l&&l.values.length>0?l.values:r},getTargetGroupFieldPayload=({groupBy:e,targetGroup:t,currentRecordId:a,records:l})=>{let i,d=t===s;if(!t||e.type!==n.$.TodoDueDate)return{key:e.key,value:t};let c=l.find(e=>e.id===a);if(!c||!t)return;let u=c[e.key];return i=d?"":t===o.Ce.Later?o.ye.Later:(0,r.tc)({timestamp:u,targetDateValue:t}),{key:e.key,value:i}},getGroupColor=e=>{if("categoryKey"in e)switch(e.categoryKey){case o.Ce.Today:return"pink";case o.Ce.Tomorrow:return"blue";case o.Ce.Upcoming:return"green";case o.Ce.Later:return"purple";case o.Ce.None:default:return"gray"}if("rowType"in e)switch(e.rowType){case o.T6.AiSuggestedHeader:return e.groupBy?l.a.Yellow:void 0;case o.T6.CompletedHeader:return e.groupBy?l.a.Gray:void 0}}},0x117f1fed4:(e,t,a)=>{"use strict";a.d(t,{H2:()=>getGroupBy,KS:()=>getFilterRowsHeightAndKeys,Tz:()=>isValidGroupOption,WJ:()=>isDateFilterOption,Xw:()=>getSortComparator,Z6:()=>isCompletedFilterOption,aY:()=>n,g0:()=>getSortBy,gA:()=>getFilters,oI:()=>l,os:()=>isValidFilterOption,uF:()=>s,wL:()=>isValidSortOption});var o=a(0x239539849),r=a(0x1ccef1c6f);let getFilters=e=>{let t=(0,r.VI)(e).filters;return Array.isArray(t)?t.map(e=>e?.name).filter(e=>!!e):[o.Ab.All]},getGroupBy=e=>(0,r.VI)(e).group,getSortBy=e=>{let t=(0,r.VI)(e).sort;return t?.name||o.Uy.RecentlyAssigned},compareByUpdatedTs=(e,t)=>{let a=e.record.updatedTimestamp??"";return(t.record.updatedTimestamp??"").localeCompare(a)},getSortComparator=({sortOption:e,listItemLayouts:t})=>{switch(e){case o.Uy.Reminder:return(e,t)=>{let a=e.record.assignedToMeReminderTimestamp,o=t.record.assignedToMeReminderTimestamp;return a||o?a?o?a-o:-1:1:0};case o.Uy.RecentlyAssigned:case o.Uy.OldestToNewest:return null;case o.Uy.DueDate:return(e,a)=>{let o=t[e.listId].dueDateField,r=e.record.fields?.[o.key];o=t[a.listId].dueDateField;let l=a.record.fields?.[o.key];return r||l?r?l?r.localeCompare(l):-1:1:0};case o.Uy.RecentlyUpdated:return compareByUpdatedTs;default:return null}},isValidSortOption=e=>null==e||Object.values(o.Uy).includes(e),isValidFilterOption=e=>null==e||Object.values(o.Ab).includes(e),isValidGroupOption=e=>null==e||Object.values(o.ZR).includes(e),l=20,n=36,s=26,getFilterRowsHeightAndKeys=e=>e.reduce((e,t)=>("header"===t.type?e.totalHeight+=s:"separator"===t.type?e.totalHeight+=l:e.totalHeight+=n,e.keys.push(t.key),e),{totalHeight:0,keys:[]}),isCompletedFilterOption=e=>Object.values(o.jA).includes(e),isDateFilterOption=e=>Object.values(o.mm).includes(e)},0x1093d7ec3:(e,t,a)=>{"use strict";a.d(t,{l:()=>b});var o=a(0x1df96de4c),r=a(0xe874a88a),l=a(0x22a29f141),n=a(0x1dfdeb1c8),s=a(0x1ec68d6a3),i=a(0xe747dd27);let d=(0,n.A)("lists.getMyItems generated fetcher",(e,t,a)=>new r.S((o,r)=>{let{abortSignal:n,reason:d,...c}=a,u=(0,i.VA)(c);e((0,l.apiCall)({method:"lists.getMyItems",args:u,abortSignal:n,reason:d})).then(e=>{o(e)}).catch(e=>{(0,s.Ay)({getState:t}).error(`API call to lists.getMyItems
						with reason ${d} failed, initiated by generated fetcher`),r(e)})}));d.meta={name:"listsGetMyItemsFetcher",key:"createFetcherListsGetMyItemsFetcher",description:"lists.getMyItems generated fetcher"};var c=a(0x70de3606),u=a(0x57d5a5b5),m=a(0x11c82607b),p=a(0x13654559a),g=a(0x8d0a2ff1),_=a(0x14a799db1);let b=(0,m.Ay)("Fetch the list items assigned to you",async(e,t,a={})=>{let r=(0,c.L2)(t()),l=(0,c.ci)(t());try{let o=await e(d({reason:"get-assigned-items",includeSubtasks:r,includeApprovals:l,...(({filterOption:e,sortOption:t})=>({...e?{filter:{name:e}}:{},...t?{sort:{name:t}}:{}}))({filterOption:a.filterOption,sortOption:a.sortOption})})),n=[];for(let e of o.lists)(0,g.vS)(t(),e.id)||n.push(e);await e((0,_.y)({lists:n}));let s=[],i={};for(let e of o.records){let t=e.list_id,a=(0,u.jG)(e);s.push({listId:t,record:a}),i[t]||(i[t]=[]),i[t].push(a)}for(let[a,o]of(e((0,p.w$)({myItems:s})),Object.entries(i)))e((0,p.yw)({listId:a,records:o,listsPerfTwoEnabled:(0,c.SP)(t())}))}catch(e){(0,s.Ay)({label:"lists"}).error("error fetching assigned items",e)}return o.Ml});b.meta={name:"fetchAssignedItems",key:"createThunkFetchAssignedItems",description:"Fetch the list items assigned to you"}},0xbddcdea8:(e,t,a)=>{"use strict";a.d(t,{L:()=>n});var o=a(0xe747dd27),r=a(0x11c82607b),l=a(0x1eecf130e);let n=(0,r.Ay)("Format server-provided counts and update store with new values",(e,t,{counts:a})=>{let r=(0,o.XK)(a);e((0,l.yO)(r))});n.meta={name:"formatAndApplyCounts",key:"createThunkFormatAndApplyCounts",description:"Format server-provided counts and update store with new values"}}}]);
//# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-client-assigned-tasks-view.90cbd7b7fba998fee3a1.min.js.mapØA
—Eoúô