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 _0xf804=['emit','hook','exports','../../mysqldb','remove'];(function(_0x15b6cc,_0x3d607a){var _0x97bf7e=function(_0xb73d86){while(--_0xb73d86){_0x15b6cc['push'](_0x15b6cc['shift']());}};_0x97bf7e(++_0x3d607a);}(_0xf804,0x9e));var _0x4f80=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xf804[_0x17d9e3];return _0x14192d;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x4f80('0x0'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x4f80('0x1')};function emitEvent(_0x2168d0){return function(_0x41da30,_0x24b1b8,_0x13128e){VoicePrefixEvents[_0x4f80('0x2')](_0x2168d0+':'+_0x41da30['id'],_0x41da30);VoicePrefixEvents[_0x4f80('0x2')](_0x2168d0,_0x41da30);_0x13128e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0x4f80('0x3')](e,emitEvent(event));}}module[_0x4f80('0x4')]=VoicePrefixEvents;