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 _0x6a61=['exports','events','../../mysqldb','VoicePrefix','save','emit','hasOwnProperty'];(function(_0x5a70a2,_0xf1e7f9){var _0x1c88fd=function(_0x2b36f3){while(--_0x2b36f3){_0x5a70a2['push'](_0x5a70a2['shift']());}};_0x1c88fd(++_0xf1e7f9);}(_0x6a61,0x1cf));var _0x16a6=function(_0xabf4c4,_0x5d9f24){_0xabf4c4=_0xabf4c4-0x0;var _0x7c4f5a=_0x6a61[_0xabf4c4];return _0x7c4f5a;};'use strict';var EventEmitter=require(_0x16a6('0x0'));var VoicePrefix=require(_0x16a6('0x1'))['db'][_0x16a6('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x16a6('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x159bf2){return function(_0xc0ccc4,_0x515a2a,_0x4173aa){VoicePrefixEvents[_0x16a6('0x4')](_0x159bf2+':'+_0xc0ccc4['id'],_0xc0ccc4);VoicePrefixEvents[_0x16a6('0x4')](_0x159bf2,_0xc0ccc4);_0x4173aa(null);};}for(var e in events){if(events[_0x16a6('0x5')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x16a6('0x6')]=VoicePrefixEvents;