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 _0x5c7e=['update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','Dashboard','setMaxListeners'];(function(_0x19080a,_0x80055f){var _0x21331f=function(_0x5a3969){while(--_0x5a3969){_0x19080a['push'](_0x19080a['shift']());}};_0x21331f(++_0x80055f);}(_0x5c7e,0x1e2));var _0xe5c7=function(_0x527824,_0xc824a9){_0x527824=_0x527824-0x0;var _0xc8b8ed=_0x5c7e[_0x527824];return _0xc8b8ed;};'use strict';var EventEmitter=require(_0xe5c7('0x0'));var Dashboard=require(_0xe5c7('0x1'))['db'][_0xe5c7('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xe5c7('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xe5c7('0x4'),'afterDestroy':_0xe5c7('0x5')};function emitEvent(_0x314c53){return function(_0x4e43d7,_0x343f8f,_0x3d54a2){DashboardEvents[_0xe5c7('0x6')](_0x314c53+':'+_0x4e43d7['id'],_0x4e43d7);DashboardEvents[_0xe5c7('0x6')](_0x314c53,_0x4e43d7);_0x3d54a2(null);};}for(var e in events){if(events[_0xe5c7('0x7')](e)){var event=events[e];Dashboard['hook'](e,emitEvent(event));}}module[_0xe5c7('0x8')]=DashboardEvents;