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 _0xd087=['../../mysqldb','VoicePrefix','save','remove','emit','hasOwnProperty','events'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd087,0x1bf));var _0x7d08=function(_0x1162f9,_0x35f87c){_0x1162f9=_0x1162f9-0x0;var _0x75257c=_0xd087[_0x1162f9];return _0x75257c;};'use strict';var EventEmitter=require(_0x7d08('0x0'));var VoicePrefix=require(_0x7d08('0x1'))['db'][_0x7d08('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7d08('0x3'),'afterUpdate':'update','afterDestroy':_0x7d08('0x4')};function emitEvent(_0x22a4d8){return function(_0x4191a9,_0x52f543,_0x46f0b3){VoicePrefixEvents[_0x7d08('0x5')](_0x22a4d8+':'+_0x4191a9['id'],_0x4191a9);VoicePrefixEvents[_0x7d08('0x5')](_0x22a4d8,_0x4191a9);_0x46f0b3(null);};}for(var e in events){if(events[_0x7d08('0x6')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;