Cyber Surfer v5.2.5版本的 MD5 值为:db13c5fce988de393e52d2679f934b22

以下内容为反编译后的 w9.java 源代码,内容仅作参考


package com.inmobi.media;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.graphics.Paint;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.util.Base64;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.webkit.ConsoleMessage;
import android.webkit.GeolocationPermissions;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.URLUtil;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.widget.AbsoluteLayout;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import com.facebook.appevents.internal.ViewHierarchyConstants;
import com.facebook.share.internal.MessengerShareContentUtility;
import com.iab.omid.library.inmobi.Omid;
import com.inmobi.adquality.models.AdQualityControl;
import com.inmobi.ads.WatermarkData;
import com.inmobi.ads.rendering.InMobiAdActivity;
import com.inmobi.commons.core.configs.AdConfig;
import com.inmobi.media.h;
import com.inmobi.media.l6;
import com.inmobi.media.n4;
import com.inmobi.media.w9;
import com.inmobi.media.z8;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.safedk.android.analytics.brandsafety.DetectTouchUtils;
import com.safedk.android.analytics.brandsafety.creatives.CreativeInfoManager;
import com.safedk.android.analytics.brandsafety.creatives.infos.CreativeInfo;
import com.safedk.android.internal.partials.InMobiNetworkBridge;
import com.safedk.android.utils.Logger;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import net.pubnative.lite.sdk.mraid.MRAIDNativeFeature;
import net.pubnative.lite.sdk.vpaid.enums.AdState;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class w9 extends WebView implements com.inmobi.media.h, x1, u1, l6.a, GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, e9, v9 {
    public static final y9 E0 = new a();
    public static final String F0 = "w9";
    public mc A;
    public v2 A0;
    public boolean B;
    public final h.a B0;
    public boolean C;
    public final WebChromeClient C0;
    public String D;
    public final y0 D0;
    public final AtomicBoolean E;
    public final Object F;
    public final Object G;
    public boolean H;
    public boolean I;
    public View J;
    public WebChromeClient.CustomViewCallback K;
    public int L;
    public long M;
    public String N;
    public FrameLayout O;
    public final AtomicBoolean P;
    public String Q;
    public w1 R;
    public com.inmobi.media.h S;
    public boolean T;
    public boolean U;
    public x V;
    public ic W;
    public final byte f5741a;
    public boolean a0;
    public final Set<lb> f5742b;
    public boolean b0;
    public String c;
    public boolean c0;
    public final boolean d;
    public int d0;
    public String e;
    public String e0;
    public long f;
    public int[] f0;
    public byte g;
    public long g0;
    public w9 h;
    public int h0;
    public WeakReference<Activity> i;
    public int i0;
    public WeakReference<ViewGroup> j;
    public int j0;
    public y9 k;
    public final l6 k0;
    public String l;
    public final GestureDetector l0;
    public m6 m;
    public boolean m0;
    public p6 n;
    public final x9 n0;
    public o6 o;
    public q3 o0;
    public AdConfig p;
    public String p0;
    public boolean q;
    public d9 q0;
    public boolean r;
    public e0 r0;
    public e4 s;
    public final boolean s0;
    public da t;
    public Map<String, m0> t0;
    public JSONObject u;
    public final c u0;
    public JSONObject v;
    public String v0;
    public boolean w;
    public x5 w0;
    public boolean x;
    public final e x0;
    public boolean y;
    public final d y0;
    public boolean z;
    public final nc z0;

    public static final class a extends y9 {
        @Override
        public void a(db telemetryOnAdImpression) {
            Intrinsics.checkNotNullParameter(telemetryOnAdImpression, "telemetryOnAdImpression");
        }

        @Override
        public TimeoutConfigurations k() {
            return TimeoutConfigurations.Companion.a();
        }
    }

    public static final class b implements nc {
        public b() {
        }

        @Override
        public void a(View view, boolean z) {
            Intrinsics.checkNotNullParameter(view, "view");
            if (view instanceof w9) {
                if (w9.this.hasWindowFocus()) {
                    w9.this.c(z);
                } else {
                    w9.this.c(false);
                }
            }
        }
    }

    public static final class c implements d0 {
        public c() {
        }

        @Override
        public void a() {
            w9.this.b("window.mraidview.broadcastEvent('AdReportFailed')");
        }

        @Override
        public void b() {
            w9.this.b("window.mraidview.broadcastEvent('AdReportSuccess')");
        }

        @Override
        public void c() {
            w9.this.b("window.mraidview.broadcastEvent('ScreenshotSuccess')");
        }
    }

    public static final class d implements y1 {
        public d() {
        }

        @Override
        public void a() {
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            w9.this.t();
        }

        @Override
        public void a(String url, String api) {
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(api, "api");
            w9.this.getLandingPageHandler().a(url, api);
        }

        @Override
        public void b() {
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            w9.this.getListener().f(w9.this);
            w9.a(w9.this, (String) null, (String) null, (String) null);
        }
    }

    public static final class e implements w5 {
        public e() {
        }

        @Override
        public void a() {
            w9.this.getListener().a();
        }

        @Override
        public void a(Intent intent) {
            Intrinsics.checkNotNullParameter(intent, "intent");
            intent.putExtra("creativeId", w9.this.getCreativeId());
            intent.putExtra("impressionId", w9.this.getImpressionId());
            InMobiAdActivity.a aVar = InMobiAdActivity.h;
            w9 w9Var = w9.this;
            InMobiAdActivity.j = w9Var;
            ma.f5512a.a(w9Var.getContainerContext(), intent);
        }

        @Override
        public void a(String str, String message, String str2) {
            Intrinsics.checkNotNullParameter(message, "message");
            w9.this.b(str, message, str2);
        }

        @Override
        public void b() {
            if (w9.this.E.get()) {
                return;
            }
            w9.this.getListener().b(new HashMap<>());
        }

        @Override
        public void b(String str, String message, String str2) {
            Intrinsics.checkNotNullParameter(message, "message");
            if (w9.this.E.get()) {
                return;
            }
            a(str, message, str2);
        }

        @Override
        public void c(String str, String str2, String str3) {
            w9.a(w9.this, str, str2, str3);
        }
    }

    public static final class f implements h.a {
        public f() {
        }

        @Override
        public void a() {
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            w9.this.getListener().g();
        }

        @Override
        public void a(Object obj) {
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            w9 w9Var = w9.this;
            if (w9Var.f5741a == 0) {
                if (w9Var.getOriginalRenderView() != null) {
                    w9 originalRenderView = w9.this.getOriginalRenderView();
                    if (originalRenderView != null) {
                        originalRenderView.setAndUpdateViewState("Expanded");
                    }
                } else {
                    w9.this.setAndUpdateViewState("Expanded");
                }
                w9.this.H = false;
            }
            w9.this.getListener().f(w9.this);
        }

        @Override
        public void b(Object obj) {
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            w9 w9Var = w9.this;
            if (w9Var.f5741a == 0) {
                w9Var.setAndUpdateViewState("Default");
                w9 originalRenderView = w9.this.getOriginalRenderView();
                if (originalRenderView != null) {
                    originalRenderView.setAndUpdateViewState("Default");
                }
            } else if (Intrinsics.areEqual("Default", w9Var.getViewState())) {
                w9.this.setAndUpdateViewState("Hidden");
            }
            w9.this.t();
        }
    }

    public static final class g implements y0 {
        public g() {
        }

        @Override
        public void a(com.inmobi.media.f assetBatch) {
            Intrinsics.checkNotNullParameter(assetBatch, "assetBatch");
            if (assetBatch.c == null || assetBatch.g.size() <= 0) {
                return;
            }
            String str = "sendSaveContentResult(\"saveContent_" + ((Object) assetBatch.f) + "\", 'success', \"" + ((Object) assetBatch.g.get(0).j) + "\");";
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("Success injection ", str);
            w9.this.a(assetBatch.c, str);
        }

        @Override
        public void a(com.inmobi.media.f assetBatch, byte b2) {
            Intrinsics.checkNotNullParameter(assetBatch, "assetBatch");
            if (assetBatch.c == null || assetBatch.g.size() <= 0) {
                return;
            }
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("url", assetBatch.g.get(0).f5356b);
                jSONObject.put(IronSourceConstants.EVENTS_ERROR_REASON, (int) assetBatch.g.get(0).l);
            } catch (JSONException unused) {
            }
            String jSONObject2 = jSONObject.toString();
            Intrinsics.checkNotNullExpressionValue(jSONObject2, "result.toString()");
            String str = "sendSaveContentResult(\"saveContent_" + ((Object) assetBatch.f) + "\", 'failed', \"" + StringsKt.replace$default(jSONObject2, "\"", "\\\"", false, 4, (Object) null) + "\");";
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("Failure injection ", str);
            w9.this.a(assetBatch.c, str);
        }
    }

    public static final class h extends WebChromeClient {
        public h() {
        }

        public static final void a(GeolocationPermissions.Callback callback, String origin, DialogInterface dialogInterface, int i) {
            Intrinsics.checkNotNullParameter(callback, "$callback");
            Intrinsics.checkNotNullParameter(origin, "$origin");
            callback.invoke(origin, true, false);
        }

        public static final void a(JsResult result, DialogInterface dialogInterface, int i) {
            Intrinsics.checkNotNullParameter(result, "$result");
            result.confirm();
        }

        public static final boolean a(View view, MotionEvent motionEvent) {
            return true;
        }

        public static final boolean a(h this$0, View view, int i, KeyEvent keyEvent) {
            Intrinsics.checkNotNullParameter(this$0, "this$0");
            if (4 == keyEvent.getKeyCode() && keyEvent.getAction() == 0) {
                String TAG = w9.F0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                this$0.a();
                return true;
            }
            return false;
        }

        public static final void b(GeolocationPermissions.Callback callback, String origin, DialogInterface dialogInterface, int i) {
            Intrinsics.checkNotNullParameter(callback, "$callback");
            Intrinsics.checkNotNullParameter(origin, "$origin");
            callback.invoke(origin, false, false);
        }

        public static final void b(JsResult result, DialogInterface dialogInterface, int i) {
            Intrinsics.checkNotNullParameter(result, "$result");
            result.confirm();
        }

        public static final void c(JsResult result, DialogInterface dialogInterface, int i) {
            Intrinsics.checkNotNullParameter(result, "$result");
            result.cancel();
        }

        public final void a() {
            w9 w9Var = w9.this;
            if (w9Var.J == null) {
                return;
            }
            WebChromeClient.CustomViewCallback customViewCallback = w9Var.K;
            if (customViewCallback != null) {
                customViewCallback.onCustomViewHidden();
            }
            w9 w9Var2 = w9.this;
            w9Var2.K = null;
            View view = w9Var2.J;
            if ((view == null ? null : view.getParent()) != null) {
                View view2 = w9.this.J;
                ViewParent parent = view2 == null ? null : view2.getParent();
                ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
                if (viewGroup != null) {
                    viewGroup.removeView(w9.this.J);
                }
                w9.this.J = null;
            }
        }

        @Override
        public boolean onConsoleMessage(ConsoleMessage cm) {
            Intrinsics.checkNotNullParameter(cm, "cm");
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("Console message:", cm.message() + " -- From line " + cm.lineNumber() + " of " + ((Object) cm.sourceId()));
            return true;
        }

        @Override
        public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) {
            Intrinsics.checkNotNullParameter(origin, "origin");
            Intrinsics.checkNotNullParameter(callback, "callback");
            if (w9.this.i.get() != null) {
                new AlertDialog.Builder(w9.this.i.get()).setTitle("Location Permission").setMessage("Allow location access").setPositiveButton(17039370, new DialogInterface.OnClickListener() {
                    @Override
                    public final void onClick(DialogInterface dialogInterface, int i) {
                        w9.h.a(callback, origin, dialogInterface, i);
                    }
                }).setNegativeButton(17039360, new DialogInterface.OnClickListener() {
                    @Override
                    public final void onClick(DialogInterface dialogInterface, int i) {
                        w9.h.b(callback, origin, dialogInterface, i);
                    }
                }).create().show();
            }
            super.onGeolocationPermissionsShowPrompt(origin, callback);
        }

        @Override
        public void onHideCustomView() {
            a();
            super.onHideCustomView();
        }

        @Override
        public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(message, "message");
            Intrinsics.checkNotNullParameter(result, "result");
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            if (w9.a(w9.this, result)) {
                Activity fullScreenActivity = w9.this.getFullScreenActivity();
                if (fullScreenActivity != null) {
                    new AlertDialog.Builder(fullScreenActivity).setMessage(message).setTitle(url).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i) {
                            w9.h.a(result, dialogInterface, i);
                        }
                    }).setCancelable(false).create().show();
                    return true;
                }
                result.cancel();
                return true;
            }
            return true;
        }

        @Override
        public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(message, "message");
            Intrinsics.checkNotNullParameter(result, "result");
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            if (w9.a(w9.this, result)) {
                if (w9.this.getFullScreenActivity() != null) {
                    new AlertDialog.Builder(w9.this.getFullScreenActivity()).setMessage(message).setPositiveButton(17039370, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i) {
                            w9.h.b(result, dialogInterface, i);
                        }
                    }).setNegativeButton(17039360, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i) {
                            w9.h.c(result, dialogInterface, i);
                        }
                    }).create().show();
                    return true;
                }
                result.cancel();
                return true;
            }
            return true;
        }

        @Override
        public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(message, "message");
            Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
            Intrinsics.checkNotNullParameter(result, "result");
            String TAG = w9.F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            if (w9.a(w9.this, result)) {
                if (w9.this.getFullScreenActivity() == null) {
                    result.cancel();
                    return true;
                }
                return false;
            }
            return true;
        }

        @Override
        public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(callback, "callback");
            if (w9.this.i.get() != null) {
                w9 w9Var = w9.this;
                w9Var.J = view;
                w9Var.K = callback;
                if (view != null) {
                    view.setOnTouchListener(new View.OnTouchListener() {
                        @Override
                        public final boolean onTouch(View view2, MotionEvent motionEvent) {
                            Logger.d("InMobi|SafeDK: Execution> Lcom/inmobi/media/w9$h$$ExternalSyntheticLambda0;->onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z");
                            CreativeInfoManager.onViewTouched(com.safedk.android.utils.h.i, view2, motionEvent);
                            return safedk_w9$h$$ExternalSyntheticLambda0_onTouch_c50fafff0257e152a819a5b5185587b4(view2, motionEvent);
                        }

                        public boolean safedk_w9$h$$ExternalSyntheticLambda0_onTouch_c50fafff0257e152a819a5b5185587b4(View view2, MotionEvent motionEvent) {
                            return w9.h.a(view2, motionEvent);
                        }
                    });
                }
                Activity activity = w9.this.i.get();
                FrameLayout frameLayout = activity == null ? null : (FrameLayout) activity.findViewById(16908290);
                View view2 = w9.this.J;
                if (view2 != null) {
                    view2.setBackgroundColor(-16777216);
                }
                if (frameLayout != null) {
                    frameLayout.addView(w9.this.J, new AbsoluteLayout.LayoutParams(-1, -1, 0, 0));
                }
                View view3 = w9.this.J;
                if (view3 != null) {
                    view3.requestFocus();
                }
                View view4 = w9.this.J;
                View.OnKeyListener onKeyListener = new View.OnKeyListener() {
                    @Override
                    public final boolean onKey(View view5, int i, KeyEvent keyEvent) {
                        return w9.h.a(w9.h.this, view5, i, keyEvent);
                    }
                };
                if (view4 != null) {
                    view4.setOnKeyListener(onKeyListener);
                }
                if (view4 != null) {
                    view4.setFocusable(true);
                }
                if (view4 != null) {
                    view4.setFocusableInTouchMode(true);
                }
                if (view4 == null) {
                    return;
                }
                view4.requestFocus();
            }
        }
    }

    public w9(Context context, byte b2, Set<lb> set, String str, boolean z, String landingScheme, long j) {
        super(context.getApplicationContext());
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(landingScheme, "landingScheme");
        this.f5741a = b2;
        this.f5742b = set;
        this.c = str;
        this.d = z;
        this.e = landingScheme;
        this.f = j;
        this.i = new WeakReference<>(null);
        this.l = "Default";
        this.w = true;
        this.x = true;
        this.z = true;
        this.A = mc.UNKNOWN;
        this.E = new AtomicBoolean(false);
        this.F = new Object();
        this.G = new Object();
        this.I = true;
        this.L = -1;
        this.M = Long.MIN_VALUE;
        this.P = new AtomicBoolean(false);
        this.c0 = true;
        this.i0 = Integer.MIN_VALUE;
        this.j0 = Integer.MIN_VALUE;
        this.n0 = new x9();
        this.s0 = v5.f5714b.a(context, "default").a("enableImraidLogs", false);
        this.u0 = new c();
        this.v0 = CreativeInfo.al;
        this.x0 = new e();
        this.y0 = new d();
        this.z0 = new b();
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("init constructor ", this);
        this.S = this;
        this.b0 = true;
        this.q0 = new d9();
        this.k0 = new l6(this);
        GestureDetector gestureDetector = new GestureDetector(context, this);
        this.l0 = gestureDetector;
        gestureDetector.setOnDoubleTapListener(this);
        gestureDetector.setIsLongpressEnabled(b2 == 1);
        new AtomicBoolean(false);
        this.B0 = new f();
        this.C0 = new h();
        this.D0 = new g();
    }

    public w9(Context context, byte b2, Set set, String str, boolean z, String str2, long j, int i) {
        this(context, b2, (i & 4) != 0 ? null : set, (i & 8) != 0 ? null : str, (i & 16) != 0 ? false : z, (i & 32) != 0 ? MessengerShareContentUtility.PREVIEW_DEFAULT : str2, (i & 64) != 0 ? -1L : j);
    }

    public static final void a(w9 this$0) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.getListener().h();
    }

    public static final void a(w9 this$0, String js) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(js, "$js");
        try {
            if (this$0.E.get()) {
                return;
            }
            String str = "javascript:try{" + js + "}catch(e){}";
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("Injecting javascript:", str);
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("evaluateScript ", this$0);
            this$0.evaluateJavascript(str, null);
        } catch (Exception e2) {
            Intrinsics.checkNotNullExpressionValue(F0, "TAG");
            Intrinsics.stringPlus("SDK encountered an unexpected error injecting JavaScript in the Ad container; ", e2.getMessage());
        }
    }

    public static final void a(w9 w9Var, String str, String str2, String str3) {
        w9Var.getClass();
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onUserLandingCompleted ", w9Var);
        w9Var.b("window.imraid.broadcastEvent('onUserLandingCompleted');");
        if (str2 == null) {
            return;
        }
        w9Var.a(str2, "broadcastEvent('" + ((Object) str) + "Successful','" + ((Object) str3) + "');");
    }

    public static final boolean a(w9 w9Var, JsResult jsResult) {
        w9Var.getClass();
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("shouldRenderPopup ", w9Var);
        if (w9Var.getRenderingConfig().shouldRenderPopup()) {
            return true;
        }
        jsResult.cancel();
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("firePopupBlockedEvent ", w9Var);
        w9Var.b("window.mraidview.popupBlocked('popupBlocked')");
        return false;
    }

    public static final void b(w9 this$0) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.getListener().i();
    }

    public static void getAdType$annotations() {
    }

    public static void getImpressionType$annotations() {
    }

    public static void getMarkupType$annotations() {
    }

    public static void getMarkupTypeAdUnit$annotations() {
    }

    private final AdConfig.MraidConfig getMraidConfig() {
        AdConfig adConfig = this.p;
        if (adConfig == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            adConfig = null;
        }
        return adConfig.getMraidConfig();
    }

    public static void getPlacementType$annotations() {
    }

    public static void getViewState$annotations() {
    }

    private final int getVisibilityTrackingMinPercentage() {
        AdConfig adConfig = null;
        if (Intrinsics.areEqual("audio", getAdType())) {
            AdConfig adConfig2 = this.p;
            if (adConfig2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig2;
            }
            return adConfig.getViewability().getAudioImpressionMinPercentageViewed();
        }
        AdConfig adConfig3 = this.p;
        if (adConfig3 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
        } else {
            adConfig = adConfig3;
        }
        return adConfig.getViewability().getWebImpressionMinPercentageViewed();
    }

    public static final void m488setWatermark$lambda2(w9 renderView) {
        Intrinsics.checkNotNullParameter(renderView, "this$0");
        if (renderView.P.get()) {
            return;
        }
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        FrameLayout overlayLayout = renderView.getOverlayLayout();
        if (overlayLayout != null) {
            Intrinsics.checkNotNullParameter(overlayLayout, "overlayLayout");
            Intrinsics.checkNotNullParameter(renderView, "renderView");
            if (renderView.getParent() != null) {
                ViewParent parent = renderView.getParent();
                if (parent == null) {
                    throw new NullPointerException("null cannot be cast to non-null type android.view.ViewGroup");
                }
                ((ViewGroup) parent).addView(overlayLayout, 0);
            }
        }
        renderView.P.set(true);
    }

    @Override
    public void a() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onFailure ", this);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        if (this.E.get()) {
            return;
        }
        new Handler(Looper.getMainLooper()).post(new Runnable() {
            @Override
            public final void run() {
                w9.a(w9.this);
            }
        });
    }

    @Override
    public void a(byte b2, Map<String, String> map) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireEvent ", this);
    }

    @Override
    public void a(b9 orientation) {
        p6 p6Var;
        Intrinsics.checkNotNullParameter(orientation, "orientation");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onOrientationUpdate ", this);
        if (!Intrinsics.areEqual("Resized", this.l) || this.t == null || (p6Var = this.n) == null) {
            return;
        }
        p6Var.a();
    }

    @Override
    public void a(l6 movementGestureDetector) {
        Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
        if (!getRenderingConfig().getSupportedGestures().contains(2)) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return;
        }
        String TAG2 = F0;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        StringBuilder sb = new StringBuilder("onPanDetected\n ");
        JSONArray jSONArray = movementGestureDetector.j;
        sb.append(jSONArray == null ? null : Integer.valueOf(jSONArray.length()));
        sb.append(" \n ");
        sb.append(movementGestureDetector.j);
        StringsKt.trimIndent(sb.toString());
        b("window.imraidview.onGestureDetected('2', '" + movementGestureDetector.j + "');");
    }

    @Override
    public void a(l6 movementGestureDetector, MotionEvent initialEvent, MotionEvent endEvent) {
        Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
        Intrinsics.checkNotNullParameter(initialEvent, "initialEvent");
        Intrinsics.checkNotNullParameter(endEvent, "endEvent");
        if (!getRenderingConfig().getSupportedGestures().contains(4)) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return;
        }
        String TAG2 = F0;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        StringsKt.trimIndent(" onScaleDetected\n " + initialEvent + " \n " + endEvent);
        JSONArray jSONArray = new JSONArray();
        float f2 = (float) 2;
        jSONArray.put(new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf((endEvent.getX() + endEvent.getX(1)) / f2), Float.valueOf((endEvent.getY() + endEvent.getY(1)) / f2)})));
        b("window.imraidview.onGestureDetected('4', '" + jSONArray + "');");
    }

    public final void a(y9 y9Var, AdConfig adConfig, boolean z, boolean z2) {
        AdConfig adConfig2;
        int otherNetworkLoadsLimit;
        AdConfig adConfig3;
        AdConfig adConfig4;
        Intrinsics.checkNotNullParameter(adConfig, "adConfig");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("initialize ", this);
        if (Intrinsics.areEqual(this.v0, "htmlUrl")) {
            getSettings().setMixedContentMode(2);
        }
        this.p = adConfig;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setImpressionParams ", this);
        if (this.f5742b == null) {
            r();
        } else {
            try {
                r();
                for (lb lbVar : this.f5742b) {
                    if (lbVar.f5489a == 2) {
                        if (lbVar.f5490b.containsKey("type")) {
                            Object obj = lbVar.f5490b.get("type");
                            if (obj == null) {
                                throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                            }
                            this.g = (byte) ((Integer) obj).intValue();
                        } else {
                            s();
                        }
                        if (lbVar.f5490b.containsKey("time")) {
                            Object obj2 = lbVar.f5490b.get("time");
                            if (obj2 == null) {
                                throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                            }
                            this.i0 = ((Integer) obj2).intValue();
                        } else {
                            q();
                        }
                        if (lbVar.f5490b.containsKey("view")) {
                            Object obj3 = lbVar.f5490b.get("view");
                            if (obj3 == null) {
                                throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                            }
                            this.j0 = ((Integer) obj3).intValue();
                        } else {
                            p();
                        }
                        if (this.g != 2) {
                            continue;
                        } else {
                            if (lbVar.f5490b.containsKey("pixel")) {
                                Object obj4 = lbVar.f5490b.get("pixel");
                                if (obj4 == null) {
                                    throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                                }
                                this.h0 = ((Integer) obj4).intValue();
                            } else {
                                s();
                            }
                            if (lbVar.f5490b.containsKey("frame")) {
                                Object obj5 = lbVar.f5490b.get("frame");
                                JSONArray jSONArray = obj5 instanceof JSONArray ? (JSONArray) obj5 : null;
                                if (jSONArray != null) {
                                    this.f0 = new int[jSONArray.length()];
                                    int length = jSONArray.length();
                                    if (length > 0) {
                                        int i = 0;
                                        while (true) {
                                            int i2 = i + 1;
                                            int[] iArr = this.f0;
                                            if (iArr != null) {
                                                Object obj6 = jSONArray.get(i);
                                                if (obj6 == null) {
                                                    throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                                                }
                                                iArr[i] = ((Integer) obj6).intValue();
                                            }
                                            if (i2 >= length) {
                                                break;
                                            }
                                            i = i2;
                                        }
                                    } else {
                                        continue;
                                    }
                                }
                            } else {
                                s();
                            }
                        }
                    }
                }
            } catch (JSONException unused) {
                Intrinsics.checkNotNullExpressionValue(F0, "TAG");
                r();
            } catch (Exception unused2) {
                Intrinsics.checkNotNullExpressionValue(F0, "TAG");
                r();
            }
        }
        Intrinsics.checkNotNullExpressionValue(F0, "TAG");
        Intrinsics.stringPlus("initLandingPageHandler ", this);
        y5 y5Var = new y5(this.d, this.e, getAdConfig().isCCTEnabled());
        Context context = getContext();
        Intrinsics.checkNotNullExpressionValue(context, "context");
        setLandingPageHandler(new x5(context, y5Var, this.y0, this.x0, this));
        this.k = y9Var;
        this.a0 = z;
        ViewParent parent = getParent();
        this.j = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
        this.c0 = z2;
        setBackgroundColor(getRenderingConfig().getWebviewBackgroundColor());
        new n6(getMraidConfig().getUrl(), getMraidConfig().getMaxRetries(), getMraidConfig().getRetryInterval(), getMraidConfig().getExpiry()).a();
        setImportantForAccessibility(2);
        setScrollable(false);
        getSettings().setMediaPlaybackRequiresUserGesture(false);
        getSettings().setJavaScriptEnabled(true);
        getSettings().setGeolocationEnabled(true);
        x9 x9Var = this.n0;
        String adType = getAdType();
        if (Intrinsics.areEqual(adType, "banner")) {
            AdConfig adConfig5 = this.p;
            if (adConfig5 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
                adConfig4 = null;
            } else {
                adConfig4 = adConfig5;
            }
            otherNetworkLoadsLimit = adConfig4.getRendering().getBannerNetworkLoadsLimit();
        } else if (Intrinsics.areEqual(adType, "audio")) {
            AdConfig adConfig6 = this.p;
            if (adConfig6 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
                adConfig3 = null;
            } else {
                adConfig3 = adConfig6;
            }
            otherNetworkLoadsLimit = adConfig3.getRendering().getAudioNetworkLoadsLimit();
        } else {
            AdConfig adConfig7 = this.p;
            if (adConfig7 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
                adConfig2 = null;
            } else {
                adConfig2 = adConfig7;
            }
            otherNetworkLoadsLimit = adConfig2.getRendering().getOtherNetworkLoadsLimit();
        }
        x9Var.f5637a = otherNetworkLoadsLimit;
        setWebViewClient(this.n0);
        setWebChromeClient(this.C0);
        addJavascriptInterface(new p5(this, this.f5741a), "sdkController");
        this.m = new m6(this, getMarkupType());
        this.n = new p6(this);
        this.o = new o6(this);
        this.s = new e4();
        this.t = new da(da.DEFAULT_POSITION, true);
        this.r0 = new e0(adConfig.getAdQuality());
    }

    @Override
    public void a(String mraidApi) {
        Intrinsics.checkNotNullParameter(mraidApi, "mraidApi");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("sendFraudBeaconAndTelemetryEvent ", this);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireDetectAutoRedirectFraud ", this);
        b("window.mraidview.fireRedirectFraudBeacon('" + mraidApi + "')");
        String adType = getAdType();
        if (adType == null) {
            adType = "banner";
        }
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("sendTelemetryForAutoRedirectFraud ", this);
        HashMap hashMap = new HashMap();
        String creativeId = getCreativeId();
        if (creativeId != null) {
            hashMap.put("creativeId", creativeId);
        }
        hashMap.put("trigger", mraidApi);
        String impressionId = getImpressionId();
        if (impressionId != null) {
            hashMap.put("impressionId", impressionId);
        }
        hashMap.put("adType", adType);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processTelemetryEvent ", this);
        getListener().b("BlockAutoRedirection", hashMap);
    }

    public final void a(String str, String callback) {
        Intrinsics.checkNotNullParameter(callback, "callback");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireJavaScriptCallback ", this);
        if (str == null) {
            return;
        }
        b(((Object) str) + '.' + callback);
    }

    @Override
    public void a(String jsCallbackNamespace, String callback, String blob) {
        Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
        Intrinsics.checkNotNullParameter(callback, "callback");
        Intrinsics.checkNotNullParameter(blob, "blob");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        a(jsCallbackNamespace, callback + '(' + blob + ");");
    }

    public final void a(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireNextAdLoadComplete ", this);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        getCurrentRenderingPodAdIndex();
        b("window.imraidview.broadcastEvent('adLoadSuccess'," + z + ");");
    }

    @Override
    public void b() {
        ViewGroup viewGroup;
        x xVar;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("dismissCurrentViewContainer ", this);
        o6 o6Var = this.o;
        if (o6Var != null) {
            i6 i6Var = o6Var.c;
            if (i6Var != null) {
                i6Var.a();
            }
            o6Var.c = null;
        }
        if (Intrinsics.areEqual("Expanded", this.l)) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("processCloseRequestOnExpandedRenderView ", this);
            if (!Intrinsics.areEqual("Default", this.l)) {
                this.H = true;
                m6 m6Var = this.m;
                if (m6Var != null && m6Var.f5503a.getOriginalRenderView() == null) {
                    ViewGroup viewGroup2 = m6Var.c;
                    View rootView = viewGroup2 == null ? null : viewGroup2.getRootView();
                    if (rootView != null) {
                        View findViewById = rootView.findViewById(65535);
                        ViewParent parent = m6Var.f5503a.getParent();
                        ViewGroup viewGroup3 = parent instanceof ViewGroup ? (ViewGroup) parent : null;
                        if (viewGroup3 != null) {
                            viewGroup3.removeView(m6Var.f5503a);
                        }
                        ViewParent parent2 = findViewById == null ? null : findViewById.getParent();
                        viewGroup = parent2 instanceof ViewGroup ? parent2 : null;
                        if (viewGroup != null) {
                            viewGroup.removeView(findViewById);
                        }
                        ViewGroup viewGroup4 = m6Var.c;
                        if (viewGroup4 != null) {
                            viewGroup4.addView(m6Var.f5503a, m6Var.d, new RelativeLayout.LayoutParams(viewGroup4.getWidth(), viewGroup4.getHeight()));
                        }
                        w9 w9Var = m6Var.f5503a;
                        w9Var.getClass();
                        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                        Intrinsics.stringPlus("resetLayout ", w9Var);
                        w9Var.setVisibility(0);
                        w9Var.requestLayout();
                    }
                }
                h();
                this.H = false;
            }
            this.z = false;
        } else if (Intrinsics.areEqual("Resized", this.l)) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("processCloseRequestOnResizedRenderView ", this);
            if (!Intrinsics.areEqual("Default", this.l)) {
                this.H = true;
                p6 p6Var = this.n;
                if (p6Var != null) {
                    ViewParent parent3 = p6Var.f5594a.getParent();
                    ViewGroup viewGroup5 = parent3 instanceof ViewGroup ? (ViewGroup) parent3 : null;
                    View rootView2 = viewGroup5 == null ? null : viewGroup5.getRootView();
                    View findViewById2 = rootView2 == null ? null : rootView2.findViewById(65534);
                    ViewGroup viewGroup6 = p6Var.f5595b;
                    View rootView3 = viewGroup6 == null ? null : viewGroup6.getRootView();
                    View findViewById3 = rootView3 == null ? null : rootView3.findViewById(65535);
                    ViewParent parent4 = findViewById3 == null ? null : findViewById3.getParent();
                    ViewGroup viewGroup7 = parent4 instanceof ViewGroup ? (ViewGroup) parent4 : null;
                    ViewParent parent5 = findViewById2 == null ? null : findViewById2.getParent();
                    viewGroup = parent5 instanceof ViewGroup ? parent5 : null;
                    if (viewGroup != null) {
                        viewGroup.removeView(findViewById2);
                    }
                    if (viewGroup7 != null) {
                        viewGroup7.removeView(findViewById3);
                    }
                    if (viewGroup5 != null) {
                        viewGroup5.removeView(p6Var.f5594a);
                    }
                    ViewGroup viewGroup8 = p6Var.f5595b;
                    if (viewGroup8 != null) {
                        viewGroup8.addView(p6Var.f5594a, p6Var.c, new RelativeLayout.LayoutParams(viewGroup8.getWidth(), viewGroup8.getHeight()));
                    }
                    w9 w9Var2 = p6Var.f5594a;
                    w9Var2.getClass();
                    Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                    Intrinsics.stringPlus("resetLayout ", w9Var2);
                    w9Var2.setVisibility(0);
                    w9Var2.requestLayout();
                }
                setAndUpdateViewState("Default");
                t();
                this.H = false;
            }
        } else if (Intrinsics.areEqual("Default", this.l)) {
            setAndUpdateViewState("Hidden");
            ViewParent parent6 = getParent();
            if (1 == this.f5741a) {
                h();
            } else if (parent6 instanceof ViewGroup) {
                ((ViewGroup) parent6).removeAllViews();
            }
        }
        if (l() && (xVar = this.V) != null) {
            xVar.a(this, getFullScreenActivity());
        }
        this.n0.e.clear();
    }

    @Override
    public void b(l6 movementGestureDetector, MotionEvent initialEvent, MotionEvent endEvent) {
        Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
        Intrinsics.checkNotNullParameter(initialEvent, "initialEvent");
        Intrinsics.checkNotNullParameter(endEvent, "endEvent");
        if (!getRenderingConfig().getSupportedGestures().contains(3)) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return;
        }
        String TAG2 = F0;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        StringsKt.trimIndent(" Rotation detected " + movementGestureDetector.i + " \n " + initialEvent + " \n " + endEvent);
        JSONArray jSONArray = new JSONArray();
        jSONArray.put(new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(initialEvent.getX()), Float.valueOf(initialEvent.getY())})));
        jSONArray.put(new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(initialEvent.getX(1)), Float.valueOf(initialEvent.getY(1))})));
        jSONArray.put(new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(endEvent.getX()), Float.valueOf(endEvent.getY())})));
        jSONArray.put(new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(endEvent.getX(1)), Float.valueOf(endEvent.getY(1))})));
        b("window.imraidview.onGestureDetected('3', '" + jSONArray + "');");
    }

    public final void b(final String js) {
        Intrinsics.checkNotNullParameter(js, "js");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("injectJavaScript ", this);
        new Handler(getContainerContext().getMainLooper()).postAtFrontOfQueue(new Runnable() {
            @Override
            public final void run() {
                w9.a(w9.this, js);
            }
        });
    }

    public final void b(String str, String url) {
        Intrinsics.checkNotNullParameter(url, "url");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processMediaPlaybackRequest ", this);
        if (1 != this.f5741a && !Intrinsics.areEqual("Expanded", this.l)) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return;
        }
        Activity activity = this.i.get();
        if (activity == null) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            b(str, "Media playback is  not allowed before it is visible! Ignoring request ...", "playVideo");
            return;
        }
        o6 o6Var = this.o;
        if (o6Var == null) {
            return;
        }
        o6Var.a(url, activity);
    }

    public final void b(String str, String message, String str2) {
        Intrinsics.checkNotNullParameter(message, "message");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireError ", this);
        if (str == null || str2 == null) {
            return;
        }
        a(str, "broadcastEvent('error',\"" + message + "\", \"" + ((Object) str2) + "\")");
    }

    public final void b(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireNextAdShowComplete ", this);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        getCurrentRenderingPodAdIndex();
        b("window.imraidview.broadcastEvent('adShowSuccess'," + z + ");");
    }

    @Override
    public void c() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("destroyContainer ", this);
        if (this.E.get()) {
            return;
        }
        if (!this.z) {
            this.z = true;
            return;
        }
        this.E.set(true);
        v2 v2Var = this.A0;
        if (v2Var != null) {
            v2Var.b();
        }
        this.H = true;
        this.L = -1;
        removeJavascriptInterface("sdkController");
        o6 o6Var = this.o;
        AdConfig adConfig = null;
        if (o6Var != null) {
            g6 g6Var = o6Var.d;
            if (g6Var != null) {
                g6Var.b();
            }
            o6Var.d = null;
            g6 g6Var2 = o6Var.e;
            if (g6Var2 != null) {
                g6Var2.b();
            }
            o6Var.e = null;
            g6 g6Var3 = o6Var.f;
            if (g6Var3 != null) {
                g6Var3.b();
            }
            o6Var.f = null;
        }
        this.i.clear();
        WeakReference<ViewGroup> weakReference = this.j;
        if (weakReference != null) {
            weakReference.clear();
        }
        ic icVar = this.W;
        if (icVar != null) {
            icVar.e();
        }
        ic icVar2 = this.W;
        if (icVar2 != null) {
            icVar2.a();
        }
        this.o0 = null;
        this.k = null;
        this.V = null;
        this.S = null;
        ViewParent parent = getParent();
        if (parent != null) {
            ((ViewGroup) parent).removeView(this);
            removeAllViews();
        }
        AdConfig adConfig2 = this.p;
        if (adConfig2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
        } else {
            adConfig = adConfig2;
        }
        AdConfig.OmidConfig omidConfig = adConfig.getViewability().getOmidConfig();
        if (this.b0 && omidConfig.isOmidEnabled()) {
            z8.a aVar = z8.f5799b;
            z8.c.getClass();
            if (Omid.isActive()) {
                new z9(this, omidConfig.getWebViewRetainTime()).a();
                return;
            }
        }
        destroy();
    }

    public final void c(String str) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("loadDataInWebView ", this);
        this.H = false;
        if (this.E.get()) {
            return;
        }
        Intrinsics.checkNotNull(str);
        InMobiNetworkBridge.webviewLoadDataWithBaseURL(this, "", str, "text/html", "UTF-8", null);
    }

    public final void c(String str, String contentId, String url) {
        Intrinsics.checkNotNullParameter(contentId, "contentId");
        Intrinsics.checkNotNullParameter(url, "url");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processSaveContentRequest ", this);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        if (f("saveContent")) {
            HashSet hashSet = new HashSet();
            hashSet.add(new u9((byte) -1, url));
            String uuid = UUID.randomUUID().toString();
            Intrinsics.checkNotNullExpressionValue(uuid, "randomUUID().toString()");
            com.inmobi.media.f fVar = new com.inmobi.media.f(uuid, null, hashSet, this.D0, contentId);
            fVar.c = str;
            x0.f5750a.a(fVar);
            return;
        }
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("url", url);
            jSONObject.put(IronSourceConstants.EVENTS_ERROR_REASON, 7);
        } catch (JSONException unused) {
        }
        String jSONObject2 = jSONObject.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject2, "result.toString()");
        String replace$default = StringsKt.replace$default(jSONObject2, "\"", "\\\"", false, 4, (Object) null);
        a(str, "sendSaveContentResult(\"saveContent_" + contentId + "\", 'failed', \"" + replace$default + "\");");
    }

    public final void c(boolean z) {
        AdQualityControl adQualityControl;
        Activity activity;
        e0 e0Var;
        AdQualityControl adQualityControl2;
        mc mcVar = z ? mc.VISIBLE : mc.HIDDEN;
        if (this.A != mcVar) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            mcVar.toString();
            toString();
            if (this.H) {
                return;
            }
            this.A = mcVar;
            if (z) {
                getListener().k(this);
            }
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("fireViewableChange ", this);
            b("window.mraidview.broadcastEvent('viewableChange'," + z + ");");
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            getAdType();
            int i = Build.VERSION.SDK_INT;
            boolean z2 = false;
            if (!Intrinsics.areEqual(getAdType(), "int") || i < 29 || (activity = this.i.get()) == null) {
                e0 e0Var2 = this.r0;
                if (e0Var2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
                    e0Var2 = null;
                }
                e0Var2.getClass();
                Intrinsics.checkNotNullParameter(this, "adView");
                if (!e0Var2.c()) {
                    g0.a("AdQualityManager", "session state invalid");
                    return;
                }
                g0.a("AdQualityManager", "session start trigger...");
                e0Var2.f5360b.set(true);
                AdQualityControl adQualityControl3 = e0Var2.f;
                if (adQualityControl3 != null && adQualityControl3.getTakeScreenshot()) {
                    z2 = true;
                }
                if (!z2 || (adQualityControl = e0Var2.f) == null) {
                    return;
                }
                e0Var2.a((View) this, adQualityControl.getScreenshotDelayInSeconds() * 1000, false, (d0) null);
                return;
            }
            e0 e0Var3 = this.r0;
            if (e0Var3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
                e0Var = null;
            } else {
                e0Var = e0Var3;
            }
            e0Var.getClass();
            Intrinsics.checkNotNullParameter(activity, "activity");
            if (!e0Var.c()) {
                g0.a("AdQualityManager", "session state invalid");
                return;
            }
            g0.a("AdQualityManager", "session start trigger...");
            e0Var.f5360b.set(true);
            AdQualityControl adQualityControl4 = e0Var.f;
            if (adQualityControl4 != null && adQualityControl4.getTakeScreenshot()) {
                z2 = true;
            }
            if (!z2 || (adQualityControl2 = e0Var.f) == null) {
                return;
            }
            e0Var.a(activity, adQualityControl2.getScreenshotDelayInSeconds() * 1000, false, (d0) null);
        }
    }

    public final void d(String str) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("loadUrlInWebView ", this);
        this.H = false;
        if (this.E.get() || str == null) {
            return;
        }
        InMobiNetworkBridge.webviewLoadUrl(this, str);
    }

    public final void d(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processDisableCloseRegionRequest ", this);
        this.B = z;
        View rootView = getRootView();
        if (rootView != null) {
            View findViewById = rootView.findViewById(65531);
            Intrinsics.checkNotNullExpressionValue(findViewById, "rootView.findViewById(Vi…tants.ID_AD_CLOSE_REGION)");
            ((g3) findViewById).setVisibility(this.B ? 8 : 0);
        }
    }

    @Override
    public boolean d() {
        return this.E.get();
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent motionEvent) {
        DetectTouchUtils.viewOnTouch(com.safedk.android.utils.h.i, this, motionEvent);
        return super.dispatchTouchEvent(motionEvent);
    }

    public final void e(String str) {
        int a2;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processExpandRequest ", this);
        if (!Intrinsics.areEqual("Default", this.l) && !Intrinsics.areEqual("Resized", this.l)) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("Render view state must be either DEFAULT or RESIZED to admit the expand request. Current state:", this.l);
            return;
        }
        this.H = true;
        m6 m6Var = this.m;
        if (m6Var != null) {
            if (m6Var.c == null) {
                ViewParent parent = m6Var.f5503a.getParent();
                ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
                m6Var.c = viewGroup;
                if (viewGroup != null) {
                    m6Var.d = viewGroup.indexOfChild(m6Var.f5503a);
                }
            }
            e4 expandProperties = m6Var.f5503a.getExpandProperties();
            boolean isValidUrl = URLUtil.isValidUrl(str);
            w9 w9Var = m6Var.f5503a;
            if (isValidUrl) {
                try {
                    w9 w9Var2 = new w9(w9Var.getContainerContext(), (byte) 0, null, m6Var.f5503a.getImpressionId(), false, null, 0L, 116);
                    w9Var2.a(m6Var.f5503a.getListener(), m6Var.f5503a.getAdConfig(), false, false);
                    w9Var2.setOriginalRenderView(m6Var.f5503a);
                    Intrinsics.checkNotNull(str);
                    InMobiNetworkBridge.webviewLoadUrl(w9Var2, str);
                    w9Var2.setPlacementId(m6Var.f5503a.getPlacementId());
                    w9Var2.setAllowAutoRedirection(m6Var.f5503a.getAllowAutoRedirection());
                    w9Var2.setCreativeId(m6Var.f5503a.getCreativeId());
                    a2 = InMobiAdActivity.h.a((com.inmobi.media.h) w9Var2);
                    if (expandProperties != null) {
                        w9Var2.setUseCustomClose(m6Var.f5503a.y);
                    }
                } catch (Exception e2) {
                    z2.f5790a.a(new z1(e2));
                    m6Var.f5503a.getListener().g(m6Var.f5503a);
                }
            } else {
                w9Var.setShouldFireRenderBeacon(false);
                ViewGroup viewGroup2 = m6Var.c;
                if (viewGroup2 != null) {
                    FrameLayout frameLayout = new FrameLayout(m6Var.f5503a.getContainerContext());
                    ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(m6Var.f5503a.getWidth(), m6Var.f5503a.getHeight());
                    frameLayout.setId(65535);
                    viewGroup2.addView(frameLayout, m6Var.d, layoutParams);
                    viewGroup2.removeView(m6Var.f5503a);
                }
                a2 = InMobiAdActivity.h.a((com.inmobi.media.h) m6Var.f5503a);
            }
            m6Var.f5503a.getListener().j();
            Intent intent = new Intent(m6Var.f5503a.getContainerContext(), InMobiAdActivity.class);
            intent.putExtra("com.inmobi.ads.rendering.InMobiAdActivity.EXTRA_AD_ACTIVITY_TYPE", 102);
            intent.putExtra("com.inmobi.ads.rendering.InMobiAdActivity.EXTRA_AD_CONTAINER_INDEX", a2);
            intent.putExtra("com.inmobi.ads.rendering.InMobiAdActivity.EXTRA_AD_CONTAINER_TYPE", Intrinsics.areEqual(m6Var.f5504b, "htmlUrl") ? AdState.SHOWING : 200);
            ma.f5512a.a(m6Var.f5503a.getContainerContext(), intent);
        }
        requestLayout();
        invalidate();
        setFocusable(true);
        setFocusableInTouchMode(true);
        requestFocus();
    }

    public final void e(boolean z) {
        g3 g3Var;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processUseCustomCloseRequest ", this);
        setUseCustomClose(z);
        View rootView = getRootView();
        if (rootView == null || (g3Var = (g3) rootView.findViewById(65532)) == null) {
            return;
        }
        g3Var.setVisibility(this.y ? 8 : 0);
    }

    @Override
    public boolean e() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        if (getRenderingConfig() == null) {
            return false;
        }
        return !getRenderingConfig().getAutoRedirectionEnforcement() || ((getViewTouchTimestamp() > (-1L) ? 1 : (getViewTouchTimestamp() == (-1L) ? 0 : -1)) != 0 && ((SystemClock.elapsedRealtime() - getViewTouchTimestamp()) > getRenderingConfig().getUserTouchResetTime() ? 1 : ((SystemClock.elapsedRealtime() - getViewTouchTimestamp()) == getRenderingConfig().getUserTouchResetTime() ? 0 : -1)) < 0);
    }

    @Override
    public void f() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("disableHardwareAcceleration called. ", this);
        this.I = false;
        try {
            w9.class.getMethod("setLayerType", Integer.TYPE, Paint.class).invoke(this, 1, null);
        } catch (IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException unused) {
        }
    }

    public final boolean f(String str) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("supports ", this);
        boolean z = false;
        if (str != null) {
            switch (str.hashCode()) {
                case -1886160473:
                    return str.equals("playVideo");
                case -1647691422:
                    if (!str.equals(MRAIDNativeFeature.INLINE_VIDEO)) {
                        return false;
                    }
                    if (this.q && this.I) {
                        z = true;
                    }
                    Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                    Intrinsics.stringPlus("HTML5 video supported:", Boolean.valueOf(z));
                    return z;
                case 1509574865:
                    if (!str.equals("html5video")) {
                        return false;
                    }
                    if (this.q) {
                        z = true;
                        break;
                    }
                    Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                    Intrinsics.stringPlus("HTML5 video supported:", Boolean.valueOf(z));
                    return z;
                case 1642189884:
                    if (!str.equals("saveContent")) {
                        return false;
                    }
                    break;
                case 1772979069:
                    str.equals("redirectFraudDetection");
                    return false;
                default:
                    return false;
            }
        } else {
            return false;
        }
    }

    @Override
    public void g() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onPixelDetected ", this);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        if (this.E.get()) {
            return;
        }
        new Handler(Looper.getMainLooper()).post(new Runnable() {
            @Override
            public final void run() {
                w9.b(w9.this);
            }
        });
    }

    @Override
    public AdConfig getAdConfig() {
        AdConfig adConfig = this.p;
        if (adConfig == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            return null;
        }
        return adConfig;
    }

    public final x getAdPodHandler() {
        return this.V;
    }

    public final e0 getAdQualityManager() {
        e0 e0Var = this.r0;
        if (e0Var == null) {
            Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
            return null;
        }
        return e0Var;
    }

    @Override
    public String getAdType() {
        return this.Q;
    }

    public final boolean getAllowAutoRedirection() {
        return this.U;
    }

    public Context getContainerContext() {
        Activity activity = this.i.get();
        if (activity == null) {
            Context context = getContext();
            Intrinsics.checkNotNullExpressionValue(context, "context");
            return context;
        }
        return activity;
    }

    public final String getContentURL() {
        return this.e0;
    }

    public final v2 getContextualDataHandler() {
        return this.A0;
    }

    public final String getCreativeID() {
        String creativeId = getCreativeId();
        return creativeId == null ? "" : creativeId;
    }

    @Override
    public String getCreativeId() {
        return this.N;
    }

    public final String getCurrentPosition() {
        String jSONObject;
        JSONObject jSONObject2 = this.v;
        return (jSONObject2 == null || (jSONObject = jSONObject2.toString()) == null) ? "" : jSONObject;
    }

    public final Object getCurrentPositionMonitor() {
        return this.G;
    }

    public final int getCurrentRenderingPodAdIndex() {
        x xVar = this.V;
        if (xVar == null) {
            return 0;
        }
        return xVar.a(this);
    }

    @Override
    public Object getDataModel() {
        return null;
    }

    public final String getDefaultPosition() {
        String jSONObject;
        JSONObject jSONObject2 = this.u;
        return (jSONObject2 == null || (jSONObject = jSONObject2.toString()) == null) ? "" : jSONObject;
    }

    public final Object getDefaultPositionMonitor() {
        return this.F;
    }

    public final q3 getEmbeddedBrowserJSCallbacks() {
        return this.o0;
    }

    public final e4 getExpandProperties() {
        return this.s;
    }

    public final Activity getFullScreenActivity() {
        return this.i.get();
    }

    @Override
    public h.a getFullScreenEventsListener() {
        return this.B0;
    }

    @Override
    public String getImpressionId() {
        return this.c;
    }

    public final byte getImpressionType() {
        return this.g;
    }

    public final x5 getLandingPageHandler() {
        x5 x5Var = this.w0;
        if (x5Var != null) {
            return x5Var;
        }
        Intrinsics.throwUninitializedPropertyAccessException("landingPageHandler");
        return null;
    }

    public final String getLandingScheme() {
        return this.e;
    }

    public final y9 getListener() {
        y9 y9Var = this.k;
        if (y9Var == null) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("listener getter ", this);
            y9 y9Var2 = E0;
            this.k = y9Var2;
            return y9Var2;
        }
        return y9Var;
    }

    @Override
    public String getMarkupType() {
        return this.v0;
    }

    public final String getMarkupTypeAdUnit() {
        return this.v0;
    }

    public final o6 getMediaProcessor() {
        return this.o;
    }

    public final int getMinimumPixelsPainted() {
        return this.h0;
    }

    public final String getMraidJsString() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("mraidJsString getter ", this);
        Context context = getContext();
        Intrinsics.checkNotNullExpressionValue(context, "context");
        String a2 = new m9(context, "mraid_js_store").a("mraid_js_string");
        if (a2 != null) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return a2;
        }
        StringBuilder sb = new StringBuilder(32013);
        sb.append("var imIsObjValid=function(a){return\"undefined\"!=typeof a&&null!=a?!0:!1},EventListeners=function(a){this.event=a;this.count=0;var b=[];this.add=function(a){b.push(a);++this.count};this.remove=function(a){var e=!1,d=this;b=b.filter(function(b){if(b=b===a)--d.count,e=!0;return!b});return e};this.removeAll=function(){b=[];this.count=0};this.broadcast=function(a){b.forEach(function(b){try{b.apply({},a)}catch(d){}})};this.toString=function(){var c=[a,\":\"];b.forEach(function(a){c.push(\"|\",String(a),\"|\")});\nreturn c.join(\"\")}},InmobiObj=function(){this.listeners=[];this.addEventListener=function(a,b){try{if(imIsObjValid(b)&&imIsObjValid(a)){var c=this.listeners;c[a]||(c[a]=new EventListeners);c[a].add(b);\"micIntensityChange\"==a&&window.imraidview.startListeningMicIntensity();\"deviceMuted\"==a&&window.imraidview.startListeningDeviceMuteEvents();\"deviceVolumeChange\"==a&&window.imraidview.startListeningDeviceVolumeChange();\"volumeChange\"==a&&window.imraidview.startListeningVolumeChange();\"headphones\"==a&&\nwindow.imraidview.startListeningHeadphonePluggedEvents();\"backButtonPressed\"==a&&window.imraidview.startListeningForBackButtonPressedEvent();\"downloadStatusChanged\"==a&&window.imraidview.registerDownloaderCallbacks()}}catch(e){this.log(e)}};this.removeEventListener=function(a,b){if(imIsObjValid(a)){var c=this.listeners;imIsObjValid(c[a])&&(imIsObjValid(b)?c[a].remove(b):c[a].removeAll());\"micIntensityChange\"==a&&0==c[a].count&&window.imraidview.stopListeningMicIntensity();\"deviceMuted\"==a&&0==c[a].count&&\nwindow.imraidview.stopListeningDeviceMuteEvents();\"deviceVolumeChange\"==a&&0==c[a].count&&window.imraidview.stopListeningDeviceVolumeChange();\"volumeChange\"==a&&0==c[a].count&&window.imraidview.stopListeningVolumeChange();\"headphones\"==a&&0==c[a].count&&window.imraidview.stopListeningHeadphonePluggedEvents();\"backButtonPressed\"==a&&0==c[a].count&&window.imraidview.stopListeningForBackButtonPressedEvent();\"downloadStatusChanged\"==a&&0==c[a].count&&window.imraidview.unregisterDownloaderCallbacks()}};\nthis.broadcastEvent=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)b[c]=arguments[c];c=b.shift();try{this.listeners[c]&&this.listeners[c].broadcast(b)}catch(e){}}};this.sendSaveContentResult=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)if(2==c){var e=arguments[c],e=JSON.parse(e);b[c]=e}else b[c]=arguments[c];e=b[1];\"success\"!=e&&(c=b[0].substring(b[0].indexOf(\"_\")+1),imraid.saveContentIDMap[c]&&delete imraid.saveContentIDMap[c]);\nwindow.imraid.broadcastEvent(b[0],b[1],b[2])}}},__im__iosNativeMessageHandler=void 0;window.webkit&&(window.webkit.messageHandlers&&window.webkit.messageHandlers.nativeMessageHandler)&&(__im__iosNativeMessageHandler=window.webkit.messageHandlers.nativeMessageHandler);\nvar __im__iosNativeCall={nativeCallInFlight:!1,nativeCallQueue:[],executeNativeCall:function(a){this.nativeCallInFlight?this.nativeCallQueue.push(a):(this.nativeCallInFlight=!0,imIsObjValid(__im__iosNativeMessageHandler)?__im__iosNativeMessageHandler.postMessage(a):window.location=a)},nativeCallComplete:function(a){0==this.nativeCallQueue.length?this.nativeCallInFlight=!1:(a=this.nativeCallQueue.shift(),imIsObjValid(__im__iosNativeMessageHandler)?__im__iosNativeMessageHandler.postMessage(a):window.location=\na)}},IOSNativeCall=function(){this.urlScheme=\"\";this.executeNativeCall=function(a){if(imIsObjValid(__im__iosNativeMessageHandler)){e={};e.command=a;e.scheme=this.urlScheme;for(var b={},c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b[arguments[c]]=\"\"+d);e.params=b}else for(var e=this.urlScheme+\"://\"+a,d,b=!0,c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b?(e+=\"?\",b=!1):e+=\"&\",e+=arguments[c]+\"=\"+escape(d));__im__iosNativeCall.executeNativeCall(e);return\"OK\"};this.nativeCallComplete=\nfunction(a){__im__iosNativeCall.nativeCallComplete(a);return\"OK\"};this.updateKV=function(a,b){this[a]=b;var c=this.broadcastMap[a];c&&this.broadcastEvent(c,b)}};\n(function(){var a=window.mraidview={};a.orientationProperties={allowOrientationChange:!0,forceOrientation:\"none\",direction:\"right\"};var b=[],c=!1;a.detectAndBlockFraud=function(b){a.isPossibleFraud()&&a.fireRedirectFraudBeacon(b);return!1};a.popupBlocked=function(b){a.firePopupBlockedBeacon(b)};a.zeroPad=function(b){var a=\"\";10>b&&(a+=\"0\");return a+b};a.supports=function(b){console.log(\"bridge: supports (MRAID)\");if(\"string\"!=typeof b)window.mraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\n\"supports\");else return\"false\"!=sdkController.supports(\"window.mraidview\",b)};a.useCustomClose=function(b){try{sdkController.useCustomClose(\"window.mraidview\",b)}catch(a){imraidview.showAlert(\"use CustomClose: \"+a)}};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(b){imraidview.showAlert(\"close: \"+b)}};a.stackCommands=function(a,d){c?b.push(a):(eval(a),d&&(c=!0))};a.expand=function(b){try{\"undefined\"==typeof b&&(b=null),sdkController.expand(\"window.mraidview\",b)}catch(a){imraidview.showAlert(\"executeNativeExpand: \"+\na+\", URL = \"+b)}};a.setExpandProperties=function(b){try{b?this.props=b:b=null;if(\"undefined\"!=typeof b.lockOrientation&&null!=b.lockOrientation&&\"undefined\"!=typeof b.orientation&&null!=b.orientation){var c={};c.allowOrientationChange=!b.lockOrientation;c.forceOrientation=b.orientation;a.setOrientationProperties(c)}sdkController.setExpandProperties(\"window.mraidview\",a.stringify(b))}catch(f){imraidview.showAlert(\"executeNativesetExpandProperties: \"+f+\", props = \"+b)}};a.getExpandProperties=function(){try{return eval(\"(\"+\nsdkController.getExpandProperties(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getExpandProperties: \"+b)}};a.setOrientationProperties=function(b){try{b?(\"undefined\"!=typeof b.allowOrientationChange&&(a.orientationProperties.allowOrientationChange=b.allowOrientationChange),\"undefined\"!=typeof b.forceOrientation&&(a.orientationProperties.forceOrientation=b.forceOrientation)):b=null,sdkController.setOrientationProperties(\"window.mraidview\",a.stringify(a.orientationProperties))}catch(c){imraidview.showAlert(\"setOrientationProperties: \"+\nc+\", props = \"+b)}};a.getOrientationProperties=function(){return{forceOrientation:a.orientationProperties.forceOrientation,allowOrientationChange:a.orientationProperties.allowOrientationChange}};a.resizeProps=null;a.setResizeProperties=function(b){var c,f;try{c=parseInt(b.width);f=parseInt(b.height);if(isNaN(c)||isNaN(f)||1>c||1>f)throw\"Invalid\";b.width=c;b.height=f;a.resizeProps=b;sdkController.setResizeProperties(\"window.mraidview\",a.stringify(b))}catch(g){window.mraid.broadcastEvent(\"error\",\"Invalid properties.\",\n\"setResizeProperties\")}};a.getResizeProperties=function(){try{return eval(\"(\"+sdkController.getResizeProperties(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getResizeProperties: \"+b)}};a.open=function(b){\"undefined\"==typeof b&&(b=null);try{sdkController.open(\"window.mraidview\",b)}catch(a){imraidview.showAlert(\"open: \"+a)}};a.getScreenSize=function(){try{return eval(\"(\"+sdkController.getScreenSize(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getScreenSize: \"+b)}};a.getMaxSize=\nfunction(){try{return eval(\"(\"+sdkController.getMaxSize(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getMaxSize: \"+b)}};a.getCurrentPosition=function(){try{return eval(\"(\"+sdkController.getCurrentPosition(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getCurrentPosition: \"+b)}};a.getDefaultPosition=function(){try{return eval(\"(\"+sdkController.getDefaultPosition(\"window.mraidview\")+\")\")}catch(b){imraidview.showAlert(\"getDefaultPosition: \"+b)}};a.getState=function(){try{return String(sdkController.getState(\"window.mraidview\"))}catch(b){imraidview.showAlert(\"getState: \"+\nb)}};a.isViewable=function(){try{return sdkController.isViewable(\"window.mraidview\")}catch(b){imraidview.showAlert(\"isViewable: \"+b)}};a.getPlacementType=function(){return sdkController.getPlacementType(\"window.mraidview\")};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(b){imraidview.showAlert(\"close: \"+b)}};\"function\"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(b){return 0==this.indexOf(b)});a.playVideo=function(b){var a=\"\";null!=b&&(a=b);try{sdkController.playVideo(\"window.mraidview\",\na)}catch(c){imraidview.showAlert(\"playVideo: \"+c)}};a.stringify=function(b){if(\"undefined\"===typeof JSON){var c=\"\",f;if(\"undefined\"==typeof b.length)return a.stringifyArg(b);for(f=0;f<b.length;f++)0<f&&(c+=\",\"),c+=a.stringifyArg(b[f]);return c+\"]\"}return JSON.stringify(b)};a.stringifyArg=function(b){var a,c,g;c=typeof b;a=\"\";if(\"number\"===c||\"boolean\"===c)a+=args;else if(b instanceof Array)a=a+\"[\"+b+\"]\";else if(b instanceof Object){c=!0;a+=\"{\";for(g in b)null!==b[g]&&(c||(a+=\",\"),a=a+'\"'+g+'\":',c=\ntypeof b[g],a=\"number\"===c||\"boolean\"===c?a+b[g]:\"function\"===typeof b[g]?a+'\"\"':b[g]instanceof Object?a+this.stringify(args[i][g]):a+'\"'+b[g]+'\"',c=!1);a+=\"}\"}else b=b.replace(/\\\\/g,\"\\\\\\\\\"),b=b.replace(/\"/g,'\\\\\"'),a=a+'\"'+b+'\"';imraidview.showAlert(\"json:\"+a);return a};getPID=function(b){var a=\"\";null!=b&&(\"undefined\"!=typeof b.id&&null!=b.id)&&(a=b.id);return a};a.resize=function(){if(null==a.resizeProps)window.mraid.broadcastEvent(\"error\",\"Valid resize dimensions must be provided before calling resize\",\n\"resize\");else try{sdkController.resize(\"window.mraidview\")}catch(b){imraidview.showAlert(\"resize called in bridge\")}};a.storePicture=function(b){console.log(\"bridge: storePicture\");if(\"string\"!=typeof b)window.mraid.broadcastEvent(\"error\",\"storePicture method expects url as string parameter\",\"storePicture\");else{if(a.supports(\"storePicture\"))return!window.confirm(\"Do you want to download the file?\")?(window.mraid.broadcastEvent(\"error\",\"Store picture on \"+b+\" was cancelled by user.\",\"storePicture\"),\n!1):sdkController.storePicture(\"window.mraidview\",b);window.mraid.broadcastEvent(\"error\",\"Store picture on \"+b+\" was cancelled because it is unsupported in this device/app.\",\"storePicture\")}};a.fireMediaTrackingEvent=function(b,a){};a.fireMediaErrorEvent=function(b,a){};a.fireMediaTimeUpdateEvent=function(b,a,c){};a.fireMediaCloseEvent=function(b,a,c){};a.fireMediaVolumeChangeEvent=function(b,a,c){};a.broadcastEvent=function(){window.mraid.broadcastEvent.apply(window.mraid,arguments)}})();\n(function(){var a=window.mraid=new InmobiObj,b=window.mraidview,c=!1;b.isAdShownToUser=!1;b.onUserInteraction=function(){imraidview.onUserInteraction();c=!0};b.isPossibleFraud=function(){return a.supports(\"redirectFraudDetection\")&&(!b.isAdShownToUser||!c)};b.fireRedirectFraudBeacon=function(a){if(\"undefined\"!=typeof inmobi&&inmobi.recordEvent){var c={};c.trigger=a;c.isAdShown=b.isAdShownToUser.toString();inmobi.recordEvent(135,c)}};b.firePopupBlockedBeacon=function(b){if(\"undefined\"!=typeof inmobi&&\ninmobi.recordEvent){var a={};a.trigger=b;inmobi.recordEvent(136,a)}};window.onbeforeunload=function(){b.detectAndBlockFraud(\"redirect\")};a.addEventListener(\"viewableChange\",function(a){a&&!b.isAdShownToUser&&(b.isAdShownToUser=!0)});a.useCustomClose=b.useCustomClose;a.close=b.close;a.getExpandProperties=b.getExpandProperties;a.setExpandProperties=function(c){\"undefined\"!=typeof c&&(\"useCustomClose\"in c&&\"undefined\"!=typeof a.getState()&&\"expanded\"!=a.getState())&&a.useCustomClose(c.useCustomClose);\nb.setExpandProperties(c)};a.getResizeProperties=b.getResizeProperties;a.setResizeProperties=b.setResizeProperties;a.getOrientationProperties=b.getOrientationProperties;a.setOrientationProperties=b.setOrientationProperties;a.expand=b.expand;a.getMaxSize=b.getMaxSize;a.getState=b.getState;a.isViewable=b.isViewable;a.createCalendarEvent=function(b){window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"createCalendarEvent\")};a.open=function(c){b.detectAndBlockFraud(\"mraid.open\")||(\"string\"!=typeof c?\na.broadcastEvent(\"error\",\"URL is required.\",\"open\"):b.open(c))};a.resize=b.resize;a.getVersion=function(){return\"2.0\"};a.getPlacementType=b.getPlacementType;a.playVideo=function(a){b.playVideo(a)};a.getScreenSize=b.getScreenSize;a.getCurrentPosition=b.getCurrentPosition;a.getDefaultPosition=b.getDefaultPosition;a.supports=function(a){return b.supports(a)};a.storePicture=function(c){\"string\"!=typeof c?a.broadcastEvent(\"error\",\"Request must specify a valid URL\",\"storePicture\"):b.storePicture(c)}})();\n(function(){var a=window.imraidview={};a.setOrientationProperties=function(b){try{b?(\"undefined\"!=typeof b.allowOrientationChange&&(mraidview.orientationProperties.allowOrientationChange=b.allowOrientationChange),\"undefined\"!=typeof b.forceOrientation&&(mraidview.orientationProperties.forceOrientation=b.forceOrientation),\"undefined\"!=typeof b.direction&&(mraidview.orientationProperties.direction=b.direction)):b=null,sdkController.setOrientationProperties(\"window.imraidview\",mraidview.stringify(mraidview.orientationProperties))}catch(c){a.showAlert(\"setOrientationProperties: \"+\nc+\", props = \"+b)}};a.getOrientationProperties=function(){return mraidview.orientationProperties};a.firePostStatusEvent=function(b){window.imraid.broadcastEvent(\"postStatus\",b)};a.fireMediaTrackingEvent=function(b,a){var e={};e.name=b;var d=\"inmobi_media_\"+b;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(d=d+\"_\"+a);window.imraid.broadcastEvent(d,e)};a.fireMediaErrorEvent=function(b,a){var e={name:\"error\"};e.code=a;var d=\"inmobi_media_\"+e.name;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(d=d+\"_\"+b);window.imraid.broadcastEvent(d,\ne)};a.fireMediaTimeUpdateEvent=function(b,a,e){var d={name:\"timeupdate\",target:{}};d.target.currentTime=a;d.target.duration=e;a=\"inmobi_media_\"+d.name;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(a=a+\"_\"+b);window.imraid.broadcastEvent(a,d)};a.saveContent=function(b,a,e){window.imraid.addEventListener(\"saveContent_\"+b,e);sdkController.saveContent(\"window.imraidview\",b,a)};a.cancelSaveContent=function(b){sdkController.cancelSaveContent(\"window.imraidview\",b)};a.disableCloseRegion=function(b){sdkController.disableCloseRegion(\"window.imraidview\",\nb)};a.fireGalleryImageSelectedEvent=function(b,a,e){var d=new Image;d.src=\"data:image/jpeg;base64,\"+b;d.width=a;d.height=e;window.imraid.broadcastEvent(\"galleryImageSelected\",d)};a.fireCameraPictureCatpturedEvent=function(b,a,e){var d=new Image;d.src=\"data:image/jpeg;base64,\"+b;d.width=a;d.height=e;window.imraid.broadcastEvent(\"cameraPictureCaptured\",d)};a.fireMediaCloseEvent=function(b,a,e){var d={name:\"close\"};d.viaUserInteraction=a;d.target={};d.target.currentTime=e;a=\"inmobi_media_\"+d.name;\"undefined\"!=\ntypeof b&&(null!=b&&\"\"!=b)&&(a=a+\"_\"+b);window.imraid.broadcastEvent(a,d)};a.fireMediaVolumeChangeEvent=function(b,a,e){var d={name:\"volumechange\",target:{}};d.target.volume=a;d.target.muted=e;a=\"inmobi_media_\"+d.name;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(a=a+\"_\"+b);window.imraid.broadcastEvent(a,d)};a.fireDeviceMuteChangeEvent=function(b){window.imraid.broadcastEvent(\"deviceMuted\",b)};a.fireDeviceVolumeChangeEvent=function(b){window.imraid.broadcastEvent(\"deviceVolumeChange\",b)};a.fireHeadphonePluggedEvent=\nfunction(b){window.imraid.broadcastEvent(\"headphones\",b)};a.showAlert=function(b){sdkController.showAlert(\"window.imraidview\",b)};a.openExternal=function(b,c){try{600<=getSdkVersionInt()?sdkController.openExternal(\"window.imraidview\",b,c):sdkController.openExternal(\"window.imraidview\",b)}catch(e){a.showAlert(\"openExternal: \"+e)}};a.log=function(b){try{sdkController.log(\"window.imraidview\",b)}catch(c){a.showAlert(\"log: \"+c)}};a.getPlatform=function(){return\"android\"};a.asyncPing=function(b){try{sdkController.asyncPing(\"window.imraidview\",\nb)}catch(c){a.showAlert(\"asyncPing: \"+c)}};a.startListeningDeviceMuteEvents=function(){sdkController.registerDeviceMuteEventListener(\"window.imraidview\")};a.stopListeningDeviceMuteEvents=function(){sdkController.unregisterDeviceMuteEventListener(\"window.imraidview\")};a.startListeningDeviceVolumeChange=function(){sdkController.registerDeviceVolumeChangeEventListener(\"window.imraidview\")};a.stopListeningDeviceVolumeChange=function(){sdkController.unregisterDeviceVolumeChangeEventListener(\"window.imraidview\")};\na.startListeningHeadphonePluggedEvents=function(){sdkController.registerHeadphonePluggedEventListener(\"window.imraidview\")};a.stopListeningHeadphonePluggedEvents=function(){sdkController.unregisterHeadphonePluggedEventListener(\"window.imraidview\")};getSdkVersionInt=function(){for(var b=a.getSdkVersion().split(\".\"),c=b.length,e=\"\",d=0;d<c;d++)e+=b[d];return parseInt(e)};a.getSdkVersion=function(){return window._im_imaiview.getSdkVersion()};a.supports=function(b){console.log(\"bridge: supports (IMRAID)\");\nif(\"string\"!=typeof b)window.imraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\"supports\");else return\"false\"!=sdkController.supports(\"window.imraidview\",b)};a.postToSocial=function(b,c,e,d){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"postToSocial\");a.log(\"Method postToSocial not supported\")};a.incentCompleted=function(b){if(\"object\"!=typeof b||null==b)sdkController.incentCompleted(\"window.imraidview\",null);else try{sdkController.incentCompleted(\"window.imraidview\",\nJSON.stringify(b))}catch(a){sdkController.incentCompleted(\"window.imraidview\",null)}};a.getOrientation=function(){try{return String(sdkController.getOrientation(\"window.imraidview\"))}catch(b){a.showAlert(\"getOrientation: \"+b)}};a.acceptAction=function(b){try{sdkController.acceptAction(\"window.imraidview\",mraidview.stringify(b))}catch(c){a.showAlert(\"acceptAction: \"+c+\", params = \"+b)}};a.rejectAction=function(b){try{sdkController.rejectAction(\"window.imraidview\",mraidview.stringify(b))}catch(c){a.showAlert(\"rejectAction: \"+\nc+\", params = \"+b)}};a.updateToPassbook=function(b){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"updateToPassbook\");a.log(\"Method not supported\")};a.isDeviceMuted=function(){return\"false\"!=sdkController.isDeviceMuted(\"window.imraidview\")};a.getDeviceVolume=function(){return 603>=getSdkVersionInt()?-1:sdkController.getDeviceVolume(\"window.imraidview\")};a.isHeadPhonesPlugged=function(){return\"false\"!=sdkController.isHeadphonePlugged(\"window.imraidview\")};a.sendSaveContentResult=function(){window.imraid.sendSaveContentResult.apply(window.imraid,\narguments)};a.broadcastEvent=function(){window.imraid.broadcastEvent.apply(window.imraid,arguments)};a.disableBackButton=function(b){void 0==b||\"boolean\"!=typeof b?console.log(\"disableBackButton called with invalid params\"):sdkController.disableBackButton(\"window.imraidview\",b)};a.isBackButtonDisabled=function(){return sdkController.isBackButtonDisabled(\"window.imraidview\")};a.startListeningForBackButtonPressedEvent=function(){sdkController.registerBackButtonPressedEventListener(\"window.imraidview\")};\na.stopListeningForBackButtonPressedEvent=function(){sdkController.unregisterBackButtonPressedEventListener(\"window.imraidview\")};a.hideStatusBar=function(){};a.setOpaqueBackground=function(){};a.startDownloader=function(b,a,e){682<=getSdkVersionInt()&&sdkController.startDownloader(\"window.imraidview\",b,a,e)};a.registerDownloaderCallbacks=function(){682<=getSdkVersionInt()&&sdkController.registerDownloaderCallbacks(\"window.imraidview\")};a.unregisterDownloaderCallbacks=function(){682<=getSdkVersionInt()&&\nsdkController.unregisterDownloaderCallbacks(\"window.imraidview\")};a.getDownloadProgress=function(){return 682<=getSdkVersionInt()?sdkController.getDownloadProgress(\"window.imraidview\"):-1};a.getDownloadStatus=function(){return 682<=getSdkVersionInt()?sdkController.getDownloadStatus(\"window.imraidview\"):-1};a.fireEvent=function(b){700<=getSdkVersionInt()&&(\"fireSkip\"===b?sdkController.fireSkip(\"window.imraidview\"):\"fireComplete\"===b?sdkController.fireComplete(\"window.imraidview\"):\"showEndCard\"===b&&\nsdkController.showEndCard(\"window.imraidview\"))};a.saveBlob=function(b){700<=getSdkVersionInt()&&sdkController.saveBlob(\"window.imraidview\",b)};a.getBlob=function(b,a){700<=getSdkVersionInt()&&sdkController.getBlob(b,a)};a.setCloseEndCardTracker=function(b){700<=getSdkVersionInt()&&sdkController.setCloseEndCardTracker(\"window.imraidview\",b)};a.getRenderableAdIndexes=function(){try{if(917<=getSdkVersionInt())return sdkController.getRenderableAdIndexes(\"window.imraidview\")}catch(b){}return\"[]\"};a.getCurrentRenderingIndex=\nfunction(){try{if(917<=getSdkVersionInt())return sdkController.getCurrentRenderingIndex(\"window.imraidview\")}catch(b){}return-1};a.showAd=function(b){try{917<=getSdkVersionInt()&&sdkController.showAd(\"window.imraidview\",b)}catch(a){}};a.timeSinceShow=function(){try{if(917<=getSdkVersionInt())return sdkController.timeSinceShow(\"window.imraidview\")}catch(b){}return-1};a.getShowTimeStamp=function(){try{if(917<=getSdkVersionInt())return sdkController.getShowTimeStamp(\"window.imraidview\")}catch(b){}return-1};\na.closeAll=function(){try{917<=getSdkVersionInt()&&sdkController.closeAll(\"window.imraidview\")}catch(b){}};a.loadAd=function(b){try{917<=getSdkVersionInt()&&sdkController.loadAd(\"window.imraidview\",b)}catch(a){}};a.setAdContext=function(b){try{917<=getSdkVersionInt()&&sdkController.setAdContext(\"window.imraidview\",b)}catch(a){}};a.getAdContext=function(){try{if(917<=getSdkVersionInt())return sdkController.getAdContext(\"window.imraidview\")}catch(b){}return\"\"};a.openWithoutTracker=function(b){try{\"undefined\"==\ntypeof b&&(b=null),sdkController.openWithoutTracker(\"window.imraidview\",b)}catch(a){}};a.impressionRendered=function(){window.imraid.broadcastEvent(\"impressionRendered\")};a.customExpand=function(b,c,e,d,f){try{void 0==e||\"number\"!=typeof e?console.log(\"screenPercentage called with invalid params\"):void 0==c||\"number\"!=typeof c?console.log(\"inputType called with invalid params\"):void 0==d||\"boolean\"!=typeof d?console.log(\"topNavBarVisible called with invalid params\"):void 0==f||\"boolean\"!=typeof f?\nconsole.log(\"bottomNavBarVisible called with invalid params\"):sdkController.customExpand(\"window.imraidview\",b,c,e,d,f)}catch(g){a.showAlert(\"executeNativeCustomExpand: \"+g+\", input = \"+b+\", inputType = \"+c+\", screenPercentage = \"+e+\", bottomNavBarVisible = \"+f+\", topNavBarVisible = \"+d)}};a.closeCustomExpand=function(){try{sdkController.closeCustomExpand(\"window.imraidview\")}catch(b){}};a.onGestureDetected=function(b,a){window.imraid.broadcastEvent(\"onGestureDetected\",b,a)};a.onUserLandingCompleted=\nfunction(){window.imraid.broadcastEvent(\"onUserLandingCompleted\")};a.onUserInteraction=function(){window.imraid.broadcastEvent(\"onUserInteraction\")};a.impressionFired=function(){try{sdkController.impressionFired(\"window.imraidview\")}catch(b){}};a.getMaxDeviceVolume=function(){try{return sdkController.getMaxDeviceVolume(\"window.imraidview\")}catch(b){return 15}};a.zoom=function(b){try{sdkController.zoom(\"window.imraidview\",b)}catch(a){}};a.onAudioStateChanged=function(b){try{sdkController.onAudioStateChanged(\"window.imraidview\",\nb)}catch(a){}};a.submitAdReport=function(b){try{sdkController.submitAdReport(\"window.imraidview\",void 0!=b.adQualityUrl?b.adQualityUrl:null,void 0!=b.enableUserAdReportScreenshot?b.enableUserAdReportScreenshot:null,void 0!=b.templateInfo?b.templateInfo:null)}catch(a){}};a.onUserAudioMuteInteraction=function(b){try{sdkController.onUserAudioMuteInteraction(\"window.imraidview\",b)}catch(a){}}})();\n(function(){var a=window.imraid=new InmobiObj,b=window.imraidview;a.getOrientation=b.getOrientation;a.setOrientationProperties=b.setOrientationProperties;a.getOrientationProperties=b.getOrientationProperties;a.saveContentIDMap={};a.saveContent=function(c,e,d){var f=arguments.length,g,h=null;if(3>f){if(\"function\"===typeof arguments[f-1])g=arguments[f-1];else return;h={reason:1}}else a.saveContentIDMap[c]&&(g=arguments[2],h={reason:11,url:arguments[1]});\"function\"!==!g&&(h?(window.imraid.addEventListener(\"saveContent_failed_\"+\nc,g),window.imraid.sendSaveContentResult(\"saveContent_failed_\"+c,\"failed\",JSON.stringify(h))):(a.removeEventListener(\"saveContent_\"+c),a.saveContentIDMap[c]=!0,b.saveContent(c,e,d)))};a.cancelSaveContent=function(a){b.cancelSaveContent(a)};a.asyncPing=function(c){\"string\"!=typeof c?a.broadcastEvent(\"error\",\"URL is required.\",\"asyncPing\"):b.asyncPing(c)};a.disableCloseRegion=b.disableCloseRegion;a.getSdkVersion=b.getSdkVersion;a.log=function(c){\"undefined\"==typeof c?a.broadcastEvent(\"error\",\"message is required.\",\n\"log\"):\"string\"==typeof c?b.log(c):b.log(JSON.stringify(c))};a.getInMobiAIVersion=function(){return\"2.0\"};a.getVendorName=function(){return\"inmobi\"};a.openExternal=function(a,e){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imraid.openExternal\")||b.openExternal(a,e)};a.updateToPassbook=function(c){mraidview.detectAndBlockFraud(\"imraid.updateToPassbook\")||(\"string\"!=typeof c?a.broadcastEvent(\"error\",\"Request must specify a valid URL\",\"updateToPassbook\"):\nb.updateToPassbook(c))};a.postToSocial=function(a,e,d,f){mraidview.detectAndBlockFraud(\"imraid.postToSocial\")||b.postToSocial(a,e,d,f)};a.getPlatform=b.getPlatform;a.incentCompleted=b.incentCompleted;a.loadSKStore=b.loadSKStore;a.showSKStore=function(a){mraidview.detectAndBlockFraud(\"imraid.showSKStore\")||b.showSKStore(a)};a.skoverlay=b.skoverlay;a.skoverlayWithSkan=b.skoverlayWithSkan;a.zoom=b.zoom;a.dismissSKOverlay=b.dismissSKOverlay;a.supports=function(a){return b.supports(a)};a.isDeviceMuted=\nfunction(){return!imIsObjValid(a.listeners.deviceMuted)?-1:b.isDeviceMuted()};a.isHeadPhonesPlugged=function(){return!imIsObjValid(a.listeners.headphones)?!1:b.isHeadPhonesPlugged()};a.getDeviceVolume=function(){return b.getDeviceVolume()};a.setDeviceVolume=function(a){b.setDeviceVolume(a)};a.hideStatusBar=function(){b.hideStatusBar()};a.setOpaqueBackground=function(){b.setOpaqueBackground()};a.getRenderableAdIndexes=b.getRenderableAdIndexes;a.getCurrentRenderingIndex=b.getCurrentRenderingIndex;a.showAd=\nb.showAd;a.timeSinceShow=b.timeSinceShow;a.closeAll=b.closeAll;a.loadAd=b.loadAd;a.setAdContext=b.setAdContext;a.getAdContext=b.getAdContext;a.getShowTimeStamp=b.getShowTimeStamp;a.disableBackButton=b.disableBackButton;a.isBackButtonDisabled=b.isBackButtonDisabled;a.startDownloader=b.startDownloader;a.getDownloadProgress=b.getDownloadProgress;a.getDownloadStatus=b.getDownloadStatus;a.fireEvent=b.fireEvent;a.saveBlob=b.saveBlob;a.getBlob=b.getBlob;a.setCloseEndCardTracker=b.setCloseEndCardTracker;\na.openWithoutTracker=b.openWithoutTracker;a.impressionRendered=b.impressionRendered;a.onGestureDetected=b.onGestureDetected;a.onUserLandingCompleted=b.onUserLandingCompleted;a.customExpand=b.customExpand;a.closeCustomExpand=b.closeCustomExpand;a.impressionFired=b.impressionFired;a.getImraidVersion=b.getImraidVersion;a.getMaxDeviceVolume=b.getMaxDeviceVolume;a.onAudioStateChanged=b.onAudioStateChanged;a.onUserAudioMuteInteraction=b.onUserAudioMuteInteraction;a.submitAdReport=b.submitAdReport})();\n(function(){var a=window._im_imaiview={ios:{}};window.imaiview=a;a.broadcastEvent=function(){for(var a=Array(arguments.length),c=0;c<arguments.length;c++)a[c]=arguments[c];c=a.shift();try{window.mraid.broadcastEvent(c,a)}catch(e){}};a.getPlatform=function(){return\"android\"};a.getPlatformVersion=function(){return sdkController.getPlatformVersion(\"window.imaiview\")};a.log=function(a){sdkController.log(\"window.imaiview\",a)};a.openEmbedded=function(a){sdkController.openEmbedded(\"window.imaiview\",a)};\na.openExternal=function(a,c){600<=getSdkVersionInt()?sdkController.openExternal(\"window.imaiview\",a,c):sdkController.openExternal(\"window.imaiview\",a)};a.ping=function(a,c){sdkController.ping(\"window.imaiview\",a,c)};a.pingInWebView=function(a,c){sdkController.pingInWebView(\"window.imaiview\",a,c)};a.getSdkVersion=function(){try{var a=sdkController.getSdkVersion(\"window.imaiview\");if(\"string\"==typeof a&&null!=a)return a}catch(c){return\"3.7.0\"}};a.onUserInteraction=function(a){if(\"object\"!=typeof a||\nnull==a)sdkController.onUserInteraction(\"window.imaiview\",null);else try{sdkController.onUserInteraction(\"window.imaiview\",JSON.stringify(a))}catch(c){sdkController.onUserInteraction(\"window.imaiview\",null)}};a.fireAdReady=function(){sdkController.fireAdReady(\"window.imaiview\")};a.fireAdFailed=function(){sdkController.fireAdFailed(\"window.imaiview\")};a.broadcastEvent=function(){window.imai.broadcastEvent.apply(window.imai,arguments)}})();\n(function(){var a=window._im_imaiview;window._im_imai=new InmobiObj;window._im_imai.ios=new InmobiObj;var b=window._im_imai;window.imai=window._im_imai;b.matchString=function(a,b){if(\"string\"!=typeof a||null==a||null==b)return-1;var d=-1;try{d=a.indexOf(b)}catch(f){}return d};b.isHttpUrl=function(a){return\"string\"!=typeof a||null==a?!1:0==b.matchString(a,\"http://\")?!0:0==b.matchString(a,\"https://\")?!0:!1};b.appendTapParams=function(a,e,d){if(!imIsObjValid(e)||!imIsObjValid(d))return a;b.isHttpUrl(a)&&\n(a=-1==b.matchString(a,\"?\")?a+(\"?u-tap-o=\"+e+\",\"+d):a+(\"&u-tap-o=\"+e+\",\"+d));return a};b.performAdClick=function(a,e){e=e||event;if(imIsObjValid(a)){var d=a.clickConfig,f=a.landingConfig;if(!imIsObjValid(d)&&!imIsObjValid(f))b.log(\"click/landing config are invalid, Nothing to process .\"),this.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");else{var g=null,h=null,k=null,m=null,n=null,l=null,q=null,p=null;if(imIsObjValid(e))try{m=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY}catch(r){n=\nm=0}imIsObjValid(f)?imIsObjValid(d)?(l=f.url,q=f.fallbackUrl,p=f.urlType,g=d.url,h=d.pingWV,k=d.fr):(l=f.url,p=f.urlType):(l=d.url,p=d.urlType);d=b.getPlatform();try{if(\"boolean\"!=typeof k&&\"number\"!=typeof k||null==k)k=!0;if(0>k||1<k)k=!0;if(\"boolean\"!=typeof h&&\"number\"!=typeof h||null==h)h=!0;if(0>h||1<h)h=!0;if(\"number\"!=typeof p||null==p)p=0;g=b.appendTapParams(g,m,n);imIsObjValid(g)?!0==h?b.pingInWebView(g,k):b.ping(g,k):b.log(\"clickurl provided is null.\");if(imIsObjValid(l))switch(imIsObjValid(g)||\n(l=b.appendTapParams(l,m,n)),p){case 1:b.openEmbedded(l);break;case 2:\"ios\"==d?b.ios.openItunesProductView(l):this.broadcastEvent(\"error\",\"Cannot process openItunesProductView for os\"+d);break;default:b.openExternal(l,q)}else b.log(\"Landing url provided is null.\")}catch(s){}}}else b.log(\" invalid config, nothing to process .\"),this.broadcastEvent(\"error\",\"invalid config, nothing to process .\")};b.performActionClick=function(a,e){e=e||event;if(imIsObjValid(a)){var d=a.clickConfig,f=a.landingConfig;\nif(!imIsObjValid(d)&&!imIsObjValid(f))b.log(\"click/landing config are invalid, Nothing to process .\"),this.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");else{var g=null,h=null,k=null,m=null,n=null;if(imIsObjValid(e))try{m=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY}catch(l){n=m=0}imIsObjValid(d)&&(g=d.url,h=d.pingWV,k=d.fr);try{if(\"boolean\"!=typeof k&&\"number\"!=typeof k||null==k)k=!0;if(0>k||1<k)k=!0;if(\"boolean\"!=typeof h&&\"number\"!=typeof h||null==h)h=\n!0;if(0>h||1<h)h=!0;g=b.appendTapParams(g,m,n);imIsObjValid(g)?!0==h?b.pingInWebView(g,k):b.ping(g,k):b.log(\"clickurl provided is null.\");b.onUserInteraction(f)}catch(q){}}}else b.log(\" invalid config, nothing to process .\"),this.broadcastEvent(\"error\",\"invalid config, nothing to process .\")};b.getVersion=function(){return\"1.0\"};b.getPlatform=a.getPlatform;b.getPlatformVersion=a.getPlatformVersion;b.log=a.log;b.openEmbedded=function(b){console.log(\"openEmbedded is deprecated, will be removed in future version\");\nmraidview.detectAndBlockFraud(\"imai.openEmbedded\")||a.openEmbedded(b)};b.openExternal=function(b,e){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imai.openExternal\")||a.openExternal(b,e)};b.ping=a.ping;b.pingInWebView=a.pingInWebView;b.onUserInteraction=a.onUserInteraction;b.getSdkVersion=a.getSdkVersion;b.loadSKStore=a.loadSKStore;b.showSKStore=function(b){mraidview.detectAndBlockFraud(\"imai.showSKStore\")||a.showSKStore(b)};b.ios.openItunesProductView=\nfunction(b){mraidview.detectAndBlockFraud(\"imai.ios.openItunesProductView\")||a.ios.openItunesProductView(b)};b.fireAdReady=a.fireAdReady;b.fireAdFailed=a.fireAdFailed})();");
        String sb2 = sb.toString();
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        return sb2;
    }

    public final d9 getOrientationProperties() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("getOrientationProperties ", this);
        return this.q0;
    }

    public final w9 getOriginalRenderView() {
        return this.h;
    }

    public final FrameLayout getOverlayLayout() {
        return this.O;
    }

    public final long getPlacementId() {
        return this.M;
    }

    @Override
    public byte getPlacementType() {
        return this.f5741a;
    }

    public com.inmobi.media.h getReferenceContainer() {
        return this.S;
    }

    public final JSONArray getRenderableAdIndexes() {
        x xVar = this.V;
        JSONArray d2 = xVar == null ? null : xVar.d();
        return d2 == null ? new JSONArray() : d2;
    }

    public final AdConfig.RenderingConfig getRenderingConfig() {
        AdConfig adConfig = this.p;
        if (adConfig == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            adConfig = null;
        }
        return adConfig.getRendering();
    }

    public final da getResizeProperties() {
        return this.t;
    }

    public final long getShowTimeStamp() {
        x xVar = this.V;
        if (xVar == null) {
            return 0L;
        }
        return xVar.c();
    }

    public Map<String, m0> getTelemetryManagerMap() {
        return this.t0;
    }

    public db getTelemetryOnAdImpression() {
        Map<String, m0> telemetryManagerMap = getTelemetryManagerMap();
        return new db(telemetryManagerMap == null ? null : telemetryManagerMap.get("AdImpressionSuccessful"), getCreativeId(), getMarkupType());
    }

    public final long getTotalViewArea() {
        return this.g0;
    }

    public final nc getVISIBILITY_CHANGE_LISTENER() {
        return this.z0;
    }

    @Override
    public View getVideoContainerView() {
        return null;
    }

    public final String getViewState() {
        return this.l;
    }

    @Override
    public long getViewTouchTimestamp() {
        return this.f;
    }

    @Override
    public ic getViewableAd() {
        boolean z;
        String str;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("viewableAd getter ", this);
        if (this.W == null) {
            this.W = new e5(this, new jc(this), new n4(this.g, this.p0, this.i0, this.j0, getVisibilityTrackingMinPercentage()));
            Set<lb> set = this.f5742b;
            if (set != null) {
                for (lb lbVar : set) {
                    try {
                        if (lbVar.f5489a == 3) {
                            Object obj = lbVar.f5490b.get("omidAdSession");
                            h0 h0Var = obj instanceof h0 ? (h0) obj : null;
                            if (lbVar.f5490b.containsKey("deferred")) {
                                Object obj2 = lbVar.f5490b.get("deferred");
                                if (obj2 == null) {
                                    throw new NullPointerException("null cannot be cast to non-null type kotlin.Boolean");
                                    break;
                                } else if (((Boolean) obj2).booleanValue()) {
                                    z = true;
                                    Object obj3 = lbVar.f5490b.get("customReferenceData");
                                    str = obj3 instanceof String ? (String) obj3 : null;
                                    if (z && h0Var != null) {
                                        h0Var.a(w8.g.a(this, this.e0, str));
                                    }
                                    String TAG2 = F0;
                                    Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                                }
                            }
                            z = false;
                            Object obj32 = lbVar.f5490b.get("customReferenceData");
                            if (obj32 instanceof String) {
                            }
                            if (z) {
                                h0Var.a(w8.g.a(this, this.e0, str));
                            }
                            String TAG22 = F0;
                            Intrinsics.checkNotNullExpressionValue(TAG22, "TAG");
                        } else {
                            continue;
                        }
                    } catch (Exception e2) {
                        String TAG3 = F0;
                        Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                        Intrinsics.stringPlus("Exception occurred while creating the HTML viewable ad : ", e2.getMessage());
                    }
                }
            }
        }
        ic icVar = this.W;
        Intrinsics.checkNotNull(icVar);
        return icVar;
    }

    public final int[] getViewableFrameArray() {
        return this.f0;
    }

    public final void h() {
        Activity fullScreenActivity;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("finishFullScreenActivity ", this);
        InMobiAdActivity.h.a((Object) this);
        if (getFullScreenActivity() == null) {
            if (this.f5741a == 0) {
                setAndUpdateViewState("Default");
                w9 w9Var = this.h;
                if (w9Var != null) {
                    w9Var.setAndUpdateViewState("Default");
                }
            } else if (Intrinsics.areEqual("Default", this.l)) {
                setAndUpdateViewState("Hidden");
            }
            t();
            return;
        }
        x xVar = this.V;
        if (xVar != null && xVar.b(this)) {
            return;
        }
        Activity fullScreenActivity2 = getFullScreenActivity();
        if (fullScreenActivity2 == null) {
            throw new NullPointerException("null cannot be cast to non-null type com.inmobi.ads.rendering.InMobiAdActivity");
        }
        ((InMobiAdActivity) fullScreenActivity2).e = true;
        Activity fullScreenActivity3 = getFullScreenActivity();
        if (fullScreenActivity3 != null) {
            fullScreenActivity3.finish();
        }
        if (this.L == -1 || (fullScreenActivity = getFullScreenActivity()) == null) {
            return;
        }
        fullScreenActivity.overridePendingTransition(0, this.L);
    }

    public final void i() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireClickTrackers ", this);
        v2 v2Var = this.A0;
        if (v2Var != null) {
            v2Var.c();
        }
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireOnUserInteraction ", this);
        b("window.imraidview.onUserInteraction();");
        getListener().c(this);
    }

    public final void j() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireImpression ", this);
        if (Intrinsics.areEqual("video", this.p0) || Intrinsics.areEqual("audio", this.p0)) {
            return;
        }
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("recordContextualData ", this);
        v2 v2Var = this.A0;
        if (v2Var != null) {
            v2Var.a();
        }
        b("window.imraidview.impressionRendered();");
        getListener().d(this);
    }

    public boolean k() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        if (getRenderingConfig() == null) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return false;
        }
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        getViewTouchTimestamp();
        getRenderingConfig().getUserTouchResetTime();
        return !getRenderingConfig().getAutoRedirectionEnforcement() || this.U || ((getViewTouchTimestamp() > (-1L) ? 1 : (getViewTouchTimestamp() == (-1L) ? 0 : -1)) != 0 && ((SystemClock.elapsedRealtime() - getViewTouchTimestamp()) > getRenderingConfig().getUserTouchResetTime() ? 1 : ((SystemClock.elapsedRealtime() - getViewTouchTimestamp()) == getRenderingConfig().getUserTouchResetTime() ? 0 : -1)) < 0);
    }

    public final boolean l() {
        return this.A == mc.VISIBLE;
    }

    public final void m() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("processResizeRequest ", this);
        if (!Intrinsics.areEqual("Default", this.l) && !Intrinsics.areEqual("Resized", this.l)) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        } else if (this.t == null) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        } else {
            this.H = true;
            p6 p6Var = this.n;
            if (p6Var != null) {
                p6Var.a();
            }
            requestLayout();
            invalidate();
            setFocusable(true);
            setFocusableInTouchMode(true);
            requestFocus();
            setAndUpdateViewState("Resized");
            getListener().f(this);
            this.H = false;
        }
    }

    public final void n() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setCurrentPosition ", this);
        this.v = new JSONObject();
        int[] iArr = new int[2];
        getLocationOnScreen(iArr);
        try {
            JSONObject jSONObject = this.v;
            if (jSONObject != null) {
                jSONObject.put("x", m3.b(iArr[0]));
            }
            JSONObject jSONObject2 = this.v;
            if (jSONObject2 != null) {
                jSONObject2.put("y", m3.b(iArr[1]));
            }
            int b2 = m3.b(getWidth());
            int b3 = m3.b(getHeight());
            JSONObject jSONObject3 = this.v;
            if (jSONObject3 != null) {
                jSONObject3.put(ViewHierarchyConstants.DIMENSION_WIDTH_KEY, b2);
            }
            JSONObject jSONObject4 = this.v;
            if (jSONObject4 != null) {
                jSONObject4.put(ViewHierarchyConstants.DIMENSION_HEIGHT_KEY, b3);
            }
        } catch (JSONException unused) {
        }
        synchronized (this.G) {
            this.x = false;
            getCurrentPositionMonitor().notifyAll();
            Unit unit = Unit.INSTANCE;
        }
    }

    public final void o() {
        ViewGroup viewGroup;
        int width;
        WeakReference<ViewGroup> weakReference;
        ViewGroup viewGroup2;
        int height;
        JSONObject jSONObject;
        JSONObject jSONObject2;
        ViewGroup viewGroup3;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setDefaultPosition ", this);
        int[] iArr = new int[2];
        this.u = new JSONObject();
        if (this.j == null) {
            ViewParent parent = getParent();
            this.j = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
        }
        WeakReference<ViewGroup> weakReference2 = this.j;
        try {
            if ((weakReference2 != null ? weakReference2.get() : null) != null) {
                WeakReference<ViewGroup> weakReference3 = this.j;
                if (weakReference3 != null && (viewGroup3 = weakReference3.get()) != null) {
                    viewGroup3.getLocationOnScreen(iArr);
                }
                JSONObject jSONObject3 = this.u;
                if (jSONObject3 != null) {
                    jSONObject3.put("x", m3.b(iArr[0]));
                }
                JSONObject jSONObject4 = this.u;
                if (jSONObject4 != null) {
                    jSONObject4.put("y", m3.b(iArr[1]));
                }
                WeakReference<ViewGroup> weakReference4 = this.j;
                if (weakReference4 != null && (viewGroup = weakReference4.get()) != null) {
                    width = viewGroup.getWidth();
                    int b2 = m3.b(width);
                    weakReference = this.j;
                    if (weakReference != null && (viewGroup2 = weakReference.get()) != null) {
                        height = viewGroup2.getHeight();
                        int b3 = m3.b(height);
                        jSONObject = this.u;
                        if (jSONObject == null) {
                            jSONObject.put(ViewHierarchyConstants.DIMENSION_WIDTH_KEY, b2);
                        }
                        jSONObject2 = this.u;
                        if (jSONObject2 == null) {
                            jSONObject2.put(ViewHierarchyConstants.DIMENSION_HEIGHT_KEY, b3);
                        }
                    }
                    height = 0;
                    int b32 = m3.b(height);
                    jSONObject = this.u;
                    if (jSONObject == null) {
                    }
                    jSONObject2 = this.u;
                    if (jSONObject2 == null) {
                    }
                }
                width = 0;
                int b22 = m3.b(width);
                weakReference = this.j;
                if (weakReference != null) {
                    height = viewGroup2.getHeight();
                    int b322 = m3.b(height);
                    jSONObject = this.u;
                    if (jSONObject == null) {
                    }
                    jSONObject2 = this.u;
                    if (jSONObject2 == null) {
                    }
                }
                height = 0;
                int b3222 = m3.b(height);
                jSONObject = this.u;
                if (jSONObject == null) {
                }
                jSONObject2 = this.u;
                if (jSONObject2 == null) {
                }
            } else {
                JSONObject jSONObject5 = this.u;
                if (jSONObject5 != null) {
                    jSONObject5.put("x", 0);
                }
                JSONObject jSONObject6 = this.u;
                if (jSONObject6 != null) {
                    jSONObject6.put("y", 0);
                }
                JSONObject jSONObject7 = this.u;
                if (jSONObject7 != null) {
                    jSONObject7.put(ViewHierarchyConstants.DIMENSION_WIDTH_KEY, 0);
                }
                JSONObject jSONObject8 = this.u;
                if (jSONObject8 != null) {
                    jSONObject8.put(ViewHierarchyConstants.DIMENSION_HEIGHT_KEY, 0);
                }
            }
        } catch (JSONException unused) {
        }
        synchronized (this.F) {
            this.w = false;
            getDefaultPositionMonitor().notifyAll();
            Unit unit = Unit.INSTANCE;
        }
    }

    @Override
    public void onAttachedToWindow() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onAttachedToWindow ", this);
        super.onAttachedToWindow();
        o6 o6Var = this.o;
        if (o6Var != null) {
            g6 g6Var = o6Var.d;
            if (g6Var != null) {
                g6Var.a();
            }
            g6 g6Var2 = o6Var.e;
            if (g6Var2 != null) {
                g6Var2.a();
            }
            g6 g6Var3 = o6Var.f;
            if (g6Var3 != null) {
                g6Var3.a();
            }
        }
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setIsViewHardwareAccelerated ", this);
        this.q = isHardwareAccelerated();
        if (this.j == null) {
            ViewParent parent = getParent();
            this.j = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
        }
        if (this.c0) {
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            Intrinsics.stringPlus("triggerBitmapCheck ", this);
            if (this.a0) {
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                new t1(this, this).a(getListener().k().X());
            }
        }
    }

    @Override
    public void onDetachedFromWindow() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onDetachedFromWindow ", this);
        this.n0.e.clear();
        o6 o6Var = this.o;
        if (o6Var != null) {
            g6 g6Var = o6Var.d;
            if (g6Var != null) {
                g6Var.b();
            }
            g6 g6Var2 = o6Var.e;
            if (g6Var2 != null) {
                g6Var2.b();
            }
            g6 g6Var3 = o6Var.f;
            if (g6Var3 != null) {
                g6Var3.b();
            }
        }
        e0 e0Var = this.r0;
        if (e0Var == null) {
            Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
            e0Var = null;
        }
        e0Var.b();
        try {
            super.onDetachedFromWindow();
        } catch (IllegalArgumentException unused) {
            String TAG2 = F0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        }
    }

    @Override
    public boolean onDoubleTap(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        if (!getRenderingConfig().getSupportedGestures().contains(1)) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return false;
        }
        String TAG2 = F0;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        Intrinsics.stringPlus("onDoubleTapEvent detected \n ", e2);
        setViewTouchTimestamp(SystemClock.elapsedRealtime());
        if (e2.getAction() == 1) {
            JSONArray jSONArray = new JSONArray();
            try {
                jSONArray.put(e2.getX());
                jSONArray.put(e2.getY());
            } catch (JSONException unused) {
            }
            JSONArray jSONArray2 = new JSONArray();
            jSONArray2.put(jSONArray);
            b("window.imraidview.onGestureDetected('1', '" + jSONArray2 + "');");
        }
        return false;
    }

    @Override
    public boolean onDoubleTapEvent(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        return false;
    }

    @Override
    public boolean onDown(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        return false;
    }

    @Override
    public boolean onFling(MotionEvent e1, MotionEvent e2, float f2, float f3) {
        Intrinsics.checkNotNullParameter(e1, "e1");
        Intrinsics.checkNotNullParameter(e2, "e2");
        return false;
    }

    @Override
    public void onLongPress(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        if (!getRenderingConfig().getSupportedGestures().contains(5)) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return;
        }
        String TAG2 = F0;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        Intrinsics.stringPlus("onLongPress detected \n ", e2);
        JSONArray jSONArray = new JSONArray();
        try {
            jSONArray.put(e2.getX());
            jSONArray.put(e2.getY());
        } catch (JSONException unused) {
        }
        JSONArray jSONArray2 = new JSONArray();
        jSONArray2.put(jSONArray);
        b("window.imraidview.onGestureDetected('5', '" + jSONArray2 + "');");
    }

    @Override
    protected void onMeasure(int i, int i2) {
        if (1 == 0) {
            setMeasuredDimension(0, 0);
        } else {
            super.onMeasure(i, i2);
        }
    }

    @Override
    public boolean onScroll(MotionEvent e1, MotionEvent e2, float f2, float f3) {
        Intrinsics.checkNotNullParameter(e1, "e1");
        Intrinsics.checkNotNullParameter(e2, "e2");
        return false;
    }

    @Override
    public void onShowPress(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
    }

    @Override
    public boolean onSingleTapConfirmed(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        if (!getRenderingConfig().getSupportedGestures().contains(0)) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return false;
        }
        String TAG2 = F0;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        Intrinsics.stringPlus("onSingleTapConfirmed detected \n ", e2);
        JSONArray jSONArray = new JSONArray();
        try {
            jSONArray.put(e2.getX());
            jSONArray.put(e2.getY());
        } catch (JSONException unused) {
        }
        JSONArray jSONArray2 = new JSONArray();
        jSONArray2.put(jSONArray);
        b("window.imraidview.onGestureDetected('0', '" + jSONArray2 + "');");
        return false;
    }

    @Override
    public boolean onSingleTapUp(MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onSingleTapUp detected \n ", e2);
        setViewTouchTimestamp(SystemClock.elapsedRealtime());
        return false;
    }

    @Override
    public void onSizeChanged(int i, int i2, int i3, int i4) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onSizeChanged ", this);
        super.onSizeChanged(i, i2, i3, i4);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        if (i == 0 || i2 == 0) {
            return;
        }
        int b2 = m3.b(i);
        int b3 = m3.b(i2);
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireSizeChanged ", this);
        b("window.mraidview.broadcastEvent('sizeChange'," + b2 + ',' + b3 + ");");
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        float f2;
        float f3;
        float f4;
        Intrinsics.checkNotNullParameter(event, "event");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onTouchEvent ", this);
        if (this.f5741a == 1) {
            l6 l6Var = this.k0;
            l6Var.getClass();
            Intrinsics.checkNotNullParameter(event, "event");
            int actionMasked = event.getActionMasked();
            if (actionMasked == 0) {
                String TAG2 = l6Var.f5485b;
                Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                Intrinsics.stringPlus("ACTION_DOWN \n", event);
                l6Var.g = event.getPointerId(event.getActionIndex());
                l6Var.j = new JSONArray();
                JSONArray jSONArray = new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(event.getX()), Float.valueOf(event.getY())}));
                JSONArray jSONArray2 = l6Var.j;
                if (jSONArray2 != null) {
                    jSONArray2.put(jSONArray);
                }
            } else if (actionMasked != 1) {
                float f5 = 0.0f;
                if (actionMasked == 2) {
                    JSONArray jSONArray3 = l6Var.j;
                    int i = l6Var.g;
                    if (i != -1 && l6Var.h != -1) {
                        int findPointerIndex = event.findPointerIndex(i);
                        int findPointerIndex2 = event.findPointerIndex(l6Var.h);
                        if (findPointerIndex >= 0) {
                            f3 = event.getX(findPointerIndex);
                            f2 = event.getY(findPointerIndex);
                        } else {
                            z2 z2Var = z2.f5790a;
                            z2Var.a(new z1(new IllegalArgumentException("Index for mPtrID1=" + l6Var.g + " is " + findPointerIndex + " | Pointer count=" + event.getPointerCount())));
                            f2 = 0.0f;
                            f3 = 0.0f;
                        }
                        if (findPointerIndex2 >= 0) {
                            float x = event.getX(findPointerIndex2);
                            f5 = event.getY(findPointerIndex2);
                            f4 = x;
                        } else {
                            z2 z2Var2 = z2.f5790a;
                            z2Var2.a(new z1(new IllegalArgumentException("Index for mPtrID1=" + l6Var.h + " is " + findPointerIndex2 + " | Pointer count=" + event.getPointerCount())));
                            f4 = 0.0f;
                        }
                        float degrees = ((float) Math.toDegrees(((float) Math.atan2(l6Var.d - l6Var.f, l6Var.c - l6Var.e)) - ((float) Math.atan2(f5 - f2, f4 - f3)))) % 360;
                        if (degrees < -180.0f) {
                            degrees += 360.0f;
                        }
                        if (degrees > 180.0f) {
                            degrees -= 360.0f;
                        }
                        l6Var.i = Math.abs(degrees);
                    } else if (i != -1 && jSONArray3 != null && jSONArray3.length() > 0 && jSONArray3.length() < 50) {
                        try {
                            float x2 = event.getX();
                            float y = event.getY();
                            JSONArray jSONArray4 = jSONArray3.getJSONArray(jSONArray3.length() - 1);
                            JSONArray jSONArray5 = new JSONArray((Collection) CollectionsKt.listOf((Object[]) new Float[]{Float.valueOf(x2), Float.valueOf(y)}));
                            if (l6Var.a(jSONArray4.getInt(0), jSONArray5.getInt(0), jSONArray4.getInt(1), jSONArray5.getInt(1)) > 100) {
                                jSONArray3.put(jSONArray5);
                            }
                        } catch (JSONException unused) {
                        }
                    }
                } else if (actionMasked == 3) {
                    String TAG3 = l6Var.f5485b;
                    Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                    event.toString();
                    l6Var.g = -1;
                    l6Var.h = -1;
                } else if (actionMasked == 5) {
                    String TAG4 = l6Var.f5485b;
                    Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
                    Intrinsics.stringPlus("ACTION_POINTER_DOWN \n", event);
                    l6Var.h = event.getPointerId(event.getActionIndex());
                    l6Var.k = MotionEvent.obtain(event);
                    int findPointerIndex3 = event.findPointerIndex(l6Var.g);
                    int findPointerIndex4 = event.findPointerIndex(l6Var.h);
                    if (findPointerIndex3 >= 0) {
                        l6Var.e = event.getX(findPointerIndex3);
                        l6Var.f = event.getY(findPointerIndex3);
                    } else {
                        z2 z2Var3 = z2.f5790a;
                        z2Var3.a(new z1(new IllegalArgumentException("Index for mPtrID1=" + l6Var.g + " is " + findPointerIndex3 + " | Pointer count=" + event.getPointerCount())));
                    }
                    if (findPointerIndex4 >= 0) {
                        l6Var.c = event.getX(findPointerIndex4);
                        l6Var.d = event.getY(findPointerIndex4);
                    } else {
                        z2 z2Var4 = z2.f5790a;
                        z2Var4.a(new z1(new IllegalArgumentException("Index for mPtrID2=" + l6Var.h + " is " + findPointerIndex4 + " | Pointer count=" + event.getPointerCount())));
                    }
                    l6Var.l = l6Var.a(l6Var.e, l6Var.c, l6Var.f, l6Var.d);
                } else if (actionMasked == 6) {
                    String TAG5 = l6Var.f5485b;
                    Intrinsics.checkNotNullExpressionValue(TAG5, "TAG");
                    event.toString();
                    l6Var.h = -1;
                    if (l6Var.i > 30.0f) {
                        MotionEvent motionEvent = l6Var.k;
                        if (motionEvent != null) {
                            l6Var.f5484a.b(l6Var, motionEvent, event);
                        }
                        l6Var.i = 0.0f;
                    }
                    if (Math.abs(l6Var.a(event.getX(), event.getX(1), event.getY(), event.getY(1)) - l6Var.l) > 500) {
                        MotionEvent motionEvent2 = l6Var.k;
                        if (motionEvent2 != null) {
                            l6Var.f5484a.a(l6Var, motionEvent2, event);
                        }
                        l6Var.l = Integer.MAX_VALUE;
                    }
                }
            } else {
                String TAG6 = l6Var.f5485b;
                Intrinsics.checkNotNullExpressionValue(TAG6, "TAG");
                event.toString();
                l6Var.g = -1;
                JSONArray jSONArray6 = l6Var.j;
                if (jSONArray6 != null && jSONArray6.length() > 5) {
                    l6Var.f5484a.a(l6Var);
                    l6Var.j = new JSONArray();
                }
            }
        }
        this.l0.onTouchEvent(event);
        if (this.d) {
            setViewTouchTimestamp(SystemClock.elapsedRealtime());
        }
        return super.onTouchEvent(event);
    }

    @Override
    public void onWindowFocusChanged(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onWindowFocusChanged ", this);
        super.onWindowFocusChanged(z);
        boolean z2 = false;
        if (z) {
            if (isShown()) {
                n4.a aVar = (n4.a) n4.j;
                if (aVar.a(this, this, this.j0, null) && aVar.a(this, this, this.j0)) {
                    z = true;
                }
            }
            z = false;
        }
        if (Build.VERSION.SDK_INT > 23) {
            Activity fullScreenActivity = getFullScreenActivity();
            if (fullScreenActivity != null && fullScreenActivity.isInMultiWindowMode()) {
                z2 = true;
            }
            if (z2) {
                return;
            }
        }
        c(z);
    }

    @Override
    public void onWindowVisibilityChanged(int i) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("onWindowVisibilityChanged ", this);
        super.onWindowVisibilityChanged(i);
        boolean z = true;
        boolean z2 = i == 0;
        if (z2) {
            int visibilityTrackingMinPercentage = getVisibilityTrackingMinPercentage();
            if (isShown()) {
                n4.a aVar = (n4.a) n4.j;
                if (aVar.a(this, this, visibilityTrackingMinPercentage, null)) {
                }
            }
            z = false;
        } else {
            z = z2;
        }
        c(z);
    }

    public final void p() {
        int webImpressionMinPercentageViewed;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setFallbackImpressionMinPercentageViewed ", this);
        AdConfig adConfig = null;
        if (Intrinsics.areEqual("video", this.p0)) {
            AdConfig adConfig2 = this.p;
            if (adConfig2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig2;
            }
            webImpressionMinPercentageViewed = adConfig.getViewability().getVideoImpressionMinPercentageViewed();
        } else if (!Intrinsics.areEqual("audio", this.p0)) {
            AdConfig adConfig3 = this.p;
            if (adConfig3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig3;
            }
            webImpressionMinPercentageViewed = adConfig.getViewability().getWebImpressionMinPercentageViewed();
        } else if (Intrinsics.areEqual("audio", getAdType())) {
            AdConfig adConfig4 = this.p;
            if (adConfig4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig4;
            }
            webImpressionMinPercentageViewed = adConfig.getViewability().getAudioImpressionMinPercentageViewed();
        } else {
            AdConfig adConfig5 = this.p;
            if (adConfig5 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig5;
            }
            webImpressionMinPercentageViewed = adConfig.getViewability().getWebImpressionMinPercentageViewed();
        }
        this.j0 = webImpressionMinPercentageViewed;
    }

    public final void q() {
        int webImpressionMinTimeViewed;
        AdConfig adConfig = null;
        if (Intrinsics.areEqual("video", this.p0)) {
            AdConfig adConfig2 = this.p;
            if (adConfig2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig2;
            }
            webImpressionMinTimeViewed = adConfig.getViewability().getVideoImpressionMinTimeViewed();
        } else if (!Intrinsics.areEqual("audio", this.p0)) {
            AdConfig adConfig3 = this.p;
            if (adConfig3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig3;
            }
            webImpressionMinTimeViewed = adConfig.getViewability().getWebImpressionMinTimeViewed();
        } else if (Intrinsics.areEqual("audio", getAdType())) {
            AdConfig adConfig4 = this.p;
            if (adConfig4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig4;
            }
            webImpressionMinTimeViewed = adConfig.getViewability().getAudioImpressionMinTimeViewed();
        } else {
            AdConfig adConfig5 = this.p;
            if (adConfig5 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig5;
            }
            webImpressionMinTimeViewed = adConfig.getViewability().getWebImpressionMinTimeViewed();
        }
        this.i0 = webImpressionMinTimeViewed;
    }

    public final void r() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setFallbackImpressionParams ", this);
        q();
        p();
        s();
    }

    public final void s() {
        byte interstitialImpressionType;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setFallbackImpressionType ", this);
        String adType = getAdType();
        AdConfig adConfig = null;
        if (Intrinsics.areEqual(adType, "banner")) {
            AdConfig adConfig2 = this.p;
            if (adConfig2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig2;
            }
            interstitialImpressionType = adConfig.getViewability().getBannerImpressionType();
        } else if (Intrinsics.areEqual(adType, "audio")) {
            AdConfig adConfig3 = this.p;
            if (adConfig3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig3;
            }
            interstitialImpressionType = adConfig.getViewability().getAudioImpressionType();
        } else {
            AdConfig adConfig4 = this.p;
            if (adConfig4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
            } else {
                adConfig = adConfig4;
            }
            interstitialImpressionType = adConfig.getViewability().getInterstitialImpressionType();
        }
        this.g = interstitialImpressionType;
    }

    public final void setAdPodHandler(x xVar) {
        this.V = xVar;
    }

    public final void setAdSize(String adSize) {
        Intrinsics.checkNotNullParameter(adSize, "adSize");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setAdSize ", this);
        Object[] array = new Regex("x").split(adSize, 0).toArray(new String[0]);
        if (array == null) {
            throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
        }
        this.d0 = m3.a(Integer.parseInt(((String[]) array)[0]));
        Object[] array2 = new Regex("x").split(adSize, 0).toArray(new String[0]);
        if (array2 == null) {
            throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
        }
        this.g0 = m3.a(Integer.parseInt(((String[]) array2)[1])) * this.d0;
    }

    public void setAdType(String str) {
        this.Q = str;
    }

    public final void setAllowAutoRedirection(boolean z) {
        this.U = z;
    }

    public final void setAndUpdateViewState(String state) {
        Intrinsics.checkNotNullParameter(state, "state");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setAndUpdateViewState ", this);
        this.l = state;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("set state:", this.l);
        Locale ENGLISH = Locale.ENGLISH;
        Intrinsics.checkNotNullExpressionValue(ENGLISH, "ENGLISH");
        String lowerCase = state.toLowerCase(ENGLISH);
        Intrinsics.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("fireStateChange ", this);
        b("window.mraidview.broadcastEvent('stateChange','" + lowerCase + "');");
    }

    public final void setBlobProvider(w1 w1Var) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setBlobProvider ", this);
        this.R = w1Var;
    }

    public final void setCloseEndCardTracker(String url) {
        fc b2;
        yb c2;
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setCloseEndCardTracker ", this);
        com.inmobi.media.h referenceContainer = getReferenceContainer();
        if (!(referenceContainer instanceof a8) || url == null) {
            return;
        }
        a8 a8Var = (a8) referenceContainer;
        a8Var.getClass();
        Intrinsics.checkNotNullParameter(url, "url");
        String TAG2 = a8Var.T;
        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
        Intrinsics.stringPlus("Setting close end tracker with URL : ", url);
        View videoContainerView = a8Var.getVideoContainerView();
        if (videoContainerView instanceof e8) {
            Object tag = ((e8) videoContainerView).getVideoView().getTag();
            b8 b8Var = tag instanceof b8 ? (b8) tag : null;
            if (b8Var == null || (b2 = b8Var.b()) == null || (c2 = b2.c()) == null) {
                return;
            }
            c2.a(new x7(url, 0, "closeEndCard", null));
        }
    }

    public final void setCloseRegionDisabled(boolean z) {
        this.B = z;
    }

    public final void setContentURL(String str) {
        this.e0 = str;
    }

    public final void setContextualDataHandler(v2 v2Var) {
        this.A0 = v2Var;
    }

    public void setCreativeId(String str) {
        this.N = str;
    }

    public final void setDisableBackButton(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setDisableBackButton ", this);
        this.C = z;
    }

    public final void setEmbeddedBrowserJSCallbacks(q3 q3Var) {
        this.o0 = q3Var;
    }

    public void setExitAnimation(int i) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setExitAnimation ", this);
        this.L = i;
    }

    public final void setExpandProperties(e4 expandProperties) {
        Intrinsics.checkNotNullParameter(expandProperties, "expandProperties");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setExpandProperties ", this);
        if (expandProperties.d) {
            setUseCustomClose(expandProperties.c);
        }
        this.s = expandProperties;
    }

    @Override
    public void setFullScreenActivityContext(Activity activity) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setFullScreenActivityContext ", this);
        this.i = new WeakReference<>(activity);
        u();
    }

    public void setImpressionId(String str) {
        this.c = str;
    }

    public final void setLandingPageHandler(x5 x5Var) {
        Intrinsics.checkNotNullParameter(x5Var, "<set-?>");
        this.w0 = x5Var;
    }

    public final void setLandingScheme(String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        this.e = str;
    }

    public final void setMarkupTypeAdUnit(String str) {
        Intrinsics.checkNotNullParameter(str, "<set-?>");
        this.v0 = str;
    }

    public final void setOrientationProperties(d9 orientationProperties) {
        Intrinsics.checkNotNullParameter(orientationProperties, "orientationProperties");
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setOrientationProperties ", this);
        this.q0 = orientationProperties;
        u();
    }

    public final void setOriginalRenderView(w9 w9Var) {
        this.h = w9Var;
    }

    public final void setOverlayLayout(FrameLayout frameLayout) {
        this.O = frameLayout;
    }

    public final void setPlacementId(long j) {
        this.M = j;
    }

    public final void setPreloadView(boolean z) {
        this.T = z;
    }

    public void setReferenceContainer(com.inmobi.media.h hVar) {
        this.S = hVar;
    }

    public final void setRenderViewEventListener(y9 y9Var) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setRenderViewEventListener ", this);
        this.k = y9Var;
    }

    public final void setResizeProperties(da daVar) {
        this.t = daVar;
    }

    public final void setScrollable(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setScrollable ", this);
        setScrollContainer(z);
        setVerticalScrollBarEnabled(z);
        setHorizontalScrollBarEnabled(z);
    }

    public final void setShouldFireRenderBeacon(boolean z) {
        this.c0 = z;
    }

    public void setTelemetryManagerMap(Map<String, m0> map) {
        this.t0 = map;
    }

    public final void setTotalViewArea(long j) {
        this.g0 = getWidth() * getHeight();
    }

    public final void setUseCustomClose(boolean z) {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("setUseCustomClose ", this);
        this.y = z;
    }

    public void setViewTouchTimestamp(long j) {
        this.f = j;
    }

    public final void setWatermark(WatermarkData watermarkData) {
        Intrinsics.checkNotNullParameter(watermarkData, "watermarkData");
        if (!getAdConfig().getWatermarkEnabled()) {
            String TAG = F0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            return;
        }
        byte[] watermarkBytes = Base64.decode(watermarkData.getWatermarkBase64EncodedString(), 0);
        Intrinsics.checkNotNullExpressionValue(watermarkBytes, "decode(watermarkData.wat…roid.util.Base64.DEFAULT)");
        Context context = getContext();
        Intrinsics.checkNotNullExpressionValue(context, "context");
        float alpha = watermarkData.getAlpha();
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(watermarkBytes, "watermarkBytes");
        BitmapDrawable bitmapDrawable = new BitmapDrawable(BitmapFactory.decodeByteArray(watermarkBytes, 0, watermarkBytes.length));
        Shader.TileMode tileMode = Shader.TileMode.REPEAT;
        bitmapDrawable.setTileModeXY(tileMode, tileMode);
        bitmapDrawable.setTargetDensity(context.getResources().getDisplayMetrics());
        ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);
        FrameLayout frameLayout = new FrameLayout(context);
        frameLayout.setLayoutParams(layoutParams);
        frameLayout.setBackground(bitmapDrawable);
        frameLayout.setElevation(Float.MAX_VALUE);
        frameLayout.setAlpha(alpha);
        frameLayout.setClickable(false);
        frameLayout.setFocusable(false);
        this.O = frameLayout;
        getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public final void onGlobalLayout() {
                w9.m488setWatermark$lambda2(w9.this);
            }
        });
    }

    @Override
    public void stopLoading() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("stopLoading ", this);
        if (this.E.get()) {
            return;
        }
        super.stopLoading();
    }

    public final void t() {
        getListener().e(this);
        e0 e0Var = this.r0;
        if (e0Var == null) {
            Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
            e0Var = null;
        }
        e0Var.b();
    }

    public final void u() {
        String TAG = F0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.stringPlus("updateActivitiesOrientationProperties ", this);
        Activity activity = this.i.get();
        if (activity != null && (activity instanceof InMobiAdActivity)) {
            d9 orientationProperties = this.q0;
            Intrinsics.checkNotNullParameter(orientationProperties, "orientationProperties");
            x4 x4Var = ((InMobiAdActivity) activity).f5252a;
            if (x4Var == null) {
                Intrinsics.throwUninitializedPropertyAccessException("orientationHandler");
                x4Var = null;
            }
            x4Var.a(orientationProperties);
        }
    }
}