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 _0x62f5=['remove','emit','hasOwnProperty','hook','exports','../../mysqldb','OpenchannelAccount','save'];(function(_0x133f40,_0x349875){var _0xa62bb5=function(_0x543273){while(--_0x543273){_0x133f40['push'](_0x133f40['shift']());}};_0xa62bb5(++_0x349875);}(_0x62f5,0xa5));var _0x562f=function(_0x43f2b0,_0x45331c){_0x43f2b0=_0x43f2b0-0x0;var _0x3bd246=_0x62f5[_0x43f2b0];return _0x3bd246;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0x562f('0x0'))['db'][_0x562f('0x1')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x562f('0x2'),'afterUpdate':'update','afterDestroy':_0x562f('0x3')};function emitEvent(_0x843c16){return function(_0x598eea,_0x696678,_0x1f9abb){OpenchannelAccountEvents[_0x562f('0x4')](_0x843c16+':'+_0x598eea['id'],_0x598eea);OpenchannelAccountEvents[_0x562f('0x4')](_0x843c16,_0x598eea);_0x1f9abb(null);};}for(var e in events){if(events[_0x562f('0x5')](e)){var event=events[e];OpenchannelAccount[_0x562f('0x6')](e,emitEvent(event));}}module[_0x562f('0x7')]=OpenchannelAccountEvents;