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 _0x5239=['hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x3a9cfd,_0x4755a8){var _0x3248cc=function(_0x959046){while(--_0x959046){_0x3a9cfd['push'](_0x3a9cfd['shift']());}};_0x3248cc(++_0x4755a8);}(_0x5239,0x91));var _0x9523=function(_0x486a8f,_0x86825a){_0x486a8f=_0x486a8f-0x0;var _0x5640fe=_0x5239[_0x486a8f];return _0x5640fe;};'use strict';var EventEmitter=require(_0x9523('0x0'));var UserVoiceQueueRt=require(_0x9523('0x1'))['db'][_0x9523('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x9523('0x3')](0x0);var events={'afterCreate':_0x9523('0x4'),'afterUpdate':_0x9523('0x5'),'afterDestroy':_0x9523('0x6')};function emitEvent(_0x344f2b){return function(_0x3f0540,_0x3157fc,_0x5037f7){UserVoiceQueueRtEvents[_0x9523('0x7')](_0x344f2b+':'+_0x3f0540['id'],_0x3f0540);UserVoiceQueueRtEvents['emit'](_0x344f2b,_0x3f0540);_0x5037f7(null);};}for(var e in events){if(events[_0x9523('0x8')](e)){var event=events[e];UserVoiceQueueRt[_0x9523('0x9')](e,emitEvent(event));}}module[_0x9523('0xa')]=UserVoiceQueueRtEvents;