package defpackage;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import androidx.media3.exoplayer.source.ProgressiveMediaSource;
import defpackage.f80;

/* JADX INFO: loaded from: classes.dex */
public abstract class f80<T extends f80<T>> implements Cloneable {
    public int a;
    public Drawable e;
    public int f;
    public Drawable i;
    public int j;
    public boolean o;
    public boolean s;
    public Resources.Theme t;
    public boolean u;
    public boolean w;
    public float b = 1.0f;
    public dc2 c = dc2.d;
    public di7 d = di7.c;
    public boolean k = true;
    public int l = -1;
    public int m = -1;
    public v25 n = qk2.b;
    public my6 p = new my6();
    public cr0 q = new cr0(0);
    public Class r = Object.class;
    public boolean v = true;

    public static boolean i(int i, int i2) {
        return (i & i2) != 0;
    }

    public f80 a(f80 f80Var) {
        if (this.u) {
            return clone().a(f80Var);
        }
        if (i(f80Var.a, 2)) {
            this.b = f80Var.b;
        }
        if (i(f80Var.a, ProgressiveMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES)) {
            this.w = f80Var.w;
        }
        if (i(f80Var.a, 4)) {
            this.c = f80Var.c;
        }
        if (i(f80Var.a, 8)) {
            this.d = f80Var.d;
        }
        if (i(f80Var.a, 16)) {
            this.e = f80Var.e;
            this.f = 0;
            this.a &= -33;
        }
        if (i(f80Var.a, 32)) {
            this.f = f80Var.f;
            this.e = null;
            this.a &= -17;
        }
        if (i(f80Var.a, 64)) {
            this.i = f80Var.i;
            this.j = 0;
            this.a &= -129;
        }
        if (i(f80Var.a, 128)) {
            this.j = f80Var.j;
            this.i = null;
            this.a &= -65;
        }
        if (i(f80Var.a, 256)) {
            this.k = f80Var.k;
        }
        if (i(f80Var.a, 512)) {
            this.m = f80Var.m;
            this.l = f80Var.l;
        }
        if (i(f80Var.a, 1024)) {
            this.n = f80Var.n;
        }
        if (i(f80Var.a, 4096)) {
            this.r = f80Var.r;
        }
        if (i(f80Var.a, 8192)) {
            this.a &= -16385;
        }
        if (i(f80Var.a, 16384)) {
            this.a &= -8193;
        }
        if (i(f80Var.a, 32768)) {
            this.t = f80Var.t;
        }
        if (i(f80Var.a, 131072)) {
            this.o = f80Var.o;
        }
        if (i(f80Var.a, 2048)) {
            this.q.putAll(f80Var.q);
            this.v = f80Var.v;
        }
        this.a |= f80Var.a;
        this.p.b.g(f80Var.p.b);
        q();
        return this;
    }

    public final f80 b() {
        return w(af2.c, new xt0());
    }

