Built motion from commit (unavailable).|2.5.20
[motion2.git] / server / services / ami / trigger / integration / util.js
index 0d03ee6..c9c9eb1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x808e=['%s:\x20%s','join','stripTrailingSlash','substring','lastIndexOf','validateEmail','isNil','test','lodash','length','sortBy','type','string','content','variable','variableName','push','toString','customVariable','name','toLowerCase','Variable','keyValue','keyType','key'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x808e,0x166));var _0xe808=function(_0x543084,_0x4337f5){_0x543084=_0x543084-0x0;var _0x306a57=_0x808e[_0x543084];return _0x306a57;};'use strict';var _=require(_0xe808('0x0'));var util=require('util');exports['getString']=function(_0x497476,_0x5a0726,_0x2bdc01){var _0x408439=[];if(_0x497476[_0xe808('0x1')]>0x0){var _0x5378e5=_[_0xe808('0x2')](_0x497476,['id']);for(var _0x372b71=0x0;_0x372b71<_0x5378e5[_0xe808('0x1')];_0x372b71++){var _0x1323ee=_0x5378e5[_0x372b71];if(_0x1323ee[_0xe808('0x3')]===_0xe808('0x4')){_0x408439['push'](_0x1323ee[_0xe808('0x5')]);}else if(_0x1323ee[_0xe808('0x3')]===_0xe808('0x6')&&_0x1323ee[_0xe808('0x7')]){_0x5a0726[_0x1323ee[_0xe808('0x7')]]&&_0x408439[_0xe808('0x8')](_0x5a0726[_0x1323ee[_0xe808('0x7')]][_0xe808('0x9')]());}else if(_0x1323ee[_0xe808('0x3')]===_0xe808('0xa')&&_0x1323ee['Variable']&&_0x1323ee['Variable'][_0xe808('0xb')]){_0x5a0726[_0x1323ee['Variable'][_0xe808('0xb')][_0xe808('0xc')]()]&&_0x408439[_0xe808('0x8')](_0x5a0726[_0x1323ee[_0xe808('0xd')][_0xe808('0xb')][_0xe808('0xc')]()]['toString']());}else if(_0x1323ee[_0xe808('0x3')]===_0xe808('0xe')){if(_0x1323ee[_0xe808('0xf')]===_0xe808('0x4')&&_0x1323ee[_0xe808('0x10')]){_0x408439[_0xe808('0x8')](util['format'](_0xe808('0x11'),_0x1323ee[_0xe808('0x10')],_0x1323ee['keyContent']));}else if(_0x1323ee[_0xe808('0xf')]===_0xe808('0x6')&&_0x1323ee[_0xe808('0x7')]&&_0x1323ee[_0xe808('0x10')]){_0x5a0726[_0x1323ee['variableName']]&&_0x408439[_0xe808('0x8')](util['format'](_0xe808('0x11'),_0x1323ee[_0xe808('0x10')],_0x5a0726[_0x1323ee['variableName']]));}else if(_0x1323ee[_0xe808('0xf')]===_0xe808('0xa')&&_0x1323ee[_0xe808('0xd')]&&_0x1323ee[_0xe808('0xd')][_0xe808('0xb')]&&_0x1323ee['key']){_0x5a0726[_0x1323ee['Variable'][_0xe808('0xb')][_0xe808('0xc')]()]&&_0x408439['push'](util['format'](_0xe808('0x11'),_0x1323ee[_0xe808('0x10')],_0x5a0726[_0x1323ee['Variable'][_0xe808('0xb')][_0xe808('0xc')]()]));}}}}return _0x408439[_0xe808('0x12')](_0x2bdc01);};exports[_0xe808('0x13')]=function(_0x5ac3b){var _0x118043=_0x5ac3b['slice'](-0x1);if(_0x118043==='/'){_0x5ac3b=_0x5ac3b[_0xe808('0x14')](0x0,_0x5ac3b[_0xe808('0x15')](_0x118043));}return _0x5ac3b;};exports[_0xe808('0x16')]=function(_0xa1f2db){if(!_[_0xe808('0x17')](_0xa1f2db)&&_0xa1f2db!==''){var _0x5c4864=/^(([^<>()\[\]\\.,;:\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 _0x5c4864[_0xe808('0x18')](String(_0xa1f2db)[_0xe808('0xc')]());}else{return![];}};
\ No newline at end of file
+var _0x45e1=['validateEmail','test','lodash','util','getString','length','type','push','content','toString','customVariable','Variable','toLowerCase','name','keyType','string','format','%s:\x20%s','key','variable','variableName','join','lastIndexOf'];(function(_0x2064e5,_0x4f6fa2){var _0x21a233=function(_0x1b2491){while(--_0x1b2491){_0x2064e5['push'](_0x2064e5['shift']());}};_0x21a233(++_0x4f6fa2);}(_0x45e1,0xff));var _0x145e=function(_0x6386f,_0x49eba4){_0x6386f=_0x6386f-0x0;var _0x1102dc=_0x45e1[_0x6386f];return _0x1102dc;};'use strict';var _=require(_0x145e('0x0'));var util=require(_0x145e('0x1'));exports[_0x145e('0x2')]=function(_0x2ae12f,_0x4a978d,_0x19ecd7){var _0x1b31c4=[];if(_0x2ae12f[_0x145e('0x3')]>0x0){var _0x316d25=_['sortBy'](_0x2ae12f,['id']);for(var _0x34d6c6=0x0;_0x34d6c6<_0x316d25[_0x145e('0x3')];_0x34d6c6++){var _0x2ae2d1=_0x316d25[_0x34d6c6];if(_0x2ae2d1[_0x145e('0x4')]==='string'){_0x1b31c4[_0x145e('0x5')](_0x2ae2d1[_0x145e('0x6')]);}else if(_0x2ae2d1[_0x145e('0x4')]==='variable'&&_0x2ae2d1['variableName']){_0x4a978d[_0x2ae2d1['variableName']]&&_0x1b31c4[_0x145e('0x5')](_0x4a978d[_0x2ae2d1['variableName']][_0x145e('0x7')]());}else if(_0x2ae2d1[_0x145e('0x4')]===_0x145e('0x8')&&_0x2ae2d1[_0x145e('0x9')]&&_0x2ae2d1['Variable']['name']){_0x4a978d[_0x2ae2d1['Variable']['name'][_0x145e('0xa')]()]&&_0x1b31c4[_0x145e('0x5')](_0x4a978d[_0x2ae2d1[_0x145e('0x9')][_0x145e('0xb')][_0x145e('0xa')]()][_0x145e('0x7')]());}else if(_0x2ae2d1['type']==='keyValue'){if(_0x2ae2d1[_0x145e('0xc')]===_0x145e('0xd')&&_0x2ae2d1['key']){_0x1b31c4[_0x145e('0x5')](util[_0x145e('0xe')](_0x145e('0xf'),_0x2ae2d1[_0x145e('0x10')],_0x2ae2d1['keyContent']));}else if(_0x2ae2d1[_0x145e('0xc')]===_0x145e('0x11')&&_0x2ae2d1[_0x145e('0x12')]&&_0x2ae2d1[_0x145e('0x10')]){_0x4a978d[_0x2ae2d1['variableName']]&&_0x1b31c4[_0x145e('0x5')](util[_0x145e('0xe')](_0x145e('0xf'),_0x2ae2d1[_0x145e('0x10')],_0x4a978d[_0x2ae2d1[_0x145e('0x12')]]));}else if(_0x2ae2d1[_0x145e('0xc')]===_0x145e('0x8')&&_0x2ae2d1[_0x145e('0x9')]&&_0x2ae2d1['Variable'][_0x145e('0xb')]&&_0x2ae2d1[_0x145e('0x10')]){_0x4a978d[_0x2ae2d1[_0x145e('0x9')][_0x145e('0xb')][_0x145e('0xa')]()]&&_0x1b31c4[_0x145e('0x5')](util[_0x145e('0xe')](_0x145e('0xf'),_0x2ae2d1['key'],_0x4a978d[_0x2ae2d1[_0x145e('0x9')][_0x145e('0xb')]['toLowerCase']()]));}}}}return _0x1b31c4[_0x145e('0x13')](_0x19ecd7);};exports['stripTrailingSlash']=function(_0x17f0ca){var _0x2c8b26=_0x17f0ca['slice'](-0x1);if(_0x2c8b26==='/'){_0x17f0ca=_0x17f0ca['substring'](0x0,_0x17f0ca[_0x145e('0x14')](_0x2c8b26));}return _0x17f0ca;};exports[_0x145e('0x15')]=function(_0x7afeac){if(!_['isNil'](_0x7afeac)&&_0x7afeac!==''){var _0x93ab8b=/^(([^<>()\[\]\\.,;:\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 _0x93ab8b[_0x145e('0x16')](String(_0x7afeac)['toLowerCase']());}else{return![];}};
\ No newline at end of file