Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9

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


package com.inmobi.media;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
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.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.webkit.WebViewClient;
import android.widget.AbsoluteLayout;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.iab.omid.library.inmobi.Omid;
import com.iab.omid.library.inmobi.adsession.FriendlyObstructionPurpose;
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.eb;
import com.inmobi.media.i;
import com.inmobi.media.p7;
import com.inmobi.media.q4;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations;
import io.jsonwebtoken.JwtParser;
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.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@SuppressLint({"SetJavaScriptEnabled", "ViewConstructor", "ClickableViewAccessibility"})
public final class eb extends u1 implements i, y1, p7.a, GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, ka, bb {
    @NotNull
    public static final gb G0 = new a();
    public static final String H0 = "eb";
    public boolean A;
    @NotNull
    public final d A0;
    @NotNull
    public ee B;
    @NotNull
    public final fe B0;
    public boolean C;
    public w2 C0;
    public boolean D;
    @NotNull
    public final i.a D0;
    public String E;
    @NotNull
    public final WebChromeClient E0;
    @NotNull
    public final AtomicBoolean F;
    @NotNull
    public final b1 F0;
    @NotNull
    public final Object G;
    @NotNull
    public final Object H;
    public boolean I;
    public boolean J;
    public View K;
    public WebChromeClient.CustomViewCallback L;
    public int M;
    public long N;
    public String O;
    public FrameLayout P;
    @NotNull
    public final AtomicBoolean Q;
    public e5 R;
    public kb S;
    public String T;
    public Map<View, ? extends FriendlyObstructionPurpose> U;
    public x1 V;
    public i W;
    public boolean a0;
    public final byte b;
    public boolean b0;
    public final Set<cd> c;
    public y c0;
    public String d;
    public ae d0;
    public final boolean e;
    public boolean e0;
    @NotNull
    public String f;
    public int f0;
    public long g;
    public String g0;
    public byte h;
    public int[] h0;
    public eb i;
    public long i0;
    @NotNull
    public WeakReference<Activity> j;
    public int j0;
    public WeakReference<ViewGroup> k;
    public int k0;
    public gb l;
    public int l0;
    @NotNull
    public String m;
    @NotNull
    public final p7 m0;
    public q7 n;
    @NotNull
    public final GestureDetector n0;
    public t7 o;
    public boolean o0;
    public s7 p;
    @NotNull
    public final fb p0;
    public AdConfig q;
    public t3 q0;
    public boolean r;
    public String r0;
    public boolean s;
    @NotNull
    public ja s0;
    public h4 t;
    public f0 t0;
    public ob u;
    @NotNull
    public final AtomicBoolean u0;
    public JSONObject v;
    public final boolean v0;
    public JSONObject w;
    public Map<String, n0> w0;
    public boolean x;
    @NotNull
    public final c x0;
    public boolean y;
    @NotNull
    public String y0;
    public boolean z;
    @NotNull
    public final e z0;

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

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

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

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

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

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

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

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

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

