Built motion from commit cb845558.|2.6.34
[motion2.git] / server / services / ami / trigger / integration / util.js
index 7ee9ae9..add969a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0176=['%s:\x20%s','join','slice','lastIndexOf','validateEmail','lodash','util','length','sortBy','push','type','variable','variableName','customVariable','Variable','name','toLowerCase','toString','keyValue','string','key','format','keyContent','keyType'];(function(_0x32f08e,_0x53860c){var _0x1300e5=function(_0x314c51){while(--_0x314c51){_0x32f08e['push'](_0x32f08e['shift']());}};_0x1300e5(++_0x53860c);}(_0x0176,0xdd));var _0x6017=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x0176[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x6017('0x0'));var util=require(_0x6017('0x1'));exports['getString']=function(_0x3de91a,_0x5185ff,_0x173a36){var _0x163f29=[];if(_0x3de91a[_0x6017('0x2')]>0x0){var _0x293fb7=_[_0x6017('0x3')](_0x3de91a,['id']);for(var _0x4fe62b=0x0;_0x4fe62b<_0x293fb7[_0x6017('0x2')];_0x4fe62b++){var _0x5a7fb9=_0x293fb7[_0x4fe62b];if(_0x5a7fb9['type']==='string'){_0x163f29[_0x6017('0x4')](_0x5a7fb9['content']);}else if(_0x5a7fb9[_0x6017('0x5')]===_0x6017('0x6')&&_0x5a7fb9['variableName']){_0x5185ff[_0x5a7fb9[_0x6017('0x7')]]&&_0x163f29[_0x6017('0x4')](_0x5185ff[_0x5a7fb9[_0x6017('0x7')]]['toString']());}else if(_0x5a7fb9[_0x6017('0x5')]===_0x6017('0x8')&&_0x5a7fb9[_0x6017('0x9')]&&_0x5a7fb9[_0x6017('0x9')][_0x6017('0xa')]){_0x5185ff[_0x5a7fb9[_0x6017('0x9')][_0x6017('0xa')][_0x6017('0xb')]()]&&_0x163f29['push'](_0x5185ff[_0x5a7fb9[_0x6017('0x9')][_0x6017('0xa')]['toLowerCase']()][_0x6017('0xc')]());}else if(_0x5a7fb9[_0x6017('0x5')]===_0x6017('0xd')){if(_0x5a7fb9['keyType']===_0x6017('0xe')&&_0x5a7fb9[_0x6017('0xf')]){_0x163f29['push'](util[_0x6017('0x10')]('%s:\x20%s',_0x5a7fb9['key'],_0x5a7fb9[_0x6017('0x11')]));}else if(_0x5a7fb9[_0x6017('0x12')]===_0x6017('0x6')&&_0x5a7fb9['variableName']&&_0x5a7fb9[_0x6017('0xf')]){_0x5185ff[_0x5a7fb9[_0x6017('0x7')]]&&_0x163f29[_0x6017('0x4')](util['format'](_0x6017('0x13'),_0x5a7fb9[_0x6017('0xf')],_0x5185ff[_0x5a7fb9['variableName']]));}else if(_0x5a7fb9[_0x6017('0x12')]==='customVariable'&&_0x5a7fb9[_0x6017('0x9')]&&_0x5a7fb9[_0x6017('0x9')][_0x6017('0xa')]&&_0x5a7fb9['key']){_0x5185ff[_0x5a7fb9['Variable']['name'][_0x6017('0xb')]()]&&_0x163f29[_0x6017('0x4')](util[_0x6017('0x10')](_0x6017('0x13'),_0x5a7fb9[_0x6017('0xf')],_0x5185ff[_0x5a7fb9[_0x6017('0x9')][_0x6017('0xa')]['toLowerCase']()]));}}}}return _0x163f29[_0x6017('0x14')](_0x173a36);};exports['stripTrailingSlash']=function(_0x455465){var _0x191a1d=_0x455465[_0x6017('0x15')](-0x1);if(_0x191a1d==='/'){_0x455465=_0x455465['substring'](0x0,_0x455465[_0x6017('0x16')](_0x191a1d));}return _0x455465;};exports[_0x6017('0x17')]=function(_0x57500e){if(!_['isNil'](_0x57500e)&&_0x57500e!==''){var _0x471c79=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x471c79['test'](String(_0x57500e)[_0x6017('0xb')]());}else{return![];}};
\ No newline at end of file
+var _0xec3d=['test','lodash','util','length','sortBy','type','string','variable','variableName','toString','customVariable','Variable','name','toLowerCase','push','keyValue','keyType','format','%s:\x20%s','key','keyContent','slice','substring','lastIndexOf','validateEmail'];(function(_0x455913,_0x2b7a92){var _0x3025b8=function(_0x3d754d){while(--_0x3d754d){_0x455913['push'](_0x455913['shift']());}};_0x3025b8(++_0x2b7a92);}(_0xec3d,0x12d));var _0xdec3=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xec3d[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xdec3('0x0'));var util=require(_0xdec3('0x1'));exports['getString']=function(_0x1fd933,_0x16acec,_0xb43823){var _0x1792a3=[];if(_0x1fd933[_0xdec3('0x2')]>0x0){var _0x547107=_[_0xdec3('0x3')](_0x1fd933,['id']);for(var _0x55c34f=0x0;_0x55c34f<_0x547107['length'];_0x55c34f++){var _0x30ef2a=_0x547107[_0x55c34f];if(_0x30ef2a[_0xdec3('0x4')]===_0xdec3('0x5')){_0x1792a3['push'](_0x30ef2a['content']);}else if(_0x30ef2a[_0xdec3('0x4')]===_0xdec3('0x6')&&_0x30ef2a[_0xdec3('0x7')]){_0x16acec[_0x30ef2a[_0xdec3('0x7')]]&&_0x1792a3['push'](_0x16acec[_0x30ef2a[_0xdec3('0x7')]][_0xdec3('0x8')]());}else if(_0x30ef2a[_0xdec3('0x4')]===_0xdec3('0x9')&&_0x30ef2a[_0xdec3('0xa')]&&_0x30ef2a[_0xdec3('0xa')]['name']){_0x16acec[_0x30ef2a[_0xdec3('0xa')][_0xdec3('0xb')][_0xdec3('0xc')]()]&&_0x1792a3[_0xdec3('0xd')](_0x16acec[_0x30ef2a['Variable'][_0xdec3('0xb')]['toLowerCase']()][_0xdec3('0x8')]());}else if(_0x30ef2a[_0xdec3('0x4')]===_0xdec3('0xe')){if(_0x30ef2a[_0xdec3('0xf')]===_0xdec3('0x5')&&_0x30ef2a['key']){_0x1792a3[_0xdec3('0xd')](util[_0xdec3('0x10')](_0xdec3('0x11'),_0x30ef2a[_0xdec3('0x12')],_0x30ef2a[_0xdec3('0x13')]));}else if(_0x30ef2a[_0xdec3('0xf')]===_0xdec3('0x6')&&_0x30ef2a['variableName']&&_0x30ef2a[_0xdec3('0x12')]){_0x16acec[_0x30ef2a[_0xdec3('0x7')]]&&_0x1792a3[_0xdec3('0xd')](util[_0xdec3('0x10')](_0xdec3('0x11'),_0x30ef2a[_0xdec3('0x12')],_0x16acec[_0x30ef2a[_0xdec3('0x7')]]));}else if(_0x30ef2a[_0xdec3('0xf')]==='customVariable'&&_0x30ef2a[_0xdec3('0xa')]&&_0x30ef2a[_0xdec3('0xa')][_0xdec3('0xb')]&&_0x30ef2a['key']){_0x16acec[_0x30ef2a[_0xdec3('0xa')]['name']['toLowerCase']()]&&_0x1792a3[_0xdec3('0xd')](util[_0xdec3('0x10')](_0xdec3('0x11'),_0x30ef2a[_0xdec3('0x12')],_0x16acec[_0x30ef2a[_0xdec3('0xa')][_0xdec3('0xb')][_0xdec3('0xc')]()]));}}}}return _0x1792a3['join'](_0xb43823);};exports['stripTrailingSlash']=function(_0x398d91){var _0x1c1ea8=_0x398d91[_0xdec3('0x14')](-0x1);if(_0x1c1ea8==='/'){_0x398d91=_0x398d91[_0xdec3('0x15')](0x0,_0x398d91[_0xdec3('0x16')](_0x1c1ea8));}return _0x398d91;};exports[_0xdec3('0x17')]=function(_0x5063f9){if(!_['isNil'](_0x5063f9)&&_0x5063f9!==''){var _0x430b1a=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x430b1a[_0xdec3('0x18')](String(_0x5063f9)[_0xdec3('0xc')]());}else{return![];}};
\ No newline at end of file