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 _0x87cb=['remove','emit','hook','exports','events','../../mysqldb','SquareProject','save','update'];(function(_0x2f7f8a,_0x381774){var _0x2eed6b=function(_0xe94aed){while(--_0xe94aed){_0x2f7f8a['push'](_0x2f7f8a['shift']());}};_0x2eed6b(++_0x381774);}(_0x87cb,0xdc));var _0xb87c=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0x87cb[_0x413feb];return _0x40ee88;};'use strict';var EventEmitter=require(_0xb87c('0x0'));var SquareProject=require(_0xb87c('0x1'))['db'][_0xb87c('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb87c('0x3'),'afterUpdate':_0xb87c('0x4'),'afterDestroy':_0xb87c('0x5')};function emitEvent(_0x4d550f){return function(_0x3e7ca6,_0x54d811,_0x52d410){SquareProjectEvents[_0xb87c('0x6')](_0x4d550f+':'+_0x3e7ca6['id'],_0x3e7ca6);SquareProjectEvents[_0xb87c('0x6')](_0x4d550f,_0x3e7ca6);_0x52d410(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0xb87c('0x7')](e,emitEvent(event));}}module[_0xb87c('0x8')]=SquareProjectEvents;