Built motion from commit 8dca541896b0ff92bb88a36cc13f4f385b593b4b. Version 3.0.0...
[motion-next.git] / server / api / trigger / trigger.controller.js
index 14f3944..e2c3f70 100644 (file)
@@ -1 +1 @@
-const a638_0x4c6c=['userProfileId','sequelize','../../components/parsers/qs','TriggerAllId','key','query','offset','rawAttributes','lodash','Unable\x20to\x20retrieve\x20the\x20current\x20user','destroy','order','addAllCondition','stack','addAnyCondition','rows','intersection','name','merge','Action','UserProfileResource','Content-Range','fieldName','filters','nolimit','limit','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','like','pick','keys','../../mysqldb','set','get','Condition','fields','Triggers','getActions','undefined','UserProfileSection','map','sendStatus','findOne','getAllConditions','create','api','length','filter','includeAll','sort','options','model','params','then','status','getAnyConditions','json','Trigger','TriggerAnyId','where','send','role','end','findAll','addAction','user','type','VIRTUAL','../../config/logger','count','body','attributes','update','error'];(function(_0x556ed5,_0x4c6c15){const _0x3d473f=function(_0xeb935){while(--_0xeb935){_0x556ed5['push'](_0x556ed5['shift']());}};_0x3d473f(++_0x4c6c15);}(a638_0x4c6c,0x7d));const a638_0x3d47=function(_0x556ed5,_0x4c6c15){_0x556ed5=_0x556ed5-0x0;let _0x3d473f=a638_0x4c6c[_0x556ed5];return _0x3d473f;};const _0x31926a=a638_0x3d47;'use strict';const _=require(_0x31926a('0x1f')),qs=require(_0x31926a('0x19')),logger=require(_0x31926a('0x11'))(_0x31926a('0x44')),db=require(_0x31926a('0x36'))['db'],{Op}=require(_0x31926a('0x18'));function respondWithResult(_0xeb935,_0x1b3b6f){return _0x1b3b6f=_0x1b3b6f||0xc8,function(_0x57a308){const _0x3e1391=a638_0x3d47;if(_0x57a308)return _0xeb935[_0x3e1391('0x3')](_0x1b3b6f)[_0x3e1391('0x5')](_0x57a308);};}function respondWithFilteredResult(_0x2bb836,_0xd52d16){return function(_0x232405){const _0x1a3c95=a638_0x3d47;if(_0x232405){const _0xbd16f6=_0x232405['count'],_0xc7ac5c=_0xd52d16['offset'];let _0x301a0e=_0xd52d16[_0x1a3c95('0x1d')]+_0xd52d16[_0x1a3c95('0x30')],_0x5b6d3d;return _0x301a0e>=_0xbd16f6?(_0x301a0e=_0xbd16f6,_0x5b6d3d=0xc8):_0x5b6d3d=0xce,_0x2bb836[_0x1a3c95('0x3')](_0x5b6d3d),_0x2bb836[_0x1a3c95('0x37')](_0x1a3c95('0x2c'),_0xc7ac5c+'-'+_0x301a0e+'/'+_0xbd16f6)[_0x1a3c95('0x5')](_0x232405);}return null;};}function saveUpdates(_0x1ef7b1){return function(_0x4922b3){const _0x41f515=a638_0x3d47;if(_0x4922b3)return _0x4922b3[_0x41f515('0x15')](_0x1ef7b1)[_0x41f515('0x2')](function(_0xd69ecc){return _0xd69ecc;});return null;};}function removeEntity(_0x593979){return function(_0x17a80e){const _0xe1e1b2=a638_0x3d47;if(_0x17a80e)return _0x17a80e[_0xe1e1b2('0x21')]()[_0xe1e1b2('0x2')](function(){const _0x1fb0d2=_0x17a80e['get']({'plain':!![]}),_0x1e6144='Triggers';return db['UserProfileResource']['destroy']({'where':{'type':_0x1e6144,'resourceId':_0x1fb0d2['id']}})['then'](function(){return _0x17a80e;});})[_0xe1e1b2('0x2')](function(){const _0x43300d=_0xe1e1b2;_0x593979[_0x43300d('0x3')](0xcc)[_0x43300d('0xb')]();});};}function handleEntityNotFound(_0x49a312){return function(_0x36cd7b){const _0xa986d1=a638_0x3d47;return!_0x36cd7b&&_0x49a312[_0xa986d1('0x40')](0x194),_0x36cd7b;};}function handleError(_0x4fd662,_0x35af7f){return _0x35af7f=_0x35af7f||0x1f4,function(_0x2f094e){const _0x3a5e56=a638_0x3d47;logger[_0x3a5e56('0x16')](_0x2f094e[_0x3a5e56('0x24')]),_0x2f094e[_0x3a5e56('0x28')]&&delete _0x2f094e[_0x3a5e56('0x28')],_0x4fd662[_0x3a5e56('0x3')](_0x35af7f)[_0x3a5e56('0x9')](_0x2f094e);};}exports['index']=function(_0xc70cb4,_0xbdb700){const _0x1c286a=_0x31926a;let _0xa1db58={};const _0x185048={},_0x32b938={'count':0x0,'rows':[]},_0x3b9f0e=_[_0x1c286a('0x3f')](db['Trigger'][_0x1c286a('0x1e')],function(_0x278d62){const _0x2f8371=_0x1c286a;return{'name':_0x278d62[_0x2f8371('0x2d')],'type':_0x278d62[_0x2f8371('0xf')][_0x2f8371('0x1b')]};});_0x185048['model']=_['map'](_0x3b9f0e,_0x1c286a('0x28')),_0x185048[_0x1c286a('0x1c')]=_['keys'](_0xc70cb4['query']),_0x185048[_0x1c286a('0x2e')]=_['intersection'](_0x185048[_0x1c286a('0x0')],_0x185048['query']),_0xa1db58[_0x1c286a('0x14')]=_[_0x1c286a('0x27')](_0x185048[_0x1c286a('0x0')],qs[_0x1c286a('0x3a')](_0xc70cb4[_0x1c286a('0x1c')][_0x1c286a('0x3a')])),_0xa1db58['attributes']=_0xa1db58[_0x1c286a('0x14')][_0x1c286a('0x45')]?_0xa1db58[_0x1c286a('0x14')]:_0x185048[_0x1c286a('0x0')];typeof _0xc70cb4[_0x1c286a('0x1c')][_0x1c286a('0x2f')]==='undefined'&&(_0xa1db58[_0x1c286a('0x30')]=qs[_0x1c286a('0x30')](_0xc70cb4[_0x1c286a('0x1c')][_0x1c286a('0x30')]),_0xa1db58['offset']=qs[_0x1c286a('0x1d')](_0xc70cb4['query']['offset']));_0xa1db58['order']=qs[_0x1c286a('0x48')](_0xc70cb4[_0x1c286a('0x1c')][_0x1c286a('0x48')]),_0xa1db58[_0x1c286a('0x8')]=qs[_0x1c286a('0x2e')](_[_0x1c286a('0x34')](_0xc70cb4[_0x1c286a('0x1c')],_0x185048[_0x1c286a('0x2e')]),_0x3b9f0e);_0xc70cb4['query'][_0x1c286a('0x46')]&&(_0xa1db58[_0x1c286a('0x8')]=_[_0x1c286a('0x29')](_0xa1db58[_0x1c286a('0x8')],{[Op['or']]:_[_0x1c286a('0x3f')](_0x3b9f0e,function(_0xcccec3){const _0x54e2d7=_0x1c286a;if(_0xcccec3[_0x54e2d7('0xf')]!==_0x54e2d7('0x10')){const _0x2002f6={};return _0x2002f6[_0xcccec3[_0x54e2d7('0x28')]]={[Op[_0x54e2d7('0x33')]]:'%'+_0xc70cb4[_0x54e2d7('0x1c')][_0x54e2d7('0x46')]+'%'},_0x2002f6;}})}));_0xa1db58=_[_0x1c286a('0x29')]({},_0xa1db58,_0xc70cb4[_0x1c286a('0x49')]);const _0x1db22e={'where':_0xa1db58[_0x1c286a('0x8')]};return db['Trigger'][_0x1c286a('0x12')](_0x1db22e)['then'](function(_0x3039e6){const _0x15d8f5=_0x1c286a;return _0x32b938[_0x15d8f5('0x12')]=_0x3039e6,_0xc70cb4[_0x15d8f5('0x1c')][_0x15d8f5('0x47')]&&(_0xa1db58['include']=[{'all':!![]}]),db[_0x15d8f5('0x6')][_0x15d8f5('0xc')](_0xa1db58);})[_0x1c286a('0x2')](function(_0x3b395d){const _0x54f1b6=_0x1c286a;return _0x32b938[_0x54f1b6('0x26')]=_0x3b395d,_0x32b938;})['then'](respondWithFilteredResult(_0xbdb700,_0xa1db58))[_0x1c286a('0x31')](handleError(_0xbdb700,null));},exports['show']=function(_0x569531,_0x57aba7){const _0x45970f=_0x31926a;let _0x412a1a={'raw':![],'where':{'id':_0x569531[_0x45970f('0x1')]['id']}};const _0xe76483={};return _0xe76483[_0x45970f('0x0')]=_[_0x45970f('0x35')](db[_0x45970f('0x6')][_0x45970f('0x1e')]),_0xe76483[_0x45970f('0x1c')]=_[_0x45970f('0x35')](_0x569531[_0x45970f('0x1c')]),_0xe76483[_0x45970f('0x2e')]=_[_0x45970f('0x27')](_0xe76483['model'],_0xe76483[_0x45970f('0x1c')]),_0x412a1a[_0x45970f('0x14')]=_[_0x45970f('0x27')](_0xe76483[_0x45970f('0x0')],qs[_0x45970f('0x3a')](_0x569531['query'][_0x45970f('0x3a')])),_0x412a1a[_0x45970f('0x14')]=_0x412a1a[_0x45970f('0x14')][_0x45970f('0x45')]?_0x412a1a[_0x45970f('0x14')]:_0xe76483[_0x45970f('0x0')],_0x569531[_0x45970f('0x1c')][_0x45970f('0x47')]&&(_0x412a1a['include']=[{'all':!![]}]),_0x412a1a=_['merge']({},_0x412a1a,_0x569531[_0x45970f('0x49')]),db['Trigger'][_0x45970f('0x41')](_0x412a1a)[_0x45970f('0x2')](handleEntityNotFound(_0x57aba7,null))[_0x45970f('0x2')](respondWithResult(_0x57aba7,null))['catch'](handleError(_0x57aba7,null));},exports[_0x31926a('0x43')]=function(_0x17fa39,_0x4cd7e5){const _0x5ce405=_0x31926a;return db[_0x5ce405('0x6')]['create'](_0x17fa39['body'],{})['then'](function(_0x82181f){const _0x2c9242=_0x5ce405,_0x20f6ab=_0x17fa39[_0x2c9242('0xe')][_0x2c9242('0x38')]({'plain':!![]});if(!_0x20f6ab)throw new Error(_0x2c9242('0x20'));if(_0x20f6ab[_0x2c9242('0xa')]===_0x2c9242('0xe')){const _0x27872b=_0x82181f[_0x2c9242('0x38')]({'plain':!![]}),_0x516e0e=_0x2c9242('0x3b');return db[_0x2c9242('0x3e')][_0x2c9242('0x41')]({'where':{'name':_0x516e0e,'userProfileId':_0x20f6ab[_0x2c9242('0x17')]},'raw':!![]})['then'](function(_0x1a2545){const _0x434fd3=_0x2c9242;return _0x1a2545&&_0x1a2545['autoAssociation']===0x0?db[_0x434fd3('0x2b')]['create']({'name':_0x27872b[_0x434fd3('0x28')],'resourceId':_0x27872b['id'],'type':_0x1a2545['name'],'sectionId':_0x1a2545['id']},{})[_0x434fd3('0x2')](function(){return _0x82181f;}):_0x82181f;})[_0x2c9242('0x31')](function(_0x333f7a){const _0x28ce0b=_0x2c9242;logger['error'](_0x28ce0b('0x32'),_0x333f7a);throw _0x333f7a;});}return _0x82181f;})[_0x5ce405('0x2')](respondWithResult(_0x4cd7e5,0xc9))[_0x5ce405('0x31')](handleError(_0x4cd7e5,null));},exports[_0x31926a('0x15')]=function(_0x6487b4,_0x257e34){const _0x1821ec=_0x31926a;return _0x6487b4[_0x1821ec('0x13')]['id']&&delete _0x6487b4[_0x1821ec('0x13')]['id'],db[_0x1821ec('0x6')][_0x1821ec('0x41')]({'where':{'id':_0x6487b4[_0x1821ec('0x1')]['id']}})[_0x1821ec('0x2')](handleEntityNotFound(_0x257e34,null))['then'](saveUpdates(_0x6487b4['body'],null))[_0x1821ec('0x2')](respondWithResult(_0x257e34,null))[_0x1821ec('0x31')](handleError(_0x257e34,null));},exports[_0x31926a('0x21')]=function(_0x45184e,_0x294706){const _0x282585=_0x31926a;return db[_0x282585('0x6')][_0x282585('0x41')]({'where':{'id':_0x45184e[_0x282585('0x1')]['id']}})[_0x282585('0x2')](handleEntityNotFound(_0x294706,null))[_0x282585('0x2')](removeEntity(_0x294706,null))[_0x282585('0x31')](handleError(_0x294706,null));},exports[_0x31926a('0x23')]=function(_0x45d331,_0x4c2d19){const _0x3acb2d=_0x31926a;return _0x45d331[_0x3acb2d('0x13')]['id']&&delete _0x45d331[_0x3acb2d('0x13')]['id'],db[_0x3acb2d('0x6')]['findOne']({'where':{'id':_0x45d331['params']['id']}})['then'](handleEntityNotFound(_0x4c2d19,null))[_0x3acb2d('0x2')](function(_0x1bfef9){const _0x430478=_0x3acb2d;if(_0x1bfef9)return _0x45d331[_0x430478('0x13')][_0x430478('0x1a')]=_0x1bfef9['id'],db[_0x430478('0x39')]['create'](_0x45d331[_0x430478('0x13')]);})[_0x3acb2d('0x2')](respondWithResult(_0x4c2d19,null))[_0x3acb2d('0x31')](handleError(_0x4c2d19,null));},exports[_0x31926a('0x25')]=function(_0x68c9a4,_0x1c27c6){const _0x300fb5=_0x31926a;return _0x68c9a4['body']['id']&&delete _0x68c9a4[_0x300fb5('0x13')]['id'],db['Trigger'][_0x300fb5('0x41')]({'where':{'id':_0x68c9a4[_0x300fb5('0x1')]['id']}})['then'](handleEntityNotFound(_0x1c27c6,null))['then'](function(_0x1c3e1a){const _0x5b7c1f=_0x300fb5;if(_0x1c3e1a)return _0x68c9a4['body'][_0x5b7c1f('0x7')]=_0x1c3e1a['id'],db[_0x5b7c1f('0x39')][_0x5b7c1f('0x43')](_0x68c9a4[_0x5b7c1f('0x13')]);})['then'](respondWithResult(_0x1c27c6,null))[_0x300fb5('0x31')](handleError(_0x1c27c6,null));},exports[_0x31926a('0x42')]=function(_0x58936e,_0x589734){const _0x35cdac=_0x31926a;let _0x5582a9={};const _0x2fca71={};let _0x399476,_0x325fae;return db[_0x35cdac('0x6')][_0x35cdac('0x41')]({'where':{'id':_0x58936e[_0x35cdac('0x1')]['id']}})[_0x35cdac('0x2')](handleEntityNotFound(_0x589734,null))[_0x35cdac('0x2')](function(_0x112c90){const _0x141806=_0x35cdac;if(_0x112c90)return _0x399476=_0x112c90,_0x2fca71['model']=_[_0x141806('0x35')](db[_0x141806('0x39')][_0x141806('0x1e')]),_0x2fca71[_0x141806('0x1c')]=_[_0x141806('0x35')](_0x58936e[_0x141806('0x1c')]),_0x2fca71['filters']=_[_0x141806('0x27')](_0x2fca71[_0x141806('0x0')],_0x2fca71[_0x141806('0x1c')]),_0x5582a9[_0x141806('0x14')]=_[_0x141806('0x27')](_0x2fca71[_0x141806('0x0')],qs[_0x141806('0x3a')](_0x58936e[_0x141806('0x1c')][_0x141806('0x3a')])),_0x5582a9[_0x141806('0x14')]=_0x5582a9[_0x141806('0x14')][_0x141806('0x45')]?_0x5582a9[_0x141806('0x14')]:_0x2fca71[_0x141806('0x0')],_0x5582a9['order']=qs[_0x141806('0x48')](_0x58936e[_0x141806('0x1c')][_0x141806('0x48')]),_0x5582a9[_0x141806('0x8')]=qs[_0x141806('0x2e')](_[_0x141806('0x34')](_0x58936e['query'],_0x2fca71[_0x141806('0x2e')])),_0x58936e[_0x141806('0x1c')][_0x141806('0x46')]&&(_0x5582a9[_0x141806('0x8')]=_[_0x141806('0x29')](_0x5582a9[_0x141806('0x8')],{[Op['or']]:_[_0x141806('0x3f')](_0x5582a9[_0x141806('0x14')],function(_0xdd99){const _0x10943f=_0x141806,_0x5abb8e={};return _0x5abb8e[_0xdd99]={[Op[_0x10943f('0x33')]]:'%'+_0x58936e[_0x10943f('0x1c')]['filter']+'%'},_0x5abb8e;})})),_0x5582a9=_['merge']({},_0x5582a9,_0x58936e[_0x141806('0x49')]),_0x399476['getAllConditions'](_0x5582a9);})[_0x35cdac('0x2')](function(_0xdb24bd){const _0x48cff2=_0x35cdac;if(_0xdb24bd)return _0x325fae=_0xdb24bd[_0x48cff2('0x45')],typeof _0x58936e['query'][_0x48cff2('0x2f')]===_0x48cff2('0x3d')&&(_0x5582a9[_0x48cff2('0x30')]=qs[_0x48cff2('0x30')](_0x58936e['query']['limit']),_0x5582a9[_0x48cff2('0x1d')]=qs[_0x48cff2('0x1d')](_0x58936e['query'][_0x48cff2('0x1d')])),_0x399476[_0x48cff2('0x42')](_0x5582a9);})[_0x35cdac('0x2')](function(_0x32155e){if(_0x32155e)return _0x32155e?{'count':_0x325fae,'rows':_0x32155e}:null;})[_0x35cdac('0x2')](respondWithResult(_0x589734,null))['catch'](handleError(_0x589734,null));},exports[_0x31926a('0x4')]=function(_0x5b9a70,_0x279fd1){const _0x4b5a6b=_0x31926a;let _0x2327e2={};const _0x14782b={};let _0x47e05d,_0x36c446;return db[_0x4b5a6b('0x6')][_0x4b5a6b('0x41')]({'where':{'id':_0x5b9a70[_0x4b5a6b('0x1')]['id']}})[_0x4b5a6b('0x2')](handleEntityNotFound(_0x279fd1,null))[_0x4b5a6b('0x2')](function(_0x4f1e06){const _0x12b632=_0x4b5a6b;if(_0x4f1e06)return _0x47e05d=_0x4f1e06,_0x14782b['model']=_['keys'](db[_0x12b632('0x39')][_0x12b632('0x1e')]),_0x14782b[_0x12b632('0x1c')]=_[_0x12b632('0x35')](_0x5b9a70[_0x12b632('0x1c')]),_0x14782b[_0x12b632('0x2e')]=_['intersection'](_0x14782b[_0x12b632('0x0')],_0x14782b[_0x12b632('0x1c')]),_0x2327e2[_0x12b632('0x14')]=_[_0x12b632('0x27')](_0x14782b['model'],qs[_0x12b632('0x3a')](_0x5b9a70['query'][_0x12b632('0x3a')])),_0x2327e2[_0x12b632('0x14')]=_0x2327e2['attributes']['length']?_0x2327e2[_0x12b632('0x14')]:_0x14782b[_0x12b632('0x0')],_0x2327e2[_0x12b632('0x22')]=qs[_0x12b632('0x48')](_0x5b9a70['query'][_0x12b632('0x48')]),_0x2327e2['where']=qs[_0x12b632('0x2e')](_[_0x12b632('0x34')](_0x5b9a70[_0x12b632('0x1c')],_0x14782b[_0x12b632('0x2e')])),_0x5b9a70[_0x12b632('0x1c')][_0x12b632('0x46')]&&(_0x2327e2[_0x12b632('0x8')]=_[_0x12b632('0x29')](_0x2327e2[_0x12b632('0x8')],{[Op['or']]:_['map'](_0x2327e2['attributes'],function(_0xd0efb2){const _0x218129=_0x12b632,_0x1efb83={};return _0x1efb83[_0xd0efb2]={[Op[_0x218129('0x33')]]:'%'+_0x5b9a70[_0x218129('0x1c')][_0x218129('0x46')]+'%'},_0x1efb83;})})),_0x2327e2=_[_0x12b632('0x29')]({},_0x2327e2,_0x5b9a70[_0x12b632('0x49')]),_0x47e05d['getAnyConditions'](_0x2327e2);})[_0x4b5a6b('0x2')](function(_0x181d67){const _0x26f532=_0x4b5a6b;if(_0x181d67)return _0x36c446=_0x181d67[_0x26f532('0x45')],typeof _0x5b9a70['query']['nolimit']===_0x26f532('0x3d')&&(_0x2327e2[_0x26f532('0x30')]=qs[_0x26f532('0x30')](_0x5b9a70['query'][_0x26f532('0x30')]),_0x2327e2[_0x26f532('0x1d')]=qs[_0x26f532('0x1d')](_0x5b9a70[_0x26f532('0x1c')][_0x26f532('0x1d')])),_0x47e05d['getAnyConditions'](_0x2327e2);})[_0x4b5a6b('0x2')](function(_0x1294d6){if(_0x1294d6)return _0x1294d6?{'count':_0x36c446,'rows':_0x1294d6}:null;})['then'](respondWithResult(_0x279fd1,null))[_0x4b5a6b('0x31')](handleError(_0x279fd1,null));},exports[_0x31926a('0xd')]=function(_0x5b3faf,_0x10e85e){const _0x3f3e03=_0x31926a;return _0x5b3faf[_0x3f3e03('0x13')]['id']&&delete _0x5b3faf['body']['id'],db[_0x3f3e03('0x6')][_0x3f3e03('0x41')]({'where':{'id':_0x5b3faf[_0x3f3e03('0x1')]['id']}})[_0x3f3e03('0x2')](handleEntityNotFound(_0x10e85e,null))[_0x3f3e03('0x2')](function(_0x4eaadd){const _0x36ade7=_0x3f3e03;if(_0x4eaadd)return _0x5b3faf[_0x36ade7('0x13')]['TriggerId']=_0x4eaadd['id'],db[_0x36ade7('0x2a')][_0x36ade7('0x43')](_0x5b3faf['body']);})[_0x3f3e03('0x2')](respondWithResult(_0x10e85e,null))[_0x3f3e03('0x31')](handleError(_0x10e85e,null));},exports[_0x31926a('0x3c')]=function(_0x545867,_0x5e396f){const _0x3376cb=_0x31926a;let _0x467576={};const _0x1d69d4={};let _0x1f8636,_0x23f5ae;return db[_0x3376cb('0x6')][_0x3376cb('0x41')]({'where':{'id':_0x545867[_0x3376cb('0x1')]['id']}})[_0x3376cb('0x2')](handleEntityNotFound(_0x5e396f,null))['then'](function(_0x21ac52){const _0x531a5a=_0x3376cb;if(_0x21ac52)return _0x1f8636=_0x21ac52,_0x1d69d4['model']=_['keys'](db[_0x531a5a('0x2a')][_0x531a5a('0x1e')]),_0x1d69d4['query']=_[_0x531a5a('0x35')](_0x545867['query']),_0x1d69d4[_0x531a5a('0x2e')]=_[_0x531a5a('0x27')](_0x1d69d4[_0x531a5a('0x0')],_0x1d69d4[_0x531a5a('0x1c')]),_0x467576[_0x531a5a('0x14')]=_['intersection'](_0x1d69d4[_0x531a5a('0x0')],qs[_0x531a5a('0x3a')](_0x545867[_0x531a5a('0x1c')]['fields'])),_0x467576[_0x531a5a('0x14')]=_0x467576[_0x531a5a('0x14')][_0x531a5a('0x45')]?_0x467576[_0x531a5a('0x14')]:_0x1d69d4[_0x531a5a('0x0')],_0x467576['order']=qs['sort'](_0x545867[_0x531a5a('0x1c')][_0x531a5a('0x48')]),_0x467576[_0x531a5a('0x8')]=qs[_0x531a5a('0x2e')](_[_0x531a5a('0x34')](_0x545867[_0x531a5a('0x1c')],_0x1d69d4['filters'])),_0x545867['query'][_0x531a5a('0x46')]&&(_0x467576[_0x531a5a('0x8')]=_[_0x531a5a('0x29')](_0x467576[_0x531a5a('0x8')],{[Op['or']]:_['map'](_0x467576[_0x531a5a('0x14')],function(_0x473e43){const _0x4dfb71=_0x531a5a,_0x13bd53={};return _0x13bd53[_0x473e43]={[Op[_0x4dfb71('0x33')]]:'%'+_0x545867[_0x4dfb71('0x1c')][_0x4dfb71('0x46')]+'%'},_0x13bd53;})})),_0x467576=_[_0x531a5a('0x29')]({},_0x467576,_0x545867[_0x531a5a('0x49')]),_0x1f8636[_0x531a5a('0x3c')](_0x467576);})[_0x3376cb('0x2')](function(_0x4c9788){const _0x2b4df7=_0x3376cb;if(_0x4c9788)return _0x23f5ae=_0x4c9788[_0x2b4df7('0x45')],typeof _0x545867[_0x2b4df7('0x1c')]['nolimit']===_0x2b4df7('0x3d')&&(_0x467576[_0x2b4df7('0x30')]=qs[_0x2b4df7('0x30')](_0x545867['query'][_0x2b4df7('0x30')]),_0x467576[_0x2b4df7('0x1d')]=qs[_0x2b4df7('0x1d')](_0x545867['query'][_0x2b4df7('0x1d')])),_0x1f8636[_0x2b4df7('0x3c')](_0x467576);})[_0x3376cb('0x2')](function(_0x174f57){if(_0x174f57)return _0x174f57?{'count':_0x23f5ae,'rows':_0x174f57}:null;})[_0x3376cb('0x2')](respondWithResult(_0x5e396f,null))[_0x3376cb('0x31')](handleError(_0x5e396f,null));};
\ No newline at end of file
+const a638_0x4f7a=['query','Trigger','userProfileId','pick','addAction','sequelize','TriggerAnyId','UserProfileSection','set','addAllCondition','create','autoAssociation','name','send','model','sendStatus','include','user','status','Condition','filter','getAnyConditions','fieldName','nolimit','undefined','UserProfileResource','keys','../../config/logger','getAllConditions','Unable\x20to\x20retrieve\x20the\x20current\x20user','order','TriggerId','offset','../../components/parsers/qs','then','update','error','like','end','findOne','getActions','options','type','includeAll','body','length','catch','attributes','map','key','Triggers','rawAttributes','fields','Action','json','../../mysqldb','sort','filters','params','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','TriggerAllId','limit','where','intersection','Content-Range','count','merge'];(function(_0x35003c,_0x4f7a4d){const _0x4e4fa1=function(_0x55cb4b){while(--_0x55cb4b){_0x35003c['push'](_0x35003c['shift']());}};_0x4e4fa1(++_0x4f7a4d);}(a638_0x4f7a,0x158));const a638_0x4e4f=function(_0x35003c,_0x4f7a4d){_0x35003c=_0x35003c-0x0;let _0x4e4fa1=a638_0x4f7a[_0x35003c];return _0x4e4fa1;};const _0x3daf1b=a638_0x4e4f;'use strict';const _=require('lodash'),qs=require(_0x3daf1b('0x1d')),logger=require(_0x3daf1b('0x17'))('api'),db=require(_0x3daf1b('0x33'))['db'],{Op}=require(_0x3daf1b('0x1'));function respondWithResult(_0x55cb4b,_0x5a6345){return _0x5a6345=_0x5a6345||0xc8,function(_0x253886){const _0x92bf71=a638_0x4e4f;if(_0x253886)return _0x55cb4b[_0x92bf71('0xe')](_0x5a6345)[_0x92bf71('0x32')](_0x253886);};}function respondWithFilteredResult(_0x1498d7,_0x5ab1d0){return function(_0x276dba){const _0x186f25=a638_0x4e4f;if(_0x276dba){const _0x356444=_0x276dba['count'],_0x374fa7=_0x5ab1d0[_0x186f25('0x1c')];let _0x442d94=_0x5ab1d0[_0x186f25('0x1c')]+_0x5ab1d0[_0x186f25('0x3a')],_0x75aa4c;return _0x442d94>=_0x356444?(_0x442d94=_0x356444,_0x75aa4c=0xc8):_0x75aa4c=0xce,_0x1498d7[_0x186f25('0xe')](_0x75aa4c),_0x1498d7[_0x186f25('0x4')](_0x186f25('0x3d'),_0x374fa7+'-'+_0x442d94+'/'+_0x356444)[_0x186f25('0x32')](_0x276dba);}return null;};}function saveUpdates(_0x511f10){return function(_0x5eb512){const _0x1d009f=a638_0x4e4f;if(_0x5eb512)return _0x5eb512[_0x1d009f('0x1f')](_0x511f10)[_0x1d009f('0x1e')](function(_0x3e8037){return _0x3e8037;});return null;};}function removeEntity(_0x2dd9f0){return function(_0xd3c5b1){const _0x1eb7d2=a638_0x4e4f;if(_0xd3c5b1)return _0xd3c5b1[_0x1eb7d2('0x38')]()[_0x1eb7d2('0x1e')](function(){const _0xf63caf=_0x1eb7d2,_0x49aab3=_0xd3c5b1['get']({'plain':!![]}),_0x5b7c5c=_0xf63caf('0x2e');return db[_0xf63caf('0x15')]['destroy']({'where':{'type':_0x5b7c5c,'resourceId':_0x49aab3['id']}})['then'](function(){return _0xd3c5b1;});})['then'](function(){const _0xaaf195=_0x1eb7d2;_0x2dd9f0[_0xaaf195('0xe')](0xcc)[_0xaaf195('0x22')]();});};}function handleEntityNotFound(_0x268d7a){return function(_0x2bcc92){const _0x34596e=a638_0x4e4f;return!_0x2bcc92&&_0x268d7a[_0x34596e('0xb')](0x194),_0x2bcc92;};}function handleError(_0x4b8117,_0x33616c){return _0x33616c=_0x33616c||0x1f4,function(_0x514608){const _0x22eb27=a638_0x4e4f;logger[_0x22eb27('0x20')](_0x514608['stack']),_0x514608[_0x22eb27('0x8')]&&delete _0x514608[_0x22eb27('0x8')],_0x4b8117['status'](_0x33616c)[_0x22eb27('0x9')](_0x514608);};}exports['index']=function(_0x3ba401,_0x22478b){const _0x44f5ef=_0x3daf1b;let _0x2dc3e3={};const _0x7f6c92={},_0x530917={'count':0x0,'rows':[]},_0x5a4c67=_[_0x44f5ef('0x2c')](db[_0x44f5ef('0x41')][_0x44f5ef('0x2f')],function(_0x5835cc){const _0x1aa870=_0x44f5ef;return{'name':_0x5835cc[_0x1aa870('0x12')],'type':_0x5835cc[_0x1aa870('0x26')][_0x1aa870('0x2d')]};});_0x7f6c92[_0x44f5ef('0xa')]=_[_0x44f5ef('0x2c')](_0x5a4c67,_0x44f5ef('0x8')),_0x7f6c92['query']=_[_0x44f5ef('0x16')](_0x3ba401[_0x44f5ef('0x40')]),_0x7f6c92[_0x44f5ef('0x35')]=_[_0x44f5ef('0x3c')](_0x7f6c92[_0x44f5ef('0xa')],_0x7f6c92[_0x44f5ef('0x40')]),_0x2dc3e3[_0x44f5ef('0x2b')]=_[_0x44f5ef('0x3c')](_0x7f6c92[_0x44f5ef('0xa')],qs[_0x44f5ef('0x30')](_0x3ba401[_0x44f5ef('0x40')][_0x44f5ef('0x30')])),_0x2dc3e3[_0x44f5ef('0x2b')]=_0x2dc3e3['attributes'][_0x44f5ef('0x29')]?_0x2dc3e3['attributes']:_0x7f6c92[_0x44f5ef('0xa')];typeof _0x3ba401[_0x44f5ef('0x40')]['nolimit']===_0x44f5ef('0x14')&&(_0x2dc3e3[_0x44f5ef('0x3a')]=qs[_0x44f5ef('0x3a')](_0x3ba401['query'][_0x44f5ef('0x3a')]),_0x2dc3e3[_0x44f5ef('0x1c')]=qs['offset'](_0x3ba401['query']['offset']));_0x2dc3e3[_0x44f5ef('0x1a')]=qs[_0x44f5ef('0x34')](_0x3ba401[_0x44f5ef('0x40')][_0x44f5ef('0x34')]),_0x2dc3e3[_0x44f5ef('0x3b')]=qs[_0x44f5ef('0x35')](_[_0x44f5ef('0x43')](_0x3ba401[_0x44f5ef('0x40')],_0x7f6c92['filters']),_0x5a4c67);_0x3ba401[_0x44f5ef('0x40')][_0x44f5ef('0x10')]&&(_0x2dc3e3['where']=_[_0x44f5ef('0x3f')](_0x2dc3e3[_0x44f5ef('0x3b')],{[Op['or']]:_['map'](_0x5a4c67,function(_0x1348b6){const _0x2b191e=_0x44f5ef;if(_0x1348b6[_0x2b191e('0x26')]!=='VIRTUAL'){const _0x21a5a5={};return _0x21a5a5[_0x1348b6['name']]={[Op['like']]:'%'+_0x3ba401['query'][_0x2b191e('0x10')]+'%'},_0x21a5a5;}})}));_0x2dc3e3=_['merge']({},_0x2dc3e3,_0x3ba401['options']);const _0x42b9ca={'where':_0x2dc3e3[_0x44f5ef('0x3b')]};return db[_0x44f5ef('0x41')]['count'](_0x42b9ca)[_0x44f5ef('0x1e')](function(_0x503eaa){const _0x46bfb6=_0x44f5ef;return _0x530917[_0x46bfb6('0x3e')]=_0x503eaa,_0x3ba401[_0x46bfb6('0x40')][_0x46bfb6('0x27')]&&(_0x2dc3e3[_0x46bfb6('0xc')]=[{'all':!![]}]),db[_0x46bfb6('0x41')]['findAll'](_0x2dc3e3);})[_0x44f5ef('0x1e')](function(_0x4b37a8){return _0x530917['rows']=_0x4b37a8,_0x530917;})[_0x44f5ef('0x1e')](respondWithFilteredResult(_0x22478b,_0x2dc3e3))[_0x44f5ef('0x2a')](handleError(_0x22478b,null));},exports['show']=function(_0x33d124,_0x566252){const _0x5e79d4=_0x3daf1b;let _0x562d4e={'raw':![],'where':{'id':_0x33d124['params']['id']}};const _0x160499={};return _0x160499['model']=_['keys'](db[_0x5e79d4('0x41')]['rawAttributes']),_0x160499[_0x5e79d4('0x40')]=_[_0x5e79d4('0x16')](_0x33d124[_0x5e79d4('0x40')]),_0x160499['filters']=_['intersection'](_0x160499[_0x5e79d4('0xa')],_0x160499[_0x5e79d4('0x40')]),_0x562d4e['attributes']=_[_0x5e79d4('0x3c')](_0x160499[_0x5e79d4('0xa')],qs['fields'](_0x33d124[_0x5e79d4('0x40')][_0x5e79d4('0x30')])),_0x562d4e['attributes']=_0x562d4e['attributes']['length']?_0x562d4e[_0x5e79d4('0x2b')]:_0x160499[_0x5e79d4('0xa')],_0x33d124['query'][_0x5e79d4('0x27')]&&(_0x562d4e[_0x5e79d4('0xc')]=[{'all':!![]}]),_0x562d4e=_[_0x5e79d4('0x3f')]({},_0x562d4e,_0x33d124[_0x5e79d4('0x25')]),db['Trigger']['findOne'](_0x562d4e)[_0x5e79d4('0x1e')](handleEntityNotFound(_0x566252,null))[_0x5e79d4('0x1e')](respondWithResult(_0x566252,null))['catch'](handleError(_0x566252,null));},exports[_0x3daf1b('0x6')]=function(_0x40bca7,_0x38bc5c){const _0x10cd46=_0x3daf1b;return db['Trigger'][_0x10cd46('0x6')](_0x40bca7[_0x10cd46('0x28')],{})[_0x10cd46('0x1e')](function(_0x4b93b0){const _0x13a0e3=_0x10cd46,_0x4cb4f4=_0x40bca7[_0x13a0e3('0xd')]['get']({'plain':!![]});if(!_0x4cb4f4)throw new Error(_0x13a0e3('0x19'));if(_0x4cb4f4['role']===_0x13a0e3('0xd')){const _0x5b7fab=_0x4b93b0['get']({'plain':!![]}),_0x1f8594='Triggers';return db[_0x13a0e3('0x3')]['findOne']({'where':{'name':_0x1f8594,'userProfileId':_0x4cb4f4[_0x13a0e3('0x42')]},'raw':!![]})['then'](function(_0xc1e112){const _0x413234=_0x13a0e3;return _0xc1e112&&_0xc1e112[_0x413234('0x7')]===0x0?db['UserProfileResource']['create']({'name':_0x5b7fab[_0x413234('0x8')],'resourceId':_0x5b7fab['id'],'type':_0xc1e112[_0x413234('0x8')],'sectionId':_0xc1e112['id']},{})[_0x413234('0x1e')](function(){return _0x4b93b0;}):_0x4b93b0;})['catch'](function(_0x806c14){const _0x2da969=_0x13a0e3;logger[_0x2da969('0x20')](_0x2da969('0x37'),_0x806c14);throw _0x806c14;});}return _0x4b93b0;})[_0x10cd46('0x1e')](respondWithResult(_0x38bc5c,0xc9))[_0x10cd46('0x2a')](handleError(_0x38bc5c,null));},exports[_0x3daf1b('0x1f')]=function(_0x5f3020,_0x2052d1){const _0x2a9d74=_0x3daf1b;return _0x5f3020[_0x2a9d74('0x28')]['id']&&delete _0x5f3020[_0x2a9d74('0x28')]['id'],db[_0x2a9d74('0x41')]['findOne']({'where':{'id':_0x5f3020['params']['id']}})[_0x2a9d74('0x1e')](handleEntityNotFound(_0x2052d1,null))[_0x2a9d74('0x1e')](saveUpdates(_0x5f3020[_0x2a9d74('0x28')],null))[_0x2a9d74('0x1e')](respondWithResult(_0x2052d1,null))[_0x2a9d74('0x2a')](handleError(_0x2052d1,null));},exports[_0x3daf1b('0x38')]=function(_0xa522ac,_0x29defd){const _0xc64170=_0x3daf1b;return db[_0xc64170('0x41')][_0xc64170('0x23')]({'where':{'id':_0xa522ac['params']['id']}})['then'](handleEntityNotFound(_0x29defd,null))[_0xc64170('0x1e')](removeEntity(_0x29defd,null))[_0xc64170('0x2a')](handleError(_0x29defd,null));},exports[_0x3daf1b('0x5')]=function(_0x6a1092,_0x25e29c){const _0x35801b=_0x3daf1b;return _0x6a1092[_0x35801b('0x28')]['id']&&delete _0x6a1092[_0x35801b('0x28')]['id'],db[_0x35801b('0x41')]['findOne']({'where':{'id':_0x6a1092['params']['id']}})[_0x35801b('0x1e')](handleEntityNotFound(_0x25e29c,null))[_0x35801b('0x1e')](function(_0xb8c859){const _0x2d9e32=_0x35801b;if(_0xb8c859)return _0x6a1092[_0x2d9e32('0x28')][_0x2d9e32('0x39')]=_0xb8c859['id'],db[_0x2d9e32('0xf')]['create'](_0x6a1092[_0x2d9e32('0x28')]);})['then'](respondWithResult(_0x25e29c,null))[_0x35801b('0x2a')](handleError(_0x25e29c,null));},exports['addAnyCondition']=function(_0x50de12,_0x3f4fba){const _0x537212=_0x3daf1b;return _0x50de12[_0x537212('0x28')]['id']&&delete _0x50de12[_0x537212('0x28')]['id'],db[_0x537212('0x41')][_0x537212('0x23')]({'where':{'id':_0x50de12[_0x537212('0x36')]['id']}})['then'](handleEntityNotFound(_0x3f4fba,null))['then'](function(_0x5a66c8){const _0x43fcb7=_0x537212;if(_0x5a66c8)return _0x50de12[_0x43fcb7('0x28')][_0x43fcb7('0x2')]=_0x5a66c8['id'],db[_0x43fcb7('0xf')][_0x43fcb7('0x6')](_0x50de12[_0x43fcb7('0x28')]);})[_0x537212('0x1e')](respondWithResult(_0x3f4fba,null))['catch'](handleError(_0x3f4fba,null));},exports[_0x3daf1b('0x18')]=function(_0x26382f,_0x43b923){const _0x580d05=_0x3daf1b;let _0x485969={};const _0x2ea1b9={};let _0x355c5f,_0x220811;return db[_0x580d05('0x41')][_0x580d05('0x23')]({'where':{'id':_0x26382f[_0x580d05('0x36')]['id']}})['then'](handleEntityNotFound(_0x43b923,null))[_0x580d05('0x1e')](function(_0x458c90){const _0x274467=_0x580d05;if(_0x458c90)return _0x355c5f=_0x458c90,_0x2ea1b9[_0x274467('0xa')]=_[_0x274467('0x16')](db[_0x274467('0xf')][_0x274467('0x2f')]),_0x2ea1b9[_0x274467('0x40')]=_[_0x274467('0x16')](_0x26382f[_0x274467('0x40')]),_0x2ea1b9[_0x274467('0x35')]=_['intersection'](_0x2ea1b9[_0x274467('0xa')],_0x2ea1b9[_0x274467('0x40')]),_0x485969['attributes']=_[_0x274467('0x3c')](_0x2ea1b9[_0x274467('0xa')],qs[_0x274467('0x30')](_0x26382f[_0x274467('0x40')][_0x274467('0x30')])),_0x485969[_0x274467('0x2b')]=_0x485969[_0x274467('0x2b')][_0x274467('0x29')]?_0x485969[_0x274467('0x2b')]:_0x2ea1b9['model'],_0x485969[_0x274467('0x1a')]=qs[_0x274467('0x34')](_0x26382f[_0x274467('0x40')][_0x274467('0x34')]),_0x485969[_0x274467('0x3b')]=qs[_0x274467('0x35')](_[_0x274467('0x43')](_0x26382f['query'],_0x2ea1b9[_0x274467('0x35')])),_0x26382f[_0x274467('0x40')][_0x274467('0x10')]&&(_0x485969['where']=_[_0x274467('0x3f')](_0x485969[_0x274467('0x3b')],{[Op['or']]:_[_0x274467('0x2c')](_0x485969[_0x274467('0x2b')],function(_0x43bff8){const _0x9119e5=_0x274467,_0x545d0d={};return _0x545d0d[_0x43bff8]={[Op['like']]:'%'+_0x26382f[_0x9119e5('0x40')]['filter']+'%'},_0x545d0d;})})),_0x485969=_[_0x274467('0x3f')]({},_0x485969,_0x26382f[_0x274467('0x25')]),_0x355c5f[_0x274467('0x18')](_0x485969);})[_0x580d05('0x1e')](function(_0x166a66){const _0x3d2f22=_0x580d05;if(_0x166a66)return _0x220811=_0x166a66[_0x3d2f22('0x29')],typeof _0x26382f['query']['nolimit']===_0x3d2f22('0x14')&&(_0x485969[_0x3d2f22('0x3a')]=qs['limit'](_0x26382f[_0x3d2f22('0x40')]['limit']),_0x485969['offset']=qs[_0x3d2f22('0x1c')](_0x26382f[_0x3d2f22('0x40')][_0x3d2f22('0x1c')])),_0x355c5f[_0x3d2f22('0x18')](_0x485969);})[_0x580d05('0x1e')](function(_0x4d02fd){if(_0x4d02fd)return _0x4d02fd?{'count':_0x220811,'rows':_0x4d02fd}:null;})[_0x580d05('0x1e')](respondWithResult(_0x43b923,null))[_0x580d05('0x2a')](handleError(_0x43b923,null));},exports[_0x3daf1b('0x11')]=function(_0x2ff888,_0x2cb126){const _0x16c6f1=_0x3daf1b;let _0x2b4eb4={};const _0x5c6ec3={};let _0x4cedd5,_0x14d285;return db['Trigger'][_0x16c6f1('0x23')]({'where':{'id':_0x2ff888[_0x16c6f1('0x36')]['id']}})[_0x16c6f1('0x1e')](handleEntityNotFound(_0x2cb126,null))[_0x16c6f1('0x1e')](function(_0x148764){const _0x2589ce=_0x16c6f1;if(_0x148764)return _0x4cedd5=_0x148764,_0x5c6ec3[_0x2589ce('0xa')]=_[_0x2589ce('0x16')](db[_0x2589ce('0xf')][_0x2589ce('0x2f')]),_0x5c6ec3[_0x2589ce('0x40')]=_[_0x2589ce('0x16')](_0x2ff888[_0x2589ce('0x40')]),_0x5c6ec3[_0x2589ce('0x35')]=_['intersection'](_0x5c6ec3[_0x2589ce('0xa')],_0x5c6ec3[_0x2589ce('0x40')]),_0x2b4eb4['attributes']=_[_0x2589ce('0x3c')](_0x5c6ec3[_0x2589ce('0xa')],qs['fields'](_0x2ff888[_0x2589ce('0x40')][_0x2589ce('0x30')])),_0x2b4eb4[_0x2589ce('0x2b')]=_0x2b4eb4[_0x2589ce('0x2b')][_0x2589ce('0x29')]?_0x2b4eb4['attributes']:_0x5c6ec3[_0x2589ce('0xa')],_0x2b4eb4[_0x2589ce('0x1a')]=qs['sort'](_0x2ff888[_0x2589ce('0x40')][_0x2589ce('0x34')]),_0x2b4eb4[_0x2589ce('0x3b')]=qs[_0x2589ce('0x35')](_[_0x2589ce('0x43')](_0x2ff888[_0x2589ce('0x40')],_0x5c6ec3[_0x2589ce('0x35')])),_0x2ff888[_0x2589ce('0x40')][_0x2589ce('0x10')]&&(_0x2b4eb4[_0x2589ce('0x3b')]=_['merge'](_0x2b4eb4[_0x2589ce('0x3b')],{[Op['or']]:_[_0x2589ce('0x2c')](_0x2b4eb4[_0x2589ce('0x2b')],function(_0x3348b2){const _0xb152a1=_0x2589ce,_0x4e3abc={};return _0x4e3abc[_0x3348b2]={[Op[_0xb152a1('0x21')]]:'%'+_0x2ff888['query'][_0xb152a1('0x10')]+'%'},_0x4e3abc;})})),_0x2b4eb4=_[_0x2589ce('0x3f')]({},_0x2b4eb4,_0x2ff888[_0x2589ce('0x25')]),_0x4cedd5['getAnyConditions'](_0x2b4eb4);})[_0x16c6f1('0x1e')](function(_0xfb4cda){const _0x2af93f=_0x16c6f1;if(_0xfb4cda)return _0x14d285=_0xfb4cda[_0x2af93f('0x29')],typeof _0x2ff888[_0x2af93f('0x40')]['nolimit']===_0x2af93f('0x14')&&(_0x2b4eb4[_0x2af93f('0x3a')]=qs[_0x2af93f('0x3a')](_0x2ff888[_0x2af93f('0x40')][_0x2af93f('0x3a')]),_0x2b4eb4[_0x2af93f('0x1c')]=qs[_0x2af93f('0x1c')](_0x2ff888[_0x2af93f('0x40')][_0x2af93f('0x1c')])),_0x4cedd5[_0x2af93f('0x11')](_0x2b4eb4);})[_0x16c6f1('0x1e')](function(_0x70f2f8){if(_0x70f2f8)return _0x70f2f8?{'count':_0x14d285,'rows':_0x70f2f8}:null;})[_0x16c6f1('0x1e')](respondWithResult(_0x2cb126,null))[_0x16c6f1('0x2a')](handleError(_0x2cb126,null));},exports[_0x3daf1b('0x0')]=function(_0x4a14cc,_0x4b1c1a){const _0x86168b=_0x3daf1b;return _0x4a14cc[_0x86168b('0x28')]['id']&&delete _0x4a14cc['body']['id'],db[_0x86168b('0x41')][_0x86168b('0x23')]({'where':{'id':_0x4a14cc[_0x86168b('0x36')]['id']}})[_0x86168b('0x1e')](handleEntityNotFound(_0x4b1c1a,null))['then'](function(_0x20abb3){const _0x127689=_0x86168b;if(_0x20abb3)return _0x4a14cc[_0x127689('0x28')][_0x127689('0x1b')]=_0x20abb3['id'],db[_0x127689('0x31')][_0x127689('0x6')](_0x4a14cc[_0x127689('0x28')]);})[_0x86168b('0x1e')](respondWithResult(_0x4b1c1a,null))[_0x86168b('0x2a')](handleError(_0x4b1c1a,null));},exports[_0x3daf1b('0x24')]=function(_0x24cba0,_0x5b677){const _0x587ed1=_0x3daf1b;let _0x50515f={};const _0x1bc573={};let _0x521f0c,_0x13fe5b;return db[_0x587ed1('0x41')][_0x587ed1('0x23')]({'where':{'id':_0x24cba0[_0x587ed1('0x36')]['id']}})[_0x587ed1('0x1e')](handleEntityNotFound(_0x5b677,null))[_0x587ed1('0x1e')](function(_0x3b083f){const _0x8c4542=_0x587ed1;if(_0x3b083f)return _0x521f0c=_0x3b083f,_0x1bc573[_0x8c4542('0xa')]=_['keys'](db[_0x8c4542('0x31')][_0x8c4542('0x2f')]),_0x1bc573['query']=_[_0x8c4542('0x16')](_0x24cba0[_0x8c4542('0x40')]),_0x1bc573['filters']=_[_0x8c4542('0x3c')](_0x1bc573['model'],_0x1bc573['query']),_0x50515f[_0x8c4542('0x2b')]=_[_0x8c4542('0x3c')](_0x1bc573[_0x8c4542('0xa')],qs[_0x8c4542('0x30')](_0x24cba0[_0x8c4542('0x40')][_0x8c4542('0x30')])),_0x50515f['attributes']=_0x50515f[_0x8c4542('0x2b')][_0x8c4542('0x29')]?_0x50515f[_0x8c4542('0x2b')]:_0x1bc573['model'],_0x50515f[_0x8c4542('0x1a')]=qs[_0x8c4542('0x34')](_0x24cba0[_0x8c4542('0x40')]['sort']),_0x50515f[_0x8c4542('0x3b')]=qs[_0x8c4542('0x35')](_['pick'](_0x24cba0[_0x8c4542('0x40')],_0x1bc573[_0x8c4542('0x35')])),_0x24cba0[_0x8c4542('0x40')][_0x8c4542('0x10')]&&(_0x50515f[_0x8c4542('0x3b')]=_[_0x8c4542('0x3f')](_0x50515f[_0x8c4542('0x3b')],{[Op['or']]:_[_0x8c4542('0x2c')](_0x50515f[_0x8c4542('0x2b')],function(_0x44822a){const _0xdaec3a=_0x8c4542,_0x53c3f7={};return _0x53c3f7[_0x44822a]={[Op[_0xdaec3a('0x21')]]:'%'+_0x24cba0[_0xdaec3a('0x40')]['filter']+'%'},_0x53c3f7;})})),_0x50515f=_[_0x8c4542('0x3f')]({},_0x50515f,_0x24cba0[_0x8c4542('0x25')]),_0x521f0c['getActions'](_0x50515f);})['then'](function(_0x56de42){const _0x3148cb=_0x587ed1;if(_0x56de42)return _0x13fe5b=_0x56de42[_0x3148cb('0x29')],typeof _0x24cba0[_0x3148cb('0x40')][_0x3148cb('0x13')]==='undefined'&&(_0x50515f[_0x3148cb('0x3a')]=qs[_0x3148cb('0x3a')](_0x24cba0[_0x3148cb('0x40')][_0x3148cb('0x3a')]),_0x50515f['offset']=qs['offset'](_0x24cba0[_0x3148cb('0x40')][_0x3148cb('0x1c')])),_0x521f0c[_0x3148cb('0x24')](_0x50515f);})[_0x587ed1('0x1e')](function(_0x44d7bf){if(_0x44d7bf)return _0x44d7bf?{'count':_0x13fe5b,'rows':_0x44d7bf}:null;})[_0x587ed1('0x1e')](respondWithResult(_0x5b677,null))['catch'](handleError(_0x5b677,null));};
\ No newline at end of file