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 _0x7dae=['hook','exports','../../mysqldb','save','update','emit','hasOwnProperty'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x7dae,0x159));var _0xe7da=function(_0x3646b5,_0x2b7475){_0x3646b5=_0x3646b5-0x0;var _0xcc7b94=_0x7dae[_0x3646b5];return _0xcc7b94;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0xe7da('0x0'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe7da('0x1'),'afterUpdate':_0xe7da('0x2'),'afterDestroy':'remove'};function emitEvent(_0x392550){return function(_0x21c209,_0x595ea1,_0x5e4772){VoiceQueueEvents[_0xe7da('0x3')](_0x392550+':'+_0x21c209['id'],_0x21c209);VoiceQueueEvents[_0xe7da('0x3')](_0x392550,_0x21c209);_0x5e4772(null);};}for(var e in events){if(events[_0xe7da('0x4')](e)){var event=events[e];VoiceQueue[_0xe7da('0x5')](e,emitEvent(event));}}module[_0xe7da('0x6')]=VoiceQueueEvents;