Built motion from commit d32f51f5.|2.6.31
[motion2.git] / server / api / jscriptySessionReport / jscriptySessionReport.controller.js
index 875c022..2492bfb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x942f=['then','destroy','stack','name','send','map','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','filters','pick','filter','merge','VIRTUAL','JscriptySessionReport','includeAll','include','rows','catch','show','params','find','create','body','describe','getQuestions','findOne','JscriptyQuestionReport','nolimit','SessionId','options','findAll','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','set','apply','save','update'];(function(_0x40162a,_0x265b0c){var _0x488161=function(_0x9307e6){while(--_0x9307e6){_0x40162a['push'](_0x40162a['shift']());}};_0x488161(++_0x265b0c);}(_0x942f,0x7c));var _0xf942=function(_0x3a2d7d,_0xb04dfc){_0x3a2d7d=_0x3a2d7d-0x0;var _0x2b6e0a=_0x942f[_0x3a2d7d];return _0x2b6e0a;};'use strict';var emlformat=require(_0xf942('0x0'));var rimraf=require(_0xf942('0x1'));var zipdir=require(_0xf942('0x2'));var jsonpatch=require(_0xf942('0x3'));var rp=require(_0xf942('0x4'));var moment=require(_0xf942('0x5'));var BPromise=require(_0xf942('0x6'));var Mustache=require('mustache');var util=require(_0xf942('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xf942('0x8'));var fs=require('fs');var fs_extra=require(_0xf942('0x9'));var _=require(_0xf942('0xa'));var squel=require(_0xf942('0xb'));var crypto=require(_0xf942('0xc'));var jsforce=require(_0xf942('0xd'));var deskjs=require(_0xf942('0xe'));var toCsv=require('to-csv');var querystring=require(_0xf942('0xf'));var Papa=require(_0xf942('0x10'));var Redis=require(_0xf942('0x11'));var authService=require(_0xf942('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xf942('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf942('0x14'))('api');var utils=require(_0xf942('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xf942('0x16'));var db=require(_0xf942('0x17'))['db'];function respondWithStatusCode(_0xa36734,_0x3e54ed){_0x3e54ed=_0x3e54ed||0xcc;return function(_0x261a7b){if(_0x261a7b){return _0xa36734[_0xf942('0x18')](_0x3e54ed);}return _0xa36734[_0xf942('0x19')](_0x3e54ed)['end']();};}function respondWithResult(_0x3af606,_0x2c00dc){_0x2c00dc=_0x2c00dc||0xc8;return function(_0x27b5cd){if(_0x27b5cd){return _0x3af606['status'](_0x2c00dc)[_0xf942('0x1a')](_0x27b5cd);}};}function respondWithFilteredResult(_0x5e68a9,_0x59969c){return function(_0x4ea884){if(_0x4ea884){var _0x2e1317=typeof _0x59969c[_0xf942('0x1b')]===_0xf942('0x1c')&&typeof _0x59969c['limit']===_0xf942('0x1c');var _0x86585e=_0x4ea884[_0xf942('0x1d')];var _0x1f1db8=_0x2e1317?0x0:_0x59969c[_0xf942('0x1b')];var _0x2b7d3f=_0x2e1317?_0x4ea884['count']:_0x59969c[_0xf942('0x1b')]+_0x59969c['limit'];var _0x4f9339;if(_0x2b7d3f>=_0x86585e){_0x2b7d3f=_0x86585e;_0x4f9339=0xc8;}else{_0x4f9339=0xce;}_0x5e68a9[_0xf942('0x19')](_0x4f9339);return _0x5e68a9[_0xf942('0x1e')]('Content-Range',_0x1f1db8+'-'+_0x2b7d3f+'/'+_0x86585e)[_0xf942('0x1a')](_0x4ea884);}return null;};}function patchUpdates(_0x223457){return function(_0x33d2e2){try{jsonpatch[_0xf942('0x1f')](_0x33d2e2,_0x223457,!![]);}catch(_0x5d9840){return BPromise['reject'](_0x5d9840);}return _0x33d2e2[_0xf942('0x20')]();};}function saveUpdates(_0x5f378e,_0x409e09){return function(_0x32a2d9){if(_0x32a2d9){return _0x32a2d9[_0xf942('0x21')](_0x5f378e)[_0xf942('0x22')](function(_0x586ebb){return _0x586ebb;});}return null;};}function removeEntity(_0x48ed9e,_0x1164e6){return function(_0x458e2a){if(_0x458e2a){return _0x458e2a[_0xf942('0x23')]()[_0xf942('0x22')](function(){_0x48ed9e[_0xf942('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x29dc13,_0x24f13e){return function(_0x378aa3){if(!_0x378aa3){_0x29dc13[_0xf942('0x18')](0x194);}return _0x378aa3;};}function handleError(_0x41a4ca,_0x1b7efc){_0x1b7efc=_0x1b7efc||0x1f4;return function(_0x5d8693){logger['error'](_0x5d8693[_0xf942('0x24')]);if(_0x5d8693[_0xf942('0x25')]){delete _0x5d8693[_0xf942('0x25')];}_0x41a4ca[_0xf942('0x19')](_0x1b7efc)[_0xf942('0x26')](_0x5d8693);};}exports['index']=function(_0x295bd7,_0x41f2f9){var _0x3ac7fc={},_0x5381a1={},_0x13a6f6={'count':0x0,'rows':[]};var _0x18f507=_[_0xf942('0x27')](db['JscriptySessionReport'][_0xf942('0x28')],function(_0x5bf3da){return{'name':_0x5bf3da[_0xf942('0x29')],'type':_0x5bf3da[_0xf942('0x2a')][_0xf942('0x2b')]};});_0x5381a1[_0xf942('0x2c')]=_['map'](_0x18f507,'name');_0x5381a1['query']=_[_0xf942('0x2d')](_0x295bd7[_0xf942('0x2e')]);_0x5381a1['filters']=_[_0xf942('0x2f')](_0x5381a1['model'],_0x5381a1[_0xf942('0x2e')]);_0x3ac7fc[_0xf942('0x30')]=_['intersection'](_0x5381a1['model'],qs[_0xf942('0x31')](_0x295bd7[_0xf942('0x2e')]['fields']));_0x3ac7fc[_0xf942('0x30')]=_0x3ac7fc[_0xf942('0x30')][_0xf942('0x32')]?_0x3ac7fc['attributes']:_0x5381a1['model'];if(!_0x295bd7['query'][_0xf942('0x33')]('nolimit')){_0x3ac7fc[_0xf942('0x34')]=qs[_0xf942('0x34')](_0x295bd7[_0xf942('0x2e')]['limit']);_0x3ac7fc['offset']=qs[_0xf942('0x1b')](_0x295bd7[_0xf942('0x2e')][_0xf942('0x1b')]);}_0x3ac7fc[_0xf942('0x35')]=qs['sort'](_0x295bd7[_0xf942('0x2e')][_0xf942('0x36')]);_0x3ac7fc[_0xf942('0x37')]=qs[_0xf942('0x38')](_[_0xf942('0x39')](_0x295bd7[_0xf942('0x2e')],_0x5381a1[_0xf942('0x38')]),_0x18f507);if(_0x295bd7[_0xf942('0x2e')][_0xf942('0x3a')]){_0x3ac7fc['where']=_[_0xf942('0x3b')](_0x3ac7fc[_0xf942('0x37')],{'$or':_[_0xf942('0x27')](_0x18f507,function(_0x26a3cc){if(_0x26a3cc['type']!==_0xf942('0x3c')){var _0x58618c={};_0x58618c[_0x26a3cc[_0xf942('0x25')]]={'$like':'%'+_0x295bd7[_0xf942('0x2e')]['filter']+'%'};return _0x58618c;}})});}_0x3ac7fc=_['merge']({},_0x3ac7fc,_0x295bd7['options']);var _0x1d0587={'where':_0x3ac7fc['where']};return db[_0xf942('0x3d')][_0xf942('0x1d')](_0x1d0587)[_0xf942('0x22')](function(_0x4a1d05){_0x13a6f6[_0xf942('0x1d')]=_0x4a1d05;if(_0x295bd7['query'][_0xf942('0x3e')]){_0x3ac7fc[_0xf942('0x3f')]=[{'all':!![]}];}return db[_0xf942('0x3d')]['findAll'](_0x3ac7fc);})[_0xf942('0x22')](function(_0x384ba1){_0x13a6f6[_0xf942('0x40')]=_0x384ba1;return _0x13a6f6;})[_0xf942('0x22')](respondWithFilteredResult(_0x41f2f9,_0x3ac7fc))[_0xf942('0x41')](handleError(_0x41f2f9,null));};exports[_0xf942('0x42')]=function(_0x3fb967,_0x140a04){var _0x1cf4ed={'raw':!![],'where':{'id':_0x3fb967[_0xf942('0x43')]['id']}},_0x2d9ae2={};_0x2d9ae2[_0xf942('0x2c')]=_[_0xf942('0x2d')](db[_0xf942('0x3d')][_0xf942('0x28')]);_0x2d9ae2['query']=_['keys'](_0x3fb967[_0xf942('0x2e')]);_0x2d9ae2[_0xf942('0x38')]=_['intersection'](_0x2d9ae2[_0xf942('0x2c')],_0x2d9ae2[_0xf942('0x2e')]);_0x1cf4ed[_0xf942('0x30')]=_[_0xf942('0x2f')](_0x2d9ae2[_0xf942('0x2c')],qs[_0xf942('0x31')](_0x3fb967[_0xf942('0x2e')][_0xf942('0x31')]));_0x1cf4ed[_0xf942('0x30')]=_0x1cf4ed['attributes'][_0xf942('0x32')]?_0x1cf4ed['attributes']:_0x2d9ae2[_0xf942('0x2c')];if(_0x3fb967[_0xf942('0x2e')][_0xf942('0x3e')]){_0x1cf4ed[_0xf942('0x3f')]=[{'all':!![]}];}_0x1cf4ed=_['merge']({},_0x1cf4ed,_0x3fb967['options']);return db[_0xf942('0x3d')][_0xf942('0x44')](_0x1cf4ed)[_0xf942('0x22')](handleEntityNotFound(_0x140a04,null))[_0xf942('0x22')](respondWithResult(_0x140a04,null))['catch'](handleError(_0x140a04,null));};exports[_0xf942('0x45')]=function(_0x4ac2f9,_0x432c8d){return db[_0xf942('0x3d')][_0xf942('0x45')](_0x4ac2f9[_0xf942('0x46')],{})[_0xf942('0x22')](respondWithResult(_0x432c8d,0xc9))[_0xf942('0x41')](handleError(_0x432c8d,null));};exports['update']=function(_0x216702,_0x21629a){if(_0x216702[_0xf942('0x46')]['id']){delete _0x216702[_0xf942('0x46')]['id'];}return db[_0xf942('0x3d')][_0xf942('0x44')]({'where':{'id':_0x216702['params']['id']}})['then'](handleEntityNotFound(_0x21629a,null))[_0xf942('0x22')](saveUpdates(_0x216702['body'],null))[_0xf942('0x22')](respondWithResult(_0x21629a,null))[_0xf942('0x41')](handleError(_0x21629a,null));};exports[_0xf942('0x23')]=function(_0x4c0ee7,_0x12ac2a){return db[_0xf942('0x3d')][_0xf942('0x44')]({'where':{'id':_0x4c0ee7[_0xf942('0x43')]['id']}})[_0xf942('0x22')](handleEntityNotFound(_0x12ac2a,null))[_0xf942('0x22')](removeEntity(_0x12ac2a,null))[_0xf942('0x41')](handleError(_0x12ac2a,null));};exports[_0xf942('0x47')]=function(_0x4a5cd2,_0x78a2c){return db[_0xf942('0x3d')][_0xf942('0x47')]()[_0xf942('0x22')](respondWithResult(_0x78a2c,null))['catch'](handleError(_0x78a2c,null));};exports[_0xf942('0x48')]=function(_0x455081,_0x30a44a,_0x1079f6){var _0x13cb2d={'raw':!![],'where':{}};var _0x3aabbd={};var _0x8c0697={'count':0x0,'rows':[]};return db['JscriptySessionReport'][_0xf942('0x49')]({'where':{'id':_0x455081[_0xf942('0x43')]['id']}})[_0xf942('0x22')](handleEntityNotFound(_0x30a44a,null))[_0xf942('0x22')](function(_0x2c08f4){if(_0x2c08f4){_0x3aabbd[_0xf942('0x2c')]=_[_0xf942('0x2d')](db[_0xf942('0x4a')][_0xf942('0x28')]);_0x3aabbd['query']=_[_0xf942('0x2d')](_0x455081['query']);_0x3aabbd[_0xf942('0x38')]=_[_0xf942('0x2f')](_0x3aabbd['model'],_0x3aabbd[_0xf942('0x2e')]);_0x13cb2d[_0xf942('0x30')]=_[_0xf942('0x2f')](_0x3aabbd[_0xf942('0x2c')],qs[_0xf942('0x31')](_0x455081['query'][_0xf942('0x31')]));_0x13cb2d[_0xf942('0x30')]=_0x13cb2d[_0xf942('0x30')][_0xf942('0x32')]?_0x13cb2d[_0xf942('0x30')]:_0x3aabbd['model'];if(!_0x455081[_0xf942('0x2e')]['hasOwnProperty'](_0xf942('0x4b'))){_0x13cb2d[_0xf942('0x34')]=qs[_0xf942('0x34')](_0x455081[_0xf942('0x2e')][_0xf942('0x34')]);_0x13cb2d[_0xf942('0x1b')]=qs[_0xf942('0x1b')](_0x455081['query'][_0xf942('0x1b')]);}_0x13cb2d[_0xf942('0x35')]=qs[_0xf942('0x36')](_0x455081[_0xf942('0x2e')]['sort']);_0x13cb2d[_0xf942('0x37')]=qs[_0xf942('0x38')](_[_0xf942('0x39')](_0x455081['query'],_0x3aabbd[_0xf942('0x38')]));_0x13cb2d[_0xf942('0x37')][_0xf942('0x4c')]=_0x2c08f4['id'];if(_0x455081[_0xf942('0x2e')][_0xf942('0x3a')]){_0x13cb2d[_0xf942('0x37')]=_['merge'](_0x13cb2d[_0xf942('0x37')],{'$or':_[_0xf942('0x27')](_0x13cb2d[_0xf942('0x30')],function(_0x263395){var _0x5824de={};_0x5824de[_0x263395]={'$like':'%'+_0x455081[_0xf942('0x2e')][_0xf942('0x3a')]+'%'};return _0x5824de;})});}_0x13cb2d=_[_0xf942('0x3b')]({},_0x13cb2d,_0x455081[_0xf942('0x4d')]);return db[_0xf942('0x4a')][_0xf942('0x1d')]({'where':_0x13cb2d[_0xf942('0x37')]})[_0xf942('0x22')](function(_0x542e1b){_0x8c0697[_0xf942('0x1d')]=_0x542e1b;if(_0x455081[_0xf942('0x2e')][_0xf942('0x3e')]){_0x13cb2d['include']=[{'all':!![]}];}return db['JscriptyQuestionReport'][_0xf942('0x4e')](_0x13cb2d);})['then'](function(_0x5bfd0d){_0x8c0697[_0xf942('0x40')]=_0x5bfd0d;return _0x8c0697;});}})[_0xf942('0x22')](respondWithFilteredResult(_0x30a44a,_0x13cb2d))['catch'](handleError(_0x30a44a,null));};
\ No newline at end of file
+var _0x0dd1=['offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','sendStatus','error','stack','name','send','index','map','JscriptySessionReport','rawAttributes','fieldName','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','includeAll','include','findAll','catch','show','find','create','body','params','describe','getQuestions','findOne','JscriptyQuestionReport','SessionId','options','rows','eml-format','rimraf','zip-dir','request-promise','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','end','json'];(function(_0x577354,_0x104f7a){var _0x2dd9e2=function(_0x4ee6aa){while(--_0x4ee6aa){_0x577354['push'](_0x577354['shift']());}};_0x2dd9e2(++_0x104f7a);}(_0x0dd1,0xd9));var _0x10dd=function(_0x4c9d58,_0x1c83f0){_0x4c9d58=_0x4c9d58-0x0;var _0x3ad22d=_0x0dd1[_0x4c9d58];return _0x3ad22d;};'use strict';var emlformat=require(_0x10dd('0x0'));var rimraf=require(_0x10dd('0x1'));var zipdir=require(_0x10dd('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x10dd('0x3'));var moment=require(_0x10dd('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x10dd('0x5'));var path=require(_0x10dd('0x6'));var sox=require(_0x10dd('0x7'));var csv=require(_0x10dd('0x8'));var ejs=require(_0x10dd('0x9'));var fs=require('fs');var fs_extra=require(_0x10dd('0xa'));var _=require(_0x10dd('0xb'));var squel=require(_0x10dd('0xc'));var crypto=require(_0x10dd('0xd'));var jsforce=require(_0x10dd('0xe'));var deskjs=require(_0x10dd('0xf'));var toCsv=require(_0x10dd('0x8'));var querystring=require(_0x10dd('0x10'));var Papa=require('papaparse');var Redis=require(_0x10dd('0x11'));var authService=require(_0x10dd('0x12'));var qs=require(_0x10dd('0x13'));var as=require(_0x10dd('0x14'));var hardwareService=require(_0x10dd('0x15'));var logger=require(_0x10dd('0x16'))(_0x10dd('0x17'));var utils=require(_0x10dd('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x10dd('0x19'))['db'];function respondWithStatusCode(_0x3656fc,_0x4d199c){_0x4d199c=_0x4d199c||0xcc;return function(_0x16df3a){if(_0x16df3a){return _0x3656fc['sendStatus'](_0x4d199c);}return _0x3656fc[_0x10dd('0x1a')](_0x4d199c)[_0x10dd('0x1b')]();};}function respondWithResult(_0x4bb4ba,_0x424bc9){_0x424bc9=_0x424bc9||0xc8;return function(_0x23a7c6){if(_0x23a7c6){return _0x4bb4ba['status'](_0x424bc9)[_0x10dd('0x1c')](_0x23a7c6);}};}function respondWithFilteredResult(_0x349acd,_0x128d64){return function(_0x2a4756){if(_0x2a4756){var _0x58c001=typeof _0x128d64[_0x10dd('0x1d')]===_0x10dd('0x1e')&&typeof _0x128d64[_0x10dd('0x1f')]===_0x10dd('0x1e');var _0x4892d8=_0x2a4756['count'];var _0x2584f3=_0x58c001?0x0:_0x128d64[_0x10dd('0x1d')];var _0x5c54fe=_0x58c001?_0x2a4756[_0x10dd('0x20')]:_0x128d64[_0x10dd('0x1d')]+_0x128d64[_0x10dd('0x1f')];var _0x239643;if(_0x5c54fe>=_0x4892d8){_0x5c54fe=_0x4892d8;_0x239643=0xc8;}else{_0x239643=0xce;}_0x349acd[_0x10dd('0x1a')](_0x239643);return _0x349acd[_0x10dd('0x21')](_0x10dd('0x22'),_0x2584f3+'-'+_0x5c54fe+'/'+_0x4892d8)[_0x10dd('0x1c')](_0x2a4756);}return null;};}function patchUpdates(_0x30b17b){return function(_0x2abb61){try{jsonpatch[_0x10dd('0x23')](_0x2abb61,_0x30b17b,!![]);}catch(_0x11ee3c){return BPromise[_0x10dd('0x24')](_0x11ee3c);}return _0x2abb61['save']();};}function saveUpdates(_0x523a09,_0x46231c){return function(_0x3e8233){if(_0x3e8233){return _0x3e8233[_0x10dd('0x25')](_0x523a09)[_0x10dd('0x26')](function(_0x10c858){return _0x10c858;});}return null;};}function removeEntity(_0x23efd7,_0x21565e){return function(_0x441a10){if(_0x441a10){return _0x441a10[_0x10dd('0x27')]()[_0x10dd('0x26')](function(){_0x23efd7['status'](0xcc)[_0x10dd('0x1b')]();});}};}function handleEntityNotFound(_0x442f24,_0x3fb0a2){return function(_0x3c480f){if(!_0x3c480f){_0x442f24[_0x10dd('0x28')](0x194);}return _0x3c480f;};}function handleError(_0xce049a,_0x48d9b3){_0x48d9b3=_0x48d9b3||0x1f4;return function(_0x388e15){logger[_0x10dd('0x29')](_0x388e15[_0x10dd('0x2a')]);if(_0x388e15[_0x10dd('0x2b')]){delete _0x388e15[_0x10dd('0x2b')];}_0xce049a[_0x10dd('0x1a')](_0x48d9b3)[_0x10dd('0x2c')](_0x388e15);};}exports[_0x10dd('0x2d')]=function(_0xf5a8c4,_0x67b0e9){var _0x25284d={},_0x5ed2c0={},_0x2cad54={'count':0x0,'rows':[]};var _0x563b02=_[_0x10dd('0x2e')](db[_0x10dd('0x2f')][_0x10dd('0x30')],function(_0x59288d){return{'name':_0x59288d[_0x10dd('0x31')],'type':_0x59288d['type'][_0x10dd('0x32')]};});_0x5ed2c0['model']=_[_0x10dd('0x2e')](_0x563b02,_0x10dd('0x2b'));_0x5ed2c0['query']=_[_0x10dd('0x33')](_0xf5a8c4[_0x10dd('0x34')]);_0x5ed2c0[_0x10dd('0x35')]=_[_0x10dd('0x36')](_0x5ed2c0[_0x10dd('0x37')],_0x5ed2c0[_0x10dd('0x34')]);_0x25284d[_0x10dd('0x38')]=_['intersection'](_0x5ed2c0[_0x10dd('0x37')],qs[_0x10dd('0x39')](_0xf5a8c4['query'][_0x10dd('0x39')]));_0x25284d[_0x10dd('0x38')]=_0x25284d[_0x10dd('0x38')][_0x10dd('0x3a')]?_0x25284d['attributes']:_0x5ed2c0[_0x10dd('0x37')];if(!_0xf5a8c4[_0x10dd('0x34')][_0x10dd('0x3b')](_0x10dd('0x3c'))){_0x25284d[_0x10dd('0x1f')]=qs[_0x10dd('0x1f')](_0xf5a8c4[_0x10dd('0x34')]['limit']);_0x25284d[_0x10dd('0x1d')]=qs[_0x10dd('0x1d')](_0xf5a8c4['query'][_0x10dd('0x1d')]);}_0x25284d['order']=qs[_0x10dd('0x3d')](_0xf5a8c4[_0x10dd('0x34')][_0x10dd('0x3d')]);_0x25284d[_0x10dd('0x3e')]=qs[_0x10dd('0x35')](_[_0x10dd('0x3f')](_0xf5a8c4['query'],_0x5ed2c0[_0x10dd('0x35')]),_0x563b02);if(_0xf5a8c4[_0x10dd('0x34')][_0x10dd('0x40')]){_0x25284d[_0x10dd('0x3e')]=_[_0x10dd('0x41')](_0x25284d[_0x10dd('0x3e')],{'$or':_[_0x10dd('0x2e')](_0x563b02,function(_0x21ed06){if(_0x21ed06['type']!=='VIRTUAL'){var _0x1abe19={};_0x1abe19[_0x21ed06[_0x10dd('0x2b')]]={'$like':'%'+_0xf5a8c4['query'][_0x10dd('0x40')]+'%'};return _0x1abe19;}})});}_0x25284d=_[_0x10dd('0x41')]({},_0x25284d,_0xf5a8c4['options']);var _0x2fd549={'where':_0x25284d[_0x10dd('0x3e')]};return db['JscriptySessionReport'][_0x10dd('0x20')](_0x2fd549)[_0x10dd('0x26')](function(_0x49045f){_0x2cad54[_0x10dd('0x20')]=_0x49045f;if(_0xf5a8c4[_0x10dd('0x34')][_0x10dd('0x42')]){_0x25284d[_0x10dd('0x43')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0x10dd('0x44')](_0x25284d);})[_0x10dd('0x26')](function(_0x137d0a){_0x2cad54['rows']=_0x137d0a;return _0x2cad54;})[_0x10dd('0x26')](respondWithFilteredResult(_0x67b0e9,_0x25284d))[_0x10dd('0x45')](handleError(_0x67b0e9,null));};exports[_0x10dd('0x46')]=function(_0x116906,_0x22552f){var _0x418c68={'raw':!![],'where':{'id':_0x116906['params']['id']}},_0x365725={};_0x365725[_0x10dd('0x37')]=_['keys'](db[_0x10dd('0x2f')]['rawAttributes']);_0x365725[_0x10dd('0x34')]=_[_0x10dd('0x33')](_0x116906[_0x10dd('0x34')]);_0x365725[_0x10dd('0x35')]=_[_0x10dd('0x36')](_0x365725[_0x10dd('0x37')],_0x365725[_0x10dd('0x34')]);_0x418c68['attributes']=_[_0x10dd('0x36')](_0x365725['model'],qs['fields'](_0x116906[_0x10dd('0x34')][_0x10dd('0x39')]));_0x418c68['attributes']=_0x418c68[_0x10dd('0x38')][_0x10dd('0x3a')]?_0x418c68[_0x10dd('0x38')]:_0x365725[_0x10dd('0x37')];if(_0x116906[_0x10dd('0x34')][_0x10dd('0x42')]){_0x418c68[_0x10dd('0x43')]=[{'all':!![]}];}_0x418c68=_[_0x10dd('0x41')]({},_0x418c68,_0x116906['options']);return db[_0x10dd('0x2f')][_0x10dd('0x47')](_0x418c68)[_0x10dd('0x26')](handleEntityNotFound(_0x22552f,null))['then'](respondWithResult(_0x22552f,null))['catch'](handleError(_0x22552f,null));};exports[_0x10dd('0x48')]=function(_0x4970b8,_0x4cffd8){return db[_0x10dd('0x2f')][_0x10dd('0x48')](_0x4970b8[_0x10dd('0x49')],{})[_0x10dd('0x26')](respondWithResult(_0x4cffd8,0xc9))['catch'](handleError(_0x4cffd8,null));};exports[_0x10dd('0x25')]=function(_0x136340,_0x44c5a7){if(_0x136340['body']['id']){delete _0x136340['body']['id'];}return db[_0x10dd('0x2f')][_0x10dd('0x47')]({'where':{'id':_0x136340['params']['id']}})[_0x10dd('0x26')](handleEntityNotFound(_0x44c5a7,null))['then'](saveUpdates(_0x136340['body'],null))[_0x10dd('0x26')](respondWithResult(_0x44c5a7,null))[_0x10dd('0x45')](handleError(_0x44c5a7,null));};exports['destroy']=function(_0x5f5096,_0x34840c){return db[_0x10dd('0x2f')][_0x10dd('0x47')]({'where':{'id':_0x5f5096[_0x10dd('0x4a')]['id']}})[_0x10dd('0x26')](handleEntityNotFound(_0x34840c,null))[_0x10dd('0x26')](removeEntity(_0x34840c,null))['catch'](handleError(_0x34840c,null));};exports[_0x10dd('0x4b')]=function(_0xece291,_0x3289f1){return db[_0x10dd('0x2f')]['describe']()[_0x10dd('0x26')](respondWithResult(_0x3289f1,null))['catch'](handleError(_0x3289f1,null));};exports[_0x10dd('0x4c')]=function(_0x114aa6,_0x28f141,_0x36c885){var _0x427457={'raw':!![],'where':{}};var _0x411e74={};var _0x106e5c={'count':0x0,'rows':[]};return db[_0x10dd('0x2f')][_0x10dd('0x4d')]({'where':{'id':_0x114aa6[_0x10dd('0x4a')]['id']}})[_0x10dd('0x26')](handleEntityNotFound(_0x28f141,null))[_0x10dd('0x26')](function(_0x54e671){if(_0x54e671){_0x411e74[_0x10dd('0x37')]=_['keys'](db[_0x10dd('0x4e')]['rawAttributes']);_0x411e74[_0x10dd('0x34')]=_[_0x10dd('0x33')](_0x114aa6['query']);_0x411e74[_0x10dd('0x35')]=_['intersection'](_0x411e74[_0x10dd('0x37')],_0x411e74['query']);_0x427457[_0x10dd('0x38')]=_[_0x10dd('0x36')](_0x411e74[_0x10dd('0x37')],qs['fields'](_0x114aa6[_0x10dd('0x34')][_0x10dd('0x39')]));_0x427457[_0x10dd('0x38')]=_0x427457['attributes'][_0x10dd('0x3a')]?_0x427457[_0x10dd('0x38')]:_0x411e74['model'];if(!_0x114aa6[_0x10dd('0x34')]['hasOwnProperty'](_0x10dd('0x3c'))){_0x427457[_0x10dd('0x1f')]=qs[_0x10dd('0x1f')](_0x114aa6[_0x10dd('0x34')][_0x10dd('0x1f')]);_0x427457[_0x10dd('0x1d')]=qs[_0x10dd('0x1d')](_0x114aa6[_0x10dd('0x34')][_0x10dd('0x1d')]);}_0x427457['order']=qs[_0x10dd('0x3d')](_0x114aa6[_0x10dd('0x34')]['sort']);_0x427457['where']=qs[_0x10dd('0x35')](_[_0x10dd('0x3f')](_0x114aa6[_0x10dd('0x34')],_0x411e74[_0x10dd('0x35')]));_0x427457[_0x10dd('0x3e')][_0x10dd('0x4f')]=_0x54e671['id'];if(_0x114aa6[_0x10dd('0x34')][_0x10dd('0x40')]){_0x427457[_0x10dd('0x3e')]=_['merge'](_0x427457[_0x10dd('0x3e')],{'$or':_['map'](_0x427457[_0x10dd('0x38')],function(_0x3cbeaf){var _0x1f25a7={};_0x1f25a7[_0x3cbeaf]={'$like':'%'+_0x114aa6['query'][_0x10dd('0x40')]+'%'};return _0x1f25a7;})});}_0x427457=_[_0x10dd('0x41')]({},_0x427457,_0x114aa6[_0x10dd('0x50')]);return db[_0x10dd('0x4e')][_0x10dd('0x20')]({'where':_0x427457['where']})[_0x10dd('0x26')](function(_0x50efbf){_0x106e5c[_0x10dd('0x20')]=_0x50efbf;if(_0x114aa6[_0x10dd('0x34')][_0x10dd('0x42')]){_0x427457[_0x10dd('0x43')]=[{'all':!![]}];}return db[_0x10dd('0x4e')][_0x10dd('0x44')](_0x427457);})[_0x10dd('0x26')](function(_0xacba4c){_0x106e5c[_0x10dd('0x51')]=_0xacba4c;return _0x106e5c;});}})[_0x10dd('0x26')](respondWithFilteredResult(_0x28f141,_0x427457))[_0x10dd('0x45')](handleError(_0x28f141,null));};
\ No newline at end of file