CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f

以下内容为反编译后的 c.java 源代码,内容仅作参考


package d.c.a.a.a;

import com.blankj.utilcode.util.NetworkUtils;
import com.google.android.exoplayer2.metadata.icy.IcyHeaders;
import com.google.android.gms.auth.api.credentials.CredentialsApi;
import d.c.a.j.s;
import java.io.IOException;
import java.util.Objects;
import kotlin.Metadata;
import n.i.b.h;
import org.apache.lucene.analysis.shingle.ShingleFilter;
import org.godfootsteps.arch.api.AppClient;
import org.json.JSONObject;
import r.c0;
import r.g0;
import r.k0.h.f;
import r.x;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0016¨\u0006\u0007"}, d2 = {"Lorg/godfootsteps/arch/api/interceptor/CacheControlInterceptor;", "Lokhttp3/Interceptor;", "()V", "intercept", "Lokhttp3/Response;", "chain", "Lokhttp3/Interceptor$Chain;", "arch_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class c implements x {
    @Override
    public g0 a(x.a aVar) throws IOException {
        String str;
        String sb;
        Object[] array;
        int i2;
        h.e(aVar, "chain");
        c0 c0Var = ((f) aVar).f16667e;
        if (!n.m.t.a.p.m.e1.a.f1(c0Var.b) && !c0Var.a().b) {
            String c = c0Var.c.c("Cache-Control");
            if (!(c != null && n.o.a.c(c, "net-only", false, 2))) {
                String str2 = c0Var.a.f16859i;
                h.d(str2, "request.url().toString()");
                AppClient.Companion companion = AppClient.a;
                Objects.requireNonNull(companion);
                if (n.o.a.c(str2, "https://appservercn.kingdomsalvation.org", false, 2)) {
                    boolean a = h.a(c0Var.c.c("Version-Control"), "true");
                    String q2 = c0Var.a.q("page");
                    if (q2 == null || q2.length() == 0) {
                        q2 = IcyHeaders.REQUEST_HEADER_ENABLE_METADATA_VALUE;
                    }
                    if (!h.a(q2, IcyHeaders.REQUEST_HEADER_ENABLE_METADATA_VALUE) && !a) {
                        try {
                            f fVar = (f) aVar;
                            g0 b = fVar.b(c0Var, fVar.b, fVar.c);
                            h.d(b, "{\n                chain.…ed(request)\n            }");
                            return b;
                        } catch (Exception unused) {
                            h.d(c0Var, "request");
                            return n.m.t.a.p.m.e1.a.E0(c0Var);
                        }
                    }
                    h.d(c0Var, "request");
                    String str3 = c0Var.a.f16859i;
                    h.d(str3, "url().toString()");
                    h.e(str3, "<this>");
                    if (n.o.a.c(str3, "v3/getBookList", false, 2)) {
                        sb = "getBookList";
                    } else {
                        String str4 = c0Var.a.f16859i;
                        h.d(str4, "url().toString()");
                        h.e(str4, "<this>");
                        if (n.o.a.c(str4, "getBookDetail", false, 2)) {
                            sb = c0Var.a.q("bookId");
                            if (sb == null) {
                                sb = "";
                            }
                        } else {
                            String str5 = c0Var.a.f16859i;
                            h.d(str5, "url().toString()");
                            if (n.o.a.c(str5, "getNewsCategory", false, 2)) {
                                sb = h.j("v2_getNewsCategory_", c0Var.a.q("type"));
                            } else {
                                String str6 = c0Var.a.f16859i;
                                h.d(str6, "url().toString()");
                                if (n.o.a.c(str6, "getSermonList", false, 2)) {
                                    sb = h.j("getSermonList_", c0Var.a.q("SermonId"));
                                } else {
                                    String str7 = c0Var.a.f16859i;
                                    h.d(str7, "url().toString()");
                                    if (n.o.a.c(str7, "getReadingList", false, 2)) {
                                        sb = h.j("getReadingList_", c0Var.a.q("readingId"));
                                    } else {
                                        String str8 = c0Var.a.f16859i;
                                        h.d(str8, "url().toString()");
                                        if (n.o.a.c(str8, "dailyGodWordList", false, 2)) {
                                            sb = h.j("dailyGodWordList_", c0Var.a.q("dailyGodWordId"));
                                        } else {
                                            String str9 = c0Var.a.f16859i;
                                            h.d(str9, "url().toString()");
                                            if (n.o.a.c(str9, "getHomeNewMode", false, 2)) {
                                                sb = d.d(c0Var.a.q("mode"));
                                            } else {
                                                String str10 = c0Var.a.f16859i;
                                                h.d(str10, "url().toString()");
                                                if (n.o.a.c(str10, "planList", false, 2)) {
                                                    if (n.m.t.a.p.m.e1.a.n1()) {
                                                        sb = n.o.a.w(d.c(c0Var), "/", ShingleFilter.DEFAULT_FILLER_TOKEN, false, 4) + "_inside_" + ((Object) c0Var.a.q("id"));
                                                    } else {
                                                        sb = n.o.a.w(d.c(c0Var), "/", ShingleFilter.DEFAULT_FILLER_TOKEN, false, 4) + '_' + ((Object) c0Var.a.q("id"));
                                                    }
                                                } else {
                                                    String q3 = c0Var.a.q("id");
                                                    if (!(q3 == null || n.o.a.o(q3))) {
                                                        sb = n.o.a.w(d.c(c0Var), "/", ShingleFilter.DEFAULT_FILLER_TOKEN, false, 4) + '_' + ((Object) c0Var.a.q("id"));
                                                    } else {
                                                        String str11 = c0Var.a.f16859i;
                                                        StringBuilder N = i.a.b.a.a.N(str11, "url().toString()");
                                                        try {
                                                            array = n.o.a.z(n.o.a.w(str11, companion.a(), "", false, 4), new char[]{'?'}, false, 0, 6).toArray(new String[0]);
                                                            try {
                                                            } catch (Exception unused2) {
                                                                str = str11;
                                                                N.append(str);
                                                                N.append("&lt=");
                                                                N.append((Object) s.a());
                                                                sb = N.toString();
                                                                d.c.a.a.b.b bVar = new d.c.a.a.b.b(sb);
                                                                String e2 = bVar.e();
                                                                if (a) {
                                                                }
                                                                i2 = c0Var.a().c;
                                                                if (i2 < 0) {
                                                                }
                                                                if (NetworkUtils.c()) {
                                                                }
                                                            }
                                                        } catch (Exception unused3) {
                                                        }
                                                        if (array != null) {
                                                            String[] strArr = (String[]) array;
                                                            if (strArr.length > 1) {
                                                                Object[] array2 = n.o.a.A(strArr[1], new String[]{"&"}, false, 0, 6).toArray(new String[0]);
                                                                if (array2 != null) {
                                                                    String[] strArr2 = (String[]) array2;
                                                                    StringBuilder sb2 = new StringBuilder(h.j(strArr[0], "?"));
                                                                    int length = strArr2.length;
                                                                    int i3 = 0;
                                                                    while (i3 < length) {
                                                                        String str12 = strArr2[i3];
                                                                        int i4 = i3 + 1;
                                                                        int i5 = length;
                                                                        if (!n.o.a.c(str12, "key", false, 2) && !n.o.a.c(str12, "verifyPara", false, 2) && !n.o.a.c(str12, "userId", false, 2) && !n.o.a.c(str12, "version", false, 2) && !n.o.a.c(str12, "sequence", false, 2)) {
                                                                            sb2.append(str12);
                                                                            sb2.append("&");
                                                                        }
                                                                        length = i5;
                                                                        i3 = i4;
                                                                    }
                                                                    str = sb2.substring(0, sb2.length() - 1);
                                                                } else {
                                                                    throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
                                                                }
                                                            } else {
                                                                str = strArr[0];
                                                            }
                                                            N.append(str);
                                                            N.append("&lt=");
                                                            N.append((Object) s.a());
                                                            sb = N.toString();
                                                        } else {
                                                            throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    d.c.a.a.b.b bVar2 = new d.c.a.a.b.b(sb);
                    String e22 = bVar2.e();
                    if (a) {
                        if (n.o.a.o(e22)) {
                            h.d(c0Var, "request");
                            c0Var = d.a(c0Var, "version", "-1");
                        } else {
                            try {
                                String optString = new JSONObject(e22).optJSONObject("result").optString("version");
                                h.d(c0Var, "request");
                                h.d(optString, "version");
                                c0Var = d.a(c0Var, "version", optString);
                            } catch (Exception e3) {
                                e3.printStackTrace();
                                h.d(c0Var, "request");
                                c0Var = d.a(c0Var, "version", "-1");
                            }
                        }
                    }
                    i2 = c0Var.a().c;
                    if (i2 < 0) {
                        i2 = 1800;
                    }
                    if (NetworkUtils.c()) {
                        h.d(c0Var, "request");
                        return n.m.t.a.p.m.e1.a.z0(c0Var, e22);
                    } else if (n.o.a.o(e22)) {
                        try {
                            f fVar2 = (f) aVar;
                            g0 b2 = fVar2.b(c0Var, fVar2.b, fVar2.c);
                            h.d(b2, "response");
                            h.d(c0Var, "request");
                            d.b(b2, c0Var, bVar2);
                            return b2;
                        } catch (Exception unused4) {
                            h.d(c0Var, "request");
                            return n.m.t.a.p.m.e1.a.E0(c0Var);
                        }
                    } else {
                        String c2 = c0Var.c.c("Cache-Control");
                        boolean z = c2 != null;
                        if ((z || (System.currentTimeMillis() - bVar2.b > 0 && (System.currentTimeMillis() - bVar2.b) / ((long) CredentialsApi.ACTIVITY_RESULT_ADD_ACCOUNT) < i2)) && h.a(q2, IcyHeaders.REQUEST_HEADER_ENABLE_METADATA_VALUE)) {
                            h.d(c0Var, "request");
                            return n.m.t.a.p.m.e1.a.z0(c0Var, e22);
                        }
                        try {
                            f fVar3 = (f) aVar;
                            g0 b3 = fVar3.b(c0Var, fVar3.b, fVar3.c);
                            h.d(b3, "netResponse");
                            h.d(c0Var, "request");
                            if (d.b(b3, c0Var, bVar2)) {
                                return b3;
                            }
                            h.d(c0Var, "request");
                            return n.m.t.a.p.m.e1.a.z0(c0Var, e22);
                        } catch (Exception unused5) {
                            h.d(c0Var, "request");
                            return n.m.t.a.p.m.e1.a.z0(c0Var, e22);
                        }
                    }
                }
            }
        }
        try {
            f fVar4 = (f) aVar;
            g0 b4 = fVar4.b(c0Var, fVar4.b, fVar4.c);
            h.d(b4, "{\n                chain.…ed(request)\n            }");
            return b4;
        } catch (Exception unused6) {
            h.d(c0Var, "request");
            return n.m.t.a.p.m.e1.a.E0(c0Var);
        }
    }
}