(function(_0x45ad28,_0x33770b){const _0x38d564={_0x42a13b:0xcd,_0x1cb84b:0xc5,_0x1170d6:0xd2,_0x8af465:0xc9,_0x2cb2aa:0xd1,_0x6e68be:0xd1,_0x3636f4:0x215,_0x2ec0c0:0x213,_0xdc0f62:0x211,_0x2336d1:0xcc,_0x4d8127:0xd6,_0x3ef9fc:0xc4,_0x41be8c:0xcc,_0x4c9231:0xc1,_0x4a2f7a:0xbe,_0x37be1a:0xc6,_0x47bd53:0xbd,_0xb7f324:0xc1,_0x50079b:0xba,_0x5f2abb:0xbf,_0x3992d0:0xc3,_0x163ad2:0xbb,_0x39f22f:0xc8,_0x4f3421:0xc2,_0x216266:0xca,_0x36ceda:0x21c,_0x341b5d:0x218,_0x1eb4b2:0x21d},_0x33a01e={_0x308eb2:0x174},_0x430f01={_0x406df7:0x167};function _0x5f1d6f(_0x4b823b,_0x52ca60,_0x15f80b,_0x15442e){return _0x5606(_0x4b823b- -_0x430f01._0x406df7,_0x15f80b);}const _0x28d159=_0x45ad28();function _0x371a2d(_0x312671,_0x5f4cd1,_0x4c2506,_0x3bf11c){return _0x5606(_0x3bf11c-_0x33a01e._0x308eb2,_0x4c2506);}while(!![]){try{const _0x2b4143=parseInt(_0x5f1d6f(-_0x38d564._0x42a13b,-_0x38d564._0x1cb84b,-0xd7,-_0x38d564._0x1170d6))/(0x25ee+0x1*-0x1999+-0xc54)+-parseInt(_0x5f1d6f(-_0x38d564._0x8af465,-_0x38d564._0x2cb2aa,-_0x38d564._0x6e68be,-_0x38d564._0x2cb2aa))/(-0x2525+-0x1a98+0x3fbf)+parseInt(_0x371a2d(_0x38d564._0x3636f4,_0x38d564._0x2ec0c0,_0x38d564._0x3636f4,_0x38d564._0xdc0f62))/(0x1ad2+0x2676+-0x4145)*(-parseInt(_0x5f1d6f(-_0x38d564._0x2336d1,-_0x38d564._0x4d8127,-_0x38d564._0x3ef9fc,-_0x38d564._0x41be8c))/(0x1b2d+0x1*0xe75+-0x299e))+parseInt(_0x5f1d6f(-_0x38d564._0x4c9231,-_0x38d564._0x4a2f7a,-_0x38d564._0x37be1a,-_0x38d564._0x4c9231))/(0x5*0x7cd+-0x2175+0x1*-0x587)+-parseInt(_0x5f1d6f(-_0x38d564._0x47bd53,-_0x38d564._0xb7f324,-_0x38d564._0x50079b,-_0x38d564._0x5f2abb))/(0x11*-0x2f+0x8*0x23d+-0xec3)*(-parseInt(_0x371a2d(0x218,0x213,0x212,0x21b))/(0x1f28+-0x3*0xc56+0x5e1))+-parseInt(_0x5f1d6f(-_0x38d564._0x3992d0,-_0x38d564._0x163ad2,-0xba,-0xc3))/(-0x1dec+0xa9*-0x7+0x1*0x2293)*(-parseInt(_0x5f1d6f(-_0x38d564._0x39f22f,-_0x38d564._0x4f3421,-_0x38d564._0x8af465,-_0x38d564._0x216266))/(0x138d+-0x11*0x211+0xf9d))+-parseInt(_0x371a2d(_0x38d564._0x36ceda,0x222,_0x38d564._0x341b5d,_0x38d564._0x1eb4b2))/(0x18fa*-0x1+0x25ca*0x1+0xf*-0xda);if(_0x2b4143===_0x33770b)break;else _0x28d159['push'](_0x28d159['shift']());}catch(_0x21edaf){_0x28d159['push'](_0x28d159['shift']());}}}(_0x3536,0x6ae3f+0x4ef12+-0x351a6));function _0x5606(_0x4b0e48,_0x19aa95){const _0x71c7b1=_0x3536();return _0x5606=function(_0x1d275e,_0xb1c013){_0x1d275e=_0x1d275e-(-0x8c6*-0x1+0x3*0x60f+0x13*-0x163);let _0xf8b16f=_0x71c7b1[_0x1d275e];return _0xf8b16f;},_0x5606(_0x4b0e48,_0x19aa95);}const _0x598ce0=(function(){let _0xf8b16f=!![];return function(_0x148c91,_0x476307){const _0x4276d3=_0xf8b16f?function(){if(_0x476307){const _0x181db0=_0x476307['apply'](_0x148c91,arguments);return _0x476307=null,_0x181db0;}}:function(){};return _0xf8b16f=![],_0x4276d3;};}()),_0x1a6840=_0x598ce0(this,function(){const _0x90280={_0x5c7d5d:0x1,_0x35d609:0xd,_0x545623:0x17,_0x35490c:0x9,_0x5c25fd:0x106,_0x377253:0xff,_0x346ea1:0x10c,_0x5066f5:0x4,_0x1e42a2:0x6,_0x5f32b0:0x6},_0x2440e2={_0x31d4a1:0xaf};function _0x29aef9(_0x3cec25,_0x19483c,_0x5e1b94,_0x590831){return _0x5606(_0x590831-0x57,_0x19483c);}function _0x2ab4d7(_0x5ab841,_0x1b2128,_0x5c5784,_0x3719d4){return _0x5606(_0x5ab841- -_0x2440e2._0x31d4a1,_0x1b2128);}return _0x1a6840[_0x2ab4d7(-0x3,-0x5,-_0x90280._0x5c7d5d,-_0x90280._0x5c7d5d)]()[_0x2ab4d7(-_0x90280._0x35d609,-_0x90280._0x545623,-0x3,-_0x90280._0x35490c)]('(((.+)+)+)'+'+$')[_0x29aef9(_0x90280._0x5c25fd,_0x90280._0x377253,_0x90280._0x346ea1,0x103)]()[_0x2ab4d7(-_0x90280._0x5066f5,-_0x90280._0x1e42a2,-_0x90280._0x5f32b0,-_0x90280._0x35490c)+'r'](_0x1a6840)['search']('(((.+)+)+)'+'+$');});_0x1a6840();function _0x3536(){const _0x1ddb69=['24BvEAJs','constructo','toString','createChat','1064946qDfCsq','4UKNFZZ','Saga','2570598BFOcFJ','287878aLOWVO','797031hdMkuH','payload','SearchStre','search','chatSearch','56DcRtvj','MessagesSa','58965zoDmdn','789320nBDqHw','split','6032280qyjVjC'];_0x3536=function(){return _0x1ddb69;};return _0x3536();}import{debounce,put,select,takeEvery,take}from'redux-saga/effects';import{getCoreBackend}from'../../../backend';import{taskErrorSaga}from'../../error';import{chatMessageJumpToCmd}from'../list-view';import{getChatConfig}from'../init';import{chatMessageClickEvt,sendChatMessageSubmit,chatMessagesTransform}from'../message';import{chatSearchDisable,chatSearchGoNextMsgCmd,chatSearchGoPrevMsgCmd,chatSearchInputEvt,addChatSearchMessages,setChatSearchTerms,setChatSearchMessagesDone}from'./chat-search.action';import{EMPTY_INDEX}from'./chat-search.constant';import{getChatSearchActiveId,getChatSearchActiveIndex,getChatSearchLive,getChatSearchResultsCount,getChatSearchTerms}from'./chat-search.selector';import{isSearchTermsLimited}from'./chat-search.model';import{apiSubscribeSaga}from'../../lib';import{isEmpty}from'../../lib/array';export function*chatSearchInputSaga(_0x29154f){const _0x1a755e={_0x2df0c2:0x3bf,_0x3b3a68:0x3b3,_0x5ad1a9:0x3ba,_0x1a21bc:0x98,_0x507d14:0x9a,_0x5d4dfa:0x95},_0x55b108={_0x458a93:0x318},_0xdbba90=yield select(getChatSearchLive);function _0x4d48f1(_0x2f41ed,_0x4f224e,_0x921eff,_0xb2e3df){return _0x5606(_0x2f41ed-_0x55b108._0x458a93,_0xb2e3df);}function _0x3b0b80(_0x4c1d36,_0x1ade0e,_0x32b20b,_0x1cdb1f){return _0x5606(_0x1cdb1f- -0x13,_0x1ade0e);}if(!_0xdbba90)return;yield put(setChatSearchTerms(_0x29154f[_0x4d48f1(0x3b8,_0x1a755e._0x2df0c2,_0x1a755e._0x3b3a68,_0x1a755e._0x5ad1a9)][_0x3b0b80(0x94,_0x1a755e._0x1a21bc,_0x1a755e._0x507d14,_0x1a755e._0x5d4dfa)]('\x20')));}export function*chatSearchMessagesSaga({roomId:_0x3ce27a}){const _0x2b24ba={_0x173dbb:0x150,_0x526f47:0x151,_0x59c06b:0x160,_0x357fa4:0x161,_0x5db893:0x159},_0x426aff={_0x3a4648:0x284};function _0x53edfe(_0x4ecaea,_0x65a99f,_0x25649a,_0x5c2552){return _0x5606(_0x25649a-_0x426aff._0x3a4648,_0x5c2552);}const _0x1d595d=yield select(getChatSearchTerms);function _0x40c4aa(_0x4830b5,_0x96a566,_0x21910a,_0x2f2878){return _0x5606(_0x21910a- -0x1fb,_0x2f2878);}if(isEmpty(_0x1d595d))return;if(isSearchTermsLimited(_0x1d595d))return;yield apiSubscribeSaga([getCoreBackend()[_0x40c4aa(-_0x2b24ba._0x173dbb,-0x14f,-0x14e,-_0x2b24ba._0x526f47)+_0x40c4aa(-_0x2b24ba._0x59c06b,-_0x2b24ba._0x357fa4,-0x15a,-_0x2b24ba._0x5db893)+'am'],_0x3ce27a,_0x1d595d],function*_0x8ac31f(_0x2c4dbd){const _0x490367=[_0x2c4dbd],[_0x4969f5]=yield chatMessagesTransform({'roomId':_0x3ce27a,'ignoreBlocked':!![],'coreEvents':_0x490367});!isEmpty(_0x4969f5)&&(yield put(addChatSearchMessages(_0x4969f5)));},{'onError':_0x2f0b52=>taskErrorSaga(_0x53edfe(0x323,0x31f,0x327,0x32e)+_0x53edfe(0x328,0x330,0x329,0x31f)+'ga',_0x2f0b52),'onCleanup':function*_0x869184({apiClose:_0x54c443}){_0x54c443&&(yield put(setChatSearchMessagesDone()));}});}export function*chatSearchActiveMessageHandler(){const _0x3ba10e=yield select(getChatSearchLive);if(!_0x3ba10e)return;const _0x45a75=yield select(getChatSearchActiveId);if(!_0x45a75)return;yield put(chatMessageJumpToCmd({'messageId':_0x45a75,'highlight':!![]}));}export function*chatSearchJumpFirstFound(){const _0x124774=yield select(getChatSearchLive),_0x601021=yield select(getChatSearchResultsCount),{searchResultNoJumpCount:_0x594387}=yield select(getChatConfig);if(!_0x124774||!_0x601021||_0x601021>_0x594387)return;const _0x534d19=yield select(getChatSearchActiveIndex);if(_0x534d19!==EMPTY_INDEX)return;yield put(chatSearchGoNextMsgCmd());}export function*chatSearchSaga({roomId:_0x3f36b9}){const _0x47177b={_0x396b0a:0x317,_0xa71a8f:0x319,_0x19602f:0x31f,_0x19f632:0x1f9,_0x4739b6:0x1f3},_0x1a953a={_0x2c8ad0:0x297},_0x31d76a={_0x20be80:0x27c};function _0x2623cc(_0x38ed21,_0x5e18c5,_0x448786,_0x39468f){return _0x5606(_0x39468f-_0x31d76a._0x20be80,_0x38ed21);}function _0xa1ac33(_0x3f49ea,_0x28cf80,_0x5cd7f9,_0x5a9819){return _0x5606(_0x28cf80- -_0x1a953a._0x2c8ad0,_0x5cd7f9);}try{const _0x14fb09=yield select(getChatSearchLive);if(!_0x14fb09)return;const {searchFirstFounDelay:_0x3aeb34,searchInputThrottle:_0x1c8027}=yield select(getChatConfig);yield debounce(_0x1c8027,chatSearchInputEvt,chatSearchInputSaga),yield takeEvery(setChatSearchTerms,chatSearchMessagesSaga,{'roomId':_0x3f36b9}),yield takeEvery([chatMessageClickEvt,chatSearchGoNextMsgCmd,chatSearchGoPrevMsgCmd],chatSearchActiveMessageHandler),yield debounce(_0x3aeb34,addChatSearchMessages,chatSearchJumpFirstFound),yield take(sendChatMessageSubmit),yield put(chatSearchDisable());}catch(_0x5a84df){yield taskErrorSaga(_0x2623cc(_0x47177b._0x396b0a,_0x47177b._0xa71a8f,0x319,_0x47177b._0x19602f)+_0xa1ac33(-_0x47177b._0x19f632,-0x1fb,-_0x47177b._0x4739b6,-0x1f9),_0x5a84df);}}