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 _0x743c=['update','emit','hook','exports','events','../../mysqldb','FaxAccount','setMaxListeners','save'];(function(_0x246481,_0xe394bc){var _0x14a105=function(_0x1e6d68){while(--_0x1e6d68){_0x246481['push'](_0x246481['shift']());}};_0x14a105(++_0xe394bc);}(_0x743c,0x148));var _0xc743=function(_0x1e9483,_0x1a4949){_0x1e9483=_0x1e9483-0x0;var _0x4b7e09=_0x743c[_0x1e9483];return _0x4b7e09;};'use strict';var EventEmitter=require(_0xc743('0x0'));var FaxAccount=require(_0xc743('0x1'))['db'][_0xc743('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xc743('0x3')](0x0);var events={'afterCreate':_0xc743('0x4'),'afterUpdate':_0xc743('0x5'),'afterDestroy':'remove'};function emitEvent(_0x19b1fc){return function(_0x142209,_0x50f002,_0x540d5d){FaxAccountEvents[_0xc743('0x6')](_0x19b1fc+':'+_0x142209['id'],_0x142209);FaxAccountEvents[_0xc743('0x6')](_0x19b1fc,_0x142209);_0x540d5d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0xc743('0x7')](e,emitEvent(event));}}module[_0xc743('0x8')]=FaxAccountEvents;