最右.apk(点击下载) / ThirdPartyAPIEngine.java
package cn.xiaochuankeji.hermes.core.api;
import androidx.exifinterface.media.ExifInterface;
import cn.xiaochuankeji.hermes.R2;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import defpackage.dy5;
import java.util.HashMap;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.OkHttpClient;
@Metadata(bv = {1, 0, 3}, d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0000\u0018\u00002\u00020\u0001:\u0001\u0019B\u0007¢\u0006\u0004\b\u0017\u0010\u0018J+\u0010\u0007\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u00022\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00028\u00000\u00032\b\b\u0002\u0010\u0006\u001a\u00020\u0005¢\u0006\u0004\b\u0007\u0010\bJ\u0017\u0010\u000b\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u000b\u0010\fR%\u0010\u0012\u001a\n \u000e*\u0004\u0018\u00010\r0\r8B@\u0002X\u0002¢\u0006\f\n\u0004\b\u000b\u0010\u000f\u001a\u0004\b\u0010\u0010\u0011R2\u0010\u0016\u001a\u001e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\n0\u0013j\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\n`\u00148\u0002@\u0002X\u0004¢\u0006\u0006\n\u0004\b\u0010\u0010\u0015¨\u0006\u001a"}, d2 = {"Lcn/xiaochuankeji/hermes/core/api/ThirdPartyAPIEngine;", "", ExifInterface.GPS_DIRECTION_TRUE, "Ljava/lang/Class;", "serviceClass", "", "baseUrl", "createService", "(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;", "bashUrl", "Ldy5;", "a", "(Ljava/lang/String;)Ldy5;", "Lokhttp3/OkHttpClient;", "kotlin.jvm.PlatformType", "Lkotlin/Lazy;", "b", "()Lokhttp3/OkHttpClient;", "httpClient", "Ljava/util/HashMap;", "Lkotlin/collections/HashMap;", "Ljava/util/HashMap;", "retrofitMap", "<init>", "()V", "Companion", "core_release"}, k = 1, mv = {1, 4, 1})
public final class ThirdPartyAPIEngine {
public static final String NO_HOST = "http://no.host";
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final Lazy f2360a = LazyKt__LazyJVMKt.lazy(ThirdPartyAPIEngine$httpClient$2.INSTANCE);
/* renamed from: b reason: collision with root package name */
public final HashMap<String, dy5> f2361b = MapsKt__MapsKt.hashMapOf(TuplesKt.to("http://no.host", a("http://no.host")));
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\b\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0005\u0010\u0006R\u0016\u0010\u0003\u001a\u00020\u00028\u0006@\u0006XT¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004¨\u0006\u0007"}, d2 = {"Lcn/xiaochuankeji/hermes/core/api/ThirdPartyAPIEngine$Companion;", "", "", "NO_HOST", "Ljava/lang/String;", "<init>", "()V", "core_release"}, k = 1, mv = {1, 4, 1})
public static final class Companion {
public Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
static {
new Companion(null);
}
public static /* synthetic */ Object createService$default(ThirdPartyAPIEngine thirdPartyAPIEngine, Class cls, String str, int i, Object obj) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{thirdPartyAPIEngine, cls, str, new Integer(i), obj}, null, changeQuickRedirect, true, R2.dimen.abc_floating_window_z, new Class[]{ThirdPartyAPIEngine.class, Class.class, String.class, Integer.TYPE, Object.class}, Object.class);
if (proxy.isSupported) {
return proxy.result;
}
if ((i & 2) != 0) {
str = "http://no.host";
}
return thirdPartyAPIEngine.createService(cls, str);
}
public final dy5 a(String str) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, R2.dimen.abc_edit_text_inset_horizontal_material, new Class[]{String.class}, dy5.class);
if (proxy.isSupported) {
return (dy5) proxy.result;
}
dy5.b bVar = new dy5.b();
bVar.c(str);
bVar.g(b());
bVar.a(vy5.e());
dy5 e = bVar.e();
Intrinsics.checkNotNullExpressionValue(e, "Retrofit.Builder()\n …\n .build()");
return e;
}
public final OkHttpClient b() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, R2.dimen.abc_edit_text_inset_bottom_material, new Class[0], OkHttpClient.class);
return (OkHttpClient) (proxy.isSupported ? proxy.result : this.f2360a.getValue());
}
public final <T> T createService(Class<T> cls, String str) {
T t;
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{cls, str}, this, changeQuickRedirect, false, R2.dimen.abc_edit_text_inset_top_material, new Class[]{Class.class, String.class}, Object.class);
if (proxy.isSupported) {
return (T) proxy.result;
}
Intrinsics.checkNotNullParameter(cls, "serviceClass");
Intrinsics.checkNotNullParameter(str, "baseUrl");
dy5 dy5 = this.f2361b.get(str);
if (dy5 != null && (t = (T) dy5.c(cls)) != null) {
return t;
}
dy5 a2 = a(str);
this.f2361b.put(str, a2);
return (T) a2.c(cls);
}
}