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 _0xc655=['setMaxListeners','save','update','remove','emit','hook','exports','events','../../mysqldb','OpenchannelAccount'];(function(_0x18e394,_0x218bc7){var _0x4c7c92=function(_0x8f42c7){while(--_0x8f42c7){_0x18e394['push'](_0x18e394['shift']());}};_0x4c7c92(++_0x218bc7);}(_0xc655,0x9d));var _0x5c65=function(_0xd2beda,_0x52a6dd){_0xd2beda=_0xd2beda-0x0;var _0xd73700=_0xc655[_0xd2beda];return _0xd73700;};'use strict';var EventEmitter=require(_0x5c65('0x0'));var OpenchannelAccount=require(_0x5c65('0x1'))['db'][_0x5c65('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x5c65('0x3')](0x0);var events={'afterCreate':_0x5c65('0x4'),'afterUpdate':_0x5c65('0x5'),'afterDestroy':_0x5c65('0x6')};function emitEvent(_0xd0c22f){return function(_0x279eeb,_0x7a8678,_0x48398e){OpenchannelAccountEvents[_0x5c65('0x7')](_0xd0c22f+':'+_0x279eeb['id'],_0x279eeb);OpenchannelAccountEvents[_0x5c65('0x7')](_0xd0c22f,_0x279eeb);_0x48398e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount[_0x5c65('0x8')](e,emitEvent(event));}}module[_0x5c65('0x9')]=OpenchannelAccountEvents;