what-the-bank/sources/o/C5883cCK.java

445 lines
14 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.content.res.Resources;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.regex.Pattern;
import o.C15715hv;
import o.ZI;
/* renamed from: o.cCK, reason: case insensitive filesystem */
/* loaded from: classes4.dex */
public final class C5883cCK extends ZI<InterfaceC9564dmC> {
public boolean a;
public Integer b;
public EnumC1271Zi c;
public boolean d;
public VH e;
public boolean g;
public List<String> h;
public final qBc i;
public boolean k;
public boolean l;
public String m;
public boolean n;
/* renamed from: o, reason: collision with root package name */
public C0520Io f8597o;
public C0520Io p;
public final DBj q;
public final C0231Bx r;
public final NKs s;
public final KHC t;
private final THd u;
public final lUI v;
public List<VE> w;
public String x;
private final Resources y;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public C5883cCK(C16903sI c16903sI, lUI lui, DBj dBj, C0231Bx c0231Bx, KHC khc, qBc qbc, THd tHd, NKs nKs, Resources resources) {
super(c16903sI);
C14957gcv.e(c16903sI, "");
C14957gcv.e(lui, "");
C14957gcv.e(dBj, "");
C14957gcv.e(c0231Bx, "");
C14957gcv.e(khc, "");
C14957gcv.e(qbc, "");
C14957gcv.e(tHd, "");
C14957gcv.e(nKs, "");
C14957gcv.e(resources, "");
this.v = lui;
this.q = dBj;
this.r = c0231Bx;
this.t = khc;
this.i = qbc;
this.u = tHd;
this.s = nKs;
this.y = resources;
}
private final List<String> a() {
C1108Vu c1108Vu;
ArrayList c = C14881gav.c("");
VH vh = this.e;
C14851gaI c14851gaI = (vh == null || (c1108Vu = vh.z) == null) ? null : c1108Vu.d;
if (c14851gaI == null) {
c14851gaI = C14851gaI.c;
}
c.addAll(c14851gaI);
return c;
}
public final boolean b(String str) {
return str.length() > 0 && str.length() == 10 && THd.b(str);
}
public final String a(String str, String str2) {
EnumC1271Zi enumC1271Zi = this.c;
int i = enumC1271Zi == null ? -1 : LWm.e[enumC1271Zi.ordinal()];
if (i == 1) {
return str;
}
if (i != 2) {
return null;
}
return str2;
}
@Override // o.ZI
public final void w_() {
KHC khc = this.t;
if (!khc.h.isDisposed()) {
khc.h.dispose();
}
DBj dBj = this.q;
if (!dBj.h.isDisposed()) {
dBj.h.dispose();
}
super.w_();
}
/* renamed from: o.cCK$IeS */
/* loaded from: classes4.dex */
public static final class IeS {
private IeS() {
}
public /* synthetic */ IeS(byte b) {
this();
}
}
public static /* synthetic */ void c(boolean z, C5883cCK c5883cCK, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
if (!z && !c5883cCK.l) {
interfaceC9564dmC.m();
} else {
interfaceC9564dmC.b();
}
}
public static /* synthetic */ void d(int i, C5883cCK c5883cCK, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
if (i > 0) {
List<VE> list = c5883cCK.w;
VE ve = list != null ? list.get(i - 1) : null;
String str = ve != null ? ve.d : null;
c5883cCK.x = str;
if (ve != null) {
String str2 = str;
if ((!(str2 == null || gdZ.d((CharSequence) str2))) && gdZ.a(c5883cCK.x, "MSISDN", true)) {
String str3 = ve.a;
if (str3 == null) {
str3 = "";
}
String a = gdZ.a(str3, "+", "");
String str4 = ve.e;
interfaceC9564dmC.c(a, str4 != null ? str4 : "");
return;
}
}
String str5 = ve != null ? ve.a : null;
interfaceC9564dmC.b(str5 != null ? str5 : "");
return;
}
interfaceC9564dmC.g();
}
public static /* synthetic */ void e(C5883cCK c5883cCK) {
if (c5883cCK.f != 0) {
c5883cCK.f.ar_();
}
ZI.IeS ieS = new ZI.IeS() { // from class: o.cCW
@Override // o.ZI.IeS
public final void e(Object obj) {
((InterfaceC9564dmC) obj).i();
}
};
if (c5883cCK.f != 0) {
ieS.e(c5883cCK.f);
}
}
public static /* synthetic */ void b(C5883cCK c5883cCK, String str, String str2, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
if (c5883cCK.k) {
String str3 = str == null ? "" : str;
if (str2 == null) {
str2 = "";
}
C0520Io c0520Io = new C0520Io(str3, str2);
C14957gcv.e(c0520Io, "");
c5883cCK.p = c0520Io;
interfaceC9564dmC.g(str);
return;
}
interfaceC9564dmC.h(str);
}
public static /* synthetic */ void d(C5883cCK c5883cCK, C16555pLN c16555pLN) {
if (c5883cCK.f != 0) {
c5883cCK.f.ar_();
}
C0231Bx c0231Bx = c5883cCK.r;
boolean a = c5883cCK.s.a();
C14957gcv.e(c16555pLN, "");
final C1114Vy c = c0231Bx.c(c16555pLN, false, a);
c.j = c16555pLN.j;
String str = c16555pLN.j;
c.g = !(str == null || str.length() == 0);
ZI.IeS ieS = new ZI.IeS(c) { // from class: o.cDd
private C1114Vy a;
@Override // o.ZI.IeS
public final void e(Object obj) {
C5883cCK.b(this.a, (InterfaceC9564dmC) obj);
}
{
this.a = c;
}
};
if (c5883cCK.f != 0) {
ieS.e(c5883cCK.f);
}
}
public static /* synthetic */ void e(int i, String str, C5883cCK c5883cCK, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(str, "");
C14957gcv.e(c5883cCK, "");
if (i <= 0 || str.length() <= 0) {
return;
}
List<VE> list = c5883cCK.w;
VE ve = list != null ? list.get(i - 1) : null;
String str2 = ve != null ? ve.d : null;
c5883cCK.x = str2;
String str3 = str2;
if ((!(str3 == null || gdZ.d((CharSequence) str3))) && gdZ.a(c5883cCK.x, "MSISDN", true)) {
interfaceC9564dmC.e(gdZ.a(str, "+", ""));
} else {
interfaceC9564dmC.a(str);
}
}
public static /* synthetic */ void d(C5883cCK c5883cCK, int i, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
C0231Bx c0231Bx = c5883cCK.r;
List<String> list = c5883cCK.h;
EnumC1271Zi k = C0231Bx.k(list != null ? (String) C14881gav.b(list, i - 1) : null);
boolean z = i > 0;
if (z && k == EnumC1271Zi.NATIONAL_ID) {
c5883cCK.c = k;
interfaceC9564dmC.c(true);
interfaceC9564dmC.d(false);
} else if (z && k == EnumC1271Zi.PASSPORT) {
c5883cCK.c = k;
interfaceC9564dmC.c(false);
interfaceC9564dmC.d(true);
} else {
c5883cCK.c = null;
interfaceC9564dmC.c(false);
interfaceC9564dmC.d(false);
}
}
public static /* synthetic */ void e(String str, C5883cCK c5883cCK, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
String str2 = str;
if (str2 != null && str2.length() != 0) {
lUI lui = c5883cCK.v;
if (str != null && Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$").matcher(str).matches()) {
interfaceC9564dmC.e();
return;
}
}
String string = c5883cCK.y.getString(C15715hv.tOB.remittance_transfer_method_empty_error);
C14957gcv.c((Object) string, "");
interfaceC9564dmC.d(string);
}
public static /* synthetic */ void e(C5883cCK c5883cCK, C5962cEf c5962cEf, boolean z, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
C14957gcv.e(c5962cEf, "");
C14957gcv.e(c5962cEf, "");
C14851gaI h = c5883cCK.q.d.h();
if (h == null) {
h = C14851gaI.c;
}
List<C16969snw> list = h;
if (!(list instanceof Collection) || !list.isEmpty()) {
for (C16969snw c16969snw : list) {
List<String> a = c5883cCK.a();
Integer num = c5962cEf.q;
String str = a.get(num != null ? num.intValue() : 0);
String str2 = c16969snw.e;
if (str2 == null) {
str2 = "";
}
if (gdZ.d((CharSequence) str, (CharSequence) str2, true)) {
String str3 = c16969snw.c;
if (!(str3 == null || gdZ.d((CharSequence) str3))) {
C0231Bx c0231Bx = c5883cCK.r;
C14851gaI h2 = c5883cCK.q.d.h();
if (h2 == null) {
h2 = C14851gaI.c;
}
List<String> a2 = c5883cCK.a();
Integer num2 = c5962cEf.q;
interfaceC9564dmC.n(C0231Bx.a(h2, a2.get(num2 != null ? num2.intValue() : 0)));
if (c5962cEf.d) {
interfaceC9564dmC.b(z);
return;
} else {
interfaceC9564dmC.b(c5962cEf.d);
return;
}
}
}
}
}
interfaceC9564dmC.h();
interfaceC9564dmC.b(z);
}
public final String a(String str) {
if (!this.k) {
return str;
}
C0520Io c0520Io = this.p;
if ((c0520Io != null ? c0520Io.e : null) == null) {
return str;
}
C0520Io c0520Io2 = this.p;
if ((c0520Io2 != null ? c0520Io2.a : null) == null) {
return str;
}
C0520Io c0520Io3 = this.p;
if (c0520Io3 != null) {
return c0520Io3.e;
}
return null;
}
/* JADX WARN: Code restructure failed: missing block: B:117:0x016a, code lost:
if (r4.booleanValue() != false) goto L125;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(final o.C5962cEf r7) {
/*
Method dump skipped, instructions count: 413
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.C5883cCK.a(o.cEf):void");
}
private final boolean c(String str) {
return str == null || (str != null && Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$").matcher(str).matches());
}
public final String d(String str) {
if (this.l) {
return cXG.a("dd/MM/yyyy", C15240gl.b(C15240gl.e(str, "/"))).format(C15554gto.ofPattern("yyyy-MM-dd"));
}
return null;
}
public static /* synthetic */ void c(String str, C5883cCK c5883cCK, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
String str2 = str;
if (!(str2 == null || gdZ.d((CharSequence) str2))) {
c5883cCK.m = str;
interfaceC9564dmC.c();
} else {
interfaceC9564dmC.l();
}
}
public final String e(String str, String str2) {
String str3 = this.x;
boolean z = false;
boolean z2 = !(str3 == null || gdZ.d((CharSequence) str3));
if (gdZ.a(this.x, "MSISDN", true)) {
String str4 = this.m;
if (!(str4 == null || gdZ.d((CharSequence) str4))) {
z = true;
}
}
if (z2 && z) {
return "+".concat(String.valueOf(this.m));
}
return z2 ? str2 : str;
}
public static /* synthetic */ void d(C5883cCK c5883cCK, String str, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c5883cCK, "");
if (c5883cCK.d) {
C0231Bx c0231Bx = c5883cCK.r;
C0520Io m = C0231Bx.m(str);
interfaceC9564dmC.c(str);
C14957gcv.e(m, "");
c5883cCK.f8597o = m;
return;
}
String str2 = null;
if (str != null) {
String str3 = str;
gdW gdw = new gdW("^[a-zA-Z0-9 ]+$");
C14957gcv.e(str3, "");
if (!gdw.e.matcher(str3).matches()) {
str = null;
}
str2 = str != null ? str : "";
}
interfaceC9564dmC.f(str2);
}
public static /* synthetic */ void a(String str, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(str, "");
if (!((Boolean) C6583cXR.c(new Object[]{str}, -1032102340, 1032102340, (int) System.currentTimeMillis())).booleanValue()) {
interfaceC9564dmC.k();
} else {
interfaceC9564dmC.a();
}
}
public static /* synthetic */ void b(C1114Vy c1114Vy, InterfaceC9564dmC interfaceC9564dmC) {
C14957gcv.e(c1114Vy, "");
interfaceC9564dmC.c(c1114Vy);
}
/* renamed from: o.cCK$LWm */
/* loaded from: classes4.dex */
public final /* synthetic */ class LWm {
public static final int[] e;
static {
int[] iArr = new int[EnumC1271Zi.values().length];
try {
iArr[EnumC1271Zi.NATIONAL_ID.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[EnumC1271Zi.PASSPORT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
e = iArr;
}
}
public final boolean d() {
return this.g;
}
static {
new IeS((byte) 0);
}
}