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 _0x628f=['../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x628f,0x1dc));var _0xf628=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x628f[_0x465028];return _0xb783d4;};'use strict';var EventEmitter=require(_0xf628('0x0'));var VoiceQueue=require(_0xf628('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xf628('0x2')](0x0);var events={'afterCreate':_0xf628('0x3'),'afterUpdate':_0xf628('0x4'),'afterDestroy':_0xf628('0x5')};function emitEvent(_0x5a44fa){return function(_0x379596,_0x24a228,_0x280229){VoiceQueueEvents['emit'](_0x5a44fa+':'+_0x379596['id'],_0x379596);VoiceQueueEvents[_0xf628('0x6')](_0x5a44fa,_0x379596);_0x280229(null);};}for(var e in events){if(events[_0xf628('0x7')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xf628('0x8')]=VoiceQueueEvents;