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 _0xbf29=['setMaxListeners','update','emit','hook','events','../../mysqldb','VoiceExtension'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xbf29,0x1d9));var _0x9bf2=function(_0x26d438,_0x2c18a5){_0x26d438=_0x26d438-0x0;var _0x418453=_0xbf29[_0x26d438];return _0x418453;};'use strict';var EventEmitter=require(_0x9bf2('0x0'));var VoiceExtension=require(_0x9bf2('0x1'))['db'][_0x9bf2('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x9bf2('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9bf2('0x4'),'afterDestroy':'remove'};function emitEvent(_0x66abfd){return function(_0x1c5212,_0x38ecb4,_0x39ca2b){VoiceExtensionEvents[_0x9bf2('0x5')](_0x66abfd+':'+_0x1c5212['id'],_0x1c5212);VoiceExtensionEvents[_0x9bf2('0x5')](_0x66abfd,_0x1c5212);_0x39ca2b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x9bf2('0x6')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;