8e3ea9a43ea1adcfc1fe4f4635763dc1b9ea56b5
[motion.git] / server / api / chat_queue / chat_queue.socket.js
1 var _0xba66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\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","\x63\x68\x61\x74\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","\x63\x68\x61\x74\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","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x6C\x65\x61\x76\x65","\x63\x68\x61\x74\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\x43\x68\x61\x74\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"];_0xba66[0];var ChatQueueEvents=require(_0xba66[1]);var ChatQueue=require(_0xba66[3])[_0xba66[2]];var User=require(_0xba66[3])[_0xba66[4]];var Util=require(_0xba66[5]);var _=require(_0xba66[6]);var Promise=require(_0xba66[7]);var events=[_0xba66[8],_0xba66[9]];exports[_0xba66[10]]= function(_0x881bx8){for(var _0x881bx9=0,_0x881bxa=events[_0xba66[11]];_0x881bx9< _0x881bxa;_0x881bx9++){var _0x881bxb=events[_0x881bx9];var _0x881bxc=createListener(_0xba66[12]+ _0x881bxb,_0x881bx8);ChatQueueEvents[_0xba66[13]](_0x881bxb,_0x881bxc);_0x881bx8[_0xba66[13]](_0xba66[14],removeListener(_0x881bxb,_0x881bxc))}};function createListener(_0x881bxb,_0x881bx8){return function(_0x881bxe){switch(_0x881bxb){case _0xba66[20]:if(_0x881bx8[_0xba66[15]]=== _0xba66[16]){_0x881bx8[_0xba66[18]](_0x881bxe[_0xba66[17]]);_0x881bx8[_0xba66[19]](_0x881bxb,_0x881bxe)};break;case _0xba66[27]:return Promise[_0xba66[26]]()[_0xba66[25]](getChatQueues(_0x881bx8))[_0xba66[25]](function(_0x881bx10){if(_[_0xba66[24]](_0x881bx10,_0x881bxe[_0xba66[17]])){_0x881bx8[_0xba66[19]](_0x881bxb,_0x881bxe)}})[_0xba66[23]](function(_0x881bxf){console[_0xba66[22]](_0xba66[21],_0x881bxf)});break;case _0xba66[29]:_0x881bx8[_0xba66[28]](_0x881bxe[_0xba66[17]]);_0x881bx8[_0xba66[19]](_0x881bxb,_0x881bxe);break;default:}}}function removeListener(_0x881bxb,_0x881bxc){return function(){ChatQueueEvents[_0xba66[30]](_0x881bxb,_0x881bxc)}}function getChatQueues(_0x881bx13){return function(){switch(_0x881bx13[_0xba66[15]]){case _0xba66[37]:return User[_0xba66[36]](_0x881bx13[_0xba66[34]],{attributes:[_0xba66[35]]})[_0xba66[25]](Util[_0xba66[33]]())[_0xba66[25]](function(_0x881bx10){return _[_0xba66[32]](_0x881bx10[_0xba66[31]],_0xba66[17])});case _0xba66[16]:return ChatQueue[_0xba66[38]]()[_0xba66[25]](function(_0x881bx14){return {rows:_0x881bx14}})[_0xba66[25]](function(_0x881bx10){return _[_0xba66[32]](_0x881bx10[_0xba66[31]],_0xba66[17])});default:return []}}}