Built motion from commit (unavailable).|2.5.20
[motion2.git] / server / services / agi / graph / index.js
index f48dee4..cdf340c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x878f=['target','default','invalid','traverseBFS','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','../../../config/logger','agi','menu','getdigits','getsecretdigits','vertices','edges','numberOfEdges','prototype','addVertex','addEdge','size','relations','no\x20vertex\x20found','length','info','no\x20edge/s\x20available','condition','split','agicommand','vswitch'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x878f,0x173));var _0xf878=function(_0x23858e,_0x6103e){_0x23858e=_0x23858e-0x0;var _0x1b5eac=_0x878f[_0x23858e];return _0x1b5eac;};'use strict';var _=require('lodash');var logger=require(_0xf878('0x0'))(_0xf878('0x1'));var verticesWithRetry=[_0xf878('0x2'),_0xf878('0x3'),_0xf878('0x4')];var Graph=function(){this[_0xf878('0x5')]={};this[_0xf878('0x6')]={};this[_0xf878('0x7')]=0x0;};Graph[_0xf878('0x8')][_0xf878('0x9')]=function(_0x27ae4d){this['vertices'][_0x27ae4d['id']]=_0x27ae4d;this['edges'][_0x27ae4d['id']]=[];};Graph[_0xf878('0x8')][_0xf878('0xa')]=function(_0x59e564,_0x52851e,_0x530767){this[_0xf878('0x6')][_0x59e564]['push']({'target':_0x52851e,'condition':_0x530767});this['numberOfEdges']+=0x1;};Graph[_0xf878('0x8')][_0xf878('0xb')]=function(){return _[_0xf878('0xb')](this['vertices']);};Graph[_0xf878('0x8')][_0xf878('0xc')]=function(){return this['numberOfEdges'];};Graph[_0xf878('0x8')]['getVertex']=function(_0x31d3d2){return this[_0xf878('0x5')][_0x31d3d2];};Graph[_0xf878('0x8')]['traverseBFS']=function(_0x1ce004,_0x38eddf){if(!this[_0xf878('0x5')][_0x1ce004]){return logger['info'](_0xf878('0xd'));}var _0x3902f7=_0x38eddf(this[_0xf878('0x5')][_0x1ce004]);if(!_0x3902f7){return logger['info']('stop\x20traverse');}if(this[_0xf878('0x6')][_0x1ce004][_0xf878('0xe')]===0x0){return logger[_0xf878('0xf')](_0xf878('0x10'));}for(var _0x44aacc=0x0,_0x186a02=[],_0x415056=![];_0x44aacc<this[_0xf878('0x6')][_0x1ce004][_0xf878('0xe')];_0x44aacc+=0x1){if(this[_0xf878('0x6')][_0x1ce004][_0x44aacc][_0xf878('0x11')]){_0x186a02=this['edges'][_0x1ce004][_0x44aacc][_0xf878('0x11')][_0xf878('0x12')](',');for(var _0x412de1=0x0;_0x412de1<_0x186a02[_0xf878('0xe')];_0x412de1+=0x1){if(this[_0xf878('0x5')][_0x1ce004][_0xf878('0x13')]===_0xf878('0x14')&&_0x186a02[_0x412de1]==='-'){_0x415056=this['edges'][_0x1ce004][_0x44aacc][_0xf878('0x15')];logger[_0xf878('0xf')](_0xf878('0x16'),_0x186a02[_0x412de1],this['edges'][_0x1ce004][_0x44aacc][_0xf878('0x15')]);}else if(this[_0xf878('0x5')][_0x1ce004][_0xf878('0x13')]===_0xf878('0x2')&&_0x186a02[_0x412de1]==='i'){_0x415056=this[_0xf878('0x6')][_0x1ce004][_0x44aacc][_0xf878('0x15')];logger[_0xf878('0xf')](_0xf878('0x17'),_0x186a02[_0x412de1],this[_0xf878('0x6')][_0x1ce004][_0x44aacc][_0xf878('0x15')]);}if(_0x186a02[_0x412de1]===_0x3902f7){return this[_0xf878('0x18')](this['edges'][_0x1ce004][_0x44aacc][_0xf878('0x15')],_0x38eddf);}}}else{return this['traverseBFS'](this[_0xf878('0x6')][_0x1ce004][_0x44aacc][_0xf878('0x15')],_0x38eddf);}}if(_0x186a02[_0xf878('0xe')]){if(this[_0xf878('0x5')][_0x1ce004][_0xf878('0x13')]==='vswitch'){if(_0x415056){return this['traverseBFS'](_0x415056,_0x38eddf);}return logger['info'](_0xf878('0x19'));}else if(_[_0xf878('0x1a')](verticesWithRetry,this[_0xf878('0x5')][_0x1ce004]['agicommand'])){if(_0x3902f7==='-'){return logger[_0xf878('0xf')](_0xf878('0x1b'));}if(_0x415056&&_0x3902f7!=='t'){return this[_0xf878('0x18')](_0x415056,_0x38eddf);}return this[_0xf878('0x18')](_0x1ce004,_0x38eddf);}return logger[_0xf878('0xf')]('condition\x20not\x20found');}};module['exports']=Graph;
\ No newline at end of file
+var _0x2bb0=['condition','split','agicommand','target','invalid','vswitch','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','../../../config/logger','agi','getdigits','edges','prototype','addVertex','vertices','addEdge','numberOfEdges','size','relations','getVertex','traverseBFS','info','stop\x20traverse','length','no\x20edge/s\x20available'];(function(_0x4de1b1,_0x18c64c){var _0x639f27=function(_0x635e03){while(--_0x635e03){_0x4de1b1['push'](_0x4de1b1['shift']());}};_0x639f27(++_0x18c64c);}(_0x2bb0,0xf3));var _0x02bb=function(_0x3b65d2,_0x46022d){_0x3b65d2=_0x3b65d2-0x0;var _0x3a3c0f=_0x2bb0[_0x3b65d2];return _0x3a3c0f;};'use strict';var _=require(_0x02bb('0x0'));var logger=require(_0x02bb('0x1'))(_0x02bb('0x2'));var verticesWithRetry=['menu',_0x02bb('0x3'),'getsecretdigits'];var Graph=function(){this['vertices']={};this[_0x02bb('0x4')]={};this['numberOfEdges']=0x0;};Graph[_0x02bb('0x5')][_0x02bb('0x6')]=function(_0x8e4057){this[_0x02bb('0x7')][_0x8e4057['id']]=_0x8e4057;this[_0x02bb('0x4')][_0x8e4057['id']]=[];};Graph[_0x02bb('0x5')][_0x02bb('0x8')]=function(_0x47d7ae,_0x6d064a,_0x15e425){this[_0x02bb('0x4')][_0x47d7ae]['push']({'target':_0x6d064a,'condition':_0x15e425});this[_0x02bb('0x9')]+=0x1;};Graph['prototype'][_0x02bb('0xa')]=function(){return _[_0x02bb('0xa')](this['vertices']);};Graph[_0x02bb('0x5')][_0x02bb('0xb')]=function(){return this[_0x02bb('0x9')];};Graph['prototype'][_0x02bb('0xc')]=function(_0x4e409d){return this[_0x02bb('0x7')][_0x4e409d];};Graph[_0x02bb('0x5')][_0x02bb('0xd')]=function(_0x5c8728,_0x16330c){if(!this[_0x02bb('0x7')][_0x5c8728]){return logger[_0x02bb('0xe')]('no\x20vertex\x20found');}var _0x2a03ac=_0x16330c(this['vertices'][_0x5c8728]);if(!_0x2a03ac){return logger[_0x02bb('0xe')](_0x02bb('0xf'));}if(this[_0x02bb('0x4')][_0x5c8728][_0x02bb('0x10')]===0x0){return logger[_0x02bb('0xe')](_0x02bb('0x11'));}for(var _0x5cf4cb=0x0,_0x50f402=[],_0x4711fb=![];_0x5cf4cb<this[_0x02bb('0x4')][_0x5c8728][_0x02bb('0x10')];_0x5cf4cb+=0x1){if(this[_0x02bb('0x4')][_0x5c8728][_0x5cf4cb][_0x02bb('0x12')]){_0x50f402=this[_0x02bb('0x4')][_0x5c8728][_0x5cf4cb]['condition'][_0x02bb('0x13')](',');for(var _0x4b3f78=0x0;_0x4b3f78<_0x50f402[_0x02bb('0x10')];_0x4b3f78+=0x1){if(this[_0x02bb('0x7')][_0x5c8728][_0x02bb('0x14')]==='vswitch'&&_0x50f402[_0x4b3f78]==='-'){_0x4711fb=this[_0x02bb('0x4')][_0x5c8728][_0x5cf4cb][_0x02bb('0x15')];logger[_0x02bb('0xe')]('default',_0x50f402[_0x4b3f78],this[_0x02bb('0x4')][_0x5c8728][_0x5cf4cb][_0x02bb('0x15')]);}else if(this['vertices'][_0x5c8728][_0x02bb('0x14')]==='menu'&&_0x50f402[_0x4b3f78]==='i'){_0x4711fb=this[_0x02bb('0x4')][_0x5c8728][_0x5cf4cb][_0x02bb('0x15')];logger[_0x02bb('0xe')](_0x02bb('0x16'),_0x50f402[_0x4b3f78],this[_0x02bb('0x4')][_0x5c8728][_0x5cf4cb][_0x02bb('0x15')]);}if(_0x50f402[_0x4b3f78]===_0x2a03ac){return this[_0x02bb('0xd')](this['edges'][_0x5c8728][_0x5cf4cb]['target'],_0x16330c);}}}else{return this[_0x02bb('0xd')](this['edges'][_0x5c8728][_0x5cf4cb][_0x02bb('0x15')],_0x16330c);}}if(_0x50f402[_0x02bb('0x10')]){if(this[_0x02bb('0x7')][_0x5c8728]['agicommand']===_0x02bb('0x17')){if(_0x4711fb){return this[_0x02bb('0xd')](_0x4711fb,_0x16330c);}return logger['info'](_0x02bb('0x18'));}else if(_[_0x02bb('0x19')](verticesWithRetry,this[_0x02bb('0x7')][_0x5c8728][_0x02bb('0x14')])){if(_0x2a03ac==='-'){return logger[_0x02bb('0xe')](_0x02bb('0x1a'));}if(_0x4711fb&&_0x2a03ac!=='t'){return this['traverseBFS'](_0x4711fb,_0x16330c);}return this[_0x02bb('0xd')](_0x5c8728,_0x16330c);}return logger['info'](_0x02bb('0x1b'));}};module[_0x02bb('0x1c')]=Graph;
\ No newline at end of file