正在查看: Cashalo v2.25.0.0 应用的 Inquiry.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cashalo v2.25.0.0 应用的 Inquiry.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.withpersona.sdk2.inquiry;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.core.os.BundleCompat;
import com.withpersona.sdk2.inquiry.InquiryField;
import com.withpersona.sdk2.inquiry.InquiryResponse;
import com.withpersona.sdk2.inquiry.internal.CollectedDataConversionsKt;
import com.withpersona.sdk2.inquiry.internal.InquiryErrorMessages;
import com.withpersona.sdk2.inquiry.internal.InquiryField;
import com.withpersona.sdk2.inquiry.internal.InquiryFieldsMap;
import com.withpersona.sdk2.inquiry.internal.InquiryIntentKeys;
import com.withpersona.sdk2.inquiry.internal.error_reporting.ExceptionUtilsKt;
import com.withpersona.sdk2.inquiry.internal.network.Prefetching;
import com.withpersona.sdk2.inquiry.types.collected_data.CollectedData;
import java.text.SimpleDateFormat;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.collections.MapsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000R\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u0000 %2\u00020\u0001:\u0002%&B±\u0001\b\u0000\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0005\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\b\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\t\u001a\u0004\u0018\u00010\n\u0012\b\u0010\u000b\u001a\u0004\u0018\u00010\f\u0012\b\u0010\r\u001a\u0004\u0018\u00010\u000e\u0012\b\u0010\u000f\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0010\u001a\u0004\u0018\u00010\u0011\u0012\b\u0010\u0012\u001a\u0004\u0018\u00010\u0011\u0012\b\u0010\u0013\u001a\u0004\u0018\u00010\u0011\u0012\b\u0010\u0014\u001a\u0004\u0018\u00010\u0011\u0012\b\u0010\u0015\u001a\u0004\u0018\u00010\u0016\u0012\b\u0010\u0017\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0018\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0019J\u0018\u0010\u001c\u001a\u00020\u001d2\u0006\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020\fH\u0007J\u0010\u0010!\u001a\u00020\"2\u0006\u0010#\u001a\u00020$H\u0002R\u0010\u0010\b\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\u0010\u001a\u0004\u0018\u00010\u0011X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u001aR\u0010\u0010\r\u001a\u0004\u0018\u00010\u000eX\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u000f\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\t\u001a\u0004\u0018\u00010\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\u0012\u001a\u0004\u0018\u00010\u0011X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u001aR\u0010\u0010\u0018\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\u0013\u001a\u0004\u0018\u00010\u0011X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u001aR\u0010\u0010\u0015\u001a\u0004\u0018\u00010\u0016X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0004\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\u000b\u001a\u0004\u0018\u00010\fX\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u001bR\u0010\u0010\u0017\u001a\u0004\u0018\u00010\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0012\u0010\u0014\u001a\u0004\u0018\u00010\u0011X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u001a¨\u0006'"}, d2 = {"Lcom/withpersona/sdk2/inquiry/Inquiry;", "", "templateId", "", "templateVersion", "inquiryId", "sessionToken", "referenceId", "accountId", "fields", "Lcom/withpersona/sdk2/inquiry/Fields;", "theme", "", "environment", "Lcom/withpersona/sdk2/inquiry/Environment;", "environmentId", "enableErrorLogging", "", "returnCollectedData", "shouldAutoFallback", "useServerStyles", "staticInquiryTemplate", "Lcom/withpersona/sdk2/inquiry/StaticInquiryTemplate;", "themeSetId", "routingCountry", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/withpersona/sdk2/inquiry/Fields;Ljava/lang/Integer;Lcom/withpersona/sdk2/inquiry/Environment;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lcom/withpersona/sdk2/inquiry/StaticInquiryTemplate;Ljava/lang/String;Ljava/lang/String;)V", "Ljava/lang/Boolean;", "Ljava/lang/Integer;", "start", "", "activity", "Landroid/app/Activity;", "requestCode", "toInquiryActivityIntent", "Landroid/content/Intent;", "context", "Landroid/content/Context;", "Companion", "Contract", "inquiry-public_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class Inquiry {
public static final Companion INSTANCE = new Companion(null);
private final String accountId;
private final Boolean enableErrorLogging;
private final Environment environment;
private final String environmentId;
private final Fields fields;
private final String inquiryId;
private final String referenceId;
private final Boolean returnCollectedData;
private final String routingCountry;
private final String sessionToken;
private final Boolean shouldAutoFallback;
private final StaticInquiryTemplate staticInquiryTemplate;
private final String templateId;
private final String templateVersion;
private final Integer theme;
private final String themeSetId;
private final Boolean useServerStyles;
@JvmStatic
public static final InquiryBuilder fromInquiry(String str) {
return INSTANCE.fromInquiry(str);
}
@JvmStatic
public static final InquiryTemplateBuilder fromStaticTemplate(StaticInquiryTemplate staticInquiryTemplate) {
return INSTANCE.fromStaticTemplate(staticInquiryTemplate);
}
@JvmStatic
public static final InquiryTemplateBuilder fromTemplate(String str) {
return INSTANCE.fromTemplate(str);
}
@JvmStatic
public static final InquiryTemplateBuilder fromTemplateVersion(String str) {
return INSTANCE.fromTemplateVersion(str);
}
@Deprecated(message = "Use registerForActivityResult with the Inquiry.Contract instead.")
@JvmStatic
public static final InquiryResponse onActivityResult(Intent intent) {
return INSTANCE.onActivityResult(intent);
}
@Deprecated(message = "Use registerForActivityResult with the Inquiry.Contract instead.")
@JvmStatic
public static final InquiryResponse onActivityResult(Intent intent, Context context) {
return INSTANCE.onActivityResult(intent, context);
}
public Inquiry(String str, String str2, String str3, String str4, String str5, String str6, Fields fields, Integer num, Environment environment, String str7, Boolean bool, Boolean bool2, Boolean bool3, Boolean bool4, StaticInquiryTemplate staticInquiryTemplate, String str8, String str9) {
this.templateId = str;
this.templateVersion = str2;
this.inquiryId = str3;
this.sessionToken = str4;
this.referenceId = str5;
this.accountId = str6;
this.fields = fields;
this.theme = num;
this.environment = environment;
this.environmentId = str7;
this.enableErrorLogging = bool;
this.returnCollectedData = bool2;
this.shouldAutoFallback = bool3;
this.useServerStyles = bool4;
this.staticInquiryTemplate = staticInquiryTemplate;
this.themeSetId = str8;
this.routingCountry = str9;
}
@Deprecated(message = "Use registerForActivityResult with the Inquiry.Contract instead.")
public final void start(Activity activity, int requestCode) {
Intrinsics.checkNotNullParameter(activity, "activity");
activity.startActivityForResult(toInquiryActivityIntent(activity), requestCode);
}
public final Intent toInquiryActivityIntent(Context context) {
Intent intent = new Intent();
intent.setClassName(context, "com.withpersona.sdk2.inquiry.internal.InquiryActivity");
String str = this.templateId;
if (str != null) {
intent.putExtra(InquiryIntentKeys.TEMPLATE_ID, str);
}
String str2 = this.templateVersion;
if (str2 != null) {
intent.putExtra(InquiryIntentKeys.TEMPLATE_VERSION, str2);
}
String str3 = this.inquiryId;
if (str3 != null) {
intent.putExtra(InquiryIntentKeys.INQUIRY_ID, str3);
}
String str4 = this.sessionToken;
if (str4 != null) {
intent.putExtra(InquiryIntentKeys.SESSION_TOKEN, str4);
}
String str5 = this.referenceId;
if (str5 != null) {
intent.putExtra(InquiryIntentKeys.REFERENCE_ID, str5);
}
String str6 = this.accountId;
if (str6 != null) {
intent.putExtra(InquiryIntentKeys.ACCOUNT_ID, str6);
}
Fields fields = this.fields;
if (fields != null) {
intent.putExtra(InquiryIntentKeys.FIELDS_MAP, new InquiryFieldsMap(fields.getFields$inquiry_public_release()));
}
Integer num = this.theme;
if (num != null) {
intent.putExtra(InquiryIntentKeys.THEME, num.intValue());
}
StaticInquiryTemplate staticInquiryTemplate = this.staticInquiryTemplate;
if (staticInquiryTemplate != null) {
intent.putExtra(InquiryIntentKeys.STATIC_INQUIRY_TEMPLATE, StaticInquiryTemplateKt.to(staticInquiryTemplate));
}
Environment environment = this.environment;
if (environment != null) {
intent.putExtra(InquiryIntentKeys.ENVIRONMENT, environment.name());
}
String str7 = this.environmentId;
if (str7 != null) {
intent.putExtra(InquiryIntentKeys.ENVIRONMENT_ID, str7);
}
Boolean bool = this.enableErrorLogging;
if (bool != null) {
intent.putExtra(InquiryIntentKeys.ENABLE_ERROR_LOGGING, bool.booleanValue());
}
Boolean bool2 = this.returnCollectedData;
if (bool2 != null) {
intent.putExtra(InquiryIntentKeys.RETURN_COLLECTED_DATA, bool2.booleanValue());
}
Boolean bool3 = this.shouldAutoFallback;
if (bool3 != null) {
intent.putExtra(InquiryIntentKeys.SHOULD_AUTO_FALLBACK, bool3.booleanValue());
}
Boolean bool4 = this.useServerStyles;
if (bool4 != null) {
intent.putExtra(InquiryIntentKeys.USE_SERVER_STYLES, bool4.booleanValue());
}
String str8 = this.themeSetId;
if (str8 != null) {
intent.putExtra(InquiryIntentKeys.THEME_SET_ID, str8);
}
String str9 = this.routingCountry;
if (str9 != null) {
intent.putExtra(InquiryIntentKeys.ROUTING_COUNTRY, str9);
}
return intent;
}
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\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\u0010\b\n\u0002\b\u0002\b\u0016\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001B\u000f\b\u0016\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006B\u0007\b\u0007¢\u0006\u0002\u0010\u0007J\u0018\u0010\b\u001a\u00020\t2\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\n\u001a\u00020\u0002H\u0016J\u001a\u0010\u000b\u001a\u00020\u00032\u0006\u0010\f\u001a\u00020\r2\b\u0010\u000e\u001a\u0004\u0018\u00010\tH\u0016R\u0010\u0010\u0004\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u000f"}, d2 = {"Lcom/withpersona/sdk2/inquiry/Inquiry$Contract;", "Landroidx/activity/result/contract/ActivityResultContract;", "Lcom/withpersona/sdk2/inquiry/Inquiry;", "Lcom/withpersona/sdk2/inquiry/InquiryResponse;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "()V", "createIntent", "Landroid/content/Intent;", "input", "parseResult", "resultCode", "", "intent", "inquiry-public_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static class Contract extends ActivityResultContract<Inquiry, InquiryResponse> {
private Context context;
@Deprecated(message = "Use constructor Contract(Context) instead.")
public Contract() {
}
public Contract(Context context) {
this();
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
}
public Intent createIntent(Context context, Inquiry input) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(input, "input");
return input.toInquiryActivityIntent(context);
}
public InquiryResponse m145parseResult(int resultCode, Intent intent) {
return Inquiry.INSTANCE.onActivityResult(intent, this.context);
}
}
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007J\u0010\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\nH\u0007J\u0010\u0010\u000b\u001a\u00020\b2\u0006\u0010\f\u001a\u00020\u0006H\u0007J\u0010\u0010\r\u001a\u00020\b2\u0006\u0010\u000e\u001a\u00020\u0006H\u0007J\u001e\u0010\u000f\u001a\u00020\u00102\b\u0010\u0011\u001a\u0004\u0018\u00010\u00122\n\b\u0002\u0010\u0013\u001a\u0004\u0018\u00010\u0014H\u0007J\u0006\u0010\u0015\u001a\u00020\u0016J\u0018\u0010\u0017\u001a\u00020\u0018*\u0004\u0018\u00010\u00122\b\u0010\u0013\u001a\u0004\u0018\u00010\u0014H\u0002¨\u0006\u0019"}, d2 = {"Lcom/withpersona/sdk2/inquiry/Inquiry$Companion;", "", "()V", "fromInquiry", "Lcom/withpersona/sdk2/inquiry/InquiryBuilder;", "inquiryId", "", "fromStaticTemplate", "Lcom/withpersona/sdk2/inquiry/InquiryTemplateBuilder;", "staticInquiryTemplate", "Lcom/withpersona/sdk2/inquiry/StaticInquiryTemplate;", "fromTemplate", "templateId", "fromTemplateVersion", "templateVersion", "onActivityResult", "Lcom/withpersona/sdk2/inquiry/InquiryResponse;", "intent", "Landroid/content/Intent;", "context", "Landroid/content/Context;", "prefetchModels", "", "getStatus", "Lcom/withpersona/sdk2/inquiry/internal/InquiryIntentKeys$Status;", "inquiry-public_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class Companion {
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
public class WhenMappings {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[InquiryIntentKeys.Status.values().length];
try {
iArr[InquiryIntentKeys.Status.INQUIRY_COMPLETE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[InquiryIntentKeys.Status.INQUIRY_CANCELED.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[InquiryIntentKeys.Status.INQUIRY_ERROR.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
$EnumSwitchMapping$0 = iArr;
}
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@Deprecated(message = "Use registerForActivityResult with the Inquiry.Contract instead.")
@JvmStatic
public final InquiryResponse onActivityResult(Intent intent) {
return onActivityResult$default(this, intent, null, 2, null);
}
private Companion() {
}
@JvmStatic
public final InquiryTemplateBuilder fromTemplate(String templateId) {
Intrinsics.checkNotNullParameter(templateId, "templateId");
return new InquiryTemplateBuilder(templateId, null, null, 6, null);
}
@JvmStatic
public final InquiryTemplateBuilder fromTemplateVersion(String templateVersion) {
Intrinsics.checkNotNullParameter(templateVersion, "templateVersion");
return new InquiryTemplateBuilder(null, templateVersion, null, 5, null);
}
@JvmStatic
public final InquiryTemplateBuilder fromStaticTemplate(StaticInquiryTemplate staticInquiryTemplate) {
Intrinsics.checkNotNullParameter(staticInquiryTemplate, "staticInquiryTemplate");
return new InquiryTemplateBuilder(null, null, staticInquiryTemplate, 3, null);
}
@JvmStatic
public final InquiryBuilder fromInquiry(String inquiryId) {
Intrinsics.checkNotNullParameter(inquiryId, "inquiryId");
return new InquiryBuilder(inquiryId);
}
public static InquiryResponse onActivityResult$default(Companion companion, Intent intent, Context context, int i, Object obj) {
if ((i & 2) != 0) {
context = null;
}
return companion.onActivityResult(intent, context);
}
@Deprecated(message = "Use registerForActivityResult with the Inquiry.Contract instead.")
@JvmStatic
public final InquiryResponse onActivityResult(Intent intent, Context context) {
InquiryFieldsMap inquiryFieldsMap;
InquiryField unknownField;
InquiryField.DateField dateField;
Bundle extras;
Bundle extras2;
Bundle extras3;
Bundle extras4;
Bundle extras5;
Bundle extras6;
InquiryIntentKeys.Status status = getStatus(intent, context);
String string = (intent == null || (extras6 = intent.getExtras()) == null) ? null : extras6.getString(InquiryIntentKeys.INQUIRY_ID);
int i = WhenMappings.$EnumSwitchMapping$0[status.ordinal()];
if (i != 1) {
if (i == 2) {
if (intent != null && (extras4 = intent.getExtras()) != null) {
r1 = extras4.getString(InquiryIntentKeys.SESSION_TOKEN);
}
return new InquiryResponse.Cancel(string, r1);
}
if (i != 3) {
throw new NoWhenBranchMatchedException();
}
String string2 = (intent == null || (extras5 = intent.getExtras()) == null) ? null : extras5.getString(InquiryIntentKeys.ERROR_DEBUG_MESSAGE);
r1 = context != null ? ExceptionUtilsKt.getErrorHandler(context).getLastErrorMessage() : null;
if (string2 == null) {
string2 = InquiryErrorMessages.unexpectedError;
}
return new InquiryResponse.Error(string2, r1);
}
if (intent == null || (extras3 = intent.getExtras()) == null || (inquiryFieldsMap = (InquiryFieldsMap) BundleCompat.getParcelable(extras3, InquiryIntentKeys.FIELDS_MAP, InquiryFieldsMap.class)) == null) {
inquiryFieldsMap = new InquiryFieldsMap(MapsKt.emptyMap());
}
String string3 = (intent == null || (extras2 = intent.getExtras()) == null) ? null : extras2.getString(InquiryIntentKeys.INQUIRY_STATUS);
CollectedData collectedData = (intent == null || (extras = intent.getExtras()) == null) ? null : CollectedDataConversionsKt.getCollectedData(extras);
Intrinsics.checkNotNull(string);
Intrinsics.checkNotNull(string3);
Map<String, com.withpersona.sdk2.inquiry.internal.InquiryField> fields = inquiryFieldsMap.getFields();
LinkedHashMap linkedHashMap = new LinkedHashMap(MapsKt.mapCapacity(fields.size()));
Iterator<T> it = fields.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
Object key = entry.getKey();
com.withpersona.sdk2.inquiry.internal.InquiryField inquiryField = (com.withpersona.sdk2.inquiry.internal.InquiryField) entry.getValue();
if (inquiryField instanceof InquiryField.StringField) {
unknownField = new InquiryField.StringField(((InquiryField.StringField) inquiryField).getValue());
} else if (inquiryField instanceof InquiryField.IntegerField) {
unknownField = new InquiryField.IntegerField(((InquiryField.IntegerField) inquiryField).getValue());
} else if (inquiryField instanceof InquiryField.BooleanField) {
unknownField = new InquiryField.BooleanField(((InquiryField.BooleanField) inquiryField).getValue());
} else if (inquiryField instanceof InquiryField.FloatField) {
unknownField = new InquiryField.FloatField(((InquiryField.FloatField) inquiryField).getValue());
} else if (inquiryField instanceof InquiryField.DateField) {
String value = ((InquiryField.DateField) inquiryField).getValue();
if (value != null) {
dateField = new InquiryField.DateField(new SimpleDateFormat("yyyy-MM-dd", Locale.US).parse(value));
} else {
dateField = new InquiryField.DateField(null);
}
unknownField = dateField;
} else if (inquiryField instanceof InquiryField.DatetimeField) {
String value2 = ((InquiryField.DatetimeField) inquiryField).getValue();
if (value2 != null) {
unknownField = new InquiryField.DateField(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.US).parse(value2));
} else {
unknownField = new InquiryField.DatetimeField(null);
}
} else {
unknownField = inquiryField instanceof InquiryField.Unknown ? new InquiryField.UnknownField(inquiryField.getType()) : new InquiryField.UnknownField("unknown");
}
linkedHashMap.put(key, unknownField);
}
return new InquiryResponse.Complete(string, string3, linkedHashMap, collectedData);
}
public final void prefetchModels() {
Prefetching.INSTANCE.prefetchModels();
}
private final InquiryIntentKeys.Status getStatus(Intent intent, Context context) {
Bundle extras;
String string;
InquiryIntentKeys.Status valueOf = (intent == null || (extras = intent.getExtras()) == null || (string = extras.getString(InquiryIntentKeys.PERSONA_ACTIVITY_RESULT)) == null) ? null : InquiryIntentKeys.Status.valueOf(string);
if (valueOf != null) {
return valueOf;
}
if (context == null) {
return InquiryIntentKeys.Status.INQUIRY_CANCELED;
}
if (ExceptionUtilsKt.getErrorHandler(context).hasLastErrorMessage()) {
return InquiryIntentKeys.Status.INQUIRY_ERROR;
}
return InquiryIntentKeys.Status.INQUIRY_CANCELED;
}
}
}