Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / components / parsers / qs.js
index dc07db3..610e352 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8c40=['cast','col','unsigned','substr','DESC','ASC','omit','isArray','length','isObject','isString','hasOwnProperty','^[+]?[0-9]*$','isEmail','match','getFullTextValue','forEach','push','join','fields','filters','isEmpty','forOwn','find','type','parse','format','YYYY-MM-DD','utc','$lte','split','limit','offset','sort','map','indexOf','priority'];(function(_0x2d829d,_0x718ef3){var _0x489deb=function(_0xa5d3a){while(--_0xa5d3a){_0x2d829d['push'](_0x2d829d['shift']());}};_0x489deb(++_0x718ef3);}(_0x8c40,0x116));var _0x08c4=function(_0xe32d36,_0x3114e0){_0xe32d36=_0xe32d36-0x0;var _0x255a5f=_0x8c40[_0xe32d36];return _0x255a5f;};'use strict';var _=require('lodash');var sequelize=require('sequelize');var moment=require('moment');var LIMIT_VALUE=0xfa;exports[_0x08c4('0x0')]=function(_0x5140cd){var _0x745ce6=null;if(_0x5140cd){_0x745ce6=_0x5140cd['split'](',');}return _0x745ce6;};exports[_0x08c4('0x1')]=function(_0x5083d8,_0x276304){var _0x2519d0={};if(!_[_0x08c4('0x2')](_0x5083d8)){_[_0x08c4('0x3')](_0x5083d8,function(_0x47cc67,_0x20cdc3){try{if(_0x276304){var _0x5d6821=_[_0x08c4('0x4')](_0x276304,{'name':_0x20cdc3})||{};if(_0x5d6821[_0x08c4('0x5')]==='DATE'&&_['isPlainObject'](_0x47cc67)){var _0x242761=JSON[_0x08c4('0x6')](_0x47cc67);var _0x5b1097={'$gte':moment(moment(_0x242761['$gte'])[_0x08c4('0x7')](_0x08c4('0x8')))[_0x08c4('0x9')]()['format'](),'$lte':moment(moment(_0x242761[_0x08c4('0xa')])[_0x08c4('0x7')](_0x08c4('0x8')))['utc']()['subtract'](0x1,'s')['format']()};_0x2519d0[_0x20cdc3]=_0x5b1097;}else{_0x2519d0[_0x20cdc3]=_['isArray'](_0x47cc67)?_0x47cc67:JSON[_0x08c4('0x6')](_0x47cc67);}}else{_0x2519d0[_0x20cdc3]=_['isArray'](_0x47cc67)?_0x47cc67:JSON[_0x08c4('0x6')](_0x47cc67);}}catch(_0x194340){_0x2519d0[_0x20cdc3]=_0x47cc67[_0x08c4('0xb')](',');}});}return _0x2519d0;};exports[_0x08c4('0xc')]=function(_0x3e5dc2){_0x3e5dc2=parseInt(_0x3e5dc2,0xa);if(!_0x3e5dc2||_0x3e5dc2<0x0){_0x3e5dc2=LIMIT_VALUE;}return _0x3e5dc2;};exports[_0x08c4('0xd')]=function(_0x504118){_0x504118=parseInt(_0x504118,0xa);if(!_0x504118||_0x504118<0x0){_0x504118=0x0;}return _0x504118;};exports[_0x08c4('0xe')]=function(_0x2d68a3){var _0x4a0467,_0x398528=null;if(_0x2d68a3){_0x4a0467=_0x2d68a3[_0x08c4('0xb')](',');_0x398528=_[_0x08c4('0xf')](_0x4a0467,function(_0x246a8b){if(_0x246a8b[_0x08c4('0x10')]('-')===0x0){return[_0x246a8b===_0x08c4('0x11')?sequelize[_0x08c4('0x12')](sequelize[_0x08c4('0x13')]('priority'),_0x08c4('0x14')):_0x246a8b[_0x08c4('0x15')](0x1),_0x08c4('0x16')];}else{return[_0x246a8b==='priority'?sequelize[_0x08c4('0x12')](sequelize[_0x08c4('0x13')](_0x08c4('0x11')),_0x08c4('0x14')):_0x246a8b,_0x08c4('0x17')];}});}return _0x398528;};exports[_0x08c4('0x18')]=function(_0x1e412a,_0x338274){if(_[_0x08c4('0x2')](_0x1e412a)){return _0x1e412a;}if(_[_0x08c4('0x19')](_0x1e412a)){for(var _0x415b07=0x0;_0x415b07<_0x1e412a[_0x08c4('0x1a')];_0x415b07+=0x1){_0x1e412a[_0x415b07]=this['omit'](_0x1e412a[_0x415b07],_0x338274);}return _0x1e412a;}if(!_[_0x08c4('0x1b')](_0x1e412a)){return _0x1e412a;}if(_[_0x08c4('0x1c')](_0x338274)){_0x338274=[_0x338274];}if(!_[_0x08c4('0x19')](_0x338274)){return _0x1e412a;}for(var _0x1ea3ab=0x0;_0x1ea3ab<_0x338274[_0x08c4('0x1a')];_0x1ea3ab+=0x1){_['unset'](_0x1e412a,_0x338274[_0x1ea3ab]);}for(var _0x362e26 in _0x1e412a){if(_0x1e412a[_0x08c4('0x1d')](_0x362e26)){_0x1e412a[_0x362e26]=this[_0x08c4('0x18')](_0x1e412a[_0x362e26],_0x338274);}}return _0x1e412a;};exports['isNumeric']=function(_0x30403d){return _0x30403d['match'](RegExp(_0x08c4('0x1e')))?!![]:![];};exports[_0x08c4('0x1f')]=function(_0x1f2aa9){return _0x1f2aa9[_0x08c4('0x20')](/^\S+@\S+$/)?!![]:![];};exports[_0x08c4('0x21')]=function(_0x5aa174){var _0x4ebbec=[];_0x5aa174['split'](/[ ,]+/)[_0x08c4('0x22')](function(_0x2139f2){_0x2139f2=_0x2139f2['replace'](/([^:]")"+/g,'$1');_0x2139f2='+'+_0x2139f2+'*';if(_0x2139f2['includes']('@'))_0x2139f2='\x22'+_0x2139f2+'\x22';_0x4ebbec[_0x08c4('0x23')](_0x2139f2);});return _0x4ebbec[_0x08c4('0x24')]('\x20');};
\ No newline at end of file
+var _0xb304=['hasOwnProperty','isNumeric','match','^[+]?[0-9]*$','isEmail','getFullTextValue','forEach','includes','push','lodash','sequelize','filters','forOwn','find','type','DATE','isPlainObject','parse','format','YYYY-MM-DD','utc','$lte','subtract','name','uniqueid','isArray','split','limit','map','priority','unsigned','substr','DESC','ASC','isEmpty','length','omit','isObject','isString','unset'];(function(_0x1c94e9,_0x3164a3){var _0x1eb100=function(_0x3d52e9){while(--_0x3d52e9){_0x1c94e9['push'](_0x1c94e9['shift']());}};_0x1eb100(++_0x3164a3);}(_0xb304,0xf9));var _0x4b30=function(_0x315b01,_0x583ac1){_0x315b01=_0x315b01-0x0;var _0x37c9c4=_0xb304[_0x315b01];return _0x37c9c4;};'use strict';var _=require(_0x4b30('0x0'));var sequelize=require(_0x4b30('0x1'));var moment=require('moment');var LIMIT_VALUE=0xfa;exports['fields']=function(_0x333672){var _0x347f93=null;if(_0x333672){_0x347f93=_0x333672['split'](',');}return _0x347f93;};exports[_0x4b30('0x2')]=function(_0x5ae492,_0x2a60ee){var _0x41e0f6={};if(!_['isEmpty'](_0x5ae492)){_[_0x4b30('0x3')](_0x5ae492,function(_0x385caf,_0x14b992){try{if(_0x2a60ee){var _0x5a73f8=_[_0x4b30('0x4')](_0x2a60ee,{'name':_0x14b992})||{};if(_0x5a73f8[_0x4b30('0x5')]===_0x4b30('0x6')&&_[_0x4b30('0x7')](_0x385caf)){var _0x3366fd=JSON[_0x4b30('0x8')](_0x385caf);var _0x452d51={'$gte':moment(moment(_0x3366fd['$gte'])[_0x4b30('0x9')](_0x4b30('0xa')))[_0x4b30('0xb')]()[_0x4b30('0x9')](),'$lte':moment(moment(_0x3366fd[_0x4b30('0xc')])[_0x4b30('0x9')](_0x4b30('0xa')))['utc']()[_0x4b30('0xd')](0x1,'s')[_0x4b30('0x9')]()};_0x41e0f6[_0x14b992]=_0x452d51;}else if(_0x5a73f8[_0x4b30('0xe')]===_0x4b30('0xf')){_0x41e0f6[_0x14b992]=_0x385caf;}else{_0x41e0f6[_0x14b992]=_['isArray'](_0x385caf)?_0x385caf:JSON[_0x4b30('0x8')](_0x385caf);}}else{_0x41e0f6[_0x14b992]=_[_0x4b30('0x10')](_0x385caf)?_0x385caf:JSON['parse'](_0x385caf);}}catch(_0x36481f){_0x41e0f6[_0x14b992]=_0x385caf[_0x4b30('0x11')](',');}});}return _0x41e0f6;};exports[_0x4b30('0x12')]=function(_0x354d5a){_0x354d5a=parseInt(_0x354d5a,0xa);if(!_0x354d5a||_0x354d5a<0x0){_0x354d5a=LIMIT_VALUE;}return _0x354d5a;};exports['offset']=function(_0x50d560){_0x50d560=parseInt(_0x50d560,0xa);if(!_0x50d560||_0x50d560<0x0){_0x50d560=0x0;}return _0x50d560;};exports['sort']=function(_0x6bd925){var _0x313d05,_0x586d05=null;if(_0x6bd925){_0x313d05=_0x6bd925['split'](',');_0x586d05=_[_0x4b30('0x13')](_0x313d05,function(_0x371987){if(_0x371987['indexOf']('-')===0x0){return[_0x371987===_0x4b30('0x14')?sequelize['cast'](sequelize['col'](_0x4b30('0x14')),_0x4b30('0x15')):_0x371987[_0x4b30('0x16')](0x1),_0x4b30('0x17')];}else{return[_0x371987===_0x4b30('0x14')?sequelize['cast'](sequelize['col'](_0x4b30('0x14')),_0x4b30('0x15')):_0x371987,_0x4b30('0x18')];}});}return _0x586d05;};exports['omit']=function(_0xc951d9,_0x2f01b7){if(_[_0x4b30('0x19')](_0xc951d9)){return _0xc951d9;}if(_[_0x4b30('0x10')](_0xc951d9)){for(var _0x3c66aa=0x0;_0x3c66aa<_0xc951d9[_0x4b30('0x1a')];_0x3c66aa+=0x1){_0xc951d9[_0x3c66aa]=this[_0x4b30('0x1b')](_0xc951d9[_0x3c66aa],_0x2f01b7);}return _0xc951d9;}if(!_[_0x4b30('0x1c')](_0xc951d9)){return _0xc951d9;}if(_[_0x4b30('0x1d')](_0x2f01b7)){_0x2f01b7=[_0x2f01b7];}if(!_[_0x4b30('0x10')](_0x2f01b7)){return _0xc951d9;}for(var _0x3992ab=0x0;_0x3992ab<_0x2f01b7['length'];_0x3992ab+=0x1){_[_0x4b30('0x1e')](_0xc951d9,_0x2f01b7[_0x3992ab]);}for(var _0x41cc87 in _0xc951d9){if(_0xc951d9[_0x4b30('0x1f')](_0x41cc87)){_0xc951d9[_0x41cc87]=this[_0x4b30('0x1b')](_0xc951d9[_0x41cc87],_0x2f01b7);}}return _0xc951d9;};exports[_0x4b30('0x20')]=function(_0x2dd886){return _0x2dd886[_0x4b30('0x21')](RegExp(_0x4b30('0x22')))?!![]:![];};exports[_0x4b30('0x23')]=function(_0xeb77cc){return _0xeb77cc[_0x4b30('0x21')](/^\S+@\S+$/)?!![]:![];};exports[_0x4b30('0x24')]=function(_0x4e52d8){var _0x791473=[];_0x4e52d8[_0x4b30('0x11')](/[ ,]+/)[_0x4b30('0x25')](function(_0x2737c3){_0x2737c3=_0x2737c3['replace'](/([^:]")"+/g,'$1');_0x2737c3='+'+_0x2737c3+'*';if(_0x2737c3[_0x4b30('0x26')]('@'))_0x2737c3='\x22'+_0x2737c3+'\x22';_0x791473[_0x4b30('0x27')](_0x2737c3);});return _0x791473['join']('\x20');};
\ No newline at end of file