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 _0x3793=['exports','../../mysqldb','FaxAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x36f2d0,_0x5e3216){var _0x595303=function(_0x150a44){while(--_0x150a44){_0x36f2d0['push'](_0x36f2d0['shift']());}};_0x595303(++_0x5e3216);}(_0x3793,0x118));var _0x3379=function(_0x1ef6dc,_0x39afe6){_0x1ef6dc=_0x1ef6dc-0x0;var _0x2a4aa4=_0x3793[_0x1ef6dc];return _0x2a4aa4;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0x3379('0x0'))['db'][_0x3379('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x3379('0x2')](0x0);var events={'afterCreate':_0x3379('0x3'),'afterUpdate':_0x3379('0x4'),'afterDestroy':_0x3379('0x5')};function emitEvent(_0xbce9da){return function(_0x21ac24,_0x9563d1,_0x33774e){FaxAccountEvents[_0x3379('0x6')](_0xbce9da+':'+_0x21ac24['id'],_0x21ac24);FaxAccountEvents[_0x3379('0x6')](_0xbce9da,_0x21ac24);_0x33774e(null);};}for(var e in events){if(events[_0x3379('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x3379('0x8')]=FaxAccountEvents;