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 _0x6784=['hasOwnProperty','exports','events','../../mysqldb','VoiceQueue','remove'];(function(_0x1df890,_0x5d54e4){var _0xf26a12=function(_0x1e1e0c){while(--_0x1e1e0c){_0x1df890['push'](_0x1df890['shift']());}};_0xf26a12(++_0x5d54e4);}(_0x6784,0x116));var _0x4678=function(_0x50a0c2,_0x4befab){_0x50a0c2=_0x50a0c2-0x0;var _0x5ebadd=_0x6784[_0x50a0c2];return _0x5ebadd;};'use strict';var EventEmitter=require(_0x4678('0x0'));var VoiceQueue=require(_0x4678('0x1'))['db'][_0x4678('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x4678('0x3')};function emitEvent(_0x270e33){return function(_0x320e0a,_0xfa0ff3,_0x44df88){VoiceQueueEvents['emit'](_0x270e33+':'+_0x320e0a['id'],_0x320e0a);VoiceQueueEvents['emit'](_0x270e33,_0x320e0a);_0x44df88(null);};}for(var e in events){if(events[_0x4678('0x4')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x4678('0x5')]=VoiceQueueEvents;