Built motion from commit ae9653f.|0.0.42
[motion.git] / server / config / ami / action.js
1 var _0xf629=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x55\x73\x65\x72","\x65\x78\x70\x6F\x72\x74\x73","\x41\x63\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6C\x6C","\x65\x6E\x74\x65\x72\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x75\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x41\x6C\x72\x65\x61\x64\x79\x20\x50\x61\x75\x73\x65\x20\x4F\x66\x66","\x66\x69\x6E\x64\x4F\x6E\x65","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E"];_0xf629[0];var Promise=require(_0xf629[1]);var moment=require(_0xf629[2]);var util=require(_0xf629[3]);var Sequelize=require(_0xf629[5])[_0xf629[4]];var ReportMember=require(_0xf629[5])[_0xf629[6]];var Action=require(_0xf629[5])[_0xf629[7]];var Agent=require(_0xf629[5])[_0xf629[8]];module[_0xf629[9]]=function(_0x7c69x8){console[_0xf629[11]](_0xf629[10]);var _0x7c69x9=[_0xf629[12],_0xf629[13],_0xf629[14],_0xf629[15]];Action[_0xf629[16]](function(_0x7c69xa,_0x7c69xb){return _0x7c69x1c(_0x7c69xa,_0x7c69xb,_0x7c69x8)});ReportMember[_0xf629[32]](function(_0x7c69xa,_0x7c69xb){console[_0xf629[11]](_0xf629[17]);return ReportMember[_0xf629[31]]({where:{channel:_0x7c69xa[_0xf629[28]],membername:_0x7c69xa[_0xf629[29]],interface:_0x7c69xa[_0xf629[30]],exitAt:null}})[_0xf629[27]](function(_0x7c69xc){var _0x7c69xd=[];var _0x7c69xe=moment();_0x7c69xc[_0xf629[26]](function(_0x7c69xf){var _0x7c69x10=moment(_0x7c69xf[_0xf629[19]]);_0x7c69xd[_0xf629[25]](_0x7c69xf[_0xf629[24]]({exitAt:_0x7c69xe[_0xf629[21]](_0xf629[20]),duration:_0x7c69xe[_0xf629[23]](_0x7c69x10,_0xf629[22])}))});return _0x7c69xd})[_0xf629[18]]()});function _0x7c69x11(_0x7c69xb,_0x7c69x12){return function(_0x7c69x13){return Promise[_0xf629[42]](_0x7c69x8[_0xf629[41]])({action:_0xf629[40],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),paused:true,reason:_0x7c69xb[_0xf629[37]][_0xf629[36]]})[_0xf629[27]](function(){return _0x7c69x13[_0xf629[24]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,pauseType:_0x7c69xb[_0xf629[37]][_0xf629[36]]},{transaction:_0x7c69xb[_0xf629[38]]})})[_0xf629[27]](function(_0x7c69x13){var _0x7c69x14=[];_0x7c69x9[_0xf629[26]](function(_0x7c69x15){_0x7c69x14[_0xf629[25]]({channel:_0x7c69x15,membername:_0x7c69x13[_0xf629[33]],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),type:_0x7c69xb[_0xf629[37]][_0xf629[36]],enterAt:moment()[_0xf629[21]](_0xf629[20])})});return ReportMember[_0xf629[39]](_0x7c69x14,{individualHooks:true,transaction:_0x7c69xb[_0xf629[38]]})})}}function _0x7c69x16(_0x7c69xb,_0x7c69x12){return function(_0x7c69x13){switch(_0x7c69xb[_0xf629[37]][_0xf629[28]]){case _0xf629[12]:return Promise[_0xf629[42]](_0x7c69x8[_0xf629[41]])({action:_0xf629[40],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),paused:false,reason:_0x7c69xb[_0xf629[37]][_0xf629[36]]})[_0xf629[27]](function(){return _0x7c69x13[_0xf629[24]]({voicePause:false},{transaction:_0x7c69xb[_0xf629[38]]})})[_0xf629[27]](function(_0x7c69x13){var _0x7c69xe=moment();return ReportMember[_0xf629[44]]({where:{channel:_0x7c69xb[_0xf629[37]][_0xf629[28]],membername:_0x7c69x13[_0xf629[33]],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),exitAt:null}})})[_0xf629[27]](_0x7c69x19({message:_0xf629[43]}))[_0xf629[27]](function(_0x7c69x17){var _0x7c69xe=moment();var _0x7c69x10=moment(_0x7c69x17[_0xf629[19]]);return _0x7c69x17[_0xf629[24]]({exitAt:_0x7c69xe[_0xf629[21]](_0xf629[20]),duration:_0x7c69xe[_0xf629[23]](_0x7c69x10,_0xf629[22])},{individualHooks:true,transaction:_0x7c69xb[_0xf629[38]]})});case _0xf629[13]:;case _0xf629[14]:;case _0xf629[15]:var _0x7c69x18={};_0x7c69x18[util[_0xf629[21]](_0xf629[45],_0x7c69xb[_0xf629[37]][_0xf629[28]],_0xf629[46])]=false;return _0x7c69x13[_0xf629[24]](_0x7c69x18,{transaction:_0x7c69xb[_0xf629[38]]})[_0xf629[27]](function(_0x7c69x13){var _0x7c69xe=moment();return ReportMember[_0xf629[44]]({where:{channel:_0x7c69xb[_0xf629[37]][_0xf629[28]],membername:_0x7c69x13[_0xf629[33]],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),exitAt:null}})})[_0xf629[27]](_0x7c69x19({message:_0xf629[43]}))[_0xf629[27]](function(_0x7c69x17){var _0x7c69xe=moment();var _0x7c69x10=moment(_0x7c69x17[_0xf629[19]]);return _0x7c69x17[_0xf629[24]]({exitAt:_0x7c69xe[_0xf629[21]](_0xf629[20]),duration:_0x7c69xe[_0xf629[23]](_0x7c69x10,_0xf629[22])},{individualHooks:true,transaction:_0x7c69xb[_0xf629[38]]})});default:return Promise[_0xf629[42]](_0x7c69x8[_0xf629[41]])({action:_0xf629[40],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),paused:false,reason:_0x7c69xb[_0xf629[37]][_0xf629[36]]})[_0xf629[27]](function(){return _0x7c69x13[_0xf629[24]]({voicePause:false},{transaction:_0x7c69xb[_0xf629[38]]})})[_0xf629[27]](function(_0x7c69x13){var _0x7c69xe=moment();return ReportMember[_0xf629[44]]({where:{channel:_0x7c69xb[_0xf629[37]][_0xf629[28]],membername:_0x7c69x13[_0xf629[33]],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),exitAt:null}})})[_0xf629[27]](_0x7c69x19({message:_0xf629[43]}))[_0xf629[27]](function(_0x7c69x17){var _0x7c69xe=moment();var _0x7c69x10=moment(_0x7c69x17[_0xf629[19]]);return _0x7c69x17[_0xf629[24]]({exitAt:_0x7c69xe[_0xf629[21]](_0xf629[20]),duration:_0x7c69xe[_0xf629[23]](_0x7c69x10,_0xf629[22])},{individualHooks:true,transaction:_0x7c69xb[_0xf629[38]]})})[_0xf629[27]](function(){var _0x7c69x18={};_0x7c69x18[util[_0xf629[21]](_0xf629[45],_0x7c69xb[_0xf629[37]][_0xf629[28]],_0xf629[46])]=false;return _0x7c69x13[_0xf629[24]](_0x7c69x18,{transaction:_0x7c69xb[_0xf629[38]]})})[_0xf629[27]](function(_0x7c69x13){var _0x7c69xe=moment();return ReportMember[_0xf629[44]]({where:{channel:_0x7c69xb[_0xf629[37]][_0xf629[28]],membername:_0x7c69x13[_0xf629[33]],interface:util[_0xf629[21]](_0xf629[34],_0xf629[35],_0x7c69x13[_0xf629[33]]),exitAt:null}})})[_0xf629[27]](_0x7c69x19({message:_0xf629[43]}))[_0xf629[27]](function(_0x7c69x17){var _0x7c69xe=moment();var _0x7c69x10=moment(_0x7c69x17[_0xf629[19]]);return _0x7c69x17[_0xf629[24]]({exitAt:_0x7c69xe[_0xf629[21]](_0xf629[20]),duration:_0x7c69xe[_0xf629[23]](_0x7c69x10,_0xf629[22])},{individualHooks:true,transaction:_0x7c69xb[_0xf629[38]]})})}}}function _0x7c69x19(_0x7c69x1a){return function(_0x7c69x1b){if(!_0x7c69x1b){throw _0x7c69x1a};return _0x7c69x1b}}function _0x7c69x1c(_0x7c69x12,_0x7c69xb,_0x7c69x8){switch(_0x7c69x12[_0xf629[33]]){case _0xf629[50]:return Agent[_0xf629[49]](_0x7c69xb[_0xf629[37]][_0xf629[48]])[_0xf629[27]](_0x7c69x19({message:_0xf629[47]}))[_0xf629[27]](_0x7c69x11(_0x7c69xb,_0x7c69x12));case _0xf629[51]:return Agent[_0xf629[49]](_0x7c69xb[_0xf629[37]][_0xf629[48]])[_0xf629[27]](_0x7c69x19({message:_0xf629[47]}))[_0xf629[27]](_0x7c69x16(_0x7c69xb,_0x7c69x12));default:throw {message:_0xf629[52]}}}}