正在查看: OLX India v19.42.007 应用的 AbstractC2637w0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 AbstractC2637w0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.inmobi.media;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.util.Log;
import android.util.SparseArray;
import android.widget.TextView;
import androidx.browser.customtabs.CustomTabsClient;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.util.MimeTypes;
import com.iab.omid.library.inmobi.Omid;
import com.iab.omid.library.inmobi.adsession.AdSessionContext;
import com.iab.omid.library.inmobi.adsession.ImpressionType;
import com.iab.omid.library.inmobi.adsession.VerificationScriptResource;
import com.inmobi.adquality.models.AdQualityControl;
import com.inmobi.ads.AdMetaInfo;
import com.inmobi.ads.InMobiAdRequestStatus;
import com.inmobi.ads.WatermarkData;
import com.inmobi.commons.core.configs.AdConfig;
import com.inmobi.commons.core.configs.Config;
import com.inmobi.commons.core.configs.TelemetryConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$ABConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$AdABConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$AdNonABConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$AdPreloadConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$MediationConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$NonABConfig;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations$PreloadConfig;
import com.jio.jioads.util.Utility;
import com.payu.ui.model.utils.SdkUiConstants;
import java.io.UnsupportedEncodingException;
import java.lang.ref.WeakReference;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Timer;
import java.util.TreeSet;
import java.util.UUID;
import java.util.concurrent.ScheduledExecutorService;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import olx.com.delorean.domain.Constants;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public abstract class AbstractC2637w0 extends U9 implements InterfaceC2382d0, F1, InterfaceC2635vb, InterfaceC2436gc, InterfaceC2558pb, K {
public static final int L = 0;
public boolean A;
public String B;
public C2675z D;
public C2387d5 E;
public C2553p6 F;
public WatermarkData J;
public byte a;
public AdConfig b;
public WeakReference c;
public Cb d;
public C2424g0 e;
public WeakReference f;
public M6 h;
public HashMap i;
public A4 j;
public byte k;
public Handler l;
public boolean m;
public S9 n;
public boolean o;
public boolean p;
public boolean q;
public boolean r;
public R8 s;
public J t;
public C2368c0 u;
public C2661xb v;
public int w;
public int x;
public ArrayList g = new ArrayList();
public long y = -1;
public TreeSet z = new TreeSet();
public final C2610u C = C2610u.a;
public final Handler G = new Handler(Looper.getMainLooper());
public final LinkedHashMap H = new LinkedHashMap();
public final C2663y0 I = new C2663y0(this);
public final C2547p0 K = new C2547p0(this);
public AbstractC2637w0(Context context, J j, AbstractC2480k0 abstractC2480k0) {
Boolean o;
toString();
this.c = new WeakReference(context);
this.t = j;
WeakReference weakReference = new WeakReference(abstractC2480k0);
this.f = weakReference;
String q = q();
C2368c0 c2368c0 = this.u;
this.D = new C2675z(weakReference, q, (c2368c0 == null || (o = c2368c0.o()) == null) ? false : o.booleanValue());
n0();
}
public static void R() {
}
public static void U() {
}
public static final String e() {
return "w0";
}
public final int A() {
return this.x;
}
public long A0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "timeSincePodShow ", this));
}
if (this.A) {
return System.currentTimeMillis() - this.y;
}
return -1L;
}
public final TreeSet<Integer> B() {
return this.z;
}
public final C2450hc B0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "trySetTheLocalVideoDescriptor ", this));
}
C2437h m = m();
if (m == null) {
throw new IllegalStateException("No ad");
}
if (!(m instanceof R7)) {
return null;
}
R7 r7 = (R7) m;
C2465j b = AbstractC2673ya.a().b(r7.a);
if (b == null || !b.a()) {
throw new IllegalStateException("Asset not available in cache".toString());
}
return new C2450hc(b.c, r7.b, r7.c, r7.d, r7.e, this.b.getVastVideo());
}
public final long C() {
return this.y;
}
public final Handler D() {
return this.l;
}
public final String E() {
String u;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "markupType getter ", this));
}
C2437h m = m();
return (m == null || (u = m.u()) == null) ? "unknown" : u;
}
public Integer F() {
return null;
}
public final M6 G() {
return this.h;
}
public final R8 H() {
return this.s;
}
public final J I() {
return this.t;
}
public abstract byte J();
public String K() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getPodAdContext ", this));
}
if (this.A) {
return this.B;
}
return null;
}
public final String L() {
return c(0);
}
public final Map<String, String> M() {
return this.t.f();
}
public JSONArray N() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getRenderableAdIndexes ", this));
}
JSONArray jSONArray = new JSONArray();
Iterator it = this.z.iterator();
while (it.hasNext()) {
jSONArray.put(((Integer) it.next()).intValue());
}
return jSONArray;
}
public long O() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getShowTimeStamp ", this));
}
if (this.A) {
return this.y;
}
return -1L;
}
public final Unit P() {
AbstractC2480k0 r = r();
long currentTimeMillis = System.currentTimeMillis();
if (a(r, currentTimeMillis)) {
return Unit.a;
}
this.r = true;
if (this.s == null) {
this.s = new R8(this);
}
C2610u c2610u = this.C;
int hashCode = hashCode();
N3 n3 = new N3(this, currentTimeMillis, this.j);
c2610u.getClass();
C2610u.a(hashCode, n3);
return Unit.a;
}
public final byte Q() {
return this.a;
}
public final String S() {
LinkedList<C2437h> f;
Object i0;
String w;
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (f = c2368c0.f()) != null) {
i0 = CollectionsKt___CollectionsKt.i0(f);
C2437h c2437h = (C2437h) i0;
if (c2437h != null && (w = c2437h.w()) != null) {
return w;
}
}
return "";
}
public final byte T() {
return this.k;
}
public final void V() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "handleInterActive ", this));
}
C2610u c2610u = this.C;
int hashCode = hashCode();
C2534o0 c2534o0 = new C2534o0(this);
c2610u.getClass();
C2610u.a(hashCode, c2534o0);
}
public final boolean W() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "hasAdExpired ", this));
}
C2437h m = m();
if (m != null) {
return m.a(this.b.getCacheConfig(q()).getTimeToLive());
}
return false;
}
public final boolean X() {
AdConfig.RenderingConfig rendering;
AdConfig adConfig = this.b;
return adConfig != null && (rendering = adConfig.getRendering()) != null && rendering.getEnablePubMuteControl() && Ha.o();
}
public final boolean Y() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", "isBlockingStateForLoadWithResponse getter " + this + " state=" + ((int) this.a));
}
if (!M3.a.a()) {
g();
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.GDPR_COMPLIANCE_ENFORCED), true, (short) 2141);
return true;
}
if (f0()) {
A4 a42 = this.j;
if (a42 != null) {
StringBuilder a = A5.a("w0", "TAG", "Some of the dependency libraries for ");
a.append(q());
a.append(" not found");
((B4) a42).b("w0", a.toString());
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.MISSING_REQUIRED_DEPENDENCIES), true, (short) 2007);
return true;
}
byte b = this.a;
if (b == 1) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).b("w0", "load with reasponse called while loading");
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.LOAD_WITH_RESPONSE_CALLED_WHILE_LOADING), false, (short) 2001);
return true;
}
if (b != 7) {
return false;
}
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", "ad active before load");
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.AD_ACTIVE), false, (short) 2003);
return true;
}
public final boolean Z() {
return this.o;
}
public abstract void a(int i, S9 s9);
public final void a(long j) {
this.y = j;
}
public final boolean a0() {
return this.m;
}
public abstract void b();
public final void b(boolean z) {
this.m = z;
}
public final boolean b0() {
return this.A;
}
public final String c(int i) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getPubContent ", this));
}
if (i > 0 && !this.A) {
return "";
}
C2437h a = a(i);
if (a != null) {
return a.x();
}
return null;
}
public void c0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "load ", this));
}
C2663y0 c2663y0 = this.I;
c2663y0.getClass();
c2663y0.c = SystemClock.elapsedRealtime();
a(new C2560q0(this), new C2572r0(this));
}
public final void d(byte b) {
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "from ");
a.append((int) this.a);
a.append(" to ");
a.append((int) b);
a.append(' ');
a.append(this);
((B4) a4).d("w0", a.toString());
}
this.a = b;
}
public final void d0() throws IllegalStateException {
List<String> c;
LinkedList<C2437h> f;
C2437h c2437h;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "loadAd_ ", this));
}
C2437h m = m();
if (m == null || W()) {
m = null;
}
if (m == null) {
throw new IllegalStateException("Unable to get topAd");
}
String u = m.u();
int hashCode = u.hashCode();
if (hashCode == -1084172778) {
if (u.equals("inmobiJson")) {
A4 a42 = this.j;
if (a42 != null) {
StringBuilder a = A5.a("w0", "TAG", "Loading ad with impressionId : ");
a.append(m.s());
((B4) a42).a("w0", a.toString());
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null) {
c2368c0.a(this.b, this, this.j);
}
c = m.c(C2437h.WIN_BEACON);
if (this.A) {
}
if (c == null) {
}
}
A4 a43 = this.j;
if (a43 != null) {
StringBuilder a2 = A5.a("w0", "TAG", "Can not handle fallback for");
a2.append(m.u());
((B4) a43).b("w0", a2.toString());
}
throw new IllegalStateException("Can not handle fallback for markup type: " + m.u());
}
if (hashCode != 3213227) {
c = m.c(C2437h.WIN_BEACON);
if (this.A) {
int size = this.u.f().size();
for (int i = 1; i < size; i++) {
C2368c0 c2368c02 = this.u;
List<String> c2 = (c2368c02 == null || (f = c2368c02.f()) == null || (c2437h = f.get(i)) == null) ? null : c2437h.c(C2437h.WIN_BEACON);
if (c2 != null && (c instanceof LinkedList)) {
((LinkedList) c).addAll(c2);
}
}
}
if (c == null) {
return;
}
Iterator<String> it = c.iterator();
while (it.hasNext()) {
Y1.a.a(it.next(), true, this.j);
}
return;
}
c = m.c(C2437h.WIN_BEACON);
if (this.A) {
}
if (c == null) {
}
}
public final void e0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "makeUnitActive ", this));
}
this.o = false;
}
public final void f(AbstractC2480k0 abstractC2480k0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onLoadSuccess ", this));
}
AdMetaInfo l = l();
if (l == null) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "load success - ad unit null");
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR), true, (short) 2107);
return;
}
b((byte) 1);
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "callback - onAdLoadSucceeded");
}
abstractC2480k0.c(l);
}
public boolean f0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "missingPrerequisitesForAd ", this));
}
try {
Reflection.b(RecyclerView.class).i();
Reflection.b(CustomTabsClient.class).i();
return false;
} catch (NoClassDefFoundError unused) {
return true;
}
}
public final void g(int i) {
this.w = i;
}
public void g0() {
C2663y0 c2663y0 = this.I;
c2663y0.getClass();
c2663y0.h = SystemClock.elapsedRealtime();
}
public final void h(int i) {
this.x = i;
}
public final D h0() {
String jSONArray;
Integer num;
Integer num2;
HashMap k;
Map i;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "prepareAdRequest ", this));
}
Context t = t();
M8 m8 = null;
O8 o8 = t != null ? new O8(t, this.j) : null;
AdConfig adConfig = this.b;
String url = adConfig != null ? adConfig.getUrl() : null;
Ib ib = new Ib(this.b.getIncludeIdParams());
ArrayList a = AbstractC2673ya.a().a();
if (a.isEmpty()) {
jSONArray = null;
} else {
JSONArray jSONArray2 = new JSONArray();
Iterator it = a.iterator();
while (it.hasNext()) {
try {
jSONArray2.put(URLEncoder.encode(((C2465j) it.next()).b, Utility.DEFAULT_PARAMS_ENCODING));
} catch (UnsupportedEncodingException unused) {
}
}
jSONArray = jSONArray2.toString();
}
J j = this.t;
if (o8 != null) {
if (o8.d) {
k = kotlin.collections.v.k(TuplesKt.a("n-h-id", o8.c));
m8 = new M8(k);
} else {
A4 a42 = o8.b;
if (a42 != null) {
((B4) a42).a("NovatiqDataHandler", "Novatiq disabled. skip");
}
i = kotlin.collections.v.i();
m8 = new M8(i);
}
}
M8 m82 = m8;
A4 a43 = this.j;
AdConfig adConfig2 = this.b;
D d = new D(url, ib, jSONArray, j, m82, a43, adConfig2 != null ? adConfig2.getApplyGzipReq() : false);
d.C = this.t.i();
d.B = q();
d.A = "unifiedSdkJson";
d.D = o();
C2553p6 c2553p6 = this.F;
int i2 = Cb.DEFAULT_TIMEOUT;
d.p = (c2553p6 == null || (num2 = c2553p6.d) == null) ? Cb.DEFAULT_TIMEOUT : num2.intValue();
C2553p6 c2553p62 = this.F;
if (c2553p62 != null && (num = c2553p62.d) != null) {
i2 = num.intValue();
}
d.q = i2;
d.o = X();
return d;
}
public final void i() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "fireAdServedBeacon ", this));
}
r k = k();
if (k == null) {
return;
}
k.a((byte) 2, null);
}
public Cb i0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "provideTimeoutConfigurations ", this));
}
return this.d;
}
public final AdConfig j() {
return this.b;
}
public abstract void j0();
public final r k() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "adMarkupContainer getter ", this));
}
byte b = this.a;
String E = E();
int hashCode = E.hashCode();
if (hashCode != -1084172778) {
if (hashCode != 3213227) {
if (hashCode == 1236050372 && E.equals("htmlUrl") && b != 0 && 1 != b && 3 != b) {
return w();
}
} else if (E.equals("html") && b != 0 && 1 != b && 3 != b) {
return w();
}
} else if (E.equals("inmobiJson") && b != 0 && 1 != b && 3 != b && 2 != b) {
return this.h;
}
return null;
}
public void k0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "resetContainersForNextAd ", this));
}
M6 m6 = this.h;
if (m6 != null) {
m6.b();
}
this.h = null;
int size = this.g.size();
int i = this.x;
if (size <= i || this.g.get(i) == null) {
return;
}
a(this.x, false);
}
public final AdMetaInfo l() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "adMetaInfo getter ", this));
}
C2437h m = m();
if (m != null) {
return m.d();
}
return null;
}
public final L5 l0() {
Boolean o;
String w;
String p;
long l = this.t.l();
String valueOf = String.valueOf(this.t.m());
String q = q();
String E = E();
C2437h u = u();
String str = (u == null || (p = u.p()) == null) ? "" : p;
C2437h u2 = u();
String str2 = (u2 == null || (w = u2.w()) == null) ? "" : w;
C2368c0 c2368c0 = this.u;
return new L5(l, valueOf, q, E, str, str2, (c2368c0 == null || (o = c2368c0.o()) == null) ? false : o.booleanValue(), System.currentTimeMillis());
}
public final C2437h m() {
return a(0);
}
public final void m0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).d("w0", "AdUnit " + this + " state - FAILED");
}
d((byte) 3);
b((byte) 1);
}
public final String n() {
C2368c0 c2368c0 = this.u;
if (c2368c0 != null) {
return c2368c0.c();
}
return null;
}
public final void n0() {
toString();
String b = Ha.b();
LinkedHashMap linkedHashMap = C2523n2.a;
Config a = C2496l2.a("ads", b, null);
this.b = a instanceof AdConfig ? (AdConfig) a : null;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "timeOutConfiguration getter ", this));
}
this.d = this.b.getTimeouts();
d((byte) 0);
this.e = new C2424g0(this, this, this.t);
this.i = new HashMap();
this.k = (byte) -1;
this.l = new Handler(Looper.getMainLooper());
this.m = false;
this.v = new C2661xb(this);
}
public HashMap o() {
return new HashMap();
}
public final boolean o0() {
Unit unit;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "shouldBlockLoadAd ", this));
}
C2437h m = m();
if (m != null && 4 == this.a && !W()) {
AbstractC2480k0 r = r();
if (r != null) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "ad is ready - load success");
}
f(r);
unit = Unit.a;
} else {
unit = null;
}
if (unit == null) {
b((short) 2188);
}
return true;
}
if (m == null) {
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.AD_NO_LONGER_AVAILABLE), true, (short) 2131);
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).b("w0", "ad no longer available");
}
return true;
}
if (2 == this.a) {
if (!W()) {
return false;
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.AD_NO_LONGER_AVAILABLE), true, (short) 2133);
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", "ad is expired");
}
return true;
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.AD_NO_LONGER_AVAILABLE), true, (short) 2132);
A4 a45 = this.j;
if (a45 != null) {
StringBuilder a = A5.a("w0", "TAG", "ad no longer available. state - ");
a.append((int) this.a);
((B4) a45).b("w0", a.toString());
}
return true;
}
public final C2424g0 p() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "adStore getter ", this));
}
if (this.e == null) {
this.e = new C2424g0(this, this, this.t);
}
return this.e;
}
public final boolean p0() {
AdConfig adConfig;
return Intrinsics.d(this.t.m(), "AB") && (adConfig = this.b) != null && adConfig.getSkipNetCheckHB();
}
public abstract String q();
public void q0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "signalAvailabilityChange ", this));
}
}
public final AbstractC2480k0 r() {
A4 a4;
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).c("w0", AbstractC2452i0.a("w0", "TAG", "adUnitEventListener getter ", this));
}
AbstractC2480k0 abstractC2480k0 = (AbstractC2480k0) this.f.get();
if (abstractC2480k0 == null && (a4 = this.j) != null) {
((B4) a4).b("InMobi", "Listener was garbage collected. Unable to give callback");
}
return abstractC2480k0;
}
public void r0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "signalSuccess ", this));
}
}
public final C2663y0 s() {
return this.I;
}
public final void s0() {
LinkedList<C2437h> f;
C2437h c2437h;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "startLoadingHTMLAd ", this));
}
S9 s9 = null;
try {
e(this.w);
A4 a42 = this.j;
if (a42 != null) {
StringBuilder sb = new StringBuilder("Loading ad with impressionId : ");
C2368c0 c2368c0 = this.u;
sb.append((c2368c0 == null || (f = c2368c0.f()) == null || (c2437h = f.get(this.w)) == null) ? null : c2437h.s());
((B4) a42).a("w0", sb.toString());
}
S9 s92 = (S9) this.g.get(this.w);
String E = E();
if (Intrinsics.d(E, "html")) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "loading into weview for " + E());
}
if (s92 != null) {
s92.c(c(this.w));
}
} else if (Intrinsics.d(E, "htmlUrl")) {
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).a("w0", "loading into weview for " + E());
}
if (s92 != null) {
s92.d(c(this.w));
}
}
a(true, s92);
if (s92 == null || !Intrinsics.d(E(), "htmlUrl")) {
return;
}
j(s92);
} catch (Exception e) {
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).a("w0", Cc.a(e, A5.a("w0", "TAG", "Loading ad markup into container encountered an unexpected error: ")));
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
int i = this.w;
if (i >= 0 && i < this.g.size()) {
s9 = (S9) this.g.get(this.w);
}
b(s9, (short) 2135);
}
}
public final Context t() {
WeakReference weakReference = this.c;
if (weakReference != null) {
return (Context) weakReference.get();
}
return null;
}
public final void t0() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdLoadCalled ", this));
}
HashMap hashMap = new HashMap();
c(hashMap);
c("AdLoadCalled", hashMap);
}
public final C2437h u() {
return this.A ? a(this.w) : m();
}
public final void u0() {
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "submitAdLoadSuccessfulEvent ADunit markuptype : ");
a.append(E());
a.append(' ');
a.append(this);
((B4) a4).c("w0", a.toString());
}
HashMap hashMap = new HashMap();
long j = this.I.c;
ScheduledExecutorService scheduledExecutorService = Vb.a;
hashMap.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
hashMap.put("markupType", E());
C2437h u = u();
if (u != null && (p = u.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
C2387d5 c2387d5 = this.E;
if (c2387d5 != null) {
hashMap.put("retryCount", Integer.valueOf(c2387d5.b));
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
if (S().length() > 0) {
hashMap.put("metadataBlob", S());
}
c(hashMap);
c("AdLoadSuccessful", hashMap);
}
public final C2610u v() {
return this.C;
}
public final void v0() {
String p;
Boolean o;
HashMap hashMap = new HashMap();
c(hashMap);
hashMap.put("markupType", E());
long j = this.I.h;
ScheduledExecutorService scheduledExecutorService = Vb.a;
hashMap.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
hashMap.put("metadataBlob", S());
C2387d5 c2387d5 = this.E;
if (c2387d5 != null) {
hashMap.put("retryCount", Integer.valueOf(c2387d5.b));
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
C2437h u = u();
if (u != null && (p = u.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
c("ParseSuccess", hashMap);
}
public S9 w() {
if (this.g.size() <= 0 || this.x >= this.g.size()) {
return null;
}
return (S9) this.g.get(this.x);
}
public final void w0() {
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdShowCalled ", this));
}
C2663y0 c2663y0 = this.I;
c2663y0.getClass();
c2663y0.e = SystemClock.elapsedRealtime();
HashMap hashMap = new HashMap();
hashMap.put("markupType", E());
long j = this.I.i;
ScheduledExecutorService scheduledExecutorService = Vb.a;
hashMap.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
C2437h a = this.A ? a(this.x) : m();
if (a != null && (p = a.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
if (S().length() > 0) {
hashMap.put("metadataBlob", S());
}
c(hashMap);
c("AdShowCalled", hashMap);
}
public final S9 x() {
return this.n;
}
public final void x0() {
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdShowSuccess ", this));
}
HashMap hashMap = new HashMap();
long j = this.I.e;
ScheduledExecutorService scheduledExecutorService = Vb.a;
hashMap.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
hashMap.put("markupType", E());
C2437h a = this.A ? a(this.x) : m();
if (a != null && (p = a.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
if (S().length() > 0) {
hashMap.put("metadataBlob", S());
}
c(hashMap);
c("AdShowSuccessful", hashMap);
}
public final C2368c0 y() {
return this.u;
}
public final void y0() {
HashMap hashMap = new HashMap();
c(hashMap);
c("AdGetSignalsCalled", hashMap);
}
public final int z() {
return this.w;
}
public final void z0() {
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "submitRenderSuccessEvent ADunit markuptype : ");
a.append(E());
a.append(' ');
a.append(this);
((B4) a4).c("w0", a.toString());
}
HashMap hashMap = new HashMap();
long j = this.I.g;
ScheduledExecutorService scheduledExecutorService = Vb.a;
hashMap.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
hashMap.put("markupType", E());
C2437h a2 = this.A ? a(this.x) : m();
if (a2 != null && (p = a2.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
C2387d5 c2387d5 = this.E;
if (c2387d5 != null) {
hashMap.put("retryCount", Integer.valueOf(c2387d5.b));
}
hashMap.put("plType", Byte.valueOf(J()));
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
if (S().length() > 0) {
hashMap.put("metadataBlob", S());
}
c(hashMap);
c((Map) hashMap);
c("RenderSuccess", hashMap);
}
public final void a(Handler handler) {
this.l = handler;
}
public final void e(C2368c0 c2368c0) {
this.u = c2368c0;
}
public final void g(AbstractC2480k0 abstractC2480k0) {
Boolean o;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "adUnitEventListener setter ", this));
}
WeakReference weakReference = new WeakReference(abstractC2480k0);
this.f = weakReference;
String q = q();
C2368c0 c2368c0 = this.u;
C2675z c2675z = new C2675z(weakReference, q, (c2368c0 == null || (o = c2368c0.o()) == null) ? false : o.booleanValue());
this.D = c2675z;
A4 a42 = this.j;
if (a42 != null) {
c2675z.f = a42;
}
}
@Override
public void h(final S9 s9) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onRenderViewSignaledAdReady ", this));
}
if (this.o || t() == null) {
b((short) 2186);
return;
}
Handler handler = this.l;
if (handler != null) {
handler.post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.c(AbstractC2637w0.this, s9);
}
});
} else {
b((short) 2187);
}
}
public final void j(S9 s9) {
List<String> c;
int indexOf = this.g.indexOf(s9);
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", "fireLoadAdTokenUrlSuccessful : " + indexOf + ' ' + this);
}
C2437h a = a(indexOf);
if (a == null || (c = a.c(C2437h.LOAD_AD_TOKEN_URL)) == null) {
return;
}
Iterator<String> it = c.iterator();
while (it.hasNext()) {
Y1.a.a(it.next(), true, this.j);
}
}
public final void a(AdConfig adConfig) {
this.b = adConfig;
}
public final Set d(int i) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getViewabilityTrackers ", this));
}
HashMap hashMap = this.i;
if (hashMap != null) {
return (Set) hashMap.get(Integer.valueOf(i));
}
return null;
}
public final void e(int i) {
S9 s9;
String str;
A4 a4;
AdMetaInfo l;
WatermarkData watermarkData;
S9 s92;
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", AbstractC2452i0.a("w0", "TAG", "initializeHtmlAdContainer ", this));
}
Context t = t();
if (t == null) {
return;
}
try {
if (this.g.get(i) != null && ((s92 = (S9) this.g.get(i)) == null || !s92.I.get())) {
return;
}
C2437h a = a(i);
V9 a2 = a(i, a);
byte J = J();
HashMap hashMap = this.i;
Set set = hashMap != null ? (Set) hashMap.get(Integer.valueOf(i)) : null;
C2437h a3 = a(i);
String s = a3 != null ? a3.s() : null;
if (a != null) {
str = a.t();
if (str == null) {
}
s9 = new S9(t, J, set, s, false, str, 0L, a2, null, this.j, 336);
String p = a != null ? a.p() : null;
a4 = s9.j;
if (a4 != null) {
((B4) a4).c(S9.O0, "creativeType " + s9 + ' ' + p);
}
s9.s0 = p;
if (a != null || (r5 = a.u()) == null) {
String str2 = "html";
}
s9.setMarkupTypeAdUnit(str2);
this.g.set(i, s9);
if (!Intrinsics.d(this.t.b(), "banner") || Intrinsics.d(this.t.b(), MimeTypes.BASE_TYPE_AUDIO)) {
s9.setAdSize(this.t.a());
}
s9.setAdType(this.t.b());
s9.setImmersiveMode(b(a));
s9.a(this, this.b);
s9.setAdPodHandler(this);
s9.setPlacementId(this.t.l());
s9.setAllowAutoRedirection(b(i));
s9.setContentURL(this.t.e());
l = l();
if (l != null) {
s9.setCreativeId(l.getCreativeID());
}
if (this.t.p()) {
s9.e();
}
s9.setTelemetryManagerMap(this.H);
s9.a(a);
a(a, s9);
watermarkData = this.J;
if (watermarkData == null) {
s9.setWatermark(watermarkData);
return;
}
return;
}
str = "DEFAULT";
s9 = new S9(t, J, set, s, false, str, 0L, a2, null, this.j, 336);
String p2 = a != null ? a.p() : null;
a4 = s9.j;
if (a4 != null) {
}
s9.s0 = p2;
if (a != null) {
}
String str22 = "html";
s9.setMarkupTypeAdUnit(str22);
this.g.set(i, s9);
if (!Intrinsics.d(this.t.b(), "banner")) {
}
s9.setAdSize(this.t.a());
s9.setAdType(this.t.b());
s9.setImmersiveMode(b(a));
s9.a(this, this.b);
s9.setAdPodHandler(this);
s9.setPlacementId(this.t.l());
s9.setAllowAutoRedirection(b(i));
s9.setContentURL(this.t.e());
l = l();
if (l != null) {
}
if (this.t.p()) {
}
s9.setTelemetryManagerMap(this.H);
s9.a(a);
a(a, s9);
watermarkData = this.J;
if (watermarkData == null) {
}
} catch (Exception e) {
b((S9) this.g.get(this.w), (short) 2136);
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "Exception while initializing WebView", e);
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
}
}
public final void a(R8 r8) {
this.s = r8;
}
public final boolean b(C2437h c2437h) {
Z q;
AdConfig.RenderingConfig rendering;
AdConfig adConfig = this.b;
boolean z = false;
boolean enableImmersive = (adConfig == null || (rendering = adConfig.getRendering()) == null) ? false : rendering.getEnableImmersive();
boolean z2 = AbstractC2483k3.i;
boolean a = (c2437h == null || (q = c2437h.q()) == null) ? false : q.a(false);
if (enableImmersive && z2 && a) {
z = true;
}
if (!z) {
b(enableImmersive, z2, a);
}
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", "Immersive support - config, device, adResponse - (" + enableImmersive + ' ' + z2 + ' ' + a + ')');
}
return z;
}
public final void c(boolean z) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "setIsAssetReady ", this));
}
this.p = z;
}
public final void a(TreeSet<Integer> treeSet) {
this.z = treeSet;
}
@Override
public void i(S9 s9) {
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "RenderView visible, for index ");
a.append(this.g.indexOf(s9));
a.append(' ');
a.append(this);
((B4) a4).a("w0", a.toString());
}
}
public void l(S9 s9) {
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "Render view signaled ad ready, for index ");
a.append(this.g.indexOf(s9));
a.append(' ');
a.append(this);
((B4) a4).a("w0", a.toString());
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "==== CHECKPOINT REACHED - LOAD SUCCESS ====");
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).b();
}
}
public final void c(C2368c0 c2368c0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAdFetchSuccessful ", this));
}
if (this.a == 1) {
this.u = c2368c0;
}
if (!this.o && t() != null) {
a(c2368c0);
return;
}
b((short) 2185);
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "adUnit is destroyed");
}
}
public final void d(AbstractC2480k0 abstractC2480k0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAdDisplayed ", this));
}
AdMetaInfo l = l();
if (l == null) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "callback onAdDisplayed failed. ad meta info is null");
}
a(abstractC2480k0, (short) 85);
return;
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "callback - onAdDisplayed");
}
abstractC2480k0.a(l);
}
public void g() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "clear ", this));
}
if (this.o) {
return;
}
this.o = true;
Handler handler = this.l;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", AbstractC2452i0.a("w0", "TAG", "clearAdPods ", this));
}
if (this.A) {
h();
this.g.clear();
this.w = 0;
this.x = 0;
this.z.clear();
}
C2387d5 c2387d5 = this.E;
if (c2387d5 != null) {
c2387d5.b = 0;
}
HashMap hashMap = this.i;
if (hashMap != null) {
hashMap.clear();
}
k0();
d((byte) 0);
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).d("w0", "AdUnit " + this + " state - CREATED");
}
C2610u c2610u = this.C;
int hashCode = hashCode();
c2610u.getClass();
SparseArray sparseArray = C2610u.b;
sparseArray.remove(hashCode);
sparseArray.size();
this.q = false;
this.n = null;
this.m = false;
this.p = false;
this.r = false;
this.u = null;
this.A = false;
}
public final void h() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "destroyAllContainer ", this));
}
int size = this.g.size();
for (int i = 0; i < size; i++) {
a(this, i, false, 2, null);
}
}
public int k(S9 s9) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getCurrentRenderingPodAdIndex ", this));
}
if (this.A) {
return this.g.indexOf(s9);
}
return -1;
}
@Override
public void f(S9 s9) {
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "RenderView completed loading ad content, for index ");
a.append(this.g.indexOf(s9));
a.append(' ');
a.append(this);
((B4) a4).a("w0", a.toString());
}
}
public static final void a(AbstractC2637w0 abstractC2637w0, C2437h c2437h, S9 s9) {
abstractC2637w0.getClass();
a(c2437h, s9);
}
public final void b(boolean z, boolean z2, boolean z3) {
Pair<String, Short> a = a(z, z2, z3);
String str = (String) a.a();
short shortValue = ((Number) a.b()).shortValue();
HashMap hashMap = new HashMap();
hashMap.put("reason", str);
hashMap.put("errorCode", Short.valueOf(shortValue));
c("ImmersiveNotSupported", hashMap);
}
public final void a(Context context, J j, AbstractC2480k0 abstractC2480k0) {
String m;
String b;
TimeoutConfigurations$AdNonABConfig banner;
C2553p6 c2553p6;
TimeoutConfigurations$AdPreloadConfig banner2;
TimeoutConfigurations$AdABConfig banner3;
A4 a4;
A4 a42;
A4 a43;
Boolean o;
toString();
a(context);
WeakReference weakReference = new WeakReference(abstractC2480k0);
this.f = weakReference;
String q = q();
C2368c0 c2368c0 = this.u;
this.D = new C2675z(weakReference, q, (c2368c0 == null || (o = c2368c0.o()) == null) ? false : o.booleanValue());
this.t = j;
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).a("w0", AbstractC2452i0.a("w0", "TAG", "initTelemetry ", this));
}
this.H.put("AdImpressionSuccessful", this.I);
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).c("w0", "initInternetAvailabilityAdRetry");
}
if (this.b == null && (a43 = this.j) != null) {
((B4) a43).c("w0", "adConfig is null");
Unit unit = Unit.a;
}
if (this.t.m() == null && (a42 = this.j) != null) {
((B4) a42).c("w0", "placement.placementType is null");
Unit unit2 = Unit.a;
}
if (this.t.b() == null && (a4 = this.j) != null) {
((B4) a4).c("w0", "placement.adType is null");
Unit unit3 = Unit.a;
}
AdConfig adConfig = this.b;
if (adConfig != null && (m = this.t.m()) != null && (b = this.t.b()) != null) {
TimeoutConfigurations$MediationConfig X = adConfig.getTimeouts().X();
String d = Ia.d();
if (m.equals("AB")) {
TimeoutConfigurations$ABConfig aBConfig = X.getABConfig();
int hashCode = b.hashCode();
if (hashCode == -1396342996) {
if (b.equals("banner")) {
banner3 = aBConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
}
banner3 = aBConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
} else if (hashCode == -1052618729) {
if (b.equals("native")) {
banner3 = aBConfig.getNative();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
}
banner3 = aBConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
} else if (hashCode == 104431) {
if (b.equals("int")) {
banner3 = aBConfig.getInterstitial();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
}
banner3 = aBConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
} else {
if (hashCode == 93166550 && b.equals(MimeTypes.BASE_TYPE_AUDIO)) {
banner3 = aBConfig.getAudio();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
}
banner3 = aBConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner3.getRetryInterval()), AbstractC2540o6.a(d, banner3.getMaxRetries()), AbstractC2540o6.a(d, banner3.getLoadTimeout()), (Integer) null, 24);
}
} else if (m.equals("Preload")) {
TimeoutConfigurations$PreloadConfig preloadConfig = X.getPreloadConfig();
int hashCode2 = b.hashCode();
if (hashCode2 == -1396342996) {
if (b.equals("banner")) {
banner2 = preloadConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
}
banner2 = preloadConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
} else if (hashCode2 == -1052618729) {
if (b.equals("native")) {
banner2 = preloadConfig.getNative();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
}
banner2 = preloadConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
} else if (hashCode2 == 104431) {
if (b.equals("int")) {
banner2 = preloadConfig.getInterstitial();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
}
banner2 = preloadConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
} else {
if (hashCode2 == 93166550 && b.equals(MimeTypes.BASE_TYPE_AUDIO)) {
banner2 = preloadConfig.getAudio();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
}
banner2 = preloadConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner2.getRetryInterval()), AbstractC2540o6.a(d, banner2.getMaxRetries()), AbstractC2540o6.a(d, banner2.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner2.getMuttTimeout())), Integer.valueOf(AbstractC2540o6.a(d, banner2.getPreloadTimeout())));
}
} else {
TimeoutConfigurations$NonABConfig nonABConfig = X.getNonABConfig();
int hashCode3 = b.hashCode();
if (hashCode3 == -1396342996) {
if (b.equals("banner")) {
banner = nonABConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
}
banner = nonABConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
} else if (hashCode3 == -1052618729) {
if (b.equals("native")) {
banner = nonABConfig.getNative();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
}
banner = nonABConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
} else if (hashCode3 == 104431) {
if (b.equals("int")) {
banner = nonABConfig.getInterstitial();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
}
banner = nonABConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
} else {
if (hashCode3 == 93166550 && b.equals(MimeTypes.BASE_TYPE_AUDIO)) {
banner = nonABConfig.getAudio();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
}
banner = nonABConfig.getBanner();
c2553p6 = new C2553p6(AbstractC2540o6.a(d, banner.getRetryInterval()), AbstractC2540o6.a(d, banner.getMaxRetries()), AbstractC2540o6.a(d, banner.getLoadTimeout()), Integer.valueOf(AbstractC2540o6.a(d, banner.getMuttTimeout())), 16);
}
}
this.E = new C2387d5(c2553p6);
this.F = c2553p6;
}
C2497l3 c2497l3 = AbstractC2483k3.a;
if (context != null && AbstractC2483k3.h == null) {
AbstractC2483k3.h = Float.valueOf(new TextView(context).getTextSize());
}
n0();
}
public void c(String str) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "setMonetizationContext ", this));
}
this.t.b(str);
}
public final void f() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "checkInteractiveAndSignal ", this));
}
if (this.m && this.p && this.q) {
r0();
}
}
public final void d(C2368c0 c2368c0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAuctionNotClosed ", this));
}
if (this.o || t() == null) {
return;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).c("w0", AbstractC2452i0.a("w0", "TAG", "handleAuctionNotClosed ", this));
}
if (this.a == 1) {
this.u = c2368c0;
this.A = c2368c0 != null ? c2368c0.n() : false;
AbstractC2480k0 r = r();
if (r != null) {
r.a(this.t, c2368c0);
}
}
}
public static final void c(AbstractC2637w0 abstractC2637w0) {
int i;
String str;
A4 a4;
A4 a42 = abstractC2637w0.j;
if (a42 != null) {
((B4) a42).a("w0", AbstractC2452i0.a("w0", "TAG", "startAdFetchWorker ", abstractC2637w0));
}
C2663y0 c2663y0 = abstractC2637w0.I;
c2663y0.getClass();
c2663y0.d = SystemClock.elapsedRealtime();
A4 a43 = abstractC2637w0.j;
if (a43 != null) {
((B4) a43).a("w0", AbstractC2452i0.a("w0", "TAG", "doAdLoadWork ", abstractC2637w0));
}
try {
abstractC2637w0.d((byte) 1);
A4 a44 = abstractC2637w0.j;
if (a44 != null) {
((B4) a44).d("w0", "AdUnit " + abstractC2637w0 + " state - LOADING");
}
A4 a45 = abstractC2637w0.j;
if (a45 != null) {
((B4) a45).c("w0", "printPublisherTestId " + abstractC2637w0);
}
Hb.a.d();
i = 0;
} catch (Exception e) {
A4 a46 = abstractC2637w0.j;
if (a46 != null) {
((B4) a46).b("w0", Cc.a(e, A5.a("w0", "TAG", "Load failed with unexpected error: ")));
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
abstractC2637w0.a(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR), true, (short) 2000);
}
if (abstractC2637w0.e((byte) 0)) {
C2610u c2610u = abstractC2637w0.C;
int hashCode = abstractC2637w0.hashCode();
C2649x c2649x = new C2649x(abstractC2637w0, abstractC2637w0.j);
c2610u.getClass();
C2610u.a(hashCode, c2649x);
if (i != -2) {
str = "Loading an ad resulted in an unexpected error";
} else if (i == -1) {
str = "Ad request skipped as monetization is disabled";
} else if (i == 0) {
str = "Fresh ad requested";
} else if (i == 1) {
str = "Returning pre-cached ad";
} else if (i != 2) {
str = "Unknown return value (" + i + ") from #doAdLoadWork()";
} else {
str = "Already Loading";
}
a4 = abstractC2637w0.j;
if (a4 == null) {
((B4) a4).c("w0", str);
return;
}
return;
}
i = -2;
if (i != -2) {
}
a4 = abstractC2637w0.j;
if (a4 == null) {
}
}
public final boolean b(int i) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", "getAllowAutoRedirectionForIndex " + this + " index - " + i);
}
C2437h a = a(i);
return a != null && a.i();
}
public final void f(int i) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "resetCurrentRenderingIndex ", this));
}
this.x = i;
}
public final int b(String str) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "parseViewabilityResponseValue ", this));
}
if (kotlin.text.m.O(str, "track_", false, 2, null)) {
str = str.substring(6);
}
try {
return Integer.parseInt(str);
} catch (NumberFormatException unused) {
return -1;
}
}
public void d(String str) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "setPodAdContext ", this));
}
if (this.A) {
this.B = str;
}
}
public static final void d(AbstractC2637w0 abstractC2637w0) {
if (6 == abstractC2637w0.a) {
abstractC2637w0.a(true, (short) 2158);
}
}
@Override
public void g(final S9 s9) {
Handler handler;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onRenderViewSignaledAdFailed ", this));
}
if (this.o || t() == null || (handler = this.l) == null) {
return;
}
handler.post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.b(AbstractC2637w0.this, s9);
}
});
}
public final void b(InMobiAdRequestStatus inMobiAdRequestStatus, boolean z, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).b("w0", "handleAdLoadFailure " + this + " errorCode - " + ((int) s));
}
if (this.a == 1 && z) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "load failed - " + ((int) s));
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).d("w0", "AdUnit " + this + " state - FAILED");
}
d((byte) 3);
b((byte) 1);
}
AbstractC2480k0 r = r();
if (r != null) {
r.a(this, inMobiAdRequestStatus);
} else {
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).a();
}
}
if (s != 0) {
b(s);
}
}
public final void b(C2368c0 c2368c0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "loadResponse ", this));
}
c(c2368c0);
}
public void b(AbstractC2480k0 abstractC2480k0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "handleAdScreenDisplayed ", this));
}
}
public static final void b(AbstractC2637w0 abstractC2637w0, S9 s9) {
abstractC2637w0.b(s9, (short) 2137);
}
public void b(S9 s9, short s) {
List<String> c;
A4 a4 = this.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "Render view signaled ad failed, for index ");
a.append(this.g.indexOf(s9));
a.append(' ');
a.append(this);
((B4) a4).b("w0", a.toString());
}
if (s9 == null || !Intrinsics.d(s9.getMarkupType(), "htmlUrl")) {
return;
}
int indexOf = this.g.indexOf(s9);
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "fireLoadAdTokenUrlFailed : " + indexOf + ' ' + this);
}
C2437h a2 = a(indexOf);
if (a2 == null || (c = a2.c(C2437h.LOAD_AD_TOKEN_URL_FAILURE)) == null) {
return;
}
Iterator<String> it = c.iterator();
while (it.hasNext()) {
Y1.a.a(it.next(), true, this.j);
}
}
public final short c(AbstractC2480k0 abstractC2480k0) {
String str;
String str2;
M6 m6;
String str3 = SdkUiConstants.CP_EVENT;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "loadMarkupInContainerNative ", this));
}
WeakReference weakReference = new WeakReference(abstractC2480k0);
try {
try {
try {
try {
byte J = J();
JSONObject jSONObject = new JSONObject(L());
AdConfig adConfig = this.b;
C2368c0 c2368c0 = this.u;
C2473j7 c2473j7 = new C2473j7(J, jSONObject, adConfig, c2368c0 == null ? null : K8.a(c2368c0.h()), B0(), this.j);
C2437h m = m();
if (!c2473j7.f() || t() == null || m == null) {
return (short) 20;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "creating native ad container");
}
Context t = t();
byte J2 = J();
String s = m.s();
Set d = d(0);
AdConfig adConfig2 = this.b;
long l = this.t.l();
boolean b = b(0);
String o = m.o();
J j = this.t;
str = SdkUiConstants.CP_EVENT;
str2 = "TAG";
try {
A2 a2 = new A2(m, j.l());
L5 l0 = l0();
A4 a43 = this.j;
if (c2473j7.c().contains("VIDEO")) {
m6 = new U7(t, J2, c2473j7, s, d, adConfig2, l, b, o, a2, l0, a43);
} else {
m6 = new M6(t, J2, c2473j7, s, d, adConfig2, l, b, o, a2, l0, a43);
}
M6 m62 = m6;
m62.v = new C2611u0(this, weakReference);
this.h = m62;
m62.Q = this.H;
return (short) 0;
} catch (JSONException e) {
e = e;
str3 = str;
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2466j0.a(e, str3));
return (short) 13;
} catch (Exception e2) {
e = e2;
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", Cc.a(e, A5.a("w0", str2, "Encountered unexpected error in loading ad markup into container: ")));
}
Q4 q42 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, str));
return (short) 88;
}
} catch (JSONException e3) {
e = e3;
}
} catch (JSONException e4) {
e = e4;
}
} catch (IllegalStateException e5) {
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).a("w0", "Error while setting video descriptor", e5);
}
return (short) 83;
}
} catch (Exception e6) {
e = e6;
str = SdkUiConstants.CP_EVENT;
str2 = "TAG";
}
}
public final void e(AbstractC2480k0 abstractC2480k0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onFetchSuccess ", this));
}
v0();
AdMetaInfo l = l();
if (l == null) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "ad meta info null. fail");
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR), true, (short) 2106);
return;
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "callback - onAdFetchSuccess");
}
abstractC2480k0.b(l);
}
@Override
public void b(HashMap<Object, Object> hashMap) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAdRewardActionCompleted ", this));
}
if (this.o || t() == null) {
return;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "Ad reward action completed. Params:" + hashMap);
}
AbstractC2480k0 r = r();
if (r != null) {
r.b(hashMap);
}
}
public final void b(short s) {
long j;
long elapsedRealtime;
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdLoadFailedEvent ", this));
}
HashMap hashMap = new HashMap();
if (s == 2138 || s == 2109) {
j = this.I.d;
ScheduledExecutorService scheduledExecutorService = Vb.a;
elapsedRealtime = SystemClock.elapsedRealtime();
} else if (s == 2139) {
j = this.I.g;
ScheduledExecutorService scheduledExecutorService2 = Vb.a;
elapsedRealtime = SystemClock.elapsedRealtime();
} else {
j = this.I.c;
ScheduledExecutorService scheduledExecutorService3 = Vb.a;
elapsedRealtime = SystemClock.elapsedRealtime();
}
hashMap.put("latency", Long.valueOf(elapsedRealtime - j));
hashMap.put("errorCode", Short.valueOf(s));
hashMap.put("markupType", E());
C2437h u = u();
if (u != null && (p = u.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
C2387d5 c2387d5 = this.E;
if (c2387d5 != null) {
hashMap.put("retryCount", Integer.valueOf(c2387d5.b));
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
if (S().length() > 0) {
hashMap.put("metadataBlob", S());
}
c(hashMap);
c((Map) hashMap);
c("AdLoadFailed", hashMap);
}
public final boolean e(byte b) {
int Y;
Integer num;
long j;
Timer timer;
Integer num2;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "startTimer ", this));
}
if (b == 0) {
C2553p6 c2553p6 = this.F;
if (c2553p6 != null && (num2 = c2553p6.d) != null) {
Y = num2.intValue();
j = Y;
}
j = 15000;
} else if (b == 1) {
C2553p6 c2553p62 = this.F;
if (c2553p62 != null) {
Y = c2553p62.c;
j = Y;
}
j = 15000;
} else {
if (b == 2) {
C2553p6 c2553p63 = this.F;
if (c2553p63 != null && (num = c2553p63.e) != null) {
Y = num.intValue();
}
j = 15000;
} else {
if (b != 4) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "Invalid value for timeOutScenario passed!. Please pass a valid value");
}
return false;
}
Y = this.d.Y();
}
j = Y;
}
C2661xb c2661xb = this.v;
if (c2661xb == null) {
return false;
}
if (c2661xb.b.containsKey(Byte.valueOf(b)) && (timer = (Timer) c2661xb.b.get(Byte.valueOf(b))) != null) {
timer.cancel();
c2661xb.b.remove(Byte.valueOf(b));
}
try {
Timer timer2 = new Timer("xb");
c2661xb.b.put(Byte.valueOf(b), timer2);
timer2.schedule(new C2648wb(c2661xb, b), j);
return true;
} catch (InternalError e) {
e.toString();
return false;
} catch (OutOfMemoryError unused) {
Z5.a((byte) 1, "xb", "Could not execute timer due to OutOfMemory.");
((AbstractC2637w0) c2661xb.a).c(b);
return false;
}
}
public static final void c(AbstractC2637w0 abstractC2637w0, S9 s9) {
abstractC2637w0.l(s9);
}
@Override
public void c() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAdScreenDisplayFailed ", this));
}
if (this.o || t() == null) {
return;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "Ad failed to display");
}
Handler handler = this.l;
if (handler != null) {
handler.post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.d(AbstractC2637w0.this);
}
});
}
}
public final void b(Map<String, Object> map) {
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitServerError ", this));
}
if (this.e == null) {
return;
}
if (map.get("reason") == null) {
map.put("reason", "");
}
C2437h u = u();
if (u != null && (p = u.p()) != null) {
map.put("creativeType", "\"" + p + '\"');
}
C2387d5 c2387d5 = this.E;
if (c2387d5 != null) {
map.put("retryCount", Integer.valueOf(c2387d5.b));
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
map.put("isRewarded", o);
}
c(map);
this.e.a(map);
}
public void a(Context context) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "setContext ", this));
}
this.c = new WeakReference(context);
}
public final void c(HashMap hashMap) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "constructTelemetryPayload ", this));
}
hashMap.put("adType", q());
hashMap.put("networkType", C2357b3.q());
hashMap.put("plId", Long.valueOf(this.t.l()));
String m = this.t.m();
if (m != null) {
hashMap.put("plType", m);
}
}
public final void a(A4 a4) {
this.j = a4;
C2424g0 p = p();
p.getClass();
p.f = a4;
C2675z c2675z = this.D;
c2675z.getClass();
c2675z.f = a4;
}
public final void c(short s) {
C2437h m;
Boolean o;
String p;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdShowFailed ", this));
}
HashMap hashMap = new HashMap();
long j = this.I.e;
ScheduledExecutorService scheduledExecutorService = Vb.a;
hashMap.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
hashMap.put("errorCode", Short.valueOf(s));
hashMap.put("markupType", E());
if (this.A) {
m = a(this.x);
} else {
m = m();
}
if (m != null && (p = m.p()) != null) {
hashMap.put("creativeType", "\"" + p + '\"');
}
C2368c0 c2368c0 = this.u;
if (c2368c0 != null && (o = c2368c0.o()) != null) {
hashMap.put("isRewarded", o);
}
if (S().length() > 0) {
hashMap.put("metadataBlob", S());
}
c(hashMap);
c((Map) hashMap);
c("AdShowFailed", hashMap);
}
public final V9 a(int i, C2437h c2437h) {
String str;
String str2;
Boolean o;
String w;
LinkedHashMap linkedHashMap = C2523n2.a;
Y9 y9 = new Y9(((TelemetryConfig) AbstractC2564q4.a("telemetry", "null cannot be cast to non-null type com.inmobi.commons.core.configs.TelemetryConfig", null)).getMaxTemplateEvents());
J j = this.t;
String E = E();
String str3 = (c2437h == null || (w = c2437h.w()) == null) ? "" : w;
C2387d5 c2387d5 = this.E;
int i2 = c2387d5 != null ? c2387d5.b : 0;
C2437h u = u();
if (u == null || (str = u.p()) == null) {
str = "";
}
C2437h u2 = u();
if (u2 == null || (str2 = u2.o()) == null) {
str2 = "";
}
C2368c0 c2368c0 = this.u;
return new V9(j, E, str3, i2, str, str2, (c2368c0 == null || (o = c2368c0.o()) == null) ? false : o.booleanValue(), i, this.I.j, y9);
}
public final void b(long j) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdGetSignalsSucceeded ", this));
}
this.r = false;
HashMap hashMap = new HashMap();
hashMap.put("adType", q());
hashMap.put("latency", Long.valueOf(System.currentTimeMillis() - j));
hashMap.put("networkType", C2357b3.q());
c("AdGetSignalsSucceeded", hashMap);
}
public void b(String str, Map<String, Object> map) {
C2437h u;
String p;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", "onTelemetryEvent " + this + " adState=" + ((int) this.a));
}
if (this.a != 3) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).c("w0", AbstractC2681z5.a("w0", "TAG", "addRetryCountToTelemetryEvent event - ", str));
}
switch (str.hashCode()) {
case -1959333523:
break;
case 167123846:
break;
case 885222501:
break;
case 925075267:
break;
case 1881615718:
break;
case 1925668903:
break;
}
if ((Intrinsics.d(str, "ServerFill") || Intrinsics.d(str, "ServerError")) && (u = u()) != null && (p = u.p()) != null) {
map.put("creativeType", p);
}
c(str, map);
}
}
public final Pair<String, Short> a(boolean z, boolean z2, boolean z3) {
String q0;
Short sh;
StringBuilder sb = new StringBuilder("Immersive not supported on");
BitSet bitSet = new BitSet(3);
ArrayList arrayList = new ArrayList();
if (!z) {
arrayList.add(" config");
bitSet.set(0);
}
if (!z2) {
arrayList.add(" device");
bitSet.set(1);
}
if (!z3) {
arrayList.add(" ad");
bitSet.set(2);
}
q0 = CollectionsKt___CollectionsKt.q0(arrayList, Constants.COMMA, null, null, 0, null, null, 62, null);
sb.append(q0);
if (bitSet.get(0) && bitSet.get(1) && bitSet.get(2)) {
sh = (short) 2202;
} else if (bitSet.get(0) && bitSet.get(1)) {
sh = (short) 2200;
} else if (bitSet.get(0) && bitSet.get(2)) {
sh = (short) 2199;
} else if (bitSet.get(1) && bitSet.get(2)) {
sh = (short) 2201;
} else if (bitSet.get(0)) {
sh = (short) 2196;
} else if (bitSet.get(1)) {
sh = (short) 2197;
} else {
sh = bitSet.get(2) ? (short) 2198 : null;
}
short shortValue = sh != null ? sh.shortValue() : (short) -1;
if (shortValue == -1) {
return new Pair<>("Invalid Reason", (short) -1);
}
return new Pair<>(sb.toString(), Short.valueOf(shortValue));
}
public final void b(byte b) {
Timer timer;
C2661xb c2661xb;
Timer timer2;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "cancelTimer ", this));
}
if (b == 1 && (c2661xb = this.v) != null && (timer2 = (Timer) c2661xb.b.get((byte) 2)) != null) {
timer2.cancel();
c2661xb.b.remove((byte) 2);
}
C2661xb c2661xb2 = this.v;
if (c2661xb2 == null || (timer = (Timer) c2661xb2.b.get(Byte.valueOf(b))) == null) {
return;
}
timer.cancel();
c2661xb2.b.remove(Byte.valueOf(b));
}
public final void c(Map map) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "updateIdsInTelemetryPayload ", this));
}
C2437h m = m();
if (m != null) {
map.put("creativeId", "\"" + m.o() + '\"');
map.put("impressionId", "\"" + m.s() + '\"');
}
}
public final void c(String str, Map<String, Object> map) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitTelemetryEvent ", this));
}
C2407eb c2407eb = C2407eb.a;
C2407eb.b(str, map, EnumC2477jb.a);
}
public final void b(int i, boolean z) {
S9 s9;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "fireAdPodShowResult ", this));
}
ArrayList arrayList = this.g;
if (i < 0 || i >= arrayList.size() || (s9 = (S9) this.g.get(i)) == null) {
return;
}
s9.b(z);
}
public void c(byte b) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).b("w0", AbstractC2452i0.a("w0", "TAG", "onOOM ", this));
}
if (b == 0) {
a(this.t, new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.LOW_MEMORY), (short) 2110);
return;
}
if (b == 2 || b == 1) {
byte b2 = this.a;
if (b2 == 0 || 1 == b2 || 2 == b2) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "onOOM INTERNAL_LOAD_TIME_OUT or PRE_LOAD_TIME_OUT");
}
this.G.removeCallbacksAndMessages(null);
m0();
b((short) 2112);
AbstractC2480k0 r = r();
if (r != null) {
r.a(this, new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.LOW_MEMORY));
return;
}
return;
}
return;
}
if (b == 4) {
AbstractC2480k0 r2 = r();
if (r2 != null) {
r2.g();
return;
}
return;
}
if (b == 3) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "OOM Timeout scenario ignored for : " + ((int) b));
return;
}
return;
}
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).a("w0", "OOM Timeout scenario ignored for : " + ((int) b));
}
}
@Override
public void b(S9 s9) {
List<String> c;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "fireClickTracker ", this));
}
C2437h a = a(this.g.indexOf(s9));
if (((a != null ? a.p() : null) != null && Intrinsics.d(a.p(), "video")) || a == null || (c = a.c("click")) == null) {
return;
}
Iterator<String> it = c.iterator();
while (it.hasNext()) {
Y1.a.a(it.next(), true, this.j);
}
}
public static void a(C2437h c2437h, S9 s9) {
AdQualityControl e;
W adQualityManager;
if (c2437h == null || (e = c2437h.e()) == null || s9 == null || (adQualityManager = s9.getAdQualityManager()) == null) {
return;
}
adQualityManager.a("adQuality session setup");
if (!adQualityManager.a.getEnabled()) {
adQualityManager.a("config kill switch - false. ad quality will skip");
return;
}
if (adQualityManager.c.get()) {
adQualityManager.a("session already started. skip");
return;
}
adQualityManager.a("verifying control flags");
String beacon = e.getBeacon();
if (beacon != null && beacon.length() == 0) {
adQualityManager.a("no beacon received. aborting...");
ScheduledExecutorService scheduledExecutorService = P.a;
if (scheduledExecutorService != null) {
scheduledExecutorService.shutdown();
try {
try {
scheduledExecutorService.shutdownNow();
} catch (InterruptedException unused) {
scheduledExecutorService.shutdownNow();
Thread.currentThread().interrupt();
adQualityManager.a("session end - cleanup");
adQualityManager.g = null;
adQualityManager.f.clear();
adQualityManager.c.set(false);
adQualityManager.d.set(false);
adQualityManager.a("ad quality session is already in progress. skipping...");
return;
}
} catch (Exception e2) {
Log.e("AdQualityComponent", "shutdown fail", e2);
Thread.currentThread().interrupt();
adQualityManager.a("session end - cleanup");
adQualityManager.g = null;
adQualityManager.f.clear();
adQualityManager.c.set(false);
adQualityManager.d.set(false);
adQualityManager.a("ad quality session is already in progress. skipping...");
return;
}
}
adQualityManager.a("session end - cleanup");
adQualityManager.g = null;
adQualityManager.f.clear();
adQualityManager.c.set(false);
adQualityManager.d.set(false);
adQualityManager.a("ad quality session is already in progress. skipping...");
return;
}
adQualityManager.g = e;
}
@Override
public void c(S9 s9) {
List<String> c;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "fireImpressionTracker ", this));
}
C2437h a = a(this.g.indexOf(s9));
if (((a != null ? a.p() : null) != null && Intrinsics.d(a.p(), "video")) || a == null || (c = a.c("impression")) == null) {
return;
}
for (String str : c) {
C2571qb telemetryOnAdImpression = s9.getTelemetryOnAdImpression();
telemetryOnAdImpression.getClass();
telemetryOnAdImpression.e = "adResponseTracker";
Y1.a.b(str, true, (D1) new C2662y(this.D, telemetryOnAdImpression), this.j);
}
}
public final C2437h a(int i) {
Iterable k;
boolean W;
LinkedList<C2437h> f;
toString();
C2368c0 c2368c0 = this.u;
if (c2368c0 == null || (r0 = c2368c0.f()) == null || k == null) {
k = kotlin.collections.h.k();
}
W = CollectionsKt___CollectionsKt.W(k, Integer.valueOf(i));
if (W) {
C2368c0 c2368c02 = this.u;
if (c2368c02 != null && (f = c2368c02.f()) != null) {
return f.get(i);
}
} else {
C2368c0 c2368c03 = this.u;
if (c2368c03 != null) {
return c2368c03.p();
}
}
return null;
}
public final void a(AbstractC2480k0 abstractC2480k0, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onAdShowFailed ", this));
}
c(s);
abstractC2480k0.d();
}
public void a(int i, S9 s9, Context context) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", "Show pod ad with index : " + i + " from creative: " + this.g.indexOf(s9) + ' ' + this);
}
if (i >= 0) {
this.x = i;
} else {
this.x++;
}
}
public void a(S9 s9, Context context) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "closeCurrentPodAd ", this));
}
}
public boolean a(C2437h c2437h, int i, boolean z) {
String str;
Object obj;
String str2;
A4 a4;
boolean z2;
A4 a42;
A4 a43;
JSONObject c;
Object obj2;
String K;
Object obj3;
AdConfig.ViewabilityConfig viewability;
AdConfig.OmidConfig omidConfig;
HashMap hashMap;
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).c("w0", "didParseAdResponseAndExtractData " + this + " - index - " + i);
}
try {
try {
c = c2437h.c();
try {
} catch (JSONException e) {
e = e;
str = "reason";
obj = "errorCode";
}
} catch (JSONException e2) {
e = e2;
str2 = "reason";
obj = "errorCode";
}
} catch (IllegalArgumentException e3) {
e = e3;
str = "reason";
obj = "errorCode";
}
if (Intrinsics.d("unknown", c2437h.u())) {
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).b("w0", "unknown markup type. fail");
}
if (!z) {
return false;
}
HashMap hashMap2 = new HashMap();
hashMap2.put("errorCode", (short) 2163);
b((Map<String, Object>) hashMap2);
return false;
}
str = c2437h.x();
try {
try {
} catch (JSONException e4) {
e = e4;
}
} catch (IllegalArgumentException e5) {
e = e5;
}
if (str.length() > 0) {
try {
obj2 = "errorCode";
try {
try {
long j = this.I.f;
ScheduledExecutorService scheduledExecutorService = Vb.a;
K = kotlin.text.m.K(str, "@__imm_aft@", String.valueOf(SystemClock.elapsedRealtime() - j), false, 4, null);
c2437h.f(K);
A4 a46 = this.j;
if (a46 != null) {
try {
((B4) a46).a("w0", "parsing of pub content success");
} catch (JSONException e6) {
e = e6;
str2 = "reason";
obj = obj2;
a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", "Exception while parsing received ad.", e);
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2466j0.a(e, SdkUiConstants.CP_EVENT));
if (z) {
HashMap hashMap3 = new HashMap();
hashMap3.put(obj, (short) 2120);
String message = e.getMessage();
if (message != null) {
hashMap3.put(str2, message);
}
b((Map<String, Object>) hashMap3);
}
z2 = false;
a42 = this.j;
if (a42 != null) {
}
return z2;
}
}
final Context d = Ha.d();
if (this.i.get(Integer.valueOf(i)) == null) {
this.i.put(Integer.valueOf(i), new HashSet());
}
Set set = (Set) this.i.get(Integer.valueOf(i));
if (set != null && set.isEmpty()) {
A4 a47 = this.j;
if (a47 != null) {
((B4) a47).c("w0", "empty trackers");
}
AdConfig adConfig = this.b;
Boolean valueOf = (adConfig == null || (viewability = adConfig.getViewability()) == null || (omidConfig = viewability.getOmidConfig()) == null) ? null : Boolean.valueOf(omidConfig.isOmidEnabled());
A4 a48 = this.j;
if (a48 != null) {
obj3 = "web";
((B4) a48).c("w0", "OMID enable - " + valueOf);
} else {
obj3 = "web";
}
if (Intrinsics.d(valueOf, Boolean.TRUE) && c != null && c.has("metaInfo")) {
A4 a49 = this.j;
if (a49 != null) {
((B4) a49).c("w0", "checking meta info");
}
JSONObject jSONObject = c.getJSONObject("metaInfo");
if (jSONObject.has("omsdkInfo")) {
A4 a410 = this.j;
if (a410 != null) {
((B4) a410).c("w0", "checking OMSDK meta info");
}
JSONObject jSONObject2 = jSONObject.getJSONObject("omsdkInfo");
if (jSONObject2.has("omidEnabled") && jSONObject2.getBoolean("omidEnabled")) {
String string = jSONObject.has("creativeType") ? jSONObject.getString("creativeType") : "unknown";
Handler handler = this.l;
if (handler != null) {
handler.post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.a(d, this);
}
});
}
Fb fb = new Fb((byte) 3);
fb.b = AbstractC2508m0.a(string, jSONObject2.optString("customReferenceData"), jSONObject2.optBoolean("isolateVerificationScripts"), jSONObject2.optJSONObject("macros"), (byte) jSONObject2.optInt("impressionType"));
A4 a411 = this.j;
if (a411 != null) {
((B4) a411).c("w0", "Read out OMID params: " + fb.b);
}
set.add(fb);
}
}
}
if (c != null && c.has("viewability")) {
A4 a412 = this.j;
if (a412 != null) {
((B4) a412).c("w0", "checking viewability info");
}
HashMap a = a(c.getJSONArray("viewability"));
if (a != null && !a.isEmpty()) {
A4 a413 = this.j;
if (a413 != null) {
((B4) a413).c("w0", "checking for inmobi trackers");
}
Fb fb2 = new Fb((byte) 2);
fb2.b = a;
set.add(fb2);
}
}
}
z2 = true;
} catch (IllegalArgumentException e7) {
e = e7;
str = "reason";
obj = obj2;
a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "Invalid Base64 encoding in received ad.", e);
}
Q4 q42 = Q4.a;
Q4.c.a(new J1(e));
if (z) {
HashMap hashMap4 = new HashMap();
hashMap4.put(obj, (short) 2121);
String message2 = e.getMessage();
if (message2 != null) {
hashMap4.put(str, message2);
}
b((Map<String, Object>) hashMap4);
}
z2 = false;
a42 = this.j;
if (a42 != null) {
}
return z2;
}
} catch (JSONException e8) {
e = e8;
str = "reason";
str2 = str;
obj = obj2;
a4 = this.j;
if (a4 != null) {
}
Q4 q43 = Q4.a;
Q4.c.a(AbstractC2466j0.a(e, SdkUiConstants.CP_EVENT));
if (z) {
}
z2 = false;
a42 = this.j;
if (a42 != null) {
}
return z2;
}
} catch (IllegalArgumentException e9) {
e = e9;
str = "reason";
obj2 = "errorCode";
} catch (JSONException e10) {
e = e10;
str = "reason";
obj2 = "errorCode";
}
a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "Parsing result - " + z2);
}
return z2;
}
str = "reason";
try {
A4 a414 = this.j;
if (a414 != null) {
((B4) a414).a("w0", "empty punContent - fail");
}
if (!z) {
return false;
}
try {
hashMap = new HashMap();
obj = "errorCode";
} catch (JSONException e11) {
e = e11;
obj = "errorCode";
}
try {
hashMap.put(obj, (short) 2162);
b((Map<String, Object>) hashMap);
return false;
} catch (IllegalArgumentException e12) {
e = e12;
a43 = this.j;
if (a43 != null) {
}
Q4 q422 = Q4.a;
Q4.c.a(new J1(e));
if (z) {
}
z2 = false;
a42 = this.j;
if (a42 != null) {
}
return z2;
} catch (JSONException e13) {
e = e13;
str2 = str;
a4 = this.j;
if (a4 != null) {
}
Q4 q432 = Q4.a;
Q4.c.a(AbstractC2466j0.a(e, SdkUiConstants.CP_EVENT));
if (z) {
}
z2 = false;
a42 = this.j;
if (a42 != null) {
}
return z2;
}
} catch (JSONException e14) {
e = e14;
obj = "errorCode";
str2 = str;
a4 = this.j;
if (a4 != null) {
}
Q4 q4322 = Q4.a;
Q4.c.a(AbstractC2466j0.a(e, SdkUiConstants.CP_EVENT));
if (z) {
}
z2 = false;
a42 = this.j;
if (a42 != null) {
}
return z2;
}
}
public static final void a(Context context, AbstractC2637w0 abstractC2637w0) {
C2363b9 c2363b9 = AbstractC2349a9.a;
AdConfig adConfig = abstractC2637w0.b;
c2363b9.getClass();
try {
if (!Omid.isActive()) {
Omid.activate(context);
} else {
c2363b9.a(adConfig);
}
} catch (Exception e) {
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
}
}
public final HashMap a(JSONArray jSONArray) {
JSONObject jSONObject;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "parseInMobiViewabilityParams ", this));
}
try {
int length = jSONArray.length();
int i = 0;
while (true) {
if (i >= length) {
jSONObject = null;
break;
}
JSONObject jSONObject2 = jSONArray.getJSONObject(i);
if (jSONObject2.has("inmobi")) {
jSONObject = jSONObject2.getJSONObject("inmobi");
break;
}
i++;
}
if (jSONObject == null) {
return null;
}
HashMap hashMap = new HashMap();
int b = b(jSONObject.optString("time"));
if (b != -1) {
hashMap.put("time", Integer.valueOf(b));
}
int b2 = b(jSONObject.optString("view"));
if (b2 != -1) {
hashMap.put("view", Integer.valueOf(b2));
}
int b3 = b(jSONObject.optString("pixel"));
if (b3 != -1) {
hashMap.put("pixel", Integer.valueOf(b3));
}
int optInt = jSONObject.optInt("type");
if (optInt != -1) {
hashMap.put("type", Integer.valueOf(optInt));
if (optInt == 2) {
JSONArray optJSONArray = jSONObject.optJSONArray("frame");
if (optJSONArray != null && optJSONArray.length() == 4) {
hashMap.put("frame", jSONObject.optJSONArray("frame"));
} else {
hashMap.put("frame", new JSONArray("[0,0,0,0]"));
}
}
}
return hashMap;
} catch (JSONException e) {
A4 a42 = this.j;
if (a42 != null) {
StringBuilder a = A5.a("w0", "TAG", "Exception while parsing MoatParams from response : ");
a.append(e.getMessage());
((B4) a42).b("w0", a.toString());
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2466j0.a(e, SdkUiConstants.CP_EVENT));
return null;
}
}
public void a(J j, boolean z, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onAssetAvailabilityChanged ", this));
}
if (this.o || t() == null) {
return;
}
if (s != 0) {
b(s);
}
a(j, z);
}
public void a(J j, boolean z) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "handleAssetAvailabilityChanged ", this));
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "Asset availability changed (" + z + ") for placement ID (" + j + ')');
}
}
public void a(C2368c0 c2368c0) {
LinkedList<C2437h> f;
LinkedList<C2437h> f2;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "handleAdFetchSuccessful ", this));
}
if (this.a == 1) {
this.u = c2368c0;
int i = 0;
this.A = c2368c0 != null ? c2368c0.n() : false;
C2368c0 c2368c02 = this.u;
if (c2368c02 != null && (f2 = c2368c02.f()) != null) {
i = f2.size();
}
this.g = new ArrayList(i);
C2368c0 c2368c03 = this.u;
if (c2368c03 != null && (f = c2368c03.f()) != null) {
for (C2437h c2437h : f) {
this.g.add(null);
}
}
C2437h p = c2368c0.p();
if (p == null) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "top ad is null. failed.");
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR), true, (short) 2119);
return;
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "starting executor. parsing ad response");
}
C2610u c2610u = this.C;
int hashCode = hashCode();
C2447h9 c2447h9 = new C2447h9(this, p, c2368c0, new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR), this.j);
c2610u.getClass();
C2610u.a(hashCode, c2447h9);
return;
}
A4 a44 = this.j;
if (a44 != null) {
StringBuilder a = A5.a("w0", "TAG", "incorrect state - ");
a.append((int) this.a);
((B4) a44).b("w0", a.toString());
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR), true, (short) 2118);
}
public boolean a(S9 s9) {
A4 a4 = this.j;
if (a4 == null) {
return false;
}
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "hasNextAdInAdPod ", this));
return false;
}
public void a(byte b) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onTimeOut ", this));
}
if (b == 0) {
A4 a42 = this.j;
if (a42 != null) {
StringBuilder a = A5.a("w0", "TAG", "AdRequestTimeOut by timer, Adstate=");
a.append((int) this.a);
((B4) a42).a("w0", a.toString());
}
if (this.a != 3) {
a(this.t, new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.REQUEST_TIMED_OUT), (short) 2109);
return;
}
return;
}
if (b != 2 && b != 1) {
if (b == 4) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "Show RequestTimeOut by show timer");
}
AbstractC2480k0 r = r();
if (r != null) {
r.g();
return;
}
return;
}
if (b == 3) {
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).a("w0", "Bitmap TimeOut not handled here");
return;
}
return;
}
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).a("w0", "Unknown TimeOut ignored");
return;
}
return;
}
A4 a46 = this.j;
if (a46 != null) {
StringBuilder a2 = A5.a("w0", "TAG", "Internal LoadTimeOut by timer, Adstate=");
a2.append((int) this.a);
((B4) a46).a("w0", a2.toString());
}
if (this.a != 3) {
this.G.removeCallbacksAndMessages(null);
A4 a47 = this.j;
if (a47 != null) {
StringBuilder a3 = A5.a("w0", "TAG", "adUnitEventListener=");
a3.append(r());
a3.append(", Adstate=");
a3.append((int) this.a);
((B4) a47).a("w0", a3.toString());
}
byte b2 = this.a;
if (2 == b2) {
m0();
b(K8.a() == null ? (short) 2139 : (short) 2203);
AbstractC2480k0 r2 = r();
if (r2 != null) {
r2.a(this, new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INTERNAL_ERROR));
return;
}
return;
}
if (1 == b2) {
m0();
b((short) 2138);
AbstractC2480k0 r3 = r();
if (r3 != null) {
r3.a(this, new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.REQUEST_TIMED_OUT));
}
}
}
}
public void a(boolean z, InMobiAdRequestStatus inMobiAdRequestStatus) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onDidParseAfterFetch ", this));
}
if (z) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "Ad fetch successful");
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).d("w0", "AdUnit " + this + " state - AVAILABLE");
}
d((byte) 2);
return;
}
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", "onComplete parse success");
}
b(inMobiAdRequestStatus, true, (short) 0);
}
public final void a(J j, InMobiAdRequestStatus inMobiAdRequestStatus, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onAdFetchFailed ", this));
}
if (this.o || t() == null || this.a == 3) {
A4 a42 = this.j;
if (a42 != null) {
StringBuilder a = A5.a("w0", "TAG", "callback ignored - isDestroyed - ");
a.append(this.o);
a.append(" context - ");
a.append(t());
a.append(" state- ");
a.append((int) this.a);
((B4) a42).b("w0", a.toString());
return;
}
return;
}
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).c("w0", AbstractC2452i0.a("w0", "TAG", "handleMarkupFetchFailure ", this));
}
try {
if (Intrinsics.d(this.t, j) && this.a == 1) {
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", "Failed to fetch ad for placement id: " + j + ", reason - " + inMobiAdRequestStatus.getMessage());
}
String str = "MarkupFetch failed reason is: " + inMobiAdRequestStatus.getMessage();
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).b("w0", str);
}
A4 a46 = this.j;
if (a46 != null) {
((B4) a46).d("w0", "AdUnit " + this + " state - FAILED");
}
d((byte) 3);
b((byte) 1);
if (s != 0) {
a(s);
}
AbstractC2480k0 r = r();
if (r != null) {
r.a(inMobiAdRequestStatus);
return;
}
A4 a47 = this.j;
if (a47 != null) {
((B4) a47).a();
}
}
} catch (Exception e) {
A4 a48 = this.j;
if (a48 != null) {
((B4) a48).a("w0", "onAdFetchFailed with error: ", e);
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
}
}
public final void a(boolean z, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).b("w0", "handleAdShowFailure " + this + " errorCode - " + ((int) s));
}
if (z) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).d("w0", "AdUnit " + this + " state - FAILED");
}
d((byte) 3);
b((byte) 4);
}
AbstractC2480k0 r = r();
if (r != null) {
r.d();
}
if (s != 0) {
c(s);
}
}
public final void a(InMobiAdRequestStatus inMobiAdRequestStatus, boolean z, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).b("w0", "handleAdFetchFailure " + this + " errorCode - " + ((int) s));
}
if (this.a == 1 && z) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).d("w0", "AdUnit " + this + " state - FAILED");
}
d((byte) 3);
b((byte) 1);
}
AbstractC2480k0 r = r();
if (r != null) {
r.a(this, inMobiAdRequestStatus);
}
if (s != 0) {
a(s);
}
}
public final void a(Map<String, String> map) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", "setPublisherSuppliedExtras " + this + " - " + map);
}
this.t.a(map);
}
public final void a(final JSONObject jSONObject) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAuctionClosed ", this));
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.a(AbstractC2637w0.this, jSONObject);
}
});
}
public static final void a(AbstractC2637w0 abstractC2637w0, JSONObject jSONObject) {
C2610u c2610u = abstractC2637w0.C;
int hashCode = abstractC2637w0.hashCode();
C2369c1 c2369c1 = new C2369c1(abstractC2637w0, jSONObject, abstractC2637w0.j);
c2610u.getClass();
C2610u.a(hashCode, c2369c1);
}
public final void a(final Function0 function0, final Function1 function1) {
A4 a4 = this.j;
Object obj = null;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "loadWithRetry ");
C2387d5 c2387d5 = this.E;
a.append(c2387d5 != null ? Integer.valueOf(c2387d5.b) : null);
((B4) a4).c("w0", a.toString());
}
C2387d5 c2387d52 = this.E;
if (c2387d52 != null) {
EnumC2640w3 a2 = K8.a();
if (a2 == null) {
obj = C2433g9.a;
} else {
int i = c2387d52.b + 1;
c2387d52.b = i;
if (i >= c2387d52.a.b) {
obj = new C2416f6(a2);
} else {
obj = C2672y9.a;
}
}
}
if (obj instanceof C2416f6) {
function1.invoke(((C2416f6) obj).a);
return;
}
if (obj instanceof C2433g9) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).c("w0", "load with retry success");
}
function0.invoke();
return;
}
if (!(obj instanceof C2672y9)) {
if (obj == null) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).c("w0", "shouldProceedToLoad result null. starting as if we have internet.");
}
function0.invoke();
return;
}
return;
}
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).c("w0", "load failed, retrying");
}
this.G.postDelayed(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.a(AbstractC2637w0.this, function0, function1);
}
}, this.F != null ? r6.a : 1000L);
}
public static final void a(AbstractC2637w0 abstractC2637w0, Function0 function0, Function1 function1) {
A4 a4 = abstractC2637w0.j;
if (a4 != null) {
StringBuilder a = A5.a("w0", "TAG", "Loading from retry Handler ");
C2387d5 c2387d5 = abstractC2637w0.E;
a.append(c2387d5 != null ? Integer.valueOf(c2387d5.b) : null);
((B4) a4).c("w0", a.toString());
}
abstractC2637w0.a(function0, function1);
}
public void a(byte[] bArr) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "load response ", this));
}
C2663y0 c2663y0 = this.I;
c2663y0.getClass();
c2663y0.c = SystemClock.elapsedRealtime();
C2663y0 c2663y02 = this.I;
c2663y02.getClass();
c2663y02.h = SystemClock.elapsedRealtime();
if (Y()) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "isBlockingStateForLoadWithResponse - blocking");
return;
}
return;
}
if (bArr != null && bArr.length != 0) {
if (this.s == null) {
this.s = new R8(this);
}
C2598t0 c2598t0 = new C2598t0(this, bArr);
if (p0()) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "skipping internet check on load(byte[])");
}
c2598t0.invoke();
return;
}
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).a("w0", "starting load with retry");
}
a(c2598t0, new C2585s0(this));
return;
}
b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.INVALID_RESPONSE_IN_LOAD), true, (short) 2143);
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).a("w0", "null response. failing");
}
}
public final void a(InMobiAdRequestStatus inMobiAdRequestStatus, short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).b("w0", "loadResponseFailed " + this + " errorCode - " + ((int) s));
}
b(inMobiAdRequestStatus, true, s);
}
public final boolean a(AbstractC2480k0 abstractC2480k0, long j) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "isBlockingStateForGetSignals ", this));
}
if (this.r) {
Z5.a((byte) 2, "InMobi", "getSignals() call is already in progress. Please wait for its execution to get complete");
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", "getSignals() call is already in progress. Please wait for its execution to get complete");
}
return true;
}
if (!f0()) {
return false;
}
if (abstractC2480k0 != null) {
abstractC2480k0.b(new InMobiAdRequestStatus(InMobiAdRequestStatus.StatusCode.MISSING_REQUIRED_DEPENDENCIES));
}
a(PlaybackException.ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED, j);
return true;
}
public final void a(WeakReference<AbstractC2480k0> weakReference, short s, InMobiAdRequestStatus inMobiAdRequestStatus) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "onLoadAdMarkupFailed ", this));
}
d((byte) 3);
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).d("w0", "AdUnit " + this + " state - FAILED");
}
b((byte) 1);
if (this.o) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).b("w0", "AdUnit destroyed while onLoadAdMarkupFailed");
return;
}
return;
}
AbstractC2480k0 abstractC2480k0 = weakReference.get();
if (abstractC2480k0 == null) {
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", "Listener was garbage collected.Unable to give callback");
return;
}
return;
}
if (Intrinsics.d("int", q())) {
a(abstractC2480k0, s);
} else {
b(s);
abstractC2480k0.a(this, inMobiAdRequestStatus);
}
}
public final void a(WatermarkData watermarkData) {
this.J = watermarkData;
S9 w = w();
if (w != null) {
w.setWatermark(watermarkData);
}
}
public static void a(AbstractC2637w0 abstractC2637w0, int i, boolean z, int i2, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: destroyContainer");
}
if ((i2 & 2) != 0) {
z = true;
}
abstractC2637w0.a(i, z);
}
public final void a(int i, boolean z) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", "Destroying container for index " + i + ' ' + this);
}
ArrayList arrayList = this.g;
if (i < 0 || i >= arrayList.size()) {
return;
}
S9 s9 = (S9) this.g.get(i);
if (s9 != null) {
s9.v0.set(z);
s9.stopLoading();
s9.b();
}
this.g.set(i, null);
}
@Override
public void a(String str) {
AbstractC2480k0 r = r();
if (r != null) {
r.a(str);
}
}
public void a(AbstractC2480k0 abstractC2480k0) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "handleAdScreenDismissed ", this));
}
}
@Override
public void a(final S9 s9, final short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onRenderViewError ", this));
}
if (this.o || t() == null) {
return;
}
try {
Handler handler = this.l;
if (handler != null) {
handler.post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.a(AbstractC2637w0.this, s9, s);
}
});
}
} catch (Exception e) {
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).b("w0", Cc.a(e, A5.a("w0", "TAG", "Loading ad markup into container encountered an unexpected error: ")));
}
}
}
public static final void a(AbstractC2637w0 abstractC2637w0, S9 s9, short s) {
abstractC2637w0.b(s9, s);
}
@Override
public void a(HashMap<Object, Object> hashMap) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onAdInteraction ", this));
}
if (this.o || t() == null) {
return;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "Ad interaction. Params: " + hashMap);
}
AbstractC2480k0 r = r();
if (r != null) {
r.a(hashMap);
}
}
@Override
public void a(final C2571qb c2571qb) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onImpressionFiredFromTemplate ", this));
}
c2571qb.getClass();
c2571qb.e = "imraid_impressionFired";
if (this.o || t() == null) {
c2571qb.b();
return;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "onImpressionFiredFromTemplate");
}
Handler handler = this.l;
if (handler != null) {
handler.post(new Runnable() {
@Override
public final void run() {
AbstractC2637w0.a(AbstractC2637w0.this, c2571qb);
}
});
}
}
public static final void a(AbstractC2637w0 abstractC2637w0, C2571qb c2571qb) {
abstractC2637w0.D.a(c2571qb);
}
@Override
public void a() {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onUserLeaveApplication ", this));
}
if (this.o || t() == null) {
return;
}
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "User left application");
}
AbstractC2480k0 r = r();
if (r != null) {
r.h();
}
}
public final void a(short s) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdLoadDroppedAtSDK ", this));
}
HashMap hashMap = new HashMap();
hashMap.put("errorCode", Short.valueOf(s));
c(hashMap);
c("AdLoadDroppedAtSDK", hashMap);
}
public final void a(int i, long j) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "submitAdGetSignalsFailed ", this));
}
this.r = false;
HashMap hashMap = new HashMap();
hashMap.put("adType", q());
hashMap.put("latency", Long.valueOf(System.currentTimeMillis() - j));
hashMap.put("networkType", C2357b3.q());
hashMap.put("errorCode", Integer.valueOf(i));
c("AdGetSignalsFailed", hashMap);
}
@Override
public void a(String str, Map<String, Object> map) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onRenderViewRequestedAction ", this));
}
c(str, map);
}
public final void a(C2437h c2437h) {
boolean z;
Context context;
String str;
String str2;
A4 a4;
String str3;
W6 w6;
String str4;
VerificationScriptResource createVerificationScriptResourceWithoutParameters;
String str5;
String str6;
A4 a42;
String str7;
String str8;
C2473j7 c2473j7;
W7 w7;
String str9;
VerificationScriptResource createVerificationScriptResourceWithoutParameters2;
AdConfig.ViewabilityConfig viewability;
C2437h c2437h2 = c2437h;
A4 a43 = this.j;
String str10 = "TAG";
String str11 = "w0";
if (a43 != null) {
((B4) a43).c("w0", AbstractC2452i0.a("w0", "TAG", "initOmidForAd ", this));
}
Context t = t();
AdConfig adConfig = this.b;
AdConfig.OmidConfig omidConfig = (adConfig == null || (viewability = adConfig.getViewability()) == null) ? null : viewability.getOmidConfig();
if (omidConfig == null || omidConfig.isOmidEnabled()) {
AbstractC2349a9.a.getClass();
if (Omid.isActive()) {
boolean z2 = c2437h2 instanceof R7;
Set d = d(0);
if (d != null) {
Iterator it = d.iterator();
while (it.hasNext()) {
Fb fb = (Fb) it.next();
if (3 == fb.a) {
Iterator it2 = it;
Class<Map> cls = Map.class;
if ("video" == fb.b.get("creativeType") && z2) {
R7 r7 = (R7) c2437h2;
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b(str11, AbstractC2452i0.a(str11, str10, "initOmidForNativeVideoAd ", this));
}
try {
A4 a45 = this.j;
if (a45 != null) {
((B4) a45).a(str11, "Processing OMID meta data to bootstrap impression tracking for this ad response");
}
z = z2;
try {
str5 = str10;
} catch (Exception e) {
e = e;
str5 = str10;
}
try {
str8 = str11;
try {
C2450hc c2450hc = new C2450hc(r7.a, r7.b, r7.c, r7.d, r7.e, this.b.getVastVideo());
byte J = J();
JSONObject jSONObject = new JSONObject(L());
AdConfig adConfig2 = this.b;
C2368c0 c2368c0 = this.u;
c2473j7 = new C2473j7(J, jSONObject, null, false, adConfig2, c2368c0 == null ? null : K8.a(c2368c0.h()), c2450hc, this.j);
w7 = (W7) c2473j7.n("VIDEO").get(0);
} catch (Exception e2) {
e = e2;
str6 = str8;
}
} catch (Exception e3) {
e = e3;
str6 = str11;
a42 = this.j;
if (a42 == null) {
str7 = str5;
((B4) a42).b(str6, Cc.a(e, A5.a(str6, str7, "Setting up impression tracking for OMID Native Video encountered an unexpected error: ")));
} else {
str7 = str5;
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
str11 = str6;
str10 = str7;
it = it2;
z2 = z;
c2437h2 = c2437h;
}
} catch (Exception e4) {
e = e4;
str5 = str10;
str6 = str11;
z = z2;
}
if (t != null) {
ArrayList arrayList = new ArrayList();
Iterator it3 = w7.s.iterator();
while (it3.hasNext()) {
P7 p7 = (P7) it3.next();
if (Intrinsics.d("OMID_VIEWABILITY", p7.c) && (p7 instanceof U8)) {
Map map = (Map) fb.a("macros", cls);
Iterator it4 = it3;
String a = C2494l0.a(((U8) p7).h, map);
Class<Map> cls2 = cls;
String str12 = ((U8) p7).i;
String a2 = C2494l0.a(p7.e, map);
if (AbstractC2370c2.a(a) && AbstractC2370c2.a(str12)) {
createVerificationScriptResourceWithoutParameters2 = VerificationScriptResource.createVerificationScriptResourceWithParameters(str12, new URL(a2), a);
} else {
createVerificationScriptResourceWithoutParameters2 = VerificationScriptResource.createVerificationScriptResourceWithoutParameters(new URL(a2));
}
arrayList.add(createVerificationScriptResourceWithoutParameters2);
it3 = it4;
cls = cls2;
}
}
if (arrayList.size() != 0) {
W6 a3 = a(c2473j7);
if (a3 != null) {
fb.b.put("videoSkippable", Boolean.TRUE);
fb.b.put("videoSkipOffset", Integer.valueOf(a3.n));
} else {
fb.b.put("videoSkippable", Boolean.FALSE);
fb.b.put("videoSkipOffset", 0);
}
fb.b.put("videoAutoPlay", w7.t.get("shouldAutoPlay"));
HashMap hashMap = fb.b;
String e5 = this.t.e();
String str13 = (String) fb.b.get("creativeType");
C2363b9 c2363b9 = AbstractC2349a9.a;
c2363b9.getClass();
Context d2 = Ha.d();
if (d2 != null) {
str9 = new C2543o9(d2, "omid_js_store").a("omid_js_string");
if (str9 == null) {
str9 = null;
}
}
str9 = ";(function(omidGlobal) {\n 'use strict';var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function p(a){var b='undefined'!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function q(a){if(!(a instanceof Array)){a=p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ba='function'==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ca;\nif('function'==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={S:!0},fa={};try{fa.__proto__=ea;da=fa.S;break a}catch(a){}da=!1}ca=da?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+' is not extensible');return a}:null}var ha=ca;\nfunction r(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(ha)ha(a,b);else for(var c in b)if('prototype'!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c]}function ia(a){a=['object'==typeof window&&window,'object'==typeof self&&self,'object'==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}return globalThis}\nvar t=ia(this),v='function'==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function x(a,b){if(b){var c=t;a=a.split('.');for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&v(c,a,{configurable:!0,writable:!0,value:b})}}x('globalThis',function(a){return a||t});function y(a,b){return Object.prototype.hasOwnProperty.call(a,b)}\nvar ja='function'==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)y(d,e)&&(a[e]=d[e])}return a};x('Object.assign',function(a){return a||ja});function ka(){ka=function(){};t.Symbol||(t.Symbol=la)}function ma(a,b){this.a=a;v(this,'description',{configurable:!0,writable:!0,value:b})}ma.prototype.toString=function(){return this.a};\nvar la=function(){function a(c){if(this instanceof a)throw new TypeError('Symbol is not a constructor');return new ma('jscomp_symbol_'+(c||'')+'_'+b++,c)}var b=0;return a}();function z(){ka();var a=t.Symbol.iterator;a||(a=t.Symbol.iterator=t.Symbol('Symbol.iterator'));'function'!=typeof Array.prototype[a]&&v(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return na(aa(this))}});z=function(){}}function na(a){z();a={next:a};a[t.Symbol.iterator]=function(){return this};return a}\nx('WeakMap',function(a){function b(h){this.a=(g+=Math.random()+1).toString();if(h){h=p(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}function c(){}function d(h){var k=typeof h;return'object'===k&&null!==h||'function'===k}function e(h){if(!y(h,l)){var k=new c;v(h,l,{value:k})}}function f(h){var k=Object[h];k&&(Object[h]=function(m){if(m instanceof c)return m;e(m);return k(m)})}if(function(){if(!a||!Object.seal)return!1;try{var h=Object.seal({}),k=Object.seal({}),m=new a([[h,2],[k,\n3]]);if(2!=m.get(h)||3!=m.get(k))return!1;m.delete(h);m.set(k,4);return!m.has(h)&&4==m.get(k)}catch(u){return!1}}())return a;var l='$jscomp_hidden_'+Math.random();f('freeze');f('preventExtensions');f('seal');var g=0;b.prototype.set=function(h,k){if(!d(h))throw Error('Invalid WeakMap key');e(h);if(!y(h,l))throw Error('WeakMap key fail: '+h);h[l][this.a]=k;return this};b.prototype.get=function(h){return d(h)&&y(h,l)?h[l][this.a]:void 0};b.prototype.has=function(h){return d(h)&&y(h,l)&&y(h[l],this.a)};\nb.prototype.delete=function(h){return d(h)&&y(h,l)&&y(h[l],this.a)?delete h[l][this.a]:!1};return b});\nx('Map',function(a){function b(){var g={};return g.A=g.next=g.head=g}function c(g,h){var k=g.a;return na(function(){if(k){for(;k.head!=g.a;)k=k.A;for(;k.next!=k.head;)return k=k.next,{done:!1,value:h(k)};k=null}return{done:!0,value:void 0}})}function d(g,h){var k=h&&typeof h;'object'==k||'function'==k?f.has(h)?k=f.get(h):(k=''+ ++l,f.set(h,k)):k='p_'+h;var m=g.b[k];if(m&&y(g.b,k))for(g=0;g<m.length;g++){var u=m[g];if(h!==h&&u.key!==u.key||h===u.key)return{id:k,list:m,index:g,s:u}}return{id:k,list:m,\nindex:-1,s:void 0}}function e(g){this.b={};this.a=b();this.size=0;if(g){g=p(g);for(var h;!(h=g.next()).done;)h=h.value,this.set(h[0],h[1])}}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var g=Object.seal({x:4}),h=new a(p([[g,'s']]));if('s'!=h.get(g)||1!=h.size||h.get({x:4})||h.set({x:4},'t')!=h||2!=h.size)return!1;var k=h.entries(),m=k.next();if(m.done||m.value[0]!=g||'s'!=m.value[1])return!1;m=k.next();return m.done||4!=m.value[0].x||\n't'!=m.value[1]||!k.next().done?!1:!0}catch(u){return!1}}())return a;z();var f=new WeakMap;e.prototype.set=function(g,h){g=0===g?0:g;var k=d(this,g);k.list||(k.list=this.b[k.id]=[]);k.s?k.s.value=h:(k.s={next:this.a,A:this.a.A,head:this.a,key:g,value:h},k.list.push(k.s),this.a.A.next=k.s,this.a.A=k.s,this.size++);return this};e.prototype.delete=function(g){g=d(this,g);return g.s&&g.list?(g.list.splice(g.index,1),g.list.length||delete this.b[g.id],g.s.A.next=g.s.next,g.s.next.A=g.s.A,g.s.head=null,\nthis.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.A=b();this.size=0};e.prototype.has=function(g){return!!d(this,g).s};e.prototype.get=function(g){return(g=d(this,g).s)&&g.value};e.prototype.entries=function(){return c(this,function(g){return[g.key,g.value]})};e.prototype.keys=function(){return c(this,function(g){return g.key})};e.prototype.values=function(){return c(this,function(g){return g.value})};e.prototype.forEach=function(g,h){for(var k=this.entries(),m;!(m=k.next()).done;)m=\nm.value,g.call(h,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var l=0;return e});x('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)y(b,d)&&c.push(b[d]);return c}});\nx('Set',function(a){function b(c){this.a=new Map;if(c){c=p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.size}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(p([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||\nf.value[1]!=f.value[0]?!1:e.next().done}catch(l){return!1}}())return a;z();b.prototype.add=function(c){c=0===c?0:c;this.a.set(c,c);this.size=this.a.size;return this};b.prototype.delete=function(c){c=this.a.delete(c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.values()};b.prototype.keys=b.prototype.values;\nb.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.a.forEach(function(f){return c.call(d,f,f,e)})};return b});x('Object.is',function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});x('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});\nx('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)y(b,d)&&c.push([d,b[d]]);return c}});\nvar A={qa:'loaded',xa:'start',ka:'firstQuartile',sa:'midpoint',ya:'thirdQuartile',ia:'complete',ta:'pause',va:'resume',ha:'bufferStart',ga:'bufferFinish',wa:'skipped',Aa:'volumeChange',ua:'playerStateChange',da:'adUserInteraction'},oa={na:'generic',za:'video',ra:'media'},pa={R:'native',oa:'html',P:'javascript'},qa={R:'native',P:'javascript',NONE:'none'},sa={ma:'full',ja:'domain',pa:'limited'},ta={fa:'backgrounded',la:'foregrounded'},ua={ea:'app',Ba:'web'};function B(a,b){this.x=null!=a.x?a.x:a.left;this.y=null!=a.y?a.y:a.top;this.width=a.width;this.height=a.height;this.endX=this.x+this.width;this.endY=this.y+this.height;this.adSessionId=a.adSessionId||void 0;this.isFriendlyObstructionFor=a.isFriendlyObstructionFor||[];this.b=a.friendlyObstructionClass||void 0;this.c=a.friendlyObstructionPurpose||void 0;this.f=a.friendlyObstructionReason||void 0;this.clipsToBounds=void 0!==a.clipsToBounds?!0===a.clipsToBounds:!0;this.g=void 0!==a.hasWindowFocus?!0===\na.hasWindowFocus:!0;this.notVisibleReason=a.notVisibleReason||void 0;this.childViews=a.childViews||[];this.isCreative=a.isCreative||!1;this.a=b}function va(a){var b={};return b.width=a.width,b.height=a.height,b}function C(a){var b={};return Object.assign({},va(a),(b.x=a.x,b.y=a.y,b))}function wa(a){var b=C(a),c={};return Object.assign({},b,(c.endX=a.endX,c.endY=a.endY,c))}function xa(a,b,c){a.x+=b;a.y+=c;a.endX+=b;a.endY+=c}\nB.prototype.J=function(a){if(null==a)return!1;a=C(a);var b=a.y,c=a.width,d=a.height;return this.x===a.x&&this.y===b&&this.width===c&&this.height===d};function ya(a){return a.width*a.height}function za(a){return 0===a.width||0===a.height};function Aa(a,b){var c=0;if(0<b.length){var d=Ba(a,b);a=d.ba;d=d.ca;for(var e=0;e<a.length-1;e++)for(var f=(a[e]+(a[e]+1))/2,l=a[e+1]-a[e],g=0;g<d.length-1;g++){for(var h=(d[g]+(d[g]+1))/2,k=d[g+1]-d[g],m=!1,u=0;u<b.length;u++){var w=C(b[u]);if(w.x<f&&w.x+w.width>f&&w.y<h&&w.y+w.height>h){m=!0;break}}m&&(c+=Math.round(l)*Math.round(k))}}return c}\nfunction Ba(a,b){a=C(a);for(var c=[],d=[],e=0;e<b.length;e++){var f=C(b[e]);f=Ca(a,f);Da(c,f.x);Da(c,f.endX);Da(d,f.y);Da(d,f.endY)}c=c.sort(function(l,g){return l-g});d=d.sort(function(l,g){return l-g});return{ba:c,ca:d}}function Ca(a,b){return{x:Math.max(a.x,b.x),y:Math.max(a.y,b.y),endX:Math.min(a.x+a.width,b.x+b.width),endY:Math.min(a.y+a.height,b.y+b.height)}}function Da(a,b){-1===a.indexOf(b)&&a.push(b)};function Ea(){this.b=this.a=this.v=this.l=this.g=this.j=void 0;this.m=0;this.h=[];this.o=[];this.u=0;this.i=[];this.c=[];this.f=[]}Ea.prototype.J=function(a){return null==a?!1:JSON.stringify(Fa(this))===JSON.stringify(Fa(a))};\nfunction Fa(a){var b=[],c=[],d={viewport:a.j,adView:{percentageInView:a.m,pixelsInView:a.u,reasons:a.f},declaredFriendlyObstructions:a.h.length};if(void 0!==a.a){d.adView.geometry=C(a.a);d.adView.geometry.pixels=ya(a.a);d.adView.onScreenGeometry=C(a.b);d.adView.onScreenGeometry.pixels=Math.max(0,ya(a.b)-Aa(a.b,a.c));for(var e=0;e<a.c.length;e++)b.push(C(a.c[e]));for(e=0;e<a.o.length;e++){var f=a.o[e],l=f,g={};l.b&&(g.obstructionClass=l.b);l.c&&(g.obstructionPurpose=l.c);l.f&&(g.obstructionReason=\nl.f);f=Ca(a.a,f);c.push(Object.assign({},{x:f.x,y:f.y,width:f.endX-f.x,height:f.endY-f.y},g))}d.adView.onScreenGeometry.obstructions=b;d.adView.onScreenGeometry.friendlyObstructions=c;void 0!==a.l&&void 0!==a.v&&(d.adView.containerGeometry=C(a.l),d.adView.onScreenContainerGeometry=C(a.v),d.adView.measuringElement=!0)}return d}function Ga(a,b){b=va(b);a.j={};a.j.width=b.width;a.j.height=b.height;a.g={};a.g.x=0;a.g.y=0;a.g.width=b.width;a.g.height=b.height;a.g.endX=b.width;a.g.endY=b.height}\nfunction Ha(){return{x:0,y:0,endX:0,endY:0,width:0,height:0}}function Ia(a,b){var c={};c.x=Math.max(a.x,b.x);c.y=Math.max(a.y,b.y);c.endX=Math.min(a.endX,b.endX);c.endY=Math.min(a.endY,b.endY);c.width=Math.max(0,c.endX-c.x);c.height=Math.max(0,c.endY-c.y);return c}function Ja(a,b){return.01<b.width-a.width||.01<b.height-a.height}function Ka(a){if(-1!==a.f.indexOf('backgrounded'))a.m=0,a.u=0;else{var b=ya(a.a);if(0!==b){var c=Math.max(0,ya(a.b)-Aa(a.b,a.c));a.m=Math.round(c/b*100);a.u=c}}}\nfunction La(a,b){if(za(b)||!a.b)b=!1;else{var c=wa(a.b),d=c.y,e=c.endX;a=c.endY;var f=b.endX;c=c.x;(f=f<c||.01>Math.abs(f-c))||(f=b.x,f=f>e||.01>Math.abs(f-e));(e=f)||(e=b.endY,e=e<d||.01>Math.abs(e-d));(d=e)||(b=b.y,d=b>a||.01>Math.abs(b-a));b=!d}return b}function D(a,b){for(var c=!1,d=0;d<a.f.length;d++)a.f[d]===b&&(c=!0);c||a.f.push(b)};function Ma(a,b,c,d,e){var f=new Ea;b=new B(b,!1);Ga(f,b);Na(a,b,f,d);if(!e)return f.f=['unmeasurable'],f.j=void 0,f.m=0,f.c=[],f.a&&(a=f.a,c={},a=new B((c.x=0,c.y=0,c.width=a.width,c.height=a.height,c),a.a),f.a=a),f.b=Ha(),f;if('backgrounded'===c)D(f,'backgrounded');else if(void 0!==f.a){for(a=0;a<f.h.length;a++)La(f,f.h[a])&&f.o.push(f.h[a]);for(a=0;a<f.i.length;a++){if(c=La(f,f.i[a])){a:{c=f.i[a];for(d=0;d<f.c.length;d++)if(f.c[d].J(c)){c=!0;break a}c=!1}c=!c}c&&(D(f,'obstructed'),f.c.push(f.i[a]))}Ka(f)}else D(f,\n'notFound');return f}\nfunction Na(a,b,c,d){var e=b.isCreative?!0:b.adSessionId===d;if(e){c.a=b;var f=wa(c.a);a=Ia(c.g,f);var l=c.a;'notAttached'===l.notVisibleReason||'noWindowFocus'===l.notVisibleReason||'noAdView'===l.notVisibleReason?(D(c,'notFound'),c.b=new B(Ha(),!1)):(l=c.a,'viewInvisible'===l.notVisibleReason||'viewGone'===l.notVisibleReason||'viewNotVisible'===l.notVisibleReason||'viewAlphaZero'===l.notVisibleReason||'viewHidden'===l.notVisibleReason||void 0!==c.a.notVisibleReason||za(c.a)?(D(c,'hidden'),c.b=new B(Ha(),\n!1)):(c.a.g||(D(c,'backgrounded'),D(c,'noWindowFocus')),Ja(a,f)&&D(c,'clipped'),c.b=new B(a,!1)))}else if(f=!0,b.a&&(f=-1!==b.isFriendlyObstructionFor.indexOf(d)?!1:!1===b.clipsToBounds),f){l=b.childViews;for(var g=0;g<l.length;g++)f=void 0!==c.a,Na(a,new B(l[g],f),c,d)}e||void 0===c.a||(b.a?-1!==b.isFriendlyObstructionFor.indexOf(d)?c.h.push(b):c.i.push(b):(e=wa(b),d=wa(c.b),C(c.b),!za(c.b)&&b.clipsToBounds&&(b=Ia(d,e),Ja(b,d)&&(D(c,'clipped'),c.b=new B(b,!1)))))};function Oa(a,b){this.y=this.x=0;this.width=a;this.height=b};function Pa(){return{apiVersion:'1.0',accessMode:'limited',environment:'app',omidJsInfo:{omidImplementer:'omsdk',serviceVersion:'1.3.37-iab3566'}}}function Qa(){this.adSessionId=null;this.c=Pa();this.o=null;this.m='foregrounded';this.l=this.i='none';this.j=this.g=this.f=this.h=this.a=this.b=this.B=this.u=null;this.C=!0;this.v=new Map}var G;function H(){G||(G=new Qa);return G};var I=function(){if('undefined'!==typeof omidGlobal&&omidGlobal)return omidGlobal;if('undefined'!==typeof global&&global)return global;if('undefined'!==typeof window&&window)return window;if('undefined'!==typeof globalThis&&globalThis)return globalThis;var a=Function('return this')();if(a)return a;throw Error('Could not determine global object context.');}();function Ra(a,b){this.a=a;this.b=b}t.Object.defineProperties(Ra.prototype,{event:{configurable:!0,enumerable:!0,get:function(){return this.a}},origin:{configurable:!0,enumerable:!0,get:function(){return this.b}}});function J(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];Sa(function(){throw new (Function.prototype.bind.apply(Error,[null,'Could not complete the test successfully - '].concat(q(b))));},function(){return console.error.apply(console,q(b))})}function Ta(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];Sa(function(){},function(){return console.error.apply(console,q(b))})}\nfunction Sa(a,b){'undefined'!==typeof jasmine&&jasmine?a():'undefined'!==typeof console&&console&&console.error&&b()};function Ua(){this.f=[];this.b=[];this.c=[];this.g=[];this.i={};this.a=H()}function Va(a){a.f=[];a.b=[];a.c=[];a.g=[];a.i={};G.adSessionId=null;G.c=Pa();G.o=null;G.G=void 0;G.K=void 0;G.H=null;G.I=null;G.D=null;G.m='foregrounded';G.i='none';G.l='none';G.u=null;G.B=null;G.b=null;G.a=null;G.h=null;G.f=null;G.g=null;G.j=null;G.C=!0;G.v=new Map}\nfunction Wa(a,b){void 0!==a.a&&a.a.adSessionId&&!1!==Xa(a,b)&&a.c.filter(function(c){return c.type===b.event.type}).forEach(function(c){return a.h(c.F,b.event)})}function Ya(a,b){a.f.push(b);Wa(a,b)}function Za(a,b,c){void 0!==a.a&&a.a.adSessionId&&a.f.filter(function(d){return d.event.type===b&&Xa(a,d)}).map(function(d){return d.event}).forEach(c)}\nfunction Xa(a,b){var c=b.event.type,d=-1!==Object.values(A).indexOf(c)&&'volumeChange'!==c;return'impression'===c||'loaded'===c&&a.a.a?b.origin===H().l:d?b.origin===H().i:!0}function $a(a,b,c){'media'===b||'video'===b?ab(a,c):(a.c.push({type:b,F:c}),Za(a,b,c))}function ab(a,b){Object.keys(A).forEach(function(c){c=A[c];a.c.push({type:c,F:b});Za(a,c,b)})}function bb(a,b,c,d){var e={O:c,L:d,F:b};a.g.push(e);a.b.forEach(function(f){var l=cb(f);'sessionStart'===f.event.type&&db(a,l,e);a.h(b,l)})}\nfunction eb(a,b,c){var d=K(a,'sessionError','native',{errorType:b,message:c});a.b.push(d);a.g.forEach(function(e){a.h(e.F,d.event)})}function fb(a,b){a.i=Object.assign(a.i,b);b=a.a.c;if(void 0!==b){b=Object.assign({},gb(a,hb(a,{context:b}),!0),{supportsLoadedEvent:!!a.a.a||'video'==a.a.b});Object.assign(b,{pageUrl:null,contentUrl:a.a.o});var c=K(a,'sessionStart','native',b);a.b.push(c);a.g.forEach(function(d){var e=d.F,f=cb(c);db(a,f,d);a.h(e,f)},a);ib(a)}}\nfunction db(a,b,c){c.O&&(b.data.verificationParameters=a.i[c.O]);c.L&&(c=a.a.v.get(c.L))&&(b.data.verificationParameters=c.verificationParameters,b.data.context.accessMode=c.accessMode,'full'===c.accessMode&&(a.a.g&&(b.data.context.videoElement=a.a.g),a.a.f&&(b.data.context.slotElement=a.a.f)))}function jb(a){var b=a.g,c=K(a,'sessionFinish','native');a.b.push(c);var d=a.a.c;d&&'native'==d.adSessionType||Va(a);b.forEach(function(e){return a.h(e.F,c.event)})}\nUa.prototype.h=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];try{a.apply(null,q(c))}catch(e){Ta(e)}};function kb(a,b){var c=(c=H().D)?Fa(c):void 0;c=gb(a,hb(a,c));Ya(a,K(a,'impression',b,c))}function lb(a,b,c){if(a.a.a||'display'!=a.a.b)b=K(a,'loaded',b,gb(a,hb(a,void 0===c?null:c))),Ya(a,b)}\nfunction mb(a,b,c,d){'start'!==b&&'volumeChange'!==b||null!=(d&&d.deviceVolume)||(d.deviceVolume=a.a.u);if(d&&('start'===b||'volumeChange'===b)){var e=d.videoPlayerVolume,f=d.mediaPlayerVolume;null!=e?(Object.assign(d,{mediaPlayerVolume:e}),a.a.B=e):null!=f&&(Object.assign(d,{videoPlayerVolume:f}),a.a.B=f)}Ya(a,K(a,b,c,d))}\nfunction ib(a){var b=a.f.filter(function(f){return Object.values(A).includes(f.event.type)&&'video'==a.a.b&&f.origin===a.a.i||'loaded'==f.event.type&&'display'==a.a.b&&f.origin===a.a.l?!0:!1}).map(function(f){return f.event}),c=a.a.adSessionId||'',d={};b=p(b);for(var e=b.next();!e.done;d={w:d.w},e=b.next()){d.w=e.value;d.w.adSessionId||(d.w.adSessionId=c);if('loaded'==d.w.type){if(!a.a.a&&'display'==a.a.b)continue;d.w.data=gb(a,hb(a,d.w.data))}a.c.filter(function(f){return function(l){return l.type===\nf.w.type}}(d)).forEach(function(f){return function(l){return l.F(f.w)}}(d))}}function nb(a,b,c){a:{c=new Set(c);a=p(a.f.concat(a.b));for(var d=a.next();!d.done;d=a.next())if(d=d.value,c.has(d.event.type)&&d.origin!=b){b=!0;break a}b=!1}return b?(J('Event owner cannot be registered after its events have already been published.'),!1):!0}function ob(a,b){nb(a,b,Object.values(A))&&L(a,b)&&(a.a.i=b)}function pb(a,b){nb(a,b,['impression'])&&qb(a,b)&&(a.a.l=b)}\nfunction qb(a,b){var c=a.a.l;return'none'!=c&&c!=b?(J('Impression event is owned by '+(a.a.l+', not ')+(b+'.')),!1):!0}function L(a,b){var c=a.a.i;return'none'!=c&&c!=b?(J('Media events are owned by '+(a.a.i+', not '+b+'.')),!1):!0}function gb(a,b,c){c=void 0===c?!1:c;b=Object.assign({},b);a.a.b&&Object.assign(b,{mediaType:a.a.b});a.a.a&&(c||'definedByJavaScript'!==a.a.a)&&Object.assign(b,{creativeType:a.a.a});return b}function hb(a,b){return a.a.h?Object.assign({},b,{impressionType:a.a.h}):b}\nfunction K(a,b,c,d){return new Ra({adSessionId:a.a.adSessionId||'',timestamp:(new Date).getTime(),type:b,data:d},c)}function cb(a){a=a.event;return{adSessionId:a.adSessionId,timestamp:a.timestamp,type:a.type,data:a.data}};function rb(a,b,c){'container'===b&&void 0!==a.a.G&&void 0!==a.a&&null!=a.a.adSessionId&&(a.a.H=Ma(a.c,a.a.G,a.a.m,a.a.adSessionId,!0));b=a.a;var d=b.H,e=b.I;if(d)if(e){b=new Ea;var f=d.j,l=d.a,g=d.b,h=e.a,k=e.b;f&&l&&g&&h&&k&&(Ga(b,f),b.l=new B(l,!1),b.v=new B(g,!1),b.i=Object.assign([],d.i),b.c=Object.assign([],d.c),b.h=Object.assign([],d.h),b.o=Object.assign([],d.o),b.f=Object.assign([],e.f,d.f),d=b.l.x,e=b.l.y,h=new B(h,!1),k=new B(k,!1),xa(h,d,e),xa(k,d,e),b.a=h,b.b=Ia(k,g),Ka(b))}else b=d;else b=\nnull;g=a.a.D;if(b&&!b.J(g)||c)g=Fa(b),c&&(g.adView.reasons=g.adView.reasons||[c]),c=a.b,'audio'!=c.a.a&&Ya(c,K(c,'geometryChange','native',g)),a.a.D=b};function M(a){return'object'===typeof a}function sb(a){return'number'===typeof a&&!isNaN(a)&&0<=a}function N(a){return'string'===typeof a}function O(a,b){return N(a)&&-1!==Object.values(b).indexOf(a)}function tb(a){return!(!a||!a.tagName||'iframe'!==a.tagName.toLowerCase())};function P(a,b,c){this.f=a;this.K=b;this.G=c;this.c=H();this.b=null;this.a=this.g=this.u=void 0;this.I=!0;this.B=void 0;Q(this)}function Q(a){if(!a.b){var b;a:{if((b=a.f.document)&&b.getElementsByClassName&&(b=b.getElementsByClassName('omid-element'))){if(1==b.length){b=b[0];break a}1<b.length&&a.I&&(eb(a.G,'generic',\"More than one element with 'omid-element' class name.\"),a.I=!1)}b=null}if(b&&b.tagName&&'video'===b.tagName.toLowerCase())a.c.g=b;else if(b&&b.tagName)a.c.f=b;else return;ub(a)}}\nfunction ub(a){a.c.g?(a.b=a.c.g,a.i()):a.c.f&&(a.b=a.c.f,tb(a.b)?a.c.j&&a.i():a.i())}function vb(a){a.a&&(tb(a.b)?a.c.j&&(a.D(),wb(a)):(a.D(),wb(a)))}P.prototype.m=function(){this.B&&(this.f.document.removeEventListener('visibilitychange',this.B),this.B=void 0)};P.prototype.i=function(){};function wb(a){a.u&&(a.c.I=a.u,rb(a.K,'creative'))}function xb(a){if(a.a&&a.c.j){var b=new B(a.c.j,!1);xa(b,a.a.x,a.a.y);b.clipsToBounds=!0;return b}};function yb(a,b,c){return zb(a,'setInterval')(b,c)}function Ab(a,b){zb(a,'clearInterval')(b)}function Bb(a,b){zb(a,'clearTimeout')(b)}function zb(a,b){return a.a&&a.a[b]?a.a[b]:Cb(a,b)}\nfunction Db(a,b,c,d){if(a.a.document&&a.a.document.body){var e=a.a.document.createElement('img');e.width=1;e.height=1;e.style.display='none';e.src=b;c&&e.addEventListener('load',function(){return c()});d&&e.addEventListener('error',function(){return d()});a.a.document.body.appendChild(e)}else Cb(a,'sendUrl')(b,c,d)}function Cb(a,b){if(a.a&&a.a.omidNative&&a.a.omidNative[b])return a.a.omidNative[b].bind(a.a.omidNative);throw Error('Native interface method \"'+b+'\" not found.');};function R(a,b,c,d,e){P.call(this,a,c,e);this.l=b;this.h=void 0;this.j=d}r(R,P);R.prototype.m=function(){void 0!==this.h&&(Ab(this.j,this.h),this.h=void 0);P.prototype.m.call(this)};R.prototype.i=function(){var a=this;P.prototype.i.call(this);null==this.b?this.h=void 0:void 0===this.h&&(this.h=yb(this.j,function(){return Eb(a)},200),Eb(this))};\nR.prototype.D=function(){if(this.g){var a=xb(this);if(a){this.a.isCreative=!1;a.isCreative=!0;for(var b=!1,c=0;c<this.a.childViews.length;c++)if(this.a.childViews[c].isCreative){this.a.childViews[c]=a;b=!0;break}b||this.a.childViews.push(a)}else this.a.isCreative=!0;this.u=Ma(this.l,this.g,this.c.m,this.c.adSessionId,this.C())}};R.prototype.C=function(){return!0};\nfunction Eb(a){if(void 0!==a.h){b:{try{var b=a.f.top;var c=0<=b.innerHeight&&0<=b.innerWidth;break b}catch(d){}c=!1}c?(c=a.f.top,c=new B(new Oa(c.innerWidth,c.innerHeight),!1)):c=new B(new Oa(0,0),!1);b=a.b.getBoundingClientRect();if(null==b.x||isNaN(b.x))b.x=b.left;if(null==b.y||isNaN(b.y))b.y=b.top;b=new B(b,!1);c.J(a.g)&&b.J(a.a)||(a.a=b,a.a.clipsToBounds=!0,a.g=c,a.g.childViews.push(a.a),vb(a))}};function S(a,b,c,d){P.call(this,a,c,d);this.o=this.j=this.l=this.h=void 0;this.H=!1;this.v=void 0}r(S,P);S.prototype.m=function(){this.h&&this.h.disconnect();Fb(this);P.prototype.m.call(this)};S.prototype.i=function(){P.prototype.i.call(this);this.b&&(this.h||(this.h=Gb(this)),Hb(this),Ib(this.b)&&Jb(this))};\nS.prototype.D=function(){if(this.a&&this.v){var a=xb(this);if(a){var b=a;var c=this.v;var d=Math.max(a.x,c.x);var e=Math.max(a.y,c.y),f=Math.min(a.endX,c.endX);a=Math.min(a.endY,c.endY);f<=d||a<=e?d=null:(c={},d=new B((c.x=d,c.y=e,c.width=Math.abs(f-d),c.height=Math.abs(a-e),c),!1));d||(d=new B({x:0,y:0,width:0,height:0},!1))}else b=this.a,d=this.v;e=new Ea;this.g&&Ga(e,this.g);e.a=b;e.b=d;Ka(e);this.H?za(e.a)?D(e,'hidden'):100===e.m||D(e,'clipped'):D(e,'viewport');this.u=e}};S.prototype.C=function(){return!0};\nfunction Fb(a){a.l&&(a.l.disconnect(),a.l=void 0);a.j&&(a.j.disconnect(),a.j=void 0);a.o&&((0,a.f.removeEventListener)('resize',a.o),a.o=void 0)}function Hb(a){a.h&&a.b&&(a.h.unobserve(a.b),a.h.observe(a.b))}function Ib(a){a=a.getBoundingClientRect();return 0==a.width||0==a.height}\nfunction Gb(a){return new a.f.IntersectionObserver(function(b){try{if(b.length){for(var c,d=b[0],e=1;e<b.length;e++)b[e].time>d.time&&(d=b[e]);c=d;a.g=Kb(c.rootBounds);a.a=Kb(c.boundingClientRect);a.v=Kb(c.intersectionRect);a.H=!!c.isIntersecting;vb(a)}}catch(f){a.m(),eb(a.G,'generic','Problem handling IntersectionObserver callback: '+f.message)}},{root:null,rootMargin:'0px',threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]})}\nfunction Jb(a){a.f.ResizeObserver?a.l||(a.l=Lb(a,function(){return Mb(a)}),a.l.observe(a.b)):(a.o||(a.o=function(){return Mb(a)},(0,a.f.addEventListener)('resize',a.o)),a.j||(a.j=new MutationObserver(function(){return Mb(a)}),a.j.observe(a.b,{childList:!1,attributes:!0,subtree:!1})))}function Mb(a){a.b&&!Ib(a.b)&&(Hb(a),Fb(a))}function Lb(a,b){return new a.f.ResizeObserver(b)}function Kb(a){if(a&&null!==a.x&&null!==a.y&&null!==a.width&&null!==a.height)return new B(a,!1)};function Nb(a){return a&&M(a)?Object.entries(a).reduce(function(b,c){var d=p(c);c=d.next().value;d=d.next().value;return b&&N(c)&&null!=d&&M(d)&&N(d.resourceUrl)},!0):!1};function T(a,b,c,d){this.b=a;this.method=b;this.version=c;this.a=d}function Pb(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&'string'===typeof a.omid_message_guid&&'string'===typeof a.omid_message_method&&'string'===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)}function Qb(a){return new T(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)}\nfunction Rb(a){var b={};b=(b.omid_message_guid=a.b,b.omid_message_method=a.method,b.omid_message_version=a.version,b);void 0!==a.a&&(b.omid_message_args=a.a);return b};function Sb(a){this.c=a};function U(a){this.c=a;this.handleExportedMessage=U.prototype.f.bind(this)}r(U,Sb);U.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.handleExportedMessage(Rb(a),this)};U.prototype.f=function(a,b){Pb(a)&&this.a&&this.a(Qb(a),b)};function Tb(a){return Ub(a,'SessionService.')}function Ub(a,b){return(a=a.match(new RegExp('^'+b+'(.*)')))&&a[1]};function Vb(a,b){this.c=b=void 0===b?I:b;var c=this;a.addEventListener('message',function(d){if('object'===typeof d.data){var e=d.data;Pb(e)&&d.source&&c.a&&c.a(Qb(e),d.source)}})}r(Vb,Sb);Vb.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.postMessage(Rb(a),'*')};function Wb(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=16*Math.random()|0;return'y'===a?(b&3|8).toString(16):b.toString(16)})};function Xb(a){if(!a.a||!a.a.document)throw Error('OMID Service Script is not running within a window.');var b=a.b;a.b=[];b.forEach(function(c){try{var d=a.c.C?'limited':'full',e=O(c.accessMode,sa)?c.accessMode:null;var f=e?'full'==e&&'limited'==d?d:'domain'==e?'limited':e:d;c.accessMode=f;a:{var l=c.resourceUrl,g=a.a.location.origin;try{var h=new URL(l,g);break a}catch(V){}try{h=new URL(l);break a}catch(V){}h=null}if(d=h){var k=Wb(),m=a.a.document,u=m.createElement('iframe');u.id='omid-verification-script-frame-'+\nk;u.style.display='none';['full','limited'].includes(f)?u.srcdoc=\"<html><head>\\n<script type=\\\"text/javascript\\\">window['omidVerificationProperties'] = {\\n'serviceWindow': window.parent,\\n'injectionSource': 'app',\\n'injectionId': '\"+(k+'\\',\\n};\\x3c/script>\\n<script type=\"text/javascript\" src=\"')+d.href+'\">\\x3c/script>\\n</head><body></body></html>':'domain'==f&&(u.src=Yb(a,k,d).href);['domain','limited'].includes(f)&&(u.sandbox='allow-scripts');m.body.appendChild(u);var w=c.vendorKey,E=c.verificationParameters;\nw=void 0===w?'':w;E=void 0===E?'':E;w&&'string'===typeof w&&''!==w&&E&&'string'===typeof E&&''!==E&&(a.f.i[w]=E);a.c.v.set(k,c)}}catch(V){Ta('OMID verification script '+c.resourceUrl+' failed to load: '+V)}})}\nfunction Yb(a,b,c){var d='/.well-known/omid/omloader-v1.html#';(new Map([['verificationScriptUrl',c.href],['injectionId',b]])).forEach(function(e,f){d+=encodeURIComponent(f)+'='+encodeURIComponent(e)+'&'});b=null;try{b=new URL(d,a.a.parent.location.origin)}catch(e){throw Error('OMID Service Script cannot access the parent window.');}return b};function Zb(){var a=$b,b=ac,c=this;this.c=X;this.b=a;this.a=H();this.g=b;this.f=!1;this.registerSessionObserver(function(d){return bc(c,d)})}n=Zb.prototype;n.registerSessionObserver=function(a){bb(this.c,a)};n.setSlotElement=function(a){a&&a.tagName?(this.a.f=a,this.b&&ub(this.b)):J('setSlotElement called with a non-HTMLElement. It will be ignored.')};n.setElementBounds=function(a){this.a.j=a;this.b&&ub(this.b);this.b&&vb(this.b)};n.error=function(a,b){eb(this.c,a,b)};\nn.registerAdEvents=function(){pb(this.c,'javascript')};n.registerMediaEvents=function(){ob(this.c,'javascript')};function Y(a,b,c){'impression'==b?qb(a.c,'javascript')&&(kb(a.c,'javascript'),a.b&&Q(a.b)):('loaded'==b?(c=void 0===c?null:c,L(a.c,'javascript')&&lb(a.c,'javascript',c)):L(a.c,'javascript')&&mb(a.c,b,'javascript',c),['loaded','start'].includes(b)&&a.b&&Q(a.b))}n.injectVerificationScriptResources=function(a){var b=this.g;b.b.push.apply(b.b,q(a));if(this.f)try{Xb(this.g)}catch(c){J(c.message)}};\nn.setCreativeType=function(a,b){b=void 0===b?null:b;if(!this.a.b||this.a.a)this.a.a=a,'video'==a||'audio'==a?this.a.b='video':'htmlDisplay'==a||'nativeDisplay'==a?this.a.b='display':'definedByJavaScript'==a&&b&&(this.a.b='none'==b?'display':'video')};n.setImpressionType=function(a){if(!this.a.b||this.a.a)this.a.h=a};\nfunction bc(a,b){if('sessionStart'===b.type){a.f=!0;try{Xb(a.g)}catch(c){J(c.message)}}'sessionFinish'===b.type&&(a.f=!1,(b=H().c)&&'native'==b.adSessionType||a.registerSessionObserver(function(c){return bc(a,c)}))}n.setClientInfo=function(a,b,c){var d=this.a.c||{};d.omidJsInfo=Object.assign({},d.omidJsInfo,{sessionClientVersion:a,partnerName:b,partnerVersion:c});this.a.c=d;return this.a.c.omidJsInfo.serviceVersion};function cc(a){return/\\d+\\.\\d+\\.\\d+(-.*)?/.test(a)}function dc(a){a=a.split('-')[0].split('.');for(var b=['1','0','3'],c=0;3>c;c++){var d=parseInt(a[c],10),e=parseInt(b[c],10);if(d>e)break;else if(d<e)return!1}return!0};function ec(a,b){return cc(a)&&dc(a)?b?b:[]:b&&'string'===typeof b?JSON.parse(b):[]};var fc=new function(){};function gc(){var a=hc;var b=void 0===b?omidGlobal:b;this.a=a;this.g=b;this.b=new U;this.g.omid=this.g.omid||{};this.g.omid.v1_SessionServiceCommunication=this.b;this.f=b&&b.addEventListener&&b.postMessage?new Vb(b):null;this.c=null;this.b.a=this.h.bind(this);this.f&&(this.f.a=this.i.bind(this))}gc.prototype.h=function(a,b){null!=Tb(a.method)&&ic(this,fc)&&jc(this,a,b,this.b)};gc.prototype.i=function(a,b){null!=Tb(a.method)&&ic(this,b)&&jc(this,a,b,this.f)};\nfunction ic(a,b){a.c||(a.c=b);return a.c!=b?(J('The source of session client messages cannot be changed from the source of the first message.'),!1):!0}\nfunction jc(a,b,c,d){function e(h){for(var k=[],m=0;m<arguments.length;++m)k[m]=arguments[m];k=new T(f,'response',g,cc(g)&&dc(g)?k:JSON.stringify(k));d.b(k,c)}var f=b.b,l=b.method,g=b.version;b=ec(g,b.a);try{kc(a,l,e,b)}catch(h){d.b(new T(f,'error',g,'\\n name: '+h.name+'\\n message: '+h.message+'\\n filename: '+h.filename+'\\n lineNumber: '+h.lineNumber+'\\n columnNumber: '+h.columnNumber+'\\n stack: '+h.stack+'\\n toString(): '+h.toString()),c)}}\nfunction kc(a,b,c,d){if(null!=Tb(b))switch(Tb(b)){case 'registerAdEvents':a.a.registerAdEvents();break;case 'registerMediaEvents':a.a.registerMediaEvents();break;case 'registerSessionObserver':a.a.registerSessionObserver(c);break;case 'setSlotElement':c=p(d).next().value;a.a.setSlotElement(c);break;case 'setVideoElement':c=p(d).next().value;a=a.a;c&&c.tagName&&'video'===c.tagName.toLowerCase()?(a.a.g=c,a.b&&ub(a.b)):J('setVideoElement called with a non-HTMLVideoElement. It will be ignored.');break;\ncase 'setElementBounds':c=p(d).next().value;a.a.setElementBounds(c);break;case 'startSession':J('Session start from JS is not supported in mobile app.');break;case 'finishSession':J('Session finish from JS is not supported in mobile app.');break;case 'impressionOccurred':Y(a.a,'impression');break;case 'loaded':(c=p(d).next().value)?(b={skippable:c.isSkippable,autoPlay:c.isAutoPlay,position:c.position},c.isSkippable&&(b.skipOffset=c.skipOffset),Y(a.a,'loaded',b)):Y(a.a,'loaded');break;case 'start':b=\np(d);c=b.next().value;b=b.next().value;Y(a.a,'start',{duration:c,mediaPlayerVolume:b});break;case 'firstQuartile':Y(a.a,'firstQuartile');break;case 'midpoint':Y(a.a,'midpoint');break;case 'thirdQuartile':Y(a.a,'thirdQuartile');break;case 'complete':Y(a.a,'complete');break;case 'pause':Y(a.a,'pause');break;case 'resume':Y(a.a,'resume');break;case 'bufferStart':Y(a.a,'bufferStart');break;case 'bufferFinish':Y(a.a,'bufferFinish');break;case 'skipped':Y(a.a,'skipped');break;case 'volumeChange':c={mediaPlayerVolume:p(d).next().value};\nY(a.a,'volumeChange',c);break;case 'playerStateChange':c={state:p(d).next().value};Y(a.a,'playerStateChange',c);break;case 'adUserInteraction':c={interactionType:p(d).next().value};Y(a.a,'adUserInteraction',c);break;case 'setClientInfo':var e=p(d);b=e.next().value;d=e.next().value;e=e.next().value;a=a.a.setClientInfo(b,d,e);c(a);break;case 'injectVerificationScriptResources':c=p(d).next().value;a.a.injectVerificationScriptResources(c);break;case 'setCreativeType':c=p(d).next().value;a.a.setCreativeType(c);\nbreak;case 'setImpressionType':c=p(d).next().value;a.a.setImpressionType(c);break;case 'setContentUrl':c=p(d).next().value;a.a.a.o=c;break;case 'sessionError':b=p(d),c=b.next().value,b=b.next().value,a.a.error(c,b)}};function Z(){var a=X,b=lc,c=mc,d=$b;this.f=hc;this.a=a;this.c=b;this.h=c;this.g=d;this.b=H()}n=Z.prototype;\nn.T=function(a){if(!(!(a&&M(a)&&O(a.impressionOwner,qa))||'videoEventsOwner'in a&&null!=a.videoEventsOwner&&!O(a.videoEventsOwner,qa)||'mediaEventsOwner'in a&&null!=a.mediaEventsOwner&&!O(a.mediaEventsOwner,qa))){if(a.creativeType&&a.impressionType){var b=a.mediaEventsOwner;null==this.b.a&&this.f.setCreativeType(a.creativeType,b);null==this.b.h&&(this.b.h=a.impressionType);ob(this.a,b)}else b=a.videoEventsOwner,this.b.b=null==b||'none'===b?'display':'video',this.b.a=null,this.b.h=null,ob(this.a,b);\npb(this.a,a.impressionOwner);a&&null!=a.isolateVerificationScripts&&'boolean'===typeof a.isolateVerificationScripts&&(this.b.C=a.isolateVerificationScripts)}};\nn.W=function(a,b,c,d){var e;if(M(b)){if(e=O(b.environment,ua)&&O(b.adSessionType,pa))e=b.omidNativeInfo,e=M(e)?N(e.partnerName)&&N(e.partnerVersion):!1;e&&(e=b.app,e=M(e)?N(e.libraryVersion)&&N(e.appId):!1)}else e=!1;e&&(Nb(d)&&(this.b.v=new Map(Object.entries(d))),d=this.f,c=void 0===c?null:c,null==a&&(a=Wb()),b.canMeasureVisibility=d.b.C(),d.a.adSessionId=a,a=d.a,e=b,void 0!==e.contentUrl&&(a.o=e.contentUrl,e.contentUrl=void 0),e=a.c||{},b.omidJsInfo=Object.assign({},e.omidJsInfo||{},b.omidJsInfo||\n{}),e=b=Object.assign({},e,b),a.C||(null!=a.g?(e.videoElement=a.g,e.accessMode='full'):null!=a.f&&(e.slotElement=a.f,e.accessMode='full')),a.c=b,fb(d.c,c),d.b&&Q(d.b))};n.U=function(){var a=this.f;jb(a.c);a.b.m()};n.$=function(a){M(a)&&sb(a.x)&&sb(a.y)&&sb(a.width)&&sb(a.height)&&(this.b.G=a,rb(this.c,'container'))};n.aa=function(a){O(a,ta)&&(this.b.m=a,'backgrounded'===a?rb(this.c,'container','backgrounded'):rb(this.c,'container'))};n.X=function(a){'impression'===a&&(this.M(),this.g&&Q(this.g))};\nn.M=function(){qb(this.a,'native')&&kb(this.a,'native')};n.V=function(a){a=void 0===a?null:a;L(this.a,'native')&&lb(this.a,'native',a)};n.error=function(a,b){O(a,oa)&&eb(this.a,a,b)};n.Y=function(a,b){this.N(a,b)};n.N=function(a,b){L(this.a,'native')&&O(a,A)&&(void 0===b||M(b))&&('loaded'==a?lb(this.a,'native',b):mb(this.a,a,'native',b))};\nn.Z=function(a){if('none'!==this.a.a.i&&'number'===typeof a&&!isNaN(a)){this.b.u=a;a=this.h;var b=a.a.B;null!=b&&mb(a.b,'volumeChange','native',{mediaPlayerVolume:b,deviceVolume:a.a.u})}};Z.prototype.startSession=Z.prototype.W;Z.prototype.error=Z.prototype.error;Z.prototype.finishSession=Z.prototype.U;Z.prototype.publishAdEvent=Z.prototype.X;Z.prototype.publishImpressionEvent=Z.prototype.M;Z.prototype.publishVideoEvent=Z.prototype.Y;Z.prototype.publishMediaEvent=Z.prototype.N;\nZ.prototype.publishLoadedEvent=Z.prototype.V;Z.prototype.setNativeViewHierarchy=Z.prototype.$;Z.prototype.setState=Z.prototype.aa;Z.prototype.setDeviceVolume=Z.prototype.Z;Z.prototype.init=Z.prototype.T;function nc(){var a=X,b=oc;var c=void 0===c?I:c;this.g=a;this.a=b;this.h={};this.f={};this.c=new U;c.omid=c.omid||{};c.omid.v1_VerificationServiceCommunication=this.c;this.b=null;c&&c.addEventListener&&c.postMessage&&(this.b=new Vb(c));this.c.a=this.i.bind(this);this.b&&(this.b.a=this.j.bind(this))}function pc(a,b,c,d){Db(a.a,b,c,d)}function qc(a,b,c,d){Cb(a.a,'downloadJavaScriptResource')(b,c,d)}nc.prototype.j=function(a,b){this.b&&rc(this,a,b,this.b)};nc.prototype.i=function(a,b){rc(this,a,b,this.c)};\nfunction rc(a,b,c,d){function e(F){for(var W=[],ra=0;ra<arguments.length;++ra)W[ra]=arguments[ra];W=new T(f,'response',g,cc(g)&&dc(g)?W:JSON.stringify(W));d.b(W,c)}var f=b.b,l=b.method,g=b.version;b=ec(g,b.a);if(null!=Ub(l,'VerificationService.')){l=Ub(l,'VerificationService.');try{switch(l){case 'addEventListener':var h=p(b).next().value;$a(a.g,h,e);break;case 'addSessionListener':var k=p(b),m=k.next().value,u=k.next().value;bb(a.g,e,m,u);break;case 'sendUrl':var w=p(b).next().value;pc(a,w,function(){return e(!0)},\nfunction(){return e(!1)});break;case 'setTimeout':var E=p(b),V=E.next().value,wc=E.next().value;a.h[V]=zb(a.a,'setTimeout')(e,wc);break;case 'clearTimeout':var xc=p(b).next().value;Bb(a.a,a.h[xc]);break;case 'setInterval':var Ob=p(b),yc=Ob.next().value,zc=Ob.next().value;a.f[yc]=yb(a.a,e,zc);break;case 'clearInterval':var Ac=p(b).next().value;Ab(a.a,a.f[Ac]);break;case 'injectJavaScriptResource':var Bc=p(b).next().value;qc(a,Bc,function(F){return e(!0,F)},function(){return e(!1)});break;case 'getVersion':p(b).next();\nvar Cc=H().c.omidJsInfo;e(Cc.serviceVersion)}}catch(F){d.b(new T(f,'error',g,'\\n name: '+F.name+'\\n message: '+F.message+'\\n filename: '+F.filename+'\\n lineNumber: '+F.lineNumber+'\\n columnNumber: '+F.columnNumber+'\\n stack: '+F.stack+'\\n toString(): '+F.toString()+'\\n '),c)}}};function sc(){var a=I.document.createElement('iframe');a.id='omid_v1_present';a.name='omid_v1_present';a.style.display='none';I.document.body.appendChild(a)}function tc(){var a=new MutationObserver(function(b){b.forEach(function(c){'BODY'===c.addedNodes[0].nodeName&&(sc(),a.disconnect())})});a.observe(I.document.documentElement,{childList:!0})};var X=new Ua,oc=new function(){var a;this.a=a=void 0===a?omidGlobal:a};new nc;var uc=new function(){},vc=new function(){},lc=new function(){this.b=X;this.c=vc;this.a=H()},Dc;I?Dc=I.IntersectionObserver&&(I.MutationObserver||I.ResizeObserver)?new S(I,uc,lc,X):new R(I,vc,lc,oc,X):Dc=null;var $b=Dc,ac=new function(){var a=X;var b=void 0===b?I:b;this.f=a;this.a=b;this.c=H();this.b=[]},hc=new Zb,mc=new function(){var a=X,b=H();this.b=a;this.a=b};I.omidBridge=new Z;new gc;\nif(I.frames&&I.document&&!('omid_v1_present'in I.frames)){var Ec;if(Ec=null==I.document.body)Ec='MutationObserver'in I;Ec?tc():I.document.body?sc():I.document.write('<iframe style=\"display:none\" id=\"omid_v1_present\" name=\"omid_v1_present\"></iframe>')};\n}).call(this, this);";
hashMap.put("omidAdSession", new T8("native_video_ad", ImpressionType.VIEWABLE, AdSessionContext.createNativeAdSessionContext(c2363b9.b, str9, arrayList, e5, str13), false));
fb.b.put("deferred", Boolean.TRUE);
A4 a46 = this.j;
if (a46 != null) {
str6 = str8;
try {
((B4) a46).a(str6, "OMID video ad session created and JavaScript resources injected");
str11 = str6;
it = it2;
z2 = z;
str10 = str5;
} catch (Exception e6) {
e = e6;
a42 = this.j;
if (a42 == null) {
}
Q4 q42 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
str11 = str6;
str10 = str7;
it = it2;
z2 = z;
c2437h2 = c2437h;
}
}
}
}
c2437h2 = c2437h;
it = it2;
z2 = z;
str10 = str5;
str11 = str8;
} else {
String str14 = str11;
z = z2;
Class<Map> cls3 = cls;
String str15 = str10;
A4 a47 = this.j;
if (a47 != null) {
((B4) a47).c(str14, AbstractC2452i0.a(str14, str15, "initOmidForNativeDisplayAd ", this));
}
try {
byte J2 = J();
str2 = SdkUiConstants.CP_EVENT;
try {
JSONObject jSONObject2 = new JSONObject(L());
AdConfig adConfig3 = this.b;
str = str15;
try {
C2368c0 c2368c02 = this.u;
w6 = (W6) new C2473j7(J2, jSONObject2, null, false, adConfig3, c2368c02 == null ? null : K8.a(c2368c02.h()), null, this.j).n("CONTAINER").get(0);
} catch (Exception e7) {
e = e7;
context = t;
}
} catch (Exception e8) {
e = e8;
context = t;
str = str15;
}
} catch (Exception e9) {
e = e9;
context = t;
str = str15;
str2 = SdkUiConstants.CP_EVENT;
}
if (t != null) {
ArrayList arrayList2 = new ArrayList();
Iterator it5 = w6.s.iterator();
while (it5.hasNext()) {
P7 p72 = (P7) it5.next();
if (Intrinsics.d("OMID_VIEWABILITY", p72.c) && (p72 instanceof U8)) {
Class<Map> cls4 = cls3;
context = t;
try {
Map map2 = (Map) fb.a("macros", cls4);
Iterator it6 = it5;
String a5 = C2494l0.a(((U8) p72).h, map2);
cls3 = cls4;
String str16 = ((U8) p72).i;
String a6 = C2494l0.a(p72.e, map2);
if (AbstractC2370c2.a(a5) && AbstractC2370c2.a(str16)) {
createVerificationScriptResourceWithoutParameters = VerificationScriptResource.createVerificationScriptResourceWithParameters(str16, new URL(a6), a5);
} else {
createVerificationScriptResourceWithoutParameters = VerificationScriptResource.createVerificationScriptResourceWithoutParameters(new URL(a6));
}
arrayList2.add(createVerificationScriptResourceWithoutParameters);
it5 = it6;
t = context;
} catch (Exception e10) {
e = e10;
a4 = this.j;
if (a4 == null) {
str3 = str;
((B4) a4).b(str14, Cc.a(e, A5.a(str14, str3, "Setting up impression tracking for OMID Native Display encountered an unexpected error: ")));
} else {
str3 = str;
}
Q4 q43 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, str2));
str11 = str14;
str10 = str3;
it = it2;
t = context;
z2 = z;
c2437h2 = c2437h;
}
}
}
context = t;
if (arrayList2.size() != 0) {
HashMap hashMap2 = fb.b;
String e11 = this.t.e();
String str17 = (String) fb.b.get("creativeType");
C2363b9 c2363b92 = AbstractC2349a9.a;
c2363b92.getClass();
Context d3 = Ha.d();
if (d3 != null) {
str4 = new C2543o9(d3, "omid_js_store").a("omid_js_string");
if (str4 == null) {
str4 = null;
}
}
str4 = ";(function(omidGlobal) {\n 'use strict';var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function p(a){var b='undefined'!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function q(a){if(!(a instanceof Array)){a=p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ba='function'==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ca;\nif('function'==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={S:!0},fa={};try{fa.__proto__=ea;da=fa.S;break a}catch(a){}da=!1}ca=da?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+' is not extensible');return a}:null}var ha=ca;\nfunction r(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(ha)ha(a,b);else for(var c in b)if('prototype'!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c]}function ia(a){a=['object'==typeof window&&window,'object'==typeof self&&self,'object'==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}return globalThis}\nvar t=ia(this),v='function'==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function x(a,b){if(b){var c=t;a=a.split('.');for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&v(c,a,{configurable:!0,writable:!0,value:b})}}x('globalThis',function(a){return a||t});function y(a,b){return Object.prototype.hasOwnProperty.call(a,b)}\nvar ja='function'==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)y(d,e)&&(a[e]=d[e])}return a};x('Object.assign',function(a){return a||ja});function ka(){ka=function(){};t.Symbol||(t.Symbol=la)}function ma(a,b){this.a=a;v(this,'description',{configurable:!0,writable:!0,value:b})}ma.prototype.toString=function(){return this.a};\nvar la=function(){function a(c){if(this instanceof a)throw new TypeError('Symbol is not a constructor');return new ma('jscomp_symbol_'+(c||'')+'_'+b++,c)}var b=0;return a}();function z(){ka();var a=t.Symbol.iterator;a||(a=t.Symbol.iterator=t.Symbol('Symbol.iterator'));'function'!=typeof Array.prototype[a]&&v(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return na(aa(this))}});z=function(){}}function na(a){z();a={next:a};a[t.Symbol.iterator]=function(){return this};return a}\nx('WeakMap',function(a){function b(h){this.a=(g+=Math.random()+1).toString();if(h){h=p(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}function c(){}function d(h){var k=typeof h;return'object'===k&&null!==h||'function'===k}function e(h){if(!y(h,l)){var k=new c;v(h,l,{value:k})}}function f(h){var k=Object[h];k&&(Object[h]=function(m){if(m instanceof c)return m;e(m);return k(m)})}if(function(){if(!a||!Object.seal)return!1;try{var h=Object.seal({}),k=Object.seal({}),m=new a([[h,2],[k,\n3]]);if(2!=m.get(h)||3!=m.get(k))return!1;m.delete(h);m.set(k,4);return!m.has(h)&&4==m.get(k)}catch(u){return!1}}())return a;var l='$jscomp_hidden_'+Math.random();f('freeze');f('preventExtensions');f('seal');var g=0;b.prototype.set=function(h,k){if(!d(h))throw Error('Invalid WeakMap key');e(h);if(!y(h,l))throw Error('WeakMap key fail: '+h);h[l][this.a]=k;return this};b.prototype.get=function(h){return d(h)&&y(h,l)?h[l][this.a]:void 0};b.prototype.has=function(h){return d(h)&&y(h,l)&&y(h[l],this.a)};\nb.prototype.delete=function(h){return d(h)&&y(h,l)&&y(h[l],this.a)?delete h[l][this.a]:!1};return b});\nx('Map',function(a){function b(){var g={};return g.A=g.next=g.head=g}function c(g,h){var k=g.a;return na(function(){if(k){for(;k.head!=g.a;)k=k.A;for(;k.next!=k.head;)return k=k.next,{done:!1,value:h(k)};k=null}return{done:!0,value:void 0}})}function d(g,h){var k=h&&typeof h;'object'==k||'function'==k?f.has(h)?k=f.get(h):(k=''+ ++l,f.set(h,k)):k='p_'+h;var m=g.b[k];if(m&&y(g.b,k))for(g=0;g<m.length;g++){var u=m[g];if(h!==h&&u.key!==u.key||h===u.key)return{id:k,list:m,index:g,s:u}}return{id:k,list:m,\nindex:-1,s:void 0}}function e(g){this.b={};this.a=b();this.size=0;if(g){g=p(g);for(var h;!(h=g.next()).done;)h=h.value,this.set(h[0],h[1])}}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var g=Object.seal({x:4}),h=new a(p([[g,'s']]));if('s'!=h.get(g)||1!=h.size||h.get({x:4})||h.set({x:4},'t')!=h||2!=h.size)return!1;var k=h.entries(),m=k.next();if(m.done||m.value[0]!=g||'s'!=m.value[1])return!1;m=k.next();return m.done||4!=m.value[0].x||\n't'!=m.value[1]||!k.next().done?!1:!0}catch(u){return!1}}())return a;z();var f=new WeakMap;e.prototype.set=function(g,h){g=0===g?0:g;var k=d(this,g);k.list||(k.list=this.b[k.id]=[]);k.s?k.s.value=h:(k.s={next:this.a,A:this.a.A,head:this.a,key:g,value:h},k.list.push(k.s),this.a.A.next=k.s,this.a.A=k.s,this.size++);return this};e.prototype.delete=function(g){g=d(this,g);return g.s&&g.list?(g.list.splice(g.index,1),g.list.length||delete this.b[g.id],g.s.A.next=g.s.next,g.s.next.A=g.s.A,g.s.head=null,\nthis.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.A=b();this.size=0};e.prototype.has=function(g){return!!d(this,g).s};e.prototype.get=function(g){return(g=d(this,g).s)&&g.value};e.prototype.entries=function(){return c(this,function(g){return[g.key,g.value]})};e.prototype.keys=function(){return c(this,function(g){return g.key})};e.prototype.values=function(){return c(this,function(g){return g.value})};e.prototype.forEach=function(g,h){for(var k=this.entries(),m;!(m=k.next()).done;)m=\nm.value,g.call(h,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var l=0;return e});x('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)y(b,d)&&c.push(b[d]);return c}});\nx('Set',function(a){function b(c){this.a=new Map;if(c){c=p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.size}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(p([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||\nf.value[1]!=f.value[0]?!1:e.next().done}catch(l){return!1}}())return a;z();b.prototype.add=function(c){c=0===c?0:c;this.a.set(c,c);this.size=this.a.size;return this};b.prototype.delete=function(c){c=this.a.delete(c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.values()};b.prototype.keys=b.prototype.values;\nb.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.a.forEach(function(f){return c.call(d,f,f,e)})};return b});x('Object.is',function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});x('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});\nx('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)y(b,d)&&c.push([d,b[d]]);return c}});\nvar A={qa:'loaded',xa:'start',ka:'firstQuartile',sa:'midpoint',ya:'thirdQuartile',ia:'complete',ta:'pause',va:'resume',ha:'bufferStart',ga:'bufferFinish',wa:'skipped',Aa:'volumeChange',ua:'playerStateChange',da:'adUserInteraction'},oa={na:'generic',za:'video',ra:'media'},pa={R:'native',oa:'html',P:'javascript'},qa={R:'native',P:'javascript',NONE:'none'},sa={ma:'full',ja:'domain',pa:'limited'},ta={fa:'backgrounded',la:'foregrounded'},ua={ea:'app',Ba:'web'};function B(a,b){this.x=null!=a.x?a.x:a.left;this.y=null!=a.y?a.y:a.top;this.width=a.width;this.height=a.height;this.endX=this.x+this.width;this.endY=this.y+this.height;this.adSessionId=a.adSessionId||void 0;this.isFriendlyObstructionFor=a.isFriendlyObstructionFor||[];this.b=a.friendlyObstructionClass||void 0;this.c=a.friendlyObstructionPurpose||void 0;this.f=a.friendlyObstructionReason||void 0;this.clipsToBounds=void 0!==a.clipsToBounds?!0===a.clipsToBounds:!0;this.g=void 0!==a.hasWindowFocus?!0===\na.hasWindowFocus:!0;this.notVisibleReason=a.notVisibleReason||void 0;this.childViews=a.childViews||[];this.isCreative=a.isCreative||!1;this.a=b}function va(a){var b={};return b.width=a.width,b.height=a.height,b}function C(a){var b={};return Object.assign({},va(a),(b.x=a.x,b.y=a.y,b))}function wa(a){var b=C(a),c={};return Object.assign({},b,(c.endX=a.endX,c.endY=a.endY,c))}function xa(a,b,c){a.x+=b;a.y+=c;a.endX+=b;a.endY+=c}\nB.prototype.J=function(a){if(null==a)return!1;a=C(a);var b=a.y,c=a.width,d=a.height;return this.x===a.x&&this.y===b&&this.width===c&&this.height===d};function ya(a){return a.width*a.height}function za(a){return 0===a.width||0===a.height};function Aa(a,b){var c=0;if(0<b.length){var d=Ba(a,b);a=d.ba;d=d.ca;for(var e=0;e<a.length-1;e++)for(var f=(a[e]+(a[e]+1))/2,l=a[e+1]-a[e],g=0;g<d.length-1;g++){for(var h=(d[g]+(d[g]+1))/2,k=d[g+1]-d[g],m=!1,u=0;u<b.length;u++){var w=C(b[u]);if(w.x<f&&w.x+w.width>f&&w.y<h&&w.y+w.height>h){m=!0;break}}m&&(c+=Math.round(l)*Math.round(k))}}return c}\nfunction Ba(a,b){a=C(a);for(var c=[],d=[],e=0;e<b.length;e++){var f=C(b[e]);f=Ca(a,f);Da(c,f.x);Da(c,f.endX);Da(d,f.y);Da(d,f.endY)}c=c.sort(function(l,g){return l-g});d=d.sort(function(l,g){return l-g});return{ba:c,ca:d}}function Ca(a,b){return{x:Math.max(a.x,b.x),y:Math.max(a.y,b.y),endX:Math.min(a.x+a.width,b.x+b.width),endY:Math.min(a.y+a.height,b.y+b.height)}}function Da(a,b){-1===a.indexOf(b)&&a.push(b)};function Ea(){this.b=this.a=this.v=this.l=this.g=this.j=void 0;this.m=0;this.h=[];this.o=[];this.u=0;this.i=[];this.c=[];this.f=[]}Ea.prototype.J=function(a){return null==a?!1:JSON.stringify(Fa(this))===JSON.stringify(Fa(a))};\nfunction Fa(a){var b=[],c=[],d={viewport:a.j,adView:{percentageInView:a.m,pixelsInView:a.u,reasons:a.f},declaredFriendlyObstructions:a.h.length};if(void 0!==a.a){d.adView.geometry=C(a.a);d.adView.geometry.pixels=ya(a.a);d.adView.onScreenGeometry=C(a.b);d.adView.onScreenGeometry.pixels=Math.max(0,ya(a.b)-Aa(a.b,a.c));for(var e=0;e<a.c.length;e++)b.push(C(a.c[e]));for(e=0;e<a.o.length;e++){var f=a.o[e],l=f,g={};l.b&&(g.obstructionClass=l.b);l.c&&(g.obstructionPurpose=l.c);l.f&&(g.obstructionReason=\nl.f);f=Ca(a.a,f);c.push(Object.assign({},{x:f.x,y:f.y,width:f.endX-f.x,height:f.endY-f.y},g))}d.adView.onScreenGeometry.obstructions=b;d.adView.onScreenGeometry.friendlyObstructions=c;void 0!==a.l&&void 0!==a.v&&(d.adView.containerGeometry=C(a.l),d.adView.onScreenContainerGeometry=C(a.v),d.adView.measuringElement=!0)}return d}function Ga(a,b){b=va(b);a.j={};a.j.width=b.width;a.j.height=b.height;a.g={};a.g.x=0;a.g.y=0;a.g.width=b.width;a.g.height=b.height;a.g.endX=b.width;a.g.endY=b.height}\nfunction Ha(){return{x:0,y:0,endX:0,endY:0,width:0,height:0}}function Ia(a,b){var c={};c.x=Math.max(a.x,b.x);c.y=Math.max(a.y,b.y);c.endX=Math.min(a.endX,b.endX);c.endY=Math.min(a.endY,b.endY);c.width=Math.max(0,c.endX-c.x);c.height=Math.max(0,c.endY-c.y);return c}function Ja(a,b){return.01<b.width-a.width||.01<b.height-a.height}function Ka(a){if(-1!==a.f.indexOf('backgrounded'))a.m=0,a.u=0;else{var b=ya(a.a);if(0!==b){var c=Math.max(0,ya(a.b)-Aa(a.b,a.c));a.m=Math.round(c/b*100);a.u=c}}}\nfunction La(a,b){if(za(b)||!a.b)b=!1;else{var c=wa(a.b),d=c.y,e=c.endX;a=c.endY;var f=b.endX;c=c.x;(f=f<c||.01>Math.abs(f-c))||(f=b.x,f=f>e||.01>Math.abs(f-e));(e=f)||(e=b.endY,e=e<d||.01>Math.abs(e-d));(d=e)||(b=b.y,d=b>a||.01>Math.abs(b-a));b=!d}return b}function D(a,b){for(var c=!1,d=0;d<a.f.length;d++)a.f[d]===b&&(c=!0);c||a.f.push(b)};function Ma(a,b,c,d,e){var f=new Ea;b=new B(b,!1);Ga(f,b);Na(a,b,f,d);if(!e)return f.f=['unmeasurable'],f.j=void 0,f.m=0,f.c=[],f.a&&(a=f.a,c={},a=new B((c.x=0,c.y=0,c.width=a.width,c.height=a.height,c),a.a),f.a=a),f.b=Ha(),f;if('backgrounded'===c)D(f,'backgrounded');else if(void 0!==f.a){for(a=0;a<f.h.length;a++)La(f,f.h[a])&&f.o.push(f.h[a]);for(a=0;a<f.i.length;a++){if(c=La(f,f.i[a])){a:{c=f.i[a];for(d=0;d<f.c.length;d++)if(f.c[d].J(c)){c=!0;break a}c=!1}c=!c}c&&(D(f,'obstructed'),f.c.push(f.i[a]))}Ka(f)}else D(f,\n'notFound');return f}\nfunction Na(a,b,c,d){var e=b.isCreative?!0:b.adSessionId===d;if(e){c.a=b;var f=wa(c.a);a=Ia(c.g,f);var l=c.a;'notAttached'===l.notVisibleReason||'noWindowFocus'===l.notVisibleReason||'noAdView'===l.notVisibleReason?(D(c,'notFound'),c.b=new B(Ha(),!1)):(l=c.a,'viewInvisible'===l.notVisibleReason||'viewGone'===l.notVisibleReason||'viewNotVisible'===l.notVisibleReason||'viewAlphaZero'===l.notVisibleReason||'viewHidden'===l.notVisibleReason||void 0!==c.a.notVisibleReason||za(c.a)?(D(c,'hidden'),c.b=new B(Ha(),\n!1)):(c.a.g||(D(c,'backgrounded'),D(c,'noWindowFocus')),Ja(a,f)&&D(c,'clipped'),c.b=new B(a,!1)))}else if(f=!0,b.a&&(f=-1!==b.isFriendlyObstructionFor.indexOf(d)?!1:!1===b.clipsToBounds),f){l=b.childViews;for(var g=0;g<l.length;g++)f=void 0!==c.a,Na(a,new B(l[g],f),c,d)}e||void 0===c.a||(b.a?-1!==b.isFriendlyObstructionFor.indexOf(d)?c.h.push(b):c.i.push(b):(e=wa(b),d=wa(c.b),C(c.b),!za(c.b)&&b.clipsToBounds&&(b=Ia(d,e),Ja(b,d)&&(D(c,'clipped'),c.b=new B(b,!1)))))};function Oa(a,b){this.y=this.x=0;this.width=a;this.height=b};function Pa(){return{apiVersion:'1.0',accessMode:'limited',environment:'app',omidJsInfo:{omidImplementer:'omsdk',serviceVersion:'1.3.37-iab3566'}}}function Qa(){this.adSessionId=null;this.c=Pa();this.o=null;this.m='foregrounded';this.l=this.i='none';this.j=this.g=this.f=this.h=this.a=this.b=this.B=this.u=null;this.C=!0;this.v=new Map}var G;function H(){G||(G=new Qa);return G};var I=function(){if('undefined'!==typeof omidGlobal&&omidGlobal)return omidGlobal;if('undefined'!==typeof global&&global)return global;if('undefined'!==typeof window&&window)return window;if('undefined'!==typeof globalThis&&globalThis)return globalThis;var a=Function('return this')();if(a)return a;throw Error('Could not determine global object context.');}();function Ra(a,b){this.a=a;this.b=b}t.Object.defineProperties(Ra.prototype,{event:{configurable:!0,enumerable:!0,get:function(){return this.a}},origin:{configurable:!0,enumerable:!0,get:function(){return this.b}}});function J(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];Sa(function(){throw new (Function.prototype.bind.apply(Error,[null,'Could not complete the test successfully - '].concat(q(b))));},function(){return console.error.apply(console,q(b))})}function Ta(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];Sa(function(){},function(){return console.error.apply(console,q(b))})}\nfunction Sa(a,b){'undefined'!==typeof jasmine&&jasmine?a():'undefined'!==typeof console&&console&&console.error&&b()};function Ua(){this.f=[];this.b=[];this.c=[];this.g=[];this.i={};this.a=H()}function Va(a){a.f=[];a.b=[];a.c=[];a.g=[];a.i={};G.adSessionId=null;G.c=Pa();G.o=null;G.G=void 0;G.K=void 0;G.H=null;G.I=null;G.D=null;G.m='foregrounded';G.i='none';G.l='none';G.u=null;G.B=null;G.b=null;G.a=null;G.h=null;G.f=null;G.g=null;G.j=null;G.C=!0;G.v=new Map}\nfunction Wa(a,b){void 0!==a.a&&a.a.adSessionId&&!1!==Xa(a,b)&&a.c.filter(function(c){return c.type===b.event.type}).forEach(function(c){return a.h(c.F,b.event)})}function Ya(a,b){a.f.push(b);Wa(a,b)}function Za(a,b,c){void 0!==a.a&&a.a.adSessionId&&a.f.filter(function(d){return d.event.type===b&&Xa(a,d)}).map(function(d){return d.event}).forEach(c)}\nfunction Xa(a,b){var c=b.event.type,d=-1!==Object.values(A).indexOf(c)&&'volumeChange'!==c;return'impression'===c||'loaded'===c&&a.a.a?b.origin===H().l:d?b.origin===H().i:!0}function $a(a,b,c){'media'===b||'video'===b?ab(a,c):(a.c.push({type:b,F:c}),Za(a,b,c))}function ab(a,b){Object.keys(A).forEach(function(c){c=A[c];a.c.push({type:c,F:b});Za(a,c,b)})}function bb(a,b,c,d){var e={O:c,L:d,F:b};a.g.push(e);a.b.forEach(function(f){var l=cb(f);'sessionStart'===f.event.type&&db(a,l,e);a.h(b,l)})}\nfunction eb(a,b,c){var d=K(a,'sessionError','native',{errorType:b,message:c});a.b.push(d);a.g.forEach(function(e){a.h(e.F,d.event)})}function fb(a,b){a.i=Object.assign(a.i,b);b=a.a.c;if(void 0!==b){b=Object.assign({},gb(a,hb(a,{context:b}),!0),{supportsLoadedEvent:!!a.a.a||'video'==a.a.b});Object.assign(b,{pageUrl:null,contentUrl:a.a.o});var c=K(a,'sessionStart','native',b);a.b.push(c);a.g.forEach(function(d){var e=d.F,f=cb(c);db(a,f,d);a.h(e,f)},a);ib(a)}}\nfunction db(a,b,c){c.O&&(b.data.verificationParameters=a.i[c.O]);c.L&&(c=a.a.v.get(c.L))&&(b.data.verificationParameters=c.verificationParameters,b.data.context.accessMode=c.accessMode,'full'===c.accessMode&&(a.a.g&&(b.data.context.videoElement=a.a.g),a.a.f&&(b.data.context.slotElement=a.a.f)))}function jb(a){var b=a.g,c=K(a,'sessionFinish','native');a.b.push(c);var d=a.a.c;d&&'native'==d.adSessionType||Va(a);b.forEach(function(e){return a.h(e.F,c.event)})}\nUa.prototype.h=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];try{a.apply(null,q(c))}catch(e){Ta(e)}};function kb(a,b){var c=(c=H().D)?Fa(c):void 0;c=gb(a,hb(a,c));Ya(a,K(a,'impression',b,c))}function lb(a,b,c){if(a.a.a||'display'!=a.a.b)b=K(a,'loaded',b,gb(a,hb(a,void 0===c?null:c))),Ya(a,b)}\nfunction mb(a,b,c,d){'start'!==b&&'volumeChange'!==b||null!=(d&&d.deviceVolume)||(d.deviceVolume=a.a.u);if(d&&('start'===b||'volumeChange'===b)){var e=d.videoPlayerVolume,f=d.mediaPlayerVolume;null!=e?(Object.assign(d,{mediaPlayerVolume:e}),a.a.B=e):null!=f&&(Object.assign(d,{videoPlayerVolume:f}),a.a.B=f)}Ya(a,K(a,b,c,d))}\nfunction ib(a){var b=a.f.filter(function(f){return Object.values(A).includes(f.event.type)&&'video'==a.a.b&&f.origin===a.a.i||'loaded'==f.event.type&&'display'==a.a.b&&f.origin===a.a.l?!0:!1}).map(function(f){return f.event}),c=a.a.adSessionId||'',d={};b=p(b);for(var e=b.next();!e.done;d={w:d.w},e=b.next()){d.w=e.value;d.w.adSessionId||(d.w.adSessionId=c);if('loaded'==d.w.type){if(!a.a.a&&'display'==a.a.b)continue;d.w.data=gb(a,hb(a,d.w.data))}a.c.filter(function(f){return function(l){return l.type===\nf.w.type}}(d)).forEach(function(f){return function(l){return l.F(f.w)}}(d))}}function nb(a,b,c){a:{c=new Set(c);a=p(a.f.concat(a.b));for(var d=a.next();!d.done;d=a.next())if(d=d.value,c.has(d.event.type)&&d.origin!=b){b=!0;break a}b=!1}return b?(J('Event owner cannot be registered after its events have already been published.'),!1):!0}function ob(a,b){nb(a,b,Object.values(A))&&L(a,b)&&(a.a.i=b)}function pb(a,b){nb(a,b,['impression'])&&qb(a,b)&&(a.a.l=b)}\nfunction qb(a,b){var c=a.a.l;return'none'!=c&&c!=b?(J('Impression event is owned by '+(a.a.l+', not ')+(b+'.')),!1):!0}function L(a,b){var c=a.a.i;return'none'!=c&&c!=b?(J('Media events are owned by '+(a.a.i+', not '+b+'.')),!1):!0}function gb(a,b,c){c=void 0===c?!1:c;b=Object.assign({},b);a.a.b&&Object.assign(b,{mediaType:a.a.b});a.a.a&&(c||'definedByJavaScript'!==a.a.a)&&Object.assign(b,{creativeType:a.a.a});return b}function hb(a,b){return a.a.h?Object.assign({},b,{impressionType:a.a.h}):b}\nfunction K(a,b,c,d){return new Ra({adSessionId:a.a.adSessionId||'',timestamp:(new Date).getTime(),type:b,data:d},c)}function cb(a){a=a.event;return{adSessionId:a.adSessionId,timestamp:a.timestamp,type:a.type,data:a.data}};function rb(a,b,c){'container'===b&&void 0!==a.a.G&&void 0!==a.a&&null!=a.a.adSessionId&&(a.a.H=Ma(a.c,a.a.G,a.a.m,a.a.adSessionId,!0));b=a.a;var d=b.H,e=b.I;if(d)if(e){b=new Ea;var f=d.j,l=d.a,g=d.b,h=e.a,k=e.b;f&&l&&g&&h&&k&&(Ga(b,f),b.l=new B(l,!1),b.v=new B(g,!1),b.i=Object.assign([],d.i),b.c=Object.assign([],d.c),b.h=Object.assign([],d.h),b.o=Object.assign([],d.o),b.f=Object.assign([],e.f,d.f),d=b.l.x,e=b.l.y,h=new B(h,!1),k=new B(k,!1),xa(h,d,e),xa(k,d,e),b.a=h,b.b=Ia(k,g),Ka(b))}else b=d;else b=\nnull;g=a.a.D;if(b&&!b.J(g)||c)g=Fa(b),c&&(g.adView.reasons=g.adView.reasons||[c]),c=a.b,'audio'!=c.a.a&&Ya(c,K(c,'geometryChange','native',g)),a.a.D=b};function M(a){return'object'===typeof a}function sb(a){return'number'===typeof a&&!isNaN(a)&&0<=a}function N(a){return'string'===typeof a}function O(a,b){return N(a)&&-1!==Object.values(b).indexOf(a)}function tb(a){return!(!a||!a.tagName||'iframe'!==a.tagName.toLowerCase())};function P(a,b,c){this.f=a;this.K=b;this.G=c;this.c=H();this.b=null;this.a=this.g=this.u=void 0;this.I=!0;this.B=void 0;Q(this)}function Q(a){if(!a.b){var b;a:{if((b=a.f.document)&&b.getElementsByClassName&&(b=b.getElementsByClassName('omid-element'))){if(1==b.length){b=b[0];break a}1<b.length&&a.I&&(eb(a.G,'generic',\"More than one element with 'omid-element' class name.\"),a.I=!1)}b=null}if(b&&b.tagName&&'video'===b.tagName.toLowerCase())a.c.g=b;else if(b&&b.tagName)a.c.f=b;else return;ub(a)}}\nfunction ub(a){a.c.g?(a.b=a.c.g,a.i()):a.c.f&&(a.b=a.c.f,tb(a.b)?a.c.j&&a.i():a.i())}function vb(a){a.a&&(tb(a.b)?a.c.j&&(a.D(),wb(a)):(a.D(),wb(a)))}P.prototype.m=function(){this.B&&(this.f.document.removeEventListener('visibilitychange',this.B),this.B=void 0)};P.prototype.i=function(){};function wb(a){a.u&&(a.c.I=a.u,rb(a.K,'creative'))}function xb(a){if(a.a&&a.c.j){var b=new B(a.c.j,!1);xa(b,a.a.x,a.a.y);b.clipsToBounds=!0;return b}};function yb(a,b,c){return zb(a,'setInterval')(b,c)}function Ab(a,b){zb(a,'clearInterval')(b)}function Bb(a,b){zb(a,'clearTimeout')(b)}function zb(a,b){return a.a&&a.a[b]?a.a[b]:Cb(a,b)}\nfunction Db(a,b,c,d){if(a.a.document&&a.a.document.body){var e=a.a.document.createElement('img');e.width=1;e.height=1;e.style.display='none';e.src=b;c&&e.addEventListener('load',function(){return c()});d&&e.addEventListener('error',function(){return d()});a.a.document.body.appendChild(e)}else Cb(a,'sendUrl')(b,c,d)}function Cb(a,b){if(a.a&&a.a.omidNative&&a.a.omidNative[b])return a.a.omidNative[b].bind(a.a.omidNative);throw Error('Native interface method \"'+b+'\" not found.');};function R(a,b,c,d,e){P.call(this,a,c,e);this.l=b;this.h=void 0;this.j=d}r(R,P);R.prototype.m=function(){void 0!==this.h&&(Ab(this.j,this.h),this.h=void 0);P.prototype.m.call(this)};R.prototype.i=function(){var a=this;P.prototype.i.call(this);null==this.b?this.h=void 0:void 0===this.h&&(this.h=yb(this.j,function(){return Eb(a)},200),Eb(this))};\nR.prototype.D=function(){if(this.g){var a=xb(this);if(a){this.a.isCreative=!1;a.isCreative=!0;for(var b=!1,c=0;c<this.a.childViews.length;c++)if(this.a.childViews[c].isCreative){this.a.childViews[c]=a;b=!0;break}b||this.a.childViews.push(a)}else this.a.isCreative=!0;this.u=Ma(this.l,this.g,this.c.m,this.c.adSessionId,this.C())}};R.prototype.C=function(){return!0};\nfunction Eb(a){if(void 0!==a.h){b:{try{var b=a.f.top;var c=0<=b.innerHeight&&0<=b.innerWidth;break b}catch(d){}c=!1}c?(c=a.f.top,c=new B(new Oa(c.innerWidth,c.innerHeight),!1)):c=new B(new Oa(0,0),!1);b=a.b.getBoundingClientRect();if(null==b.x||isNaN(b.x))b.x=b.left;if(null==b.y||isNaN(b.y))b.y=b.top;b=new B(b,!1);c.J(a.g)&&b.J(a.a)||(a.a=b,a.a.clipsToBounds=!0,a.g=c,a.g.childViews.push(a.a),vb(a))}};function S(a,b,c,d){P.call(this,a,c,d);this.o=this.j=this.l=this.h=void 0;this.H=!1;this.v=void 0}r(S,P);S.prototype.m=function(){this.h&&this.h.disconnect();Fb(this);P.prototype.m.call(this)};S.prototype.i=function(){P.prototype.i.call(this);this.b&&(this.h||(this.h=Gb(this)),Hb(this),Ib(this.b)&&Jb(this))};\nS.prototype.D=function(){if(this.a&&this.v){var a=xb(this);if(a){var b=a;var c=this.v;var d=Math.max(a.x,c.x);var e=Math.max(a.y,c.y),f=Math.min(a.endX,c.endX);a=Math.min(a.endY,c.endY);f<=d||a<=e?d=null:(c={},d=new B((c.x=d,c.y=e,c.width=Math.abs(f-d),c.height=Math.abs(a-e),c),!1));d||(d=new B({x:0,y:0,width:0,height:0},!1))}else b=this.a,d=this.v;e=new Ea;this.g&&Ga(e,this.g);e.a=b;e.b=d;Ka(e);this.H?za(e.a)?D(e,'hidden'):100===e.m||D(e,'clipped'):D(e,'viewport');this.u=e}};S.prototype.C=function(){return!0};\nfunction Fb(a){a.l&&(a.l.disconnect(),a.l=void 0);a.j&&(a.j.disconnect(),a.j=void 0);a.o&&((0,a.f.removeEventListener)('resize',a.o),a.o=void 0)}function Hb(a){a.h&&a.b&&(a.h.unobserve(a.b),a.h.observe(a.b))}function Ib(a){a=a.getBoundingClientRect();return 0==a.width||0==a.height}\nfunction Gb(a){return new a.f.IntersectionObserver(function(b){try{if(b.length){for(var c,d=b[0],e=1;e<b.length;e++)b[e].time>d.time&&(d=b[e]);c=d;a.g=Kb(c.rootBounds);a.a=Kb(c.boundingClientRect);a.v=Kb(c.intersectionRect);a.H=!!c.isIntersecting;vb(a)}}catch(f){a.m(),eb(a.G,'generic','Problem handling IntersectionObserver callback: '+f.message)}},{root:null,rootMargin:'0px',threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]})}\nfunction Jb(a){a.f.ResizeObserver?a.l||(a.l=Lb(a,function(){return Mb(a)}),a.l.observe(a.b)):(a.o||(a.o=function(){return Mb(a)},(0,a.f.addEventListener)('resize',a.o)),a.j||(a.j=new MutationObserver(function(){return Mb(a)}),a.j.observe(a.b,{childList:!1,attributes:!0,subtree:!1})))}function Mb(a){a.b&&!Ib(a.b)&&(Hb(a),Fb(a))}function Lb(a,b){return new a.f.ResizeObserver(b)}function Kb(a){if(a&&null!==a.x&&null!==a.y&&null!==a.width&&null!==a.height)return new B(a,!1)};function Nb(a){return a&&M(a)?Object.entries(a).reduce(function(b,c){var d=p(c);c=d.next().value;d=d.next().value;return b&&N(c)&&null!=d&&M(d)&&N(d.resourceUrl)},!0):!1};function T(a,b,c,d){this.b=a;this.method=b;this.version=c;this.a=d}function Pb(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&'string'===typeof a.omid_message_guid&&'string'===typeof a.omid_message_method&&'string'===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)}function Qb(a){return new T(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)}\nfunction Rb(a){var b={};b=(b.omid_message_guid=a.b,b.omid_message_method=a.method,b.omid_message_version=a.version,b);void 0!==a.a&&(b.omid_message_args=a.a);return b};function Sb(a){this.c=a};function U(a){this.c=a;this.handleExportedMessage=U.prototype.f.bind(this)}r(U,Sb);U.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.handleExportedMessage(Rb(a),this)};U.prototype.f=function(a,b){Pb(a)&&this.a&&this.a(Qb(a),b)};function Tb(a){return Ub(a,'SessionService.')}function Ub(a,b){return(a=a.match(new RegExp('^'+b+'(.*)')))&&a[1]};function Vb(a,b){this.c=b=void 0===b?I:b;var c=this;a.addEventListener('message',function(d){if('object'===typeof d.data){var e=d.data;Pb(e)&&d.source&&c.a&&c.a(Qb(e),d.source)}})}r(Vb,Sb);Vb.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.postMessage(Rb(a),'*')};function Wb(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=16*Math.random()|0;return'y'===a?(b&3|8).toString(16):b.toString(16)})};function Xb(a){if(!a.a||!a.a.document)throw Error('OMID Service Script is not running within a window.');var b=a.b;a.b=[];b.forEach(function(c){try{var d=a.c.C?'limited':'full',e=O(c.accessMode,sa)?c.accessMode:null;var f=e?'full'==e&&'limited'==d?d:'domain'==e?'limited':e:d;c.accessMode=f;a:{var l=c.resourceUrl,g=a.a.location.origin;try{var h=new URL(l,g);break a}catch(V){}try{h=new URL(l);break a}catch(V){}h=null}if(d=h){var k=Wb(),m=a.a.document,u=m.createElement('iframe');u.id='omid-verification-script-frame-'+\nk;u.style.display='none';['full','limited'].includes(f)?u.srcdoc=\"<html><head>\\n<script type=\\\"text/javascript\\\">window['omidVerificationProperties'] = {\\n'serviceWindow': window.parent,\\n'injectionSource': 'app',\\n'injectionId': '\"+(k+'\\',\\n};\\x3c/script>\\n<script type=\"text/javascript\" src=\"')+d.href+'\">\\x3c/script>\\n</head><body></body></html>':'domain'==f&&(u.src=Yb(a,k,d).href);['domain','limited'].includes(f)&&(u.sandbox='allow-scripts');m.body.appendChild(u);var w=c.vendorKey,E=c.verificationParameters;\nw=void 0===w?'':w;E=void 0===E?'':E;w&&'string'===typeof w&&''!==w&&E&&'string'===typeof E&&''!==E&&(a.f.i[w]=E);a.c.v.set(k,c)}}catch(V){Ta('OMID verification script '+c.resourceUrl+' failed to load: '+V)}})}\nfunction Yb(a,b,c){var d='/.well-known/omid/omloader-v1.html#';(new Map([['verificationScriptUrl',c.href],['injectionId',b]])).forEach(function(e,f){d+=encodeURIComponent(f)+'='+encodeURIComponent(e)+'&'});b=null;try{b=new URL(d,a.a.parent.location.origin)}catch(e){throw Error('OMID Service Script cannot access the parent window.');}return b};function Zb(){var a=$b,b=ac,c=this;this.c=X;this.b=a;this.a=H();this.g=b;this.f=!1;this.registerSessionObserver(function(d){return bc(c,d)})}n=Zb.prototype;n.registerSessionObserver=function(a){bb(this.c,a)};n.setSlotElement=function(a){a&&a.tagName?(this.a.f=a,this.b&&ub(this.b)):J('setSlotElement called with a non-HTMLElement. It will be ignored.')};n.setElementBounds=function(a){this.a.j=a;this.b&&ub(this.b);this.b&&vb(this.b)};n.error=function(a,b){eb(this.c,a,b)};\nn.registerAdEvents=function(){pb(this.c,'javascript')};n.registerMediaEvents=function(){ob(this.c,'javascript')};function Y(a,b,c){'impression'==b?qb(a.c,'javascript')&&(kb(a.c,'javascript'),a.b&&Q(a.b)):('loaded'==b?(c=void 0===c?null:c,L(a.c,'javascript')&&lb(a.c,'javascript',c)):L(a.c,'javascript')&&mb(a.c,b,'javascript',c),['loaded','start'].includes(b)&&a.b&&Q(a.b))}n.injectVerificationScriptResources=function(a){var b=this.g;b.b.push.apply(b.b,q(a));if(this.f)try{Xb(this.g)}catch(c){J(c.message)}};\nn.setCreativeType=function(a,b){b=void 0===b?null:b;if(!this.a.b||this.a.a)this.a.a=a,'video'==a||'audio'==a?this.a.b='video':'htmlDisplay'==a||'nativeDisplay'==a?this.a.b='display':'definedByJavaScript'==a&&b&&(this.a.b='none'==b?'display':'video')};n.setImpressionType=function(a){if(!this.a.b||this.a.a)this.a.h=a};\nfunction bc(a,b){if('sessionStart'===b.type){a.f=!0;try{Xb(a.g)}catch(c){J(c.message)}}'sessionFinish'===b.type&&(a.f=!1,(b=H().c)&&'native'==b.adSessionType||a.registerSessionObserver(function(c){return bc(a,c)}))}n.setClientInfo=function(a,b,c){var d=this.a.c||{};d.omidJsInfo=Object.assign({},d.omidJsInfo,{sessionClientVersion:a,partnerName:b,partnerVersion:c});this.a.c=d;return this.a.c.omidJsInfo.serviceVersion};function cc(a){return/\\d+\\.\\d+\\.\\d+(-.*)?/.test(a)}function dc(a){a=a.split('-')[0].split('.');for(var b=['1','0','3'],c=0;3>c;c++){var d=parseInt(a[c],10),e=parseInt(b[c],10);if(d>e)break;else if(d<e)return!1}return!0};function ec(a,b){return cc(a)&&dc(a)?b?b:[]:b&&'string'===typeof b?JSON.parse(b):[]};var fc=new function(){};function gc(){var a=hc;var b=void 0===b?omidGlobal:b;this.a=a;this.g=b;this.b=new U;this.g.omid=this.g.omid||{};this.g.omid.v1_SessionServiceCommunication=this.b;this.f=b&&b.addEventListener&&b.postMessage?new Vb(b):null;this.c=null;this.b.a=this.h.bind(this);this.f&&(this.f.a=this.i.bind(this))}gc.prototype.h=function(a,b){null!=Tb(a.method)&&ic(this,fc)&&jc(this,a,b,this.b)};gc.prototype.i=function(a,b){null!=Tb(a.method)&&ic(this,b)&&jc(this,a,b,this.f)};\nfunction ic(a,b){a.c||(a.c=b);return a.c!=b?(J('The source of session client messages cannot be changed from the source of the first message.'),!1):!0}\nfunction jc(a,b,c,d){function e(h){for(var k=[],m=0;m<arguments.length;++m)k[m]=arguments[m];k=new T(f,'response',g,cc(g)&&dc(g)?k:JSON.stringify(k));d.b(k,c)}var f=b.b,l=b.method,g=b.version;b=ec(g,b.a);try{kc(a,l,e,b)}catch(h){d.b(new T(f,'error',g,'\\n name: '+h.name+'\\n message: '+h.message+'\\n filename: '+h.filename+'\\n lineNumber: '+h.lineNumber+'\\n columnNumber: '+h.columnNumber+'\\n stack: '+h.stack+'\\n toString(): '+h.toString()),c)}}\nfunction kc(a,b,c,d){if(null!=Tb(b))switch(Tb(b)){case 'registerAdEvents':a.a.registerAdEvents();break;case 'registerMediaEvents':a.a.registerMediaEvents();break;case 'registerSessionObserver':a.a.registerSessionObserver(c);break;case 'setSlotElement':c=p(d).next().value;a.a.setSlotElement(c);break;case 'setVideoElement':c=p(d).next().value;a=a.a;c&&c.tagName&&'video'===c.tagName.toLowerCase()?(a.a.g=c,a.b&&ub(a.b)):J('setVideoElement called with a non-HTMLVideoElement. It will be ignored.');break;\ncase 'setElementBounds':c=p(d).next().value;a.a.setElementBounds(c);break;case 'startSession':J('Session start from JS is not supported in mobile app.');break;case 'finishSession':J('Session finish from JS is not supported in mobile app.');break;case 'impressionOccurred':Y(a.a,'impression');break;case 'loaded':(c=p(d).next().value)?(b={skippable:c.isSkippable,autoPlay:c.isAutoPlay,position:c.position},c.isSkippable&&(b.skipOffset=c.skipOffset),Y(a.a,'loaded',b)):Y(a.a,'loaded');break;case 'start':b=\np(d);c=b.next().value;b=b.next().value;Y(a.a,'start',{duration:c,mediaPlayerVolume:b});break;case 'firstQuartile':Y(a.a,'firstQuartile');break;case 'midpoint':Y(a.a,'midpoint');break;case 'thirdQuartile':Y(a.a,'thirdQuartile');break;case 'complete':Y(a.a,'complete');break;case 'pause':Y(a.a,'pause');break;case 'resume':Y(a.a,'resume');break;case 'bufferStart':Y(a.a,'bufferStart');break;case 'bufferFinish':Y(a.a,'bufferFinish');break;case 'skipped':Y(a.a,'skipped');break;case 'volumeChange':c={mediaPlayerVolume:p(d).next().value};\nY(a.a,'volumeChange',c);break;case 'playerStateChange':c={state:p(d).next().value};Y(a.a,'playerStateChange',c);break;case 'adUserInteraction':c={interactionType:p(d).next().value};Y(a.a,'adUserInteraction',c);break;case 'setClientInfo':var e=p(d);b=e.next().value;d=e.next().value;e=e.next().value;a=a.a.setClientInfo(b,d,e);c(a);break;case 'injectVerificationScriptResources':c=p(d).next().value;a.a.injectVerificationScriptResources(c);break;case 'setCreativeType':c=p(d).next().value;a.a.setCreativeType(c);\nbreak;case 'setImpressionType':c=p(d).next().value;a.a.setImpressionType(c);break;case 'setContentUrl':c=p(d).next().value;a.a.a.o=c;break;case 'sessionError':b=p(d),c=b.next().value,b=b.next().value,a.a.error(c,b)}};function Z(){var a=X,b=lc,c=mc,d=$b;this.f=hc;this.a=a;this.c=b;this.h=c;this.g=d;this.b=H()}n=Z.prototype;\nn.T=function(a){if(!(!(a&&M(a)&&O(a.impressionOwner,qa))||'videoEventsOwner'in a&&null!=a.videoEventsOwner&&!O(a.videoEventsOwner,qa)||'mediaEventsOwner'in a&&null!=a.mediaEventsOwner&&!O(a.mediaEventsOwner,qa))){if(a.creativeType&&a.impressionType){var b=a.mediaEventsOwner;null==this.b.a&&this.f.setCreativeType(a.creativeType,b);null==this.b.h&&(this.b.h=a.impressionType);ob(this.a,b)}else b=a.videoEventsOwner,this.b.b=null==b||'none'===b?'display':'video',this.b.a=null,this.b.h=null,ob(this.a,b);\npb(this.a,a.impressionOwner);a&&null!=a.isolateVerificationScripts&&'boolean'===typeof a.isolateVerificationScripts&&(this.b.C=a.isolateVerificationScripts)}};\nn.W=function(a,b,c,d){var e;if(M(b)){if(e=O(b.environment,ua)&&O(b.adSessionType,pa))e=b.omidNativeInfo,e=M(e)?N(e.partnerName)&&N(e.partnerVersion):!1;e&&(e=b.app,e=M(e)?N(e.libraryVersion)&&N(e.appId):!1)}else e=!1;e&&(Nb(d)&&(this.b.v=new Map(Object.entries(d))),d=this.f,c=void 0===c?null:c,null==a&&(a=Wb()),b.canMeasureVisibility=d.b.C(),d.a.adSessionId=a,a=d.a,e=b,void 0!==e.contentUrl&&(a.o=e.contentUrl,e.contentUrl=void 0),e=a.c||{},b.omidJsInfo=Object.assign({},e.omidJsInfo||{},b.omidJsInfo||\n{}),e=b=Object.assign({},e,b),a.C||(null!=a.g?(e.videoElement=a.g,e.accessMode='full'):null!=a.f&&(e.slotElement=a.f,e.accessMode='full')),a.c=b,fb(d.c,c),d.b&&Q(d.b))};n.U=function(){var a=this.f;jb(a.c);a.b.m()};n.$=function(a){M(a)&&sb(a.x)&&sb(a.y)&&sb(a.width)&&sb(a.height)&&(this.b.G=a,rb(this.c,'container'))};n.aa=function(a){O(a,ta)&&(this.b.m=a,'backgrounded'===a?rb(this.c,'container','backgrounded'):rb(this.c,'container'))};n.X=function(a){'impression'===a&&(this.M(),this.g&&Q(this.g))};\nn.M=function(){qb(this.a,'native')&&kb(this.a,'native')};n.V=function(a){a=void 0===a?null:a;L(this.a,'native')&&lb(this.a,'native',a)};n.error=function(a,b){O(a,oa)&&eb(this.a,a,b)};n.Y=function(a,b){this.N(a,b)};n.N=function(a,b){L(this.a,'native')&&O(a,A)&&(void 0===b||M(b))&&('loaded'==a?lb(this.a,'native',b):mb(this.a,a,'native',b))};\nn.Z=function(a){if('none'!==this.a.a.i&&'number'===typeof a&&!isNaN(a)){this.b.u=a;a=this.h;var b=a.a.B;null!=b&&mb(a.b,'volumeChange','native',{mediaPlayerVolume:b,deviceVolume:a.a.u})}};Z.prototype.startSession=Z.prototype.W;Z.prototype.error=Z.prototype.error;Z.prototype.finishSession=Z.prototype.U;Z.prototype.publishAdEvent=Z.prototype.X;Z.prototype.publishImpressionEvent=Z.prototype.M;Z.prototype.publishVideoEvent=Z.prototype.Y;Z.prototype.publishMediaEvent=Z.prototype.N;\nZ.prototype.publishLoadedEvent=Z.prototype.V;Z.prototype.setNativeViewHierarchy=Z.prototype.$;Z.prototype.setState=Z.prototype.aa;Z.prototype.setDeviceVolume=Z.prototype.Z;Z.prototype.init=Z.prototype.T;function nc(){var a=X,b=oc;var c=void 0===c?I:c;this.g=a;this.a=b;this.h={};this.f={};this.c=new U;c.omid=c.omid||{};c.omid.v1_VerificationServiceCommunication=this.c;this.b=null;c&&c.addEventListener&&c.postMessage&&(this.b=new Vb(c));this.c.a=this.i.bind(this);this.b&&(this.b.a=this.j.bind(this))}function pc(a,b,c,d){Db(a.a,b,c,d)}function qc(a,b,c,d){Cb(a.a,'downloadJavaScriptResource')(b,c,d)}nc.prototype.j=function(a,b){this.b&&rc(this,a,b,this.b)};nc.prototype.i=function(a,b){rc(this,a,b,this.c)};\nfunction rc(a,b,c,d){function e(F){for(var W=[],ra=0;ra<arguments.length;++ra)W[ra]=arguments[ra];W=new T(f,'response',g,cc(g)&&dc(g)?W:JSON.stringify(W));d.b(W,c)}var f=b.b,l=b.method,g=b.version;b=ec(g,b.a);if(null!=Ub(l,'VerificationService.')){l=Ub(l,'VerificationService.');try{switch(l){case 'addEventListener':var h=p(b).next().value;$a(a.g,h,e);break;case 'addSessionListener':var k=p(b),m=k.next().value,u=k.next().value;bb(a.g,e,m,u);break;case 'sendUrl':var w=p(b).next().value;pc(a,w,function(){return e(!0)},\nfunction(){return e(!1)});break;case 'setTimeout':var E=p(b),V=E.next().value,wc=E.next().value;a.h[V]=zb(a.a,'setTimeout')(e,wc);break;case 'clearTimeout':var xc=p(b).next().value;Bb(a.a,a.h[xc]);break;case 'setInterval':var Ob=p(b),yc=Ob.next().value,zc=Ob.next().value;a.f[yc]=yb(a.a,e,zc);break;case 'clearInterval':var Ac=p(b).next().value;Ab(a.a,a.f[Ac]);break;case 'injectJavaScriptResource':var Bc=p(b).next().value;qc(a,Bc,function(F){return e(!0,F)},function(){return e(!1)});break;case 'getVersion':p(b).next();\nvar Cc=H().c.omidJsInfo;e(Cc.serviceVersion)}}catch(F){d.b(new T(f,'error',g,'\\n name: '+F.name+'\\n message: '+F.message+'\\n filename: '+F.filename+'\\n lineNumber: '+F.lineNumber+'\\n columnNumber: '+F.columnNumber+'\\n stack: '+F.stack+'\\n toString(): '+F.toString()+'\\n '),c)}}};function sc(){var a=I.document.createElement('iframe');a.id='omid_v1_present';a.name='omid_v1_present';a.style.display='none';I.document.body.appendChild(a)}function tc(){var a=new MutationObserver(function(b){b.forEach(function(c){'BODY'===c.addedNodes[0].nodeName&&(sc(),a.disconnect())})});a.observe(I.document.documentElement,{childList:!0})};var X=new Ua,oc=new function(){var a;this.a=a=void 0===a?omidGlobal:a};new nc;var uc=new function(){},vc=new function(){},lc=new function(){this.b=X;this.c=vc;this.a=H()},Dc;I?Dc=I.IntersectionObserver&&(I.MutationObserver||I.ResizeObserver)?new S(I,uc,lc,X):new R(I,vc,lc,oc,X):Dc=null;var $b=Dc,ac=new function(){var a=X;var b=void 0===b?I:b;this.f=a;this.a=b;this.c=H();this.b=[]},hc=new Zb,mc=new function(){var a=X,b=H();this.b=a;this.a=b};I.omidBridge=new Z;new gc;\nif(I.frames&&I.document&&!('omid_v1_present'in I.frames)){var Ec;if(Ec=null==I.document.body)Ec='MutationObserver'in I;Ec?tc():I.document.body?sc():I.document.write('<iframe style=\"display:none\" id=\"omid_v1_present\" name=\"omid_v1_present\"></iframe>')};\n}).call(this, this);";
try {
hashMap2.put("omidAdSession", new T8("native_display_ad", ImpressionType.VIEWABLE, AdSessionContext.createNativeAdSessionContext(c2363b92.b, str4, arrayList2, e11, str17), false));
fb.b.put("deferred", Boolean.TRUE);
A4 a48 = this.j;
if (a48 != null) {
((B4) a48).a(str14, "OMID video ad session created and JavaScript resources injected");
}
} catch (Exception e12) {
e = e12;
a4 = this.j;
if (a4 == null) {
}
Q4 q432 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, str2));
str11 = str14;
str10 = str3;
it = it2;
t = context;
z2 = z;
c2437h2 = c2437h;
}
}
str11 = str14;
it = it2;
str10 = str;
t = context;
} else {
str11 = str14;
it = it2;
str10 = str;
}
}
z2 = z;
}
c2437h2 = c2437h;
}
}
}
}
}
public final W6 a(C2473j7 c2473j7) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "isSkippableVideo ", this));
}
Iterator it = c2473j7.c().iterator();
while (it.hasNext()) {
W6 w6 = (W6) c2473j7.n((String) it.next()).get(0);
if (2 == w6.k) {
return w6;
}
}
return null;
}
public final void a(boolean z, S9 s9) {
Set<Fb> d;
AdConfig.ViewabilityConfig viewability;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).a("w0", AbstractC2452i0.a("w0", "TAG", "omidSessionForHtmlMarkup ", this));
}
AdConfig adConfig = this.b;
AdConfig.OmidConfig omidConfig = (adConfig == null || (viewability = adConfig.getViewability()) == null) ? null : viewability.getOmidConfig();
if (omidConfig == null || omidConfig.isOmidEnabled()) {
AbstractC2349a9.a.getClass();
if (Omid.isActive() && (d = d(this.g.indexOf(s9))) != null) {
for (Fb fb : d) {
if (3 == fb.a) {
try {
String str = (String) fb.a("creativeType", String.class);
String str2 = (String) fb.a("customReferenceData", String.class);
Boolean bool = (Boolean) fb.a("isolateVerificationScripts", Boolean.class);
Byte b = (Byte) fb.a("impressionType", Byte.class);
T8 a = (str == null || bool == null || b == null) ? null : W8.a(str, s9, bool.booleanValue(), this.t.e(), b.byteValue(), str2);
if (a != null) {
fb.b.put("omidAdSession", a);
fb.b.put("deferred", Boolean.valueOf(z));
A4 a42 = this.j;
if (a42 != null) {
((B4) a42).a("w0", "OMID ad session created and WebView container registered with OMID");
}
} else {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).a("w0", "Ignoring IAB meta data for this ad markup");
}
}
} catch (Exception e) {
A4 a44 = this.j;
if (a44 != null) {
((B4) a44).b("w0", Cc.a(e, A5.a("w0", "TAG", "Setting up impression tracking for IAB encountered an unexpected error: ")));
}
Q4 q4 = Q4.a;
Q4.c.a(AbstractC2654x4.a(e, SdkUiConstants.CP_EVENT));
}
}
}
}
}
}
public static final void a(AbstractC2637w0 abstractC2637w0, C2437h c2437h, String str) {
A4 a4 = abstractC2637w0.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "updateAdForBlob ", abstractC2637w0));
}
c2437h.e(str);
A4 a42 = abstractC2637w0.j;
if (a42 != null) {
((B4) a42).c("w0", AbstractC2452i0.a("w0", "TAG", "updateAd ", abstractC2637w0));
}
C2368c0 c2368c0 = abstractC2637w0.u;
if (c2368c0 != null) {
c2368c0.a(c2437h);
}
}
public void a(String str, String str2) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "saveBlob ", this));
}
C2610u c2610u = this.C;
int hashCode = hashCode();
C2624v0 c2624v0 = new C2624v0(this, str2, str);
c2610u.getClass();
C2610u.a(hashCode, c2624v0);
}
public void a(String str, String str2, G1 g1, String str3) {
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "getBlob ", this));
}
C2610u c2610u = this.C;
int hashCode = hashCode();
C2521n0 c2521n0 = new C2521n0(this, str3, g1, str, str2);
c2610u.getClass();
C2610u.a(hashCode, c2521n0);
}
public void a(C2437h c2437h, boolean z, short s) {
C2368c0 c2368c0;
A4 a4 = this.j;
if (a4 != null) {
((B4) a4).c("w0", AbstractC2452i0.a("w0", "TAG", "onVastProcessCompleted ", this));
}
C2437h m = m();
if (m == null || W()) {
m = null;
}
if (m == null) {
return;
}
A4 a42 = this.j;
if (a42 != null) {
StringBuilder a = A5.a("w0", "TAG", "Vast processing completed for ad with impressionId : ");
a.append(m.s());
((B4) a42).c("w0", a.toString());
}
String u = m.u();
int hashCode = u.hashCode();
if (hashCode != -1084172778) {
if (hashCode != 3213227) {
if (hashCode == 1236050372 && u.equals("htmlUrl")) {
return;
}
} else if (u.equals("html")) {
return;
}
} else if (u.equals("inmobiJson")) {
if (this.a != 2 || (c2368c0 = this.u) == null) {
A4 a43 = this.j;
if (a43 != null) {
((B4) a43).b("w0", "Found inconsistent state after vast processing");
return;
}
return;
}
c2368c0.a(c2437h);
C2424g0 p = p();
c2368c0.k();
p.getClass();
Set<C2685z9> y = c2437h.y();
if (y.isEmpty()) {
((AbstractC2637w0) p.a).a(p.c, true, (short) 0);
return;
}
C2479k c2479k = new C2479k(UUID.randomUUID().toString(), y, p.g, null, 16);
String f = c2437h.f();
if (f != null) {
X0.a(c2479k, f);
return;
}
return;
}
A4 a44 = this.j;
if (a44 != null) {
StringBuilder a2 = A5.a("w0", "TAG", "Can not handle fallback for");
a2.append(m.u());
((B4) a44).b("w0", a2.toString());
}
throw new IllegalStateException("Can not handle fallback for markup type: " + m.u());
}
}