Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / api / cmHopper / cmHopper.rpc.js
index 8700a35..a75a137 100644 (file)
@@ -1 +1 @@
-const a139_0x415b=['map','sequelize','moment','CreateCmHopper','info','options','util','format','UpdateCmHopper','all','../../mysqldb','name','YYYY-MM-DD\x20HH:mm:ss','limit','include','body','GetCmHopper','message','transaction','raw','push','then','CountReScheduled','CmHopper','catch','\x20,\x201,\x20null','COUNT','contactsRescheduled','MoveContactManagedDialer','UserId','LOCK','Contact','CmHopperFinal','`scheduledat`\x20>=\x20','DestroyCmHopper','CmContact','findAll','attributes','order','\x22%s\x22','where','debug','GetContactDialer','includes','create','findOne','model','rpc','stringify','update','GetContactRecallMe','error','length','ShowCmHopper','keys','describe','UPDATE','destroy'];(function(_0x2e5859,_0x415bb6){const _0x51fcbc=function(_0x46f5f0){while(--_0x46f5f0){_0x2e5859['push'](_0x2e5859['shift']());}};_0x51fcbc(++_0x415bb6);}(a139_0x415b,0x8b));const a139_0x51fc=function(_0x2e5859,_0x415bb6){_0x2e5859=_0x2e5859-0x0;let _0x51fcbc=a139_0x415b[_0x2e5859];return _0x51fcbc;};const _0x35df97=a139_0x51fc;'use strict';const _=require('lodash'),util=require(_0x35df97('0x29')),moment=require(_0x35df97('0x25')),db=require(_0x35df97('0x2d'))['db'],logger=require('../../config/logger')(_0x35df97('0x18')),{literal,fn}=require(_0x35df97('0x24'));exports['GetCmHopper']=function(_0x46f5f0){const _0x17b0b7=this;return new Promise(function(_0x1a7259,_0x303cdd){const _0xeccb54=a139_0x51fc;return db['CmHopper'][_0xeccb54('0xd')]({'raw':_0x46f5f0[_0xeccb54('0x28')]?_0x46f5f0[_0xeccb54('0x28')][_0xeccb54('0x36')]===undefined?!![]:![]:!![],'where':_0x46f5f0[_0xeccb54('0x28')]?_0x46f5f0['options'][_0xeccb54('0x11')]||null:null,'attributes':_0x46f5f0[_0xeccb54('0x28')]?_0x46f5f0[_0xeccb54('0x28')]['attributes']||null:null,'limit':_0x46f5f0[_0xeccb54('0x28')]?_0x46f5f0['options'][_0xeccb54('0x30')]||null:null,'include':_0x46f5f0[_0xeccb54('0x28')]?_0x46f5f0[_0xeccb54('0x28')][_0xeccb54('0x31')]?_[_0xeccb54('0x23')](_0x46f5f0[_0xeccb54('0x28')][_0xeccb54('0x31')],function(_0x3348d6){const _0x5c2f16=_0xeccb54;return{'model':db[_0x3348d6[_0x5c2f16('0x17')]],'as':_0x3348d6['as'],'attributes':_0x3348d6[_0x5c2f16('0xe')],'include':_0x3348d6['include']?_[_0x5c2f16('0x23')](_0x3348d6[_0x5c2f16('0x31')],function(_0x1daef7){const _0x17f910=_0x5c2f16;return{'model':db[_0x1daef7[_0x17f910('0x17')]],'as':_0x1daef7['as'],'attributes':_0x1daef7[_0x17f910('0xe')],'include':_0x1daef7[_0x17f910('0x31')]?_[_0x17f910('0x23')](_0x1daef7[_0x17f910('0x31')],function(_0x44192f){return{'model':db[_0x44192f['model']],'as':_0x44192f['as'],'attributes':_0x44192f['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x102f25){const _0x40cef8=_0xeccb54;logger[_0x40cef8('0x27')](_0x40cef8('0x33'),_0x46f5f0),logger[_0x40cef8('0x12')](_0x40cef8('0x33'),_0x46f5f0,JSON[_0x40cef8('0x19')](_0x102f25)),_0x1a7259(_0x102f25);})[_0xeccb54('0x1')](function(_0x2c02bc){const _0x2956b0=_0xeccb54;logger['error']('GetCmHopper',_0x2c02bc[_0x2956b0('0x34')],_0x46f5f0),_0x303cdd(_0x17b0b7[_0x2956b0('0x1c')](0x1f4,_0x2c02bc[_0x2956b0('0x34')]));});});},exports['ShowCmHopper']=function(_0x10a2c6){const _0x3691b5=this;return new Promise(function(_0x57919f,_0x2e1703){const _0xfd6481=a139_0x51fc;return db['CmHopper'][_0xfd6481('0x16')]({'raw':_0x10a2c6['options']?_0x10a2c6[_0xfd6481('0x28')][_0xfd6481('0x36')]===undefined?!![]:![]:!![],'where':_0x10a2c6[_0xfd6481('0x28')]?_0x10a2c6[_0xfd6481('0x28')][_0xfd6481('0x11')]||null:null,'attributes':_0x10a2c6['options']?_0x10a2c6['options'][_0xfd6481('0xe')]||null:null,'include':_0x10a2c6[_0xfd6481('0x28')]?_0x10a2c6['options']['include']?_[_0xfd6481('0x23')](_0x10a2c6[_0xfd6481('0x28')][_0xfd6481('0x31')],function(_0xcadc5f){const _0x31f1bc=_0xfd6481;return{'model':db[_0xcadc5f[_0x31f1bc('0x17')]],'as':_0xcadc5f['as'],'attributes':_0xcadc5f[_0x31f1bc('0xe')],'include':_0xcadc5f[_0x31f1bc('0x31')]?_['map'](_0xcadc5f['include'],function(_0x226f73){const _0x195b3a=_0x31f1bc;return{'model':db[_0x226f73[_0x195b3a('0x17')]],'as':_0x226f73['as'],'attributes':_0x226f73[_0x195b3a('0xe')],'include':_0x226f73['include']?_[_0x195b3a('0x23')](_0x226f73[_0x195b3a('0x31')],function(_0x4b1b88){const _0x281bdd=_0x195b3a;return{'model':db[_0x4b1b88['model']],'as':_0x4b1b88['as'],'attributes':_0x4b1b88[_0x281bdd('0xe')]};}):[]};}):[]};}):[]:[]})[_0xfd6481('0x38')](function(_0x492aec){const _0x3ce61f=_0xfd6481;logger[_0x3ce61f('0x27')](_0x3ce61f('0x1e'),_0x10a2c6),logger['debug'](_0x3ce61f('0x1e'),_0x10a2c6,JSON[_0x3ce61f('0x19')](_0x492aec)),_0x57919f(_0x492aec);})[_0xfd6481('0x1')](function(_0x1def2c){const _0x37cfa8=_0xfd6481;logger[_0x37cfa8('0x1c')](_0x37cfa8('0x1e'),_0x1def2c[_0x37cfa8('0x34')],_0x10a2c6),_0x2e1703(_0x3691b5[_0x37cfa8('0x1c')](0x1f4,_0x1def2c[_0x37cfa8('0x34')]));});});},exports['CreateCmHopper']=function(_0x52899e){const _0x54bd39=this;return new Promise(function(_0x2db760,_0xb64714){const _0x57b007=a139_0x51fc;return db[_0x57b007('0x0')][_0x57b007('0x15')](_0x52899e[_0x57b007('0x32')],{'raw':_0x52899e['options']?_0x52899e['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x242886){const _0x4baed4=_0x57b007;logger[_0x4baed4('0x27')](_0x4baed4('0x26'),_0x52899e),logger['debug']('CreateCmHopper',_0x52899e,JSON[_0x4baed4('0x19')](_0x242886)),_0x2db760(_0x242886);})['catch'](function(_0x3c3b7f){const _0x10e5c7=_0x57b007;logger['error'](_0x10e5c7('0x26'),_0x3c3b7f[_0x10e5c7('0x34')],_0x52899e),_0xb64714(_0x54bd39[_0x10e5c7('0x1c')](0x1f4,_0x3c3b7f[_0x10e5c7('0x34')]));});});},exports[_0x35df97('0x2b')]=function(_0x46525b){const _0x5e3669=this;return new Promise(function(_0x2b266e,_0x1d80a5){const _0x1d91ea=a139_0x51fc;return db[_0x1d91ea('0x0')][_0x1d91ea('0x1a')](_0x46525b[_0x1d91ea('0x32')],{'raw':_0x46525b[_0x1d91ea('0x28')]?_0x46525b['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x46525b[_0x1d91ea('0x28')]?_0x46525b['options']['where']||null:null,'attributes':_0x46525b[_0x1d91ea('0x28')]?_0x46525b[_0x1d91ea('0x28')][_0x1d91ea('0xe')]||null:null,'limit':_0x46525b['options']?_0x46525b[_0x1d91ea('0x28')]['limit']||null:null})['then'](function(_0x165a99){const _0x257c33=_0x1d91ea;logger[_0x257c33('0x27')]('UpdateCmHopper',_0x46525b),logger[_0x257c33('0x12')](_0x257c33('0x2b'),_0x46525b,JSON[_0x257c33('0x19')](_0x165a99)),_0x2b266e(_0x165a99);})[_0x1d91ea('0x1')](function(_0x26a762){const _0x311ae9=_0x1d91ea;logger[_0x311ae9('0x1c')](_0x311ae9('0x2b'),_0x26a762['message'],_0x46525b),_0x1d80a5(_0x5e3669['error'](0x1f4,_0x26a762[_0x311ae9('0x34')]));});});},exports['DestroyCmHopper']=function(_0x316af4){const _0x2d4878=this;return new Promise(function(_0x2ffbce,_0x1cd6d8){const _0x5a068a=a139_0x51fc;return db[_0x5a068a('0x0')][_0x5a068a('0x22')]({'where':_0x316af4['options']?_0x316af4[_0x5a068a('0x28')][_0x5a068a('0x11')]||null:null})[_0x5a068a('0x38')](function(_0x3b3075){const _0x51540e=_0x5a068a;logger['info'](_0x51540e('0xb'),_0x316af4),logger[_0x51540e('0x12')]('DestroyCmHopper',_0x316af4,JSON['stringify'](_0x3b3075)),_0x2ffbce(_0x3b3075);})[_0x5a068a('0x1')](function(_0x57efb1){const _0xe330e0=_0x5a068a;logger['error'](_0xe330e0('0xb'),_0x57efb1[_0xe330e0('0x34')],_0x316af4),_0x1cd6d8(_0x2d4878['error'](0x1f4,_0x57efb1[_0xe330e0('0x34')]));});});},exports[_0x35df97('0x13')]=function(_0x245c89){const _0xed04a3=this;return new Promise(function(_0x362db3,_0x39a503){const _0x48b99e=a139_0x51fc;return db[_0x48b99e('0xc')]['describe']()['then'](function(_0x46ed9d){const _0x2adb18=_0x48b99e;return db[_0x2adb18('0x24')][_0x2adb18('0x35')](function(_0x1f36e8){const _0x5958c5=_0x2adb18;return db['CmHopper'][_0x5958c5('0xd')]({'where':_0x245c89[_0x5958c5('0x28')]?_0x245c89['options']['where']||null:null,'attributes':_0x245c89['options']?_0x245c89[_0x5958c5('0x28')][_0x5958c5('0xe')]||null:null,'limit':_0x245c89[_0x5958c5('0x28')]?_0x245c89[_0x5958c5('0x28')][_0x5958c5('0x30')]||null:null,'order':_0x245c89[_0x5958c5('0x28')]?_0x245c89[_0x5958c5('0x28')]['order']||null:null,'transaction':_0x1f36e8,'lock':_0x1f36e8[_0x5958c5('0x7')][_0x5958c5('0x21')],'include':[{'model':db[_0x5958c5('0xc')],'as':'Contact','attributes':_[_0x5958c5('0x1f')](_0x46ed9d)},{'model':db['User'],'as':'Agent','attributes':['id',_0x5958c5('0x2e'),'voicePause']}]})[_0x5958c5('0x38')](function(_0x112748){const _0x395e7b=_0x5958c5,_0x1052f2=[],_0x215eed=[];for(let _0x40d2e9=0x0;_0x40d2e9<_0x112748[_0x395e7b('0x1d')];_0x40d2e9+=0x1){!_0x215eed[_0x395e7b('0x14')](_0x112748[_0x40d2e9]['UserId'])&&(_0x215eed['push'](_0x112748[_0x40d2e9][_0x395e7b('0x6')]),_0x1052f2[_0x395e7b('0x37')](_0x112748[_0x40d2e9][_0x395e7b('0x1a')](_0x245c89[_0x395e7b('0x32')],{'transaction':_0x1f36e8})));}return Promise['all'](_0x1052f2);});})[_0x2adb18('0x38')](function(_0x116815){const _0x38a6f2=_0x2adb18;logger[_0x38a6f2('0x27')](_0x38a6f2('0x13'),_0x245c89),logger[_0x38a6f2('0x12')](_0x38a6f2('0x13'),_0x245c89,JSON[_0x38a6f2('0x19')](_0x116815)),_0x362db3(_0x116815);})['catch'](function(_0x2a1a06){const _0x1ba535=_0x2adb18;logger[_0x1ba535('0x1c')](_0x1ba535('0x13'),_0x2a1a06[_0x1ba535('0x34')],_0x245c89),_0x39a503(_0xed04a3[_0x1ba535('0x1c')](0x1f4,_0x2a1a06[_0x1ba535('0x34')]));});});});},exports['MoveContactManagedDialer']=function(_0x5b48d9){const _0x43f19b=this;return new Promise(function(_0x1e6970,_0x41bb38){const _0x4636cc=a139_0x51fc;return db[_0x4636cc('0x24')][_0x4636cc('0x35')](function(_0x26f521){const _0x4edc21=_0x4636cc;return db[_0x4edc21('0x9')][_0x4edc21('0x15')](_0x5b48d9['body'],{'raw':_0x5b48d9[_0x4edc21('0x28')]?_0x5b48d9['options'][_0x4edc21('0x36')]===undefined?!![]:![]:!![],'transaction':_0x26f521})[_0x4edc21('0x38')](function(){const _0x5a6840=_0x4edc21;return db['CmHopper'][_0x5a6840('0x22')]({'where':_0x5b48d9['options']?_0x5b48d9[_0x5a6840('0x28')]['where']||null:null,'transaction':_0x26f521});});})[_0x4636cc('0x38')](function(_0x36fda7){const _0xc5d7b3=_0x4636cc;logger[_0xc5d7b3('0x27')]('MoveContactManagedDialer',_0x5b48d9),logger[_0xc5d7b3('0x12')](_0xc5d7b3('0x5'),_0x5b48d9,JSON[_0xc5d7b3('0x19')](_0x36fda7)),_0x1e6970(_0x36fda7);})['catch'](function(_0x27f3ff){const _0x2febfc=_0x4636cc;logger[_0x2febfc('0x1c')](_0x2febfc('0x5'),_0x27f3ff[_0x2febfc('0x34')],_0x5b48d9),_0x41bb38(_0x43f19b[_0x2febfc('0x1c')](0x1f4,_0x27f3ff['message']));});});},exports[_0x35df97('0x39')]=function(_0x356a58){const _0x18d27e=this;return new Promise(function(_0x42aeec,_0x3cc295){const _0x4a97a1=a139_0x51fc;return db[_0x4a97a1('0x0')]['findAll']({'raw':_0x356a58['options']?_0x356a58[_0x4a97a1('0x28')][_0x4a97a1('0x36')]===undefined?!![]:![]:!![],'where':_0x356a58[_0x4a97a1('0x28')]?_0x356a58[_0x4a97a1('0x28')]['where']||null:null,'attributes':[[fn(_0x4a97a1('0x3'),fn('IF',literal(_0x4a97a1('0xa')+util['format'](_0x4a97a1('0x10'),moment()[_0x4a97a1('0x2a')](_0x4a97a1('0x2f')))+_0x4a97a1('0x2')))),_0x4a97a1('0x4')]]})['then'](function(_0x36e20b){const _0x28beb7=_0x4a97a1;logger[_0x28beb7('0x27')](_0x28beb7('0x39'),_0x356a58),logger[_0x28beb7('0x12')](_0x28beb7('0x39'),_0x356a58,JSON[_0x28beb7('0x19')](_0x36e20b)),_0x42aeec(_0x36e20b);})['catch'](function(_0x4d3591){const _0x5d6556=_0x4a97a1;logger[_0x5d6556('0x1c')](_0x5d6556('0x39'),_0x4d3591[_0x5d6556('0x34')],_0x356a58),_0x3cc295(_0x18d27e[_0x5d6556('0x1c')](0x1f4,_0x4d3591[_0x5d6556('0x34')]));});});},exports['GetContactRecallMe']=function(_0x190b32){const _0x170123=this;return new Promise(function(_0x2d7cfb,_0x267235){const _0xa6f614=a139_0x51fc;return db[_0xa6f614('0xc')]['describe']()[_0xa6f614('0x38')](function(){const _0x2e522e=_0xa6f614;return db[_0x2e522e('0x24')][_0x2e522e('0x35')](function(_0x53200a){const _0x9777b=_0x2e522e;return db[_0x9777b('0x0')]['findAll']({'where':_0x190b32[_0x9777b('0x28')]?_0x190b32[_0x9777b('0x28')][_0x9777b('0x11')]||null:null,'attributes':_0x190b32[_0x9777b('0x28')]?_0x190b32[_0x9777b('0x28')][_0x9777b('0xe')]||null:null,'limit':0x1,'order':_0x190b32['options']?_0x190b32['options'][_0x9777b('0xf')]||null:null,'group':db[_0x9777b('0x0')]['UserId'],'transaction':_0x53200a,'lock':_0x53200a[_0x9777b('0x7')][_0x9777b('0x21')],'include':_0x190b32[_0x9777b('0x28')]?_0x190b32['options'][_0x9777b('0x31')]?_[_0x9777b('0x23')](_0x190b32[_0x9777b('0x28')][_0x9777b('0x31')],function(_0x4698fd){const _0x411f4c=_0x9777b;return{'model':db[_0x4698fd[_0x411f4c('0x17')]],'as':_0x4698fd['as'],'attributes':_0x4698fd['attributes'],'include':_0x4698fd[_0x411f4c('0x31')]?_[_0x411f4c('0x23')](_0x4698fd[_0x411f4c('0x31')],function(_0x34d8fc){const _0x258df2=_0x411f4c;return{'model':db[_0x34d8fc[_0x258df2('0x17')]],'as':_0x34d8fc['as'],'attributes':_0x34d8fc[_0x258df2('0xe')],'include':_0x34d8fc[_0x258df2('0x31')]?_['map'](_0x34d8fc[_0x258df2('0x31')],function(_0x3bc70f){return{'model':db[_0x3bc70f['model']],'as':_0x3bc70f['as'],'attributes':_0x3bc70f['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ff62b){const _0x1a312f=_0x9777b,_0x17f7d2=[];for(let _0x5efe0a=0x0;_0x5efe0a<_0x2ff62b['length'];_0x5efe0a+=0x1){_0x17f7d2[_0x1a312f('0x37')](_0x2ff62b[_0x5efe0a][_0x1a312f('0x1a')](_0x190b32[_0x1a312f('0x32')],{'transaction':_0x53200a}));}return Promise[_0x1a312f('0x2c')](_0x17f7d2);});})[_0x2e522e('0x38')](function(_0x185462){const _0x8df934=_0x2e522e;logger['info'](_0x8df934('0x1b'),_0x190b32),logger[_0x8df934('0x12')](_0x8df934('0x1b'),_0x190b32,JSON['stringify'](_0x185462)),_0x2d7cfb(_0x185462);})[_0x2e522e('0x1')](function(_0x243d51){const _0x1eb5da=_0x2e522e;logger[_0x1eb5da('0x1c')](_0x1eb5da('0x1b'),_0x243d51['message'],_0x190b32),_0x267235(_0x170123[_0x1eb5da('0x1c')](0x1f4,_0x243d51['message']));});});});},exports['GetCmHopperPreview']=function(_0xce7971){const _0x4713a5=this;return new Promise(function(_0x48a8ce,_0x16be5b){const _0x584089=a139_0x51fc;db[_0x584089('0xc')][_0x584089('0x20')]()[_0x584089('0x38')](function(_0x416c83){const _0x278bb6=_0x584089;return db[_0x278bb6('0x0')][_0x278bb6('0xd')]({'raw':_0xce7971['options']?_0xce7971[_0x278bb6('0x28')][_0x278bb6('0x36')]===undefined?!![]:![]:!![],'where':_0xce7971[_0x278bb6('0x28')]?_0xce7971[_0x278bb6('0x28')]['where']||null:null,'attributes':_0xce7971[_0x278bb6('0x28')]?_0xce7971['options']['attributes']||null:null,'limit':_0xce7971[_0x278bb6('0x28')]?_0xce7971[_0x278bb6('0x28')][_0x278bb6('0x30')]||null:null,'include':_0xce7971['options']?_0xce7971[_0x278bb6('0x28')][_0x278bb6('0x31')]?_['map'](_0xce7971[_0x278bb6('0x28')][_0x278bb6('0x31')],function(_0x368ad5){const _0x5e1edd=_0x278bb6;return{'model':db[_0x368ad5[_0x5e1edd('0x17')]],'as':_0x368ad5['as'],'attributes':_0x368ad5['as']===_0x5e1edd('0x8')?_[_0x5e1edd('0x1f')](_0x416c83):_0x368ad5['attributes'],'include':_0x368ad5['include']?_['map'](_0x368ad5[_0x5e1edd('0x31')],function(_0x2be3f8){const _0x328813=_0x5e1edd;return{'model':db[_0x2be3f8[_0x328813('0x17')]],'as':_0x2be3f8['as'],'attributes':_0x2be3f8[_0x328813('0xe')],'include':_0x2be3f8['include']?_[_0x328813('0x23')](_0x2be3f8['include'],function(_0x37a14b){const _0x5070db=_0x328813;return{'model':db[_0x37a14b[_0x5070db('0x17')]],'as':_0x37a14b['as'],'attributes':_0x37a14b[_0x5070db('0xe')]};}):[]};}):[]};}):[]:[]})[_0x278bb6('0x38')](function(_0x4c9a3e){const _0x4916b2=_0x278bb6;logger[_0x4916b2('0x27')](_0x4916b2('0x33'),_0xce7971),logger[_0x4916b2('0x12')](_0x4916b2('0x33'),_0xce7971,JSON['stringify'](_0x4c9a3e)),_0x48a8ce(_0x4c9a3e);})['catch'](function(_0xaafc3e){const _0x2e8e43=_0x278bb6;logger[_0x2e8e43('0x1c')](_0x2e8e43('0x33'),_0xaafc3e[_0x2e8e43('0x34')],_0xce7971),_0x16be5b(_0x4713a5[_0x2e8e43('0x1c')](0x1f4,_0xaafc3e[_0x2e8e43('0x34')]));});});});};
\ No newline at end of file
+const a139_0x37af=['model','keys','`scheduledat`\x20>=\x20','CountReScheduled','voicePause','body','User','contactsRescheduled','Agent','format','../../config/logger','GetCmHopper','debug','message','info','all','describe','GetContactRecallMe','ShowCmHopper','UserId','\x22%s\x22','COUNT','where','sequelize','then','push','CreateCmHopper','map','DestroyCmHopper','limit','\x20,\x201,\x20null','length','raw','order','destroy','transaction','rpc','attributes','UPDATE','findAll','catch','../../mysqldb','MoveContactManagedDialer','LOCK','update','Contact','GetCmHopperPreview','moment','include','CmHopper','GetContactDialer','lodash','create','stringify','options','UpdateCmHopper','error','CmContact'];(function(_0x19c577,_0x37afd6){const _0x50cb2c=function(_0xd7d35e){while(--_0xd7d35e){_0x19c577['push'](_0x19c577['shift']());}};_0x50cb2c(++_0x37afd6);}(a139_0x37af,0xca));const a139_0x50cb=function(_0x19c577,_0x37afd6){_0x19c577=_0x19c577-0x0;let _0x50cb2c=a139_0x37af[_0x19c577];return _0x50cb2c;};const _0x54df5c=a139_0x50cb;'use strict';const _=require(_0x54df5c('0x17')),util=require('util'),moment=require(_0x54df5c('0x13')),db=require(_0x54df5c('0xd'))['db'],logger=require(_0x54df5c('0x28'))(_0x54df5c('0x8')),{literal,fn}=require('sequelize');exports[_0x54df5c('0x29')]=function(_0xd7d35e){const _0x1273d0=this;return new Promise(function(_0x32a1eb,_0x3faab3){const _0x3cd2c2=a139_0x50cb;return db[_0x3cd2c2('0x15')]['findAll']({'raw':_0xd7d35e[_0x3cd2c2('0x1a')]?_0xd7d35e[_0x3cd2c2('0x1a')][_0x3cd2c2('0x4')]===undefined?!![]:![]:!![],'where':_0xd7d35e[_0x3cd2c2('0x1a')]?_0xd7d35e[_0x3cd2c2('0x1a')][_0x3cd2c2('0x34')]||null:null,'attributes':_0xd7d35e[_0x3cd2c2('0x1a')]?_0xd7d35e[_0x3cd2c2('0x1a')][_0x3cd2c2('0x9')]||null:null,'limit':_0xd7d35e[_0x3cd2c2('0x1a')]?_0xd7d35e[_0x3cd2c2('0x1a')][_0x3cd2c2('0x1')]||null:null,'include':_0xd7d35e[_0x3cd2c2('0x1a')]?_0xd7d35e[_0x3cd2c2('0x1a')]['include']?_[_0x3cd2c2('0x39')](_0xd7d35e[_0x3cd2c2('0x1a')][_0x3cd2c2('0x14')],function(_0x1a2d0a){const _0x182cc7=_0x3cd2c2;return{'model':db[_0x1a2d0a['model']],'as':_0x1a2d0a['as'],'attributes':_0x1a2d0a[_0x182cc7('0x9')],'include':_0x1a2d0a[_0x182cc7('0x14')]?_[_0x182cc7('0x39')](_0x1a2d0a[_0x182cc7('0x14')],function(_0x12529a){const _0x17fb6e=_0x182cc7;return{'model':db[_0x12529a[_0x17fb6e('0x1e')]],'as':_0x12529a['as'],'attributes':_0x12529a['attributes'],'include':_0x12529a[_0x17fb6e('0x14')]?_[_0x17fb6e('0x39')](_0x12529a['include'],function(_0x2219e2){const _0x4c6385=_0x17fb6e;return{'model':db[_0x2219e2['model']],'as':_0x2219e2['as'],'attributes':_0x2219e2[_0x4c6385('0x9')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x253d9f){const _0x1858cd=_0x3cd2c2;logger[_0x1858cd('0x2c')]('GetCmHopper',_0xd7d35e),logger['debug'](_0x1858cd('0x29'),_0xd7d35e,JSON[_0x1858cd('0x19')](_0x253d9f)),_0x32a1eb(_0x253d9f);})[_0x3cd2c2('0xc')](function(_0x5590a2){const _0x383a09=_0x3cd2c2;logger[_0x383a09('0x1c')](_0x383a09('0x29'),_0x5590a2[_0x383a09('0x2b')],_0xd7d35e),_0x3faab3(_0x1273d0[_0x383a09('0x1c')](0x1f4,_0x5590a2['message']));});});},exports[_0x54df5c('0x30')]=function(_0x2055fd){const _0x2fa2c2=this;return new Promise(function(_0x303d17,_0x2a43b8){const _0x40cabb=a139_0x50cb;return db[_0x40cabb('0x15')]['findOne']({'raw':_0x2055fd[_0x40cabb('0x1a')]?_0x2055fd['options'][_0x40cabb('0x4')]===undefined?!![]:![]:!![],'where':_0x2055fd[_0x40cabb('0x1a')]?_0x2055fd['options'][_0x40cabb('0x34')]||null:null,'attributes':_0x2055fd[_0x40cabb('0x1a')]?_0x2055fd[_0x40cabb('0x1a')][_0x40cabb('0x9')]||null:null,'include':_0x2055fd['options']?_0x2055fd[_0x40cabb('0x1a')]['include']?_['map'](_0x2055fd[_0x40cabb('0x1a')]['include'],function(_0x13e948){const _0x2d2c61=_0x40cabb;return{'model':db[_0x13e948['model']],'as':_0x13e948['as'],'attributes':_0x13e948[_0x2d2c61('0x9')],'include':_0x13e948['include']?_[_0x2d2c61('0x39')](_0x13e948[_0x2d2c61('0x14')],function(_0x2376c7){const _0x6ae308=_0x2d2c61;return{'model':db[_0x2376c7[_0x6ae308('0x1e')]],'as':_0x2376c7['as'],'attributes':_0x2376c7[_0x6ae308('0x9')],'include':_0x2376c7[_0x6ae308('0x14')]?_[_0x6ae308('0x39')](_0x2376c7[_0x6ae308('0x14')],function(_0x2187bf){const _0x542c9e=_0x6ae308;return{'model':db[_0x2187bf['model']],'as':_0x2187bf['as'],'attributes':_0x2187bf[_0x542c9e('0x9')]};}):[]};}):[]};}):[]:[]})[_0x40cabb('0x36')](function(_0xd1c080){const _0x27ef78=_0x40cabb;logger[_0x27ef78('0x2c')](_0x27ef78('0x30'),_0x2055fd),logger[_0x27ef78('0x2a')](_0x27ef78('0x30'),_0x2055fd,JSON[_0x27ef78('0x19')](_0xd1c080)),_0x303d17(_0xd1c080);})[_0x40cabb('0xc')](function(_0x438186){const _0x26176d=_0x40cabb;logger['error'](_0x26176d('0x30'),_0x438186[_0x26176d('0x2b')],_0x2055fd),_0x2a43b8(_0x2fa2c2['error'](0x1f4,_0x438186[_0x26176d('0x2b')]));});});},exports[_0x54df5c('0x38')]=function(_0x1fb404){const _0x1b6b1b=this;return new Promise(function(_0x38d3c7,_0x4e743d){const _0xe3a892=a139_0x50cb;return db[_0xe3a892('0x15')][_0xe3a892('0x18')](_0x1fb404['body'],{'raw':_0x1fb404[_0xe3a892('0x1a')]?_0x1fb404[_0xe3a892('0x1a')][_0xe3a892('0x4')]===undefined?!![]:![]:!![]})['then'](function(_0x5010e3){const _0x4a7590=_0xe3a892;logger[_0x4a7590('0x2c')]('CreateCmHopper',_0x1fb404),logger[_0x4a7590('0x2a')]('CreateCmHopper',_0x1fb404,JSON[_0x4a7590('0x19')](_0x5010e3)),_0x38d3c7(_0x5010e3);})[_0xe3a892('0xc')](function(_0x1e920d){const _0x5b144f=_0xe3a892;logger['error']('CreateCmHopper',_0x1e920d['message'],_0x1fb404),_0x4e743d(_0x1b6b1b[_0x5b144f('0x1c')](0x1f4,_0x1e920d[_0x5b144f('0x2b')]));});});},exports[_0x54df5c('0x1b')]=function(_0x512a8b){const _0x5c1208=this;return new Promise(function(_0x47de01,_0x213380){const _0x93ed1c=a139_0x50cb;return db['CmHopper'][_0x93ed1c('0x10')](_0x512a8b[_0x93ed1c('0x23')],{'raw':_0x512a8b[_0x93ed1c('0x1a')]?_0x512a8b[_0x93ed1c('0x1a')][_0x93ed1c('0x4')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x512a8b[_0x93ed1c('0x1a')]?_0x512a8b[_0x93ed1c('0x1a')][_0x93ed1c('0x34')]||null:null,'attributes':_0x512a8b[_0x93ed1c('0x1a')]?_0x512a8b['options'][_0x93ed1c('0x9')]||null:null,'limit':_0x512a8b[_0x93ed1c('0x1a')]?_0x512a8b[_0x93ed1c('0x1a')][_0x93ed1c('0x1')]||null:null})[_0x93ed1c('0x36')](function(_0x4af74b){const _0x3524fc=_0x93ed1c;logger['info'](_0x3524fc('0x1b'),_0x512a8b),logger[_0x3524fc('0x2a')](_0x3524fc('0x1b'),_0x512a8b,JSON['stringify'](_0x4af74b)),_0x47de01(_0x4af74b);})[_0x93ed1c('0xc')](function(_0x57da7c){const _0x389e55=_0x93ed1c;logger[_0x389e55('0x1c')](_0x389e55('0x1b'),_0x57da7c[_0x389e55('0x2b')],_0x512a8b),_0x213380(_0x5c1208[_0x389e55('0x1c')](0x1f4,_0x57da7c['message']));});});},exports[_0x54df5c('0x0')]=function(_0x37c1f4){const _0x1a4f42=this;return new Promise(function(_0x335660,_0x5352b3){const _0x1e6385=a139_0x50cb;return db['CmHopper'][_0x1e6385('0x6')]({'where':_0x37c1f4[_0x1e6385('0x1a')]?_0x37c1f4['options'][_0x1e6385('0x34')]||null:null})[_0x1e6385('0x36')](function(_0x35020e){const _0x364e1b=_0x1e6385;logger[_0x364e1b('0x2c')](_0x364e1b('0x0'),_0x37c1f4),logger[_0x364e1b('0x2a')](_0x364e1b('0x0'),_0x37c1f4,JSON[_0x364e1b('0x19')](_0x35020e)),_0x335660(_0x35020e);})[_0x1e6385('0xc')](function(_0x194057){const _0x1cfefa=_0x1e6385;logger['error'](_0x1cfefa('0x0'),_0x194057[_0x1cfefa('0x2b')],_0x37c1f4),_0x5352b3(_0x1a4f42[_0x1cfefa('0x1c')](0x1f4,_0x194057[_0x1cfefa('0x2b')]));});});},exports['GetContactDialer']=function(_0x94c980){const _0x93f795=this;return new Promise(function(_0x35309f,_0x529363){const _0x37d700=a139_0x50cb;return db[_0x37d700('0x1d')][_0x37d700('0x2e')]()['then'](function(_0x3a80c2){const _0x4f5364=_0x37d700;return db[_0x4f5364('0x35')][_0x4f5364('0x7')](function(_0x3a55f6){const _0xf77c05=_0x4f5364;return db[_0xf77c05('0x15')][_0xf77c05('0xb')]({'where':_0x94c980[_0xf77c05('0x1a')]?_0x94c980[_0xf77c05('0x1a')][_0xf77c05('0x34')]||null:null,'attributes':_0x94c980[_0xf77c05('0x1a')]?_0x94c980[_0xf77c05('0x1a')][_0xf77c05('0x9')]||null:null,'limit':_0x94c980[_0xf77c05('0x1a')]?_0x94c980[_0xf77c05('0x1a')][_0xf77c05('0x1')]||null:null,'order':_0x94c980[_0xf77c05('0x1a')]?_0x94c980['options'][_0xf77c05('0x5')]||null:null,'transaction':_0x3a55f6,'lock':_0x3a55f6[_0xf77c05('0xf')][_0xf77c05('0xa')],'include':[{'model':db['CmContact'],'as':_0xf77c05('0x11'),'attributes':_[_0xf77c05('0x1f')](_0x3a80c2)},{'model':db[_0xf77c05('0x24')],'as':_0xf77c05('0x26'),'attributes':['id','name',_0xf77c05('0x22')]}]})['then'](function(_0x193eac){const _0x413d4b=_0xf77c05,_0x4e8bb7=[],_0x4ff6ec=[];for(let _0x189352=0x0;_0x189352<_0x193eac[_0x413d4b('0x3')];_0x189352+=0x1){!_0x4ff6ec['includes'](_0x193eac[_0x189352][_0x413d4b('0x31')])&&(_0x4ff6ec[_0x413d4b('0x37')](_0x193eac[_0x189352][_0x413d4b('0x31')]),_0x4e8bb7[_0x413d4b('0x37')](_0x193eac[_0x189352][_0x413d4b('0x10')](_0x94c980['body'],{'transaction':_0x3a55f6})));}return Promise[_0x413d4b('0x2d')](_0x4e8bb7);});})[_0x4f5364('0x36')](function(_0x4482f2){const _0x12eccd=_0x4f5364;logger[_0x12eccd('0x2c')](_0x12eccd('0x16'),_0x94c980),logger[_0x12eccd('0x2a')](_0x12eccd('0x16'),_0x94c980,JSON[_0x12eccd('0x19')](_0x4482f2)),_0x35309f(_0x4482f2);})[_0x4f5364('0xc')](function(_0x10649e){const _0x490c71=_0x4f5364;logger[_0x490c71('0x1c')](_0x490c71('0x16'),_0x10649e[_0x490c71('0x2b')],_0x94c980),_0x529363(_0x93f795['error'](0x1f4,_0x10649e[_0x490c71('0x2b')]));});});});},exports[_0x54df5c('0xe')]=function(_0x542e2b){const _0x372286=this;return new Promise(function(_0x3edc92,_0x2c94bd){const _0x3a93f9=a139_0x50cb;return db[_0x3a93f9('0x35')][_0x3a93f9('0x7')](function(_0x138baf){const _0x1a2592=_0x3a93f9;return db['CmHopperFinal'][_0x1a2592('0x18')](_0x542e2b['body'],{'raw':_0x542e2b['options']?_0x542e2b[_0x1a2592('0x1a')]['raw']===undefined?!![]:![]:!![],'transaction':_0x138baf})[_0x1a2592('0x36')](function(){const _0x5e5280=_0x1a2592;return db[_0x5e5280('0x15')]['destroy']({'where':_0x542e2b['options']?_0x542e2b[_0x5e5280('0x1a')][_0x5e5280('0x34')]||null:null,'transaction':_0x138baf});});})['then'](function(_0x3571b7){const _0x88b00f=_0x3a93f9;logger[_0x88b00f('0x2c')](_0x88b00f('0xe'),_0x542e2b),logger[_0x88b00f('0x2a')](_0x88b00f('0xe'),_0x542e2b,JSON[_0x88b00f('0x19')](_0x3571b7)),_0x3edc92(_0x3571b7);})[_0x3a93f9('0xc')](function(_0xa37f11){const _0x1ccc1f=_0x3a93f9;logger[_0x1ccc1f('0x1c')](_0x1ccc1f('0xe'),_0xa37f11[_0x1ccc1f('0x2b')],_0x542e2b),_0x2c94bd(_0x372286[_0x1ccc1f('0x1c')](0x1f4,_0xa37f11[_0x1ccc1f('0x2b')]));});});},exports[_0x54df5c('0x21')]=function(_0x3d8de3){const _0xcf438b=this;return new Promise(function(_0x4b4908,_0x300178){const _0x40f1ad=a139_0x50cb;return db['CmHopper'][_0x40f1ad('0xb')]({'raw':_0x3d8de3[_0x40f1ad('0x1a')]?_0x3d8de3[_0x40f1ad('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x3d8de3['options']?_0x3d8de3[_0x40f1ad('0x1a')][_0x40f1ad('0x34')]||null:null,'attributes':[[fn(_0x40f1ad('0x33'),fn('IF',literal(_0x40f1ad('0x20')+util[_0x40f1ad('0x27')](_0x40f1ad('0x32'),moment()[_0x40f1ad('0x27')]('YYYY-MM-DD\x20HH:mm:ss'))+_0x40f1ad('0x2')))),_0x40f1ad('0x25')]]})[_0x40f1ad('0x36')](function(_0x4075b1){const _0x3b3efb=_0x40f1ad;logger[_0x3b3efb('0x2c')]('CountReScheduled',_0x3d8de3),logger['debug'](_0x3b3efb('0x21'),_0x3d8de3,JSON[_0x3b3efb('0x19')](_0x4075b1)),_0x4b4908(_0x4075b1);})['catch'](function(_0x49c54d){const _0x3ada76=_0x40f1ad;logger['error'](_0x3ada76('0x21'),_0x49c54d['message'],_0x3d8de3),_0x300178(_0xcf438b[_0x3ada76('0x1c')](0x1f4,_0x49c54d[_0x3ada76('0x2b')]));});});},exports['GetContactRecallMe']=function(_0x5b42b0){const _0x1243b7=this;return new Promise(function(_0x54709d,_0x4c4784){const _0x5b211a=a139_0x50cb;return db[_0x5b211a('0x1d')][_0x5b211a('0x2e')]()['then'](function(){const _0x31e8d3=_0x5b211a;return db[_0x31e8d3('0x35')][_0x31e8d3('0x7')](function(_0x5b5d21){const _0x3f65f9=_0x31e8d3;return db['CmHopper'][_0x3f65f9('0xb')]({'where':_0x5b42b0[_0x3f65f9('0x1a')]?_0x5b42b0[_0x3f65f9('0x1a')][_0x3f65f9('0x34')]||null:null,'attributes':_0x5b42b0['options']?_0x5b42b0['options']['attributes']||null:null,'limit':0x1,'order':_0x5b42b0[_0x3f65f9('0x1a')]?_0x5b42b0[_0x3f65f9('0x1a')][_0x3f65f9('0x5')]||null:null,'group':db[_0x3f65f9('0x15')][_0x3f65f9('0x31')],'transaction':_0x5b5d21,'lock':_0x5b5d21['LOCK'][_0x3f65f9('0xa')],'include':_0x5b42b0['options']?_0x5b42b0[_0x3f65f9('0x1a')][_0x3f65f9('0x14')]?_[_0x3f65f9('0x39')](_0x5b42b0['options']['include'],function(_0x4cfb05){const _0x5627b5=_0x3f65f9;return{'model':db[_0x4cfb05['model']],'as':_0x4cfb05['as'],'attributes':_0x4cfb05[_0x5627b5('0x9')],'include':_0x4cfb05[_0x5627b5('0x14')]?_[_0x5627b5('0x39')](_0x4cfb05['include'],function(_0x4688a6){const _0xcad9b7=_0x5627b5;return{'model':db[_0x4688a6[_0xcad9b7('0x1e')]],'as':_0x4688a6['as'],'attributes':_0x4688a6[_0xcad9b7('0x9')],'include':_0x4688a6[_0xcad9b7('0x14')]?_[_0xcad9b7('0x39')](_0x4688a6[_0xcad9b7('0x14')],function(_0x242878){const _0xd800ba=_0xcad9b7;return{'model':db[_0x242878['model']],'as':_0x242878['as'],'attributes':_0x242878[_0xd800ba('0x9')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x8f0583){const _0x2147ac=_0x3f65f9,_0x380d30=[];for(let _0x4e3c0c=0x0;_0x4e3c0c<_0x8f0583[_0x2147ac('0x3')];_0x4e3c0c+=0x1){_0x380d30['push'](_0x8f0583[_0x4e3c0c][_0x2147ac('0x10')](_0x5b42b0[_0x2147ac('0x23')],{'transaction':_0x5b5d21}));}return Promise['all'](_0x380d30);});})[_0x31e8d3('0x36')](function(_0x51172f){const _0x44ac6e=_0x31e8d3;logger[_0x44ac6e('0x2c')]('GetContactRecallMe',_0x5b42b0),logger[_0x44ac6e('0x2a')](_0x44ac6e('0x2f'),_0x5b42b0,JSON[_0x44ac6e('0x19')](_0x51172f)),_0x54709d(_0x51172f);})['catch'](function(_0x13891a){const _0x3ae28a=_0x31e8d3;logger[_0x3ae28a('0x1c')](_0x3ae28a('0x2f'),_0x13891a[_0x3ae28a('0x2b')],_0x5b42b0),_0x4c4784(_0x1243b7[_0x3ae28a('0x1c')](0x1f4,_0x13891a[_0x3ae28a('0x2b')]));});});});},exports[_0x54df5c('0x12')]=function(_0x1b0248){const _0x2507bc=this;return new Promise(function(_0x2492bd,_0x3412b7){const _0x12ae04=a139_0x50cb;db[_0x12ae04('0x1d')]['describe']()[_0x12ae04('0x36')](function(_0x14a05c){const _0x4655fe=_0x12ae04;return db[_0x4655fe('0x15')]['findAll']({'raw':_0x1b0248[_0x4655fe('0x1a')]?_0x1b0248[_0x4655fe('0x1a')][_0x4655fe('0x4')]===undefined?!![]:![]:!![],'where':_0x1b0248[_0x4655fe('0x1a')]?_0x1b0248['options'][_0x4655fe('0x34')]||null:null,'attributes':_0x1b0248[_0x4655fe('0x1a')]?_0x1b0248[_0x4655fe('0x1a')]['attributes']||null:null,'limit':_0x1b0248['options']?_0x1b0248[_0x4655fe('0x1a')][_0x4655fe('0x1')]||null:null,'include':_0x1b0248[_0x4655fe('0x1a')]?_0x1b0248[_0x4655fe('0x1a')][_0x4655fe('0x14')]?_[_0x4655fe('0x39')](_0x1b0248[_0x4655fe('0x1a')]['include'],function(_0x5d45ff){const _0x3b10c3=_0x4655fe;return{'model':db[_0x5d45ff[_0x3b10c3('0x1e')]],'as':_0x5d45ff['as'],'attributes':_0x5d45ff['as']==='Contact'?_[_0x3b10c3('0x1f')](_0x14a05c):_0x5d45ff[_0x3b10c3('0x9')],'include':_0x5d45ff['include']?_[_0x3b10c3('0x39')](_0x5d45ff[_0x3b10c3('0x14')],function(_0x2519a0){const _0x3c7c55=_0x3b10c3;return{'model':db[_0x2519a0['model']],'as':_0x2519a0['as'],'attributes':_0x2519a0[_0x3c7c55('0x9')],'include':_0x2519a0[_0x3c7c55('0x14')]?_[_0x3c7c55('0x39')](_0x2519a0['include'],function(_0x521f14){const _0x430a12=_0x3c7c55;return{'model':db[_0x521f14[_0x430a12('0x1e')]],'as':_0x521f14['as'],'attributes':_0x521f14[_0x430a12('0x9')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1de5b6){const _0x26eeba=_0x4655fe;logger[_0x26eeba('0x2c')](_0x26eeba('0x29'),_0x1b0248),logger['debug'](_0x26eeba('0x29'),_0x1b0248,JSON[_0x26eeba('0x19')](_0x1de5b6)),_0x2492bd(_0x1de5b6);})['catch'](function(_0x537a93){const _0x41b06e=_0x4655fe;logger['error'](_0x41b06e('0x29'),_0x537a93[_0x41b06e('0x2b')],_0x1b0248),_0x3412b7(_0x2507bc[_0x41b06e('0x1c')](0x1f4,_0x537a93[_0x41b06e('0x2b')]));});});});};
\ No newline at end of file