Built motion from commit 137ed438a.|1.0.25
[motion.git] / server / api / voice_queue / voice_queue.socket.js
1 var _0xafcb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x6D\x69\x74","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x73\x20\x61\x66\x74\x65\x72\x20\x71\x75\x65\x75\x65\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x74\x68\x65\x6E","\x72\x65\x73\x6F\x6C\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x6C\x65\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x6F\x77\x73","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xafcb[0];var VoiceQueueEvents=require(_0xafcb[1]);var VoiceQueue=require(_0xafcb[3])[_0xafcb[2]];var User=require(_0xafcb[3])[_0xafcb[4]];var Util=require(_0xafcb[5]);var _=require(_0xafcb[6]);var Promise=require(_0xafcb[7]);var events=[_0xafcb[8],_0xafcb[9]];exports[_0xafcb[10]]= function(_0xbf56x8){for(var _0xbf56x9=0,_0xbf56xa=events[_0xafcb[11]];_0xbf56x9< _0xbf56xa;_0xbf56x9++){var _0xbf56xb=events[_0xbf56x9];var _0xbf56xc=createListener(_0xafcb[12]+ _0xbf56xb,_0xbf56x8);VoiceQueueEvents[_0xafcb[13]](_0xbf56xb,_0xbf56xc);_0xbf56x8[_0xafcb[13]](_0xafcb[14],removeListener(_0xbf56xb,_0xbf56xc))}};function createListener(_0xbf56xb,_0xbf56x8){return function(_0xbf56xe){switch(_0xbf56xb){case _0xafcb[20]:if(_0xbf56x8[_0xafcb[15]]=== _0xafcb[16]){_0xbf56x8[_0xafcb[18]](_0xbf56xe[_0xafcb[17]]);_0xbf56x8[_0xafcb[19]](_0xbf56xb,_0xbf56xe)};break;case _0xafcb[27]:return Promise[_0xafcb[26]]()[_0xafcb[25]](getVoiceQueues(_0xbf56x8))[_0xafcb[25]](function(_0xbf56x10){if(_[_0xafcb[24]](_0xbf56x10,_0xbf56xe[_0xafcb[17]])){_0xbf56x8[_0xafcb[19]](_0xbf56xb,_0xbf56xe)}})[_0xafcb[23]](function(_0xbf56xf){console[_0xafcb[22]](_0xafcb[21],_0xbf56xf)});break;case _0xafcb[29]:_0xbf56x8[_0xafcb[28]](_0xbf56xe[_0xafcb[17]]);_0xbf56x8[_0xafcb[19]](_0xbf56xb,_0xbf56xe);break;default:}}}function removeListener(_0xbf56xb,_0xbf56xc){return function(){VoiceQueueEvents[_0xafcb[30]](_0xbf56xb,_0xbf56xc)}}function getVoiceQueues(_0xbf56x13){return function(){switch(_0xbf56x13[_0xafcb[15]]){case _0xafcb[37]:return User[_0xafcb[36]](_0xbf56x13[_0xafcb[34]],{attributes:[_0xafcb[35]]})[_0xafcb[25]](Util[_0xafcb[33]]())[_0xafcb[25]](function(_0xbf56x10){return _[_0xafcb[32]](_0xbf56x10[_0xafcb[31]],_0xafcb[17])});case _0xafcb[16]:return VoiceQueue[_0xafcb[38]]()[_0xafcb[25]](function(_0xbf56x14){return {rows:_0xbf56x14}})[_0xafcb[25]](function(_0xbf56x10){return _[_0xafcb[32]](_0xbf56x10[_0xafcb[31]],_0xafcb[17])});default:return []}}}