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 _0x7025=['hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove','emit'];(function(_0x55a89e,_0x1a05ab){var _0x3aa2bd=function(_0x4b9d09){while(--_0x4b9d09){_0x55a89e['push'](_0x55a89e['shift']());}};_0x3aa2bd(++_0x1a05ab);}(_0x7025,0xdf));var _0x5702=function(_0x493d68,_0x31fcd5){_0x493d68=_0x493d68-0x0;var _0x5e2151=_0x7025[_0x493d68];return _0x5e2151;};'use strict';var EventEmitter=require(_0x5702('0x0'));var UserVoiceQueueRt=require(_0x5702('0x1'))['db'][_0x5702('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x5702('0x3')](0x0);var events={'afterCreate':_0x5702('0x4'),'afterUpdate':_0x5702('0x5'),'afterDestroy':_0x5702('0x6')};function emitEvent(_0x7f5952){return function(_0x3d3902,_0x3febf5,_0x583946){UserVoiceQueueRtEvents[_0x5702('0x7')](_0x7f5952+':'+_0x3d3902['id'],_0x3d3902);UserVoiceQueueRtEvents['emit'](_0x7f5952,_0x3d3902);_0x583946(null);};}for(var e in events){if(events[_0x5702('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x5702('0x9')](e,emitEvent(event));}}module[_0x5702('0xa')]=UserVoiceQueueRtEvents;