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 _0xf443=['exports','events','../../mysqldb','save','update','remove','hasOwnProperty'];(function(_0x551165,_0x537209){var _0x33de9b=function(_0x1cfc66){while(--_0x1cfc66){_0x551165['push'](_0x551165['shift']());}};_0x33de9b(++_0x537209);}(_0xf443,0xda));var _0x3f44=function(_0x287299,_0x2882ce){_0x287299=_0x287299-0x0;var _0x1019ea=_0xf443[_0x287299];return _0x1019ea;};'use strict';var EventEmitter=require(_0x3f44('0x0'));var Dashboard=require(_0x3f44('0x1'))['db']['Dashboard'];var DashboardEvents=new EventEmitter();DashboardEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3f44('0x2'),'afterUpdate':_0x3f44('0x3'),'afterDestroy':_0x3f44('0x4')};function emitEvent(_0x26e3f5){return function(_0x15d41e,_0x3b7204,_0x5c91fc){DashboardEvents['emit'](_0x26e3f5+':'+_0x15d41e['id'],_0x15d41e);DashboardEvents['emit'](_0x26e3f5,_0x15d41e);_0x5c91fc(null);};}for(var e in events){if(events[_0x3f44('0x5')](e)){var event=events[e];Dashboard['hook'](e,emitEvent(event));}}module[_0x3f44('0x6')]=DashboardEvents;