8d2743d3a6c3d5f16b2fbcca99cee0f11abdaafd
[motion2.git] / server / api / realtime / realtime.controller.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xc1c6=['predictiveIntervalAvgTalktime','map','get','paused','available','busy','pick','filter','queue','length','some','connectedlinenum','internal','toString','UserId','accountcode','online','loggedInDb','push','findAll','QueueId','agents','idle','unavailable','ringing','isNil','faxPause','mailPause','smsPause','voicePause','whatsappPause','every','voiceStatus','pause','chatStatus','faxStatus','mailStatus','whatsappStatus','unknown','*pause','userpic','lastLoginAt','lastPauseAt','address','chatPause','chatCapacity','openchannelCapacity','mailCapacity','smsCapacity','whatsappCapacity','chatCurrentCapacity','mailCurrentCapacity','smsCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','smsStatus','chatStatusTime','openchannelStatusTime','mailStatusTime','smsStatusTime','whatsappStatusTime','faxStatusTime','screenrecording','phoneBarEnableScreenRecordingByAgent','phoneBarEnableAutomaticScreenRecording','routealias','openchannelPause','resolve','rawAttributes','fieldName','type','key','role','agent','getOptions','raw','user','userProfileId','nolimit','query','UserProfile','getResources','User','findAndCountAll','rows','omit','globalStatusFilter','pauseTypeFilter','pauseType','getQueues','fax','includes','channel','toLowerCase','Invalid\x20channel','QueueCampaigns','all','util','lodash','jayson/promise','../../config/logger','../../mysqldb','client','http','offset','undefined','limit','count','status','set','Content-Range','stack','name','send','request','Agents','then','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','merge','voice','startCase','Queues','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','VoiceQueuesChannels','Unable\x20to\x20retrieve\x20voice\x20queues\x20channels','loggedIn','waiting','talking','outbound','pTalking','originated','message','dialActive','startPredictive','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit'];(function(_0x536d3d,_0x76573e){var _0xea324f=function(_0x1b8c48){while(--_0x1b8c48){_0x536d3d['push'](_0x536d3d['shift']());}};_0xea324f(++_0x76573e);}(_0xc1c6,0xf7));var _0x6c1c=function(_0x16a701,_0x58f832){_0x16a701=_0x16a701-0x0;var _0x412830=_0xc1c6[_0x16a701];return _0x412830;};'use strict';var util=require(_0x6c1c('0x0'));var _=require(_0x6c1c('0x1'));var jayson=require(_0x6c1c('0x2'));var qs=require('../../components/parsers/qs');var logger=require(_0x6c1c('0x3'))('api');var db=require(_0x6c1c('0x4'))['db'];var amiClient=jayson[_0x6c1c('0x5')][_0x6c1c('0x6')]({'port':0x232a});var routingClient=jayson['client']['http']({'port':0x232c});function respondWithFilteredResult(_0x32af84,_0x524a6b){return function(_0x50c1bb){if(_0x50c1bb){var _0x582bec=typeof _0x524a6b[_0x6c1c('0x7')]===_0x6c1c('0x8')&&typeof _0x524a6b[_0x6c1c('0x9')]===_0x6c1c('0x8');var _0x4b66ec=_0x50c1bb[_0x6c1c('0xa')];var _0x3ca985=_0x582bec?0x0:_0x524a6b['offset'];var _0x147c7b=_0x582bec?_0x50c1bb[_0x6c1c('0xa')]:_0x524a6b[_0x6c1c('0x7')]+_0x524a6b[_0x6c1c('0x9')];var _0x49fb01;if(_0x147c7b>=_0x4b66ec){_0x147c7b=_0x4b66ec;_0x49fb01=0xc8;}else{_0x49fb01=0xce;}_0x32af84[_0x6c1c('0xb')](_0x49fb01);return _0x32af84[_0x6c1c('0xc')](_0x6c1c('0xd'),_0x3ca985+'-'+_0x147c7b+'/'+_0x4b66ec)['json'](_0x50c1bb);}return null;};}function handleError(_0x412717,_0x12a9e6){_0x12a9e6=_0x12a9e6||0x1f4;return function(_0x2067bd){logger['error'](_0x2067bd[_0x6c1c('0xe')]);if(_0x2067bd['name']){delete _0x2067bd[_0x6c1c('0xf')];}_0x412717[_0x6c1c('0xb')](_0x12a9e6)[_0x6c1c('0x10')](_0x2067bd);};}function getRealtimeAgents(){return new Promise(function(_0x154107,_0x350e6f){return amiClient[_0x6c1c('0x11')](_0x6c1c('0x12'),{})[_0x6c1c('0x13')](function(_0x448f35){if(_0x448f35['error'])throw new Error(_0x6c1c('0x14'));var _0x174657=_0x448f35['result'];return routingClient[_0x6c1c('0x11')](_0x6c1c('0x12'),{})['then'](function(_0x137770){if(_0x137770['error'])throw new Error(_0x6c1c('0x15'));var _0x1a0ab9=_0x137770['result'];return _0x154107(_[_0x6c1c('0x16')]({},_0x174657,_0x1a0ab9));});})['catch'](function(_0x2db60e){_0x350e6f(_0x2db60e);});});}function getRealtimeQueues(_0x3527bf,_0x23470e){return new Promise(function(_0x211f49,_0x1acf7f){var _0x1efb19=_0x23470e===_0x6c1c('0x17')?amiClient:routingClient;return _0x1efb19[_0x6c1c('0x11')](_[_0x6c1c('0x18')](_0x23470e)+_0x6c1c('0x19'),_0x3527bf)[_0x6c1c('0x13')](function(_0x450b1f){if(_0x450b1f[_0x6c1c('0x1a')])throw new Error(util[_0x6c1c('0x1b')](_0x6c1c('0x1c'),_0x23470e));return _0x211f49(_0x450b1f[_0x6c1c('0x1d')]);})[_0x6c1c('0x1e')](function(_0x12c638){_0x1acf7f(_0x12c638);});});}function getRealtimeVoiceQueueChannels(){return new Promise(function(_0x3a3f13,_0x1dba08){return amiClient[_0x6c1c('0x11')](_0x6c1c('0x1f'),{})[_0x6c1c('0x13')](function(_0x7ff10d){if(_0x7ff10d[_0x6c1c('0x1a')])throw new Error(_0x6c1c('0x20'));return _0x3a3f13(_0x7ff10d[_0x6c1c('0x1d')]);})[_0x6c1c('0x1e')](function(_0x2feaf4){_0x1dba08(_0x2feaf4);});});}function initializeQueues(_0x5f4568,_0x2595c3,_0x4d73aa,_0x10e9f7){var _0x4c23f8=[_0x6c1c('0x21'),'available',_0x6c1c('0x22'),_0x6c1c('0x23'),'paused'];if(_0x4d73aa===_0x6c1c('0x17')&&_0x10e9f7===_0x6c1c('0x24')){_0x4c23f8['push'](_0x6c1c('0x25'),_0x6c1c('0x26'),_0x6c1c('0x27'),_0x6c1c('0x28'),'dialMethod','Trunk',_0x6c1c('0x29'),_0x6c1c('0x2a'),_0x6c1c('0x2b'),_0x6c1c('0x2c'),_0x6c1c('0x2d'),_0x6c1c('0x2e'),'dialPredictiveInterval',_0x6c1c('0x2f'),_0x6c1c('0x30'),'predictiveIntervalAvailable',_0x6c1c('0x31'),_0x6c1c('0x32'),_0x6c1c('0x33'),_0x6c1c('0x34'),'predictiveIntervalAvgHoldtime',_0x6c1c('0x35'));}return _0x5f4568[_0x6c1c('0x36')](function(_0x245433){var _0x5adddc=_0x245433[_0x6c1c('0x37')]({'plain':!![]});_0x5adddc['agents']=[];_0x5adddc[_0x6c1c('0x38')]=0x0;_0x5adddc['loggedInDb']=0x0;_0x5adddc[_0x6c1c('0x21')]=0x0;_0x5adddc[_0x6c1c('0x39')]=0x0;_0x5adddc[_0x6c1c('0x22')]=0x0;if(_0x4d73aa==='voice'){_0x5adddc['talking']=0x0;_0x5adddc[_0x6c1c('0x3a')]=0x0;if(_0x10e9f7===_0x6c1c('0x24')){_0x5adddc[_0x6c1c('0x25')]=0x0;_0x5adddc['originated']=0x0;}}var _0x1a9132=_['find'](_0x2595c3,['id',_0x5adddc['id']]);if(_0x1a9132)_['merge'](_0x5adddc,_[_0x6c1c('0x3b')](_0x1a9132,_0x4c23f8));return _0x5adddc;});}function updateAgentVoiceStatus(_0xbafcb3,_0x30d0fe,_0x3215a9){var _0x4bed10=_[_0x6c1c('0x3c')](_0x3215a9,[_0x6c1c('0x3d'),_0x30d0fe[_0x6c1c('0xf')]]);if(_0x4bed10[_0x6c1c('0x3e')]===0x0)return _0xbafcb3[_0x6c1c('0x3a')]=!![];if(_[_0x6c1c('0x3f')](_0x4bed10,[_0x6c1c('0x40'),_0xbafcb3[_0x6c1c('0x41')][_0x6c1c('0x42')]()]))return _0xbafcb3[_0x6c1c('0x23')]=!![];if(!_0xbafcb3['talking'])return _0xbafcb3[_0x6c1c('0x3a')]=!![];}function getVoiceQueueAgents(_0x464549,_0xf053b1,_0x31cf03,_0x1cb3b4){var _0x5c8177=_['find'](_0xf053b1,['id',_0x464549['id']]);if(!_0x5c8177)return _0x464549;return _0x5c8177['getMembers']({'raw':!![]})[_0x6c1c('0x13')](function(_0x57ba31){for(var _0x4d7dc6=0x0;_0x4d7dc6<_0x57ba31[_0x6c1c('0x3e')];_0x4d7dc6++){var _0x37244e=_['find'](_0x31cf03,['id',_0x57ba31[_0x4d7dc6][_0x6c1c('0x43')]]);if(!_0x37244e){_0x37244e={'id':_0x57ba31[_0x4d7dc6][_0x6c1c('0x43')],'name':_0x57ba31[_0x4d7dc6][_0x6c1c('0x43')],'accountcode':'','online':![]};}var _0x5abdcc={'id':_0x37244e['id'],'name':_0x37244e[_0x6c1c('0xf')],'internal':_0x37244e[_0x6c1c('0x44')],'online':Boolean(_0x37244e['online']),'paused':Boolean(_0x57ba31[_0x4d7dc6][_0x6c1c('0x38')])};if(_0x37244e['voiceStatus']===_0x6c1c('0x23'))updateAgentVoiceStatus(_0x5abdcc,_0x464549,_0x1cb3b4);if(_0x5abdcc[_0x6c1c('0x45')])_0x464549[_0x6c1c('0x46')]++;if(_0x5abdcc[_0x6c1c('0x3a')])_0x464549[_0x6c1c('0x3a')]++;if(_0x5abdcc['paused']&&!_0x5abdcc[_0x6c1c('0x3a')]&&!_0x5abdcc[_0x6c1c('0x23')])_0x464549[_0x6c1c('0x38')]++;_0x464549['agents'][_0x6c1c('0x47')](_0x5abdcc);}return _0x464549;});}function getQueueAgents(_0x52866c,_0x28d141,_0x301f86){var _0x2437a0='User'+_[_0x6c1c('0x18')](_0x301f86)+'Queue';var _0x4bedf4=_0x301f86+'Pause';return db[_0x2437a0][_0x6c1c('0x48')]({'where':{[_[_0x6c1c('0x18')](_0x301f86)+_0x6c1c('0x49')]:_0x52866c['id']},'raw':!![]})[_0x6c1c('0x13')](function(_0x152f11){for(var _0x22e5ca=0x0;_0x22e5ca<_0x152f11[_0x6c1c('0x3e')];_0x22e5ca++){var _0x167f3b=_['find'](_0x28d141,['id',_0x152f11[_0x22e5ca][_0x6c1c('0x43')]]);if(!_0x167f3b){_0x167f3b={'id':_0x152f11[_0x22e5ca][_0x6c1c('0x43')],'name':_0x152f11[_0x22e5ca]['UserId'],'online':![],['pauseField']:![]};}var _0x2b4706={'id':_0x167f3b['id'],'name':_0x167f3b['name'],'online':Boolean(_0x167f3b[_0x6c1c('0x45')]),'paused':Boolean(_0x167f3b[_0x4bedf4])};if(_0x2b4706[_0x6c1c('0x45')])_0x52866c[_0x6c1c('0x46')]++;_0x52866c[_0x6c1c('0x4a')][_0x6c1c('0x47')](_0x2b4706);}return _0x52866c;});}function isIdle(_0x5ea4af){return _0x5ea4af===_0x6c1c('0x4b')||_0x5ea4af==='unknown'||_0x5ea4af===_0x6c1c('0x4c')||_0x5ea4af===_0x6c1c('0x4d')||_[_0x6c1c('0x4e')](_0x5ea4af);}function isAgentPaused(_0xa06377,_0x8d614){var _0x26cf7f=[_0xa06377['chatPause'],_0xa06377[_0x6c1c('0x4f')],_0xa06377[_0x6c1c('0x50')],_0xa06377['openchannelPause'],_0xa06377[_0x6c1c('0x51')],_0xa06377[_0x6c1c('0x52')],_0xa06377[_0x6c1c('0x53')]];if(!_0x8d614)return _[_0x6c1c('0x54')](_0x26cf7f);var _0x5badb4=_[_0x6c1c('0x3c')](_0x26cf7f);return _0x5badb4[_0x6c1c('0x3e')]>0x0&&_0x5badb4[_0x6c1c('0x3e')]<_0x26cf7f['length']?!![]:![];}function isAgentIdle(_0x5b8d69){if(_0x5b8d69['voiceStatus']!=='idle'&&_0x5b8d69['voicePause']){_0x5b8d69[_0x6c1c('0x55')]=_0x6c1c('0x56');return![];}return _['every']([_0x5b8d69[_0x6c1c('0x57')],_0x5b8d69[_0x6c1c('0x58')],_0x5b8d69[_0x6c1c('0x59')],_0x5b8d69['openchannelStatus'],_0x5b8d69['smsStatus'],_0x5b8d69[_0x6c1c('0x55')],_0x5b8d69[_0x6c1c('0x5a')]],isIdle);}function getAgentStatus(_0x4dc691){var _0x29d9d1=_0x6c1c('0x5b');if(isAgentPaused(_0x4dc691))_0x29d9d1=_0x6c1c('0x56');else if(isAgentPaused(_0x4dc691,!![]))_0x29d9d1=_0x6c1c('0x5c');else if(isAgentIdle(_0x4dc691))_0x29d9d1=_0x6c1c('0x4b');else _0x29d9d1=_0x6c1c('0x3a');return _0x29d9d1;}exports['getAgents']=function(_0x165def,_0x468168){var _0x501f1b={'count':0x0,'rows':[]},_0x495aa7={},_0x69f90b,_0x1c6432,_0x3a2fef=[_0x6c1c('0x5d'),_0x6c1c('0x45'),_0x6c1c('0x5e'),_0x6c1c('0x5f'),'pauseType','lastPauseAt',_0x6c1c('0x41'),_0x6c1c('0x60'),_0x6c1c('0x61'),'openchannelPause','mailPause',_0x6c1c('0x51'),_0x6c1c('0x53'),'faxPause',_0x6c1c('0x52'),_0x6c1c('0x62'),_0x6c1c('0x63'),_0x6c1c('0x64'),_0x6c1c('0x65'),_0x6c1c('0x66'),'faxCapacity',_0x6c1c('0x67'),'openchannelCurrentCapacity',_0x6c1c('0x68'),_0x6c1c('0x69'),_0x6c1c('0x6a'),_0x6c1c('0x6b'),'chatStatus','openchannelStatus',_0x6c1c('0x59'),_0x6c1c('0x6c'),_0x6c1c('0x5a'),'faxStatus',_0x6c1c('0x55'),_0x6c1c('0x6d'),_0x6c1c('0x6e'),_0x6c1c('0x6f'),_0x6c1c('0x70'),_0x6c1c('0x71'),_0x6c1c('0x72'),'voiceStatusTime',_0x6c1c('0x3d'),'destconnectedlinenum',_0x6c1c('0x73'),_0x6c1c('0x74'),_0x6c1c('0x75'),_0x6c1c('0x76')],_0x58ac8d=['chatPause',_0x6c1c('0x77'),_0x6c1c('0x50'),_0x6c1c('0x51'),_0x6c1c('0x53'),_0x6c1c('0x4f'),_0x6c1c('0x52'),_0x6c1c('0x45')];Promise[_0x6c1c('0x78')]()[_0x6c1c('0x13')](function(){var _0x13963a=_[_0x6c1c('0x36')](db['User'][_0x6c1c('0x79')],function(_0x6b05c7){return{'name':_0x6b05c7[_0x6c1c('0x7a')],'type':_0x6b05c7[_0x6c1c('0x7b')][_0x6c1c('0x7c')]};});_0x165def['query'][_0x6c1c('0x7d')]=_0x6c1c('0x7e');_0x165def['query'][_0x6c1c('0x45')]=!![];_0x495aa7=qs[_0x6c1c('0x7f')](_0x13963a,_0x165def);_0x495aa7[_0x6c1c('0x80')]=!![];if(_0x165def['user'][_0x6c1c('0x7d')]===_0x6c1c('0x81')){var _0x1a9f88={'params':{'id':_0x165def[_0x6c1c('0x81')][_0x6c1c('0x82')]},'query':{'section':_0x6c1c('0x12'),'role':'agent','online':!![],'nolimit':_0x165def['query'][_0x6c1c('0x83')],'sort':_0x165def[_0x6c1c('0x84')]['sort'],'filter':_0x165def['query']['filter'],'raw':!![]}};return db[_0x6c1c('0x85')][_0x6c1c('0x86')](_0x1a9f88);}return db[_0x6c1c('0x87')][_0x6c1c('0x88')](_0x495aa7);})['then'](function(_0x13dfa3){_0x501f1b['count']=_0x13dfa3['count'];_0x69f90b=_0x13dfa3['rows'];return getRealtimeAgents();})[_0x6c1c('0x13')](function(_0x1e20a9){_0x1c6432=_0x1e20a9[_0x6c1c('0x89')];return _0x69f90b[_0x6c1c('0x36')](function(_0x10bfb4){var _0x376074=_['find'](_0x1c6432,['id',_0x10bfb4['id']]);if(_0x376074)_[_0x6c1c('0x16')](_0x10bfb4,_[_0x6c1c('0x3b')](_[_0x6c1c('0x8a')](_0x376074,_0x58ac8d),_0x3a2fef));_0x10bfb4['globalStatus']=getAgentStatus(_0x10bfb4);return _0x10bfb4;});})['then'](function(_0x4ea97d){if(_0x165def[_0x6c1c('0x84')][_0x6c1c('0x8b')]){var _0x5e7dd9=_[_0x6c1c('0x3c')](_0x4ea97d,['globalStatus',_0x165def[_0x6c1c('0x84')][_0x6c1c('0x8b')]]);if(_0x165def[_0x6c1c('0x84')][_0x6c1c('0x8c')]){_0x5e7dd9=_['filter'](_0x5e7dd9,[_0x6c1c('0x8d'),_0x165def[_0x6c1c('0x84')]['pauseTypeFilter']]);}}_0x501f1b['rows']=_0x5e7dd9||_0x4ea97d;return _0x501f1b;})[_0x6c1c('0x13')](respondWithFilteredResult(_0x468168,_0x495aa7))[_0x6c1c('0x1e')](handleError(_0x468168,null));};exports[_0x6c1c('0x8e')]=function(_0x52b1a6,_0x13f292){var _0x15148e=['mail','chat','sms','openchannel',_0x6c1c('0x8f'),'whatsapp',_0x6c1c('0x17')];var _0x384d83={'count':0x0,'rows':[]},_0xc19e0d={},_0x55d39f,_0x2b3600,_0x21a0b5,_0x1f25d1,_0x2822d1;Promise[_0x6c1c('0x78')]()['then'](function(){if(_0x52b1a6[_0x6c1c('0x84')]['channel']){if(!_[_0x6c1c('0x90')](_0x15148e,_0x52b1a6[_0x6c1c('0x84')][_0x6c1c('0x91')][_0x6c1c('0x92')]()))throw new Error(_0x6c1c('0x93'));_0x55d39f=_0x52b1a6[_0x6c1c('0x84')][_0x6c1c('0x91')][_0x6c1c('0x92')]();}var _0x57998b=_[_0x6c1c('0x18')](_0x55d39f)+'Queue';var _0x47b53d=_[_0x6c1c('0x36')](db[_0x57998b][_0x6c1c('0x79')],function(_0x350b9a){return{'name':_0x350b9a[_0x6c1c('0x7a')],'type':_0x350b9a['type'][_0x6c1c('0x7c')]};});_0xc19e0d=qs['getOptions'](_0x47b53d,_0x52b1a6);if(_0x52b1a6[_0x6c1c('0x81')]['role']===_0x6c1c('0x81')){var _0x23332d={'params':{'id':_0x52b1a6[_0x6c1c('0x81')]['userProfileId']},'query':{'section':_0x55d39f===_0x6c1c('0x17')&&_0x52b1a6[_0x6c1c('0x84')][_0x6c1c('0x7b')]==='outbound'?_0x6c1c('0x94'):_[_0x6c1c('0x18')](_0x55d39f)+_0x6c1c('0x19'),'type':_0x52b1a6[_0x6c1c('0x84')]['type'],'nolimit':!![],'sort':_0x6c1c('0xf'),'filter':_0x52b1a6[_0x6c1c('0x84')][_0x6c1c('0x3c')]}};return db[_0x6c1c('0x85')][_0x6c1c('0x86')](_0x23332d);}return db[_0x57998b]['findAndCountAll'](_0xc19e0d);})[_0x6c1c('0x13')](function(_0x3ca893){_0x384d83[_0x6c1c('0xa')]=_0x3ca893[_0x6c1c('0xa')];_0x2b3600=_0x3ca893['rows'];return getRealtimeQueues(_0x52b1a6,_0x55d39f);})[_0x6c1c('0x13')](function(_0x44d8c4){_0x1f25d1=_0x44d8c4[_0x6c1c('0x89')];return getRealtimeAgents();})['then'](function(_0x221b49){_0x21a0b5=_0x221b49[_0x6c1c('0x89')];if(_0x55d39f!='voice')return;return getRealtimeVoiceQueueChannels();})[_0x6c1c('0x13')](function(_0x50b56b){_0x2822d1=_0x50b56b?_0x50b56b[_0x6c1c('0x89')]:[];return initializeQueues(_0x2b3600,_0x1f25d1,_0x55d39f,_0x52b1a6[_0x6c1c('0x84')][_0x6c1c('0x7b')]);})[_0x6c1c('0x13')](function(_0x571ec4){var _0x3c52e6=_0x571ec4[_0x6c1c('0x36')](function(_0xfba0b0){if(_0x55d39f==='voice')return getVoiceQueueAgents(_0xfba0b0,_0x2b3600,_0x21a0b5,_0x2822d1);else return getQueueAgents(_0xfba0b0,_0x21a0b5,_0x55d39f);});return Promise[_0x6c1c('0x95')](_0x3c52e6);})[_0x6c1c('0x13')](function(_0x4361e5){_0x384d83[_0x6c1c('0x89')]=_0x4361e5;return _0x384d83;})['then'](respondWithFilteredResult(_0x13f292,_0xc19e0d))[_0x6c1c('0x1e')](handleError(_0x13f292,null));};