小红书.apk(点击下载) / g.java


package p61;

import android.os.Bundle;
import bj2.h;
import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting;
import com.xingin.android.redutils.base.XhsActivity;
import com.xingin.android.xhscomm.router.Routers;
import com.xingin.matrix.followfeed.entities.Brand;
import com.xingin.matrix.followfeed.entities.NoteFeed;
import dw2.r;
import g61.i;
import he1.o;
import java.util.List;
import kotlin.Metadata;
import kotlin.Triple;
import kotlin.Unit;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.FunctionReferenceImpl;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import q61.a;
import z41.l;

@Metadata(bv = {}, d1 = {"\u0000ˆ\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u0014\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u00020\u00030\u0001B\u0007¢\u0006\u0004\bN\u0010OJ(\u0010\f\u001a\u00020\u000b2\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\b\u001a\u00020\u00072\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0002J\u0012\u0010\u000f\u001a\u00020\u000b2\b\u0010\u000e\u001a\u0004\u0018\u00010\rH\u0002J\b\u0010\u0010\u001a\u00020\u000bH\u0002J\b\u0010\u0011\u001a\u00020\u000bH\u0002J\b\u0010\u0012\u001a\u00020\u000bH\u0002J\u0012\u0010\u0015\u001a\u00020\u000b2\b\u0010\u0014\u001a\u0004\u0018\u00010\u0013H\u0014RB\u0010\u0018\u001a\"\u0012\u001e\u0012\u001c\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0007\u0012\u0006\u0012\u0004\u0018\u00010\t0\u00170\u00168\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b\u0018\u0010\u0019\u001a\u0004\b\u001a\u0010\u001b\"\u0004\b\u001c\u0010\u001dR@\u0010\u001f\u001a \u0012\u001c\u0012\u001a\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u001e0\u00170\u00168\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b\u001f\u0010\u0019\u001a\u0004\b \u0010\u001b\"\u0004\b!\u0010\u001dR\"\u0010#\u001a\u00020\"8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b#\u0010$\u001a\u0004\b%\u0010&\"\u0004\b'\u0010(R(\u0010+\u001a\b\u0012\u0004\u0012\u00020*0)8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b+\u0010,\u001a\u0004\b-\u0010.\"\u0004\b/\u00100R\"\u00102\u001a\u0002018\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b2\u00103\u001a\u0004\b4\u00105\"\u0004\b6\u00107R\"\u00109\u001a\u0002088\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\b9\u0010:\u001a\u0004\b;\u0010<\"\u0004\b=\u0010>R(\u0010A\u001a\b\u0012\u0004\u0012\u00020@0?8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bA\u0010B\u001a\u0004\bC\u0010D\"\u0004\bE\u0010FR\"\u0010H\u001a\u00020G8\u0006@\u0006X‡.¢\u0006\u0012\n\u0004\bH\u0010I\u001a\u0004\bJ\u0010K\"\u0004\bL\u0010M¨\u0006P"}, d2 = {"Lp61/g;", "Ltu0/b;", "Lp61/j;", "Lp61/i;", "Lkotlin/Function0;", "", "position", "Lcom/xingin/matrix/followfeed/entities/NoteFeed;", "data", "", "payloads", "", "k1", "Lcom/xingin/matrix/followfeed/entities/Brand;", "brand", "Z0", "i1", "h1", "l1", "Landroid/os/Bundle;", "savedInstanceState", "onAttach", "Ldw2/r;", "Lkotlin/Triple;", "updateDateObservable", "Ldw2/r;", "getUpdateDateObservable", "()Ldw2/r;", "setUpdateDateObservable", "(Ldw2/r;)V", "Lhe1/d;", "asyncWidgetsEntityObservable", "a1", "setAsyncWidgetsEntityObservable", "Lk61/b;", "pageIntentImpl", "Lk61/b;", "f1", "()Lk61/b;", "setPageIntentImpl", "(Lk61/b;)V", "Ldx2/d;", "Lq61/a;", "cooperateEventSubject", "Ldx2/d;", "b1", "()Ldx2/d;", "setCooperateEventSubject", "(Ldx2/d;)V", "Lcom/xingin/android/redutils/base/XhsActivity;", "activity", "Lcom/xingin/android/redutils/base/XhsActivity;", "getActivity", "()Lcom/xingin/android/redutils/base/XhsActivity;", "setActivity", "(Lcom/xingin/android/redutils/base/XhsActivity;)V", "Lob1/b;", "dataHelper", "Lob1/b;", "c1", "()Lob1/b;", "setDataHelper", "(Lob1/b;)V", "Ldx2/b;", "Ld91/a;", "noteContentEventSubject", "Ldx2/b;", "e1", "()Ldx2/b;", "setNoteContentEventSubject", "(Ldx2/b;)V", "Lg61/i;", "guideManager", "Lg61/i;", "d1", "()Lg61/i;", "setGuideManager", "(Lg61/i;)V", "<init>", "()V", "matrix_detail_feed_library_release"}, k = 1, mv = {1, 6, 0})
/* compiled from: DetailFeedCooperateBtnController.kt */
public final class g extends tu0.b<j, g, i> {

