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 _0xc4b6=['ChatWebsite','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x1f356c,_0x313364){var _0x2674dc=function(_0x427c11){while(--_0x427c11){_0x1f356c['push'](_0x1f356c['shift']());}};_0x2674dc(++_0x313364);}(_0xc4b6,0x1b8));var _0x6c4b=function(_0x5d80e5,_0x5b7945){_0x5d80e5=_0x5d80e5-0x0;var _0x5b63fb=_0xc4b6[_0x5d80e5];return _0x5b63fb;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0x6c4b('0x0'))['db'][_0x6c4b('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x6c4b('0x2')](0x0);var events={'afterCreate':_0x6c4b('0x3'),'afterUpdate':'update','afterDestroy':_0x6c4b('0x4')};function emitEvent(_0x37c023){return function(_0x15afd6,_0x4fe12d,_0x5cfc4e){ChatWebsiteEvents[_0x6c4b('0x5')](_0x37c023+':'+_0x15afd6['id'],_0x15afd6);ChatWebsiteEvents[_0x6c4b('0x5')](_0x37c023,_0x15afd6);_0x5cfc4e(null);};}for(var e in events){if(events[_0x6c4b('0x6')](e)){var event=events[e];ChatWebsite[_0x6c4b('0x7')](e,emitEvent(event));}}module[_0x6c4b('0x8')]=ChatWebsiteEvents;