package com.ironsource; import java.util.Iterator; import java.util.Map; import kotlin.Pair; import kotlin.TuplesKt; import kotlin.collections.MapsKt__MapsKt; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; import kotlin.jvm.internal.SourceDebugExtension; import kotlin.sequences.Sequence; import kotlin.sequences.SequencesKt__SequencesKt; import kotlin.sequences.SequencesKt___SequencesKt; import org.json.JSONObject; @SourceDebugExtension({"SMAP\nProviderSettings.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ProviderSettings.kt\ncom/unity3d/sdk/internal/init/response/ProviderSettings\n+ 2 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,29:1\n215#2,2:30\n*S KotlinDebug\n*F\n+ 1 ProviderSettings.kt\ncom/unity3d/sdk/internal/init/response/ProviderSettings\n*L\n16#1:30,2\n*E\n"}) /* loaded from: classes2.dex */ public final class ro { private final Map a; public static final class a extends Lambda implements Function1 { final /* synthetic */ JSONObject a; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public a(JSONObject jSONObject) { super(1); this.a = jSONObject; } @Override // kotlin.jvm.functions.Function1 /* renamed from: a, reason: merged with bridge method [inline-methods] */ public final Pair invoke(String networkName) { Intrinsics.checkNotNullExpressionValue(networkName, "networkName"); JSONObject jSONObject = this.a.getJSONObject(networkName); Intrinsics.checkNotNullExpressionValue(jSONObject, "providerSettings.getJSONObject(networkName)"); return TuplesKt.to(networkName, new rm(networkName, jSONObject)); } } public ro(JSONObject providerSettings) { Sequence asSequence; Sequence map; Map map2; Intrinsics.checkNotNullParameter(providerSettings, "providerSettings"); Iterator keys = providerSettings.keys(); Intrinsics.checkNotNullExpressionValue(keys, "providerSettings\n .keys()"); asSequence = SequencesKt__SequencesKt.asSequence(keys); map = SequencesKt___SequencesKt.map(asSequence, new a(providerSettings)); map2 = MapsKt__MapsKt.toMap(map); this.a = map2; for (Map.Entry entry : map2.entrySet()) { entry.getKey(); rm value = entry.getValue(); if (b(value)) { value.b(a(value)); } } } private final rm a(rm rmVar) { return this.a.get(rmVar.h()); } private final boolean b(rm rmVar) { return rmVar.o() && rmVar.l().length() > 0; } public final Map a() { return this.a; } }