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 _0x4664=['VoiceQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0x4664,0x1e9));var _0x4466=function(_0x13f2ec,_0x407206){_0x13f2ec=_0x13f2ec-0x0;var _0x389ca9=_0x4664[_0x13f2ec];return _0x389ca9;};'use strict';var EventEmitter=require(_0x4466('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0x4466('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x4466('0x2')](0x0);var events={'afterCreate':_0x4466('0x3'),'afterUpdate':_0x4466('0x4'),'afterDestroy':_0x4466('0x5')};function emitEvent(_0x14ce47){return function(_0x10c4ab,_0x2c5211,_0x4fa127){VoiceQueueEvents[_0x4466('0x6')](_0x14ce47+':'+_0x10c4ab['id'],_0x10c4ab);VoiceQueueEvents[_0x4466('0x6')](_0x14ce47,_0x10c4ab);_0x4fa127(null);};}for(var e in events){if(events[_0x4466('0x7')](e)){var event=events[e];VoiceQueue[_0x4466('0x8')](e,emitEvent(event));}}module[_0x4466('0x9')]=VoiceQueueEvents;