Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / services / ami / trigger / integration / util.js
index f65af28..cf6803d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2f5=['variableName','toString','Variable','name','toLowerCase','keyValue','keyType','key','format','%s:\x20%s','join','stripTrailingSlash','slice','substring','test','lodash','util','getString','length','sortBy','type','string','push','content','variable'];(function(_0x5500ea,_0x4446ed){var _0x7b9f5b=function(_0x54f657){while(--_0x54f657){_0x5500ea['push'](_0x5500ea['shift']());}};_0x7b9f5b(++_0x4446ed);}(_0xf2f5,0x154));var _0x5f2f=function(_0x35dec3,_0x26389e){_0x35dec3=_0x35dec3-0x0;var _0x4f89a6=_0xf2f5[_0x35dec3];return _0x4f89a6;};'use strict';var _=require(_0x5f2f('0x0'));var util=require(_0x5f2f('0x1'));exports[_0x5f2f('0x2')]=function(_0x3e6c8a,_0x119f05,_0x3e2536){var _0x3f7a26=[];if(_0x3e6c8a[_0x5f2f('0x3')]>0x0){var _0x2aeeb6=_[_0x5f2f('0x4')](_0x3e6c8a,['id']);for(var _0x5ac410=0x0;_0x5ac410<_0x2aeeb6[_0x5f2f('0x3')];_0x5ac410++){var _0x239337=_0x2aeeb6[_0x5ac410];if(_0x239337[_0x5f2f('0x5')]===_0x5f2f('0x6')){_0x3f7a26[_0x5f2f('0x7')](_0x239337[_0x5f2f('0x8')]);}else if(_0x239337[_0x5f2f('0x5')]===_0x5f2f('0x9')&&_0x239337[_0x5f2f('0xa')]){_0x119f05[_0x239337[_0x5f2f('0xa')]]&&_0x3f7a26[_0x5f2f('0x7')](_0x119f05[_0x239337['variableName']][_0x5f2f('0xb')]());}else if(_0x239337[_0x5f2f('0x5')]==='customVariable'&&_0x239337['Variable']&&_0x239337[_0x5f2f('0xc')][_0x5f2f('0xd')]){_0x119f05[_0x239337[_0x5f2f('0xc')][_0x5f2f('0xd')][_0x5f2f('0xe')]()]&&_0x3f7a26[_0x5f2f('0x7')](_0x119f05[_0x239337[_0x5f2f('0xc')][_0x5f2f('0xd')][_0x5f2f('0xe')]()]['toString']());}else if(_0x239337[_0x5f2f('0x5')]===_0x5f2f('0xf')){if(_0x239337[_0x5f2f('0x10')]==='string'&&_0x239337[_0x5f2f('0x11')]){_0x3f7a26['push'](util[_0x5f2f('0x12')]('%s:\x20%s',_0x239337['key'],_0x239337['keyContent']));}else if(_0x239337[_0x5f2f('0x10')]===_0x5f2f('0x9')&&_0x239337[_0x5f2f('0xa')]&&_0x239337[_0x5f2f('0x11')]){_0x119f05[_0x239337[_0x5f2f('0xa')]]&&_0x3f7a26[_0x5f2f('0x7')](util[_0x5f2f('0x12')](_0x5f2f('0x13'),_0x239337[_0x5f2f('0x11')],_0x119f05[_0x239337['variableName']]));}else if(_0x239337['keyType']==='customVariable'&&_0x239337[_0x5f2f('0xc')]&&_0x239337[_0x5f2f('0xc')][_0x5f2f('0xd')]&&_0x239337['key']){_0x119f05[_0x239337[_0x5f2f('0xc')][_0x5f2f('0xd')]['toLowerCase']()]&&_0x3f7a26[_0x5f2f('0x7')](util[_0x5f2f('0x12')](_0x5f2f('0x13'),_0x239337[_0x5f2f('0x11')],_0x119f05[_0x239337[_0x5f2f('0xc')]['name'][_0x5f2f('0xe')]()]));}}}}return _0x3f7a26[_0x5f2f('0x14')](_0x3e2536);};exports[_0x5f2f('0x15')]=function(_0x492b55){var _0x1ebb78=_0x492b55[_0x5f2f('0x16')](-0x1);if(_0x1ebb78==='/'){_0x492b55=_0x492b55[_0x5f2f('0x17')](0x0,_0x492b55['lastIndexOf'](_0x1ebb78));}return _0x492b55;};exports['validateEmail']=function(_0x5a0254){if(!_['isNil'](_0x5a0254)&&_0x5a0254!==''){var _0x3b048a=/^(([^<>()\[\]\\.,;:\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 _0x3b048a[_0x5f2f('0x18')](String(_0x5a0254)['toLowerCase']());}else{return![];}};
\ No newline at end of file
+var _0xf2c1=['name','Variable','toLowerCase','key','format','%s:\x20%s','keyContent','keyType','stripTrailingSlash','slice','substring','isNil','test','lodash','util','sortBy','length','type','string','content','variable','variableName','push','toString','customVariable'];(function(_0x21a4a8,_0x2ba153){var _0x1f72e8=function(_0x39e377){while(--_0x39e377){_0x21a4a8['push'](_0x21a4a8['shift']());}};_0x1f72e8(++_0x2ba153);}(_0xf2c1,0x71));var _0x1f2c=function(_0x2f432a,_0x21efbd){_0x2f432a=_0x2f432a-0x0;var _0x9fb239=_0xf2c1[_0x2f432a];return _0x9fb239;};'use strict';var _=require(_0x1f2c('0x0'));var util=require(_0x1f2c('0x1'));exports['getString']=function(_0x2fe8dd,_0x16c2b6,_0x181d7c){var _0x479e09=[];if(_0x2fe8dd['length']>0x0){var _0x765be1=_[_0x1f2c('0x2')](_0x2fe8dd,['id']);for(var _0x352351=0x0;_0x352351<_0x765be1[_0x1f2c('0x3')];_0x352351++){var _0x282e01=_0x765be1[_0x352351];if(_0x282e01[_0x1f2c('0x4')]===_0x1f2c('0x5')){_0x479e09['push'](_0x282e01[_0x1f2c('0x6')]);}else if(_0x282e01['type']===_0x1f2c('0x7')&&_0x282e01[_0x1f2c('0x8')]){_0x16c2b6[_0x282e01[_0x1f2c('0x8')]]&&_0x479e09[_0x1f2c('0x9')](_0x16c2b6[_0x282e01['variableName']][_0x1f2c('0xa')]());}else if(_0x282e01[_0x1f2c('0x4')]===_0x1f2c('0xb')&&_0x282e01['Variable']&&_0x282e01['Variable'][_0x1f2c('0xc')]){_0x16c2b6[_0x282e01[_0x1f2c('0xd')][_0x1f2c('0xc')][_0x1f2c('0xe')]()]&&_0x479e09['push'](_0x16c2b6[_0x282e01['Variable'][_0x1f2c('0xc')][_0x1f2c('0xe')]()][_0x1f2c('0xa')]());}else if(_0x282e01[_0x1f2c('0x4')]==='keyValue'){if(_0x282e01['keyType']===_0x1f2c('0x5')&&_0x282e01[_0x1f2c('0xf')]){_0x479e09['push'](util[_0x1f2c('0x10')](_0x1f2c('0x11'),_0x282e01['key'],_0x282e01[_0x1f2c('0x12')]));}else if(_0x282e01[_0x1f2c('0x13')]==='variable'&&_0x282e01[_0x1f2c('0x8')]&&_0x282e01[_0x1f2c('0xf')]){_0x16c2b6[_0x282e01['variableName']]&&_0x479e09['push'](util[_0x1f2c('0x10')](_0x1f2c('0x11'),_0x282e01['key'],_0x16c2b6[_0x282e01[_0x1f2c('0x8')]]));}else if(_0x282e01[_0x1f2c('0x13')]===_0x1f2c('0xb')&&_0x282e01[_0x1f2c('0xd')]&&_0x282e01['Variable']['name']&&_0x282e01[_0x1f2c('0xf')]){_0x16c2b6[_0x282e01['Variable'][_0x1f2c('0xc')]['toLowerCase']()]&&_0x479e09[_0x1f2c('0x9')](util['format'](_0x1f2c('0x11'),_0x282e01['key'],_0x16c2b6[_0x282e01[_0x1f2c('0xd')][_0x1f2c('0xc')][_0x1f2c('0xe')]()]));}}}}return _0x479e09['join'](_0x181d7c);};exports[_0x1f2c('0x14')]=function(_0x3602c5){var _0x445a7f=_0x3602c5[_0x1f2c('0x15')](-0x1);if(_0x445a7f==='/'){_0x3602c5=_0x3602c5[_0x1f2c('0x16')](0x0,_0x3602c5['lastIndexOf'](_0x445a7f));}return _0x3602c5;};exports['validateEmail']=function(_0x567e29){if(!_[_0x1f2c('0x17')](_0x567e29)&&_0x567e29!==''){var _0x1db755=/^(([^<>()\[\]\\.,;:\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 _0x1db755[_0x1f2c('0x18')](String(_0x567e29)[_0x1f2c('0xe')]());}else{return![];}};
\ No newline at end of file