Built motion from commit 82a371561bcdbc7605c801e5e414f4032ba9e7ad. Version 3.0.0...
[motion-next.git] / server / api / analyticFieldReport / analyticFieldReport.controller.js
index bd525ac..3e24587 100644 (file)
@@ -1 +1 @@
-const a17_0x44c4=['query','update','create','includeAll','error','send','catch','fields','then','like','destroy','../../components/parsers/qs','addFields','findAll','limit','json','findOne','VIRTUAL','where','bulkCreate','name','filters','body','Content-Range','end','order','bulkDestroy','count','model','params','sort','rawAttributes','set','undefined','transaction','stack','../../mysqldb','status','api','type','intersection','attributes','AnalyticCustomReport','offset','show','include','filter','merge','nolimit','map','length','keys','rows','sendStatus','AnalyticFieldReport','index','pick'];(function(_0x956d5b,_0x44c47f){const _0x2e75a3=function(_0x461a7d){while(--_0x461a7d){_0x956d5b['push'](_0x956d5b['shift']());}};_0x2e75a3(++_0x44c47f);}(a17_0x44c4,0x19e));const a17_0x2e75=function(_0x956d5b,_0x44c47f){_0x956d5b=_0x956d5b-0x0;let _0x2e75a3=a17_0x44c4[_0x956d5b];return _0x2e75a3;};const _0x4c8b2a=a17_0x2e75;'use strict';const _=require('lodash'),qs=require(_0x4c8b2a('0x35')),logger=require('../../config/logger')(_0x4c8b2a('0x17')),db=require(_0x4c8b2a('0x15'))['db'],{Op}=require('sequelize');function respondWithResult(_0x461a7d,_0x22e97b){return _0x22e97b=_0x22e97b||0xc8,function(_0x3f2c7b){const _0x4d062d=a17_0x2e75;if(_0x3f2c7b)return _0x461a7d[_0x4d062d('0x16')](_0x22e97b)[_0x4d062d('0x0')](_0x3f2c7b);};}function respondWithFilteredResult(_0x435bc9,_0x58c56f){return function(_0x1eb0f1){const _0x1294c2=a17_0x2e75;if(_0x1eb0f1){const _0x4cf859=_0x1eb0f1['count'],_0x3d72ac=_0x58c56f[_0x1294c2('0x1c')];let _0x2a557f=_0x58c56f[_0x1294c2('0x1c')]+_0x58c56f[_0x1294c2('0x38')],_0x11faea;return _0x2a557f>=_0x4cf859?(_0x2a557f=_0x4cf859,_0x11faea=0xc8):_0x11faea=0xce,_0x435bc9['status'](_0x11faea),_0x435bc9[_0x1294c2('0x11')](_0x1294c2('0x8'),_0x3d72ac+'-'+_0x2a557f+'/'+_0x4cf859)[_0x1294c2('0x0')](_0x1eb0f1);}return null;};}function saveUpdates(_0xa31000){return function(_0x42de61){const _0x195130=a17_0x2e75;if(_0x42de61)return _0x42de61[_0x195130('0x2b')](_0xa31000)[_0x195130('0x32')](function(_0x3f6cc3){return _0x3f6cc3;});return null;};}function removeEntity(_0x16ab26){return function(_0x110587){const _0x287a01=a17_0x2e75;if(_0x110587)return _0x110587[_0x287a01('0x34')]()['then'](function(){const _0x57fcd1=_0x287a01;_0x16ab26[_0x57fcd1('0x16')](0xcc)[_0x57fcd1('0x9')]();});};}function handleEntityNotFound(_0x3dbf21){return function(_0x56baba){const _0x25c8e4=a17_0x2e75;return!_0x56baba&&_0x3dbf21[_0x25c8e4('0x26')](0x194),_0x56baba;};}function handleError(_0x4ec128,_0x4ea385){return _0x4ea385=_0x4ea385||0x1f4,function(_0x48d87c){const _0xec9713=a17_0x2e75;logger[_0xec9713('0x2e')](_0x48d87c[_0xec9713('0x14')]),_0x48d87c[_0xec9713('0x5')]&&delete _0x48d87c['name'],_0x4ec128[_0xec9713('0x16')](_0x4ea385)[_0xec9713('0x2f')](_0x48d87c);};}exports[_0x4c8b2a('0x28')]=function(_0x5b7032,_0x2eb33e){const _0xeb7e1c=_0x4c8b2a;let _0x445067={};const _0x554a36={},_0x21f6f4={'count':0x0,'rows':[]},_0x45932c=_[_0xeb7e1c('0x22')](db[_0xeb7e1c('0x27')]['rawAttributes'],function(_0x27badb){const _0x444254=_0xeb7e1c;return{'name':_0x27badb['fieldName'],'type':_0x27badb[_0x444254('0x18')]['key']};});_0x554a36['model']=_[_0xeb7e1c('0x22')](_0x45932c,'name'),_0x554a36[_0xeb7e1c('0x2a')]=_[_0xeb7e1c('0x24')](_0x5b7032[_0xeb7e1c('0x2a')]),_0x554a36['filters']=_['intersection'](_0x554a36[_0xeb7e1c('0xd')],_0x554a36[_0xeb7e1c('0x2a')]),_0x445067[_0xeb7e1c('0x1a')]=_[_0xeb7e1c('0x19')](_0x554a36[_0xeb7e1c('0xd')],qs[_0xeb7e1c('0x31')](_0x5b7032[_0xeb7e1c('0x2a')][_0xeb7e1c('0x31')])),_0x445067[_0xeb7e1c('0x1a')]=_0x445067[_0xeb7e1c('0x1a')]['length']?_0x445067['attributes']:_0x554a36[_0xeb7e1c('0xd')];typeof _0x5b7032['query'][_0xeb7e1c('0x21')]===_0xeb7e1c('0x12')&&(_0x445067['limit']=qs[_0xeb7e1c('0x38')](_0x5b7032[_0xeb7e1c('0x2a')]['limit']),_0x445067[_0xeb7e1c('0x1c')]=qs[_0xeb7e1c('0x1c')](_0x5b7032[_0xeb7e1c('0x2a')][_0xeb7e1c('0x1c')]));_0x445067[_0xeb7e1c('0xa')]=qs['sort'](_0x5b7032['query'][_0xeb7e1c('0xf')]),_0x445067[_0xeb7e1c('0x3')]=qs[_0xeb7e1c('0x6')](_[_0xeb7e1c('0x29')](_0x5b7032[_0xeb7e1c('0x2a')],_0x554a36[_0xeb7e1c('0x6')]),_0x45932c);_0x5b7032['query'][_0xeb7e1c('0x1f')]&&(_0x445067['where']=_['merge'](_0x445067[_0xeb7e1c('0x3')],{[Op['or']]:_[_0xeb7e1c('0x22')](_0x45932c,function(_0x14da18){const _0x4e1b30=_0xeb7e1c;if(_0x14da18[_0x4e1b30('0x18')]!==_0x4e1b30('0x2')){const _0x3a27a8={};return _0x3a27a8[_0x14da18[_0x4e1b30('0x5')]]={[Op[_0x4e1b30('0x33')]]:'%'+_0x5b7032[_0x4e1b30('0x2a')][_0x4e1b30('0x1f')]+'%'},_0x3a27a8;}})}));_0x445067=_[_0xeb7e1c('0x20')]({},_0x445067,_0x5b7032['options']);const _0x5c1d66={'where':_0x445067['where']};return db[_0xeb7e1c('0x27')][_0xeb7e1c('0xc')](_0x5c1d66)[_0xeb7e1c('0x32')](function(_0x3939af){const _0x3009d2=_0xeb7e1c;return _0x21f6f4[_0x3009d2('0xc')]=_0x3939af,_0x5b7032[_0x3009d2('0x2a')][_0x3009d2('0x2d')]&&(_0x445067[_0x3009d2('0x1e')]=[{'all':!![]}]),db[_0x3009d2('0x27')][_0x3009d2('0x37')](_0x445067);})['then'](function(_0x94af05){const _0x57ddba=_0xeb7e1c;return _0x21f6f4[_0x57ddba('0x25')]=_0x94af05,_0x21f6f4;})['then'](respondWithFilteredResult(_0x2eb33e,_0x445067))[_0xeb7e1c('0x30')](handleError(_0x2eb33e,null));},exports[_0x4c8b2a('0x1d')]=function(_0xeb7c39,_0x4bb66f){const _0x4c17d5=_0x4c8b2a;let _0x49888b={'raw':![],'where':{'id':_0xeb7c39[_0x4c17d5('0xe')]['id']}};const _0xd3aa2d={};return _0xd3aa2d['model']=_[_0x4c17d5('0x24')](db[_0x4c17d5('0x27')][_0x4c17d5('0x10')]),_0xd3aa2d[_0x4c17d5('0x2a')]=_['keys'](_0xeb7c39[_0x4c17d5('0x2a')]),_0xd3aa2d[_0x4c17d5('0x6')]=_[_0x4c17d5('0x19')](_0xd3aa2d[_0x4c17d5('0xd')],_0xd3aa2d[_0x4c17d5('0x2a')]),_0x49888b[_0x4c17d5('0x1a')]=_[_0x4c17d5('0x19')](_0xd3aa2d[_0x4c17d5('0xd')],qs[_0x4c17d5('0x31')](_0xeb7c39['query'][_0x4c17d5('0x31')])),_0x49888b['attributes']=_0x49888b[_0x4c17d5('0x1a')][_0x4c17d5('0x23')]?_0x49888b[_0x4c17d5('0x1a')]:_0xd3aa2d[_0x4c17d5('0xd')],_0xeb7c39[_0x4c17d5('0x2a')]['includeAll']&&(_0x49888b[_0x4c17d5('0x1e')]=[{'all':!![]}]),_0x49888b=_[_0x4c17d5('0x20')]({},_0x49888b,_0xeb7c39['options']),db[_0x4c17d5('0x27')][_0x4c17d5('0x1')](_0x49888b)[_0x4c17d5('0x32')](handleEntityNotFound(_0x4bb66f,null))[_0x4c17d5('0x32')](respondWithResult(_0x4bb66f,null))[_0x4c17d5('0x30')](handleError(_0x4bb66f,null));},exports[_0x4c8b2a('0x2c')]=function(_0x3350d4,_0x3211b4){const _0x3aed46=_0x4c8b2a;return db[_0x3aed46('0x27')]['create'](_0x3350d4['body'],{})[_0x3aed46('0x32')](respondWithResult(_0x3211b4,0xc9))['catch'](handleError(_0x3211b4,null));},exports[_0x4c8b2a('0x4')]=function(_0x2348c5,_0x3f5fbb){const _0x92d9f7=_0x4c8b2a;return db[_0x92d9f7('0x27')][_0x92d9f7('0x4')](_0x2348c5['body'],{'raw':![],'individualHooks':!![]})[_0x92d9f7('0x32')](respondWithResult(_0x3f5fbb,0xc9))[_0x92d9f7('0x30')](handleError(_0x3f5fbb,null));},exports['update']=function(_0xa6d848,_0x890be3){const _0x39d38c=_0x4c8b2a;return _0xa6d848[_0x39d38c('0x7')]['id']&&delete _0xa6d848[_0x39d38c('0x7')]['id'],db['AnalyticFieldReport']['findOne']({'where':{'id':_0xa6d848[_0x39d38c('0xe')]['id']}})[_0x39d38c('0x32')](handleEntityNotFound(_0x890be3,null))[_0x39d38c('0x32')](saveUpdates(_0xa6d848['body'],null))[_0x39d38c('0x32')](respondWithResult(_0x890be3,null))[_0x39d38c('0x30')](handleError(_0x890be3,null));},exports[_0x4c8b2a('0x34')]=function(_0x1e1c4f,_0x954394){const _0x34b210=_0x4c8b2a;return db[_0x34b210('0x27')][_0x34b210('0x1')]({'where':{'id':_0x1e1c4f['params']['id']}})[_0x34b210('0x32')](handleEntityNotFound(_0x954394,null))['then'](removeEntity(_0x954394,null))[_0x34b210('0x30')](handleError(_0x954394,null));},exports[_0x4c8b2a('0xb')]=function(_0x5e0f4d,_0xbd1eef){const _0x59c5f5=_0x4c8b2a;return db[_0x59c5f5('0x27')][_0x59c5f5('0x34')]({'where':{'id':_0x5e0f4d[_0x59c5f5('0x2a')]['ids']||[]},'raw':![],'individualHooks':!![]})[_0x59c5f5('0x32')](respondWithResult(_0xbd1eef,0xcc))['catch'](handleError(_0xbd1eef,null));},exports[_0x4c8b2a('0x36')]=function(_0x4448a0,_0x46f948){const _0x35cc92=_0x4c8b2a;return db[_0x35cc92('0x1b')][_0x35cc92('0x1')]({'where':{'id':_0x4448a0[_0x35cc92('0xe')]['id']}})[_0x35cc92('0x32')](handleEntityNotFound(_0x46f948,null))['then'](function(_0x2c76b1){const _0x47732b=_0x35cc92;if(_0x2c76b1)return db['sequelize'][_0x47732b('0x13')](function(_0x5532d0){const _0x212b25=_0x47732b;return db[_0x212b25('0x27')][_0x212b25('0x34')]({'where':{'CustomReportId':_0x4448a0[_0x212b25('0xe')]['id']},'transaction':_0x5532d0})['then'](function(){const _0x1e75a5=_0x212b25,_0x55742c=_[_0x1e75a5('0x22')](_0x4448a0[_0x1e75a5('0x7')],function(_0x229a70){return delete _0x229a70['id'],_0x229a70['CustomReportId']=_0x4448a0['params']['id'],_0x229a70;});return db[_0x1e75a5('0x27')]['bulkCreate'](_0x55742c,{'transaction':_0x5532d0});});})['then'](function(){const _0x55008e=_0x47732b;return db[_0x55008e('0x27')][_0x55008e('0x37')]({'where':{'CustomReportId':_0x4448a0[_0x55008e('0xe')]['id']}});});})[_0x35cc92('0x32')](respondWithResult(_0x46f948,null))[_0x35cc92('0x30')](handleError(_0x46f948,null));};
\ No newline at end of file
+const a17_0x1ad7=['show','filters','intersection','merge','body','update','keys','findOne','map','params','sequelize','VIRTUAL','pick','api','../../components/parsers/qs','limit','then','destroy','catch','index','rows','include','send','AnalyticCustomReport','where','lodash','count','key','attributes','length','../../config/logger','options','bulkCreate','like','order','offset','ids','includeAll','name','sendStatus','nolimit','fieldName','filter','fields','query','type','Content-Range','undefined','rawAttributes','addFields','create','../../mysqldb','AnalyticFieldReport','end','transaction','json','status','model','sort'];(function(_0x4a605f,_0x1ad7f1){const _0x2c80f6=function(_0x231424){while(--_0x231424){_0x4a605f['push'](_0x4a605f['shift']());}};_0x2c80f6(++_0x1ad7f1);}(a17_0x1ad7,0x187));const a17_0x2c80=function(_0x4a605f,_0x1ad7f1){_0x4a605f=_0x4a605f-0x0;let _0x2c80f6=a17_0x1ad7[_0x4a605f];return _0x2c80f6;};const _0x564291=a17_0x2c80;'use strict';const _=require(_0x564291('0x2f')),qs=require(_0x564291('0x24')),logger=require(_0x564291('0x34'))(_0x564291('0x23')),db=require(_0x564291('0xe'))['db'],{Op}=require(_0x564291('0x20'));function respondWithResult(_0x231424,_0x413074){return _0x413074=_0x413074||0xc8,function(_0x582cd2){const _0x260b70=a17_0x2c80;if(_0x582cd2)return _0x231424[_0x260b70('0x13')](_0x413074)[_0x260b70('0x12')](_0x582cd2);};}function respondWithFilteredResult(_0x340864,_0x24be41){return function(_0x307969){const _0x32b922=a17_0x2c80;if(_0x307969){const _0x408145=_0x307969[_0x32b922('0x30')],_0x6fb950=_0x24be41[_0x32b922('0x39')];let _0x476f7b=_0x24be41[_0x32b922('0x39')]+_0x24be41['limit'],_0x506909;return _0x476f7b>=_0x408145?(_0x476f7b=_0x408145,_0x506909=0xc8):_0x506909=0xce,_0x340864['status'](_0x506909),_0x340864['set'](_0x32b922('0x9'),_0x6fb950+'-'+_0x476f7b+'/'+_0x408145)[_0x32b922('0x12')](_0x307969);}return null;};}function saveUpdates(_0x29bf2f){return function(_0x185d42){const _0x394011=a17_0x2c80;if(_0x185d42)return _0x185d42[_0x394011('0x1b')](_0x29bf2f)[_0x394011('0x26')](function(_0x251170){return _0x251170;});return null;};}function removeEntity(_0x19c44d){return function(_0x2df92f){const _0x2fe25e=a17_0x2c80;if(_0x2df92f)return _0x2df92f[_0x2fe25e('0x27')]()[_0x2fe25e('0x26')](function(){const _0x17f442=_0x2fe25e;_0x19c44d['status'](0xcc)[_0x17f442('0x10')]();});};}function handleEntityNotFound(_0x664a8){return function(_0x541e54){const _0x58c245=a17_0x2c80;return!_0x541e54&&_0x664a8[_0x58c245('0x2')](0x194),_0x541e54;};}function handleError(_0x636586,_0x15bcd1){return _0x15bcd1=_0x15bcd1||0x1f4,function(_0x48378e){const _0x4ca437=a17_0x2c80;logger['error'](_0x48378e['stack']),_0x48378e[_0x4ca437('0x1')]&&delete _0x48378e[_0x4ca437('0x1')],_0x636586[_0x4ca437('0x13')](_0x15bcd1)[_0x4ca437('0x2c')](_0x48378e);};}exports[_0x564291('0x29')]=function(_0x6aed13,_0x2e81ff){const _0x428232=_0x564291;let _0x2b7399={};const _0x4507a3={},_0x5bcce5={'count':0x0,'rows':[]},_0x1220c7=_[_0x428232('0x1e')](db[_0x428232('0xf')][_0x428232('0xb')],function(_0x278e27){const _0x431122=_0x428232;return{'name':_0x278e27[_0x431122('0x4')],'type':_0x278e27[_0x431122('0x8')][_0x431122('0x31')]};});_0x4507a3['model']=_[_0x428232('0x1e')](_0x1220c7,_0x428232('0x1')),_0x4507a3['query']=_[_0x428232('0x1c')](_0x6aed13[_0x428232('0x7')]),_0x4507a3['filters']=_['intersection'](_0x4507a3['model'],_0x4507a3[_0x428232('0x7')]),_0x2b7399[_0x428232('0x32')]=_[_0x428232('0x18')](_0x4507a3[_0x428232('0x14')],qs['fields'](_0x6aed13[_0x428232('0x7')][_0x428232('0x6')])),_0x2b7399[_0x428232('0x32')]=_0x2b7399[_0x428232('0x32')]['length']?_0x2b7399['attributes']:_0x4507a3[_0x428232('0x14')];typeof _0x6aed13[_0x428232('0x7')][_0x428232('0x3')]===_0x428232('0xa')&&(_0x2b7399[_0x428232('0x25')]=qs[_0x428232('0x25')](_0x6aed13['query'][_0x428232('0x25')]),_0x2b7399[_0x428232('0x39')]=qs[_0x428232('0x39')](_0x6aed13[_0x428232('0x7')][_0x428232('0x39')]));_0x2b7399[_0x428232('0x38')]=qs[_0x428232('0x15')](_0x6aed13[_0x428232('0x7')][_0x428232('0x15')]),_0x2b7399[_0x428232('0x2e')]=qs['filters'](_[_0x428232('0x22')](_0x6aed13[_0x428232('0x7')],_0x4507a3[_0x428232('0x17')]),_0x1220c7);_0x6aed13['query'][_0x428232('0x5')]&&(_0x2b7399['where']=_[_0x428232('0x19')](_0x2b7399[_0x428232('0x2e')],{[Op['or']]:_[_0x428232('0x1e')](_0x1220c7,function(_0x41d10a){const _0x25d665=_0x428232;if(_0x41d10a[_0x25d665('0x8')]!==_0x25d665('0x21')){const _0xd9c032={};return _0xd9c032[_0x41d10a[_0x25d665('0x1')]]={[Op[_0x25d665('0x37')]]:'%'+_0x6aed13[_0x25d665('0x7')][_0x25d665('0x5')]+'%'},_0xd9c032;}})}));_0x2b7399=_[_0x428232('0x19')]({},_0x2b7399,_0x6aed13[_0x428232('0x35')]);const _0x4d5cdc={'where':_0x2b7399[_0x428232('0x2e')]};return db[_0x428232('0xf')][_0x428232('0x30')](_0x4d5cdc)[_0x428232('0x26')](function(_0x28c856){const _0x46397d=_0x428232;return _0x5bcce5[_0x46397d('0x30')]=_0x28c856,_0x6aed13[_0x46397d('0x7')][_0x46397d('0x0')]&&(_0x2b7399[_0x46397d('0x2b')]=[{'all':!![]}]),db[_0x46397d('0xf')]['findAll'](_0x2b7399);})[_0x428232('0x26')](function(_0x2bbeca){const _0x194566=_0x428232;return _0x5bcce5[_0x194566('0x2a')]=_0x2bbeca,_0x5bcce5;})[_0x428232('0x26')](respondWithFilteredResult(_0x2e81ff,_0x2b7399))[_0x428232('0x28')](handleError(_0x2e81ff,null));},exports[_0x564291('0x16')]=function(_0x56444b,_0x2f442c){const _0x44c797=_0x564291;let _0x901af={'raw':![],'where':{'id':_0x56444b[_0x44c797('0x1f')]['id']}};const _0x36d7a3={};return _0x36d7a3[_0x44c797('0x14')]=_[_0x44c797('0x1c')](db[_0x44c797('0xf')][_0x44c797('0xb')]),_0x36d7a3['query']=_[_0x44c797('0x1c')](_0x56444b[_0x44c797('0x7')]),_0x36d7a3[_0x44c797('0x17')]=_['intersection'](_0x36d7a3['model'],_0x36d7a3[_0x44c797('0x7')]),_0x901af[_0x44c797('0x32')]=_[_0x44c797('0x18')](_0x36d7a3[_0x44c797('0x14')],qs[_0x44c797('0x6')](_0x56444b[_0x44c797('0x7')][_0x44c797('0x6')])),_0x901af[_0x44c797('0x32')]=_0x901af['attributes'][_0x44c797('0x33')]?_0x901af[_0x44c797('0x32')]:_0x36d7a3[_0x44c797('0x14')],_0x56444b[_0x44c797('0x7')][_0x44c797('0x0')]&&(_0x901af[_0x44c797('0x2b')]=[{'all':!![]}]),_0x901af=_['merge']({},_0x901af,_0x56444b['options']),db['AnalyticFieldReport']['findOne'](_0x901af)[_0x44c797('0x26')](handleEntityNotFound(_0x2f442c,null))[_0x44c797('0x26')](respondWithResult(_0x2f442c,null))[_0x44c797('0x28')](handleError(_0x2f442c,null));},exports[_0x564291('0xd')]=function(_0x8165c4,_0x474fe6){const _0x1ad842=_0x564291;return db['AnalyticFieldReport'][_0x1ad842('0xd')](_0x8165c4[_0x1ad842('0x1a')],{})[_0x1ad842('0x26')](respondWithResult(_0x474fe6,0xc9))[_0x1ad842('0x28')](handleError(_0x474fe6,null));},exports['bulkCreate']=function(_0x24a9d3,_0x3f30ae){const _0x49b119=_0x564291;return db['AnalyticFieldReport'][_0x49b119('0x36')](_0x24a9d3['body'],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x3f30ae,0xc9))[_0x49b119('0x28')](handleError(_0x3f30ae,null));},exports['update']=function(_0x4d5ead,_0x15d1e0){const _0x6bb96e=_0x564291;return _0x4d5ead[_0x6bb96e('0x1a')]['id']&&delete _0x4d5ead[_0x6bb96e('0x1a')]['id'],db['AnalyticFieldReport']['findOne']({'where':{'id':_0x4d5ead[_0x6bb96e('0x1f')]['id']}})[_0x6bb96e('0x26')](handleEntityNotFound(_0x15d1e0,null))[_0x6bb96e('0x26')](saveUpdates(_0x4d5ead[_0x6bb96e('0x1a')],null))['then'](respondWithResult(_0x15d1e0,null))[_0x6bb96e('0x28')](handleError(_0x15d1e0,null));},exports[_0x564291('0x27')]=function(_0x3669a0,_0xb2b4b1){const _0x3f5e40=_0x564291;return db[_0x3f5e40('0xf')][_0x3f5e40('0x1d')]({'where':{'id':_0x3669a0[_0x3f5e40('0x1f')]['id']}})[_0x3f5e40('0x26')](handleEntityNotFound(_0xb2b4b1,null))[_0x3f5e40('0x26')](removeEntity(_0xb2b4b1,null))[_0x3f5e40('0x28')](handleError(_0xb2b4b1,null));},exports['bulkDestroy']=function(_0x514bbf,_0x2ebb46){const _0x583e01=_0x564291;return db[_0x583e01('0xf')]['destroy']({'where':{'id':_0x514bbf[_0x583e01('0x7')][_0x583e01('0x3a')]||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x2ebb46,0xcc))[_0x583e01('0x28')](handleError(_0x2ebb46,null));},exports[_0x564291('0xc')]=function(_0x2ef848,_0x2784dc){const _0x570040=_0x564291;return db[_0x570040('0x2d')][_0x570040('0x1d')]({'where':{'id':_0x2ef848[_0x570040('0x1f')]['id']}})['then'](handleEntityNotFound(_0x2784dc,null))['then'](function(_0x3d5949){const _0x152a18=_0x570040;if(_0x3d5949)return db[_0x152a18('0x20')][_0x152a18('0x11')](function(_0x312c39){const _0x509cc9=_0x152a18;return db[_0x509cc9('0xf')][_0x509cc9('0x27')]({'where':{'CustomReportId':_0x2ef848[_0x509cc9('0x1f')]['id']},'transaction':_0x312c39})['then'](function(){const _0x1b25b3=_0x509cc9,_0xba827d=_[_0x1b25b3('0x1e')](_0x2ef848[_0x1b25b3('0x1a')],function(_0x5007c3){const _0x10e676=_0x1b25b3;return delete _0x5007c3['id'],_0x5007c3['CustomReportId']=_0x2ef848[_0x10e676('0x1f')]['id'],_0x5007c3;});return db[_0x1b25b3('0xf')]['bulkCreate'](_0xba827d,{'transaction':_0x312c39});});})[_0x152a18('0x26')](function(){const _0x2df36b=_0x152a18;return db['AnalyticFieldReport']['findAll']({'where':{'CustomReportId':_0x2ef848[_0x2df36b('0x1f')]['id']}});});})['then'](respondWithResult(_0x2784dc,null))['catch'](handleError(_0x2784dc,null));};
\ No newline at end of file