WeChat.apk(点击下载) / i.java


package uk1;

import android.content.Context;
import android.content.Intent;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.PopupWindow;
import android.widget.TextView;
import bw3.bv1;
import bw3.ci4;
import bw3.hr1;
import bw3.ir1;
import bw3.jn1;
import bw3.pq0;
import bw3.qq0;
import bw3.tk;
import bw3.uk;
import bw3.ul0;
import com.tencent.mm.R;
import com.tencent.mm.plugin.finder.bullet.MegaVideoBulletView;
import com.tencent.mm.plugin.finder.service.t1;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.ui.MMFragmentActivity;
import com.tencent.mm.ui.t2;
import d32.d1;
import d32.ta;
import ez1.f1;
import ez1.o2;
import i14.d0;
import i14.l0;
import i14.p0;
import i14.y0;
import im1.a;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import kh4.l;
import lh4.m;
import lh4.o;
import m60.d;
import n94.f;
import org.json.JSONObject;
import p64.n;
import pu1.o0;
import t32.b5;
import t32.d2;
import t32.k6;
import u32.b;
import uk1.e;
import wg4.b0;
import wk1.n2;
import xg4.r0;
import y24.r;
import yf0.b;
import yf0.c;
import yz3.j;
import z81.g;

public final class i implements p0 {

    /* renamed from: d  reason: collision with root package name */
    public final /* synthetic */ MMFragmentActivity f318761d;

    /* renamed from: e  reason: collision with root package name */
    public final /* synthetic */ tk f318762e;

    /* renamed from: f  reason: collision with root package name */
    public final /* synthetic */ bv1 f318763f;

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

    /* renamed from: h  reason: collision with root package name */
    public final /* synthetic */ o0 f318765h;

    /* renamed from: i  reason: collision with root package name */
    public final /* synthetic */ boolean f318766i;

    /* renamed from: j  reason: collision with root package name */
    public final /* synthetic */ PopupWindow.OnDismissListener f318767j;

    /* renamed from: n  reason: collision with root package name */
    public final /* synthetic */ kh4.a<b0> f318768n;

    /* renamed from: o  reason: collision with root package name */
    public final /* synthetic */ int f318769o;

    public static final class a extends o implements l<b.c<? extends ci4>, b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ MMFragmentActivity f318770d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ tk f318771e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ boolean f318772f;

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

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ PopupWindow.OnDismissListener f318774h;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(MMFragmentActivity mMFragmentActivity, tk tkVar, boolean z15, p0 p0Var, PopupWindow.OnDismissListener onDismissListener) {
            super(1);
            this.f318770d = mMFragmentActivity;
            this.f318771e = tkVar;
            this.f318772f = z15;
            this.f318773g = p0Var;
            this.f318774h = onDismissListener;
        }

