package v5;

import F1.C0186o;
import I2.C0334s;
import androidx.recyclerview.widget.i0;
import java.util.regex.Pattern;
import p4.C2725d;
import u5.l;
import x5.n;
import x5.x;

/* JADX INFO: loaded from: classes3.dex */
public final class b implements g {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final Pattern f25397a = Pattern.compile("^[a-zA-Z][a-zA-Z0-9.+-]{1,31}:[^<>\u0000- ]*$");

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final Pattern f25398b = Pattern.compile("^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$");

    @Override // v5.g
    public final i0 a(l lVar) {
        C2725d c2725d = lVar.f24643e;
        c2725d.h();
        C0186o c0186oL = c2725d.l();
        if (c2725d.b('>') > 0) {
            C0334s c0334sC = c2725d.c(c0186oL, c2725d.l());
            String strL = c0334sC.l();
            c2725d.h();
            String strN = f25397a.matcher(strL).matches() ? strL : f25398b.matcher(strL).matches() ? A0.a.n("mailto:", strL) : null;
            if (strN != null) {
                n nVar = new n(strN, null);
                x xVar = new x(strL);
                xVar.d(c0334sC.m());
                nVar.a(xVar);
                return new i0(20, nVar, c2725d.l());
            }
        }
        return null;
    }
}
