@brown-ds/distribution 0.0.24 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const comm=function(_0x5999fa){let _0x4f3532={};return _0x4f3532['gid']=_0x5999fa['gid']||'global',{'send':(_0x443e61,_0x4baafa,_0x37cd08)=>{global['distributi'+'on']['local']['groups']['get'](_0x4f3532['gid'],(_0x54d67d,_0x3a6985)=>{let _0x1dfd8a=Object['keys'](_0x3a6985)['length'];if(_0x1dfd8a===-0x5*0x371+-0x1164+0x2299){_0x37cd08(new Error('No\x20nodes\x20f'+'ound'));return;}let _0x1dc813=-0xf9*0x15+0x1646+-0x1d9,_0xd2bc36={},_0x41a9ba={};for(let _0x5dc2cb of Object['keys'](_0x3a6985)){let _0x174c8f=_0x3a6985[_0x5dc2cb],_0x4bf4b8={'node':{'ip':_0x174c8f['ip'],'port':_0x174c8f['port']},'service':_0x4baafa['service'],'method':_0x4baafa['method']};distribution['local']['comm']['send'](_0x443e61,_0x4bf4b8,(_0x518622,_0x23e1cb)=>{_0x518622?_0x41a9ba[_0x5dc2cb]=_0x518622:_0xd2bc36[_0x5dc2cb]=_0x23e1cb,_0x1dc813+=-0xf4c+0x237d+-0x286*0x8,_0x1dc813===_0x1dfd8a&&_0x37cd08(_0x41a9ba,_0xd2bc36);});}});}};};module['exports']=comm;
9
+ const comm=function(_0x48a27e){let _0x21c2c2={};return _0x21c2c2['gid']=_0x48a27e['gid']||'global',{'send':(_0x4fe6d6,_0x556559,_0x13fdcb)=>{global['distributi'+'on']['local']['groups']['get'](_0x21c2c2['gid'],(_0x34177f,_0x3c762b)=>{let _0x43e53a=Object['keys'](_0x3c762b)['length'];if(_0x43e53a===0x23fa+-0x240+-0x21ba){_0x13fdcb(new Error('No\x20nodes\x20f'+'ound'));return;}let _0x153528=0x74a+-0x1d80+0x1636,_0x3fee4c={},_0x3763a9={};for(let _0x41f4cf of Object['keys'](_0x3c762b)){let _0x2774a6=_0x3c762b[_0x41f4cf],_0xed4852={'node':{'ip':_0x2774a6['ip'],'port':_0x2774a6['port']},'service':_0x556559['service'],'method':_0x556559['method']};distribution['local']['comm']['send'](_0x4fe6d6,_0xed4852,(_0x1cd74d,_0x37f5ef)=>{_0x1cd74d?_0x3763a9[_0x41f4cf]=_0x1cd74d:_0x3fee4c[_0x41f4cf]=_0x37f5ef,_0x153528+=0x11b8+-0x1e18+0xc61,_0x153528===_0x43e53a&&_0x13fdcb(_0x3763a9,_0x3fee4c);});}});}};};module['exports']=comm;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const id=require('../util/id');function getMID(_0x2813e4){let _0x2a018f={};return _0x2a018f['date']=new Date()['getTime'](),_0x2a018f['mss']=_0x2813e4,id['getID'](_0x2a018f);}let gossip=function(_0x54a319){let _0x15ea1f={};return _0x15ea1f['gid']=_0x54a319['gid']||'global',_0x15ea1f['subset']=_0x54a319['subset']||function(_0x112ff2){return Math['ceil'](Math['log'](_0x112ff2['length']));},{'send':(_0x4f1650,_0x168eda,_0x40f7b4)=>{global['distributi'+'on']['local']['groups']['get'](_0x15ea1f['gid'],(_0x4d3234,_0x4b46c1)=>{let _0x2f7edf=_0x15ea1f['subset'](Object['keys'](_0x4b46c1)),_0x3479e6=function(_0x503f92){let _0x8c2863=new Set();while(_0x8c2863['size']<_0x2f7edf){let _0x2999c3=Math['floor'](Math['random']()*_0x503f92['length']);_0x8c2863['add'](_0x503f92[_0x2999c3]);}return _0x8c2863;},_0x2c7c7e=_0x3479e6(Object['keys'](_0x4b46c1)),_0x3caef1={},_0x2294e2={},_0x12c908=-0x86e*0x2+0x1*0x1f2b+-0xe4f;if(_0x4f1650['mid']&&_0x4f1650['gid']){}else _0x4f1650={'message':_0x4f1650,'remote':_0x168eda,'mid':getMID(_0x4f1650),'gid':_0x15ea1f['gid']};for(let _0x4a5bdd of _0x2c7c7e){let _0x3a7196=_0x4b46c1[_0x4a5bdd],_0x39e523={'node':{'ip':_0x3a7196['ip'],'port':_0x3a7196['port']},'service':'gossip','method':'recv'};global['distributi'+'on']['local']['comm']['send']([_0x4f1650],_0x39e523,(_0x4340b5,_0x9e2d64)=>{_0x4340b5?_0x2294e2[_0x4a5bdd]=_0x4340b5:_0x3caef1[_0x4a5bdd]=_0x9e2d64,_0x12c908+=0x1d9*0x1+0xd6*-0x29+0x251*0xe,_0x12c908===_0x2f7edf&&(_0x40f7b4&&_0x40f7b4(_0x2294e2,_0x3caef1));});}});},'at':(_0x531b52,_0x3b134d,_0x4062a4)=>{let _0x4e543f=setInterval(_0x3b134d,_0x531b52);_0x4062a4&&_0x4062a4(null,_0x4e543f);},'del':(_0x189ae8,_0x10d053)=>{clearInterval(_0x189ae8),_0x10d053&&_0x10d053(null,_0x189ae8);}};};module['exports']=gossip;
9
+ const id=require('../util/id');let gossip=function(_0x2c092a){let _0x456f42={};return _0x456f42['gid']=_0x2c092a['gid']||'global',_0x456f42['subset']=_0x2c092a['subset']||function(_0x2ce2b9){return Math['ceil'](Math['log'](_0x2ce2b9['length']));},{'send':(_0x1dbbaa,_0x43305d,_0x33fc7b)=>{global['distributi'+'on']['local']['groups']['get'](_0x456f42['gid'],(_0x5a700c,_0x9bf48d)=>{let _0x549350=_0x456f42['subset'](Object['keys'](_0x9bf48d)),_0x55cffa=function(_0x2a3ad1){let _0x5024fe=new Set();while(_0x5024fe['size']<_0x549350){let _0x59c9a0=Math['floor'](Math['random']()*_0x2a3ad1['length']);_0x5024fe['add'](_0x2a3ad1[_0x59c9a0]);}return _0x5024fe;},_0x4c6b65=_0x55cffa(Object['keys'](_0x9bf48d)),_0x63ad61={},_0x412dc8={},_0x25c6f0=-0x6*0x44+-0x23ae+-0x16f*-0x1a;if(_0x1dbbaa['mid']&&_0x1dbbaa['gid']){}else _0x1dbbaa={'message':_0x1dbbaa,'remote':_0x43305d,'mid':id['getMID'](_0x1dbbaa),'gid':_0x456f42['gid']};for(let _0x5dbeca of _0x4c6b65){let _0x5e1c92=_0x9bf48d[_0x5dbeca],_0x504df3={'node':{'ip':_0x5e1c92['ip'],'port':_0x5e1c92['port']},'service':'gossip','method':'recv'};global['distributi'+'on']['local']['comm']['send']([_0x1dbbaa],_0x504df3,(_0x2d60e0,_0x1c5fa0)=>{_0x2d60e0?_0x412dc8[_0x5dbeca]=_0x2d60e0:_0x63ad61[_0x5dbeca]=_0x1c5fa0,_0x25c6f0+=0xf*-0x3a+-0x2*-0x3f1+0x47b*-0x1,_0x25c6f0===_0x549350&&(_0x33fc7b&&_0x33fc7b(_0x412dc8,_0x63ad61));});}});},'at':(_0x2d2245,_0x21fc9b,_0x5ed429)=>{let _0x402bb1=setInterval(_0x21fc9b,_0x2d2245);_0x5ed429&&_0x5ed429(null,_0x402bb1);},'del':(_0x21b20a,_0x1f9bd9)=>{clearInterval(_0x21b20a),_0x1f9bd9&&_0x1f9bd9(null,_0x21b20a);}};};module['exports']=gossip;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const groups=function(_0x39b223){let _0x309c4a={};return _0x309c4a['gid']=_0x39b223['gid']||'global',{'put':(_0x52beec,_0xa32a95,_0x4cf167)=>{global['distributi'+'on']['local']['groups']['put'](_0x52beec,_0xa32a95,(_0x3653de,_0x4f39b6)=>{_0x3653de&&_0x4cf167(_0x3653de),global['distributi'+'on'][_0x309c4a['gid']]['comm']['send']([_0x52beec,_0xa32a95],{'service':'groups','method':'put'},_0x4cf167);});},'del':(_0x1881a2,_0x37ea4d)=>{global['distributi'+'on'][_0x309c4a['gid']]['comm']['send']([_0x1881a2],{'service':'groups','method':'del'},_0x37ea4d);},'get':(_0x30bd61,_0x476f73)=>{global['distributi'+'on'][_0x309c4a['gid']]['comm']['send']([_0x30bd61],{'service':'groups','method':'get'},_0x476f73);},'add':(_0x2ba713,_0x491dfe,_0x1b2faa)=>{global['distributi'+'on']['local']['groups']['add'](_0x2ba713,_0x491dfe,(_0x1ccc9e,_0x55650c)=>{_0x1ccc9e&&_0x1b2faa(_0x1ccc9e),global['distributi'+'on'][_0x309c4a['gid']]['comm']['send']([_0x2ba713,_0x491dfe],{'service':'groups','method':'add'},_0x1b2faa);});},'rem':(_0x22df7b,_0x46d129,_0xbc411d)=>{global['distributi'+'on']['local']['groups']['rem'](_0x22df7b,_0x46d129,(_0x487ff4,_0x35521f)=>{_0x487ff4&&_0xbc411d(_0x487ff4),global['distributi'+'on'][_0x309c4a['gid']]['comm']['send']([_0x22df7b,_0x46d129],{'service':'groups','method':'rem'},_0xbc411d);});}};};module['exports']=groups;
9
+ const groups=function(_0x1cd586){let _0x23c429={};return _0x23c429['gid']=_0x1cd586['gid']||'global',{'put':(_0x1992ee,_0x5429e0,_0x328d1d)=>{global['distributi'+'on']['local']['groups']['put'](_0x1992ee,_0x5429e0,(_0x1988b8,_0x39f5d6)=>{_0x1988b8&&_0x328d1d(_0x1988b8),global['distributi'+'on'][_0x23c429['gid']]['comm']['send']([_0x1992ee,_0x5429e0],{'service':'groups','method':'put'},_0x328d1d);});},'del':(_0x80645b,_0x4ea437)=>{global['distributi'+'on'][_0x23c429['gid']]['comm']['send']([_0x80645b],{'service':'groups','method':'del'},_0x4ea437);},'get':(_0x261499,_0x4cef7d)=>{global['distributi'+'on'][_0x23c429['gid']]['comm']['send']([_0x261499],{'service':'groups','method':'get'},_0x4cef7d);},'add':(_0x3a1b60,_0x3a8f14,_0x69145a)=>{global['distributi'+'on']['local']['groups']['add'](_0x3a1b60,_0x3a8f14,(_0x21fb92,_0x3e5761)=>{_0x21fb92&&_0x69145a(_0x21fb92),global['distributi'+'on'][_0x23c429['gid']]['comm']['send']([_0x3a1b60,_0x3a8f14],{'service':'groups','method':'add'},_0x69145a);});},'rem':(_0x4fc17d,_0x2112c4,_0x3f3ff7)=>{global['distributi'+'on']['local']['groups']['rem'](_0x4fc17d,_0x2112c4,(_0x3e5d96,_0x2893c1)=>{_0x3e5d96&&_0x3f3ff7(_0x3e5d96),global['distributi'+'on'][_0x23c429['gid']]['comm']['send']([_0x4fc17d,_0x2112c4],{'service':'groups','method':'rem'},_0x3f3ff7);});}};};module['exports']=groups;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const util=require('../util/ut'+'il'),distribution=global['distributi'+'on'],log=require('../util/lo'+'g');function getNode(_0x46da30,_0x4fddba,_0x14618d){typeof _0x4fddba==='object'&&(_0x4fddba=_0x4fddba['key']),distribution[_0x46da30['gid']]['status']['get']('nid',(_0x127a19,_0x2be3ca)=>{let _0x24819d=Object['values'](_0x2be3ca),_0x10ab23=util['id']['getID'](_0x4fddba),_0x3b02df=_0x46da30['hash'](_0x10ab23,_0x24819d),_0x12cd54=_0x3b02df['substring'](-0x85e+0x154a+0x2*-0x676,0xb8d*0x2+-0x1ef4+0x7df);distribution['local']['groups']['get'](_0x46da30['gid'],(_0x5b6446,_0x30285c)=>{let _0x2211f1=_0x30285c[_0x12cd54];log('[mem\x20(getN'+'ode)]\x20conf'+'iguration:'+'\x20'+JSON['stringify'](_0x4fddba)+'group:\x20'+JSON['stringify'](_0x30285c)+'\x20node:\x20'+JSON['stringify'](_0x2211f1)+'nid:\x20'+JSON['stringify'](_0x3b02df)+'\x20sid:\x20'+JSON['stringify'](_0x12cd54)),_0x14618d(_0x2211f1);});});}const mem=function(_0x4c89d8){let _0xd2f6e3={};return _0xd2f6e3['gid']=_0x4c89d8['gid']||'all',_0xd2f6e3['hash']=_0x4c89d8['hash']||util['id']['naiveHash'],{'get':(_0x4a36a1,_0x3fe1c9)=>{if(!_0x4a36a1){let _0x1bb42b=[{'key':null,'gid':_0xd2f6e3['gid']}];distribution[_0xd2f6e3['gid']]['comm']['send'](_0x1bb42b,{'service':'mem','method':'get'},(_0x4fa5d0,_0x59a00e)=>{let _0x30fc6e=Object['values'](_0x59a00e)['reduce']((_0x1a6b9b,_0x4fc79a)=>_0x1a6b9b['concat'](_0x4fc79a),[]);_0x3fe1c9(_0x4fa5d0,_0x30fc6e);});return;}getNode(_0xd2f6e3,_0x4a36a1,_0x5133a8=>{let _0x184dc5=[{'key':_0x4a36a1,'gid':_0xd2f6e3['gid']}],_0x594341={'service':'mem','method':'get','node':_0x5133a8};log('[all.mem.g'+'et]\x0a\x20\x20\x20\x20\x20\x20'+'\x20\x20\x20\x20config'+'uration:\x20'+JSON['stringify'](_0x4a36a1)+('\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20'+'\x20node:\x20')+JSON['stringify'](global['nodeConfig'])+('\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20'+'\x20target\x20no'+'de:\x20')+JSON['stringify'](_0x5133a8)+('\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20'+'\x20')),distribution['local']['comm']['send'](_0x184dc5,_0x594341,_0x3fe1c9);});},'put':(_0x42ab95,_0x131398,_0x5706a1)=>{_0x131398=_0x131398||util['id']['getID'](_0x42ab95),getNode(_0xd2f6e3,_0x131398,_0x55de23=>{let _0x56c755=[_0x42ab95,{'action':_0x131398['action'],'key':_0x131398['key'],'gid':_0xd2f6e3['gid']}],_0x5783fb={'service':'mem','method':'put','node':_0x55de23};log('[all.mem.p'+'ut]\x20state:'+'\x20'+JSON['stringify'](_0x42ab95)+('configurat'+'ion:\x20')+JSON['stringify'](_0x131398)+('target\x20nod'+'e:\x20')+JSON['stringify'](_0x55de23)),distribution['local']['comm']['send'](_0x56c755,_0x5783fb,_0x5706a1);});},'del':(_0x55b177,_0x30e0fc)=>{getNode(_0xd2f6e3,_0x55b177,_0x427a55=>{let _0x35a6ec=[{'key':_0x55b177,'gid':_0xd2f6e3['gid']}],_0x14d1b8={'service':'mem','method':'del','node':_0x427a55};distribution['local']['comm']['send'](_0x35a6ec,_0x14d1b8,_0x30e0fc);});},'reconf':(_0x323b5f,_0x56f397)=>{distribution[_0xd2f6e3['gid']]['mem']['get'](null,(_0x383b96,_0x178faa)=>{distribution[_0xd2f6e3['gid']]['status']['get']('nid',(_0x24d169,_0x3ac881)=>{let _0xa0947d=Object['values'](_0x3ac881),_0xde4b58=Object['values'](_0x323b5f)['map'](_0x79e6c8=>util['id']['getNID'](_0x79e6c8)),_0x438444=0xa70+-0x31*-0xc1+0x3*-0xfcb;const _0x8eebb8=()=>{_0x438444===_0x178faa['length']&&_0x56f397();};if(_0x178faa['length']===0x2b*-0x6d+0xefc+-0x353*-0x1){_0x56f397();return;}for(let _0x445910 of _0x178faa){let _0x160f41=util['id']['getID'](_0x445910),_0x183a3b=_0xd2f6e3['hash'](_0x160f41,_0xde4b58),_0x3484b1=_0xd2f6e3['hash'](_0x160f41,_0xa0947d);if(_0x183a3b===_0x3484b1){_0x438444++,_0x8eebb8();continue;}let _0x47dff8=_0x323b5f[_0x183a3b['substring'](0x167+-0x1*0x97b+0x814,-0x2124+0xd*0xdf+-0x45e*-0x5)],_0x969662=[{'key':_0x445910,'gid':_0xd2f6e3['gid']}],_0x13870a={'service':'mem','method':'del','node':_0x47dff8};distribution['local']['comm']['send'](_0x969662,_0x13870a,(_0x2ea9b4,_0x5e0e1d)=>{distribution[_0xd2f6e3['gid']]['mem']['put'](_0x5e0e1d,_0x445910,(_0x12d7e0,_0x54b2cd)=>{_0x438444++,_0x8eebb8();});});}});});}};};module['exports']=mem;
9
+ const util=require('../util/ut'+'il'),distribution=global['distributi'+'on'],log=require('../util/lo'+'g');function getNode(_0x3c6c47,_0x4c93a3,_0x39e89e){typeof _0x4c93a3==='object'&&(_0x4c93a3=_0x4c93a3['key']),distribution[_0x3c6c47['gid']]['status']['get']('nid',(_0x2c6ab6,_0x41332a)=>{let _0x131d42=Object['values'](_0x41332a),_0xcbb2ec=util['id']['getID'](_0x4c93a3),_0x24856f=_0x3c6c47['hash'](_0xcbb2ec,_0x131d42),_0x4c17c2=_0x24856f['substring'](-0x11*0x14c+-0x346*0x5+0x266a,-0x1bfe+-0x8a4+0x24a7);distribution['local']['groups']['get'](_0x3c6c47['gid'],(_0x4b2918,_0x4aaa56)=>{let _0x46762c=_0x4aaa56[_0x4c17c2];log('[mem\x20(getN'+'ode)]\x20conf'+'iguration:'+'\x20'+JSON['stringify'](_0x4c93a3)+'group:\x20'+JSON['stringify'](_0x4aaa56)+'\x20node:\x20'+JSON['stringify'](_0x46762c)+'nid:\x20'+JSON['stringify'](_0x24856f)+'\x20sid:\x20'+JSON['stringify'](_0x4c17c2)),_0x39e89e(_0x46762c);});});}function normalize(_0xc02eee,_0x59c255){let _0x5646d4={};_0xc02eee===null&&(_0xc02eee={});if(typeof _0xc02eee==='string')_0x5646d4['key']=_0xc02eee,_0x5646d4['gid']=_0x59c255,_0x5646d4['action']='put';else typeof _0xc02eee==='object'&&(_0x5646d4['key']=_0xc02eee['key'],_0x5646d4['gid']=_0xc02eee['gid']||_0x59c255,_0x5646d4['action']=_0xc02eee['action']||'put');return _0x5646d4;};const mem=function(_0x254f5a){let _0x20c5aa={};return _0x20c5aa['gid']=_0x254f5a['gid']||'all',_0x20c5aa['hash']=_0x254f5a['hash']||util['id']['naiveHash'],{'get':(_0x592f66,_0x43f7cf)=>{if(!_0x592f66){let _0x3a03ac=[{'key':null,'gid':_0x20c5aa['gid']}];distribution[_0x20c5aa['gid']]['comm']['send'](_0x3a03ac,{'service':'mem','method':'get'},(_0x2fa8fb,_0x1a097b)=>{let _0x483f2e=Object['values'](_0x1a097b)['reduce']((_0x228d71,_0x11d9a7)=>_0x228d71['concat'](_0x11d9a7),[]);_0x43f7cf(_0x2fa8fb,_0x483f2e);});return;}_0x592f66=normalize(_0x592f66,_0x20c5aa['gid']),getNode(_0x20c5aa,_0x592f66,_0x328825=>{let _0x27d18e=[_0x592f66],_0x32bffa={'service':'mem','method':'get','node':_0x328825};log('[all.mem.g'+'et]\x20config'+'uration:\x20'+JSON['stringify'](_0x592f66)+'\x20node:\x20'+JSON['stringify'](global['nodeConfig'])+('\x20target\x20no'+'de:\x20')+JSON['stringify'](_0x328825)),distribution['local']['comm']['send'](_0x27d18e,_0x32bffa,_0x43f7cf);});},'put':(_0x598893,_0x54a0d7,_0x449d37)=>{_0x54a0d7=_0x54a0d7||util['id']['getID'](_0x598893),_0x54a0d7=normalize(_0x54a0d7,_0x20c5aa['gid']),getNode(_0x20c5aa,_0x54a0d7,_0x273ccc=>{let _0x8db966=[_0x598893,_0x54a0d7],_0x2314c8={'service':'mem','method':'put','node':_0x273ccc};log('[all.mem.p'+'ut]\x20state:'+'\x20'+JSON['stringify'](_0x598893)+('configurat'+'ion:\x20')+JSON['stringify'](_0x54a0d7)+('target\x20nod'+'e:\x20')+JSON['stringify'](_0x273ccc)),distribution['local']['comm']['send'](_0x8db966,_0x2314c8,_0x449d37);});},'del':(_0x4139be,_0x41e39c)=>{getNode(_0x20c5aa,_0x4139be,_0xf21c59=>{let _0x114740=[{'key':_0x4139be,'gid':_0x20c5aa['gid']}],_0x3c4b73={'service':'mem','method':'del','node':_0xf21c59};distribution['local']['comm']['send'](_0x114740,_0x3c4b73,_0x41e39c);});},'reconf':(_0x4dad7f,_0x34dfb1)=>{distribution[_0x20c5aa['gid']]['mem']['get'](null,(_0x1894ad,_0x5aea84)=>{distribution[_0x20c5aa['gid']]['status']['get']('nid',(_0x57509b,_0x3c96cd)=>{let _0x2ff3ad=Object['values'](_0x3c96cd),_0x2da451=Object['values'](_0x4dad7f)['map'](_0x16eefd=>util['id']['getNID'](_0x16eefd)),_0x443fc6=0x5f9*0x3+0xf*0x172+0x147*-0x1f;const _0x300ad2=()=>{_0x443fc6===_0x5aea84['length']&&_0x34dfb1();};if(_0x5aea84['length']===0xb8*0x4+0x14fb+-0x17db){_0x34dfb1();return;}for(let _0x4bbd36 of _0x5aea84){let _0x3cdb4e=util['id']['getID'](_0x4bbd36),_0x3c532c=_0x20c5aa['hash'](_0x3cdb4e,_0x2da451),_0x28d8b5=_0x20c5aa['hash'](_0x3cdb4e,_0x2ff3ad);if(_0x3c532c===_0x28d8b5){_0x443fc6++,_0x300ad2();continue;}let _0x44e68c=_0x4dad7f[_0x3c532c['substring'](0x1ece+-0x236+-0x1c98,0x6d+0xbaf+-0xc17)],_0x3161b0=[{'key':_0x4bbd36,'gid':_0x20c5aa['gid']}],_0x3bbfb7={'service':'mem','method':'del','node':_0x44e68c};distribution['local']['comm']['send'](_0x3161b0,_0x3bbfb7,(_0x3c1541,_0x450b49)=>{distribution[_0x20c5aa['gid']]['mem']['put'](_0x450b49,_0x4bbd36,(_0x1b90c1,_0x4f6879)=>{_0x443fc6++,_0x300ad2();});});}});});}};};module['exports']=mem;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const distribution=require('../../dist'+'ribution'),id=distribution['util']['id'],mr=function(_0x5744e1={'gid':'all'}){const _0x2b27c9={};return _0x2b27c9['gid']=_0x5744e1['gid'],{'exec':(_0x33dc31,_0x4bbf87)=>{const _0x5c9256=id['getSID'](_0x33dc31);mrSvc={'mapper':_0x33dc31['map'],'reducer':_0x33dc31['reduce'],'map':function(_0x1864f0,_0xfb7038,_0x1055a9,_0x2d8874=function(){}){if(_0x1864f0['length']==0x316+-0x53a+0x224)_0x2d8874(null,{});else{let _0x556c9b=[],_0x4f69fa=0x11a8+0x11c9+-0x2371;_0x1864f0['forEach'](_0x2c9e10=>{distribution[_0xfb7038]['store']['get'](_0x2c9e10,(_0x80397a,_0xdaf9a5)=>{_0x4f69fa++;const _0x51049d=this['mapper'](_0x2c9e10,_0xdaf9a5);Array['isArray'](_0x51049d)?_0x556c9b['push'](..._0x51049d):_0x556c9b['push'](_0x51049d),_0x4f69fa==_0x1864f0['length']&&distribution['local']['store']['put'](_0x556c9b,_0x1055a9+'_map',(_0x4d2ad3,_0x49fc42)=>{_0x2d8874(_0x4d2ad3,_0x556c9b);});});});}},'shuffle':function(_0x22a932,_0x59afd8,_0x583b01=function(){}){distribution['local']['store']['get'](_0x59afd8+'_map',(_0x547962,_0x385afd)=>{!_0x547962?(cnt=-0x3*0x107+-0x2f*0xcf+0x1*0x2916,_0x385afd['forEach'](_0x306993=>{const [_0x5bae26]=Object['keys'](_0x306993);distribution[_0x22a932]['mem']['put'](_0x306993[_0x5bae26],{'key':_0x5bae26,'action':'append'},(_0xf2b8f,_0x4d53ed)=>{cnt++,cnt==_0x385afd['length']&&_0x583b01(null,_0x385afd);});})):_0x583b01(_0x547962,{});});},'reduce':function(_0x591a50,_0xca0f9a,_0x29d65d){distribution['local']['mem']['get']({'key':null,'gid':_0x591a50},(_0x399991,_0x463fe6)=>{let _0x441b96=[],_0x4879a6=0x163d+0x18*-0xeb+-0x35;_0x463fe6['length']==-0x11f*0xb+0xe26*0x2+-0xff7&&_0x29d65d(null,null),_0x463fe6['forEach'](_0x1a4fef=>distribution['local']['mem']['get']({'key':_0x1a4fef,'gid':_0x591a50},(_0x156158,_0x36c35)=>{let _0x3f63d7=this['reducer'](_0x1a4fef,_0x36c35);_0x441b96=_0x441b96['concat'](_0x3f63d7),_0x4879a6++,_0x4879a6==_0x463fe6['length']&&_0x29d65d(null,_0x441b96);}));});}};const _0x2df0af=function(_0x1da6fc,_0x26f45){let _0x4a8e8e={};return Object['keys'](_0x26f45)['forEach'](_0x4924b5=>{_0x4a8e8e[_0x4924b5]=[];}),_0x1da6fc['forEach'](_0x3233d1=>{let _0x286154=id['getID'](_0x3233d1),_0x14d8d2=id['naiveHash'](_0x286154,Object['keys'](_0x26f45));_0x4a8e8e[_0x14d8d2]['push'](_0x3233d1);}),_0x4a8e8e;};distribution[_0x2b27c9['gid']]['routes']['put'](mrSvc,'mr-'+_0x5c9256,(_0x550e6d,_0x1f5631)=>{distribution['local']['groups']['get'](_0x2b27c9['gid'],(_0x9ff936,_0x3120a4)=>{let _0x107c0b=_0x2df0af(_0x33dc31['keys'],_0x3120a4);var _0x34e7fb=-0x929+-0x1e1*0x11+0x148d*0x2;const _0x6d4696=Object['keys'](_0x3120a4)['length'];let _0x3f99f9={'service':'mr-'+_0x5c9256,'method':'map'};for(let _0x25d59c in _0x3120a4){if(!![]){_0x3f99f9['node']=_0x3120a4[_0x25d59c];let _0x480b5b=[_0x107c0b[_0x25d59c],_0x2b27c9['gid'],_0x5c9256];distribution['local']['comm']['send'](_0x480b5b,_0x3f99f9,(_0x4313df,_0xedf7fa)=>{++_0x34e7fb;if(_0x34e7fb==_0x6d4696){let _0x282e08={'service':'mr-'+_0x5c9256,'method':'shuffle'};distribution[_0x2b27c9['gid']]['comm']['send']([_0x2b27c9['gid'],_0x5c9256],_0x282e08,(_0x4cf6d3,_0x371862)=>{let _0x338acc={'service':'mr-'+_0x5c9256,'method':'reduce'};distribution[_0x2b27c9['gid']]['comm']['send']([_0x2b27c9['gid'],_0x5c9256],_0x338acc,(_0x242fb2,_0x40d759)=>{let _0x3ee736=[];for(let _0xb63750 of Object['values'](_0x40d759)){_0xb63750!==null&&(_0x3ee736=_0x3ee736['concat'](_0xb63750));}_0x4bbf87(_0x242fb2,_0x3ee736);return;distribution[_0x2b27c9['gid']]['routes']['rem']('mr-'+_0x5c9256,(_0x305f77,_0x69403e)=>{_0x4bbf87(null,_0x3ee736);});});});}});}}});});}};};module['exports']=mr;
9
+ const distribution=require('../../dist'+'ribution'),id=distribution['util']['id'],mr=function(_0x2c5607={'gid':'all'}){const _0x44318e={};return _0x44318e['gid']=_0x2c5607['gid'],{'exec':(_0x5a012f,_0x1b3ad7)=>{const _0x1d87ed=id['getSID'](_0x5a012f);mrSvc={'mapper':_0x5a012f['map'],'reducer':_0x5a012f['reduce'],'map':function(_0x485fa0,_0x89ec28,_0x2372a3,_0x19556e=function(){}){if(_0x485fa0['length']==0x34a+0x34c+-0x34b*0x2)_0x19556e(null,{});else{let _0x180e3a=[],_0x56344a=-0x699*-0x5+-0x1aef*-0x1+0x1a*-0x24e;_0x485fa0['forEach'](_0x3052fe=>{distribution[_0x89ec28]['store']['get'](_0x3052fe,(_0x9c0d8b,_0x39b495)=>{_0x56344a++;const _0x387897=this['mapper'](_0x3052fe,_0x39b495);Array['isArray'](_0x387897)?_0x180e3a['push'](..._0x387897):_0x180e3a['push'](_0x387897),_0x56344a==_0x485fa0['length']&&distribution['local']['store']['put'](_0x180e3a,_0x2372a3+'_map',(_0x58d765,_0x31d8da)=>{_0x19556e(_0x58d765,_0x180e3a);});});});}},'shuffle':function(_0x3a589f,_0x565717,_0x11c047=function(){}){distribution['local']['store']['get'](_0x565717+'_map',(_0x6ffd8a,_0x5f5728)=>{!_0x6ffd8a?(cnt=0x1a23+0xf*-0x255+0x2*0x46c,_0x5f5728['forEach'](_0x407239=>{const [_0x27d837]=Object['keys'](_0x407239);distribution[_0x3a589f]['mem']['put'](_0x407239[_0x27d837],{'key':_0x27d837,'action':'append'},(_0x125dc6,_0x5053ca)=>{cnt++,cnt==_0x5f5728['length']&&_0x11c047(null,_0x5f5728);});})):_0x11c047(_0x6ffd8a,{});});},'reduce':function(_0x2c8a31,_0x57a7e9,_0x57afe9){distribution['local']['mem']['get']({'key':null,'gid':_0x2c8a31},(_0xc3ab37,_0x4c717d)=>{let _0x16ae98=[],_0x13f74d=-0x170b+-0x13*0x12a+-0xb*-0x41b;_0x4c717d['length']==0x54a*0x5+-0xaf5+-0xf7d&&_0x57afe9(null,null),_0x4c717d['forEach'](_0x56ef42=>distribution['local']['mem']['get']({'key':_0x56ef42,'gid':_0x2c8a31},(_0xec6e23,_0x574eda)=>{let _0x5ccbbb=this['reducer'](_0x56ef42,_0x574eda);_0x16ae98=_0x16ae98['concat'](_0x5ccbbb),_0x13f74d++,_0x13f74d==_0x4c717d['length']&&_0x57afe9(null,_0x16ae98);}));});}};const _0x57a91c=function(_0x3b4078,_0x25bc80){let _0x5e656f={};return Object['keys'](_0x25bc80)['forEach'](_0x549d25=>{_0x5e656f[_0x549d25]=[];}),_0x3b4078['forEach'](_0x57ae52=>{let _0x3898a1=id['getID'](_0x57ae52),_0x1366b4=id['naiveHash'](_0x3898a1,Object['keys'](_0x25bc80));_0x5e656f[_0x1366b4]['push'](_0x57ae52);}),_0x5e656f;};distribution[_0x44318e['gid']]['routes']['put'](mrSvc,'mr-'+_0x1d87ed,(_0x5515f6,_0x3b0c98)=>{distribution['local']['groups']['get'](_0x44318e['gid'],(_0x3bc002,_0x1ede33)=>{let _0x1c35c6=_0x57a91c(_0x5a012f['keys'],_0x1ede33),_0x1c51f9=0x21d2+-0x1449+-0x2b5*0x5;const _0x28d92c=Object['keys'](_0x1ede33)['length'];let _0x49eb71={'service':'mr-'+_0x1d87ed,'method':'map'};for(let _0xb25b00 in _0x1ede33){if(!![]){_0x49eb71['node']=_0x1ede33[_0xb25b00];let _0x17678b=[_0x1c35c6[_0xb25b00],_0x44318e['gid'],_0x1d87ed];distribution['local']['comm']['send'](_0x17678b,_0x49eb71,(_0x470936,_0x6e7838)=>{++_0x1c51f9;if(_0x1c51f9==_0x28d92c){let _0x3b5efb={'service':'mr-'+_0x1d87ed,'method':'shuffle'};distribution[_0x44318e['gid']]['comm']['send']([_0x44318e['gid'],_0x1d87ed],_0x3b5efb,(_0x30fa7a,_0x426326)=>{let _0x350928={'service':'mr-'+_0x1d87ed,'method':'reduce'};distribution[_0x44318e['gid']]['comm']['send']([_0x44318e['gid'],_0x1d87ed],_0x350928,(_0x10098c,_0x21fe13)=>{let _0x1eed2a=[];for(let _0x3d0951 of Object['values'](_0x21fe13)){_0x3d0951!==null&&(_0x1eed2a=_0x1eed2a['concat'](_0x3d0951));}_0x1b3ad7(_0x10098c,_0x1eed2a);return;distribution[_0x44318e['gid']]['routes']['rem']('mr-'+_0x1d87ed,(_0x1dbdd0,_0x2feafd)=>{_0x1b3ad7(null,_0x1eed2a);});});});}});}}});});}};};module['exports']=mr;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const routes=function(_0x44eef3){let _0x58fcfe={};return _0x58fcfe['gid']=_0x44eef3['gid']||'global',{'put':(_0x17f621,_0x34b5ef,_0x327a31)=>{global['distributi'+'on'][_0x58fcfe['gid']]['comm']['send']([_0x17f621,_0x34b5ef],{'service':'routes','method':'put'},_0x327a31);},'rem':(_0x3f41de,_0x3e0e72)=>{global['distributi'+'on'][_0x58fcfe['gid']]['comm']['send']([_0x3f41de],{'service':'routes','method':'rem'},_0x3e0e72);}};};module['exports']=routes;
9
+ const routes=function(_0x4a10d6){let _0x1ec543={};return _0x1ec543['gid']=_0x4a10d6['gid']||'global',{'put':(_0x5e9850,_0x2d0889,_0x2bec70)=>{global['distributi'+'on'][_0x1ec543['gid']]['comm']['send']([_0x5e9850,_0x2d0889],{'service':'routes','method':'put'},_0x2bec70);},'rem':(_0x153c49,_0x5e95e8)=>{global['distributi'+'on'][_0x1ec543['gid']]['comm']['send']([_0x153c49],{'service':'routes','method':'rem'},_0x5e95e8);}};};module['exports']=routes;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const status=function(_0x18d406){let _0x47a05e={};return _0x47a05e['gid']=_0x18d406['gid']||'global',{'get':(_0x1d1054,_0x9bb6c4)=>{let _0xea5151=[_0x1d1054],_0x318852={'service':'status','method':'get'};global['distributi'+'on'][_0x47a05e['gid']]['comm']['send'](_0xea5151,_0x318852,(_0x1cdcee,_0x52caeb)=>{switch(_0x1d1054){case'heapTotal':let _0x463eeb=Object['values'](_0x52caeb)['reduce']((_0x30fc32,_0x3b71a4)=>{return _0x30fc32+_0x3b71a4;},-0x8f5*-0x4+0x1bb9+-0x3f8d);_0x9bb6c4(_0x1cdcee,_0x463eeb);break;case'nid':let _0x1faea4=Object['values'](_0x52caeb)['reduce']((_0x1b4985,_0x4d4688)=>{return _0x1b4985['concat'](_0x4d4688);},[]);_0x9bb6c4(_0x1cdcee,_0x1faea4);break;default:_0x9bb6c4(_0x1cdcee,_0x52caeb);break;}});},'spawn':(_0x36eab7,_0x2a2a94)=>{_0x2a2a94=_0x2a2a94||function(){},global['distributi'+'on']['local']['status']['spawn'](_0x36eab7,(_0x5e8c7a,_0x9edc1d)=>{_0x5e8c7a?_0x2a2a94(_0x5e8c7a):global['distributi'+'on']['local']['groups']['add'](_0x47a05e['gid'],_0x36eab7,()=>{_0x2a2a94(null,_0x9edc1d);}),distribution[_0x47a05e['gid']]['comm']['send']([_0x47a05e['gid'],_0x36eab7],{'service':'groups','method':'add'},()=>{});});},'stop':_0x3e920e=>{distribution[_0x47a05e['gid']]['comm']['send']([],{'service':'status','method':'stop'},_0x3e920e);}};};module['exports']=status;
9
+ const status=function(_0x10e916){let _0x1a9d7f={};return _0x1a9d7f['gid']=_0x10e916['gid']||'global',{'get':(_0x19080f,_0xa09c20)=>{let _0x37276a=[_0x19080f],_0x24351b={'service':'status','method':'get'};global['distributi'+'on'][_0x1a9d7f['gid']]['comm']['send'](_0x37276a,_0x24351b,(_0x5ee7a3,_0x2fc89d)=>{switch(_0x19080f){case'heapTotal':let _0x476534=Object['values'](_0x2fc89d)['reduce']((_0x2bb271,_0x1c6692)=>{return _0x2bb271+_0x1c6692;},-0x1*0x240a+-0x1400+-0x957*-0x6);_0xa09c20(_0x5ee7a3,_0x476534);break;case'nid':let _0xac85e6=Object['values'](_0x2fc89d)['reduce']((_0x1d7179,_0x2cf423)=>{return _0x1d7179['concat'](_0x2cf423);},[]);_0xa09c20(_0x5ee7a3,_0xac85e6);break;default:_0xa09c20(_0x5ee7a3,_0x2fc89d);break;}});},'spawn':(_0x4dd9f2,_0x3fa0ed)=>{_0x3fa0ed=_0x3fa0ed||function(){},global['distributi'+'on']['local']['status']['spawn'](_0x4dd9f2,(_0x4a0fe6,_0x519888)=>{_0x4a0fe6?_0x3fa0ed(_0x4a0fe6):global['distributi'+'on']['local']['groups']['add'](_0x1a9d7f['gid'],_0x4dd9f2,()=>{_0x3fa0ed(null,_0x519888);}),distribution[_0x1a9d7f['gid']]['comm']['send']([_0x1a9d7f['gid'],_0x4dd9f2],{'service':'groups','method':'add'},()=>{});});},'stop':_0x431cb2=>{distribution[_0x1a9d7f['gid']]['comm']['send']([],{'service':'status','method':'stop'},_0x431cb2);}};};module['exports']=status;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g'),distribution=global['distributi'+'on'],util=distribution['util'];function getNode(_0x56d9a0,_0x164521,_0x4495f6){distribution[_0x56d9a0['gid']]['status']['get']('nid',(_0x56646c,_0x495510)=>{let _0x2cec7f=Object['values'](_0x495510),_0x1b9f86=util['id']['getID'](_0x164521),_0x47d598=_0x56d9a0['hash'](_0x1b9f86,_0x2cec7f),_0x358a8f=_0x47d598['substring'](-0x3*-0x3a1+-0x2466*-0x1+0x2f49*-0x1,-0x83*0x18+0x497+0x7b6);distribution['local']['groups']['get'](_0x56d9a0['gid'],(_0x533bcc,_0x5e1b80)=>{let _0x58b47b=_0x5e1b80[_0x358a8f];_0x4495f6(_0x58b47b);});});}const store=function(_0x38d58c){let _0x3cb975={};return _0x3cb975['gid']=_0x38d58c['gid']||'all',_0x3cb975['hash']=_0x38d58c['hash']||util['id']['naiveHash'],log('Store\x20serv'+'ice\x20initia'+'lized\x20for\x20'+_0x3cb975['gid']),{'get':(_0x3ddc07,_0x92711e)=>{if(!_0x3ddc07){let _0x2979f1=[{'key':null,'gid':_0x3cb975['gid']}];distribution[_0x3cb975['gid']]['comm']['send'](_0x2979f1,{'service':'store','method':'get'},(_0x56f553,_0x3fd7ab)=>{let _0xbbcac5=Object['values'](_0x3fd7ab)['reduce']((_0x4d091f,_0x424d51)=>_0x4d091f['concat'](_0x424d51),[]);_0x92711e(_0x56f553,_0xbbcac5);});return;}getNode(_0x3cb975,_0x3ddc07,_0x29aafb=>{let _0x4d40d6=[{'key':_0x3ddc07,'gid':_0x3cb975['gid']}],_0x33d7b9={'service':'store','method':'get','node':_0x29aafb};distribution['local']['comm']['send'](_0x4d40d6,_0x33d7b9,_0x92711e);});},'put':(_0x235514,_0x581010,_0x402f7f)=>{log('[all.store'+'.put]:\x20(gi'+'d:\x20'+_0x3cb975['gid']+')\x20'+_0x235514+'\x20'+_0x581010),_0x581010=_0x581010||util['id']['getID'](_0x235514),getNode(_0x3cb975,_0x581010,_0x845347=>{let _0x593765=[_0x235514,{'key':_0x581010,'gid':_0x3cb975['gid']}],_0x2af4dd={'service':'store','method':'put','node':_0x845347};distribution['local']['comm']['send'](_0x593765,_0x2af4dd,_0x402f7f);});},'del':(_0x2ff2d6,_0x5935ec)=>{getNode(_0x3cb975,_0x2ff2d6,_0x2fbcc4=>{let _0x41fd13=[{'key':_0x2ff2d6,'gid':_0x3cb975['gid']}],_0x9eace7={'service':'store','method':'del','node':_0x2fbcc4};distribution['local']['comm']['send'](_0x41fd13,_0x9eace7,_0x5935ec);});},'reconf':(_0x28240d,_0x14e4fa)=>{distribution[_0x3cb975['gid']]['store']['get'](null,(_0x8ab6f6,_0x20b9b2)=>{distribution[_0x3cb975['gid']]['status']['get']('nid',(_0x23fb50,_0x21eb4e)=>{let _0x25b2fa=Object['values'](_0x21eb4e),_0x46e3a7=Object['values'](_0x28240d)['map'](_0x51cbf1=>util['id']['getNID'](_0x51cbf1)),_0x24dcca=-0x1*0xaf3+-0xc2*-0x1d+-0xb07;const _0x5086d5=()=>{_0x24dcca===_0x20b9b2['length']&&_0x14e4fa();};if(_0x20b9b2['length']===0x10bf+-0x53*-0x3+-0x11b8){_0x14e4fa();return;}for(let _0x357dee of _0x20b9b2){let _0x35b038=util['id']['getID'](_0x357dee),_0x1ed0c2=_0x3cb975['hash'](_0x35b038,_0x46e3a7),_0x1c1776=_0x3cb975['hash'](_0x35b038,_0x25b2fa);if(_0x1ed0c2===_0x1c1776){_0x24dcca++,_0x5086d5();continue;}let _0x4914f1=_0x28240d[_0x1ed0c2['substring'](-0x1bf*0x7+0x4d*-0x59+0x7*0x592,0x3*-0x483+-0x944+0x16d2)],_0x58bc32=[{'key':_0x357dee,'gid':_0x3cb975['gid']}],_0x37d686={'service':'store','method':'del','node':_0x4914f1};distribution['local']['comm']['send'](_0x58bc32,_0x37d686,(_0x591ac2,_0x466571)=>{distribution[_0x3cb975['gid']]['store']['put'](_0x466571,_0x357dee,(_0x5bd4b5,_0x21c52f)=>{_0x24dcca++,_0x5086d5();});});}});});}};};module['exports']=store;
9
+ const distribution=global['distributi'+'on'],util=distribution['util'],log=require('../util/lo'+'g');function getNode(_0x3e9e60,_0x4b46f6,_0xe6fefe){distribution[_0x3e9e60['gid']]['status']['get']('nid',(_0x2ae0db,_0x3cfb71)=>{let _0x4fb87d=Object['values'](_0x3cfb71),_0x24b6fd=util['id']['getID'](_0x4b46f6),_0x1e834b=_0x3e9e60['hash'](_0x24b6fd,_0x4fb87d),_0x470dc0=_0x1e834b['substring'](-0x50a*0x3+0x2dd+-0xc41*-0x1,0x6ae*-0x5+-0x1d39+0xfa9*0x4);distribution['local']['groups']['get'](_0x3e9e60['gid'],(_0x21efc1,_0x29fdb0)=>{let _0x2449f7=_0x29fdb0[_0x470dc0];_0xe6fefe(_0x2449f7);});});}const store=function(_0x5dbb60){let _0x57a9ab={};return _0x57a9ab['gid']=_0x5dbb60['gid']||'all',_0x57a9ab['hash']=_0x5dbb60['hash']||util['id']['naiveHash'],{'get':(_0x2e73fd,_0x140ec0)=>{if(!_0x2e73fd){let _0x3a84aa=[{'key':null,'gid':_0x57a9ab['gid']}];distribution[_0x57a9ab['gid']]['comm']['send'](_0x3a84aa,{'service':'store','method':'get'},(_0x2e9aa2,_0x508a89)=>{log('[all.store'+'.get\x20null\x20'+'given\x20as\x20k'+'ey.\x20keys:\x20'+JSON['stringify'](_0x508a89)+'\x20errors:\x20'+JSON['stringify'](_0x2e9aa2));let _0x26371f=Object['values'](_0x508a89)['reduce']((_0xf6566e,_0x50861c)=>_0xf6566e['concat'](_0x50861c),[]);_0x140ec0(_0x2e9aa2,_0x26371f);});return;}getNode(_0x57a9ab,_0x2e73fd,_0x12e128=>{let _0x1bc8e1=[{'key':_0x2e73fd,'gid':_0x57a9ab['gid']}],_0x766431={'service':'store','method':'get','node':_0x12e128};distribution['local']['comm']['send'](_0x1bc8e1,_0x766431,_0x140ec0);});},'put':(_0x2a1326,_0x4b1dfa,_0x43b473)=>{_0x4b1dfa=_0x4b1dfa||util['id']['getID'](_0x2a1326),getNode(_0x57a9ab,_0x4b1dfa,_0x224dfe=>{let _0x50b6dd=[_0x2a1326,{'key':_0x4b1dfa,'gid':_0x57a9ab['gid']}],_0x2ad5bc={'service':'store','method':'put','node':_0x224dfe};log('[all.store'+'.put]:\x20(gi'+'d:\x20'+_0x57a9ab['gid']+')\x20'+JSON['stringify'](_0x2a1326)+'\x20'+JSON['stringify'](_0x4b1dfa)+('\x20target\x20no'+'de:\x20')+JSON['stringify'](_0x224dfe)),distribution['local']['comm']['send'](_0x50b6dd,_0x2ad5bc,_0x43b473);});},'del':(_0x211b98,_0x1c3adb)=>{getNode(_0x57a9ab,_0x211b98,_0xc10d0f=>{let _0x4086af=[{'key':_0x211b98,'gid':_0x57a9ab['gid']}],_0x4a2517={'service':'store','method':'del','node':_0xc10d0f};distribution['local']['comm']['send'](_0x4086af,_0x4a2517,_0x1c3adb);});},'reconf':(_0x18d2f0,_0x44d2a0)=>{distribution[_0x57a9ab['gid']]['store']['get'](null,(_0x14a159,_0x21891d)=>{distribution[_0x57a9ab['gid']]['status']['get']('nid',(_0x4b179c,_0xf55ddb)=>{let _0x4f2ccd=Object['values'](_0xf55ddb),_0x32968b=Object['values'](_0x18d2f0)['map'](_0x5a8956=>util['id']['getNID'](_0x5a8956));log('[store.rec'+'onf\x20receiv'+'ed\x20'+_0x21891d['length']+('\x20keys\x20from'+'\x20')+_0xf55ddb['length']+'\x20nodes');let _0x12bedd=0xd77+-0x2*-0x24+-0xdbf;const _0x4a4318=()=>{_0x12bedd===_0x21891d['length']&&_0x44d2a0();};if(_0x21891d['length']===0xed2+0x1496*0x1+-0x2368){_0x44d2a0();return;}for(let _0x4dc3a9 of _0x21891d){let _0x308386=util['id']['getID'](_0x4dc3a9),_0x30ecd0=_0x57a9ab['hash'](_0x308386,_0x32968b),_0x186048=_0x57a9ab['hash'](_0x308386,_0x4f2ccd);log('[store.rec'+'onf\x20old\x20ni'+'d:\x20'+_0x30ecd0+'\x20new\x20nid:\x20'+_0x186048);if(_0x30ecd0===_0x186048){_0x12bedd++,_0x4a4318();continue;}let _0x7c824=_0x18d2f0[_0x30ecd0['substring'](-0x1*-0xee0+0x399+0x1*-0x1279,-0x686+0x590+0x1*0xfb)],_0x23daca=[{'key':_0x4dc3a9,'gid':_0x57a9ab['gid']}],_0x23d0f6={'service':'store','method':'del','node':_0x7c824};log('[store.rec'+'onf]\x20delet'+'ing\x20key\x20'+_0x4dc3a9+'\x20from\x20'+JSON['stringify'](_0x23d0f6)),distribution['local']['comm']['send'](_0x23daca,_0x23d0f6,(_0x178a05,_0x52192f)=>{distribution[_0x57a9ab['gid']]['store']['put'](_0x52192f,_0x4dc3a9,(_0x5b35e7,_0x491613)=>{_0x12bedd++,_0x4a4318();});});}});});}};};module['exports']=store;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const http=require('http'),serialization=require('../util/se'+'rializatio'+'n'),log=require('../util/lo'+'g'),comm={};comm['send']=function(_0x2042bb,_0x2adad3,_0x4fdfd6){log('[comm.send'+']:\x20Sending'+'\x20'+JSON['stringify'](_0x2042bb)+'to\x20'+_0x2adad3['service']+':'+_0x2adad3['method']+'\x20on\x20'+_0x2adad3['node']['ip']+':'+_0x2adad3['node']['port']);if(!_0x2042bb instanceof Array)throw new Error('Message\x20mu'+'st\x20be\x20an\x20a'+'rray');let _0x2731cb=_0x2adad3['node'],_0x7b64fc=_0x2adad3['service'],_0x15f355=_0x2adad3['method'],_0x3b5711=serialization['serialize'](_0x2042bb);const _0x1f1996={'hostname':_0x2731cb['ip'],'port':_0x2731cb['port'],'path':'/'+_0x7b64fc+'/'+_0x15f355,'method':'PUT','headers':{'Content-Type':'applicatio'+'n/json','Content-Length':Buffer['byteLength'](_0x3b5711)}},_0x40d219=http['request'](_0x1f1996,_0x26f368=>{let _0x52670e='';_0x26f368['on']('data',function(_0x535ca0){_0x52670e+=_0x535ca0;}),_0x26f368['on']('end',function(){_0x4fdfd6&&_0x4fdfd6(...serialization['deserializ'+'e'](_0x52670e));}),_0x26f368['on']('error',function(_0x3e279d){_0x4fdfd6&&_0x4fdfd6(new Error('Error\x20on\x20r'+'esponse'));});});_0x40d219['on']('error',function(_0x494431){_0x4fdfd6&&_0x4fdfd6(new Error(_0x494431));}),_0x40d219['write'](_0x3b5711),_0x40d219['end']();},module['exports']=comm;
9
+ const http=require('http'),serialization=require('../util/se'+'rializatio'+'n'),log=require('../util/lo'+'g'),comm={};comm['send']=function(_0x20222e,_0x178670,_0x1f7971){log('[comm.send'+']:\x20Sending'+'\x20'+JSON['stringify'](_0x20222e)+'to\x20'+_0x178670['service']+':'+_0x178670['method']+'\x20on\x20'+_0x178670['node']['ip']+':'+_0x178670['node']['port']);if(!_0x20222e instanceof Array)throw new Error('Message\x20mu'+'st\x20be\x20an\x20a'+'rray');let _0x2fbeb0=_0x178670['node'],_0xce7333=_0x178670['service'],_0x4c1e21=_0x178670['method'],_0x52546a=serialization['serialize'](_0x20222e);const _0x2e4d0a={'hostname':_0x2fbeb0['ip'],'port':_0x2fbeb0['port'],'path':'/'+_0xce7333+'/'+_0x4c1e21,'method':'PUT','headers':{'Content-Type':'applicatio'+'n/json','Content-Length':Buffer['byteLength'](_0x52546a)}},_0x3ec78a=http['request'](_0x2e4d0a,_0x5d18a5=>{let _0x152634='';_0x5d18a5['on']('data',function(_0x259772){_0x152634+=_0x259772;}),_0x5d18a5['on']('end',function(){_0x1f7971&&_0x1f7971(...serialization['deserializ'+'e'](_0x152634));}),_0x5d18a5['on']('error',function(_0x14ec87){_0x1f7971&&_0x1f7971(new Error('Error\x20on\x20r'+'esponse'));});});_0x3ec78a['on']('error',function(_0x3199f8){_0x1f7971&&_0x1f7971(new Error(_0x3199f8));}),_0x3ec78a['write'](_0x52546a),_0x3ec78a['end']();},module['exports']=comm;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const gossip={},messageStore={'messages':[],'push':function(_0x2b6261){N=0xe47+0x16cb+-0x2508,messageStore['messages']['push'](_0x2b6261),messageStore['messages']['length']>N&&messageStore['messages']['shift']();},'has':function(_0x20373e){return messageStore['messages']['includes'](_0x20373e);}};gossip['recv']=function(_0x5bd71b,_0x5db55b){_0x5db55b=_0x5db55b||function(){};let _0x371b7d=_0x5bd71b['message'],_0x2234f8=_0x5bd71b['remote'],_0xa2b8d1=_0x5bd71b['mid'],_0x449a93=_0x5bd71b['gid'];if(messageStore['has'](_0xa2b8d1)){_0x5db55b(new Error('Message\x20al'+'ready\x20rece'+'ived'));return;}global['distributi'+'on'][_0x449a93]['gossip']['send'](_0x5bd71b,_0x2234f8),messageStore['push'](_0xa2b8d1),_0x2234f8['node']={'ip':global['nodeConfig']['ip'],'port':global['nodeConfig']['port']},global['distributi'+'on']['local']['comm']['send'](_0x371b7d,_0x2234f8,(_0x3df632,_0x9c9cb9)=>{_0x5db55b(_0x3df632,_0x9c9cb9);});},module['exports']=gossip;
9
+ const gossip={},messageStore={'messages':[],'push':function(_0x26d071){N=0x230a+0x55d+-0x285d,messageStore['messages']['push'](_0x26d071),messageStore['messages']['length']>N&&messageStore['messages']['shift']();},'has':function(_0x33111a){return messageStore['messages']['includes'](_0x33111a);}};gossip['recv']=function(_0x8be91c,_0x50c4b2){_0x50c4b2=_0x50c4b2||function(){};let _0x2356f6=_0x8be91c['message'],_0x5839c3=_0x8be91c['remote'],_0x3748be=_0x8be91c['mid'],_0x48d124=_0x8be91c['gid'];if(messageStore['has'](_0x3748be)){_0x50c4b2(new Error('Message\x20al'+'ready\x20rece'+'ived'));return;}global['distributi'+'on'][_0x48d124]['gossip']['send'](_0x8be91c,_0x5839c3),messageStore['push'](_0x3748be),_0x5839c3['node']={'ip':global['nodeConfig']['ip'],'port':global['nodeConfig']['port']},global['distributi'+'on']['local']['comm']['send'](_0x2356f6,_0x5839c3,(_0x38725f,_0x51ae4f)=>{_0x50c4b2(_0x38725f,_0x51ae4f);});},module['exports']=gossip;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- let groupsStore=new Map();groupsStore['all']={};const id=require('../util/id'),groups={};groups['get']=function(_0x72afeb,_0x499eb5){_0x499eb5=_0x499eb5||function(){},_0x72afeb in groupsStore?_0x499eb5(null,groupsStore[_0x72afeb]):_0x499eb5(new Error('Group\x20'+_0x72afeb+'\x20not\x20found'));},groups['put']=function(_0x301f90,_0x22851d,_0x5aad25){_0x22851d=_0x22851d||{},typeof _0x301f90==='string'&&(_0x301f90={'gid':_0x301f90}),groupsStore[_0x301f90['gid']]=_0x22851d,Object['keys'](_0x22851d)['forEach'](_0x2000be=>{groupsStore['all'][id['getSID'](_0x22851d[_0x2000be])]=_0x22851d[_0x2000be];}),global['distributi'+'on'][_0x301f90['gid']]={},global['distributi'+'on'][_0x301f90['gid']]['status']=require('../all/sta'+'tus')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['comm']=require('../all/com'+'m')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['gossip']=require('../all/gos'+'sip')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['groups']=require('../all/gro'+'ups')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['routes']=require('../all/rou'+'tes')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['mem']=require('../all/mem')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['store']=require('../all/sto'+'re')(_0x301f90),global['distributi'+'on'][_0x301f90['gid']]['mr']=require('../all/mr')(_0x301f90),_0x5aad25(null,_0x22851d);},groups['del']=function(_0x25cd81,_0x4fd651){if(_0x25cd81 in groupsStore){let _0x348cf1=groupsStore[_0x25cd81];delete groupsStore[_0x25cd81],_0x4fd651(null,_0x348cf1);}else _0x4fd651(new Error('Group\x20'+_0x25cd81+'\x20not\x20found'));},groups['add']=function(_0x6245f6,_0x1efc35,_0x4221e2){_0x4221e2=_0x4221e2||function(){},_0x6245f6 in groupsStore?(!groupsStore[_0x6245f6]&&(groupsStore[_0x6245f6]={}),groupsStore[_0x6245f6][id['getSID'](_0x1efc35)]=_0x1efc35,groupsStore['all'][id['getSID'](_0x1efc35)]=_0x1efc35,_0x4221e2&&_0x4221e2(null,groupsStore[_0x6245f6])):_0x4221e2&&_0x4221e2(new Error('Group\x20'+_0x6245f6+'\x20not\x20found'));},groups['rem']=function(_0x292d98,_0x4eb153,_0xba8fce){_0xba8fce=_0xba8fce||function(){},_0x292d98 in groupsStore?(delete groupsStore[_0x292d98][_0x4eb153],delete groupsStore['all'][_0x4eb153],_0xba8fce(null,groupsStore[_0x292d98])):_0xba8fce(new Error('Group\x20'+_0x292d98+'\x20not\x20found'));},module['exports']=groups;
9
+ const id=require('../util/id');let groupsStore=new Map();groupsStore['all']={};const groups={};groups['get']=function(_0x548145,_0x553b6a){_0x553b6a=_0x553b6a||function(){},_0x548145 in groupsStore?_0x553b6a(null,groupsStore[_0x548145]):_0x553b6a(new Error('Group\x20'+_0x548145+'\x20not\x20found'));},groups['put']=function(_0x222237,_0x403eb1,_0x5f19f1){_0x403eb1=_0x403eb1||{},typeof _0x222237==='string'&&(_0x222237={'gid':_0x222237}),groupsStore[_0x222237['gid']]=_0x403eb1,Object['keys'](_0x403eb1)['forEach'](_0xf06562=>{groupsStore['all'][id['getSID'](_0x403eb1[_0xf06562])]=_0x403eb1[_0xf06562];}),global['distributi'+'on'][_0x222237['gid']]={},global['distributi'+'on'][_0x222237['gid']]['status']=require('../all/sta'+'tus')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['comm']=require('../all/com'+'m')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['gossip']=require('../all/gos'+'sip')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['groups']=require('../all/gro'+'ups')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['routes']=require('../all/rou'+'tes')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['mem']=require('../all/mem')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['store']=require('../all/sto'+'re')(_0x222237),global['distributi'+'on'][_0x222237['gid']]['mr']=require('../all/mr')(_0x222237),_0x5f19f1(null,_0x403eb1);},groups['del']=function(_0x4a05ae,_0xe732f5){if(_0x4a05ae in groupsStore){let _0x15cebb=groupsStore[_0x4a05ae];delete groupsStore[_0x4a05ae],_0xe732f5(null,_0x15cebb);}else _0xe732f5(new Error('Group\x20'+_0x4a05ae+'\x20not\x20found'));},groups['add']=function(_0x3cd98c,_0x17f119,_0x1be392){_0x1be392=_0x1be392||function(){},_0x3cd98c in groupsStore?(!groupsStore[_0x3cd98c]&&(groupsStore[_0x3cd98c]={}),groupsStore[_0x3cd98c][id['getSID'](_0x17f119)]=_0x17f119,groupsStore['all'][id['getSID'](_0x17f119)]=_0x17f119,_0x1be392&&_0x1be392(null,groupsStore[_0x3cd98c])):_0x1be392&&_0x1be392(new Error('Group\x20'+_0x3cd98c+'\x20not\x20found'));},groups['rem']=function(_0x249426,_0x43fc84,_0x1d472e){_0x1d472e=_0x1d472e||function(){},_0x249426 in groupsStore?(delete groupsStore[_0x249426][_0x43fc84],delete groupsStore['all'][_0x43fc84],_0x1d472e(null,groupsStore[_0x249426])):_0x1d472e(new Error('Group\x20'+_0x249426+'\x20not\x20found'));},module['exports']=groups;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const id=require('../util/id'),log=require('../util/lo'+'g'),kvStore={'store':new Map(),'get'(_0xf42574){if(!this['store'][_0xf42574['gid']])return undefined;return this['store'][_0xf42574['gid']][_0xf42574['key']];},'put'(_0x352a33,_0x279851){!this['store'][_0x352a33['gid']]&&(this['store'][_0x352a33['gid']]=new Map()),this['store'][_0x352a33['gid']][_0x352a33['key']]=_0x279851;},'append'(_0x5cf71c,_0x66e5c4){!this['get'](_0x5cf71c)&&this['put'](_0x5cf71c,[]),!Array['isArray'](this['get'](_0x5cf71c))&&this['put'](_0x5cf71c,[this['get'](_0x5cf71c)]),Array['isArray'](_0x66e5c4)?this['put'](_0x5cf71c,this['get'](_0x5cf71c)['concat'](_0x66e5c4)):this['store'][_0x5cf71c['gid']][_0x5cf71c['key']]['push'](_0x66e5c4);},'del'(_0x592c91){if(!this['store'][_0x592c91['gid']])return undefined;let _0x330abd=this['store'][_0x592c91['gid']][_0x592c91['key']];return delete this['store'][_0x592c91['gid']][_0x592c91['key']],_0x330abd;},'toString'(){let _0x528f5a='';for(let _0x281e7b in this['store']){_0x528f5a+=_0x281e7b+':\x20'+JSON['stringify'](this['store'][_0x281e7b]);}return _0x528f5a;}};function normalize(_0x10282c){let _0x25b503={};_0x10282c===null&&(_0x10282c={});if(typeof _0x10282c==='string')_0x25b503['key']=_0x10282c,_0x25b503['gid']='local',_0x25b503['action']='put';else typeof _0x10282c==='object'&&(_0x25b503['key']=_0x10282c['key'],_0x25b503['gid']=_0x10282c['gid'],_0x25b503['action']=_0x10282c['action']);return _0x25b503;};const mem={};mem['put']=function(_0x27a718,_0x41cf7a,_0x5cacb4){log('[mem.put]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x41cf7a)+'state:\x20'+JSON['stringify'](_0x27a718)+'\x20store:\x20'+kvStore['toString']()+'\x20}'),_0x5cacb4=_0x5cacb4||function(){},_0x41cf7a=normalize(_0x41cf7a),_0x41cf7a['key']=_0x41cf7a['key']||id['getID'](_0x27a718),_0x41cf7a['gid']=_0x41cf7a['gid']||'local',_0x41cf7a['action']=_0x41cf7a['action']||'put',kvStore[_0x41cf7a['action']](_0x41cf7a,_0x27a718),log('[mem.put]\x20'+'store\x20(aft'+'er):\x20'+kvStore['toString']()),_0x5cacb4&&_0x5cacb4(null,_0x27a718);},mem['get']=function(_0x22f9e9,_0x618b2c){_0x618b2c=_0x618b2c||function(){},_0x22f9e9=normalize(_0x22f9e9),_0x22f9e9['gid']=_0x22f9e9['gid']||'local';if(!_0x22f9e9['key']){let _0x20c620=kvStore['store'][_0x22f9e9['gid']]||{};_0x20c620=Object['keys'](_0x20c620),_0x618b2c(null,_0x20c620);return;}let _0x2e68bc=kvStore['get'](_0x22f9e9);_0x2e68bc?_0x618b2c(null,_0x2e68bc):_0x618b2c(new Error('Memory\x20key'+'\x20\x22'+_0x22f9e9['key']+('\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20not\x20found'+'\x20for\x20')+_0x22f9e9['gid']+'\x27s\x20store'));},mem['del']=function(_0x2a6eb4,_0x99b816){_0x99b816=_0x99b816||function(){},_0x2a6eb4=normalize(_0x2a6eb4);let _0x4e8c44=kvStore['del'](_0x2a6eb4);_0x4e8c44?_0x99b816(null,_0x4e8c44):_0x99b816(new Error('Memory\x20key'+'\x20\x22'+_0x2a6eb4['key']+('\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'not\x20found\x20'+'for\x20')+_0x2a6eb4['gid']+'\x27s\x20store'));},module['exports']=mem;
9
+ const id=require('../util/id'),log=require('../util/lo'+'g'),kvStore={'store':new Map(),'get'(_0x47199d){if(!this['store'][_0x47199d['gid']])return undefined;return this['store'][_0x47199d['gid']][_0x47199d['key']];},'put'(_0x3e896e,_0x29b433){!this['store'][_0x3e896e['gid']]&&(this['store'][_0x3e896e['gid']]=new Map()),this['store'][_0x3e896e['gid']][_0x3e896e['key']]=_0x29b433;},'append'(_0x1e74e1,_0x3f1af2){!this['get'](_0x1e74e1)&&this['put'](_0x1e74e1,[]),!Array['isArray'](this['get'](_0x1e74e1))&&this['put'](_0x1e74e1,[this['get'](_0x1e74e1)]),Array['isArray'](_0x3f1af2)?this['put'](_0x1e74e1,this['get'](_0x1e74e1)['concat'](_0x3f1af2)):this['store'][_0x1e74e1['gid']][_0x1e74e1['key']]['push'](_0x3f1af2);},'del'(_0x48426f){if(!this['store'][_0x48426f['gid']])return undefined;let _0x3feeed=this['store'][_0x48426f['gid']][_0x48426f['key']];return delete this['store'][_0x48426f['gid']][_0x48426f['key']],_0x3feeed;},'toString'(){let _0x46d2ee='';for(let _0x28bf17 in this['store']){_0x46d2ee+=_0x28bf17+':\x20'+JSON['stringify'](this['store'][_0x28bf17]);}return _0x46d2ee;}};function normalize(_0x2fc7d0){let _0x40af61={};_0x2fc7d0===null&&(_0x2fc7d0={});if(typeof _0x2fc7d0==='string')_0x40af61['key']=_0x2fc7d0,_0x40af61['gid']='local',_0x40af61['action']='put';else typeof _0x2fc7d0==='object'&&(_0x40af61['key']=_0x2fc7d0['key'],_0x40af61['gid']=_0x2fc7d0['gid'],_0x40af61['action']=_0x2fc7d0['action']);return _0x40af61;};const mem={};mem['put']=function(_0x365c29,_0x1eecc4,_0x5758ad){log('[mem.put]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x1eecc4)+'state:\x20'+JSON['stringify'](_0x365c29)+'\x20store:\x20'+kvStore['toString']()),_0x5758ad=_0x5758ad||function(){},_0x1eecc4=normalize(_0x1eecc4),_0x1eecc4['key']=_0x1eecc4['key']||id['getID'](_0x365c29),_0x1eecc4['gid']=_0x1eecc4['gid']||'local',_0x1eecc4['action']=_0x1eecc4['action']||'put',kvStore[_0x1eecc4['action']](_0x1eecc4,_0x365c29),log('[mem.put]\x20'+'store\x20(aft'+'er):\x20'+kvStore['toString']()),_0x5758ad&&_0x5758ad(null,_0x365c29);},mem['get']=function(_0x3fae4f,_0x481bad){log('[mem.get]\x20'+'configurat'+'ion:\x20'+JSON['stringify'](_0x3fae4f)+'\x20store:\x20'+kvStore['toString']()),_0x481bad=_0x481bad||function(){},_0x3fae4f=normalize(_0x3fae4f),_0x3fae4f['gid']=_0x3fae4f['gid']||'local';if(!_0x3fae4f['key']){let _0x447c41=kvStore['store'][_0x3fae4f['gid']]||{};_0x447c41=Object['keys'](_0x447c41),_0x481bad(null,_0x447c41);return;}let _0x4edd56=kvStore['get'](_0x3fae4f);_0x4edd56?_0x481bad(null,_0x4edd56):_0x481bad(new Error('Memory\x20key'+'\x20\x22'+_0x3fae4f['key']+('\x22\x20\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20not\x20found'+'\x20for\x20')+_0x3fae4f['gid']+'\x27s\x20store'));},mem['del']=function(_0x471de6,_0x176fba){_0x176fba=_0x176fba||function(){},_0x471de6=normalize(_0x471de6);let _0x1cda6d=kvStore['del'](_0x471de6);_0x1cda6d?_0x176fba(null,_0x1cda6d):_0x176fba(new Error('Memory\x20key'+'\x20\x22'+_0x471de6['key']+('\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'not\x20found\x20'+'for\x20')+_0x471de6['gid']+'\x27s\x20store'));},module['exports']=mem;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const http=require('http'),url=require('url'),log=require('../util/lo'+'g'),serialization=require('../util/se'+'rializatio'+'n');function isValidBody(_0x1eeae6){error=undefined;if(_0x1eeae6['length']===0x576*-0x4+0x1611+0x3*-0x13)return new Error('No\x20body');try{_0x1eeae6=JSON['parse'](_0x1eeae6);}catch(_0x53fe26){return _0x53fe26;}return error;}function endRequest(_0x3f40df,_0xb84622){_0x3f40df['end'](serialization['serialize']([_0xb84622]));}const start=function(_0x2cc9a7){const _0x4aa175=http['createServ'+'er']((_0x3d7832,_0x221a47)=>{if(_0x3d7832['method']!=='PUT'){_0x221a47['end'](serialization['serialize'](new Error('Method\x20not'+'\x20allowed!')));return;}const _0x16c7c9=url['parse'](_0x3d7832['url'])['pathname'],[,_0x3e8b4f,_0x3ad23e]=_0x16c7c9['split']('/');log('[server]\x20g'+'ot\x20request'+'\x20'+_0x3e8b4f+':'+_0x3ad23e);let _0x3b3614=[];_0x3d7832['on']('data',_0x12f62a=>{_0x3b3614['push'](_0x12f62a);}),_0x3d7832['on']('end',()=>{_0x3b3614=Buffer['concat'](_0x3b3614)['toString']();let _0x19fad1;if(_0x19fad1=isValidBody(_0x3b3614)){endRequest(_0x221a47,_0x19fad1);return;}_0x3b3614=JSON['parse'](_0x3b3614),_0x3b3614=serialization['deserializ'+'e'](_0x3b3614);let _0x265cfd=_0x3b3614;!Array['isArray'](_0x265cfd)&&endRequest(_0x221a47,new Error('Invalid\x20ar'+'gument\x20typ'+'e,\x20expecte'+'d\x20array,\x20g'+'ot\x20'+typeof _0x265cfd));let _0x4f2523=_0x3e8b4f;global['distributi'+'on']['local']['routes']['get'](_0x4f2523,(_0x2e4569,_0x4d5395)=>{const _0x48d919=(_0x3659aa,_0x5b6bb8)=>{_0x221a47['end'](serialization['serialize']([_0x3659aa,_0x5b6bb8]));};if(_0x2e4569){_0x48d919(_0x2e4569);return;}if(!_0x4d5395[_0x3ad23e]){_0x48d919(new Error('Method\x20'+_0x3ad23e+('\x20not\x20found'+'\x20in\x20servic'+'e\x20')+_0x4f2523));return;}log('[server]\x20\x20'+'Calling\x20se'+'rvice:\x20'+_0x4f2523+':'+_0x3ad23e+('with\x20args:'+'\x20')+JSON['stringify'](_0x265cfd));_0x265cfd['length']===0x41c+0x12bb*-0x1+-0x24*-0x68&&_0x4d5395[_0x3ad23e]['length']===0x5f*0x15+-0x12d+-0x1*0x69b&&_0x265cfd['push'](undefined);try{_0x4d5395[_0x3ad23e](..._0x265cfd,_0x48d919);}catch(_0x54a2a7){_0x48d919(_0x54a2a7);}});});});_0x4aa175['listen'](global['nodeConfig']['port'],global['nodeConfig']['ip'],()=>{log('Server\x20run'+'ning\x20at\x20ht'+'tp://'+global['nodeConfig']['ip']+':'+global['nodeConfig']['port']+'/'),global['distributi'+'on']['node']['server']=_0x4aa175,_0x2cc9a7(_0x4aa175);}),_0x4aa175['on']('error',_0x32467f=>{log('Server\x20err'+'or:\x20'+_0x32467f);throw _0x32467f;});};module['exports']={'start':start};
9
+ const http=require('http'),url=require('url'),log=require('../util/lo'+'g'),serialization=require('../util/se'+'rializatio'+'n');function isValidBody(_0x3c90ba){error=undefined;if(_0x3c90ba['length']===0x1e00+0x45*0x79+-0x3e9d)return new Error('No\x20body');try{_0x3c90ba=JSON['parse'](_0x3c90ba);}catch(_0x143a6d){return _0x143a6d;}return error;}function endRequest(_0x278750,_0x4a1a1c){_0x278750['end'](serialization['serialize']([_0x4a1a1c]));}const start=function(_0x4f1000){const _0x594358=http['createServ'+'er']((_0x152767,_0x371f1d)=>{if(_0x152767['method']!=='PUT'){_0x371f1d['end'](serialization['serialize'](new Error('Method\x20not'+'\x20allowed!')));return;}const _0x5a24fd=url['parse'](_0x152767['url'])['pathname'],[,_0x26b13c,_0x2bd55b]=_0x5a24fd['split']('/');log('[server]\x20g'+'ot\x20request'+'\x20'+_0x26b13c+':'+_0x2bd55b);let _0x5a5a2a=[];_0x152767['on']('data',_0x36ab9e=>{_0x5a5a2a['push'](_0x36ab9e);}),_0x152767['on']('end',()=>{_0x5a5a2a=Buffer['concat'](_0x5a5a2a)['toString']();let _0x397d30;if(_0x397d30=isValidBody(_0x5a5a2a)){endRequest(_0x371f1d,_0x397d30);return;}_0x5a5a2a=JSON['parse'](_0x5a5a2a),_0x5a5a2a=serialization['deserializ'+'e'](_0x5a5a2a);let _0x381627=_0x5a5a2a;!Array['isArray'](_0x381627)&&endRequest(_0x371f1d,new Error('Invalid\x20ar'+'gument\x20typ'+'e,\x20expecte'+'d\x20array,\x20g'+'ot\x20'+typeof _0x381627));let _0x4805d4=_0x26b13c;global['distributi'+'on']['local']['routes']['get'](_0x4805d4,(_0x251e82,_0x4dbc9e)=>{const _0x1c8904=(_0x41cbed,_0x4b0d9c)=>{_0x371f1d['end'](serialization['serialize']([_0x41cbed,_0x4b0d9c]));};if(_0x251e82){_0x1c8904(_0x251e82);return;}if(!_0x4dbc9e[_0x2bd55b]){_0x1c8904(new Error('Method\x20'+_0x2bd55b+('\x20not\x20found'+'\x20in\x20servic'+'e\x20')+_0x4805d4));return;}log('[server]\x20\x20'+'Calling\x20se'+'rvice:\x20'+_0x4805d4+':'+_0x2bd55b+('\x20with\x20args'+':\x20')+JSON['stringify'](_0x381627));_0x381627['length']===0x7d6+0x263*0x1+0x28e*-0x4&&_0x4dbc9e[_0x2bd55b]['length']===0x661+-0xf20+0x8c2&&_0x381627['push'](undefined);try{_0x4dbc9e[_0x2bd55b](..._0x381627,_0x1c8904);}catch(_0x2e8cd2){_0x1c8904(_0x2e8cd2);}});});});_0x594358['listen'](global['nodeConfig']['port'],global['nodeConfig']['ip'],()=>{log('Server\x20run'+'ning\x20at\x20ht'+'tp://'+global['nodeConfig']['ip']+':'+global['nodeConfig']['port']+'/'),global['distributi'+'on']['node']['server']=_0x594358,_0x4f1000(_0x594358);}),_0x594358['on']('error',_0x2fe70b=>{log('Server\x20err'+'or:\x20'+_0x2fe70b);throw _0x2fe70b;});};module['exports']={'start':start};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const log=require('../util/lo'+'g'),routesStore=new Map(),routes={};routes['get']=function(_0x226435,_0x250efb){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+_0x226435);if(!_0x250efb)return;if(_0x226435 in routesStore){log('[routes.ge'+'t]\x20Found\x20s'+'ervice:\x20'+_0x226435);let _0x26c66b=routesStore[_0x226435];_0x250efb(null,_0x26c66b);}else{const _0x537c1=global['toLocal']['get'](_0x226435);_0x537c1?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x226435),_0x250efb(null,{'call':_0x537c1})):_0x250efb(new Error('Service\x20'+_0x226435+('\x20not\x20found'+'\x20in\x20routes')));}},routes['put']=function(_0x5a315d,_0x37e6e1,_0x19a632){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x37e6e1),routesStore[_0x37e6e1]=_0x5a315d;_0x19a632&&_0x19a632(null,_0x37e6e1);;},routes['rem']=function(_0x54714b,_0x247021){delete routesStore[_0x54714b];},module['exports']=routes;
9
+ const log=require('../util/lo'+'g'),routesStore=new Map(),routes={};routes['get']=function(_0x5bd4d0,_0x2f5845){log('[routes.ge'+'t]\x20Getting'+'\x20service:\x20'+_0x5bd4d0);if(!_0x2f5845)return;if(_0x5bd4d0 in routesStore){log('[routes.ge'+'t]\x20Found\x20s'+'ervice:\x20'+_0x5bd4d0);let _0x313ffc=routesStore[_0x5bd4d0];_0x2f5845(null,_0x313ffc);}else{const _0x1d001d=global['toLocal']['get'](_0x5bd4d0);_0x1d001d?(log('[routes.ge'+'t]\x20Found\x20R'+'PC:\x20'+_0x5bd4d0),_0x2f5845(null,{'call':_0x1d001d})):_0x2f5845(new Error('Service\x20'+_0x5bd4d0+('\x20not\x20found'+'\x20in\x20routes')));}},routes['put']=function(_0x109678,_0x5898b7,_0x52c330){log('[routes.pu'+'t]\x20Putting'+'\x20service:\x20'+_0x5898b7),routesStore[_0x5898b7]=_0x109678;_0x52c330&&_0x52c330(null,_0x5898b7);;},routes['rem']=function(_0x5a02a7,_0x3d6555){delete routesStore[_0x5a02a7];},module['exports']=routes;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const id=require('../util/id'),log=require('../util/lo'+'g'),status={};global['moreStatus']={'sid':id['getSID'](global['nodeConfig']),'nid':id['getNID'](global['nodeConfig']),'counts':0x0},status['get']=function(_0x299f10,_0x127561){_0x127561=_0x127561||function(){};if(_0x299f10 in global['nodeConfig'])_0x127561(null,global['nodeConfig'][_0x299f10]);else{if(_0x299f10 in moreStatus)_0x127561(null,moreStatus[_0x299f10]);else{if(_0x299f10==='heapTotal')_0x127561(null,process['memoryUsag'+'e']()['heapTotal']);else _0x299f10==='heapUsed'?_0x127561(null,process['memoryUsag'+'e']()['heapUsed']):_0x127561(new Error('Status\x20key'+'\x20not\x20found'));}}};const path=require('path'),{spawn}=require('child_proc'+'ess'),wire=require('../util/wi'+'re'),createSpawnedCb=function(_0x3d4381,_0x27e09a){let _0x8e9a53='\x0a\x20\x20\x20\x20let\x20o'+'nStart\x20=\x20'+_0x3d4381['toString']()+(';\x0a\x0a\x20\x20\x20\x20let'+'\x20callbackR'+'PC\x20=\x20')+wire['createRPC'](wire['toAsync'](_0x27e09a))['toString']()+(';\x0a\x0a\x20\x20\x20\x20try'+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20onStart()'+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'callbackRP'+'C(null,\x20gl'+'obal.nodeC'+'onfig,\x20()\x20'+'=>\x20{});\x0a\x20\x20'+'\x20\x20}\x0a\x20\x20\x20\x20ca'+'tch\x20(e)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20ca'+'llbackRPC('+'e,\x20null,\x20('+')\x20=>\x20{});\x0a'+'\x20\x20\x20\x20}\x0a\x20\x20\x20\x20');return new Function(_0x8e9a53);};status['spawn']=function(_0x382039,_0x474cdc){const _0x5abc90=_0x382039;_0x5abc90['onStart']=_0x5abc90['onStart']||function(){};if(!_0x5abc90['port']||!_0x5abc90['ip']){_0x474cdc(new Error('Port\x20and\x20I'+'P\x20are\x20requ'+'ired\x20in\x20th'+'e\x20configur'+'ation'));return;}log('[status.sp'+'awn]\x20Spawn'+'ing\x20node\x20w'+'ith\x20config'+'uration:\x20'+JSON['stringify'](_0x5abc90)),_0x5abc90['onStart']=createSpawnedCb(_0x5abc90['onStart'],_0x474cdc);const _0xd3ce64=path['join'](__dirname,'../../dist'+'ribution.j'+'s');let _0x2faa93=spawn('node',[_0xd3ce64,'--config',global['distributi'+'on']['util']['serialize'](_0x5abc90)],{'detached':!![],'stdio':'inherit'});_0x2faa93;},status['stop']=function(_0x83069){_0x83069=_0x83069||function(){},_0x83069(null,global['nodeConfig']),setTimeout(()=>{log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),global['distributi'+'on']['node']['server']['close'](),process['exit'](-0xa7*0x1+-0xb1a*0x2+0x1*0x16db);},-0x1*0x71e+0x1013+-0x8f5);},module['exports']=status;
9
+ const id=require('../util/id'),log=require('../util/lo'+'g'),status={};global['moreStatus']={'sid':id['getSID'](global['nodeConfig']),'nid':id['getNID'](global['nodeConfig']),'counts':0x0},status['get']=function(_0x353928,_0x131b75){_0x131b75=_0x131b75||function(){};if(_0x353928 in global['nodeConfig'])_0x131b75(null,global['nodeConfig'][_0x353928]);else{if(_0x353928 in moreStatus)_0x131b75(null,moreStatus[_0x353928]);else{if(_0x353928==='heapTotal')_0x131b75(null,process['memoryUsag'+'e']()['heapTotal']);else _0x353928==='heapUsed'?_0x131b75(null,process['memoryUsag'+'e']()['heapUsed']):_0x131b75(new Error('Status\x20key'+'\x20not\x20found'));}}};const path=require('path'),{spawn}=require('child_proc'+'ess'),wire=require('../util/wi'+'re'),createSpawnedCb=function(_0x382ce5,_0x1b9ee4){let _0x6a8275='\x0a\x20\x20\x20\x20let\x20o'+'nStart\x20=\x20'+_0x382ce5['toString']()+(';\x0a\x0a\x20\x20\x20\x20let'+'\x20callbackR'+'PC\x20=\x20')+wire['createRPC'](wire['toAsync'](_0x1b9ee4))['toString']()+(';\x0a\x0a\x20\x20\x20\x20try'+'\x20{\x0a\x20\x20\x20\x20\x20\x20\x20'+'\x20onStart()'+';\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+'callbackRP'+'C(null,\x20gl'+'obal.nodeC'+'onfig,\x20()\x20'+'=>\x20{});\x0a\x20\x20'+'\x20\x20}\x0a\x20\x20\x20\x20ca'+'tch\x20(e)\x20{\x0a'+'\x20\x20\x20\x20\x20\x20\x20\x20ca'+'llbackRPC('+'e,\x20null,\x20('+')\x20=>\x20{});\x0a'+'\x20\x20\x20\x20}\x0a\x20\x20\x20\x20');return new Function(_0x6a8275);};status['spawn']=function(_0x536dc8,_0x1a0f0c){const _0x87060d=_0x536dc8;_0x87060d['onStart']=_0x87060d['onStart']||function(){};if(!_0x87060d['port']||!_0x87060d['ip']){_0x1a0f0c(new Error('Port\x20and\x20I'+'P\x20are\x20requ'+'ired\x20in\x20th'+'e\x20configur'+'ation'));return;}log('[status.sp'+'awn]\x20Spawn'+'ing\x20node\x20w'+'ith\x20config'+'uration:\x20'+JSON['stringify'](_0x87060d)),_0x87060d['onStart']=createSpawnedCb(_0x87060d['onStart'],_0x1a0f0c);const _0x4b01d9=path['join'](__dirname,'../../dist'+'ribution.j'+'s');let _0x464f8c=spawn('node',[_0x4b01d9,'--config',global['distributi'+'on']['util']['serialize'](_0x87060d)],{'detached':!![],'stdio':'inherit'});_0x464f8c;},status['stop']=function(_0x46ba71){_0x46ba71=_0x46ba71||function(){},_0x46ba71(null,global['nodeConfig']),log('[status.st'+'op]\x20Shutti'+'ng\x20down\x20no'+'de'),global['distributi'+'on']['node']['server']['close'](),process['exit'](-0x1*0x1c12+-0x12c6+-0x8*-0x5db);},module['exports']=status;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const fs=require('fs'),path=require('path'),id=require('../util/id'),serialization=require('../util/se'+'rializatio'+'n'),store={},baseFolder=path['join'](__dirname,'../../stor'+'e');!fs['existsSync'](baseFolder)&&fs['mkdirSync'](baseFolder);!fs['existsSync'](baseFolder+'/s-'+global['moreStatus']['sid'])&&fs['mkdirSync'](baseFolder+'/s-'+global['moreStatus']['sid']);function normalize(_0x5eb1ad){let _0x12bd9f={};_0x5eb1ad===null&&(_0x5eb1ad={});if(typeof _0x5eb1ad==='string')_0x12bd9f['key']=_0x5eb1ad,_0x12bd9f['gid']='local';else typeof _0x5eb1ad==='object'&&(_0x12bd9f['key']=_0x5eb1ad['key'],_0x12bd9f['gid']=_0x5eb1ad['gid']);return _0x12bd9f;};store['put']=function(_0x1bb1ac,_0x36fab2,_0x46b437){_0x46b437=_0x46b437||function(){},_0x36fab2=normalize(_0x36fab2),_0x36fab2['key']=_0x36fab2['key']||id['getID'](_0x1bb1ac),_0x36fab2['gid']=_0x36fab2['gid']||'local';let _0x5d3b2c=serialization['serialize'](_0x1bb1ac),_0x22a85e=Buffer['from'](_0x36fab2['key'])['toString']('base64');_0x22a85e=baseFolder+'/s-'+global['moreStatus']['sid']+'/'+_0x36fab2['gid']+'-'+_0x22a85e,fs['writeFile'](_0x22a85e,_0x5d3b2c,_0x2572e4=>{_0x2572e4?_0x46b437(_0x2572e4):_0x46b437(null,_0x1bb1ac);});},store['get']=function(_0x29839d,_0x23d3b7){_0x23d3b7=_0x23d3b7||function(){},_0x29839d=normalize(_0x29839d),_0x29839d['gid']=_0x29839d['gid']||'local';if(!_0x29839d['key']){fs['readdir'](baseFolder+'/s-'+global['moreStatus']['sid'],(_0x38ca91,_0x3de406)=>{if(_0x38ca91)_0x23d3b7(_0x38ca91);else{let _0x4624b4=[];for(let _0x1a6a62=0xe77+0x2*0x3fd+-0x1671;_0x1a6a62<_0x3de406['length'];_0x1a6a62++){let _0x58f448=_0x3de406[_0x1a6a62]['split']('-'),_0x3c0d63=_0x58f448[-0x12a*0x1c+-0x1*-0x1fb5+0xe3];if(_0x3c0d63!==_0x29839d['gid'])continue;_0x58f448=_0x58f448[_0x58f448['length']-(0x7c*-0x44+-0xf27+0x3018)],_0x4624b4['push'](Buffer['from'](_0x58f448,'base64')['toString']());}_0x23d3b7(null,_0x4624b4);}});return;}let _0x5e7471=Buffer['from'](_0x29839d['key'])['toString']('base64');_0x5e7471=baseFolder+'/s-'+global['moreStatus']['sid']+'/'+_0x29839d['gid']+'-'+_0x5e7471,fs['exists'](_0x5e7471,_0x18ba52=>{if(!_0x18ba52){_0x23d3b7(new Error('File\x20'+_0x5e7471+('\x20not\x20found'+'\x20for\x20group'+'\x0a')+_0x29839d['gid']));return;}fs['readFile'](_0x5e7471,(_0x2f1e2b,_0xd7cd4d)=>{_0xd7cd4d=_0xd7cd4d['toString']();if(!_0x23d3b7)return;_0x2f1e2b?_0x23d3b7(_0x2f1e2b):_0x23d3b7(null,serialization['deserializ'+'e'](_0xd7cd4d));});});},store['del']=function(_0x56da0d,_0x47f178){_0x47f178=_0x47f178||function(){},_0x56da0d=normalize(_0x56da0d);let _0x2b7e49=Buffer['from'](_0x56da0d['key'])['toString']('base64');_0x2b7e49=baseFolder+'/s-'+global['moreStatus']['sid']+'/'+_0x56da0d['gid']+'-'+_0x2b7e49,fs['exists'](_0x2b7e49,_0x2b21d9=>{if(!_0x2b21d9){_0x47f178(new Error('File\x20'+_0x2b7e49+('\x20not\x20found'+'\x20for\x20group'+'\x0a')+_0x56da0d['gid']));return;}store['get'](_0x56da0d,(_0x434439,_0x2369e2)=>{fs['rm'](_0x2b7e49,function(_0x9fd879){_0x9fd879?_0x47f178(_0x9fd879):_0x47f178(null,_0x2369e2);});});});},module['exports']=store;
9
+ const fs=require('fs'),path=require('path'),id=require('../util/id'),serialization=require('../util/se'+'rializatio'+'n'),log=require('../util/lo'+'g'),baseFolder=path['join'](__dirname,'../../stor'+'e');!fs['existsSync'](baseFolder)&&fs['mkdirSync'](baseFolder);!fs['existsSync'](baseFolder+'/s-'+global['moreStatus']['sid'])&&fs['mkdirSync'](baseFolder+'/s-'+global['moreStatus']['sid']);function normalize(_0x2649f8){let _0x332f66={};_0x2649f8===null&&(_0x2649f8={});if(typeof _0x2649f8==='string')_0x332f66['key']=_0x2649f8,_0x332f66['gid']='local';else typeof _0x2649f8==='object'&&(_0x332f66['key']=_0x2649f8['key'],_0x332f66['gid']=_0x2649f8['gid']);return _0x332f66;};const store={};store['put']=function(_0x4f6c88,_0x5e215c,_0x525bcf){_0x525bcf=_0x525bcf||function(){},_0x5e215c=normalize(_0x5e215c),_0x5e215c['key']=_0x5e215c['key']||id['getID'](_0x4f6c88),_0x5e215c['gid']=_0x5e215c['gid']||'local';let _0x14fdde=serialization['serialize'](_0x4f6c88),_0x1c82d9=Buffer['from'](_0x5e215c['key'])['toString']('base64');_0x1c82d9=baseFolder+'/s-'+global['moreStatus']['sid']+'/'+_0x5e215c['gid']+'-'+_0x1c82d9,log('[store.put'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x5e215c)+'\x20state:\x20'+JSON['stringify'](_0x4f6c88)+('\x20filename:'+'\x20')+_0x1c82d9),fs['writeFile'](_0x1c82d9,_0x14fdde,_0x29afdb=>{_0x29afdb?_0x525bcf(_0x29afdb):_0x525bcf(null,_0x4f6c88);});},store['get']=function(_0x9cf68f,_0x5d4053){_0x5d4053=_0x5d4053||function(){},_0x9cf68f=normalize(_0x9cf68f),_0x9cf68f['gid']=_0x9cf68f['gid']||'local';if(!_0x9cf68f['key']){fs['readdir'](baseFolder+'/s-'+global['moreStatus']['sid'],(_0x20edbf,_0x145336)=>{if(_0x20edbf)_0x5d4053(_0x20edbf);else{let _0x34823c=[];for(let _0x4ead2d=-0x10*-0x15b+-0x3*-0x8e7+-0x3065;_0x4ead2d<_0x145336['length'];_0x4ead2d++){let _0x339642=_0x145336[_0x4ead2d]['split']('-'),_0x231ca0=_0x339642[-0x5*-0x595+-0x1*0x471+-0x1778];if(_0x231ca0!==_0x9cf68f['gid'])continue;_0x339642=_0x339642[_0x339642['length']-(0x1f06+0x2*0xe5+-0x20cf)],_0x34823c['push'](Buffer['from'](_0x339642,'base64')['toString']());}_0x5d4053(null,_0x34823c);}});return;}let _0x2730b9=Buffer['from'](_0x9cf68f['key'])['toString']('base64');_0x2730b9=baseFolder+'/s-'+global['moreStatus']['sid']+'/'+_0x9cf68f['gid']+'-'+_0x2730b9,log('[store.get'+']\x20configur'+'ation:\x20'+JSON['stringify'](_0x9cf68f)+('\x20filename:'+'\x20')+_0x2730b9),fs['exists'](_0x2730b9,_0x463fe9=>{if(!_0x463fe9){_0x5d4053(new Error('File\x20'+_0x2730b9+('\x20(from\x20key'+'\x20\x27')+_0x9cf68f['key']+('\x27)\x20not\x20fou'+'nd\x20for\x20gro'+'up\x20')+_0x9cf68f['gid']));return;}fs['readFile'](_0x2730b9,(_0x1c1fa6,_0x515946)=>{if(!_0x5d4053)return;_0x1c1fa6?_0x5d4053(_0x1c1fa6):(_0x515946=_0x515946['toString'](),_0x5d4053(null,serialization['deserializ'+'e'](_0x515946)));});});},store['del']=function(_0x21915c,_0x5d2562){_0x5d2562=_0x5d2562||function(){},_0x21915c=normalize(_0x21915c);let _0x56e6d4=Buffer['from'](_0x21915c['key'])['toString']('base64');_0x56e6d4=baseFolder+'/s-'+global['moreStatus']['sid']+'/'+_0x21915c['gid']+'-'+_0x56e6d4,fs['exists'](_0x56e6d4,_0x3cebe4=>{if(!_0x3cebe4){_0x5d2562(new Error('File\x20'+_0x56e6d4+('\x20not\x20found'+'\x20for\x20group'+'\x0a')+_0x21915c['gid']));return;}store['get'](_0x21915c,(_0x210eca,_0x3f35d3)=>{fs['rm'](_0x56e6d4,function(_0x5121b8){_0x5121b8?_0x5d2562(_0x5121b8):_0x5d2562(null,_0x3f35d3);});});});},module['exports']=store;
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const assert=require('assert');var crypto=require('crypto');function getID(_0x599bbb){const _0x4d5fdd=crypto['createHash']('sha256');return _0x4d5fdd['update'](JSON['stringify'](_0x599bbb)),_0x4d5fdd['digest']('hex');}function getNID(_0x5e7587){return _0x5e7587={'ip':_0x5e7587['ip'],'port':_0x5e7587['port']},getID(_0x5e7587);}function getSID(_0x1fa62e){return getNID(_0x1fa62e)['substring'](-0x10*0x156+0x26e7*-0x1+0x1*0x3c47,0x629*-0x4+0x1e5b*0x1+0x36*-0x1b);}function idToNum(_0x1e938a){let _0x19cf6a=parseInt(_0x1e938a,0x1e6b+-0x27c*-0x6+0x1*-0x2d43);return assert(!isNaN(_0x19cf6a),'idToNum:\x20i'+'d\x20is\x20not\x20i'+'n\x20KID\x20form'+'!'),_0x19cf6a;}function naiveHash(_0x2e5398,_0x3c5f95){return _0x3c5f95['sort'](),_0x3c5f95[idToNum(_0x2e5398)%_0x3c5f95['length']];}function consistentHash(_0x506995,_0x2ab120){const _0x5e13c2=idToNum(_0x506995),_0xbbdb88=_0x2ab120['map'](_0x535d21=>({'id':_0x535d21,'hash':idToNum(_0x535d21)}));_0xbbdb88['sort']((_0x3dbcf9,_0x4f618b)=>_0x3dbcf9['hash']-_0x4f618b['hash']);for(let _0x31fbec of _0xbbdb88){if(_0x5e13c2<=_0x31fbec['hash'])return _0x31fbec['id'];}return _0xbbdb88[-0x1e*0x1+0x23a1+-0x2383]['id'];}function rendezvousHash(_0x51dd12,_0x12c01f){let _0x1c9c13=-0x2326+-0x1c4f*0x1+-0xf*-0x43b,_0x517287=null;for(let _0x31ef4e of _0x12c01f){let _0x432584=getID(_0x51dd12+_0x31ef4e),_0x3febcb=idToNum(_0x432584);_0x3febcb>_0x1c9c13&&(_0x1c9c13=_0x3febcb,_0x517287=_0x31ef4e);}return _0x517287;}module['exports']={'getID':getID,'getNID':getNID,'getSID':getSID,'naiveHash':naiveHash,'consistentHash':consistentHash,'rendezvousHash':rendezvousHash};
9
+ const assert=require('assert');let crypto=require('crypto');function getID(_0x5f31f2){const _0x53d207=crypto['createHash']('sha256');return _0x53d207['update'](JSON['stringify'](_0x5f31f2)),_0x53d207['digest']('hex');}function getNID(_0x28fe04){return _0x28fe04={'ip':_0x28fe04['ip'],'port':_0x28fe04['port']},getID(_0x28fe04);}function getSID(_0x21c20a){return getNID(_0x21c20a)['substring'](-0x1dd9+0x6d*0x34+0x7b5*0x1,0x98*0x12+0x1c7e+-0x2729);}function getMID(_0x33aab6){let _0x3e1b97={};return _0x3e1b97['date']=new Date()['getTime'](),_0x3e1b97['mss']=_0x33aab6,getID(_0x3e1b97);}function idToNum(_0x15d192){let _0x1d34f5=parseInt(_0x15d192,0x2*-0xfe5+0x7a8*0x1+-0x13*-0x146);return assert(!isNaN(_0x1d34f5),'idToNum:\x20i'+'d\x20is\x20not\x20i'+'n\x20KID\x20form'+'!'),_0x1d34f5;}function naiveHash(_0x1d5cb4,_0x3f1012){return _0x3f1012['sort'](),_0x3f1012[idToNum(_0x1d5cb4)%_0x3f1012['length']];}function consistentHash(_0x4e5f45,_0x5746ab){const _0x538c24=idToNum(_0x4e5f45),_0x3c7afa=_0x5746ab['map'](_0x1c1f69=>({'id':_0x1c1f69,'hash':idToNum(_0x1c1f69)}));_0x3c7afa['sort']((_0x21fce7,_0x48bc19)=>_0x21fce7['hash']-_0x48bc19['hash']);for(let _0x49d72d of _0x3c7afa){if(_0x538c24<=_0x49d72d['hash'])return _0x49d72d['id'];}return _0x3c7afa[-0x212c+0xdd8*-0x2+0x5*0xc2c]['id'];}function rendezvousHash(_0x453121,_0x15d6f4){let _0x173513=-0x42b+-0x1*0x2425+-0x35c*-0xc,_0x42d640=null;for(let _0x57f925 of _0x15d6f4){let _0x358aec=getID(_0x453121+_0x57f925),_0x49e5b3=idToNum(_0x358aec);_0x49e5b3>_0x173513&&(_0x173513=_0x49e5b3,_0x42d640=_0x57f925);}return _0x42d640;}module['exports']={'getID':getID,'getNID':getNID,'getSID':getSID,'getMID':getMID,'naiveHash':naiveHash,'consistentHash':consistentHash,'rendezvousHash':rendezvousHash};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- var nativeFunctions={'forward':new Map(),'reverse':new Map()};function createNativeMap(){var _0x43938f=[];function _0x21c53d(_0x4fba12,_0x4b9cc6){if(_0x4b9cc6===null||_0x4b9cc6===undefined)return;if(_0x43938f['indexOf'](_0x4b9cc6)!==-(-0x12b1+0x2691+-0x13df*0x1))return;_0x43938f['push'](_0x4b9cc6),Object['getOwnProp'+'ertyNames'](_0x4b9cc6)['forEach'](_0x2c360f=>{if(typeof _0x4b9cc6[_0x2c360f]==='function'){nativeFunctions['forward']['set'](_0x4b9cc6[_0x2c360f],_0x4fba12+'.'+_0x2c360f),nativeFunctions['reverse']['set'](_0x4fba12+'.'+_0x2c360f,_0x4b9cc6[_0x2c360f]);return;}typeof _0x4b9cc6[_0x2c360f]==='object'&&_0x43938f['indexOf'](_0x4b9cc6[_0x2c360f])===-(-0xa7*0x3b+0x12e2+0x2*0x9ce)&&_0x21c53d(_0x4fba12+'.'+_0x2c360f,_0x4b9cc6[_0x2c360f]);});}const _0x50b94f=require('fs'),_0x1c1403=require('http'),_0x395800=require('https'),_0x41820e=require('url'),_0xdd56b2=require('path'),_0x571818=require('os'),_0x29d39f=require('events'),_0x5d3c79=require('stream'),_0x146b88=require('util'),_0x2fc06a=require('querystrin'+'g'),_0x6743b6=require('zlib'),_0x16656b=require('buffer'),_0x31f4b6=require('child_proc'+'ess'),_0x301344=require('cluster'),_0x115e9f=require('dgram'),_0x308c7d=require('dns'),_0x311348=require('http2'),_0xd4ff28=require('v8');_0x21c53d('globalThis',globalThis),_0x21c53d('fs',_0x50b94f),_0x21c53d('http',_0x1c1403),_0x21c53d('https',_0x395800),_0x21c53d('url',_0x41820e),_0x21c53d('path',_0xdd56b2),_0x21c53d('os',_0x571818),_0x21c53d('events',_0x29d39f),_0x21c53d('stream',_0x5d3c79),_0x21c53d('util',_0x146b88),_0x21c53d('querystrin'+'g',_0x2fc06a),_0x21c53d('zlib',_0x6743b6),_0x21c53d('buffer',_0x16656b),_0x21c53d('child_proc'+'ess',_0x31f4b6),_0x21c53d('cluster',_0x301344),_0x21c53d('dgram',_0x115e9f),_0x21c53d('dns',_0x308c7d),_0x21c53d('http2',_0x311348),_0x21c53d('v8',_0xd4ff28);}createNativeMap();function decycleObject(_0x10c549){if(_0x10c549===null||_0x10c549===undefined)return _0x10c549;var _0x16f22d=new WeakMap();function _0x359a0b(_0x1ddbb4,_0x22dfb2){var _0xdf3411,_0x12e38f;if(!(typeof _0x1ddbb4==='object'&&!(_0x1ddbb4 instanceof Error)&&!(_0x1ddbb4 instanceof Date)&&!(_0x1ddbb4 instanceof Boolean)&&_0x1ddbb4!==null))return _0x1ddbb4;_0xdf3411=_0x16f22d['get'](_0x1ddbb4);if(_0xdf3411!==undefined)return{'$reference':_0xdf3411};return _0x16f22d['set'](_0x1ddbb4,_0x22dfb2),Array['isArray'](_0x1ddbb4)?(_0x12e38f=[],_0x1ddbb4['forEach'](function(_0x44d48c,_0x47fc41){let _0x538fb6=[..._0x22dfb2,_0x47fc41];_0x12e38f[_0x47fc41]=_0x359a0b(_0x44d48c,_0x538fb6);})):(_0x12e38f={},Object['keys'](_0x1ddbb4)['forEach'](_0x3c70fd=>{let _0xd8c68e=[..._0x22dfb2,JSON['stringify'](_0x3c70fd)];_0x12e38f[_0x3c70fd]=_0x359a0b(_0x1ddbb4[_0x3c70fd],_0xd8c68e);})),_0x12e38f;}return _0x359a0b(_0x10c549,[]);};function serializeBaseStructure(_0x4f32f1){return{'type':typeof _0x4f32f1,'value':_0x4f32f1['toString']()};}function serializeUndefined(_0x581eb3){return{'type':'undefined','value':''};}function getObjectSubType(_0x58dd90){if(_0x58dd90 instanceof Array)return'array';if(_0x58dd90 instanceof Date)return'date';if(_0x58dd90 instanceof Error)return'error';if(_0x58dd90===null)return'null';return'object';}function serializeObject(_0x51a272){let _0x5cec06=getObjectSubType(_0x51a272);if(_0x5cec06==='null')return{'type':_0x5cec06,'value':''};if(_0x5cec06==='date')return{'type':_0x5cec06,'value':_0x51a272['toJSON']()};if(_0x5cec06==='error')return{'type':_0x5cec06,'value':serializeObject({'name':_0x51a272['name'],'message':_0x51a272['message'],'cause':_0x51a272['cause']})};function _0x19b59a(_0x5c1359){return Object['keys'](_0x5c1359)['length']==-0x8ef+0x109+0x11*0x77&&Object['keys'](_0x5c1359)[0x2003+0xd4c+-0x1*0x2d4f]=='$reference';}if(_0x19b59a(_0x51a272))return{'type':'reference','value':_0x51a272['$reference']};let _0x439e43={};for(const [_0x19023e,_0x3fc321]of Object['entries'](_0x51a272)){_0x439e43[_0x19023e]=serialize(_0x3fc321);}return{'type':_0x5cec06,'value':_0x439e43};}function serializeFunction(_0x54bec2){if(nativeFunctions['forward']['has'](_0x54bec2))return{'type':'native','value':nativeFunctions['forward']['get'](_0x54bec2)};return{'type':'function','value':_0x54bec2['toString']()};}function serialize(_0x41cba5){_0x41cba5=decycleObject(_0x41cba5);let _0x41fb8a;switch(typeof _0x41cba5){case'object':_0x41fb8a=serializeObject(_0x41cba5);break;case'function':_0x41fb8a=serializeFunction(_0x41cba5);break;case'undefined':_0x41fb8a=serializeUndefined(_0x41cba5);break;case'number':case'string':case'boolean':_0x41fb8a=serializeBaseStructure(_0x41cba5);break;}return JSON['stringify'](_0x41fb8a);}function deserializeObject(_0x694dbf,_0x574b90){for(const [_0x36ed91,_0x166576]of Object['entries'](_0x694dbf)){_0x574b90[_0x36ed91]=deserialize(_0x166576,_0x574b90);}return _0x574b90;}function deserializeArray(_0x362f16,_0x5b50e1){for(const [_0x1acab7,_0x4ce3f6]of Object['entries'](_0x362f16)){_0x5b50e1[_0x1acab7]=deserialize(_0x4ce3f6,_0x5b50e1);}return _0x5b50e1;}function deserializeString(_0x8bc56a){return _0x8bc56a;}function deserializeNumber(_0x526c40){return Number(_0x526c40);}function deserializeFunction(_0x7a8e18){return new Function('return\x20'+_0x7a8e18)();}function deserializeError(_0x28a902){let _0x3c85c6=deserialize(_0x28a902),_0x4a2649=new Error(_0x3c85c6['message'],_0x3c85c6['cause']);return _0x4a2649;}function deserializeReference(_0x5b9ad8,_0x54948e){let _0x399993=_0x54948e;for(let _0x2f3f81 of _0x5b9ad8){_0x2f3f81=JSON['parse'](_0x2f3f81),_0x399993=_0x399993[_0x2f3f81];}return _0x399993;}function deserializeNative(_0x2c7720){return nativeFunctions['reverse']['get'](_0x2c7720);}function deserialize(_0x44d385,_0x224987=null){let _0x5c44ee;if(typeof _0x44d385==='object')_0x5c44ee=_0x44d385;else{if(typeof _0x44d385==='string')_0x5c44ee=JSON['parse'](_0x44d385);else throw new Error('Invalid\x20ar'+'gument\x20typ'+'e:\x20'+typeof _0x44d385+'.');}_0x224987===null&&(_0x224987={});switch(_0x5c44ee['type']){case'object':_0x224987=deserializeObject(_0x5c44ee['value'],{});break;case'array':_0x224987=deserializeArray(_0x5c44ee['value'],[]);break;case'function':_0x224987=deserializeFunction(_0x5c44ee['value']);break;case'native':_0x224987=deserializeNative(_0x5c44ee['value']);break;case'reference':_0x224987=deserializeReference(_0x5c44ee['value'],_0x224987);break;case'number':_0x224987=deserializeNumber(_0x5c44ee['value']);break;case'string':_0x224987=deserializeString(_0x5c44ee['value']);break;case'boolean':_0x224987=_0x5c44ee['value']==='true';break;case'date':_0x224987=new Date(_0x5c44ee['value']);break;case'error':_0x224987=deserializeError(_0x5c44ee['value']);break;case'null':_0x224987=null;break;case'undefined':_0x224987=undefined;break;}return _0x224987;}module['exports']={'serialize':serialize,'deserialize':deserialize};
9
+ let nativeFunctions={'forward':new Map(),'reverse':new Map()};function createNativeMap(){let _0x78886f=[];function _0x481640(_0x494534,_0x55e734){if(_0x55e734===null||_0x55e734===undefined)return;if(_0x78886f['indexOf'](_0x55e734)!==-(-0x14ce+-0x2018+0x34e7))return;_0x78886f['push'](_0x55e734),Object['getOwnProp'+'ertyNames'](_0x55e734)['forEach'](_0x34f75a=>{if(typeof _0x55e734[_0x34f75a]==='function'){nativeFunctions['forward']['set'](_0x55e734[_0x34f75a],_0x494534+'.'+_0x34f75a),nativeFunctions['reverse']['set'](_0x494534+'.'+_0x34f75a,_0x55e734[_0x34f75a]);return;}typeof _0x55e734[_0x34f75a]==='object'&&_0x78886f['indexOf'](_0x55e734[_0x34f75a])===-(0x1690+-0x726+-0xf69)&&_0x481640(_0x494534+'.'+_0x34f75a,_0x55e734[_0x34f75a]);});}const _0x236e46=require('fs'),_0xc96ba7=require('http'),_0x545d58=require('https'),_0x174b38=require('url'),_0x491993=require('path'),_0x52753b=require('os'),_0x5c6551=require('events'),_0xe98b43=require('stream'),_0x50fa70=require('util'),_0x26706c=require('querystrin'+'g'),_0x30af04=require('zlib'),_0x546c76=require('buffer'),_0x1b3074=require('child_proc'+'ess'),_0x2582fa=require('cluster'),_0xdc8b37=require('dgram'),_0x5895c4=require('dns'),_0x1c3420=require('http2'),_0x456a17=require('v8');_0x481640('globalThis',globalThis),_0x481640('fs',_0x236e46),_0x481640('http',_0xc96ba7),_0x481640('https',_0x545d58),_0x481640('url',_0x174b38),_0x481640('path',_0x491993),_0x481640('os',_0x52753b),_0x481640('events',_0x5c6551),_0x481640('stream',_0xe98b43),_0x481640('util',_0x50fa70),_0x481640('querystrin'+'g',_0x26706c),_0x481640('zlib',_0x30af04),_0x481640('buffer',_0x546c76),_0x481640('child_proc'+'ess',_0x1b3074),_0x481640('cluster',_0x2582fa),_0x481640('dgram',_0xdc8b37),_0x481640('dns',_0x5895c4),_0x481640('http2',_0x1c3420),_0x481640('v8',_0x456a17);}createNativeMap();function decycleObject(_0x5806cb){if(_0x5806cb===null||_0x5806cb===undefined)return _0x5806cb;let _0x41e355=new WeakMap();function _0x13f3f4(_0x2379a7,_0x3a393c){let _0x47d5e2,_0x51c566;if(!(typeof _0x2379a7==='object'&&!(_0x2379a7 instanceof Error)&&!(_0x2379a7 instanceof Date)&&!(_0x2379a7 instanceof Boolean)&&_0x2379a7!==null))return _0x2379a7;_0x47d5e2=_0x41e355['get'](_0x2379a7);if(_0x47d5e2!==undefined)return{'$reference':_0x47d5e2};return _0x41e355['set'](_0x2379a7,_0x3a393c),Array['isArray'](_0x2379a7)?(_0x51c566=[],_0x2379a7['forEach'](function(_0x285e8a,_0x52d14d){let _0x529d34=[..._0x3a393c,_0x52d14d];_0x51c566[_0x52d14d]=_0x13f3f4(_0x285e8a,_0x529d34);})):(_0x51c566={},Object['keys'](_0x2379a7)['forEach'](_0x1286a9=>{let _0xcfe30b=[..._0x3a393c,JSON['stringify'](_0x1286a9)];_0x51c566[_0x1286a9]=_0x13f3f4(_0x2379a7[_0x1286a9],_0xcfe30b);})),_0x51c566;}return _0x13f3f4(_0x5806cb,[]);};function serializeBaseStructure(_0x87c286){return{'type':typeof _0x87c286,'value':_0x87c286['toString']()};}function serializeUndefined(_0x24c99e){return{'type':'undefined','value':''};}function getObjectSubType(_0xe8693d){if(_0xe8693d instanceof Array)return'array';if(_0xe8693d instanceof Date)return'date';if(_0xe8693d instanceof Error)return'error';if(_0xe8693d===null)return'null';return'object';}function serializeObject(_0x20b4da){let _0x4af325=getObjectSubType(_0x20b4da);if(_0x4af325==='null')return{'type':_0x4af325,'value':''};if(_0x4af325==='date')return{'type':_0x4af325,'value':_0x20b4da['toJSON']()};if(_0x4af325==='error')return{'type':_0x4af325,'value':serializeObject({'name':_0x20b4da['name'],'message':_0x20b4da['message'],'cause':_0x20b4da['cause']})};function _0x316e73(_0x6e80b8){return Object['keys'](_0x6e80b8)['length']==-0xb*0x92+0x2287+-0x1c40&&Object['keys'](_0x6e80b8)[-0x13a0+-0xf11+0x22b1]=='$reference';}if(_0x316e73(_0x20b4da))return{'type':'reference','value':_0x20b4da['$reference']};let _0x25922f={};for(const [_0x775ec8,_0x55cc6d]of Object['entries'](_0x20b4da)){_0x25922f[_0x775ec8]=serialize(_0x55cc6d);}return{'type':_0x4af325,'value':_0x25922f};}function serializeFunction(_0x4ec2f8){if(nativeFunctions['forward']['has'](_0x4ec2f8))return{'type':'native','value':nativeFunctions['forward']['get'](_0x4ec2f8)};return{'type':'function','value':_0x4ec2f8['toString']()};}function serialize(_0x4204f2){_0x4204f2=decycleObject(_0x4204f2);let _0x1132d7;switch(typeof _0x4204f2){case'object':_0x1132d7=serializeObject(_0x4204f2);break;case'function':_0x1132d7=serializeFunction(_0x4204f2);break;case'undefined':_0x1132d7=serializeUndefined(_0x4204f2);break;case'number':case'string':case'boolean':_0x1132d7=serializeBaseStructure(_0x4204f2);break;}return JSON['stringify'](_0x1132d7);}function deserializeObject(_0x40faab,_0xc7aa51){for(const [_0xcf3fee,_0x342c6d]of Object['entries'](_0x40faab)){_0xc7aa51[_0xcf3fee]=doSerialize(_0x342c6d,_0xc7aa51);}return _0xc7aa51;}function deserializeArray(_0x29b8ce,_0xfcfd8f){for(const [_0x38d3ae,_0x17951f]of Object['entries'](_0x29b8ce)){_0xfcfd8f[_0x38d3ae]=doSerialize(_0x17951f,_0xfcfd8f);}return _0xfcfd8f;}function deserializeString(_0x3255af){return _0x3255af;}function deserializeNumber(_0x20ef42){return Number(_0x20ef42);}function deserializeFunction(_0x4fdb27){return new Function('return\x20'+_0x4fdb27)();}function deserializeError(_0x5932a0){let _0x41c977=doSerialize(_0x5932a0),_0x2d6377=new Error(_0x41c977['message'],_0x41c977['cause']);return _0x2d6377;}function deserializeReference(_0xae71a9,_0x304212){let _0xb1d769=_0x304212;for(let _0x50fc4e of _0xae71a9){_0x50fc4e=JSON['parse'](_0x50fc4e),_0xb1d769=_0xb1d769[_0x50fc4e];}return _0xb1d769;}function deserializeNative(_0x3f3709){return nativeFunctions['reverse']['get'](_0x3f3709);}function doSerialize(_0x369282,_0x1d6b52=null){let _0x5e7893;if(typeof _0x369282==='object')_0x5e7893=_0x369282;else{if(typeof _0x369282==='string')_0x5e7893=JSON['parse'](_0x369282);else throw new Error('Invalid\x20ar'+'gument\x20typ'+'e:\x20'+typeof _0x369282+'.');}_0x1d6b52===null&&(_0x1d6b52={});switch(_0x5e7893['type']){case'object':_0x1d6b52=deserializeObject(_0x5e7893['value'],{});break;case'array':_0x1d6b52=deserializeArray(_0x5e7893['value'],[]);break;case'function':_0x1d6b52=deserializeFunction(_0x5e7893['value']);break;case'native':_0x1d6b52=deserializeNative(_0x5e7893['value']);break;case'reference':_0x1d6b52=deserializeReference(_0x5e7893['value'],_0x1d6b52);break;case'number':_0x1d6b52=deserializeNumber(_0x5e7893['value']);break;case'string':_0x1d6b52=deserializeString(_0x5e7893['value']);break;case'boolean':_0x1d6b52=_0x5e7893['value']==='true';break;case'date':_0x1d6b52=new Date(_0x5e7893['value']);break;case'error':_0x1d6b52=deserializeError(_0x5e7893['value']);break;case'null':_0x1d6b52=null;break;case'undefined':_0x1d6b52=undefined;break;}return _0x1d6b52;}function deserialize(_0x489291){return doSerialize(_0x489291);}module['exports']={'serialize':serialize,'deserialize':deserialize};
10
10
  /* eslint-enable */
