Built motion from commit ee60659.|0.0.144
[motion.git] / server / config / tools / dashboard.js
1 var _0x6c50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x55\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\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","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x65\x6D\x69\x74","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x4E\x45\x57","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67"];_0x6c50[0];var sequelize=require(_0x6c50[2])[_0x6c50[1]];var models=require(_0x6c50[2]);var Util=require(_0x6c50[3]);var _=require(_0x6c50[4]);var moment=require(_0x6c50[5]);var Promise=require(_0x6c50[6]);exports[_0x6c50[7]]= function(_0xb3cdx7){models[_0x6c50[9]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdx9(_0xb3cdx8)});models[_0x6c50[9]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdx9(_0xb3cdx8)});models[_0x6c50[11]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdx9(_0xb3cdx8)});models[_0x6c50[11]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdx9(_0xb3cdx8)});function _0xb3cdx9(_0xb3cdx8){onNewMail(_0xb3cdx7,_0xb3cdx8);onOpenMail(_0xb3cdx7,_0xb3cdx8);onClosedMail(_0xb3cdx7,_0xb3cdx8);onTimeoutMail(_0xb3cdx7,_0xb3cdx8);onPendingMail(_0xb3cdx7,_0xb3cdx8);onWaitingMail(_0xb3cdx7,_0xb3cdx8)}models[_0x6c50[12]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxa(_0xb3cdx8)});models[_0x6c50[12]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxa(_0xb3cdx8)});models[_0x6c50[13]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxa(_0xb3cdx8)});models[_0x6c50[13]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxa(_0xb3cdx8)});function _0xb3cdxa(_0xb3cdx8){onNewChat(_0xb3cdx7,_0xb3cdx8);onOpenChat(_0xb3cdx7,_0xb3cdx8);onClosedChat(_0xb3cdx7,_0xb3cdx8);onTimeoutChat(_0xb3cdx7,_0xb3cdx8);onAbandonedChat(_0xb3cdx7,_0xb3cdx8);onUnmanagedChat(_0xb3cdx7,_0xb3cdx8)}models[_0x6c50[14]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxb(_0xb3cdx8)});models[_0x6c50[14]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxb(_0xb3cdx8)});models[_0x6c50[15]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxb(_0xb3cdx8)});models[_0x6c50[15]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxb(_0xb3cdx8)});function _0xb3cdxb(_0xb3cdx8){onNewFax(_0xb3cdx7,_0xb3cdx8);onOpenFax(_0xb3cdx7,_0xb3cdx8);onClosedFax(_0xb3cdx7,_0xb3cdx8);onTimeoutFax(_0xb3cdx7,_0xb3cdx8);onPendingFax(_0xb3cdx7,_0xb3cdx8);onWaitingFax(_0xb3cdx7,_0xb3cdx8)}models[_0x6c50[16]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxc(_0xb3cdx8)});models[_0x6c50[16]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxc(_0xb3cdx8)});models[_0x6c50[17]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxc(_0xb3cdx8)});models[_0x6c50[17]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxc(_0xb3cdx8)});function _0xb3cdxc(_0xb3cdx8){onNewSms(_0xb3cdx7,_0xb3cdx8);onOpenSms(_0xb3cdx7,_0xb3cdx8);onClosedSms(_0xb3cdx7,_0xb3cdx8);onTimeoutSms(_0xb3cdx7,_0xb3cdx8);onPendingSms(_0xb3cdx7,_0xb3cdx8);onWaitingSms(_0xb3cdx7,_0xb3cdx8)}models[_0x6c50[18]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxd(_0xb3cdx8)});models[_0x6c50[18]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxd(_0xb3cdx8)});models[_0x6c50[19]][_0x6c50[8]](function(_0xb3cdx8){_0xb3cdxd(_0xb3cdx8)});models[_0x6c50[19]][_0x6c50[10]](function(_0xb3cdx8){_0xb3cdxd(_0xb3cdx8)});function _0xb3cdxd(_0xb3cdx8){onNewOpenchannel(_0xb3cdx7,_0xb3cdx8);onOpenOpenchannel(_0xb3cdx7,_0xb3cdx8);onClosedOpenchannel(_0xb3cdx7,_0xb3cdx8);onTimeoutOpenchannel(_0xb3cdx7,_0xb3cdx8);onPendingOpenchannel(_0xb3cdx7,_0xb3cdx8);onWaitingOpenchannel(_0xb3cdx7,_0xb3cdx8)}};function getMailQueues(_0xb3cdxf,_0xb3cdx10){return function(){switch(_0xb3cdxf[_0x6c50[36]]){case _0x6c50[33]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](Util[_0x6c50[30]]({},{attributes:[_0x6c50[23]],include:[{raw:true,model:models[_0x6c50[29]],attributes:[_0x6c50[23]]}]}))[_0x6c50[28]](function(_0xb3cdx11){if(_0xb3cdx10){return {include:{model:models[_0x6c50[20]],include:{model:models[_0x6c50[21]],include:{model:models[_0x6c50[22]],where:{id:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23])}}}}}}else {var _0xb3cdx12=[];_0xb3cdx11[_0x6c50[27]][_0x6c50[26]](function(_0xb3cdx13){_0xb3cdx12= _[_0x6c50[25]](_0xb3cdx12,_[_0x6c50[24]](_0xb3cdx13.Users,_0x6c50[23]))});return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11[_0x6c50[27]],_0x6c50[23]),memberid:_0xb3cdx12}}}}});case _0x6c50[35]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](function(_0xb3cdx14){return _0xb3cdx14[_0x6c50[34]]({attributes:[_0x6c50[23]]})})[_0x6c50[28]](function(_0xb3cdx11){return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23]),memberid:_0xb3cdxf[_0x6c50[31]]}}}});default:return {}}}}function getChatQueues(_0xb3cdxf,_0xb3cdx10){return function(){switch(_0xb3cdxf[_0x6c50[36]]){case _0x6c50[33]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](Util[_0x6c50[40]]({},{attributes:[_0x6c50[23]],include:[{raw:true,model:models[_0x6c50[29]],attributes:[_0x6c50[23]]}]}))[_0x6c50[28]](function(_0xb3cdx11){if(_0xb3cdx10){return {include:{model:models[_0x6c50[37]],include:{model:models[_0x6c50[38]],include:{model:models[_0x6c50[39]],where:{id:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23])}}}}}}else {var _0xb3cdx12=[];_0xb3cdx11[_0x6c50[27]][_0x6c50[26]](function(_0xb3cdx13){_0xb3cdx12= _[_0x6c50[25]](_0xb3cdx12,_[_0x6c50[24]](_0xb3cdx13.Users,_0x6c50[23]))});return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11[_0x6c50[27]],_0x6c50[23]),memberid:_0xb3cdx12}}}}});case _0x6c50[35]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](function(_0xb3cdx14){return _0xb3cdx14[_0x6c50[41]]({attributes:[_0x6c50[23]]})})[_0x6c50[28]](function(_0xb3cdx11){return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23]),memberid:_0xb3cdxf[_0x6c50[31]]}}}});default:return {}}}}function getFaxQueues(_0xb3cdxf,_0xb3cdx10){return function(){switch(_0xb3cdxf[_0x6c50[36]]){case _0x6c50[33]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](Util[_0x6c50[45]]({},{attributes:[_0x6c50[23]],include:[{raw:true,model:models[_0x6c50[29]],attributes:[_0x6c50[23]]}]}))[_0x6c50[28]](function(_0xb3cdx11){if(_0xb3cdx10){return {include:{model:models[_0x6c50[42]],include:{model:models[_0x6c50[43]],include:{model:models[_0x6c50[44]],where:{id:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23])}}}}}}else {var _0xb3cdx12=[];_0xb3cdx11[_0x6c50[27]][_0x6c50[26]](function(_0xb3cdx13){_0xb3cdx12= _[_0x6c50[25]](_0xb3cdx12,_[_0x6c50[24]](_0xb3cdx13.Users,_0x6c50[23]))});return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11[_0x6c50[27]],_0x6c50[23]),memberid:_0xb3cdx12}}}}});case _0x6c50[35]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](function(_0xb3cdx14){return _0xb3cdx14[_0x6c50[46]]({attributes:[_0x6c50[23]]})})[_0x6c50[28]](function(_0xb3cdx11){return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23]),memberid:_0xb3cdxf[_0x6c50[31]]}}}});default:return {}}}}function getSmsQueues(_0xb3cdxf,_0xb3cdx10){return function(){switch(_0xb3cdxf[_0x6c50[36]]){case _0x6c50[33]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](Util[_0x6c50[50]]({},{attributes:[_0x6c50[23]],include:[{raw:true,model:models[_0x6c50[29]],attributes:[_0x6c50[23]]}]}))[_0x6c50[28]](function(_0xb3cdx11){if(_0xb3cdx10){return {include:{model:models[_0x6c50[47]],include:{model:models[_0x6c50[48]],include:{model:models[_0x6c50[49]],where:{id:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23])}}}}}}else {var _0xb3cdx12=[];_0xb3cdx11[_0x6c50[27]][_0x6c50[26]](function(_0xb3cdx13){_0xb3cdx12= _[_0x6c50[25]](_0xb3cdx12,_[_0x6c50[24]](_0xb3cdx13.Users,_0x6c50[23]))});return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11[_0x6c50[27]],_0x6c50[23]),memberid:_0xb3cdx12}}}}});case _0x6c50[35]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](function(_0xb3cdx14){return _0xb3cdx14[_0x6c50[51]]({attributes:[_0x6c50[23]]})})[_0x6c50[28]](function(_0xb3cdx11){return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23]),memberid:_0xb3cdxf[_0x6c50[31]]}}}});default:return {}}}}function getOpenchannelQueues(_0xb3cdxf,_0xb3cdx10){return function(){switch(_0xb3cdxf[_0x6c50[36]]){case _0x6c50[33]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](Util[_0x6c50[55]]({},{attributes:[_0x6c50[23]],include:[{raw:true,model:models[_0x6c50[29]],attributes:[_0x6c50[23]]}]}))[_0x6c50[28]](function(_0xb3cdx11){if(_0xb3cdx10){return {include:{model:models[_0x6c50[52]],include:{model:models[_0x6c50[53]],include:{model:models[_0x6c50[54]],where:{id:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23])}}}}}}else {var _0xb3cdx12=[];_0xb3cdx11[_0x6c50[27]][_0x6c50[26]](function(_0xb3cdx13){_0xb3cdx12= _[_0x6c50[25]](_0xb3cdx12,_[_0x6c50[24]](_0xb3cdx13.Users,_0x6c50[23]))});return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11[_0x6c50[27]],_0x6c50[23]),memberid:_0xb3cdx12}}}}});case _0x6c50[35]:return models[_0x6c50[29]][_0x6c50[32]](_0xb3cdxf[_0x6c50[31]],{attributes:[_0x6c50[23]]})[_0x6c50[28]](function(_0xb3cdx14){return _0xb3cdx14[_0x6c50[56]]({attributes:[_0x6c50[23]]})})[_0x6c50[28]](function(_0xb3cdx11){return {where:{$or:{queue:_[_0x6c50[24]](_0xb3cdx11,_0x6c50[23]),memberid:_0xb3cdxf[_0x6c50[31]]}}}});default:return {}}}}function onOpenMail(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getMailQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[11]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[61],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[59],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onClosedMail(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getMailQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[11]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[68],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[67],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onNewMail(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getMailQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[11]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[70],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[69],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onWaitingMail(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getMailQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[9]][_0x6c50[65]](_[_0x6c50[64]]({where:{leaveAt:null}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[71],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onTimeoutMail(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getMailQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[9]][_0x6c50[65]](_[_0x6c50[64]]({where:{timeout:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[72],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onPendingMail(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getMailQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[11]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[74],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[73],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onOpenChat(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getChatQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[12]][_0x6c50[65]](_[_0x6c50[64]]({where:{leaveAt:{$ne:null},complete:null,timeout:null}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[75],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onClosedChat(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getChatQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[12]][_0x6c50[65]](_[_0x6c50[64]]({where:{complete:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[76],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onNewChat(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getChatQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[12]][_0x6c50[65]](_[_0x6c50[64]]({where:{leaveAt:null}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[77],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onTimeoutChat(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getChatQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[12]][_0x6c50[65]](_[_0x6c50[64]]({where:{timeout:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[78],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onAbandonedChat(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getChatQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[12]][_0x6c50[65]](_[_0x6c50[64]]({where:{abandon:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[79],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onUnmanagedChat(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getChatQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[13]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[81],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[80],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onOpenFax(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getFaxQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[15]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[61],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[82],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onClosedFax(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getFaxQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[15]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[68],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[83],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onNewFax(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getFaxQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[15]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[70],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[84],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onTimeoutFax(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getFaxQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[14]][_0x6c50[65]](_[_0x6c50[64]]({where:{timeout:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[85],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onPendingFax(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getFaxQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[15]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[74],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[86],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onWaitingFax(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getFaxQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[14]][_0x6c50[65]](_[_0x6c50[64]]({where:{leaveAt:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[87],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onOpenSms(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getSmsQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[17]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[61],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[88],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onClosedSms(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getSmsQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[17]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[68],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[89],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onNewSms(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getSmsQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[17]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[70],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[90],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onTimeoutSms(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getSmsQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[16]][_0x6c50[65]](_[_0x6c50[64]]({where:{timeout:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[91],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onPendingSms(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getSmsQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[17]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[74],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[92],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onWaitingSms(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getSmsQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[16]][_0x6c50[65]](_[_0x6c50[64]]({where:{leaveAt:null}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[92],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onOpenOpenchannel(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getOpenchannelQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[19]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[61],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[93],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onClosedOpenchannel(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getOpenchannelQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[19]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[68],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[94],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onNewOpenchannel(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getOpenchannelQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[19]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[70],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[95],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onTimeoutOpenchannel(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getOpenchannelQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[18]][_0x6c50[65]](_[_0x6c50[64]]({where:{timeout:true}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[96],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onPendingOpenchannel(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getOpenchannelQueues(_0xb3cdx7,true))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[19]][_0x6c50[65]](_[_0x6c50[64]]({where:{status:_0x6c50[74],updatedAt:{$gte:moment()[_0x6c50[63]](_0x6c50[62])}}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[97],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}function onWaitingOpenchannel(_0xb3cdx7,_0xb3cdx8){return Promise[_0x6c50[66]]([])[_0x6c50[28]](getOpenchannelQueues(_0xb3cdx7))[_0x6c50[28]](function(_0xb3cdx1c){return models[_0x6c50[18]][_0x6c50[65]](_[_0x6c50[64]]({where:{leaveAt:null}},_0xb3cdx1c))})[_0x6c50[28]](function(_0xb3cdx1b){_0xb3cdx7[_0x6c50[60]](_0x6c50[97],{value:_0xb3cdx1b})})[_0x6c50[58]](function(_0xb3cdx1a){console[_0x6c50[57]](_0xb3cdx1a)})}