package az1; import android.content.Context; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import bw3.h10; import bw3.p61; import bw3.q61; import bw3.rb1; import bw3.s33; import bw3.tl0; import bw3.xb1; import com.tencent.mm.R; import com.tencent.mm.autogen.events.FeedUpdateEvent; import com.tencent.mm.plugin.finder.storage.FinderItem; import com.tencent.mm.plugin.finder.utils.a5; import com.tencent.mm.protocal.protobuf.FinderObject; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.xweb.util.WXWebReporter; import cr1.q0; import cu3.e0; import dh4.f; import ek0.v2; import ek0.w2; import ft1.o; import ft1.u; import gk4.n0; import i14.d0; import i14.l0; import i14.p0; import i14.y0; import java.util.ArrayList; import kh4.l; import kh4.p; import kotlin.ResultKt; import lh4.m; import org.json.JSONObject; import p64.i0; import p64.n; import qs1.i; import sr1.d; import t32.e6; import wg4.b0; import wk1.n2; import yf0.b; import yz3.j; import zr.n; public final class r extends d { /* renamed from: p reason: collision with root package name */ public final c80.b f9335p; public static final class a implements View.OnClickListener { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ r f9336d; /* renamed from: e reason: collision with root package name */ public final /* synthetic */ ViewGroup f9337e; public a(r rVar, ViewGroup viewGroup) { this.f9336d = rVar; this.f9337e = viewGroup; } public final void onClick(View view) { ArrayList arrayList = new ArrayList(); arrayList.add(view); Object[] array = arrayList.toArray(); arrayList.clear(); j30.a.b("com/tencent/mm/plugin/finder/replay/plugin/ReplayMoreActionPlugin$1", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, array); r rVar = this.f9336d; Context context = this.f9337e.getContext(); m.f(context, "root.context"); rVar.getClass(); e0 YI0 = ((e0) j.c(e0.class)).YI0(); boolean z15 = false; n nVar = new n(context, 0, true); nVar.f281262r1 = true; nVar.f281255o1 = true; nVar.o(true); nVar.f281275x1 = false; nVar.f281245i = new s(nVar, rVar, context); nVar.f281247j = new t(nVar, rVar); if (rs1.d.f297303a.i(((o) rVar.C0(o.class)).Z0)) { a5 a5Var = a5.f118672a; FinderObject finderObject = ((o) rVar.C0(o.class)).f217273n; a5Var.getClass(); if (((finderObject != null ? finderObject.permissionFlag : 0) & 1) == 0) { z15 = true; } if (z15) { nVar.f281252n = new u(nVar, YI0, context); nVar.f281265t = new w(rVar, YI0, context, nVar); nVar.f281267u = new x(nVar, YI0); } } b bVar = new b(nVar, context, rVar.F0(), rVar.E0()); nVar.f281259q = bVar; nVar.f281263s = bVar; nVar.q(); j30.a.g(this, "com/tencent/mm/plugin/finder/replay/plugin/ReplayMoreActionPlugin$1", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V"); } } public static final class b implements p0 { /* renamed from: d reason: collision with root package name */ public final n f9338d; /* renamed from: e reason: collision with root package name */ public final Context f9339e; /* renamed from: f reason: collision with root package name */ public final er1.b f9340f; /* renamed from: g reason: collision with root package name */ public final com.tencent.mm.plugin.finder.live.view.b f9341g; @f(c = "com.tencent.mm.plugin.finder.replay.plugin.ReplayMoreActionPlugin$MoreActionListener$onMMMenuItemSelected$3", f = "ReplayMoreActionPlugin.kt", l = {WXWebReporter.KEY_NEW_FAILED_CANT_FIX}, m = "invokeSuspend") public static final class a extends dh4.j implements p<n0, bh4.d<? super b0>, Object> { /* renamed from: d reason: collision with root package name */ public Object f9342d; /* renamed from: e reason: collision with root package name */ public int f9343e; /* renamed from: f reason: collision with root package name */ public final /* synthetic */ b f9344f; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(b bVar, bh4.d<? super a> dVar) { super(2, dVar); this.f9344f = bVar; } @Override // dh4.a public final bh4.d<b0> create(Object obj, bh4.d<?> dVar) { return new a(this.f9344f, dVar); } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ @Override // kh4.p public Object invoke(n0 n0Var, bh4.d<? super b0> dVar) { return ((a) create(n0Var, dVar)).invokeSuspend(b0.f332794a); } /* JADX WARNING: Removed duplicated region for block: B:30:0x00d1 */ /* JADX WARNING: Removed duplicated region for block: B:31:0x00d3 */ /* JADX WARNING: Removed duplicated region for block: B:33:0x00d6 */ @Override // dh4.a public final Object invokeSuspend(Object obj) { String str; q61 q612; h10 h102; h10 h103; String str2; Exception e15; Object obj2; String str3; ch4.a aVar = ch4.a.COROUTINE_SUSPENDED; int i15 = this.f9343e; if (i15 == 0) { ResultKt.throwOnFailure(obj); xv3.b a15 = xv3.b.a(((u) this.f9344f.f9340f.a(u.class)).f217409n); long j15 = ((u) this.f9344f.f9340f.a(u.class)).f217408j; s33 s332 = ((u) this.f9344f.f9340f.a(u.class)).f217412q.f35060y0; if (s332 == null || (str3 = s332.f36024e) == null) { str3 = ""; } long j16 = ((u) this.f9344f.f9340f.a(u.class)).f217412q.f35027d; String str4 = ((o) this.f9344f.f9340f.a(o.class)).f217278o; try { p61 p612 = new p61(); p612.f32702d = n2.f333835a.a(10635); p612.f32703e = str3; p612.f32704f = j15; p612.f32706h = a15; p612.f32705g = j16; p612.f32708j = 2; yf0.b<q61> b15 = p612.b(); this.f9342d = str4; this.f9343e = 1; obj2 = o60.b.a(b15, 0, null, this, 3, null); if (obj2 == aVar) { return aVar; } str2 = str4; } catch (Exception e16) { e15 = e16; str2 = str4; Log.i("ReplayMoreActionPlugin", "#SHEET_MORE_ACTION_TICKET FinderLiveGetConcertTicketInfoRequest fail. " + e15); str = str2; q612 = null; if (h102.f23237j) { } if (h103 != null) { } return b0.f332794a; } } else if (i15 == 1) { str2 = (String) this.f9342d; try { ResultKt.throwOnFailure(obj); obj2 = obj; } catch (Exception e17) { e15 = e17; Log.i("ReplayMoreActionPlugin", "#SHEET_MORE_ACTION_TICKET FinderLiveGetConcertTicketInfoRequest fail. " + e15); str = str2; q612 = null; if (h102.f23237j) { } if (h103 != null) { } return b0.f332794a; } } else { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } q612 = (q61) obj2; str = str2; if (!(q612 == null || (h102 = q612.f33805d) == null)) { if (h102.f23237j) { h103 = h102; } else { h103 = null; } if (h103 != null) { b bVar = this.f9344f; yz3.d c15 = j.c(zr.n.class); m.f(c15, "getService(IFinderLiveFeatureService::class.java)"); n.a.f((zr.n) c15, bVar.f9339e, h103, null, str, null, 20, null); } } return b0.f332794a; } } /* renamed from: az1.r$b$b reason: collision with other inner class name */ public static final class C0184b implements l0 { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ b f9345d; public C0184b(b bVar) { this.f9345d = bVar; } @Override // i14.l0 public final void onCreateMMMenu(d0 d0Var) { if (d0Var.v()) { d0Var.d(8, this.f9345d.f9339e.getResources().getColor(R.color.f357965ac), this.f9345d.f9339e.getResources().getString(R.string.eae)); } } } public static final class c implements p0 { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ b f9346d; public c(b bVar) { this.f9346d = bVar; } @Override // i14.p0 public final void onMMMenuItemSelected(MenuItem menuItem, int i15) { if (menuItem.getItemId() == 8) { this.f9346d.a(false, true); } } } public static final class d extends lh4.o implements l<b.c<rb1>, b0> { /* renamed from: d reason: collision with root package name */ public final /* synthetic */ i0 f9347d; /* renamed from: e reason: collision with root package name */ public final /* synthetic */ boolean f9348e; /* renamed from: f reason: collision with root package name */ public final /* synthetic */ b f9349f; /* renamed from: g reason: collision with root package name */ public final /* synthetic */ boolean f9350g; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public d(i0 i0Var, boolean z15, b bVar, boolean z16) { super(1); this.f9347d = i0Var; this.f9348e = z15; this.f9349f = bVar; this.f9350g = z16; } /* 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<rb1> cVar) { b.c<rb1> cVar2 = cVar; this.f9347d.dismiss(); int i15 = 1; boolean z15 = false; if (cVar2 != null && cVar2.f345499a == 0) { z15 = true; } if (z15 && cVar2.f345500b == 0) { if (this.f9348e) { j0 j0Var = (j0) this.f9349f.f9341g.getPlugin(j0.class); if (j0Var != null) { j0Var.h1(); dz1.m mVar = j0Var.f9293r; if (mVar != null) { mVar.f(); } } Context context = this.f9349f.f9339e; y0.f(context, context.getResources().getString(R.string.eak)); FeedUpdateEvent feedUpdateEvent = new FeedUpdateEvent(); feedUpdateEvent.f62754d.f62755a = ((cz1.d) this.f9349f.f9340f.a(cz1.d.class)).k5(); feedUpdateEvent.f62754d.f62756b = 24; feedUpdateEvent.publish(); } else { FeedUpdateEvent feedUpdateEvent2 = new FeedUpdateEvent(); feedUpdateEvent2.f62754d.f62755a = ((cz1.d) this.f9349f.f9340f.a(cz1.d.class)).k5(); feedUpdateEvent2.f62754d.f62756b = 27; feedUpdateEvent2.publish(); Context context2 = this.f9349f.f9339e; y0.f(context2, context2.getResources().getString(R.string.eay)); Log.i("ReplayMoreActionPlugin", "setReplay " + ((cz1.d) this.f9349f.f9340f.a(cz1.d.class)).m5() + " enable:" + this.f9350g + '!'); } cz1.d dVar = (cz1.d) this.f9349f.f9340f.a(cz1.d.class); boolean z16 = this.f9350g; boolean z17 = this.f9348e; if (dVar.f194870u == -1) { dVar.s5(dVar.l5().L); } Log.i("MMFinder.LiveReplaySlice", "setAnchorStatus enableForAny:" + z16 + " replay_status " + dVar.l5().L); if (!z16) { i15 = z17 ? 2 : 5; } dVar.s5(i15); } return b0.f332794a; } } public b(p64.n nVar, Context context, er1.b bVar, com.tencent.mm.plugin.finder.live.view.b bVar2) { m.g(context, "context"); m.g(bVar, "buContext"); m.g(bVar2, "basePluginLayout"); this.f9338d = nVar; this.f9339e = context; this.f9340f = bVar; this.f9341g = bVar2; } public final void a(boolean z15, boolean z16) { Context context = this.f9339e; i0 e15 = i0.e(context, context.getString(R.string.f367656zq), false, 3, null); tl0 tl02 = new tl0(); tl02.f37688d = 0; xb1 xb12 = new xb1(); xb12.f41985d = z15 ? 1 : 0; if (!z15) { xb12.f41986e = z16 ? 1 : 0; } tl02.f37689e = xv3.b.a(xb12.toByteArray()); m60.d.K(new q0(((cz1.d) this.f9340f.a(cz1.d.class)).k5(), ((cz1.d) this.f9340f.a(cz1.d.class)).m5(), 1, tl02).h(), new d(e15, z16, this, z15)); } @Override // i14.p0 public void onMMMenuItemSelected(MenuItem menuItem, int i15) { String str; Integer valueOf = menuItem != null ? Integer.valueOf(menuItem.getItemId()) : null; if (valueOf != null && valueOf.intValue() == 1) { FinderObject finderObject = ((o) this.f9340f.a(o.class)).f217273n; if (finderObject != null) { FinderItem a15 = FinderItem.Companion.a(finderObject, 16384); a15.setEcSource(((o) this.f9340f.a(o.class)).W1); yz3.d c15 = j.c(v2.class); m.f(c15, "getService(IActivityRouter::class.java)"); v2 v2Var = (v2) c15; Context context = this.f9339e; m.e(context, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity"); v2.a.g(v2Var, (AppCompatActivity) context, a15, null, 0, null, 28, null); JSONObject jSONObject = new JSONObject(); jSONObject.put("object_id", m60.d.p(((u) this.f9340f.a(u.class)).f217408j)); jSONObject.put("share_des", "chat"); cs1.e0.f192770a.a(jSONObject); String jSONObject2 = jSONObject.toString(); m.f(jSONObject2, "this.toString()"); ((e6) j.c(e6.class)).tt0("share_record_duration", jSONObject2); } p64.n nVar = this.f9338d; if (nVar != null) { nVar.p(); } } else if (valueOf != null && valueOf.intValue() == 2) { FinderObject finderObject2 = ((o) this.f9340f.a(o.class)).f217273n; if (finderObject2 != null) { FinderItem a16 = FinderItem.Companion.a(finderObject2, 16384); a16.setEcSource(((o) this.f9340f.a(o.class)).W1); yz3.d c16 = j.c(v2.class); m.f(c16, "getService(IActivityRouter::class.java)"); v2 v2Var2 = (v2) c16; Context context2 = this.f9339e; m.e(context2, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity"); v2.a.h(v2Var2, (AppCompatActivity) context2, new pu1.e0(a16), null, 0, 0, 28, null); JSONObject jSONObject3 = new JSONObject(); jSONObject3.put("object_id", m60.d.p(((u) this.f9340f.a(u.class)).f217408j)); jSONObject3.put("share_des", "moment"); cs1.e0.f192770a.a(jSONObject3); String jSONObject4 = jSONObject3.toString(); m.f(jSONObject4, "this.toString()"); ((e6) j.c(e6.class)).tt0("share_record_duration", jSONObject4); } p64.n nVar2 = this.f9338d; if (nVar2 != null) { nVar2.p(); } } else if (valueOf != null && valueOf.intValue() == 4) { ((w2) j.c(w2.class)).x8(this.f9339e, "https://weixin110.qq.com/security/readtemplate?t=weixin_report/w_type&scene=80", ((cz1.d) this.f9340f.a(cz1.d.class)).k5(), ((cz1.d) this.f9340f.a(cz1.d.class)).j5(), null, 62); p64.n nVar3 = this.f9338d; if (nVar3 != null) { nVar3.p(); } } else if (valueOf != null && valueOf.intValue() == 9) { i.k(this.f9341g, null, null, new a(this, null), 3, null); } else if (valueOf != null && valueOf.intValue() == 8) { p64.n nVar4 = new p64.n(this.f9339e, 1, true); nVar4.o(true); Context context3 = this.f9339e; m.g(context3, "context"); View inflate = LayoutInflater.from(context3).inflate(R.layout.f366430by3, (ViewGroup) null); TextView textView = (TextView) inflate.findViewById(R.id.odb); textView.setGravity(17); if (ft1.l.m5((ft1.l) this.f9340f.a(ft1.l.class), null, 1, null)) { str = context3.getResources().getString(R.string.eaj); } else { str = context3.getResources().getString(R.string.eai); } textView.setText(str); textView.setTextColor(context3.getResources().getColor(R.color.BW_100_Alpha_0_3)); textView.setTextSize(1, 14.0f); nVar4.n(inflate, false); nVar4.f281245i = new C0184b(this); nVar4.f281259q = new c(this); p64.n nVar5 = this.f9338d; if (nVar5 != null) { nVar5.p(); } nVar4.q(); } else if (valueOf != null && valueOf.intValue() == 6) { a(true, false); p64.n nVar6 = this.f9338d; if (nVar6 != null) { nVar6.p(); } } else if (valueOf != null && valueOf.intValue() == 7) { a(false, false); p64.n nVar7 = this.f9338d; if (nVar7 != null) { nVar7.p(); } } } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public r(ViewGroup viewGroup, c80.b bVar) { super(viewGroup, bVar, null); m.g(viewGroup, "root"); m.g(bVar, "statusMonitor"); this.f9335p = bVar; viewGroup.setOnClickListener(new a(this, viewGroup)); rs1.d.f297303a.d(this); } @Override // sr1.gl public boolean q() { return true; } @Override // sr1.gl public boolean r() { return true; } @Override // sr1.gl public boolean s() { return false; } }