package o;

import java.net.ProxySelector;
import java.util.List;
import java.util.Objects;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSocketFactory;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class U1 {
    public final ME a;
    public final SocketFactory b;
    public final SSLSocketFactory c;
    public final HostnameVerifier d;
    public final C0395Pg e;
    public final ME f;
    public final ProxySelector g;
    public final ZF h;
    public final List i;
    public final List j;

    public U1(String str, int i, ME me, SocketFactory socketFactory, SSLSocketFactory sSLSocketFactory, HostnameVerifier hostnameVerifier, C0395Pg c0395Pg, ME me2, List list, List list2, ProxySelector proxySelector) {
        this.a = me;
        this.b = socketFactory;
        this.c = sSLSocketFactory;
        this.d = hostnameVerifier;
        this.e = c0395Pg;
        this.f = me2;
        this.g = proxySelector;
        YF yf = new YF();
        String str2 = sSLSocketFactory != null ? "https" : "http";
        if (str2.equalsIgnoreCase("http")) {
            yf.a = "http";
        } else {
            if (!str2.equalsIgnoreCase("https")) {
                throw new IllegalArgumentException("unexpected scheme: ".concat(str2));
            }
            yf.a = "https";
        }
        String strX = AbstractC2539te.X(C0688a6.l(0, 0, 7, str));
        if (strX == null) {
            throw new IllegalArgumentException("unexpected host: ".concat(str));
        }
        yf.d = strX;
        if (1 > i || i >= 65536) {
            throw new IllegalArgumentException(AbstractC0126Ew.j(i, "unexpected port: ").toString());
        }
        yf.e = i;
        this.h = yf.a();
        this.i = AbstractC2264qi0.w(list);
        this.j = AbstractC2264qi0.w(list2);
    }

    public final boolean a(U1 u1) {
        return F3.c(this.a, u1.a) && F3.c(this.f, u1.f) && F3.c(this.i, u1.i) && F3.c(this.j, u1.j) && F3.c(this.g, u1.g) && F3.c(this.c, u1.c) && F3.c(this.d, u1.d) && F3.c(this.e, u1.e) && this.h.e == u1.h.e;
    }

    public final boolean equals(Object obj) {
        if (!(obj instanceof U1)) {
            return false;
        }
        U1 u1 = (U1) obj;
        return F3.c(this.h, u1.h) && a(u1);
    }

    public final int hashCode() {
        return Objects.hashCode(this.e) + ((Objects.hashCode(this.d) + ((Objects.hashCode(this.c) + ((this.g.hashCode() + ((this.j.hashCode() + ((this.i.hashCode() + ((this.f.hashCode() + ((this.a.hashCode() + AbstractC0126Ew.h(527, this.h.h, 31)) * 31)) * 31)) * 31)) * 31)) * 961)) * 31)) * 31);
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("Address{");
        ZF zf = this.h;
        sb.append(zf.d);
        sb.append(':');
        sb.append(zf.e);
        sb.append(", ");
        sb.append("proxySelector=" + this.g);
        sb.append('}');
        return sb.toString();
    }
}
