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 _0x62c0=['exports','../../mysqldb','OpenchannelAccount','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x62c0,0x1d9));var _0x062c=function(_0x4fe19c,_0x45d0fe){_0x4fe19c=_0x4fe19c-0x0;var _0x952ac7=_0x62c0[_0x4fe19c];return _0x952ac7;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0x062c('0x0'))['db'][_0x062c('0x1')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x062c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x062c('0x3'),'afterDestroy':_0x062c('0x4')};function emitEvent(_0xaf1c05){return function(_0x57f521,_0x5c41c4,_0x443bf9){OpenchannelAccountEvents[_0x062c('0x5')](_0xaf1c05+':'+_0x57f521['id'],_0x57f521);OpenchannelAccountEvents[_0x062c('0x5')](_0xaf1c05,_0x57f521);_0x443bf9(null);};}for(var e in events){if(events[_0x062c('0x6')](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module[_0x062c('0x7')]=OpenchannelAccountEvents;