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 _0xaf0a=['length','./user.events','remove','emit','register'];(function(_0x3d9176,_0x399d6f){var _0x12adc5=function(_0x700b01){while(--_0x700b01){_0x3d9176['push'](_0x3d9176['shift']());}};_0x12adc5(++_0x399d6f);}(_0xaf0a,0x1cd));var _0xaaf0=function(_0x1a7846,_0x59723e){_0x1a7846=_0x1a7846-0x0;var _0x48049=_0xaf0a[_0x1a7846];return _0x48049;};'use strict';var UserEvents=require(_0xaaf0('0x0'));var events=['save',_0xaaf0('0x1'),'update'];function createListener(_0x14ac6c,_0x376a9b){return function(_0x2e0da6){_0x376a9b[_0xaaf0('0x2')](_0x14ac6c,_0x2e0da6);};}function removeListener(_0x54d6c5,_0x5cdb56){return function(){UserEvents['removeListener'](_0x54d6c5,_0x5cdb56);};}exports[_0xaaf0('0x3')]=function(_0x708f0a){for(var _0x5a6778=0x0,_0x49d8cd=events[_0xaaf0('0x4')];_0x5a6778<_0x49d8cd;_0x5a6778++){var _0x79cf1c=events[_0x5a6778];var _0x5c386c=createListener('user:'+_0x79cf1c,_0x708f0a);UserEvents['on'](_0x79cf1c,_0x5c386c);}};