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 _0xc8f8=['../../mysqldb','FaxQueue','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x5ee693,_0x33d9c4){var _0x558bc9=function(_0x441833){while(--_0x441833){_0x5ee693['push'](_0x5ee693['shift']());}};_0x558bc9(++_0x33d9c4);}(_0xc8f8,0x1ef));var _0x8c8f=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xc8f8[_0x4565bf];return _0x5610ba;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0x8c8f('0x0'))['db'][_0x8c8f('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x8c8f('0x2'),'afterUpdate':_0x8c8f('0x3'),'afterDestroy':_0x8c8f('0x4')};function emitEvent(_0x54da98){return function(_0x48e8bb,_0x1fa490,_0x99978){FaxQueueEvents[_0x8c8f('0x5')](_0x54da98+':'+_0x48e8bb['id'],_0x48e8bb);FaxQueueEvents['emit'](_0x54da98,_0x48e8bb);_0x99978(null);};}for(var e in events){if(events[_0x8c8f('0x6')](e)){var event=events[e];FaxQueue[_0x8c8f('0x7')](e,emitEvent(event));}}module[_0x8c8f('0x8')]=FaxQueueEvents;