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 _0xf907=['../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0xd3be60,_0x214bdb){var _0x5204cb=function(_0xf524c0){while(--_0xf524c0){_0xd3be60['push'](_0xd3be60['shift']());}};_0x5204cb(++_0x214bdb);}(_0xf907,0x1cb));var _0x7f90=function(_0x35e31e,_0x2a70a7){_0x35e31e=_0x35e31e-0x0;var _0x281b37=_0xf907[_0x35e31e];return _0x281b37;};'use strict';var EventEmitter=require(_0x7f90('0x0'));var UserVoiceQueueRt=require(_0x7f90('0x1'))['db'][_0x7f90('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x7f90('0x3')](0x0);var events={'afterCreate':_0x7f90('0x4'),'afterUpdate':'update','afterDestroy':_0x7f90('0x5')};function emitEvent(_0x914cc0){return function(_0x407f89,_0x50a85e,_0x273aa6){UserVoiceQueueRtEvents[_0x7f90('0x6')](_0x914cc0+':'+_0x407f89['id'],_0x407f89);UserVoiceQueueRtEvents[_0x7f90('0x6')](_0x914cc0,_0x407f89);_0x273aa6(null);};}for(var e in events){if(events[_0x7f90('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0x7f90('0x8')](e,emitEvent(event));}}module[_0x7f90('0x9')]=UserVoiceQueueRtEvents;