        /* 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 // kh4.l
        public b0 invoke(b.c<? extends ci4> cVar) {
            qq0 qq02;
            uk ukVar;
            String str;
            d dVar;
            boolean z15;
            b.c<? extends ci4> cVar2 = cVar;
            u32.b bVar = e.f318756d;
            if (bVar != null) {
                bVar.b();
            }
            Integer num = null;
            e.f318756d = null;
            T t15 = cVar2.f345502d;
            if (t15 instanceof qq0) {
                qq02 = (qq0) t15;
            } else {
                qq02 = null;
            }
            if (qq02 != null) {
                ukVar = qq02.f34525d;
            } else {
                ukVar = null;
            }
            StringBuilder sb5 = new StringBuilder();
            sb5.append("GetBulletCommentUser errType:");
            sb5.append(cVar2.f345499a);
            sb5.append(", errCode:");
            sb5.append(cVar2.f345500b);
            sb5.append(", nickname=");
            if (ukVar != null) {
                str = ukVar.f38778e;
            } else {
                str = null;
            }
            sb5.append(str);
            sb5.append(", is_in_black_list=");
            if (ukVar != null) {
                num = Integer.valueOf(ukVar.f38779f);
            }
            sb5.append(num);
            Log.i("FinderBulletPopupHelper", sb5.toString());
            if (cVar2.f345499a == 0 && cVar2.f345500b == 0) {
                MMFragmentActivity mMFragmentActivity = this.f318770d;
                tk tkVar = this.f318771e;
                boolean z16 = this.f318772f;
                if (ukVar == null || ukVar.f38779f != 1) {
                    z15 = false;
                } else {
                    z15 = true;
                }
                dVar = new d(z16, tkVar, mMFragmentActivity.getResources(), z15);
            } else {
                dVar = new d(this.f318772f, this.f318771e, this.f318770d.getResources(), false);
            }
            n nVar = new n((Context) this.f318770d, 1, false);
            nVar.f281245i = dVar;
            nVar.f281259q = this.f318773g;
            nVar.f281235d = new h(this.f318774h);
            nVar.q();
            return b0.f332794a;
        }
    }

    public static final class b implements n.p {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ PopupWindow.OnDismissListener f318775a;

        public b(PopupWindow.OnDismissListener onDismissListener) {
            this.f318775a = onDismissListener;
        }

        @Override // p64.n.p
        public final void onDismiss() {
            this.f318775a.onDismiss();
        }
    }

    public static final class c implements p0 {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ View f318776d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ o0 f318777e;

        /* renamed from: f  reason: collision with root package name */
        public final /* synthetic */ tk f318778f;

        /* renamed from: g  reason: collision with root package name */
        public final /* synthetic */ PopupWindow.OnDismissListener f318779g;

        /* renamed from: h  reason: collision with root package name */
        public final /* synthetic */ MMFragmentActivity f318780h;

        /* renamed from: i  reason: collision with root package name */
        public final /* synthetic */ bv1 f318781i;

        /* renamed from: j  reason: collision with root package name */
        public final /* synthetic */ kh4.a<b0> f318782j;

        /* renamed from: n  reason: collision with root package name */
        public final /* synthetic */ boolean f318783n;

        /* renamed from: o  reason: collision with root package name */
        public final /* synthetic */ int f318784o;

        public static final class a implements l0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ View f318785d;

            public a(View view) {
                this.f318785d = view;
            }

