8ea26a8249c4c4bb19125fb1720cbcb2062f8d7f
[motion2.git] / server / api / chatGroup / chatGroup.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 _0xb2f1=['status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','update','then','error','name','index','ChatGroup','rawAttributes','fieldName','type','key','model','map','keys','query','filters','intersection','attributes','length','hasOwnProperty','sort','where','filter','merge','options','count','includeAll','include','findAll','rows','catch','show','params','fields','find','create','body','destroy','describe','getUnread','ChatInternalMessage','addMembers','ids','getMembers','nolimit','removeMembers','ChatGroupId','getMessages','findOne','order','$gte','split','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatGroup.socket','register','sendStatus'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xb2f1,0x1c3));var _0x1b2f=function(_0x45147a,_0x62756c){_0x45147a=_0x45147a-0x0;var _0x291bcd=_0xb2f1[_0x45147a];return _0x291bcd;};'use strict';var emlformat=require(_0x1b2f('0x0'));var rimraf=require(_0x1b2f('0x1'));var zipdir=require(_0x1b2f('0x2'));var jsonpatch=require(_0x1b2f('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x1b2f('0x4'));var Mustache=require(_0x1b2f('0x5'));var util=require(_0x1b2f('0x6'));var path=require(_0x1b2f('0x7'));var sox=require(_0x1b2f('0x8'));var csv=require('to-csv');var ejs=require(_0x1b2f('0x9'));var fs=require('fs');var fs_extra=require(_0x1b2f('0xa'));var _=require(_0x1b2f('0xb'));var squel=require('squel');var crypto=require(_0x1b2f('0xc'));var jsforce=require(_0x1b2f('0xd'));var deskjs=require(_0x1b2f('0xe'));var toCsv=require(_0x1b2f('0xf'));var querystring=require(_0x1b2f('0x10'));var Papa=require(_0x1b2f('0x11'));var Redis=require(_0x1b2f('0x12'));var authService=require(_0x1b2f('0x13'));var qs=require(_0x1b2f('0x14'));var as=require(_0x1b2f('0x15'));var hardwareService=require(_0x1b2f('0x16'));var logger=require('../../config/logger')(_0x1b2f('0x17'));var utils=require(_0x1b2f('0x18'));var config=require(_0x1b2f('0x19'));var licenseUtil=require(_0x1b2f('0x1a'));var db=require(_0x1b2f('0x1b'))['db'];config[_0x1b2f('0x1c')]=_[_0x1b2f('0x1d')](config[_0x1b2f('0x1c')],{'host':_0x1b2f('0x1e'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1b2f('0x1c')]));require(_0x1b2f('0x1f'))[_0x1b2f('0x20')](socket);function respondWithStatusCode(_0x597228,_0x47b710){_0x47b710=_0x47b710||0xcc;return function(_0x280d88){if(_0x280d88){return _0x597228[_0x1b2f('0x21')](_0x47b710);}return _0x597228[_0x1b2f('0x22')](_0x47b710)[_0x1b2f('0x23')]();};}function respondWithResult(_0x1baccd,_0x2462e7){_0x2462e7=_0x2462e7||0xc8;return function(_0x2615a0){if(_0x2615a0){return _0x1baccd['status'](_0x2462e7)[_0x1b2f('0x24')](_0x2615a0);}};}function respondWithFilteredResult(_0x9b280e,_0x58be7a){return function(_0x4df7a0){if(_0x4df7a0){var _0xa08ce9=typeof _0x58be7a['offset']===_0x1b2f('0x25')&&typeof _0x58be7a[_0x1b2f('0x26')]==='undefined';var _0x332e31=_0x4df7a0['count'];var _0x2589e4=_0xa08ce9?0x0:_0x58be7a[_0x1b2f('0x27')];var _0x1660a6=_0xa08ce9?_0x4df7a0['count']:_0x58be7a[_0x1b2f('0x27')]+_0x58be7a[_0x1b2f('0x26')];var _0x138b1a;if(_0x1660a6>=_0x332e31){_0x1660a6=_0x332e31;_0x138b1a=0xc8;}else{_0x138b1a=0xce;}_0x9b280e[_0x1b2f('0x22')](_0x138b1a);return _0x9b280e[_0x1b2f('0x28')](_0x1b2f('0x29'),_0x2589e4+'-'+_0x1660a6+'/'+_0x332e31)[_0x1b2f('0x24')](_0x4df7a0);}return null;};}function patchUpdates(_0x350a1f){return function(_0x197600){try{jsonpatch[_0x1b2f('0x2a')](_0x197600,_0x350a1f,!![]);}catch(_0x307f10){return BPromise[_0x1b2f('0x2b')](_0x307f10);}return _0x197600[_0x1b2f('0x2c')]();};}function saveUpdates(_0x127d30,_0x9c085a){return function(_0x2074c4){if(_0x2074c4){return _0x2074c4[_0x1b2f('0x2d')](_0x127d30)[_0x1b2f('0x2e')](function(_0x566f61){return _0x566f61;});}return null;};}function removeEntity(_0x8705a1,_0x297572){return function(_0x2862ce){if(_0x2862ce){return _0x2862ce['destroy']()[_0x1b2f('0x2e')](function(){_0x8705a1['status'](0xcc)[_0x1b2f('0x23')]();});}};}function handleEntityNotFound(_0x35a7ac,_0x2eee62){return function(_0x465322){if(!_0x465322){_0x35a7ac[_0x1b2f('0x21')](0x194);}return _0x465322;};}function handleError(_0x4a7bcd,_0x288667){_0x288667=_0x288667||0x1f4;return function(_0x2b3920){logger[_0x1b2f('0x2f')](_0x2b3920['stack']);if(_0x2b3920['name']){delete _0x2b3920[_0x1b2f('0x30')];}_0x4a7bcd[_0x1b2f('0x22')](_0x288667)['send'](_0x2b3920);};}exports[_0x1b2f('0x31')]=function(_0x553bcd,_0x1574c3){var _0x3eb9f={},_0x49c509={},_0x1a2ded={'count':0x0,'rows':[]};var _0x4a1714=_['map'](db[_0x1b2f('0x32')][_0x1b2f('0x33')],function(_0x127ed7){return{'name':_0x127ed7[_0x1b2f('0x34')],'type':_0x127ed7[_0x1b2f('0x35')][_0x1b2f('0x36')]};});_0x49c509[_0x1b2f('0x37')]=_[_0x1b2f('0x38')](_0x4a1714,_0x1b2f('0x30'));_0x49c509['query']=_[_0x1b2f('0x39')](_0x553bcd[_0x1b2f('0x3a')]);_0x49c509[_0x1b2f('0x3b')]=_[_0x1b2f('0x3c')](_0x49c509['model'],_0x49c509[_0x1b2f('0x3a')]);_0x3eb9f['attributes']=_[_0x1b2f('0x3c')](_0x49c509[_0x1b2f('0x37')],qs['fields'](_0x553bcd[_0x1b2f('0x3a')]['fields']));_0x3eb9f[_0x1b2f('0x3d')]=_0x3eb9f[_0x1b2f('0x3d')][_0x1b2f('0x3e')]?_0x3eb9f['attributes']:_0x49c509['model'];if(!_0x553bcd['query'][_0x1b2f('0x3f')]('nolimit')){_0x3eb9f['limit']=qs[_0x1b2f('0x26')](_0x553bcd[_0x1b2f('0x3a')]['limit']);_0x3eb9f[_0x1b2f('0x27')]=qs[_0x1b2f('0x27')](_0x553bcd[_0x1b2f('0x3a')]['offset']);}_0x3eb9f['order']=qs[_0x1b2f('0x40')](_0x553bcd[_0x1b2f('0x3a')][_0x1b2f('0x40')]);_0x3eb9f[_0x1b2f('0x41')]=qs[_0x1b2f('0x3b')](_['pick'](_0x553bcd['query'],_0x49c509[_0x1b2f('0x3b')]),_0x4a1714);if(_0x553bcd['query'][_0x1b2f('0x42')]){_0x3eb9f[_0x1b2f('0x41')]=_[_0x1b2f('0x43')](_0x3eb9f[_0x1b2f('0x41')],{'$or':_[_0x1b2f('0x38')](_0x4a1714,function(_0x140fe9){if(_0x140fe9[_0x1b2f('0x35')]!=='VIRTUAL'){var _0x31870c={};_0x31870c[_0x140fe9[_0x1b2f('0x30')]]={'$like':'%'+_0x553bcd['query']['filter']+'%'};return _0x31870c;}})});}_0x3eb9f=_[_0x1b2f('0x43')]({},_0x3eb9f,_0x553bcd[_0x1b2f('0x44')]);var _0x5e12f7={'where':_0x3eb9f['where']};return db[_0x1b2f('0x32')][_0x1b2f('0x45')](_0x5e12f7)[_0x1b2f('0x2e')](function(_0x5c6b6d){_0x1a2ded[_0x1b2f('0x45')]=_0x5c6b6d;if(_0x553bcd['query'][_0x1b2f('0x46')]){_0x3eb9f[_0x1b2f('0x47')]=[{'all':!![]}];}return db[_0x1b2f('0x32')][_0x1b2f('0x48')](_0x3eb9f);})[_0x1b2f('0x2e')](function(_0x2f4eb5){_0x1a2ded[_0x1b2f('0x49')]=_0x2f4eb5;return _0x1a2ded;})[_0x1b2f('0x2e')](respondWithFilteredResult(_0x1574c3,_0x3eb9f))[_0x1b2f('0x4a')](handleError(_0x1574c3,null));};exports[_0x1b2f('0x4b')]=function(_0xb4ef6a,_0x559455){var _0x45de60={'raw':!![],'where':{'id':_0xb4ef6a[_0x1b2f('0x4c')]['id']}},_0x1f4eec={};_0x1f4eec[_0x1b2f('0x37')]=_[_0x1b2f('0x39')](db[_0x1b2f('0x32')]['rawAttributes']);_0x1f4eec[_0x1b2f('0x3a')]=_['keys'](_0xb4ef6a[_0x1b2f('0x3a')]);_0x1f4eec[_0x1b2f('0x3b')]=_[_0x1b2f('0x3c')](_0x1f4eec[_0x1b2f('0x37')],_0x1f4eec[_0x1b2f('0x3a')]);_0x45de60[_0x1b2f('0x3d')]=_[_0x1b2f('0x3c')](_0x1f4eec[_0x1b2f('0x37')],qs[_0x1b2f('0x4d')](_0xb4ef6a[_0x1b2f('0x3a')][_0x1b2f('0x4d')]));_0x45de60[_0x1b2f('0x3d')]=_0x45de60[_0x1b2f('0x3d')]['length']?_0x45de60[_0x1b2f('0x3d')]:_0x1f4eec[_0x1b2f('0x37')];if(_0xb4ef6a[_0x1b2f('0x3a')][_0x1b2f('0x46')]){_0x45de60[_0x1b2f('0x47')]=[{'all':!![]}];}_0x45de60=_[_0x1b2f('0x43')]({},_0x45de60,_0xb4ef6a[_0x1b2f('0x44')]);return db[_0x1b2f('0x32')][_0x1b2f('0x4e')](_0x45de60)[_0x1b2f('0x2e')](handleEntityNotFound(_0x559455,null))[_0x1b2f('0x2e')](respondWithResult(_0x559455,null))['catch'](handleError(_0x559455,null));};exports[_0x1b2f('0x4f')]=function(_0x857a04,_0x4a96a9){return db[_0x1b2f('0x32')][_0x1b2f('0x4f')](_0x857a04[_0x1b2f('0x50')],{})[_0x1b2f('0x2e')](respondWithResult(_0x4a96a9,0xc9))['catch'](handleError(_0x4a96a9,null));};exports['update']=function(_0x3cf38a,_0x4ee9da){if(_0x3cf38a['body']['id']){delete _0x3cf38a[_0x1b2f('0x50')]['id'];}return db[_0x1b2f('0x32')]['find']({'where':{'id':_0x3cf38a[_0x1b2f('0x4c')]['id']}})[_0x1b2f('0x2e')](handleEntityNotFound(_0x4ee9da,null))[_0x1b2f('0x2e')](saveUpdates(_0x3cf38a[_0x1b2f('0x50')],null))['then'](respondWithResult(_0x4ee9da,null))[_0x1b2f('0x4a')](handleError(_0x4ee9da,null));};exports[_0x1b2f('0x51')]=function(_0xa0133,_0x3aa12d){return db['ChatGroup'][_0x1b2f('0x4e')]({'where':{'id':_0xa0133[_0x1b2f('0x4c')]['id']}})[_0x1b2f('0x2e')](handleEntityNotFound(_0x3aa12d,null))['then'](removeEntity(_0x3aa12d,null))[_0x1b2f('0x4a')](handleError(_0x3aa12d,null));};exports[_0x1b2f('0x52')]=function(_0x37c985,_0x101df5){return db[_0x1b2f('0x32')][_0x1b2f('0x52')]()[_0x1b2f('0x2e')](respondWithResult(_0x101df5,null))[_0x1b2f('0x4a')](handleError(_0x101df5,null));};exports[_0x1b2f('0x53')]=function(_0x25865,_0x1a1d0e,_0x25ebcc){return db[_0x1b2f('0x54')]['count']({'where':{'ChatGroupId':_0x25865['params']['id'],'ToId':_0x25865['user']['id'],'read':![]}})[_0x1b2f('0x2e')](function(_0x1e483f){return{'id':_['toInteger'](_0x25865['params']['id']),'count':_0x1e483f};})[_0x1b2f('0x2e')](respondWithResult(_0x1a1d0e,null))[_0x1b2f('0x4a')](handleError(_0x1a1d0e,null));};exports[_0x1b2f('0x55')]=function(_0x322c3c,_0x276c9c,_0x2ac9e7){return db[_0x1b2f('0x32')][_0x1b2f('0x4e')]({'where':{'id':_0x322c3c[_0x1b2f('0x4c')]['id']}})['then'](handleEntityNotFound(_0x276c9c,null))[_0x1b2f('0x2e')](function(_0x519ce5){if(_0x519ce5){return _0x519ce5[_0x1b2f('0x55')](_0x322c3c['body'][_0x1b2f('0x56')],_['omit'](_0x322c3c[_0x1b2f('0x50')],[_0x1b2f('0x56'),'id'])||{});}})['then'](respondWithResult(_0x276c9c,null))[_0x1b2f('0x4a')](handleError(_0x276c9c,null));};exports[_0x1b2f('0x57')]=function(_0x49c10b,_0x392020,_0xb3b3a2){var _0x40b4e7={};var _0x50e41e={};var _0x1a3440;var _0xad326a;return db[_0x1b2f('0x32')]['findOne']({'where':{'id':_0x49c10b['params']['id']}})[_0x1b2f('0x2e')](handleEntityNotFound(_0x392020,null))[_0x1b2f('0x2e')](function(_0x4828c6){if(_0x4828c6){_0x1a3440=_0x4828c6;_0x50e41e[_0x1b2f('0x37')]=_[_0x1b2f('0x39')](db['User'][_0x1b2f('0x33')]);_0x50e41e[_0x1b2f('0x3a')]=_[_0x1b2f('0x39')](_0x49c10b[_0x1b2f('0x3a')]);_0x50e41e[_0x1b2f('0x3b')]=_[_0x1b2f('0x3c')](_0x50e41e[_0x1b2f('0x37')],_0x50e41e[_0x1b2f('0x3a')]);_0x40b4e7[_0x1b2f('0x3d')]=_[_0x1b2f('0x3c')](_0x50e41e[_0x1b2f('0x37')],qs[_0x1b2f('0x4d')](_0x49c10b[_0x1b2f('0x3a')][_0x1b2f('0x4d')]));_0x40b4e7[_0x1b2f('0x3d')]=_0x40b4e7['attributes'][_0x1b2f('0x3e')]?_0x40b4e7[_0x1b2f('0x3d')]:_0x50e41e[_0x1b2f('0x37')];_0x40b4e7['order']=qs['sort'](_0x49c10b[_0x1b2f('0x3a')]['sort']);_0x40b4e7[_0x1b2f('0x41')]=qs[_0x1b2f('0x3b')](_['pick'](_0x49c10b[_0x1b2f('0x3a')],_0x50e41e[_0x1b2f('0x3b')]));if(_0x49c10b[_0x1b2f('0x3a')][_0x1b2f('0x42')]){_0x40b4e7[_0x1b2f('0x41')]=_[_0x1b2f('0x43')](_0x40b4e7[_0x1b2f('0x41')],{'$or':_[_0x1b2f('0x38')](_0x40b4e7[_0x1b2f('0x3d')],function(_0xa4d658){var _0x18e515={};_0x18e515[_0xa4d658]={'$like':'%'+_0x49c10b[_0x1b2f('0x3a')][_0x1b2f('0x42')]+'%'};return _0x18e515;})});}_0x40b4e7=_[_0x1b2f('0x43')]({},_0x40b4e7,_0x49c10b[_0x1b2f('0x44')]);return _0x1a3440['getMembers'](_0x40b4e7);}})['then'](function(_0x472c44){if(_0x472c44){_0xad326a=_0x472c44[_0x1b2f('0x3e')];if(!_0x49c10b[_0x1b2f('0x3a')][_0x1b2f('0x3f')](_0x1b2f('0x58'))){_0x40b4e7[_0x1b2f('0x26')]=qs[_0x1b2f('0x26')](_0x49c10b[_0x1b2f('0x3a')]['limit']);_0x40b4e7['offset']=qs['offset'](_0x49c10b[_0x1b2f('0x3a')][_0x1b2f('0x27')]);}return _0x1a3440[_0x1b2f('0x57')](_0x40b4e7);}})[_0x1b2f('0x2e')](function(_0xf54e11){if(_0xf54e11){return _0xf54e11?{'count':_0xad326a,'rows':_0xf54e11}:null;}})[_0x1b2f('0x2e')](respondWithResult(_0x392020,null))['catch'](handleError(_0x392020,null));};exports['removeMembers']=function(_0x22ab5b,_0x1267b1,_0x248598){return db[_0x1b2f('0x32')][_0x1b2f('0x4e')]({'where':{'id':_0x22ab5b['params']['id']}})[_0x1b2f('0x2e')](handleEntityNotFound(_0x1267b1,null))['then'](function(_0x197de5){if(_0x197de5){return _0x197de5[_0x1b2f('0x59')](_0x22ab5b[_0x1b2f('0x3a')][_0x1b2f('0x56')]);}})['then'](respondWithStatusCode(_0x1267b1,null))[_0x1b2f('0x4a')](handleError(_0x1267b1,null));};exports['addMessage']=function(_0x25def1,_0x363945,_0x1c9f76){if(_0x25def1[_0x1b2f('0x50')]['id']){delete _0x25def1['body']['id'];}return db[_0x1b2f('0x32')]['find']({'where':{'id':_0x25def1[_0x1b2f('0x4c')]['id']}})[_0x1b2f('0x2e')](handleEntityNotFound(_0x363945,null))[_0x1b2f('0x2e')](function(_0x4fcb65){if(_0x4fcb65){_0x25def1[_0x1b2f('0x50')][_0x1b2f('0x5a')]=_0x4fcb65['id'];return db['ChatInternalMessage'][_0x1b2f('0x4f')](_0x25def1[_0x1b2f('0x50')]);}})[_0x1b2f('0x2e')](respondWithResult(_0x363945,null))[_0x1b2f('0x4a')](handleError(_0x363945,null));};exports[_0x1b2f('0x5b')]=function(_0x42a7ca,_0x9fb548,_0x412a40){var _0x1aa1b1={};var _0x269dda={};var _0x4a5367;var _0xcdba70;return db['ChatGroup'][_0x1b2f('0x5c')]({'where':{'id':_0x42a7ca[_0x1b2f('0x4c')]['id']}})[_0x1b2f('0x2e')](handleEntityNotFound(_0x9fb548,null))[_0x1b2f('0x2e')](function(_0x5e8df6){if(_0x5e8df6){_0x4a5367=_0x5e8df6;_0x269dda[_0x1b2f('0x37')]=_[_0x1b2f('0x39')](db[_0x1b2f('0x54')][_0x1b2f('0x33')]);_0x269dda[_0x1b2f('0x3a')]=_[_0x1b2f('0x39')](_0x42a7ca[_0x1b2f('0x3a')]);_0x269dda[_0x1b2f('0x3b')]=_[_0x1b2f('0x3c')](_0x269dda[_0x1b2f('0x37')],_0x269dda[_0x1b2f('0x3a')]);_0x1aa1b1['attributes']=_['intersection'](_0x269dda[_0x1b2f('0x37')],qs[_0x1b2f('0x4d')](_0x42a7ca[_0x1b2f('0x3a')][_0x1b2f('0x4d')]));_0x1aa1b1[_0x1b2f('0x3d')]=_0x1aa1b1[_0x1b2f('0x3d')]['length']?_0x1aa1b1[_0x1b2f('0x3d')]:_0x269dda[_0x1b2f('0x37')];_0x1aa1b1[_0x1b2f('0x5d')]=qs['sort'](_0x42a7ca[_0x1b2f('0x3a')]['sort']);_0x1aa1b1[_0x1b2f('0x41')]=qs[_0x1b2f('0x3b')](_['pick'](_0x42a7ca[_0x1b2f('0x3a')],_0x269dda[_0x1b2f('0x3b')]));if(_0x42a7ca[_0x1b2f('0x3a')][_0x1b2f('0x42')]){_0x1aa1b1['where']=_[_0x1b2f('0x43')](_0x1aa1b1[_0x1b2f('0x41')],{'$or':_['map'](_0x1aa1b1[_0x1b2f('0x3d')],function(_0x1c8d1f){var _0x22d007={};_0x22d007[_0x1c8d1f]={'$like':'%'+_0x42a7ca['query'][_0x1b2f('0x42')]+'%'};return _0x22d007;})});}if(_0x42a7ca[_0x1b2f('0x3a')]['$gte']){var _0x3f32fe=_0x42a7ca[_0x1b2f('0x3a')][_0x1b2f('0x5e')][_0x1b2f('0x5f')](',');var _0x1c9108={};_0x1c9108[_0x3f32fe[0x0]]={'$gte':moment(_0x3f32fe[0x1])['format'](_0x1b2f('0x60'))};_0x1aa1b1[_0x1b2f('0x41')]=_['merge'](_0x1aa1b1['where'],_0x1c9108);}_0x1aa1b1=_[_0x1b2f('0x43')]({},_0x1aa1b1,_0x42a7ca[_0x1b2f('0x44')]);return _0x4a5367[_0x1b2f('0x5b')](_0x1aa1b1);}})[_0x1b2f('0x2e')](function(_0x40a997){if(_0x40a997){_0xcdba70=_0x40a997[_0x1b2f('0x3e')];if(!_0x42a7ca['query']['hasOwnProperty'](_0x1b2f('0x58'))){_0x1aa1b1[_0x1b2f('0x26')]=qs[_0x1b2f('0x26')](_0x42a7ca[_0x1b2f('0x3a')][_0x1b2f('0x26')]);_0x1aa1b1['offset']=qs['offset'](_0x42a7ca['query'][_0x1b2f('0x27')]);}return _0x4a5367[_0x1b2f('0x5b')](_0x1aa1b1);}})[_0x1b2f('0x2e')](function(_0x22289e){if(_0x22289e){return _0x22289e?{'count':_0xcdba70,'rows':_0x22289e}:null;}})[_0x1b2f('0x2e')](respondWithResult(_0x9fb548,null))[_0x1b2f('0x4a')](handleError(_0x9fb548,null));};