Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / services / agi / graph / index.js
1 const a1028_0x100f=['vswitch','agicommand','numberOfEdges','agi','split','addEdge','prototype','length','stop\x20traverse','lodash','condition','relations','exports','getVertex','no\x20edge/s\x20available','../../../config/logger','condition\x20not\x20found','traverseBFS','info','includes','push','default\x20on\x20switch\x20not\x20found','vertices','edges','max\x20retry\x20reach','size','invalid','menu','target','getsecretdigits','no\x20vertex\x20found','default'];(function(_0x34234f,_0x100f21){const _0x589a9c=function(_0x3bb358){while(--_0x3bb358){_0x34234f['push'](_0x34234f['shift']());}};_0x589a9c(++_0x100f21);}(a1028_0x100f,0xe0));const a1028_0x589a=function(_0x34234f,_0x100f21){_0x34234f=_0x34234f-0x0;let _0x589a9c=a1028_0x100f[_0x34234f];return _0x589a9c;};const _0x2af11c=a1028_0x589a;'use strict';const _=require(_0x2af11c('0x9')),logger=require(_0x2af11c('0xf'))(_0x2af11c('0x3')),verticesWithRetry=[_0x2af11c('0x1b'),'getdigits',_0x2af11c('0x1d')],Graph=function(){const _0x431588=_0x2af11c;this[_0x431588('0x16')]={},this[_0x431588('0x17')]={},this['numberOfEdges']=0x0;};Graph[_0x2af11c('0x6')]['addVertex']=function(_0x3bb358){const _0x258817=_0x2af11c;this[_0x258817('0x16')][_0x3bb358['id']]=_0x3bb358,this[_0x258817('0x17')][_0x3bb358['id']]=[];},Graph[_0x2af11c('0x6')][_0x2af11c('0x5')]=function(_0x49a0a0,_0x55569f,_0x555acc){const _0x4ef8a7=_0x2af11c;this[_0x4ef8a7('0x17')][_0x49a0a0][_0x4ef8a7('0x14')]({'target':_0x55569f,'condition':_0x555acc}),this[_0x4ef8a7('0x2')]+=0x1;},Graph['prototype'][_0x2af11c('0x19')]=function(){const _0xa9fd95=_0x2af11c;return _[_0xa9fd95('0x19')](this[_0xa9fd95('0x16')]);},Graph['prototype'][_0x2af11c('0xb')]=function(){const _0x273a93=_0x2af11c;return this[_0x273a93('0x2')];},Graph[_0x2af11c('0x6')][_0x2af11c('0xd')]=function(_0x44aaf1){const _0x38fe25=_0x2af11c;return this[_0x38fe25('0x16')][_0x44aaf1];},Graph[_0x2af11c('0x6')][_0x2af11c('0x11')]=function(_0x1bb57e,_0x349fbb){const _0x5b1a35=_0x2af11c;if(!this[_0x5b1a35('0x16')][_0x1bb57e])return logger[_0x5b1a35('0x12')](_0x5b1a35('0x1e'));const _0x11e188=_0x349fbb(this[_0x5b1a35('0x16')][_0x1bb57e]);if(!_0x11e188)return logger[_0x5b1a35('0x12')](_0x5b1a35('0x8'));if(this[_0x5b1a35('0x17')][_0x1bb57e][_0x5b1a35('0x7')]===0x0)return logger[_0x5b1a35('0x12')](_0x5b1a35('0xe'));const _0xc5aea=![],_0x54acec=[];for(let _0x3ab88c=0x0,_0x30cee9=[],_0x33d966=![];_0x3ab88c<this[_0x5b1a35('0x17')][_0x1bb57e]['length'];_0x3ab88c+=0x1){if(this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c][_0x5b1a35('0xa')]){_0x30cee9=this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c][_0x5b1a35('0xa')][_0x5b1a35('0x4')](',');for(let _0x44bc1c=0x0;_0x44bc1c<_0x30cee9[_0x5b1a35('0x7')];_0x44bc1c+=0x1){if(this['vertices'][_0x1bb57e][_0x5b1a35('0x1')]===_0x5b1a35('0x0')&&_0x30cee9[_0x44bc1c]==='-')_0x33d966=this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c]['target'],logger[_0x5b1a35('0x12')](_0x5b1a35('0x1f'),_0x33d966,_0x30cee9[_0x44bc1c],this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c][_0x5b1a35('0x1c')]);else this['vertices'][_0x1bb57e]['agicommand']==='menu'&&_0x30cee9[_0x44bc1c]==='i'&&(_0x33d966=this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c][_0x5b1a35('0x1c')],logger['info'](_0x5b1a35('0x1a'),_0x33d966,_0x30cee9[_0x44bc1c],this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c][_0x5b1a35('0x1c')]));if(_0x30cee9[_0x44bc1c]===_0x11e188)return this[_0x5b1a35('0x11')](this['edges'][_0x1bb57e][_0x3ab88c][_0x5b1a35('0x1c')],_0x349fbb);}}else return this[_0x5b1a35('0x11')](this[_0x5b1a35('0x17')][_0x1bb57e][_0x3ab88c][_0x5b1a35('0x1c')],_0x349fbb);}if(_0x54acec[_0x5b1a35('0x7')]){if(this['vertices'][_0x1bb57e][_0x5b1a35('0x1')]===_0x5b1a35('0x0')){if(_0xc5aea)return this[_0x5b1a35('0x11')](_0xc5aea,_0x349fbb);return logger[_0x5b1a35('0x12')](_0x5b1a35('0x15'));}else{if(_[_0x5b1a35('0x13')](verticesWithRetry,this[_0x5b1a35('0x16')][_0x1bb57e][_0x5b1a35('0x1')])){if(_0x11e188==='-')return logger[_0x5b1a35('0x12')](_0x5b1a35('0x18'));if(_0xc5aea&&_0x11e188!=='t')return this['traverseBFS'](_0xc5aea,_0x349fbb);return this['traverseBFS'](_0x1bb57e,_0x349fbb);}}return logger['info'](_0x5b1a35('0x10'));}},module[_0x2af11c('0xc')]=Graph;