    @Override // 
    /* JADX INFO: renamed from: c, reason: merged with bridge method [inline-methods] */
    public f80 clone() {
        try {
            f80 f80Var = (f80) super.clone();
            my6 my6Var = new my6();
            f80Var.p = my6Var;
            my6Var.b.g(this.p.b);
            cr0 cr0Var = new cr0(0);
            f80Var.q = cr0Var;
            cr0Var.putAll(this.q);
            f80Var.s = false;
            f80Var.u = false;
            return f80Var;
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
    }

    public final f80 d(Class cls) {
        if (this.u) {
            return clone().d(cls);
        }
        this.r = cls;
        this.a |= 4096;
        q();
        return this;
    }

    public final f80 e(dc2 dc2Var) {
        if (this.u) {
            return clone().e(dc2Var);
        }
        this.c = dc2Var;
        this.a |= 4;
        q();
        return this;
    }

    public boolean equals(Object obj) {
        if (obj instanceof f80) {
            return h((f80) obj);
        }
        return false;
    }

    public final f80 f(int i) {
        if (this.u) {
            return clone().f(i);
        }
        this.f = i;
        int i2 = this.a | 32;
        this.e = null;
        this.a = i2 & (-17);
        q();
        return this;
    }

    public final f80 g(Drawable drawable) {
        if (this.u) {
            return clone().g(drawable);
        }
        this.e = drawable;
        int i = this.a | 16;
        this.f = 0;
        this.a = i & (-33);
        q();
        return this;
    }

    public final boolean h(f80 f80Var) {
        return Float.compare(f80Var.b, this.b) == 0 && this.f == f80Var.f && hda.b(this.e, f80Var.e) && this.j == f80Var.j && hda.b(this.i, f80Var.i) && this.k == f80Var.k && this.l == f80Var.l && this.m == f80Var.m && this.o == f80Var.o && this.c.equals(f80Var.c) && this.d == f80Var.d && this.p.equals(f80Var.p) && this.q.equals(f80Var.q) && this.r.equals(f80Var.r) && this.n.equals(f80Var.n) && hda.b(this.t, f80Var.t);
    }

    public int hashCode() {
        return hda.i(hda.i(hda.i(hda.i(hda.i(hda.i(hda.i(hda.h(0, hda.h(0, hda.h(1, hda.h(this.o ? 1 : 0, hda.h(this.m, hda.h(this.l, hda.h(this.k ? 1 : 0, hda.i(hda.h(0, hda.i(hda.h(this.j, hda.i(hda.h(this.f, hda.g(this.b, 17)), this.e)), this.i)), null)))))))), this.c), this.d), this.p), this.q), this.r), this.n), this.t);
    }

    public final f80 j(af2 af2Var, eb0 eb0Var) {
        if (this.u) {
            return clone().j(af2Var, eb0Var);
        }
        r(af2.f, af2Var);
        return x(eb0Var, false);
    }

    public final f80 k(int i, int i2) {
        if (this.u) {
            return clone().k(i, i2);
        }
        this.m = i;
        this.l = i2;
        this.a |= 512;
        q();
        return this;
    }

    public final f80 l(int i) {
        if (this.u) {
            return clone().l(i);
        }
        this.j = i;
        int i2 = this.a | 128;
        this.i = null;
        this.a = i2 & (-65);
        q();
        return this;
    }

    public final f80 m(Drawable drawable) {
        if (this.u) {
            return clone().m(drawable);
        }
        this.i = drawable;
        int i = this.a | 64;
        this.j = 0;
        this.a = i & (-129);
        q();
        return this;
    }

    public final f80 n() {
        if (this.u) {
            return clone().n();
        }
        this.d = di7.d;
        this.a |= 8;
        q();
        return this;
    }

    public final f80 o(tx6 tx6Var) {
        if (this.u) {
            return clone().o(tx6Var);
        }
        this.p.b.remove(tx6Var);
        q();
        return this;
    }

    public final f80 p(af2 af2Var, eb0 eb0Var, boolean z) {
        f80 f80VarW = z ? w(af2Var, eb0Var) : j(af2Var, eb0Var);
        f80VarW.v = true;
        return f80VarW;
    }

    public final void q() {
        if (this.s) {
            throw new IllegalStateException("You cannot modify locked T, consider clone()");
        }
    }

    public final f80 r(tx6 tx6Var, Object obj) {
        if (this.u) {
            return clone().r(tx6Var, obj);
        }
        gf7.b(tx6Var);
        gf7.b(obj);
        this.p.b.put(tx6Var, obj);
        q();
        return this;
    }

    public final f80 s(v25 v25Var) {
        if (this.u) {
            return clone().s(v25Var);
        }
        this.n = v25Var;
        this.a |= 1024;
        q();
        return this;
    }

    public final f80 t(float f) {
        if (this.u) {
            return clone().t(f);
        }
        if (f < 0.0f || f > 1.0f) {
            throw new IllegalArgumentException("sizeMultiplier must be between 0 and 1");
        }
        this.b = f;
        this.a |= 2;
        q();
        return this;
    }

    public final f80 u() {
        if (this.u) {
            return clone().u();
        }
        this.k = false;
        this.a |= 256;
        q();
        return this;
    }

    public final f80 v(Resources.Theme theme) {
        if (this.u) {
            return clone().v(theme);
        }
        this.t = theme;
        if (theme != null) {
            this.a |= 32768;
            return r(j28.b, theme);
        }
        this.a &= -32769;
        return o(j28.b);
    }

    public final f80 w(af2 af2Var, eb0 eb0Var) {
        if (this.u) {
            return clone().w(af2Var, eb0Var);
        }
        r(af2.f, af2Var);
        return x(eb0Var, true);
    }

    public final f80 x(et9 et9Var, boolean z) {
        if (this.u) {
            return clone().x(et9Var, z);
        }
        sf2 sf2Var = new sf2(et9Var, z);
        y(Bitmap.class, et9Var, z);
        y(Drawable.class, sf2Var, z);
        y(BitmapDrawable.class, sf2Var, z);
        y(su3.class, new wu3(et9Var), z);
        q();
        return this;
    }

    public final f80 y(Class cls, et9 et9Var, boolean z) {
        if (this.u) {
            return clone().y(cls, et9Var, z);
        }
        gf7.b(et9Var);
        this.q.put(cls, et9Var);
        int i = this.a;
        this.a = 67584 | i;
        this.v = false;
        if (z) {
            this.a = i | 198656;
            this.o = true;
        }
        q();
        return this;
    }

    public final f80 z() {
        if (this.u) {
            return clone().z();
        }
        this.w = true;
        this.a |= ProgressiveMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES;
        q();
        return this;
    }
}
