2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								function  doLogin ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    localStorage . setItem ( "email" ,  $ ( "#email" ) . val ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    localStorage . setItem ( "password" ,  $ ( "#password" ) . val ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    $ ( "#email, #password" ) . val ( "" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    loginFromLocalStorage ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  loginFromLocalStorage ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    doLoginRequest ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        data  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            if  ( single . getCurrentPath ( )  ==  "/webui/" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                single . loadRoute ( "/webui/inventory" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            $ ( ".displayname" ) . text ( data . DisplayName ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            window . accountId  =  data . id ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            window . authz  =  "accountId="  +  data . id  +  "&nonce="  +  data . Nonce ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            fetchSettings ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            logout ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            alert ( "Login failed" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  doLoginRequest ( succ _cb ,  fail _cb )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    const  req  =  $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        url :  "/api/login.php" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            email :  localStorage . getItem ( "email" ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            password :  wp . encSync ( localStorage . getItem ( "password" ) ,  "hex" ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            time :  parseInt ( new  Date ( )  /  1000 ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            s :  "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==" ,  // signature of some kind
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            lang :  "en" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            date :  1501230947855458660 ,  // ???
 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            ClientType :  "webui" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								            PS :  "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw=="  // anti-cheat data
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    req . done ( succ _cb ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    req . fail ( fail _cb ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  revalidateAuthz ( succ _cb )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  doLoginRequest ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        data  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            window . authz  =  "accountId="  +  data . id  +  "&nonce="  +  data . Nonce ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            succ _cb ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            logout ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            alert ( "Your credentials are no longer valid." ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            single . loadRoute ( "/webui/" ) ;  // Show login screen
 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  logout ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    localStorage . removeItem ( "email" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    localStorage . removeItem ( "password" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if  ( localStorage . getItem ( "email" )  &&  localStorage . getItem ( "password" ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    loginFromLocalStorage ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								single . on ( "route_load" ,  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( event . route . paths [ 0 ]  !=  "/webui/" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // Authorised route?
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( ! localStorage . getItem ( "email" ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            // Not logged in?
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  single . loadRoute ( "/webui/" ) ;  // Show login screen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ ( "body" ) . addClass ( "logged-in" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ ( "body" ) . removeClass ( "logged-in" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( ".nav-link" ) . removeClass ( "active" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  navLink  =  document . querySelector ( ".nav-link[href='"  +  event . route . paths [ 0 ]  +  "']" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( navLink )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        navLink . classList . add ( "active" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								window . itemListPromise  =  new  Promise ( resolve  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  req  =  $ . get ( "/custom/getItemLists" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    req . done ( data  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        const  itemMap  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            // Generics for rivens
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/Tenno/Archwing/Primary/ArchGun" :  {  name :  "Archgun"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/Tenno/Melee/PlayerMeleeWeapon" :  {  name :  "Melee"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/Tenno/Pistol/LotusPistol" :  {  name :  "Pistol"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/Tenno/Rifle/LotusRifle" :  {  name :  "Rifle"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/Tenno/Shotgun/LotusShotgun" :  {  name :  "Shotgun"  } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 03:23:33 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            // Modular weapons
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-18 02:03:07 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimaryBeam" :  {  name :  "Kitgun"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondary" :  {  name :  "Kitgun"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondaryBeam" :  {  name :  "Kitgun"  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondaryShotgun" :  {  name :  "Kitgun"  } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 10:23:52 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            "/Lotus/Weapons/Ostron/Melee/LotusModularWeapon" :  {  name :  "Zaw"  } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            // Missing in data sources
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-10 14:03:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            "/Lotus/Upgrades/CosmeticEnhancers/Peculiars/CyoteMod" :  {  name :  "Traumatic Peculiar"  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        for  ( const  [ type ,  items ]  of  Object . entries ( data ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            if  ( type  !=  "badItems" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                items . forEach ( item  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    if  ( item . uniqueName  in  data . badItems )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        item . name  +=  " (Imposter)" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-20 11:48:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    }  else  if  ( item . uniqueName . substr ( 0 ,  18 )  !=  "/Lotus/Types/Game/" )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        const  option  =  document . createElement ( "option" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        option . setAttribute ( "data-key" ,  item . uniqueName ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        option . value  =  item . name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        document . getElementById ( "datalist-"  +  type ) . appendChild ( option ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    itemMap [ item . uniqueName ]  =  {  ... item ,  type  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        resolve ( itemMap ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  updateInventory ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 12:24:15 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    const  req  =  $ . get ( "/api/inventory.php?"  +  window . authz  +  "&xpBasedLevelCapDisabled=1" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    req . done ( data  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        window . itemListPromise . then ( itemMap  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "warframe-list" ) . innerHTML  =  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data . Suits . forEach ( item  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                const  tr  =  document . createElement ( "tr" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 22:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    td . textContent  =  itemMap [ item . ItemType ] ? . name  ? ?  item . ItemType ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    if  ( item . ItemName )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . textContent  =  item . ItemName  +  " ("  +  td . textContent  +  ")" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    td . classList  =  "text-end" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    if  ( item . XP  <  1_600_000 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . href  =  "#" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 22:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            event . preventDefault ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            addGearExp ( "Suits" ,  item . ItemId . $oid ,  1_600_000  -  item . XP ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        a . title  =  "Make Rank 30" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg> ` ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  name  =  prompt ( "Enter new custom name:" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            renameGear ( "Suits" ,  item . ItemId . $oid ,  name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . title  =  "Rename" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        td . appendChild ( a ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . href  =  "#" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 22:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            event . preventDefault ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            disposeOfGear ( "Suits" ,  item . ItemId . $oid ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        a . title  =  "Remove" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        td . appendChild ( a ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                document . getElementById ( "warframe-list" ) . appendChild ( tr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "weapon-list" ) . innerHTML  =  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            [ "LongGuns" ,  "Pistols" ,  "Melee" ] . forEach ( category  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                data [ category ] . forEach ( item  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  tr  =  document . createElement ( "tr" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 22:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        td . textContent  =  itemMap [ item . ItemType ] ? . name  ? ?  item . ItemType ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        if  ( item . ItemName )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            td . textContent  =  item . ItemName  +  " ("  +  td . textContent  +  ")" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . classList  =  "text-end" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        if  ( item . XP  <  800_000 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 22:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                                addGearExp ( category ,  item . ItemId . $oid ,  800_000  -  item . XP ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Make Rank 30" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg> ` ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                const  name  =  prompt ( "Enter new custom name:" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                renameGear ( category ,  item . ItemId . $oid ,  name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . title  =  "Rename" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-08 22:40:21 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                                disposeOfGear ( category ,  item . ItemId . $oid ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Remove" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    document . getElementById ( "weapon-list" ) . appendChild ( tr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "riven-list" ) . innerHTML  =  "" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            document . getElementById ( "mods-list" ) . innerHTML  =  "" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            data . Upgrades . forEach ( item  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                if  ( item . ItemType . substr ( 0 ,  32 )  ==  "/Lotus/Upgrades/Mods/Randomized/" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  rivenType  =  item . ItemType . substr ( 32 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  fingerprint  =  JSON . parse ( item . UpgradeFingerprint ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  tr  =  document . createElement ( "tr" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        td . textContent  =  itemMap [ fingerprint . compat ] ? . name  ? ?  fingerprint . compat ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        td . textContent  +=  " "  +  RivenParser . parseRiven ( rivenType ,  fingerprint ,  1 ) . name ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . innerHTML  +=  " <span title='Number of buffs'>▲ "  +  fingerprint . buffs . length  +  "</span>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . innerHTML  +=  " <span title='Number of curses'>▼ "  +  fingerprint . curses . length  +  "</span>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . innerHTML  += 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            " <span title='Number of rerolls'>⟳ "  +  parseInt ( fingerprint . rerolls )  +  "</span>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . classList  =  "text-end" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  = 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 17:19:51 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                                "riven-tool/#"  + 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                                encodeURIComponent ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                    JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                        rivenType :  rivenType , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                        omegaAttenuation :  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                        fingerprint :  fingerprint 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . target  =  "_blank" ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "View Stats" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80zM0 272c0-26.5 21.5-48 48-48H80c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V272zM368 96h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H368c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                disposeOfGear ( "Upgrades" ,  item . ItemId . $oid ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Remove" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    document . getElementById ( "riven-list" ) . appendChild ( tr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  tr  =  document . createElement ( "tr" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  rank  =  parseInt ( JSON . parse ( item . UpgradeFingerprint ) . lvl ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  maxRank  =  itemMap [ item . ItemType ] ? . fusionLimit  ? ?  5 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . textContent  =  itemMap [ item . ItemType ] ? . name  ? ?  item . ItemType ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . innerHTML  +=  " <span title='Rank'>★ "  +  rank  +  "/"  +  maxRank  +  "</span>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . classList  =  "text-end" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        if  ( rank  <  maxRank )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                setFingerprint ( item . ItemType ,  item . ItemId ,  {  lvl :  maxRank  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Max Rank" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                disposeOfGear ( "Upgrades" ,  item . ItemId . $oid ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Remove" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    document . getElementById ( "mods-list" ) . appendChild ( tr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data . RawUpgrades . forEach ( item  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                if  ( item . ItemCount  >  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  maxRank  =  itemMap [ item . ItemType ] ? . fusionLimit  ? ?  5 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    const  tr  =  document . createElement ( "tr" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . textContent  =  itemMap [ item . ItemType ] ? . name  ? ?  item . ItemType ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . innerHTML  +=  " <span title='Rank'>★ 0/"  +  maxRank  +  "</span>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        if  ( item . ItemCount  >  1 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            td . innerHTML  +=  " <span title='Count'>🗍 "  +  parseInt ( item . ItemCount )  +  "</span>" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        const  td  =  document . createElement ( "td" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        td . classList  =  "text-end" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                setFingerprint ( item . ItemType ,  item . LastAdded ,  {  lvl :  maxRank  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Max Rank" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            const  a  =  document . createElement ( "a" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . href  =  "#" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . onclick  =  function  ( event )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                event . preventDefault ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                disposeOfItems ( "Upgrades" ,  item . ItemType ,  item . ItemCount ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            a . title  =  "Remove" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            a . innerHTML  =  ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg> ` ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            td . appendChild ( a ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        tr . appendChild ( td ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    document . getElementById ( "mods-list" ) . appendChild ( tr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								function  getKey ( input )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  document 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . getElementById ( input . getAttribute ( "list" ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . querySelector ( "[value='"  +  input . value . split ( "'" ) . join ( "\\'" )  +  "']" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ? . getAttribute ( "data-key" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  doAcquireWarframe ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  uniqueName  =  getKey ( document . getElementById ( "warframe-to-acquire" ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! uniqueName )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $ ( "#warframe-to-acquire" ) . addClass ( "is-invalid" ) . focus ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        const  req  =  $ . post ( { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-30 13:32:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            url :  "/custom/addItem?"  +  window . authz , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            contentType :  "application/json" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                type :  "Powersuit" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-30 13:32:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                internalName :  uniqueName 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        req . done ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "warframe-to-acquire" ) . value  =  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$ ( "#warframe-to-acquire" ) . on ( "input" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#warframe-to-acquire" ) . removeClass ( "is-invalid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  doAcquireWeapon ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  uniqueName  =  getKey ( document . getElementById ( "weapon-to-acquire" ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! uniqueName )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $ ( "#weapon-to-acquire" ) . addClass ( "is-invalid" ) . focus ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        const  req  =  $ . post ( { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-30 13:32:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            url :  "/custom/addItem?"  +  window . authz , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            contentType :  "application/json" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                type :  "Weapon" , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-30 13:32:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                internalName :  uniqueName 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        req . done ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "weapon-to-acquire" ) . value  =  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-04 14:44:23 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$ ( "#weapon-to-acquire" ) . on ( "input" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#weapon-to-acquire" ) . removeClass ( "is-invalid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  addGearExp ( category ,  oid ,  xp )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-09 22:34:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    const  data  =  { } ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    data [ category ]  =  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            ItemId :  {  $oid :  oid  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            XP :  xp 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/missionInventoryUpdate.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( data ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 15:14:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 21:49:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  renameGear ( category ,  oid ,  name )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/nameWeapon.php?"  +  window . authz  +  "&Category="  +  category  +  "&ItemId="  +  oid  +  "&webui=1" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                ItemName :  name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  disposeOfGear ( category ,  oid )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  data  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        SellCurrency :  "SC_RegularCredits" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        SellPrice :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        Items :  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    data . Items [ category ]  =  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            String :  oid , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            Count :  0 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/sell.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( data ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-06 21:49:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-09 22:34:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  disposeOfItems ( category ,  type ,  count )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  data  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        SellCurrency :  "SC_RegularCredits" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        SellPrice :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        Items :  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    data . Items [ category ]  =  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            String :  type , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            Count :  count 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/sell.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( data ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-09 22:34:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  doAcquireMiscItems ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-20 21:22:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    const  data  =  getKey ( document . getElementById ( "miscitem-type" ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! data )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-09 22:34:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        $ ( "#miscitem-type" ) . addClass ( "is-invalid" ) . focus ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-20 21:22:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    const  [ category ,  uniqueName ]  =  data . split ( ":" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/missionInventoryUpdate.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-20 21:22:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                [ category ] :  [ 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        ItemType :  uniqueName , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-18 02:03:07 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        ItemCount :  parseInt ( $ ( "#miscitem-count" ) . val ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            alert ( "Successfully added." ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-09 22:34:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-20 21:22:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ ( "#miscitem-type" ) . on ( "input" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#miscitem-type" ) . removeClass ( "is-invalid" ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-09 22:34:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  doAcquireRiven ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    let  fingerprint ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    try  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        fingerprint  =  JSON . parse ( $ ( "#addriven-fingerprint" ) . val ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( typeof  fingerprint  !==  "object" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            fingerprint  =  JSON . parse ( fingerprint ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    }  catch  ( e )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        typeof  fingerprint  !==  "object"  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ! ( "compat"  in  fingerprint )  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ! ( "pol"  in  fingerprint )  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ! ( "buffs"  in  fingerprint ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ ( "#addriven-fingerprint" ) . addClass ( "is-invalid" ) . focus ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  uniqueName  =  "/Lotus/Upgrades/Mods/Randomized/"  +  $ ( "#addriven-type" ) . val ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // Add riven type to inventory
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/missionInventoryUpdate.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                RawUpgrades :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        ItemType :  uniqueName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        ItemCount :  1 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            // Get riven's assigned id
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-16 12:24:15 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            $ . get ( "/api/inventory.php?"  +  window . authz  +  "&xpBasedLevelCapDisabled=1" ) . done ( data  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                for  ( const  rawUpgrade  of  data . RawUpgrades )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    if  ( rawUpgrade . ItemType  ===  uniqueName )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        // Add fingerprint to riven
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            url :  "/api/artifacts.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                Upgrade :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                    ItemType :  uniqueName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                    UpgradeFingerprint :  JSON . stringify ( fingerprint ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                    ItemId :  rawUpgrade . LastAdded 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                LevelDiff :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                Cost :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                FusionPointCost :  0 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 23:03:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            $ ( "#addriven-fingerprint" ) . val ( "" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            updateInventory ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 16:19:41 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-28 13:28:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$ ( "#addriven-fingerprint" ) . on ( "input" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#addriven-fingerprint" ) . removeClass ( "is-invalid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-01 12:57:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  setFingerprint ( ItemType ,  ItemId ,  fingerprint )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/artifacts.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                Upgrade :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    ItemType , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    ItemId , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    UpgradeFingerprint :  JSON . stringify ( fingerprint ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                LevelDiff :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                Cost :  0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                FusionPointCost :  0 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  doAcquireMod ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    const  uniqueName  =  getKey ( document . getElementById ( "mod-to-acquire" ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! uniqueName )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ ( "#mod-to-acquire" ) . addClass ( "is-invalid" ) . focus ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/missionInventoryUpdate.php?"  +  window . authz , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                RawUpgrades :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        ItemType :  uniqueName , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        ItemCount :  1 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "mod-to-acquire" ) . value  =  "" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            updateInventory ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$ ( "#mod-to-acquire" ) . on ( "input" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#mod-to-acquire" ) . removeClass ( "is-invalid" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  fetchSettings ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    fetch ( "/custom/config" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( response  =>  response . json ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( json  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            Object . entries ( json ) . forEach ( entry  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                const  [ key ,  value ]  =  entry ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                var  x  =  document . getElementById ( ` ${ key } ` ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                if  ( x  !=  null )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    if  ( x . type  ==  "checkbox" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        if  ( value  ===  true )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                            x . setAttribute ( "checked" ,  "checked" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    }  else  if  ( x . type  ==  "number" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        x . setAttribute ( "value" ,  ` ${ value } ` ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 13:50:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								const  uiConfigs  =  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "autoCreateAccount" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "skipStoryModeChoice" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "skipTutorial" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllScans" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllMissions" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllQuests" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "completeAllQuests" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "infiniteResources" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllShipFeatures" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllShipDecorations" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllFlavourItems" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "unlockAllSkins" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "universalPolarityEverywhere" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "spoofMasteryRank" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								function  doChangeSettings ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    fetch ( "/custom/config" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( response  =>  response . json ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( json  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 13:50:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            for  ( const  i  of  uiConfigs )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                var  x  =  document . getElementById ( i ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                if  ( x  !=  null )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    if  ( x . type  ==  "checkbox" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        if  ( x . checked  ===  true )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            json [ i ]  =  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                            json [ i ]  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    }  else  if  ( x . type  ==  "number" )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        json [ i ]  =  parseInt ( x . value ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-15 00:38:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                url :  "/custom/config" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                data :  JSON . stringify ( json ,  null ,  2 ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-14 22:38:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-27 23:08:59 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								// Cheats route
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								fetch ( "http://localhost:61558/ping" ,  {  mode :  "no-cors"  } ) . then ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#client-cheats-nok" ) . addClass ( "d-none" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ ( "#client-cheats-ok" ) . removeClass ( "d-none" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    fetch ( "http://localhost:61558/skip_mission_start_timer" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( res  =>  res . text ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( res  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "skip_mission_start_timer" ) . checked  =  res  ==  "1" ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    document . getElementById ( "skip_mission_start_timer" ) . onchange  =  function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        fetch ( "http://localhost:61558/skip_mission_start_timer?"  +  this . checked ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    fetch ( "http://localhost:61558/fov_override" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( res  =>  res . text ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . then ( res  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            document . getElementById ( "fov_override" ) . value  =  parseFloat ( res )  *  10000 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    document . getElementById ( "fov_override" ) . oninput  =  function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        fetch ( "http://localhost:61558/fov_override?"  +  this . value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  doUnlockAllFocusSchools ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    revalidateAuthz ( ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . get ( "/api/inventory.php?"  +  window . authz  +  "&xpBasedLevelCapDisabled=1" ) . done ( async  data  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            const  missingFocusUpgrades  =  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                "/Lotus/Upgrades/Focus/Attack/AttackFocusAbility" :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                "/Lotus/Upgrades/Focus/Tactic/TacticFocusAbility" :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                "/Lotus/Upgrades/Focus/Ward/WardFocusAbility" :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                "/Lotus/Upgrades/Focus/Defense/DefenseFocusAbility" :  true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                "/Lotus/Upgrades/Focus/Power/PowerFocusAbility" :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            if  ( data . FocusUpgrades )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                for  ( const  focusUpgrade  of  data . FocusUpgrades )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    if  ( focusUpgrade . ItemType  in  missingFocusUpgrades )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        delete  missingFocusUpgrades [ focusUpgrade . ItemType ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            for  ( const  upgradeType  of  Object . keys ( missingFocusUpgrades ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                await  unlockFocusSchool ( upgradeType ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            if  ( Object . keys ( missingFocusUpgrades ) . length  ==  0 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                alert ( "All focus schools are already unlocked." ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                alert ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    "Unlocked "  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        Object . keys ( missingFocusUpgrades ) . length  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        " new focus schools! An inventory update will be needed for the changes to be reflected in-game. Visiting the navigation should be the easiest way to trigger that." 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								function  unlockFocusSchool ( upgradeType )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  new  Promise ( resolve  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // Deselect current FocusAbility so we will be able to unlock the way for free
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            url :  "/api/focus.php?"  +  window . authz  +  "&op=5" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            data :  "{}" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            // Unlock the way now
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            $ . post ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                url :  "/api/focus.php?"  +  window . authz  +  "&op=2" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                contentType :  "text/plain" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                data :  JSON . stringify ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    FocusType :  upgradeType 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) . done ( function  ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                resolve ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}