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 _0x9945=['setMaxListeners','save','update','remove','emit','hasOwnProperty','exports','VoiceQueue'];(function(_0x17a020,_0x1b7d52){var _0x41c51c=function(_0x1a2078){while(--_0x1a2078){_0x17a020['push'](_0x17a020['shift']());}};_0x41c51c(++_0x1b7d52);}(_0x9945,0x1ef));var _0x5994=function(_0x185dcf,_0x527ac1){_0x185dcf=_0x185dcf-0x0;var _0x5201bc=_0x9945[_0x185dcf];return _0x5201bc;};'use strict';var EventEmitter=require('events');var VoiceQueue=require('../../mysqldb')['db'][_0x5994('0x0')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x5994('0x1')](0x0);var events={'afterCreate':_0x5994('0x2'),'afterUpdate':_0x5994('0x3'),'afterDestroy':_0x5994('0x4')};function emitEvent(_0x29a203){return function(_0x336e35,_0x451c0e,_0x41db6c){VoiceQueueEvents[_0x5994('0x5')](_0x29a203+':'+_0x336e35['id'],_0x336e35);VoiceQueueEvents[_0x5994('0x5')](_0x29a203,_0x336e35);_0x41db6c(null);};}for(var e in events){if(events[_0x5994('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x5994('0x7')]=VoiceQueueEvents;