Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 9314be3..5b9e2d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc15f=['[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','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\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','fromString','replace','length','[%s][GOTOIF]\x20%s','map','message','join','stop','condition','priorityTrue','info'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xc15f,0x85));var _0xfc15=function(_0x29a29f,_0x155ce7){_0x29a29f=_0x29a29f-0x0;var _0x443ea3=_0xc15f[_0x29a29f];return _0x443ea3;};'use strict';var schema=require(_0xfc15('0x0'));var _=require(_0xfc15('0x1'));var htmlToText=require(_0xfc15('0x2'));var utils=require(_0xfc15('0x3'));var logger=require(_0xfc15('0x4'))(_0xfc15('0x5'));var gotoif=schema({'condition':{'type':_0xfc15('0x6'),'required':!![],'message':_0xfc15('0x7')},'priorityTrue':{'type':_0xfc15('0x8'),'message':_0xfc15('0x9')},'priorityFalse':{'type':'number','message':_0xfc15('0xa')}});exports['consequence']=function(_0x2058d7,_0x482e0e){return function(_0x56e02c){try{var _0x5600a6={'condition':htmlToText[_0xfc15('0xb')](utils['getMustacheRender'](_0x482e0e[0x0],this),{'wordwrap':![]})[_0xfc15('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x482e0e[0x1],'priorityFalse':_0x482e0e[0x2]};var _0x1a9a92=gotoif[_0xfc15('0x0')](_0x5600a6,{'typecast':!![]});if(_0x1a9a92[_0xfc15('0xd')]){logger['error'](_0xfc15('0xe'),_0x2058d7,_[_0xfc15('0xf')](_0x1a9a92,_0xfc15('0x10'))[_0xfc15('0x11')](',\x20'));_0x56e02c[_0xfc15('0x12')]();}else{try{var _0x3579c7=eval('('+_0x5600a6[_0xfc15('0x13')]+')');var _0x700cb2=_0x3579c7?_0x5600a6[_0xfc15('0x14')]:_0x5600a6['priorityFalse'];logger[_0xfc15('0x15')](_0xfc15('0x16'),_0x2058d7,_0x5600a6[_0xfc15('0x13')],_0x3579c7,_0x700cb2||_0xfc15('0x17'));if(_0x700cb2){var _0x454fe0=_[_0xfc15('0x18')](_0x56e02c[_0xfc15('0x19')](),{'p':_0x700cb2});if(_0x454fe0>=0x0){logger[_0xfc15('0x15')](_0xfc15('0x1a'),_0x2058d7,_0x700cb2||_0xfc15('0x17'),_0x454fe0);_0x56e02c[_0xfc15('0x17')](_0x454fe0);}else{logger[_0xfc15('0x15')](_0xfc15('0x1b'),_0x2058d7,_0x700cb2||_0xfc15('0x17'));_0x56e02c[_0xfc15('0x12')]();}}else{_0x56e02c['next']();}}catch(_0x36414a){logger[_0xfc15('0x1c')](_0xfc15('0x1d'),_0x2058d7,_0x36414a[_0xfc15('0x10')]);_0x56e02c[_0xfc15('0x12')]();}}}catch(_0x575cf5){logger[_0xfc15('0x1c')](_0xfc15('0xe'),_0x2058d7,JSON[_0xfc15('0x1e')](_0x575cf5));_0x56e02c[_0xfc15('0x12')]();}};};
\ No newline at end of file
+var _0x7928=['stop','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','validate','lodash','html-to-text','./utils','../../../../config/logger','routing','string','number','replace','length','[%s][GOTOIF]\x20%s','map','message','join'];(function(_0x2a8b13,_0x27c36d){var _0x5d1a42=function(_0x91299c){while(--_0x91299c){_0x2a8b13['push'](_0x2a8b13['shift']());}};_0x5d1a42(++_0x27c36d);}(_0x7928,0x94));var _0x8792=function(_0x5e6c9d,_0x37a02c){_0x5e6c9d=_0x5e6c9d-0x0;var _0x3e5f5a=_0x7928[_0x5e6c9d];return _0x3e5f5a;};'use strict';var schema=require(_0x8792('0x0'));var _=require(_0x8792('0x1'));var htmlToText=require(_0x8792('0x2'));var utils=require(_0x8792('0x3'));var logger=require(_0x8792('0x4'))(_0x8792('0x5'));var gotoif=schema({'condition':{'type':_0x8792('0x6'),'required':!![],'message':'condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'priorityTrue':{'type':_0x8792('0x7'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':'number','message':'priority\x20false\x20is\x20a\x20number'}});exports['consequence']=function(_0x14339e,_0x2ad951){return function(_0x2f3d46){try{var _0x2bf9fa={'condition':htmlToText['fromString'](utils['getMustacheRender'](_0x2ad951[0x0],this),{'wordwrap':![]})[_0x8792('0x8')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x2ad951[0x1],'priorityFalse':_0x2ad951[0x2]};var _0x20a8c6=gotoif[_0x8792('0x0')](_0x2bf9fa,{'typecast':!![]});if(_0x20a8c6[_0x8792('0x9')]){logger['error'](_0x8792('0xa'),_0x14339e,_[_0x8792('0xb')](_0x20a8c6,_0x8792('0xc'))[_0x8792('0xd')](',\x20'));_0x2f3d46[_0x8792('0xe')]();}else{try{var _0x1d4584=eval('('+_0x2bf9fa[_0x8792('0xf')]+')');var _0x583f2d=_0x1d4584?_0x2bf9fa[_0x8792('0x10')]:_0x2bf9fa[_0x8792('0x11')];logger[_0x8792('0x12')](_0x8792('0x13'),_0x14339e,_0x2bf9fa[_0x8792('0xf')],_0x1d4584,_0x583f2d||_0x8792('0x14'));if(_0x583f2d){var _0x27a8f8=_[_0x8792('0x15')](_0x2f3d46[_0x8792('0x16')](),{'p':_0x583f2d});if(_0x27a8f8>=0x0){logger['info'](_0x8792('0x17'),_0x14339e,_0x583f2d||_0x8792('0x14'),_0x27a8f8);_0x2f3d46[_0x8792('0x14')](_0x27a8f8);}else{logger[_0x8792('0x12')](_0x8792('0x18'),_0x14339e,_0x583f2d||_0x8792('0x14'));_0x2f3d46[_0x8792('0xe')]();}}else{_0x2f3d46[_0x8792('0x14')]();}}catch(_0x15483d){logger[_0x8792('0x19')](_0x8792('0x1a'),_0x14339e,_0x15483d[_0x8792('0xc')]);_0x2f3d46[_0x8792('0xe')]();}}}catch(_0xf5374e){logger['error'](_0x8792('0xa'),_0x14339e,JSON['stringify'](_0xf5374e));_0x2f3d46[_0x8792('0xe')]();}};};
\ No newline at end of file