package com.applovin.impl; import com.applovin.impl.d4; import com.applovin.impl.sdk.utils.JsonUtils; import com.applovin.impl.sdk.utils.StringUtils; import com.applovin.impl.vi; import java.util.Map; import org.json.JSONObject; /* loaded from: classes.dex */ public abstract class in extends yl { public abstract void a(JSONObject jSONObject); public abstract String f(); public abstract int g(); public in(String str, com.applovin.impl.sdk.j jVar) { super(str, jVar); } public class a extends dn { final /* synthetic */ d4.e n; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public a(com.applovin.impl.sdk.network.a aVar, com.applovin.impl.sdk.j jVar, d4.e eVar) { super(aVar, jVar); this.n = eVar; } @Override // com.applovin.impl.dn, com.applovin.impl.d4.e public void a(String str, int i, String str2, JSONObject jSONObject) { this.n.a(str, i, str2, jSONObject); } @Override // com.applovin.impl.dn, com.applovin.impl.d4.e public void a(String str, JSONObject jSONObject, int i) { this.n.a(str, jSONObject, i); } } public JSONObject e() { JSONObject jSONObject = new JSONObject(); String c = this.a.q0().c(); if (((Boolean) this.a.a(sj.S3)).booleanValue() && StringUtils.isValidString(c)) { JsonUtils.putString(jSONObject, "cuid", c); } if (((Boolean) this.a.a(sj.U3)).booleanValue()) { JsonUtils.putString(jSONObject, "compass_random_token", this.a.q()); } if (((Boolean) this.a.a(sj.W3)).booleanValue()) { JsonUtils.putString(jSONObject, "applovin_random_token", this.a.a0()); } a(jSONObject); return jSONObject; } public void a(int i) { e4.a(i, this.a); } public void a(JSONObject jSONObject, d4.e eVar) { Map c = e4.c(this.a); if (((Boolean) this.a.a(sj.I5)).booleanValue() || ((Boolean) this.a.a(sj.B5)).booleanValue()) { JsonUtils.putAll(jSONObject, (Map) c); c = null; } a aVar = new a(com.applovin.impl.sdk.network.a.a(this.a).b(e4.b(f(), this.a)).a(e4.a(f(), this.a)).b(c).a(jSONObject).c("POST").b(((Boolean) this.a.a(sj.R5)).booleanValue()).a((Object) new JSONObject()).a(g()).a(vi.a.a(((Integer) this.a.a(sj.A5)).intValue())).a(), this.a, eVar); aVar.c(sj.N0); aVar.b(sj.O0); this.a.j0().a(aVar); } }