Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / services / email / realtime / index.js
1 const a1325_0x3c6f=['undefined','mailAccounts','mapKeys','isUndefined','length','merge','exports','prototype'];(function(_0x4ba43b,_0x40a19a){const _0x3c6fa=function(_0xff47fd){while(--_0xff47fd){_0x4ba43b['push'](_0x4ba43b['shift']());}};_0x3c6fa(++_0x40a19a);}(a1325_0x3c6f,0xd6));const a1325_0xff47=function(_0x4ba43b,_0x40a19a){_0x4ba43b=_0x4ba43b-0xa4;let _0x3c6fa=a1325_0x3c6f[_0x4ba43b];return _0x3c6fa;};const a1325_0x1d5387=a1325_0xff47;'use strict';const _=require('lodash'),MailAccount=require('../model/mailAccount'),Realtime=function(){this['mailAccounts']={};};function freeIsNotKey(_0x2c8c11,_0x29d3ce,_0x531acc){const _0x405415=a1325_0xff47,_0x2ca364=_[_0x405415(0xa8)](_0x2c8c11,function(_0x8dd82a){return _0x8dd82a[_0x531acc];});for(const _0x5438f3 in _0x29d3ce){typeof _0x29d3ce[_0x5438f3]!==_0x405415(0xa6)&&(!_0x2ca364[_0x5438f3]&&delete _0x29d3ce[_0x5438f3]);}}Realtime[a1325_0x1d5387(0xa5)]['mergeFromDatabase']=function(_0x17d9b2,_0x321648){const _0x1ff793=a1325_0x1d5387;for(const _0x37ee97 in _0x321648){typeof _0x17d9b2[_0x37ee97]!==_0x1ff793(0xa6)&&(_0x17d9b2[_0x37ee97]=_0x321648[_0x37ee97]);}},Realtime[a1325_0x1d5387(0xa5)]['initMailAccounts']=function(){const _0x2f2d3f=this;return function(_0x358c0e){const _0x534117=a1325_0xff47;if(_0x358c0e){freeIsNotKey(_0x358c0e,_0x2f2d3f['mailAccounts'],'id');for(let _0x24a0bb=0x0,_0x3cf9ee={};_0x24a0bb<_0x358c0e[_0x534117(0xaa)];_0x24a0bb+=0x1){_0x3cf9ee=_0x358c0e[_0x24a0bb],_[_0x534117(0xa9)](_0x2f2d3f['mailAccounts'][_0x3cf9ee['id']])?_0x2f2d3f[_0x534117(0xa7)][_0x3cf9ee['id']]=new MailAccount(_0x3cf9ee):_[_0x534117(0xab)](_0x2f2d3f[_0x534117(0xa7)][_0x3cf9ee['id']],_0x3cf9ee);}}return _0x2f2d3f[_0x534117(0xa7)];};},module[a1325_0x1d5387(0xa4)]=Realtime;