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 _0x5fb2=['hook','events','../../mysqldb','VoiceQueue','setMaxListeners','save','update','remove'];(function(_0x15085f,_0x28fdca){var _0x5bcc27=function(_0x1064cc){while(--_0x1064cc){_0x15085f['push'](_0x15085f['shift']());}};_0x5bcc27(++_0x28fdca);}(_0x5fb2,0x129));var _0x25fb=function(_0x2a24de,_0x21fcbc){_0x2a24de=_0x2a24de-0x0;var _0x32b38e=_0x5fb2[_0x2a24de];return _0x32b38e;};'use strict';var EventEmitter=require(_0x25fb('0x0'));var VoiceQueue=require(_0x25fb('0x1'))['db'][_0x25fb('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x25fb('0x3')](0x0);var events={'afterCreate':_0x25fb('0x4'),'afterUpdate':_0x25fb('0x5'),'afterDestroy':_0x25fb('0x6')};function emitEvent(_0x3ff7c8){return function(_0x16ec0d,_0x2753b8,_0x5c704a){VoiceQueueEvents['emit'](_0x3ff7c8+':'+_0x16ec0d['id'],_0x16ec0d);VoiceQueueEvents['emit'](_0x3ff7c8,_0x16ec0d);_0x5c704a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x25fb('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;