            @Override // i14.l0
            public final void onCreateMMMenu(d0 d0Var) {
                if (d0Var.v()) {
                    d0Var.d(10, this.f318785d.getContext().getResources().getColor(R.color.f358911a31), this.f318785d.getContext().getString(R.string.f367414t0));
                }
            }
        }

        public static final class b implements p0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ MMFragmentActivity f318786d;

            /* renamed from: e  reason: collision with root package name */
            public final /* synthetic */ PopupWindow.OnDismissListener f318787e;

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ bv1 f318788f;

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

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ tk f318790h;

            /* renamed from: i  reason: collision with root package name */
            public final /* synthetic */ View f318791i;

            /* renamed from: j  reason: collision with root package name */
            public final /* synthetic */ kh4.a<b0> f318792j;

            /* renamed from: n  reason: collision with root package name */
            public final /* synthetic */ boolean f318793n;

            /* renamed from: o  reason: collision with root package name */
            public final /* synthetic */ int f318794o;

            public static final class a<_Ret, _Var> implements g74.a {

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

                /* renamed from: b  reason: collision with root package name */
                public final /* synthetic */ o0 f318796b;

                /* renamed from: c  reason: collision with root package name */
                public final /* synthetic */ tk f318797c;

                /* renamed from: d  reason: collision with root package name */
                public final /* synthetic */ kh4.a<b0> f318798d;

                /* renamed from: e  reason: collision with root package name */
                public final /* synthetic */ MMFragmentActivity f318799e;

                /* renamed from: f  reason: collision with root package name */
                public final /* synthetic */ bv1 f318800f;

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

                /* renamed from: h  reason: collision with root package name */
                public final /* synthetic */ int f318802h;

                public a(View view, o0 o0Var, tk tkVar, kh4.a<b0> aVar, MMFragmentActivity mMFragmentActivity, bv1 bv12, boolean z15, int i15) {
                    this.f318795a = view;
                    this.f318796b = o0Var;
                    this.f318797c = tkVar;
                    this.f318798d = aVar;
                    this.f318799e = mMFragmentActivity;
                    this.f318800f = bv12;
                    this.f318801g = z15;
                    this.f318802h = i15;
                }

                @Override // g74.a
                public Object call(Object obj) {
                    boolean z15;
                    b.c cVar = (b.c) obj;
                    if (cVar.f345499a == 0 && cVar.f345500b == 0) {
                        y0.makeText(this.f318795a.getContext(), (int) R.string.gu8, 0).show();
                        o0 o0Var = this.f318796b;
                        long j15 = this.f318797c.f37648d;
                        Iterator it = ((ArrayList) o0Var.f285663h).iterator();
                        int i15 = 0;
                        while (true) {
                            if (!it.hasNext()) {
                                i15 = -1;
                                break;
                            }
                            if (((c) it.next()).f318748a.f37648d == j15) {
                                z15 = true;
                            } else {
                                z15 = false;
                            }
                            if (z15) {
                                break;
                            }
                            i15++;
                        }
                        if (i15 > -1) {
                            ((ArrayList) o0Var.f285663h).remove(i15);
                        }
                        this.f318798d.invoke();
                        j jVar = j.f318822a;
                        MMFragmentActivity mMFragmentActivity = this.f318799e;
                        bv1 bv12 = this.f318800f;
                        JSONObject jSONObject = new JSONObject();
                        tk tkVar = this.f318797c;
                        o0 o0Var2 = this.f318796b;
                        jSONObject.put("bs_id", m60.d.p(tkVar.f37648d));
                        jSONObject.put("feedid", m60.d.p(o0Var2.getItemId()));
                        b0 b0Var = b0.f332794a;
                        jVar.a(mMFragmentActivity, bv12, "already_delete_bullet_screen", false, jSONObject, this.f318801g, this.f318797c.f37654j);
                        jVar.c(this.f318799e, this.f318797c, this.f318796b.getItemId(), this.f318802h, false);
                        jVar.d(this.f318795a, this.f318799e, this.f318797c, this.f318796b.getItemId(), this.f318802h, false);
                    } else {
                        y0.makeText(this.f318795a.getContext(), (int) R.string.gu7, 0).show();
                    }
                    return b0.f332794a;
                }
            }

            public b(MMFragmentActivity mMFragmentActivity, PopupWindow.OnDismissListener onDismissListener, bv1 bv12, o0 o0Var, tk tkVar, View view, kh4.a<b0> aVar, boolean z15, int i15) {
                this.f318786d = mMFragmentActivity;
                this.f318787e = onDismissListener;
                this.f318788f = bv12;
                this.f318789g = o0Var;
                this.f318790h = tkVar;
                this.f318791i = view;
                this.f318792j = aVar;
                this.f318793n = z15;
                this.f318794o = i15;
            }

            @Override // i14.p0
            public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
                if (menuItem.getItemId() == 10) {
                    hr1 hr12 = new hr1();
                    bv1 bv12 = this.f318788f;
                    o0 o0Var = this.f318789g;
                    tk tkVar = this.f318790h;
                    hr12.f24078d = n2.f333835a.b(11836, bv12);
                    hr12.f24079e = o0Var.getItemId();
                    hr12.f24080f = tkVar.f37648d;
                    hr12.f24081g = 1;
                    c.b bVar = new c.b();
                    bVar.f345562d = 11836;
                    bVar.f345561c = "/cgi-bin/micromsg-bin/finderopbulletcomment";
                    bVar.f345559a = hr12;
                    bVar.f345560b = new ir1();
                    yf0.c a15 = bVar.a();
                    yf0.b ll5 = ((d2) j.c(d2.class)).ll();
                    ll5.i(a15);
                    ll5.h().P(new a(this.f318791i, this.f318789g, this.f318790h, this.f318792j, this.f318786d, this.f318788f, this.f318793n, this.f318794o)).n(this.f318786d);
                }
                this.f318787e.onDismiss();
            }
        }

        /* renamed from: uk1.i$c$c  reason: collision with other inner class name */
        public static final class C5533c implements n.p {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ PopupWindow.OnDismissListener f318803a;

            public C5533c(PopupWindow.OnDismissListener onDismissListener) {
                this.f318803a = onDismissListener;
            }

            @Override // p64.n.p
            public final void onDismiss() {
                this.f318803a.onDismiss();
            }
        }

        public static final class d implements k6<jn1> {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ MMFragmentActivity f318804d;

            /* renamed from: e  reason: collision with root package name */
            public final /* synthetic */ bv1 f318805e;

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ boolean f318806f;

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

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ o0 f318808h;

            public d(MMFragmentActivity mMFragmentActivity, bv1 bv12, boolean z15, tk tkVar, o0 o0Var) {
                this.f318804d = mMFragmentActivity;
                this.f318805e = bv12;
                this.f318806f = z15;
                this.f318807g = tkVar;
                this.f318808h = o0Var;
            }

            /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, bw3.ul0] */
            @Override // t32.k6
            public void D6(jn1 jn12, ul0 ul02) {
                m.g(jn12, "req");
                m.g(ul02, "ret");
                Context context = MMApplicationContext.getContext();
                if (ul02.f38816e == 0) {
                    Log.i("FinderBulletPopupHelper", "remove bullet black list succ");
                    y0.makeText(context, context.getResources().getString(R.string.f1s), 0).show();
                    j jVar = j.f318822a;
                    MMFragmentActivity mMFragmentActivity = this.f318804d;
                    bv1 bv12 = this.f318805e;
                    JSONObject jSONObject = new JSONObject();
                    tk tkVar = this.f318807g;
                    o0 o0Var = this.f318808h;
                    jSONObject.put("bs_id", m60.d.p(tkVar.f37648d));
                    jSONObject.put("feedid", m60.d.p(o0Var.getItemId()));
                    b0 b0Var = b0.f332794a;
                    jVar.a(mMFragmentActivity, bv12, "already_out_blacklist", false, jSONObject, this.f318806f, this.f318807g.f37654j);
                    return;
                }
                Log.i("FinderBulletPopupHelper", "remove comment black list failed:" + ul02.f38816e);
                y0.makeText(context, context.getResources().getString(R.string.f1t), 0).show();
            }
        }

        public static final class e implements l0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ View f318809d;

            public e(View view) {
                this.f318809d = view;
            }

            @Override // i14.l0
            public final void onCreateMMMenu(d0 d0Var) {
                if (d0Var.v()) {
                    d0Var.d(11, this.f318809d.getContext().getResources().getColor(R.color.f358911a31), this.f318809d.getContext().getString(R.string.f367559x1));
                }
            }
        }

        public static final class f implements p0 {

            /* renamed from: d  reason: collision with root package name */
            public final /* synthetic */ tk f318810d;

            /* renamed from: e  reason: collision with root package name */
            public final /* synthetic */ o0 f318811e;

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ PopupWindow.OnDismissListener f318812f;

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

            /* renamed from: h  reason: collision with root package name */
            public final /* synthetic */ bv1 f318814h;

            /* renamed from: i  reason: collision with root package name */
            public final /* synthetic */ boolean f318815i;

            public static final class a implements k6<jn1> {

                /* renamed from: d  reason: collision with root package name */
                public final /* synthetic */ MMFragmentActivity f318816d;

                /* renamed from: e  reason: collision with root package name */
                public final /* synthetic */ bv1 f318817e;

                /* renamed from: f  reason: collision with root package name */
                public final /* synthetic */ boolean f318818f;

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

                /* renamed from: h  reason: collision with root package name */
                public final /* synthetic */ o0 f318820h;

                public a(MMFragmentActivity mMFragmentActivity, bv1 bv12, boolean z15, tk tkVar, o0 o0Var) {
                    this.f318816d = mMFragmentActivity;
                    this.f318817e = bv12;
                    this.f318818f = z15;
                    this.f318819g = tkVar;
                    this.f318820h = o0Var;
                }

                /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, bw3.ul0] */
                @Override // t32.k6
                public void D6(jn1 jn12, ul0 ul02) {
                    m.g(jn12, "req");
                    m.g(ul02, "ret");
                    Context context = MMApplicationContext.getContext();
                    if (ul02.f38816e == 0) {
                        Log.i("FinderBulletPopupHelper", "bullet black list succ");
                        y0.makeText(context, context.getResources().getString(R.string.e7g), 0).show();
                        j jVar = j.f318822a;
                        MMFragmentActivity mMFragmentActivity = this.f318816d;
                        bv1 bv12 = this.f318817e;
                        JSONObject jSONObject = new JSONObject();
                        tk tkVar = this.f318819g;
                        o0 o0Var = this.f318820h;
                        jSONObject.put("bs_id", m60.d.p(tkVar.f37648d));
                        jSONObject.put("feedid", m60.d.p(o0Var.getItemId()));
                        b0 b0Var = b0.f332794a;
                        jVar.a(mMFragmentActivity, bv12, "already_into_blacklist", false, jSONObject, this.f318818f, this.f318819g.f37654j);
                        return;
                    }
                    Log.i("FinderBulletPopupHelper", "comment black list failed:" + ul02.f38816e);
                    y0.makeText(context, context.getResources().getString(R.string.e7h), 0).show();
                }
            }

            public f(tk tkVar, o0 o0Var, PopupWindow.OnDismissListener onDismissListener, MMFragmentActivity mMFragmentActivity, bv1 bv12, boolean z15) {
                this.f318810d = tkVar;
                this.f318811e = o0Var;
                this.f318812f = onDismissListener;
                this.f318813g = mMFragmentActivity;
                this.f318814h = bv12;
                this.f318815i = z15;
            }

            @Override // i14.p0
            public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
                if (menuItem.getItemId() == 11) {
                    ((t1) j.c(t1.class)).hE(this.f318810d.f37648d, this.f318811e.t().getId(), this.f318811e.t().getObjectNonceId(), true, new a(this.f318813g, this.f318814h, this.f318815i, this.f318810d, this.f318811e));
                }
                this.f318812f.onDismiss();
            }
        }

        public static final class g implements n.p {

            /* renamed from: a  reason: collision with root package name */
            public final /* synthetic */ PopupWindow.OnDismissListener f318821a;

            public g(PopupWindow.OnDismissListener onDismissListener) {
                this.f318821a = onDismissListener;
            }

            @Override // p64.n.p
            public final void onDismiss() {
                this.f318821a.onDismiss();
            }
        }

        public c(View view, o0 o0Var, tk tkVar, PopupWindow.OnDismissListener onDismissListener, MMFragmentActivity mMFragmentActivity, bv1 bv12, kh4.a<b0> aVar, boolean z15, int i15) {
            this.f318776d = view;
            this.f318777e = o0Var;
            this.f318778f = tkVar;
            this.f318779g = onDismissListener;
            this.f318780h = mMFragmentActivity;
            this.f318781i = bv12;
            this.f318782j = aVar;
            this.f318783n = z15;
            this.f318784o = i15;
        }

        @Override // i14.p0
        public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
            im1.a b15;
            int itemId = menuItem.getItemId();
            if (itemId == 1) {
                e.f318754b = true;
                n nVar = new n(this.f318776d.getContext(), 1, true);
                nVar.n(t2.b(this.f318776d.getContext()).inflate(R.layout.f366164ag3, (ViewGroup) null), false);
                View view = this.f318776d;
                nVar.f281245i = new a(view);
                MMFragmentActivity mMFragmentActivity = this.f318780h;
                PopupWindow.OnDismissListener onDismissListener = this.f318779g;
                nVar.f281259q = new b(mMFragmentActivity, onDismissListener, this.f318781i, this.f318777e, this.f318778f, view, this.f318782j, this.f318783n, this.f318784o);
                nVar.f281235d = new C5533c(onDismissListener);
                nVar.q();
            } else if (itemId == 2) {
                e.f318754b = false;
                Context context = this.f318776d.getContext();
                m.f(context, "anchorView.context");
                long itemId2 = this.f318777e.getItemId();
                String format = String.format("https://weixin110.qq.com/security/readtemplate?t=weixin_report/w_type&scene=%d&comment_ID=%s&Content_ID=%s", Arrays.copyOf(new Object[]{63, m60.d.p(this.f318778f.f37648d), m60.d.p(itemId2)}, 3));
                m.f(format, "format(format, *args)");
                Intent intent = new Intent();
                intent.putExtra("rawUrl", format);
                sv3.b.j(context, "webview", ".ui.tools.WebViewUI", intent, null);
                ((f1) j.c(f1.class)).eO0(itemId2);
                ta f15 = ta.W0.f(context);
                if (!(f15 == null || (b15 = b5.a.b(f15, 0, 1, null)) == null)) {
                    b15.a(new a.C3178a(17, itemId2));
                }
                this.f318779g.onDismiss();
            } else if (itemId == 3) {
                e.f318754b = true;
                n nVar2 = new n(this.f318776d.getContext(), 1, true);
                View inflate = t2.b(this.f318776d.getContext()).inflate(R.layout.f366164ag3, (ViewGroup) null);
                ((TextView) inflate.findViewById(R.id.ob5)).setText(this.f318776d.getContext().getResources().getString(R.string.cmh));
                nVar2.n(inflate, false);
                nVar2.f281245i = new e(this.f318776d);
                tk tkVar = this.f318778f;
                o0 o0Var = this.f318777e;
                PopupWindow.OnDismissListener onDismissListener2 = this.f318779g;
                nVar2.f281259q = new f(tkVar, o0Var, onDismissListener2, this.f318780h, this.f318781i, this.f318783n);
                nVar2.f281235d = new g(onDismissListener2);
                nVar2.q();
            } else if (itemId == 4) {
                e.f318754b = false;
                ((t1) j.c(t1.class)).hE(this.f318778f.f37648d, this.f318777e.t().getId(), this.f318777e.t().getObjectNonceId(), false, new d(this.f318780h, this.f318781i, this.f318783n, this.f318778f, this.f318777e));
                this.f318779g.onDismiss();
            }
        }
    }

    public i(MMFragmentActivity mMFragmentActivity, tk tkVar, bv1 bv12, View view, o0 o0Var, boolean z15, PopupWindow.OnDismissListener onDismissListener, kh4.a<b0> aVar, int i15) {
        this.f318761d = mMFragmentActivity;
        this.f318762e = tkVar;
        this.f318763f = bv12;
        this.f318764g = view;
        this.f318765h = o0Var;
        this.f318766i = z15;
        this.f318767j = onDismissListener;
        this.f318768n = aVar;
        this.f318769o = i15;
    }

    @Override // i14.p0
    public final void onMMMenuItemSelected(MenuItem menuItem, int i15) {
        boolean z15;
        MegaVideoBulletView megaVideoBulletView;
        l bulletManager;
        f<b.c<?>> h15;
        f<_Ret> A;
        int itemId = menuItem.getItemId();
        if (itemId == 5) {
            e.f318754b = false;
            d1 d1Var = (d1) r.f342954a.c(this.f318761d).e(d1.class);
            if (d1Var != null) {
                tk tkVar = this.f318762e;
                m.g(tkVar, "bulletInfo");
                Log.i("FinderBulletUIC", "doFollowPost: content=" + tkVar.f37650f + ", bulletId=" + d.p(tkVar.f37648d) + ", feedId=" + d.p(d1Var.f195976r) + ", curBulletView=" + d1Var.f195974p);
                String str = tkVar.f37650f;
                if (str == null || str.length() == 0) {
                    z15 = true;
                } else {
                    z15 = false;
                }
                if (!(z15 || (megaVideoBulletView = d1Var.f195974p) == null || (bulletManager = megaVideoBulletView.getBulletManager()) == null)) {
                    String str2 = tkVar.f37650f;
                    if (str2 == null) {
                        str2 = "";
                    }
                    bulletManager.f(str2, d1Var.t5(), 2, tkVar.f37648d);
                }
            }
            o2 o2Var = o2.f210885a;
            bv1 bv12 = this.f318763f;
            JSONObject jSONObject = new JSONObject();
            tk tkVar2 = this.f318762e;
            o0 o0Var = this.f318765h;
            jSONObject.put("bs_id", d.p(tkVar2.f37648d));
            jSONObject.put("feedid", d.p(o0Var.getItemId()));
            b0 b0Var = b0.f332794a;
            o2.f(o2Var, bv12, "bs_agree_button", 1, jSONObject, false, 16, null);
            ((g) j.c(g.class)).P8("view_clk", this.f318764g, r0.f(new wg4.l("view_id", "bs_agree_button"), new wg4.l("agree_bs_id", d.p(this.f318762e.f37648d)), new wg4.l("feed_id", d.p(this.f318765h.getItemId()))), 25496);
        } else if (itemId == 6) {
            e.f318754b = true;
            View view = this.f318764g;
            o0 o0Var2 = this.f318765h;
            tk tkVar3 = this.f318762e;
            PopupWindow.OnDismissListener onDismissListener = this.f318767j;
            MMFragmentActivity mMFragmentActivity = this.f318761d;
            bv1 bv13 = this.f318763f;
            kh4.a<b0> aVar = this.f318768n;
            boolean z16 = this.f318766i;
            c cVar = new c(view, o0Var2, tkVar3, onDismissListener, mMFragmentActivity, bv13, aVar, z16, this.f318769o);
            if (!z16 || tkVar3.f37654j != 0) {
                n nVar = new n((Context) mMFragmentActivity, 1, false);
                nVar.f281245i = new d(this.f318766i, this.f318762e, this.f318761d.getResources(), false);
                nVar.f281259q = cVar;
                nVar.f281235d = new b(this.f318767j);
                nVar.q();
                return;
            }
            e.f318756d = b.a.a(u32.b.f316042d, mMFragmentActivity, null, 300, null, 8, null);
            pq0 pq02 = new pq0();
            bv1 bv14 = this.f318763f;
            o0 o0Var3 = this.f318765h;
            tk tkVar4 = this.f318762e;
            pq02.f33300d = n2.f333835a.b(11137, bv14);
            pq02.f33301e = o0Var3.getItemId();
            pq02.f33302f = tkVar4.f37648d;
            pq02.f33303g = o0Var3.t().getObjectNonceId();
            c.b bVar = new c.b();
            bVar.f345562d = 11137;
            bVar.f345561c = "/cgi-bin/micromsg-bin/findergetbulletcommentuserinfo";
            bVar.f345559a = pq02;
            bVar.f345560b = new qq0();
            yf0.c a15 = bVar.a();
            yf0.b<?> ll5 = ((d2) j.c(d2.class)).ll();
            ll5.i(a15);
            e.f318755c = ll5;
            u32.b bVar2 = e.f318756d;
            if (bVar2 != null) {
                bVar2.begin();
            }
            yf0.b<?> bVar3 = e.f318755c;
            if (bVar3 != null && (h15 = bVar3.h()) != null && (A = h15.P(new e.a(new a(this.f318761d, this.f318762e, this.f318766i, cVar, this.f318767j)))) != null) {
                A.n(this.f318761d);
            }
        }
    }
}