Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 d.java 源代码,内容仅作参考
package in.swiggy.android.feature.cart;
import android.content.SharedPreferences;
import in.swiggy.android.swiggylynx.plugin.SwiggyLynxPluginData;
import in.swiggy.android.swiggylynx.ui.LynxData;
import in.swiggy.android.swiggylynx.ui.m;
import in.swiggy.android.tejas.oldapi.network.responses.orderhistory.ServiceLineTypes;
import java.util.Map;
import java.util.Set;
import kotlin.Pair;
import kotlin.collections.j0;
import kotlin.collections.p0;
import kotlin.collections.r0;
import kotlin.jvm.internal.o;
import kotlin.text.q;
public final class d {
public static final LynxData a(boolean z, String str, SharedPreferences sharedPreferences, in.swiggy.android.repositories.interfaces.e xpExperimentContext, String str2) {
Set d;
Set d2;
Set j;
Set d3;
Set j2;
String str3;
Map m;
boolean P;
String string;
boolean C;
boolean C2;
o.k(sharedPreferences, "sharedPreferences");
o.k(xpExperimentContext, "xpExperimentContext");
String string2 = sharedPreferences.getString("web_cart_url", "");
if (string2 == null) {
string2 = "";
}
if (string2.length() <= 0) {
string2 = "https://payments.swiggy.com";
}
String str4 = string2;
d = p0.d(new SwiggyLynxPluginData.CartLynxPluginData("cart"));
d2 = p0.d(new SwiggyLynxPluginData.PaymentLynxPluginData(null, 1, null));
j = r0.j(d, d2);
d3 = p0.d(SwiggyLynxPluginData.IrctcPluginData.a);
j2 = r0.j(j, d3);
Pair[] pairArr = new Pair[7];
pairArr[0] = kotlin.o.a("isFromBottomBar", String.valueOf(z));
pairArr[1] = kotlin.o.a("x-web-checkout-flow", "cart");
if (str == null) {
str3 = "";
} else {
str3 = str;
}
pairArr[2] = kotlin.o.a("cartAddressId", str3);
pairArr[3] = kotlin.o.a("marketplaceId", "1");
pairArr[4] = kotlin.o.a("marketplaceCategory", ServiceLineTypes.TYPE_FOOD);
pairArr[5] = kotlin.o.a("marketplaceBusinessLine", "Regular");
pairArr[6] = kotlin.o.a("isux4", String.valueOf(in.swiggy.android.cartkit.a.b(sharedPreferences)));
m = j0.m(pairArr);
if (str2 != null) {
C2 = q.C(str2);
if (!C2) {
m.put("retainedCartOrderId", str2);
}
}
String m2 = m.a.m(xpExperimentContext, sharedPreferences);
if (m2 != null) {
m.put("isHeroApiInlineHtmlXp", m2);
}
P = q.P(str4, "https://payments-staging.swiggy.com", false, 2, null);
if (P && (string = sharedPreferences.getString("payment-secret-key", "")) != null) {
C = q.C(string);
if (!C) {
m.put("payment-secret-key", string);
}
}
return new LynxData(str4, false, 0, m, j2, null, false, 102, null);
}
public static LynxData b(boolean z, String str, SharedPreferences sharedPreferences, in.swiggy.android.repositories.interfaces.e eVar, String str2, int i, Object obj) {
if ((i & 16) != 0) {
str2 = null;
}
return a(z, str, sharedPreferences, eVar, str2);
}
}