package vn;

import ap.h;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import tn.p0;

/* loaded from: classes3.dex */
public class r extends j implements p0 {

    /* renamed from: w, reason: collision with root package name */
    static final /* synthetic */ kn.l[] f40337w = {kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(r.class), "fragments", "getFragments()Ljava/util/List;")), kotlin.jvm.internal.p0.h(new kotlin.jvm.internal.g0(kotlin.jvm.internal.p0.b(r.class), "empty", "getEmpty()Z"))};

    /* renamed from: r, reason: collision with root package name */
    private final x f40338r;

    /* renamed from: s, reason: collision with root package name */
    private final ro.c f40339s;

    /* renamed from: t, reason: collision with root package name */
    private final gp.i f40340t;

    /* renamed from: u, reason: collision with root package name */
    private final gp.i f40341u;

    /* renamed from: v, reason: collision with root package name */
    private final ap.h f40342v;

    /* loaded from: classes3.dex */
    static final class a extends kotlin.jvm.internal.v implements dn.a {
        a() {
            super(0);
        }

        @Override // dn.a
        public final Boolean invoke() {
            return Boolean.valueOf(tn.n0.b(r.this.r0().N0(), r.this.d()));
        }
    }

    /* loaded from: classes3.dex */
    static final class b extends kotlin.jvm.internal.v implements dn.a {
        b() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final List invoke() {
            return tn.n0.c(r.this.r0().N0(), r.this.d());
        }
    }

    /* loaded from: classes3.dex */
    static final class c extends kotlin.jvm.internal.v implements dn.a {
        c() {
            super(0);
        }

        @Override // dn.a
        /* renamed from: a, reason: merged with bridge method [inline-methods] */
        public final ap.h invoke() {
            int v10;
            List A0;
            if (r.this.isEmpty()) {
                return h.b.f6148b;
            }
            List E = r.this.E();
            v10 = sm.v.v(E, 10);
            ArrayList arrayList = new ArrayList(v10);
            Iterator it = E.iterator();
            while (it.hasNext()) {
                arrayList.add(((tn.k0) it.next()).o());
            }
            A0 = sm.c0.A0(arrayList, new h0(r.this.r0(), r.this.d()));
            return ap.b.f6101d.a("package view scope for " + r.this.d() + " in " + r.this.r0().getName(), A0);
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public r(x module, ro.c fqName, gp.n storageManager) {
        super(kotlin.reflect.jvm.internal.impl.descriptors.annotations.g.f26219f.b(), fqName.h());
        kotlin.jvm.internal.t.g(module, "module");
        kotlin.jvm.internal.t.g(fqName, "fqName");
        kotlin.jvm.internal.t.g(storageManager, "storageManager");
        this.f40338r = module;
        this.f40339s = fqName;
        this.f40340t = storageManager.b(new b());
        this.f40341u = storageManager.b(new a());
        this.f40342v = new ap.g(storageManager, new c());
    }

    @Override // tn.m
    public Object A0(tn.o visitor, Object obj) {
        kotlin.jvm.internal.t.g(visitor, "visitor");
        return visitor.b(this, obj);
    }

    protected final boolean D0() {
        return ((Boolean) gp.m.a(this.f40341u, this, f40337w[1])).booleanValue();
    }

    @Override // tn.p0
    public List E() {
        return (List) gp.m.a(this.f40340t, this, f40337w[0]);
    }

    @Override // tn.p0
    /* renamed from: H0, reason: merged with bridge method [inline-methods] */
    public x r0() {
        return this.f40338r;
    }

    @Override // tn.p0
    public ro.c d() {
        return this.f40339s;
    }

    public boolean equals(Object obj) {
        p0 p0Var = obj instanceof p0 ? (p0) obj : null;
        return p0Var != null && kotlin.jvm.internal.t.b(d(), p0Var.d()) && kotlin.jvm.internal.t.b(r0(), p0Var.r0());
    }

    public int hashCode() {
        return (r0().hashCode() * 31) + d().hashCode();
    }

    @Override // tn.p0
    public boolean isEmpty() {
        return D0();
    }

    @Override // tn.p0
    public ap.h o() {
        return this.f40342v;
    }

    @Override // tn.m
    /* renamed from: x0, reason: merged with bridge method [inline-methods] */
    public p0 b() {
        if (d().d()) {
            return null;
        }
        x r02 = r0();
        ro.c e10 = d().e();
        kotlin.jvm.internal.t.f(e10, "parent(...)");
        return r02.M(e10);
    }
}
