Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97

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


package com.ironsource.mediationsdk.utils;

import android.content.Context;
import android.text.TextUtils;
import com.google.android.exoplayer2.C;
import com.ironsource.environment.StringUtils;
import com.ironsource.mediationsdk.C0645v;
import com.ironsource.mediationsdk.adunit.data.DataKeys;
import com.ironsource.mediationsdk.model.InterstitialPlacement;
import com.ironsource.mediationsdk.model.NetworkSettings;
import com.ironsource.mediationsdk.model.Placement;
import com.ironsource.mediationsdk.model.f;
import com.ironsource.mediationsdk.model.m;
import com.ironsource.mediationsdk.model.o;
import com.ironsource.mediationsdk.model.p;
import com.ironsource.mediationsdk.model.q;
import com.ironsource.mediationsdk.model.r;
import com.ironsource.mediationsdk.model.s;
import com.ironsource.sdk.controller.x;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.tp.adx.sdk.bean.TPNativeInfo;
import com.tp.common.Constants;
import com.tradplus.ads.base.util.TradPlusInterstitialConstants;
import com.tradplus.ads.common.AdType;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class k {
    private final String A5Z5;
    private final String A8op4J;
    private final String ABj4uU;
    private final boolean ACE;
    private final String AR7Y;
    private final String AacMi8;
    private final int AhRu0ksV;
    private final String Aum9M3w9;
    private final int Bcny5qC1;
    private final String CX5I2VNl;
    private final String CaIo89;
    private final int EAU;
    private final String F1pf1P;
    private final String FY05nN5;
    private final String G974K82E;
    private final String GGZy53m;
    private final String H5ZUHxd;
    private final String HD8M5;
    private final long IP9Be6yl;
    private final String Ib1B4;
    private final String Il;
    private final boolean J7M857;
    private final String JXxuNYv;
    private final String K1EX0a;
    private final String K2;
    private final String K8Cf;
    private final String K8Ym;
    private final String KPC;
    private final String KTR10l3;
    private final String Kgmwva;
    private Context L49BM;
    private final String L7;
    private final String Lu4;
    private final int MN0;
    private final String MNN4fk;
    private final String MwMhiJW;
    private final String Myd;
    private final int N42m19x9;
    private final String NB20xm4O;
    private final String NV39;
    private final String Np8;
    private final int O2WW392N;
    private final String O90X03l;
    private final int Ogh;
    private final int Ozp48;
    private final String QFJ2J;
    private final String QPr0mc;
    private final String R4409pz;
    private final String R4U;
    private final String R8da1U5;
    private final String S9;
    private final String TI1;
    private final String Tc;
    private final String UyuW;
    private final String V3;
    private final String V85;
    private final String VA;
    private final int VJ;
    private final String VJ5;
    private final String Vut;
    private final String X6Vu;
    private final String XbP574xI;
    private final String Y401;
    private final String YP;
    private final String YnP2;
    private final String YyveRW;
    private final String Z3GEx621;
    private final String Z4;
    private final String Z4BE1;
    private final int Z5AQ7;
    private final int ZlF;
    private final String Zmz;
    public o a;
    private final String a8Ws65x;
    public p f3537b;
    private final String b16z7;
    private final String bAk754E5;
    public com.ironsource.mediationsdk.model.f c;
    private final String c7330181;
    public JSONObject d;
    private final String d90L3h;
    private final String dV1;
    private final String dd;
    public int e;
    private final String e38;
    private final String e52tL;
    private final String e9e7AXz;
    private final boolean eY;
    private final String f846;
    private final String fNjI;
    private final String fT8wgW;
    private final int fUPN6;
    private final String fUd;
    private final String g6v82;
    private final int g7L28;
    private final int g8;
    private final String g9744AH;
    private final int gK5Co1;
    private final String gZ7P5LP;
    private final long gqs2;
    private final String gt65QHUX;
    private final String h239y;
    private final int h7uEG5;
    private final String h8x84;
    private final String ha74x9;
    private final String ieaHKMi3;
    private final String ihQEft6;
    private final String iryc4rfz;
    private final String j2;
    private final int jB;
    private final String k71v3;
    private final int l7i;
    private final String liXQ;
    private final String m0;
    private final String mY1ci;
    private final String mdB;
    private final String mo896;
    private String o8o;
    private final String oA;
    private final String oH;
    private final boolean pcM9xx3f;
    private final String pheK0p;
    private final String qJmmJt;
    private final String r1;
    private String rC;
    private final String rYF1S;
    private final String s1480a;
    private final boolean sB8aO3;
    private final String t7wiHJ5;
    private final String tB8660;
    private final String tCwB09x9;
    private final String tKn9ulC;
    private final String u26D8;
    private final String ulS2hB;
    private final String w6;
    private final String wM2uNs;
    private final String wWv8;
    private final String wY1k;
    private final String wdq6p1C4;
    private final String x9N93KK;
    private final String xB502891;
    private final String xJ2cX;
    private final String yv511;
    private final int z29n97;

    public static final class a {
        private static final int[] VJ = {1, 2, 3};
        public static final int a = 1;
        public static final int f3538b = 2;
        public static final int c = 3;
    }

    public k(Context context, String str, String str2, String str3) {
        this.gt65QHUX = CampaignEx.JSON_NATIVE_VIDEO_ERROR;
        this.jB = 3;
        this.g8 = 2;
        this.Bcny5qC1 = 60;
        this.AhRu0ksV = 10000;
        this.VJ = 10000;
        this.O2WW392N = -1;
        this.EAU = 5000;
        this.h7uEG5 = TPNativeInfo.ASSETS_ID_VIDEO;
        this.z29n97 = 3;
        this.g7L28 = 3;
        this.MN0 = 3;
        this.l7i = 0;
        this.Ozp48 = 2;
        this.Z5AQ7 = 15;
        this.IP9Be6yl = 10000L;
        this.Ogh = 0;
        this.pcM9xx3f = false;
        this.eY = false;
        this.gqs2 = C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
        this.sB8aO3 = false;
        this.ACE = false;
        this.ZlF = 30000;
        this.fUPN6 = -1;
        this.gK5Co1 = 5000;
        this.N42m19x9 = 1;
        this.J7M857 = false;
        this.ulS2hB = "providerOrder";
        this.tCwB09x9 = "providerSettings";
        this.wM2uNs = "configurations";
        this.K1EX0a = IronSourceConstants.EVENTS_GENERIC_PARAMS;
        this.gZ7P5LP = "adUnits";
        this.XbP574xI = "providerLoadName";
        this.KTR10l3 = "application";
        this.V85 = "rewardedVideo";
        this.s1480a = "interstitial";
        this.R4409pz = TradPlusInterstitialConstants.INTERSTITIAL_TYPE_OFFERWALL;
        this.d90L3h = "banner";
        this.iryc4rfz = "nativeAd";
        this.Z3GEx621 = "integration";
        this.tB8660 = "loggers";
        this.a8Ws65x = "segment";
        this.S9 = Constants.VIDEO_TRACKING_EVENTS_KEY;
        this.QFJ2J = "crashReporter";
        this.f846 = "token";
        this.oH = "external";
        this.VJ5 = "mediationTypes";
        this.Y401 = "providerDefaultInstance";
        this.Tc = "testSuite";
        this.rYF1S = "controllerUrl";
        this.ieaHKMi3 = "AdQuality";
        this.Il = "initSDK";
        this.L7 = "settings";
        this.Myd = "collectBiddingDataTimeout";
        this.k71v3 = "collectBiddingDataAsyncEnabled";
        this.Z4BE1 = "providers";
        this.YyveRW = "parallelInit";
        this.qJmmJt = "waitUntilAllProvidersFinishInit";
        this.MNN4fk = "maxNumOfAdaptersToLoadOnStart";
        this.Aum9M3w9 = "advancedLoading";
        this.xJ2cX = "adapterTimeOutInSeconds";
        this.X6Vu = "atim";
        this.YP = "bannerInterval";
        this.m0 = "isOneFlow";
        this.r1 = "loadRVInterval";
        this.ABj4uU = "expiredDurationInMinutes";
        this.h239y = "server";
        this.e38 = "publisher";
        this.UyuW = "console";
        this.Kgmwva = "sendUltraEvents";
        this.VA = "sendEventsToggle";
        this.Ib1B4 = "eventsCompression";
        this.xB502891 = "eventsCompressionLevel";
        this.j2 = "serverEventsURL";
        this.wdq6p1C4 = "serverEventsType";
        this.Z4 = "backupThreshold";
        this.AacMi8 = "maxNumberOfEvents";
        this.F1pf1P = "maxEventsPerBatch";
        this.JXxuNYv = "optOut";
        this.liXQ = "optIn";
        this.wY1k = "triggerEvents";
        this.G974K82E = "nonConnectivityEvents";
        this.e52tL = "shouldSendPublisherLogsOnUIThread";
        this.tKn9ulC = "pixel";
        this.FY05nN5 = "pixelEventsUrl";
        this.O90X03l = "pixelEventsEnabled";
        this.fUd = "placements";
        this.yv511 = "placementId";
        this.mdB = "placementName";
        this.t7wiHJ5 = "delivery";
        this.dd = "isDefault";
        this.g9744AH = "capping";
        this.oA = "pacing";
        this.x9N93KK = "enabled";
        this.A8op4J = "maxImpressions";
        this.h8x84 = "numOfSeconds";
        this.Vut = "unit";
        this.w6 = "virtualItemName";
        this.NV39 = "virtualItemCount";
        this.V3 = "uuidEnabled";
        this.K2 = "abt";
        this.pheK0p = "delayLoadFailure";
        this.b16z7 = "keysToInclude";
        this.A5Z5 = "reporterURL";
        this.bAk754E5 = "reporterKeyword";
        this.YnP2 = "includeANR";
        this.Lu4 = "timeout";
        this.wWv8 = "setIgnoreDebugger";
        this.CaIo89 = "adSourceName";
        this.K8Ym = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
        this.fT8wgW = "mpis";
        this.e9e7AXz = "auction";
        this.u26D8 = "auctionData";
        this.TI1 = "auctioneerURL";
        this.HD8M5 = "extAuctioneerURL";
        this.mY1ci = IronSourceConstants.EVENTS_PROGRAMMATIC;
        this.R8da1U5 = "objectPerWaterfall";
        this.CX5I2VNl = "minTimeBeforeFirstAuction";
        this.mo896 = "timeToWaitBeforeAuction";
        this.H5ZUHxd = "timeToWaitBeforeLoad";
        this.g6v82 = "auctionRetryInterval";
        this.K8Cf = "isLoadWhileShow";
        this.NB20xm4O = IronSourceConstants.AUCTION_TRIALS;
        this.QPr0mc = "auctionTimeout";
        this.c7330181 = "auctionSavedHistory";
        this.ha74x9 = "disableLoadWhileShowSupportFor";
        this.ihQEft6 = "timeToDeleteOldWaterfallAfterAuction";
        this.AR7Y = "compressAuctionRequest";
        this.MwMhiJW = "compressAuctionResponse";
        this.fNjI = "encryptionVersion";
        this.Np8 = "shouldSendBannerBURLFromImpression";
        this.R4U = "optInKeys";
        this.dV1 = "tokenGenericParams";
        this.GGZy53m = "oneToken";
        this.Zmz = "compressToken";
        this.KPC = "compressExternalToken";
        this.e = a.a;
        this.L49BM = context;
        try {
            this.d = TextUtils.isEmpty(str3) ? new JSONObject() : new JSONObject(str3);
            g7L28();
            MN0();
            z29n97();
            this.o8o = TextUtils.isEmpty(str) ? "" : str;
            this.rC = TextUtils.isEmpty(str2) ? "" : str2;
        } catch (JSONException e) {
            e.printStackTrace();
            EAU();
        }
    }

    public k(k kVar) {
        this.gt65QHUX = CampaignEx.JSON_NATIVE_VIDEO_ERROR;
        this.jB = 3;
        this.g8 = 2;
        this.Bcny5qC1 = 60;
        this.AhRu0ksV = 10000;
        this.VJ = 10000;
        this.O2WW392N = -1;
        this.EAU = 5000;
        this.h7uEG5 = TPNativeInfo.ASSETS_ID_VIDEO;
        this.z29n97 = 3;
        this.g7L28 = 3;
        this.MN0 = 3;
        this.l7i = 0;
        this.Ozp48 = 2;
        this.Z5AQ7 = 15;
        this.IP9Be6yl = 10000L;
        this.Ogh = 0;
        this.pcM9xx3f = false;
        this.eY = false;
        this.gqs2 = C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
        this.sB8aO3 = false;
        this.ACE = false;
        this.ZlF = 30000;
        this.fUPN6 = -1;
        this.gK5Co1 = 5000;
        this.N42m19x9 = 1;
        this.J7M857 = false;
        this.ulS2hB = "providerOrder";
        this.tCwB09x9 = "providerSettings";
        this.wM2uNs = "configurations";
        this.K1EX0a = IronSourceConstants.EVENTS_GENERIC_PARAMS;
        this.gZ7P5LP = "adUnits";
        this.XbP574xI = "providerLoadName";
        this.KTR10l3 = "application";
        this.V85 = "rewardedVideo";
        this.s1480a = "interstitial";
        this.R4409pz = TradPlusInterstitialConstants.INTERSTITIAL_TYPE_OFFERWALL;
        this.d90L3h = "banner";
        this.iryc4rfz = "nativeAd";
        this.Z3GEx621 = "integration";
        this.tB8660 = "loggers";
        this.a8Ws65x = "segment";
        this.S9 = Constants.VIDEO_TRACKING_EVENTS_KEY;
        this.QFJ2J = "crashReporter";
        this.f846 = "token";
        this.oH = "external";
        this.VJ5 = "mediationTypes";
        this.Y401 = "providerDefaultInstance";
        this.Tc = "testSuite";
        this.rYF1S = "controllerUrl";
        this.ieaHKMi3 = "AdQuality";
        this.Il = "initSDK";
        this.L7 = "settings";
        this.Myd = "collectBiddingDataTimeout";
        this.k71v3 = "collectBiddingDataAsyncEnabled";
        this.Z4BE1 = "providers";
        this.YyveRW = "parallelInit";
        this.qJmmJt = "waitUntilAllProvidersFinishInit";
        this.MNN4fk = "maxNumOfAdaptersToLoadOnStart";
        this.Aum9M3w9 = "advancedLoading";
        this.xJ2cX = "adapterTimeOutInSeconds";
        this.X6Vu = "atim";
        this.YP = "bannerInterval";
        this.m0 = "isOneFlow";
        this.r1 = "loadRVInterval";
        this.ABj4uU = "expiredDurationInMinutes";
        this.h239y = "server";
        this.e38 = "publisher";
        this.UyuW = "console";
        this.Kgmwva = "sendUltraEvents";
        this.VA = "sendEventsToggle";
        this.Ib1B4 = "eventsCompression";
        this.xB502891 = "eventsCompressionLevel";
        this.j2 = "serverEventsURL";
        this.wdq6p1C4 = "serverEventsType";
        this.Z4 = "backupThreshold";
        this.AacMi8 = "maxNumberOfEvents";
        this.F1pf1P = "maxEventsPerBatch";
        this.JXxuNYv = "optOut";
        this.liXQ = "optIn";
        this.wY1k = "triggerEvents";
        this.G974K82E = "nonConnectivityEvents";
        this.e52tL = "shouldSendPublisherLogsOnUIThread";
        this.tKn9ulC = "pixel";
        this.FY05nN5 = "pixelEventsUrl";
        this.O90X03l = "pixelEventsEnabled";
        this.fUd = "placements";
        this.yv511 = "placementId";
        this.mdB = "placementName";
        this.t7wiHJ5 = "delivery";
        this.dd = "isDefault";
        this.g9744AH = "capping";
        this.oA = "pacing";
        this.x9N93KK = "enabled";
        this.A8op4J = "maxImpressions";
        this.h8x84 = "numOfSeconds";
        this.Vut = "unit";
        this.w6 = "virtualItemName";
        this.NV39 = "virtualItemCount";
        this.V3 = "uuidEnabled";
        this.K2 = "abt";
        this.pheK0p = "delayLoadFailure";
        this.b16z7 = "keysToInclude";
        this.A5Z5 = "reporterURL";
        this.bAk754E5 = "reporterKeyword";
        this.YnP2 = "includeANR";
        this.Lu4 = "timeout";
        this.wWv8 = "setIgnoreDebugger";
        this.CaIo89 = "adSourceName";
        this.K8Ym = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
        this.fT8wgW = "mpis";
        this.e9e7AXz = "auction";
        this.u26D8 = "auctionData";
        this.TI1 = "auctioneerURL";
        this.HD8M5 = "extAuctioneerURL";
        this.mY1ci = IronSourceConstants.EVENTS_PROGRAMMATIC;
        this.R8da1U5 = "objectPerWaterfall";
        this.CX5I2VNl = "minTimeBeforeFirstAuction";
        this.mo896 = "timeToWaitBeforeAuction";
        this.H5ZUHxd = "timeToWaitBeforeLoad";
        this.g6v82 = "auctionRetryInterval";
        this.K8Cf = "isLoadWhileShow";
        this.NB20xm4O = IronSourceConstants.AUCTION_TRIALS;
        this.QPr0mc = "auctionTimeout";
        this.c7330181 = "auctionSavedHistory";
        this.ha74x9 = "disableLoadWhileShowSupportFor";
        this.ihQEft6 = "timeToDeleteOldWaterfallAfterAuction";
        this.AR7Y = "compressAuctionRequest";
        this.MwMhiJW = "compressAuctionResponse";
        this.fNjI = "encryptionVersion";
        this.Np8 = "shouldSendBannerBURLFromImpression";
        this.R4U = "optInKeys";
        this.dV1 = "tokenGenericParams";
        this.GGZy53m = "oneToken";
        this.Zmz = "compressToken";
        this.KPC = "compressExternalToken";
        this.e = a.a;
        try {
            this.L49BM = kVar.L49BM;
            this.d = new JSONObject(kVar.d.toString());
            this.o8o = kVar.o8o;
            this.rC = kVar.rC;
            this.a = kVar.a;
            this.f3537b = kVar.f3537b;
            this.c = kVar.c;
            this.e = kVar.e;
        } catch (Exception unused) {
            EAU();
        }
    }

    private static int[] AhRu0ksV(JSONObject jSONObject, String str) {
        JSONArray optJSONArray = jSONObject.optJSONArray(str);
        if (optJSONArray != null) {
            int[] iArr = new int[optJSONArray.length()];
            for (int i = 0; i < optJSONArray.length(); i++) {
                iArr[i] = optJSONArray.optInt(i);
            }
            return iArr;
        }
        return null;
    }

    private static boolean Bcny5qC1(JSONObject jSONObject, JSONObject jSONObject2, String str, boolean z) {
        if (jSONObject.has(str)) {
            return jSONObject.optBoolean(str, false);
        }
        if (jSONObject2.has(str)) {
            return jSONObject2.optBoolean(str, false);
        }
        return false;
    }

    private void EAU() {
        this.d = new JSONObject();
        this.o8o = "";
        this.rC = "";
        this.a = new o();
        this.f3537b = p.a();
        this.c = new f.a().a();
    }

    private void MN0() {
        Exception exc;
        JSONObject jSONObject;
        JSONObject jSONObject2;
        k kVar;
        String str;
        String str2;
        String str3;
        String str4;
        String str5;
        String str6;
        String str7;
        q qVar;
        String str8;
        String str9;
        JSONObject jSONObject3;
        String str10;
        String str11;
        String str12;
        q qVar2;
        String str13;
        com.ironsource.mediationsdk.model.h hVar;
        String str14;
        k kVar2;
        String str15;
        String str16;
        String str17;
        com.ironsource.mediationsdk.model.h hVar2;
        com.ironsource.mediationsdk.model.d dVar;
        com.ironsource.mediationsdk.model.d dVar2;
        JSONObject jSONObject4;
        k kVar3;
        String str18;
        com.ironsource.mediationsdk.model.i iVar;
        String str19;
        String str20;
        String str21;
        com.ironsource.mediationsdk.model.k kVar4;
        boolean z;
        String str22;
        JSONObject VJ;
        int[] iArr;
        int[] iArr2;
        int[] iArr3;
        int[] iArr4;
        JSONArray jSONArray;
        String str23;
        com.ironsource.mediationsdk.model.l lVar;
        boolean z2;
        int i;
        int[] iArr5;
        int[] iArr6;
        int[] iArr7;
        int[] iArr8;
        JSONObject jSONObject5;
        c cVar;
        c cVar2;
        JSONObject jSONObject6;
        String str24;
        JSONArray jSONArray2;
        com.ironsource.mediationsdk.model.j jVar;
        JSONObject VJ2;
        boolean z3;
        int i2;
        int[] iArr9;
        int[] iArr10;
        int[] iArr11;
        int[] iArr12;
        JSONObject jSONObject7;
        c cVar3;
        JSONObject jSONObject8;
        String str25;
        JSONArray jSONArray3;
        com.ironsource.mediationsdk.model.e eVar;
        int i3;
        boolean z4;
        int[] iArr13;
        int[] iArr14;
        int[] iArr15;
        int[] iArr16;
        String str26;
        JSONObject jSONObject9;
        c cVar4;
        JSONObject jSONObject10;
        JSONArray jSONArray4;
        String str27;
        InterstitialPlacement interstitialPlacement;
        int i4;
        boolean z5;
        int[] iArr17;
        int[] iArr18;
        int[] iArr19;
        int[] iArr20;
        c cVar5;
        Placement placement;
        try {
            JSONObject VJ3 = VJ(this.d, "configurations");
            JSONObject VJ4 = VJ(VJ3, "adUnits");
            JSONObject VJ5 = VJ(VJ3, "application");
            JSONObject VJ6 = VJ(VJ4, "rewardedVideo");
            JSONObject VJ7 = VJ(VJ4, "interstitial");
            JSONObject VJ8 = VJ(VJ4, TradPlusInterstitialConstants.INTERSTITIAL_TYPE_OFFERWALL);
            JSONObject VJ9 = VJ(VJ4, "banner");
            JSONObject VJ10 = VJ(VJ4, "nativeAd");
            JSONObject VJ11 = VJ(VJ5, Constants.VIDEO_TRACKING_EVENTS_KEY);
            JSONObject VJ12 = VJ(VJ5, "loggers");
            JSONObject VJ13 = VJ(VJ5, "token");
            JSONObject VJ14 = VJ(VJ5, "segment");
            JSONObject VJ15 = VJ(VJ5, "auction");
            JSONObject VJ16 = VJ(VJ5, "crashReporter");
            JSONObject VJ17 = VJ(VJ5, "settings");
            JSONObject VJ18 = VJ(VJ5, "external");
            JSONObject VJ19 = VJ(VJ11, "pixel");
            if (VJ5 != null) {
                jSONObject2 = VJ16;
                jSONObject = VJ12;
                IronSourceUtils.MN0(this.L49BM, "uuidEnabled", VJ5.optBoolean("uuidEnabled", true));
            } else {
                jSONObject = VJ12;
                jSONObject2 = VJ16;
            }
            if (VJ11 != null) {
                String optString = VJ11.optString("abt");
                if (!TextUtils.isEmpty(optString)) {
                    com.ironsource.mediationsdk.events.e.d().q = optString;
                    com.ironsource.mediationsdk.events.i.d().q = optString;
                }
            }
            JSONObject jSONObject11 = VJ15;
            String str28 = "maxEventsPerBatch";
            String str29 = "optOut";
            String str30 = "triggerEvents";
            String str31 = "optIn";
            if (VJ6 != null) {
                JSONArray optJSONArray = VJ6.optJSONArray("placements");
                str4 = "placements";
                JSONObject VJ20 = VJ(VJ6, Constants.VIDEO_TRACKING_EVENTS_KEY);
                str = Constants.VIDEO_TRACKING_EVENTS_KEY;
                JSONObject O2WW392N = O2WW392N(VJ6, "providers");
                try {
                    JSONArray jSONArray5 = optJSONArray;
                    boolean optBoolean = VJ6.optBoolean("collectBiddingDataAsyncEnabled", false);
                    long optLong = VJ6.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
                    boolean optBoolean2 = O2WW392N.optBoolean("parallelInit", false);
                    boolean optBoolean3 = O2WW392N.optBoolean("waitUntilAllProvidersFinishInit", false);
                    int gt65QHUX = gt65QHUX(VJ6, VJ5, "maxNumOfAdaptersToLoadOnStart", 2);
                    int gt65QHUX2 = gt65QHUX(VJ6, VJ5, "advancedLoading", 0);
                    if (gt65QHUX2 > 0) {
                        i4 = gt65QHUX2;
                        z5 = true;
                    } else {
                        i4 = gt65QHUX;
                        z5 = false;
                    }
                    int gt65QHUX3 = gt65QHUX(VJ6, VJ5, "adapterTimeOutInSeconds", 60);
                    int gt65QHUX4 = gt65QHUX(VJ6, VJ5, "loadRVInterval", TPNativeInfo.ASSETS_ID_VIDEO);
                    int gt65QHUX5 = gt65QHUX(VJ6, VJ5, "expiredDurationInMinutes", -1);
                    int gt65QHUX6 = gt65QHUX(VJ6, VJ5, "delayLoadFailure", 3);
                    JSONObject mergeJsons = IronSourceUtils.mergeJsons(VJ20, VJ11);
                    boolean optBoolean4 = mergeJsons.optBoolean("sendUltraEvents", false);
                    boolean optBoolean5 = mergeJsons.optBoolean("sendEventsToggle", false);
                    boolean optBoolean6 = mergeJsons.optBoolean("eventsCompression", false);
                    int optInt = mergeJsons.optInt("eventsCompressionLevel", -1);
                    str3 = "serverEventsURL";
                    String optString2 = mergeJsons.optString(str3, "");
                    String optString3 = mergeJsons.optString("serverEventsType", "");
                    int optInt2 = mergeJsons.optInt("backupThreshold", -1);
                    int optInt3 = mergeJsons.optInt("maxNumberOfEvents", -1);
                    int optInt4 = mergeJsons.optInt(str28, 5000);
                    JSONArray optJSONArray2 = mergeJsons.optJSONArray(str29);
                    if (optJSONArray2 != null) {
                        int[] iArr21 = new int[optJSONArray2.length()];
                        str28 = str28;
                        str29 = str29;
                        for (int i5 = 0; i5 < optJSONArray2.length(); i5++) {
                            iArr21[i5] = optJSONArray2.optInt(i5);
                        }
                        iArr17 = iArr21;
                    } else {
                        str28 = str28;
                        str29 = str29;
                        iArr17 = null;
                    }
                    JSONArray optJSONArray3 = mergeJsons.optJSONArray(str31);
                    if (optJSONArray3 != null) {
                        int[] iArr22 = new int[optJSONArray3.length()];
                        str31 = str31;
                        for (int i6 = 0; i6 < optJSONArray3.length(); i6++) {
                            iArr22[i6] = optJSONArray3.optInt(i6);
                        }
                        iArr18 = iArr22;
                    } else {
                        str31 = str31;
                        iArr18 = null;
                    }
                    JSONArray optJSONArray4 = mergeJsons.optJSONArray(str30);
                    if (optJSONArray4 != null) {
                        int[] iArr23 = new int[optJSONArray4.length()];
                        str30 = str30;
                        for (int i7 = 0; i7 < optJSONArray4.length(); i7++) {
                            iArr23[i7] = optJSONArray4.optInt(i7);
                        }
                        iArr19 = iArr23;
                    } else {
                        str30 = str30;
                        iArr19 = null;
                    }
                    JSONArray optJSONArray5 = mergeJsons.optJSONArray("nonConnectivityEvents");
                    if (optJSONArray5 != null) {
                        int[] iArr24 = new int[optJSONArray5.length()];
                        for (int i8 = 0; i8 < optJSONArray5.length(); i8++) {
                            iArr24[i8] = optJSONArray5.optInt(i8);
                        }
                        iArr20 = iArr24;
                    } else {
                        iArr20 = null;
                    }
                    x xVar = new x(optBoolean4, optBoolean5, optBoolean6, optInt, optString2, optString3, optInt2, optInt3, optInt4, iArr17, iArr18, iArr19, iArr20);
                    if (jSONObject11 != null) {
                        JSONObject VJ21 = VJ(jSONObject11, "rewardedVideo");
                        String optString4 = jSONObject11.optString("auctionData", "");
                        String optString5 = jSONObject11.optString("auctioneerURL", "");
                        String optString6 = jSONObject11.optString("extAuctioneerURL", "");
                        int optInt5 = jSONObject11.optInt(IronSourceConstants.AUCTION_TRIALS, 2);
                        long optLong2 = jSONObject11.optLong("auctionTimeout", 10000L);
                        int optInt6 = jSONObject11.optInt("auctionSavedHistory", 15);
                        boolean optBoolean7 = jSONObject11.optBoolean("compressAuctionRequest", false);
                        boolean optBoolean8 = jSONObject11.optBoolean("compressAuctionResponse", false);
                        int optInt7 = jSONObject11.optInt("encryptionVersion", 1);
                        jSONObject11 = jSONObject11;
                        str6 = "maxNumberOfEvents";
                        str2 = "backupThreshold";
                        str7 = "serverEventsType";
                        str5 = "eventsCompressionLevel";
                        c cVar6 = new c(optString4, optString5, optString6, optInt5, optInt6, optLong2, VJ21.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), VJ21.optInt("minTimeBeforeFirstAuction", 2000), VJ21.optInt("auctionRetryInterval", 30000), VJ21.optInt("timeToWaitBeforeAuction", 5000), VJ21.optInt("timeToWaitBeforeLoad", 50), VJ21.optBoolean("isLoadWhileShow", true), VJ21.optInt("timeToDeleteOldWaterfallAfterAuction", 30000), optBoolean7, optBoolean8, VJ21.optBoolean("objectPerWaterfall", false), optInt7, false);
                        JSONArray optJSONArray6 = VJ21.optJSONArray("disableLoadWhileShowSupportFor");
                        if (optJSONArray6 != null) {
                            for (int i9 = 0; i9 < optJSONArray6.length(); i9++) {
                                String optString7 = optJSONArray6.optString(i9);
                                if (!TextUtils.isEmpty(optString7)) {
                                    cVar6.k.add(optString7);
                                }
                            }
                        }
                        cVar5 = cVar6;
                    } else {
                        str2 = "backupThreshold";
                        str5 = "eventsCompressionLevel";
                        str6 = "maxNumberOfEvents";
                        str7 = "serverEventsType";
                        cVar5 = new c();
                    }
                    qVar = new q(i4, z5, gt65QHUX3, gt65QHUX4, gt65QHUX5, xVar, cVar5, gt65QHUX6, optBoolean, optLong, optBoolean2, optBoolean3);
                    if (jSONArray5 != null) {
                        int i10 = 0;
                        while (i10 < jSONArray5.length()) {
                            JSONArray jSONArray6 = jSONArray5;
                            JSONObject optJSONObject = jSONArray6.optJSONObject(i10);
                            if (optJSONObject != null) {
                                int optInt8 = optJSONObject.optInt("placementId", -1);
                                String optString8 = optJSONObject.optString("placementName", "");
                                boolean optBoolean9 = optJSONObject.optBoolean("isDefault", false);
                                String optString9 = optJSONObject.optString("virtualItemName", "");
                                int optInt9 = optJSONObject.optInt("virtualItemCount", -1);
                                com.ironsource.mediationsdk.model.m g8 = g8(optJSONObject);
                                if (optInt8 >= 0 && !TextUtils.isEmpty(optString8) && !TextUtils.isEmpty(optString9) && optInt9 > 0) {
                                    placement = new Placement(optInt8, optString8, optBoolean9, optString9, optInt9, g8);
                                    if (g8 != null) {
                                        kVar = this;
                                        try {
                                            j.a(kVar.L49BM, placement);
                                        } catch (Exception e) {
                                            exc = e;
                                            exc.printStackTrace();
                                            return;
                                        }
                                    }
                                    if (placement == null) {
                                        qVar.a.add(placement);
                                        if (qVar.l != null && !placement.isPlacementId(0)) {
                                        }
                                        qVar.l = placement;
                                    }
                                    i10++;
                                    jSONArray5 = jSONArray6;
                                }
                            }
                            placement = null;
                            if (placement == null) {
                            }
                            i10++;
                            jSONArray5 = jSONArray6;
                        }
                    }
                    kVar = this;
                } catch (Exception e2) {
                    e = e2;
                    exc = e;
                    exc.printStackTrace();
                    return;
                }
            } else {
                kVar = this;
                str = Constants.VIDEO_TRACKING_EVENTS_KEY;
                str2 = "backupThreshold";
                str3 = "serverEventsURL";
                str4 = "placements";
                str5 = "eventsCompressionLevel";
                str6 = "maxNumberOfEvents";
                str7 = "serverEventsType";
                qVar = null;
            }
            if (VJ7 != null) {
                str10 = str4;
                JSONArray optJSONArray7 = VJ7.optJSONArray(str10);
                str11 = str;
                JSONObject VJ22 = VJ(VJ7, str11);
                JSONObject O2WW392N2 = kVar.O2WW392N(VJ7, "providers");
                String str32 = str7;
                qVar2 = qVar;
                boolean optBoolean10 = VJ7.optBoolean("collectBiddingDataAsyncEnabled", false);
                String str33 = str3;
                long optLong3 = VJ7.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
                boolean optBoolean11 = O2WW392N2.optBoolean("parallelInit", false);
                boolean optBoolean12 = O2WW392N2.optBoolean("waitUntilAllProvidersFinishInit", false);
                int gt65QHUX7 = gt65QHUX(VJ7, VJ5, "maxNumOfAdaptersToLoadOnStart", 2);
                int gt65QHUX8 = gt65QHUX(VJ7, VJ5, "advancedLoading", 0);
                if (gt65QHUX8 > 0) {
                    i3 = gt65QHUX8;
                    z4 = true;
                } else {
                    i3 = gt65QHUX7;
                    z4 = false;
                }
                int gt65QHUX9 = gt65QHUX(VJ7, VJ5, "adapterTimeOutInSeconds", 60);
                int gt65QHUX10 = gt65QHUX(VJ7, VJ5, "delayLoadFailure", 3);
                boolean Bcny5qC1 = Bcny5qC1(VJ7, VJ5, "isOneFlow", false);
                JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(VJ22, VJ11);
                boolean optBoolean13 = mergeJsons2.optBoolean("sendEventsToggle", false);
                boolean optBoolean14 = mergeJsons2.optBoolean("eventsCompression", false);
                str12 = str5;
                int optInt10 = mergeJsons2.optInt(str12, -1);
                String optString10 = mergeJsons2.optString(str33, "");
                String optString11 = mergeJsons2.optString(str32, "");
                String str34 = str2;
                int optInt11 = mergeJsons2.optInt(str34, -1);
                str2 = str34;
                String str35 = str6;
                int optInt12 = mergeJsons2.optInt(str35, -1);
                str6 = str35;
                String str36 = str28;
                int optInt13 = mergeJsons2.optInt(str36, 5000);
                str28 = str36;
                String str37 = str29;
                JSONArray optJSONArray8 = mergeJsons2.optJSONArray(str37);
                if (optJSONArray8 != null) {
                    str29 = str37;
                    int[] iArr25 = new int[optJSONArray8.length()];
                    str8 = str33;
                    str9 = str32;
                    for (int i11 = 0; i11 < optJSONArray8.length(); i11++) {
                        iArr25[i11] = optJSONArray8.optInt(i11);
                    }
                    iArr13 = iArr25;
                } else {
                    str8 = str33;
                    str9 = str32;
                    str29 = str37;
                    iArr13 = null;
                }
                String str38 = str31;
                JSONArray optJSONArray9 = mergeJsons2.optJSONArray(str38);
                if (optJSONArray9 != null) {
                    int[] iArr26 = new int[optJSONArray9.length()];
                    str31 = str38;
                    for (int i12 = 0; i12 < optJSONArray9.length(); i12++) {
                        iArr26[i12] = optJSONArray9.optInt(i12);
                    }
                    iArr14 = iArr26;
                } else {
                    str31 = str38;
                    iArr14 = null;
                }
                String str39 = str30;
                JSONArray optJSONArray10 = mergeJsons2.optJSONArray(str39);
                if (optJSONArray10 != null) {
                    int[] iArr27 = new int[optJSONArray10.length()];
                    str30 = str39;
                    for (int i13 = 0; i13 < optJSONArray10.length(); i13++) {
                        iArr27[i13] = optJSONArray10.optInt(i13);
                    }
                    iArr15 = iArr27;
                } else {
                    str30 = str39;
                    iArr15 = null;
                }
                JSONArray optJSONArray11 = mergeJsons2.optJSONArray("nonConnectivityEvents");
                if (optJSONArray11 != null) {
                    int[] iArr28 = new int[optJSONArray11.length()];
                    for (int i14 = 0; i14 < optJSONArray11.length(); i14++) {
                        iArr28[i14] = optJSONArray11.optInt(i14);
                    }
                    iArr16 = iArr28;
                } else {
                    iArr16 = null;
                }
                x xVar2 = new x(false, optBoolean13, optBoolean14, optInt10, optString10, optString11, optInt11, optInt12, optInt13, iArr13, iArr14, iArr15, iArr16);
                if (jSONObject11 != null) {
                    jSONObject9 = jSONObject11;
                    JSONObject VJ23 = VJ(jSONObject9, "interstitial");
                    str26 = "eventsCompression";
                    cVar4 = new c(jSONObject9.optString("auctionData", ""), jSONObject9.optString("auctioneerURL", ""), jSONObject9.optString("extAuctioneerURL", ""), jSONObject9.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject9.optInt("auctionSavedHistory", 15), jSONObject9.optLong("auctionTimeout", 10000L), VJ23.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), VJ23.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, 0, jSONObject9.optBoolean("compressAuctionRequest", false), jSONObject9.optBoolean("compressAuctionResponse", false), VJ23.optBoolean("objectPerWaterfall", false), jSONObject9.optInt("encryptionVersion", 1), false);
                } else {
                    str26 = "eventsCompression";
                    jSONObject9 = jSONObject11;
                    cVar4 = new c();
                }
                hVar = new com.ironsource.mediationsdk.model.h(i3, z4, gt65QHUX9, xVar2, cVar4, gt65QHUX10, Bcny5qC1, optBoolean10, optLong3, optBoolean11, optBoolean12);
                if (optJSONArray7 != null) {
                    int i15 = 0;
                    while (i15 < optJSONArray7.length()) {
                        JSONObject optJSONObject2 = optJSONArray7.optJSONObject(i15);
                        if (optJSONObject2 != null) {
                            jSONArray4 = optJSONArray7;
                            int optInt14 = optJSONObject2.optInt("placementId", -1);
                            String optString12 = optJSONObject2.optString("placementName", "");
                            str27 = str26;
                            jSONObject10 = jSONObject9;
                            boolean optBoolean15 = optJSONObject2.optBoolean("isDefault", false);
                            com.ironsource.mediationsdk.model.m g82 = g8(optJSONObject2);
                            if (optInt14 >= 0 && !TextUtils.isEmpty(optString12)) {
                                interstitialPlacement = new InterstitialPlacement(optInt14, optString12, optBoolean15, g82);
                                if (g82 != null) {
                                    j.a(kVar.L49BM, interstitialPlacement);
                                }
                                if (interstitialPlacement == null) {
                                    hVar.a.add(interstitialPlacement);
                                    if (hVar.m != null && !interstitialPlacement.isPlacementId(0)) {
                                    }
                                    hVar.m = interstitialPlacement;
                                }
                                i15++;
                                optJSONArray7 = jSONArray4;
                                str26 = str27;
                                jSONObject9 = jSONObject10;
                            }
                        } else {
                            jSONObject10 = jSONObject9;
                            jSONArray4 = optJSONArray7;
                            str27 = str26;
                        }
                        interstitialPlacement = null;
                        if (interstitialPlacement == null) {
                        }
                        i15++;
                        optJSONArray7 = jSONArray4;
                        str26 = str27;
                        jSONObject9 = jSONObject10;
                    }
                }
                jSONObject3 = jSONObject9;
                str13 = str26;
            } else {
                str8 = str3;
                str9 = str7;
                jSONObject3 = jSONObject11;
                str10 = str4;
                str11 = str;
                str12 = str5;
                qVar2 = qVar;
                str13 = "eventsCompression";
                hVar = null;
            }
            if (VJ9 != null) {
                JSONArray optJSONArray12 = VJ9.optJSONArray(str10);
                JSONObject VJ24 = VJ(VJ9, str11);
                JSONObject O2WW392N3 = kVar.O2WW392N(VJ9, "providers");
                int gt65QHUX11 = gt65QHUX(VJ9, VJ5, "maxNumOfAdaptersToLoadOnStart", 1);
                str14 = str10;
                long jB = jB(VJ9, VJ5, "atim", 10000L);
                int gt65QHUX12 = gt65QHUX(VJ9, VJ5, "delayLoadFailure", 3);
                int gt65QHUX13 = gt65QHUX(VJ9, VJ5, "bannerInterval", 60);
                boolean Bcny5qC12 = Bcny5qC1(VJ9, VJ5, "isOneFlow", false);
                boolean optBoolean16 = VJ9.optBoolean("collectBiddingDataAsyncEnabled", false);
                JSONArray jSONArray7 = optJSONArray12;
                long optLong4 = VJ9.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
                boolean optBoolean17 = O2WW392N3.optBoolean("parallelInit", false);
                boolean optBoolean18 = O2WW392N3.optBoolean("waitUntilAllProvidersFinishInit", false);
                int gt65QHUX14 = gt65QHUX(VJ9, VJ5, "advancedLoading", 0);
                if (gt65QHUX14 > 0) {
                    i2 = gt65QHUX14;
                    z3 = true;
                } else {
                    z3 = false;
                    i2 = gt65QHUX11;
                }
                JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(VJ24, VJ11);
                boolean optBoolean19 = mergeJsons3.optBoolean("sendEventsToggle", false);
                str15 = str13;
                boolean optBoolean20 = mergeJsons3.optBoolean(str15, false);
                int optInt15 = mergeJsons3.optInt(str12, -1);
                str16 = str8;
                String optString13 = mergeJsons3.optString(str16, "");
                String str40 = str9;
                String optString14 = mergeJsons3.optString(str40, "");
                String str41 = str2;
                int optInt16 = mergeJsons3.optInt(str41, -1);
                String str42 = str6;
                int optInt17 = mergeJsons3.optInt(str42, -1);
                hVar2 = hVar;
                String str43 = str28;
                int optInt18 = mergeJsons3.optInt(str43, 5000);
                str28 = str43;
                String str44 = str29;
                JSONArray optJSONArray13 = mergeJsons3.optJSONArray(str44);
                if (optJSONArray13 != null) {
                    str29 = str44;
                    int[] iArr29 = new int[optJSONArray13.length()];
                    str2 = str41;
                    str6 = str42;
                    for (int i16 = 0; i16 < optJSONArray13.length(); i16++) {
                        iArr29[i16] = optJSONArray13.optInt(i16);
                    }
                    iArr9 = iArr29;
                } else {
                    str29 = str44;
                    str2 = str41;
                    str6 = str42;
                    iArr9 = null;
                }
                String str45 = str31;
                JSONArray optJSONArray14 = mergeJsons3.optJSONArray(str45);
                if (optJSONArray14 != null) {
                    int[] iArr30 = new int[optJSONArray14.length()];
                    str31 = str45;
                    for (int i17 = 0; i17 < optJSONArray14.length(); i17++) {
                        iArr30[i17] = optJSONArray14.optInt(i17);
                    }
                    iArr10 = iArr30;
                } else {
                    str31 = str45;
                    iArr10 = null;
                }
                String str46 = str30;
                JSONArray optJSONArray15 = mergeJsons3.optJSONArray(str46);
                if (optJSONArray15 != null) {
                    int[] iArr31 = new int[optJSONArray15.length()];
                    str30 = str46;
                    for (int i18 = 0; i18 < optJSONArray15.length(); i18++) {
                        iArr31[i18] = optJSONArray15.optInt(i18);
                    }
                    iArr11 = iArr31;
                } else {
                    str30 = str46;
                    iArr11 = null;
                }
                JSONArray optJSONArray16 = mergeJsons3.optJSONArray("nonConnectivityEvents");
                if (optJSONArray16 != null) {
                    int[] iArr32 = new int[optJSONArray16.length()];
                    for (int i19 = 0; i19 < optJSONArray16.length(); i19++) {
                        iArr32[i19] = optJSONArray16.optInt(i19);
                    }
                    iArr12 = iArr32;
                } else {
                    iArr12 = null;
                }
                x xVar3 = new x(false, optBoolean19, optBoolean20, optInt15, optString13, optString14, optInt16, optInt17, optInt18, iArr9, iArr10, iArr11, iArr12);
                if (jSONObject3 != null) {
                    jSONObject7 = jSONObject3;
                    JSONObject VJ25 = VJ(jSONObject7, "banner");
                    cVar3 = VJ25 != null ? new c(jSONObject7.optString("auctionData", ""), jSONObject7.optString("auctioneerURL", ""), jSONObject7.optString("extAuctioneerURL", ""), jSONObject7.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject7.optInt("auctionSavedHistory", 15), jSONObject7.optLong("auctionTimeout", 10000L), VJ25.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), VJ25.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, 0, jSONObject7.optBoolean("compressAuctionRequest", false), jSONObject7.optBoolean("compressAuctionResponse", false), VJ25.optBoolean("objectPerWaterfall", false), jSONObject7.optInt("encryptionVersion", 1), VJ25.optBoolean("shouldSendBannerBURLFromImpression", true)) : new c();
                } else {
                    jSONObject7 = jSONObject3;
                    cVar3 = new c();
                }
                dVar = new com.ironsource.mediationsdk.model.d(i2, jB, z3, xVar3, gt65QHUX13, cVar3, gt65QHUX12, Bcny5qC12, optBoolean16, optLong4, optBoolean17, optBoolean18);
                if (jSONArray7 != null) {
                    int i20 = 0;
                    while (i20 < jSONArray7.length()) {
                        JSONArray jSONArray8 = jSONArray7;
                        JSONObject optJSONObject3 = jSONArray8.optJSONObject(i20);
                        if (optJSONObject3 != null) {
                            jSONArray3 = jSONArray8;
                            int optInt19 = optJSONObject3.optInt("placementId", -1);
                            String optString15 = optJSONObject3.optString("placementName", "");
                            jSONObject8 = jSONObject7;
                            str25 = str40;
                            boolean optBoolean21 = optJSONObject3.optBoolean("isDefault", false);
                            com.ironsource.mediationsdk.model.m g83 = g8(optJSONObject3);
                            if (optInt19 >= 0 && !TextUtils.isEmpty(optString15)) {
                                eVar = new com.ironsource.mediationsdk.model.e(optInt19, optString15, optBoolean21, g83);
                                if (g83 != null) {
                                    try {
                                        j.a(this.L49BM, eVar);
                                    } catch (Exception e3) {
                                        exc = e3;
                                        exc.printStackTrace();
                                        return;
                                    }
                                }
                                if (eVar == null) {
                                    dVar.e.add(eVar);
                                    if (dVar.f == null || eVar.isPlacementId(0)) {
                                        dVar.f = eVar;
                                    }
                                }
                                i20++;
                                jSONArray7 = jSONArray3;
                                str40 = str25;
                                jSONObject7 = jSONObject8;
                            }
                        } else {
                            jSONObject8 = jSONObject7;
                            str25 = str40;
                            jSONArray3 = jSONArray8;
                        }
                        eVar = null;
                        if (eVar == null) {
                        }
                        i20++;
                        jSONArray7 = jSONArray3;
                        str40 = str25;
                        jSONObject7 = jSONObject8;
                    }
                }
                jSONObject3 = jSONObject7;
                str17 = str40;
                kVar2 = this;
            } else {
                str14 = str10;
                kVar2 = kVar;
                str15 = str13;
                str16 = str8;
                str17 = str9;
                hVar2 = hVar;
                dVar = null;
            }
            if (VJ10 != null) {
                String str47 = str14;
                try {
                    JSONArray optJSONArray17 = VJ10.optJSONArray(str47);
                    JSONObject VJ26 = VJ(VJ10, str11);
                    JSONObject O2WW392N4 = kVar2.O2WW392N(VJ10, "providers");
                    dVar2 = dVar;
                    str14 = str47;
                    int gt65QHUX15 = gt65QHUX(VJ10, VJ5, "maxNumOfAdaptersToLoadOnStart", 1);
                    String str48 = str12;
                    long jB2 = jB(VJ10, VJ5, "atim", 10000L);
                    int gt65QHUX16 = gt65QHUX(VJ10, VJ5, "delayLoadFailure", 0);
                    boolean optBoolean22 = VJ10.optBoolean("collectBiddingDataAsyncEnabled", false);
                    long optLong5 = VJ10.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
                    boolean optBoolean23 = O2WW392N4.optBoolean("parallelInit", false);
                    boolean optBoolean24 = O2WW392N4.optBoolean("waitUntilAllProvidersFinishInit", false);
                    int gt65QHUX17 = gt65QHUX(VJ10, VJ5, "advancedLoading", 0);
                    if (gt65QHUX17 > 0) {
                        i = gt65QHUX17;
                        z2 = true;
                    } else {
                        z2 = false;
                        i = gt65QHUX15;
                    }
                    JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(VJ26, VJ11);
                    boolean optBoolean25 = mergeJsons4.optBoolean("sendEventsToggle", false);
                    boolean optBoolean26 = mergeJsons4.optBoolean(str15, false);
                    str12 = str48;
                    int optInt20 = mergeJsons4.optInt(str12, -1);
                    String optString16 = mergeJsons4.optString(str16, "");
                    str18 = str17;
                    String optString17 = mergeJsons4.optString(str18, "");
                    String str49 = str2;
                    int optInt21 = mergeJsons4.optInt(str49, -1);
                    String str50 = str6;
                    int optInt22 = mergeJsons4.optInt(str50, -1);
                    String str51 = str28;
                    int optInt23 = mergeJsons4.optInt(str51, 5000);
                    jSONObject4 = VJ5;
                    String str52 = str29;
                    JSONArray optJSONArray18 = mergeJsons4.optJSONArray(str52);
                    if (optJSONArray18 != null) {
                        str29 = str52;
                        int[] iArr33 = new int[optJSONArray18.length()];
                        str28 = str51;
                        str6 = str50;
                        for (int i21 = 0; i21 < optJSONArray18.length(); i21++) {
                            iArr33[i21] = optJSONArray18.optInt(i21);
                        }
                        iArr5 = iArr33;
                    } else {
                        str28 = str51;
                        str6 = str50;
                        str29 = str52;
                        iArr5 = null;
                    }
                    String str53 = str31;
                    JSONArray optJSONArray19 = mergeJsons4.optJSONArray(str53);
                    if (optJSONArray19 != null) {
                        int[] iArr34 = new int[optJSONArray19.length()];
                        str31 = str53;
                        for (int i22 = 0; i22 < optJSONArray19.length(); i22++) {
                            iArr34[i22] = optJSONArray19.optInt(i22);
                        }
                        iArr6 = iArr34;
                    } else {
                        str31 = str53;
                        iArr6 = null;
                    }
                    String str54 = str30;
                    JSONArray optJSONArray20 = mergeJsons4.optJSONArray(str54);
                    if (optJSONArray20 != null) {
                        int[] iArr35 = new int[optJSONArray20.length()];
                        str30 = str54;
                        for (int i23 = 0; i23 < optJSONArray20.length(); i23++) {
                            iArr35[i23] = optJSONArray20.optInt(i23);
                        }
                        iArr7 = iArr35;
                    } else {
                        str30 = str54;
                        iArr7 = null;
                    }
                    JSONArray optJSONArray21 = mergeJsons4.optJSONArray("nonConnectivityEvents");
                    if (optJSONArray21 != null) {
                        int[] iArr36 = new int[optJSONArray21.length()];
                        for (int i24 = 0; i24 < optJSONArray21.length(); i24++) {
                            iArr36[i24] = optJSONArray21.optInt(i24);
                        }
                        iArr8 = iArr36;
                    } else {
                        iArr8 = null;
                    }
                    x xVar4 = new x(false, optBoolean25, optBoolean26, optInt20, optString16, optString17, optInt21, optInt22, optInt23, iArr5, iArr6, iArr7, iArr8);
                    if (jSONObject3 != null) {
                        jSONObject5 = jSONObject3;
                        if (VJ(jSONObject5, "nativeAd") != null) {
                            cVar2 = new c(jSONObject5.optString("auctionData", ""), jSONObject5.optString("auctioneerURL", ""), jSONObject5.optString("extAuctioneerURL", ""), jSONObject5.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject5.optInt("auctionSavedHistory", 15), jSONObject5.optLong("auctionTimeout", 10000L), true, VJ2.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, 0, jSONObject5.optBoolean("compressAuctionRequest", false), jSONObject5.optBoolean("compressAuctionResponse", false), true, jSONObject5.optInt("encryptionVersion", 1), false);
                            iVar = new com.ironsource.mediationsdk.model.i(i, jB2, z2, xVar4, cVar2, gt65QHUX16, optBoolean22, optLong5, optBoolean23, optBoolean24);
                            if (optJSONArray17 != null) {
                                int i25 = 0;
                                while (i25 < optJSONArray17.length()) {
                                    JSONObject optJSONObject4 = optJSONArray17.optJSONObject(i25);
                                    if (optJSONObject4 != null) {
                                        jSONArray2 = optJSONArray17;
                                        int optInt24 = optJSONObject4.optInt("placementId", -1);
                                        String optString18 = optJSONObject4.optString("placementName", "");
                                        jSONObject6 = jSONObject5;
                                        str24 = str49;
                                        boolean optBoolean27 = optJSONObject4.optBoolean("isDefault", false);
                                        com.ironsource.mediationsdk.model.m g84 = g8(optJSONObject4);
                                        if (optInt24 >= 0 && !TextUtils.isEmpty(optString18)) {
                                            jVar = new com.ironsource.mediationsdk.model.j(optInt24, optString18, optBoolean27, g84);
                                            if (g84 != null) {
                                                try {
                                                    j.a(this.L49BM, jVar);
                                                } catch (Exception e4) {
                                                    e = e4;
                                                    exc = e;
                                                    exc.printStackTrace();
                                                    return;
                                                }
                                            }
                                            if (jVar == null) {
                                                iVar.a(jVar);
                                            }
                                            i25++;
                                            optJSONArray17 = jSONArray2;
                                            jSONObject5 = jSONObject6;
                                            str49 = str24;
                                        }
                                    } else {
                                        jSONObject6 = jSONObject5;
                                        str24 = str49;
                                        jSONArray2 = optJSONArray17;
                                    }
                                    jVar = null;
                                    if (jVar == null) {
                                    }
                                    i25++;
                                    optJSONArray17 = jSONArray2;
                                    jSONObject5 = jSONObject6;
                                    str49 = str24;
                                }
                            }
                            jSONObject3 = jSONObject5;
                            str2 = str49;
                            kVar3 = this;
                        } else {
                            cVar = new c();
                        }
                    } else {
                        jSONObject5 = jSONObject3;
                        cVar = new c();
                    }
                    cVar2 = cVar;
                    iVar = new com.ironsource.mediationsdk.model.i(i, jB2, z2, xVar4, cVar2, gt65QHUX16, optBoolean22, optLong5, optBoolean23, optBoolean24);
                    if (optJSONArray17 != null) {
                    }
                    jSONObject3 = jSONObject5;
                    str2 = str49;
                    kVar3 = this;
                } catch (Exception e5) {
                    e = e5;
                    exc = e;
                    exc.printStackTrace();
                    return;
                }
            } else {
                dVar2 = dVar;
                jSONObject4 = VJ5;
                kVar3 = kVar2;
                str18 = str17;
                iVar = null;
            }
            if (VJ8 != null) {
                JSONObject mergeJsons5 = IronSourceUtils.mergeJsons(VJ(VJ8, str11), VJ11);
                boolean optBoolean28 = mergeJsons5.optBoolean("sendEventsToggle", false);
                boolean optBoolean29 = mergeJsons5.optBoolean(str15, false);
                int optInt25 = mergeJsons5.optInt(str12, -1);
                String optString19 = mergeJsons5.optString(str16, "");
                String optString20 = mergeJsons5.optString(str18, "");
                int optInt26 = mergeJsons5.optInt(str2, -1);
                int optInt27 = mergeJsons5.optInt(str6, -1);
                int optInt28 = mergeJsons5.optInt(str28, 5000);
                str20 = str29;
                JSONArray optJSONArray22 = mergeJsons5.optJSONArray(str20);
                if (optJSONArray22 != null) {
                    int[] iArr37 = new int[optJSONArray22.length()];
                    for (int i26 = 0; i26 < optJSONArray22.length(); i26++) {
                        iArr37[i26] = optJSONArray22.optInt(i26);
                    }
                    iArr = iArr37;
                } else {
                    iArr = null;
                }
                str21 = str31;
                JSONArray optJSONArray23 = mergeJsons5.optJSONArray(str21);
                if (optJSONArray23 != null) {
                    int[] iArr38 = new int[optJSONArray23.length()];
                    for (int i27 = 0; i27 < optJSONArray23.length(); i27++) {
                        iArr38[i27] = optJSONArray23.optInt(i27);
                    }
                    iArr2 = iArr38;
                } else {
                    iArr2 = null;
                }
                JSONArray optJSONArray24 = mergeJsons5.optJSONArray(str30);
                if (optJSONArray24 != null) {
                    int[] iArr39 = new int[optJSONArray24.length()];
                    for (int i28 = 0; i28 < optJSONArray24.length(); i28++) {
                        iArr39[i28] = optJSONArray24.optInt(i28);
                    }
                    iArr3 = iArr39;
                } else {
                    iArr3 = null;
                }
                JSONArray optJSONArray25 = mergeJsons5.optJSONArray("nonConnectivityEvents");
                if (optJSONArray25 != null) {
                    int[] iArr40 = new int[optJSONArray25.length()];
                    for (int i29 = 0; i29 < optJSONArray25.length(); i29++) {
                        iArr40[i29] = optJSONArray25.optInt(i29);
                    }
                    iArr4 = iArr40;
                } else {
                    iArr4 = null;
                }
                kVar4 = new com.ironsource.mediationsdk.model.k(new x(false, optBoolean28, optBoolean29, optInt25, optString19, optString20, optInt26, optInt27, optInt28, iArr, iArr2, iArr3, iArr4));
                kVar4.d = VJ8;
                JSONArray optJSONArray26 = VJ8.optJSONArray(str14);
                if (optJSONArray26 != null) {
                    int i30 = 0;
                    while (i30 < optJSONArray26.length()) {
                        JSONObject optJSONObject5 = optJSONArray26.optJSONObject(i30);
                        if (optJSONObject5 != null) {
                            int optInt29 = optJSONObject5.optInt("placementId", -1);
                            String optString21 = optJSONObject5.optString("placementName", "");
                            jSONArray = optJSONArray26;
                            str23 = str11;
                            boolean optBoolean30 = optJSONObject5.optBoolean("isDefault", false);
                            if (optInt29 >= 0 && !TextUtils.isEmpty(optString21)) {
                                lVar = new com.ironsource.mediationsdk.model.l(optInt29, optString21, optBoolean30);
                                if (lVar == null) {
                                    kVar4.a.add(lVar);
                                    if (kVar4.f3526b != null && !lVar.isPlacementId(0)) {
                                    }
                                    kVar4.f3526b = lVar;
                                }
                                i30++;
                                optJSONArray26 = jSONArray;
                                str11 = str23;
                            }
                        } else {
                            jSONArray = optJSONArray26;
                            str23 = str11;
                        }
                        lVar = null;
                        if (lVar == null) {
                        }
                        i30++;
                        optJSONArray26 = jSONArray;
                        str11 = str23;
                    }
                }
                str19 = str11;
            } else {
                str19 = str11;
                str20 = str29;
                str21 = str31;
                kVar4 = null;
            }
            n nVar = new n();
            if (VJ13 != null) {
                JSONArray optJSONArray27 = VJ13.optJSONArray("optInKeys");
                if (optJSONArray27 != null) {
                    for (int i31 = 0; i31 < optJSONArray27.length(); i31++) {
                        String optString22 = optJSONArray27.optString(i31);
                        if (!TextUtils.isEmpty(optString22)) {
                            nVar.a.add(optString22);
                        }
                    }
                }
                JSONObject optJSONObject6 = VJ13.optJSONObject("tokenGenericParams");
                if (optJSONObject6 != null) {
                    nVar.c = optJSONObject6;
                }
                nVar.d = VJ13.optBoolean("oneToken", false);
                nVar.e = VJ13.optBoolean("compressToken", true);
            }
            i iVar2 = new i();
            if (VJ19 != null) {
                String optString23 = VJ19.optString("pixelEventsUrl", "https://outcome-ssp.supersonicads.com/mediation?adUnit=3");
                z = VJ19.optBoolean("pixelEventsEnabled", true);
                iVar2.a(optString23);
            } else {
                z = true;
            }
            iVar2.a(z);
            if (z) {
                iVar2.a(AhRu0ksV(VJ11, str20));
                iVar2.b(AhRu0ksV(VJ11, str21));
                iVar2.b(VJ11.optBoolean(str15, false));
                iVar2.a(VJ11.optInt(str12, -1));
            }
            JSONObject jSONObject12 = jSONObject;
            com.ironsource.sdk.g.d dVar3 = new com.ironsource.sdk.g.d(jSONObject12.optInt("server", 3), jSONObject12.optInt("publisher", 3), jSONObject12.optInt("console", 3), jSONObject12.optBoolean("shouldSendPublisherLogsOnUIThread", false));
            com.ironsource.sdk.f.a aVar = new com.ironsource.sdk.f.a();
            if (jSONObject2 != null) {
                JSONObject jSONObject13 = jSONObject2;
                aVar.a(jSONObject13.optBoolean("enabled", false));
                aVar.b(jSONObject13.optString("reporterURL", ""));
                aVar.c(jSONObject13.optString("reporterKeyword", ""));
                aVar.b(jSONObject13.optBoolean("includeANR", false));
                aVar.a(jSONObject13.optInt("timeout", 5000));
                aVar.c(jSONObject13.optBoolean("setIgnoreDebugger", false));
                JSONArray optJSONArray28 = jSONObject13.optJSONArray("keysToInclude");
                if (optJSONArray28 != null) {
                    for (int i32 = 0; i32 < optJSONArray28.length(); i32++) {
                        aVar.a(optJSONArray28.optString(i32));
                    }
                }
            }
            r rVar = VJ14 != null ? new r(VJ14.optString("name", ""), VJ14.optString("id", "-1"), VJ14.optJSONObject(AdType.CUSTOM)) : null;
            b bVar = new b(VJ17 != null ? VJ17 : new JSONObject());
            com.ironsource.mediationsdk.model.c cVar7 = new com.ironsource.mediationsdk.model.c();
            if (VJ18 != null) {
                JSONObject optJSONObject7 = VJ18.optJSONObject("mediationTypes");
                Map hashMap = new HashMap();
                if (optJSONObject7 != null) {
                    hashMap = IronSourceUtils.parseJsonToStringMap(optJSONObject7);
                }
                cVar7 = new com.ironsource.mediationsdk.model.c(hashMap);
            }
            com.ironsource.sdk.a.g gVar = new com.ironsource.sdk.a.g(dVar3, rVar, nVar, jSONObject4.optBoolean("integration", false), aVar, bVar, cVar7, iVar2, jSONObject3 != null ? new com.ironsource.mediationsdk.model.b(jSONObject3.optString("auctionData")) : new com.ironsource.mediationsdk.model.b());
            s sVar = new s();
            JSONObject VJ27 = VJ(VJ3, "testSuite");
            if (VJ27 != null) {
                sVar.a(VJ27.optString("controllerUrl"));
            }
            g gVar2 = new g();
            JSONObject VJ28 = VJ(VJ3, "AdQuality");
            if (VJ28 != null) {
                gVar2.a(VJ28.optBoolean("initSDK"));
            }
            f.a aVar2 = new f.a();
            aVar2.a(qVar2);
            aVar2.a(hVar2);
            aVar2.a(kVar4);
            aVar2.a(dVar2);
            aVar2.a(iVar);
            aVar2.a(gVar);
            aVar2.a(sVar);
            aVar2.a(gVar2);
            kVar3.c = aVar2.a();
            JSONObject VJ29 = VJ(VJ11, IronSourceConstants.EVENTS_GENERIC_PARAMS);
            if (VJ29 != null && (VJ = VJ(VJ29, (str22 = str19))) != null) {
                VJ29.remove(str22);
                Map<String, String> parseJsonToStringMap = IronSourceUtils.parseJsonToStringMap(VJ);
                com.ironsource.mediationsdk.events.i.d().b(parseJsonToStringMap);
                com.ironsource.mediationsdk.events.e.d().b(parseJsonToStringMap);
            }
            if (VJ29 != null) {
                Map<String, String> parseJsonToStringMap2 = IronSourceUtils.parseJsonToStringMap(VJ29);
                com.ironsource.mediationsdk.events.i.d().a(parseJsonToStringMap2);
                com.ironsource.mediationsdk.events.e.d().a(parseJsonToStringMap2);
            }
        } catch (Exception e6) {
            e = e6;
        }
    }

    private JSONObject O2WW392N(JSONObject jSONObject, String str) {
        JSONObject VJ = VJ(jSONObject, str);
        return VJ != null ? VJ : new JSONObject();
    }

    private static JSONObject VJ(JSONObject jSONObject, String str) {
        if (jSONObject != null) {
            return jSONObject.optJSONObject(str);
        }
        return null;
    }

    private void g7L28() {
        String str;
        JSONObject jSONObject;
        Iterator<String> it;
        NetworkSettings networkSettings;
        p pVar;
        String str2 = "Mediation";
        try {
            this.f3537b = p.a();
            JSONObject VJ = VJ(this.d, "providerSettings");
            Iterator<String> keys = VJ.keys();
            while (keys.hasNext()) {
                String next = keys.next();
                JSONObject optJSONObject = VJ.optJSONObject(next);
                if (optJSONObject != null) {
                    boolean optBoolean = optJSONObject.optBoolean("mpis", false);
                    String optString = optJSONObject.optString(IronSourceConstants.EVENTS_SUB_PROVIDER_ID, "0");
                    String optString2 = optJSONObject.optString("adSourceName", null);
                    String optString3 = optJSONObject.optString("providerLoadName", next);
                    String optString4 = optJSONObject.optString("providerDefaultInstance", optString3);
                    JSONObject VJ2 = VJ(optJSONObject, "adUnits");
                    JSONObject VJ3 = VJ(optJSONObject, "application");
                    JSONObject VJ4 = VJ(VJ2, "rewardedVideo");
                    JSONObject VJ5 = VJ(VJ2, "interstitial");
                    JSONObject VJ6 = VJ(VJ2, "banner");
                    JSONObject VJ7 = VJ(VJ2, "nativeAd");
                    JSONObject mergeJsons = IronSourceUtils.mergeJsons(VJ4, VJ3);
                    JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(VJ5, VJ3);
                    JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(VJ6, VJ3);
                    JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(VJ7, VJ3);
                    if (this.f3537b.b(next)) {
                        NetworkSettings a2 = this.f3537b.a(next);
                        JSONObject rewardedVideoSettings = a2.getRewardedVideoSettings();
                        JSONObject interstitialSettings = a2.getInterstitialSettings();
                        JSONObject bannerSettings = a2.getBannerSettings();
                        JSONObject nativeAdSettings = a2.getNativeAdSettings();
                        a2.setRewardedVideoSettings(IronSourceUtils.mergeJsons(rewardedVideoSettings, mergeJsons));
                        a2.setInterstitialSettings(IronSourceUtils.mergeJsons(interstitialSettings, mergeJsons2));
                        a2.setBannerSettings(IronSourceUtils.mergeJsons(bannerSettings, mergeJsons3));
                        a2.setNativeAdSettings(IronSourceUtils.mergeJsons(nativeAdSettings, mergeJsons4));
                        a2.setIsMultipleInstances(optBoolean);
                        a2.setSubProviderId(optString);
                        a2.setAdSourceNameForEvents(optString2);
                    } else {
                        String lowerCase = StringUtils.toLowerCase(optString3);
                        jSONObject = VJ;
                        if (this.f3537b.b(str2) && (StringUtils.toLowerCase(IronSourceConstants.SUPERSONIC_CONFIG_NAME).equals(lowerCase) || StringUtils.toLowerCase(IronSourceConstants.IRONSOURCE_CONFIG_NAME).equals(lowerCase))) {
                            NetworkSettings a3 = this.f3537b.a(str2);
                            str = str2;
                            it = keys;
                            networkSettings = new NetworkSettings(next, optString3, optString4, VJ3, IronSourceUtils.mergeJsons(new JSONObject(a3.getRewardedVideoSettings().toString()), mergeJsons), IronSourceUtils.mergeJsons(new JSONObject(a3.getInterstitialSettings().toString()), mergeJsons2), IronSourceUtils.mergeJsons(new JSONObject(a3.getBannerSettings().toString()), mergeJsons3), IronSourceUtils.mergeJsons(new JSONObject(a3.getNativeAdSettings().toString()), mergeJsons4));
                            networkSettings.setIsMultipleInstances(optBoolean);
                            networkSettings.setSubProviderId(optString);
                            networkSettings.setAdSourceNameForEvents(optString2);
                            pVar = this.f3537b;
                        } else {
                            str = str2;
                            it = keys;
                            networkSettings = new NetworkSettings(next, optString3, optString4, VJ3, mergeJsons, mergeJsons2, mergeJsons3, mergeJsons4);
                            networkSettings.setIsMultipleInstances(optBoolean);
                            networkSettings.setSubProviderId(optString);
                            networkSettings.setAdSourceNameForEvents(optString2);
                            pVar = this.f3537b;
                        }
                        pVar.a(networkSettings);
                    }
                } else {
                    str = str2;
                    jSONObject = VJ;
                    it = keys;
                }
                VJ = jSONObject;
                str2 = str;
                keys = it;
            }
            this.f3537b.b();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static com.ironsource.mediationsdk.model.m g8(JSONObject jSONObject) {
        com.ironsource.mediationsdk.model.n nVar = null;
        if (jSONObject == null) {
            return null;
        }
        m.a aVar = new m.a();
        boolean z = true;
        aVar.a = jSONObject.optBoolean("delivery", true);
        JSONObject optJSONObject = jSONObject.optJSONObject("capping");
        if (optJSONObject != null) {
            String optString = optJSONObject.optString("unit");
            if (!TextUtils.isEmpty(optString)) {
                com.ironsource.mediationsdk.model.n nVar2 = com.ironsource.mediationsdk.model.n.PER_DAY;
                if (!nVar2.toString().equals(optString)) {
                    nVar2 = com.ironsource.mediationsdk.model.n.PER_HOUR;
                }
                nVar = nVar2;
            }
            int optInt = optJSONObject.optInt("maxImpressions", 0);
            aVar.a(optJSONObject.optBoolean("enabled", false) && optInt > 0, nVar, optInt);
        }
        JSONObject optJSONObject2 = jSONObject.optJSONObject("pacing");
        if (optJSONObject2 != null) {
            int optInt2 = optJSONObject2.optInt("numOfSeconds", 0);
            if (!optJSONObject2.optBoolean("enabled", false) || optInt2 <= 0) {
                z = false;
            }
            aVar.a(z, optInt2);
        }
        return aVar.a();
    }

    private static int gt65QHUX(JSONObject jSONObject, JSONObject jSONObject2, String str, int i) {
        int i2 = 0;
        if (jSONObject.has(str)) {
            i2 = jSONObject.optInt(str, 0);
        } else if (jSONObject2.has(str)) {
            i2 = jSONObject2.optInt(str, 0);
        }
        return i2 == 0 ? i : i2;
    }

    private boolean h7uEG5() {
        JSONObject VJ;
        JSONArray optJSONArray;
        JSONObject VJ2 = VJ(this.d, "providerOrder");
        JSONArray names = VJ2.names();
        if (names == null) {
            return true;
        }
        JSONObject VJ3 = VJ(VJ(this.d, "configurations"), "adUnits");
        for (int i = 0; i < names.length(); i++) {
            String optString = names.optString(i);
            JSONArray optJSONArray2 = VJ2.optJSONArray(optString);
            if (optJSONArray2 != null && optJSONArray2.length() != 0 && (VJ = VJ(VJ3, optString)) != null && ((optJSONArray = VJ.optJSONArray("placements")) == null || optJSONArray.length() == 0)) {
                return false;
            }
        }
        return true;
    }

    private static long jB(JSONObject jSONObject, JSONObject jSONObject2, String str, long j) {
        long optLong = jSONObject.has(str) ? jSONObject.optLong(str, 0L) : jSONObject2.has(str) ? jSONObject2.optLong(str, 0L) : 0L;
        if (optLong == 0) {
            return 10000L;
        }
        return optLong;
    }

    private void z29n97() {
        com.ironsource.mediationsdk.model.f fVar;
        com.ironsource.mediationsdk.model.f fVar2;
        try {
            JSONObject VJ = VJ(this.d, "providerOrder");
            JSONArray optJSONArray = VJ.optJSONArray("rewardedVideo");
            JSONArray optJSONArray2 = VJ.optJSONArray("interstitial");
            JSONArray optJSONArray3 = VJ.optJSONArray("banner");
            JSONArray optJSONArray4 = VJ.optJSONArray("nativeAd");
            this.a = new o();
            if (optJSONArray != null && (fVar2 = this.c) != null && fVar2.a() != null) {
                for (int i = 0; i < optJSONArray.length(); i++) {
                    String optString = optJSONArray.optString(i);
                    o oVar = this.a;
                    if (!TextUtils.isEmpty(optString)) {
                        oVar.a.add(optString);
                    }
                    NetworkSettings a2 = p.a().a(optString);
                    if (a2 != null) {
                        a2.setRewardedVideoPriority(i);
                    }
                }
            }
            if (optJSONArray2 != null && (fVar = this.c) != null && fVar.b() != null) {
                for (int i2 = 0; i2 < optJSONArray2.length(); i2++) {
                    String optString2 = optJSONArray2.optString(i2);
                    o oVar2 = this.a;
                    if (!TextUtils.isEmpty(optString2)) {
                        oVar2.f3529b.add(optString2);
                    }
                    NetworkSettings a3 = p.a().a(optString2);
                    if (a3 != null) {
                        a3.setInterstitialPriority(i2);
                    }
                }
            }
            if (optJSONArray3 != null) {
                for (int i3 = 0; i3 < optJSONArray3.length(); i3++) {
                    String optString3 = optJSONArray3.optString(i3);
                    o oVar3 = this.a;
                    if (!TextUtils.isEmpty(optString3)) {
                        oVar3.c.add(optString3);
                    }
                    NetworkSettings a4 = p.a().a(optString3);
                    if (a4 != null) {
                        a4.setBannerPriority(i3);
                    }
                }
            }
            if (optJSONArray4 != null) {
                for (int i4 = 0; i4 < optJSONArray4.length(); i4++) {
                    String optString4 = optJSONArray4.optString(i4);
                    o oVar4 = this.a;
                    if (!TextUtils.isEmpty(optString4)) {
                        oVar4.d.add(optString4);
                    }
                    NetworkSettings a5 = p.a().a(optString4);
                    if (a5 != null) {
                        a5.setNativeAdPriority(i4);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public final C0645v a() {
        return new C0645v(this.o8o, this.rC);
    }

    public final boolean b() {
        JSONObject jSONObject = this.d;
        return (((((jSONObject != null) && !jSONObject.has(CampaignEx.JSON_NATIVE_VIDEO_ERROR)) && this.a != null) && this.f3537b != null) && this.c != null) && h7uEG5();
    }

    public final boolean c() {
        return !TextUtils.isEmpty(this.c.g().a());
    }

    public final boolean d() {
        return this.c.f().c().d;
    }

    public final String toString() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("appKey", this.o8o);
            jSONObject.put(DataKeys.USER_ID, this.rC);
            jSONObject.put("response", this.d);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return jSONObject.toString();
    }
}