Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 PaySMSFragment.java 源代码,内容仅作参考
package by.kufar.vas.ui.vas.bump.screen.paySms;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ViewAnimator;
import androidx.autofill.HintConstants;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.core.os.BundleKt;
import androidx.core.view.KeyEventDispatcher;
import androidx.core.view.ViewGroupKt;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.graphics.OnBackPressedCallback;
import androidx.graphics.OnBackPressedDispatcher;
import androidx.graphics.OnBackPressedDispatcherKt;
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import by.kufar.core.android.fragment.BaseFragment;
import by.kufar.re.ui.widget.error.ErrorView;
import by.kufar.re.ui.widget.webview.WebViewActivity;
import by.kufar.vas.R$id;
import by.kufar.vas.R$layout;
import by.kufar.vas.R$string;
import by.kufar.vas.ui.vas.bump.base.VasOffsetItemDecorator;
import by.kufar.vas.ui.vas.bump.screen.paySms.PaySMSVM;
import by.kufar.vas.ui.vas.bump.screen.paySms.adapter.PaySMSController;
import com.google.android.material.snackbar.Snackbar;
import com.tapjoy.TJAdUnitConstants;
import d80.u;
import e80.t;
import hp.d;
import java.io.Serializable;
import java.util.Iterator;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.o0;
import kotlin.jvm.internal.s;
import kotlin.reflect.KProperty;
@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000\u0096\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\t\b\u0007\u0018\u0000 `2\u00020\u00012\u00020\u0002:\u0001aB\u0007¢\u0006\u0004\b^\u0010_J\b\u0010\u0004\u001a\u00020\u0003H\u0002J\b\u0010\u0005\u001a\u00020\u0003H\u0002J\b\u0010\u0006\u001a\u00020\u0003H\u0002J\u0010\u0010\t\u001a\u00020\u00032\u0006\u0010\b\u001a\u00020\u0007H\u0002J\u0018\u0010\r\u001a\u00020\u00032\u0006\u0010\u000b\u001a\u00020\n2\u0006\u0010\f\u001a\u00020\nH\u0002J\b\u0010\u000e\u001a\u00020\u0003H\u0016J&\u0010\u0016\u001a\u0004\u0018\u00010\u00152\u0006\u0010\u0010\u001a\u00020\u000f2\b\u0010\u0012\u001a\u0004\u0018\u00010\u00112\b\u0010\u0014\u001a\u0004\u0018\u00010\u0013H\u0016J\u001a\u0010\u0018\u001a\u00020\u00032\u0006\u0010\u0017\u001a\u00020\u00152\b\u0010\u0014\u001a\u0004\u0018\u00010\u0013H\u0016J\u0010\u0010\u001a\u001a\u00020\u00032\u0006\u0010\u0019\u001a\u00020\nH\u0016J\u0018\u0010\u001b\u001a\u00020\u00032\u0006\u0010\u000b\u001a\u00020\n2\u0006\u0010\f\u001a\u00020\nH\u0016J\b\u0010\u001c\u001a\u00020\u0003H\u0016R\"\u0010\u001e\u001a\u00020\u001d8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b\u001e\u0010\u001f\u001a\u0004\b \u0010!\"\u0004\b\"\u0010#R\"\u0010%\u001a\u00020$8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b%\u0010&\u001a\u0004\b'\u0010(\"\u0004\b)\u0010*R\u001b\u00100\u001a\u00020+8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b,\u0010-\u001a\u0004\b.\u0010/R\u001b\u00106\u001a\u0002018BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b2\u00103\u001a\u0004\b4\u00105R\u001b\u0010;\u001a\u0002078BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b8\u00103\u001a\u0004\b9\u0010:R\u001b\u0010@\u001a\u00020<8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b=\u00103\u001a\u0004\b>\u0010?R\u001b\u0010E\u001a\u00020A8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bB\u0010-\u001a\u0004\bC\u0010DR\u001b\u0010I\u001a\u00020\n8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bF\u0010-\u001a\u0004\bG\u0010HR\u001d\u0010N\u001a\u0004\u0018\u00010J8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bK\u0010-\u001a\u0004\bL\u0010MR\u001b\u0010S\u001a\u00020O8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bP\u0010-\u001a\u0004\bQ\u0010RR\u001b\u0010X\u001a\u00020T8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bU\u0010-\u001a\u0004\bV\u0010WR\u001b\u0010]\u001a\u00020Y8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bZ\u0010-\u001a\u0004\b[\u0010\\¨\u0006b"}, d2 = {"Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSFragment;", "Lby/kufar/core/android/fragment/BaseFragment;", "Lby/kufar/vas/ui/vas/bump/screen/paySms/adapter/PaySMSController$a;", "", "setUpTitle", "setUpListeners", "setUpRecycler", "Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSVM$a;", "state", "handleState", "", HintConstants.AUTOFILL_HINT_PHONE_NUMBER, TJAdUnitConstants.String.MESSAGE, "sendSMS", "onInject", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "orderId", "onAlreadyPaidButtonClick", "onPayButtonClick", "onSpannableTextClick", "Landroidx/lifecycle/ViewModelProvider$Factory;", "viewModelFactory", "Landroidx/lifecycle/ViewModelProvider$Factory;", "getViewModelFactory", "()Landroidx/lifecycle/ViewModelProvider$Factory;", "setViewModelFactory", "(Landroidx/lifecycle/ViewModelProvider$Factory;)V", "Lxo/a;", "bumpTracker", "Lxo/a;", "getBumpTracker", "()Lxo/a;", "setBumpTracker", "(Lxo/a;)V", "Lby/kufar/vas/ui/vas/bump/screen/paySms/adapter/PaySMSController;", "controller$delegate", "Ld80/j;", "getController", "()Lby/kufar/vas/ui/vas/bump/screen/paySms/adapter/PaySMSController;", "controller", "Landroidx/recyclerview/widget/RecyclerView;", "recycler$delegate", "Li6/c;", "getRecycler", "()Landroidx/recyclerview/widget/RecyclerView;", "recycler", "Landroid/widget/ViewAnimator;", "animator$delegate", "getAnimator", "()Landroid/widget/ViewAnimator;", "animator", "Lby/kufar/re/ui/widget/error/ErrorView;", "error$delegate", "getError", "()Lby/kufar/re/ui/widget/error/ErrorView;", "error", "Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSVM;", "paySMSVM$delegate", "getPaySMSVM", "()Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSVM;", "paySMSVM", "productID$delegate", "getProductID", "()Ljava/lang/String;", "productID", "", "adID$delegate", "getAdID", "()Ljava/lang/Long;", "adID", "Lir/e;", "providerType$delegate", "getProviderType", "()Lir/e;", "providerType", "Lir/b;", "operatorType$delegate", "getOperatorType", "()Lir/b;", "operatorType", "Lan/a;", "vasType$delegate", "getVasType", "()Lan/a;", "vasType", "<init>", "()V", "Companion", "a", "feature-vas_googleRelease"}, k = 1, mv = {1, 9, 0})
public final class PaySMSFragment extends BaseFragment implements PaySMSController.a {
private static final String AD_ID = "AD_ID";
private static final String OPERATOR_TYPE = "OPERATOR_TYPE";
private static final String PRODUCT_ID = "PRODUCT_ID";
private static final String PROVIDER_TYPE = "PROVIDER_TYPE";
private static final String VAS_TYPE = "VAS_TYPE";
private final d80.j adID;
private final i6.c animator;
public xo.a bumpTracker;
private final d80.j controller;
private final i6.c error;
private final d80.j operatorType;
private final d80.j paySMSVM;
private final d80.j productID;
private final d80.j providerType;
private final i6.c recycler;
private final d80.j vasType;
public ViewModelProvider.Factory viewModelFactory;
static final KProperty<Object>[] $$delegatedProperties = {o0.i(new g0(PaySMSFragment.class, "recycler", "getRecycler()Landroidx/recyclerview/widget/RecyclerView;", 0)), o0.i(new g0(PaySMSFragment.class, "animator", "getAnimator()Landroid/widget/ViewAnimator;", 0)), o0.i(new g0(PaySMSFragment.class, "error", "getError()Lby/kufar/re/ui/widget/error/ErrorView;", 0))};
public static final Companion INSTANCE = new Companion(null);
public static final int $stable = 8;
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0015\u0010\u0016J7\u0010\r\u001a\u00020\f2\u0006\u0010\u0003\u001a\u00020\u00022\b\u0010\u0005\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\n¢\u0006\u0004\b\r\u0010\u000eR\u0014\u0010\u000f\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u000f\u0010\u0010R\u0014\u0010\u0011\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0011\u0010\u0010R\u0014\u0010\u0012\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0012\u0010\u0010R\u0014\u0010\u0013\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0013\u0010\u0010R\u0014\u0010\u0014\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0014\u0010\u0010¨\u0006\u0017"}, d2 = {"Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSFragment$a;", "", "", "productID", "", "adID", "Lir/e;", "providerType", "Lir/b;", "operatorType", "Lan/a;", "vasType", "Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSFragment;", "a", "(Ljava/lang/String;Ljava/lang/Long;Lir/e;Lir/b;Lan/a;)Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSFragment;", "AD_ID", "Ljava/lang/String;", PaySMSFragment.OPERATOR_TYPE, "PRODUCT_ID", PaySMSFragment.PROVIDER_TYPE, PaySMSFragment.VAS_TYPE, "<init>", "()V", "feature-vas_googleRelease"}, k = 1, mv = {1, 9, 0})
public static final class Companion {
public Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final PaySMSFragment a(String productID, Long adID, ir.e providerType, ir.b operatorType, an.a vasType) {
s.j(productID, "productID");
s.j(providerType, "providerType");
s.j(operatorType, "operatorType");
s.j(vasType, "vasType");
PaySMSFragment paySMSFragment = new PaySMSFragment();
paySMSFragment.setArguments(BundleKt.bundleOf(u.a("PRODUCT_ID", productID), u.a("AD_ID", adID), u.a(PaySMSFragment.PROVIDER_TYPE, providerType), u.a(PaySMSFragment.OPERATOR_TYPE, operatorType), u.a(PaySMSFragment.VAS_TYPE, vasType)));
return paySMSFragment;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class b extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public final Throwable f20282d;
public b(Throwable th2) {
super(1);
this.f20282d = th2;
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openCustomErrorDialog(((ap.a) this.f20282d).getCode().toString());
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Lby/kufar/vas/ui/vas/a;", "", "a", "(Lby/kufar/vas/ui/vas/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class c extends kotlin.jvm.internal.u implements Function1<by.kufar.vas.ui.vas.a, Unit> {
public static final c f20283d = new c();
public c() {
super(1);
}
public final void a(by.kufar.vas.ui.vas.a openVasFragmentOrThrow) {
s.j(openVasFragmentOrThrow, "$this$openVasFragmentOrThrow");
openVasFragmentOrThrow.openSMSConfirmDialog();
}
@Override
public Unit invoke(by.kufar.vas.ui.vas.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelProvider$Factory;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class d extends kotlin.jvm.internal.u implements Function0<ViewModelProvider.Factory> {
public d() {
super(0);
}
@Override
public final ViewModelProvider.Factory invoke() {
return PaySMSFragment.this.getViewModelFactory();
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public static final class e implements Observer, kotlin.jvm.internal.m {
public final Function1 f20285b;
public e(Function1 function) {
s.j(function, "function");
this.f20285b = function;
}
public final boolean equals(Object obj) {
if (!(obj instanceof Observer) || !(obj instanceof kotlin.jvm.internal.m)) {
return false;
}
return s.e(getFunctionDelegate(), ((kotlin.jvm.internal.m) obj).getFunctionDelegate());
}
@Override
public final d80.f<?> getFunctionDelegate() {
return this.f20285b;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
@Override
public final void onChanged(Object obj) {
this.f20285b.invoke(obj);
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class f extends kotlin.jvm.internal.u implements Function1<View, Unit> {
public f() {
super(1);
}
@Override
public Unit invoke(View view) {
invoke2(view);
return Unit.f82492a;
}
public final void invoke2(View it) {
s.j(it, "it");
PaySMSFragment.this.getPaySMSVM().load(PaySMSFragment.this.getVasType(), PaySMSFragment.this.getProductID(), PaySMSFragment.this.getAdID(), PaySMSFragment.this.getProviderType(), PaySMSFragment.this.getOperatorType(), true);
}
}
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\n¢\u0006\u0002\b\u0003"}, d2 = {"<anonymous>", "", "Landroidx/activity/OnBackPressedCallback;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class g extends kotlin.jvm.internal.u implements Function1<OnBackPressedCallback, Unit> {
public g() {
super(1);
}
@Override
public Unit invoke(OnBackPressedCallback onBackPressedCallback) {
invoke2(onBackPressedCallback);
return Unit.f82492a;
}
public final void invoke2(OnBackPressedCallback addCallback) {
s.j(addCallback, "$this$addCallback");
PaySMSFragment.this.getBumpTracker().x(PaySMSFragment.this.getVasType().getTitle());
PaySMSFragment.this.getParentFragmentManager().popBackStack();
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class h extends kotlin.jvm.internal.p implements Function1<PaySMSVM.a, Unit> {
public h(Object obj) {
super(1, obj, PaySMSFragment.class, "handleState", "handleState(Lby/kufar/vas/ui/vas/bump/screen/paySms/PaySMSVM$State;)V", 0);
}
public final void a(PaySMSVM.a p02) {
s.j(p02, "p0");
((PaySMSFragment) this.receiver).handleState(p02);
}
@Override
public Unit invoke(PaySMSVM.a aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class i extends kotlin.jvm.internal.u implements Function0<PaySMSController> {
public i() {
super(0);
}
@Override
public final PaySMSController invoke() {
Context requireContext = PaySMSFragment.this.requireContext();
s.i(requireContext, "requireContext(...)");
return new PaySMSController(requireContext, PaySMSFragment.this);
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class j extends kotlin.jvm.internal.u implements Function0<String> {
public j() {
super(0);
}
@Override
public final String invoke() {
String string;
Bundle arguments = PaySMSFragment.this.getArguments();
if (arguments != null && (string = arguments.getString("PRODUCT_ID")) != null) {
s.g(string);
return string;
}
throw new IllegalStateException("BUMP_ID should be not null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class k extends kotlin.jvm.internal.u implements Function0<Long> {
public k() {
super(0);
}
@Override
public final Long invoke() {
Bundle arguments = PaySMSFragment.this.getArguments();
if (arguments != null) {
s.g(arguments);
return s5.b.a(arguments, "AD_ID");
}
return null;
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class l extends kotlin.jvm.internal.u implements Function0<ir.e> {
public l() {
super(0);
}
@Override
public final ir.e invoke() {
Serializable serializable;
Bundle arguments = PaySMSFragment.this.getArguments();
ir.e eVar = null;
if (arguments != null) {
serializable = arguments.getSerializable(PaySMSFragment.PROVIDER_TYPE);
} else {
serializable = null;
}
if (serializable instanceof ir.e) {
eVar = (ir.e) serializable;
}
if (eVar != null) {
return eVar;
}
throw new IllegalStateException("PROVIDER_TYPE should be not null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class m extends kotlin.jvm.internal.u implements Function0<ir.b> {
public m() {
super(0);
}
@Override
public final ir.b invoke() {
Serializable serializable;
Bundle arguments = PaySMSFragment.this.getArguments();
ir.b bVar = null;
if (arguments != null) {
serializable = arguments.getSerializable(PaySMSFragment.OPERATOR_TYPE);
} else {
serializable = null;
}
if (serializable instanceof ir.b) {
bVar = (ir.b) serializable;
}
if (bVar != null) {
return bVar;
}
throw new IllegalStateException("OPERATOR_TYPE should be not null".toString());
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
public static final class n extends kotlin.jvm.internal.u implements Function0<an.a> {
public n() {
super(0);
}
@Override
public final an.a invoke() {
Serializable serializable;
Bundle arguments = PaySMSFragment.this.getArguments();
an.a aVar = null;
if (arguments != null) {
serializable = arguments.getSerializable(PaySMSFragment.VAS_TYPE);
} else {
serializable = null;
}
if (serializable instanceof an.a) {
aVar = (an.a) serializable;
}
if (aVar != null) {
return aVar;
}
throw new IllegalStateException("VAS_NAME should be not null".toString());
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/fragment/app/Fragment;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$5"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class o extends kotlin.jvm.internal.u implements Function0<Fragment> {
public final Fragment f20294d;
public o(Fragment fragment) {
super(0);
this.f20294d = fragment;
}
@Override
public final Fragment invoke() {
return this.f20294d;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelStoreOwner;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$owner$4"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class p extends kotlin.jvm.internal.u implements Function0<ViewModelStoreOwner> {
public final Function0 f20295d;
public p(Function0 function0) {
super(0);
this.f20295d = function0;
}
@Override
public final ViewModelStoreOwner invoke() {
return (ViewModelStoreOwner) this.f20295d.invoke();
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelStore;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$6"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class q extends kotlin.jvm.internal.u implements Function0<ViewModelStore> {
public final d80.j f20296d;
public q(d80.j jVar) {
super(0);
this.f20296d = jVar;
}
@Override
public final ViewModelStore invoke() {
ViewModelStoreOwner m4202viewModels$lambda1;
m4202viewModels$lambda1 = FragmentViewModelLazyKt.m4202viewModels$lambda1(this.f20296d);
ViewModelStore viewModelStore = m4202viewModels$lambda1.getViewModelStore();
s.i(viewModelStore, "owner.viewModelStore");
return viewModelStore;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/viewmodel/CreationExtras;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$7"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class r extends kotlin.jvm.internal.u implements Function0<CreationExtras> {
public final Function0 f20297d;
public final d80.j f20298e;
public r(Function0 function0, d80.j jVar) {
super(0);
this.f20297d = function0;
this.f20298e = jVar;
}
@Override
public final CreationExtras invoke() {
ViewModelStoreOwner m4202viewModels$lambda1;
CreationExtras creationExtras;
Function0 function0 = this.f20297d;
if (function0 != null && (creationExtras = (CreationExtras) function0.invoke()) != null) {
return creationExtras;
}
m4202viewModels$lambda1 = FragmentViewModelLazyKt.m4202viewModels$lambda1(this.f20298e);
HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = m4202viewModels$lambda1 instanceof HasDefaultViewModelProviderFactory ? (HasDefaultViewModelProviderFactory) m4202viewModels$lambda1 : null;
CreationExtras defaultViewModelCreationExtras = hasDefaultViewModelProviderFactory != null ? hasDefaultViewModelProviderFactory.getDefaultViewModelCreationExtras() : null;
return defaultViewModelCreationExtras == null ? CreationExtras.Empty.INSTANCE : defaultViewModelCreationExtras;
}
}
public PaySMSFragment() {
d80.m mVar = d80.m.f73493d;
this.controller = d80.k.a(mVar, new i());
this.recycler = bindView(R$id.Q0);
this.animator = bindView(R$id.f19431a);
this.error = bindView(R$id.L);
d dVar = new d();
d80.j a11 = d80.k.a(mVar, new p(new o(this)));
this.paySMSVM = FragmentViewModelLazyKt.createViewModelLazy(this, o0.b(PaySMSVM.class), new q(a11), new r(null, a11), dVar);
this.productID = d80.k.a(mVar, new j());
this.adID = d80.k.a(mVar, new k());
this.providerType = d80.k.a(mVar, new l());
this.operatorType = d80.k.a(mVar, new m());
this.vasType = d80.k.a(mVar, new n());
}
public final Long getAdID() {
return (Long) this.adID.getValue();
}
private final ViewAnimator getAnimator() {
return (ViewAnimator) this.animator.getValue(this, $$delegatedProperties[1]);
}
private final PaySMSController getController() {
return (PaySMSController) this.controller.getValue();
}
private final ErrorView getError() {
return (ErrorView) this.error.getValue(this, $$delegatedProperties[2]);
}
public final ir.b getOperatorType() {
return (ir.b) this.operatorType.getValue();
}
public final PaySMSVM getPaySMSVM() {
return (PaySMSVM) this.paySMSVM.getValue();
}
public final String getProductID() {
return (String) this.productID.getValue();
}
public final ir.e getProviderType() {
return (ir.e) this.providerType.getValue();
}
private final RecyclerView getRecycler() {
return (RecyclerView) this.recycler.getValue(this, $$delegatedProperties[0]);
}
public final an.a getVasType() {
return (an.a) this.vasType.getValue();
}
public final void handleState(PaySMSVM.a state) {
boolean z11;
boolean z12;
boolean z13;
int i11 = -1;
if (state instanceof PaySMSVM.a.C0350a) {
ViewAnimator animator = getAnimator();
int i12 = R$id.Q0;
Iterator<View> it = ViewGroupKt.getChildren(animator).iterator();
int i13 = 0;
while (true) {
if (!it.hasNext()) {
break;
}
View next = it.next();
if (i13 < 0) {
t.x();
}
if (next.getId() == i12) {
z13 = true;
} else {
z13 = false;
}
if (z13) {
i11 = i13;
break;
}
i13++;
}
if (animator.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator.setDisplayedChild(i11);
} else {
throw new IllegalArgumentException("View with ID " + i12 + " not found.");
}
}
getController().setItems(((PaySMSVM.a.C0350a) state).a());
return;
}
if (state instanceof PaySMSVM.a.b) {
PaySMSVM.a.b bVar = (PaySMSVM.a.b) state;
Throwable exception = bVar.getException();
if ((exception instanceof ap.a) && ((ap.a) exception).getCode() != null) {
by.kufar.vas.ui.vas.b.a(this, new b(exception));
return;
}
ViewAnimator animator2 = getAnimator();
int i14 = R$id.L;
Iterator<View> it2 = ViewGroupKt.getChildren(animator2).iterator();
int i15 = 0;
while (true) {
if (!it2.hasNext()) {
break;
}
View next2 = it2.next();
if (i15 < 0) {
t.x();
}
if (next2.getId() == i14) {
z12 = true;
} else {
z12 = false;
}
if (z12) {
i11 = i15;
break;
}
i15++;
}
if (animator2.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator2.setDisplayedChild(i11);
} else {
throw new IllegalArgumentException("View with ID " + i14 + " not found.");
}
}
getError().setupError(bVar.getException());
return;
}
if (s.e(state, PaySMSVM.a.c.f20301a)) {
ViewAnimator animator3 = getAnimator();
int i16 = R$id.I0;
Iterator<View> it3 = ViewGroupKt.getChildren(animator3).iterator();
int i17 = 0;
while (true) {
if (!it3.hasNext()) {
break;
}
View next3 = it3.next();
if (i17 < 0) {
t.x();
}
if (next3.getId() == i16) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
i11 = i17;
break;
}
i17++;
}
if (animator3.getDisplayedChild() != i11) {
if (i11 >= 0) {
animator3.setDisplayedChild(i11);
return;
}
throw new IllegalArgumentException("View with ID " + i16 + " not found.");
}
return;
}
throw new d80.n();
}
private final void sendSMS(String phoneNumber, String message) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("sms:" + phoneNumber));
intent.putExtra("sms_body", message);
try {
startActivity(intent);
getBumpTracker().W(getVasType().getTitle());
} catch (Exception unused) {
Snackbar s11 = ek.b.s(ek.b.f75340a, getView(), getString(R$string.f19589d), 0, null, 0, null, 60, null);
if (s11 != null) {
s11.W();
}
}
}
private final void setUpListeners() {
OnBackPressedDispatcher onBackPressedDispatcher;
getError().setOnRetryListener(new f());
FragmentActivity activity = getActivity();
if (activity != null && (onBackPressedDispatcher = activity.getOnBackPressedDispatcher()) != null) {
OnBackPressedDispatcherKt.addCallback$default(onBackPressedDispatcher, getViewLifecycleOwner(), false, new g(), 2, null);
}
}
private final void setUpRecycler() {
getRecycler().setAdapter(getController().getAdapter());
getRecycler().setLayoutManager(new LinearLayoutManager(requireContext()));
getRecycler().setHasFixedSize(true);
getRecycler().addItemDecoration(new VasOffsetItemDecorator(0, 0, 3, null));
getRecycler().setItemAnimator(null);
getPaySMSVM().getState().observe(getViewLifecycleOwner(), new e(new h(this)));
getPaySMSVM().load(getVasType(), getProductID(), getAdID(), getProviderType(), getOperatorType(), false);
}
private final void setUpTitle() {
hp.d dVar;
KeyEventDispatcher.Component activity = getActivity();
if (activity instanceof hp.d) {
dVar = (hp.d) activity;
} else {
dVar = null;
}
if (dVar != null) {
d.a.a(dVar, R$string.f19599g0, false, 2, null);
}
}
public final xo.a getBumpTracker() {
xo.a aVar = this.bumpTracker;
if (aVar != null) {
return aVar;
}
s.B("bumpTracker");
return null;
}
public final ViewModelProvider.Factory getViewModelFactory() {
ViewModelProvider.Factory factory = this.viewModelFactory;
if (factory != null) {
return factory;
}
s.B("viewModelFactory");
return null;
}
@Override
public void onAlreadyPaidButtonClick(String orderId) {
s.j(orderId, "orderId");
by.kufar.vas.ui.vas.b.a(this, c.f20283d);
getBumpTracker().P(getVasType().getTitle(), getAdID(), orderId);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
s.j(inflater, "inflater");
return inflater.inflate(R$layout.U, container, false);
}
@Override
public void onInject() {
super.onInject();
by.kufar.vas.ui.vas.d.b(this).h(this);
}
@Override
public void onPayButtonClick(String phoneNumber, String message) {
s.j(phoneNumber, "phoneNumber");
s.j(message, "message");
sendSMS(phoneNumber, message);
}
@Override
public void onSpannableTextClick() {
Context context = getContext();
if (context != null) {
startActivity(WebViewActivity.Companion.b(WebViewActivity.INSTANCE, context, "https://www.kufar.by/podrobnee_ob_usluge_podnyatiya_obyavlenij.htm", false, null, false, false, 60, null));
}
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
s.j(view, "view");
super.onViewCreated(view, savedInstanceState);
getBumpTracker().N(getVasType().getTitle(), getAdID());
setUpRecycler();
setUpTitle();
setUpListeners();
}
public final void setBumpTracker(xo.a aVar) {
s.j(aVar, "<set-?>");
this.bumpTracker = aVar;
}
public final void setViewModelFactory(ViewModelProvider.Factory factory) {
s.j(factory, "<set-?>");
this.viewModelFactory = factory;
}
}