Built motion from commit 88d8eb5.|1.0.14
[motion.git] / server / api / metric / metric.socket.js
1 var _0x18b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x65\x74\x72\x69\x63\x2E\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x74\x72\x69\x63\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x6D\x65\x74\x72\x69\x63\x3A\x73\x61\x76\x65","\x6D\x65\x74\x72\x69\x63\x3A\x75\x70\x64\x61\x74\x65","\x6D\x65\x74\x72\x69\x63\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6D\x65\x74\x72\x69\x63","\x69\x64","\x75\x70\x64\x61\x74\x65"];_0x18b0[0];const MetricEvents=require(_0x18b0[1]);const ReportField=require(_0x18b0[3])[_0x18b0[2]];var events=[_0x18b0[4],_0x18b0[5]];exports[_0x18b0[6]]= function(_0x60bdx4){for(var _0x60bdx5=0,_0x60bdx6=events[_0x18b0[7]];_0x60bdx5< _0x60bdx6;_0x60bdx5++){var _0x60bdx7=events[_0x60bdx5];var _0x60bdx8=createListener(_0x18b0[8]+ _0x60bdx7,_0x60bdx4);MetricEvents[_0x18b0[9]](_0x60bdx7,_0x60bdx8);_0x60bdx4[_0x18b0[9]](_0x18b0[10],removeListener(_0x60bdx7,_0x60bdx8))}};function createListener(_0x60bdx7,_0x60bdx4){return function(_0x60bdxa){switch(_0x60bdx7){case _0x18b0[12]:_0x60bdx4[_0x18b0[11]](_0x60bdx7,_0x60bdxa);break;case _0x18b0[13]:updateFields(_0x60bdxa);break;case _0x18b0[14]:_0x60bdx4[_0x18b0[11]](_0x60bdx7,_0x60bdxa);break;default:}}}function removeListener(_0x60bdx7,_0x60bdx8){return function(){MetricEvents[_0x18b0[15]](_0x60bdx7,_0x60bdx8)}}function updateFields(_0x60bdxa){return ReportField[_0x18b0[20]]({field:_0x60bdxa[_0x18b0[18]]},{where:{MetricId:_0x60bdxa[_0x18b0[19]]}})[_0x18b0[17]](function(_0x60bdxd){console[_0x18b0[16]](_0x60bdxd)})}