package t5; import android.view.View; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.UUID; import java.util.regex.Pattern; /* loaded from: classes2.dex */ public class i extends a { /* renamed from: i, reason: collision with root package name */ private static final Pattern f14396i = Pattern.compile("^[a-zA-Z0-9 ]+$"); /* renamed from: a, reason: collision with root package name */ private final c f14397a; /* renamed from: b, reason: collision with root package name */ private final b f14398b; /* renamed from: d, reason: collision with root package name */ private x5.a f14400d; /* renamed from: e, reason: collision with root package name */ private y5.a f14401e; /* renamed from: c, reason: collision with root package name */ private final List f14399c = new ArrayList(); /* renamed from: f, reason: collision with root package name */ private boolean f14402f = false; /* renamed from: g, reason: collision with root package name */ private boolean f14403g = false; /* renamed from: h, reason: collision with root package name */ private final String f14404h = UUID.randomUUID().toString(); i(b bVar, c cVar) { this.f14398b = bVar; this.f14397a = cVar; f(null); this.f14401e = (cVar.b() == d.HTML || cVar.b() == d.JAVASCRIPT) ? new y5.b(cVar.i()) : new y5.c(cVar.e(), cVar.f()); this.f14401e.a(); u5.a.a().b(this); this.f14401e.e(bVar); } private void f(View view) { this.f14400d = new x5.a(view); } private void h(View view) { Collection c10 = u5.a.a().c(); if (c10 == null || c10.isEmpty()) { return; } for (i iVar : c10) { if (iVar != this && iVar.g() == view) { iVar.f14400d.clear(); } } } @Override // t5.a public void b() { if (this.f14403g) { return; } this.f14400d.clear(); l(); this.f14403g = true; k().l(); u5.a.a().f(this); k().i(); this.f14401e = null; } @Override // t5.a public void c(View view) { if (this.f14403g) { return; } w5.e.b(view, "AdView is null"); if (g() == view) { return; } f(view); k().n(); h(view); } @Override // t5.a public void d() { if (this.f14402f) { return; } this.f14402f = true; u5.a.a().d(this); this.f14401e.b(u5.f.c().g()); this.f14401e.f(this, this.f14397a); } public List e() { return this.f14399c; } /* JADX WARN: Multi-variable type inference failed */ public View g() { return (View) this.f14400d.get(); } public boolean i() { return this.f14402f && !this.f14403g; } public String j() { return this.f14404h; } public y5.a k() { return this.f14401e; } public void l() { if (this.f14403g) { return; } this.f14399c.clear(); } }