Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / chatQueue / chatQueue.controller.js
index 259e2ed..c02a018 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf7e=['team_has_chat_queues','join','user_has_teams','clone','ut.UserId\x20=\x20?','push','SELECT','every','TeamId','includes','all','union','compact','value','transaction','isEmpty','addAgents','omit','spread','removeAgents','isArray','userChatQueue:remove','getAgents','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatQueue.socket','register','jayson/promise','client','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','error','message','result','catch','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','get','ChatQueues','name','index','map','ChatQueue','rawAttributes','fieldName','key','model','query','filters','intersection','fields','attributes','length','order','sort','where','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','keys','include','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getMembers','findOne','UserChatQueue','hasOwnProperty','nolimit','pick','ChatQueueId','User','UserId','agent','chatPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','Team','ids','interface','flatMap','Agents','sequelize','addTeams','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','field','tq.TeamId','from'];(function(_0x15f852,_0x530d85){var _0x387460=function(_0x4aa3df){while(--_0x4aa3df){_0x15f852['push'](_0x15f852['shift']());}};_0x387460(++_0x530d85);}(_0xbf7e,0xb0));var _0xebf7=function(_0x2de30b,_0x450092){_0x2de30b=_0x2de30b-0x0;var _0x1c3e78=_0xbf7e[_0x2de30b];return _0x1c3e78;};'use strict';var pdf=require(_0xebf7('0x0'));var emlformat=require(_0xebf7('0x1'));var rimraf=require(_0xebf7('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xebf7('0x3'));var rp=require(_0xebf7('0x4'));var moment=require('moment');var BPromise=require(_0xebf7('0x5'));var Mustache=require(_0xebf7('0x6'));var util=require(_0xebf7('0x7'));var path=require(_0xebf7('0x8'));var sox=require(_0xebf7('0x9'));var csv=require(_0xebf7('0xa'));var ejs=require(_0xebf7('0xb'));var fs=require('fs');var _=require(_0xebf7('0xc'));var squel=require(_0xebf7('0xd'));var crypto=require(_0xebf7('0xe'));var jsforce=require(_0xebf7('0xf'));var deskjs=require(_0xebf7('0x10'));var toCsv=require(_0xebf7('0xa'));var querystring=require(_0xebf7('0x11'));var Papa=require('papaparse');var Redis=require(_0xebf7('0x12'));var authService=require(_0xebf7('0x13'));var qs=require(_0xebf7('0x14'));var as=require(_0xebf7('0x15'));var hardwareService=require(_0xebf7('0x16'));var logger=require('../../config/logger')(_0xebf7('0x17'));var utils=require(_0xebf7('0x18'));var config=require(_0xebf7('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xebf7('0x1a'))['db'];config[_0xebf7('0x1b')]=_[_0xebf7('0x1c')](config[_0xebf7('0x1b')],{'host':_0xebf7('0x1d'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xebf7('0x1e'))[_0xebf7('0x1f')](socket);var jayson=require(_0xebf7('0x20'));var client=jayson[_0xebf7('0x21')][_0xebf7('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x244bcf,_0x2ffdcf,_0x2deaba,_0x5af253){return new BPromise(function(_0x4ee11e,_0x288597){var _0x24690b=_0x5af253||client;return _0x24690b[_0xebf7('0x23')](_0x244bcf,_0x2deaba)[_0xebf7('0x24')](function(_0x14d192){logger[_0xebf7('0x25')](_0xebf7('0x26'),_0x2ffdcf,_0xebf7('0x27'));logger[_0xebf7('0x28')](_0xebf7('0x29'),_0x2ffdcf,_0xebf7('0x27'),JSON['stringify'](_0x14d192));if(_0x14d192[_0xebf7('0x2a')]){if(_0x14d192[_0xebf7('0x2a')]['code']===0x1f4){logger[_0xebf7('0x2a')](_0xebf7('0x26'),_0x2ffdcf,_0x14d192[_0xebf7('0x2a')][_0xebf7('0x2b')]);return _0x288597(_0x14d192['error'][_0xebf7('0x2b')]);}logger['error']('ChatQueue,\x20%s,\x20%s',_0x2ffdcf,_0x14d192[_0xebf7('0x2a')][_0xebf7('0x2b')]);return _0x4ee11e(_0x14d192['error']['message']);}else{logger[_0xebf7('0x25')](_0xebf7('0x26'),_0x2ffdcf,_0xebf7('0x27'));_0x4ee11e(_0x14d192[_0xebf7('0x2c')][_0xebf7('0x2b')]);}})[_0xebf7('0x2d')](function(_0x50eb19){logger[_0xebf7('0x2a')]('ChatQueue,\x20%s,\x20%s',_0x2ffdcf,_0x50eb19);_0x288597(_0x50eb19);});});}function respondWithStatusCode(_0x22cbf0,_0x226ebc){_0x226ebc=_0x226ebc||0xcc;return function(_0x532665){if(_0x532665){return _0x22cbf0['sendStatus'](_0x226ebc);}return _0x22cbf0[_0xebf7('0x2e')](_0x226ebc)[_0xebf7('0x2f')]();};}function respondWithResult(_0x1fd59a,_0x1c495a){_0x1c495a=_0x1c495a||0xc8;return function(_0x223fe3){if(_0x223fe3){return _0x1fd59a[_0xebf7('0x2e')](_0x1c495a)[_0xebf7('0x30')](_0x223fe3);}};}function respondWithFilteredResult(_0x2fbdde,_0xb06026){return function(_0x51a4ce){if(_0x51a4ce){var _0x3f7283=_0x51a4ce[_0xebf7('0x31')],_0x1afd51=_0xb06026[_0xebf7('0x32')],_0x3dc2aa=_0xb06026[_0xebf7('0x32')]+_0xb06026[_0xebf7('0x33')],_0x1718b5;if(_0x3dc2aa>=_0x3f7283){_0x3dc2aa=_0x3f7283;_0x1718b5=0xc8;}else{_0x1718b5=0xce;}_0x2fbdde[_0xebf7('0x2e')](_0x1718b5);return _0x2fbdde[_0xebf7('0x34')](_0xebf7('0x35'),_0x1afd51+'-'+_0x3dc2aa+'/'+_0x3f7283)[_0xebf7('0x30')](_0x51a4ce);}return null;};}function patchUpdates(_0x5b335c){return function(_0x479ec6){try{jsonpatch[_0xebf7('0x36')](_0x479ec6,_0x5b335c,!![]);}catch(_0x5b205f){return BPromise[_0xebf7('0x37')](_0x5b205f);}return _0x479ec6['save']();};}function saveUpdates(_0x4f04be,_0x41648d){return function(_0xc246bb){if(_0xc246bb){return _0xc246bb[_0xebf7('0x38')](_0x4f04be)[_0xebf7('0x24')](function(_0x1c94b1){return _0x1c94b1;});}return null;};}function removeEntity(_0x19f277,_0x34f7a8){return function(_0x40e176){if(_0x40e176){return _0x40e176[_0xebf7('0x39')]()['then'](function(){var _0x5ca514=_0x40e176[_0xebf7('0x3a')]({'plain':!![]});var _0x5567d5=_0xebf7('0x3b');return db['UserProfileResource']['destroy']({'where':{'type':_0x5567d5,'resourceId':_0x5ca514['id']}})[_0xebf7('0x24')](function(){return _0x40e176;});})[_0xebf7('0x24')](function(){_0x19f277['status'](0xcc)[_0xebf7('0x2f')]();});}};}function handleEntityNotFound(_0x387ed7,_0x1878ac){return function(_0x59b24c){if(!_0x59b24c){_0x387ed7['sendStatus'](0x194);}return _0x59b24c;};}function handleError(_0x38fc7a,_0xd3b1ea){_0xd3b1ea=_0xd3b1ea||0x1f4;return function(_0x12343a){logger[_0xebf7('0x2a')](_0x12343a['stack']);if(_0x12343a[_0xebf7('0x3c')]){delete _0x12343a['name'];}_0x38fc7a['status'](_0xd3b1ea)['send'](_0x12343a);};}exports[_0xebf7('0x3d')]=function(_0x51951c,_0x1bd6fb){var _0x4fbd5d={},_0x1feaa0={},_0x2c3a4c={'count':0x0,'rows':[]};var _0x4cfce0=_[_0xebf7('0x3e')](db[_0xebf7('0x3f')][_0xebf7('0x40')],function(_0x219deb){return{'name':_0x219deb[_0xebf7('0x41')],'type':_0x219deb['type'][_0xebf7('0x42')]};});_0x1feaa0[_0xebf7('0x43')]=_[_0xebf7('0x3e')](_0x4cfce0,_0xebf7('0x3c'));_0x1feaa0[_0xebf7('0x44')]=_['keys'](_0x51951c[_0xebf7('0x44')]);_0x1feaa0[_0xebf7('0x45')]=_[_0xebf7('0x46')](_0x1feaa0[_0xebf7('0x43')],_0x1feaa0[_0xebf7('0x44')]);_0x4fbd5d['attributes']=_[_0xebf7('0x46')](_0x1feaa0['model'],qs[_0xebf7('0x47')](_0x51951c['query']['fields']));_0x4fbd5d[_0xebf7('0x48')]=_0x4fbd5d[_0xebf7('0x48')][_0xebf7('0x49')]?_0x4fbd5d[_0xebf7('0x48')]:_0x1feaa0['model'];if(!_0x51951c[_0xebf7('0x44')]['hasOwnProperty']('nolimit')){_0x4fbd5d['limit']=qs[_0xebf7('0x33')](_0x51951c[_0xebf7('0x44')][_0xebf7('0x33')]);_0x4fbd5d['offset']=qs['offset'](_0x51951c['query'][_0xebf7('0x32')]);}_0x4fbd5d[_0xebf7('0x4a')]=qs[_0xebf7('0x4b')](_0x51951c[_0xebf7('0x44')][_0xebf7('0x4b')]);_0x4fbd5d[_0xebf7('0x4c')]=qs[_0xebf7('0x45')](_['pick'](_0x51951c[_0xebf7('0x44')],_0x1feaa0[_0xebf7('0x45')]),_0x4cfce0);if(_0x51951c['query'][_0xebf7('0x4d')]){_0x4fbd5d[_0xebf7('0x4c')]=_[_0xebf7('0x4e')](_0x4fbd5d[_0xebf7('0x4c')],{'$or':_[_0xebf7('0x3e')](_0x4cfce0,function(_0x22c21c){if(_0x22c21c['type']!==_0xebf7('0x4f')){var _0x5d3e77={};_0x5d3e77[_0x22c21c[_0xebf7('0x3c')]]={'$like':'%'+_0x51951c['query'][_0xebf7('0x4d')]+'%'};return _0x5d3e77;}})});}_0x4fbd5d=_[_0xebf7('0x4e')]({},_0x4fbd5d,_0x51951c[_0xebf7('0x50')]);var _0x555a5d={'where':_0x4fbd5d[_0xebf7('0x4c')]};return db['ChatQueue'][_0xebf7('0x31')](_0x555a5d)[_0xebf7('0x24')](function(_0xf35ed5){_0x2c3a4c[_0xebf7('0x31')]=_0xf35ed5;if(_0x51951c[_0xebf7('0x44')][_0xebf7('0x51')]){_0x4fbd5d['include']=[{'all':!![]}];}return db[_0xebf7('0x3f')][_0xebf7('0x52')](_0x4fbd5d);})['then'](function(_0x2ce3d0){_0x2c3a4c[_0xebf7('0x53')]=_0x2ce3d0;return _0x2c3a4c;})['then'](respondWithFilteredResult(_0x1bd6fb,_0x4fbd5d))[_0xebf7('0x2d')](handleError(_0x1bd6fb,null));};exports[_0xebf7('0x54')]=function(_0x25108a,_0x58318b){var _0x5f21e2={'raw':!![],'where':{'id':_0x25108a[_0xebf7('0x55')]['id']}},_0x9fc058={};_0x9fc058[_0xebf7('0x43')]=_[_0xebf7('0x56')](db[_0xebf7('0x3f')][_0xebf7('0x40')]);_0x9fc058[_0xebf7('0x44')]=_['keys'](_0x25108a[_0xebf7('0x44')]);_0x9fc058['filters']=_[_0xebf7('0x46')](_0x9fc058[_0xebf7('0x43')],_0x9fc058['query']);_0x5f21e2[_0xebf7('0x48')]=_[_0xebf7('0x46')](_0x9fc058['model'],qs['fields'](_0x25108a['query'][_0xebf7('0x47')]));_0x5f21e2[_0xebf7('0x48')]=_0x5f21e2[_0xebf7('0x48')][_0xebf7('0x49')]?_0x5f21e2['attributes']:_0x9fc058[_0xebf7('0x43')];if(_0x25108a[_0xebf7('0x44')][_0xebf7('0x51')]){_0x5f21e2[_0xebf7('0x57')]=[{'all':!![]}];}_0x5f21e2=_['merge']({},_0x5f21e2,_0x25108a[_0xebf7('0x50')]);return db[_0xebf7('0x3f')][_0xebf7('0x58')](_0x5f21e2)[_0xebf7('0x24')](handleEntityNotFound(_0x58318b,null))[_0xebf7('0x24')](respondWithResult(_0x58318b,null))[_0xebf7('0x2d')](handleError(_0x58318b,null));};exports[_0xebf7('0x59')]=function(_0xe810d8,_0x3099c1){return db[_0xebf7('0x3f')][_0xebf7('0x59')](_0xe810d8[_0xebf7('0x5a')],{})[_0xebf7('0x24')](function(_0x19170a){var _0x5ee7a7=_0xe810d8[_0xebf7('0x5b')]['get']({'plain':!![]});if(!_0x5ee7a7)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5ee7a7[_0xebf7('0x5c')]==='user'){var _0x40d50e=_0x19170a[_0xebf7('0x3a')]({'plain':!![]});var _0x2579c7=_0xebf7('0x3b');return db[_0xebf7('0x5d')][_0xebf7('0x58')]({'where':{'name':_0x2579c7,'userProfileId':_0x5ee7a7[_0xebf7('0x5e')]},'raw':!![]})['then'](function(_0x158196){if(_0x158196&&_0x158196[_0xebf7('0x5f')]===0x0){return db[_0xebf7('0x60')][_0xebf7('0x59')]({'name':_0x40d50e[_0xebf7('0x3c')],'resourceId':_0x40d50e['id'],'type':_0x158196[_0xebf7('0x3c')],'sectionId':_0x158196['id']},{})[_0xebf7('0x24')](function(){return _0x19170a;});}else{return _0x19170a;}})[_0xebf7('0x2d')](function(_0x56ff9d){logger['error'](_0xebf7('0x61'),_0x56ff9d);throw _0x56ff9d;});}return _0x19170a;})[_0xebf7('0x24')](respondWithResult(_0x3099c1,0xc9))['catch'](handleError(_0x3099c1,null));};exports[_0xebf7('0x38')]=function(_0x12ff4b,_0x18b070){if(_0x12ff4b['body']['id']){delete _0x12ff4b[_0xebf7('0x5a')]['id'];}return db['ChatQueue'][_0xebf7('0x58')]({'where':{'id':_0x12ff4b[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](handleEntityNotFound(_0x18b070,null))[_0xebf7('0x24')](saveUpdates(_0x12ff4b['body'],null))[_0xebf7('0x24')](respondWithResult(_0x18b070,null))[_0xebf7('0x2d')](handleError(_0x18b070,null));};exports[_0xebf7('0x39')]=function(_0x59fe82,_0x1bfa5e){return db[_0xebf7('0x3f')][_0xebf7('0x58')]({'where':{'id':_0x59fe82[_0xebf7('0x55')]['id']}})['then'](handleEntityNotFound(_0x1bfa5e,null))[_0xebf7('0x24')](removeEntity(_0x1bfa5e,null))[_0xebf7('0x2d')](handleError(_0x1bfa5e,null));};exports['describe']=function(_0x2e93d6,_0x358f83){return db[_0xebf7('0x3f')]['describe']()[_0xebf7('0x24')](respondWithResult(_0x358f83,null))[_0xebf7('0x2d')](handleError(_0x358f83,null));};exports[_0xebf7('0x62')]=function(_0x28254d,_0x480d61,_0x1877ee){var _0x382380={'raw':!![],'where':{}},_0x15d548={},_0x313fe1;return db[_0xebf7('0x3f')][_0xebf7('0x63')]({'where':{'id':_0x28254d[_0xebf7('0x55')]['id']}})['then'](handleEntityNotFound(_0x480d61,null))[_0xebf7('0x24')](function(_0x558ea7){if(_0x558ea7){_0x313fe1=_0x558ea7['get']({'plain':!![]});_0x15d548['model']=_['keys'](db[_0xebf7('0x64')][_0xebf7('0x40')]);_0x15d548[_0xebf7('0x44')]=_[_0xebf7('0x56')](_0x28254d[_0xebf7('0x44')]);_0x15d548[_0xebf7('0x45')]=_['intersection'](_0x15d548['model'],_0x15d548['query']);_0x382380[_0xebf7('0x48')]=_[_0xebf7('0x46')](_0x15d548[_0xebf7('0x43')],qs[_0xebf7('0x47')](_0x28254d[_0xebf7('0x44')][_0xebf7('0x47')]));_0x382380[_0xebf7('0x48')]=_0x382380[_0xebf7('0x48')][_0xebf7('0x49')]?_0x382380['attributes']:_0x15d548['model'];if(!_0x28254d[_0xebf7('0x44')][_0xebf7('0x65')](_0xebf7('0x66'))){_0x382380['limit']=qs[_0xebf7('0x33')](_0x28254d[_0xebf7('0x44')][_0xebf7('0x33')]);_0x382380[_0xebf7('0x32')]=qs[_0xebf7('0x32')](_0x28254d[_0xebf7('0x44')]['offset']);}_0x382380['order']=qs[_0xebf7('0x4b')](_0x28254d['query']['sort']);_0x382380[_0xebf7('0x4c')]=qs['filters'](_[_0xebf7('0x67')](_0x28254d[_0xebf7('0x44')],_0x15d548[_0xebf7('0x45')]));_0x382380[_0xebf7('0x4c')][_0xebf7('0x68')]=_0x558ea7['id'];if(_0x28254d[_0xebf7('0x44')][_0xebf7('0x4d')]){_0x382380[_0xebf7('0x4c')]=_[_0xebf7('0x4e')](_0x382380[_0xebf7('0x4c')],{'$or':_[_0xebf7('0x3e')](_0x382380[_0xebf7('0x48')],function(_0x3da04a){var _0x224b20={};_0x224b20[_0x3da04a]={'$like':'%'+_0x28254d[_0xebf7('0x44')][_0xebf7('0x4d')]+'%'};return _0x224b20;})});}_0x382380=_[_0xebf7('0x4e')]({},_0x382380,_0x28254d[_0xebf7('0x50')]);return db['UserChatQueue'][_0xebf7('0x52')](_0x382380);}})['then'](function(_0x42f171){if(_0x42f171){return db[_0xebf7('0x69')]['findAndCountAll']({'where':{'id':_[_0xebf7('0x3e')](_0x42f171,_0xebf7('0x6a')),'role':_0xebf7('0x6b')},'attributes':['id',_0xebf7('0x3c'),_0xebf7('0x6c'),_0xebf7('0x6d'),_0xebf7('0x6e')]});}})['then'](function(_0x4955e8){if(_0x4955e8){return{'count':_0x4955e8[_0xebf7('0x31')],'rows':_[_0xebf7('0x3e')](_0x4955e8[_0xebf7('0x53')],function(_0x295eb8){return{'membername':_0x295eb8['name'],'UserId':_0x295eb8['id'],'queue_name':_0x313fe1[_0xebf7('0x3c')],'ChatQueueId':_0x313fe1['id'],'interface':util[_0xebf7('0x6f')](_0xebf7('0x70'),_0xebf7('0x71'),_0x295eb8[_0xebf7('0x3c')]),'penalty':0x0,'paused':_0x295eb8['chatPause'],'createdAt':_0x295eb8[_0xebf7('0x6e')],'updatedAt':_0x295eb8[_0xebf7('0x6d')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x480d61,_0x382380))[_0xebf7('0x2d')](handleError(_0x480d61,null));};exports[_0xebf7('0x72')]=function(_0x50d58b,_0xf32601,_0x4ee52d){var _0xda96ae={};var _0x4610f3={};var _0x1ee2da;var _0x164a13;return db['ChatQueue']['findOne']({'where':{'id':_0x50d58b[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](handleEntityNotFound(_0xf32601,null))[_0xebf7('0x24')](function(_0x24180a){if(_0x24180a){_0x1ee2da=_0x24180a;_0x4610f3['model']=_[_0xebf7('0x56')](db[_0xebf7('0x73')][_0xebf7('0x40')]);_0x4610f3[_0xebf7('0x44')]=_[_0xebf7('0x56')](_0x50d58b[_0xebf7('0x44')]);_0x4610f3['filters']=_[_0xebf7('0x46')](_0x4610f3['model'],_0x4610f3['query']);_0xda96ae['attributes']=_[_0xebf7('0x46')](_0x4610f3['model'],qs[_0xebf7('0x47')](_0x50d58b['query'][_0xebf7('0x47')]));_0xda96ae['attributes']=_0xda96ae['attributes'][_0xebf7('0x49')]?_0xda96ae[_0xebf7('0x48')]:_0x4610f3[_0xebf7('0x43')];_0xda96ae['order']=qs['sort'](_0x50d58b[_0xebf7('0x44')][_0xebf7('0x4b')]);_0xda96ae[_0xebf7('0x4c')]=qs[_0xebf7('0x45')](_[_0xebf7('0x67')](_0x50d58b[_0xebf7('0x44')],_0x4610f3['filters']));if(_0x50d58b['query'][_0xebf7('0x4d')]){_0xda96ae[_0xebf7('0x4c')]=_[_0xebf7('0x4e')](_0xda96ae[_0xebf7('0x4c')],{'$or':_[_0xebf7('0x3e')](_0xda96ae[_0xebf7('0x48')],function(_0x16ed25){var _0x1d0572={};_0x1d0572[_0x16ed25]={'$like':'%'+_0x50d58b[_0xebf7('0x44')][_0xebf7('0x4d')]+'%'};return _0x1d0572;})});}_0xda96ae=_[_0xebf7('0x4e')]({},_0xda96ae,_0x50d58b['options']);return _0x1ee2da[_0xebf7('0x72')](_0xda96ae);}})['then'](function(_0x10e793){if(_0x10e793){_0x164a13=_0x10e793[_0xebf7('0x49')];if(!_0x50d58b[_0xebf7('0x44')][_0xebf7('0x65')](_0xebf7('0x66'))){_0xda96ae[_0xebf7('0x33')]=qs[_0xebf7('0x33')](_0x50d58b['query']['limit']);_0xda96ae[_0xebf7('0x32')]=qs[_0xebf7('0x32')](_0x50d58b[_0xebf7('0x44')][_0xebf7('0x32')]);}return _0x1ee2da['getTeams'](_0xda96ae);}})[_0xebf7('0x24')](function(_0x4c8d44){if(_0x4c8d44){return _0x4c8d44?{'count':_0x164a13,'rows':_0x4c8d44}:null;}})[_0xebf7('0x24')](respondWithResult(_0xf32601,null))[_0xebf7('0x2d')](handleError(_0xf32601,null));};exports['addTeams']=function(_0x21c346,_0x43d930,_0x2cd661){var _0x1a31de=_0x21c346[_0xebf7('0x5a')][_0xebf7('0x74')];return db['Team'][_0xebf7('0x52')]({'where':{'id':_0x1a31de},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0xebf7('0x3c'),'online','voicePause',_0xebf7('0x75')],'raw':!![]}]})[_0xebf7('0x24')](function(_0x4a888d){if(_0x4a888d){var _0x31e01c=_[_0xebf7('0x76')](_0x4a888d,function(_0x95d6a1){var _0x121079=_0x95d6a1[_0xebf7('0x3a')]({'plain':!![]});return _0x121079[_0xebf7('0x77')];});return db[_0xebf7('0x3f')][_0xebf7('0x58')]({'where':{'id':_0x21c346[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](function(_0x3db872){return db[_0xebf7('0x78')]['transaction'](function(_0x503e25){return _0x3db872[_0xebf7('0x79')](_0x1a31de,{'transaction':_0x503e25})[_0xebf7('0x24')](function(){return BPromise['each'](_0x31e01c,function(_0x1b327a){return db['UserChatQueue'][_0xebf7('0x7a')]({'where':{'UserId':_0x1b327a['id'],'ChatQueueId':_0x21c346['params']['id']},'transaction':_0x503e25});});})['then'](function(){_0x31e01c[_0xebf7('0x7b')](function(_0x3f0e2b){socket[_0xebf7('0x7c')](_0xebf7('0x7d'),{'UserId':_0x3f0e2b['id'],'ChatQueueId':_0x3db872['id']});});});});});}})[_0xebf7('0x24')](respondWithStatusCode(_0x43d930,null))[_0xebf7('0x2d')](handleError(_0x43d930,null));};exports[_0xebf7('0x7e')]=function(_0x32afb7,_0x1829fd,_0x440b4d){return db[_0xebf7('0x73')][_0xebf7('0x52')]({'where':{'id':_0x32afb7['query'][_0xebf7('0x74')]},'attributes':['id'],'include':[{'model':db[_0xebf7('0x69')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xebf7('0x24')](handleEntityNotFound(_0x1829fd,null))[_0xebf7('0x24')](function(_0x220033){var _0x108dce=_['map'](_0x220033,'id');var _0x462b32=[];var _0x1841b4=[];var _0xc33411=squel['select']();_0xc33411[_0xebf7('0x7f')](_0xebf7('0x80'))[_0xebf7('0x81')](_0xebf7('0x82'),'tq')[_0xebf7('0x83')](_0xebf7('0x84'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0xebf7('0x4c')]('ChatQueueId\x20=\x20?',_0x32afb7[_0xebf7('0x55')]['id']);for(var _0x1ce259=0x0;_0x1ce259<_0x220033[_0xebf7('0x49')];_0x1ce259+=0x1){let _0x2f6167=_0x220033[_0x1ce259];for(var _0x3f2263=0x0;_0x3f2263<_0x2f6167['Agents']['length'];_0x3f2263+=0x1){let _0x62214f=_0x2f6167[_0xebf7('0x77')][_0x3f2263];var _0x5d205e=_0xc33411[_0xebf7('0x85')]();_0x5d205e[_0xebf7('0x4c')](_0xebf7('0x86'),_0x62214f['id']);_0x1841b4[_0xebf7('0x87')](db[_0xebf7('0x78')][_0xebf7('0x44')](_0x5d205e['toString'](),{'type':db[_0xebf7('0x78')]['QueryTypes'][_0xebf7('0x88')]})['then'](function(_0x1b9fba){if(_0x1b9fba[_0xebf7('0x49')]===0x1){return _0x62214f['id'];}else{var _0x210b3d=_[_0xebf7('0x89')](_[_0xebf7('0x3e')](_0x1b9fba,_0xebf7('0x8a')),function(_0x1201e0){return _[_0xebf7('0x8b')](_0x108dce,_0x1201e0);});if(_0x210b3d){return _0x62214f['id'];}}}));}}return BPromise[_0xebf7('0x8c')](_0x1841b4)[_0xebf7('0x24')](function(_0x2e9551){_0x462b32=_(_0x462b32)[_0xebf7('0x8d')](_0x2e9551)[_0xebf7('0x8e')]()[_0xebf7('0x8f')]();return db[_0xebf7('0x3f')][_0xebf7('0x58')]({'where':{'id':_0x32afb7[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](function(_0x2b3d8a){return db[_0xebf7('0x78')][_0xebf7('0x90')](function(_0x824998){return _0x2b3d8a[_0xebf7('0x7e')](_0x32afb7[_0xebf7('0x44')][_0xebf7('0x74')],{'transaction':_0x824998})[_0xebf7('0x24')](function(){if(!_[_0xebf7('0x91')](_0x462b32)){return _0x2b3d8a['removeAgents'](_0x462b32,{'transaction':_0x824998});}})['then'](function(){_0x462b32[_0xebf7('0x7b')](function(_0x3b9788){socket['emit']('userChatQueue:remove',{'UserId':_0x3b9788,'ChatQueueId':_0x2b3d8a['id']});});});});});});})[_0xebf7('0x24')](respondWithStatusCode(_0x1829fd,null))[_0xebf7('0x2d')](handleError(_0x1829fd,null));};exports[_0xebf7('0x92')]=function(_0x2a4bf3,_0x27d829,_0x5c5c84){return db[_0xebf7('0x3f')][_0xebf7('0x58')]({'where':{'id':_0x2a4bf3[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](handleEntityNotFound(_0x27d829,null))['then'](function(_0x1f4d84){if(_0x1f4d84){return _0x1f4d84['addAgents'](_0x2a4bf3[_0xebf7('0x5a')][_0xebf7('0x74')],_[_0xebf7('0x93')](_0x2a4bf3[_0xebf7('0x5a')],[_0xebf7('0x74'),'id'])||{})[_0xebf7('0x94')](function(_0x15d71e){for(var _0x56dbb9=0x0;_0x56dbb9<_0x2a4bf3[_0xebf7('0x5a')][_0xebf7('0x74')][_0xebf7('0x49')];_0x56dbb9+=0x1){socket['emit']('userChatQueue:save',{'UserId':_0x2a4bf3[_0xebf7('0x5a')]['ids'][_0x56dbb9],'ChatQueueId':_0x2a4bf3['params']['id']});}return _0x15d71e;});}})['then'](respondWithResult(_0x27d829,null))['catch'](handleError(_0x27d829,null));};exports[_0xebf7('0x95')]=function(_0x36385f,_0x415937,_0x366b5b){return db[_0xebf7('0x3f')][_0xebf7('0x58')]({'where':{'id':_0x36385f[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](handleEntityNotFound(_0x415937,null))[_0xebf7('0x24')](function(_0x39b6f1){if(_0x39b6f1){return _0x39b6f1[_0xebf7('0x95')](_0x36385f[_0xebf7('0x44')][_0xebf7('0x74')])[_0xebf7('0x24')](function(){if(_[_0xebf7('0x96')](_0x36385f[_0xebf7('0x44')][_0xebf7('0x74')])){for(var _0x14e2e6=0x0;_0x14e2e6<_0x36385f['query'][_0xebf7('0x74')]['length'];_0x14e2e6+=0x1){socket[_0xebf7('0x7c')](_0xebf7('0x97'),{'UserId':Number(_0x36385f['query']['ids'][_0x14e2e6]),'ChatQueueId':Number(_0x36385f[_0xebf7('0x55')]['id'])});}}else{socket[_0xebf7('0x7c')]('userChatQueue:remove',{'UserId':Number(_0x36385f[_0xebf7('0x44')]['ids']),'ChatQueueId':Number(_0x36385f['params']['id'])});}});}})[_0xebf7('0x24')](respondWithStatusCode(_0x415937,null))[_0xebf7('0x2d')](handleError(_0x415937,null));};exports[_0xebf7('0x98')]=function(_0x37b7d7,_0x2c6c2e,_0x529a26){var _0xa434af={};var _0x2caa82={};var _0xaf6244;var _0x2e987f;return db[_0xebf7('0x3f')]['findOne']({'where':{'id':_0x37b7d7[_0xebf7('0x55')]['id']}})[_0xebf7('0x24')](handleEntityNotFound(_0x2c6c2e,null))[_0xebf7('0x24')](function(_0x5b4554){if(_0x5b4554){_0xaf6244=_0x5b4554;_0x2caa82[_0xebf7('0x43')]=_['keys'](db[_0xebf7('0x69')][_0xebf7('0x40')]);_0x2caa82['query']=_[_0xebf7('0x56')](_0x37b7d7['query']);_0x2caa82[_0xebf7('0x45')]=_['intersection'](_0x2caa82[_0xebf7('0x43')],_0x2caa82[_0xebf7('0x44')]);_0xa434af['attributes']=_[_0xebf7('0x46')](_0x2caa82['model'],qs[_0xebf7('0x47')](_0x37b7d7[_0xebf7('0x44')][_0xebf7('0x47')]));_0xa434af[_0xebf7('0x48')]=_0xa434af['attributes']['length']?_0xa434af[_0xebf7('0x48')]:_0x2caa82[_0xebf7('0x43')];_0xa434af[_0xebf7('0x4a')]=qs[_0xebf7('0x4b')](_0x37b7d7[_0xebf7('0x44')][_0xebf7('0x4b')]);_0xa434af['where']=qs[_0xebf7('0x45')](_['pick'](_0x37b7d7[_0xebf7('0x44')],_0x2caa82[_0xebf7('0x45')]));if(_0x37b7d7[_0xebf7('0x44')][_0xebf7('0x4d')]){_0xa434af['where']=_[_0xebf7('0x4e')](_0xa434af['where'],{'$or':_[_0xebf7('0x3e')](_0xa434af[_0xebf7('0x48')],function(_0x5740f3){var _0x4452ba={};_0x4452ba[_0x5740f3]={'$like':'%'+_0x37b7d7[_0xebf7('0x44')][_0xebf7('0x4d')]+'%'};return _0x4452ba;})});}_0xa434af=_[_0xebf7('0x4e')]({},_0xa434af,_0x37b7d7['options']);return _0xaf6244[_0xebf7('0x98')](_0xa434af);}})[_0xebf7('0x24')](function(_0x2e0cc0){if(_0x2e0cc0){_0x2e987f=_0x2e0cc0[_0xebf7('0x49')];if(!_0x37b7d7['query'][_0xebf7('0x65')](_0xebf7('0x66'))){_0xa434af[_0xebf7('0x33')]=qs['limit'](_0x37b7d7[_0xebf7('0x44')]['limit']);_0xa434af['offset']=qs[_0xebf7('0x32')](_0x37b7d7[_0xebf7('0x44')]['offset']);}return _0xaf6244[_0xebf7('0x98')](_0xa434af);}})[_0xebf7('0x24')](function(_0xc76f19){if(_0xc76f19){return _0xc76f19?{'count':_0x2e987f,'rows':_0xc76f19}:null;}})[_0xebf7('0x24')](respondWithResult(_0x2c6c2e,null))[_0xebf7('0x2d')](handleError(_0x2c6c2e,null));};
\ No newline at end of file
+var _0xfa03=['user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','describe','getMembers','findOne','UserChatQueue','nolimit','order','ChatQueueId','User','chatPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','Agents','online','voicePause','interface','flatMap','sequelize','transaction','each','findOrCreate','forEach','emit','removeTeams','ids','select','field','tq.TeamId','from','team_has_chat_queues','join','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','isEmpty','userChatQueue:remove','addAgents','omit','spread','userChatQueue:save','removeAgents','getAgents','eml-format','rimraf','fast-json-patch','request-promise','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','client','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','json','offset','undefined','count','set','Content-Range','save','update','destroy','ChatQueues','end','name','send','index','ChatQueue','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','limit','sort','pick','filter','where','merge','options','includeAll','include','findAll','rows','show','keys','find','create'];(function(_0x17dffb,_0x365d85){var _0x36dc9b=function(_0x4b8de7){while(--_0x4b8de7){_0x17dffb['push'](_0x17dffb['shift']());}};_0x36dc9b(++_0x365d85);}(_0xfa03,0xe3));var _0x3fa0=function(_0x55b64f,_0x1a0650){_0x55b64f=_0x55b64f-0x0;var _0x1eeea5=_0xfa03[_0x55b64f];return _0x1eeea5;};'use strict';var emlformat=require(_0x3fa0('0x0'));var rimraf=require(_0x3fa0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3fa0('0x2'));var rp=require(_0x3fa0('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x3fa0('0x4'));var util=require(_0x3fa0('0x5'));var path=require(_0x3fa0('0x6'));var sox=require(_0x3fa0('0x7'));var csv=require('to-csv');var ejs=require(_0x3fa0('0x8'));var fs=require('fs');var fs_extra=require(_0x3fa0('0x9'));var _=require(_0x3fa0('0xa'));var squel=require(_0x3fa0('0xb'));var crypto=require(_0x3fa0('0xc'));var jsforce=require(_0x3fa0('0xd'));var deskjs=require(_0x3fa0('0xe'));var toCsv=require(_0x3fa0('0xf'));var querystring=require(_0x3fa0('0x10'));var Papa=require(_0x3fa0('0x11'));var Redis=require(_0x3fa0('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x3fa0('0x13'));var as=require(_0x3fa0('0x14'));var hardwareService=require(_0x3fa0('0x15'));var logger=require(_0x3fa0('0x16'))(_0x3fa0('0x17'));var utils=require('../../config/utils');var config=require(_0x3fa0('0x18'));var licenseUtil=require(_0x3fa0('0x19'));var db=require(_0x3fa0('0x1a'))['db'];config[_0x3fa0('0x1b')]=_[_0x3fa0('0x1c')](config[_0x3fa0('0x1b')],{'host':_0x3fa0('0x1d'),'port':0x18eb});var socket=require(_0x3fa0('0x1e'))(new Redis(config['redis']));require(_0x3fa0('0x1f'))[_0x3fa0('0x20')](socket);var jayson=require('jayson/promise');var client=jayson[_0x3fa0('0x21')][_0x3fa0('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x3f123f,_0x19e420,_0x48e875,_0x8bf61f){return new BPromise(function(_0x252044,_0x251d0d){var _0x2c1543=_0x8bf61f||client;return _0x2c1543[_0x3fa0('0x23')](_0x3f123f,_0x48e875)[_0x3fa0('0x24')](function(_0x3c5845){logger[_0x3fa0('0x25')](_0x3fa0('0x26'),_0x19e420,_0x3fa0('0x27'));logger[_0x3fa0('0x28')](_0x3fa0('0x29'),_0x19e420,_0x3fa0('0x27'),JSON['stringify'](_0x3c5845));if(_0x3c5845[_0x3fa0('0x2a')]){if(_0x3c5845['error'][_0x3fa0('0x2b')]===0x1f4){logger[_0x3fa0('0x2a')](_0x3fa0('0x26'),_0x19e420,_0x3c5845[_0x3fa0('0x2a')][_0x3fa0('0x2c')]);return _0x251d0d(_0x3c5845['error'][_0x3fa0('0x2c')]);}logger[_0x3fa0('0x2a')](_0x3fa0('0x26'),_0x19e420,_0x3c5845[_0x3fa0('0x2a')]['message']);return _0x252044(_0x3c5845['error']['message']);}else{logger['info'](_0x3fa0('0x26'),_0x19e420,_0x3fa0('0x27'));_0x252044(_0x3c5845[_0x3fa0('0x2d')][_0x3fa0('0x2c')]);}})[_0x3fa0('0x2e')](function(_0x374843){logger[_0x3fa0('0x2a')](_0x3fa0('0x26'),_0x19e420,_0x374843);_0x251d0d(_0x374843);});});}function respondWithStatusCode(_0xfc77f2,_0x21ac0b){_0x21ac0b=_0x21ac0b||0xcc;return function(_0x588b8f){if(_0x588b8f){return _0xfc77f2[_0x3fa0('0x2f')](_0x21ac0b);}return _0xfc77f2[_0x3fa0('0x30')](_0x21ac0b)['end']();};}function respondWithResult(_0x4478b9,_0xdec09f){_0xdec09f=_0xdec09f||0xc8;return function(_0x3899a5){if(_0x3899a5){return _0x4478b9[_0x3fa0('0x30')](_0xdec09f)[_0x3fa0('0x31')](_0x3899a5);}};}function respondWithFilteredResult(_0x134b8b,_0x1f810c){return function(_0x574e61){if(_0x574e61){var _0x82f589=typeof _0x1f810c[_0x3fa0('0x32')]===_0x3fa0('0x33')&&typeof _0x1f810c['limit']==='undefined';var _0xc123bd=_0x574e61['count'];var _0xa9b1cd=_0x82f589?0x0:_0x1f810c['offset'];var _0x29629f=_0x82f589?_0x574e61[_0x3fa0('0x34')]:_0x1f810c[_0x3fa0('0x32')]+_0x1f810c['limit'];var _0x3152be;if(_0x29629f>=_0xc123bd){_0x29629f=_0xc123bd;_0x3152be=0xc8;}else{_0x3152be=0xce;}_0x134b8b['status'](_0x3152be);return _0x134b8b[_0x3fa0('0x35')](_0x3fa0('0x36'),_0xa9b1cd+'-'+_0x29629f+'/'+_0xc123bd)['json'](_0x574e61);}return null;};}function patchUpdates(_0xd0d16){return function(_0xf658e7){try{jsonpatch['apply'](_0xf658e7,_0xd0d16,!![]);}catch(_0x1256c4){return BPromise['reject'](_0x1256c4);}return _0xf658e7[_0x3fa0('0x37')]();};}function saveUpdates(_0x556613,_0x2cd5d7){return function(_0x2b27a2){if(_0x2b27a2){return _0x2b27a2[_0x3fa0('0x38')](_0x556613)[_0x3fa0('0x24')](function(_0xfbc291){return _0xfbc291;});}return null;};}function removeEntity(_0x560842,_0x33b22e){return function(_0x4c6a61){if(_0x4c6a61){return _0x4c6a61[_0x3fa0('0x39')]()[_0x3fa0('0x24')](function(){var _0x396d4d=_0x4c6a61['get']({'plain':!![]});var _0x4b606d=_0x3fa0('0x3a');return db['UserProfileResource'][_0x3fa0('0x39')]({'where':{'type':_0x4b606d,'resourceId':_0x396d4d['id']}})[_0x3fa0('0x24')](function(){return _0x4c6a61;});})[_0x3fa0('0x24')](function(){_0x560842['status'](0xcc)[_0x3fa0('0x3b')]();});}};}function handleEntityNotFound(_0x1969db,_0x3e1fee){return function(_0x1305fb){if(!_0x1305fb){_0x1969db[_0x3fa0('0x2f')](0x194);}return _0x1305fb;};}function handleError(_0x562642,_0x4ef6f){_0x4ef6f=_0x4ef6f||0x1f4;return function(_0x2e9de0){logger['error'](_0x2e9de0['stack']);if(_0x2e9de0[_0x3fa0('0x3c')]){delete _0x2e9de0[_0x3fa0('0x3c')];}_0x562642[_0x3fa0('0x30')](_0x4ef6f)[_0x3fa0('0x3d')](_0x2e9de0);};}exports[_0x3fa0('0x3e')]=function(_0x33fb3b,_0x169831){var _0x3964f7={},_0x46aeae={},_0x6dbdb2={'count':0x0,'rows':[]};var _0x4e3bdf=_['map'](db[_0x3fa0('0x3f')][_0x3fa0('0x40')],function(_0xc9ed09){return{'name':_0xc9ed09[_0x3fa0('0x41')],'type':_0xc9ed09['type'][_0x3fa0('0x42')]};});_0x46aeae[_0x3fa0('0x43')]=_[_0x3fa0('0x44')](_0x4e3bdf,_0x3fa0('0x3c'));_0x46aeae[_0x3fa0('0x45')]=_['keys'](_0x33fb3b['query']);_0x46aeae[_0x3fa0('0x46')]=_[_0x3fa0('0x47')](_0x46aeae[_0x3fa0('0x43')],_0x46aeae[_0x3fa0('0x45')]);_0x3964f7[_0x3fa0('0x48')]=_[_0x3fa0('0x47')](_0x46aeae[_0x3fa0('0x43')],qs['fields'](_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x49')]));_0x3964f7[_0x3fa0('0x48')]=_0x3964f7[_0x3fa0('0x48')][_0x3fa0('0x4a')]?_0x3964f7[_0x3fa0('0x48')]:_0x46aeae[_0x3fa0('0x43')];if(!_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x4b')]('nolimit')){_0x3964f7[_0x3fa0('0x4c')]=qs[_0x3fa0('0x4c')](_0x33fb3b[_0x3fa0('0x45')]['limit']);_0x3964f7['offset']=qs['offset'](_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x32')]);}_0x3964f7['order']=qs[_0x3fa0('0x4d')](_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x4d')]);_0x3964f7['where']=qs[_0x3fa0('0x46')](_[_0x3fa0('0x4e')](_0x33fb3b[_0x3fa0('0x45')],_0x46aeae[_0x3fa0('0x46')]),_0x4e3bdf);if(_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x4f')]){_0x3964f7['where']=_['merge'](_0x3964f7[_0x3fa0('0x50')],{'$or':_['map'](_0x4e3bdf,function(_0xb2644){if(_0xb2644['type']!=='VIRTUAL'){var _0x3eb941={};_0x3eb941[_0xb2644['name']]={'$like':'%'+_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x4f')]+'%'};return _0x3eb941;}})});}_0x3964f7=_[_0x3fa0('0x51')]({},_0x3964f7,_0x33fb3b[_0x3fa0('0x52')]);var _0x151c6b={'where':_0x3964f7[_0x3fa0('0x50')]};return db[_0x3fa0('0x3f')][_0x3fa0('0x34')](_0x151c6b)[_0x3fa0('0x24')](function(_0x2db895){_0x6dbdb2['count']=_0x2db895;if(_0x33fb3b[_0x3fa0('0x45')][_0x3fa0('0x53')]){_0x3964f7[_0x3fa0('0x54')]=[{'all':!![]}];}return db[_0x3fa0('0x3f')][_0x3fa0('0x55')](_0x3964f7);})[_0x3fa0('0x24')](function(_0x826152){_0x6dbdb2[_0x3fa0('0x56')]=_0x826152;return _0x6dbdb2;})[_0x3fa0('0x24')](respondWithFilteredResult(_0x169831,_0x3964f7))[_0x3fa0('0x2e')](handleError(_0x169831,null));};exports[_0x3fa0('0x57')]=function(_0x373330,_0x50d606){var _0x10a3d0={'raw':!![],'where':{'id':_0x373330['params']['id']}},_0x3074e6={};_0x3074e6['model']=_[_0x3fa0('0x58')](db['ChatQueue']['rawAttributes']);_0x3074e6['query']=_[_0x3fa0('0x58')](_0x373330[_0x3fa0('0x45')]);_0x3074e6[_0x3fa0('0x46')]=_['intersection'](_0x3074e6[_0x3fa0('0x43')],_0x3074e6[_0x3fa0('0x45')]);_0x10a3d0[_0x3fa0('0x48')]=_[_0x3fa0('0x47')](_0x3074e6[_0x3fa0('0x43')],qs[_0x3fa0('0x49')](_0x373330[_0x3fa0('0x45')]['fields']));_0x10a3d0[_0x3fa0('0x48')]=_0x10a3d0[_0x3fa0('0x48')][_0x3fa0('0x4a')]?_0x10a3d0[_0x3fa0('0x48')]:_0x3074e6[_0x3fa0('0x43')];if(_0x373330[_0x3fa0('0x45')]['includeAll']){_0x10a3d0[_0x3fa0('0x54')]=[{'all':!![]}];}_0x10a3d0=_[_0x3fa0('0x51')]({},_0x10a3d0,_0x373330[_0x3fa0('0x52')]);return db[_0x3fa0('0x3f')][_0x3fa0('0x59')](_0x10a3d0)[_0x3fa0('0x24')](handleEntityNotFound(_0x50d606,null))[_0x3fa0('0x24')](respondWithResult(_0x50d606,null))['catch'](handleError(_0x50d606,null));};exports['create']=function(_0x215f95,_0x96c88){return db['ChatQueue'][_0x3fa0('0x5a')](_0x215f95['body'],{})[_0x3fa0('0x24')](function(_0xcf5276){var _0x16144b=_0x215f95[_0x3fa0('0x5b')]['get']({'plain':!![]});if(!_0x16144b)throw new Error(_0x3fa0('0x5c'));if(_0x16144b[_0x3fa0('0x5d')]===_0x3fa0('0x5b')){var _0x4620f8=_0xcf5276[_0x3fa0('0x5e')]({'plain':!![]});var _0x39c5c9=_0x3fa0('0x3a');return db[_0x3fa0('0x5f')]['find']({'where':{'name':_0x39c5c9,'userProfileId':_0x16144b[_0x3fa0('0x60')]},'raw':!![]})[_0x3fa0('0x24')](function(_0x114628){if(_0x114628&&_0x114628[_0x3fa0('0x61')]===0x0){return db[_0x3fa0('0x62')][_0x3fa0('0x5a')]({'name':_0x4620f8[_0x3fa0('0x3c')],'resourceId':_0x4620f8['id'],'type':_0x114628[_0x3fa0('0x3c')],'sectionId':_0x114628['id']},{})['then'](function(){return _0xcf5276;});}else{return _0xcf5276;}})['catch'](function(_0x2da37f){logger[_0x3fa0('0x2a')](_0x3fa0('0x63'),_0x2da37f);throw _0x2da37f;});}return _0xcf5276;})['then'](respondWithResult(_0x96c88,0xc9))[_0x3fa0('0x2e')](handleError(_0x96c88,null));};exports[_0x3fa0('0x38')]=function(_0x47c868,_0x379392){if(_0x47c868[_0x3fa0('0x64')]['id']){delete _0x47c868[_0x3fa0('0x64')]['id'];}return db['ChatQueue'][_0x3fa0('0x59')]({'where':{'id':_0x47c868[_0x3fa0('0x65')]['id']}})[_0x3fa0('0x24')](handleEntityNotFound(_0x379392,null))['then'](saveUpdates(_0x47c868['body'],null))[_0x3fa0('0x24')](respondWithResult(_0x379392,null))[_0x3fa0('0x2e')](handleError(_0x379392,null));};exports[_0x3fa0('0x39')]=function(_0x420793,_0x483fdf){return db[_0x3fa0('0x3f')][_0x3fa0('0x59')]({'where':{'id':_0x420793[_0x3fa0('0x65')]['id']}})[_0x3fa0('0x24')](handleEntityNotFound(_0x483fdf,null))['then'](removeEntity(_0x483fdf,null))['catch'](handleError(_0x483fdf,null));};exports[_0x3fa0('0x66')]=function(_0x4a219e,_0x4a779f){return db['ChatQueue'][_0x3fa0('0x66')]()[_0x3fa0('0x24')](respondWithResult(_0x4a779f,null))[_0x3fa0('0x2e')](handleError(_0x4a779f,null));};exports[_0x3fa0('0x67')]=function(_0x17d96b,_0x5c954d,_0x48ab58){var _0x3b2a41={'raw':!![],'where':{}},_0x28adea={},_0x56d7f2;return db['ChatQueue'][_0x3fa0('0x68')]({'where':{'id':_0x17d96b[_0x3fa0('0x65')]['id']}})[_0x3fa0('0x24')](handleEntityNotFound(_0x5c954d,null))[_0x3fa0('0x24')](function(_0x552470){if(_0x552470){_0x56d7f2=_0x552470[_0x3fa0('0x5e')]({'plain':!![]});_0x28adea[_0x3fa0('0x43')]=_[_0x3fa0('0x58')](db[_0x3fa0('0x69')][_0x3fa0('0x40')]);_0x28adea[_0x3fa0('0x45')]=_[_0x3fa0('0x58')](_0x17d96b[_0x3fa0('0x45')]);_0x28adea[_0x3fa0('0x46')]=_['intersection'](_0x28adea[_0x3fa0('0x43')],_0x28adea[_0x3fa0('0x45')]);_0x3b2a41['attributes']=_['intersection'](_0x28adea[_0x3fa0('0x43')],qs[_0x3fa0('0x49')](_0x17d96b[_0x3fa0('0x45')][_0x3fa0('0x49')]));_0x3b2a41[_0x3fa0('0x48')]=_0x3b2a41[_0x3fa0('0x48')][_0x3fa0('0x4a')]?_0x3b2a41[_0x3fa0('0x48')]:_0x28adea[_0x3fa0('0x43')];if(!_0x17d96b[_0x3fa0('0x45')][_0x3fa0('0x4b')](_0x3fa0('0x6a'))){_0x3b2a41[_0x3fa0('0x4c')]=qs[_0x3fa0('0x4c')](_0x17d96b[_0x3fa0('0x45')]['limit']);_0x3b2a41[_0x3fa0('0x32')]=qs['offset'](_0x17d96b['query'][_0x3fa0('0x32')]);}_0x3b2a41[_0x3fa0('0x6b')]=qs[_0x3fa0('0x4d')](_0x17d96b[_0x3fa0('0x45')][_0x3fa0('0x4d')]);_0x3b2a41[_0x3fa0('0x50')]=qs[_0x3fa0('0x46')](_[_0x3fa0('0x4e')](_0x17d96b[_0x3fa0('0x45')],_0x28adea[_0x3fa0('0x46')]));_0x3b2a41[_0x3fa0('0x50')][_0x3fa0('0x6c')]=_0x552470['id'];if(_0x17d96b[_0x3fa0('0x45')][_0x3fa0('0x4f')]){_0x3b2a41[_0x3fa0('0x50')]=_[_0x3fa0('0x51')](_0x3b2a41[_0x3fa0('0x50')],{'$or':_[_0x3fa0('0x44')](_0x3b2a41[_0x3fa0('0x48')],function(_0x2d9150){var _0x3059f8={};_0x3059f8[_0x2d9150]={'$like':'%'+_0x17d96b[_0x3fa0('0x45')][_0x3fa0('0x4f')]+'%'};return _0x3059f8;})});}_0x3b2a41=_[_0x3fa0('0x51')]({},_0x3b2a41,_0x17d96b[_0x3fa0('0x52')]);return db['UserChatQueue'][_0x3fa0('0x55')](_0x3b2a41);}})[_0x3fa0('0x24')](function(_0x40d374){if(_0x40d374){return db[_0x3fa0('0x6d')]['findAndCountAll']({'where':{'id':_[_0x3fa0('0x44')](_0x40d374,'UserId'),'role':'agent'},'attributes':['id',_0x3fa0('0x3c'),_0x3fa0('0x6e'),_0x3fa0('0x6f'),_0x3fa0('0x70')]});}})['then'](function(_0x5324ab){if(_0x5324ab){return{'count':_0x5324ab['count'],'rows':_[_0x3fa0('0x44')](_0x5324ab[_0x3fa0('0x56')],function(_0x32ab3a){return{'membername':_0x32ab3a['name'],'UserId':_0x32ab3a['id'],'queue_name':_0x56d7f2[_0x3fa0('0x3c')],'ChatQueueId':_0x56d7f2['id'],'interface':util[_0x3fa0('0x71')](_0x3fa0('0x72'),_0x3fa0('0x73'),_0x32ab3a['name']),'penalty':0x0,'paused':_0x32ab3a['chatPause'],'createdAt':_0x32ab3a[_0x3fa0('0x70')],'updatedAt':_0x32ab3a[_0x3fa0('0x6f')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x3fa0('0x24')](respondWithFilteredResult(_0x5c954d,_0x3b2a41))['catch'](handleError(_0x5c954d,null));};exports['getTeams']=function(_0x5cae98,_0xd70ac7,_0x7f32f4){var _0x1ecf7e={};var _0x9fda1d={};var _0xd59d74;var _0x17f64d;return db[_0x3fa0('0x3f')]['findOne']({'where':{'id':_0x5cae98[_0x3fa0('0x65')]['id']}})['then'](handleEntityNotFound(_0xd70ac7,null))['then'](function(_0x15a29e){if(_0x15a29e){_0xd59d74=_0x15a29e;_0x9fda1d['model']=_[_0x3fa0('0x58')](db[_0x3fa0('0x74')][_0x3fa0('0x40')]);_0x9fda1d['query']=_[_0x3fa0('0x58')](_0x5cae98[_0x3fa0('0x45')]);_0x9fda1d[_0x3fa0('0x46')]=_[_0x3fa0('0x47')](_0x9fda1d[_0x3fa0('0x43')],_0x9fda1d[_0x3fa0('0x45')]);_0x1ecf7e[_0x3fa0('0x48')]=_[_0x3fa0('0x47')](_0x9fda1d[_0x3fa0('0x43')],qs[_0x3fa0('0x49')](_0x5cae98[_0x3fa0('0x45')][_0x3fa0('0x49')]));_0x1ecf7e['attributes']=_0x1ecf7e['attributes'][_0x3fa0('0x4a')]?_0x1ecf7e[_0x3fa0('0x48')]:_0x9fda1d['model'];_0x1ecf7e[_0x3fa0('0x6b')]=qs[_0x3fa0('0x4d')](_0x5cae98['query'][_0x3fa0('0x4d')]);_0x1ecf7e[_0x3fa0('0x50')]=qs[_0x3fa0('0x46')](_[_0x3fa0('0x4e')](_0x5cae98[_0x3fa0('0x45')],_0x9fda1d['filters']));if(_0x5cae98[_0x3fa0('0x45')]['filter']){_0x1ecf7e[_0x3fa0('0x50')]=_[_0x3fa0('0x51')](_0x1ecf7e['where'],{'$or':_['map'](_0x1ecf7e[_0x3fa0('0x48')],function(_0x4018e7){var _0x4094e1={};_0x4094e1[_0x4018e7]={'$like':'%'+_0x5cae98[_0x3fa0('0x45')][_0x3fa0('0x4f')]+'%'};return _0x4094e1;})});}_0x1ecf7e=_[_0x3fa0('0x51')]({},_0x1ecf7e,_0x5cae98['options']);return _0xd59d74[_0x3fa0('0x75')](_0x1ecf7e);}})[_0x3fa0('0x24')](function(_0x42a858){if(_0x42a858){_0x17f64d=_0x42a858[_0x3fa0('0x4a')];if(!_0x5cae98[_0x3fa0('0x45')]['hasOwnProperty'](_0x3fa0('0x6a'))){_0x1ecf7e[_0x3fa0('0x4c')]=qs[_0x3fa0('0x4c')](_0x5cae98[_0x3fa0('0x45')]['limit']);_0x1ecf7e[_0x3fa0('0x32')]=qs[_0x3fa0('0x32')](_0x5cae98['query'][_0x3fa0('0x32')]);}return _0xd59d74['getTeams'](_0x1ecf7e);}})['then'](function(_0x428650){if(_0x428650){return _0x428650?{'count':_0x17f64d,'rows':_0x428650}:null;}})['then'](respondWithResult(_0xd70ac7,null))['catch'](handleError(_0xd70ac7,null));};exports['addTeams']=function(_0x5841e3,_0x374108,_0x501d4c){var _0x23752e=_0x5841e3['body']['ids'];return db['Team'][_0x3fa0('0x55')]({'where':{'id':_0x23752e},'attributes':['id'],'include':[{'model':db['User'],'as':_0x3fa0('0x76'),'attributes':['id',_0x3fa0('0x3c'),_0x3fa0('0x77'),_0x3fa0('0x78'),_0x3fa0('0x79')],'raw':!![]}]})[_0x3fa0('0x24')](function(_0x1c7d28){if(_0x1c7d28){var _0x56a3b6=_[_0x3fa0('0x7a')](_0x1c7d28,function(_0x451cfe){var _0x4798d3=_0x451cfe[_0x3fa0('0x5e')]({'plain':!![]});return _0x4798d3[_0x3fa0('0x76')];});return db[_0x3fa0('0x3f')]['find']({'where':{'id':_0x5841e3[_0x3fa0('0x65')]['id']}})[_0x3fa0('0x24')](function(_0x583b4f){return db[_0x3fa0('0x7b')][_0x3fa0('0x7c')](function(_0x14dfc5){return _0x583b4f['addTeams'](_0x23752e,{'transaction':_0x14dfc5})[_0x3fa0('0x24')](function(){return BPromise[_0x3fa0('0x7d')](_0x56a3b6,function(_0x492b73){return db[_0x3fa0('0x69')][_0x3fa0('0x7e')]({'where':{'UserId':_0x492b73['id'],'ChatQueueId':_0x5841e3[_0x3fa0('0x65')]['id']},'transaction':_0x14dfc5});});})['then'](function(){_0x56a3b6[_0x3fa0('0x7f')](function(_0x1808b4){socket[_0x3fa0('0x80')]('userChatQueue:save',{'UserId':_0x1808b4['id'],'ChatQueueId':_0x583b4f['id']});});});});});}})[_0x3fa0('0x24')](respondWithStatusCode(_0x374108,null))['catch'](handleError(_0x374108,null));};exports[_0x3fa0('0x81')]=function(_0x341022,_0x2b359d,_0x47be59){return db['Team'][_0x3fa0('0x55')]({'where':{'id':_0x341022[_0x3fa0('0x45')][_0x3fa0('0x82')]},'attributes':['id'],'include':[{'model':db[_0x3fa0('0x6d')],'as':_0x3fa0('0x76'),'attributes':['id'],'raw':!![]}]})[_0x3fa0('0x24')](handleEntityNotFound(_0x2b359d,null))['then'](function(_0x6120dc){var _0x34b0e6=_['map'](_0x6120dc,'id');var _0x2291ba=[];var _0x5ef7d8=[];var _0x36de56=squel[_0x3fa0('0x83')]();_0x36de56[_0x3fa0('0x84')](_0x3fa0('0x85'))[_0x3fa0('0x86')](_0x3fa0('0x87'),'tq')[_0x3fa0('0x88')]('user_has_teams','ut',_0x3fa0('0x89'))[_0x3fa0('0x50')](_0x3fa0('0x8a'),_0x341022['params']['id']);for(var _0x1d79a8=0x0;_0x1d79a8<_0x6120dc[_0x3fa0('0x4a')];_0x1d79a8+=0x1){let _0x5359cc=_0x6120dc[_0x1d79a8];for(var _0x362e95=0x0;_0x362e95<_0x5359cc[_0x3fa0('0x76')][_0x3fa0('0x4a')];_0x362e95+=0x1){let _0x34df42=_0x5359cc[_0x3fa0('0x76')][_0x362e95];var _0x4429d4=_0x36de56[_0x3fa0('0x8b')]();_0x4429d4[_0x3fa0('0x50')](_0x3fa0('0x8c'),_0x34df42['id']);_0x5ef7d8[_0x3fa0('0x8d')](db[_0x3fa0('0x7b')]['query'](_0x4429d4[_0x3fa0('0x8e')](),{'type':db[_0x3fa0('0x7b')][_0x3fa0('0x8f')][_0x3fa0('0x90')]})[_0x3fa0('0x24')](function(_0xcc7895){if(_0xcc7895['length']===0x1){return _0x34df42['id'];}else{var _0x24c5a1=_[_0x3fa0('0x91')](_[_0x3fa0('0x44')](_0xcc7895,_0x3fa0('0x92')),function(_0x41b724){return _['includes'](_0x34b0e6,_0x41b724);});if(_0x24c5a1){return _0x34df42['id'];}}}));}}return BPromise[_0x3fa0('0x93')](_0x5ef7d8)['then'](function(_0x173a89){_0x2291ba=_(_0x2291ba)[_0x3fa0('0x94')](_0x173a89)[_0x3fa0('0x95')]()[_0x3fa0('0x96')]();return db[_0x3fa0('0x3f')]['find']({'where':{'id':_0x341022['params']['id']}})[_0x3fa0('0x24')](function(_0xc0c00d){return db[_0x3fa0('0x7b')][_0x3fa0('0x7c')](function(_0x3fcc34){return _0xc0c00d['removeTeams'](_0x341022[_0x3fa0('0x45')]['ids'],{'transaction':_0x3fcc34})['then'](function(){if(!_[_0x3fa0('0x97')](_0x2291ba)){return _0xc0c00d['removeAgents'](_0x2291ba,{'transaction':_0x3fcc34});}})[_0x3fa0('0x24')](function(){_0x2291ba[_0x3fa0('0x7f')](function(_0x17d202){socket[_0x3fa0('0x80')](_0x3fa0('0x98'),{'UserId':_0x17d202,'ChatQueueId':_0xc0c00d['id']});});});});});});})[_0x3fa0('0x24')](respondWithStatusCode(_0x2b359d,null))[_0x3fa0('0x2e')](handleError(_0x2b359d,null));};exports['addAgents']=function(_0x28a4a6,_0x4cb6b1,_0x264cc6){return db[_0x3fa0('0x3f')][_0x3fa0('0x59')]({'where':{'id':_0x28a4a6[_0x3fa0('0x65')]['id']}})['then'](handleEntityNotFound(_0x4cb6b1,null))[_0x3fa0('0x24')](function(_0x56fa86){if(_0x56fa86){return _0x56fa86[_0x3fa0('0x99')](_0x28a4a6[_0x3fa0('0x64')][_0x3fa0('0x82')],_[_0x3fa0('0x9a')](_0x28a4a6[_0x3fa0('0x64')],[_0x3fa0('0x82'),'id'])||{})[_0x3fa0('0x9b')](function(_0xb0213c){for(var _0x22b99e=0x0;_0x22b99e<_0x28a4a6[_0x3fa0('0x64')][_0x3fa0('0x82')][_0x3fa0('0x4a')];_0x22b99e+=0x1){socket[_0x3fa0('0x80')](_0x3fa0('0x9c'),{'UserId':Number(_0x28a4a6[_0x3fa0('0x64')][_0x3fa0('0x82')][_0x22b99e]),'ChatQueueId':Number(_0x28a4a6[_0x3fa0('0x65')]['id'])});}return _0xb0213c;});}})[_0x3fa0('0x24')](respondWithResult(_0x4cb6b1,null))[_0x3fa0('0x2e')](handleError(_0x4cb6b1,null));};exports[_0x3fa0('0x9d')]=function(_0x279b5a,_0x5b6d15,_0x1ad83f){return db['ChatQueue'][_0x3fa0('0x59')]({'where':{'id':_0x279b5a['params']['id']}})['then'](handleEntityNotFound(_0x5b6d15,null))[_0x3fa0('0x24')](function(_0x1c142f){if(_0x1c142f){return _0x1c142f['removeAgents'](_0x279b5a[_0x3fa0('0x45')][_0x3fa0('0x82')])[_0x3fa0('0x24')](function(){if(_['isArray'](_0x279b5a[_0x3fa0('0x45')][_0x3fa0('0x82')])){for(var _0x44a1f8=0x0;_0x44a1f8<_0x279b5a[_0x3fa0('0x45')]['ids']['length'];_0x44a1f8+=0x1){socket[_0x3fa0('0x80')](_0x3fa0('0x98'),{'UserId':Number(_0x279b5a['query'][_0x3fa0('0x82')][_0x44a1f8]),'ChatQueueId':Number(_0x279b5a[_0x3fa0('0x65')]['id'])});}}else{socket['emit'](_0x3fa0('0x98'),{'UserId':Number(_0x279b5a[_0x3fa0('0x45')][_0x3fa0('0x82')]),'ChatQueueId':Number(_0x279b5a['params']['id'])});}});}})['then'](respondWithStatusCode(_0x5b6d15,null))[_0x3fa0('0x2e')](handleError(_0x5b6d15,null));};exports[_0x3fa0('0x9e')]=function(_0x3587bd,_0x402035,_0x39fa2e){var _0x6e408f={};var _0x2e8739={};var _0x4b5c38;var _0x816468;return db[_0x3fa0('0x3f')]['findOne']({'where':{'id':_0x3587bd['params']['id']}})[_0x3fa0('0x24')](handleEntityNotFound(_0x402035,null))[_0x3fa0('0x24')](function(_0x32ceb2){if(_0x32ceb2){_0x4b5c38=_0x32ceb2;_0x2e8739[_0x3fa0('0x43')]=_['keys'](db[_0x3fa0('0x6d')][_0x3fa0('0x40')]);_0x2e8739[_0x3fa0('0x45')]=_['keys'](_0x3587bd[_0x3fa0('0x45')]);_0x2e8739['filters']=_[_0x3fa0('0x47')](_0x2e8739[_0x3fa0('0x43')],_0x2e8739[_0x3fa0('0x45')]);_0x6e408f[_0x3fa0('0x48')]=_[_0x3fa0('0x47')](_0x2e8739[_0x3fa0('0x43')],qs[_0x3fa0('0x49')](_0x3587bd['query'][_0x3fa0('0x49')]));_0x6e408f[_0x3fa0('0x48')]=_0x6e408f[_0x3fa0('0x48')][_0x3fa0('0x4a')]?_0x6e408f[_0x3fa0('0x48')]:_0x2e8739['model'];_0x6e408f['order']=qs[_0x3fa0('0x4d')](_0x3587bd[_0x3fa0('0x45')][_0x3fa0('0x4d')]);_0x6e408f[_0x3fa0('0x50')]=qs[_0x3fa0('0x46')](_[_0x3fa0('0x4e')](_0x3587bd['query'],_0x2e8739[_0x3fa0('0x46')]));if(_0x3587bd['query'][_0x3fa0('0x4f')]){_0x6e408f[_0x3fa0('0x50')]=_[_0x3fa0('0x51')](_0x6e408f['where'],{'$or':_[_0x3fa0('0x44')](_0x6e408f[_0x3fa0('0x48')],function(_0x14dabf){var _0x523e32={};_0x523e32[_0x14dabf]={'$like':'%'+_0x3587bd[_0x3fa0('0x45')][_0x3fa0('0x4f')]+'%'};return _0x523e32;})});}_0x6e408f=_[_0x3fa0('0x51')]({},_0x6e408f,_0x3587bd[_0x3fa0('0x52')]);return _0x4b5c38[_0x3fa0('0x9e')](_0x6e408f);}})[_0x3fa0('0x24')](function(_0x19bc5e){if(_0x19bc5e){_0x816468=_0x19bc5e[_0x3fa0('0x4a')];if(!_0x3587bd[_0x3fa0('0x45')]['hasOwnProperty'](_0x3fa0('0x6a'))){_0x6e408f[_0x3fa0('0x4c')]=qs[_0x3fa0('0x4c')](_0x3587bd[_0x3fa0('0x45')][_0x3fa0('0x4c')]);_0x6e408f[_0x3fa0('0x32')]=qs['offset'](_0x3587bd[_0x3fa0('0x45')][_0x3fa0('0x32')]);}return _0x4b5c38['getAgents'](_0x6e408f);}})[_0x3fa0('0x24')](function(_0x1463d9){if(_0x1463d9){return _0x1463d9?{'count':_0x816468,'rows':_0x1463d9}:null;}})['then'](respondWithResult(_0x402035,null))[_0x3fa0('0x2e')](handleError(_0x402035,null));};
\ No newline at end of file