package d00; import bw3.dt5; import bw3.e00; import bw3.h75; import bw3.jg4; import bw3.k75; import bw3.m75; import bw3.mt4; import ck.q; import com.tencent.mars.cdn.CdnLogic; import com.tencent.mm.plugin.appbrand.jsapi.storage.v; import com.tencent.mm.plugin.mmsight.segment.FFmpegMetadataRetriever; import com.tencent.mm.plugin.websearch.p; import com.tencent.mm.protocal.protobuf.TimeLineObject; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.MMApplicationContext; import com.tencent.mm.sdk.platformtools.NetStatusUtil; import com.tencent.mm.sdk.platformtools.Util; import com.tencent.thumbplayer.tplayer.plugins.report.TPReportKeys; import com.tencent.wxmm.v2helper; import d60.z; import e00.h; import e00.k; import e00.l; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.UUID; import jo3.n0; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import wg3.j; import yz3.e; import zz3.b; @b public class d extends e implements h, l { @Override // e00.l public void LZ(String str) { Log.i("MicroMsg.TopStory.TopStoryReportApiLogic", "reportTopStoryWebViewVisitTime %s", str); jg4 jg42 = new jg4(); jg42.f26129t = str; z.d().f(new n0(jg42)); } @Override // e00.l public void NI0(dt5 dt5, TimeLineObject timeLineObject) { String str = timeLineObject.UserName; String str2 = timeLineObject.Id; StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("isShareClick=1"); stringBuffer.append("&relevant_vid="); stringBuffer.append(dt5.f19726d); stringBuffer.append("&relevant_pre_searchid="); stringBuffer.append(dt5.f19728f); stringBuffer.append("&relevant_shared_openid="); stringBuffer.append(dt5.f19729g); stringBuffer.append("&rec_category="); long j15 = dt5.f19743x; if (j15 > 0) { stringBuffer.append(j15); } else { stringBuffer.append(dt5.f19730h); } stringBuffer.append("&source="); stringBuffer.append(dt5.f19738s); stringBuffer.append("&fromUser="); stringBuffer.append(str); stringBuffer.append("&fromScene="); stringBuffer.append(3); stringBuffer.append("&targetInfo="); stringBuffer.append(str2); stringBuffer.append("&expand="); stringBuffer.append(dt5.f19727e); Log.i("MicroMsg.TopStory.TopStoryReportApiLogic", "reportTopStoryClickShareItem 15371 %s", stringBuffer.toString()); jg4 jg42 = new jg4(); jg42.f26129t = stringBuffer.toString(); z.d().f(new n0(jg42)); } @Override // e00.l public void O50(String str, String str2, int i15, long j15) { if (!Util.isNullOrNil(str) && str.startsWith("wrd")) { try { String format = String.format("%s,%s,%s,%s", q.b(str2, "utf8"), Integer.valueOf(i15), str, Long.valueOf(j15)); Log.i("MicroMsg.TopStory.TopStoryReportApiLogic", "kvReportTopStoryOpenWebViewError 15728 %s", format); com.tencent.mm.plugin.report.service.q.INSTANCE.kvStat(15728, format); } catch (UnsupportedEncodingException unused) { } } } @Override // e00.h public h75 RR(Map<String, Object> map) { h75 h75 = new h75(); h75.f23462n = p.f(map, "query"); h75.f23460i = p.e(map, TPReportKeys.PlayerStep.PLAYER_BUFFERING_SCENE, 21); h75.f23466r = UUID.randomUUID().toString(); h75.f23461j = p.f(map, "searchId"); if (NetStatusUtil.isConnected(MMApplicationContext.getContext()) && !NetStatusUtil.isWifi(MMApplicationContext.getContext())) { h75.f23468t = true; } String f15 = p.f(map, "videoId"); ArrayList arrayList = new ArrayList(); try { JSONArray jSONArray = new JSONArray(p.f(map, "videoUrls")); if (jSONArray.length() > 0) { for (int i15 = 0; i15 < jSONArray.length(); i15++) { m75 m75 = new m75(); m75.f29443d = jSONArray.getString(i15); arrayList.add(m75); } } } catch (JSONException unused) { } if (!Util.isNullOrNil(f15)) { k75 k75 = new k75(); h75.f23463o = k75; k75.f27011d = p.f(map, FFmpegMetadataRetriever.METADATA_KEY_TITLE); h75.f23463o.f27013f = p.f(map, "thumbUrl"); h75.f23463o.f27014g = p.e(map, "mediaDuration", 0); k75 k752 = h75.f23463o; k752.f27015h = f15; k752.f27030y = p.f(map, "strPlayCount"); h75.f23463o.f27018n = p.f(map, "shareUrl"); h75.f23463o.f27019o = p.f(map, "shareTitle"); h75.f23463o.f27031z = p.f(map, "titleUrl"); h75.f23463o.f27020p = p.f(map, "shareDesc"); h75.f23463o.f27022q = p.f(map, "shareImgUrl"); h75.f23463o.f27023r = p.f(map, "shareString"); h75.f23463o.f27024s = p.f(map, "shareStringUrl"); h75.f23463o.f27025t = p.f(map, "source"); h75.f23463o.f27026u = p.f(map, "sourceUrl"); k75 k753 = h75.f23463o; long j15 = -1; String f16 = p.f(map, "relevant_category"); if (!Util.isNullOrNil(f16)) { try { j15 = Long.valueOf(f16).longValue(); } catch (Exception unused2) { } } k753.f27027v = j15; h75.f23463o.f27028w = p.f(map, "shareOpenId"); h75.f23463o.G = p.f(map, "docID"); k75 k754 = h75.f23463o; long j16 = 0; String f17 = p.f(map, "videoSize"); if (!Util.isNullOrNil(f17)) { try { j16 = Long.valueOf(f17).longValue(); } catch (Exception unused3) { } } k754.J = j16; h75.f23463o.E = Util.currentTicks(); h75.f23463o.A = p.e(map, "itemType", 0); h75.f23463o.L = p.e(map, "switchFlag", 0); if (Util.isNullOrNil(h75.f23463o.f27013f)) { h75.f23463o.f27013f = "http://shp.qpic.cn/qqvideo_ori/0/" + h75.f23463o.f27015h + String.format("_%s_%s/0", Integer.valueOf((int) v.CTRL_INDEX), Integer.valueOf((int) CdnLogic.kAppTypeNewLife)); } try { JSONObject jSONObject = new JSONObject(p.f(map, "block")); h75.f23463o.H = jSONObject.optLong("resultType"); h75.f23463o.I = jSONObject.optLong("type"); } catch (JSONException unused4) { } h75.f23463o.f27029x = p.f(map, "expand"); h75.f23463o.K.addAll(arrayList); m75 e15 = j.e(arrayList); if (e15 != null) { k75 k755 = h75.f23463o; k755.f27012e = e15.f29443d; k755.U = e15.f29444e; } String f18 = p.f(map, "show_tag_list"); if (!Util.isNullOrNil(f18)) { try { h75.f23463o.D.addAll(j.b(new JSONArray(f18))); } catch (JSONException unused5) { } } h75.f23459h = h75.f23463o.f27027v; h75.f23456e = p.f(map, "expand"); h75.f23457f = h75.f23461j; k75 k756 = h75.f23463o; h75.f23455d = k756.f27015h; if (h75.f23459h == 100203) { k756.f27016i = v2helper.VOIP_ENC_HEIGHT_LV1; k756.f27017j = 640; } else { k756.f27016i = v.CTRL_INDEX; k756.f27017j = CdnLogic.kAppTypeNewLife; } String f19 = p.f(map, "videoChannelTitle"); if (!Util.isNullOrNil(h75.f23463o.f27023r)) { long j17 = h75.f23459h; if (j17 == 100202 || j17 == 100204 || j17 == 100205) { mt4 mt4 = new mt4(); h75.f23464p = mt4; mt4.f30160i = f19; } } String f25 = p.f(map, "extReqParams"); if (!Util.isNullOrNil(f25)) { try { JSONArray jSONArray2 = new JSONArray(f25); for (int i16 = 0; i16 < jSONArray2.length(); i16++) { JSONObject jSONObject2 = jSONArray2.getJSONObject(i16); e00 e002 = new e00(); e002.f19923d = jSONObject2.optString("key", ""); e002.f19924e = (long) jSONObject2.optInt("uintValue", 0); e002.f19925f = jSONObject2.optString("textValue", ""); h75.f23465q.add(e002); } } catch (Exception unused6) { } } } return h75; } @Override // e00.h public k U4() { return ((wg3.e) yz3.j.c(wg3.e.class)).U4(); } @Override // e00.h public h75 XX(JSONObject jSONObject) { return j.o(jSONObject); } @Override // e00.h public String en0(HashMap<String, String> hashMap) { return j.d(hashMap); } @Override // e00.h public h75 fR(dt5 dt5, int i15, String str) { return j.n(dt5, i15, str); } @Override // e00.l public void kn(String str, int i15) { if (!Util.isNullOrNil(str) && str.startsWith("wrd")) { com.tencent.mm.plugin.report.service.q.INSTANCE.idkeyStat(900, (long) i15, 1, false); } } @Override // e00.h public boolean tZ() { boolean z15; int Rg = ((uh2.b) yz3.j.c(uh2.b.class)).Rg(); if (Rg == 3 || Rg == 4 || Rg == 5) { z15 = true; } else { z15 = false; } Log.i("MicroMsg.TopStory.TopStoryApiLogic", "isFreeSimCard result :%b simType: %d", Boolean.valueOf(z15), Integer.valueOf(Rg)); return z15; } }