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 _0x139d=['emit','removeListener','length','./notification.events','remove'];(function(_0x21a647,_0x2a25e4){var _0x5e4a0c=function(_0x29f52e){while(--_0x29f52e){_0x21a647['push'](_0x21a647['shift']());}};_0x5e4a0c(++_0x2a25e4);}(_0x139d,0xfd));var _0xd139=function(_0x3afb47,_0x54bee0){_0x3afb47=_0x3afb47-0x0;var _0xe566d2=_0x139d[_0x3afb47];return _0xe566d2;};'use strict';var NotificationEvents=require(_0xd139('0x0'));var events=['save',_0xd139('0x1'),'update'];function createListener(_0x51ead0,_0x3cfa61){return function(_0x3547fb){_0x3cfa61[_0xd139('0x2')](_0x51ead0,_0x3547fb);};}function removeListener(_0x212cb3,_0x5be0db){return function(){NotificationEvents[_0xd139('0x3')](_0x212cb3,_0x5be0db);};}exports['register']=function(_0x2d8867){for(var _0x39aef5=0x0,_0x223aed=events[_0xd139('0x4')];_0x39aef5<_0x223aed;_0x39aef5++){var _0x4712b2=events[_0x39aef5];var _0x34de44=createListener('notification:'+_0x4712b2,_0x2d8867);NotificationEvents['on'](_0x4712b2,_0x34de44);}};