    /* renamed from: a  reason: collision with root package name */
    public r<Triple<Function0<Integer>, NoteFeed, Object>> f116985a;

    /* renamed from: b  reason: collision with root package name */
    public r<Triple<Function0<Integer>, NoteFeed, he1.d>> f116986b;

    /* renamed from: c  reason: collision with root package name */
    public gb1.a f116987c;

    /* renamed from: d  reason: collision with root package name */
    public k61.b f116988d;

    /* renamed from: e  reason: collision with root package name */
    public dx2.d<q61.a> f116989e;

    /* renamed from: f  reason: collision with root package name */
    public XhsActivity f116990f;

    /* renamed from: g  reason: collision with root package name */
    public ob1.b f116991g;

    /* renamed from: h  reason: collision with root package name */
    public dx2.b<d91.a> f116992h;

    /* renamed from: i  reason: collision with root package name */
    public i f116993i;

    /* renamed from: j  reason: collision with root package name */
    public Brand f116994j;

    /* renamed from: k  reason: collision with root package name */
    public Function0<Integer> f116995k = C1808g.f117001a;

    /* renamed from: l  reason: collision with root package name */
    public NoteFeed f116996l = new NoteFeed(null, null, null, null, null, null, 0, null, null, null, null, null, false, null, null, null, null, null, false, false, 0, null, 0, 0, 0, 0, false, false, null, null, 0, null, null, null, null, false, null, false, null, null, 0.0f, null, null, null, null, false, false, 0, null, null, false, null, false, null, null, null, null, null, null, 0, null, null, null, null, null, null, false, 0, null, false, null, false, null, null, null, null, null, false, false, 0, null, null, null, null, null, null, null, null, null, null, null, null, false, false, null, -1, -1, Integer.MAX_VALUE, null);

