Built motion from commit 97153652.|2.6.26
[motion2.git] / server / services / agi / graph / index.js
index 5aeedbf..81418e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x63ca=['../../../config/logger','agi','menu','getdigits','getsecretdigits','edges','numberOfEdges','prototype','addVertex','vertices','addEdge','push','size','relations','getVertex','info','no\x20vertex\x20found','stop\x20traverse','length','condition','agicommand','vswitch','target','invalid','traverseBFS','default\x20on\x20switch\x20not\x20found','max\x20retry\x20reach','exports','lodash'];(function(_0x173c98,_0x38dc60){var _0x1303dc=function(_0x47b54f){while(--_0x47b54f){_0x173c98['push'](_0x173c98['shift']());}};_0x1303dc(++_0x38dc60);}(_0x63ca,0xca));var _0xa63c=function(_0x11765d,_0x46113b){_0x11765d=_0x11765d-0x0;var _0x389e72=_0x63ca[_0x11765d];return _0x389e72;};'use strict';var _=require(_0xa63c('0x0'));var logger=require(_0xa63c('0x1'))(_0xa63c('0x2'));var verticesWithRetry=[_0xa63c('0x3'),_0xa63c('0x4'),_0xa63c('0x5')];var Graph=function(){this['vertices']={};this[_0xa63c('0x6')]={};this[_0xa63c('0x7')]=0x0;};Graph[_0xa63c('0x8')][_0xa63c('0x9')]=function(_0x18de75){this[_0xa63c('0xa')][_0x18de75['id']]=_0x18de75;this[_0xa63c('0x6')][_0x18de75['id']]=[];};Graph[_0xa63c('0x8')][_0xa63c('0xb')]=function(_0x5a825a,_0x1a3aa3,_0x39b586){this[_0xa63c('0x6')][_0x5a825a][_0xa63c('0xc')]({'target':_0x1a3aa3,'condition':_0x39b586});this[_0xa63c('0x7')]+=0x1;};Graph[_0xa63c('0x8')][_0xa63c('0xd')]=function(){return _['size'](this['vertices']);};Graph[_0xa63c('0x8')][_0xa63c('0xe')]=function(){return this['numberOfEdges'];};Graph['prototype'][_0xa63c('0xf')]=function(_0x35535e){return this[_0xa63c('0xa')][_0x35535e];};Graph['prototype']['traverseBFS']=function(_0x34407d,_0x11b32a){if(!this['vertices'][_0x34407d]){return logger[_0xa63c('0x10')](_0xa63c('0x11'));}var _0x137225=_0x11b32a(this['vertices'][_0x34407d]);if(!_0x137225){return logger[_0xa63c('0x10')](_0xa63c('0x12'));}if(this['edges'][_0x34407d][_0xa63c('0x13')]===0x0){return logger[_0xa63c('0x10')]('no\x20edge/s\x20available');}for(var _0x3902bf=0x0,_0x3c15dd=[],_0x16bca9=![];_0x3902bf<this['edges'][_0x34407d]['length'];_0x3902bf+=0x1){if(this[_0xa63c('0x6')][_0x34407d][_0x3902bf]['condition']){_0x3c15dd=this[_0xa63c('0x6')][_0x34407d][_0x3902bf][_0xa63c('0x14')]['split'](',');for(var _0x488d94=0x0;_0x488d94<_0x3c15dd[_0xa63c('0x13')];_0x488d94+=0x1){if(this['vertices'][_0x34407d][_0xa63c('0x15')]===_0xa63c('0x16')&&_0x3c15dd[_0x488d94]==='-'){_0x16bca9=this[_0xa63c('0x6')][_0x34407d][_0x3902bf][_0xa63c('0x17')];logger[_0xa63c('0x10')]('default',_0x3c15dd[_0x488d94],this[_0xa63c('0x6')][_0x34407d][_0x3902bf]['target']);}else if(this[_0xa63c('0xa')][_0x34407d]['agicommand']==='menu'&&_0x3c15dd[_0x488d94]==='i'){_0x16bca9=this[_0xa63c('0x6')][_0x34407d][_0x3902bf][_0xa63c('0x17')];logger[_0xa63c('0x10')](_0xa63c('0x18'),_0x3c15dd[_0x488d94],this[_0xa63c('0x6')][_0x34407d][_0x3902bf][_0xa63c('0x17')]);}if(_0x3c15dd[_0x488d94]===_0x137225){return this[_0xa63c('0x19')](this['edges'][_0x34407d][_0x3902bf][_0xa63c('0x17')],_0x11b32a);}}}else{return this[_0xa63c('0x19')](this[_0xa63c('0x6')][_0x34407d][_0x3902bf]['target'],_0x11b32a);}}if(_0x3c15dd['length']){if(this[_0xa63c('0xa')][_0x34407d][_0xa63c('0x15')]===_0xa63c('0x16')){if(_0x16bca9){return this[_0xa63c('0x19')](_0x16bca9,_0x11b32a);}return logger[_0xa63c('0x10')](_0xa63c('0x1a'));}else if(_['includes'](verticesWithRetry,this['vertices'][_0x34407d][_0xa63c('0x15')])){if(_0x137225==='-'){return logger[_0xa63c('0x10')](_0xa63c('0x1b'));}if(_0x16bca9&&_0x137225!=='t'){return this[_0xa63c('0x19')](_0x16bca9,_0x11b32a);}return this['traverseBFS'](_0x34407d,_0x11b32a);}return logger[_0xa63c('0x10')]('condition\x20not\x20found');}};module[_0xa63c('0x1c')]=Graph;
\ No newline at end of file
+var _0x5767=['../../../config/logger','agi','menu','getsecretdigits','vertices','edges','prototype','addVertex','push','numberOfEdges','size','relations','getVertex','info','no\x20vertex\x20found','stop\x20traverse','length','no\x20edge/s\x20available','condition','agicommand','vswitch','target','invalid','traverseBFS','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash'];(function(_0x2ca616,_0x384ec8){var _0x53155f=function(_0x108627){while(--_0x108627){_0x2ca616['push'](_0x2ca616['shift']());}};_0x53155f(++_0x384ec8);}(_0x5767,0x77));var _0x7576=function(_0x942383,_0x57200f){_0x942383=_0x942383-0x0;var _0x242fbf=_0x5767[_0x942383];return _0x242fbf;};'use strict';var _=require(_0x7576('0x0'));var logger=require(_0x7576('0x1'))(_0x7576('0x2'));var verticesWithRetry=[_0x7576('0x3'),'getdigits',_0x7576('0x4')];var Graph=function(){this[_0x7576('0x5')]={};this[_0x7576('0x6')]={};this['numberOfEdges']=0x0;};Graph[_0x7576('0x7')][_0x7576('0x8')]=function(_0x59d657){this[_0x7576('0x5')][_0x59d657['id']]=_0x59d657;this[_0x7576('0x6')][_0x59d657['id']]=[];};Graph[_0x7576('0x7')]['addEdge']=function(_0x484765,_0x147bd1,_0x42bfc8){this['edges'][_0x484765][_0x7576('0x9')]({'target':_0x147bd1,'condition':_0x42bfc8});this[_0x7576('0xa')]+=0x1;};Graph[_0x7576('0x7')][_0x7576('0xb')]=function(){return _[_0x7576('0xb')](this['vertices']);};Graph[_0x7576('0x7')][_0x7576('0xc')]=function(){return this[_0x7576('0xa')];};Graph[_0x7576('0x7')][_0x7576('0xd')]=function(_0x30fe3e){return this[_0x7576('0x5')][_0x30fe3e];};Graph['prototype']['traverseBFS']=function(_0x5d48eb,_0x14364b){if(!this[_0x7576('0x5')][_0x5d48eb]){return logger[_0x7576('0xe')](_0x7576('0xf'));}var _0x2e7a57=_0x14364b(this[_0x7576('0x5')][_0x5d48eb]);if(!_0x2e7a57){return logger['info'](_0x7576('0x10'));}if(this[_0x7576('0x6')][_0x5d48eb][_0x7576('0x11')]===0x0){return logger[_0x7576('0xe')](_0x7576('0x12'));}for(var _0x31fdfd=0x0,_0x4a008c=[],_0x55e736=![];_0x31fdfd<this[_0x7576('0x6')][_0x5d48eb][_0x7576('0x11')];_0x31fdfd+=0x1){if(this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x13')]){_0x4a008c=this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x13')]['split'](',');for(var _0x480e90=0x0;_0x480e90<_0x4a008c[_0x7576('0x11')];_0x480e90+=0x1){if(this['vertices'][_0x5d48eb][_0x7576('0x14')]===_0x7576('0x15')&&_0x4a008c[_0x480e90]==='-'){_0x55e736=this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x16')];logger[_0x7576('0xe')]('default',_0x4a008c[_0x480e90],this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x16')]);}else if(this[_0x7576('0x5')][_0x5d48eb]['agicommand']===_0x7576('0x3')&&_0x4a008c[_0x480e90]==='i'){_0x55e736=this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x16')];logger[_0x7576('0xe')](_0x7576('0x17'),_0x4a008c[_0x480e90],this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x16')]);}if(_0x4a008c[_0x480e90]===_0x2e7a57){return this[_0x7576('0x18')](this['edges'][_0x5d48eb][_0x31fdfd][_0x7576('0x16')],_0x14364b);}}}else{return this[_0x7576('0x18')](this[_0x7576('0x6')][_0x5d48eb][_0x31fdfd][_0x7576('0x16')],_0x14364b);}}if(_0x4a008c[_0x7576('0x11')]){if(this['vertices'][_0x5d48eb][_0x7576('0x14')]===_0x7576('0x15')){if(_0x55e736){return this[_0x7576('0x18')](_0x55e736,_0x14364b);}return logger[_0x7576('0xe')](_0x7576('0x19'));}else if(_[_0x7576('0x1a')](verticesWithRetry,this[_0x7576('0x5')][_0x5d48eb][_0x7576('0x14')])){if(_0x2e7a57==='-'){return logger['info'](_0x7576('0x1b'));}if(_0x55e736&&_0x2e7a57!=='t'){return this[_0x7576('0x18')](_0x55e736,_0x14364b);}return this[_0x7576('0x18')](_0x5d48eb,_0x14364b);}return logger[_0x7576('0xe')](_0x7576('0x1c'));}};module[_0x7576('0x1d')]=Graph;
\ No newline at end of file