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 _0xf787=['save','update','emit','../../mysqldb','setMaxListeners'];(function(_0x527c21,_0x372631){var _0x9cbedf=function(_0x287453){while(--_0x287453){_0x527c21['push'](_0x527c21['shift']());}};_0x9cbedf(++_0x372631);}(_0xf787,0x175));var _0x7f78=function(_0x209c01,_0x43f4f7){_0x209c01=_0x209c01-0x0;var _0x2bf633=_0xf787[_0x209c01];return _0x2bf633;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x7f78('0x0'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x7f78('0x1')](0x0);var events={'afterCreate':_0x7f78('0x2'),'afterUpdate':_0x7f78('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3160ab){return function(_0x110be0,_0x14983f,_0x1d3c80){VoicePrefixEvents[_0x7f78('0x4')](_0x3160ab+':'+_0x110be0['id'],_0x110be0);VoicePrefixEvents[_0x7f78('0x4')](_0x3160ab,_0x110be0);_0x1d3c80(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;