package xa;

import android.os.Bundle;
import com.google.android.gms.measurement.internal.c2;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.m0;
import com.google.common.collect.n0;
import com.google.common.collect.z0;

/* JADX INFO: loaded from: classes2.dex */
public abstract class a {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final ImmutableSet f34752a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final ImmutableList f34753b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final ImmutableList f34754c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final ImmutableList f34755d;

    static {
        int i10 = ImmutableSet.f23608c;
        Object[] objArr = new Object[15];
        objArr[0] = "_in";
        objArr[1] = "_xa";
        objArr[2] = "_xu";
        objArr[3] = "_aq";
        objArr[4] = "_aa";
        objArr[5] = "_ai";
        System.arraycopy(new String[]{"_ac", "campaign_details", "_ug", "_iapx", "_exp_set", "_exp_clear", "_exp_activate", "_exp_timeout", "_exp_expire"}, 0, objArr, 6, 9);
        f34752a = ImmutableSet.m(15, objArr);
        n0 n0Var = ImmutableList.f23599b;
        Object[] objArr2 = {"_e", "_f", "_iap", "_s", "_au", "_ui", "_cd"};
        z0.b(7, objArr2);
        f34753b = ImmutableList.l(7, objArr2);
        f34754c = ImmutableList.u("auto", "app", "am");
        f34755d = ImmutableList.x("_r", "_dbg");
        m0 m0Var = new m0(4);
        m0Var.d(c2.f21502e);
        m0Var.d(c2.f21503f);
        m0Var.i();
        ImmutableList.x("^_ltv_[A-Z]{3}$", "^_cc[1-5]{1}$");
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static boolean a(Bundle bundle, String str) {
        if (f34753b.contains(str)) {
            return false;
        }
        if (bundle == null) {
            return true;
        }
        ImmutableList immutableList = f34755d;
        int size = immutableList.size();
        int i10 = 0;
        while (i10 < size) {
            E e10 = immutableList.get(i10);
            i10++;
            if (bundle.containsKey((String) e10)) {
                return false;
            }
        }
        return true;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static boolean b(String str, String str2, Bundle bundle) {
        if (!"_cmp".equals(str2)) {
            return true;
        }
        if (!(!f34754c.contains(str))) {
            return false;
        }
        ImmutableList immutableList = f34755d;
        int size = immutableList.size();
        int i10 = 0;
        while (i10 < size) {
            E e10 = immutableList.get(i10);
            i10++;
            if (bundle.containsKey((String) e10)) {
                return false;
            }
        }
        str.getClass();
        int iHashCode = str.hashCode();
        byte b10 = -1;
        if (iHashCode != 101200) {
            if (iHashCode != 101230) {
                if (iHashCode == 3142703 && str.equals("fiam")) {
                    b10 = 2;
                }
            } else if (str.equals("fdl")) {
                b10 = 1;
            }
        } else if (str.equals("fcm")) {
            b10 = 0;
        }
        if (b10 == 0) {
            bundle.putString("_cis", "fcm_integration");
            return true;
        }
        if (b10 == 1) {
            bundle.putString("_cis", "fdl_integration");
            return true;
        }
        if (b10 != 2) {
            return false;
        }
        bundle.putString("_cis", "fiam_integration");
        return true;
    }
}
