package p138.p176.p177.p190.p226.p230;

import android.graphics.PointF;
import android.util.Log;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໟ.ތ.ހ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3985 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final String f12576;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final int f12577;

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໟ.ތ.ހ$֏, reason: contains not printable characters */
    public static final class C3986 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final int f12578;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final int f12579;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final int f12580;

        public C3986(int i, int i2, int i3) {
            this.f12578 = i;
            this.f12579 = i2;
            this.f12580 = i3;
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໟ.ތ.ހ$ؠ, reason: contains not printable characters */
    public static final class C3987 {

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public static final Pattern f12581 = Pattern.compile("\\{([^}]*)\\}");

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public static final Pattern f12582 = Pattern.compile(C4150.m6758("\\\\pos\\((%1$s),(%1$s)\\)", "\\s*\\d+(?:\\.\\d+)?\\s*"));

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public static final Pattern f12583 = Pattern.compile(C4150.m6758("\\\\move\\(%1$s,%1$s,(%1$s),(%1$s)(?:,%1$s,%1$s)?\\)", "\\s*\\d+(?:\\.\\d+)?\\s*"));

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public static final Pattern f12584 = Pattern.compile("\\\\an(\\d+)");

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final int f12585;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final PointF f12586;

        public C3987(int i, PointF pointF) {
            this.f12585 = i;
            this.f12586 = pointF;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public static PointF m6423(String str) {
            String strGroup;
            String strGroup2;
            Matcher matcher = f12582.matcher(str);
            Matcher matcher2 = f12583.matcher(str);
            boolean zFind = matcher.find();
            boolean zFind2 = matcher2.find();
            if (zFind) {
                if (zFind2) {
                    Log.i("SsaStyle.Overrides", "Override has both \\pos(x,y) and \\move(x1,y1,x2,y2); using \\pos values. override='" + str + "'");
                }
                strGroup = matcher.group(1);
                strGroup2 = matcher.group(2);
            } else {
                if (!zFind2) {
                    return null;
                }
                strGroup = matcher2.group(1);
                strGroup2 = matcher2.group(2);
            }
            C0567.m1856(strGroup);
            float f = Float.parseFloat(strGroup.trim());
            C0567.m1856(strGroup2);
            return new PointF(f, Float.parseFloat(strGroup2.trim()));
        }
    }

    public C3985(String str, int i) {
        this.f12576 = str;
        this.f12577 = i;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6422(String str) {
        boolean z;
        try {
            int i = Integer.parseInt(str.trim());
            switch (i) {
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                    z = true;
                    break;
                default:
                    z = false;
                    break;
            }
            if (z) {
                return i;
            }
        } catch (NumberFormatException unused) {
        }
        C2803.m4901("Ignoring unknown alignment: ", str, "SsaStyle");
        return -1;
    }
}
