export function chooseLatestActivityPreviewItem({currentPreview:_0x250ac6,nextItem:_0x13fa11,replayComplete:_0x4986ee}){if(!_0x4986ee&&_0x250ac6?.['isSnapshot']&&!_0x13fa11?.['isSnapshot'])return _0x250ac6;return _0x13fa11||null;}export function findLatestAgentItemForPreview({latestItem:_0x4fa551,activityItems:activityItems=[],taskStatus:taskStatus='',replayLoading:replayLoading=![]}){if(_0x4fa551?.['isSnapshot']&&replayLoading)return _0x4fa551;const _0x26775c=taskStatus==='running',_0x41d558=_0x4fa551?.['action']==='Follow-Up';if(_0x26775c&&_0x41d558)return null;if(activityItems['length'])for(let _0x38dbf2=activityItems['length']-0x1;_0x38dbf2>=0x0;_0x38dbf2-=0x1){const _0x1ae742=activityItems[_0x38dbf2];if(_0x1ae742['isUserMessage'])break;if(_0x1ae742['isAgentResponse']||_0x1ae742['action']==='Response')return _0x1ae742;}if(_0x4fa551&&!_0x4fa551['isUserMessage'])return _0x4fa551;for(let _0x580345=activityItems['length']-0x1;_0x580345>=0x0;_0x580345-=0x1){const _0x56f9e5=activityItems[_0x580345];if(!_0x56f9e5['isUserMessage'])return _0x56f9e5;}return null;}export function setLatestActivityLoadingIndicator(_0x5715e4,_0x139afe){const _0x427d16=_0x5715e4?.['getElementById']?.('latest-activity-loading');if(!_0x427d16)return;_0x427d16['hidden']=!_0x139afe;}