Built motion from commit 0c27b27.|1.0.11
[motion.git] / server / api / agent / agent.controller.js
index da95695..640dae4 100644 (file)
@@ -1 +1 @@
-var _0x311f=["\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\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\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","\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","\x71\x75\x65\x75\x65\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\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","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\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","\x69\x64\x73"];_0x311f[0];var _=require(_0x311f[1]);var sequelize=require(_0x311f[3])[_0x311f[2]];var Util=require(_0x311f[4]);var Agent=require(_0x311f[3])[_0x311f[5]];var Team=require(_0x311f[3])[_0x311f[6]];var MailRoom=require(_0x311f[3])[_0x311f[7]];exports[_0x311f[8]]=function(_0x5f42x7,_0x5f42x8,_0x5f42x9){return Agent[_0x311f[23]](_0x311f[17],{method:[_0x311f[18],_0x5f42x7[_0x311f[14]]]},{method:[_0x311f[19],_0x5f42x7[_0x311f[14]]]},{method:[_0x311f[20],_0x5f42x7[_0x311f[14]]]},{method:[_0x311f[21],_0x5f42x7[_0x311f[14]]]},_0x311f[22])[_0x311f[16]](Util[_0x311f[15]](_0x5f42x7[_0x311f[14]]))[_0x311f[13]](function(_0x5f42xb){return _0x5f42x8[_0x311f[12]](200)[_0x311f[11]](_0x5f42xb)})[_0x311f[10]](function(_0x5f42xa){console[_0x311f[9]](_0x5f42xa);return handleError(_0x5f42x8,_0x5f42xa)})};exports[_0x311f[24]]=function(_0x5f42x7,_0x5f42x8){return Agent[_0x311f[23]](_0x311f[17])[_0x311f[28]](_0x5f42x7[_0x311f[27]][_0x311f[26]])[_0x311f[13]](function(_0x5f42xc){if(!_0x5f42xc){return _0x5f42x8[_0x311f[25]](404)};return _0x5f42x8[_0x311f[11]](_0x5f42xc)})[_0x311f[10]](function(_0x5f42xa){return handleError(_0x5f42x8,_0x5f42xa)})};exports[_0x311f[29]]=function(_0x5f42x7,_0x5f42x8){var _0x5f42xd;return Agent[_0x311f[23]](_0x311f[17])[_0x311f[29]](_0x5f42x7[_0x311f[34]])[_0x311f[13]](function(_0x5f42xc){_0x5f42xd=_0x5f42xc;return Team[_0x311f[33]]({where:{defaultEntry:true}})})[_0x311f[13]](function(_0x5f42xe){return _0x5f42xe[_0x311f[32]](_0x5f42xd[_0x311f[26]])})[_0x311f[13]](function(){return _0x5f42x8[_0x311f[12]](201)[_0x311f[11]](_0x5f42xd)})[_0x311f[10]](sequelize.UniqueConstraintError,function(_0x5f42xa){return Util[_0x311f[31]][_0x311f[30]](_0x5f42x8,_0x5f42xa)})[_0x311f[10]](function(_0x5f42xa){return handleError(_0x5f42x8,_0x5f42xa)})};exports[_0x311f[35]]=function(_0x5f42x7,_0x5f42x8){if(_0x5f42x7[_0x311f[34]][_0x311f[26]]){delete _0x5f42x7[_0x311f[34]][_0x311f[26]]};return Agent[_0x311f[28]](_0x5f42x7[_0x311f[27]][_0x311f[26]])[_0x311f[13]](function(_0x5f42xc){if(!_0x5f42xc){return _0x5f42x8[_0x311f[25]](404)};var _0x5f42xf=_[_0x311f[36]](_0x5f42xc,_0x5f42x7[_0x311f[34]]);return _0x5f42xf[_0x311f[37]]()})[_0x311f[13]](function(_0x5f42xc){return _0x5f42x8[_0x311f[12]](200)[_0x311f[11]](_0x5f42xc)})[_0x311f[10]](sequelize.UniqueConstraintError,function(_0x5f42xa){return Util[_0x311f[31]][_0x311f[30]](_0x5f42x8,_0x5f42xa)})[_0x311f[10]](function(_0x5f42xa){return handleError(_0x5f42x8,_0x5f42xa)})};exports[_0x311f[38]]=function(_0x5f42x7,_0x5f42x8){var _0x5f42xd;return Agent[_0x311f[28]](_0x5f42x7[_0x311f[27]][_0x311f[26]])[_0x311f[13]](function(_0x5f42xc){_0x5f42xd=_0x5f42xc;if(!_0x5f42xc){return _0x5f42x8[_0x311f[25]](404)};return _0x5f42xc[_0x311f[38]]()})[_0x311f[13]](function(){return _0x5f42x8[_0x311f[25]](204)})[_0x311f[10]](sequelize.ForeignKeyConstraintError,function(_0x5f42xa){return Util[_0x311f[31]][_0x311f[40]](_0x5f42x8,_0x311f[17],_0x5f42xd[_0x311f[39]],_0x5f42xa)})[_0x311f[10]](function(_0x5f42xa){return handleError(_0x5f42x8,_0x5f42xa)})};exports[_0x311f[41]]=function(_0x5f42x7,_0x5f42x8){return Agent[_0x311f[38]]({where:{id:_0x5f42x7[_0x311f[14]][_0x311f[42]]},individualHooks:true})[_0x311f[13]](function(){return _0x5f42x8[_0x311f[25]](204)})[_0x311f[10]](function(_0x5f42xa){return handleError(_0x5f42x8,_0x5f42xa)})};function handleError(_0x5f42x8,_0x5f42xa){return _0x5f42x8[_0x311f[12]](500)[_0x311f[11]](_0x5f42xa)}
\ No newline at end of file
+var _0xe527=["\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","\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","\x65\x72\x72\x6F\x72","\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","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\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"];_0xe527[0];var _=require(_0xe527[1]);var sequelize=require(_0xe527[3])[_0xe527[2]];var BPromise=require(_0xe527[4]);var util=require(_0xe527[5]);var Util=require(_0xe527[6]);var userTools=require(_0xe527[7]);var OpenchannelQueue=require(_0xe527[3])[_0xe527[8]];var VoiceQueue=require(_0xe527[3])[_0xe527[9]];var ChatQueue=require(_0xe527[3])[_0xe527[10]];var MailQueue=require(_0xe527[3])[_0xe527[11]];var FaxQueue=require(_0xe527[3])[_0xe527[12]];var SmsQueue=require(_0xe527[3])[_0xe527[13]];var MailRoom=require(_0xe527[3])[_0xe527[14]];var Setting=require(_0xe527[3])[_0xe527[15]];var Agent=require(_0xe527[3])[_0xe527[16]];var User=require(_0xe527[3])[_0xe527[16]];var Team=require(_0xe527[3])[_0xe527[17]];var List=require(_0xe527[3])[_0xe527[18]];exports[_0xe527[19]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[26]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32])[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[35]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){return Agent[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]],{attributes:[_0xe527[27],_0xe527[39]]})[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](401)};switch(_0x3c84x13[_0xe527[58]][_0xe527[57]]){case _0xe527[42]:return _0x3c84x19[_0xe527[41]](_0x3c84x13[_0xe527[37]],{interface:util[_0xe527[40]](_0xe527[38],_0x3c84x19[_0xe527[39]]),stateinterface:util[_0xe527[40]](_0xe527[38],_0x3c84x19[_0xe527[39]]),membername:_0x3c84x19[_0xe527[39]],UserId:_0x3c84x19[_0xe527[27]]});case _0xe527[48]:return ChatQueue[_0xe527[47]]({where:{id:_0x3c84x13[_0xe527[37]]},attributes:[_0xe527[27],_0xe527[39]],raw:true})[_0xe527[24]](function(_0x3c84x18){if(_0x3c84x18){var _0x3c84x1a=[];_[_0xe527[45]](_0x3c84x18,function(_0x3c84x1b){_0x3c84x1a[_0xe527[44]](_0x3c84x19[_0xe527[43]](_0x3c84x1b[_0xe527[27]],{queue:_0x3c84x1b[_0xe527[39]]}))});return BPromise[_0xe527[46]](_0x3c84x1a)}});case _0xe527[50]:return MailQueue[_0xe527[47]]({where:{id:_0x3c84x13[_0xe527[37]]},attributes:[_0xe527[27],_0xe527[39]],raw:true})[_0xe527[24]](function(_0x3c84x18){if(_0x3c84x18){var _0x3c84x1a=[];_[_0xe527[45]](_0x3c84x18,function(_0x3c84x1b){_0x3c84x1a[_0xe527[44]](_0x3c84x19[_0xe527[49]](_0x3c84x1b[_0xe527[27]],{queue:_0x3c84x1b[_0xe527[39]]}))});return BPromise[_0xe527[46]](_0x3c84x1a)}});case _0xe527[52]:return FaxQueue[_0xe527[47]]({where:{id:_0x3c84x13[_0xe527[37]]},attributes:[_0xe527[27],_0xe527[39]],raw:true})[_0xe527[24]](function(_0x3c84x18){if(_0x3c84x18){var _0x3c84x1a=[];_[_0xe527[45]](_0x3c84x18,function(_0x3c84x1b){_0x3c84x1a[_0xe527[44]](_0x3c84x19[_0xe527[51]](_0x3c84x1b[_0xe527[27]],{queue:_0x3c84x1b[_0xe527[39]]}))});return BPromise[_0xe527[46]](_0x3c84x1a)}});case _0xe527[54]:return SmsQueue[_0xe527[47]]({where:{id:_0x3c84x13[_0xe527[37]]},attributes:[_0xe527[27],_0xe527[39]],raw:true})[_0xe527[24]](function(_0x3c84x18){if(_0x3c84x18){var _0x3c84x1a=[];_[_0xe527[45]](_0x3c84x18,function(_0x3c84x1b){_0x3c84x1a[_0xe527[44]](_0x3c84x19[_0xe527[53]](_0x3c84x1b[_0xe527[27]],{queue:_0x3c84x1b[_0xe527[39]]}))});return BPromise[_0xe527[46]](_0x3c84x1a)}});case _0xe527[56]:return OpenchannelQueue[_0xe527[47]]({where:{id:_0x3c84x13[_0xe527[37]]},attributes:[_0xe527[27],_0xe527[39]],raw:true})[_0xe527[24]](function(_0x3c84x18){if(_0x3c84x18){var _0x3c84x1a=[];_[_0xe527[45]](_0x3c84x18,function(_0x3c84x1b){_0x3c84x1a[_0xe527[44]](_0x3c84x19[_0xe527[55]](_0x3c84x1b[_0xe527[27]],{queue:_0x3c84x1b[_0xe527[39]]}))});return BPromise[_0xe527[46]](_0x3c84x1a)}});default:return null}})[_0xe527[24]](function(_0x3c84x18){return _0x3c84x14[_0xe527[36]](_0x3c84x18?200:401)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16)})};exports[_0xe527[59]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){return Agent[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](401)};switch(_0x3c84x13[_0xe527[58]][_0xe527[57]]){case _0xe527[42]:return _0x3c84x19[_0xe527[61]](_0x3c84x13[_0xe527[25]][_0xe527[60]]);case _0xe527[48]:return _0x3c84x19[_0xe527[62]](_0x3c84x13[_0xe527[25]][_0xe527[60]]);case _0xe527[50]:return _0x3c84x19[_0xe527[63]](_0x3c84x13[_0xe527[25]][_0xe527[60]]);case _0xe527[54]:return _0x3c84x19[_0xe527[64]](_0x3c84x13[_0xe527[25]][_0xe527[60]]);case _0xe527[52]:return _0x3c84x19[_0xe527[65]](_0x3c84x13[_0xe527[25]][_0xe527[60]]);case _0xe527[56]:return _0x3c84x19[_0xe527[66]](_0x3c84x13[_0xe527[25]][_0xe527[60]]);default:return null}})[_0xe527[24]](function(_0x3c84x18){return _0x3c84x14[_0xe527[36]](_0x3c84x18?200:401)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16)})};exports[_0xe527[67]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[26]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[72]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:var _0x3c84x1c=[];return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[77]]({},{attributes:[_0xe527[39]],include:[{raw:true,model:User,attributes:[_0xe527[27]]}]}))[_0xe527[24]](function(_0x3c84x18){var _0x3c84x1d=_[_0xe527[74]](_0x3c84x18[_0xe527[73]],_0xe527[39]);_0x3c84x18[_0xe527[73]][_0xe527[45]](function(_0x3c84x1b){_0x3c84x1c= _[_0xe527[75]](_0x3c84x1c,_[_0xe527[74]](_0x3c84x1b.Users,_0xe527[27]))});return User[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](_[_0xe527[76]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]],{id:{$in:_0x3c84x1c}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x3c84x1d}},required:false}]}))})[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[78]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:var _0x3c84x1c=[];return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[79]]({},{attributes:[_0xe527[27]],include:[{raw:true,model:User,attributes:[_0xe527[27]]}]}))[_0xe527[24]](function(_0x3c84x18){var _0x3c84x1e=_[_0xe527[74]](_0x3c84x18[_0xe527[73]],_0xe527[27]);_0x3c84x18[_0xe527[73]][_0xe527[45]](function(_0x3c84x1b){_0x3c84x1c= _[_0xe527[75]](_0x3c84x1c,_[_0xe527[74]](_0x3c84x1b.Users,_0xe527[27]))});return User[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](_[_0xe527[76]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]],{id:{$in:_0x3c84x1c}}),{include:[{model:ChatQueue,where:{id:{$in:_0x3c84x1e}},required:false}]}))})[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]},_0xe527[80])[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[81]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:var _0x3c84x1c=[];return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[82]]({},{attributes:[_0xe527[27]],include:[{raw:true,model:User,attributes:[_0xe527[27]]}]}))[_0xe527[24]](function(_0x3c84x18){var _0x3c84x1f=_[_0xe527[74]](_0x3c84x18[_0xe527[73]],_0xe527[27]);_0x3c84x18[_0xe527[73]][_0xe527[45]](function(_0x3c84x1b){_0x3c84x1c= _[_0xe527[75]](_0x3c84x1c,_[_0xe527[74]](_0x3c84x1b.Users,_0xe527[27]))});return User[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](_[_0xe527[76]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]],{id:{$in:_0x3c84x1c}}),{include:[{model:MailQueue,where:{id:{$in:_0x3c84x1f}},required:false}]}))})[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]},_0xe527[80])[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[83]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:var _0x3c84x1c=[];return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[84]]({},{attributes:[_0xe527[27]],include:[{raw:true,model:User,attributes:[_0xe527[27]]}]}))[_0xe527[24]](function(_0x3c84x18){var _0x3c84x20=_[_0xe527[74]](_0x3c84x18[_0xe527[73]],_0xe527[27]);_0x3c84x18[_0xe527[73]][_0xe527[45]](function(_0x3c84x1b){_0x3c84x1c= _[_0xe527[75]](_0x3c84x1c,_[_0xe527[74]](_0x3c84x1b.Users,_0xe527[27]))});return User[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](_[_0xe527[76]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]],{id:{$in:_0x3c84x1c}}),{include:[{model:FaxQueue,where:{id:{$in:_0x3c84x20}},required:false}]}))})[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]},_0xe527[80])[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[85]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:var _0x3c84x1c=[];return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[86]]({},{attributes:[_0xe527[27]],include:[{raw:true,model:User,attributes:[_0xe527[27]]}]}))[_0xe527[24]](function(_0x3c84x18){var _0x3c84x21=_[_0xe527[74]](_0x3c84x18[_0xe527[73]],_0xe527[27]);_0x3c84x18[_0xe527[73]][_0xe527[45]](function(_0x3c84x1b){_0x3c84x1c= _[_0xe527[75]](_0x3c84x1c,_[_0xe527[74]](_0x3c84x1b.Users,_0xe527[27]))});return User[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](_[_0xe527[76]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]],{id:{$in:_0x3c84x1c}}),{include:[{model:SmsQueue,where:{id:{$in:_0x3c84x21}},required:false}]}))})[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]},_0xe527[80])[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[87]]= function(_0x3c84x13,_0x3c84x14,_0x3c84x15){switch(_0x3c84x13[_0xe527[28]][_0xe527[34]]){case _0xe527[28]:var _0x3c84x1c=[];return User[_0xe527[29]](_0x3c84x13[_0xe527[28]][_0xe527[27]],{attributes:[_0xe527[27]]})[_0xe527[24]](Util[_0xe527[88]]({},{attributes:[_0xe527[27]],include:[{raw:true,model:User,attributes:[_0xe527[27]]}]}))[_0xe527[24]](function(_0x3c84x18){var _0x3c84x22=_[_0xe527[74]](_0x3c84x18[_0xe527[73]],_0xe527[27]);_0x3c84x18[_0xe527[73]][_0xe527[45]](function(_0x3c84x1b){_0x3c84x1c= _[_0xe527[75]](_0x3c84x1c,_[_0xe527[74]](_0x3c84x1b.Users,_0xe527[27]))});return User[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]})[_0xe527[31]](_[_0xe527[76]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]],{id:{$in:_0x3c84x1c}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x3c84x22}},required:false}]}))})[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)});default:return Agent[_0xe527[33]](_0xe527[32],{method:[_0xe527[68],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[69],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[70],_0x3c84x13[_0xe527[25]]]},{method:[_0xe527[71],_0x3c84x13[_0xe527[25]]]},_0xe527[80])[_0xe527[31]](Util[_0xe527[30]](_0x3c84x13[_0xe527[25]]))[_0xe527[24]](function(_0x3c84x17){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x17)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})}};exports[_0xe527[89]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x14[_0xe527[22]](_0x3c84x19)})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[90]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[92]]({attributes:[_0xe527[39]]})})[_0xe527[24]](function(_0x3c84x1d){return _0x3c84x14[_0xe527[22]]({count:_0x3c84x1d[_0xe527[91]],rows:_0x3c84x1d})})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[93]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[94]]({attributes:[_0xe527[27]]})})[_0xe527[24]](function(_0x3c84x1e){return _0x3c84x14[_0xe527[22]]({count:_0x3c84x1e[_0xe527[91]],rows:_0x3c84x1e})})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[95]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[96]]({attributes:[_0xe527[27]]})})[_0xe527[24]](function(_0x3c84x1f){return _0x3c84x14[_0xe527[22]]({count:_0x3c84x1f[_0xe527[91]],rows:_0x3c84x1f})})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[97]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[98]]({attributes:[_0xe527[27]]})})[_0xe527[24]](function(_0x3c84x20){return _0x3c84x14[_0xe527[22]]({count:_0x3c84x20[_0xe527[91]],rows:_0x3c84x20})})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[99]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[100]]({attributes:[_0xe527[27]]})})[_0xe527[24]](function(_0x3c84x21){return _0x3c84x14[_0xe527[22]]({count:_0x3c84x21[_0xe527[91]],rows:_0x3c84x21})})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[101]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[33]](_0xe527[32])[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[102]]({attributes:[_0xe527[27]]})})[_0xe527[24]](function(_0x3c84x23){return _0x3c84x14[_0xe527[22]]({count:_0x3c84x23[_0xe527[91]],rows:_0x3c84x23})})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[103]]= function(_0x3c84x13,_0x3c84x14){var _0x3c84x24;_0x3c84x13[_0xe527[37]][_0xe527[34]]= _0xe527[32];return sequelize[_0xe527[113]](function(_0x3c84x25){return Setting[_0xe527[29]](1)[_0xe527[24]](function(_0x3c84x28){var _0x3c84x29=String(_0x3c84x13[_0xe527[37]][_0xe527[109]]);var _0x3c84x2a=_0x3c84x28[_0xe527[110]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0x3c84x2a[_0xe527[111]](_0x3c84x29)){throw  new Error(_0xe527[112])};return Agent[_0xe527[33]](_0xe527[32])[_0xe527[103]](_0x3c84x13[_0xe527[37]],{transaction:_0x3c84x25})})[_0xe527[24]](userTools[_0xe527[108]]({transaction:_0x3c84x25}))[_0xe527[24]](function(_0x3c84x19){_0x3c84x24= _0x3c84x19;return Team[_0xe527[107]]({where:{defaultEntry:true}})})[_0xe527[24]](function(_0x3c84x27){return _0x3c84x27[_0xe527[106]](_0x3c84x24[_0xe527[27]],{transaction:_0x3c84x25})})[_0xe527[24]](function(){return List[_0xe527[107]]({where:{defaultEntry:true}})})[_0xe527[24]](function(_0x3c84x26){return _0x3c84x26[_0xe527[106]](_0x3c84x24[_0xe527[27]],{transaction:_0x3c84x25})})})[_0xe527[24]](function(){return _0x3c84x14[_0xe527[23]](201)[_0xe527[22]](_0x3c84x24)})[_0xe527[21]](sequelize.UniqueConstraintError,function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return Util[_0xe527[105]][_0xe527[104]](_0x3c84x14,_0x3c84x16)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[114]]= function(_0x3c84x13,_0x3c84x14){var _0x3c84x2b;var _0x3c84x2c;var _0x3c84x2d=[];var _0x3c84x29=String(_0x3c84x13[_0xe527[37]][_0xe527[109]]);return sequelize[_0xe527[113]](function(_0x3c84x25){return Setting[_0xe527[29]](1)[_0xe527[24]](function(_0x3c84x28){_0x3c84x2c= _0x3c84x28;var _0x3c84x2a=_0x3c84x2c[_0xe527[110]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x3c84x2a[_0xe527[111]](_0x3c84x29)){throw  new Error(_0xe527[116])};var _0x3c84x2e=0;if(_0x3c84x13[_0xe527[37]][_0xe527[118]](_0xe527[117])&& _[_0xe527[119]](_0x3c84x13[_0xe527[37]][_0xe527[117]])&& _0x3c84x13[_0xe527[37]][_0xe527[117]]>= 0){_0x3c84x2e= _0x3c84x13[_0xe527[37]][_0xe527[117]];delete _0x3c84x13[_0xe527[37]][_0xe527[117]]};var _0x3c84x2f=_0x3c84x13[_0xe527[37]][_0xe527[120]];delete _0x3c84x13[_0xe527[37]][_0xe527[120]];if(_0x3c84x13[_0xe527[37]][_0xe527[121]]){_0x3c84x13[_0xe527[37]][_0xe527[34]]= _0xe527[32];for(var _0x3c84x30=_0x3c84x2e;_0x3c84x30< _0x3c84x13[_0xe527[37]][_0xe527[121]]+ _0x3c84x2e;_0x3c84x30++,_0x3c84x2f++){var _0x3c84x31=_[_0xe527[122]](_0x3c84x13[_0xe527[37]]);_0x3c84x31[_0xe527[123]]= _0x3c84x2f;_0x3c84x31[_0xe527[39]]= _0x3c84x31[_0xe527[39]]+ _0x3c84x30;_0x3c84x31[_0xe527[124]]= _0x3c84x31[_0xe527[124]]+ _0x3c84x30;_0x3c84x31[_0xe527[125]]= _0x3c84x31[_0xe527[125]][_0xe527[127]](_0xe527[126])[0]+ _0x3c84x30+ _0xe527[126]+ _0x3c84x31[_0xe527[125]][_0xe527[127]](_0xe527[126])[1];_0x3c84x2d[_0xe527[44]](_0x3c84x31)}}else {throw  new Error(_0xe527[128])};return Agent[_0xe527[114]](_0x3c84x2d,{transaction:_0x3c84x25,individualHooks:true})})[_0xe527[24]](function(_0x3c84x1c){_0x3c84x2b= _0x3c84x1c;return Team[_0xe527[107]]({where:{defaultEntry:true}})})[_0xe527[24]](function(_0x3c84x27){return _0x3c84x27[_0xe527[115]](_[_0xe527[74]](_0x3c84x2b,_0xe527[27]),{transaction:_0x3c84x25})})})[_0xe527[24]](function(){return _0x3c84x14[_0xe527[36]](201)})[_0xe527[21]](sequelize.UniqueConstraintError,function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return Util[_0xe527[105]][_0xe527[104]](_0x3c84x14,_0x3c84x16)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[129]]= function(_0x3c84x13,_0x3c84x14){if(_0x3c84x13[_0xe527[37]][_0xe527[27]]){delete _0x3c84x13[_0xe527[37]][_0xe527[27]]};delete _0x3c84x13[_0xe527[37]][_0xe527[123]];delete _0x3c84x13[_0xe527[37]][_0xe527[34]];delete _0x3c84x13[_0xe527[37]][_0xe527[39]];delete _0x3c84x13[_0xe527[37]][_0xe527[109]];var _0x3c84x24;return sequelize[_0xe527[113]](function(_0x3c84x25){return Agent[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};var _0x3c84x32=_[_0xe527[76]](_0x3c84x19,_0x3c84x13[_0xe527[37]]);return _0x3c84x32[_0xe527[131]]({transaction:_0x3c84x25})})[_0xe527[24]](function(_0x3c84x19){_0x3c84x24= _0x3c84x19;return _0x3c84x19})[_0xe527[24]](userTools[_0xe527[130]]({transaction:_0x3c84x25}))[_0xe527[24]](function(){return _0x3c84x14[_0xe527[23]](200)[_0xe527[22]](_0x3c84x24)})})[_0xe527[21]](sequelize.UniqueConstraintError,function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return Util[_0xe527[105]][_0xe527[104]](_0x3c84x14,_0x3c84x16)})[_0xe527[21]](function(_0x3c84x16){console[_0xe527[20]](_0x3c84x16);return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[132]]= function(_0x3c84x13,_0x3c84x14){var _0x3c84x24;return Agent[_0xe527[29]](_0x3c84x13[_0xe527[58]][_0xe527[27]])[_0xe527[24]](function(_0x3c84x19){_0x3c84x24= _0x3c84x19;if(!_0x3c84x19){return _0x3c84x14[_0xe527[36]](404)};return _0x3c84x19[_0xe527[132]]()})[_0xe527[24]](function(){return _0x3c84x14[_0xe527[36]](204)})[_0xe527[21]](sequelize.ForeignKeyConstraintError,function(_0x3c84x16){return Util[_0xe527[105]][_0xe527[133]](_0x3c84x14,_0xe527[32],_0x3c84x24[_0xe527[39]],_0x3c84x16)})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};exports[_0xe527[134]]= function(_0x3c84x13,_0x3c84x14){return Agent[_0xe527[132]]({where:{id:_0x3c84x13[_0xe527[25]][_0xe527[60]]},individualHooks:true})[_0xe527[24]](function(){return _0x3c84x14[_0xe527[36]](204)})[_0xe527[21]](function(_0x3c84x16){return handleError(_0x3c84x14,_0x3c84x16)})};function handleError(_0x3c84x14,_0x3c84x16){return _0x3c84x14[_0xe527[23]](500)[_0xe527[22]](_0x3c84x16)}
\ No newline at end of file