class UserBrollFootage{static ['DEFAULT_SA'+'VE_FILENAM'+'E']='user_broll'+'_footage.j'+'son';constructor(){this['init'](),this['footages']=[],this['version']=-0x1*0x6f8+0x198b*0x1+-0x1*0x1292;}['init'](){const N={'PzfVy':'UserBrollF'+'ootage\x20ini'+'t'};console['log'](N['PzfVy']);}['load'](N){if(!fs['existsSync'](N)){console['log']('No\x20user\x20br'+'oll\x20footag'+'e\x20data\x20fou'+'nd\x20at\x20'+N);return;}try{const l=JSON['parse'](fs['readFileSy'+'nc'](N,'utf8'));this['footages']=l['footages'],this['version']=l['version'];}catch(L){console['error']('Error\x20read'+'ing\x20user\x20b'+'roll\x20foota'+'ge\x20data\x20fr'+'om\x20'+N,L);}}async['analyzeFoo'+'tage'](N){const l=await editai_api['tagVideo'](N['images']);N['tags']=l['tags'],N['descriptio'+'n']=l['descriptio'+'n'];}['renderTabl'+'e'](N=![]){const l={'igRjP':function(L,y,p){return L(y,p);},'esgGh':function(L,y){return L(y);}};l['igRjP'](renderUserBrollFootageTable,this['footages'],N),l['esgGh']($,'#broll-use'+'r-broll-de'+'tect-tags-'+'usage')['text']('Monthly\x20au'+'to-detecti'+'on\x20usage:\x20'+g_user_broll_analysis_count+'/'+g_user_broll_analysis_limit+'\x20videos');}async['ingestFoot'+'age'](N,l){const L={'abUUm':'pending','XqJFx':function(O,P,t,R,Q){return O(P,t,R,Q);},'rMhfG':function(O,P){return O>P;},'axGPw':function(O,P){return O===P;},'GNisU':'analyzing','fRmNc':'Uploading\x20'+'user\x20broll'+'\x20footage\x20d'+'ata\x20after\x20'+'ingestion'},y=this['footages']['map'](O=>O['path']),p=[];let M=!![];L['XqJFx'](ingestUserBrollFootagePaths,N,y,l,O=>{l&&(O['analysisSt'+'atus']=L['abUUm'],p['unshift'](O)),this['footages']['unshift'](O),this['save'](),this['renderTabl'+'e'](!![]);})['then'](()=>{M=![];});while(M||p['length']>-0x21ac+-0x4c7*-0x1+0x1*0x1ce5){if(L['rMhfG'](p['length'],0x99f*0x2+0x5*-0x541+-0x707*-0x1)){const O=p['pop']();L['axGPw'](O['analysisSt'+'atus'],L['abUUm'])&&(O['analysisSt'+'atus']=L['GNisU'],this['renderTabl'+'e'](!![]),await footageAnalysis(O,![]),this['save']());}else await new Promise(P=>setTimeout(P,0x1d*0x78+0x3*-0x192+0x1*-0x4fa));}this['renderTabl'+'e'](![]),this['save']();try{editai_api['uploadFile'+'_v2'](path['join'](DIR_app_data_base,UserBrollFootage['DEFAULT_SA'+'VE_FILENAM'+'E']),L['fRmNc']);}catch(P){console['error'](P,'Uploading\x20'+'user\x20broll'+'\x20footage\x20d'+'ata\x20after\x20'+'ingestion');}}['removeFoot'+'ages'](N){const l={'qEpUX':function(p,M){return p<M;}},L=[];for(let y=0x1b9a+0x1*0xd87+-0x2921*0x1;l['qEpUX'](y,this['footages']['length']);y++){if(N['includes'](y))continue;L['push'](this['footages'][y]);}this['footages']=L,this['save'](),this['renderTabl'+'e'](![]);}['save'](){const N={'hNuJY':'Saving\x20use'+'r\x20broll\x20fo'+'otage','SpQOo':'utf8'};console['log'](N['hNuJY']);const l=path['join'](DIR_app_data_base,UserBrollFootage['DEFAULT_SA'+'VE_FILENAM'+'E']),L=this['getSaveDat'+'a']();fs['writeFileS'+'ync'](l,L,N['SpQOo']),console['log']('Saved\x20capt'+'ions\x20data\x20'+'as\x20'+l);}['getSaveDat'+'a'](){const N=JSON['parse'](JSON['stringify'](this['footages']))['map'](l=>{return delete l['images'],delete l['analysisSt'+'atus'],l;});return JSON['stringify']({'footages':N,'version':0x1});}['getSearchR'+'esultsFrom'+'PickedFoot'+'age'](N,l){const L={'qNzoC':function(O,P){return O===P;},'TgYXJ':function(O,P){return O!==P;},'Ccofw':function(O,P){return O<P;},'RdHdH':'broll_id','tTjWI':function(O,P){return O===P;}},y=N[L['RdHdH']],p=this['footages']['find'](O=>O['id']===y);if(!p)return console['error']('Footage\x20wi'+'th\x20ID\x20'+y+'\x20not\x20found'),null;if(!p['tags']||L['tTjWI'](p['tags']['length'],0x49c+0x5*0x4bd+0x1c4d*-0x1))return{'hits':[p]};const M=this['footages']['filter'](O=>{if(L['qNzoC'](O,p)||!O['tags']||O['tags']['length']===-0xda+-0x173a+0x43*0x5c)return![];if(L['TgYXJ'](O['orientatio'+'n'],p['orientatio'+'n'])&&l)return![];const P=O['tags']['map'](t=>t['value']['toLowerCas'+'e']());for(let t=-0x1b*0x13a+-0x1651+0x376f;L['Ccofw'](t,p['tags']['length']);t++){if(P['includes'](p['tags'][t]['value']['toLowerCas'+'e']()))return!![];}return![];});return{'hits':[p,...M]};}['getFootage'+'ForApi'](N=[]){return g_user_broll_footage['footages']['filter'](l=>l['descriptio'+'n']!=undefined)['filter'](l=>!N['includes'](l['id']))['map'](l=>{return{...l,'images':[]};});}['filterExis'+'tingFiles'](N){const l=this['footages']['map'](L=>path['resolve'](L['path']));return N['map'](L=>path['resolve'](L))['filter'](L=>!l['includes'](L));}}var g_user_broll_footage=new UserBrollFootage(),g_user_broll_analysis_count=-0x879+0x23de+-0x1b65,g_user_broll_analysis_limit=-0x1a4a+-0x2630+0x1*0x40de,g_user_broll_ingest_limit=-0x1ccb+-0x1b1d*0x1+0xe13*0x4;new Promise(()=>{const N={'QuFIe':function(l){return l();}};g_user_broll_footage['load'](path['join'](DIR_app_data_base,UserBrollFootage['DEFAULT_SA'+'VE_FILENAM'+'E'])),N['QuFIe'](setUserBrollFootageListeners);});