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 _0x83bd=['hook','exports','events','SquareProject','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x438cfa,_0x1c258c){var _0x32b134=function(_0x293342){while(--_0x293342){_0x438cfa['push'](_0x438cfa['shift']());}};_0x32b134(++_0x1c258c);}(_0x83bd,0x160));var _0xd83b=function(_0x512c83,_0x42a67a){_0x512c83=_0x512c83-0x0;var _0x1f7f25=_0x83bd[_0x512c83];return _0x1f7f25;};'use strict';var EventEmitter=require(_0xd83b('0x0'));var SquareProject=require('../../mysqldb')['db'][_0xd83b('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xd83b('0x2')](0x0);var events={'afterCreate':_0xd83b('0x3'),'afterUpdate':_0xd83b('0x4'),'afterDestroy':_0xd83b('0x5')};function emitEvent(_0x6c867c){return function(_0x112479,_0x14a87a,_0x4e7d93){SquareProjectEvents['emit'](_0x6c867c+':'+_0x112479['id'],_0x112479);SquareProjectEvents[_0xd83b('0x6')](_0x6c867c,_0x112479);_0x4e7d93(null);};}for(var e in events){if(events[_0xd83b('0x7')](e)){var event=events[e];SquareProject[_0xd83b('0x8')](e,emitEvent(event));}}module[_0xd83b('0x9')]=SquareProjectEvents;