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 _0x472c=['events','../../mysqldb','setMaxListeners','save','remove','emit','exports'];(function(_0x19664b,_0x1fa0c3){var _0x1fe677=function(_0x1e3b60){while(--_0x1e3b60){_0x19664b['push'](_0x19664b['shift']());}};_0x1fe677(++_0x1fa0c3);}(_0x472c,0xd9));var _0xc472=function(_0x258b45,_0x3a740e){_0x258b45=_0x258b45-0x0;var _0x3668f8=_0x472c[_0x258b45];return _0x3668f8;};'use strict';var EventEmitter=require(_0xc472('0x0'));var VoiceExtension=require(_0xc472('0x1'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xc472('0x2')](0x0);var events={'afterCreate':_0xc472('0x3'),'afterUpdate':'update','afterDestroy':_0xc472('0x4')};function emitEvent(_0x35430b){return function(_0xe3519c,_0x40d0c1,_0x2af574){VoiceExtensionEvents[_0xc472('0x5')](_0x35430b+':'+_0xe3519c['id'],_0xe3519c);VoiceExtensionEvents[_0xc472('0x5')](_0x35430b,_0xe3519c);_0x2af574(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0xc472('0x6')]=VoiceExtensionEvents;