aa57dcc758a53ac2597895b84f103f0bc78fade0
[motion.git] / server / api / metric / metric.events.js
1 var _0x5029=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5029[0];const EventEmitter=require(_0x5029[1]);const Metric=require(_0x5029[3])[_0x5029[2]];var MetricEvents= new EventEmitter();MetricEvents[_0x5029[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5029[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5029[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5029[7]};for(var e in events){var event=events[e];Metric[_0x5029[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x6a52x8,_0x6a52x9,_0x6a52xa){MetricEvents[_0x5029[11]](event+ _0x5029[9]+ _0x6a52x8[_0x5029[10]],_0x6a52x8);MetricEvents[_0x5029[11]](event,_0x6a52x8);_0x6a52xa(null)}}module[_0x5029[12]]= MetricEvents