/*
 * Decompiled with CFR 0.152.
 */
public final class hu
extends ep {
    private static final w a;
    private static final w b;
    private static final String c;
    private static final String d;
    private mo e;
    private iy f;
    private hx g;
    private gd h;

    public final void g_() {
        this.m();
    }

    public final void a() {
        this.m();
    }

    private void m() {
        if (this.t) {
            this.f = this.s.b(false, true);
            this.g = (hx)this.f.a();
            boolean[] blArray = new boolean[this.e.H()];
            dz.a(this.g, d, b);
            for (int i = 0; i < this.e.L(); ++i) {
                int n = this.e.k(i).q();
                lh lh2 = this.e.i(n);
                if (lh2 == null || blArray[n]) continue;
                blArray[n] = true;
                String string = ps.a(this.s.j.a(this.e.k(i).k()));
                w w2 = mg.a(a, string, 1, 1);
                string = string + " " + lh2.a;
                this.g.d(new hc(4, 0, this.l(), w2, string));
                if (!ed.b(lh2.c)) {
                    dz.a(this.g, ed.a(c, lh2.c), false, this.s.k);
                }
                if (!ed.b(lh2.b) && !ed.b(string = lh2.b)) {
                    if (!string.toLowerCase().startsWith("http:")) {
                        string = "http://" + string;
                    }
                    String[] stringArray = cf.b(string);
                    new pt(4, 0, this.l(), a, stringArray[1], stringArray[0], 4).u = true;
                    this.g.e(new pt(4, 0, this.l(), a, stringArray[1], stringArray[0], 4));
                }
                dz.a(this.g, 4);
            }
            this.g.s();
        }
    }

    public final int a(pb pb2) {
        if (pb2.c != 8) {
            if (pb2.c == 7) {
                gm gm2 = this.f.a().r();
                String string = gm2 instanceof cu ? ((cu)gm2).c() : "";
                gm2 = this.g.r();
                if (string.startsWith(c.substring(0, c.length() - 4))) {
                    ff.a("ac");
                    this.h.c("tel:" + ar.b(string));
                } else if (gm2 instanceof pt) {
                    ff.a("al");
                    this.h.c(((pt)gm2).b);
                }
            }
            this.f.a(pb2);
            return 3;
        }
        return 1;
    }

    public final int a(nj nj2) {
        switch (this.f.b(nj2)) {
            case -3: {
                return this.a(pb.a(7));
            }
            case -2: {
                return 3;
            }
        }
        return 4;
    }

    public final boolean a(boolean bl2) {
        return this.a(this.f);
    }

    public final void a(mo mo2) {
        this.e = mo2;
        super.n();
    }

    public final void a(ht ht2) {
        this.f.a(ht2, 0, 0);
    }

    public final void b() {
        this.f = null;
        this.g = null;
    }

    static {
        c = lh.d(22);
        d = lh.d(5);
        a = jj.a(false);
        b = jj.a();
    }

    private int l() {
        return this.g.a();
    }

    public final cq e() {
        if (!lh.t()) {
            return jy.c;
        }
        return null;
    }

    public final cq d() {
        return jy.g;
    }

    public hu(eb eb2, gd gd2) {
        super(eb2, null);
        this.h = gd2;
    }
}

