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 _0x5acd=['DashboardItem','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x225fd2,_0x2f74bb){var _0x4748c5=function(_0x466dc3){while(--_0x466dc3){_0x225fd2['push'](_0x225fd2['shift']());}};_0x4748c5(++_0x2f74bb);}(_0x5acd,0x149));var _0xd5ac=function(_0x4886b1,_0x128dad){_0x4886b1=_0x4886b1-0x0;var _0x19fcc9=_0x5acd[_0x4886b1];return _0x19fcc9;};'use strict';var EventEmitter=require(_0xd5ac('0x0'));var DashboardItem=require('../../mysqldb')['db'][_0xd5ac('0x1')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0xd5ac('0x2')](0x0);var events={'afterCreate':_0xd5ac('0x3'),'afterUpdate':_0xd5ac('0x4'),'afterDestroy':_0xd5ac('0x5')};function emitEvent(_0x493af9){return function(_0x4328e6,_0x4a0b15,_0xd71dd4){DashboardItemEvents['emit'](_0x493af9+':'+_0x4328e6['id'],_0x4328e6);DashboardItemEvents[_0xd5ac('0x6')](_0x493af9,_0x4328e6);_0xd71dd4(null);};}for(var e in events){if(events[_0xd5ac('0x7')](e)){var event=events[e];DashboardItem[_0xd5ac('0x8')](e,emitEvent(event));}}module[_0xd5ac('0x9')]=DashboardItemEvents;