Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / routing / server / applications / gotoif.js
index dc13933..3211994 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7907=['stop','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','html-to-text','./utils','../../../../config/logger','routing','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','error','[%s][GOTOIF]\x20%s','map','message','join','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found'];(function(_0x39d1d5,_0x42916a){var _0x9be0ab=function(_0x1abda5){while(--_0x1abda5){_0x39d1d5['push'](_0x39d1d5['shift']());}};_0x9be0ab(++_0x42916a);}(_0x7907,0x199));var _0x7790=function(_0x6156e3,_0x144d5c){_0x6156e3=_0x6156e3-0x0;var _0x3658cc=_0x7907[_0x6156e3];return _0x3658cc;};'use strict';var schema=require(_0x7790('0x0'));var _=require(_0x7790('0x1'));var htmlToText=require(_0x7790('0x2'));var utils=require(_0x7790('0x3'));var logger=require(_0x7790('0x4'))(_0x7790('0x5'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':_0x7790('0x6')},'priorityTrue':{'type':'number','message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x7790('0x7'),'message':_0x7790('0x8')}});exports[_0x7790('0x9')]=function(_0x437a23,_0x565f9e){return function(_0x3928b8){try{var _0x3cee93={'condition':htmlToText[_0x7790('0xa')](utils[_0x7790('0xb')](_0x565f9e[0x0],this),{'wordwrap':![]})[_0x7790('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x565f9e[0x1],'priorityFalse':_0x565f9e[0x2]};var _0x11e0b1=gotoif[_0x7790('0x0')](_0x3cee93,{'typecast':!![]});if(_0x11e0b1['length']){logger[_0x7790('0xd')](_0x7790('0xe'),_0x437a23,_[_0x7790('0xf')](_0x11e0b1,_0x7790('0x10'))[_0x7790('0x11')](',\x20'));_0x3928b8['stop']();}else{try{var _0x53df1c=eval('('+_0x3cee93[_0x7790('0x12')]+')');var _0x296fab=_0x53df1c?_0x3cee93[_0x7790('0x13')]:_0x3cee93[_0x7790('0x14')];logger[_0x7790('0x15')](_0x7790('0x16'),_0x437a23,_0x3cee93['condition'],_0x53df1c,_0x296fab||_0x7790('0x17'));if(_0x296fab){var _0x35e43a=_[_0x7790('0x18')](_0x3928b8['rules'](),{'p':_0x296fab});if(_0x35e43a>=0x0){logger[_0x7790('0x15')]('[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0x437a23,_0x296fab||_0x7790('0x17'),_0x35e43a);_0x3928b8[_0x7790('0x17')](_0x35e43a);}else{logger[_0x7790('0x15')](_0x7790('0x19'),_0x437a23,_0x296fab||'next');_0x3928b8[_0x7790('0x1a')]();}}else{_0x3928b8[_0x7790('0x17')]();}}catch(_0x163e3d){logger['error'](_0x7790('0x1b'),_0x437a23,_0x163e3d[_0x7790('0x10')]);_0x3928b8[_0x7790('0x1a')]();}}}catch(_0x3d7f3f){logger[_0x7790('0xd')](_0x7790('0xe'),_0x437a23,JSON[_0x7790('0x1c')](_0x3d7f3f));_0x3928b8['stop']();}};};
\ No newline at end of file
+var _0xfe73=['getMustacheRender','replace','length','[%s][GOTOIF]\x20%s','map','message','join','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','condition','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stop','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','html-to-text','./utils','../../../../config/logger','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','fromString'];(function(_0x39106e,_0x586f3d){var _0x892aec=function(_0xded1b5){while(--_0xded1b5){_0x39106e['push'](_0x39106e['shift']());}};_0x892aec(++_0x586f3d);}(_0xfe73,0x1b5));var _0x3fe7=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0xfe73[_0x24f31b];return _0x488401;};'use strict';var schema=require(_0x3fe7('0x0'));var _=require(_0x3fe7('0x1'));var htmlToText=require(_0x3fe7('0x2'));var utils=require(_0x3fe7('0x3'));var logger=require(_0x3fe7('0x4'))(_0x3fe7('0x5'));var gotoif=schema({'condition':{'type':_0x3fe7('0x6'),'required':!![],'message':_0x3fe7('0x7')},'priorityTrue':{'type':_0x3fe7('0x8'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x3fe7('0x8'),'message':_0x3fe7('0x9')}});exports['consequence']=function(_0x3805c4,_0x424edf){return function(_0x2ae7fa){try{var _0x3675ea={'condition':htmlToText[_0x3fe7('0xa')](utils[_0x3fe7('0xb')](_0x424edf[0x0],this),{'wordwrap':![]})[_0x3fe7('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x424edf[0x1],'priorityFalse':_0x424edf[0x2]};var _0x3f68ba=gotoif[_0x3fe7('0x0')](_0x3675ea,{'typecast':!![]});if(_0x3f68ba[_0x3fe7('0xd')]){logger['error'](_0x3fe7('0xe'),_0x3805c4,_[_0x3fe7('0xf')](_0x3f68ba,_0x3fe7('0x10'))[_0x3fe7('0x11')](',\x20'));_0x2ae7fa['stop']();}else{try{var _0x5552eb=eval('('+_0x3675ea['condition']+')');var _0x3bf136=_0x5552eb?_0x3675ea[_0x3fe7('0x12')]:_0x3675ea[_0x3fe7('0x13')];logger[_0x3fe7('0x14')](_0x3fe7('0x15'),_0x3805c4,_0x3675ea[_0x3fe7('0x16')],_0x5552eb,_0x3bf136||_0x3fe7('0x17'));if(_0x3bf136){var _0x262505=_[_0x3fe7('0x18')](_0x2ae7fa[_0x3fe7('0x19')](),{'p':_0x3bf136});if(_0x262505>=0x0){logger[_0x3fe7('0x14')](_0x3fe7('0x1a'),_0x3805c4,_0x3bf136||_0x3fe7('0x17'),_0x262505);_0x2ae7fa['next'](_0x262505);}else{logger['info'](_0x3fe7('0x1b'),_0x3805c4,_0x3bf136||_0x3fe7('0x17'));_0x2ae7fa[_0x3fe7('0x1c')]();}}else{_0x2ae7fa[_0x3fe7('0x17')]();}}catch(_0x5f9795){logger[_0x3fe7('0x1d')](_0x3fe7('0x1e'),_0x3805c4,_0x5f9795[_0x3fe7('0x10')]);_0x2ae7fa[_0x3fe7('0x1c')]();}}}catch(_0x4a4b30){logger[_0x3fe7('0x1d')](_0x3fe7('0xe'),_0x3805c4,JSON[_0x3fe7('0x1f')](_0x4a4b30));_0x2ae7fa['stop']();}};};
\ No newline at end of file