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 _0x907f=['remove','emit','hasOwnProperty','hook','exports','events','VoiceExtension','update'];(function(_0xc09c1e,_0x7e0d59){var _0x3c956d=function(_0x1e0068){while(--_0x1e0068){_0xc09c1e['push'](_0xc09c1e['shift']());}};_0x3c956d(++_0x7e0d59);}(_0x907f,0x85));var _0xf907=function(_0x138349,_0x445a56){_0x138349=_0x138349-0x0;var _0xd78a31=_0x907f[_0x138349];return _0xd78a31;};'use strict';var EventEmitter=require(_0xf907('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0xf907('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xf907('0x2'),'afterDestroy':_0xf907('0x3')};function emitEvent(_0x52445b){return function(_0x522ef2,_0x28e87e,_0x2aea7a){VoiceExtensionEvents[_0xf907('0x4')](_0x52445b+':'+_0x522ef2['id'],_0x522ef2);VoiceExtensionEvents[_0xf907('0x4')](_0x52445b,_0x522ef2);_0x2aea7a(null);};}for(var e in events){if(events[_0xf907('0x5')](e)){var event=events[e];VoiceExtension[_0xf907('0x6')](e,emitEvent(event));}}module[_0xf907('0x7')]=VoiceExtensionEvents;