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 _0x245e=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceExtension'];(function(_0x511f2b,_0x4c7591){var _0x22db60=function(_0x5d3df8){while(--_0x5d3df8){_0x511f2b['push'](_0x511f2b['shift']());}};_0x22db60(++_0x4c7591);}(_0x245e,0x180));var _0xe245=function(_0xecb87c,_0x87ad1b){_0xecb87c=_0xecb87c-0x0;var _0x3f47bc=_0x245e[_0xecb87c];return _0x3f47bc;};'use strict';var EventEmitter=require(_0xe245('0x0'));var VoiceExtension=require(_0xe245('0x1'))['db'][_0xe245('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xe245('0x3'),'afterDestroy':_0xe245('0x4')};function emitEvent(_0x2427be){return function(_0x4451bc,_0x4c194c,_0x30df79){VoiceExtensionEvents[_0xe245('0x5')](_0x2427be+':'+_0x4451bc['id'],_0x4451bc);VoiceExtensionEvents[_0xe245('0x5')](_0x2427be,_0x4451bc);_0x30df79(null);};}for(var e in events){if(events[_0xe245('0x6')](e)){var event=events[e];VoiceExtension[_0xe245('0x7')](e,emitEvent(event));}}module[_0xe245('0x8')]=VoiceExtensionEvents;