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 _0xb957=['length','remove','removeListener','register'];(function(_0x295ece,_0x55ed2d){var _0x47a60e=function(_0x554fd2){while(--_0x554fd2){_0x295ece['push'](_0x295ece['shift']());}};_0x47a60e(++_0x55ed2d);}(_0xb957,0x6d));var _0x7b95=function(_0x5643d8,_0x388e5b){_0x5643d8=_0x5643d8-0x0;var _0x37fbd2=_0xb957[_0x5643d8];return _0x37fbd2;};'use strict';var MailMessageEvents=require('./mailMessage.events');var events=['save',_0x7b95('0x0'),'update'];function createListener(_0x477577,_0x24ded4){return function(_0xef509a){_0x24ded4['emit'](_0x477577,_0xef509a);};}function removeListener(_0x45db17,_0x2c8a4d){return function(){MailMessageEvents[_0x7b95('0x1')](_0x45db17,_0x2c8a4d);};}exports[_0x7b95('0x2')]=function(_0x19ff14){for(var _0x518099=0x0,_0x2912d5=events[_0x7b95('0x3')];_0x518099<_0x2912d5;_0x518099++){var _0x161768=events[_0x518099];var _0x495bea=createListener('mailMessage:'+_0x161768,_0x19ff14);MailMessageEvents['on'](_0x161768,_0x495bea);}};