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 _0x2dea=['remove','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x10d44a,_0x4a421a){var _0x199e2b=function(_0x411637){while(--_0x411637){_0x10d44a['push'](_0x10d44a['shift']());}};_0x199e2b(++_0x4a421a);}(_0x2dea,0x1b3));var _0xa2de=function(_0x1b0452,_0x3c69a5){_0x1b0452=_0x1b0452-0x0;var _0x140bb1=_0x2dea[_0x1b0452];return _0x140bb1;};'use strict';var EventEmitter=require(_0xa2de('0x0'));var VoiceQueue=require(_0xa2de('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xa2de('0x2')](0x0);var events={'afterCreate':_0xa2de('0x3'),'afterUpdate':_0xa2de('0x4'),'afterDestroy':_0xa2de('0x5')};function emitEvent(_0x2caffe){return function(_0x2617fa,_0xfd2849,_0x5ad14a){VoiceQueueEvents['emit'](_0x2caffe+':'+_0x2617fa['id'],_0x2617fa);VoiceQueueEvents['emit'](_0x2caffe,_0x2617fa);_0x5ad14a(null);};}for(var e in events){if(events[_0xa2de('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xa2de('0x7')]=VoiceQueueEvents;