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 _0x2b44=['exports','../../mysqldb','VoiceQueue','update','remove','emit','hasOwnProperty','hook'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x2b44,0x111));var _0x42b4=function(_0x1c81c3,_0x47769b){_0x1c81c3=_0x1c81c3-0x0;var _0x16c6c8=_0x2b44[_0x1c81c3];return _0x16c6c8;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x42b4('0x0'))['db'][_0x42b4('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x42b4('0x2'),'afterDestroy':_0x42b4('0x3')};function emitEvent(_0x2f99e4){return function(_0x27934f,_0x256c26,_0x2f3157){VoiceQueueEvents[_0x42b4('0x4')](_0x2f99e4+':'+_0x27934f['id'],_0x27934f);VoiceQueueEvents['emit'](_0x2f99e4,_0x27934f);_0x2f3157(null);};}for(var e in events){if(events[_0x42b4('0x5')](e)){var event=events[e];VoiceQueue[_0x42b4('0x6')](e,emitEvent(event));}}module[_0x42b4('0x7')]=VoiceQueueEvents;