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 _0x2a68=['save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','VoiceExtension'];(function(_0x1fd4a1,_0x5ca88a){var _0x4197c8=function(_0x1ee820){while(--_0x1ee820){_0x1fd4a1['push'](_0x1fd4a1['shift']());}};_0x4197c8(++_0x5ca88a);}(_0x2a68,0x11e));var _0x82a6=function(_0x251999,_0x101e56){_0x251999=_0x251999-0x0;var _0x14b385=_0x2a68[_0x251999];return _0x14b385;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x82a6('0x0'))['db'][_0x82a6('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x82a6('0x2'),'afterUpdate':_0x82a6('0x3'),'afterDestroy':_0x82a6('0x4')};function emitEvent(_0x4e8c4d){return function(_0x840501,_0x5f58df,_0x386bb8){VoiceExtensionEvents['emit'](_0x4e8c4d+':'+_0x840501['id'],_0x840501);VoiceExtensionEvents[_0x82a6('0x5')](_0x4e8c4d,_0x840501);_0x386bb8(null);};}for(var e in events){if(events[_0x82a6('0x6')](e)){var event=events[e];VoiceExtension[_0x82a6('0x7')](e,emitEvent(event));}}module[_0x82a6('0x8')]=VoiceExtensionEvents;