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 _0x16cc=['hook','exports','events','VoiceQueue','setMaxListeners','emit','hasOwnProperty'];(function(_0x465f16,_0x597f21){var _0x1264cd=function(_0x1bcab0){while(--_0x1bcab0){_0x465f16['push'](_0x465f16['shift']());}};_0x1264cd(++_0x597f21);}(_0x16cc,0x11a));var _0xc16c=function(_0x40da9a,_0x544791){_0x40da9a=_0x40da9a-0x0;var _0x1ba98c=_0x16cc[_0x40da9a];return _0x1ba98c;};'use strict';var EventEmitter=require(_0xc16c('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0xc16c('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xc16c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1ffdbb){return function(_0x298b4f,_0x1f336f,_0x1fa534){VoiceQueueEvents[_0xc16c('0x3')](_0x1ffdbb+':'+_0x298b4f['id'],_0x298b4f);VoiceQueueEvents[_0xc16c('0x3')](_0x1ffdbb,_0x298b4f);_0x1fa534(null);};}for(var e in events){if(events[_0xc16c('0x4')](e)){var event=events[e];VoiceQueue[_0xc16c('0x5')](e,emitEvent(event));}}module[_0xc16c('0x6')]=VoiceQueueEvents;