Built motion from commit 822e0ac2e.|1.0.30
[motion.git] / server / api / agent / agent.controller.js
index 7fd75a3..cb41886 100644 (file)
@@ -1 +1 @@
-var _0xac81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x76\x61\x6C\x75\x65\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0xac81[0];var _=require(_0xac81[1]);var sequelize=require(_0xac81[3])[_0xac81[2]];var BPromise=require(_0xac81[4]);var util=require(_0xac81[5]);var Util=require(_0xac81[6]);var userTools=require(_0xac81[7]);var logger=require(_0xac81[9])(_0xac81[8]);var OpenchannelQueue=require(_0xac81[3])[_0xac81[10]];var VoiceQueue=require(_0xac81[3])[_0xac81[11]];var ChatQueue=require(_0xac81[3])[_0xac81[12]];var MailQueue=require(_0xac81[3])[_0xac81[13]];var FaxQueue=require(_0xac81[3])[_0xac81[14]];var SmsQueue=require(_0xac81[3])[_0xac81[15]];var MailRoom=require(_0xac81[3])[_0xac81[16]];var Setting=require(_0xac81[3])[_0xac81[17]];var Agent=require(_0xac81[3])[_0xac81[18]];var User=require(_0xac81[3])[_0xac81[18]];var Team=require(_0xac81[3])[_0xac81[19]];var List=require(_0xac81[3])[_0xac81[20]];exports[_0xac81[21]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[27]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33])[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[36]]= function(_0xf371x14,_0xf371x15,_0xf371x16){return Agent[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]],{attributes:[_0xac81[28],_0xac81[41]]})[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](401)};switch(_0xf371x14[_0xac81[61]][_0xac81[60]]){case _0xac81[45]:return _0xf371x1a[_0xac81[44]](_0xf371x14[_0xac81[39]][_0xac81[38]],{interface:util[_0xac81[42]](_0xac81[40],_0xf371x1a[_0xac81[41]]),stateinterface:util[_0xac81[42]](_0xac81[40],_0xf371x1a[_0xac81[41]]),membername:_0xf371x1a[_0xac81[41]],UserId:_0xf371x1a[_0xac81[28]],penalty:_0xf371x14[_0xac81[39]][_0xac81[43]]});case _0xac81[51]:return ChatQueue[_0xac81[50]]({where:{id:_0xf371x14[_0xac81[39]][_0xac81[38]]},attributes:[_0xac81[28],_0xac81[41]],raw:true})[_0xac81[25]](function(_0xf371x19){if(_0xf371x19){var _0xf371x1b=[];_[_0xac81[48]](_0xf371x19,function(_0xf371x1c){_0xf371x1b[_0xac81[47]](_0xf371x1a[_0xac81[46]](_0xf371x1c[_0xac81[28]],{queue:_0xf371x1c[_0xac81[41]],penalty:_0xf371x14[_0xac81[39]][_0xac81[43]]}))});return BPromise[_0xac81[49]](_0xf371x1b)}});case _0xac81[53]:return MailQueue[_0xac81[50]]({where:{id:_0xf371x14[_0xac81[39]][_0xac81[38]]},attributes:[_0xac81[28],_0xac81[41]],raw:true})[_0xac81[25]](function(_0xf371x19){if(_0xf371x19){var _0xf371x1b=[];_[_0xac81[48]](_0xf371x19,function(_0xf371x1c){_0xf371x1b[_0xac81[47]](_0xf371x1a[_0xac81[52]](_0xf371x1c[_0xac81[28]],{queue:_0xf371x1c[_0xac81[41]],penalty:_0xf371x14[_0xac81[39]][_0xac81[43]]}))});return BPromise[_0xac81[49]](_0xf371x1b)}});case _0xac81[55]:return FaxQueue[_0xac81[50]]({where:{id:_0xf371x14[_0xac81[39]][_0xac81[38]]},attributes:[_0xac81[28],_0xac81[41]],raw:true})[_0xac81[25]](function(_0xf371x19){if(_0xf371x19){var _0xf371x1b=[];_[_0xac81[48]](_0xf371x19,function(_0xf371x1c){_0xf371x1b[_0xac81[47]](_0xf371x1a[_0xac81[54]](_0xf371x1c[_0xac81[28]],{queue:_0xf371x1c[_0xac81[41]],penalty:_0xf371x14[_0xac81[39]][_0xac81[43]]}))});return BPromise[_0xac81[49]](_0xf371x1b)}});case _0xac81[57]:return SmsQueue[_0xac81[50]]({where:{id:_0xf371x14[_0xac81[39]][_0xac81[38]]},attributes:[_0xac81[28],_0xac81[41]],raw:true})[_0xac81[25]](function(_0xf371x19){if(_0xf371x19){var _0xf371x1b=[];_[_0xac81[48]](_0xf371x19,function(_0xf371x1c){_0xf371x1b[_0xac81[47]](_0xf371x1a[_0xac81[56]](_0xf371x1c[_0xac81[28]],{queue:_0xf371x1c[_0xac81[41]],penalty:_0xf371x14[_0xac81[39]][_0xac81[43]]}))});return BPromise[_0xac81[49]](_0xf371x1b)}});case _0xac81[59]:return OpenchannelQueue[_0xac81[50]]({where:{id:_0xf371x14[_0xac81[39]][_0xac81[38]]},attributes:[_0xac81[28],_0xac81[41]],raw:true})[_0xac81[25]](function(_0xf371x19){if(_0xf371x19){var _0xf371x1b=[];_[_0xac81[48]](_0xf371x19,function(_0xf371x1c){_0xf371x1b[_0xac81[47]](_0xf371x1a[_0xac81[58]](_0xf371x1c[_0xac81[28]],{queue:_0xf371x1c[_0xac81[41]],penalty:_0xf371x14[_0xac81[39]][_0xac81[43]]}))});return BPromise[_0xac81[49]](_0xf371x1b)}});default:return null}})[_0xac81[25]](function(_0xf371x19){return _0xf371x15[_0xac81[37]](_0xf371x19?200:401)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[62]]= function(_0xf371x14,_0xf371x15,_0xf371x16){return Agent[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](401)};switch(_0xf371x14[_0xac81[61]][_0xac81[60]]){case _0xac81[45]:return _0xf371x1a[_0xac81[64]](_0xf371x14[_0xac81[26]][_0xac81[63]]);case _0xac81[51]:return _0xf371x1a[_0xac81[65]](_0xf371x14[_0xac81[26]][_0xac81[63]]);case _0xac81[53]:return _0xf371x1a[_0xac81[66]](_0xf371x14[_0xac81[26]][_0xac81[63]]);case _0xac81[57]:return _0xf371x1a[_0xac81[67]](_0xf371x14[_0xac81[26]][_0xac81[63]]);case _0xac81[55]:return _0xf371x1a[_0xac81[68]](_0xf371x14[_0xac81[26]][_0xac81[63]]);case _0xac81[59]:return _0xf371x1a[_0xac81[69]](_0xf371x14[_0xac81[26]][_0xac81[63]]);default:return null}})[_0xac81[25]](function(_0xf371x19){return _0xf371x15[_0xac81[37]](_0xf371x19?200:401)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[70]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[27]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[75]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:var _0xf371x1d=[];return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[80]]({},{attributes:[_0xac81[41]],include:[{raw:true,model:User,attributes:[_0xac81[28]]}]}))[_0xac81[25]](function(_0xf371x19){var _0xf371x1e=_[_0xac81[77]](_0xf371x19[_0xac81[76]],_0xac81[41]);_0xf371x19[_0xac81[76]][_0xac81[48]](function(_0xf371x1c){_0xf371x1d= _[_0xac81[78]](_0xf371x1d,_[_0xac81[77]](_0xf371x1c.Users,_0xac81[28]))});return User[_0xac81[34]](_0xac81[33],{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](_[_0xac81[79]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]],{id:{$in:_0xf371x1d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xf371x1e}},required:false}]}))})[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[81]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:var _0xf371x1d=[];return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[82]]({},{attributes:[_0xac81[28]],include:[{raw:true,model:User,attributes:[_0xac81[28]]}]}))[_0xac81[25]](function(_0xf371x19){var _0xf371x1f=_[_0xac81[77]](_0xf371x19[_0xac81[76]],_0xac81[28]);_0xf371x19[_0xac81[76]][_0xac81[48]](function(_0xf371x1c){_0xf371x1d= _[_0xac81[78]](_0xf371x1d,_[_0xac81[77]](_0xf371x1c.Users,_0xac81[28]))});return User[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](_[_0xac81[79]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]],{id:{$in:_0xf371x1d}}),{include:[{model:ChatQueue,where:{id:{$in:_0xf371x1f}},required:false}]}))})[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]},_0xac81[83])[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[84]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:var _0xf371x1d=[];return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[85]]({},{attributes:[_0xac81[28]],include:[{raw:true,model:User,attributes:[_0xac81[28]]}]}))[_0xac81[25]](function(_0xf371x19){var _0xf371x20=_[_0xac81[77]](_0xf371x19[_0xac81[76]],_0xac81[28]);_0xf371x19[_0xac81[76]][_0xac81[48]](function(_0xf371x1c){_0xf371x1d= _[_0xac81[78]](_0xf371x1d,_[_0xac81[77]](_0xf371x1c.Users,_0xac81[28]))});return User[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](_[_0xac81[79]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]],{id:{$in:_0xf371x1d}}),{include:[{model:MailQueue,where:{id:{$in:_0xf371x20}},required:false}]}))})[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]},_0xac81[83])[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[86]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:var _0xf371x1d=[];return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[87]]({},{attributes:[_0xac81[28]],include:[{raw:true,model:User,attributes:[_0xac81[28]]}]}))[_0xac81[25]](function(_0xf371x19){var _0xf371x21=_[_0xac81[77]](_0xf371x19[_0xac81[76]],_0xac81[28]);_0xf371x19[_0xac81[76]][_0xac81[48]](function(_0xf371x1c){_0xf371x1d= _[_0xac81[78]](_0xf371x1d,_[_0xac81[77]](_0xf371x1c.Users,_0xac81[28]))});return User[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](_[_0xac81[79]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]],{id:{$in:_0xf371x1d}}),{include:[{model:FaxQueue,where:{id:{$in:_0xf371x21}},required:false}]}))})[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]},_0xac81[83])[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[88]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:var _0xf371x1d=[];return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[89]]({},{attributes:[_0xac81[28]],include:[{raw:true,model:User,attributes:[_0xac81[28]]}]}))[_0xac81[25]](function(_0xf371x19){var _0xf371x22=_[_0xac81[77]](_0xf371x19[_0xac81[76]],_0xac81[28]);_0xf371x19[_0xac81[76]][_0xac81[48]](function(_0xf371x1c){_0xf371x1d= _[_0xac81[78]](_0xf371x1d,_[_0xac81[77]](_0xf371x1c.Users,_0xac81[28]))});return User[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](_[_0xac81[79]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]],{id:{$in:_0xf371x1d}}),{include:[{model:SmsQueue,where:{id:{$in:_0xf371x22}},required:false}]}))})[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]},_0xac81[83])[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[90]]= function(_0xf371x14,_0xf371x15,_0xf371x16){switch(_0xf371x14[_0xac81[29]][_0xac81[35]]){case _0xac81[29]:var _0xf371x1d=[];return User[_0xac81[30]](_0xf371x14[_0xac81[29]][_0xac81[28]],{attributes:[_0xac81[28]]})[_0xac81[25]](Util[_0xac81[91]]({},{attributes:[_0xac81[28]],include:[{raw:true,model:User,attributes:[_0xac81[28]]}]}))[_0xac81[25]](function(_0xf371x19){var _0xf371x23=_[_0xac81[77]](_0xf371x19[_0xac81[76]],_0xac81[28]);_0xf371x19[_0xac81[76]][_0xac81[48]](function(_0xf371x1c){_0xf371x1d= _[_0xac81[78]](_0xf371x1d,_[_0xac81[77]](_0xf371x1c.Users,_0xac81[28]))});return User[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]})[_0xac81[32]](_[_0xac81[79]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]],{id:{$in:_0xf371x1d}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0xf371x23}},required:false}]}))})[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)});default:return Agent[_0xac81[34]](_0xac81[33],{method:[_0xac81[71],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[72],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[73],_0xf371x14[_0xac81[26]]]},{method:[_0xac81[74],_0xf371x14[_0xac81[26]]]},_0xac81[83])[_0xac81[32]](Util[_0xac81[31]](_0xf371x14[_0xac81[26]]))[_0xac81[25]](function(_0xf371x18){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x18)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})}};exports[_0xac81[92]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x15[_0xac81[23]](_0xf371x1a)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[93]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[95]]({attributes:[_0xac81[41]]})})[_0xac81[25]](function(_0xf371x1e){return _0xf371x15[_0xac81[23]]({count:_0xf371x1e[_0xac81[94]],rows:_0xf371x1e})})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[96]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[97]]({attributes:[_0xac81[28]]})})[_0xac81[25]](function(_0xf371x1f){return _0xf371x15[_0xac81[23]]({count:_0xf371x1f[_0xac81[94]],rows:_0xf371x1f})})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[98]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[99]]({attributes:[_0xac81[28]]})})[_0xac81[25]](function(_0xf371x20){return _0xf371x15[_0xac81[23]]({count:_0xf371x20[_0xac81[94]],rows:_0xf371x20})})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[100]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[101]]({attributes:[_0xac81[28]]})})[_0xac81[25]](function(_0xf371x21){return _0xf371x15[_0xac81[23]]({count:_0xf371x21[_0xac81[94]],rows:_0xf371x21})})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[102]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[103]]({attributes:[_0xac81[28]]})})[_0xac81[25]](function(_0xf371x22){return _0xf371x15[_0xac81[23]]({count:_0xf371x22[_0xac81[94]],rows:_0xf371x22})})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[104]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[34]](_0xac81[33])[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[105]]({attributes:[_0xac81[28]]})})[_0xac81[25]](function(_0xf371x24){return _0xf371x15[_0xac81[23]]({count:_0xf371x24[_0xac81[94]],rows:_0xf371x24})})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[106]]= function(_0xf371x14,_0xf371x15){var _0xf371x25;_0xf371x14[_0xac81[39]][_0xac81[35]]= _0xac81[33];return sequelize[_0xac81[116]](function(_0xf371x26){return Setting[_0xac81[30]](1)[_0xac81[25]](function(_0xf371x28){var _0xf371x29=String(_0xf371x14[_0xac81[39]][_0xac81[112]]);var _0xf371x2a=_0xf371x28[_0xac81[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0xf371x2a[_0xac81[114]](_0xf371x29)){throw  new Error(_0xac81[115])};return Agent[_0xac81[34]](_0xac81[33])[_0xac81[106]](_0xf371x14[_0xac81[39]],{transaction:_0xf371x26})})[_0xac81[25]](userTools[_0xac81[111]]({transaction:_0xf371x26}))[_0xac81[25]](function(_0xf371x1a){_0xf371x25= _0xf371x1a;return Team[_0xac81[110]]({where:{defaultEntry:true}})})[_0xac81[25]](function(_0xf371x27){return _0xf371x27[_0xac81[109]](_0xf371x25[_0xac81[28]],{transaction:_0xf371x26})})})[_0xac81[25]](function(){return _0xf371x15[_0xac81[24]](201)[_0xac81[23]](_0xf371x25)})[_0xac81[22]](sequelize.UniqueConstraintError,function(_0xf371x17){return Util[_0xac81[108]][_0xac81[107]](_0xf371x15,_0xf371x17)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[117]]= function(_0xf371x14,_0xf371x15){var _0xf371x2b;var _0xf371x2c;var _0xf371x2d=[];var _0xf371x29=String(_0xf371x14[_0xac81[39]][_0xac81[112]]);return sequelize[_0xac81[116]](function(_0xf371x26){return Setting[_0xac81[30]](1)[_0xac81[25]](function(_0xf371x28){_0xf371x2c= _0xf371x28;var _0xf371x2a=_0xf371x2c[_0xac81[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0xf371x2a[_0xac81[114]](_0xf371x29)){throw  new Error(_0xac81[119])};var _0xf371x2e=0;if(_0xf371x14[_0xac81[39]][_0xac81[121]](_0xac81[120])&& _[_0xac81[122]](_0xf371x14[_0xac81[39]][_0xac81[120]])&& _0xf371x14[_0xac81[39]][_0xac81[120]]>= 0){_0xf371x2e= _0xf371x14[_0xac81[39]][_0xac81[120]];delete _0xf371x14[_0xac81[39]][_0xac81[120]]};var _0xf371x2f=_0xf371x14[_0xac81[39]][_0xac81[123]];delete _0xf371x14[_0xac81[39]][_0xac81[123]];if(_0xf371x14[_0xac81[39]][_0xac81[124]]){_0xf371x14[_0xac81[39]][_0xac81[35]]= _0xac81[33];for(var _0xf371x30=_0xf371x2e;_0xf371x30< _0xf371x14[_0xac81[39]][_0xac81[124]]+ _0xf371x2e;_0xf371x30++,_0xf371x2f++){var _0xf371x31=_[_0xac81[125]](_0xf371x14[_0xac81[39]]);_0xf371x31[_0xac81[126]]= _0xf371x2f;_0xf371x31[_0xac81[41]]= _0xf371x31[_0xac81[41]]+ _0xf371x30;_0xf371x31[_0xac81[127]]= _0xf371x31[_0xac81[127]]+ _0xf371x30;_0xf371x31[_0xac81[128]]= _0xf371x31[_0xac81[128]][_0xac81[130]](_0xac81[129])[0]+ _0xf371x30+ _0xac81[129]+ _0xf371x31[_0xac81[128]][_0xac81[130]](_0xac81[129])[1];_0xf371x2d[_0xac81[47]](_0xf371x31)}}else {throw  new Error(_0xac81[131])};return Agent[_0xac81[117]](_0xf371x2d,{transaction:_0xf371x26,individualHooks:true})})[_0xac81[25]](function(_0xf371x1d){_0xf371x2b= _0xf371x1d;return Team[_0xac81[110]]({where:{defaultEntry:true}})})[_0xac81[25]](function(_0xf371x27){return _0xf371x27[_0xac81[118]](_[_0xac81[77]](_0xf371x2b,_0xac81[28]),{transaction:_0xf371x26})})})[_0xac81[25]](function(){return _0xf371x15[_0xac81[37]](201)})[_0xac81[22]](sequelize.UniqueConstraintError,function(_0xf371x17){return Util[_0xac81[108]][_0xac81[107]](_0xf371x15,_0xf371x17)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[132]]= function(_0xf371x14,_0xf371x15){if(_0xf371x14[_0xac81[39]][_0xac81[28]]){delete _0xf371x14[_0xac81[39]][_0xac81[28]]};delete _0xf371x14[_0xac81[39]][_0xac81[126]];delete _0xf371x14[_0xac81[39]][_0xac81[35]];delete _0xf371x14[_0xac81[39]][_0xac81[41]];delete _0xf371x14[_0xac81[39]][_0xac81[112]];var _0xf371x25;return sequelize[_0xac81[116]](function(_0xf371x26){return Agent[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};var _0xf371x32=_[_0xac81[79]](_0xf371x1a,_0xf371x14[_0xac81[39]]);return _0xf371x32[_0xac81[134]]({transaction:_0xf371x26})})[_0xac81[25]](function(_0xf371x1a){_0xf371x25= _0xf371x1a;return _0xf371x1a})[_0xac81[25]](userTools[_0xac81[133]]({transaction:_0xf371x26}))[_0xac81[25]](function(){return _0xf371x15[_0xac81[24]](200)[_0xac81[23]](_0xf371x25)})})[_0xac81[22]](sequelize.UniqueConstraintError,function(_0xf371x17){return Util[_0xac81[108]][_0xac81[107]](_0xf371x15,_0xf371x17)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[135]]= function(_0xf371x14,_0xf371x15){var _0xf371x25;return Agent[_0xac81[30]](_0xf371x14[_0xac81[61]][_0xac81[28]])[_0xac81[25]](function(_0xf371x1a){_0xf371x25= _0xf371x1a;if(!_0xf371x1a){return _0xf371x15[_0xac81[37]](404)};return _0xf371x1a[_0xac81[135]]()})[_0xac81[25]](function(){return _0xf371x15[_0xac81[37]](204)})[_0xac81[22]](sequelize.ForeignKeyConstraintError,function(_0xf371x17){return Util[_0xac81[108]][_0xac81[136]](_0xf371x15,_0xac81[33],_0xf371x25[_0xac81[41]],_0xf371x17)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};exports[_0xac81[137]]= function(_0xf371x14,_0xf371x15){return Agent[_0xac81[135]]({where:{id:_0xf371x14[_0xac81[26]][_0xac81[63]]},individualHooks:true})[_0xac81[25]](function(){return _0xf371x15[_0xac81[37]](204)})[_0xac81[22]](function(_0xf371x17){return handleError(_0xf371x15,_0xf371x17)})};function handleError(_0xf371x15,_0xf371x17){logger[_0xac81[139]](_0xf371x17[_0xac81[138]]);return _0xf371x15[_0xac81[24]](500)[_0xac81[23]](_0xf371x17)}
\ No newline at end of file
+var _0x5848=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x76\x61\x6C\x75\x65\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x5848[0];var _=require(_0x5848[1]);var sequelize=require(_0x5848[3])[_0x5848[2]];var BPromise=require(_0x5848[4]);var util=require(_0x5848[5]);var Util=require(_0x5848[6]);var userTools=require(_0x5848[7]);var logger=require(_0x5848[9])(_0x5848[8]);var OpenchannelQueue=require(_0x5848[3])[_0x5848[10]];var VoiceQueue=require(_0x5848[3])[_0x5848[11]];var ChatQueue=require(_0x5848[3])[_0x5848[12]];var MailQueue=require(_0x5848[3])[_0x5848[13]];var FaxQueue=require(_0x5848[3])[_0x5848[14]];var SmsQueue=require(_0x5848[3])[_0x5848[15]];var MailRoom=require(_0x5848[3])[_0x5848[16]];var Setting=require(_0x5848[3])[_0x5848[17]];var Agent=require(_0x5848[3])[_0x5848[18]];var User=require(_0x5848[3])[_0x5848[18]];var Team=require(_0x5848[3])[_0x5848[19]];var List=require(_0x5848[3])[_0x5848[20]];exports[_0x5848[21]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[27]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33])[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[36]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){return Agent[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]],{attributes:[_0x5848[28],_0x5848[41]]})[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](401)};switch(_0xbfdex14[_0x5848[61]][_0x5848[60]]){case _0x5848[45]:return _0xbfdex1a[_0x5848[44]](_0xbfdex14[_0x5848[39]][_0x5848[38]],{interface:util[_0x5848[42]](_0x5848[40],_0xbfdex1a[_0x5848[41]]),stateinterface:util[_0x5848[42]](_0x5848[40],_0xbfdex1a[_0x5848[41]]),membername:_0xbfdex1a[_0x5848[41]],UserId:_0xbfdex1a[_0x5848[28]],penalty:_0xbfdex14[_0x5848[39]][_0x5848[43]]});case _0x5848[51]:return ChatQueue[_0x5848[50]]({where:{id:_0xbfdex14[_0x5848[39]][_0x5848[38]]},attributes:[_0x5848[28],_0x5848[41]],raw:true})[_0x5848[25]](function(_0xbfdex19){if(_0xbfdex19){var _0xbfdex1b=[];_[_0x5848[48]](_0xbfdex19,function(_0xbfdex1c){_0xbfdex1b[_0x5848[47]](_0xbfdex1a[_0x5848[46]](_0xbfdex1c[_0x5848[28]],{queue:_0xbfdex1c[_0x5848[41]],penalty:_0xbfdex14[_0x5848[39]][_0x5848[43]]}))});return BPromise[_0x5848[49]](_0xbfdex1b)}});case _0x5848[53]:return MailQueue[_0x5848[50]]({where:{id:_0xbfdex14[_0x5848[39]][_0x5848[38]]},attributes:[_0x5848[28],_0x5848[41]],raw:true})[_0x5848[25]](function(_0xbfdex19){if(_0xbfdex19){var _0xbfdex1b=[];_[_0x5848[48]](_0xbfdex19,function(_0xbfdex1c){_0xbfdex1b[_0x5848[47]](_0xbfdex1a[_0x5848[52]](_0xbfdex1c[_0x5848[28]],{queue:_0xbfdex1c[_0x5848[41]],penalty:_0xbfdex14[_0x5848[39]][_0x5848[43]]}))});return BPromise[_0x5848[49]](_0xbfdex1b)}});case _0x5848[55]:return FaxQueue[_0x5848[50]]({where:{id:_0xbfdex14[_0x5848[39]][_0x5848[38]]},attributes:[_0x5848[28],_0x5848[41]],raw:true})[_0x5848[25]](function(_0xbfdex19){if(_0xbfdex19){var _0xbfdex1b=[];_[_0x5848[48]](_0xbfdex19,function(_0xbfdex1c){_0xbfdex1b[_0x5848[47]](_0xbfdex1a[_0x5848[54]](_0xbfdex1c[_0x5848[28]],{queue:_0xbfdex1c[_0x5848[41]],penalty:_0xbfdex14[_0x5848[39]][_0x5848[43]]}))});return BPromise[_0x5848[49]](_0xbfdex1b)}});case _0x5848[57]:return SmsQueue[_0x5848[50]]({where:{id:_0xbfdex14[_0x5848[39]][_0x5848[38]]},attributes:[_0x5848[28],_0x5848[41]],raw:true})[_0x5848[25]](function(_0xbfdex19){if(_0xbfdex19){var _0xbfdex1b=[];_[_0x5848[48]](_0xbfdex19,function(_0xbfdex1c){_0xbfdex1b[_0x5848[47]](_0xbfdex1a[_0x5848[56]](_0xbfdex1c[_0x5848[28]],{queue:_0xbfdex1c[_0x5848[41]],penalty:_0xbfdex14[_0x5848[39]][_0x5848[43]]}))});return BPromise[_0x5848[49]](_0xbfdex1b)}});case _0x5848[59]:return OpenchannelQueue[_0x5848[50]]({where:{id:_0xbfdex14[_0x5848[39]][_0x5848[38]]},attributes:[_0x5848[28],_0x5848[41]],raw:true})[_0x5848[25]](function(_0xbfdex19){if(_0xbfdex19){var _0xbfdex1b=[];_[_0x5848[48]](_0xbfdex19,function(_0xbfdex1c){_0xbfdex1b[_0x5848[47]](_0xbfdex1a[_0x5848[58]](_0xbfdex1c[_0x5848[28]],{queue:_0xbfdex1c[_0x5848[41]],penalty:_0xbfdex14[_0x5848[39]][_0x5848[43]]}))});return BPromise[_0x5848[49]](_0xbfdex1b)}});default:return null}})[_0x5848[25]](function(_0xbfdex19){return _0xbfdex15[_0x5848[37]](_0xbfdex19?200:401)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[62]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){return Agent[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](401)};switch(_0xbfdex14[_0x5848[61]][_0x5848[60]]){case _0x5848[45]:return _0xbfdex1a[_0x5848[64]](_0xbfdex14[_0x5848[26]][_0x5848[63]]);case _0x5848[51]:return _0xbfdex1a[_0x5848[65]](_0xbfdex14[_0x5848[26]][_0x5848[63]]);case _0x5848[53]:return _0xbfdex1a[_0x5848[66]](_0xbfdex14[_0x5848[26]][_0x5848[63]]);case _0x5848[57]:return _0xbfdex1a[_0x5848[67]](_0xbfdex14[_0x5848[26]][_0x5848[63]]);case _0x5848[55]:return _0xbfdex1a[_0x5848[68]](_0xbfdex14[_0x5848[26]][_0x5848[63]]);case _0x5848[59]:return _0xbfdex1a[_0x5848[69]](_0xbfdex14[_0x5848[26]][_0x5848[63]]);default:return null}})[_0x5848[25]](function(_0xbfdex19){return _0xbfdex15[_0x5848[37]](_0xbfdex19?200:401)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[70]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[27]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[75]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:var _0xbfdex1d=[];return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[80]]({},{attributes:[_0x5848[41]],include:[{raw:true,model:User,attributes:[_0x5848[28]]}]}))[_0x5848[25]](function(_0xbfdex19){var _0xbfdex1e=_[_0x5848[77]](_0xbfdex19[_0x5848[76]],_0x5848[41]);_0xbfdex19[_0x5848[76]][_0x5848[48]](function(_0xbfdex1c){_0xbfdex1d= _[_0x5848[78]](_0xbfdex1d,_[_0x5848[77]](_0xbfdex1c.Users,_0x5848[28]))});return User[_0x5848[34]](_0x5848[33],{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](_[_0x5848[79]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]],{id:{$in:_0xbfdex1d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xbfdex1e}},required:false}]}))})[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[81]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:var _0xbfdex1d=[];return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[82]]({},{attributes:[_0x5848[28]],include:[{raw:true,model:User,attributes:[_0x5848[28]]}]}))[_0x5848[25]](function(_0xbfdex19){var _0xbfdex1f=_[_0x5848[77]](_0xbfdex19[_0x5848[76]],_0x5848[28]);_0xbfdex19[_0x5848[76]][_0x5848[48]](function(_0xbfdex1c){_0xbfdex1d= _[_0x5848[78]](_0xbfdex1d,_[_0x5848[77]](_0xbfdex1c.Users,_0x5848[28]))});return User[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](_[_0x5848[79]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]],{id:{$in:_0xbfdex1d}}),{include:[{model:ChatQueue,where:{id:{$in:_0xbfdex1f}},required:false}]}))})[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]},_0x5848[83])[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[84]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:var _0xbfdex1d=[];return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[85]]({},{attributes:[_0x5848[28]],include:[{raw:true,model:User,attributes:[_0x5848[28]]}]}))[_0x5848[25]](function(_0xbfdex19){var _0xbfdex20=_[_0x5848[77]](_0xbfdex19[_0x5848[76]],_0x5848[28]);_0xbfdex19[_0x5848[76]][_0x5848[48]](function(_0xbfdex1c){_0xbfdex1d= _[_0x5848[78]](_0xbfdex1d,_[_0x5848[77]](_0xbfdex1c.Users,_0x5848[28]))});return User[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](_[_0x5848[79]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]],{id:{$in:_0xbfdex1d}}),{include:[{model:MailQueue,where:{id:{$in:_0xbfdex20}},required:false}]}))})[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]},_0x5848[83])[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[86]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:var _0xbfdex1d=[];return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[87]]({},{attributes:[_0x5848[28]],include:[{raw:true,model:User,attributes:[_0x5848[28]]}]}))[_0x5848[25]](function(_0xbfdex19){var _0xbfdex21=_[_0x5848[77]](_0xbfdex19[_0x5848[76]],_0x5848[28]);_0xbfdex19[_0x5848[76]][_0x5848[48]](function(_0xbfdex1c){_0xbfdex1d= _[_0x5848[78]](_0xbfdex1d,_[_0x5848[77]](_0xbfdex1c.Users,_0x5848[28]))});return User[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](_[_0x5848[79]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]],{id:{$in:_0xbfdex1d}}),{include:[{model:FaxQueue,where:{id:{$in:_0xbfdex21}},required:false}]}))})[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]},_0x5848[83])[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[88]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:var _0xbfdex1d=[];return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[89]]({},{attributes:[_0x5848[28]],include:[{raw:true,model:User,attributes:[_0x5848[28]]}]}))[_0x5848[25]](function(_0xbfdex19){var _0xbfdex22=_[_0x5848[77]](_0xbfdex19[_0x5848[76]],_0x5848[28]);_0xbfdex19[_0x5848[76]][_0x5848[48]](function(_0xbfdex1c){_0xbfdex1d= _[_0x5848[78]](_0xbfdex1d,_[_0x5848[77]](_0xbfdex1c.Users,_0x5848[28]))});return User[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](_[_0x5848[79]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]],{id:{$in:_0xbfdex1d}}),{include:[{model:SmsQueue,where:{id:{$in:_0xbfdex22}},required:false}]}))})[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]},_0x5848[83])[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[90]]= function(_0xbfdex14,_0xbfdex15,_0xbfdex16){switch(_0xbfdex14[_0x5848[29]][_0x5848[35]]){case _0x5848[29]:var _0xbfdex1d=[];return User[_0x5848[30]](_0xbfdex14[_0x5848[29]][_0x5848[28]],{attributes:[_0x5848[28]]})[_0x5848[25]](Util[_0x5848[91]]({},{attributes:[_0x5848[28]],include:[{raw:true,model:User,attributes:[_0x5848[28]]}]}))[_0x5848[25]](function(_0xbfdex19){var _0xbfdex23=_[_0x5848[77]](_0xbfdex19[_0x5848[76]],_0x5848[28]);_0xbfdex19[_0x5848[76]][_0x5848[48]](function(_0xbfdex1c){_0xbfdex1d= _[_0x5848[78]](_0xbfdex1d,_[_0x5848[77]](_0xbfdex1c.Users,_0x5848[28]))});return User[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]})[_0x5848[32]](_[_0x5848[79]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]],{id:{$in:_0xbfdex1d}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0xbfdex23}},required:false}]}))})[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)});default:return Agent[_0x5848[34]](_0x5848[33],{method:[_0x5848[71],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[72],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[73],_0xbfdex14[_0x5848[26]]]},{method:[_0x5848[74],_0xbfdex14[_0x5848[26]]]},_0x5848[83])[_0x5848[32]](Util[_0x5848[31]](_0xbfdex14[_0x5848[26]]))[_0x5848[25]](function(_0xbfdex18){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex18)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})}};exports[_0x5848[92]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex15[_0x5848[23]](_0xbfdex1a)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[93]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[95]]({attributes:[_0x5848[41]]})})[_0x5848[25]](function(_0xbfdex1e){return _0xbfdex15[_0x5848[23]]({count:_0xbfdex1e[_0x5848[94]],rows:_0xbfdex1e})})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[96]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[97]]({attributes:[_0x5848[28]]})})[_0x5848[25]](function(_0xbfdex1f){return _0xbfdex15[_0x5848[23]]({count:_0xbfdex1f[_0x5848[94]],rows:_0xbfdex1f})})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[98]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[99]]({attributes:[_0x5848[28]]})})[_0x5848[25]](function(_0xbfdex20){return _0xbfdex15[_0x5848[23]]({count:_0xbfdex20[_0x5848[94]],rows:_0xbfdex20})})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[100]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[101]]({attributes:[_0x5848[28]]})})[_0x5848[25]](function(_0xbfdex21){return _0xbfdex15[_0x5848[23]]({count:_0xbfdex21[_0x5848[94]],rows:_0xbfdex21})})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[102]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[103]]({attributes:[_0x5848[28]]})})[_0x5848[25]](function(_0xbfdex22){return _0xbfdex15[_0x5848[23]]({count:_0xbfdex22[_0x5848[94]],rows:_0xbfdex22})})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[104]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[34]](_0x5848[33])[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[105]]({attributes:[_0x5848[28]]})})[_0x5848[25]](function(_0xbfdex24){return _0xbfdex15[_0x5848[23]]({count:_0xbfdex24[_0x5848[94]],rows:_0xbfdex24})})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[106]]= function(_0xbfdex14,_0xbfdex15){var _0xbfdex25;_0xbfdex14[_0x5848[39]][_0x5848[35]]= _0x5848[33];return sequelize[_0x5848[116]](function(_0xbfdex26){return Setting[_0x5848[30]](1)[_0x5848[25]](function(_0xbfdex28){var _0xbfdex29=String(_0xbfdex14[_0x5848[39]][_0x5848[112]]);var _0xbfdex2a=_0xbfdex28[_0x5848[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0xbfdex2a[_0x5848[114]](_0xbfdex29)){throw  new Error(_0x5848[115])};return Agent[_0x5848[34]](_0x5848[33])[_0x5848[106]](_0xbfdex14[_0x5848[39]],{transaction:_0xbfdex26})})[_0x5848[25]](userTools[_0x5848[111]]({transaction:_0xbfdex26}))[_0x5848[25]](function(_0xbfdex1a){_0xbfdex25= _0xbfdex1a;return Team[_0x5848[110]]({where:{defaultEntry:true}})})[_0x5848[25]](function(_0xbfdex27){return _0xbfdex27[_0x5848[109]](_0xbfdex25[_0x5848[28]],{transaction:_0xbfdex26})})})[_0x5848[25]](function(){return _0xbfdex15[_0x5848[24]](201)[_0x5848[23]](_0xbfdex25)})[_0x5848[22]](sequelize.UniqueConstraintError,function(_0xbfdex17){return Util[_0x5848[108]][_0x5848[107]](_0xbfdex15,_0xbfdex17)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[117]]= function(_0xbfdex14,_0xbfdex15){var _0xbfdex2b;var _0xbfdex2c;var _0xbfdex2d=[];var _0xbfdex29=String(_0xbfdex14[_0x5848[39]][_0x5848[112]]);return sequelize[_0x5848[116]](function(_0xbfdex26){return Setting[_0x5848[30]](1)[_0x5848[25]](function(_0xbfdex28){_0xbfdex2c= _0xbfdex28;var _0xbfdex2a=_0xbfdex2c[_0x5848[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0xbfdex2a[_0x5848[114]](_0xbfdex29)){throw  new Error(_0x5848[119])};var _0xbfdex2e=0;if(_0xbfdex14[_0x5848[39]][_0x5848[121]](_0x5848[120])&& _[_0x5848[122]](_0xbfdex14[_0x5848[39]][_0x5848[120]])&& _0xbfdex14[_0x5848[39]][_0x5848[120]]>= 0){_0xbfdex2e= _0xbfdex14[_0x5848[39]][_0x5848[120]];delete _0xbfdex14[_0x5848[39]][_0x5848[120]]};var _0xbfdex2f=_0xbfdex14[_0x5848[39]][_0x5848[123]];delete _0xbfdex14[_0x5848[39]][_0x5848[123]];if(_0xbfdex14[_0x5848[39]][_0x5848[124]]){_0xbfdex14[_0x5848[39]][_0x5848[35]]= _0x5848[33];for(var _0xbfdex30=_0xbfdex2e;_0xbfdex30< _0xbfdex14[_0x5848[39]][_0x5848[124]]+ _0xbfdex2e;_0xbfdex30++,_0xbfdex2f++){var _0xbfdex31=_[_0x5848[125]](_0xbfdex14[_0x5848[39]]);_0xbfdex31[_0x5848[126]]= _0xbfdex2f;_0xbfdex31[_0x5848[41]]= _0xbfdex31[_0x5848[41]]+ _0xbfdex30;_0xbfdex31[_0x5848[127]]= _0xbfdex31[_0x5848[127]]+ _0xbfdex30;_0xbfdex31[_0x5848[128]]= _0xbfdex31[_0x5848[128]][_0x5848[130]](_0x5848[129])[0]+ _0xbfdex30+ _0x5848[129]+ _0xbfdex31[_0x5848[128]][_0x5848[130]](_0x5848[129])[1];_0xbfdex2d[_0x5848[47]](_0xbfdex31)}}else {throw  new Error(_0x5848[131])};return Agent[_0x5848[117]](_0xbfdex2d,{transaction:_0xbfdex26,individualHooks:true})})[_0x5848[25]](function(_0xbfdex1d){_0xbfdex2b= _0xbfdex1d;return Team[_0x5848[110]]({where:{defaultEntry:true}})})[_0x5848[25]](function(_0xbfdex27){return _0xbfdex27[_0x5848[118]](_[_0x5848[77]](_0xbfdex2b,_0x5848[28]),{transaction:_0xbfdex26})})})[_0x5848[25]](function(){return _0xbfdex15[_0x5848[37]](201)})[_0x5848[22]](sequelize.UniqueConstraintError,function(_0xbfdex17){return Util[_0x5848[108]][_0x5848[107]](_0xbfdex15,_0xbfdex17)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[132]]= function(_0xbfdex14,_0xbfdex15){if(_0xbfdex14[_0x5848[39]][_0x5848[28]]){delete _0xbfdex14[_0x5848[39]][_0x5848[28]]};delete _0xbfdex14[_0x5848[39]][_0x5848[126]];delete _0xbfdex14[_0x5848[39]][_0x5848[35]];delete _0xbfdex14[_0x5848[39]][_0x5848[41]];delete _0xbfdex14[_0x5848[39]][_0x5848[112]];var _0xbfdex25;return sequelize[_0x5848[116]](function(_0xbfdex26){return Agent[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};var _0xbfdex32=_[_0x5848[79]](_0xbfdex1a,_0xbfdex14[_0x5848[39]]);return _0xbfdex32[_0x5848[134]]({transaction:_0xbfdex26})})[_0x5848[25]](function(_0xbfdex1a){_0xbfdex25= _0xbfdex1a;return _0xbfdex1a})[_0x5848[25]](userTools[_0x5848[133]]({transaction:_0xbfdex26}))[_0x5848[25]](function(){return _0xbfdex15[_0x5848[24]](200)[_0x5848[23]](_0xbfdex25)})})[_0x5848[22]](sequelize.UniqueConstraintError,function(_0xbfdex17){return Util[_0x5848[108]][_0x5848[107]](_0xbfdex15,_0xbfdex17)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[135]]= function(_0xbfdex14,_0xbfdex15){var _0xbfdex25;return Agent[_0x5848[30]](_0xbfdex14[_0x5848[61]][_0x5848[28]])[_0x5848[25]](function(_0xbfdex1a){_0xbfdex25= _0xbfdex1a;if(!_0xbfdex1a){return _0xbfdex15[_0x5848[37]](404)};return _0xbfdex1a[_0x5848[135]]()})[_0x5848[25]](function(){return _0xbfdex15[_0x5848[37]](204)})[_0x5848[22]](sequelize.ForeignKeyConstraintError,function(_0xbfdex17){return Util[_0x5848[108]][_0x5848[136]](_0xbfdex15,_0x5848[33],_0xbfdex25[_0x5848[41]],_0xbfdex17)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};exports[_0x5848[137]]= function(_0xbfdex14,_0xbfdex15){return Agent[_0x5848[135]]({where:{id:_0xbfdex14[_0x5848[26]][_0x5848[63]]},individualHooks:true})[_0x5848[25]](function(){return _0xbfdex15[_0x5848[37]](204)})[_0x5848[22]](function(_0xbfdex17){return handleError(_0xbfdex15,_0xbfdex17)})};function handleError(_0xbfdex15,_0xbfdex17){logger[_0x5848[139]](_0xbfdex17[_0x5848[138]]);return _0xbfdex15[_0x5848[24]](500)[_0x5848[23]](_0xbfdex17)}
\ No newline at end of file