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 _0x1f93=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','DashboardItem','setMaxListeners','save','update'];(function(_0x2d8fc2,_0x1c461d){var _0x3a9e53=function(_0x18941c){while(--_0x18941c){_0x2d8fc2['push'](_0x2d8fc2['shift']());}};_0x3a9e53(++_0x1c461d);}(_0x1f93,0x118));var _0x31f9=function(_0x3c9710,_0xd2950d){_0x3c9710=_0x3c9710-0x0;var _0x232644=_0x1f93[_0x3c9710];return _0x232644;};'use strict';var EventEmitter=require(_0x31f9('0x0'));var DashboardItem=require(_0x31f9('0x1'))['db'][_0x31f9('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x31f9('0x3')](0x0);var events={'afterCreate':_0x31f9('0x4'),'afterUpdate':_0x31f9('0x5'),'afterDestroy':_0x31f9('0x6')};function emitEvent(_0x96b325){return function(_0x11be65,_0x4c44b7,_0x2f98e8){DashboardItemEvents[_0x31f9('0x7')](_0x96b325+':'+_0x11be65['id'],_0x11be65);DashboardItemEvents['emit'](_0x96b325,_0x11be65);_0x2f98e8(null);};}for(var e in events){if(events[_0x31f9('0x8')](e)){var event=events[e];DashboardItem[_0x31f9('0x9')](e,emitEvent(event));}}module[_0x31f9('0xa')]=DashboardItemEvents;