    @Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Lq61/a;", "kotlin.jvm.PlatformType", AdvanceSetting.NETWORK_TYPE, "", "a", "(Lq61/a;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public static final class a extends Lambda implements Function1<q61.a, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f116997a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(g gVar) {
            super(1);
            this.f116997a = gVar;
        }

        public final void a(q61.a aVar) {
            if (aVar instanceof a.C1897a) {
                ((j) this.f116997a.getPresenter()).i(true);
                if (((a.C1897a) aVar).a()) {
                    ((j) this.f116997a.getPresenter()).g();
                }
            }
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(q61.a aVar) {
            a(aVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Ld91/a;", "kotlin.jvm.PlatformType", AdvanceSetting.NETWORK_TYPE, "", "a", "(Ld91/a;)V"}, k = 3, mv = {1, 6, 0})
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public static final class b extends Lambda implements Function1<d91.a, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f116998a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(g gVar) {
            super(1);
            this.f116998a = gVar;
        }

        public final void a(d91.a aVar) {
            if (aVar instanceof d91.b) {
                d91.b bVar = (d91.b) aVar;
                float a14 = bVar.a();
                boolean z14 = false;
                if (0.0f <= a14 && a14 <= 1.0f) {
                    z14 = true;
                }
                if (z14) {
                    ((j) this.f116998a.getPresenter()).h(1.0f - bVar.a());
                }
            }
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(d91.a aVar) {
            a(aVar);
            return Unit.INSTANCE;
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public /* synthetic */ class c extends FunctionReferenceImpl implements Function1<Throwable, Unit> {
        public c(Object obj) {
            super(1, obj, l.class, "e", "e(Ljava/lang/Throwable;)V", 0);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(Throwable th3) {
            invoke(th3);
            return Unit.INSTANCE;
        }

        public final void invoke(Throwable th3) {
            Intrinsics.checkNotNullParameter(th3, "p0");
            l.e(th3);
        }
    }

    @Metadata(d1 = {"\u0000\u001e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u00020\u00012 \u0010\u0002\u001a\u001c\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0006\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0003H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "Lkotlin/Triple;", "Lkotlin/Function0;", "", "Lcom/xingin/matrix/followfeed/entities/NoteFeed;", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public static final class d extends Lambda implements Function1<Triple<? extends Function0<? extends Integer>, ? extends NoteFeed, ? extends Object>, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f116999a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(g gVar) {
            super(1);
            this.f116999a = gVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(Triple<? extends Function0<? extends Integer>, ? extends NoteFeed, ? extends Object> triple) {
            invoke((Triple<? extends Function0<Integer>, NoteFeed, ? extends Object>) triple);
            return Unit.INSTANCE;
        }

        public final void invoke(Triple<? extends Function0<Integer>, NoteFeed, ? extends Object> triple) {
            Intrinsics.checkNotNullParameter(triple, AdvanceSetting.NETWORK_TYPE);
            this.f116999a.k1((Function0) triple.getFirst(), triple.getSecond(), triple.getThird());
        }
    }

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public /* synthetic */ class e extends FunctionReferenceImpl implements Function0<Unit> {
        public e(Object obj) {
            super(0, obj, g.class, "onCooperateClick", "onCooperateClick()V", 0);
        }

        @Override // kotlin.jvm.functions.Function0
        public final void invoke() {
            ((g) this.receiver).l1();
        }
    }

    @Metadata(bv = {}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\n\u001a\u00020\u00072>\u0010\u0006\u001a:\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00020\u0001\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u0004 \u0005*\u001c\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00020\u0001\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\b\u0010\t"}, d2 = {"Lkotlin/Triple;", "Lkotlin/Function0;", "", "Lcom/xingin/matrix/followfeed/entities/NoteFeed;", "Lhe1/d;", "kotlin.jvm.PlatformType", AdvanceSetting.NETWORK_TYPE, "", "invoke", "(Lkotlin/Triple;)V", "<anonymous>"}, k = 3, mv = {1, 6, 0})
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public static final class f extends Lambda implements Function1<Triple<? extends Function0<? extends Integer>, ? extends NoteFeed, ? extends he1.d>, Unit> {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ g f117000a;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public f(g gVar) {
            super(1);
            this.f117000a = gVar;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kotlin.jvm.functions.Function1
        public /* bridge */ /* synthetic */ Unit invoke(Triple<? extends Function0<? extends Integer>, ? extends NoteFeed, ? extends he1.d> triple) {
            invoke((Triple<? extends Function0<Integer>, NoteFeed, he1.d>) triple);
            return Unit.INSTANCE;
        }

        public final void invoke(Triple<? extends Function0<Integer>, NoteFeed, he1.d> triple) {
            this.f117000a.f116995k = (Function0) triple.getFirst();
            this.f117000a.f116996l = triple.getSecond();
            g gVar = this.f117000a;
            List<Brand> cooperate = triple.getThird().getCooperate();
            gVar.f116994j = cooperate != null ? (Brand) CollectionsKt___CollectionsKt.firstOrNull((List) cooperate) : null;
            Brand brand = this.f117000a.f116994j;
            if (brand != null) {
                this.f117000a.Z0(brand);
            }
        }
    }

    @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"<anonymous>", "", "invoke", "()Ljava/lang/Integer;"}, k = 3, mv = {1, 6, 0}, xi = 48)
    /* renamed from: p61.g$g  reason: collision with other inner class name */
    /* compiled from: DetailFeedCooperateBtnController.kt */
    public static final class C1808g extends Lambda implements Function0<Integer> {

        /* renamed from: a  reason: collision with root package name */
        public static final C1808g f117001a = new C1808g();

        public C1808g() {
            super(0);
        }

        @Override // kotlin.jvm.functions.Function0
        public final Integer invoke() {
            return -1;
        }
    }

    public static final boolean j1(Triple triple) {
        Intrinsics.checkNotNullParameter(triple, AdvanceSetting.NETWORK_TYPE);
        List<Brand> cooperate = ((he1.d) triple.getThird()).getCooperate();
        return !(cooperate == null || cooperate.isEmpty());
    }

    public final void Z0(Brand brand) {
        ((j) getPresenter()).b(brand);
        if (!o.isValide(this.f116996l.getAd()) && brand != null && !f1().u() && !f1().p()) {
            d1().i(((j) getPresenter()).e());
        }
    }

    public final r<Triple<Function0<Integer>, NoteFeed, he1.d>> a1() {
        r<Triple<Function0<Integer>, NoteFeed, he1.d>> rVar = this.f116986b;
        if (rVar != null) {
            return rVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("asyncWidgetsEntityObservable");
        return null;
    }

    public final dx2.d<q61.a> b1() {
        dx2.d<q61.a> dVar = this.f116989e;
        if (dVar != null) {
            return dVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("cooperateEventSubject");
        return null;
    }

    public final ob1.b c1() {
        ob1.b bVar = this.f116991g;
        if (bVar != null) {
            return bVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("dataHelper");
        return null;
    }

    public final i d1() {
        i iVar = this.f116993i;
        if (iVar != null) {
            return iVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("guideManager");
        return null;
    }

    public final dx2.b<d91.a> e1() {
        dx2.b<d91.a> bVar = this.f116992h;
        if (bVar != null) {
            return bVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("noteContentEventSubject");
        return null;
    }

    public final k61.b f1() {
        k61.b bVar = this.f116988d;
        if (bVar != null) {
            return bVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("pageIntentImpl");
        return null;
    }

    public final XhsActivity getActivity() {
        XhsActivity xhsActivity = this.f116990f;
        if (xhsActivity != null) {
            return xhsActivity;
        }
        Intrinsics.throwUninitializedPropertyAccessException("activity");
        return null;
    }

    public final r<Triple<Function0<Integer>, NoteFeed, Object>> getUpdateDateObservable() {
        r<Triple<Function0<Integer>, NoteFeed, Object>> rVar = this.f116985a;
        if (rVar != null) {
            return rVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("updateDateObservable");
        return null;
    }

    public final void h1() {
        h.d(b1(), this, new a(this));
    }

    public final void i1() {
        h.f(e1(), this, new b(this), new c(l.f160483a));
    }

    public final void k1(Function0<Integer> function0, NoteFeed noteFeed, Object obj) {
        this.f116995k = function0;
        this.f116996l = noteFeed;
    }

    public final void l1() {
        Brand brand = this.f116994j;
        if (brand != null) {
            Routers.build(brand.getLink()).open(getActivity());
            mb1.i.f105119a.k(c1(), this.f116996l, this.f116995k.invoke().intValue(), brand.getId());
        }
    }

    @Override // tu0.b
    public void onAttach(Bundle bundle) {
        super.onAttach(bundle);
        h.d(getUpdateDateObservable(), this, new d(this));
        h.e(((j) getPresenter()).d(), this, new e(this));
        h1();
        i1();
        r<Triple<Function0<Integer>, NoteFeed, he1.d>> u04 = a1().u0(f.f116984a);
        Intrinsics.checkNotNullExpressionValue(u04, "asyncWidgetsEntityObserv…e.isNullOrEmpty().not() }");
        h.d(u04, this, new f(this));
    }
}