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 _0x14bd=['SquareProject','setMaxListeners','update','remove','emit','exports','events','../../mysqldb'];(function(_0x3d8651,_0x5e2d08){var _0x333e25=function(_0x2299da){while(--_0x2299da){_0x3d8651['push'](_0x3d8651['shift']());}};_0x333e25(++_0x5e2d08);}(_0x14bd,0x146));var _0xd14b=function(_0x1fcde8,_0x44c01d){_0x1fcde8=_0x1fcde8-0x0;var _0x5b3541=_0x14bd[_0x1fcde8];return _0x5b3541;};'use strict';var EventEmitter=require(_0xd14b('0x0'));var SquareProject=require(_0xd14b('0x1'))['db'][_0xd14b('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xd14b('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xd14b('0x4'),'afterDestroy':_0xd14b('0x5')};function emitEvent(_0x35aa46){return function(_0x533932,_0x158579,_0x51b7d5){SquareProjectEvents[_0xd14b('0x6')](_0x35aa46+':'+_0x533932['id'],_0x533932);SquareProjectEvents[_0xd14b('0x6')](_0x35aa46,_0x533932);_0x51b7d5(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0xd14b('0x7')]=SquareProjectEvents;