a5f50e26c41e870819ba7f5fcbae6d87d38cf73e
[motion.git] / server / config / ami / db / memberReport.js
1 var _0x7a3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x73\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x64\x65\x62\x75\x67","\x74\x68\x65\x6E","\x6E\x6F\x77","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x64\x20\x44\x45\x53\x43","\x66\x69\x6E\x64\x4F\x6E\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x54\x41\x4C\x4B\x49\x4E\x47","\x69\x6E\x62\x6F\x75\x6E\x64","\x73\x70\x6C\x69\x74","\x2D","\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x74\x65\x6E","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x72\x65\x73\x6F\x6C\x76\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x64\x69\x61\x6C\x65\x6E\x64","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x6F\x75\x72\x63\x65","\x50\x41\x55\x53\x45","\x72\x65\x61\x73\x6F\x6E","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x61\x75\x73\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65"];_0x7a3a[0];var BPromise=require(_0x7a3a[1]);var moment=require(_0x7a3a[2]);var ReportMember=require(_0x7a3a[4])[_0x7a3a[3]];var channels=[_0x7a3a[5],_0x7a3a[6],_0x7a3a[7],_0x7a3a[8],_0x7a3a[9],_0x7a3a[10]];var logger=require(_0x7a3a[12])(_0x7a3a[11]);module[_0x7a3a[13]]= function(){return {agentcomplete:function(_0xda1ax6){return function(_0xda1ax7){return ReportMember[_0x7a3a[24]]({where:{uniqueid:_0xda1ax6[_0x7a3a[22]]},order:_0x7a3a[23]})[_0x7a3a[19]](function(_0xda1ax9){if(_0xda1ax9){return _0xda1ax9[_0x7a3a[21]]({exitAt:_0xda1ax6[_0x7a3a[20]]})}})[_0x7a3a[19]](function(){logger[_0x7a3a[18]](_0x7a3a[14],_0xda1ax6[_0x7a3a[17]])})[_0x7a3a[16]](function(_0xda1ax8){logger[_0x7a3a[15]](_0x7a3a[14],_0xda1ax8)})}},agentconnect:function(_0xda1ax6){return function(_0xda1ax7){return ReportMember[_0x7a3a[37]]({channel:_0x7a3a[5],membername:_0xda1ax6[_0x7a3a[17]],interface:_0xda1ax6[_0x7a3a[26]],type:_0x7a3a[27],enterAt:_0xda1ax6[_0x7a3a[20]],data1:_0x7a3a[28],data2:_0xda1ax6[_0x7a3a[31]][_0x7a3a[29]](_0x7a3a[30])[0][_0x7a3a[29]](/\/|-/)[1]|| null,data3:_0xda1ax6[_0x7a3a[32]],data4:_0xda1ax6[_0x7a3a[33]]|| null,data5:_0xda1ax6[_0x7a3a[34]],role:_0x7a3a[35],internal:_0xda1ax6[_0x7a3a[36]]|| null,uniqueid:_0xda1ax6[_0x7a3a[22]]})[_0x7a3a[19]](function(){logger[_0x7a3a[18]](_0x7a3a[25],_0xda1ax6[_0x7a3a[17]])})[_0x7a3a[16]](function(_0xda1ax8){logger[_0x7a3a[15]](_0x7a3a[25],_0xda1ax8)})}},cdr:function(_0xda1ax6){return function(_0xda1ax7){if(_0xda1ax6[_0x7a3a[38]]!== _0x7a3a[39]){return BPromise[_0x7a3a[40]]()};return ReportMember[_0x7a3a[37]]({channel:_0x7a3a[5],membername:_0xda1ax6[_0x7a3a[31]][_0x7a3a[29]](/\/|-/)[1],interface:_0xda1ax6[_0x7a3a[31]][_0x7a3a[29]](_0x7a3a[30])[0],type:_0x7a3a[27],duration:_0xda1ax6[_0x7a3a[43]],enterAt:_0xda1ax6[_0x7a3a[44]],exitAt:_0xda1ax6[_0x7a3a[45]],data1:_0x7a3a[39],data2:_0xda1ax6[_0x7a3a[46]],data3:_0xda1ax6[_0x7a3a[47]][_0x7a3a[29]](/\/|-/)[1]|| null,role:_0x7a3a[35],internal:_0xda1ax6[_0x7a3a[48]],uniqueid:_0xda1ax6[_0x7a3a[22]]})[_0x7a3a[19]](function(){logger[_0x7a3a[18]](_0x7a3a[42],_0xda1ax6[_0x7a3a[31]][_0x7a3a[29]](/\/|-/)[1])})[_0x7a3a[16]](function(_0xda1ax8){logger[_0x7a3a[15]](_0x7a3a[41],_0xda1ax8)})}},queuememberpause:function(_0xda1ax6){return function(_0xda1ax7){var _0xda1axa=[];channels[_0x7a3a[52]](function(_0xda1axb){_0xda1axa[_0x7a3a[51]]({channel:_0xda1axb,membername:_0xda1ax6[_0x7a3a[17]],interface:_0xda1ax6[_0x7a3a[26]],type:_0x7a3a[49],enterAt:_0xda1ax6[_0x7a3a[20]],data1:_0xda1ax6[_0x7a3a[50]],data4:_0xda1ax6[_0x7a3a[50]],role:_0x7a3a[35]})});return ReportMember[_0x7a3a[54]](_0xda1axa,{raw:true,individualHooks:true})[_0x7a3a[16]](function(_0xda1ax8){logger[_0x7a3a[15]](_0x7a3a[53],_0xda1ax8)})}}}}