Cyber Surfer v5.2.5版本的 MD5 值为:db13c5fce988de393e52d2679f934b22
以下内容为反编译后的 k.java 源代码,内容仅作参考
package com.ironsource.mediationsdk.utils;
import android.content.Context;
import android.text.TextUtils;
import androidx.work.WorkRequest;
import com.google.android.exoplayer2.C;
import com.ironsource.environment.StringUtils;
import com.ironsource.mediationsdk.C1519v;
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.safedk.android.analytics.events.CrashEvent;
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 boolean A;
private final int B;
private final int C;
private final int D;
private final int E;
private final boolean F;
private final String G;
private final String H;
private final String I;
private final String J;
private final String K;
private final String L;
private final String M;
private final String N;
private final String O;
private final String P;
private final String Q;
private final String R;
private final String S;
private final String T;
private final String U;
private final String V;
private final String W;
private final String X;
private final String Y;
private final String Z;
public o f6502a;
private final String aA;
private final String aB;
private final String aC;
private final String aD;
private final String aE;
private final String aF;
private final String aG;
private final String aH;
private final String aI;
private final String aJ;
private final String aK;
private final String aL;
private final String aM;
private final String aN;
private final String aO;
private final String aP;
private final String aQ;
private final String aR;
private final String aS;
private final String aT;
private final String aU;
private final String aV;
private final String aW;
private final String aX;
private final String aY;
private final String aZ;
private final String aa;
private final String ab;
private final String ac;
private final String ad;
private final String ae;
private final String af;
private final String ag;
private final String ah;
private final String ai;
private final String aj;
private final String ak;
private final String al;
private final String am;
private final String an;
private final String ao;
private final String ap;
private final String aq;
private final String ar;
private final String as;
private final String at;
private final String au;
private final String av;
private final String aw;
private final String ax;
private final String ay;
private final String az;
public p f6503b;
private final String bA;
private final String bB;
private final String bC;
private final String bD;
private final String bE;
private final String bF;
private final String bG;
private final String bH;
private final String bI;
private final String bJ;
private final String bK;
private String bL;
private String bM;
private Context bN;
private final String ba;
private final String bb;
private final String bc;
private final String bd;
private final String be;
private final String bf;
private final String bg;
private final String bh;
private final String bi;
private final String bj;
private final String bk;
private final String bl;
private final String bm;
private final String bn;
private final String bo;
private final String bp;
private final String bq;
private final String br;
private final String bs;
private final String bt;
private final String bu;
private final String bv;
private final String bw;
private final String bx;
private final String by;
private final String bz;
public com.ironsource.mediationsdk.model.f c;
public JSONObject d;
public int e;
private final String f;
private final int g;
private final int h;
private final int i;
private final int j;
private final int k;
private final int l;
private final int m;
private final int n;
private final int o;
private final int p;
private final int q;
private final int r;
private final int s;
private final int t;
private final long u;
private final int v;
private final boolean w;
private final boolean x;
private final long y;
private final boolean z;
public static final class a {
public static final int f6504a = 1;
public static final int f6505b = 2;
public static final int c = 3;
private static final int[] d = {1, 2, 3};
}
public k(Context context, String str, String str2, String str3) {
this.f = "error";
this.g = 3;
this.h = 2;
this.i = 60;
this.j = 10000;
this.k = 10000;
this.l = -1;
this.m = 5000;
this.n = 300;
this.o = 3;
this.p = 3;
this.q = 3;
this.r = 0;
this.s = 2;
this.t = 15;
this.u = WorkRequest.MIN_BACKOFF_MILLIS;
this.v = 0;
this.w = false;
this.x = false;
this.y = C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
this.z = false;
this.A = false;
this.B = com.safedk.android.analytics.brandsafety.p.c;
this.C = -1;
this.D = 5000;
this.E = 1;
this.F = false;
this.G = "providerOrder";
this.H = "providerSettings";
this.I = "configurations";
this.J = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.K = "adUnits";
this.L = "providerLoadName";
this.M = "application";
this.N = "rewardedVideo";
this.O = "interstitial";
this.P = "offerwall";
this.Q = "banner";
this.R = "nativeAd";
this.S = "integration";
this.T = "loggers";
this.U = "segment";
this.V = CrashEvent.f;
this.W = "crashReporter";
this.X = "token";
this.Y = "external";
this.Z = "mediationTypes";
this.aa = "providerDefaultInstance";
this.ab = "testSuite";
this.ac = "controllerUrl";
this.ad = "AdQuality";
this.ae = "initSDK";
this.af = "settings";
this.ag = "collectBiddingDataTimeout";
this.ah = "collectBiddingDataAsyncEnabled";
this.ai = "providers";
this.aj = "parallelInit";
this.ak = "waitUntilAllProvidersFinishInit";
this.al = "maxNumOfAdaptersToLoadOnStart";
this.am = "advancedLoading";
this.an = "adapterTimeOutInSeconds";
this.ao = "atim";
this.ap = "bannerInterval";
this.aq = "isOneFlow";
this.ar = "loadRVInterval";
this.as = "expiredDurationInMinutes";
this.at = "server";
this.au = "publisher";
this.av = "console";
this.aw = "sendUltraEvents";
this.ax = "sendEventsToggle";
this.ay = "eventsCompression";
this.az = "eventsCompressionLevel";
this.aA = "serverEventsURL";
this.aB = "serverEventsType";
this.aC = "backupThreshold";
this.aD = "maxNumberOfEvents";
this.aE = "maxEventsPerBatch";
this.aF = "optOut";
this.aG = "optIn";
this.aH = "triggerEvents";
this.aI = "nonConnectivityEvents";
this.aJ = "shouldSendPublisherLogsOnUIThread";
this.aK = "pixel";
this.aL = "pixelEventsUrl";
this.aM = "pixelEventsEnabled";
this.aN = "placements";
this.aO = "placementId";
this.aP = "placementName";
this.aQ = "delivery";
this.aR = "isDefault";
this.aS = "capping";
this.aT = "pacing";
this.aU = "enabled";
this.aV = "maxImpressions";
this.aW = "numOfSeconds";
this.aX = "unit";
this.aY = "virtualItemName";
this.aZ = "virtualItemCount";
this.ba = "uuidEnabled";
this.bb = "abt";
this.bc = "delayLoadFailure";
this.bd = "keysToInclude";
this.be = "reporterURL";
this.bf = "reporterKeyword";
this.bg = "includeANR";
this.bh = "timeout";
this.bi = "setIgnoreDebugger";
this.bj = "adSourceName";
this.bk = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.bl = "mpis";
this.bm = "auction";
this.bn = "auctionData";
this.bo = "auctioneerURL";
this.bp = "extAuctioneerURL";
this.bq = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.br = "objectPerWaterfall";
this.bs = "minTimeBeforeFirstAuction";
this.bt = "timeToWaitBeforeAuction";
this.bu = "timeToWaitBeforeLoad";
this.bv = "auctionRetryInterval";
this.bw = "isLoadWhileShow";
this.bx = IronSourceConstants.AUCTION_TRIALS;
this.by = "auctionTimeout";
this.bz = "auctionSavedHistory";
this.bA = "disableLoadWhileShowSupportFor";
this.bB = "timeToDeleteOldWaterfallAfterAuction";
this.bC = "compressAuctionRequest";
this.bD = "compressAuctionResponse";
this.bE = "encryptionVersion";
this.bF = "shouldSendBannerBURLFromImpression";
this.bG = "optInKeys";
this.bH = "tokenGenericParams";
this.bI = "oneToken";
this.bJ = "compressToken";
this.bK = "compressExternalToken";
this.e = a.f6504a;
this.bN = context;
try {
this.d = TextUtils.isEmpty(str3) ? new JSONObject() : new JSONObject(str3);
h();
i();
g();
this.bL = TextUtils.isEmpty(str) ? "" : str;
this.bM = TextUtils.isEmpty(str2) ? "" : str2;
} catch (JSONException e) {
e.printStackTrace();
e();
}
}
public k(k kVar) {
this.f = "error";
this.g = 3;
this.h = 2;
this.i = 60;
this.j = 10000;
this.k = 10000;
this.l = -1;
this.m = 5000;
this.n = 300;
this.o = 3;
this.p = 3;
this.q = 3;
this.r = 0;
this.s = 2;
this.t = 15;
this.u = WorkRequest.MIN_BACKOFF_MILLIS;
this.v = 0;
this.w = false;
this.x = false;
this.y = C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS;
this.z = false;
this.A = false;
this.B = com.safedk.android.analytics.brandsafety.p.c;
this.C = -1;
this.D = 5000;
this.E = 1;
this.F = false;
this.G = "providerOrder";
this.H = "providerSettings";
this.I = "configurations";
this.J = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.K = "adUnits";
this.L = "providerLoadName";
this.M = "application";
this.N = "rewardedVideo";
this.O = "interstitial";
this.P = "offerwall";
this.Q = "banner";
this.R = "nativeAd";
this.S = "integration";
this.T = "loggers";
this.U = "segment";
this.V = CrashEvent.f;
this.W = "crashReporter";
this.X = "token";
this.Y = "external";
this.Z = "mediationTypes";
this.aa = "providerDefaultInstance";
this.ab = "testSuite";
this.ac = "controllerUrl";
this.ad = "AdQuality";
this.ae = "initSDK";
this.af = "settings";
this.ag = "collectBiddingDataTimeout";
this.ah = "collectBiddingDataAsyncEnabled";
this.ai = "providers";
this.aj = "parallelInit";
this.ak = "waitUntilAllProvidersFinishInit";
this.al = "maxNumOfAdaptersToLoadOnStart";
this.am = "advancedLoading";
this.an = "adapterTimeOutInSeconds";
this.ao = "atim";
this.ap = "bannerInterval";
this.aq = "isOneFlow";
this.ar = "loadRVInterval";
this.as = "expiredDurationInMinutes";
this.at = "server";
this.au = "publisher";
this.av = "console";
this.aw = "sendUltraEvents";
this.ax = "sendEventsToggle";
this.ay = "eventsCompression";
this.az = "eventsCompressionLevel";
this.aA = "serverEventsURL";
this.aB = "serverEventsType";
this.aC = "backupThreshold";
this.aD = "maxNumberOfEvents";
this.aE = "maxEventsPerBatch";
this.aF = "optOut";
this.aG = "optIn";
this.aH = "triggerEvents";
this.aI = "nonConnectivityEvents";
this.aJ = "shouldSendPublisherLogsOnUIThread";
this.aK = "pixel";
this.aL = "pixelEventsUrl";
this.aM = "pixelEventsEnabled";
this.aN = "placements";
this.aO = "placementId";
this.aP = "placementName";
this.aQ = "delivery";
this.aR = "isDefault";
this.aS = "capping";
this.aT = "pacing";
this.aU = "enabled";
this.aV = "maxImpressions";
this.aW = "numOfSeconds";
this.aX = "unit";
this.aY = "virtualItemName";
this.aZ = "virtualItemCount";
this.ba = "uuidEnabled";
this.bb = "abt";
this.bc = "delayLoadFailure";
this.bd = "keysToInclude";
this.be = "reporterURL";
this.bf = "reporterKeyword";
this.bg = "includeANR";
this.bh = "timeout";
this.bi = "setIgnoreDebugger";
this.bj = "adSourceName";
this.bk = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.bl = "mpis";
this.bm = "auction";
this.bn = "auctionData";
this.bo = "auctioneerURL";
this.bp = "extAuctioneerURL";
this.bq = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.br = "objectPerWaterfall";
this.bs = "minTimeBeforeFirstAuction";
this.bt = "timeToWaitBeforeAuction";
this.bu = "timeToWaitBeforeLoad";
this.bv = "auctionRetryInterval";
this.bw = "isLoadWhileShow";
this.bx = IronSourceConstants.AUCTION_TRIALS;
this.by = "auctionTimeout";
this.bz = "auctionSavedHistory";
this.bA = "disableLoadWhileShowSupportFor";
this.bB = "timeToDeleteOldWaterfallAfterAuction";
this.bC = "compressAuctionRequest";
this.bD = "compressAuctionResponse";
this.bE = "encryptionVersion";
this.bF = "shouldSendBannerBURLFromImpression";
this.bG = "optInKeys";
this.bH = "tokenGenericParams";
this.bI = "oneToken";
this.bJ = "compressToken";
this.bK = "compressExternalToken";
this.e = a.f6504a;
try {
this.bN = kVar.bN;
this.d = new JSONObject(kVar.d.toString());
this.bL = kVar.bL;
this.bM = kVar.bM;
this.f6502a = kVar.f6502a;
this.f6503b = kVar.f6503b;
this.c = kVar.c;
this.e = kVar.e;
} catch (Exception unused) {
e();
}
}
private static int a(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 static long a(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;
return optLong == 0 ? WorkRequest.MIN_BACKOFF_MILLIS : optLong;
}
private static com.ironsource.mediationsdk.model.m a(JSONObject jSONObject) {
com.ironsource.mediationsdk.model.n nVar = null;
if (jSONObject == null) {
return null;
}
m.a aVar = new m.a();
boolean z = true;
aVar.f6347a = jSONObject.optBoolean("delivery", true);
JSONObject optJSONObject = jSONObject.optJSONObject("capping");
if (optJSONObject != null) {
String optString = optJSONObject.optString("unit");
if (!TextUtils.isEmpty(optString)) {
if (com.ironsource.mediationsdk.model.n.PER_DAY.toString().equals(optString)) {
nVar = com.ironsource.mediationsdk.model.n.PER_DAY;
} else if (com.ironsource.mediationsdk.model.n.PER_HOUR.toString().equals(optString)) {
nVar = com.ironsource.mediationsdk.model.n.PER_HOUR;
}
}
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);
aVar.a((!optJSONObject2.optBoolean("enabled", false) || optInt2 <= 0) ? false : false, optInt2);
}
return aVar.a();
}
private static boolean a(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 static int[] a(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 JSONObject b(JSONObject jSONObject, String str) {
if (jSONObject != null) {
return jSONObject.optJSONObject(str);
}
return null;
}
private JSONObject c(JSONObject jSONObject, String str) {
JSONObject b2 = b(jSONObject, str);
return b2 != null ? b2 : new JSONObject();
}
private void e() {
this.d = new JSONObject();
this.bL = "";
this.bM = "";
this.f6502a = new o();
this.f6503b = p.a();
this.c = new f.a().a();
}
private boolean f() {
JSONObject b2;
JSONArray optJSONArray;
JSONObject b3 = b(this.d, "providerOrder");
JSONArray names = b3.names();
if (names == null) {
return true;
}
JSONObject b4 = b(b(this.d, "configurations"), "adUnits");
for (int i = 0; i < names.length(); i++) {
String optString = names.optString(i);
JSONArray optJSONArray2 = b3.optJSONArray(optString);
if (optJSONArray2 != null && optJSONArray2.length() != 0 && (b2 = b(b4, optString)) != null && ((optJSONArray = b2.optJSONArray("placements")) == null || optJSONArray.length() == 0)) {
return false;
}
}
return true;
}
private void g() {
com.ironsource.mediationsdk.model.f fVar;
com.ironsource.mediationsdk.model.f fVar2;
try {
JSONObject b2 = b(this.d, "providerOrder");
JSONArray optJSONArray = b2.optJSONArray("rewardedVideo");
JSONArray optJSONArray2 = b2.optJSONArray("interstitial");
JSONArray optJSONArray3 = b2.optJSONArray("banner");
JSONArray optJSONArray4 = b2.optJSONArray("nativeAd");
this.f6502a = 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.f6502a;
if (!TextUtils.isEmpty(optString)) {
oVar.f6351a.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.f6502a;
if (!TextUtils.isEmpty(optString2)) {
oVar2.f6352b.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.f6502a;
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.f6502a;
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();
}
}
private void h() {
String str;
JSONObject jSONObject;
Iterator<String> it;
NetworkSettings networkSettings;
p pVar;
String str2 = "Mediation";
try {
this.f6503b = p.a();
JSONObject b2 = b(this.d, "providerSettings");
Iterator<String> keys = b2.keys();
while (keys.hasNext()) {
String next = keys.next();
JSONObject optJSONObject = b2.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 b3 = b(optJSONObject, "adUnits");
JSONObject b4 = b(optJSONObject, "application");
JSONObject b5 = b(b3, "rewardedVideo");
JSONObject b6 = b(b3, "interstitial");
JSONObject b7 = b(b3, "banner");
JSONObject b8 = b(b3, "nativeAd");
JSONObject mergeJsons = IronSourceUtils.mergeJsons(b5, b4);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(b6, b4);
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(b7, b4);
JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(b8, b4);
if (this.f6503b.b(next)) {
NetworkSettings a2 = this.f6503b.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 = b2;
if (this.f6503b.b(str2) && (StringUtils.toLowerCase(IronSourceConstants.SUPERSONIC_CONFIG_NAME).equals(lowerCase) || StringUtils.toLowerCase(IronSourceConstants.IRONSOURCE_CONFIG_NAME).equals(lowerCase))) {
NetworkSettings a3 = this.f6503b.a(str2);
str = str2;
it = keys;
networkSettings = new NetworkSettings(next, optString3, optString4, b4, 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.f6503b;
} else {
str = str2;
it = keys;
networkSettings = new NetworkSettings(next, optString3, optString4, b4, mergeJsons, mergeJsons2, mergeJsons3, mergeJsons4);
networkSettings.setIsMultipleInstances(optBoolean);
networkSettings.setSubProviderId(optString);
networkSettings.setAdSourceNameForEvents(optString2);
pVar = this.f6503b;
}
pVar.a(networkSettings);
}
} else {
str = str2;
jSONObject = b2;
it = keys;
}
b2 = jSONObject;
str2 = str;
keys = it;
}
this.f6503b.b();
} catch (Exception e) {
e.printStackTrace();
}
}
private void i() {
JSONObject jSONObject;
JSONObject jSONObject2;
k kVar;
String str;
String str2;
String str3;
String str4;
String str5;
q qVar;
q qVar2;
String str6;
String str7;
JSONObject jSONObject3;
String str8;
String str9;
com.ironsource.mediationsdk.model.h hVar;
com.ironsource.mediationsdk.model.h hVar2;
String str10;
String str11;
String str12;
com.ironsource.mediationsdk.model.d dVar;
com.ironsource.mediationsdk.model.d dVar2;
String str13;
String str14;
String str15;
String str16;
String str17;
JSONObject jSONObject4;
com.ironsource.mediationsdk.model.i iVar;
String str18;
String str19;
com.ironsource.mediationsdk.model.k kVar2;
boolean z;
String str20;
JSONObject b2;
int[] iArr;
int[] iArr2;
int[] iArr3;
int[] iArr4;
JSONArray jSONArray;
String str21;
com.ironsource.mediationsdk.model.l lVar;
int i;
boolean z2;
int[] iArr5;
int[] iArr6;
int[] iArr7;
int[] iArr8;
JSONObject jSONObject5;
c cVar;
c cVar2;
JSONObject jSONObject6;
com.ironsource.mediationsdk.model.j jVar;
JSONObject b3;
int i2;
boolean z3;
int[] iArr9;
int[] iArr10;
int[] iArr11;
int[] iArr12;
String str22;
JSONObject jSONObject7;
c cVar3;
JSONObject jSONObject8;
String str23;
com.ironsource.mediationsdk.model.e eVar;
int i3;
boolean z4;
int[] iArr13;
int[] iArr14;
int[] iArr15;
int[] iArr16;
String str24;
JSONObject jSONObject9;
c cVar4;
JSONObject jSONObject10;
JSONArray jSONArray2;
String str25;
InterstitialPlacement interstitialPlacement;
int i4;
boolean z5;
int[] iArr17;
int[] iArr18;
int[] iArr19;
int[] iArr20;
c cVar5;
Placement placement;
try {
JSONObject b4 = b(this.d, "configurations");
JSONObject b5 = b(b4, "adUnits");
JSONObject b6 = b(b4, "application");
JSONObject b7 = b(b5, "rewardedVideo");
JSONObject b8 = b(b5, "interstitial");
JSONObject b9 = b(b5, "offerwall");
JSONObject b10 = b(b5, "banner");
JSONObject b11 = b(b5, "nativeAd");
JSONObject b12 = b(b6, CrashEvent.f);
JSONObject b13 = b(b6, "loggers");
JSONObject b14 = b(b6, "token");
JSONObject b15 = b(b6, "segment");
JSONObject b16 = b(b6, "auction");
JSONObject b17 = b(b6, "crashReporter");
JSONObject b18 = b(b6, "settings");
JSONObject b19 = b(b6, "external");
JSONObject b20 = b(b12, "pixel");
if (b6 != null) {
jSONObject2 = b17;
jSONObject = b13;
IronSourceUtils.saveBooleanToSharedPrefs(this.bN, "uuidEnabled", b6.optBoolean("uuidEnabled", true));
} else {
jSONObject = b13;
jSONObject2 = b17;
}
if (b12 != null) {
String optString = b12.optString("abt");
if (!TextUtils.isEmpty(optString)) {
com.ironsource.mediationsdk.events.e.d().q = optString;
com.ironsource.mediationsdk.events.i.d().q = optString;
}
}
JSONObject jSONObject11 = b16;
String str26 = "maxEventsPerBatch";
String str27 = "optOut";
String str28 = "triggerEvents";
String str29 = "optIn";
if (b7 != null) {
JSONArray optJSONArray = b7.optJSONArray("placements");
str3 = "placements";
JSONObject b21 = b(b7, CrashEvent.f);
str = CrashEvent.f;
JSONObject c = c(b7, "providers");
try {
JSONArray jSONArray3 = optJSONArray;
boolean optBoolean = b7.optBoolean("collectBiddingDataAsyncEnabled", false);
long optLong = b7.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
boolean optBoolean2 = c.optBoolean("parallelInit", false);
boolean optBoolean3 = c.optBoolean("waitUntilAllProvidersFinishInit", false);
int a2 = a(b7, b6, "maxNumOfAdaptersToLoadOnStart", 2);
int a3 = a(b7, b6, "advancedLoading", 0);
if (a3 > 0) {
i4 = a3;
z5 = true;
} else {
i4 = a2;
z5 = false;
}
int a4 = a(b7, b6, "adapterTimeOutInSeconds", 60);
int a5 = a(b7, b6, "loadRVInterval", 300);
int a6 = a(b7, b6, "expiredDurationInMinutes", -1);
int a7 = a(b7, b6, "delayLoadFailure", 3);
JSONObject mergeJsons = IronSourceUtils.mergeJsons(b21, b12);
boolean optBoolean4 = mergeJsons.optBoolean("sendUltraEvents", false);
boolean optBoolean5 = mergeJsons.optBoolean("sendEventsToggle", false);
boolean optBoolean6 = mergeJsons.optBoolean("eventsCompression", false);
int optInt = mergeJsons.optInt("eventsCompressionLevel", -1);
String optString2 = mergeJsons.optString("serverEventsURL", "");
String optString3 = mergeJsons.optString("serverEventsType", "");
int optInt2 = mergeJsons.optInt("backupThreshold", -1);
int optInt3 = mergeJsons.optInt("maxNumberOfEvents", -1);
int optInt4 = mergeJsons.optInt(str26, 5000);
JSONArray optJSONArray2 = mergeJsons.optJSONArray(str27);
if (optJSONArray2 != null) {
int[] iArr21 = new int[optJSONArray2.length()];
str26 = str26;
str27 = str27;
for (int i5 = 0; i5 < optJSONArray2.length(); i5++) {
iArr21[i5] = optJSONArray2.optInt(i5);
}
iArr17 = iArr21;
} else {
str26 = str26;
str27 = str27;
iArr17 = null;
}
JSONArray optJSONArray3 = mergeJsons.optJSONArray(str29);
if (optJSONArray3 != null) {
int[] iArr22 = new int[optJSONArray3.length()];
str29 = str29;
for (int i6 = 0; i6 < optJSONArray3.length(); i6++) {
iArr22[i6] = optJSONArray3.optInt(i6);
}
iArr18 = iArr22;
} else {
str29 = str29;
iArr18 = null;
}
JSONArray optJSONArray4 = mergeJsons.optJSONArray(str28);
if (optJSONArray4 != null) {
int[] iArr23 = new int[optJSONArray4.length()];
str28 = str28;
for (int i7 = 0; i7 < optJSONArray4.length(); i7++) {
iArr23[i7] = optJSONArray4.optInt(i7);
}
iArr19 = iArr23;
} else {
str28 = str28;
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 b22 = b(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", WorkRequest.MIN_BACKOFF_MILLIS);
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;
str4 = "maxNumberOfEvents";
str2 = "backupThreshold";
str5 = "serverEventsURL";
c cVar6 = new c(optString4, optString5, optString6, optInt5, optInt6, optLong2, b22.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b22.optInt("minTimeBeforeFirstAuction", 2000), b22.optInt("auctionRetryInterval", com.safedk.android.analytics.brandsafety.p.c), b22.optInt("timeToWaitBeforeAuction", 5000), b22.optInt("timeToWaitBeforeLoad", 50), b22.optBoolean("isLoadWhileShow", true), b22.optInt("timeToDeleteOldWaterfallAfterAuction", com.safedk.android.analytics.brandsafety.p.c), optBoolean7, optBoolean8, b22.optBoolean("objectPerWaterfall", false), optInt7, false);
JSONArray optJSONArray6 = b22.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";
str4 = "maxNumberOfEvents";
str5 = "serverEventsURL";
cVar5 = new c();
}
qVar = new q(i4, z5, a4, a5, a6, xVar, cVar5, a7, optBoolean, optLong, optBoolean2, optBoolean3);
if (jSONArray3 != null) {
int i10 = 0;
while (i10 < jSONArray3.length()) {
JSONArray jSONArray4 = jSONArray3;
JSONObject optJSONObject = jSONArray4.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 a8 = a(optJSONObject);
if (optInt8 >= 0 && !TextUtils.isEmpty(optString8) && !TextUtils.isEmpty(optString9) && optInt9 > 0) {
placement = new Placement(optInt8, optString8, optBoolean9, optString9, optInt9, a8);
if (a8 != null) {
try {
j.a(this.bN, placement);
} catch (Exception e) {
e = e;
e.printStackTrace();
return;
}
}
if (placement != null && placement != null) {
qVar.f6355a.add(placement);
if (qVar.l != null && !placement.isPlacementId(0)) {
}
qVar.l = placement;
}
i10++;
jSONArray3 = jSONArray4;
}
}
placement = null;
if (placement != null) {
qVar.f6355a.add(placement);
if (qVar.l != null) {
}
qVar.l = placement;
}
i10++;
jSONArray3 = jSONArray4;
}
}
kVar = this;
} catch (Exception e2) {
e = e2;
e.printStackTrace();
return;
}
} else {
kVar = this;
str = CrashEvent.f;
str2 = "backupThreshold";
str3 = "placements";
str4 = "maxNumberOfEvents";
str5 = "serverEventsURL";
qVar = null;
}
if (b8 != null) {
str8 = str3;
JSONArray optJSONArray7 = b8.optJSONArray(str8);
String str30 = str;
JSONObject b23 = b(b8, str30);
String str31 = str5;
JSONObject c2 = kVar.c(b8, "providers");
qVar2 = qVar;
str = str30;
boolean optBoolean10 = b8.optBoolean("collectBiddingDataAsyncEnabled", false);
long optLong3 = b8.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
boolean optBoolean11 = c2.optBoolean("parallelInit", false);
boolean optBoolean12 = c2.optBoolean("waitUntilAllProvidersFinishInit", false);
int a9 = a(b8, b6, "maxNumOfAdaptersToLoadOnStart", 2);
int a10 = a(b8, b6, "advancedLoading", 0);
if (a10 > 0) {
i3 = a10;
z4 = true;
} else {
i3 = a9;
z4 = false;
}
int a11 = a(b8, b6, "adapterTimeOutInSeconds", 60);
int a12 = a(b8, b6, "delayLoadFailure", 3);
boolean a13 = a(b8, b6, "isOneFlow", false);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(b23, b12);
boolean optBoolean13 = mergeJsons2.optBoolean("sendEventsToggle", false);
boolean optBoolean14 = mergeJsons2.optBoolean("eventsCompression", false);
int optInt10 = mergeJsons2.optInt("eventsCompressionLevel", -1);
str7 = str31;
String optString10 = mergeJsons2.optString(str7, "");
String optString11 = mergeJsons2.optString("serverEventsType", "");
String str32 = str2;
int optInt11 = mergeJsons2.optInt(str32, -1);
String str33 = str4;
int optInt12 = mergeJsons2.optInt(str33, -1);
str4 = str33;
String str34 = str26;
int optInt13 = mergeJsons2.optInt(str34, 5000);
str26 = str34;
String str35 = str27;
JSONArray optJSONArray8 = mergeJsons2.optJSONArray(str35);
if (optJSONArray8 != null) {
str27 = str35;
int[] iArr25 = new int[optJSONArray8.length()];
str2 = str32;
str9 = "serverEventsType";
for (int i11 = 0; i11 < optJSONArray8.length(); i11++) {
iArr25[i11] = optJSONArray8.optInt(i11);
}
iArr13 = iArr25;
} else {
str2 = str32;
str9 = "serverEventsType";
str27 = str35;
iArr13 = null;
}
String str36 = str29;
JSONArray optJSONArray9 = mergeJsons2.optJSONArray(str36);
if (optJSONArray9 != null) {
int[] iArr26 = new int[optJSONArray9.length()];
str29 = str36;
for (int i12 = 0; i12 < optJSONArray9.length(); i12++) {
iArr26[i12] = optJSONArray9.optInt(i12);
}
iArr14 = iArr26;
} else {
str29 = str36;
iArr14 = null;
}
String str37 = str28;
JSONArray optJSONArray10 = mergeJsons2.optJSONArray(str37);
if (optJSONArray10 != null) {
int[] iArr27 = new int[optJSONArray10.length()];
str28 = str37;
for (int i13 = 0; i13 < optJSONArray10.length(); i13++) {
iArr27[i13] = optJSONArray10.optInt(i13);
}
iArr15 = iArr27;
} else {
str28 = str37;
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 b24 = b(jSONObject9, "interstitial");
str24 = "eventsCompressionLevel";
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", WorkRequest.MIN_BACKOFF_MILLIS), b24.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b24.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, 0, jSONObject9.optBoolean("compressAuctionRequest", false), jSONObject9.optBoolean("compressAuctionResponse", false), b24.optBoolean("objectPerWaterfall", false), jSONObject9.optInt("encryptionVersion", 1), false);
} else {
str24 = "eventsCompressionLevel";
jSONObject9 = jSONObject11;
cVar4 = new c();
}
hVar = new com.ironsource.mediationsdk.model.h(i3, z4, a11, xVar2, cVar4, a12, a13, optBoolean10, optLong3, optBoolean11, optBoolean12);
if (optJSONArray7 != null) {
int i15 = 0;
while (i15 < optJSONArray7.length()) {
JSONObject optJSONObject2 = optJSONArray7.optJSONObject(i15);
if (optJSONObject2 != null) {
jSONArray2 = optJSONArray7;
int optInt14 = optJSONObject2.optInt("placementId", -1);
String optString12 = optJSONObject2.optString("placementName", "");
str25 = str24;
jSONObject10 = jSONObject9;
boolean optBoolean15 = optJSONObject2.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a14 = a(optJSONObject2);
if (optInt14 >= 0 && !TextUtils.isEmpty(optString12)) {
interstitialPlacement = new InterstitialPlacement(optInt14, optString12, optBoolean15, a14);
if (a14 != null) {
j.a(kVar.bN, interstitialPlacement);
}
if (interstitialPlacement != null && interstitialPlacement != null) {
hVar.f6339a.add(interstitialPlacement);
if (hVar.m != null && !interstitialPlacement.isPlacementId(0)) {
}
hVar.m = interstitialPlacement;
}
i15++;
optJSONArray7 = jSONArray2;
str24 = str25;
jSONObject9 = jSONObject10;
}
} else {
jSONObject10 = jSONObject9;
jSONArray2 = optJSONArray7;
str25 = str24;
}
interstitialPlacement = null;
if (interstitialPlacement != null) {
hVar.f6339a.add(interstitialPlacement);
if (hVar.m != null) {
}
hVar.m = interstitialPlacement;
}
i15++;
optJSONArray7 = jSONArray2;
str24 = str25;
jSONObject9 = jSONObject10;
}
}
jSONObject3 = jSONObject9;
str6 = str24;
} else {
qVar2 = qVar;
str6 = "eventsCompressionLevel";
str7 = str5;
jSONObject3 = jSONObject11;
str8 = str3;
str9 = "serverEventsType";
hVar = null;
}
if (b10 != null) {
JSONArray optJSONArray12 = b10.optJSONArray(str8);
str11 = str;
JSONObject b25 = b(b10, str11);
JSONObject c3 = kVar.c(b10, "providers");
hVar2 = hVar;
int a15 = a(b10, b6, "maxNumOfAdaptersToLoadOnStart", 1);
JSONArray jSONArray5 = optJSONArray12;
long a16 = a(b10, b6, "atim", (long) WorkRequest.MIN_BACKOFF_MILLIS);
int a17 = a(b10, b6, "delayLoadFailure", 3);
int a18 = a(b10, b6, "bannerInterval", 60);
boolean a19 = a(b10, b6, "isOneFlow", false);
boolean optBoolean16 = b10.optBoolean("collectBiddingDataAsyncEnabled", false);
long optLong4 = b10.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
boolean optBoolean17 = c3.optBoolean("parallelInit", false);
boolean optBoolean18 = c3.optBoolean("waitUntilAllProvidersFinishInit", false);
int a20 = a(b10, b6, "advancedLoading", 0);
if (a20 > 0) {
i2 = a20;
z3 = true;
} else {
i2 = a15;
z3 = false;
}
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(b25, b12);
boolean optBoolean19 = mergeJsons3.optBoolean("sendEventsToggle", false);
boolean optBoolean20 = mergeJsons3.optBoolean("eventsCompression", false);
str12 = str6;
int optInt15 = mergeJsons3.optInt(str12, -1);
String optString13 = mergeJsons3.optString(str7, "");
String str38 = str9;
String optString14 = mergeJsons3.optString(str38, "");
String str39 = str2;
int optInt16 = mergeJsons3.optInt(str39, -1);
String str40 = str4;
int optInt17 = mergeJsons3.optInt(str40, -1);
String str41 = str26;
int optInt18 = mergeJsons3.optInt(str41, 5000);
str26 = str41;
String str42 = str27;
JSONArray optJSONArray13 = mergeJsons3.optJSONArray(str42);
if (optJSONArray13 != null) {
str27 = str42;
int[] iArr29 = new int[optJSONArray13.length()];
str2 = str39;
str4 = str40;
for (int i16 = 0; i16 < optJSONArray13.length(); i16++) {
iArr29[i16] = optJSONArray13.optInt(i16);
}
iArr9 = iArr29;
} else {
str2 = str39;
str4 = str40;
str27 = str42;
iArr9 = null;
}
String str43 = str29;
JSONArray optJSONArray14 = mergeJsons3.optJSONArray(str43);
if (optJSONArray14 != null) {
int[] iArr30 = new int[optJSONArray14.length()];
str29 = str43;
for (int i17 = 0; i17 < optJSONArray14.length(); i17++) {
iArr30[i17] = optJSONArray14.optInt(i17);
}
iArr10 = iArr30;
} else {
str29 = str43;
iArr10 = null;
}
String str44 = str28;
JSONArray optJSONArray15 = mergeJsons3.optJSONArray(str44);
if (optJSONArray15 != null) {
int[] iArr31 = new int[optJSONArray15.length()];
str28 = str44;
for (int i18 = 0; i18 < optJSONArray15.length(); i18++) {
iArr31[i18] = optJSONArray15.optInt(i18);
}
iArr11 = iArr31;
} else {
str28 = str44;
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 b26 = b(jSONObject7, "banner");
if (b26 != null) {
str9 = str38;
str22 = str7;
cVar3 = new c(jSONObject7.optString("auctionData", ""), jSONObject7.optString("auctioneerURL", ""), jSONObject7.optString("extAuctioneerURL", ""), jSONObject7.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject7.optInt("auctionSavedHistory", 15), jSONObject7.optLong("auctionTimeout", WorkRequest.MIN_BACKOFF_MILLIS), b26.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b26.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, 0, jSONObject7.optBoolean("compressAuctionRequest", false), jSONObject7.optBoolean("compressAuctionResponse", false), b26.optBoolean("objectPerWaterfall", false), jSONObject7.optInt("encryptionVersion", 1), b26.optBoolean("shouldSendBannerBURLFromImpression", true));
} else {
str9 = str38;
str22 = str7;
cVar3 = new c();
}
} else {
str9 = str38;
str22 = str7;
jSONObject7 = jSONObject3;
cVar3 = new c();
}
dVar = new com.ironsource.mediationsdk.model.d(i2, a16, z3, xVar3, a18, cVar3, a17, a19, optBoolean16, optLong4, optBoolean17, optBoolean18);
if (jSONArray5 != null) {
int i20 = 0;
while (i20 < jSONArray5.length()) {
JSONArray jSONArray6 = jSONArray5;
JSONObject optJSONObject3 = jSONArray6.optJSONObject(i20);
if (optJSONObject3 != null) {
jSONArray5 = jSONArray6;
int optInt19 = optJSONObject3.optInt("placementId", -1);
String optString15 = optJSONObject3.optString("placementName", "");
str23 = str22;
jSONObject8 = jSONObject7;
boolean optBoolean21 = optJSONObject3.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a21 = a(optJSONObject3);
if (optInt19 >= 0 && !TextUtils.isEmpty(optString15)) {
eVar = new com.ironsource.mediationsdk.model.e(optInt19, optString15, optBoolean21, a21);
if (a21 != null) {
j.a(this.bN, eVar);
}
if (eVar != null && eVar != null) {
dVar.e.add(eVar);
if (dVar.f != null && !eVar.isPlacementId(0)) {
}
dVar.f = eVar;
}
i20++;
jSONObject7 = jSONObject8;
str22 = str23;
}
} else {
jSONObject8 = jSONObject7;
jSONArray5 = jSONArray6;
str23 = str22;
}
eVar = null;
if (eVar != null) {
dVar.e.add(eVar);
if (dVar.f != null) {
}
dVar.f = eVar;
}
i20++;
jSONObject7 = jSONObject8;
str22 = str23;
}
}
jSONObject3 = jSONObject7;
str10 = str22;
kVar = this;
} else {
hVar2 = hVar;
str10 = str7;
str11 = str;
str12 = str6;
dVar = null;
}
if (b11 != null) {
JSONArray optJSONArray17 = b11.optJSONArray(str8);
JSONObject b27 = b(b11, str11);
JSONObject c4 = kVar.c(b11, "providers");
dVar2 = dVar;
int a22 = a(b11, b6, "maxNumOfAdaptersToLoadOnStart", 1);
JSONArray jSONArray7 = optJSONArray17;
str13 = str11;
long a23 = a(b11, b6, "atim", (long) WorkRequest.MIN_BACKOFF_MILLIS);
int a24 = a(b11, b6, "delayLoadFailure", 0);
boolean optBoolean22 = b11.optBoolean("collectBiddingDataAsyncEnabled", false);
long optLong5 = b11.optLong("collectBiddingDataTimeout", C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS);
boolean optBoolean23 = c4.optBoolean("parallelInit", false);
boolean optBoolean24 = c4.optBoolean("waitUntilAllProvidersFinishInit", false);
int a25 = a(b11, b6, "advancedLoading", 0);
if (a25 > 0) {
i = a25;
z2 = true;
} else {
i = a22;
z2 = false;
}
JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(b27, b12);
boolean optBoolean25 = mergeJsons4.optBoolean("sendEventsToggle", false);
boolean optBoolean26 = mergeJsons4.optBoolean("eventsCompression", false);
int optInt20 = mergeJsons4.optInt(str12, -1);
str16 = str10;
String optString16 = mergeJsons4.optString(str16, "");
str15 = str9;
String optString17 = mergeJsons4.optString(str15, "");
String str45 = str2;
int optInt21 = mergeJsons4.optInt(str45, -1);
String str46 = str4;
int optInt22 = mergeJsons4.optInt(str46, -1);
String str47 = str26;
int optInt23 = mergeJsons4.optInt(str47, 5000);
jSONObject4 = b6;
String str48 = str27;
JSONArray optJSONArray18 = mergeJsons4.optJSONArray(str48);
if (optJSONArray18 != null) {
str17 = str8;
int[] iArr33 = new int[optJSONArray18.length()];
str14 = str47;
str27 = str48;
for (int i21 = 0; i21 < optJSONArray18.length(); i21++) {
iArr33[i21] = optJSONArray18.optInt(i21);
}
iArr5 = iArr33;
} else {
str17 = str8;
str14 = str47;
str27 = str48;
iArr5 = null;
}
String str49 = str29;
JSONArray optJSONArray19 = mergeJsons4.optJSONArray(str49);
if (optJSONArray19 != null) {
int[] iArr34 = new int[optJSONArray19.length()];
str29 = str49;
for (int i22 = 0; i22 < optJSONArray19.length(); i22++) {
iArr34[i22] = optJSONArray19.optInt(i22);
}
iArr6 = iArr34;
} else {
str29 = str49;
iArr6 = null;
}
String str50 = str28;
JSONArray optJSONArray20 = mergeJsons4.optJSONArray(str50);
if (optJSONArray20 != null) {
int[] iArr35 = new int[optJSONArray20.length()];
str28 = str50;
for (int i23 = 0; i23 < optJSONArray20.length(); i23++) {
iArr35[i23] = optJSONArray20.optInt(i23);
}
iArr7 = iArr35;
} else {
str28 = str50;
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 (b(jSONObject5, "nativeAd") != null) {
str2 = str45;
str4 = str46;
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", WorkRequest.MIN_BACKOFF_MILLIS), true, b3.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, a23, z2, xVar4, cVar2, a24, optBoolean22, optLong5, optBoolean23, optBoolean24);
if (jSONArray7 != null) {
int i25 = 0;
while (i25 < jSONArray7.length()) {
JSONArray jSONArray8 = jSONArray7;
JSONObject optJSONObject4 = jSONArray8.optJSONObject(i25);
if (optJSONObject4 != null) {
int optInt24 = optJSONObject4.optInt("placementId", -1);
String optString18 = optJSONObject4.optString("placementName", "");
jSONArray7 = jSONArray8;
jSONObject6 = jSONObject5;
boolean optBoolean27 = optJSONObject4.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a26 = a(optJSONObject4);
if (optInt24 >= 0 && !TextUtils.isEmpty(optString18)) {
jVar = new com.ironsource.mediationsdk.model.j(optInt24, optString18, optBoolean27, a26);
if (a26 != null) {
j.a(kVar.bN, jVar);
}
if (jVar == null) {
iVar.a(jVar);
}
i25++;
jSONObject5 = jSONObject6;
}
} else {
jSONObject6 = jSONObject5;
jSONArray7 = jSONArray8;
}
jVar = null;
if (jVar == null) {
}
i25++;
jSONObject5 = jSONObject6;
}
}
jSONObject3 = jSONObject5;
} else {
str2 = str45;
str4 = str46;
cVar = new c();
}
} else {
str2 = str45;
str4 = str46;
jSONObject5 = jSONObject3;
cVar = new c();
}
cVar2 = cVar;
iVar = new com.ironsource.mediationsdk.model.i(i, a23, z2, xVar4, cVar2, a24, optBoolean22, optLong5, optBoolean23, optBoolean24);
if (jSONArray7 != null) {
}
jSONObject3 = jSONObject5;
} else {
dVar2 = dVar;
str13 = str11;
str14 = str26;
str15 = str9;
str16 = str10;
str17 = str8;
jSONObject4 = b6;
iVar = null;
}
if (b9 != null) {
String str51 = str13;
JSONObject mergeJsons5 = IronSourceUtils.mergeJsons(b(b9, str51), b12);
boolean optBoolean28 = mergeJsons5.optBoolean("sendEventsToggle", false);
boolean optBoolean29 = mergeJsons5.optBoolean("eventsCompression", false);
int optInt25 = mergeJsons5.optInt(str12, -1);
String optString19 = mergeJsons5.optString(str16, "");
String optString20 = mergeJsons5.optString(str15, "");
int optInt26 = mergeJsons5.optInt(str2, -1);
int optInt27 = mergeJsons5.optInt(str4, -1);
int optInt28 = mergeJsons5.optInt(str14, 5000);
str18 = str27;
JSONArray optJSONArray22 = mergeJsons5.optJSONArray(str18);
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;
}
str19 = str29;
JSONArray optJSONArray23 = mergeJsons5.optJSONArray(str19);
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(str28);
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;
}
kVar2 = new com.ironsource.mediationsdk.model.k(new x(false, optBoolean28, optBoolean29, optInt25, optString19, optString20, optInt26, optInt27, optInt28, iArr, iArr2, iArr3, iArr4));
kVar2.d = b9;
JSONArray optJSONArray26 = b9.optJSONArray(str17);
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;
str21 = str51;
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 && lVar != null) {
kVar2.f6343a.add(lVar);
if (kVar2.f6344b != null && !lVar.isPlacementId(0)) {
}
kVar2.f6344b = lVar;
}
i30++;
optJSONArray26 = jSONArray;
str51 = str21;
}
} else {
jSONArray = optJSONArray26;
str21 = str51;
}
lVar = null;
if (lVar != null) {
kVar2.f6343a.add(lVar);
if (kVar2.f6344b != null) {
}
kVar2.f6344b = lVar;
}
i30++;
optJSONArray26 = jSONArray;
str51 = str21;
}
}
str13 = str51;
} else {
str18 = str27;
str19 = str29;
kVar2 = null;
}
n nVar = new n();
if (b14 != null) {
JSONArray optJSONArray27 = b14.optJSONArray("optInKeys");
if (optJSONArray27 != null) {
for (int i31 = 0; i31 < optJSONArray27.length(); i31++) {
String optString22 = optJSONArray27.optString(i31);
if (!TextUtils.isEmpty(optString22)) {
nVar.f6510a.add(optString22);
}
}
}
JSONObject optJSONObject6 = b14.optJSONObject("tokenGenericParams");
if (optJSONObject6 != null) {
nVar.c = optJSONObject6;
}
nVar.d = b14.optBoolean("oneToken", false);
nVar.e = b14.optBoolean("compressToken", true);
}
i iVar2 = new i();
if (b20 != null) {
String optString23 = b20.optString("pixelEventsUrl", "https://outcome-ssp.supersonicads.com/mediation?adUnit=3");
z = b20.optBoolean("pixelEventsEnabled", true);
iVar2.a(optString23);
} else {
z = true;
}
iVar2.a(z);
if (z) {
iVar2.a(a(b12, str18));
iVar2.b(a(b12, str19));
iVar2.b(b12.optBoolean("eventsCompression", false));
iVar2.a(b12.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 = b15 != null ? new r(b15.optString("name", ""), b15.optString("id", "-1"), b15.optJSONObject("custom")) : null;
b bVar = new b(b18 != null ? b18 : new JSONObject());
com.ironsource.mediationsdk.model.c cVar7 = new com.ironsource.mediationsdk.model.c();
if (b19 != null) {
JSONObject optJSONObject7 = b19.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 b28 = b(b4, "testSuite");
if (b28 != null) {
sVar.a(b28.optString("controllerUrl"));
}
g gVar2 = new g();
JSONObject b29 = b(b4, "AdQuality");
if (b29 != null) {
gVar2.a(b29.optBoolean("initSDK"));
}
f.a aVar2 = new f.a();
aVar2.a(qVar2);
aVar2.a(hVar2);
aVar2.a(kVar2);
aVar2.a(dVar2);
aVar2.a(iVar);
aVar2.a(gVar);
aVar2.a(sVar);
aVar2.a(gVar2);
kVar.c = aVar2.a();
JSONObject b30 = b(b12, IronSourceConstants.EVENTS_GENERIC_PARAMS);
if (b30 != null && (b2 = b(b30, (str20 = str13))) != null) {
b30.remove(str20);
Map<String, String> parseJsonToStringMap = IronSourceUtils.parseJsonToStringMap(b2);
com.ironsource.mediationsdk.events.i.d().b(parseJsonToStringMap);
com.ironsource.mediationsdk.events.e.d().b(parseJsonToStringMap);
}
if (b30 != null) {
Map<String, String> parseJsonToStringMap2 = IronSourceUtils.parseJsonToStringMap(b30);
com.ironsource.mediationsdk.events.i.d().a(parseJsonToStringMap2);
com.ironsource.mediationsdk.events.e.d().a(parseJsonToStringMap2);
}
} catch (Exception e3) {
e = e3;
}
}
public final C1519v a() {
return new C1519v(this.bL, this.bM);
}
public final boolean b() {
JSONObject jSONObject = this.d;
return (((((jSONObject != null) && !jSONObject.has("error")) && this.f6502a != null) && this.f6503b != null) && this.c != null) && f();
}
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.bL);
jSONObject.put(DataKeys.USER_ID, this.bM);
jSONObject.put("response", this.d);
} catch (JSONException e) {
e.printStackTrace();
}
return jSONObject.toString();
}
}