Built motion from commit 8dca541896b0ff92bb88a36cc13f4f385b593b4b. Version 3.0.0...
[motion-next.git] / server / api / screenRecording / screenRecording.controller.js
index 3150435..f5fd5e2 100644 (file)
@@ -1 +1 @@
-const a534_0x265b=['limit','set','map','decryptFile','download','message','value','duration','send','root','../../config/logger','index','order','keys','uniqueid','intersection','length','catch','options','differenceBy','offset','ScreenRecording','describe','type','unlinkSync','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','filename','update','where','error','count','pick','sendStatus','error-middleware/errors','query','create','secrets','existsSync','server/files/screen_recordings','name','end','../../mysqldb','Content-Range','api','nolimit','fields','cancellazione\x20fisica\x20documento\x20%s','params','format','model','Entity\x20not\x20found','.cypher','merge','stack','filter','body','attributes','include','filters','createdAt','../../components/encryptor','key','status','json','includeAll','unlink','then','join','../../config/environment','File:\x20\x22','like','findAll','info','sort','%s.cypher','destroy','rawAttributes','findOne','closedAt','lodash'];(function(_0x300fbc,_0x265b43){const _0x2f56aa=function(_0x3c15d3){while(--_0x3c15d3){_0x300fbc['push'](_0x300fbc['shift']());}};_0x2f56aa(++_0x265b43);}(a534_0x265b,0x1d4));const a534_0x2f56=function(_0x300fbc,_0x265b43){_0x300fbc=_0x300fbc-0x0;let _0x2f56aa=a534_0x265b[_0x300fbc];return _0x2f56aa;};const _0x451b1f=a534_0x2f56;'use strict';const util=require('util'),path=require('path'),fs=require('fs'),_=require(_0x451b1f('0xb')),qs=require('../../components/parsers/qs'),logger=require(_0x451b1f('0x16'))(_0x451b1f('0x37')),config=require(_0x451b1f('0x0')),db=require(_0x451b1f('0x35'))['db'],{Op,ValidationError}=require('sequelize'),{InternalError}=require(_0x451b1f('0x2d'));function respondWithResult(_0x3c15d3,_0x487f5f){return _0x487f5f=_0x487f5f||0xc8,function(_0x319a49){const _0x3f83e7=a534_0x2f56;if(_0x319a49)return _0x3c15d3['status'](_0x487f5f)[_0x3f83e7('0x4b')](_0x319a49);};}function respondWithFilteredResult(_0x37f670,_0x135c01){return function(_0x5a7bb1){const _0x2f5fef=a534_0x2f56;if(_0x5a7bb1){const _0x479a29=_0x5a7bb1[_0x2f5fef('0x2a')],_0x2fbb36=_0x135c01['offset'];let _0x19e48a=_0x135c01[_0x2f5fef('0x20')]+_0x135c01[_0x2f5fef('0xc')],_0x33ed53;return _0x19e48a>=_0x479a29?(_0x19e48a=_0x479a29,_0x33ed53=0xc8):_0x33ed53=0xce,_0x37f670[_0x2f5fef('0x4a')](_0x33ed53),_0x37f670[_0x2f5fef('0xd')](_0x2f5fef('0x36'),_0x2fbb36+'-'+_0x19e48a+'/'+_0x479a29)['json'](_0x5a7bb1);}return null;};}function saveUpdates(_0xbe7f96){return function(_0x5500c9){const _0x33d4ab=a534_0x2f56;if(_0x5500c9)return _0x5500c9[_0x33d4ab('0x27')](_0xbe7f96)['then'](function(_0x3227c5){return _0x3227c5;});return null;};}function handleEntityNotFound(_0x1e4bec){return function(_0x5e7a88){const _0x5a48a4=a534_0x2f56;return!_0x5e7a88&&_0x1e4bec[_0x5a48a4('0x2c')](0x194),_0x5e7a88;};}function handleError(_0x11f8db,_0x2cdf70){return _0x2cdf70=_0x2cdf70||0x1f4,function(_0x3e3b86){const _0x3f8e0b=a534_0x2f56;logger[_0x3f8e0b('0x29')](_0x3e3b86[_0x3f8e0b('0x41')]),_0x3e3b86[_0x3f8e0b('0x33')]&&delete _0x3e3b86[_0x3f8e0b('0x33')],_0x11f8db[_0x3f8e0b('0x4a')](_0x2cdf70)[_0x3f8e0b('0x14')](_0x3e3b86);};}exports[_0x451b1f('0x17')]=function(_0x6078b8,_0x32516d){const _0x64b526=_0x451b1f;let _0x161e75={};const _0x19317d={},_0x1f31f2={'count':0x0,'rows':[]},_0x891420=_[_0x64b526('0xe')](db[_0x64b526('0x21')][_0x64b526('0x8')],function(_0x55b65f){const _0x111424=_0x64b526;return{'name':_0x55b65f['fieldName'],'type':_0x55b65f[_0x111424('0x23')][_0x111424('0x49')]};});_0x19317d['model']=_[_0x64b526('0x1f')](_[_0x64b526('0xe')](_0x891420,_0x64b526('0x33')),[_0x64b526('0x3c')]),_0x19317d[_0x64b526('0x2e')]=_[_0x64b526('0x19')](_0x6078b8[_0x64b526('0x2e')]),_0x19317d['filters']=_['intersection'](_0x19317d[_0x64b526('0x3d')],_0x19317d[_0x64b526('0x2e')]),_0x161e75[_0x64b526('0x44')]=_[_0x64b526('0x1b')](_0x19317d[_0x64b526('0x3d')],qs[_0x64b526('0x39')](_0x6078b8['query']['fields'])),_0x161e75[_0x64b526('0x44')]=_0x161e75['attributes'][_0x64b526('0x1c')]?_0x161e75[_0x64b526('0x44')]:_0x19317d[_0x64b526('0x3d')];typeof _0x6078b8['query'][_0x64b526('0x38')]==='undefined'&&(_0x161e75[_0x64b526('0xc')]=qs[_0x64b526('0xc')](_0x6078b8['query'][_0x64b526('0xc')]),_0x161e75[_0x64b526('0x20')]=qs[_0x64b526('0x20')](_0x6078b8[_0x64b526('0x2e')][_0x64b526('0x20')]));_0x161e75[_0x64b526('0x18')]=qs['sort'](_0x6078b8[_0x64b526('0x2e')][_0x64b526('0x5')]),_0x161e75['where']=qs[_0x64b526('0x46')](_[_0x64b526('0x2b')](_0x6078b8[_0x64b526('0x2e')],_0x19317d[_0x64b526('0x46')]),_0x891420);_0x6078b8[_0x64b526('0x2e')]['filter']&&(_0x161e75[_0x64b526('0x28')]=_[_0x64b526('0x40')](_0x161e75[_0x64b526('0x28')],{[Op['or']]:_[_0x64b526('0xe')](_0x891420,function(_0x172a4b){const _0x3c2815=_0x64b526;if(_0x172a4b[_0x3c2815('0x23')]!=='VIRTUAL'){const _0x4f5cbd={};return _0x4f5cbd[_0x172a4b[_0x3c2815('0x33')]]={[Op[_0x3c2815('0x2')]]:'%'+_0x6078b8[_0x3c2815('0x2e')][_0x3c2815('0x42')]+'%'},_0x4f5cbd;}})}));_0x161e75=_[_0x64b526('0x40')]({},_0x161e75,_0x6078b8[_0x64b526('0x1e')]);const _0x371803={'where':_0x161e75[_0x64b526('0x28')]};return db[_0x64b526('0x21')][_0x64b526('0x2a')](_0x371803)['then'](function(_0x1c76f5){const _0x31d6a8=_0x64b526;return _0x1f31f2['count']=_0x1c76f5,_0x6078b8[_0x31d6a8('0x2e')][_0x31d6a8('0x4c')]&&(_0x161e75[_0x31d6a8('0x45')]=[{'all':!![]}]),db['ScreenRecording'][_0x31d6a8('0x3')](_0x161e75);})[_0x64b526('0x4e')](function(_0x4ba34b){return _0x1f31f2['rows']=_0x4ba34b,_0x1f31f2;})[_0x64b526('0x4e')](respondWithFilteredResult(_0x32516d,_0x161e75))[_0x64b526('0x1d')](handleError(_0x32516d,null));},exports['show']=function(_0x1c4ec8,_0x5c464e){const _0x228ea7=_0x451b1f;let _0x3f8c3b={'raw':![],'where':{'id':_0x1c4ec8[_0x228ea7('0x3b')]['id']}};const _0x311831={};return _0x311831['model']=_[_0x228ea7('0x19')](db[_0x228ea7('0x21')][_0x228ea7('0x8')]),_0x311831[_0x228ea7('0x2e')]=_['keys'](_0x1c4ec8[_0x228ea7('0x2e')]),_0x311831[_0x228ea7('0x46')]=_[_0x228ea7('0x1b')](_0x311831[_0x228ea7('0x3d')],_0x311831[_0x228ea7('0x2e')]),_0x3f8c3b[_0x228ea7('0x44')]=_[_0x228ea7('0x1b')](_0x311831['model'],qs[_0x228ea7('0x39')](_0x1c4ec8[_0x228ea7('0x2e')][_0x228ea7('0x39')])),_0x3f8c3b[_0x228ea7('0x44')]=_0x3f8c3b[_0x228ea7('0x44')][_0x228ea7('0x1c')]?_0x3f8c3b['attributes']:_0x311831[_0x228ea7('0x3d')],_0x1c4ec8[_0x228ea7('0x2e')][_0x228ea7('0x4c')]&&(_0x3f8c3b[_0x228ea7('0x45')]=[{'all':!![]}]),_0x3f8c3b=_[_0x228ea7('0x40')]({},_0x3f8c3b,_0x1c4ec8[_0x228ea7('0x1e')]),db[_0x228ea7('0x21')]['findOne'](_0x3f8c3b)['then'](handleEntityNotFound(_0x5c464e,null))[_0x228ea7('0x4e')](respondWithResult(_0x5c464e,null))['catch'](handleError(_0x5c464e,null));},exports[_0x451b1f('0x2f')]=function(_0x26e58f,_0x13d0f9){const _0x38f611=_0x451b1f;return db[_0x38f611('0x21')]['create'](_0x26e58f[_0x38f611('0x43')],{})['then'](respondWithResult(_0x13d0f9,0xc9))[_0x38f611('0x1d')](handleError(_0x13d0f9,null));},exports['update']=function(_0x391103,_0x16a06d){const _0xb567c1=_0x451b1f;return _0x391103[_0xb567c1('0x43')]['id']&&delete _0x391103[_0xb567c1('0x43')]['id'],delete _0x391103[_0xb567c1('0x43')][_0xb567c1('0x13')],delete _0x391103[_0xb567c1('0x43')][_0xb567c1('0x47')],delete _0x391103[_0xb567c1('0x43')][_0xb567c1('0xa')],delete _0x391103[_0xb567c1('0x43')]['value'],db[_0xb567c1('0x21')][_0xb567c1('0x9')]({'where':{'id':_0x391103[_0xb567c1('0x3b')]['id']}})['then'](handleEntityNotFound(_0x16a06d,null))[_0xb567c1('0x4e')](saveUpdates(_0x391103[_0xb567c1('0x43')],null))[_0xb567c1('0x4e')](respondWithResult(_0x16a06d,null))[_0xb567c1('0x1d')](handleError(_0x16a06d,null));},exports[_0x451b1f('0x22')]=function(_0x474d25,_0xd5bbd0){const _0x59cf7b=_0x451b1f;return db[_0x59cf7b('0x21')][_0x59cf7b('0x22')]()[_0x59cf7b('0x4e')](respondWithResult(_0xd5bbd0,null))['catch'](handleError(_0xd5bbd0,null));},exports[_0x451b1f('0x10')]=function(_0x278072,_0x143cc2){const _0x3cd0eb=_0x451b1f,_0x1125f0=require(_0x3cd0eb('0x48'));let _0x5631a2=![];const _0x300af5={};return _0x278072[_0x3cd0eb('0x2e')][_0x3cd0eb('0x23')]&&_0x278072[_0x3cd0eb('0x2e')][_0x3cd0eb('0x23')]==='uniqueid'?_0x300af5[_0x3cd0eb('0x1a')]=_0x278072[_0x3cd0eb('0x3b')]['id']:_0x300af5['id']=_0x278072[_0x3cd0eb('0x3b')]['id'],db[_0x3cd0eb('0x21')]['findOne']({'where':_0x300af5,'attributes':['id','value'],'raw':!![]})[_0x3cd0eb('0x4e')](handleEntityNotFound(_0x143cc2,null))[_0x3cd0eb('0x4e')](function(_0x10540e){const _0x5e5d68=_0x3cd0eb;if(_0x10540e){const _0x1ce89e=path[_0x5e5d68('0x4f')](config[_0x5e5d68('0x15')],_0x5e5d68('0x32'),_0x10540e['value']),_0x511713=util[_0x5e5d68('0x3c')](_0x5e5d68('0x6'),_0x1ce89e);if(fs[_0x5e5d68('0x31')](_0x511713))return _0x5631a2=!![],_0x1125f0[_0x5e5d68('0xf')](_0x511713,_0x1ce89e,config[_0x5e5d68('0x30')]['recording'])['then'](function(){return _0x10540e;});return _0x10540e;}})[_0x3cd0eb('0x4e')](function(_0x32dd58){const _0x65ea32=_0x3cd0eb;if(_0x32dd58){const _0x17fd84=path[_0x65ea32('0x4f')](config[_0x65ea32('0x15')],'server/files/screen_recordings',_0x32dd58['value']);if(!fs[_0x65ea32('0x31')](_0x17fd84))throw new ValidationError('ScreenRecording\x20not\x20found');return _0x32dd58[_0x65ea32('0x26')]?_0x143cc2[_0x65ea32('0x10')](_0x17fd84,_0x32dd58['filename']+path['extname'](_0x17fd84),function(){const _0x4b9535=_0x65ea32;_0x5631a2&&fs[_0x4b9535('0x4d')](_0x17fd84);}):_0x143cc2[_0x65ea32('0x10')](_0x17fd84,function(){const _0x1d5b20=_0x65ea32;_0x5631a2&&fs[_0x1d5b20('0x4d')](_0x17fd84);});}})[_0x3cd0eb('0x1d')](function(_0x1eff53){const _0x55f438=_0x3cd0eb;if(_0x1eff53[_0x55f438('0x11')]==='ScreenRecording\x20not\x20found')_0x143cc2['status'](0x194)['send']('Not\x20found');else return handleError(_0x143cc2,null);});},exports[_0x451b1f('0x7')]=function(_0x123faf,_0x4148ac){const _0xa6753f=_0x451b1f;return db[_0xa6753f('0x21')][_0xa6753f('0x9')]({'where':{'id':_0x123faf[_0xa6753f('0x3b')]['id']}})[_0xa6753f('0x4e')](function(_0x1340f2){const _0x579503=_0xa6753f;if(!_0x1340f2)throw new ReferenceError(_0x579503('0x3e'));return _0x1340f2;})['then'](function(_0x1d0a9e){const _0x27fbf1=_0xa6753f;let _0x287f2f=path['join'](config[_0x27fbf1('0x15')],'server/files/screen_recordings',_0x1d0a9e[_0x27fbf1('0x12')]);return logger['info'](_0x27fbf1('0x3a'),_0x287f2f),!_['isNil'](_0x1d0a9e['value'])&&fs['existsSync'](_0x287f2f)&&(logger['info']('File:\x20\x22'+_0x287f2f+_0x27fbf1('0x25')),fs[_0x27fbf1('0x24')](_0x287f2f)),_0x287f2f=_0x287f2f+_0x27fbf1('0x3f'),!_['isNil'](_0x1d0a9e[_0x27fbf1('0x12')])&&fs['existsSync'](_0x287f2f)&&(logger[_0x27fbf1('0x4')](_0x27fbf1('0x1')+_0x287f2f+_0x27fbf1('0x25')),fs[_0x27fbf1('0x24')](_0x287f2f)),_0x1d0a9e;})[_0xa6753f('0x4e')](function(_0x4e042e){if(!_0x4e042e)throw new InternalError();return _0x4e042e['destroy']();})[_0xa6753f('0x4e')](function(){const _0x31137d=_0xa6753f;_0x4148ac[_0x31137d('0x4a')](0xcc)[_0x31137d('0x34')]();})[_0xa6753f('0x1d')](handleError(_0x4148ac,null));};
\ No newline at end of file
+const a534_0x193a=['fieldName','duration','closedAt','ScreenRecording','path','sort','findAll','error-middleware/errors','status','end','describe','uniqueid','isNil','../../config/logger','server/files/screen_recordings','type','../../components/encryptor','format','count','findOne','stack','catch','lodash','params','keys','update','length','json','like','model','sequelize','Not\x20found','undefined','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','intersection','includeAll','rows','VIRTUAL','send','unlinkSync','filter','message','then','root','ScreenRecording\x20not\x20found','Content-Range','destroy','fields','join','options','attributes','where','show','name','differenceBy','cancellazione\x20fisica\x20documento\x20%s','download','merge','map','rawAttributes','Entity\x20not\x20found','filename','offset','File:\x20\x22','value','unlink','create','decryptFile','api','include','nolimit','body','../../components/parsers/qs','pick','query','filters','set','index','limit','../../config/environment','info','existsSync'];(function(_0x5dc2cb,_0x193adb){const _0x4d43cb=function(_0x369c0f){while(--_0x369c0f){_0x5dc2cb['push'](_0x5dc2cb['shift']());}};_0x4d43cb(++_0x193adb);}(a534_0x193a,0xc3));const a534_0x4d43=function(_0x5dc2cb,_0x193adb){_0x5dc2cb=_0x5dc2cb-0x0;let _0x4d43cb=a534_0x193a[_0x5dc2cb];return _0x4d43cb;};const _0x362a35=a534_0x4d43;'use strict';const util=require('util'),path=require(_0x362a35('0x37')),fs=require('fs'),_=require(_0x362a35('0x49')),qs=require(_0x362a35('0x29')),logger=require(_0x362a35('0x40'))(_0x362a35('0x25')),config=require(_0x362a35('0x30')),db=require('../../mysqldb')['db'],{Op,ValidationError}=require(_0x362a35('0x51')),{InternalError}=require(_0x362a35('0x3a'));function respondWithResult(_0x369c0f,_0x11bb71){return _0x11bb71=_0x11bb71||0xc8,function(_0x1e41c3){const _0x185642=a534_0x4d43;if(_0x1e41c3)return _0x369c0f[_0x185642('0x3b')](_0x11bb71)['json'](_0x1e41c3);};}function respondWithFilteredResult(_0x585954,_0x42174e){return function(_0x5a1b4d){const _0x4b3b80=a534_0x4d43;if(_0x5a1b4d){const _0x559ec6=_0x5a1b4d[_0x4b3b80('0x45')],_0x23afb7=_0x42174e[_0x4b3b80('0x1f')];let _0x3d14ab=_0x42174e['offset']+_0x42174e[_0x4b3b80('0x2f')],_0x59d08d;return _0x3d14ab>=_0x559ec6?(_0x3d14ab=_0x559ec6,_0x59d08d=0xc8):_0x59d08d=0xce,_0x585954[_0x4b3b80('0x3b')](_0x59d08d),_0x585954[_0x4b3b80('0x2d')](_0x4b3b80('0xe'),_0x23afb7+'-'+_0x3d14ab+'/'+_0x559ec6)[_0x4b3b80('0x4e')](_0x5a1b4d);}return null;};}function saveUpdates(_0x169faa){return function(_0x167973){const _0x3650ee=a534_0x4d43;if(_0x167973)return _0x167973[_0x3650ee('0x4c')](_0x169faa)[_0x3650ee('0xb')](function(_0x1d0ad9){return _0x1d0ad9;});return null;};}function handleEntityNotFound(_0x577d5c){return function(_0x1cb2e6){return!_0x1cb2e6&&_0x577d5c['sendStatus'](0x194),_0x1cb2e6;};}function handleError(_0x11549f,_0x7679aa){return _0x7679aa=_0x7679aa||0x1f4,function(_0x1d1119){const _0x272e8c=a534_0x4d43;logger['error'](_0x1d1119[_0x272e8c('0x47')]),_0x1d1119[_0x272e8c('0x16')]&&delete _0x1d1119[_0x272e8c('0x16')],_0x11549f[_0x272e8c('0x3b')](_0x7679aa)[_0x272e8c('0x7')](_0x1d1119);};}exports[_0x362a35('0x2e')]=function(_0x1e38e8,_0x4586eb){const _0x200f11=_0x362a35;let _0x466309={};const _0x46dc92={},_0x3e4eab={'count':0x0,'rows':[]},_0xb27de=_['map'](db[_0x200f11('0x36')][_0x200f11('0x1c')],function(_0x561b28){const _0x51bc68=_0x200f11;return{'name':_0x561b28[_0x51bc68('0x33')],'type':_0x561b28[_0x51bc68('0x42')]['key']};});_0x46dc92[_0x200f11('0x50')]=_[_0x200f11('0x17')](_[_0x200f11('0x1b')](_0xb27de,_0x200f11('0x16')),[_0x200f11('0x44')]),_0x46dc92['query']=_[_0x200f11('0x4b')](_0x1e38e8['query']),_0x46dc92[_0x200f11('0x2c')]=_[_0x200f11('0x3')](_0x46dc92[_0x200f11('0x50')],_0x46dc92[_0x200f11('0x2b')]),_0x466309[_0x200f11('0x13')]=_[_0x200f11('0x3')](_0x46dc92[_0x200f11('0x50')],qs[_0x200f11('0x10')](_0x1e38e8[_0x200f11('0x2b')][_0x200f11('0x10')])),_0x466309['attributes']=_0x466309[_0x200f11('0x13')][_0x200f11('0x4d')]?_0x466309[_0x200f11('0x13')]:_0x46dc92['model'];typeof _0x1e38e8['query'][_0x200f11('0x27')]===_0x200f11('0x1')&&(_0x466309['limit']=qs['limit'](_0x1e38e8['query'][_0x200f11('0x2f')]),_0x466309['offset']=qs[_0x200f11('0x1f')](_0x1e38e8[_0x200f11('0x2b')][_0x200f11('0x1f')]));_0x466309['order']=qs['sort'](_0x1e38e8['query'][_0x200f11('0x38')]),_0x466309['where']=qs[_0x200f11('0x2c')](_[_0x200f11('0x2a')](_0x1e38e8[_0x200f11('0x2b')],_0x46dc92[_0x200f11('0x2c')]),_0xb27de);_0x1e38e8['query'][_0x200f11('0x9')]&&(_0x466309[_0x200f11('0x14')]=_['merge'](_0x466309[_0x200f11('0x14')],{[Op['or']]:_[_0x200f11('0x1b')](_0xb27de,function(_0x227467){const _0x5cf3c7=_0x200f11;if(_0x227467['type']!==_0x5cf3c7('0x6')){const _0x46273f={};return _0x46273f[_0x227467[_0x5cf3c7('0x16')]]={[Op[_0x5cf3c7('0x4f')]]:'%'+_0x1e38e8[_0x5cf3c7('0x2b')][_0x5cf3c7('0x9')]+'%'},_0x46273f;}})}));_0x466309=_[_0x200f11('0x1a')]({},_0x466309,_0x1e38e8[_0x200f11('0x12')]);const _0x5e6846={'where':_0x466309[_0x200f11('0x14')]};return db[_0x200f11('0x36')]['count'](_0x5e6846)['then'](function(_0x3d830e){const _0x45a591=_0x200f11;return _0x3e4eab['count']=_0x3d830e,_0x1e38e8['query'][_0x45a591('0x4')]&&(_0x466309[_0x45a591('0x26')]=[{'all':!![]}]),db['ScreenRecording'][_0x45a591('0x39')](_0x466309);})[_0x200f11('0xb')](function(_0x3d8601){const _0x38b8f7=_0x200f11;return _0x3e4eab[_0x38b8f7('0x5')]=_0x3d8601,_0x3e4eab;})[_0x200f11('0xb')](respondWithFilteredResult(_0x4586eb,_0x466309))[_0x200f11('0x48')](handleError(_0x4586eb,null));},exports[_0x362a35('0x15')]=function(_0x432ebe,_0x2aa2e9){const _0x647a2=_0x362a35;let _0x316094={'raw':![],'where':{'id':_0x432ebe[_0x647a2('0x4a')]['id']}};const _0x5583fd={};return _0x5583fd[_0x647a2('0x50')]=_[_0x647a2('0x4b')](db[_0x647a2('0x36')][_0x647a2('0x1c')]),_0x5583fd['query']=_[_0x647a2('0x4b')](_0x432ebe[_0x647a2('0x2b')]),_0x5583fd[_0x647a2('0x2c')]=_[_0x647a2('0x3')](_0x5583fd[_0x647a2('0x50')],_0x5583fd[_0x647a2('0x2b')]),_0x316094[_0x647a2('0x13')]=_['intersection'](_0x5583fd['model'],qs[_0x647a2('0x10')](_0x432ebe[_0x647a2('0x2b')][_0x647a2('0x10')])),_0x316094[_0x647a2('0x13')]=_0x316094['attributes'][_0x647a2('0x4d')]?_0x316094[_0x647a2('0x13')]:_0x5583fd[_0x647a2('0x50')],_0x432ebe[_0x647a2('0x2b')]['includeAll']&&(_0x316094[_0x647a2('0x26')]=[{'all':!![]}]),_0x316094=_[_0x647a2('0x1a')]({},_0x316094,_0x432ebe[_0x647a2('0x12')]),db[_0x647a2('0x36')][_0x647a2('0x46')](_0x316094)[_0x647a2('0xb')](handleEntityNotFound(_0x2aa2e9,null))[_0x647a2('0xb')](respondWithResult(_0x2aa2e9,null))[_0x647a2('0x48')](handleError(_0x2aa2e9,null));},exports[_0x362a35('0x23')]=function(_0x2c6e49,_0x4612e8){const _0x2b45db=_0x362a35;return db['ScreenRecording']['create'](_0x2c6e49['body'],{})[_0x2b45db('0xb')](respondWithResult(_0x4612e8,0xc9))[_0x2b45db('0x48')](handleError(_0x4612e8,null));},exports[_0x362a35('0x4c')]=function(_0xed0318,_0x19d6b1){const _0x544095=_0x362a35;return _0xed0318[_0x544095('0x28')]['id']&&delete _0xed0318[_0x544095('0x28')]['id'],delete _0xed0318[_0x544095('0x28')][_0x544095('0x34')],delete _0xed0318[_0x544095('0x28')]['createdAt'],delete _0xed0318['body'][_0x544095('0x35')],delete _0xed0318['body'][_0x544095('0x21')],db[_0x544095('0x36')][_0x544095('0x46')]({'where':{'id':_0xed0318[_0x544095('0x4a')]['id']}})['then'](handleEntityNotFound(_0x19d6b1,null))[_0x544095('0xb')](saveUpdates(_0xed0318[_0x544095('0x28')],null))[_0x544095('0xb')](respondWithResult(_0x19d6b1,null))['catch'](handleError(_0x19d6b1,null));},exports[_0x362a35('0x3d')]=function(_0x19f06d,_0x36208a){const _0x3d4f18=_0x362a35;return db[_0x3d4f18('0x36')][_0x3d4f18('0x3d')]()[_0x3d4f18('0xb')](respondWithResult(_0x36208a,null))[_0x3d4f18('0x48')](handleError(_0x36208a,null));},exports[_0x362a35('0x19')]=function(_0x350f6c,_0xeced0e){const _0x32a234=_0x362a35,_0xdd02c1=require(_0x32a234('0x43'));let _0x451bb1=![];const _0x89ea83={};return _0x350f6c[_0x32a234('0x2b')][_0x32a234('0x42')]&&_0x350f6c[_0x32a234('0x2b')][_0x32a234('0x42')]===_0x32a234('0x3e')?_0x89ea83[_0x32a234('0x3e')]=_0x350f6c[_0x32a234('0x4a')]['id']:_0x89ea83['id']=_0x350f6c[_0x32a234('0x4a')]['id'],db[_0x32a234('0x36')][_0x32a234('0x46')]({'where':_0x89ea83,'attributes':['id',_0x32a234('0x21')],'raw':!![]})[_0x32a234('0xb')](handleEntityNotFound(_0xeced0e,null))[_0x32a234('0xb')](function(_0x516fb3){const _0x313be9=_0x32a234;if(_0x516fb3){const _0x3d52e8=path[_0x313be9('0x11')](config['root'],_0x313be9('0x41'),_0x516fb3[_0x313be9('0x21')]),_0x430025=util[_0x313be9('0x44')]('%s.cypher',_0x3d52e8);if(fs[_0x313be9('0x32')](_0x430025))return _0x451bb1=!![],_0xdd02c1[_0x313be9('0x24')](_0x430025,_0x3d52e8,config['secrets']['recording'])['then'](function(){return _0x516fb3;});return _0x516fb3;}})[_0x32a234('0xb')](function(_0x30a40d){const _0x2991b4=_0x32a234;if(_0x30a40d){const _0x552fb5=path[_0x2991b4('0x11')](config[_0x2991b4('0xc')],_0x2991b4('0x41'),_0x30a40d[_0x2991b4('0x21')]);if(!fs[_0x2991b4('0x32')](_0x552fb5))throw new ValidationError(_0x2991b4('0xd'));return _0x30a40d[_0x2991b4('0x1e')]?_0xeced0e[_0x2991b4('0x19')](_0x552fb5,_0x30a40d['filename']+path['extname'](_0x552fb5),function(){const _0xaefc1=_0x2991b4;_0x451bb1&&fs[_0xaefc1('0x22')](_0x552fb5);}):_0xeced0e[_0x2991b4('0x19')](_0x552fb5,function(){const _0x1f6b44=_0x2991b4;_0x451bb1&&fs[_0x1f6b44('0x22')](_0x552fb5);});}})['catch'](function(_0x4f18f4){const _0x28e400=_0x32a234;if(_0x4f18f4[_0x28e400('0xa')]===_0x28e400('0xd'))_0xeced0e['status'](0x194)[_0x28e400('0x7')](_0x28e400('0x0'));else return handleError(_0xeced0e,null);});},exports[_0x362a35('0xf')]=function(_0x4e2926,_0x449e2e){const _0xd1f28d=_0x362a35;return db[_0xd1f28d('0x36')][_0xd1f28d('0x46')]({'where':{'id':_0x4e2926[_0xd1f28d('0x4a')]['id']}})[_0xd1f28d('0xb')](function(_0x4c952e){const _0x114662=_0xd1f28d;if(!_0x4c952e)throw new ReferenceError(_0x114662('0x1d'));return _0x4c952e;})['then'](function(_0x299393){const _0x1d38b1=_0xd1f28d;let _0xec6b33=path[_0x1d38b1('0x11')](config[_0x1d38b1('0xc')],'server/files/screen_recordings',_0x299393[_0x1d38b1('0x21')]);return logger[_0x1d38b1('0x31')](_0x1d38b1('0x18'),_0xec6b33),!_[_0x1d38b1('0x3f')](_0x299393[_0x1d38b1('0x21')])&&fs['existsSync'](_0xec6b33)&&(logger[_0x1d38b1('0x31')](_0x1d38b1('0x20')+_0xec6b33+_0x1d38b1('0x2')),fs[_0x1d38b1('0x8')](_0xec6b33)),_0xec6b33=_0xec6b33+'.cypher',!_['isNil'](_0x299393['value'])&&fs[_0x1d38b1('0x32')](_0xec6b33)&&(logger['info'](_0x1d38b1('0x20')+_0xec6b33+_0x1d38b1('0x2')),fs[_0x1d38b1('0x8')](_0xec6b33)),_0x299393;})[_0xd1f28d('0xb')](function(_0x5942c2){const _0x3ede7d=_0xd1f28d;if(!_0x5942c2)throw new InternalError();return _0x5942c2[_0x3ede7d('0xf')]();})[_0xd1f28d('0xb')](function(){const _0x5c3c3b=_0xd1f28d;_0x449e2e[_0x5c3c3b('0x3b')](0xcc)[_0x5c3c3b('0x3c')]();})[_0xd1f28d('0x48')](handleError(_0x449e2e,null));};
\ No newline at end of file