Proxy Master v3.4.9版本的 MD5 值为:14d0aa2468d13530c8f6e96bcc114bf5
以下内容为反编译后的 h.java 源代码,内容仅作参考
package c7;
import android.text.TextUtils;
import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.extractor.ts.PsExtractor;
import com.google.android.gms.common.internal.ImagesContract;
import com.google.common.net.HttpHeaders;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.ktx.Firebase;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.google.firebase.remoteconfig.ktx.RemoteConfigKt;
import com.hotspot.vpn.base.R$xml;
import com.hotspot.vpn.tls.TlsPlusManager;
import df.n;
import gc.p;
import java.io.Closeable;
import java.net.Proxy;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.a0;
import kotlin.jvm.internal.m;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import org.json.JSONArray;
import org.json.JSONObject;
import q7.a;
import sb.l;
import sb.x;
import ye.d0;
import ye.e0;
import ye.g0;
import ye.m0;
import ye.r0;
public final class h {
public static boolean f4699b;
public static boolean f4700c;
public static boolean f4701d;
public static final OkHttpClient f4703f;
public static gc.a<x> f4704g;
public static long f4705h;
public static String f4706i;
public static final h f4698a = new h();
public static final OkHttpClient f4702e = s7.a.g();
public static final class a extends m implements gc.a<x> {
public static final a f4707d = new a();
public a() {
super(0);
}
@Override
public final x invoke() {
return x.f31049a;
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1", f = "LoadRuDataManager.kt", l = {}, m = "invokeSuspend")
public static final class b extends yb.i implements p<d0, wb.d<? super x>, Object> {
public Object f4708b;
public final boolean f4709c;
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1$1", f = "LoadRuDataManager.kt", l = {176}, m = "invokeSuspend")
public static final class a extends yb.i implements p<d0, wb.d<? super x>, Object> {
public int f4710b;
public Object f4711c;
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1$1$1", f = "LoadRuDataManager.kt", l = {}, m = "invokeSuspend")
public static final class C0074a extends yb.i implements p<d0, wb.d<? super List<? extends String>>, Object> {
public C0074a(wb.d<? super C0074a> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new C0074a(dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super List<? extends String>> dVar) {
return new C0074a(dVar).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
Closeable closeable;
Response response;
Closeable closeable2;
int code;
xb.a aVar = xb.a.f36594b;
l.b(obj);
h hVar = h.f4698a;
OkHttpClient okHttpClient = h.f4703f;
kotlin.jvm.internal.k.d(okHttpClient, "access$getInstantOkHttpClient$p(...)");
hVar.getClass();
ArrayList arrayList = new ArrayList();
long currentTimeMillis = System.currentTimeMillis();
a.C0288a.e("req_start_tele", "https://telegra.ph/SuperApp-12-13");
g0.Y("dm async tele start = ".concat("https://telegra.ph/SuperApp-12-13"), new Object[0]);
try {
try {
Request.Builder removeHeader = new Request.Builder().removeHeader(HttpHeaders.USER_AGENT);
String i10 = s7.a.i();
kotlin.jvm.internal.k.d(i10, "getUserAgent(...)");
response = okHttpClient.newCall(removeHeader.addHeader(HttpHeaders.USER_AGENT, i10).addHeader("accept-encoding", "gzip, deflate, br").addHeader("accept-language", "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7").addHeader("x-requested-with", "com.android.chrome").url("https://telegra.ph/SuperApp-12-13").build()).execute();
try {
code = response.code();
g0.Y("dm async tele response code = " + code, new Object[0]);
} catch (Exception e10) {
e = e10;
g0.H("dm async tele exp = " + g0.U(e), new Object[0]);
a.C0288a.d("req_fail_tele", "https://telegra.ph/SuperApp-12-13", false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, e.getMessage());
ad.h.M(response);
return arrayList;
}
} catch (Throwable th) {
th = th;
closeable = closeable2;
ad.h.M(closeable);
throw th;
}
} catch (Exception e11) {
e = e11;
response = null;
} catch (Throwable th2) {
th = th2;
closeable = null;
ad.h.M(closeable);
throw th;
}
if (code >= 400) {
throw new RuntimeException("dm async tele response code error = " + code);
}
ResponseBody body = response.body();
String F = body != null ? g0.F(body.bytes()) : null;
if (TextUtils.isEmpty(F)) {
throw new RuntimeException("dm async tele response body is empty");
}
t7.a a8 = w7.a.a(F);
if (a8 == null || a8.f34878a.isEmpty() || a8.f34879b.isEmpty()) {
throw new RuntimeException("dm async tele response body invalid");
}
s7.a.k(a8.f34878a);
s7.a.m(a8.f34879b);
List<String> domainList = a8.f34878a;
kotlin.jvm.internal.k.d(domainList, "domainList");
arrayList.addAll(domainList);
s7.a.l(a8.f34879b.get(0));
if (!h.f4700c) {
h.f4700c = true;
h.e();
}
List<String> domainList2 = a8.f34878a;
kotlin.jvm.internal.k.d(domainList2, "domainList");
List<String> pathList = a8.f34879b;
kotlin.jvm.internal.k.d(pathList, "pathList");
a.C0288a.c("req_success_tele", "https://telegra.ph/SuperApp-12-13", (System.currentTimeMillis() - currentTimeMillis) / 1000.0d, code, domainList2, pathList);
ad.h.M(response);
return arrayList;
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1$1$2", f = "LoadRuDataManager.kt", l = {}, m = "invokeSuspend")
public static final class C0075b extends yb.i implements p<d0, wb.d<? super List<? extends String>>, Object> {
public C0075b(wb.d<? super C0075b> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new C0075b(dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super List<? extends String>> dVar) {
return new C0075b(dVar).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
Response response;
Response response2;
Response response3;
int code;
xb.a aVar = xb.a.f36594b;
l.b(obj);
h hVar = h.f4698a;
OkHttpClient okHttpClient = h.f4703f;
kotlin.jvm.internal.k.d(okHttpClient, "access$getInstantOkHttpClient$p(...)");
hVar.getClass();
ArrayList arrayList = new ArrayList();
long currentTimeMillis = System.currentTimeMillis();
a.C0288a.e("req_start_gsite", "https://sites.google.com/view/fastunlimitedpolicy/home");
g0.Y("dm async gs start = https://sites.google.com/view/fastunlimitedpolicy/home", new Object[0]);
try {
Request.Builder removeHeader = new Request.Builder().removeHeader(HttpHeaders.USER_AGENT);
String i10 = s7.a.i();
kotlin.jvm.internal.k.d(i10, "getUserAgent(...)");
response3 = okHttpClient.newCall(removeHeader.addHeader(HttpHeaders.USER_AGENT, i10).addHeader("accept-encoding", "gzip, deflate, br").addHeader("accept-language", "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7").addHeader("x-requested-with", "com.android.chrome").url("https://sites.google.com/view/fastunlimitedpolicy/home").build()).execute();
} catch (Exception e10) {
e = e10;
response2 = null;
} catch (Throwable th) {
th = th;
response = null;
ad.h.M(response);
throw th;
}
try {
code = response3.code();
g0.Y("dm async gs response code = " + code, new Object[0]);
} catch (Exception e11) {
e = e11;
response2 = response3;
try {
g0.H("dm async gs exp = " + g0.U(e), new Object[0]);
a.C0288a.d("req_fail_gsite", "https://sites.google.com/view/fastunlimitedpolicy/home", false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, e.getMessage());
ad.h.M(response2);
return arrayList;
} catch (Throwable th2) {
th = th2;
response3 = response2;
response = response3;
ad.h.M(response);
throw th;
}
} catch (Throwable th3) {
th = th3;
response = response3;
ad.h.M(response);
throw th;
}
if (code >= 400) {
throw new RuntimeException("dm async gs response code error = " + code);
}
ResponseBody body = response3.body();
String F = body != null ? g0.F(body.bytes()) : null;
if (TextUtils.isEmpty(F)) {
throw new RuntimeException("dm async gs response body is empty");
}
t7.a h12 = ad.h.h1(F);
if (h12 == null || h12.f34878a.isEmpty() || h12.f34879b.isEmpty()) {
throw new RuntimeException("dm async gs response body invalid");
}
s7.a.k(h12.f34878a);
s7.a.m(h12.f34879b);
List<String> domainList = h12.f34878a;
kotlin.jvm.internal.k.d(domainList, "domainList");
arrayList.addAll(domainList);
s7.a.l(h12.f34879b.get(0));
if (!h.f4700c) {
h.f4700c = true;
h.e();
}
List<String> domainList2 = h12.f34878a;
kotlin.jvm.internal.k.d(domainList2, "domainList");
List<String> pathList = h12.f34879b;
kotlin.jvm.internal.k.d(pathList, "pathList");
a.C0288a.c("req_success_gsite", "https://sites.google.com/view/fastunlimitedpolicy/home", (System.currentTimeMillis() - currentTimeMillis) / 1000.0d, code, domainList2, pathList);
ad.h.M(response3);
return arrayList;
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1$1$3", f = "LoadRuDataManager.kt", l = {169}, m = "invokeSuspend")
public static final class c extends yb.i implements p<d0, wb.d<? super List<? extends String>>, Object> {
public int f4712b;
public c(wb.d<? super c> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new c(dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super List<? extends String>> dVar) {
return new c(dVar).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
int i10 = this.f4712b;
if (i10 == 0) {
l.b(obj);
this.f4712b = 1;
if (m0.a(ExoPlayer.DEFAULT_DETACH_SURFACE_TIMEOUT_MS, this) == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
l.b(obj);
}
h.f4698a.getClass();
ArrayList arrayList = new ArrayList();
if (!h.f4700c) {
long currentTimeMillis = System.currentTimeMillis();
a.C0288a.e("req_start_game", "https://gameanalytics.com");
try {
f5.c cVar = f5.c.S;
if (!cVar.f22527f) {
throw new RuntimeException("dm async ga rc not ready");
}
String optString = cVar.f22526e.optString("http_bak_config", null);
kotlin.jvm.internal.k.d(optString, "getRemoteConfigsValueAsString(...)");
if (TextUtils.isEmpty(optString)) {
throw new RuntimeException("dm async ga rc response body is empty");
}
g0.Y("dm async ga rc res = ".concat(optString), new Object[0]);
t7.a l02 = g0.l0(optString);
if (l02 == null || l02.f34878a.isEmpty() || l02.f34879b.isEmpty()) {
throw new RuntimeException("dm async ga rc response body invalid");
}
s7.a.k(l02.f34878a);
s7.a.m(l02.f34879b);
List<String> domainList = l02.f34878a;
kotlin.jvm.internal.k.d(domainList, "domainList");
arrayList.addAll(domainList);
s7.a.l(l02.f34879b.get(0));
if (!h.f4700c) {
h.f4700c = true;
h.e();
}
List<String> domainList2 = l02.f34878a;
kotlin.jvm.internal.k.d(domainList2, "domainList");
List<String> pathList = l02.f34879b;
kotlin.jvm.internal.k.d(pathList, "pathList");
a.C0288a.c("req_success_game", "https://gameanalytics.com", (System.currentTimeMillis() - currentTimeMillis) / 1000.0d, 0, domainList2, pathList);
} catch (Exception e10) {
SimpleDateFormat simpleDateFormat = n7.e.f28649f;
ArrayList arrayList2 = y7.b.f36938a;
y7.b.d(g0.U(e10));
a.C0288a.d("req_fail_game", "https://gameanalytics.com", false, (System.currentTimeMillis() - currentTimeMillis) / 1000.0d, -1, e10.getMessage());
}
}
return arrayList;
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1$1$4", f = "LoadRuDataManager.kt", l = {173, 174}, m = "invokeSuspend")
public static final class d extends yb.i implements p<d0, wb.d<? super List<? extends String>>, Object> {
public int f4713b;
public d(wb.d<? super d> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new d(dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super List<? extends String>> dVar) {
return new d(dVar).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
int i10 = this.f4713b;
if (i10 == 0) {
l.b(obj);
this.f4713b = 1;
if (m0.a(4000L, this) == aVar) {
return aVar;
}
} else if (i10 != 1) {
if (i10 != 2) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
l.b(obj);
} else {
l.b(obj);
}
h hVar = h.f4698a;
this.f4713b = 2;
obj = h.b(hVar, this);
return obj == aVar ? aVar : obj;
}
}
public a(wb.d<? super a> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
a aVar = new a(dVar);
aVar.f4711c = obj;
return aVar;
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super x> dVar) {
return ((a) create(d0Var, dVar)).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
int i10 = this.f4710b;
if (i10 == 0) {
l.b(obj);
d0 d0Var = (d0) this.f4711c;
ArrayList arrayList = new ArrayList();
arrayList.add(ad.h.y(d0Var, new C0074a(null)));
arrayList.add(ad.h.y(d0Var, new C0075b(null)));
arrayList.add(ad.h.y(d0Var, new c(null)));
arrayList.add(ad.h.y(d0Var, new d(null)));
this.f4710b = 1;
obj = ad.h.z(arrayList, this);
if (obj == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
l.b(obj);
}
List<List> list = (List) obj;
a0 a0Var = new a0();
for (List list2 : list) {
if (!list2.isEmpty()) {
a0Var.f27598b = true;
}
}
g0.Y("dm bak async success = " + h.f4700c + ", ever = " + a0Var.f27598b + ", result = " + list, new Object[0]);
if (!a0Var.f27598b) {
g.a().b("", Boolean.FALSE);
h.f4698a.getClass();
h.c();
}
h.f4701d = false;
return x.f31049a;
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestBakConfig$1$2", f = "LoadRuDataManager.kt", l = {PsExtractor.AUDIO_STREAM}, m = "invokeSuspend")
public static final class C0076b extends yb.i implements p<d0, wb.d<? super x>, Object> {
public int f4714b;
public C0076b(wb.d<? super C0076b> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new C0076b(dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super x> dVar) {
return new C0076b(dVar).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
int i10 = this.f4714b;
if (i10 == 0) {
l.b(obj);
this.f4714b = 1;
if (m0.a(4000L, this) == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
l.b(obj);
}
g0.Y("dm bak delay start loading, has request success = " + h.f4699b, new Object[0]);
if (!h.f4699b) {
h.f4698a.getClass();
h.e();
}
return x.f31049a;
}
}
public b(boolean z6, wb.d<? super b> dVar) {
super(2, dVar);
this.f4709c = z6;
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
b bVar = new b(this.f4709c, dVar);
bVar.f4708b = obj;
return bVar;
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super x> dVar) {
return ((b) create(d0Var, dVar)).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
l.b(obj);
d0 d0Var = (d0) this.f4708b;
ef.b bVar = r0.f37280b;
ad.h.X0(d0Var, bVar, null, new a(null), 2);
if (this.f4709c) {
ad.h.X0(d0Var, bVar, null, new C0076b(null), 2);
}
return x.f31049a;
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestDomainAsync$1", f = "LoadRuDataManager.kt", l = {224}, m = "invokeSuspend")
public static final class c extends yb.i implements p<d0, wb.d<? super x>, Object> {
public int f4715b;
public Object f4716c;
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestDomainAsync$1$1$1", f = "LoadRuDataManager.kt", l = {}, m = "invokeSuspend")
public static final class a extends yb.i implements p<d0, wb.d<? super d7.a>, Object> {
public final x7.a f4717b;
public a(x7.a aVar, wb.d<? super a> dVar) {
super(2, dVar);
this.f4717b = aVar;
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new a(this.f4717b, dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super d7.a> dVar) {
return ((a) create(d0Var, dVar)).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
l.b(obj);
h hVar = h.f4698a;
x7.a apiBean = this.f4717b;
kotlin.jvm.internal.k.d(apiBean, "$apiBean");
return h.a(hVar, apiBean);
}
}
@yb.e(c = "com.hotspot.vpn.allconnect.http.LoadRuDataManager$requestDomainAsync$1$2$1", f = "LoadRuDataManager.kt", l = {220}, m = "invokeSuspend")
public static final class b extends yb.i implements p<d0, wb.d<? super d7.a>, Object> {
public int f4718b;
public final x7.a f4719c;
public b(x7.a aVar, wb.d<? super b> dVar) {
super(2, dVar);
this.f4719c = aVar;
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
return new b(this.f4719c, dVar);
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super d7.a> dVar) {
return ((b) create(d0Var, dVar)).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
xb.a aVar = xb.a.f36594b;
int i10 = this.f4718b;
if (i10 == 0) {
l.b(obj);
this.f4718b = 1;
if (m0.a(ExoPlayer.DEFAULT_DETACH_SURFACE_TIMEOUT_MS, this) == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
l.b(obj);
}
h hVar = h.f4698a;
x7.a it = this.f4719c;
kotlin.jvm.internal.k.d(it, "$it");
return h.a(hVar, it);
}
}
public c(wb.d<? super c> dVar) {
super(2, dVar);
}
@Override
public final wb.d<x> create(Object obj, wb.d<?> dVar) {
c cVar = new c(dVar);
cVar.f4716c = obj;
return cVar;
}
@Override
public final Object invoke(d0 d0Var, wb.d<? super x> dVar) {
return ((c) create(d0Var, dVar)).invokeSuspend(x.f31049a);
}
@Override
public final Object invokeSuspend(Object obj) {
List list;
xb.a aVar = xb.a.f36594b;
int i10 = this.f4715b;
if (i10 == 0) {
l.b(obj);
d0 d0Var = (d0) this.f4716c;
ArrayList z6 = a.b.z(n7.e.o());
g0.Y("dm domain async api list = " + z6, new Object[0]);
ArrayList arrayList = new ArrayList();
Iterator it = z6.iterator();
int i11 = 0;
while (it.hasNext()) {
Object next = it.next();
int i12 = i11 + 1;
if (i11 < 0) {
ad.h.F1();
throw null;
}
arrayList.add(ad.h.y(d0Var, new a((x7.a) next, null)));
i11 = i12;
}
n7.e.o();
Iterator it2 = a.b.y().iterator();
while (it2.hasNext()) {
arrayList.add(ad.h.y(d0Var, new b((x7.a) it2.next(), null)));
}
this.f4715b = 1;
obj = ad.h.z(arrayList, this);
if (obj == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
l.b(obj);
}
h hVar = h.f4698a;
a0 a0Var = new a0();
for (d7.a aVar2 : (List) obj) {
if (aVar2.f21570b) {
a0Var.f27598b = true;
}
}
g0.Y("dm domain has success = " + h.f4699b + ", ever = " + a0Var.f27598b + ", result = " + list.size(), new Object[0]);
if (!a0Var.f27598b) {
g.a().b("", Boolean.FALSE);
h.f4698a.getClass();
h.c();
}
return x.f31049a;
}
}
static {
if (s7.a.f30986a == null) {
s7.a.f30986a = new OkHttpClient.Builder().callTimeout(10L, TimeUnit.SECONDS).proxy(Proxy.NO_PROXY).build();
}
f4703f = s7.a.f30986a;
f4704g = a.f4707d;
f4706i = "";
}
public static final d7.a a(h hVar, x7.a aVar) {
Closeable closeable;
?? r12;
Closeable closeable2;
?? code;
String string;
String f10;
x7.a aVar2 = aVar;
hVar.getClass();
?? r42 = "dm async start load url = ";
boolean z6 = f4699b;
String str = aVar2.f36573a;
String str2 = aVar2.f36574b;
int i10 = 0;
if (z6) {
g0.Y("dm async abort, url = " + str, new Object[0]);
kotlin.jvm.internal.k.d(str2, "getApi(...)");
return new d7.a(str2, false, 0, "");
}
d7.a aVar3 = new d7.a(0);
long currentTimeMillis = System.currentTimeMillis();
kotlin.jvm.internal.k.d(str2, "getApi(...)");
a.C0288a.e("req_domain_start", str2);
String str3 = null;
try {
try {
g0.Y("dm async start load url = " + str, new Object[0]);
Request.Builder removeHeader = new Request.Builder().removeHeader(HttpHeaders.USER_AGENT);
String i11 = s7.a.i();
kotlin.jvm.internal.k.d(i11, "getUserAgent(...)");
Request.Builder addHeader = removeHeader.addHeader(HttpHeaders.USER_AGENT, i11);
kotlin.jvm.internal.k.d(str, "getUrl(...)");
r42 = f4702e.newCall(addHeader.url(str).build()).execute();
try {
try {
code = r42.code();
try {
aVar3.f21571c = code;
aVar3.f21570b = r42.isSuccessful();
aVar3.f21569a = str2;
g0.Y("dm async api = " + str + ", success = " + r42.isSuccessful() + ", response code = " + code, new Object[0]);
try {
} catch (Exception e10) {
e = e10;
r12 = aVar2;
closeable2 = r42;
e.printStackTrace();
g0.H("dm async api = " + str2 + " exp, res string = " + str3, new Object[0]);
g0.H("dm async api = " + str2 + " exp = " + g0.U(e), new Object[0]);
g0.d0(r12, str2, e.getMessage());
a.C0288a.d("req_domain_fail", str2, false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, "timeout");
Closeable[] closeableArr = new Closeable[i10];
closeableArr[0] = closeable2;
ad.h.M(closeableArr);
return aVar3;
}
} catch (Exception e11) {
e = e11;
aVar2 = code;
i10 = 1;
}
} catch (Throwable th) {
th = th;
i10 = 1;
str3 = r42;
?? r13 = new Closeable[i10];
r13[0] = str3;
ad.h.M(r13);
throw th;
}
} catch (Exception e12) {
e = e12;
i10 = 1;
closeable = r42;
r12 = -1;
closeable2 = closeable;
e.printStackTrace();
g0.H("dm async api = " + str2 + " exp, res string = " + str3, new Object[0]);
g0.H("dm async api = " + str2 + " exp = " + g0.U(e), new Object[0]);
g0.d0(r12, str2, e.getMessage());
a.C0288a.d("req_domain_fail", str2, false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, "timeout");
Closeable[] closeableArr2 = new Closeable[i10];
closeableArr2[0] = closeable2;
ad.h.M(closeableArr2);
return aVar3;
}
} catch (Throwable th2) {
th = th2;
}
} catch (Exception e13) {
e = e13;
i10 = 1;
closeable = null;
} catch (Throwable th3) {
th = th3;
}
if (code >= 400) {
throw new RuntimeException("response code error = " + code);
}
ResponseBody body = r42.body();
if (body != null) {
try {
string = body.string();
} catch (Throwable th4) {
th = th4;
str3 = r42;
i10 = 1;
?? r132 = new Closeable[i10];
r132[0] = str3;
ad.h.M(r132);
throw th;
}
} else {
string = null;
}
if (TextUtils.isEmpty(string)) {
throw new RuntimeException("response body is empty");
}
try {
f10 = TlsPlusManager.f(r7.m.b(), string);
try {
} catch (Exception e14) {
e = e14;
r12 = aVar2;
str3 = string;
closeable2 = r42;
e.printStackTrace();
g0.H("dm async api = " + str2 + " exp, res string = " + str3, new Object[0]);
g0.H("dm async api = " + str2 + " exp = " + g0.U(e), new Object[0]);
g0.d0(r12, str2, e.getMessage());
a.C0288a.d("req_domain_fail", str2, false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, "timeout");
Closeable[] closeableArr22 = new Closeable[i10];
closeableArr22[0] = closeable2;
ad.h.M(closeableArr22);
return aVar3;
}
} catch (Exception e15) {
e = e15;
aVar2 = code;
i10 = 1;
}
if (TextUtils.isEmpty(f10)) {
throw new RuntimeException("parse str is empty");
}
try {
String str4 = r42.headers().get("date");
o7.a.j("report_load_data_api", str2);
o7.a.j("report_load_data_http_date", str4);
} catch (Exception e16) {
e16.printStackTrace();
}
JSONObject jSONObject = new JSONObject(f10);
JSONArray optJSONArray = jSONObject.optJSONArray("servers");
JSONArray optJSONArray2 = jSONObject.optJSONArray("ru_servers");
if (n7.e.w()) {
if (optJSONArray2 != null) {
try {
if (optJSONArray2.length() != 0) {
}
} catch (Exception e17) {
e = e17;
str3 = string;
i10 = 1;
closeable2 = r42;
r12 = code;
e.printStackTrace();
g0.H("dm async api = " + str2 + " exp, res string = " + str3, new Object[0]);
g0.H("dm async api = " + str2 + " exp = " + g0.U(e), new Object[0]);
g0.d0(r12, str2, e.getMessage());
a.C0288a.d("req_domain_fail", str2, false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, "timeout");
Closeable[] closeableArr222 = new Closeable[i10];
closeableArr222[0] = closeable2;
ad.h.M(closeableArr222);
return aVar3;
}
}
throw new RuntimeException("response body invalid");
} else if (optJSONArray == null || optJSONArray.length() == 0) {
throw new RuntimeException("response body invalid");
}
kotlin.jvm.internal.k.b(f10);
aVar3.f21572d = f10;
if (aVar2.f36576d && !TextUtils.isEmpty(str2)) {
o7.a.j("last_success_data_api_2319", str2);
}
g0.d0(code, str2, FirebaseAnalytics.Param.SUCCESS);
a.C0288a.d("req_domain_success", str2, true, (System.currentTimeMillis() - currentTimeMillis) / 1000.0d, code, FirebaseAnalytics.Param.SUCCESS);
if (!f4699b) {
f4699b = true;
f4706i = str2;
g.a().b(f10, Boolean.TRUE);
c();
}
ad.h.M(new Closeable[]{r42});
return aVar3;
}
public static final Object b(h hVar, wb.d dVar) {
j jVar;
int i10;
ArrayList arrayList;
long currentTimeMillis;
long j10;
String str;
h hVar2 = hVar;
hVar.getClass();
if (dVar instanceof j) {
jVar = (j) dVar;
int i11 = jVar.f4729g;
if ((i11 & Integer.MIN_VALUE) != 0) {
jVar.f4729g = i11 - Integer.MIN_VALUE;
Object obj = jVar.f4727e;
xb.a aVar = xb.a.f36594b;
i10 = jVar.f4729g;
if (i10 != 0) {
l.b(obj);
arrayList = new ArrayList();
if (!f4700c) {
currentTimeMillis = System.currentTimeMillis();
a.C0288a.e("req_start_remote", "https://firebase.com");
try {
jVar.f4724b = hVar2;
jVar.f4725c = arrayList;
jVar.f4726d = currentTimeMillis;
jVar.f4729g = 1;
ef.c cVar = r0.f37279a;
obj = ad.h.R1(jVar, n.f21939a, new i(null));
if (obj == aVar) {
return aVar;
}
j10 = currentTimeMillis;
} catch (Exception e10) {
e = e10;
g0.H("dm async rc exp = " + g0.U(e), new Object[0]);
a.C0288a.d("req_fail_remote", "https://firebase.com", false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, e.getMessage());
return arrayList;
}
}
return arrayList;
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
j10 = jVar.f4726d;
arrayList = jVar.f4725c;
hVar2 = jVar.f4724b;
try {
l.b(obj);
} catch (Exception e11) {
e = e11;
currentTimeMillis = j10;
g0.H("dm async rc exp = " + g0.U(e), new Object[0]);
a.C0288a.d("req_fail_remote", "https://firebase.com", false, ((double) (System.currentTimeMillis() - currentTimeMillis)) / 1000.0d, -1, e.getMessage());
return arrayList;
}
}
Object obj2 = obj;
h hVar3 = hVar2;
g0.Y("dm async rc result = " + ((String) obj2), new Object[0]);
FirebaseRemoteConfig remoteConfig = RemoteConfigKt.getRemoteConfig(Firebase.INSTANCE);
remoteConfig.setDefaultsAsync(R$xml.remote_config_defaults);
str = remoteConfig.getString("bak_http_config");
kotlin.jvm.internal.k.d(str, "getString(...)");
if (TextUtils.isEmpty(str)) {
t7.a l02 = g0.l0(str);
if (l02 == null || l02.f34878a.isEmpty() || l02.f34879b.isEmpty()) {
throw new RuntimeException("dm async rc response body invalid");
}
s7.a.k(l02.f34878a);
s7.a.m(l02.f34879b);
List<String> domainList = l02.f34878a;
kotlin.jvm.internal.k.d(domainList, "domainList");
arrayList.addAll(domainList);
s7.a.l(l02.f34879b.get(0));
if (!f4700c) {
f4700c = true;
hVar3.getClass();
e();
}
List<String> domainList2 = l02.f34878a;
kotlin.jvm.internal.k.d(domainList2, "domainList");
List<String> pathList = l02.f34879b;
kotlin.jvm.internal.k.d(pathList, "pathList");
a.C0288a.c("req_success_remote", "https://firebase.com", (System.currentTimeMillis() - j10) / 1000.0d, 0, domainList2, pathList);
return arrayList;
}
throw new RuntimeException("dm async rc response body is empty");
}
}
jVar = new j(hVar2, dVar);
Object obj3 = jVar.f4727e;
xb.a aVar2 = xb.a.f36594b;
i10 = jVar.f4729g;
if (i10 != 0) {
}
Object obj22 = obj3;
h hVar32 = hVar2;
g0.Y("dm async rc result = " + ((String) obj22), new Object[0]);
FirebaseRemoteConfig remoteConfig2 = RemoteConfigKt.getRemoteConfig(Firebase.INSTANCE);
remoteConfig2.setDefaultsAsync(R$xml.remote_config_defaults);
str = remoteConfig2.getString("bak_http_config");
kotlin.jvm.internal.k.d(str, "getString(...)");
if (TextUtils.isEmpty(str)) {
}
}
public static void c() {
String domain = f4706i;
if (!f4699b) {
domain = TextUtils.isEmpty(o7.a.f("lllllllll1_2319", "")) ? ImagesContract.LOCAL : "cache";
}
boolean z6 = f4699b;
double currentTimeMillis = (System.currentTimeMillis() - f4705h) / 1000.0d;
kotlin.jvm.internal.k.e(domain, "domain");
try {
HashMap b6 = a.C0288a.b();
b6.put("final_success", Boolean.valueOf(z6));
b6.put("domain", domain);
b6.put("time", Double.valueOf(currentTimeMillis));
g0.Y("dm ga ev = req_end, domain = " + domain + ", success = " + z6 + ", duration = " + currentTimeMillis, new Object[0]);
a.C0288a.a(z6 ? "req_end_success" : "req_end", b6);
} catch (Exception e10) {
e10.printStackTrace();
}
f4704g.invoke();
}
public static void d(boolean z6) {
g0.Y("dm bak start async, loading = " + f4701d, new Object[0]);
if (f4701d) {
return;
}
f4701d = true;
ef.c cVar = r0.f37279a;
ad.h.X0(e0.a(n.f21939a), null, null, new b(z6, null), 3);
}
public static void e() {
try {
ad.h.X0(e0.a(r0.f37280b), null, null, new c(null), 3);
} catch (Exception e10) {
e10.printStackTrace();
}
}
}