package e.a.q;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/* JADX INFO: compiled from: Platform.common.kt */
/* JADX INFO: loaded from: classes.dex */
@d.n
public final class a1 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private static final e.a.o.f[] f2797a = new e.a.o.f[0];

    public static final Set<String> a(e.a.o.f fVar) {
        d.n0.c.s.e(fVar, "<this>");
        if (fVar instanceof m) {
            return ((m) fVar).b();
        }
        HashSet hashSet = new HashSet(fVar.g());
        int iG = fVar.g();
        for (int i = 0; i < iG; i++) {
            hashSet.add(fVar.h(i));
        }
        return hashSet;
    }

    public static final e.a.o.f[] b(List<? extends e.a.o.f> list) {
        if (list == null || list.isEmpty()) {
            list = null;
        }
        if (list != null) {
            Object[] array = list.toArray(new e.a.o.f[0]);
            d.n0.c.s.c(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
            e.a.o.f[] fVarArr = (e.a.o.f[]) array;
            if (fVarArr != null) {
                return fVarArr;
            }
        }
        return f2797a;
    }
}