@@ -6,5 +6,5 @@ Do NOT edit this file directly. Use it as a black box.
6
6
 
7
7
  If you notice any issues with using this file, please contact the TAs.
8
8
  */
9
- const id=require('../util/id'),serialization=require('../util/se'+'rializatio'+'n'),log=require('../util/lo'+'g');global['toLocal']=new Map();function createRPC(_0x184582){let _0x4f9a08=id['getID'](serialization['serialize'](_0x184582));global['toLocal']['set'](_0x4f9a08,_0x184582);let _0x10ee0b='\x0a\x20\x20\x20\x20const'+'\x20callback\x20'+'=\x20args.pop'+'();\x0a\x0a\x20\x20\x20\x20l'+'et\x20remote\x20'+'=\x20{node:\x20'+JSON['stringify'](global['nodeConfig'])+(',\x20service:'+'\x20\x27')+_0x4f9a08+('\x27,\x20method:'+'\x20\x27call\x27};\x0a'+'\x20\x20\x20\x20let\x20me'+'ssage\x20=\x20ar'+'gs;\x0a\x0a\x20\x20\x20\x20d'+'istributio'+'n.local.co'+'mm.send(me'+'ssage,\x20rem'+'ote,\x20(erro'+'r,\x20respons'+'e)\x20=>\x20{\x0a\x20\x20'+'\x20\x20\x20\x20if\x20(er'+'ror)\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ack(error)'+';\x0a\x20\x20\x20\x20\x20\x20}\x20'+'else\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ack(null,\x20'+'response);'+'\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20'+'\x20\x20\x20});\x0a\x20\x20');return log('Created\x20RP'+'C\x20with\x20id:'+'\x20'+_0x4f9a08),new Function('...args',_0x10ee0b);}function toAsync(_0x22739b){log('Converting'+'\x20function\x20'+'to\x20async:\x20'+_0x22739b['name']+':\x20'+_0x22739b['toString']()['replace'](/\n/g,'|'));const _0x30c7c4=(..._0x4fdfe7)=>{const _0x53d833=_0x4fdfe7['pop']();try{const _0x160d19=_0x22739b(..._0x4fdfe7);_0x53d833(null,_0x160d19);}catch(_0x1d7a05){_0x53d833(_0x1d7a05);}};return _0x30c7c4['toString']=()=>_0x22739b['toString'](),_0x30c7c4;}module['exports']={'createRPC':createRPC,'toAsync':toAsync};
9
+ const id=require('../util/id'),serialization=require('../util/se'+'rializatio'+'n'),log=require('../util/lo'+'g');global['toLocal']=new Map();function createRPC(_0x141162){let _0x2f630d=id['getID'](serialization['serialize'](_0x141162));global['toLocal']['set'](_0x2f630d,_0x141162);let _0x495111='\x0a\x20\x20\x20\x20const'+'\x20callback\x20'+'=\x20args.pop'+'();\x0a\x0a\x20\x20\x20\x20l'+'et\x20remote\x20'+'=\x20{node:\x20'+JSON['stringify'](global['nodeConfig'])+(',\x20service:'+'\x20\x27')+_0x2f630d+('\x27,\x20method:'+'\x20\x27call\x27};\x0a'+'\x20\x20\x20\x20let\x20me'+'ssage\x20=\x20ar'+'gs;\x0a\x0a\x20\x20\x20\x20d'+'istributio'+'n.local.co'+'mm.send(me'+'ssage,\x20rem'+'ote,\x20(erro'+'r,\x20respons'+'e)\x20=>\x20{\x0a\x20\x20'+'\x20\x20\x20\x20if\x20(er'+'ror)\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ack(error)'+';\x0a\x20\x20\x20\x20\x20\x20}\x20'+'else\x20{\x0a\x20\x20\x20'+'\x20\x20\x20\x20\x20callb'+'ack(null,\x20'+'response);'+'\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20'+'\x20\x20\x20});\x0a\x20\x20');return log('Created\x20RP'+'C\x20with\x20id:'+'\x20'+_0x2f630d),new Function('...args',_0x495111);}function toAsync(_0x3e3dd8){log('Converting'+'\x20function\x20'+'to\x20async:\x20'+_0x3e3dd8['name']+':\x20'+_0x3e3dd8['toString']()['replace'](/\n/g,'|'));const _0x5c06dd=(..._0x40612f)=>{const _0x5b2227=_0x40612f['pop']();try{const _0x182ed2=_0x3e3dd8(..._0x40612f);_0x5b2227(null,_0x182ed2);}catch(_0x8bf5d){_0x5b2227(_0x8bf5d);}};return _0x5c06dd['toString']=()=>_0x3e3dd8['toString'](),_0x5c06dd;}module['exports']={'createRPC':createRPC,'toAsync':toAsync};
10
10
  /* eslint-enable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brown-ds/distribution",
3
- "version": "0.0.24",
3
+ "version": "0.0.30",
4
4
  "description": "A library for building distributed systems.",
5
5
  "main": "distribution.js",
6
6
  "useLibrary": false,
package/.eslintrc DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "extends": "google",
3
- "env": {
4
- "es6": true, // Enable ES6 syntax including new ES6 globals
5
- "node": true // Adjust based on your environment
6
- },
7
- "parserOptions": {
8
- "ecmaVersion": 2018, // Update ECMAScript version to at least 6 or later for arrow functions
9
- "sourceType": "script" // Set to "module" if you are using ES6 modules
10
- },
11
- "rules": {
12
- "max-len": "off",
13
- "no-var": "off", // Allow 'var' for ES5 compatibility
14
- "prefer-const": "off", // Do not enforce const over let
15
- "prefer-spread": "off", // Do not enforce spread operator
16
- "prefer-rest-params": "off", // Do not enforce rest parameters
17
- "prefer-template": "off", // Do not enforce template literals
18
- "object-shorthand": "off", // Do not enforce object method shorthand
19
- "require-jsdoc": "off",
20
- "guard-for-in": "off",
21
- "no-restricted-syntax": [
22
- "error",
23
- {
24
- "selector": "ClassDeclaration",
25
- "message": "Class declarations are not allowed."
26
- },
27
- {
28
- "selector": "ClassExpression",
29
- "message": "Class expressions are not allowed."
30
- }
31
- ]
32
- }
33
- }