Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 3d89a4d..d58f83a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4559=['[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','error','[%s][GOTOIF]\x20%s','stringify','validate','lodash','html-to-text','../../../../config/logger','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','fromString','length','map','message','join','stop','condition','priorityTrue','next','findIndex','rules','info'];(function(_0x244439,_0x3dcf7d){var _0x5da463=function(_0x5c20c9){while(--_0x5c20c9){_0x244439['push'](_0x244439['shift']());}};_0x5da463(++_0x3dcf7d);}(_0x4559,0x13d));var _0x9455=function(_0x35e6db,_0x53779d){_0x35e6db=_0x35e6db-0x0;var _0x249409=_0x4559[_0x35e6db];return _0x249409;};'use strict';var schema=require(_0x9455('0x0'));var _=require(_0x9455('0x1'));var htmlToText=require(_0x9455('0x2'));var utils=require('./utils');var logger=require(_0x9455('0x3'))(_0x9455('0x4'));var gotoif=schema({'condition':{'type':_0x9455('0x5'),'required':!![],'message':_0x9455('0x6')},'priorityTrue':{'type':_0x9455('0x7'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x9455('0x7'),'message':_0x9455('0x8')}});exports['consequence']=function(_0x36131b,_0x53c1cf){return function(_0x4d6abb){try{var _0x50bae6={'condition':htmlToText[_0x9455('0x9')](utils['getMustacheRender'](_0x53c1cf[0x0],this),{'wordwrap':![]})['replace'](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x53c1cf[0x1],'priorityFalse':_0x53c1cf[0x2]};var _0x213271=gotoif['validate'](_0x50bae6,{'typecast':!![]});if(_0x213271[_0x9455('0xa')]){logger['error']('[%s][GOTOIF]\x20%s',_0x36131b,_[_0x9455('0xb')](_0x213271,_0x9455('0xc'))[_0x9455('0xd')](',\x20'));_0x4d6abb[_0x9455('0xe')]();}else{try{var _0x11a262=eval('('+_0x50bae6[_0x9455('0xf')]+')');var _0x5d2ba0=_0x11a262?_0x50bae6[_0x9455('0x10')]:_0x50bae6['priorityFalse'];logger['info']('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x36131b,_0x50bae6[_0x9455('0xf')],_0x11a262,_0x5d2ba0||_0x9455('0x11'));if(_0x5d2ba0){var _0x3290c5=_[_0x9455('0x12')](_0x4d6abb[_0x9455('0x13')](),{'p':_0x5d2ba0});if(_0x3290c5>=0x0){logger[_0x9455('0x14')]('[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0x36131b,_0x5d2ba0||_0x9455('0x11'),_0x3290c5);_0x4d6abb[_0x9455('0x11')](_0x3290c5);}else{logger[_0x9455('0x14')](_0x9455('0x15'),_0x36131b,_0x5d2ba0||_0x9455('0x11'));_0x4d6abb[_0x9455('0xe')]();}}else{_0x4d6abb[_0x9455('0x11')]();}}catch(_0x498961){logger['error'](_0x9455('0x16'),_0x36131b,_0x498961['message']);_0x4d6abb['stop']();}}}catch(_0x3f21c0){logger[_0x9455('0x17')](_0x9455('0x18'),_0x36131b,JSON[_0x9455('0x19')](_0x3f21c0));_0x4d6abb[_0x9455('0xe')]();}};};
\ No newline at end of file
+var _0x5675=['consequence','fromString','getMustacheRender','replace','validate','length','error','[%s][GOTOIF]\x20%s','map','join','stop','priorityTrue','priorityFalse','info','condition','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','message','stringify','lodash','html-to-text','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number'];(function(_0x2d851a,_0x4c581f){var _0x50fccc=function(_0x789f6f){while(--_0x789f6f){_0x2d851a['push'](_0x2d851a['shift']());}};_0x50fccc(++_0x4c581f);}(_0x5675,0xe9));var _0x5567=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0x5675[_0x15bc81];return _0x59440e;};'use strict';var schema=require('validate');var _=require(_0x5567('0x0'));var htmlToText=require(_0x5567('0x1'));var utils=require('./utils');var logger=require('../../../../config/logger')('routing');var gotoif=schema({'condition':{'type':_0x5567('0x2'),'required':!![],'message':_0x5567('0x3')},'priorityTrue':{'type':_0x5567('0x4'),'message':_0x5567('0x5')},'priorityFalse':{'type':_0x5567('0x4'),'message':_0x5567('0x6')}});exports[_0x5567('0x7')]=function(_0x81fbbc,_0x24e7e7){return function(_0x3f9cb3){try{var _0x354b33={'condition':htmlToText[_0x5567('0x8')](utils[_0x5567('0x9')](_0x24e7e7[0x0],this),{'wordwrap':![]})[_0x5567('0xa')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x24e7e7[0x1],'priorityFalse':_0x24e7e7[0x2]};var _0x490971=gotoif[_0x5567('0xb')](_0x354b33,{'typecast':!![]});if(_0x490971[_0x5567('0xc')]){logger[_0x5567('0xd')](_0x5567('0xe'),_0x81fbbc,_[_0x5567('0xf')](_0x490971,'message')[_0x5567('0x10')](',\x20'));_0x3f9cb3[_0x5567('0x11')]();}else{try{var _0x1a118a=eval('('+_0x354b33['condition']+')');var _0x1aef49=_0x1a118a?_0x354b33[_0x5567('0x12')]:_0x354b33[_0x5567('0x13')];logger[_0x5567('0x14')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x81fbbc,_0x354b33[_0x5567('0x15')],_0x1a118a,_0x1aef49||_0x5567('0x16'));if(_0x1aef49){var _0x2083f9=_[_0x5567('0x17')](_0x3f9cb3[_0x5567('0x18')](),{'p':_0x1aef49});if(_0x2083f9>=0x0){logger['info'](_0x5567('0x19'),_0x81fbbc,_0x1aef49||_0x5567('0x16'),_0x2083f9);_0x3f9cb3[_0x5567('0x16')](_0x2083f9);}else{logger[_0x5567('0x14')](_0x5567('0x1a'),_0x81fbbc,_0x1aef49||'next');_0x3f9cb3[_0x5567('0x11')]();}}else{_0x3f9cb3[_0x5567('0x16')]();}}catch(_0x53a963){logger[_0x5567('0xd')](_0x5567('0x1b'),_0x81fbbc,_0x53a963[_0x5567('0x1c')]);_0x3f9cb3[_0x5567('0x11')]();}}}catch(_0x589285){logger[_0x5567('0xd')](_0x5567('0xe'),_0x81fbbc,JSON[_0x5567('0x1d')](_0x589285));_0x3f9cb3[_0x5567('0x11')]();}};};
\ No newline at end of file