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 _0x86ae=['update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x27780c,_0x3f40bf){var _0x230595=function(_0x8e9fc2){while(--_0x8e9fc2){_0x27780c['push'](_0x27780c['shift']());}};_0x230595(++_0x3f40bf);}(_0x86ae,0x140));var _0xe86a=function(_0x4411ce,_0x15d690){_0x4411ce=_0x4411ce-0x0;var _0x1d8e34=_0x86ae[_0x4411ce];return _0x1d8e34;};'use strict';var EventEmitter=require(_0xe86a('0x0'));var FaxQueue=require(_0xe86a('0x1'))['db'][_0xe86a('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xe86a('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xe86a('0x4'),'afterDestroy':'remove'};function emitEvent(_0x45490f){return function(_0x324fd4,_0x19bd2b,_0x57ca35){FaxQueueEvents[_0xe86a('0x5')](_0x45490f+':'+_0x324fd4['id'],_0x324fd4);FaxQueueEvents[_0xe86a('0x5')](_0x45490f,_0x324fd4);_0x57ca35(null);};}for(var e in events){if(events[_0xe86a('0x6')](e)){var event=events[e];FaxQueue[_0xe86a('0x7')](e,emitEvent(event));}}module[_0xe86a('0x8')]=FaxQueueEvents;