package com.chartboost.sdk.impl;

import android.webkit.WebView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/* loaded from: classes2.dex */
public final class r {

    /* renamed from: a  reason: collision with root package name */
    public final g8 f1798a;
    public final WebView b;
    public final List c;
    public final Map d;
    public final String e;
    public final String f;
    public final String g;
    public final s h;

    public r(g8 g8Var, WebView webView, String str, List list, String str2, String str3, s sVar) {
        ArrayList arrayList = new ArrayList();
        this.c = arrayList;
        this.d = new HashMap();
        this.f1798a = g8Var;
        this.b = webView;
        this.e = str;
        this.h = sVar;
        if (list != null) {
            arrayList.addAll(list);
            Iterator it = list.iterator();
            while (it.hasNext()) {
                String uuid = UUID.randomUUID().toString();
                this.d.put(uuid, (hb) it.next());
            }
        }
        this.g = str2;
        this.f = str3;
    }

    public static r a(g8 g8Var, WebView webView, String str, String str2) {
        nd.a(g8Var, "Partner is null");
        nd.a(webView, "WebView is null");
        if (str2 != null) {
            nd.a(str2, 256, "CustomReferenceData is greater than 256 characters");
        }
        return new r(g8Var, webView, null, null, str, str2, s.HTML);
    }

    public s a() {
        return this.h;
    }

    public String b() {
        return this.g;
    }

    public String c() {
        return this.f;
    }

    public Map d() {
        return Collections.unmodifiableMap(this.d);
    }

    public String e() {
        return this.e;
    }

    public g8 f() {
        return this.f1798a;
    }

    public List g() {
        return Collections.unmodifiableList(this.c);
    }

    public WebView h() {
        return this.b;
    }

    public static r a(g8 g8Var, String str, List list, String str2, String str3) {
        nd.a(g8Var, "Partner is null");
        nd.a((Object) str, "OM SDK JS script content is null");
        nd.a(list, "VerificationScriptResources is null");
        if (str3 != null) {
            nd.a(str3, 256, "CustomReferenceData is greater than 256 characters");
        }
        return new r(g8Var, null, str, list, str2, str3, s.NATIVE);
    }
}
