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 _0x7bd3=['remove','emit','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save'];(function(_0x54f129,_0x54c5a9){var _0x47e29=function(_0x2cad8c){while(--_0x2cad8c){_0x54f129['push'](_0x54f129['shift']());}};_0x47e29(++_0x54c5a9);}(_0x7bd3,0xeb));var _0x37bd=function(_0xf5c90,_0x53c6c5){_0xf5c90=_0xf5c90-0x0;var _0x4da97a=_0x7bd3[_0xf5c90];return _0x4da97a;};'use strict';var EventEmitter=require(_0x37bd('0x0'));var UserVoiceQueueRt=require(_0x37bd('0x1'))['db'][_0x37bd('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x37bd('0x3')](0x0);var events={'afterCreate':_0x37bd('0x4'),'afterUpdate':'update','afterDestroy':_0x37bd('0x5')};function emitEvent(_0x293e0d){return function(_0x1f9b61,_0x213a21,_0x597ae7){UserVoiceQueueRtEvents[_0x37bd('0x6')](_0x293e0d+':'+_0x1f9b61['id'],_0x1f9b61);UserVoiceQueueRtEvents[_0x37bd('0x6')](_0x293e0d,_0x1f9b61);_0x597ae7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0x37bd('0x7')]=UserVoiceQueueRtEvents;