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 _0x43c0=['events','../../mysqldb','OpenchannelQueue','save','remove','emit','hasOwnProperty','hook','exports'];(function(_0x21bb01,_0x4988f2){var _0x4a8035=function(_0x1a91f9){while(--_0x1a91f9){_0x21bb01['push'](_0x21bb01['shift']());}};_0x4a8035(++_0x4988f2);}(_0x43c0,0x183));var _0x043c=function(_0x3d6f50,_0x4ca1e7){_0x3d6f50=_0x3d6f50-0x0;var _0x1912d4=_0x43c0[_0x3d6f50];return _0x1912d4;};'use strict';var EventEmitter=require(_0x043c('0x0'));var OpenchannelQueue=require(_0x043c('0x1'))['db'][_0x043c('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x043c('0x3'),'afterUpdate':'update','afterDestroy':_0x043c('0x4')};function emitEvent(_0x331341){return function(_0x51f781,_0x3ad596,_0xdb15b6){OpenchannelQueueEvents[_0x043c('0x5')](_0x331341+':'+_0x51f781['id'],_0x51f781);OpenchannelQueueEvents[_0x043c('0x5')](_0x331341,_0x51f781);_0xdb15b6(null);};}for(var e in events){if(events[_0x043c('0x6')](e)){var event=events[e];OpenchannelQueue[_0x043c('0x7')](e,emitEvent(event));}}module[_0x043c('0x8')]=OpenchannelQueueEvents;