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 _0xbc62=['VoicePrefix','setMaxListeners','save','update','remove','emit','exports','events','../../mysqldb'];(function(_0x33f1ab,_0x4cf32d){var _0x2afd3c=function(_0x229aee){while(--_0x229aee){_0x33f1ab['push'](_0x33f1ab['shift']());}};_0x2afd3c(++_0x4cf32d);}(_0xbc62,0x15d));var _0x2bc6=function(_0x3b3cc6,_0x1982db){_0x3b3cc6=_0x3b3cc6-0x0;var _0x3a3437=_0xbc62[_0x3b3cc6];return _0x3a3437;};'use strict';var EventEmitter=require(_0x2bc6('0x0'));var VoicePrefix=require(_0x2bc6('0x1'))['db'][_0x2bc6('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x2bc6('0x3')](0x0);var events={'afterCreate':_0x2bc6('0x4'),'afterUpdate':_0x2bc6('0x5'),'afterDestroy':_0x2bc6('0x6')};function emitEvent(_0x5a5a9f){return function(_0x2443e1,_0x5d50bb,_0x21ddbb){VoicePrefixEvents[_0x2bc6('0x7')](_0x5a5a9f+':'+_0x2443e1['id'],_0x2443e1);VoicePrefixEvents['emit'](_0x5a5a9f,_0x2443e1);_0x21ddbb(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x2bc6('0x8')]=VoicePrefixEvents;