1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x94aa=['save','emit','hasOwnProperty','events','../../mysqldb','setMaxListeners'];(function(_0x3d2ef4,_0x463cb8){var _0x39286b=function(_0x27b57a){while(--_0x27b57a){_0x3d2ef4['push'](_0x3d2ef4['shift']());}};_0x39286b(++_0x463cb8);}(_0x94aa,0xc3));var _0xa94a=function(_0xceaba7,_0x2a7ebd){_0xceaba7=_0xceaba7-0x0;var _0x3686a3=_0x94aa[_0xceaba7];return _0x3686a3;};'use strict';var EventEmitter=require(_0xa94a('0x0'));var VoiceQueueReport=require(_0xa94a('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xa94a('0x2')](0x0);var events={'afterCreate':_0xa94a('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x596800){return function(_0x3bafab,_0x1244f2,_0x37fea1){VoiceQueueReportEvents[_0xa94a('0x4')](_0x596800+':'+_0x3bafab['id'],_0x3bafab);VoiceQueueReportEvents[_0xa94a('0x4')](_0x596800,_0x3bafab);_0x37fea1(null);};}for(var e in events){if(events[_0xa94a('0x5')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;