export function chooseLatestActivityPreviewItem({currentPreview:_0x1ae394,nextItem:_0x522641,replayComplete:_0x49c5f8}){if(!_0x49c5f8&&_0x1ae394?.['isSnapshot']&&!_0x522641?.['isSnapshot'])return _0x1ae394;return _0x522641||null;}export function findLatestAgentItemForPreview({latestItem:_0x1a4ce3,activityItems:activityItems=[],taskStatus:taskStatus='',replayLoading:replayLoading=![]}){if(_0x1a4ce3?.['isSnapshot']&&replayLoading)return _0x1a4ce3;const _0x28aabb=taskStatus==='running',_0x4cea30=_0x1a4ce3?.['action']==='Follow-Up';if(_0x28aabb&&_0x4cea30)return null;if(activityItems['length'])for(let _0x4266a5=activityItems['length']-0x1;_0x4266a5>=0x0;_0x4266a5-=0x1){const _0x1eeb61=activityItems[_0x4266a5];if(_0x1eeb61['isUserMessage'])break;if(_0x1eeb61['isAgentResponse']||_0x1eeb61['action']==='Response')return _0x1eeb61;}if(_0x1a4ce3&&!_0x1a4ce3['isUserMessage'])return _0x1a4ce3;for(let _0x39375c=activityItems['length']-0x1;_0x39375c>=0x0;_0x39375c-=0x1){const _0x4a5ea8=activityItems[_0x39375c];if(!_0x4a5ea8['isUserMessage'])return _0x4a5ea8;}return null;}export function setLatestActivityLoadingIndicator(_0x19aff1,_0x2376c5){const _0x5ba09a=_0x19aff1?.['getElementById']?.('latest-activity-loading');if(!_0x5ba09a)return;_0x5ba09a['hidden']=!_0x2376c5;}