Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 h.java 源代码,内容仅作参考
package h92;
import co.g0;
import co.q;
import co.w;
import h92.a;
import h92.l;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import k92.IdDocResponse;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.u;
import n91.s0;
import org.jetbrains.annotations.NotNull;
import qd1.z;
import rd1.FeatureToggleVariation;
import sinet.startup.inDriver.data.OrdersData;
import sinet.startup.inDriver.feature.identity_doc.network.model.IdDocConfigResponse;
import sinet.startup.inDriver.feature.identity_doc.network.model.IdDocResponseV2;
import vm.b0;
import vm.x;
@Metadata(d1 = {"\u0000~\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0000\u0018\u0000 ?2\u00020\u0001:\u0001*B)\b\u0007\u0012\u0006\u0010,\u001a\u00020)\u0012\u0006\u00100\u001a\u00020-\u0012\u0006\u00104\u001a\u000201\u0012\u0006\u00108\u001a\u000205¢\u0006\u0004\b=\u0010>J&\u0010\b\u001a\u0010\u0012\f\u0012\n \u0007*\u0004\u0018\u00010\u00060\u00060\u00052\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0002H\u0002J&\u0010\t\u001a\u0010\u0012\f\u0012\n \u0007*\u0004\u0018\u00010\u00060\u00060\u00052\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0002H\u0002J\u0018\u0010\r\u001a\u00020\f2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\nH\u0002J\u0010\u0010\u000e\u001a\u00020\f2\u0006\u0010\u0004\u001a\u00020\u0002H\u0002J\u0010\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0010\u001a\u00020\u000fH\u0002J\u001e\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00060\u00052\u0006\u0010\u0012\u001a\u00020\f2\u0006\u0010\u0013\u001a\u00020\fH\u0002J\u0010\u0010\u0015\u001a\u00020\f2\u0006\u0010\u0004\u001a\u00020\u0002H\u0002J\u0010\u0010\u0016\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0002H\u0002J\u0014\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\u00190\u00052\u0006\u0010\u0018\u001a\u00020\u0017J\u0006\u0010\u001b\u001a\u00020\u0019J\u001e\u0010\u001c\u001a\u00020\f2\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\nJ2\u0010 \u001a\b\u0012\u0004\u0012\u00020\u00060\u00052\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00022\u0006\u0010\u000b\u001a\u00020\n2\f\u0010\u001f\u001a\b\u0012\u0004\u0012\u00020\u001e0\u001dJ\u0006\u0010!\u001a\u00020\u0002J\u0006\u0010\"\u001a\u00020\u0002J\u0006\u0010#\u001a\u00020\fJ:\u0010(\u001a&\u0012\f\u0012\n \u0007*\u0004\u0018\u00010'0' \u0007*\u0012\u0012\f\u0012\n \u0007*\u0004\u0018\u00010'0'\u0018\u00010&0&2\u0006\u0010$\u001a\u00020\u00022\u0006\u0010%\u001a\u00020\u0002R\u0014\u0010,\u001a\u00020)8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b*\u0010+R\u0014\u00100\u001a\u00020-8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b.\u0010/R\u0014\u00104\u001a\u0002018\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b2\u00103R\u0014\u00108\u001a\u0002058\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b6\u00107R\u0014\u0010<\u001a\u0002098\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b:\u0010;¨\u0006@"}, d2 = {"Lh92/h;", "", "", "idDocNumber", "birthday", "Lvm/x;", "Lh92/a;", "kotlin.jvm.PlatformType", "n", "q", "", "idDocLength", "", "C", "A", "Lk92/b;", "response", "G", "isIdDocValid", "isBirthdayValid", "u", "B", "t", "Lh92/l;", "idDocSource", "Lh92/k;", "x", "z", "D", "Lkotlin/Function0;", "Lco/g0;", "doBeforeCall", "l", "w", "v", "E", "docNumber", OrdersData.SCHEME_PHONE, "Lvm/q;", "Ltf1/d;", "F", "Ld92/b;", "a", "Ld92/b;", "repository", "Lxc1/l;", "b", "Lxc1/l;", "user", "Lsd1/b;", "c", "Lsd1/b;", "featureToggle", "Lc92/a;", "d", "Lc92/a;", "docCheckAnalytics", "Ljava/text/SimpleDateFormat;", "e", "Ljava/text/SimpleDateFormat;", "sdf", "<init>", "(Ld92/b;Lxc1/l;Lsd1/b;Lc92/a;)V", "Companion", "identity-doc_release"}, k = 1, mv = {1, 8, 0})
public final class h {
@NotNull
private static final a Companion = new a(null);
@NotNull
private final d92.b repository;
@NotNull
private final xc1.l user;
@NotNull
private final sd1.b featureToggle;
@NotNull
private final c92.a docCheckAnalytics;
@NotNull
private final SimpleDateFormat sdf;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0006\b\u0082\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u000b\u0010\fR\u0014\u0010\u0003\u001a\u00020\u00028\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R\u0014\u0010\u0005\u001a\u00020\u00028\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0005\u0010\u0004R\u0014\u0010\u0006\u001a\u00020\u00028\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0006\u0010\u0004R\u0014\u0010\b\u001a\u00020\u00078\u0006X\u0086T¢\u0006\u0006\n\u0004\b\b\u0010\tR\u0014\u0010\n\u001a\u00020\u00078\u0006X\u0086T¢\u0006\u0006\n\u0004\b\n\u0010\t¨\u0006\r"}, d2 = {"Lh92/h$a;", "", "", "BIRTHDAY_LENGTH", "I", "MAX_AGE", "MIN_AGE", "", "PATTERN_DATE_FORMAT", "Ljava/lang/String;", "STATUS_OK", "<init>", "()V", "identity-doc_release"}, k = 1, mv = {1, 8, 0})
private static final class a {
private a() {
}
public a(kotlin.jvm.internal.k kVar) {
this();
}
}
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0006\u001a*\u0012\u000e\b\u0001\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004 \u0005*\u0014\u0012\u000e\b\u0001\u0012\n \u0005*\u0004\u0018\u00010\u00040\u0004\u0018\u00010\u00030\u00032\u0012\u0010\u0002\u001a\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00010\u0000H\n¢\u0006\u0004\b\u0006\u0010\u0007"}, d2 = {"Lco/q;", "", "<name for destructuring parameter 0>", "Lvm/b0;", "Lh92/a;", "kotlin.jvm.PlatformType", "a", "(Lco/q;)Lvm/b0;"}, k = 3, mv = {1, 8, 0})
static final class b extends u implements qo.l<q<? extends Boolean, ? extends Boolean>, b0<? extends h92.a>> {
final qo.a<g0> f64630l;
final h f64631m;
final String f64632n;
final String f64633o;
b(qo.a<g0> aVar, h hVar, String str, String str2) {
super(1);
this.f64630l = aVar;
this.f64631m = hVar;
this.f64632n = str;
this.f64633o = str2;
}
@Override
public final b0<? extends h92.a> invoke(@NotNull q<Boolean, Boolean> qVar) {
boolean booleanValue = qVar.a().booleanValue();
boolean booleanValue2 = qVar.b().booleanValue();
if (!booleanValue || !booleanValue2) {
return this.f64631m.u(booleanValue, booleanValue2);
}
this.f64630l.invoke();
if (this.f64631m.E()) {
h hVar = this.f64631m;
return hVar.q(this.f64632n, hVar.t(this.f64633o));
}
h hVar2 = this.f64631m;
return hVar2.n(this.f64632n, hVar2.t(this.f64633o));
}
}
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
public class c extends kotlin.jvm.internal.q implements qo.l<IdDocResponse, h92.a> {
c(Object obj) {
super(1, obj, h.class, "responseToCheckStatus", "responseToCheckStatus(Lsinet/startup/inDriver/feature/identity_doc/network/model/IdDocResponse;)Lsinet/startup/inDriver/feature/identity_doc/domain/IdDocCheckStatus;", 0);
}
@Override
@NotNull
public final h92.a invoke(@NotNull IdDocResponse idDocResponse) {
return ((h) this.receiver).G(idDocResponse);
}
}
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0005\u001a*\u0012\u000e\b\u0001\u0012\n \u0004*\u0004\u0018\u00010\u00030\u0003 \u0004*\u0014\u0012\u000e\b\u0001\u0012\n \u0004*\u0004\u0018\u00010\u00030\u0003\u0018\u00010\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"", "it", "Lvm/b0;", "Lh92/a;", "kotlin.jvm.PlatformType", "b", "(Ljava/lang/Throwable;)Lvm/b0;"}, k = 3, mv = {1, 8, 0})
public static final class d extends u implements qo.l<Throwable, b0<? extends h92.a>> {
public static final d f64634l = new d();
d() {
super(1);
}
@Override
public final b0<? extends h92.a> invoke(@NotNull Throwable th4) {
return s0.m(j92.b.f77643a.b(th4));
}
}
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
public class e extends kotlin.jvm.internal.q implements qo.l<IdDocResponseV2, h92.a> {
e(Object obj) {
super(1, obj, j92.b.class, "responseToCheckStatus", "responseToCheckStatus(Lsinet/startup/inDriver/feature/identity_doc/network/model/IdDocResponseV2;)Lsinet/startup/inDriver/feature/identity_doc/domain/IdDocCheckStatus;", 0);
}
@Override
@NotNull
public final h92.a invoke(@NotNull IdDocResponseV2 idDocResponseV2) {
return ((j92.b) this.receiver).d(idDocResponseV2);
}
}
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0005\u001a*\u0012\u000e\b\u0001\u0012\n \u0004*\u0004\u0018\u00010\u00030\u0003 \u0004*\u0014\u0012\u000e\b\u0001\u0012\n \u0004*\u0004\u0018\u00010\u00030\u0003\u0018\u00010\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"", "it", "Lvm/b0;", "Lh92/a;", "kotlin.jvm.PlatformType", "b", "(Ljava/lang/Throwable;)Lvm/b0;"}, k = 3, mv = {1, 8, 0})
public static final class f extends u implements qo.l<Throwable, b0<? extends h92.a>> {
public static final f f64635l = new f();
f() {
super(1);
}
@Override
public final b0<? extends h92.a> invoke(@NotNull Throwable th4) {
return s0.m(j92.b.f77643a.c(th4));
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0004\u001a\n \u0003*\u0004\u0018\u00010\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Lsinet/startup/inDriver/feature/identity_doc/network/model/IdDocConfigResponse;", "it", "Lh92/k;", "kotlin.jvm.PlatformType", "a", "(Lsinet/startup/inDriver/feature/identity_doc/network/model/IdDocConfigResponse;)Lh92/k;"}, k = 3, mv = {1, 8, 0})
static final class g extends u implements qo.l<IdDocConfigResponse, IdDocScreenParams> {
public static final g f64636l = new g();
g() {
super(1);
}
@Override
public final IdDocScreenParams invoke(@NotNull IdDocConfigResponse idDocConfigResponse) {
return d92.a.f45758a.b(idDocConfigResponse.getData());
}
}
public h(@NotNull d92.b bVar, @NotNull xc1.l lVar, @NotNull sd1.b bVar2, @NotNull c92.a aVar) {
this.repository = bVar;
this.user = lVar;
this.featureToggle = bVar2;
this.docCheckAnalytics = aVar;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("ddMMyyyy", Locale.ENGLISH);
simpleDateFormat.setLenient(false);
this.sdf = simpleDateFormat;
}
private final boolean A(String birthday) {
if (birthday.length() == 8) {
return true;
}
return false;
}
private final boolean B(String birthday) {
if (!A(birthday)) {
return false;
}
Calendar calendar = Calendar.getInstance();
try {
calendar.setTime(this.sdf.parse(birthday));
Calendar calendar2 = Calendar.getInstance();
int i15 = calendar2.get(1) - calendar.get(1);
if (i15 == 18 && calendar2.get(6) < calendar.get(6)) {
i15--;
}
if (18 > i15 || i15 >= 201) {
return false;
}
return true;
} catch (Exception e15) {
ud4.a.INSTANCE.d(e15);
return false;
}
}
private final boolean C(String idDocNumber, int idDocLength) {
if (idDocNumber.length() == idDocLength) {
return true;
}
return false;
}
public final h92.a G(IdDocResponse response) {
if (Intrinsics.g(response.getStatus(), "ok")) {
this.docCheckAnalytics.a();
return a.g.f64617a;
}
return a.c.f64613a;
}
public static final b0 m(qo.l lVar, Object obj) {
return (b0) lVar.invoke(obj);
}
public final x<h92.a> n(String idDocNumber, String birthday) {
x<IdDocResponse> a15 = this.repository.a(idDocNumber, birthday);
final c cVar = new c(this);
x<R> L = a15.L(new an.j() {
@Override
public final Object apply(Object obj) {
a o15;
o15 = h.o(qo.l.this, obj);
return o15;
}
});
final d dVar = d.f64634l;
return L.P(new an.j() {
@Override
public final Object apply(Object obj) {
b0 p15;
p15 = h.p(qo.l.this, obj);
return p15;
}
});
}
public static final h92.a o(qo.l lVar, Object obj) {
return (h92.a) lVar.invoke(obj);
}
public static final b0 p(qo.l lVar, Object obj) {
return (b0) lVar.invoke(obj);
}
public final x<h92.a> q(String idDocNumber, String birthday) {
x<IdDocResponseV2> b15 = this.repository.b(this.user.D0(), this.user.l0(), idDocNumber, birthday);
final e eVar = new e(j92.b.f77643a);
x<R> L = b15.L(new an.j() {
@Override
public final Object apply(Object obj) {
a r15;
r15 = h.r(qo.l.this, obj);
return r15;
}
});
final f fVar = f.f64635l;
return L.P(new an.j() {
@Override
public final Object apply(Object obj) {
b0 s15;
s15 = h.s(qo.l.this, obj);
return s15;
}
});
}
public static final h92.a r(qo.l lVar, Object obj) {
return (h92.a) lVar.invoke(obj);
}
public static final b0 s(qo.l lVar, Object obj) {
return (b0) lVar.invoke(obj);
}
public final String t(String birthday) {
return hd1.c.a(new SimpleDateFormat("ddMMyyyy", Locale.ENGLISH).parse(birthday));
}
public final x<h92.a> u(boolean isIdDocValid, boolean isBirthdayValid) {
Object obj;
if (!isIdDocValid && !isBirthdayValid) {
obj = a.e.f64615a;
} else if (!isIdDocValid) {
obj = a.f.f64616a;
} else if (!isBirthdayValid) {
obj = a.C1851a.f64611a;
} else {
obj = a.c.f64613a;
}
return x.K(obj);
}
public static final IdDocScreenParams y(qo.l lVar, Object obj) {
return (IdDocScreenParams) lVar.invoke(obj);
}
public final boolean D(@NotNull String idDocNumber, @NotNull String birthday, int idDocLength) {
if (C(idDocNumber, idDocLength) && A(birthday)) {
return true;
}
return false;
}
public final boolean E() {
Object obj;
Object obj2;
Object obj3;
List<FeatureToggleVariation> g15 = this.featureToggle.g(z.f118188a.a());
if (g15 != null) {
Iterator<T> it = g15.iterator();
while (true) {
obj = null;
if (it.hasNext()) {
obj2 = it.next();
if (Intrinsics.g(((FeatureToggleVariation) obj2).getName(), "isEnabled")) {
break;
}
} else {
obj2 = null;
break;
}
}
FeatureToggleVariation featureToggleVariation = (FeatureToggleVariation) obj2;
if (featureToggleVariation != null) {
obj3 = featureToggleVariation.getValue();
} else {
obj3 = null;
}
if (obj3 instanceof Boolean) {
obj = obj3;
}
return Intrinsics.g((Boolean) obj, Boolean.TRUE);
}
return false;
}
public final vm.q<tf1.d> F(@NotNull String docNumber, @NotNull String phone) {
return this.repository.g(docNumber, phone).U1(vn.a.c());
}
@NotNull
public final x<h92.a> l(@NotNull String str, @NotNull String str2, int i15, @NotNull qo.a<g0> aVar) {
x c05 = s0.m(w.a(Boolean.valueOf(C(str, i15)), Boolean.valueOf(B(str2)))).c0(vn.a.c());
final b bVar = new b(aVar, this, str, str2);
return c05.B(new an.j() {
@Override
public final Object apply(Object obj) {
b0 m15;
m15 = h.m(qo.l.this, obj);
return m15;
}
});
}
@NotNull
public final String v() {
return this.repository.c();
}
@NotNull
public final String w() {
return this.repository.e();
}
@NotNull
public final x<IdDocScreenParams> x(@NotNull l idDocSource) {
if (idDocSource instanceof l.Custom) {
return s0.m(((l.Custom) idDocSource).getScreenParams());
}
if (idDocSource instanceof l.Default) {
return s0.m(this.repository.d(((l.Default) idDocSource).getIdDocInfoUrl()));
}
if (idDocSource instanceof l.c) {
x<IdDocConfigResponse> f15 = this.repository.f(this.user.D0(), this.user.l0());
final g gVar = g.f64636l;
return f15.L(new an.j() {
@Override
public final Object apply(Object obj) {
IdDocScreenParams y15;
y15 = h.y(qo.l.this, obj);
return y15;
}
});
}
throw new NoWhenBranchMatchedException();
}
@NotNull
public final IdDocScreenParams z() {
return this.repository.d("\"https://indriver.com/mobile/page/cpfbrazil/\"");
}
}