package com.google.android.gms.internal.ads;

import android.os.Bundle;
import android.os.Parcelable;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import java.util.ArrayList;
import tv.danmaku.ijk.media.player.IjkMediaMeta;

/* JADX INFO: loaded from: classes2.dex */
public final class i21 implements m61 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final n7.f4 f12338a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final boolean f12339b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final String f12340c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final float f12341d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f12342e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final int f12343f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final int f12344g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final boolean f12345h;

    @Nullable
    public final String zzb;

    @Nullable
    public final String zzh;

    @Nullable
    public final j0.d zzk;

    @Nullable
    public final g21 zzl;

    public i21(n7.f4 f4Var, @Nullable String str, boolean z10, String str2, float f10, int i10, int i11, @Nullable String str3, int i12, boolean z11, @Nullable j0.d dVar, @Nullable g21 g21Var) {
        if (f4Var == null) {
            throw new NullPointerException("the adSize must not be null");
        }
        this.f12338a = f4Var;
        this.zzb = str;
        this.f12339b = z10;
        this.f12340c = str2;
        this.f12341d = f10;
        this.f12342e = i10;
        this.f12343f = i11;
        this.zzh = str3;
        this.f12344g = i12;
        this.f12345h = z11;
        this.zzk = dVar;
        this.zzl = g21Var;
    }

    public final void a(Bundle bundle) {
        n7.f4 f4Var = this.f12338a;
        int i10 = f4Var.f30950e;
        mb1.zzb(bundle, "smart_w", "full", i10 == -1);
        int i11 = f4Var.f30947b;
        mb1.zzb(bundle, "smart_h", "auto", i11 == -2);
        mb1.zzd(bundle, "ene", true, f4Var.f30955j);
        mb1.zzb(bundle, "rafmt", "102", f4Var.f30958m);
        mb1.zzb(bundle, "rafmt", "103", f4Var.Q);
        boolean z10 = f4Var.R;
        mb1.zzb(bundle, "rafmt", "105", z10);
        mb1.zzd(bundle, "inline_adaptive_slot", true, this.f12345h);
        mb1.zzd(bundle, "interscroller_slot", true, z10);
        mb1.zze(bundle, IjkMediaMeta.IJKM_KEY_FORMAT, this.zzb);
        mb1.zzb(bundle, "fluid", "height", this.f12339b);
        mb1.zzb(bundle, "sz", this.f12340c, !TextUtils.isEmpty(r5));
        bundle.putFloat("u_sd", this.f12341d);
        bundle.putInt("sw", this.f12342e);
        bundle.putInt("sh", this.f12343f);
        String str = this.zzh;
        mb1.zzb(bundle, "sc", str, true ^ TextUtils.isEmpty(str));
        int i12 = this.f12344g;
        if (i12 != -1) {
            bundle.putInt("u_mso", i12);
        }
        j0.d dVar = this.zzk;
        if (dVar != null) {
            bundle.putInt("sam_t", dVar.f28503b);
            bundle.putInt("sam_b", dVar.f28505d);
            bundle.putInt("sam_l", dVar.f28502a);
            bundle.putInt("sam_r", dVar.f28504c);
        }
        g21 g21Var = this.zzl;
        if (g21Var != null) {
            bundle.putInt("rc_tl", g21Var.f11472a);
            bundle.putInt("rc_tr", g21Var.f11473b);
            bundle.putInt("rc_bl", g21Var.f11474c);
            bundle.putInt("rc_br", g21Var.f11475d);
        }
        ArrayList<? extends Parcelable> arrayList = new ArrayList<>();
        n7.f4[] f4VarArr = f4Var.f30952g;
        if (f4VarArr == null) {
            Bundle bundle2 = new Bundle();
            bundle2.putInt("height", i11);
            bundle2.putInt("width", i10);
            bundle2.putBoolean("is_fluid_height", f4Var.f30954i);
            arrayList.add(bundle2);
        } else {
            for (n7.f4 f4Var2 : f4VarArr) {
                Bundle bundle3 = new Bundle();
                bundle3.putBoolean("is_fluid_height", f4Var2.f30954i);
                bundle3.putInt("height", f4Var2.f30947b);
                bundle3.putInt("width", f4Var2.f30950e);
                arrayList.add(bundle3);
            }
        }
        bundle.putParcelableArrayList("valid_ad_sizes", arrayList);
    }

    @Override // com.google.android.gms.internal.ads.m61
    public final /* synthetic */ void zza(Object obj) {
        a(((zd0) obj).f19235a);
    }

    @Override // com.google.android.gms.internal.ads.m61
    public final /* synthetic */ void zzb(Object obj) {
        a(((zd0) obj).f19236b);
    }
}