        @Override
        public void a() {
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "onCCTScreenDismissed");
            }
            eb.this.x();
        }

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

        @Override
        public void b() {
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "onCCTScreenDisplayed");
            }
            eb.this.getListener().f(eb.this);
            eb.a(eb.this, null, null, null);
        }
    }

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

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

        @Override
        public void a(@NotNull Intent intent) {
            Intrinsics.checkNotNullParameter(intent, "intent");
            intent.putExtra("creativeId", eb.this.getCreativeId());
            intent.putExtra("impressionId", eb.this.getImpressionId());
            InMobiAdActivity.a aVar = InMobiAdActivity.j;
            eb ebVar = eb.this;
            InMobiAdActivity.l = ebVar;
            bc.a.a(ebVar.getContainerContext(), intent);
        }

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

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

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

        @Override
        public void a() {
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "onAdScreenDisplayFailed");
            }
            eb.this.getListener().h();
        }

        @Override
        public void a(Object obj) {
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "onAdScreenDisplayed");
            }
            eb ebVar = eb.this;
            if (ebVar.b == 0) {
                if (ebVar.getOriginalRenderView() != null) {
                    eb originalRenderView = eb.this.getOriginalRenderView();
                    if (originalRenderView != null) {
                        originalRenderView.setAndUpdateViewState("Expanded");
                    }
                } else {
                    eb.this.setAndUpdateViewState("Expanded");
                }
                eb.this.I = false;
            }
            eb.this.getListener().f(eb.this);
        }

        @Override
        public void b(Object obj) {
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "onAdScreenDismissed");
            }
            eb ebVar = eb.this;
            if (ebVar.b == 0) {
                ebVar.setAndUpdateViewState("Default");
                eb originalRenderView = eb.this.getOriginalRenderView();
                if (originalRenderView != null) {
                    originalRenderView.setAndUpdateViewState("Default");
                }
            } else if (Intrinsics.c("Default", ebVar.getViewState())) {
                eb.this.setAndUpdateViewState("Hidden");
            }
            eb.this.x();
        }
    }

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

        @Override
        public void a(@NotNull com.inmobi.media.g 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) + "\");";
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, Intrinsics.l(str, "Success injection "));
            }
            eb.this.a(assetBatch.c, str);
        }

        @Override
        public void a(@NotNull com.inmobi.media.g assetBatch, byte b) {
            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).b);
                jSONObject.put("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', \"" + myobfuscated.mn2.k.r(jSONObject2, "\"", "\\\"", false) + "\");";
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.b(TAG, Intrinsics.l(str, "Failure injection "));
            }
            eb.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(eb this$0, h this$1, View view, int i, KeyEvent keyEvent) {
            Intrinsics.checkNotNullParameter(this$0, "this$0");
            Intrinsics.checkNotNullParameter(this$1, "this$1");
            if (4 == keyEvent.getKeyCode() && keyEvent.getAction() == 0) {
                e5 e5Var = this$0.R;
                if (e5Var != null) {
                    String TAG = eb.H0;
                    Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                    e5Var.c(TAG, "Back pressed when HTML5 video is playing.");
                }
                this$1.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() {
            eb ebVar = eb.this;
            if (ebVar.K == null) {
                return;
            }
            WebChromeClient.CustomViewCallback customViewCallback = ebVar.L;
            if (customViewCallback != null) {
                customViewCallback.onCustomViewHidden();
            }
            eb ebVar2 = eb.this;
            ebVar2.L = null;
            View view = ebVar2.K;
            if ((view == null ? null : view.getParent()) != null) {
                View view2 = eb.this.K;
                ViewParent parent = view2 == null ? null : view2.getParent();
                ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
                if (viewGroup != null) {
                    viewGroup.removeView(eb.this.K);
                }
                eb.this.K = null;
            }
        }

        @Override
        public Bitmap getDefaultVideoPoster() {
            Bitmap defaultVideoPoster = super.getDefaultVideoPoster();
            return defaultVideoPoster == null ? Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888) : defaultVideoPoster;
        }

        @Override
        public boolean onConsoleMessage(@NotNull ConsoleMessage cm) {
            Intrinsics.checkNotNullParameter(cm, "cm");
            String str = cm.message() + " -- From line " + cm.lineNumber() + " of " + ((Object) cm.sourceId());
            e5 e5Var = eb.this.R;
            if (e5Var == null) {
                return true;
            }
            String TAG = eb.H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(str, "Console message:"));
            return true;
        }

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

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

        @Override
        public boolean onJsAlert(@NotNull WebView view, @NotNull String url, @NotNull String message, @NotNull JsResult result) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(message, "message");
            Intrinsics.checkNotNullParameter(result, "result");
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "jsAlert called with: " + message + url);
            }
            if (eb.a(eb.this, result)) {
                Activity fullScreenActivity = eb.this.getFullScreenActivity();
                if (fullScreenActivity != null) {
                    new AlertDialog.Builder(fullScreenActivity).setMessage(message).setTitle(url).setPositiveButton(17039370, new com.facebook.login.c(result, 1)).setCancelable(false).create().show();
                } else {
                    result.cancel();
                }
            }
            return true;
        }

        @Override
        public boolean onJsConfirm(@NotNull WebView view, @NotNull String url, @NotNull String message, @NotNull JsResult result) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(message, "message");
            Intrinsics.checkNotNullParameter(result, "result");
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "jsConfirm called with: " + message + url);
            }
            if (eb.a(eb.this, result)) {
                if (eb.this.getFullScreenActivity() != null) {
                    new AlertDialog.Builder(eb.this.getFullScreenActivity()).setMessage(message).setPositiveButton(17039370, new myobfuscated.zu.j(result, 0)).setNegativeButton(17039360, new myobfuscated.f9.b(result, 2)).create().show();
                    return true;
                }
                result.cancel();
                return true;
            }
            return true;
        }

        @Override
        public boolean onJsPrompt(@NotNull WebView view, @NotNull String url, @NotNull String message, @NotNull String defaultValue, @NotNull JsPromptResult result) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(url, "url");
            Intrinsics.checkNotNullParameter(message, "message");
            Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
            Intrinsics.checkNotNullParameter(result, "result");
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "jsPrompt called with: " + message + url);
            }
            if (eb.a(eb.this, result)) {
                if (eb.this.getFullScreenActivity() == null) {
                    result.cancel();
                    return true;
                }
                return false;
            }
            return true;
        }

        @Override
        public void onProgressChanged(WebView webView, int i) {
            e5 e5Var = eb.this.R;
            if (e5Var != null) {
                String TAG = eb.H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.a(TAG, Intrinsics.l(Integer.valueOf(i), "webview progress changed - "));
            }
            super.onProgressChanged(webView, i);
        }

        @Override
        public void onShowCustomView(@NotNull View view, @NotNull WebChromeClient.CustomViewCallback callback) {
            Intrinsics.checkNotNullParameter(view, "view");
            Intrinsics.checkNotNullParameter(callback, "callback");
            if (eb.this.j.get() != null) {
                eb ebVar = eb.this;
                ebVar.K = view;
                ebVar.L = callback;
                if (view != null) {
                    view.setOnTouchListener(new myobfuscated.zu.k(0));
                }
                Activity activity = eb.this.j.get();
                FrameLayout frameLayout = activity == null ? null : (FrameLayout) activity.findViewById(16908290);
                View view2 = eb.this.K;
                if (view2 != null) {
                    view2.setBackgroundColor(-16777216);
                }
                if (frameLayout != null) {
                    frameLayout.addView(eb.this.K, new AbsoluteLayout.LayoutParams(-1, -1, 0, 0));
                }
                View view3 = eb.this.K;
                if (view3 != null) {
                    view3.requestFocus();
                }
                final eb ebVar2 = eb.this;
                View view4 = ebVar2.K;
                View.OnKeyListener onKeyListener = new View.OnKeyListener() {
                    @Override
                    public final boolean onKey(View view5, int i, KeyEvent keyEvent) {
                        return eb.h.a(eb.this, 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 eb(@NotNull Context context, byte b2, Set<cd> set, String str, boolean z, @NotNull String landingScheme, long j, hb hbVar) {
        super(r0);
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(landingScheme, "landingScheme");
        Context applicationContext = context.getApplicationContext();
        Intrinsics.checkNotNullExpressionValue(applicationContext, "context.applicationContext");
        this.b = b2;
        this.c = set;
        this.d = str;
        this.e = z;
        this.f = landingScheme;
        this.g = j;
        this.j = new WeakReference<>(null);
        this.m = "Default";
        this.x = true;
        this.y = true;
        this.A = true;
        this.B = ee.UNKNOWN;
        this.F = new AtomicBoolean(false);
        this.G = new Object();
        this.H = new Object();
        this.J = true;
        this.M = -1;
        this.N = Long.MIN_VALUE;
        this.Q = new AtomicBoolean(false);
        this.k0 = RecyclerView.UNDEFINED_DURATION;
        this.l0 = RecyclerView.UNDEFINED_DURATION;
        this.u0 = new AtomicBoolean(true);
        this.v0 = k6.b.a(context, "default").a("enableImraidLogs", false);
        this.x0 = new c();
        this.y0 = "html";
        this.z0 = new e();
        this.A0 = new d();
        this.B0 = new b();
        String TAG = H0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        Intrinsics.l(this, "init constructor ");
        this.W = this;
        this.e0 = true;
        this.s0 = new ja();
        this.m0 = new p7(this);
        GestureDetector gestureDetector = new GestureDetector(context, this);
        this.n0 = gestureDetector;
        gestureDetector.setOnDoubleTapListener(this);
        gestureDetector.setIsLongpressEnabled(b2 == 1);
        if (hbVar != null) {
            this.S = new kb(hbVar);
        }
        this.p0 = new fb(this.S);
        this.D0 = new f();
        this.E0 = new h();
        this.F0 = new g();
    }

    public eb(Context context, byte b2, Set set, String str, boolean z, String str2, long j, hb hbVar, int i) {
        this(context, b2, (i & 4) != 0 ? null : set, (i & 8) != 0 ? null : str, (i & 16) != 0 ? false : z, (i & 32) != 0 ? "DEFAULT" : str2, (i & 64) != 0 ? -1L : j, (i & 128) != 0 ? null : hbVar);
    }

    public static final void a(eb this$0) {
        e5 e5Var;
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        if (this$0.isAttachedToWindow() || (e5Var = this$0.R) == null) {
            return;
        }
        e5Var.a();
    }

    public static final void a(eb this$0, String js) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(js, "$js");
        try {
            if (this$0.F.get()) {
                return;
            }
            String str = "javascript:try{" + js + "}catch(e){}";
            e5 e5Var = this$0.R;
            if (e5Var != null) {
                String TAG = H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, Intrinsics.l(str, "Injecting javascript:"));
            }
            e5 e5Var2 = this$0.R;
            if (e5Var2 != null) {
                String TAG2 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                e5Var2.a(TAG2, "evaluateScript " + this$0 + ' ' + str);
            }
            this$0.evaluateJavascript(str, null);
        } catch (Exception e2) {
            e5 e5Var3 = this$0.R;
            if (e5Var3 == null) {
                return;
            }
            String str2 = H0;
            e5Var3.b(str2, myobfuscated.b02.b.m(str2, "TAG", e2, "SDK encountered an unexpected error injecting JavaScript in the Ad container; "));
        }
    }

    public static final void a(eb ebVar, String str, String str2, String str3) {
        e5 e5Var = ebVar.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(ebVar, "onUserLandingCompleted "));
        }
        ebVar.b("window.imraid.broadcastEvent('onUserLandingCompleted');");
        if (str2 == null) {
            return;
        }
        ebVar.a(str2, "broadcastEvent('" + ((Object) str) + "Successful','" + ((Object) str3) + "');");
    }

    public static final boolean a(eb ebVar, JsResult jsResult) {
        e5 e5Var = ebVar.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(ebVar, "shouldRenderPopup "));
        }
        if (ebVar.getRenderingConfig().shouldRenderPopup()) {
            return true;
        }
        jsResult.cancel();
        e5 e5Var2 = ebVar.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(ebVar, "firePopupBlockedEvent "));
        }
        ebVar.b("window.mraidview.popupBlocked('popupBlocked')");
        return false;
    }

    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.q;
        if (adConfig != null) {
            return adConfig.getMraidConfig();
        }
        Intrinsics.n("mAdConfig");
        throw null;
    }

    public static void getPlacementType$annotations() {
    }

    public static void getViewState$annotations() {
    }

    private final int getVisibilityTrackingMinPercentage() {
        if (Intrinsics.c("audio", getAdType())) {
            AdConfig adConfig = this.q;
            if (adConfig != null) {
                return adConfig.getViewability().getAudioImpressionMinPercentageViewed();
            }
            Intrinsics.n("mAdConfig");
            throw null;
        }
        AdConfig adConfig2 = this.q;
        if (adConfig2 != null) {
            return adConfig2.getViewability().getWebImpressionMinPercentageViewed();
        }
        Intrinsics.n("mAdConfig");
        throw null;
    }

    public static final void m88setWatermark$lambda2(eb renderView) {
        Intrinsics.checkNotNullParameter(renderView, "this$0");
        if (renderView.Q.get()) {
            return;
        }
        e5 e5Var = renderView.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "adding overlay to renderview");
        }
        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.Q.set(true);
    }

    @Override
    public void a() {
        ViewGroup viewGroup;
        y yVar;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "dismissCurrentViewContainer "));
        }
        s7 s7Var = this.p;
        if (s7Var != null) {
            l7 l7Var = s7Var.c;
            if (l7Var != null) {
                l7Var.a();
            }
            s7Var.c = null;
        }
        if (Intrinsics.c("Expanded", this.m)) {
            e5 e5Var2 = this.R;
            if (e5Var2 != null) {
                String TAG2 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                e5Var2.c(TAG2, Intrinsics.l(this, "processCloseRequestOnExpandedRenderView "));
            }
            if (!Intrinsics.c("Default", this.m)) {
                this.I = true;
                q7 q7Var = this.n;
                if (q7Var != null) {
                    e5 e5Var3 = q7Var.f;
                    if (e5Var3 != null) {
                        String TAG3 = q7Var.c;
                        Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                        e5Var3.a(TAG3, "closeExpandedView");
                    }
                    if (q7Var.a.getOriginalRenderView() == null) {
                        ViewGroup viewGroup2 = q7Var.d;
                        View rootView = viewGroup2 == null ? null : viewGroup2.getRootView();
                        if (rootView != null) {
                            View findViewById = rootView.findViewById(65535);
                            ViewParent parent = q7Var.a.getParent();
                            ViewGroup viewGroup3 = parent instanceof ViewGroup ? (ViewGroup) parent : null;
                            if (viewGroup3 != null) {
                                viewGroup3.removeView(q7Var.a);
                            }
                            ViewParent parent2 = findViewById == null ? null : findViewById.getParent();
                            viewGroup = parent2 instanceof ViewGroup ? parent2 : null;
                            if (viewGroup != null) {
                                viewGroup.removeView(findViewById);
                            }
                            ViewGroup viewGroup4 = q7Var.d;
                            if (viewGroup4 != null) {
                                viewGroup4.addView(q7Var.a, q7Var.e, new RelativeLayout.LayoutParams(viewGroup4.getWidth(), viewGroup4.getHeight()));
                            }
                            q7Var.a.q();
                        }
                    }
                }
                h();
                this.I = false;
            }
            this.A = false;
        } else if (Intrinsics.c("Resized", this.m)) {
            e5 e5Var4 = this.R;
            if (e5Var4 != null) {
                String TAG4 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
                e5Var4.c(TAG4, Intrinsics.l(this, "processCloseRequestOnResizedRenderView "));
            }
            if (!Intrinsics.c("Default", this.m)) {
                this.I = true;
                t7 t7Var = this.o;
                if (t7Var != null) {
                    ViewParent parent3 = t7Var.a.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 = t7Var.b;
                    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(t7Var.a);
                    }
                    ViewGroup viewGroup8 = t7Var.b;
                    if (viewGroup8 != null) {
                        viewGroup8.addView(t7Var.a, t7Var.c, new RelativeLayout.LayoutParams(viewGroup8.getWidth(), viewGroup8.getHeight()));
                    }
                    t7Var.a.q();
                }
                setAndUpdateViewState("Default");
                x();
                this.I = false;
            }
        } else if (Intrinsics.c("Default", this.m)) {
            setAndUpdateViewState("Hidden");
            ViewParent parent6 = getParent();
            if (1 == this.b) {
                h();
            } else if (parent6 instanceof ViewGroup) {
                ((ViewGroup) parent6).removeAllViews();
            }
        }
        if (!m() || (yVar = this.c0) == null) {
            return;
        }
        yVar.a(this, getFullScreenActivity());
    }

    @Override
    public void a(byte b2, Map<String, String> map) {
        e5 e5Var = this.R;
        if (e5Var == null) {
            return;
        }
        String TAG = H0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        e5Var.c(TAG, "fireEvent " + this + ' ' + ((int) b2));
    }

    @SuppressLint({"AddJavascriptInterface"})
    @TargetApi(19)
    public final void a(gb gbVar, @NotNull AdConfig adConfig) {
        int otherNetworkLoadsLimit;
        WebViewClient webViewClient;
        Intrinsics.checkNotNullParameter(adConfig, "adConfig");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "initialize "));
        }
        if (Intrinsics.c(this.y0, "htmlUrl")) {
            getSettings().setMixedContentMode(2);
        }
        this.q = adConfig;
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(this, "setImpressionParams "));
        }
        if (this.c == null) {
            v();
        } else {
            try {
                v();
                for (cd cdVar : this.c) {
                    if (cdVar.a == 2) {
                        if (cdVar.b.containsKey("type")) {
                            Object obj = cdVar.b.get("type");
                            if (obj == null) {
                                throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                            }
                            this.h = (byte) ((Integer) obj).intValue();
                        } else {
                            w();
                        }
                        if (cdVar.b.containsKey("time")) {
                            Object obj2 = cdVar.b.get("time");
                            if (obj2 == null) {
                                throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                            }
                            this.k0 = ((Integer) obj2).intValue();
                        } else {
                            u();
                        }
                        if (cdVar.b.containsKey("view")) {
                            Object obj3 = cdVar.b.get("view");
                            if (obj3 == null) {
                                throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                            }
                            this.l0 = ((Integer) obj3).intValue();
                        } else {
                            t();
                        }
                        if (this.h != 2) {
                            continue;
                        } else {
                            if (cdVar.b.containsKey("pixel")) {
                                Object obj4 = cdVar.b.get("pixel");
                                if (obj4 == null) {
                                    throw new NullPointerException("null cannot be cast to non-null type kotlin.Int");
                                }
                                this.j0 = ((Integer) obj4).intValue();
                            } else {
                                w();
                            }
                            if (cdVar.b.containsKey("frame")) {
                                Object obj5 = cdVar.b.get("frame");
                                JSONArray jSONArray = obj5 instanceof JSONArray ? (JSONArray) obj5 : null;
                                if (jSONArray != null) {
                                    this.h0 = new int[jSONArray.length()];
                                    int length = jSONArray.length();
                                    if (length > 0) {
                                        int i = 0;
                                        while (true) {
                                            int i2 = i + 1;
                                            int[] iArr = this.h0;
                                            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 {
                                w();
                            }
                        }
                    }
                }
            } catch (JSONException unused) {
                e5 e5Var3 = this.R;
                if (e5Var3 != null) {
                    String TAG3 = H0;
                    Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                    e5Var3.b(TAG3, "Exception in parsing the impressionType and pixel frame");
                }
                v();
            } catch (Exception unused2) {
                e5 e5Var4 = this.R;
                if (e5Var4 != null) {
                    String TAG4 = H0;
                    Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
                    e5Var4.b(TAG4, "SDK encountered an unexpected error in parsing impression parameters");
                }
                v();
            }
        }
        this.l = gbVar;
        ViewParent parent = getParent();
        this.k = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
        setBackgroundColor(getRenderingConfig().getWebviewBackgroundColor());
        new r7(getMraidConfig().getUrl(), getMraidConfig().getMaxRetries(), getMraidConfig().getRetryInterval(), getMraidConfig().getExpiry(), this.R).a();
        setImportantForAccessibility(2);
        setScrollable(false);
        getSettings().setMediaPlaybackRequiresUserGesture(false);
        getSettings().setJavaScriptEnabled(true);
        getSettings().setDomStorageEnabled(getAdConfig().getRendering().getEnableDomStorage());
        getSettings().setGeolocationEnabled(true);
        if (this.e) {
            e5 e5Var5 = this.R;
            if (e5Var5 != null) {
                String TAG5 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG5, "TAG");
                e5Var5.a(TAG5, "view is in-app browser. Using EmbeddedBrowserViewClient.");
            }
            webViewClient = new v3(this.R);
        } else {
            e5 e5Var6 = this.R;
            if (e5Var6 != null) {
                String TAG6 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG6, "TAG");
                e5Var6.a(TAG6, "view is ad. Using RenderViewClient");
            }
            fb fbVar = this.p0;
            String adType = getAdType();
            if (Intrinsics.c(adType, "banner")) {
                AdConfig adConfig2 = this.q;
                if (adConfig2 == null) {
                    Intrinsics.n("mAdConfig");
                    throw null;
                }
                otherNetworkLoadsLimit = adConfig2.getRendering().getBannerNetworkLoadsLimit();
            } else if (Intrinsics.c(adType, "audio")) {
                AdConfig adConfig3 = this.q;
                if (adConfig3 == null) {
                    Intrinsics.n("mAdConfig");
                    throw null;
                }
                otherNetworkLoadsLimit = adConfig3.getRendering().getAudioNetworkLoadsLimit();
            } else {
                AdConfig adConfig4 = this.q;
                if (adConfig4 == null) {
                    Intrinsics.n("mAdConfig");
                    throw null;
                }
                otherNetworkLoadsLimit = adConfig4.getRendering().getOtherNetworkLoadsLimit();
            }
            fbVar.a = otherNetworkLoadsLimit;
            webViewClient = this.p0;
        }
        setWebViewClient(webViewClient);
        setWebChromeClient(this.E0);
        if (!this.e) {
            e6 e6Var = new e6(this, this.b);
            e5 logger = this.R;
            if (logger != null) {
                Intrinsics.checkNotNullParameter(logger, "logger");
                e6Var.d = logger;
            }
            addJavascriptInterface(e6Var, "sdkController");
        }
        this.n = new q7(this, getMarkupType());
        this.o = new t7(this);
        this.p = new s7(this);
        this.t = new h4();
        this.u = new ob(ob.DEFAULT_POSITION, true);
        this.t0 = new f0(adConfig.getAdQuality(), this.R);
    }

    @Override
    public void a(@NotNull ha orientation) {
        t7 t7Var;
        Intrinsics.checkNotNullParameter(orientation, "orientation");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "onOrientationUpdate "));
        }
        if (!Intrinsics.c("Resized", this.m) || this.u == null || (t7Var = this.o) == null) {
            return;
        }
        t7Var.a();
    }

    @Override
    public void a(@NotNull p7 movementGestureDetector) {
        Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
        if (!getRenderingConfig().getSupportedGestures().contains(2)) {
            e5 e5Var = this.R;
            if (e5Var == null) {
                return;
            }
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "Pan gesture is disabled from config");
            return;
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String str = H0;
            StringBuilder c2 = myobfuscated.w2.a.c(str, "TAG", "onPanDetected\n ");
            JSONArray jSONArray = movementGestureDetector.j;
            c2.append(jSONArray == null ? null : Integer.valueOf(jSONArray.length()));
            c2.append(" \n ");
            c2.append(movementGestureDetector.j);
            e5Var2.c(str, kotlin.text.b.b(c2.toString()));
        }
        b("window.imraidview.onGestureDetected('2', '" + movementGestureDetector.j + "');");
    }

    @Override
    public void a(@NotNull p7 movementGestureDetector, @NotNull MotionEvent initialEvent, @NotNull MotionEvent endEvent) {
        Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
        Intrinsics.checkNotNullParameter(initialEvent, "initialEvent");
        Intrinsics.checkNotNullParameter(endEvent, "endEvent");
        if (!getRenderingConfig().getSupportedGestures().contains(3)) {
            e5 e5Var = this.R;
            if (e5Var == null) {
                return;
            }
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "Rotation gesture is disabled from config");
            return;
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String str = H0;
            StringBuilder c2 = myobfuscated.w2.a.c(str, "TAG", " Rotation detected ");
            c2.append(movementGestureDetector.i);
            c2.append(" \n ");
            c2.append(initialEvent);
            c2.append(" \n ");
            c2.append(endEvent);
            e5Var2.c(str, kotlin.text.b.b(c2.toString()));
        }
        JSONArray jSONArray = new JSONArray();
        jSONArray.put(new JSONArray((Collection) myobfuscated.jk2.o.h(Float.valueOf(initialEvent.getX()), Float.valueOf(initialEvent.getY()))));
        jSONArray.put(new JSONArray((Collection) myobfuscated.jk2.o.h(Float.valueOf(initialEvent.getX(1)), Float.valueOf(initialEvent.getY(1)))));
        jSONArray.put(new JSONArray((Collection) myobfuscated.jk2.o.h(Float.valueOf(endEvent.getX()), Float.valueOf(endEvent.getY()))));
        jSONArray.put(new JSONArray((Collection) myobfuscated.jk2.o.h(Float.valueOf(endEvent.getX(1)), Float.valueOf(endEvent.getY(1)))));
        b("window.imraidview.onGestureDetected('3', '" + jSONArray + "');");
    }

    @Override
    public void a(@NotNull String mraidApi) {
        Intrinsics.checkNotNullParameter(mraidApi, "mraidApi");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "sendFraudBeaconAndTelemetryEvent "));
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, "fireDetectAutoRedirectFraud " + this + ' ' + mraidApi);
        }
        b("window.mraidview.fireRedirectFraudBeacon('" + mraidApi + "')");
        String adType = getAdType();
        if (adType == null) {
            adType = "banner";
        }
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.a(TAG3, "sendTelemetryForAutoRedirectFraud " + this + ' ' + mraidApi + ' ' + adType);
        }
        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);
        a("BlockAutoRedirection", hashMap);
    }

    public final void a(String str, @NotNull String callback) {
        Intrinsics.checkNotNullParameter(callback, "callback");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "fireJavaScriptCallback "));
        }
        if (str == null) {
            return;
        }
        b(((Object) str) + JwtParser.SEPARATOR_CHAR + callback);
    }

    @Override
    public void a(@NotNull String jsCallbackNamespace, @NotNull String callback, @NotNull String blob) {
        Intrinsics.checkNotNullParameter(jsCallbackNamespace, "jsCallbackNamespace");
        Intrinsics.checkNotNullParameter(callback, "callback");
        Intrinsics.checkNotNullParameter(blob, "blob");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "retrievedBlob");
        }
        a(jsCallbackNamespace, callback + '(' + blob + ");");
    }

    public final void a(String str, Map<String, Object> map) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "processTelemetryEvent "));
        }
        getListener().b(str, map);
    }

    public final void a(boolean z) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "fireNextAdLoadComplete "));
        }
        String t = myobfuscated.b0.b.t("window.imraidview.broadcastEvent('adLoadSuccess',", z, ");");
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.a(TAG2, t + " Index: " + getCurrentRenderingPodAdIndex());
        }
        b(t);
    }

    @Override
    @TargetApi(11)
    public void b() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "destroyContainer "));
        }
        if (this.F.get()) {
            return;
        }
        if (!this.A) {
            this.A = true;
            return;
        }
        this.F.set(true);
        w2 w2Var = this.C0;
        if (w2Var != null) {
            w2Var.b();
        }
        this.I = true;
        this.M = -1;
        removeJavascriptInterface("sdkController");
        s7 s7Var = this.p;
        if (s7Var != null) {
            j7 j7Var = s7Var.d;
            if (j7Var != null) {
                j7Var.a();
            }
            s7Var.d = null;
            j7 j7Var2 = s7Var.e;
            if (j7Var2 != null) {
                j7Var2.a();
            }
            s7Var.e = null;
            j7 j7Var3 = s7Var.f;
            if (j7Var3 != null) {
                j7Var3.a();
            }
            s7Var.f = null;
        }
        this.j.clear();
        WeakReference<ViewGroup> weakReference = this.k;
        if (weakReference != null) {
            weakReference.clear();
        }
        ae aeVar = this.d0;
        if (aeVar != null) {
            aeVar.e();
        }
        ae aeVar2 = this.d0;
        if (aeVar2 != null) {
            aeVar2.a();
        }
        setFriendlyViews(null);
        this.q0 = null;
        this.l = null;
        this.W = null;
        this.c0 = null;
        ViewParent parent = getParent();
        if (parent != null) {
            ((ViewGroup) parent).removeView(this);
            removeAllViews();
        }
        AdConfig adConfig = this.q;
        if (adConfig == null) {
            Intrinsics.n("mAdConfig");
            throw null;
        }
        AdConfig.OmidConfig omidConfig = adConfig.getViewability().getOmidConfig();
        if (this.e0 && omidConfig.isOmidEnabled()) {
            fa.c.getClass();
            if (Omid.isActive()) {
                new ib(this, omidConfig.getWebViewRetainTime()).a();
                return;
            }
        }
        destroy();
    }

    @Override
    public void b(@NotNull p7 movementGestureDetector, @NotNull MotionEvent initialEvent, @NotNull MotionEvent endEvent) {
        Intrinsics.checkNotNullParameter(movementGestureDetector, "movementGestureDetector");
        Intrinsics.checkNotNullParameter(initialEvent, "initialEvent");
        Intrinsics.checkNotNullParameter(endEvent, "endEvent");
        if (!getRenderingConfig().getSupportedGestures().contains(4)) {
            e5 e5Var = this.R;
            if (e5Var == null) {
                return;
            }
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "Pinch gesture is disabled from config");
            return;
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, kotlin.text.b.b(" onScaleDetected\n " + initialEvent + " \n " + endEvent));
        }
        JSONArray jSONArray = new JSONArray();
        float f2 = 2;
        jSONArray.put(new JSONArray((Collection) myobfuscated.jk2.o.h(Float.valueOf((endEvent.getX(1) + endEvent.getX()) / f2), Float.valueOf((endEvent.getY(1) + endEvent.getY()) / f2))));
        b("window.imraidview.onGestureDetected('4', '" + jSONArray + "');");
    }

    public final void b(@NotNull String js) {
        Intrinsics.checkNotNullParameter(js, "js");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "injectJavaScript " + this + " - " + js);
        }
        new Handler(getContainerContext().getMainLooper()).postAtFrontOfQueue(new myobfuscated.z5.h(22, this, js));
    }

    public final void b(String str, @NotNull String url) {
        Intrinsics.checkNotNullParameter(url, "url");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "processMediaPlaybackRequest "));
        }
        if (1 != this.b && !Intrinsics.c("Expanded", this.m)) {
            e5 e5Var2 = this.R;
            if (e5Var2 == null) {
                return;
            }
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.b(TAG2, "Media playback is only supported on full screen ads! Ignoring request ...");
            return;
        }
        Activity activity = this.j.get();
        if (activity != null) {
            s7 s7Var = this.p;
            if (s7Var == null) {
                return;
            }
            s7Var.a(url, activity);
            return;
        }
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.b(TAG3, "Media playback is  not allowed before it is visible! Ignoring request ...");
        }
        b(str, "Media playback is  not allowed before it is visible! Ignoring request ...", "playVideo");
    }

    public final void b(String str, @NotNull String message, String str2) {
        Intrinsics.checkNotNullParameter(message, "message");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "fireError " + this + " - " + message + " - " + ((Object) str2));
        }
        if (str == null || str2 == null) {
            return;
        }
        a(str, "broadcastEvent('error',\"" + message + "\", \"" + ((Object) str2) + "\")");
    }

    public final void b(boolean z) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "fireNextAdShowComplete "));
        }
        String t = myobfuscated.b0.b.t("window.imraidview.broadcastEvent('adShowSuccess',", z, ");");
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, t + " Index: " + getCurrentRenderingPodAdIndex());
        }
        b(t);
    }

    public final void c(String str) {
        kb kbVar = this.S;
        if (kbVar != null) {
            kbVar.b();
        }
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "loadDataInWebView "));
        }
        this.I = false;
        if (this.F.get()) {
            return;
        }
        Intrinsics.e(str);
        loadDataWithBaseURL("", str, "text/html", "UTF-8", null);
    }

    public final void c(String str, @NotNull String contentId, @NotNull String url) {
        Intrinsics.checkNotNullParameter(contentId, "contentId");
        Intrinsics.checkNotNullParameter(url, "url");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "processSaveContentRequest "));
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, "saveContent called: content ID: " + contentId + "; URL: " + url);
        }
        if (g("saveContent")) {
            HashSet hashSet = new HashSet();
            hashSet.add(new ab((byte) -1, url));
            com.inmobi.media.g gVar = new com.inmobi.media.g(myobfuscated.a0.a.d("randomUUID().toString()"), null, hashSet, this.F0, contentId);
            gVar.c = str;
            a1.a.a(gVar);
            return;
        }
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.b(TAG3, "saveContent called despite the fact that it is not supported");
        }
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("url", url);
            jSONObject.put("reason", 7);
        } catch (JSONException unused) {
        }
        String jSONObject2 = jSONObject.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject2, "result.toString()");
        a(str, defpackage.e.j("sendSaveContentResult(\"saveContent_", contentId, "\", 'failed', \"", myobfuscated.mn2.k.r(jSONObject2, "\"", "\\\"", false), "\");"));
    }

    public final void c(boolean z) {
        AdQualityControl adQualityControl;
        Activity activity;
        AdQualityControl adQualityControl2;
        ee eeVar = z ? ee.VISIBLE : ee.HIDDEN;
        if (this.B != eeVar) {
            e5 e5Var = this.R;
            if (e5Var != null) {
                String TAG = H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.c(TAG, "handleVisibilityChange " + eeVar + ' ' + this);
            }
            if (this.I) {
                return;
            }
            this.B = eeVar;
            if (z) {
                getListener().j(this);
            }
            e5 e5Var2 = this.R;
            if (e5Var2 != null) {
                String TAG2 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                e5Var2.c(TAG2, "fireViewableChange " + this + ' ' + z);
            }
            b("window.mraidview.broadcastEvent('viewableChange'," + z + ");");
            e5 e5Var3 = this.R;
            if (e5Var3 != null) {
                String TAG3 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                e5Var3.a(TAG3, "fireAQSession");
            }
            e5 e5Var4 = this.R;
            if (e5Var4 != null) {
                String str = H0;
                StringBuilder c2 = myobfuscated.w2.a.c(str, "TAG", "AQ - ");
                c2.append((Object) getAdType());
                c2.append(" type - sdk - ");
                c2.append(Build.VERSION.SDK_INT);
                e5Var4.c(str, c2.toString());
            }
            if (!Intrinsics.c(getAdType(), "int") || Build.VERSION.SDK_INT < 29 || (activity = this.j.get()) == null) {
                f0 f0Var = this.t0;
                if (f0Var == null) {
                    Intrinsics.n("adQualityManager");
                    throw null;
                }
                Intrinsics.checkNotNullParameter(this, "adView");
                if (!f0Var.c()) {
                    e5 e5Var5 = f0Var.b;
                    if (e5Var5 == null) {
                        return;
                    }
                    e5Var5.c("AdQualityManager", "session state invalid");
                    return;
                }
                e5 e5Var6 = f0Var.b;
                if (e5Var6 != null) {
                    e5Var6.c("AdQualityManager", "session start trigger...");
                }
                f0Var.c.set(true);
                AdQualityControl adQualityControl3 = f0Var.g;
                if (adQualityControl3 == null || !adQualityControl3.getTakeScreenshot() || (adQualityControl = f0Var.g) == null) {
                    return;
                }
                f0Var.a((View) this, adQualityControl.getScreenshotDelayInSeconds() * 1000, false, (e0) null);
                return;
            }
            f0 f0Var2 = this.t0;
            if (f0Var2 == null) {
                Intrinsics.n("adQualityManager");
                throw null;
            }
            Intrinsics.checkNotNullParameter(activity, "activity");
            if (!f0Var2.c()) {
                e5 e5Var7 = f0Var2.b;
                if (e5Var7 == null) {
                    return;
                }
                e5Var7.c("AdQualityManager", "session state invalid");
                return;
            }
            e5 e5Var8 = f0Var2.b;
            if (e5Var8 != null) {
                e5Var8.c("AdQualityManager", "session start trigger...");
            }
            f0Var2.c.set(true);
            AdQualityControl adQualityControl4 = f0Var2.g;
            if (adQualityControl4 == null || !adQualityControl4.getTakeScreenshot() || (adQualityControl2 = f0Var2.g) == null) {
                return;
            }
            f0Var2.a(activity, adQualityControl2.getScreenshotDelayInSeconds() * 1000, false, (e0) null);
        }
    }

    @Override
    public boolean c() {
        return this.F.get();
    }

    public final void d(String str) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "loadScript " + this + " - " + str);
        }
        loadUrl(str);
    }

    public final void d(boolean z) {
        g3 g3Var;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "processDisableCloseRegionRequest " + this + ' ' + z);
        }
        this.C = z;
        View rootView = getRootView();
        if (rootView == null || (g3Var = (g3) rootView.findViewById(65531)) == null) {
            return;
        }
        g3Var.setVisibility(this.C ? 8 : 0);
    }

    @Override
    public boolean d() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "canRedirectExternally Called");
        }
        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 e() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "disableHardwareAcceleration called. "));
        }
        this.J = false;
        try {
            eb.class.getMethod("setLayerType", Integer.TYPE, Paint.class).invoke(this, 1, null);
        } catch (IllegalAccessException e2) {
            e5 e5Var2 = this.R;
            if (e5Var2 == null) {
                return;
            }
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.a(TAG2, "disableHardwareAcceleration failed.", e2);
        } catch (IllegalArgumentException e3) {
            e5 e5Var3 = this.R;
            if (e5Var3 == null) {
                return;
            }
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.a(TAG3, "disableHardwareAcceleration failed.", e3);
        } catch (NoSuchMethodException e4) {
            e5 e5Var4 = this.R;
            if (e5Var4 == null) {
                return;
            }
            String TAG4 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
            e5Var4.a(TAG4, "disableHardwareAcceleration failed.", e4);
        } catch (InvocationTargetException e5) {
            e5 e5Var5 = this.R;
            if (e5Var5 == null) {
                return;
            }
            String TAG5 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG5, "TAG");
            e5Var5.a(TAG5, "disableHardwareAcceleration failed.", e5);
        }
    }

    public final void e(String str) {
        kb kbVar = this.S;
        if (kbVar != null) {
            kbVar.b();
        }
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "loadUrlInWebView "));
        }
        this.I = false;
        if (this.F.get() || str == null) {
            return;
        }
        loadUrl(str);
    }

    public final void e(boolean z) {
        g3 g3Var;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "processUseCustomCloseRequest " + this + ' ' + z);
        }
        setUseCustomClose(z);
        View rootView = getRootView();
        if (rootView == null || (g3Var = (g3) rootView.findViewById(65532)) == null) {
            return;
        }
        g3Var.setVisibility(this.z ? 8 : 0);
    }

    @Override
    @NotNull
    public n6 f() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "initLandingPageHandler "));
        }
        o6 o6Var = new o6(this.e, this.f, getAdConfig().isCCTEnabled());
        Context context = getContext();
        Intrinsics.checkNotNullExpressionValue(context, "context");
        return new n6(context, o6Var, this.A0, this.z0, this, this.R);
    }

    public final void f(String str) {
        int a2;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "processExpandRequest "));
        }
        if (!Intrinsics.c("Default", this.m) && !Intrinsics.c("Resized", this.m)) {
            e5 e5Var2 = this.R;
            if (e5Var2 == null) {
                return;
            }
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.b(TAG2, Intrinsics.l(this.m, "Render view state must be either DEFAULT or RESIZED to admit the expand request. Current state:"));
            return;
        }
        this.I = true;
        q7 q7Var = this.n;
        if (q7Var != null) {
            e5 e5Var3 = q7Var.f;
            if (e5Var3 != null) {
                String TAG3 = q7Var.c;
                Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                e5Var3.a(TAG3, "doExpand");
            }
            if (q7Var.d == null) {
                ViewParent parent = q7Var.a.getParent();
                ViewGroup viewGroup = parent instanceof ViewGroup ? (ViewGroup) parent : null;
                q7Var.d = viewGroup;
                if (viewGroup != null) {
                    q7Var.e = viewGroup.indexOfChild(q7Var.a);
                }
            }
            h4 expandProperties = q7Var.a.getExpandProperties();
            if (URLUtil.isValidUrl(str)) {
                try {
                    eb ebVar = new eb(q7Var.a.getContainerContext(), (byte) 0, null, q7Var.a.getImpressionId(), false, null, 0L, null, 244);
                    ebVar.a(q7Var.a.getListener(), q7Var.a.getAdConfig());
                    ebVar.setOriginalRenderView(q7Var.a);
                    Intrinsics.e(str);
                    ebVar.loadUrl(str);
                    ebVar.setPlacementId(q7Var.a.getPlacementId());
                    ebVar.setAllowAutoRedirection(q7Var.a.getAllowAutoRedirection());
                    ebVar.setCreativeId(q7Var.a.getCreativeId());
                    a2 = InMobiAdActivity.j.a((i) ebVar);
                    if (expandProperties != null) {
                        ebVar.setUseCustomClose(q7Var.a.z);
                    }
                } catch (Exception e2) {
                    e5 e5Var4 = q7Var.f;
                    if (e5Var4 != null) {
                        String TAG4 = q7Var.c;
                        Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
                        e5Var4.a(TAG4, "Exception while initializing Expanded browser", e2);
                    }
                    myobfuscated.b02.b.x(e2, p5.a);
                    q7Var.a.getListener().a(q7Var.a, (short) 2176);
                }
            } else {
                ViewGroup viewGroup2 = q7Var.d;
                if (viewGroup2 != null) {
                    e5 e5Var5 = q7Var.f;
                    if (e5Var5 != null) {
                        String TAG5 = q7Var.c;
                        Intrinsics.checkNotNullExpressionValue(TAG5, "TAG");
                        e5Var5.a(TAG5, "replaceRenderViewWithPlaceholder");
                    }
                    FrameLayout frameLayout = new FrameLayout(q7Var.a.getContainerContext());
                    ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(q7Var.a.getWidth(), q7Var.a.getHeight());
                    frameLayout.setId(65535);
                    viewGroup2.addView(frameLayout, q7Var.e, layoutParams);
                    viewGroup2.removeView(q7Var.a);
                }
                a2 = InMobiAdActivity.j.a((i) q7Var.a);
            }
            q7Var.a.getListener().i();
            Intent intent = new Intent(q7Var.a.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.c(q7Var.b, "htmlUrl") ? 202 : 200);
            bc.a.a(q7Var.a.getContainerContext(), intent);
        }
        requestLayout();
        invalidate();
        setFocusable(true);
        setFocusableInTouchMode(true);
        requestFocus();
    }

    public final void g() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "disableUrlsToOpenInExternalApp "));
        }
        this.s = true;
    }

    @TargetApi(16)
    public final boolean g(String str) {
        e5 e5Var;
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var2.a(TAG, "supports " + this + ' ' + ((Object) str));
        }
        boolean z = false;
        if (str != null) {
            switch (str.hashCode()) {
                case -1886160473:
                    if (!str.equals("playVideo")) {
                        return false;
                    }
                    return true;
                case -1647691422:
                    if (!str.equals("inlineVideo")) {
                        return false;
                    }
                    if (this.r && this.J) {
                        z = true;
                    }
                    e5Var = this.R;
                    if (e5Var != null) {
                        return z;
                    }
                    String TAG2 = H0;
                    Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                    e5Var.a(TAG2, Intrinsics.l(Boolean.valueOf(z), "HTML5 video supported:"));
                    return z;
                case 1509574865:
                    if (!str.equals("html5video")) {
                        return false;
                    }
                    if (this.r) {
                        z = true;
                        break;
                    }
                    e5Var = this.R;
                    if (e5Var != null) {
                    }
                    break;
                case 1642189884:
                    if (!str.equals("saveContent")) {
                        return false;
                    }
                    return true;
                case 1772979069:
                    str.equals("redirectFraudDetection");
                    return false;
                default:
                    return false;
            }
        } else {
            return false;
        }
    }

    @Override
    @NotNull
    public AdConfig getAdConfig() {
        AdConfig adConfig = this.q;
        if (adConfig != null) {
            return adConfig;
        }
        Intrinsics.n("mAdConfig");
        throw null;
    }

    public final y getAdPodHandler() {
        return this.c0;
    }

    @NotNull
    public final f0 getAdQualityManager() {
        f0 f0Var = this.t0;
        if (f0Var != null) {
            return f0Var;
        }
        Intrinsics.n("adQualityManager");
        throw null;
    }

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

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

    public final int getArea() {
        return getHeight() * getWidth();
    }

    public final long getConfiguredArea() {
        return this.i0;
    }

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

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

    public final w2 getContextualDataHandler() {
        return this.C0;
    }

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

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

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

    @NotNull
    public final Object getCurrentPositionMonitor() {
        return this.H;
    }

    public final int getCurrentRenderingPodAdIndex() {
        y yVar = this.c0;
        if (yVar == null) {
            return 0;
        }
        return yVar.a(this);
    }

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

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

    @NotNull
    public final Object getDefaultPositionMonitor() {
        return this.G;
    }

    public final t3 getEmbeddedBrowserJSCallbacks() {
        return this.q0;
    }

    public final h4 getExpandProperties() {
        return this.t;
    }

    public Map<View, FriendlyObstructionPurpose> getFriendlyViews() {
        return this.U;
    }

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

    @Override
    @NotNull
    public i.a getFullScreenEventsListener() {
        return this.D0;
    }

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

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

    @NotNull
    public final String getLandingScheme() {
        return this.f;
    }

    @NotNull
    public final gb getListener() {
        gb gbVar = this.l;
        if (gbVar == null) {
            e5 e5Var = this.R;
            if (e5Var != null) {
                String TAG = H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.a(TAG, Intrinsics.l(this, "listener getter "));
            }
            gb gbVar2 = G0;
            this.l = gbVar2;
            return gbVar2;
        }
        return gbVar;
    }

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

    @NotNull
    public final String getMarkupTypeAdUnit() {
        return this.y0;
    }

    public final s7 getMediaProcessor() {
        return this.p;
    }

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

    @NotNull
    public final String getMraidJsString() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "mraidJsString getter "));
        }
        Context context = getContext();
        Intrinsics.checkNotNullExpressionValue(context, "context");
        String a2 = new sa(context, "mraid_js_store").a("mraid_js_string");
        if (a2 == null) {
            StringBuilder sb = new StringBuilder(32932);
            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 f=!1,d=this;b=b.filter(function(b){if(b=b===a)--d.count,f=!0;return!b});return f};this.removeAll=function(){b=[];this.count=0};this.broadcast=function(a){b.forEach(function(f){try{f.apply({},a)}catch(b){}})};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(f){this.log(f)}};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(f){}}};this.sendSaveContentResult=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)if(2==c){var f=arguments[c],f=JSON.parse(f);b[c]=f}else b[c]=arguments[c];f=b[1];\"success\"!=f&&(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)){f={};f.command=a;f.scheme=this.urlScheme;for(var b={},c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b[arguments[c]]=\"\"+d);f.params=b}else for(var f=this.urlScheme+\"://\"+a,d,b=!0,c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b?(f+=\"?\",b=!1):f+=\"&\",f+=arguments[c]+\"=\"+escape(d));__im__iosNativeCall.executeNativeCall(f);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(c){a.isPossibleFraud()&&a.fireRedirectFraudBeacon(c);return!1};a.popupBlocked=function(c){a.firePopupBlockedBeacon(c)};a.zeroPad=function(a){var c=\"\";10>a&&(c+=\"0\");return c+a};a.supports=function(a){console.log(\"bridge: supports (MRAID)\");if(\"string\"!=typeof a)window.mraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\n\"supports\");else return\"false\"!=sdkController.supports(\"window.mraidview\",a)};a.useCustomClose=function(a){try{sdkController.useCustomClose(\"window.mraidview\",a)}catch(c){imraidview.showAlert(\"use CustomClose: \"+c)}};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(a){imraidview.showAlert(\"close: \"+a)}};a.stackCommands=function(a,d){c?b.push(a):(eval(a),d&&(c=!0))};a.expand=function(a){try{\"undefined\"==typeof a&&(a=null),sdkController.expand(\"window.mraidview\",a)}catch(c){imraidview.showAlert(\"executeNativeExpand: \"+\nc+\", URL = \"+a)}};a.setExpandProperties=function(c){try{c?this.props=c:c=null;if(\"undefined\"!=typeof c.lockOrientation&&null!=c.lockOrientation&&\"undefined\"!=typeof c.orientation&&null!=c.orientation){var b={};b.allowOrientationChange=!c.lockOrientation;b.forceOrientation=c.orientation;a.setOrientationProperties(b)}sdkController.setExpandProperties(\"window.mraidview\",a.stringify(c))}catch(e){imraidview.showAlert(\"executeNativesetExpandProperties: \"+e+\", props = \"+c)}};a.getExpandProperties=function(){try{return eval(\"(\"+\nsdkController.getExpandProperties(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getExpandProperties: \"+a)}};a.setOrientationProperties=function(c){try{c?(\"undefined\"!=typeof c.allowOrientationChange&&(a.orientationProperties.allowOrientationChange=c.allowOrientationChange),\"undefined\"!=typeof c.forceOrientation&&(a.orientationProperties.forceOrientation=c.forceOrientation)):c=null,sdkController.setOrientationProperties(\"window.mraidview\",a.stringify(a.orientationProperties))}catch(b){imraidview.showAlert(\"setOrientationProperties: \"+\nb+\", props = \"+c)}};a.getOrientationProperties=function(){return{forceOrientation:a.orientationProperties.forceOrientation,allowOrientationChange:a.orientationProperties.allowOrientationChange}};a.resizeProps=null;a.setResizeProperties=function(c){var b,e;try{b=parseInt(c.width);e=parseInt(c.height);if(isNaN(b)||isNaN(e)||1>b||1>e)throw\"Invalid\";c.width=b;c.height=e;a.resizeProps=c;sdkController.setResizeProperties(\"window.mraidview\",a.stringify(c))}catch(g){window.mraid.broadcastEvent(\"error\",\"Invalid properties.\",\n\"setResizeProperties\")}};a.getResizeProperties=function(){try{return eval(\"(\"+sdkController.getResizeProperties(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getResizeProperties: \"+a)}};a.open=function(a){\"undefined\"==typeof a&&(a=null);try{sdkController.open(\"window.mraidview\",a)}catch(c){imraidview.showAlert(\"open: \"+c)}};a.getScreenSize=function(){try{return eval(\"(\"+sdkController.getScreenSize(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getScreenSize: \"+a)}};a.getMaxSize=\nfunction(){try{return eval(\"(\"+sdkController.getMaxSize(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getMaxSize: \"+a)}};a.getCurrentPosition=function(){try{return eval(\"(\"+sdkController.getCurrentPosition(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getCurrentPosition: \"+a)}};a.getDefaultPosition=function(){try{return eval(\"(\"+sdkController.getDefaultPosition(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getDefaultPosition: \"+a)}};a.getState=function(){try{return String(sdkController.getState(\"window.mraidview\"))}catch(a){imraidview.showAlert(\"getState: \"+\na)}};a.isViewable=function(){if(imraidview.fallbackViewabilityEnabled())return imraidview.checkFallbackViewable();try{return sdkController.isViewable(\"window.mraidview\")}catch(a){imraidview.showAlert(\"isViewable: \"+a)}};a.getPlacementType=function(){return sdkController.getPlacementType(\"window.mraidview\")};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(a){imraidview.showAlert(\"close: \"+a)}};\"function\"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(a){return 0==\nthis.indexOf(a)});a.playVideo=function(a){var c=\"\";null!=a&&(c=a);try{sdkController.playVideo(\"window.mraidview\",c)}catch(b){imraidview.showAlert(\"playVideo: \"+b)}};a.stringify=function(c){if(\"undefined\"===typeof JSON){var b=\"\",e;if(\"undefined\"==typeof c.length)return a.stringifyArg(c);for(e=0;e<c.length;e++)0<e&&(b+=\",\"),b+=a.stringifyArg(c[e]);return b+\"]\"}return JSON.stringify(c)};a.stringifyArg=function(a){var c,b,g;b=typeof a;c=\"\";if(\"number\"===b||\"boolean\"===b)c+=args;else if(a instanceof Array)c=\nc+\"[\"+a+\"]\";else if(a instanceof Object){b=!0;c+=\"{\";for(g in a)null!==a[g]&&(b||(c+=\",\"),c=c+'\"'+g+'\":',b=typeof a[g],c=\"number\"===b||\"boolean\"===b?c+a[g]:\"function\"===typeof a[g]?c+'\"\"':a[g]instanceof Object?c+this.stringify(args[i][g]):c+'\"'+a[g]+'\"',b=!1);c+=\"}\"}else a=a.replace(/\\\\/g,\"\\\\\\\\\"),a=a.replace(/\"/g,'\\\\\"'),c=c+'\"'+a+'\"';imraidview.showAlert(\"json:\"+c);return c};getPID=function(a){var c=\"\";null!=a&&(\"undefined\"!=typeof a.id&&null!=a.id)&&(c=a.id);return c};a.resize=function(){if(null==\na.resizeProps)window.mraid.broadcastEvent(\"error\",\"Valid resize dimensions must be provided before calling resize\",\"resize\");else try{sdkController.resize(\"window.mraidview\")}catch(c){imraidview.showAlert(\"resize called in bridge\")}};a.storePicture=function(c){console.log(\"bridge: storePicture\");if(\"string\"!=typeof c)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?\")?\n(window.mraid.broadcastEvent(\"error\",\"Store picture on \"+c+\" was cancelled by user.\",\"storePicture\"),!1):sdkController.storePicture(\"window.mraidview\",c);window.mraid.broadcastEvent(\"error\",\"Store picture on \"+c+\" was cancelled because it is unsupported in this device/app.\",\"storePicture\")}};a.fireMediaTrackingEvent=function(a,c){};a.fireMediaErrorEvent=function(a,c){};a.fireMediaTimeUpdateEvent=function(a,c,b){};a.fireMediaCloseEvent=function(a,c,b){};a.fireMediaVolumeChangeEvent=function(a,c,b){};\na.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(a){if(\"undefined\"!=typeof inmobi&&\ninmobi.recordEvent){var c={};c.trigger=a;inmobi.recordEvent(136,c)}};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(a){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={},b=!1;a.setOrientationProperties=function(c){try{c?(\"undefined\"!=typeof c.allowOrientationChange&&(mraidview.orientationProperties.allowOrientationChange=c.allowOrientationChange),\"undefined\"!=typeof c.forceOrientation&&(mraidview.orientationProperties.forceOrientation=c.forceOrientation),\"undefined\"!=typeof c.direction&&(mraidview.orientationProperties.direction=c.direction)):c=null,sdkController.setOrientationProperties(\"window.imraidview\",mraidview.stringify(mraidview.orientationProperties))}catch(b){a.showAlert(\"setOrientationProperties: \"+\nb+\", props = \"+c)}};a.getOrientationProperties=function(){return mraidview.orientationProperties};a.firePostStatusEvent=function(a){window.imraid.broadcastEvent(\"postStatus\",a)};a.fireMediaTrackingEvent=function(a,b){var d={};d.name=a;var e=\"inmobi_media_\"+a;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(e=e+\"_\"+b);window.imraid.broadcastEvent(e,d)};a.fireMediaErrorEvent=function(a,b){var d={name:\"error\"};d.code=b;var e=\"inmobi_media_\"+d.name;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(e=e+\"_\"+a);window.imraid.broadcastEvent(e,\nd)};a.fireMediaTimeUpdateEvent=function(a,b,d){var e={name:\"timeupdate\",target:{}};e.target.currentTime=b;e.target.duration=d;b=\"inmobi_media_\"+e.name;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(b=b+\"_\"+a);window.imraid.broadcastEvent(b,e)};a.saveContent=function(a,b,d){window.imraid.addEventListener(\"saveContent_\"+a,d);sdkController.saveContent(\"window.imraidview\",a,b)};a.cancelSaveContent=function(a){sdkController.cancelSaveContent(\"window.imraidview\",a)};a.disableCloseRegion=function(a){sdkController.disableCloseRegion(\"window.imraidview\",\na)};a.fireGalleryImageSelectedEvent=function(a,b,d){var e=new Image;e.src=\"data:image/jpeg;base64,\"+a;e.width=b;e.height=d;window.imraid.broadcastEvent(\"galleryImageSelected\",e)};a.fireCameraPictureCatpturedEvent=function(a,b,d){var e=new Image;e.src=\"data:image/jpeg;base64,\"+a;e.width=b;e.height=d;window.imraid.broadcastEvent(\"cameraPictureCaptured\",e)};a.fireMediaCloseEvent=function(a,b,d){var e={name:\"close\"};e.viaUserInteraction=b;e.target={};e.target.currentTime=d;b=\"inmobi_media_\"+e.name;\"undefined\"!=\ntypeof a&&(null!=a&&\"\"!=a)&&(b=b+\"_\"+a);window.imraid.broadcastEvent(b,e)};a.fireMediaVolumeChangeEvent=function(a,b,d){var e={name:\"volumechange\",target:{}};e.target.volume=b;e.target.muted=d;b=\"inmobi_media_\"+e.name;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(b=b+\"_\"+a);window.imraid.broadcastEvent(b,e)};a.fireDeviceMuteChangeEvent=function(a){window.imraid.broadcastEvent(\"deviceMuted\",a)};a.fireDeviceVolumeChangeEvent=function(a){window.imraid.broadcastEvent(\"deviceVolumeChange\",a)};a.fireHeadphonePluggedEvent=\nfunction(a){window.imraid.broadcastEvent(\"headphones\",a)};a.showAlert=function(a){sdkController.showAlert(\"window.imraidview\",a)};a.openExternal=function(c,b){try{600<=getSdkVersionInt()?sdkController.openExternal(\"window.imraidview\",c,b):sdkController.openExternal(\"window.imraidview\",c)}catch(d){a.showAlert(\"openExternal: \"+d)}};a.log=function(c){try{sdkController.log(\"window.imraidview\",c)}catch(b){a.showAlert(\"log: \"+b)}};a.getPlatform=function(){return\"android\"};a.asyncPing=function(c){try{sdkController.asyncPing(\"window.imraidview\",\nc)}catch(b){a.showAlert(\"asyncPing: \"+b)}};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 c=a.getSdkVersion().split(\".\"),b=c.length,d=\"\",e=0;e<b;e++)d+=c[e];return parseInt(d)};a.getSdkVersion=function(){return window._im_imaiview.getSdkVersion()};a.supports=function(a){console.log(\"bridge: supports (IMRAID)\");\nif(\"string\"!=typeof a)window.imraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\"supports\");else return\"false\"!=sdkController.supports(\"window.imraidview\",a)};a.postToSocial=function(c,b,d,e){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"postToSocial\");a.log(\"Method postToSocial not supported\")};a.incentCompleted=function(a){if(\"object\"!=typeof a||null==a)sdkController.incentCompleted(\"window.imraidview\",null);else try{sdkController.incentCompleted(\"window.imraidview\",\nJSON.stringify(a))}catch(b){sdkController.incentCompleted(\"window.imraidview\",null)}};a.getOrientation=function(){try{return String(sdkController.getOrientation(\"window.imraidview\"))}catch(c){a.showAlert(\"getOrientation: \"+c)}};a.acceptAction=function(c){try{sdkController.acceptAction(\"window.imraidview\",mraidview.stringify(c))}catch(b){a.showAlert(\"acceptAction: \"+b+\", params = \"+c)}};a.rejectAction=function(c){try{sdkController.rejectAction(\"window.imraidview\",mraidview.stringify(c))}catch(b){a.showAlert(\"rejectAction: \"+\nb+\", params = \"+c)}};a.updateToPassbook=function(c){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(a){void 0==a||\"boolean\"!=typeof a?console.log(\"disableBackButton called with invalid params\"):sdkController.disableBackButton(\"window.imraidview\",a)};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(a,b,d){682<=getSdkVersionInt()&&sdkController.startDownloader(\"window.imraidview\",a,b,d)};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(a){700<=getSdkVersionInt()&&(\"fireSkip\"===a?sdkController.fireSkip(\"window.imraidview\"):\"fireComplete\"===a?sdkController.fireComplete(\"window.imraidview\"):\"showEndCard\"===a&&\nsdkController.showEndCard(\"window.imraidview\"))};a.saveBlob=function(a){700<=getSdkVersionInt()&&sdkController.saveBlob(\"window.imraidview\",a)};a.getBlob=function(a,b){700<=getSdkVersionInt()&&sdkController.getBlob(a,b)};a.setCloseEndCardTracker=function(a){700<=getSdkVersionInt()&&sdkController.setCloseEndCardTracker(\"window.imraidview\",a)};a.getRenderableAdIndexes=function(){try{if(917<=getSdkVersionInt())return sdkController.getRenderableAdIndexes(\"window.imraidview\")}catch(a){}return\"[]\"};a.getCurrentRenderingIndex=\nfunction(){try{if(917<=getSdkVersionInt())return sdkController.getCurrentRenderingIndex(\"window.imraidview\")}catch(a){}return-1};a.showAd=function(a){try{917<=getSdkVersionInt()&&sdkController.showAd(\"window.imraidview\",a)}catch(b){}};a.timeSinceShow=function(){try{if(917<=getSdkVersionInt())return sdkController.timeSinceShow(\"window.imraidview\")}catch(a){}return-1};a.getShowTimeStamp=function(){try{if(917<=getSdkVersionInt())return sdkController.getShowTimeStamp(\"window.imraidview\")}catch(a){}return-1};\na.closeAll=function(){try{917<=getSdkVersionInt()&&sdkController.closeAll(\"window.imraidview\")}catch(a){}};a.loadAd=function(a){try{917<=getSdkVersionInt()&&sdkController.loadAd(\"window.imraidview\",a)}catch(b){}};a.setAdContext=function(a){try{917<=getSdkVersionInt()&&sdkController.setAdContext(\"window.imraidview\",a)}catch(b){}};a.getAdContext=function(){try{if(917<=getSdkVersionInt())return sdkController.getAdContext(\"window.imraidview\")}catch(a){}return\"\"};a.openWithoutTracker=function(a){try{\"undefined\"==\ntypeof a&&(a=null),sdkController.openWithoutTracker(\"window.imraidview\",a)}catch(b){}};a.impressionRendered=function(){window.imraid.broadcastEvent(\"impressionRendered\")};a.customExpand=function(c,b,d,e,g){try{void 0==d||\"number\"!=typeof d?console.log(\"screenPercentage called with invalid params\"):void 0==b||\"number\"!=typeof b?console.log(\"inputType called with invalid params\"):void 0==e||\"boolean\"!=typeof e?console.log(\"topNavBarVisible called with invalid params\"):void 0==g||\"boolean\"!=typeof g?\nconsole.log(\"bottomNavBarVisible called with invalid params\"):sdkController.customExpand(\"window.imraidview\",c,b,d,e,g)}catch(h){a.showAlert(\"executeNativeCustomExpand: \"+h+\", input = \"+c+\", inputType = \"+b+\", screenPercentage = \"+d+\", bottomNavBarVisible = \"+g+\", topNavBarVisible = \"+e)}};a.closeCustomExpand=function(){try{sdkController.closeCustomExpand(\"window.imraidview\")}catch(a){}};a.onGestureDetected=function(a,b){window.imraid.broadcastEvent(\"onGestureDetected\",a,b)};a.onUserLandingCompleted=\nfunction(){window.imraid.broadcastEvent(\"onUserLandingCompleted\")};a.onUserInteraction=function(){window.imraid.broadcastEvent(\"onUserInteraction\")};a.impressionFired=function(){try{sdkController.impressionFired(\"window.imraidview\")}catch(a){}};a.getMaxDeviceVolume=function(){try{return sdkController.getMaxDeviceVolume(\"window.imraidview\")}catch(a){return 15}};a.zoom=function(a){try{sdkController.zoom(\"window.imraidview\",a)}catch(b){}};a.onAudioStateChanged=function(a){try{sdkController.onAudioStateChanged(\"window.imraidview\",\na)}catch(b){}};a.submitAdReport=function(a){try{sdkController.submitAdReport(\"window.imraidview\",void 0!=a.adQualityUrl?a.adQualityUrl:null,void 0!=a.enableUserAdReportScreenshot?a.enableUserAdReportScreenshot:null,void 0!=a.templateInfo?a.templateInfo:null)}catch(b){}};a.logTelemetryEvent=function(a){try{var b=void 0!=a.eventType?a.eventType:null,d=void 0!=a.payload?a.payload:null;a=null;null!=d&&(a=mraidview.stringify(d));sdkController.logTelemetryEvent(\"window.imraidview\",b,a)}catch(e){}};a.onUserAudioMuteInteraction=\nfunction(a){try{sdkController.onUserAudioMuteInteraction(\"window.imraidview\",a)}catch(b){}};a.enableFallbackViewabilityFunctionality=function(){b=!0;a.checkFallbackViewable()&&window.mraid.broadcastEvent(\"viewableChange\",!0);mraid.addEventListener(\"sizeChange\",function(){window.mraid.broadcastEvent(\"viewableChange\",a.checkFallbackViewable())})};a.checkFallbackViewable=function(){try{var b=mraidview.getCurrentPosition(),f=b.height;return 40<=b.width&&40<=f?!0:!1}catch(d){a.showAlert(\"checkFallbackViewable: \"+\nd)}};a.fallbackViewabilityEnabled=function(){return b}})();\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,f,d){var e=arguments.length,g,h=null;if(3>e){if(\"function\"===typeof arguments[e-1])g=arguments[e-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,f,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,f){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imraid.openExternal\")||b.openExternal(a,f)};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,f,d,e){mraidview.detectAndBlockFraud(\"imraid.postToSocial\")||b.postToSocial(a,f,d,e)};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;a.enableFallbackViewabilityFunctionality=\nb.enableFallbackViewabilityFunctionality;a.logTelemetryEvent=b.logTelemetryEvent})();\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(f){}};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(e){}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,f,d){if(!imIsObjValid(f)||!imIsObjValid(d))return a;b.isHttpUrl(a)&&\n(a=-1==b.matchString(a,\"?\")?a+(\"?u-tap-o=\"+f+\",\"+d):a+(\"&u-tap-o=\"+f+\",\"+d));return a};b.performAdClick=function(a,f){f=f||event;if(imIsObjValid(a)){var d=a.clickConfig,e=a.landingConfig;if(!imIsObjValid(d)&&!imIsObjValid(e))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(f))try{m=f.changedTouches[0].pageX,n=f.changedTouches[0].pageY}catch(r){n=\nm=0}imIsObjValid(e)?imIsObjValid(d)?(l=e.url,q=e.fallbackUrl,p=e.urlType,g=d.url,h=d.pingWV,k=d.fr):(l=e.url,p=e.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,f){f=f||event;if(imIsObjValid(a)){var d=a.clickConfig,e=a.landingConfig;\nif(!imIsObjValid(d)&&!imIsObjValid(e))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(f))try{m=f.changedTouches[0].pageX,n=f.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(e)}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,f){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imai.openExternal\")||a.openExternal(b,f)};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})();\n");
            a2 = sb.toString();
            e5 e5Var2 = this.R;
            if (e5Var2 != null) {
                String TAG2 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                e5Var2.c(TAG2, "Returning default Mraid Js string.");
            }
        } else {
            e5 e5Var3 = this.R;
            if (e5Var3 != null) {
                String TAG3 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                e5Var3.c(TAG3, "Returning fetched Mraid Js string.");
            }
        }
        return a2;
    }

    @NotNull
    public final ja getOrientationProperties() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "getOrientationProperties "));
        }
        return this.s0;
    }

    public final eb getOriginalRenderView() {
        return this.i;
    }

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

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

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

    public i getReferenceContainer() {
        return this.W;
    }

    @NotNull
    public final JSONArray getRenderableAdIndexes() {
        y yVar = this.c0;
        JSONArray c2 = yVar == null ? null : yVar.c();
        return c2 == null ? new JSONArray() : c2;
    }

    @NotNull
    public final AdConfig.RenderingConfig getRenderingConfig() {
        AdConfig adConfig = this.q;
        if (adConfig != null) {
            return adConfig.getRendering();
        }
        Intrinsics.n("mAdConfig");
        throw null;
    }

    public final ob getResizeProperties() {
        return this.u;
    }

    public final long getShowTimeStamp() {
        y yVar = this.c0;
        if (yVar == null) {
            return 0L;
        }
        return yVar.b();
    }

    public Map<String, n0> getTelemetryManagerMap() {
        return this.w0;
    }

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

    @NotNull
    public final fe getVISIBILITY_CHANGE_LISTENER() {
        return this.B0;
    }

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

    @NotNull
    public final String getViewState() {
        return this.m;
    }

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

    @Override
    @NotNull
    public ae getViewableAd() {
        boolean z;
        String str;
        e5 e5Var;
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var2.c(TAG, Intrinsics.l(this, "viewableAd getter "));
        }
        if (this.d0 == null) {
            this.d0 = new k5(this, new be(this), new q4(this.h, this.r0, this.k0, this.l0, getVisibilityTrackingMinPercentage(), this.R), this.R);
            Set<cd> set = this.c;
            if (set != null) {
                for (cd cdVar : set) {
                    try {
                        if (cdVar.a == 3) {
                            Object obj = cdVar.b.get("omidAdSession");
                            i0 i0Var = obj instanceof i0 ? (i0) obj : null;
                            if (cdVar.b.containsKey("deferred")) {
                                Object obj2 = cdVar.b.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 = cdVar.b.get("customReferenceData");
                                    str = obj3 instanceof String ? (String) obj3 : null;
                                    if (z && i0Var != null) {
                                        i0Var.a(ca.h.a(this, this.g0, str));
                                    }
                                    e5Var = this.R;
                                    if (e5Var == null) {
                                        String TAG2 = H0;
                                        Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                                        e5Var.b(TAG2, "Did not find a OMID ad session; the IAB decorator will not be applied.");
                                    }
                                }
                            }
                            z = false;
                            Object obj32 = cdVar.b.get("customReferenceData");
                            if (obj32 instanceof String) {
                            }
                            if (z) {
                                i0Var.a(ca.h.a(this, this.g0, str));
                            }
                            e5Var = this.R;
                            if (e5Var == null) {
                            }
                        } else {
                            continue;
                        }
                    } catch (Exception e2) {
                        e5 e5Var3 = this.R;
                        if (e5Var3 != null) {
                            String str2 = H0;
                            e5Var3.b(str2, myobfuscated.b02.b.m(str2, "TAG", e2, "Exception occurred while creating the HTML viewable ad : "));
                        }
                    }
                }
            }
        }
        ae aeVar = this.d0;
        Intrinsics.e(aeVar);
        return aeVar;
    }

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

    public final void h() {
        Activity fullScreenActivity;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "finishFullScreenActivity "));
        }
        InMobiAdActivity.j.a((Object) this);
        if (getFullScreenActivity() == null) {
            if (this.b == 0) {
                setAndUpdateViewState("Default");
                eb ebVar = this.i;
                if (ebVar != null) {
                    ebVar.setAndUpdateViewState("Default");
                }
            } else if (Intrinsics.c("Default", this.m)) {
                setAndUpdateViewState("Hidden");
            }
            x();
            return;
        }
        y yVar = this.c0;
        if (yVar != null && yVar.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.M == -1 || (fullScreenActivity = getFullScreenActivity()) == null) {
            return;
        }
        fullScreenActivity.overridePendingTransition(0, this.M);
    }

    public final void i() {
        kb kbVar = this.S;
        if (kbVar != null) {
            Map<String, Object> a2 = kbVar.a();
            long j = kbVar.b;
            ScheduledExecutorService scheduledExecutorService = od.a;
            a2.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
            mc.a("FireAdReady", a2, null, 4);
        }
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "fireAdReady "));
        }
        this.o0 = true;
        if (this.h == 0) {
            k();
        }
        getListener().i(this);
    }

    public final void j() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "fireClickTrackers "));
        }
        w2 w2Var = this.C0;
        if (w2Var != null) {
            w2Var.c();
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(this, "fireOnUserInteraction "));
        }
        b("window.imraidview.onUserInteraction();");
        getListener().c(this);
    }

    public final void k() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "fireImpression "));
        }
        if (Intrinsics.c("video", this.r0) || Intrinsics.c("audio", this.r0)) {
            return;
        }
        o();
        b("window.imraidview.impressionRendered();");
        getListener().d(this);
    }

    public boolean l() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "hasUserInteracted Called");
        }
        if (getRenderingConfig() == null) {
            e5 e5Var2 = this.R;
            if (e5Var2 == null) {
                return false;
            }
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.b(TAG2, "hasUserInteracted renderingConfig = null");
            return false;
        }
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String str = H0;
            StringBuilder c2 = myobfuscated.w2.a.c(str, "TAG", "hasUserInteracted ");
            c2.append(getViewTouchTimestamp());
            c2.append(' ');
            c2.append(getRenderingConfig().getUserTouchResetTime());
            e5Var3.c(str, c2.toString());
        }
        return !getRenderingConfig().getAutoRedirectionEnforcement() || this.b0 || ((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 m() {
        return this.B == ee.VISIBLE;
    }

    public final void n() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "processResizeRequest "));
        }
        if (!Intrinsics.c("Default", this.m) && !Intrinsics.c("Resized", this.m)) {
            e5 e5Var2 = this.R;
            if (e5Var2 == null) {
                return;
            }
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.b(TAG2, "Render view state must be either DEFAULT or RESIZED to admit the resize request");
        } else if (this.u == null) {
            e5 e5Var3 = this.R;
            if (e5Var3 == null) {
                return;
            }
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.b(TAG3, "Render view state can not resize with invalid resize properties");
        } else {
            this.I = true;
            t7 t7Var = this.o;
            if (t7Var != null) {
                t7Var.a();
            }
            requestLayout();
            invalidate();
            setFocusable(true);
            setFocusableInTouchMode(true);
            requestFocus();
            setAndUpdateViewState("Resized");
            getListener().f(this);
            this.I = false;
        }
    }

    public final void o() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "recordContextualData "));
        }
        w2 w2Var = this.C0;
        if (w2Var == null) {
            return;
        }
        w2Var.a();
    }

    @Override
    public void onAttachedToWindow() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "onAttachedToWindow "));
        }
        super.onAttachedToWindow();
        s7 s7Var = this.p;
        if (s7Var != null) {
            j7 j7Var = s7Var.d;
            if (j7Var != null) {
                j7Var.b();
            }
            j7 j7Var2 = s7Var.e;
            if (j7Var2 != null) {
                j7Var2.b();
            }
            j7 j7Var3 = s7Var.f;
            if (j7Var3 != null) {
                j7Var3.b();
            }
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.a(TAG2, Intrinsics.l(this, "setIsViewHardwareAccelerated "));
        }
        this.r = isHardwareAccelerated();
        if (this.k == null) {
            ViewParent parent = getParent();
            this.k = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
        }
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.c(TAG3, "==== CHECKPOINT REACHED - VISIBLE ====");
        }
        e5 e5Var4 = this.R;
        if (e5Var4 == null) {
            return;
        }
        e5Var4.b();
    }

    @Override
    public void onDetachedFromWindow() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "onDetachedFromWindow "));
        }
        s7 s7Var = this.p;
        if (s7Var != null) {
            j7 j7Var = s7Var.d;
            if (j7Var != null) {
                j7Var.a();
            }
            j7 j7Var2 = s7Var.e;
            if (j7Var2 != null) {
                j7Var2.a();
            }
            j7 j7Var3 = s7Var.f;
            if (j7Var3 != null) {
                j7Var3.a();
            }
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, "Detached from window");
        }
        f0 f0Var = this.t0;
        if (f0Var == null) {
            Intrinsics.n("adQualityManager");
            throw null;
        }
        f0Var.b();
        if (this.u0.get()) {
            bc.a(1L, TimeUnit.SECONDS, new myobfuscated.q3.e(this, 17));
        }
        try {
            super.onDetachedFromWindow();
        } catch (IllegalArgumentException e2) {
            e5 e5Var3 = this.R;
            if (e5Var3 == null) {
                return;
            }
            String str = H0;
            StringBuilder c2 = myobfuscated.w2.a.c(str, "TAG", "Detaching WebView from window encountered an error ( ");
            c2.append((Object) e2.getMessage());
            c2.append(" )");
            e5Var3.b(str, c2.toString());
        }
    }

    @Override
    public boolean onDoubleTap(@NotNull MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        if (!getRenderingConfig().getSupportedGestures().contains(1)) {
            e5 e5Var = this.R;
            if (e5Var != null) {
                String TAG = H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.a(TAG, "Double tap gesture is disabled from config");
            }
            return false;
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(e2, "onDoubleTapEvent detected \n "));
        }
        setViewTouchTimestamp(SystemClock.elapsedRealtime());
        if (e2.getAction() == 1) {
            JSONArray jSONArray = new JSONArray();
            try {
                jSONArray.put(e2.getX());
                jSONArray.put(e2.getY());
            } catch (JSONException e3) {
                e5 e5Var3 = this.R;
                if (e5Var3 != null) {
                    String TAG3 = H0;
                    Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                    e5Var3.a(TAG3, "Exception in onDoubleTap", e3);
                }
            }
            JSONArray jSONArray2 = new JSONArray();
            jSONArray2.put(jSONArray);
            b("window.imraidview.onGestureDetected('1', '" + jSONArray2 + "');");
        }
        return false;
    }

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

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

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

    @Override
    public void onLongPress(@NotNull MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        if (!getRenderingConfig().getSupportedGestures().contains(5)) {
            e5 e5Var = this.R;
            if (e5Var == null) {
                return;
            }
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "LongPress gesture is disabled from config");
            return;
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(e2, "onLongPress detected \n "));
        }
        JSONArray jSONArray = new JSONArray();
        try {
            jSONArray.put(e2.getX());
            jSONArray.put(e2.getY());
        } catch (JSONException e3) {
            e5 e5Var3 = this.R;
            if (e5Var3 != null) {
                String TAG3 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                e5Var3.a(TAG3, "Exception in onLongPress", e3);
            }
        }
        JSONArray jSONArray2 = new JSONArray();
        jSONArray2.put(jSONArray);
        b("window.imraidview.onGestureDetected('5', '" + jSONArray2 + "');");
    }

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

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

    @Override
    public boolean onSingleTapConfirmed(@NotNull MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        if (!getRenderingConfig().getSupportedGestures().contains(0)) {
            e5 e5Var = this.R;
            if (e5Var != null) {
                String TAG = H0;
                Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
                e5Var.a(TAG, "Click gesture is disabled from config");
            }
            return false;
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(e2, "onSingleTapConfirmed detected \n "));
        }
        JSONArray jSONArray = new JSONArray();
        try {
            jSONArray.put(e2.getX());
            jSONArray.put(e2.getY());
        } catch (JSONException e3) {
            e5 e5Var3 = this.R;
            if (e5Var3 != null) {
                String TAG3 = H0;
                Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                e5Var3.a(TAG3, "Exception in onSingleTapConfirmed", e3);
            }
        }
        JSONArray jSONArray2 = new JSONArray();
        jSONArray2.put(jSONArray);
        b("window.imraidview.onGestureDetected('0', '" + jSONArray2 + "');");
        return false;
    }

    @Override
    public boolean onSingleTapUp(@NotNull MotionEvent e2) {
        Intrinsics.checkNotNullParameter(e2, "e");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(e2, "onSingleTapUp detected \n "));
        }
        setViewTouchTimestamp(SystemClock.elapsedRealtime());
        return false;
    }

    @Override
    public void onSizeChanged(int i, int i2, int i3, int i4) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "onSizeChanged "));
        }
        super.onSizeChanged(i, i2, i3, i4);
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, "onSizeChanged (" + i + ", " + i2 + ')');
        }
        if (i == 0 || i2 == 0) {
            return;
        }
        int b2 = p3.b(i);
        int b3 = p3.b(i2);
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.c(TAG3, "fireSizeChanged " + this + " w-" + b2 + " h-" + b3);
        }
        b("window.mraidview.broadcastEvent('sizeChange'," + b2 + ',' + b3 + ");");
    }

    @Override
    public boolean onTouchEvent(@NotNull MotionEvent event) {
        float f2;
        float f3;
        float f4;
        Intrinsics.checkNotNullParameter(event, "event");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "onTouchEvent "));
        }
        if (this.b == 1) {
            p7 p7Var = this.m0;
            p7Var.getClass();
            Intrinsics.checkNotNullParameter(event, "event");
            int actionMasked = event.getActionMasked();
            if (actionMasked == 0) {
                String TAG2 = p7Var.b;
                Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
                Intrinsics.l(event, "ACTION_DOWN \n");
                p7Var.g = event.getPointerId(event.getActionIndex());
                p7Var.j = new JSONArray();
                JSONArray jSONArray = new JSONArray((Collection) myobfuscated.jk2.o.h(Float.valueOf(event.getX()), Float.valueOf(event.getY())));
                JSONArray jSONArray2 = p7Var.j;
                if (jSONArray2 != null) {
                    jSONArray2.put(jSONArray);
                }
            } else if (actionMasked != 1) {
                float f5 = 0.0f;
                if (actionMasked == 2) {
                    JSONArray jSONArray3 = p7Var.j;
                    int i = p7Var.g;
                    if (i != -1 && p7Var.h != -1) {
                        int findPointerIndex = event.findPointerIndex(i);
                        int findPointerIndex2 = event.findPointerIndex(p7Var.h);
                        if (findPointerIndex >= 0) {
                            f3 = event.getX(findPointerIndex);
                            f2 = event.getY(findPointerIndex);
                        } else {
                            p5 p5Var = p5.a;
                            StringBuilder sb = new StringBuilder("Index for mPtrID1=");
                            defpackage.e.w(sb, p7Var.g, " is ", findPointerIndex, " | Pointer count=");
                            sb.append(event.getPointerCount());
                            p5Var.a(new b2(new IllegalArgumentException(sb.toString())));
                            f2 = 0.0f;
                            f3 = 0.0f;
                        }
                        if (findPointerIndex2 >= 0) {
                            float x = event.getX(findPointerIndex2);
                            f5 = event.getY(findPointerIndex2);
                            f4 = x;
                        } else {
                            p5 p5Var2 = p5.a;
                            StringBuilder sb2 = new StringBuilder("Index for mPtrID1=");
                            defpackage.e.w(sb2, p7Var.h, " is ", findPointerIndex2, " | Pointer count=");
                            sb2.append(event.getPointerCount());
                            p5Var2.a(new b2(new IllegalArgumentException(sb2.toString())));
                            f4 = 0.0f;
                        }
                        float degrees = ((float) Math.toDegrees(((float) Math.atan2(p7Var.d - p7Var.f, p7Var.c - p7Var.e)) - ((float) Math.atan2(f5 - f2, f4 - f3)))) % 360;
                        if (degrees < -180.0f) {
                            degrees += 360.0f;
                        }
                        if (degrees > 180.0f) {
                            degrees -= 360.0f;
                        }
                        p7Var.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) myobfuscated.jk2.o.h(Float.valueOf(x2), Float.valueOf(y)));
                            if (p7Var.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 = p7Var.b;
                    Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
                    event.toString();
                    p7Var.g = -1;
                    p7Var.h = -1;
                } else if (actionMasked == 5) {
                    String TAG4 = p7Var.b;
                    Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
                    Intrinsics.l(event, "ACTION_POINTER_DOWN \n");
                    p7Var.h = event.getPointerId(event.getActionIndex());
                    p7Var.k = MotionEvent.obtain(event);
                    int findPointerIndex3 = event.findPointerIndex(p7Var.g);
                    int findPointerIndex4 = event.findPointerIndex(p7Var.h);
                    if (findPointerIndex3 >= 0) {
                        p7Var.e = event.getX(findPointerIndex3);
                        p7Var.f = event.getY(findPointerIndex3);
                    } else {
                        p5 p5Var3 = p5.a;
                        StringBuilder sb3 = new StringBuilder("Index for mPtrID1=");
                        defpackage.e.w(sb3, p7Var.g, " is ", findPointerIndex3, " | Pointer count=");
                        sb3.append(event.getPointerCount());
                        p5Var3.a(new b2(new IllegalArgumentException(sb3.toString())));
                    }
                    if (findPointerIndex4 >= 0) {
                        p7Var.c = event.getX(findPointerIndex4);
                        p7Var.d = event.getY(findPointerIndex4);
                    } else {
                        p5 p5Var4 = p5.a;
                        StringBuilder sb4 = new StringBuilder("Index for mPtrID2=");
                        defpackage.e.w(sb4, p7Var.h, " is ", findPointerIndex4, " | Pointer count=");
                        sb4.append(event.getPointerCount());
                        p5Var4.a(new b2(new IllegalArgumentException(sb4.toString())));
                    }
                    p7Var.l = p7Var.a(p7Var.e, p7Var.c, p7Var.f, p7Var.d);
                } else if (actionMasked == 6) {
                    String TAG5 = p7Var.b;
                    Intrinsics.checkNotNullExpressionValue(TAG5, "TAG");
                    event.toString();
                    p7Var.h = -1;
                    if (p7Var.i > 30.0f) {
                        MotionEvent motionEvent = p7Var.k;
                        if (motionEvent != null) {
                            p7Var.a.a(p7Var, motionEvent, event);
                        }
                        p7Var.i = 0.0f;
                    }
                    if (Math.abs(p7Var.a(event.getX(), event.getX(1), event.getY(), event.getY(1)) - p7Var.l) > 500) {
                        MotionEvent motionEvent2 = p7Var.k;
                        if (motionEvent2 != null) {
                            p7Var.a.b(p7Var, motionEvent2, event);
                        }
                        p7Var.l = Integer.MAX_VALUE;
                    }
                }
            } else {
                String TAG6 = p7Var.b;
                Intrinsics.checkNotNullExpressionValue(TAG6, "TAG");
                event.toString();
                p7Var.g = -1;
                JSONArray jSONArray6 = p7Var.j;
                if (jSONArray6 != null && jSONArray6.length() > 5) {
                    p7Var.a.a(p7Var);
                    p7Var.j = new JSONArray();
                }
            }
        }
        this.n0.onTouchEvent(event);
        if (this.e) {
            setViewTouchTimestamp(SystemClock.elapsedRealtime());
        }
        return super.onTouchEvent(event);
    }

    @Override
    public void onWindowFocusChanged(boolean z) {
        Activity fullScreenActivity;
        boolean isInMultiWindowMode;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "onWindowFocusChanged " + this + " - " + z);
        }
        super.onWindowFocusChanged(z);
        if (z) {
            if (isShown()) {
                q4.a aVar = (q4.a) q4.k;
                if (aVar.a(this, this, this.l0, null) && aVar.a(this, this, this.l0)) {
                    z = true;
                }
            }
            z = false;
        }
        if (Build.VERSION.SDK_INT > 23 && (fullScreenActivity = getFullScreenActivity()) != null) {
            isInMultiWindowMode = fullScreenActivity.isInMultiWindowMode();
            if (isInMultiWindowMode) {
                return;
            }
        }
        c(z);
    }

    @Override
    public void onWindowVisibilityChanged(int i) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "onWindowVisibilityChanged " + this + ' ' + i);
        }
        super.onWindowVisibilityChanged(i);
        boolean z = false;
        boolean z2 = i == 0;
        if (z2) {
            int visibilityTrackingMinPercentage = getVisibilityTrackingMinPercentage();
            if (isShown()) {
                q4.a aVar = (q4.a) q4.k;
                if (aVar.a(this, this, visibilityTrackingMinPercentage, null) && aVar.a(this, this, visibilityTrackingMinPercentage)) {
                    z = true;
                }
            }
        } else {
            z = z2;
        }
        c(z);
    }

    public final void p() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "replayToInterActive");
        }
        b("window.imraid.broadcastEvent('replay');");
    }

    public final void q() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "resetLayout "));
        }
        setVisibility(0);
        requestLayout();
    }

    public final void r() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setCurrentPosition "));
        }
        this.w = new JSONObject();
        int[] iArr = new int[2];
        getLocationOnScreen(iArr);
        try {
            JSONObject jSONObject = this.w;
            if (jSONObject != null) {
                jSONObject.put("x", p3.b(iArr[0]));
            }
            JSONObject jSONObject2 = this.w;
            if (jSONObject2 != null) {
                jSONObject2.put("y", p3.b(iArr[1]));
            }
            int b2 = p3.b(getWidth());
            int b3 = p3.b(getHeight());
            JSONObject jSONObject3 = this.w;
            if (jSONObject3 != null) {
                jSONObject3.put("width", b2);
            }
            JSONObject jSONObject4 = this.w;
            if (jSONObject4 != null) {
                jSONObject4.put("height", b3);
            }
        } catch (JSONException unused) {
        }
        synchronized (this.H) {
            this.y = false;
            getCurrentPositionMonitor().notifyAll();
            Unit unit = Unit.a;
        }
    }

    public final void s() {
        ViewGroup viewGroup;
        int width;
        WeakReference<ViewGroup> weakReference;
        ViewGroup viewGroup2;
        int height;
        JSONObject jSONObject;
        JSONObject jSONObject2;
        ViewGroup viewGroup3;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setDefaultPosition "));
        }
        int[] iArr = new int[2];
        this.v = new JSONObject();
        if (this.k == null) {
            ViewParent parent = getParent();
            this.k = new WeakReference<>(parent instanceof ViewGroup ? (ViewGroup) parent : null);
        }
        WeakReference<ViewGroup> weakReference2 = this.k;
        try {
            if ((weakReference2 != null ? weakReference2.get() : null) != null) {
                WeakReference<ViewGroup> weakReference3 = this.k;
                if (weakReference3 != null && (viewGroup3 = weakReference3.get()) != null) {
                    viewGroup3.getLocationOnScreen(iArr);
                }
                JSONObject jSONObject3 = this.v;
                if (jSONObject3 != null) {
                    jSONObject3.put("x", p3.b(iArr[0]));
                }
                JSONObject jSONObject4 = this.v;
                if (jSONObject4 != null) {
                    jSONObject4.put("y", p3.b(iArr[1]));
                }
                WeakReference<ViewGroup> weakReference4 = this.k;
                if (weakReference4 != null && (viewGroup = weakReference4.get()) != null) {
                    width = viewGroup.getWidth();
                    int b2 = p3.b(width);
                    weakReference = this.k;
                    if (weakReference != null && (viewGroup2 = weakReference.get()) != null) {
                        height = viewGroup2.getHeight();
                        int b3 = p3.b(height);
                        jSONObject = this.v;
                        if (jSONObject == null) {
                            jSONObject.put("width", b2);
                        }
                        jSONObject2 = this.v;
                        if (jSONObject2 == null) {
                            jSONObject2.put("height", b3);
                        }
                    }
                    height = 0;
                    int b32 = p3.b(height);
                    jSONObject = this.v;
                    if (jSONObject == null) {
                    }
                    jSONObject2 = this.v;
                    if (jSONObject2 == null) {
                    }
                }
                width = 0;
                int b22 = p3.b(width);
                weakReference = this.k;
                if (weakReference != null) {
                    height = viewGroup2.getHeight();
                    int b322 = p3.b(height);
                    jSONObject = this.v;
                    if (jSONObject == null) {
                    }
                    jSONObject2 = this.v;
                    if (jSONObject2 == null) {
                    }
                }
                height = 0;
                int b3222 = p3.b(height);
                jSONObject = this.v;
                if (jSONObject == null) {
                }
                jSONObject2 = this.v;
                if (jSONObject2 == null) {
                }
            } else {
                JSONObject jSONObject5 = this.v;
                if (jSONObject5 != null) {
                    jSONObject5.put("x", 0);
                }
                JSONObject jSONObject6 = this.v;
                if (jSONObject6 != null) {
                    jSONObject6.put("y", 0);
                }
                JSONObject jSONObject7 = this.v;
                if (jSONObject7 != null) {
                    jSONObject7.put("width", 0);
                }
                JSONObject jSONObject8 = this.v;
                if (jSONObject8 != null) {
                    jSONObject8.put("height", 0);
                }
            }
        } catch (JSONException unused) {
        }
        synchronized (this.G) {
            this.x = false;
            getDefaultPositionMonitor().notifyAll();
            Unit unit = Unit.a;
        }
    }

    public final void setAdPodHandler(y yVar) {
        this.c0 = yVar;
    }

    public final void setAdSize(@NotNull String adSize) {
        Intrinsics.checkNotNullParameter(adSize, "adSize");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setAdSize "));
        }
        Object[] array = myobfuscated.ud0.d.c("x", adSize, 0).toArray(new String[0]);
        if (array == null) {
            throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
        }
        this.f0 = p3.a(Integer.parseInt(((String[]) array)[0]));
        Object[] array2 = myobfuscated.ud0.d.c("x", adSize, 0).toArray(new String[0]);
        if (array2 == null) {
            throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
        }
        this.i0 = p3.a(Integer.parseInt(((String[]) array2)[1])) * this.f0;
    }

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

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

    public final void setAndUpdateViewState(@NotNull String state) {
        Intrinsics.checkNotNullParameter(state, "state");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setAndUpdateViewState "));
        }
        this.m = state;
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            String TAG2 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.c(TAG2, Intrinsics.l(this.m, "set state:"));
        }
        Locale locale = Locale.ENGLISH;
        String v = myobfuscated.b0.b.v(locale, "ENGLISH", state, locale, "(this as java.lang.String).toLowerCase(locale)");
        e5 e5Var3 = this.R;
        if (e5Var3 != null) {
            String TAG3 = H0;
            Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
            e5Var3.c(TAG3, "fireStateChange " + this + ' ' + v);
        }
        b("window.mraidview.broadcastEvent('stateChange','" + v + "');");
    }

    public final void setBlobProvider(x1 x1Var) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setBlobProvider "));
        }
        this.V = x1Var;
    }

    public final void setCloseEndCardTracker(String url) {
        xd b2;
        qd f2;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setCloseEndCardTracker "));
        }
        i referenceContainer = getReferenceContainer();
        if (!(referenceContainer instanceof f9) || url == null) {
            return;
        }
        f9 f9Var = (f9) referenceContainer;
        f9Var.getClass();
        Intrinsics.checkNotNullParameter(url, "url");
        e5 e5Var2 = f9Var.U;
        if (e5Var2 != null) {
            String TAG2 = f9Var.V;
            Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
            e5Var2.a(TAG2, Intrinsics.l(url, "Setting close end tracker with URL : "));
        }
        View videoContainerView = f9Var.getVideoContainerView();
        if (videoContainerView instanceof j9) {
            Object tag = ((j9) videoContainerView).getVideoView().getTag();
            g9 g9Var = tag instanceof g9 ? (g9) tag : null;
            if (g9Var == null || (b2 = g9Var.b()) == null || (f2 = b2.f()) == null) {
                return;
            }
            f2.a(new c9(url, 0, "closeEndCard", null));
        }
    }

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

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

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

    public final void setContextualDataHandler(w2 w2Var) {
        this.C0 = w2Var;
    }

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

    public final void setDisableBackButton(boolean z) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setDisableBackButton "));
        }
        this.D = z;
    }

    public final void setEmbeddedBrowserJSCallbacks(t3 t3Var) {
        this.q0 = t3Var;
    }

    public void setExitAnimation(int i) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setExitAnimation "));
        }
        this.M = i;
    }

    public final void setExpandProperties(@NotNull h4 expandProperties) {
        Intrinsics.checkNotNullParameter(expandProperties, "expandProperties");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setExpandProperties "));
        }
        if (expandProperties.d) {
            setUseCustomClose(expandProperties.c);
        }
        this.t = expandProperties;
    }

    public void setFriendlyViews(Map<View, ? extends FriendlyObstructionPurpose> map) {
        this.U = map;
    }

    @Override
    public void setFullScreenActivityContext(Activity activity) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setFullScreenActivityContext "));
        }
        this.j = new WeakReference<>(activity);
        y();
    }

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

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

    public final void setLogger(@NotNull e5 logger) {
        Intrinsics.checkNotNullParameter(logger, "logger");
        this.R = logger;
        fb fbVar = this.p0;
        fbVar.getClass();
        Intrinsics.checkNotNullParameter(logger, "logger");
        fbVar.h = logger;
        s7 s7Var = this.p;
        if (s7Var != null) {
            Intrinsics.checkNotNullParameter(logger, "logger");
            s7Var.b = logger;
        }
        q7 q7Var = this.n;
        if (q7Var != null) {
            Intrinsics.checkNotNullParameter(logger, "logger");
            q7Var.f = logger;
        }
        String TAG = H0;
        Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
        logger.c(TAG, "adding renderView to reference tracker");
        db.a.a(this, logger);
    }

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

    public final void setOrientationProperties(@NotNull ja orientationProperties) {
        Intrinsics.checkNotNullParameter(orientationProperties, "orientationProperties");
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setOrientationProperties "));
        }
        this.s0 = orientationProperties;
        y();
    }

    public final void setOriginalRenderView(eb ebVar) {
        this.i = ebVar;
    }

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

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

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

    public void setReferenceContainer(i iVar) {
        this.W = iVar;
    }

    public final void setRenderViewEventListener(gb gbVar) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setRenderViewEventListener "));
        }
        this.l = gbVar;
    }

    public final void setResizeProperties(ob obVar) {
        this.u = obVar;
    }

    public final void setScrollable(boolean z) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, Intrinsics.l(this, "setScrollable "));
        }
        setScrollContainer(z);
        setVerticalScrollBarEnabled(z);
        setHorizontalScrollBarEnabled(z);
    }

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

    public final void setUseCustomClose(boolean z) {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "setUseCustomClose " + this + ' ' + z);
        }
        this.z = z;
    }

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

    public final void setWatermark(@NotNull WatermarkData watermarkData) {
        Intrinsics.checkNotNullParameter(watermarkData, "watermarkData");
        if (!getAdConfig().getWatermarkEnabled()) {
            e5 e5Var = this.R;
            if (e5Var == null) {
                return;
            }
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.a(TAG, "Watermark disabled from config. ignoring...");
            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.P = frameLayout;
        getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public final void onGlobalLayout() {
                eb.m88setWatermark$lambda2(eb.this);
            }
        });
    }

    @Override
    public void stopLoading() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "stopLoading "));
        }
        if (this.F.get()) {
            return;
        }
        super.stopLoading();
    }

    public final void t() {
        int webImpressionMinPercentageViewed;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setFallbackImpressionMinPercentageViewed "));
        }
        if (Intrinsics.c("video", this.r0)) {
            AdConfig adConfig = this.q;
            if (adConfig == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinPercentageViewed = adConfig.getViewability().getVideoImpressionMinPercentageViewed();
        } else if (!Intrinsics.c("audio", this.r0)) {
            AdConfig adConfig2 = this.q;
            if (adConfig2 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinPercentageViewed = adConfig2.getViewability().getWebImpressionMinPercentageViewed();
        } else if (Intrinsics.c("audio", getAdType())) {
            AdConfig adConfig3 = this.q;
            if (adConfig3 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinPercentageViewed = adConfig3.getViewability().getAudioImpressionMinPercentageViewed();
        } else {
            AdConfig adConfig4 = this.q;
            if (adConfig4 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinPercentageViewed = adConfig4.getViewability().getWebImpressionMinPercentageViewed();
        }
        this.l0 = webImpressionMinPercentageViewed;
    }

    public final void u() {
        int webImpressionMinTimeViewed;
        if (Intrinsics.c("video", this.r0)) {
            AdConfig adConfig = this.q;
            if (adConfig == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinTimeViewed = adConfig.getViewability().getVideoImpressionMinTimeViewed();
        } else if (!Intrinsics.c("audio", this.r0)) {
            AdConfig adConfig2 = this.q;
            if (adConfig2 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinTimeViewed = adConfig2.getViewability().getWebImpressionMinTimeViewed();
        } else if (Intrinsics.c("audio", getAdType())) {
            AdConfig adConfig3 = this.q;
            if (adConfig3 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinTimeViewed = adConfig3.getViewability().getAudioImpressionMinTimeViewed();
        } else {
            AdConfig adConfig4 = this.q;
            if (adConfig4 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            webImpressionMinTimeViewed = adConfig4.getViewability().getWebImpressionMinTimeViewed();
        }
        this.k0 = webImpressionMinTimeViewed;
    }

    public final void v() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setFallbackImpressionParams "));
        }
        u();
        t();
        w();
    }

    public final void w() {
        byte interstitialImpressionType;
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "setFallbackImpressionType "));
        }
        String adType = getAdType();
        if (Intrinsics.c(adType, "banner")) {
            AdConfig adConfig = this.q;
            if (adConfig == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            interstitialImpressionType = adConfig.getViewability().getBannerImpressionType();
        } else if (Intrinsics.c(adType, "audio")) {
            AdConfig adConfig2 = this.q;
            if (adConfig2 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            interstitialImpressionType = adConfig2.getViewability().getAudioImpressionType();
        } else {
            AdConfig adConfig3 = this.q;
            if (adConfig3 == null) {
                Intrinsics.n("mAdConfig");
                throw null;
            }
            interstitialImpressionType = adConfig3.getViewability().getInterstitialImpressionType();
        }
        this.h = interstitialImpressionType;
    }

    public final void x() {
        getListener().e(this);
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, "ad dismissed");
        }
        e5 e5Var2 = this.R;
        if (e5Var2 != null) {
            e5Var2.a();
        }
        f0 f0Var = this.t0;
        if (f0Var != null) {
            f0Var.b();
        } else {
            Intrinsics.n("adQualityManager");
            throw null;
        }
    }

    public final void y() {
        e5 e5Var = this.R;
        if (e5Var != null) {
            String TAG = H0;
            Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
            e5Var.c(TAG, Intrinsics.l(this, "updateActivitiesOrientationProperties "));
        }
        Activity activity = this.j.get();
        if (activity != null && (activity instanceof InMobiAdActivity)) {
            ja orientationProperties = this.s0;
            Intrinsics.checkNotNullParameter(orientationProperties, "orientationProperties");
            a5 a5Var = ((InMobiAdActivity) activity).a;
            if (a5Var != null) {
                a5Var.a(orientationProperties);
            } else {
                Intrinsics.n("orientationHandler");
                throw null;
            }
        }
    }
}