Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / api / intDeskConfiguration / intDeskConfiguration.controller.js
index 5fdb850..5672ed4 100644 (file)
@@ -1 +1 @@
-const a234_0x9e49=['model','attributes','filters','type','Content-Range','api','catch','end','length','create','then','../../mysqldb','../../config/logger','undefined','query','map','VIRTUAL','body','status','findOne','ids','getTags','nolimit','fields','setTags','getSubjects','index','sort','fieldName','send','getDescriptions','sendStatus','sequelize','includeAll','intersection','where','offset','json','Tag','limit','pick','DeskConfiguration','merge','keys','findAll','rows','../../components/parsers/qs','name','options','rawAttributes','order','include','show','getFields','like','count','update','filter','DeskField','params'];(function(_0x285341,_0x9e4971){const _0x123e41=function(_0x434e5c){while(--_0x434e5c){_0x285341['push'](_0x285341['shift']());}};_0x123e41(++_0x9e4971);}(a234_0x9e49,0x18e));const a234_0x123e=function(_0x285341,_0x9e4971){_0x285341=_0x285341-0x0;let _0x123e41=a234_0x9e49[_0x285341];return _0x123e41;};const _0x5369fe=a234_0x123e;'use strict';const _=require('lodash'),qs=require(_0x5369fe('0x8')),logger=require(_0x5369fe('0x22'))(_0x5369fe('0x1b')),db=require(_0x5369fe('0x21'))['db'],{Op}=require(_0x5369fe('0x36'));function respondWithResult(_0x434e5c,_0x2a14db){return _0x2a14db=_0x2a14db||0xc8,function(_0x3bf0a3){const _0x5bcb69=a234_0x123e;if(_0x3bf0a3)return _0x434e5c[_0x5bcb69('0x28')](_0x2a14db)['json'](_0x3bf0a3);};}function respondWithFilteredResult(_0xd7d421,_0x17dd45){return function(_0x23e56d){const _0x128199=a234_0x123e;if(_0x23e56d){const _0x280ce4=_0x23e56d[_0x128199('0x11')],_0x51db33=_0x17dd45['offset'];let _0x2c810c=_0x17dd45['offset']+_0x17dd45[_0x128199('0x1')],_0x66f5af;return _0x2c810c>=_0x280ce4?(_0x2c810c=_0x280ce4,_0x66f5af=0xc8):_0x66f5af=0xce,_0xd7d421[_0x128199('0x28')](_0x66f5af),_0xd7d421['set'](_0x128199('0x1a'),_0x51db33+'-'+_0x2c810c+'/'+_0x280ce4)[_0x128199('0x3b')](_0x23e56d);}return null;};}function saveUpdates(_0x529f79){return function(_0x4dce89){const _0xaefda7=a234_0x123e;if(_0x4dce89)return _0x4dce89[_0xaefda7('0x12')](_0x529f79)[_0xaefda7('0x20')](function(_0x46447d){return _0x46447d;});return null;};}function removeEntity(_0x25773f){return function(_0x12e974){if(_0x12e974)return _0x12e974['destroy']()['then'](function(){const _0x43cfcb=a234_0x123e;_0x25773f[_0x43cfcb('0x28')](0xcc)[_0x43cfcb('0x1d')]();});};}function handleEntityNotFound(_0x376702){return function(_0x1cc847){const _0x4d8313=a234_0x123e;return!_0x1cc847&&_0x376702[_0x4d8313('0x35')](0x194),_0x1cc847;};}function handleError(_0x125d81,_0x44dd6c){return _0x44dd6c=_0x44dd6c||0x1f4,function(_0x4c91b0){const _0x4b770d=a234_0x123e;logger['error'](_0x4c91b0['stack']),_0x4c91b0[_0x4b770d('0x9')]&&delete _0x4c91b0[_0x4b770d('0x9')],_0x125d81[_0x4b770d('0x28')](_0x44dd6c)[_0x4b770d('0x33')](_0x4c91b0);};}exports[_0x5369fe('0x30')]=function(_0x42a5b3,_0x40c37b){const _0x4d9a17=_0x5369fe;let _0x255a58={};const _0x3c237a={},_0x34f96c={'count':0x0,'rows':[]},_0x3d8dac=_[_0x4d9a17('0x25')](db[_0x4d9a17('0x3')]['rawAttributes'],function(_0x3121e4){const _0x5afc96=_0x4d9a17;return{'name':_0x3121e4[_0x5afc96('0x32')],'type':_0x3121e4[_0x5afc96('0x19')]['key']};});_0x3c237a[_0x4d9a17('0x16')]=_[_0x4d9a17('0x25')](_0x3d8dac,'name'),_0x3c237a['query']=_[_0x4d9a17('0x5')](_0x42a5b3[_0x4d9a17('0x24')]),_0x3c237a['filters']=_['intersection'](_0x3c237a['model'],_0x3c237a['query']),_0x255a58['attributes']=_[_0x4d9a17('0x38')](_0x3c237a['model'],qs[_0x4d9a17('0x2d')](_0x42a5b3[_0x4d9a17('0x24')]['fields'])),_0x255a58['attributes']=_0x255a58[_0x4d9a17('0x17')]['length']?_0x255a58[_0x4d9a17('0x17')]:_0x3c237a[_0x4d9a17('0x16')];typeof _0x42a5b3[_0x4d9a17('0x24')][_0x4d9a17('0x2c')]===_0x4d9a17('0x23')&&(_0x255a58['limit']=qs[_0x4d9a17('0x1')](_0x42a5b3[_0x4d9a17('0x24')][_0x4d9a17('0x1')]),_0x255a58[_0x4d9a17('0x3a')]=qs[_0x4d9a17('0x3a')](_0x42a5b3[_0x4d9a17('0x24')][_0x4d9a17('0x3a')]));_0x255a58[_0x4d9a17('0xc')]=qs['sort'](_0x42a5b3[_0x4d9a17('0x24')][_0x4d9a17('0x31')]),_0x255a58[_0x4d9a17('0x39')]=qs['filters'](_[_0x4d9a17('0x2')](_0x42a5b3['query'],_0x3c237a[_0x4d9a17('0x18')]),_0x3d8dac);_0x42a5b3[_0x4d9a17('0x24')][_0x4d9a17('0x13')]&&(_0x255a58[_0x4d9a17('0x39')]=_[_0x4d9a17('0x4')](_0x255a58[_0x4d9a17('0x39')],{[Op['or']]:_[_0x4d9a17('0x25')](_0x3d8dac,function(_0x588789){const _0x19c128=_0x4d9a17;if(_0x588789[_0x19c128('0x19')]!==_0x19c128('0x26')){const _0x587909={};return _0x587909[_0x588789[_0x19c128('0x9')]]={[Op[_0x19c128('0x10')]]:'%'+_0x42a5b3['query'][_0x19c128('0x13')]+'%'},_0x587909;}})}));_0x255a58=_[_0x4d9a17('0x4')]({},_0x255a58,_0x42a5b3[_0x4d9a17('0xa')]);const _0x4b648f={'where':_0x255a58['where']};return db[_0x4d9a17('0x3')]['count'](_0x4b648f)['then'](function(_0x5e15a7){const _0x450f91=_0x4d9a17;return _0x34f96c[_0x450f91('0x11')]=_0x5e15a7,_0x42a5b3[_0x450f91('0x24')]['includeAll']&&(_0x255a58[_0x450f91('0xd')]=[{'all':!![]}]),db[_0x450f91('0x3')][_0x450f91('0x6')](_0x255a58);})[_0x4d9a17('0x20')](function(_0x386ea0){const _0x18643b=_0x4d9a17;return _0x34f96c[_0x18643b('0x7')]=_0x386ea0,_0x34f96c;})['then'](respondWithFilteredResult(_0x40c37b,_0x255a58))['catch'](handleError(_0x40c37b,null));},exports[_0x5369fe('0xe')]=function(_0x4ae996,_0x467cfb){const _0xdf9c8b=_0x5369fe;let _0x1df6be={'raw':![],'where':{'id':_0x4ae996[_0xdf9c8b('0x15')]['id']}};const _0x51d9d6={};return _0x51d9d6[_0xdf9c8b('0x16')]=_[_0xdf9c8b('0x5')](db[_0xdf9c8b('0x3')][_0xdf9c8b('0xb')]),_0x51d9d6[_0xdf9c8b('0x24')]=_[_0xdf9c8b('0x5')](_0x4ae996[_0xdf9c8b('0x24')]),_0x51d9d6[_0xdf9c8b('0x18')]=_['intersection'](_0x51d9d6[_0xdf9c8b('0x16')],_0x51d9d6[_0xdf9c8b('0x24')]),_0x1df6be[_0xdf9c8b('0x17')]=_[_0xdf9c8b('0x38')](_0x51d9d6['model'],qs[_0xdf9c8b('0x2d')](_0x4ae996[_0xdf9c8b('0x24')][_0xdf9c8b('0x2d')])),_0x1df6be[_0xdf9c8b('0x17')]=_0x1df6be[_0xdf9c8b('0x17')][_0xdf9c8b('0x1e')]?_0x1df6be[_0xdf9c8b('0x17')]:_0x51d9d6[_0xdf9c8b('0x16')],_0x4ae996[_0xdf9c8b('0x24')][_0xdf9c8b('0x37')]&&(_0x1df6be[_0xdf9c8b('0xd')]=[{'all':!![]}]),_0x1df6be=_['merge']({},_0x1df6be,_0x4ae996[_0xdf9c8b('0xa')]),db[_0xdf9c8b('0x3')][_0xdf9c8b('0x29')](_0x1df6be)[_0xdf9c8b('0x20')](handleEntityNotFound(_0x467cfb,null))['then'](respondWithResult(_0x467cfb,null))[_0xdf9c8b('0x1c')](handleError(_0x467cfb,null));},exports['create']=function(_0x5dc577,_0x10f15b){const _0x130f76=_0x5369fe;return db[_0x130f76('0x3')][_0x130f76('0x1f')](_0x5dc577['body'],{})['then'](respondWithResult(_0x10f15b,0xc9))[_0x130f76('0x1c')](handleError(_0x10f15b,null));},exports[_0x5369fe('0x12')]=function(_0x484e5e,_0x3f571b){const _0x909cd6=_0x5369fe;return _0x484e5e[_0x909cd6('0x27')]['id']&&delete _0x484e5e['body']['id'],db[_0x909cd6('0x3')]['findOne']({'where':{'id':_0x484e5e[_0x909cd6('0x15')]['id']}})[_0x909cd6('0x20')](handleEntityNotFound(_0x3f571b,null))[_0x909cd6('0x20')](saveUpdates(_0x484e5e[_0x909cd6('0x27')],null))['then'](respondWithResult(_0x3f571b,null))[_0x909cd6('0x1c')](handleError(_0x3f571b,null));},exports['destroy']=function(_0x46bd2d,_0x26abcf){const _0x343b4d=_0x5369fe;return db[_0x343b4d('0x3')][_0x343b4d('0x29')]({'where':{'id':_0x46bd2d['params']['id']}})[_0x343b4d('0x20')](handleEntityNotFound(_0x26abcf,null))['then'](removeEntity(_0x26abcf,null))[_0x343b4d('0x1c')](handleError(_0x26abcf,null));},exports[_0x5369fe('0xf')]=function(_0x1c6cb4,_0xe42ae7){const _0x400caf=_0x5369fe;let _0x147f38={};const _0x232736={};let _0x46ffd1,_0x2f80d8;return db[_0x400caf('0x3')][_0x400caf('0x29')]({'where':{'id':_0x1c6cb4['params']['id']}})[_0x400caf('0x20')](handleEntityNotFound(_0xe42ae7,null))['then'](function(_0x2b7c14){const _0x2fda1b=_0x400caf;if(_0x2b7c14)return _0x46ffd1=_0x2b7c14,_0x232736[_0x2fda1b('0x16')]=_[_0x2fda1b('0x5')](db['DeskField'][_0x2fda1b('0xb')]),_0x232736[_0x2fda1b('0x24')]=_[_0x2fda1b('0x5')](_0x1c6cb4[_0x2fda1b('0x24')]),_0x232736['filters']=_['intersection'](_0x232736[_0x2fda1b('0x16')],_0x232736['query']),_0x147f38['attributes']=_['intersection'](_0x232736[_0x2fda1b('0x16')],qs['fields'](_0x1c6cb4[_0x2fda1b('0x24')][_0x2fda1b('0x2d')])),_0x147f38[_0x2fda1b('0x17')]=_0x147f38['attributes'][_0x2fda1b('0x1e')]?_0x147f38['attributes']:_0x232736[_0x2fda1b('0x16')],_0x147f38[_0x2fda1b('0xc')]=qs[_0x2fda1b('0x31')](_0x1c6cb4['query'][_0x2fda1b('0x31')]),_0x147f38[_0x2fda1b('0x39')]=qs[_0x2fda1b('0x18')](_[_0x2fda1b('0x2')](_0x1c6cb4[_0x2fda1b('0x24')],_0x232736['filters'])),_0x1c6cb4['query']['filter']&&(_0x147f38['where']=_[_0x2fda1b('0x4')](_0x147f38[_0x2fda1b('0x39')],{[Op['or']]:_['map'](_0x147f38[_0x2fda1b('0x17')],function(_0x344877){const _0x542ca2=_0x2fda1b,_0x4dd9f0={};return _0x4dd9f0[_0x344877]={[Op[_0x542ca2('0x10')]]:'%'+_0x1c6cb4[_0x542ca2('0x24')]['filter']+'%'},_0x4dd9f0;})})),_0x147f38=_[_0x2fda1b('0x4')]({},_0x147f38,_0x1c6cb4[_0x2fda1b('0xa')]),_0x46ffd1['getFields'](_0x147f38);})[_0x400caf('0x20')](function(_0x428c4d){const _0x5d0806=_0x400caf;if(_0x428c4d)return _0x2f80d8=_0x428c4d[_0x5d0806('0x1e')],typeof _0x1c6cb4[_0x5d0806('0x24')][_0x5d0806('0x2c')]===_0x5d0806('0x23')&&(_0x147f38[_0x5d0806('0x1')]=qs[_0x5d0806('0x1')](_0x1c6cb4[_0x5d0806('0x24')][_0x5d0806('0x1')]),_0x147f38['offset']=qs[_0x5d0806('0x3a')](_0x1c6cb4[_0x5d0806('0x24')][_0x5d0806('0x3a')])),_0x46ffd1['getFields'](_0x147f38);})['then'](function(_0x462878){if(_0x462878)return _0x462878?{'count':_0x2f80d8,'rows':_0x462878}:null;})[_0x400caf('0x20')](respondWithResult(_0xe42ae7,null))['catch'](handleError(_0xe42ae7,null));},exports[_0x5369fe('0x2f')]=function(_0xeedac,_0x4d9dcc){const _0x9adf38=_0x5369fe;let _0x30f444={};const _0x5f1235={};let _0xbdfd74,_0x403e10;return db['DeskConfiguration'][_0x9adf38('0x29')]({'where':{'id':_0xeedac[_0x9adf38('0x15')]['id']}})[_0x9adf38('0x20')](handleEntityNotFound(_0x4d9dcc,null))[_0x9adf38('0x20')](function(_0x4c42c1){const _0xf21769=_0x9adf38;if(_0x4c42c1)return _0xbdfd74=_0x4c42c1,_0x5f1235[_0xf21769('0x16')]=_[_0xf21769('0x5')](db[_0xf21769('0x14')][_0xf21769('0xb')]),_0x5f1235['query']=_[_0xf21769('0x5')](_0xeedac['query']),_0x5f1235['filters']=_['intersection'](_0x5f1235[_0xf21769('0x16')],_0x5f1235[_0xf21769('0x24')]),_0x30f444[_0xf21769('0x17')]=_[_0xf21769('0x38')](_0x5f1235[_0xf21769('0x16')],qs[_0xf21769('0x2d')](_0xeedac[_0xf21769('0x24')]['fields'])),_0x30f444[_0xf21769('0x17')]=_0x30f444[_0xf21769('0x17')][_0xf21769('0x1e')]?_0x30f444[_0xf21769('0x17')]:_0x5f1235[_0xf21769('0x16')],_0x30f444['order']=qs[_0xf21769('0x31')](_0xeedac[_0xf21769('0x24')][_0xf21769('0x31')]),_0x30f444[_0xf21769('0x39')]=qs['filters'](_['pick'](_0xeedac['query'],_0x5f1235[_0xf21769('0x18')])),_0xeedac[_0xf21769('0x24')][_0xf21769('0x13')]&&(_0x30f444[_0xf21769('0x39')]=_[_0xf21769('0x4')](_0x30f444[_0xf21769('0x39')],{[Op['or']]:_[_0xf21769('0x25')](_0x30f444['attributes'],function(_0x8a8bd6){const _0x3d6be5=_0xf21769,_0x56abbf={};return _0x56abbf[_0x8a8bd6]={[Op[_0x3d6be5('0x10')]]:'%'+_0xeedac[_0x3d6be5('0x24')]['filter']+'%'},_0x56abbf;})})),_0x30f444=_[_0xf21769('0x4')]({},_0x30f444,_0xeedac[_0xf21769('0xa')]),_0xbdfd74[_0xf21769('0x2f')](_0x30f444);})['then'](function(_0xf0978b){const _0xf9671d=_0x9adf38;if(_0xf0978b)return _0x403e10=_0xf0978b[_0xf9671d('0x1e')],typeof _0xeedac[_0xf9671d('0x24')]['nolimit']==='undefined'&&(_0x30f444[_0xf9671d('0x1')]=qs[_0xf9671d('0x1')](_0xeedac[_0xf9671d('0x24')][_0xf9671d('0x1')]),_0x30f444[_0xf9671d('0x3a')]=qs[_0xf9671d('0x3a')](_0xeedac[_0xf9671d('0x24')][_0xf9671d('0x3a')])),_0xbdfd74[_0xf9671d('0x2f')](_0x30f444);})['then'](function(_0x330f23){if(_0x330f23)return _0x330f23?{'count':_0x403e10,'rows':_0x330f23}:null;})[_0x9adf38('0x20')](respondWithResult(_0x4d9dcc,null))[_0x9adf38('0x1c')](handleError(_0x4d9dcc,null));},exports['getDescriptions']=function(_0x196398,_0x692c1){const _0x10a663=_0x5369fe;let _0x317a39={};const _0x4124f8={};let _0x1361be,_0x2717fd;return db[_0x10a663('0x3')][_0x10a663('0x29')]({'where':{'id':_0x196398[_0x10a663('0x15')]['id']}})[_0x10a663('0x20')](handleEntityNotFound(_0x692c1,null))['then'](function(_0x45a797){const _0x576a6=_0x10a663;if(_0x45a797)return _0x1361be=_0x45a797,_0x4124f8[_0x576a6('0x16')]=_[_0x576a6('0x5')](db[_0x576a6('0x14')][_0x576a6('0xb')]),_0x4124f8['query']=_['keys'](_0x196398[_0x576a6('0x24')]),_0x4124f8['filters']=_['intersection'](_0x4124f8[_0x576a6('0x16')],_0x4124f8[_0x576a6('0x24')]),_0x317a39[_0x576a6('0x17')]=_[_0x576a6('0x38')](_0x4124f8[_0x576a6('0x16')],qs[_0x576a6('0x2d')](_0x196398[_0x576a6('0x24')][_0x576a6('0x2d')])),_0x317a39[_0x576a6('0x17')]=_0x317a39[_0x576a6('0x17')][_0x576a6('0x1e')]?_0x317a39[_0x576a6('0x17')]:_0x4124f8[_0x576a6('0x16')],_0x317a39[_0x576a6('0xc')]=qs[_0x576a6('0x31')](_0x196398[_0x576a6('0x24')][_0x576a6('0x31')]),_0x317a39[_0x576a6('0x39')]=qs['filters'](_[_0x576a6('0x2')](_0x196398['query'],_0x4124f8['filters'])),_0x196398[_0x576a6('0x24')]['filter']&&(_0x317a39[_0x576a6('0x39')]=_[_0x576a6('0x4')](_0x317a39[_0x576a6('0x39')],{[Op['or']]:_[_0x576a6('0x25')](_0x317a39['attributes'],function(_0x268c9e){const _0x283d9c=_0x576a6,_0x2de8ae={};return _0x2de8ae[_0x268c9e]={[Op['like']]:'%'+_0x196398[_0x283d9c('0x24')][_0x283d9c('0x13')]+'%'},_0x2de8ae;})})),_0x317a39=_[_0x576a6('0x4')]({},_0x317a39,_0x196398[_0x576a6('0xa')]),_0x1361be[_0x576a6('0x34')](_0x317a39);})['then'](function(_0x4c8e57){const _0x3c1083=_0x10a663;if(_0x4c8e57)return _0x2717fd=_0x4c8e57[_0x3c1083('0x1e')],typeof _0x196398[_0x3c1083('0x24')][_0x3c1083('0x2c')]===_0x3c1083('0x23')&&(_0x317a39[_0x3c1083('0x1')]=qs[_0x3c1083('0x1')](_0x196398[_0x3c1083('0x24')][_0x3c1083('0x1')]),_0x317a39[_0x3c1083('0x3a')]=qs['offset'](_0x196398[_0x3c1083('0x24')][_0x3c1083('0x3a')])),_0x1361be[_0x3c1083('0x34')](_0x317a39);})[_0x10a663('0x20')](function(_0x55ccc6){if(_0x55ccc6)return _0x55ccc6?{'count':_0x2717fd,'rows':_0x55ccc6}:null;})['then'](respondWithResult(_0x692c1,null))[_0x10a663('0x1c')](handleError(_0x692c1,null));},exports[_0x5369fe('0x2b')]=function(_0x1b62cc,_0x4daa3a){const _0x5edf4b=_0x5369fe;let _0x6867ea={};const _0x16f721={};let _0x1fb742,_0x56c2a7;return db['DeskConfiguration'][_0x5edf4b('0x29')]({'where':{'id':_0x1b62cc[_0x5edf4b('0x15')]['id']}})[_0x5edf4b('0x20')](handleEntityNotFound(_0x4daa3a,null))[_0x5edf4b('0x20')](function(_0x215fa3){const _0x4ece38=_0x5edf4b;if(_0x215fa3)return _0x1fb742=_0x215fa3,_0x16f721[_0x4ece38('0x16')]=_['keys'](db[_0x4ece38('0x0')][_0x4ece38('0xb')]),_0x16f721[_0x4ece38('0x24')]=_[_0x4ece38('0x5')](_0x1b62cc['query']),_0x16f721[_0x4ece38('0x18')]=_['intersection'](_0x16f721['model'],_0x16f721['query']),_0x6867ea['attributes']=_[_0x4ece38('0x38')](_0x16f721[_0x4ece38('0x16')],qs['fields'](_0x1b62cc['query']['fields'])),_0x6867ea[_0x4ece38('0x17')]=_0x6867ea['attributes'][_0x4ece38('0x1e')]?_0x6867ea[_0x4ece38('0x17')]:_0x16f721['model'],_0x6867ea[_0x4ece38('0xc')]=qs[_0x4ece38('0x31')](_0x1b62cc[_0x4ece38('0x24')][_0x4ece38('0x31')]),_0x6867ea[_0x4ece38('0x39')]=qs[_0x4ece38('0x18')](_[_0x4ece38('0x2')](_0x1b62cc[_0x4ece38('0x24')],_0x16f721['filters'])),_0x1b62cc[_0x4ece38('0x24')][_0x4ece38('0x13')]&&(_0x6867ea[_0x4ece38('0x39')]=_[_0x4ece38('0x4')](_0x6867ea[_0x4ece38('0x39')],{[Op['or']]:_[_0x4ece38('0x25')](_0x6867ea[_0x4ece38('0x17')],function(_0x2df32d){const _0x508a4d=_0x4ece38,_0x5730b7={};return _0x5730b7[_0x2df32d]={[Op[_0x508a4d('0x10')]]:'%'+_0x1b62cc[_0x508a4d('0x24')][_0x508a4d('0x13')]+'%'},_0x5730b7;})})),_0x6867ea=_[_0x4ece38('0x4')]({},_0x6867ea,_0x1b62cc['options']),_0x1fb742[_0x4ece38('0x2b')](_0x6867ea);})[_0x5edf4b('0x20')](function(_0x2cb83a){const _0x2f655c=_0x5edf4b;if(_0x2cb83a)return _0x56c2a7=_0x2cb83a[_0x2f655c('0x1e')],typeof _0x1b62cc['query'][_0x2f655c('0x2c')]===_0x2f655c('0x23')&&(_0x6867ea[_0x2f655c('0x1')]=qs['limit'](_0x1b62cc[_0x2f655c('0x24')][_0x2f655c('0x1')]),_0x6867ea[_0x2f655c('0x3a')]=qs[_0x2f655c('0x3a')](_0x1b62cc[_0x2f655c('0x24')][_0x2f655c('0x3a')])),_0x1fb742[_0x2f655c('0x2b')](_0x6867ea);})[_0x5edf4b('0x20')](function(_0xa05aaf){if(_0xa05aaf)return _0xa05aaf?{'count':_0x56c2a7,'rows':_0xa05aaf}:null;})[_0x5edf4b('0x20')](respondWithResult(_0x4daa3a,null))[_0x5edf4b('0x1c')](handleError(_0x4daa3a,null));},exports['setTags']=function(_0x55d5ef,_0x362b94){const _0x3dc1ec=_0x5369fe;return _0x55d5ef['body']['id']&&delete _0x55d5ef['body']['id'],db['DeskConfiguration'][_0x3dc1ec('0x29')]({'where':{'id':_0x55d5ef['params']['id']}})[_0x3dc1ec('0x20')](handleEntityNotFound(_0x362b94,null))[_0x3dc1ec('0x20')](function(_0x4a201c){const _0x3c946d=_0x3dc1ec;if(_0x4a201c)return _0x4a201c[_0x3c946d('0x2e')](_0x55d5ef[_0x3c946d('0x27')][_0x3c946d('0x2a')]||[]);return null;})[_0x3dc1ec('0x20')](respondWithResult(_0x362b94,null))[_0x3dc1ec('0x1c')](handleError(_0x362b94,null));};
\ No newline at end of file
+const a234_0x183e=['getTags','DeskConfiguration','offset','undefined','type','show','nolimit','getSubjects','filter','count','merge','DeskField','include','body','map','filters','query','order','name','where','attributes','model','create','../../components/parsers/qs','length','intersection','getFields','index','findOne','params','pick','end','destroy','sort','error','../../mysqldb','catch','send','Content-Range','update','keys','options','like','sequelize','Tag','json','then','fields','setTags','limit','ids','rawAttributes','api','includeAll','lodash'];(function(_0x2e0014,_0x183e0b){const _0x494728=function(_0x3de25f){while(--_0x3de25f){_0x2e0014['push'](_0x2e0014['shift']());}};_0x494728(++_0x183e0b);}(a234_0x183e,0x1be));const a234_0x4947=function(_0x2e0014,_0x183e0b){_0x2e0014=_0x2e0014-0x0;let _0x494728=a234_0x183e[_0x2e0014];return _0x494728;};const _0x375044=a234_0x4947;'use strict';const _=require(_0x375044('0x30')),qs=require(_0x375044('0x11')),logger=require('../../config/logger')(_0x375044('0x2e')),db=require(_0x375044('0x1d'))['db'],{Op}=require(_0x375044('0x25'));function respondWithResult(_0x3de25f,_0x531849){return _0x531849=_0x531849||0xc8,function(_0x4d6dd9){const _0x2ef755=a234_0x4947;if(_0x4d6dd9)return _0x3de25f['status'](_0x531849)[_0x2ef755('0x27')](_0x4d6dd9);};}function respondWithFilteredResult(_0x407224,_0x16bb01){return function(_0x48a561){const _0x5477fd=a234_0x4947;if(_0x48a561){const _0x33f1a7=_0x48a561['count'],_0x18d858=_0x16bb01[_0x5477fd('0x33')];let _0xc6c88a=_0x16bb01[_0x5477fd('0x33')]+_0x16bb01[_0x5477fd('0x2b')],_0x156116;return _0xc6c88a>=_0x33f1a7?(_0xc6c88a=_0x33f1a7,_0x156116=0xc8):_0x156116=0xce,_0x407224['status'](_0x156116),_0x407224['set'](_0x5477fd('0x20'),_0x18d858+'-'+_0xc6c88a+'/'+_0x33f1a7)[_0x5477fd('0x27')](_0x48a561);}return null;};}function saveUpdates(_0x1d35c4){return function(_0x19ed0f){const _0x1cd15f=a234_0x4947;if(_0x19ed0f)return _0x19ed0f[_0x1cd15f('0x21')](_0x1d35c4)['then'](function(_0x1407e9){return _0x1407e9;});return null;};}function removeEntity(_0x3770a4){return function(_0x72b47f){const _0xb60ead=a234_0x4947;if(_0x72b47f)return _0x72b47f[_0xb60ead('0x1a')]()[_0xb60ead('0x28')](function(){const _0x2c8fc9=_0xb60ead;_0x3770a4['status'](0xcc)[_0x2c8fc9('0x19')]();});};}function handleEntityNotFound(_0x5ddff0){return function(_0x19cbc4){return!_0x19cbc4&&_0x5ddff0['sendStatus'](0x194),_0x19cbc4;};}function handleError(_0x46c986,_0x7e7ad7){return _0x7e7ad7=_0x7e7ad7||0x1f4,function(_0x3808e0){const _0x46c120=a234_0x4947;logger[_0x46c120('0x1c')](_0x3808e0['stack']),_0x3808e0[_0x46c120('0xc')]&&delete _0x3808e0[_0x46c120('0xc')],_0x46c986['status'](_0x7e7ad7)[_0x46c120('0x1f')](_0x3808e0);};}exports[_0x375044('0x15')]=function(_0x39c344,_0x588cdb){const _0x5c3e32=_0x375044;let _0x3804ca={};const _0x132b5a={},_0x4d9328={'count':0x0,'rows':[]},_0x898df4=_['map'](db[_0x5c3e32('0x32')][_0x5c3e32('0x2d')],function(_0x2ae68e){const _0x3dd1d1=_0x5c3e32;return{'name':_0x2ae68e['fieldName'],'type':_0x2ae68e[_0x3dd1d1('0x35')]['key']};});_0x132b5a[_0x5c3e32('0xf')]=_[_0x5c3e32('0x8')](_0x898df4,_0x5c3e32('0xc')),_0x132b5a[_0x5c3e32('0xa')]=_['keys'](_0x39c344['query']),_0x132b5a[_0x5c3e32('0x9')]=_[_0x5c3e32('0x13')](_0x132b5a[_0x5c3e32('0xf')],_0x132b5a[_0x5c3e32('0xa')]),_0x3804ca[_0x5c3e32('0xe')]=_[_0x5c3e32('0x13')](_0x132b5a[_0x5c3e32('0xf')],qs['fields'](_0x39c344[_0x5c3e32('0xa')][_0x5c3e32('0x29')])),_0x3804ca[_0x5c3e32('0xe')]=_0x3804ca[_0x5c3e32('0xe')][_0x5c3e32('0x12')]?_0x3804ca[_0x5c3e32('0xe')]:_0x132b5a[_0x5c3e32('0xf')];typeof _0x39c344['query'][_0x5c3e32('0x0')]==='undefined'&&(_0x3804ca[_0x5c3e32('0x2b')]=qs['limit'](_0x39c344[_0x5c3e32('0xa')][_0x5c3e32('0x2b')]),_0x3804ca[_0x5c3e32('0x33')]=qs[_0x5c3e32('0x33')](_0x39c344[_0x5c3e32('0xa')][_0x5c3e32('0x33')]));_0x3804ca['order']=qs[_0x5c3e32('0x1b')](_0x39c344[_0x5c3e32('0xa')][_0x5c3e32('0x1b')]),_0x3804ca[_0x5c3e32('0xd')]=qs[_0x5c3e32('0x9')](_[_0x5c3e32('0x18')](_0x39c344[_0x5c3e32('0xa')],_0x132b5a[_0x5c3e32('0x9')]),_0x898df4);_0x39c344[_0x5c3e32('0xa')][_0x5c3e32('0x2')]&&(_0x3804ca[_0x5c3e32('0xd')]=_[_0x5c3e32('0x4')](_0x3804ca['where'],{[Op['or']]:_[_0x5c3e32('0x8')](_0x898df4,function(_0x4d06f7){const _0x1ac2e9=_0x5c3e32;if(_0x4d06f7['type']!=='VIRTUAL'){const _0x41ba2f={};return _0x41ba2f[_0x4d06f7[_0x1ac2e9('0xc')]]={[Op[_0x1ac2e9('0x24')]]:'%'+_0x39c344[_0x1ac2e9('0xa')][_0x1ac2e9('0x2')]+'%'},_0x41ba2f;}})}));_0x3804ca=_[_0x5c3e32('0x4')]({},_0x3804ca,_0x39c344[_0x5c3e32('0x23')]);const _0x4f1cbb={'where':_0x3804ca['where']};return db[_0x5c3e32('0x32')][_0x5c3e32('0x3')](_0x4f1cbb)[_0x5c3e32('0x28')](function(_0x57a18d){const _0x58b376=_0x5c3e32;return _0x4d9328[_0x58b376('0x3')]=_0x57a18d,_0x39c344[_0x58b376('0xa')][_0x58b376('0x2f')]&&(_0x3804ca[_0x58b376('0x6')]=[{'all':!![]}]),db[_0x58b376('0x32')]['findAll'](_0x3804ca);})[_0x5c3e32('0x28')](function(_0x2edb4b){return _0x4d9328['rows']=_0x2edb4b,_0x4d9328;})[_0x5c3e32('0x28')](respondWithFilteredResult(_0x588cdb,_0x3804ca))[_0x5c3e32('0x1e')](handleError(_0x588cdb,null));},exports[_0x375044('0x36')]=function(_0x272116,_0x18e03c){const _0x5a6d6e=_0x375044;let _0xbc0129={'raw':![],'where':{'id':_0x272116[_0x5a6d6e('0x17')]['id']}};const _0xd40219={};return _0xd40219[_0x5a6d6e('0xf')]=_[_0x5a6d6e('0x22')](db[_0x5a6d6e('0x32')][_0x5a6d6e('0x2d')]),_0xd40219['query']=_['keys'](_0x272116['query']),_0xd40219[_0x5a6d6e('0x9')]=_[_0x5a6d6e('0x13')](_0xd40219['model'],_0xd40219['query']),_0xbc0129[_0x5a6d6e('0xe')]=_[_0x5a6d6e('0x13')](_0xd40219[_0x5a6d6e('0xf')],qs['fields'](_0x272116['query'][_0x5a6d6e('0x29')])),_0xbc0129['attributes']=_0xbc0129['attributes']['length']?_0xbc0129[_0x5a6d6e('0xe')]:_0xd40219[_0x5a6d6e('0xf')],_0x272116[_0x5a6d6e('0xa')][_0x5a6d6e('0x2f')]&&(_0xbc0129[_0x5a6d6e('0x6')]=[{'all':!![]}]),_0xbc0129=_[_0x5a6d6e('0x4')]({},_0xbc0129,_0x272116['options']),db[_0x5a6d6e('0x32')][_0x5a6d6e('0x16')](_0xbc0129)[_0x5a6d6e('0x28')](handleEntityNotFound(_0x18e03c,null))[_0x5a6d6e('0x28')](respondWithResult(_0x18e03c,null))[_0x5a6d6e('0x1e')](handleError(_0x18e03c,null));},exports['create']=function(_0x4029dc,_0x584162){const _0x3d4c63=_0x375044;return db[_0x3d4c63('0x32')][_0x3d4c63('0x10')](_0x4029dc['body'],{})[_0x3d4c63('0x28')](respondWithResult(_0x584162,0xc9))[_0x3d4c63('0x1e')](handleError(_0x584162,null));},exports['update']=function(_0x31a0ba,_0x72d346){const _0xf1f65b=_0x375044;return _0x31a0ba[_0xf1f65b('0x7')]['id']&&delete _0x31a0ba[_0xf1f65b('0x7')]['id'],db[_0xf1f65b('0x32')][_0xf1f65b('0x16')]({'where':{'id':_0x31a0ba[_0xf1f65b('0x17')]['id']}})['then'](handleEntityNotFound(_0x72d346,null))[_0xf1f65b('0x28')](saveUpdates(_0x31a0ba[_0xf1f65b('0x7')],null))['then'](respondWithResult(_0x72d346,null))[_0xf1f65b('0x1e')](handleError(_0x72d346,null));},exports[_0x375044('0x1a')]=function(_0x440018,_0x533a02){const _0x22fefc=_0x375044;return db['DeskConfiguration']['findOne']({'where':{'id':_0x440018[_0x22fefc('0x17')]['id']}})[_0x22fefc('0x28')](handleEntityNotFound(_0x533a02,null))[_0x22fefc('0x28')](removeEntity(_0x533a02,null))[_0x22fefc('0x1e')](handleError(_0x533a02,null));},exports[_0x375044('0x14')]=function(_0x26eace,_0x503b6d){const _0x557ad8=_0x375044;let _0x37ae51={};const _0x1d2bd9={};let _0x271bff,_0x1ab78c;return db['DeskConfiguration'][_0x557ad8('0x16')]({'where':{'id':_0x26eace[_0x557ad8('0x17')]['id']}})[_0x557ad8('0x28')](handleEntityNotFound(_0x503b6d,null))[_0x557ad8('0x28')](function(_0x42d56b){const _0x111bff=_0x557ad8;if(_0x42d56b)return _0x271bff=_0x42d56b,_0x1d2bd9[_0x111bff('0xf')]=_[_0x111bff('0x22')](db[_0x111bff('0x5')][_0x111bff('0x2d')]),_0x1d2bd9[_0x111bff('0xa')]=_[_0x111bff('0x22')](_0x26eace[_0x111bff('0xa')]),_0x1d2bd9['filters']=_[_0x111bff('0x13')](_0x1d2bd9[_0x111bff('0xf')],_0x1d2bd9[_0x111bff('0xa')]),_0x37ae51[_0x111bff('0xe')]=_['intersection'](_0x1d2bd9[_0x111bff('0xf')],qs[_0x111bff('0x29')](_0x26eace[_0x111bff('0xa')]['fields'])),_0x37ae51['attributes']=_0x37ae51[_0x111bff('0xe')]['length']?_0x37ae51[_0x111bff('0xe')]:_0x1d2bd9[_0x111bff('0xf')],_0x37ae51[_0x111bff('0xb')]=qs[_0x111bff('0x1b')](_0x26eace[_0x111bff('0xa')][_0x111bff('0x1b')]),_0x37ae51[_0x111bff('0xd')]=qs[_0x111bff('0x9')](_[_0x111bff('0x18')](_0x26eace['query'],_0x1d2bd9['filters'])),_0x26eace['query'][_0x111bff('0x2')]&&(_0x37ae51[_0x111bff('0xd')]=_['merge'](_0x37ae51[_0x111bff('0xd')],{[Op['or']]:_[_0x111bff('0x8')](_0x37ae51[_0x111bff('0xe')],function(_0x1b1683){const _0x2e8cb9=_0x111bff,_0x161e2b={};return _0x161e2b[_0x1b1683]={[Op['like']]:'%'+_0x26eace[_0x2e8cb9('0xa')]['filter']+'%'},_0x161e2b;})})),_0x37ae51=_[_0x111bff('0x4')]({},_0x37ae51,_0x26eace[_0x111bff('0x23')]),_0x271bff[_0x111bff('0x14')](_0x37ae51);})[_0x557ad8('0x28')](function(_0x491ebd){const _0x5dbf03=_0x557ad8;if(_0x491ebd)return _0x1ab78c=_0x491ebd[_0x5dbf03('0x12')],typeof _0x26eace[_0x5dbf03('0xa')][_0x5dbf03('0x0')]===_0x5dbf03('0x34')&&(_0x37ae51[_0x5dbf03('0x2b')]=qs['limit'](_0x26eace[_0x5dbf03('0xa')][_0x5dbf03('0x2b')]),_0x37ae51[_0x5dbf03('0x33')]=qs['offset'](_0x26eace[_0x5dbf03('0xa')][_0x5dbf03('0x33')])),_0x271bff[_0x5dbf03('0x14')](_0x37ae51);})[_0x557ad8('0x28')](function(_0x30cd1a){if(_0x30cd1a)return _0x30cd1a?{'count':_0x1ab78c,'rows':_0x30cd1a}:null;})['then'](respondWithResult(_0x503b6d,null))[_0x557ad8('0x1e')](handleError(_0x503b6d,null));},exports[_0x375044('0x1')]=function(_0x57ef46,_0x31f1cf){const _0x2125be=_0x375044;let _0xd13ee3={};const _0x4f62ef={};let _0x5c21ed,_0x1ddeda;return db[_0x2125be('0x32')][_0x2125be('0x16')]({'where':{'id':_0x57ef46['params']['id']}})['then'](handleEntityNotFound(_0x31f1cf,null))['then'](function(_0x3647b3){const _0x71e4c5=_0x2125be;if(_0x3647b3)return _0x5c21ed=_0x3647b3,_0x4f62ef[_0x71e4c5('0xf')]=_['keys'](db[_0x71e4c5('0x5')][_0x71e4c5('0x2d')]),_0x4f62ef[_0x71e4c5('0xa')]=_['keys'](_0x57ef46['query']),_0x4f62ef[_0x71e4c5('0x9')]=_['intersection'](_0x4f62ef[_0x71e4c5('0xf')],_0x4f62ef['query']),_0xd13ee3[_0x71e4c5('0xe')]=_['intersection'](_0x4f62ef[_0x71e4c5('0xf')],qs['fields'](_0x57ef46[_0x71e4c5('0xa')][_0x71e4c5('0x29')])),_0xd13ee3['attributes']=_0xd13ee3[_0x71e4c5('0xe')][_0x71e4c5('0x12')]?_0xd13ee3['attributes']:_0x4f62ef[_0x71e4c5('0xf')],_0xd13ee3[_0x71e4c5('0xb')]=qs[_0x71e4c5('0x1b')](_0x57ef46['query']['sort']),_0xd13ee3['where']=qs[_0x71e4c5('0x9')](_[_0x71e4c5('0x18')](_0x57ef46[_0x71e4c5('0xa')],_0x4f62ef['filters'])),_0x57ef46[_0x71e4c5('0xa')][_0x71e4c5('0x2')]&&(_0xd13ee3[_0x71e4c5('0xd')]=_['merge'](_0xd13ee3[_0x71e4c5('0xd')],{[Op['or']]:_[_0x71e4c5('0x8')](_0xd13ee3[_0x71e4c5('0xe')],function(_0x509e84){const _0x3ebd2e=_0x71e4c5,_0x35768a={};return _0x35768a[_0x509e84]={[Op['like']]:'%'+_0x57ef46[_0x3ebd2e('0xa')][_0x3ebd2e('0x2')]+'%'},_0x35768a;})})),_0xd13ee3=_[_0x71e4c5('0x4')]({},_0xd13ee3,_0x57ef46[_0x71e4c5('0x23')]),_0x5c21ed['getSubjects'](_0xd13ee3);})[_0x2125be('0x28')](function(_0x4485d6){const _0x34f786=_0x2125be;if(_0x4485d6)return _0x1ddeda=_0x4485d6[_0x34f786('0x12')],typeof _0x57ef46[_0x34f786('0xa')][_0x34f786('0x0')]===_0x34f786('0x34')&&(_0xd13ee3[_0x34f786('0x2b')]=qs[_0x34f786('0x2b')](_0x57ef46[_0x34f786('0xa')][_0x34f786('0x2b')]),_0xd13ee3[_0x34f786('0x33')]=qs[_0x34f786('0x33')](_0x57ef46['query']['offset'])),_0x5c21ed[_0x34f786('0x1')](_0xd13ee3);})[_0x2125be('0x28')](function(_0x9dc18e){if(_0x9dc18e)return _0x9dc18e?{'count':_0x1ddeda,'rows':_0x9dc18e}:null;})[_0x2125be('0x28')](respondWithResult(_0x31f1cf,null))[_0x2125be('0x1e')](handleError(_0x31f1cf,null));},exports['getDescriptions']=function(_0xb8086d,_0x15f646){const _0x1a78f2=_0x375044;let _0x54fd8e={};const _0x2d6f0b={};let _0x3d4a4b,_0x5b9fee;return db[_0x1a78f2('0x32')]['findOne']({'where':{'id':_0xb8086d[_0x1a78f2('0x17')]['id']}})[_0x1a78f2('0x28')](handleEntityNotFound(_0x15f646,null))[_0x1a78f2('0x28')](function(_0x117f35){const _0x1fd709=_0x1a78f2;if(_0x117f35)return _0x3d4a4b=_0x117f35,_0x2d6f0b['model']=_[_0x1fd709('0x22')](db[_0x1fd709('0x5')]['rawAttributes']),_0x2d6f0b['query']=_[_0x1fd709('0x22')](_0xb8086d['query']),_0x2d6f0b['filters']=_[_0x1fd709('0x13')](_0x2d6f0b['model'],_0x2d6f0b['query']),_0x54fd8e[_0x1fd709('0xe')]=_[_0x1fd709('0x13')](_0x2d6f0b[_0x1fd709('0xf')],qs[_0x1fd709('0x29')](_0xb8086d[_0x1fd709('0xa')]['fields'])),_0x54fd8e[_0x1fd709('0xe')]=_0x54fd8e[_0x1fd709('0xe')][_0x1fd709('0x12')]?_0x54fd8e[_0x1fd709('0xe')]:_0x2d6f0b[_0x1fd709('0xf')],_0x54fd8e[_0x1fd709('0xb')]=qs[_0x1fd709('0x1b')](_0xb8086d[_0x1fd709('0xa')][_0x1fd709('0x1b')]),_0x54fd8e[_0x1fd709('0xd')]=qs[_0x1fd709('0x9')](_['pick'](_0xb8086d[_0x1fd709('0xa')],_0x2d6f0b[_0x1fd709('0x9')])),_0xb8086d[_0x1fd709('0xa')]['filter']&&(_0x54fd8e[_0x1fd709('0xd')]=_['merge'](_0x54fd8e[_0x1fd709('0xd')],{[Op['or']]:_['map'](_0x54fd8e[_0x1fd709('0xe')],function(_0x2cf0f9){const _0x1c216b=_0x1fd709,_0x2129e7={};return _0x2129e7[_0x2cf0f9]={[Op[_0x1c216b('0x24')]]:'%'+_0xb8086d[_0x1c216b('0xa')][_0x1c216b('0x2')]+'%'},_0x2129e7;})})),_0x54fd8e=_[_0x1fd709('0x4')]({},_0x54fd8e,_0xb8086d[_0x1fd709('0x23')]),_0x3d4a4b['getDescriptions'](_0x54fd8e);})[_0x1a78f2('0x28')](function(_0x3a68b6){const _0x1d7efa=_0x1a78f2;if(_0x3a68b6)return _0x5b9fee=_0x3a68b6[_0x1d7efa('0x12')],typeof _0xb8086d[_0x1d7efa('0xa')][_0x1d7efa('0x0')]===_0x1d7efa('0x34')&&(_0x54fd8e['limit']=qs[_0x1d7efa('0x2b')](_0xb8086d[_0x1d7efa('0xa')][_0x1d7efa('0x2b')]),_0x54fd8e[_0x1d7efa('0x33')]=qs[_0x1d7efa('0x33')](_0xb8086d[_0x1d7efa('0xa')][_0x1d7efa('0x33')])),_0x3d4a4b['getDescriptions'](_0x54fd8e);})[_0x1a78f2('0x28')](function(_0x30b430){if(_0x30b430)return _0x30b430?{'count':_0x5b9fee,'rows':_0x30b430}:null;})[_0x1a78f2('0x28')](respondWithResult(_0x15f646,null))[_0x1a78f2('0x1e')](handleError(_0x15f646,null));},exports['getTags']=function(_0x453533,_0x18dcf1){const _0x53716a=_0x375044;let _0x4f3eb7={};const _0x1f493d={};let _0x45efc7,_0x270895;return db[_0x53716a('0x32')][_0x53716a('0x16')]({'where':{'id':_0x453533[_0x53716a('0x17')]['id']}})[_0x53716a('0x28')](handleEntityNotFound(_0x18dcf1,null))['then'](function(_0x25900e){const _0x2ccea2=_0x53716a;if(_0x25900e)return _0x45efc7=_0x25900e,_0x1f493d['model']=_[_0x2ccea2('0x22')](db[_0x2ccea2('0x26')][_0x2ccea2('0x2d')]),_0x1f493d[_0x2ccea2('0xa')]=_['keys'](_0x453533[_0x2ccea2('0xa')]),_0x1f493d[_0x2ccea2('0x9')]=_[_0x2ccea2('0x13')](_0x1f493d[_0x2ccea2('0xf')],_0x1f493d[_0x2ccea2('0xa')]),_0x4f3eb7[_0x2ccea2('0xe')]=_[_0x2ccea2('0x13')](_0x1f493d[_0x2ccea2('0xf')],qs[_0x2ccea2('0x29')](_0x453533[_0x2ccea2('0xa')]['fields'])),_0x4f3eb7[_0x2ccea2('0xe')]=_0x4f3eb7[_0x2ccea2('0xe')][_0x2ccea2('0x12')]?_0x4f3eb7[_0x2ccea2('0xe')]:_0x1f493d[_0x2ccea2('0xf')],_0x4f3eb7[_0x2ccea2('0xb')]=qs[_0x2ccea2('0x1b')](_0x453533['query'][_0x2ccea2('0x1b')]),_0x4f3eb7['where']=qs[_0x2ccea2('0x9')](_['pick'](_0x453533['query'],_0x1f493d['filters'])),_0x453533[_0x2ccea2('0xa')][_0x2ccea2('0x2')]&&(_0x4f3eb7[_0x2ccea2('0xd')]=_[_0x2ccea2('0x4')](_0x4f3eb7[_0x2ccea2('0xd')],{[Op['or']]:_[_0x2ccea2('0x8')](_0x4f3eb7[_0x2ccea2('0xe')],function(_0x2ebe19){const _0x22fcba=_0x2ccea2,_0x498d6a={};return _0x498d6a[_0x2ebe19]={[Op[_0x22fcba('0x24')]]:'%'+_0x453533[_0x22fcba('0xa')]['filter']+'%'},_0x498d6a;})})),_0x4f3eb7=_['merge']({},_0x4f3eb7,_0x453533[_0x2ccea2('0x23')]),_0x45efc7[_0x2ccea2('0x31')](_0x4f3eb7);})['then'](function(_0x2cebce){const _0x357cb1=_0x53716a;if(_0x2cebce)return _0x270895=_0x2cebce[_0x357cb1('0x12')],typeof _0x453533[_0x357cb1('0xa')][_0x357cb1('0x0')]===_0x357cb1('0x34')&&(_0x4f3eb7[_0x357cb1('0x2b')]=qs[_0x357cb1('0x2b')](_0x453533['query'][_0x357cb1('0x2b')]),_0x4f3eb7[_0x357cb1('0x33')]=qs[_0x357cb1('0x33')](_0x453533[_0x357cb1('0xa')][_0x357cb1('0x33')])),_0x45efc7[_0x357cb1('0x31')](_0x4f3eb7);})[_0x53716a('0x28')](function(_0x3d7ee1){if(_0x3d7ee1)return _0x3d7ee1?{'count':_0x270895,'rows':_0x3d7ee1}:null;})[_0x53716a('0x28')](respondWithResult(_0x18dcf1,null))[_0x53716a('0x1e')](handleError(_0x18dcf1,null));},exports['setTags']=function(_0x1fff10,_0x3abeac){const _0x4f23d9=_0x375044;return _0x1fff10[_0x4f23d9('0x7')]['id']&&delete _0x1fff10['body']['id'],db['DeskConfiguration']['findOne']({'where':{'id':_0x1fff10[_0x4f23d9('0x17')]['id']}})[_0x4f23d9('0x28')](handleEntityNotFound(_0x3abeac,null))[_0x4f23d9('0x28')](function(_0x4db368){const _0x16450e=_0x4f23d9;if(_0x4db368)return _0x4db368[_0x16450e('0x2a')](_0x1fff10[_0x16450e('0x7')][_0x16450e('0x2c')]||[]);return null;})[_0x4f23d9('0x28')](respondWithResult(_0x3abeac,null))[_0x4f23d9('0x1e')](handleError(_0x3abeac,null));};
\ No newline at end of file