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 _0xd1e6=['remove','emit','removeListener','register','length','mailQueue:','./mailQueue.events'];(function(_0x289650,_0x453586){var _0x4fcebf=function(_0x13336b){while(--_0x13336b){_0x289650['push'](_0x289650['shift']());}};_0x4fcebf(++_0x453586);}(_0xd1e6,0x156));var _0x6d1e=function(_0x96e6d1,_0x5c755a){_0x96e6d1=_0x96e6d1-0x0;var _0x8f96a5=_0xd1e6[_0x96e6d1];return _0x8f96a5;};'use strict';var MailQueueEvents=require(_0x6d1e('0x0'));var events=['save',_0x6d1e('0x1'),'update'];function createListener(_0x466645,_0x487601){return function(_0x195f20){_0x487601[_0x6d1e('0x2')](_0x466645,_0x195f20);};}function removeListener(_0x18622c,_0x2b2263){return function(){MailQueueEvents[_0x6d1e('0x3')](_0x18622c,_0x2b2263);};}exports[_0x6d1e('0x4')]=function(_0x585bb7){for(var _0x3f02e7=0x0,_0x2a8804=events[_0x6d1e('0x5')];_0x3f02e7<_0x2a8804;_0x3f02e7++){var _0x3345bc=events[_0x3f02e7];var _0x5e0a19=createListener(_0x6d1e('0x6')+_0x3345bc,_0x585bb7);MailQueueEvents['on'](_0x3345bc,_0x5e0a19);}};