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 _0x06eb=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','CmList','setMaxListeners','save','update','remove'];(function(_0x2c7259,_0x34903f){var _0x11754c=function(_0x382622){while(--_0x382622){_0x2c7259['push'](_0x2c7259['shift']());}};_0x11754c(++_0x34903f);}(_0x06eb,0x67));var _0xb06e=function(_0x11941a,_0x36e1ac){_0x11941a=_0x11941a-0x0;var _0xae78af=_0x06eb[_0x11941a];return _0xae78af;};'use strict';var EventEmitter=require(_0xb06e('0x0'));var CmList=require(_0xb06e('0x1'))['db'][_0xb06e('0x2')];var CmListEvents=new EventEmitter();CmListEvents[_0xb06e('0x3')](0x0);var events={'afterCreate':_0xb06e('0x4'),'afterUpdate':_0xb06e('0x5'),'afterDestroy':_0xb06e('0x6')};function emitEvent(_0x5fb3b2){return function(_0x42cef4,_0x24cfad,_0x1aa774){CmListEvents[_0xb06e('0x7')](_0x5fb3b2+':'+_0x42cef4['id'],_0x42cef4);CmListEvents[_0xb06e('0x7')](_0x5fb3b2,_0x42cef4);_0x1aa774(null);};}for(var e in events){if(events[_0xb06e('0x8')](e)){var event=events[e];CmList[_0xb06e('0x9')](e,emitEvent(event));}}module[_0xb06e('0xa')]=CmListEvents;