Built motion from commit 753c950e.|2.5.42
[motion2.git] / server / services / email / realtime / index.js
index 398bf4d..63d292a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb18=['length','isUndefined','merge','exports','../model/mailAccount','mailAccounts','prototype','initMailAccounts'];(function(_0x9a825b,_0x35c63e){var _0x4e5706=function(_0x20e4f2){while(--_0x20e4f2){_0x9a825b['push'](_0x9a825b['shift']());}};_0x4e5706(++_0x35c63e);}(_0xfb18,0x114));var _0x8fb1=function(_0x47a7d0,_0x4e182d){_0x47a7d0=_0x47a7d0-0x0;var _0xb9bd08=_0xfb18[_0x47a7d0];return _0xb9bd08;};'use strict';var _=require('lodash');var MailAccount=require(_0x8fb1('0x0'));var Realtime=function(){this[_0x8fb1('0x1')]={};};function freeIsNotKey(_0x188b82,_0x1ce922,_0x54761c){var _0x36c4a0=_['mapKeys'](_0x188b82,function(_0x1724de,_0x442fea){return _0x1724de[_0x54761c];});for(var _0x2797b9 in _0x1ce922){if(_0x1ce922['hasOwnProperty'](_0x2797b9)){if(!_0x36c4a0[_0x2797b9]){delete _0x1ce922[_0x2797b9];}}}}Realtime[_0x8fb1('0x2')]['mergeFromDatabase']=function(_0x4dccdf,_0x4a1b3d){for(var _0x530027 in _0x4a1b3d){if(_0x4dccdf['hasOwnProperty'](_0x530027)){_0x4dccdf[_0x530027]=_0x4a1b3d[_0x530027];}}};Realtime[_0x8fb1('0x2')][_0x8fb1('0x3')]=function(){var _0x5b986b=this;return function(_0x40a82b){if(_0x40a82b){freeIsNotKey(_0x40a82b,_0x5b986b['mailAccounts'],'id');for(var _0x360a00=0x0,_0x5233ad={},_0x2b97d5={};_0x360a00<_0x40a82b[_0x8fb1('0x4')];_0x360a00+=0x1){_0x5233ad=_0x40a82b[_0x360a00];if(_[_0x8fb1('0x5')](_0x5b986b[_0x8fb1('0x1')][_0x5233ad['id']])){_0x5b986b[_0x8fb1('0x1')][_0x5233ad['id']]=new MailAccount(_0x5233ad);}else{_[_0x8fb1('0x6')](_0x5b986b['mailAccounts'][_0x5233ad['id']],_0x5233ad);}}}return _0x5b986b[_0x8fb1('0x1')];};};module[_0x8fb1('0x7')]=Realtime;
\ No newline at end of file
+var _0xfcf8=['mapKeys','prototype','mergeFromDatabase','hasOwnProperty','initMailAccounts','length','isUndefined','exports','lodash','../model/mailAccount','mailAccounts'];(function(_0x28bef9,_0x28e8d6){var _0x45db81=function(_0x269033){while(--_0x269033){_0x28bef9['push'](_0x28bef9['shift']());}};_0x45db81(++_0x28e8d6);}(_0xfcf8,0x1c0));var _0x8fcf=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0xfcf8[_0x15bc81];return _0x59440e;};'use strict';var _=require(_0x8fcf('0x0'));var MailAccount=require(_0x8fcf('0x1'));var Realtime=function(){this[_0x8fcf('0x2')]={};};function freeIsNotKey(_0xa5863b,_0x41c530,_0x4d429d){var _0x23bf53=_[_0x8fcf('0x3')](_0xa5863b,function(_0x326440,_0x592e1c){return _0x326440[_0x4d429d];});for(var _0x129f37 in _0x41c530){if(_0x41c530['hasOwnProperty'](_0x129f37)){if(!_0x23bf53[_0x129f37]){delete _0x41c530[_0x129f37];}}}}Realtime[_0x8fcf('0x4')][_0x8fcf('0x5')]=function(_0x374cd5,_0x2cd4a8){for(var _0x5d1635 in _0x2cd4a8){if(_0x374cd5[_0x8fcf('0x6')](_0x5d1635)){_0x374cd5[_0x5d1635]=_0x2cd4a8[_0x5d1635];}}};Realtime[_0x8fcf('0x4')][_0x8fcf('0x7')]=function(){var _0xed4798=this;return function(_0x366035){if(_0x366035){freeIsNotKey(_0x366035,_0xed4798['mailAccounts'],'id');for(var _0x453e11=0x0,_0x2a20b0={},_0x19872c={};_0x453e11<_0x366035[_0x8fcf('0x8')];_0x453e11+=0x1){_0x2a20b0=_0x366035[_0x453e11];if(_[_0x8fcf('0x9')](_0xed4798[_0x8fcf('0x2')][_0x2a20b0['id']])){_0xed4798['mailAccounts'][_0x2a20b0['id']]=new MailAccount(_0x2a20b0);}else{_['merge'](_0xed4798[_0x8fcf('0x2')][_0x2a20b0['id']],_0x2a20b0);}}}return _0xed4798['mailAccounts'];};};module[_0x8fcf('0xa')]=Realtime;
\ No newline at end of file