baiduad测试 v0.0.0版本的 MD5 值为:ef50fc8b78044be49b08cff701993fe5
以下内容为反编译后的 n.java 源代码,内容仅作参考
package com.deepe.c.c.a.a;
import android.graphics.Matrix;
import android.os.Build;
import android.support.v4.internal.view.SupportMenu;
import android.support.v4.view.InputDeviceCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewCompat;
import android.util.Xml;
import com.baidu.mobads.sdk.api.PrerollVideoResponse;
import com.deepe.c.c.a.a.d;
import com.deepe.c.c.a.a.k;
import com.deepe.c.c.a.a.o;
import com.eclipsesource.v8.V8Value;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.ext.DefaultHandler2;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class n implements m {
private static final boolean a;
private static final Pattern b;
private static int[] n;
private static int[] o;
private int h;
private k c = null;
private k.ai d = null;
private boolean e = true;
private com.deepe.c.c.a.d f = null;
private boolean g = false;
private boolean i = false;
private g j = null;
private StringBuilder k = null;
private boolean l = false;
private StringBuilder m = null;
public static class a {
private static final Map<String, Integer> a;
static {
HashMap hashMap = new HashMap(47);
a = hashMap;
hashMap.put("aliceblue", -984833);
a.put("antiquewhite", -332841);
a.put("aqua", -16711681);
a.put("aquamarine", -8388652);
a.put("azure", -983041);
a.put("beige", -657956);
a.put("bisque", -6972);
a.put("black", Integer.valueOf((int) ViewCompat.MEASURED_STATE_MASK));
a.put("blanchedalmond", -5171);
a.put("blue", -16776961);
a.put("blueviolet", -7722014);
a.put("brown", -5952982);
a.put("burlywood", -2180985);
a.put("cadetblue", -10510688);
a.put("chartreuse", -8388864);
a.put("chocolate", -2987746);
a.put("coral", -32944);
a.put("cornflowerblue", -10185235);
a.put("cornsilk", -1828);
a.put("crimson", -2354116);
a.put("cyan", -16711681);
a.put("darkblue", -16777077);
a.put("darkcyan", -16741493);
a.put("darkgoldenrod", -4684277);
a.put("darkgray", -5658199);
a.put("darkgreen", -16751616);
a.put("darkgrey", -5658199);
a.put("darkkhaki", -4343957);
a.put("darkmagenta", -7667573);
a.put("darkolivegreen", -11179217);
a.put("darkorange", -29696);
a.put("darkorchid", -6737204);
a.put("darkred", -7667712);
a.put("darksalmon", -1468806);
a.put("darkseagreen", -7357297);
a.put("darkslateblue", -12042869);
a.put("darkslategray", -13676721);
a.put("darkslategrey", -13676721);
a.put("darkturquoise", -16724271);
a.put("darkviolet", -7077677);
a.put("deeppink", -60269);
a.put("deepskyblue", -16728065);
a.put("dimgray", -9868951);
a.put("dimgrey", -9868951);
a.put("dodgerblue", -14774017);
a.put("firebrick", -5103070);
a.put("floralwhite", -1296);
a.put("forestgreen", -14513374);
a.put("fuchsia", -65281);
a.put("gainsboro", -2302756);
a.put("ghostwhite", -460545);
a.put("gold", -10496);
a.put("goldenrod", -2448096);
a.put("gray", -8355712);
a.put("green", -16744448);
a.put("greenyellow", -5374161);
a.put("grey", -8355712);
a.put("honeydew", -983056);
a.put("hotpink", -38476);
a.put("indianred", -3318692);
a.put("indigo", -11861886);
a.put("ivory", -16);
a.put("khaki", -989556);
a.put("lavender", -1644806);
a.put("lavenderblush", -3851);
a.put("lawngreen", -8586240);
a.put("lemonchiffon", -1331);
a.put("lightblue", -5383962);
a.put("lightcoral", -1015680);
a.put("lightcyan", -2031617);
a.put("lightgoldenrodyellow", -329006);
a.put("lightgray", -2894893);
a.put("lightgreen", -7278960);
a.put("lightgrey", -2894893);
a.put("lightpink", -18751);
a.put("lightsalmon", -24454);
a.put("lightseagreen", -14634326);
a.put("lightskyblue", -7876870);
a.put("lightslategray", -8943463);
a.put("lightslategrey", -8943463);
a.put("lightsteelblue", -5192482);
a.put("lightyellow", -32);
a.put("lime", -16711936);
a.put("limegreen", -13447886);
a.put("linen", -331546);
a.put("magenta", -65281);
a.put("maroon", -8388608);
a.put("mediumaquamarine", -10039894);
a.put("mediumblue", -16777011);
a.put("mediumorchid", -4565549);
a.put("mediumpurple", -7114533);
a.put("mediumseagreen", -12799119);
a.put("mediumslateblue", -8689426);
a.put("mediumspringgreen", -16713062);
a.put("mediumturquoise", -12004916);
a.put("mediumvioletred", -3730043);
a.put("midnightblue", -15132304);
a.put("mintcream", -655366);
a.put("mistyrose", -6943);
a.put("moccasin", -6987);
a.put("navajowhite", -8531);
a.put("navy", -16777088);
a.put("oldlace", -133658);
a.put("olive", -8355840);
a.put("olivedrab", -9728477);
a.put("orange", -23296);
a.put("orangered", -47872);
a.put("orchid", -2461482);
a.put("palegoldenrod", -1120086);
a.put("palegreen", -6751336);
a.put("paleturquoise", -5247250);
a.put("palevioletred", -2396013);
a.put("papayawhip", -4139);
a.put("peachpuff", -9543);
a.put("peru", -3308225);
a.put("pink", -16181);
a.put("plum", -2252579);
a.put("powderblue", -5185306);
a.put("purple", -8388480);
a.put("rebeccapurple", -10079335);
a.put("red", Integer.valueOf((int) SupportMenu.CATEGORY_MASK));
a.put("rosybrown", -4419697);
a.put("royalblue", -12490271);
a.put("saddlebrown", -7650029);
a.put("salmon", -360334);
a.put("sandybrown", -744352);
a.put("seagreen", -13726889);
a.put("seashell", -2578);
a.put("sienna", -6270419);
a.put("silver", -4144960);
a.put("skyblue", -7876885);
a.put("slateblue", -9807155);
a.put("slategray", -9404272);
a.put("slategrey", -9404272);
a.put("snow", -1286);
a.put("springgreen", -16711809);
a.put("steelblue", -12156236);
a.put("tan", -2968436);
a.put("teal", -16744320);
a.put("thistle", -2572328);
a.put("tomato", -40121);
a.put("turquoise", -12525360);
a.put("violet", -1146130);
a.put("wheat", -663885);
a.put("white", -1);
a.put("whitesmoke", -657931);
a.put("yellow", Integer.valueOf((int) InputDeviceCompat.SOURCE_ANY));
a.put("yellowgreen", -6632142);
a.put("transparent", 0);
}
static Integer a(String str) {
return a.get(str);
}
}
public static class b {
private static final Map<String, k.p> a;
static {
HashMap hashMap = new HashMap(9);
a = hashMap;
hashMap.put("xx-small", new k.p(0.694f, k.bc.pt));
a.put("x-small", new k.p(0.833f, k.bc.pt));
a.put("small", new k.p(10.0f, k.bc.pt));
a.put("medium", new k.p(12.0f, k.bc.pt));
a.put("large", new k.p(14.4f, k.bc.pt));
a.put("x-large", new k.p(17.3f, k.bc.pt));
a.put("xx-large", new k.p(20.7f, k.bc.pt));
a.put("smaller", new k.p(83.33f, k.bc.percent));
a.put("larger", new k.p(120.0f, k.bc.percent));
}
static k.p a(String str) {
return a.get(str);
}
}
public static class c {
private static final Map<String, Float> a;
static {
HashMap hashMap = new HashMap(9);
a = hashMap;
hashMap.put("ultra-condensed", Float.valueOf(50.0f));
a.put("extra-condensed", Float.valueOf(62.5f));
a.put("condensed", Float.valueOf(75.0f));
a.put("semi-condensed", Float.valueOf(87.5f));
a.put(PrerollVideoResponse.NORMAL, Float.valueOf(100.0f));
a.put("semi-expanded", Float.valueOf(112.5f));
a.put("expanded", Float.valueOf(125.0f));
a.put("extra-expanded", Float.valueOf(150.0f));
a.put("ultra-expanded", Float.valueOf(200.0f));
}
static Float a(String str) {
return a.get(str);
}
static boolean b(String str) {
return a.containsKey(str);
}
}
public static class d {
private static final Map<String, Float> a;
static {
HashMap hashMap = new HashMap(4);
a = hashMap;
hashMap.put(PrerollVideoResponse.NORMAL, Float.valueOf(400.0f));
a.put("bold", Float.valueOf(700.0f));
a.put("bolder", Float.valueOf(Float.MAX_VALUE));
a.put("lighter", Float.valueOf(Float.MIN_VALUE));
}
static Float a(String str) {
return a.get(str);
}
static boolean b(String str) {
return a.containsKey(str);
}
}
public class e extends DefaultHandler2 {
private e() {
}
e(n nVar, e eVar) {
this();
}
@Override
public void characters(char[] cArr, int i, int i2) throws SAXException {
n.this.y(new String(cArr, i, i2));
}
@Override
public void endDocument() {
n.this.d();
}
@Override
public void endElement(String str, String str2, String str3) throws SAXException {
n.this.a(str, str2, str3);
}
@Override
public void processingInstruction(String str, String str2) {
n.this.a(str, n.this.a(new p(str2)));
}
@Override
public void startDocument() {
n.this.c();
}
@Override
public void startElement(String str, String str2, String str3, Attributes attributes) throws SAXException {
n.this.a(str, str2, str3, attributes);
}
}
public enum f {
CLASS,
clip,
clip_path,
clipPathUnits,
clip_rule,
color,
cx,
cy,
direction,
dx,
dy,
fx,
fy,
fr,
d,
display,
fill,
fill_rule,
fill_opacity,
font,
font_family,
font_feature_settings,
font_size,
font_stretch,
font_style,
font_weight,
font_kerning,
font_variant,
font_variant_ligatures,
font_variant_position,
font_variant_caps,
font_variant_numeric,
font_variant_east_asian,
font_variation_settings,
glyph_orientation_vertical,
gradientTransform,
gradientUnits,
height,
href,
image_rendering,
isolation,
letter_spacing,
marker,
marker_start,
marker_mid,
marker_end,
markerHeight,
markerUnits,
markerWidth,
mask,
maskContentUnits,
maskUnits,
media,
mix_blend_mode,
offset,
opacity,
orient,
overflow,
pathLength,
patternContentUnits,
patternTransform,
patternUnits,
points,
preserveAspectRatio,
r,
refX,
refY,
requiredFeatures,
requiredExtensions,
requiredFormats,
requiredFonts,
rx,
ry,
solid_color,
solid_opacity,
spreadMethod,
startOffset,
stop_color,
stop_opacity,
stroke,
stroke_dasharray,
stroke_dashoffset,
stroke_linecap,
stroke_linejoin,
stroke_miterlimit,
stroke_opacity,
stroke_width,
style,
systemLanguage,
text_anchor,
text_decoration,
text_orientation,
transform,
type,
vector_effect,
version,
viewBox,
width,
word_spacing,
writing_mode,
x,
y,
x1,
y1,
x2,
y2,
viewport_fill,
viewport_fill_opacity,
visibility,
UNSUPPORTED;
private static final Map<String, f> bg = new HashMap();
static {
f[] valuesCustom;
for (f fVar : valuesCustom()) {
if (fVar == CLASS) {
bg.put("class", fVar);
} else if (fVar != UNSUPPORTED) {
bg.put(fVar.name().replace('_', '-'), fVar);
}
}
}
public static f a(String str) {
f fVar = bg.get(str);
return fVar != null ? fVar : UNSUPPORTED;
}
public static f[] valuesCustom() {
f[] valuesCustom = values();
int length = valuesCustom.length;
f[] fVarArr = new f[length];
System.arraycopy(valuesCustom, 0, fVarArr, 0, length);
return fVarArr;
}
}
public enum g {
svg,
a,
circle,
clipPath,
defs,
desc,
ellipse,
g,
image,
line,
linearGradient,
marker,
mask,
path,
pattern,
polygon,
polyline,
radialGradient,
rect,
solidColor,
stop,
style,
SWITCH,
symbol,
text,
textPath,
title,
tref,
tspan,
use,
view,
UNSUPPORTED;
private static final Map<String, g> G = new HashMap();
static {
g[] valuesCustom;
for (g gVar : valuesCustom()) {
if (gVar == SWITCH) {
G.put("switch", gVar);
} else if (gVar != UNSUPPORTED) {
G.put(gVar.name(), gVar);
}
}
}
public static g a(String str) {
g gVar = G.get(str);
return gVar != null ? gVar : UNSUPPORTED;
}
public static g[] valuesCustom() {
g[] valuesCustom = values();
int length = valuesCustom.length;
g[] gVarArr = new g[length];
System.arraycopy(valuesCustom, 0, gVarArr, 0, length);
return gVarArr;
}
}
public static class h implements Attributes {
private final XmlPullParser a;
public h(XmlPullParser xmlPullParser) {
this.a = xmlPullParser;
}
@Override
public int getIndex(String str) {
return -1;
}
@Override
public int getIndex(String str, String str2) {
return -1;
}
@Override
public int getLength() {
return this.a.getAttributeCount();
}
@Override
public String getLocalName(int i) {
return this.a.getAttributeName(i);
}
@Override
public String getQName(int i) {
String attributeName = this.a.getAttributeName(i);
if (this.a.getAttributePrefix(i) != null) {
return String.valueOf(this.a.getAttributePrefix(i)) + ':' + attributeName;
}
return attributeName;
}
@Override
public String getType(int i) {
return null;
}
@Override
public String getType(String str) {
return null;
}
@Override
public String getType(String str, String str2) {
return null;
}
@Override
public String getURI(int i) {
return this.a.getAttributeNamespace(i);
}
@Override
public String getValue(int i) {
return this.a.getAttributeValue(i);
}
@Override
public String getValue(String str) {
return null;
}
@Override
public String getValue(String str, String str2) {
return null;
}
}
static {
a = Build.VERSION.SDK_INT < 15;
b = Pattern.compile("/\\*.*?\\*/");
}
private Float A(String str) throws com.deepe.c.c.a.e {
if (str.length() != 0) {
int length = str.length();
boolean z = true;
if (str.charAt(str.length() - 1) == '%') {
length--;
} else {
z = false;
}
try {
float a2 = a(str, 0, length);
float f2 = 100.0f;
if (z) {
a2 /= 100.0f;
}
if (a2 < 0.0f) {
f2 = 0.0f;
} else if (a2 <= 100.0f) {
f2 = a2;
}
return Float.valueOf(f2);
} catch (NumberFormatException e2) {
throw new com.deepe.c.c.a.e("Invalid offset value in <stop>: " + str, e2);
}
}
throw new com.deepe.c.c.a.e("Invalid offset value in <stop> (empty string)");
}
private void A(Attributes attributes) throws com.deepe.c.c.a.e {
a("<view>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.be beVar = new k.be();
beVar.u = this.c;
beVar.v = this.d;
a((k.ak) beVar, attributes);
a((k.af) beVar, attributes);
a((k.aq) beVar, attributes);
this.d.a(beVar);
this.d = beVar;
}
private Matrix B(String str) throws com.deepe.c.c.a.e {
Matrix matrix = new Matrix();
p pVar = new p(str);
pVar.i();
while (!pVar.h()) {
String s = pVar.s();
if (s == null) {
throw new com.deepe.c.c.a.e("Bad transform function encountered in transform list: " + str);
}
switch (s.hashCode()) {
case -1081239615:
if (!s.equals("matrix")) {
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
pVar.i();
float k = pVar.k();
pVar.j();
float k2 = pVar.k();
pVar.j();
float k3 = pVar.k();
pVar.j();
float k4 = pVar.k();
pVar.j();
float k5 = pVar.k();
pVar.j();
float k6 = pVar.k();
pVar.i();
if (!Float.isNaN(k6) && pVar.a(')')) {
Matrix matrix2 = new Matrix();
matrix2.setValues(new float[]{k, k3, k5, k2, k4, k6, 0.0f, 0.0f, 1.0f});
matrix.preConcat(matrix2);
break;
} else {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
}
case -925180581:
if (!s.equals("rotate")) {
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
pVar.i();
float k7 = pVar.k();
float l = pVar.l();
float l2 = pVar.l();
pVar.i();
if (Float.isNaN(k7) || !pVar.a(')')) {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
} else if (Float.isNaN(l)) {
matrix.preRotate(k7);
break;
} else if (!Float.isNaN(l2)) {
matrix.preRotate(k7, l, l2);
break;
} else {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
}
break;
case 109250890:
if (!s.equals("scale")) {
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
pVar.i();
float k8 = pVar.k();
float l3 = pVar.l();
pVar.i();
if (!Float.isNaN(k8) && pVar.a(')')) {
if (!Float.isNaN(l3)) {
matrix.preScale(k8, l3);
break;
} else {
matrix.preScale(k8, k8);
break;
}
} else {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
}
break;
case 109493390:
if (!s.equals("skewX")) {
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
pVar.i();
float k9 = pVar.k();
pVar.i();
if (!Float.isNaN(k9) && pVar.a(')')) {
matrix.preSkew((float) Math.tan(Math.toRadians(k9)), 0.0f);
break;
} else {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
}
break;
case 109493391:
if (!s.equals("skewY")) {
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
pVar.i();
float k10 = pVar.k();
pVar.i();
if (!Float.isNaN(k10) && pVar.a(')')) {
matrix.preSkew(0.0f, (float) Math.tan(Math.toRadians(k10)));
break;
} else {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
}
break;
case 1052832078:
if (!s.equals("translate")) {
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
pVar.i();
float k11 = pVar.k();
float l4 = pVar.l();
pVar.i();
if (!Float.isNaN(k11) && pVar.a(')')) {
if (!Float.isNaN(l4)) {
matrix.preTranslate(k11, l4);
break;
} else {
matrix.preTranslate(k11, 0.0f);
break;
}
} else {
throw new com.deepe.c.c.a.e("Invalid transform list: " + str);
}
break;
default:
throw new com.deepe.c.c.a.e("Invalid transform list fn: " + s + ")");
}
if (pVar.h()) {
return matrix;
}
pVar.j();
}
return matrix;
}
private void B(Attributes attributes) throws com.deepe.c.c.a.e {
a("<mask>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.s sVar = new k.s();
sVar.u = this.c;
sVar.v = this.d;
a((k.ak) sVar, attributes);
b(sVar, attributes);
a((k.af) sVar, attributes);
a(sVar, attributes);
this.d.a(sVar);
this.d = sVar;
}
private static List<k.p> C(String str) throws com.deepe.c.c.a.e {
if (str.length() != 0) {
ArrayList arrayList = new ArrayList(1);
p pVar = new p(str);
pVar.i();
while (!pVar.h()) {
float k = pVar.k();
if (Float.isNaN(k)) {
throw new com.deepe.c.c.a.e("Invalid length list value: " + pVar.t());
}
k.bc u = pVar.u();
if (u == null) {
u = k.bc.px;
}
arrayList.add(new k.p(k, u));
pVar.j();
}
return arrayList;
}
throw new com.deepe.c.c.a.e("Invalid length list (empty string)");
}
private void C(Attributes attributes) throws com.deepe.c.c.a.e {
a("<style>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
String str = "all";
boolean z = true;
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 53) {
str = trim;
} else if (i2 == 94) {
z = trim.equals("text/css");
}
}
if (z && com.deepe.c.c.a.a.d.a(str, d.EnumC0047d.screen)) {
this.l = true;
return;
}
this.g = true;
this.h = 1;
}
private static k.b D(String str) throws com.deepe.c.c.a.e {
p pVar = new p(str);
pVar.i();
float k = pVar.k();
pVar.j();
float k2 = pVar.k();
pVar.j();
float k3 = pVar.k();
pVar.j();
float k4 = pVar.k();
if (Float.isNaN(k) || Float.isNaN(k2) || Float.isNaN(k3) || Float.isNaN(k4)) {
throw new com.deepe.c.c.a.e("Invalid viewBox definition - should have four numbers");
}
if (k3 >= 0.0f) {
if (k4 >= 0.0f) {
return new k.b(k, k2, k3, k4);
}
throw new com.deepe.c.c.a.e("Invalid viewBox. height cannot be negative");
}
throw new com.deepe.c.c.a.e("Invalid viewBox. width cannot be negative");
}
private static k.an E(String str) {
int hashCode = str.hashCode();
if (hashCode != 3387192) {
if (hashCode == 1442907498 && str.equals("currentColor")) {
return k.g.a();
}
} else if (str.equals(com.baidu.mobads.sdk.internal.a.a)) {
return k.f.c;
}
return e(str);
}
private static k.f F(String str) {
Integer a2 = a.a(str);
return a2 == null ? k.f.b : new k.f(a2.intValue());
}
private static Set<String> G(String str) {
p pVar = new p(str);
HashSet hashSet = new HashSet();
while (!pVar.h()) {
String q = pVar.q();
hashSet.add(q.startsWith("http://www.w3.org/TR/SVG11/feature#") ? q.substring(35) : "UNSUPPORTED");
pVar.i();
}
return hashSet;
}
private static Set<String> H(String str) {
p pVar = new p(str);
HashSet hashSet = new HashSet();
while (!pVar.h()) {
String q = pVar.q();
int indexOf = q.indexOf(45);
if (indexOf != -1) {
q = q.substring(0, indexOf);
}
hashSet.add(new Locale(q, "", "").getLanguage());
pVar.i();
}
return hashSet;
}
private static Set<String> I(String str) {
p pVar = new p(str);
HashSet hashSet = new HashSet();
while (!pVar.h()) {
hashSet.add(pVar.q());
pVar.i();
}
return hashSet;
}
private void J(String str) {
this.c.a(new com.deepe.c.c.a.a.d(d.EnumC0047d.screen, d.s.Document, this.f).a(str));
}
private static float a(String str, int i, int i2) throws com.deepe.c.c.a.e {
float a2 = new com.deepe.c.c.a.a.h().a(str, i, i2);
if (Float.isNaN(a2)) {
throw new com.deepe.c.c.a.e("Invalid float value: " + str);
}
return a2;
}
private static int a(float f2) {
if (f2 < 0.0f) {
return 0;
}
if (f2 > 255.0f) {
return 255;
}
return Math.round(f2);
}
private static int a(float f2, float f3, float f4) {
int i = (f2 > 0.0f ? 1 : (f2 == 0.0f ? 0 : -1));
float f5 = f2 % 360.0f;
if (i < 0) {
f5 += 360.0f;
}
float f6 = f5 / 60.0f;
float f7 = f3 / 100.0f;
float f8 = f4 / 100.0f;
float min = f7 < 0.0f ? 0.0f : Math.min(f7, 1.0f);
float min2 = f8 >= 0.0f ? Math.min(f8, 1.0f) : 0.0f;
float f9 = min2 <= 0.5f ? (min + 1.0f) * min2 : (min2 + min) - (min * min2);
float f10 = (min2 * 2.0f) - f9;
return a(b(f10, f9, f6 - 2.0f) * 256.0f) | (a(b(f10, f9, f6 + 2.0f) * 256.0f) << 16) | (a(b(f10, f9, f6) * 256.0f) << 8);
}
public static k.p a(String str) throws com.deepe.c.c.a.e {
if (str.length() != 0) {
int length = str.length();
k.bc bcVar = k.bc.px;
char charAt = str.charAt(length - 1);
if (charAt == '%') {
length--;
bcVar = k.bc.percent;
} else if (length > 2 && Character.isLetter(charAt) && Character.isLetter(str.charAt(length - 2))) {
length -= 2;
try {
bcVar = k.bc.valueOf(str.substring(length).toLowerCase(Locale.US));
} catch (IllegalArgumentException unused) {
throw new com.deepe.c.c.a.e("Invalid length unit specifier: " + str);
}
}
try {
return new k.p(a(str, 0, length), bcVar);
} catch (NumberFormatException e2) {
throw new com.deepe.c.c.a.e("Invalid length value: " + str, e2);
}
}
throw new com.deepe.c.c.a.e("Invalid length value (empty string)");
}
public static String a(String str, String str2) {
if (!str.equals(com.baidu.mobads.sdk.internal.a.a) && str.startsWith("url(")) {
return (str.endsWith(")") ? str.substring(4, str.length() - 1) : str.substring(4)).trim();
}
return null;
}
public Map<String, String> a(p pVar) {
HashMap hashMap = new HashMap();
pVar.i();
while (true) {
String b2 = pVar.b('=');
if (b2 == null) {
return hashMap;
}
pVar.a('=');
hashMap.put(b2, pVar.w());
pVar.i();
}
}
private void a(k.a aVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (b()[f.a(attributes.getLocalName(i)).ordinal()] == 39 && ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i)))) {
aVar.a = trim;
}
}
}
private void a(k.ab abVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 38) {
abVar.d = a(trim);
if (abVar.d.c()) {
throw new com.deepe.c.c.a.e("Invalid <rect> element. height cannot be negative");
}
} else if (i2 == 98) {
abVar.c = a(trim);
if (abVar.c.c()) {
throw new com.deepe.c.c.a.e("Invalid <rect> element. width cannot be negative");
}
} else if (i2 == 72) {
abVar.f = a(trim);
if (abVar.f.c()) {
throw new com.deepe.c.c.a.e("Invalid <rect> element. rx cannot be negative");
}
} else if (i2 == 73) {
abVar.g = a(trim);
if (abVar.g.c()) {
throw new com.deepe.c.c.a.e("Invalid <rect> element. ry cannot be negative");
}
} else if (i2 == 101) {
abVar.a = a(trim);
} else if (i2 == 102) {
abVar.b = a(trim);
}
}
}
private void a(k.ad adVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (b()[f.a(attributes.getLocalName(i)).ordinal()] == 55) {
adVar.a = A(trim);
}
}
}
private void a(k.ae aeVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 38) {
aeVar.d = a(trim);
if (aeVar.d.c()) {
throw new com.deepe.c.c.a.e("Invalid <svg> element. height cannot be negative");
}
} else if (i2 == 96) {
aeVar.e = trim;
} else if (i2 == 98) {
aeVar.c = a(trim);
if (aeVar.c.c()) {
throw new com.deepe.c.c.a.e("Invalid <svg> element. width cannot be negative");
}
} else if (i2 == 101) {
aeVar.a = a(trim);
} else if (i2 == 102) {
aeVar.b = a(trim);
}
}
}
private void a(k.af afVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 != 89) {
switch (i2) {
case 68:
afVar.a(G(trim));
continue;
case 69:
afVar.a(trim);
continue;
case 70:
afVar.c(I(trim));
continue;
case 71:
List<String> f2 = f(trim);
afVar.d(f2 != null ? new HashSet(f2) : new HashSet(0));
continue;
}
} else {
afVar.b(H(trim));
}
}
}
private static void a(k.ak akVar, String str) {
com.deepe.c.c.a.a.e eVar = new com.deepe.c.c.a.a.e(b.matcher(str).replaceAll(""));
while (!eVar.h()) {
eVar.i();
String a2 = eVar.a();
eVar.i();
if (!eVar.a(';')) {
if (!eVar.a(':')) {
return;
}
eVar.i();
String c2 = eVar.c();
if (c2 != null) {
eVar.i();
if (eVar.h() || eVar.a(';')) {
if (akVar.s == null) {
akVar.s = new o();
}
o.a(akVar.s, a2, c2, false);
eVar.i();
}
}
}
}
}
private void a(k.ak akVar, Attributes attributes) throws com.deepe.c.c.a.e {
Boolean bool;
for (int i = 0; i < attributes.getLength(); i++) {
String qName = attributes.getQName(i);
if (qName.equals("id") || qName.equals("xml:id")) {
akVar.p = attributes.getValue(i).trim();
return;
} else if (qName.equals("xml:space")) {
String trim = attributes.getValue(i).trim();
if ("default".equals(trim)) {
bool = Boolean.FALSE;
} else if (!"preserve".equals(trim)) {
throw new com.deepe.c.c.a.e("Invalid value for \"xml:space\" attribute: " + trim);
} else {
bool = Boolean.TRUE;
}
akVar.q = bool;
return;
}
}
}
private void a(k.al alVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (b()[f.a(attributes.getLocalName(i)).ordinal()]) {
case 103:
alVar.f = a(trim);
break;
case 104:
alVar.g = a(trim);
break;
case 105:
alVar.h = a(trim);
break;
case 106:
alVar.i = a(trim);
break;
}
}
}
private void a(k.am amVar, String str) {
l.c(String.valueOf(str) + amVar);
if (amVar instanceof k.ag) {
String str2 = String.valueOf(str) + " ";
for (k.am amVar2 : ((k.ag) amVar).i) {
a(amVar2, str2);
}
}
}
private static void a(k.ao aoVar, String str) throws com.deepe.c.c.a.e {
aoVar.w = com.deepe.c.c.a.a.a(str);
}
private void a(k.ap apVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 7) {
apVar.f = a(trim);
} else if (i2 == 8) {
apVar.g = a(trim);
} else if (i2 != 65) {
switch (i2) {
case 12:
apVar.i = a(trim);
continue;
case 13:
apVar.j = a(trim);
continue;
case 14:
apVar.k = a(trim);
if (apVar.k.c()) {
throw new com.deepe.c.c.a.e("Invalid <radialGradient> element. fr cannot be negative");
}
continue;
}
} else {
apVar.h = a(trim);
if (apVar.h.c()) {
throw new com.deepe.c.c.a.e("Invalid <radialGradient> element. r cannot be negative");
}
}
}
}
private void a(k.aq aqVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 64) {
a((k.ao) aqVar, trim);
} else if (i2 == 97) {
aqVar.x = D(trim);
}
}
}
private void a(k.at atVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (b()[f.a(attributes.getLocalName(i)).ordinal()] == 39 && ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i)))) {
atVar.a = trim;
}
}
}
private void a(k.ay ayVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 != 39) {
if (i2 == 77) {
ayVar.b = a(trim);
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
ayVar.a = trim;
}
}
}
private void a(k.az azVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 10) {
azVar.d = C(trim);
} else if (i2 == 11) {
azVar.e = C(trim);
} else if (i2 == 101) {
azVar.b = C(trim);
} else if (i2 == 102) {
azVar.c = C(trim);
}
}
}
private void a(k.bd bdVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 38) {
bdVar.f = a(trim);
if (bdVar.f.c()) {
throw new com.deepe.c.c.a.e("Invalid <use> element. height cannot be negative");
}
} else if (i2 != 39) {
if (i2 == 98) {
bdVar.e = a(trim);
if (bdVar.e.c()) {
throw new com.deepe.c.c.a.e("Invalid <use> element. width cannot be negative");
}
} else if (i2 == 101) {
bdVar.c = a(trim);
} else if (i2 == 102) {
bdVar.d = a(trim);
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
bdVar.a = trim;
}
}
}
private void a(k.d dVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 7) {
dVar.a = a(trim);
} else if (i2 == 8) {
dVar.b = a(trim);
} else if (i2 != 65) {
continue;
} else {
dVar.c = a(trim);
if (dVar.c.c()) {
throw new com.deepe.c.c.a.e("Invalid <circle> element. r cannot be negative");
}
}
}
}
private void a(k.e eVar, Attributes attributes) throws com.deepe.c.c.a.e {
boolean z;
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (b()[f.a(attributes.getLocalName(i)).ordinal()] == 4) {
if ("objectBoundingBox".equals(trim)) {
z = false;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new com.deepe.c.c.a.e("Invalid value for attribute clipPathUnits");
} else {
z = true;
}
eVar.a = z;
}
}
}
private void a(k.i iVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 7) {
iVar.a = a(trim);
} else if (i2 == 8) {
iVar.b = a(trim);
} else if (i2 == 72) {
iVar.c = a(trim);
if (iVar.c.c()) {
throw new com.deepe.c.c.a.e("Invalid <ellipse> element. rx cannot be negative");
}
} else if (i2 != 73) {
continue;
} else {
iVar.d = a(trim);
if (iVar.d.c()) {
throw new com.deepe.c.c.a.e("Invalid <ellipse> element. ry cannot be negative");
}
}
}
}
private void a(k.j jVar, Attributes attributes) throws com.deepe.c.c.a.e {
boolean z;
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 36) {
jVar.c = B(trim);
} else if (i2 == 37) {
if ("objectBoundingBox".equals(trim)) {
z = false;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new com.deepe.c.c.a.e("Invalid value for attribute gradientUnits");
} else {
z = true;
}
jVar.b = z;
} else if (i2 != 39) {
if (i2 != 76) {
continue;
} else {
try {
jVar.d = k.EnumC0049k.valueOf(trim);
} catch (IllegalArgumentException unused) {
throw new com.deepe.c.c.a.e("Invalid spreadMethod attribute. \"" + trim + "\" is not a valid value.");
}
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
jVar.e = trim;
}
}
}
private void a(k.n nVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
if (f.a(attributes.getLocalName(i)) == f.transform) {
nVar.a(B(attributes.getValue(i)));
}
}
}
private void a(k.o oVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 38) {
oVar.e = a(trim);
if (oVar.e.c()) {
throw new com.deepe.c.c.a.e("Invalid <use> element. height cannot be negative");
}
} else if (i2 != 39) {
if (i2 == 64) {
a((k.ao) oVar, trim);
} else if (i2 == 98) {
oVar.d = a(trim);
if (oVar.d.c()) {
throw new com.deepe.c.c.a.e("Invalid <use> element. width cannot be negative");
}
} else if (i2 == 101) {
oVar.b = a(trim);
} else if (i2 == 102) {
oVar.c = a(trim);
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
oVar.a = trim;
}
}
}
private void a(k.q qVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
switch (b()[f.a(attributes.getLocalName(i)).ordinal()]) {
case 103:
qVar.a = a(trim);
break;
case 104:
qVar.b = a(trim);
break;
case 105:
qVar.c = a(trim);
break;
case 106:
qVar.d = a(trim);
break;
}
}
}
private void a(k.r rVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 57) {
rVar.f = Float.valueOf("auto".equals(trim) ? Float.NaN : b(trim));
} else if (i2 == 66) {
rVar.b = a(trim);
} else if (i2 != 67) {
switch (i2) {
case MotionEventCompat.AXIS_GENERIC_16:
rVar.e = a(trim);
if (rVar.e.c()) {
throw new com.deepe.c.c.a.e("Invalid <marker> element. markerHeight cannot be negative");
}
continue;
case 48:
if (!"strokeWidth".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
rVar.a = true;
break;
} else {
throw new com.deepe.c.c.a.e("Invalid value for attribute markerUnits");
}
} else {
rVar.a = false;
continue;
}
case 49:
rVar.d = a(trim);
if (rVar.d.c()) {
throw new com.deepe.c.c.a.e("Invalid <marker> element. markerWidth cannot be negative");
}
continue;
}
} else {
rVar.c = a(trim);
}
}
}
private void a(k.s sVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 38) {
sVar.f = a(trim);
if (sVar.f.c()) {
throw new com.deepe.c.c.a.e("Invalid <mask> element. height cannot be negative");
}
} else if (i2 == 98) {
sVar.e = a(trim);
if (sVar.e.c()) {
throw new com.deepe.c.c.a.e("Invalid <mask> element. width cannot be negative");
}
} else if (i2 != 51) {
if (i2 != 52) {
if (i2 == 101) {
sVar.c = a(trim);
} else if (i2 == 102) {
sVar.d = a(trim);
}
} else if ("objectBoundingBox".equals(trim)) {
sVar.a = false;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new com.deepe.c.c.a.e("Invalid value for attribute maskUnits");
} else {
sVar.a = true;
}
} else if ("objectBoundingBox".equals(trim)) {
sVar.b = false;
} else if (!"userSpaceOnUse".equals(trim)) {
throw new com.deepe.c.c.a.e("Invalid value for attribute maskContentUnits");
} else {
sVar.b = true;
}
}
}
private void a(k.v vVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 15) {
vVar.a = x(trim);
} else if (i2 != 59) {
continue;
} else {
vVar.b = Float.valueOf(b(trim));
if (vVar.b.floatValue() < 0.0f) {
throw new com.deepe.c.c.a.e("Invalid <path> element. pathLength cannot be negative");
}
}
}
}
private void a(k.y yVar, Attributes attributes) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 38) {
yVar.g = a(trim);
if (yVar.g.c()) {
throw new com.deepe.c.c.a.e("Invalid <pattern> element. height cannot be negative");
}
} else if (i2 != 39) {
if (i2 == 98) {
yVar.f = a(trim);
if (yVar.f.c()) {
throw new com.deepe.c.c.a.e("Invalid <pattern> element. width cannot be negative");
}
} else if (i2 == 101) {
yVar.d = a(trim);
} else if (i2 != 102) {
switch (i2) {
case 60:
if (!"objectBoundingBox".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
yVar.b = true;
break;
} else {
throw new com.deepe.c.c.a.e("Invalid value for attribute patternContentUnits");
}
} else {
yVar.b = false;
continue;
}
case 61:
yVar.c = B(trim);
continue;
case 62:
if (!"objectBoundingBox".equals(trim)) {
if ("userSpaceOnUse".equals(trim)) {
yVar.a = true;
break;
} else {
throw new com.deepe.c.c.a.e("Invalid value for attribute patternUnits");
}
} else {
yVar.a = false;
continue;
}
}
} else {
yVar.e = a(trim);
}
} else if ("".equals(attributes.getURI(i)) || "http://www.w3.org/1999/xlink".equals(attributes.getURI(i))) {
yVar.h = trim;
}
}
}
private void a(k.z zVar, Attributes attributes, String str) throws com.deepe.c.c.a.e {
for (int i = 0; i < attributes.getLength(); i++) {
if (f.a(attributes.getLocalName(i)) == f.points) {
p pVar = new p(attributes.getValue(i));
ArrayList<Float> arrayList = new ArrayList();
pVar.i();
while (!pVar.h()) {
float k = pVar.k();
if (Float.isNaN(k)) {
throw new com.deepe.c.c.a.e("Invalid <" + str + "> points attribute. Non-coordinate content found in list.");
}
pVar.j();
float k2 = pVar.k();
if (Float.isNaN(k2)) {
throw new com.deepe.c.c.a.e("Invalid <" + str + "> points attribute. There should be an even number of coordinates.");
}
pVar.j();
arrayList.add(Float.valueOf(k));
arrayList.add(Float.valueOf(k2));
}
zVar.a = new float[arrayList.size()];
int i2 = 0;
for (Float f2 : arrayList) {
zVar.a[i2] = f2.floatValue();
i2++;
}
}
}
}
public static void a(o oVar, String str) {
String b2;
if ("|caption|icon|menu|message-box|small-caption|status-bar|".contains(String.valueOf('|') + str + '|')) {
return;
}
p pVar = new p(str);
Float f2 = null;
o.d dVar = null;
Boolean bool = null;
Float f3 = null;
while (true) {
b2 = pVar.b('/');
pVar.i();
if (b2 != null) {
if (f2 != null && dVar != null) {
break;
} else if (!b2.equals(PrerollVideoResponse.NORMAL)) {
if (f2 == null && d.b(b2)) {
f2 = d.a(b2);
} else if (dVar != null || (dVar = j(b2)) == null) {
if (bool != null || !b2.equals("small-caps")) {
if (f3 != null || !c.b(b2)) {
break;
}
f3 = c.a(b2);
} else {
bool = true;
}
}
}
} else {
return;
}
}
k.p g2 = g(b2);
if (pVar.a('/')) {
pVar.i();
String q = pVar.q();
if (q != null) {
try {
a(q);
} catch (com.deepe.c.c.a.e unused) {
return;
}
}
pVar.i();
}
oVar.o = f(pVar.x());
oVar.p = g2;
oVar.q = Float.valueOf(f2 == null ? 400.0f : f2.floatValue());
if (dVar == null) {
dVar = o.d.normal;
}
oVar.r = dVar;
oVar.s = Float.valueOf(f3 == null ? 100.0f : f3.floatValue());
oVar.Q = o.c.auto;
oVar.R = com.deepe.c.c.a.a.a.c;
oVar.S = com.deepe.c.c.a.a.a.d;
oVar.T = com.deepe.c.c.a.a.a.e;
if (bool == Boolean.TRUE) {
oVar.T = com.deepe.c.c.a.a.a.a();
}
oVar.U = com.deepe.c.c.a.a.a.f;
oVar.V = com.deepe.c.c.a.a.a.g;
oVar.W = com.deepe.c.c.a.a.a.a;
oVar.X = null;
oVar.a |= 4009918906621952L;
}
public void a(String str, String str2, String str3) throws com.deepe.c.c.a.e {
if (this.g) {
int i = this.h - 1;
this.h = i;
if (i == 0) {
this.g = false;
}
} else if ("http://www.w3.org/2000/svg".equals(str) || "".equals(str)) {
if (str2.length() <= 0) {
str2 = str3;
}
switch (a()[g.a(str2).ordinal()]) {
case 1:
case 2:
case 4:
case 5:
case 8:
case 9:
case 11:
case 12:
case 13:
case 15:
case MotionEventCompat.AXIS_RTRIGGER:
case MotionEventCompat.AXIS_RUDDER:
case MotionEventCompat.AXIS_WHEEL:
case MotionEventCompat.AXIS_BRAKE:
case MotionEventCompat.AXIS_DISTANCE:
case 25:
case MotionEventCompat.AXIS_SCROLL:
case 29:
case 30:
case 31:
k.ai aiVar = this.d;
if (aiVar == null) {
throw new com.deepe.c.c.a.e(String.format("Unbalanced end element </%s> found", str2));
}
this.d = ((k.am) aiVar).v;
return;
case 3:
case 7:
case 10:
case 14:
case 16:
case 17:
case 19:
case 28:
default:
return;
case 6:
case MotionEventCompat.AXIS_RELATIVE_X:
this.i = false;
if (this.k != null) {
if (this.j == g.title) {
this.c.b(this.k.toString());
} else if (this.j == g.desc) {
this.c.c(this.k.toString());
}
this.k.setLength(0);
return;
}
return;
case MotionEventCompat.AXIS_GAS:
StringBuilder sb = this.m;
if (sb != null) {
this.l = false;
J(sb.toString());
this.m.setLength(0);
return;
}
return;
}
}
}
public void a(String str, String str2, String str3, Attributes attributes) throws com.deepe.c.c.a.e {
if (this.g) {
this.h++;
} else if ("http://www.w3.org/2000/svg".equals(str) || "".equals(str)) {
if (str2.length() <= 0) {
str2 = str3;
}
g a2 = g.a(str2);
switch (a()[a2.ordinal()]) {
case 1:
a(attributes);
return;
case 2:
d(attributes);
return;
case 3:
i(attributes);
return;
case 4:
x(attributes);
return;
case 5:
c(attributes);
return;
case 6:
case MotionEventCompat.AXIS_RELATIVE_X:
this.i = true;
this.j = a2;
return;
case 7:
j(attributes);
return;
case 8:
b(attributes);
return;
case 9:
f(attributes);
return;
case 10:
k(attributes);
return;
case 11:
t(attributes);
return;
case 12:
s(attributes);
return;
case 13:
B(attributes);
return;
case 14:
g(attributes);
return;
case 15:
z(attributes);
return;
case 16:
m(attributes);
return;
case 17:
l(attributes);
return;
case MotionEventCompat.AXIS_RTRIGGER:
u(attributes);
return;
case 19:
h(attributes);
return;
case MotionEventCompat.AXIS_RUDDER:
w(attributes);
return;
case MotionEventCompat.AXIS_WHEEL:
v(attributes);
return;
case MotionEventCompat.AXIS_GAS:
C(attributes);
return;
case MotionEventCompat.AXIS_BRAKE:
q(attributes);
return;
case MotionEventCompat.AXIS_DISTANCE:
r(attributes);
return;
case 25:
n(attributes);
return;
case MotionEventCompat.AXIS_SCROLL:
y(attributes);
return;
case 28:
p(attributes);
return;
case 29:
o(attributes);
return;
case 30:
e(attributes);
return;
case 31:
A(attributes);
return;
default:
this.g = true;
this.h = 1;
return;
}
}
}
public void a(String str, Map<String, String> map) {
String str2;
String b2;
if (!str.equals("xml-stylesheet") || this.f == null) {
return;
}
if (map.get("type") == null || "text/css".equals(map.get("type"))) {
if ((map.get("alternate") != null && !"no".equals(map.get("alternate"))) || (str2 = map.get("href")) == null || (b2 = this.f.b(str2)) == null) {
return;
}
String str3 = map.get("media");
if (str3 != null && !"all".equals(str3.trim())) {
b2 = "@media " + str3 + " { " + b2 + "}";
}
J(b2);
}
}
private void a(String str, Object... objArr) {
l.c(String.format(str, objArr));
}
private void a(Attributes attributes) throws com.deepe.c.c.a.e {
a("<svg>", new Object[0]);
k.ae aeVar = new k.ae();
aeVar.u = this.c;
aeVar.v = this.d;
a((k.ak) aeVar, attributes);
b(aeVar, attributes);
a((k.af) aeVar, attributes);
a((k.aq) aeVar, attributes);
a(aeVar, attributes);
k.ai aiVar = this.d;
if (aiVar == null) {
this.c.a(aeVar);
} else {
aiVar.a(aeVar);
}
this.d = aeVar;
}
private void a(char[] cArr, int i, int i2) throws com.deepe.c.c.a.e {
StringBuilder sb;
if (this.g) {
return;
}
if (this.i) {
if (this.k == null) {
this.k = new StringBuilder(i2);
}
sb = this.k;
} else if (!this.l) {
if (this.d instanceof k.ax) {
z(new String(cArr, i, i2));
return;
}
return;
} else {
if (this.m == null) {
this.m = new StringBuilder(i2);
}
sb = this.m;
}
sb.append(cArr, i, i2);
}
static int[] a() {
int[] iArr = n;
if (iArr != null) {
return iArr;
}
int[] iArr2 = new int[g.valuesCustom().length];
try {
iArr2[g.SWITCH.ordinal()] = 23;
} catch (NoSuchFieldError unused) {
}
try {
iArr2[g.UNSUPPORTED.ordinal()] = 32;
} catch (NoSuchFieldError unused2) {
}
try {
iArr2[g.a.ordinal()] = 2;
} catch (NoSuchFieldError unused3) {
}
try {
iArr2[g.circle.ordinal()] = 3;
} catch (NoSuchFieldError unused4) {
}
try {
iArr2[g.clipPath.ordinal()] = 4;
} catch (NoSuchFieldError unused5) {
}
try {
iArr2[g.defs.ordinal()] = 5;
} catch (NoSuchFieldError unused6) {
}
try {
iArr2[g.desc.ordinal()] = 6;
} catch (NoSuchFieldError unused7) {
}
try {
iArr2[g.ellipse.ordinal()] = 7;
} catch (NoSuchFieldError unused8) {
}
try {
iArr2[g.g.ordinal()] = 8;
} catch (NoSuchFieldError unused9) {
}
try {
iArr2[g.image.ordinal()] = 9;
} catch (NoSuchFieldError unused10) {
}
try {
iArr2[g.line.ordinal()] = 10;
} catch (NoSuchFieldError unused11) {
}
try {
iArr2[g.linearGradient.ordinal()] = 11;
} catch (NoSuchFieldError unused12) {
}
try {
iArr2[g.marker.ordinal()] = 12;
} catch (NoSuchFieldError unused13) {
}
try {
iArr2[g.mask.ordinal()] = 13;
} catch (NoSuchFieldError unused14) {
}
try {
iArr2[g.path.ordinal()] = 14;
} catch (NoSuchFieldError unused15) {
}
try {
iArr2[g.pattern.ordinal()] = 15;
} catch (NoSuchFieldError unused16) {
}
try {
iArr2[g.polygon.ordinal()] = 16;
} catch (NoSuchFieldError unused17) {
}
try {
iArr2[g.polyline.ordinal()] = 17;
} catch (NoSuchFieldError unused18) {
}
try {
iArr2[g.radialGradient.ordinal()] = 18;
} catch (NoSuchFieldError unused19) {
}
try {
iArr2[g.rect.ordinal()] = 19;
} catch (NoSuchFieldError unused20) {
}
try {
iArr2[g.solidColor.ordinal()] = 20;
} catch (NoSuchFieldError unused21) {
}
try {
iArr2[g.stop.ordinal()] = 21;
} catch (NoSuchFieldError unused22) {
}
try {
iArr2[g.style.ordinal()] = 22;
} catch (NoSuchFieldError unused23) {
}
try {
iArr2[g.svg.ordinal()] = 1;
} catch (NoSuchFieldError unused24) {
}
try {
iArr2[g.symbol.ordinal()] = 24;
} catch (NoSuchFieldError unused25) {
}
try {
iArr2[g.text.ordinal()] = 25;
} catch (NoSuchFieldError unused26) {
}
try {
iArr2[g.textPath.ordinal()] = 26;
} catch (NoSuchFieldError unused27) {
}
try {
iArr2[g.title.ordinal()] = 27;
} catch (NoSuchFieldError unused28) {
}
try {
iArr2[g.tref.ordinal()] = 28;
} catch (NoSuchFieldError unused29) {
}
try {
iArr2[g.tspan.ordinal()] = 29;
} catch (NoSuchFieldError unused30) {
}
try {
iArr2[g.use.ordinal()] = 30;
} catch (NoSuchFieldError unused31) {
}
try {
iArr2[g.view.ordinal()] = 31;
} catch (NoSuchFieldError unused32) {
}
n = iArr2;
return iArr2;
}
private static float b(float f2, float f3, float f4) {
float f5;
if (f4 < 0.0f) {
f4 += 6.0f;
}
if (f4 >= 6.0f) {
f4 -= 6.0f;
}
if (f4 < 1.0f) {
f5 = (f3 - f2) * f4;
} else if (f4 < 3.0f) {
return f3;
} else {
if (f4 >= 4.0f) {
return f2;
}
f5 = (f3 - f2) * (4.0f - f4);
}
return f5 + f2;
}
public static float b(String str) throws com.deepe.c.c.a.e {
int length = str.length();
if (length != 0) {
return a(str, 0, length);
}
throw new com.deepe.c.c.a.e("Invalid float value (empty string)");
}
private static k.p b(p pVar) {
return pVar.a("auto") ? k.p.c : pVar.n();
}
private void b(k.ak akVar, Attributes attributes) {
for (int i = 0; i < attributes.getLength(); i++) {
String trim = attributes.getValue(i).trim();
if (trim.length() != 0) {
int i2 = b()[f.a(attributes.getLocalName(i)).ordinal()];
if (i2 == 1) {
akVar.t = com.deepe.c.c.a.a.d.b(trim);
} else if (i2 != 88) {
if (akVar.r == null) {
akVar.r = new o();
}
o.a(akVar.r, attributes.getLocalName(i), attributes.getValue(i).trim(), true);
} else {
a(akVar, trim);
}
}
}
}
private void b(InputStream inputStream) throws com.deepe.c.c.a.e {
String text;
try {
XmlPullParser newPullParser = Xml.newPullParser();
h hVar = new h(newPullParser);
newPullParser.setFeature("http://xmlpull.org/v1/doc/features.html#process-docdecl", false);
newPullParser.setFeature("http://xmlpull.org/v1/doc/features.html#process-namespaces", true);
newPullParser.setInput(inputStream, null);
for (int eventType = newPullParser.getEventType(); eventType != 1; eventType = newPullParser.nextToken()) {
if (eventType == 0) {
c();
} else if (eventType == 8) {
p pVar = new p(newPullParser.getText());
a(pVar.q(), a(pVar));
} else if (eventType == 2) {
String name = newPullParser.getName();
if (newPullParser.getPrefix() != null) {
name = String.valueOf(newPullParser.getPrefix()) + ':' + name;
}
a(newPullParser.getNamespace(), newPullParser.getName(), name, hVar);
} else if (eventType == 3) {
String name2 = newPullParser.getName();
if (newPullParser.getPrefix() != null) {
name2 = String.valueOf(newPullParser.getPrefix()) + ':' + name2;
}
a(newPullParser.getNamespace(), newPullParser.getName(), name2);
} else if (eventType != 4) {
if (eventType == 5) {
text = newPullParser.getText();
} else if (eventType == 6) {
text = newPullParser.getText();
}
y(text);
} else {
int[] iArr = new int[2];
a(newPullParser.getTextCharacters(iArr), iArr[0], iArr[1]);
}
}
d();
} catch (IOException e2) {
throw new com.deepe.c.c.a.e("Stream error", e2);
} catch (XmlPullParserException e3) {
throw new com.deepe.c.c.a.e("XML parser problem", e3);
}
}
private void b(Attributes attributes) throws com.deepe.c.c.a.e {
a("<g>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.m mVar = new k.m();
mVar.u = this.c;
mVar.v = this.d;
a((k.ak) mVar, attributes);
b(mVar, attributes);
a((k.n) mVar, attributes);
a((k.af) mVar, attributes);
this.d.a(mVar);
this.d = mVar;
}
static int[] b() {
int[] iArr = o;
if (iArr != null) {
return iArr;
}
int[] iArr2 = new int[f.valuesCustom().length];
try {
iArr2[f.CLASS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr2[f.UNSUPPORTED.ordinal()] = 110;
} catch (NoSuchFieldError unused2) {
}
try {
iArr2[f.clip.ordinal()] = 2;
} catch (NoSuchFieldError unused3) {
}
try {
iArr2[f.clipPathUnits.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
iArr2[f.clip_path.ordinal()] = 3;
} catch (NoSuchFieldError unused5) {
}
try {
iArr2[f.clip_rule.ordinal()] = 5;
} catch (NoSuchFieldError unused6) {
}
try {
iArr2[f.color.ordinal()] = 6;
} catch (NoSuchFieldError unused7) {
}
try {
iArr2[f.cx.ordinal()] = 7;
} catch (NoSuchFieldError unused8) {
}
try {
iArr2[f.cy.ordinal()] = 8;
} catch (NoSuchFieldError unused9) {
}
try {
iArr2[f.d.ordinal()] = 15;
} catch (NoSuchFieldError unused10) {
}
try {
iArr2[f.direction.ordinal()] = 9;
} catch (NoSuchFieldError unused11) {
}
try {
iArr2[f.display.ordinal()] = 16;
} catch (NoSuchFieldError unused12) {
}
try {
iArr2[f.dx.ordinal()] = 10;
} catch (NoSuchFieldError unused13) {
}
try {
iArr2[f.dy.ordinal()] = 11;
} catch (NoSuchFieldError unused14) {
}
try {
iArr2[f.fill.ordinal()] = 17;
} catch (NoSuchFieldError unused15) {
}
try {
iArr2[f.fill_opacity.ordinal()] = 19;
} catch (NoSuchFieldError unused16) {
}
try {
iArr2[f.fill_rule.ordinal()] = 18;
} catch (NoSuchFieldError unused17) {
}
try {
iArr2[f.font.ordinal()] = 20;
} catch (NoSuchFieldError unused18) {
}
try {
iArr2[f.font_family.ordinal()] = 21;
} catch (NoSuchFieldError unused19) {
}
try {
iArr2[f.font_feature_settings.ordinal()] = 22;
} catch (NoSuchFieldError unused20) {
}
try {
iArr2[f.font_kerning.ordinal()] = 27;
} catch (NoSuchFieldError unused21) {
}
try {
iArr2[f.font_size.ordinal()] = 23;
} catch (NoSuchFieldError unused22) {
}
try {
iArr2[f.font_stretch.ordinal()] = 24;
} catch (NoSuchFieldError unused23) {
}
try {
iArr2[f.font_style.ordinal()] = 25;
} catch (NoSuchFieldError unused24) {
}
try {
iArr2[f.font_variant.ordinal()] = 28;
} catch (NoSuchFieldError unused25) {
}
try {
iArr2[f.font_variant_caps.ordinal()] = 31;
} catch (NoSuchFieldError unused26) {
}
try {
iArr2[f.font_variant_east_asian.ordinal()] = 33;
} catch (NoSuchFieldError unused27) {
}
try {
iArr2[f.font_variant_ligatures.ordinal()] = 29;
} catch (NoSuchFieldError unused28) {
}
try {
iArr2[f.font_variant_numeric.ordinal()] = 32;
} catch (NoSuchFieldError unused29) {
}
try {
iArr2[f.font_variant_position.ordinal()] = 30;
} catch (NoSuchFieldError unused30) {
}
try {
iArr2[f.font_variation_settings.ordinal()] = 34;
} catch (NoSuchFieldError unused31) {
}
try {
iArr2[f.font_weight.ordinal()] = 26;
} catch (NoSuchFieldError unused32) {
}
try {
iArr2[f.fr.ordinal()] = 14;
} catch (NoSuchFieldError unused33) {
}
try {
iArr2[f.fx.ordinal()] = 12;
} catch (NoSuchFieldError unused34) {
}
try {
iArr2[f.fy.ordinal()] = 13;
} catch (NoSuchFieldError unused35) {
}
try {
iArr2[f.glyph_orientation_vertical.ordinal()] = 35;
} catch (NoSuchFieldError unused36) {
}
try {
iArr2[f.gradientTransform.ordinal()] = 36;
} catch (NoSuchFieldError unused37) {
}
try {
iArr2[f.gradientUnits.ordinal()] = 37;
} catch (NoSuchFieldError unused38) {
}
try {
iArr2[f.height.ordinal()] = 38;
} catch (NoSuchFieldError unused39) {
}
try {
iArr2[f.href.ordinal()] = 39;
} catch (NoSuchFieldError unused40) {
}
try {
iArr2[f.image_rendering.ordinal()] = 40;
} catch (NoSuchFieldError unused41) {
}
try {
iArr2[f.isolation.ordinal()] = 41;
} catch (NoSuchFieldError unused42) {
}
try {
iArr2[f.letter_spacing.ordinal()] = 42;
} catch (NoSuchFieldError unused43) {
}
try {
iArr2[f.marker.ordinal()] = 43;
} catch (NoSuchFieldError unused44) {
}
try {
iArr2[f.markerHeight.ordinal()] = 47;
} catch (NoSuchFieldError unused45) {
}
try {
iArr2[f.markerUnits.ordinal()] = 48;
} catch (NoSuchFieldError unused46) {
}
try {
iArr2[f.markerWidth.ordinal()] = 49;
} catch (NoSuchFieldError unused47) {
}
try {
iArr2[f.marker_end.ordinal()] = 46;
} catch (NoSuchFieldError unused48) {
}
try {
iArr2[f.marker_mid.ordinal()] = 45;
} catch (NoSuchFieldError unused49) {
}
try {
iArr2[f.marker_start.ordinal()] = 44;
} catch (NoSuchFieldError unused50) {
}
try {
iArr2[f.mask.ordinal()] = 50;
} catch (NoSuchFieldError unused51) {
}
try {
iArr2[f.maskContentUnits.ordinal()] = 51;
} catch (NoSuchFieldError unused52) {
}
try {
iArr2[f.maskUnits.ordinal()] = 52;
} catch (NoSuchFieldError unused53) {
}
try {
iArr2[f.media.ordinal()] = 53;
} catch (NoSuchFieldError unused54) {
}
try {
iArr2[f.mix_blend_mode.ordinal()] = 54;
} catch (NoSuchFieldError unused55) {
}
try {
iArr2[f.offset.ordinal()] = 55;
} catch (NoSuchFieldError unused56) {
}
try {
iArr2[f.opacity.ordinal()] = 56;
} catch (NoSuchFieldError unused57) {
}
try {
iArr2[f.orient.ordinal()] = 57;
} catch (NoSuchFieldError unused58) {
}
try {
iArr2[f.overflow.ordinal()] = 58;
} catch (NoSuchFieldError unused59) {
}
try {
iArr2[f.pathLength.ordinal()] = 59;
} catch (NoSuchFieldError unused60) {
}
try {
iArr2[f.patternContentUnits.ordinal()] = 60;
} catch (NoSuchFieldError unused61) {
}
try {
iArr2[f.patternTransform.ordinal()] = 61;
} catch (NoSuchFieldError unused62) {
}
try {
iArr2[f.patternUnits.ordinal()] = 62;
} catch (NoSuchFieldError unused63) {
}
try {
iArr2[f.points.ordinal()] = 63;
} catch (NoSuchFieldError unused64) {
}
try {
iArr2[f.preserveAspectRatio.ordinal()] = 64;
} catch (NoSuchFieldError unused65) {
}
try {
iArr2[f.r.ordinal()] = 65;
} catch (NoSuchFieldError unused66) {
}
try {
iArr2[f.refX.ordinal()] = 66;
} catch (NoSuchFieldError unused67) {
}
try {
iArr2[f.refY.ordinal()] = 67;
} catch (NoSuchFieldError unused68) {
}
try {
iArr2[f.requiredExtensions.ordinal()] = 69;
} catch (NoSuchFieldError unused69) {
}
try {
iArr2[f.requiredFeatures.ordinal()] = 68;
} catch (NoSuchFieldError unused70) {
}
try {
iArr2[f.requiredFonts.ordinal()] = 71;
} catch (NoSuchFieldError unused71) {
}
try {
iArr2[f.requiredFormats.ordinal()] = 70;
} catch (NoSuchFieldError unused72) {
}
try {
iArr2[f.rx.ordinal()] = 72;
} catch (NoSuchFieldError unused73) {
}
try {
iArr2[f.ry.ordinal()] = 73;
} catch (NoSuchFieldError unused74) {
}
try {
iArr2[f.solid_color.ordinal()] = 74;
} catch (NoSuchFieldError unused75) {
}
try {
iArr2[f.solid_opacity.ordinal()] = 75;
} catch (NoSuchFieldError unused76) {
}
try {
iArr2[f.spreadMethod.ordinal()] = 76;
} catch (NoSuchFieldError unused77) {
}
try {
iArr2[f.startOffset.ordinal()] = 77;
} catch (NoSuchFieldError unused78) {
}
try {
iArr2[f.stop_color.ordinal()] = 78;
} catch (NoSuchFieldError unused79) {
}
try {
iArr2[f.stop_opacity.ordinal()] = 79;
} catch (NoSuchFieldError unused80) {
}
try {
iArr2[f.stroke.ordinal()] = 80;
} catch (NoSuchFieldError unused81) {
}
try {
iArr2[f.stroke_dasharray.ordinal()] = 81;
} catch (NoSuchFieldError unused82) {
}
try {
iArr2[f.stroke_dashoffset.ordinal()] = 82;
} catch (NoSuchFieldError unused83) {
}
try {
iArr2[f.stroke_linecap.ordinal()] = 83;
} catch (NoSuchFieldError unused84) {
}
try {
iArr2[f.stroke_linejoin.ordinal()] = 84;
} catch (NoSuchFieldError unused85) {
}
try {
iArr2[f.stroke_miterlimit.ordinal()] = 85;
} catch (NoSuchFieldError unused86) {
}
try {
iArr2[f.stroke_opacity.ordinal()] = 86;
} catch (NoSuchFieldError unused87) {
}
try {
iArr2[f.stroke_width.ordinal()] = 87;
} catch (NoSuchFieldError unused88) {
}
try {
iArr2[f.style.ordinal()] = 88;
} catch (NoSuchFieldError unused89) {
}
try {
iArr2[f.systemLanguage.ordinal()] = 89;
} catch (NoSuchFieldError unused90) {
}
try {
iArr2[f.text_anchor.ordinal()] = 90;
} catch (NoSuchFieldError unused91) {
}
try {
iArr2[f.text_decoration.ordinal()] = 91;
} catch (NoSuchFieldError unused92) {
}
try {
iArr2[f.text_orientation.ordinal()] = 92;
} catch (NoSuchFieldError unused93) {
}
try {
iArr2[f.transform.ordinal()] = 93;
} catch (NoSuchFieldError unused94) {
}
try {
iArr2[f.type.ordinal()] = 94;
} catch (NoSuchFieldError unused95) {
}
try {
iArr2[f.vector_effect.ordinal()] = 95;
} catch (NoSuchFieldError unused96) {
}
try {
iArr2[f.version.ordinal()] = 96;
} catch (NoSuchFieldError unused97) {
}
try {
iArr2[f.viewBox.ordinal()] = 97;
} catch (NoSuchFieldError unused98) {
}
try {
iArr2[f.viewport_fill.ordinal()] = 107;
} catch (NoSuchFieldError unused99) {
}
try {
iArr2[f.viewport_fill_opacity.ordinal()] = 108;
} catch (NoSuchFieldError unused100) {
}
try {
iArr2[f.visibility.ordinal()] = 109;
} catch (NoSuchFieldError unused101) {
}
try {
iArr2[f.width.ordinal()] = 98;
} catch (NoSuchFieldError unused102) {
}
try {
iArr2[f.word_spacing.ordinal()] = 99;
} catch (NoSuchFieldError unused103) {
}
try {
iArr2[f.writing_mode.ordinal()] = 100;
} catch (NoSuchFieldError unused104) {
}
try {
iArr2[f.x.ordinal()] = 101;
} catch (NoSuchFieldError unused105) {
}
try {
iArr2[f.x1.ordinal()] = 103;
} catch (NoSuchFieldError unused106) {
}
try {
iArr2[f.x2.ordinal()] = 105;
} catch (NoSuchFieldError unused107) {
}
try {
iArr2[f.y.ordinal()] = 102;
} catch (NoSuchFieldError unused108) {
}
try {
iArr2[f.y1.ordinal()] = 104;
} catch (NoSuchFieldError unused109) {
}
try {
iArr2[f.y2.ordinal()] = 106;
} catch (NoSuchFieldError unused110) {
}
o = iArr2;
return iArr2;
}
public static Float c(String str) {
try {
float b2 = b(str);
float f2 = 0.0f;
if (b2 >= 0.0f) {
f2 = Math.min(b2, 1.0f);
}
return Float.valueOf(f2);
} catch (com.deepe.c.c.a.e unused) {
return null;
}
}
public void c() {
this.c = new k(this.e, this.f);
}
private void c(InputStream inputStream) throws com.deepe.c.c.a.e {
try {
SAXParserFactory newInstance = SAXParserFactory.newInstance();
if (!a) {
newInstance.setFeature("http://xml.org/sax/features/external-general-entities", false);
newInstance.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
}
XMLReader xMLReader = newInstance.newSAXParser().getXMLReader();
e eVar = new e(this, null);
xMLReader.setContentHandler(eVar);
xMLReader.setProperty("http://xml.org/sax/properties/lexical-handler", eVar);
xMLReader.parse(new InputSource(inputStream));
} catch (IOException e2) {
throw new com.deepe.c.c.a.e("Stream error", e2);
} catch (ParserConfigurationException e3) {
throw new com.deepe.c.c.a.e("XML parser problem", e3);
} catch (SAXException e4) {
throw new com.deepe.c.c.a.e("SVG parse error", e4);
}
}
private void c(Attributes attributes) throws com.deepe.c.c.a.e {
a("<defs>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.h hVar = new k.h();
hVar.u = this.c;
hVar.v = this.d;
a((k.ak) hVar, attributes);
b(hVar, attributes);
a((k.n) hVar, attributes);
this.d.a(hVar);
this.d = hVar;
}
public static k.an d(String str) {
if (str.startsWith("url(")) {
int indexOf = str.indexOf(")");
if (indexOf != -1) {
String trim = str.substring(4, indexOf).trim();
String trim2 = str.substring(indexOf + 1).trim();
return new k.u(trim, trim2.length() > 0 ? E(trim2) : null);
}
return new k.u(str.substring(4).trim(), null);
}
return E(str);
}
public void d() {
a((k.am) this.c.d(), "");
}
private void d(Attributes attributes) throws com.deepe.c.c.a.e {
a("<a>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.a aVar = new k.a();
aVar.u = this.c;
aVar.v = this.d;
a((k.ak) aVar, attributes);
b(aVar, attributes);
a((k.n) aVar, attributes);
a((k.af) aVar, attributes);
a(aVar, attributes);
this.d.a(aVar);
this.d = aVar;
}
public static k.f e(String str) {
if (str.charAt(0) == '#') {
com.deepe.c.c.a.a.g a2 = com.deepe.c.c.a.a.g.a(str, 1, str.length());
if (a2 == null) {
return k.f.b;
}
int a3 = a2.a();
if (a3 == 4) {
int b2 = a2.b();
int i = b2 & 3840;
int i2 = b2 & 240;
int i3 = b2 & 15;
return new k.f(i3 | (i << 8) | (-16777216) | (i << 12) | (i2 << 8) | (i2 << 4) | (i3 << 4));
} else if (a3 != 5) {
if (a3 != 7) {
if (a3 != 9) {
return k.f.b;
}
return new k.f((a2.b() >>> 8) | (a2.b() << 24));
}
return new k.f(a2.b() | ViewCompat.MEASURED_STATE_MASK);
} else {
int b3 = a2.b();
int i4 = 61440 & b3;
int i5 = b3 & 3840;
int i6 = b3 & 240;
int i7 = b3 & 15;
return new k.f((i7 << 24) | (i7 << 28) | (i4 << 8) | (i4 << 4) | (i5 << 4) | i5 | i6 | (i6 >> 4));
}
}
String lowerCase = str.toLowerCase(Locale.US);
boolean startsWith = lowerCase.startsWith("rgba(");
float f2 = Float.NaN;
if (startsWith || lowerCase.startsWith("rgb(")) {
p pVar = new p(str.substring(startsWith ? 5 : 4));
pVar.i();
float k = pVar.k();
if (!Float.isNaN(k)) {
if (pVar.a('%')) {
k = (k * 256.0f) / 100.0f;
}
boolean j = pVar.j();
float k2 = pVar.k();
if (!Float.isNaN(k2)) {
if (pVar.a('%')) {
k2 = (k2 * 256.0f) / 100.0f;
}
if (!j) {
pVar.i();
} else if (!pVar.j()) {
return k.f.b;
}
float k3 = pVar.k();
if (!Float.isNaN(k3)) {
if (pVar.a('%')) {
k3 = (k3 * 256.0f) / 100.0f;
}
if (!j) {
pVar.i();
if (pVar.a('/')) {
pVar.i();
f2 = pVar.k();
}
}
pVar.i();
if (pVar.a(')')) {
if (Float.isNaN(f2)) {
return new k.f((a(k) << 16) | ViewCompat.MEASURED_STATE_MASK | (a(k2) << 8) | a(k3));
}
return new k.f((a(k) << 16) | (a(f2 * 256.0f) << 24) | (a(k2) << 8) | a(k3));
}
return k.f.b;
}
}
}
} else {
boolean startsWith2 = lowerCase.startsWith("hsla(");
if (startsWith2 || lowerCase.startsWith("hsl(")) {
p pVar2 = new p(str.substring(startsWith2 ? 5 : 4));
pVar2.i();
float k4 = pVar2.k();
if (!Float.isNaN(k4)) {
pVar2.a("deg");
boolean j2 = pVar2.j();
float k5 = pVar2.k();
if (!Float.isNaN(k5)) {
if (!pVar2.a('%')) {
return k.f.b;
}
if (!j2) {
pVar2.i();
} else if (!pVar2.j()) {
return k.f.b;
}
float k6 = pVar2.k();
if (!Float.isNaN(k6)) {
if (pVar2.a('%')) {
if (!j2) {
pVar2.i();
if (pVar2.a('/')) {
pVar2.i();
f2 = pVar2.k();
}
}
pVar2.i();
if (pVar2.a(')')) {
if (Float.isNaN(f2)) {
return new k.f(a(k4, k5, k6) | ViewCompat.MEASURED_STATE_MASK);
}
return new k.f(a(k4, k5, k6) | (a(f2 * 256.0f) << 24));
}
return k.f.b;
}
return k.f.b;
}
}
}
}
}
return F(lowerCase);
}
private void e(Attributes attributes) throws com.deepe.c.c.a.e {
a("<use>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.bd bdVar = new k.bd();
bdVar.u = this.c;
bdVar.v = this.d;
a((k.ak) bdVar, attributes);
b(bdVar, attributes);
a((k.n) bdVar, attributes);
a((k.af) bdVar, attributes);
a(bdVar, attributes);
this.d.a(bdVar);
this.d = bdVar;
}
public static List<String> f(String str) {
p pVar = new p(str);
ArrayList arrayList = null;
do {
String w = pVar.w();
if (w == null) {
w = pVar.c(',');
}
if (w == null) {
break;
}
if (arrayList == null) {
arrayList = new ArrayList();
}
arrayList.add(w);
pVar.j();
} while (!pVar.h());
return arrayList;
}
private void f(Attributes attributes) throws com.deepe.c.c.a.e {
a("<image>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.o oVar = new k.o();
oVar.u = this.c;
oVar.v = this.d;
a((k.ak) oVar, attributes);
b(oVar, attributes);
a((k.n) oVar, attributes);
a((k.af) oVar, attributes);
a(oVar, attributes);
this.d.a(oVar);
this.d = oVar;
}
public static k.p g(String str) {
try {
k.p a2 = b.a(str);
return a2 == null ? a(str) : a2;
} catch (com.deepe.c.c.a.e unused) {
return null;
}
}
private void g(Attributes attributes) throws com.deepe.c.c.a.e {
a("<path>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.v vVar = new k.v();
vVar.u = this.c;
vVar.v = this.d;
a((k.ak) vVar, attributes);
b(vVar, attributes);
a((k.n) vVar, attributes);
a((k.af) vVar, attributes);
a(vVar, attributes);
this.d.a(vVar);
}
public static Float h(String str) {
Float a2 = d.a(str);
if (a2 == null) {
p pVar = new p(str);
Float valueOf = Float.valueOf(pVar.k());
pVar.i();
if (pVar.h() && valueOf.floatValue() >= 1.0f && valueOf.floatValue() <= 1000.0f) {
return valueOf;
}
return null;
}
return a2;
}
private void h(Attributes attributes) throws com.deepe.c.c.a.e {
a("<rect>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.ab abVar = new k.ab();
abVar.u = this.c;
abVar.v = this.d;
a((k.ak) abVar, attributes);
b(abVar, attributes);
a((k.n) abVar, attributes);
a((k.af) abVar, attributes);
a(abVar, attributes);
this.d.a(abVar);
}
public static Float i(String str) {
Float a2 = c.a(str);
if (a2 == null) {
p pVar = new p(str);
Float valueOf = Float.valueOf(pVar.k());
if (pVar.a('%')) {
pVar.i();
if (pVar.h() && valueOf.floatValue() >= 0.0f) {
return valueOf;
}
return null;
}
return null;
}
return a2;
}
private void i(Attributes attributes) throws com.deepe.c.c.a.e {
a("<circle>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.d dVar = new k.d();
dVar.u = this.c;
dVar.v = this.d;
a((k.ak) dVar, attributes);
b(dVar, attributes);
a((k.n) dVar, attributes);
a((k.af) dVar, attributes);
a(dVar, attributes);
this.d.a(dVar);
}
public static o.d j(String str) {
int hashCode = str.hashCode();
if (hashCode == -1657669071) {
if (str.equals("oblique")) {
return o.d.oblique;
}
return null;
} else if (hashCode == -1178781136) {
if (str.equals("italic")) {
return o.d.italic;
}
return null;
} else if (hashCode == -1039745817 && str.equals(PrerollVideoResponse.NORMAL)) {
return o.d.normal;
} else {
return null;
}
}
private void j(Attributes attributes) throws com.deepe.c.c.a.e {
a("<ellipse>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.i iVar = new k.i();
iVar.u = this.c;
iVar.v = this.d;
a((k.ak) iVar, attributes);
b(iVar, attributes);
a((k.n) iVar, attributes);
a((k.af) iVar, attributes);
a(iVar, attributes);
this.d.a(iVar);
}
public static o.k k(String str) {
switch (str.hashCode()) {
case -1171789332:
if (str.equals("line-through")) {
return o.k.LineThrough;
}
return null;
case -1026963764:
if (str.equals("underline")) {
return o.k.Underline;
}
return null;
case 3387192:
if (str.equals(com.baidu.mobads.sdk.internal.a.a)) {
return o.k.None;
}
return null;
case 93826908:
if (str.equals("blink")) {
return o.k.Blink;
}
return null;
case 529818312:
if (str.equals("overline")) {
return o.k.Overline;
}
return null;
default:
return null;
}
}
private void k(Attributes attributes) throws com.deepe.c.c.a.e {
a("<line>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.q qVar = new k.q();
qVar.u = this.c;
qVar.v = this.d;
a((k.ak) qVar, attributes);
b(qVar, attributes);
a((k.n) qVar, attributes);
a((k.af) qVar, attributes);
a(qVar, attributes);
this.d.a(qVar);
}
public static o.l l(String str) {
int hashCode = str.hashCode();
if (hashCode == 107498) {
if (str.equals("ltr")) {
return o.l.LTR;
}
return null;
} else if (hashCode == 113258 && str.equals("rtl")) {
return o.l.RTL;
} else {
return null;
}
}
private void l(Attributes attributes) throws com.deepe.c.c.a.e {
a("<polyline>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.z zVar = new k.z();
zVar.u = this.c;
zVar.v = this.d;
a((k.ak) zVar, attributes);
b(zVar, attributes);
a((k.n) zVar, attributes);
a((k.af) zVar, attributes);
a(zVar, attributes, "polyline");
this.d.a(zVar);
}
public static o.b m(String str) {
if ("nonzero".equals(str)) {
return o.b.NonZero;
}
if ("evenodd".equals(str)) {
return o.b.EvenOdd;
}
return null;
}
private void m(Attributes attributes) throws com.deepe.c.c.a.e {
a("<polygon>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.aa aaVar = new k.aa();
aaVar.u = this.c;
aaVar.v = this.d;
a((k.ak) aaVar, attributes);
b(aaVar, attributes);
a((k.n) aaVar, attributes);
a((k.af) aaVar, attributes);
a(aaVar, attributes, "polygon");
this.d.a(aaVar);
}
public static o.g n(String str) {
if ("butt".equals(str)) {
return o.g.Butt;
}
if ("round".equals(str)) {
return o.g.Round;
}
if ("square".equals(str)) {
return o.g.Square;
}
return null;
}
private void n(Attributes attributes) throws com.deepe.c.c.a.e {
a("<text>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.av avVar = new k.av();
avVar.u = this.c;
avVar.v = this.d;
a((k.ak) avVar, attributes);
b(avVar, attributes);
a((k.n) avVar, attributes);
a((k.af) avVar, attributes);
a((k.az) avVar, attributes);
this.d.a(avVar);
this.d = avVar;
}
public static o.h o(String str) {
if ("miter".equals(str)) {
return o.h.Miter;
}
if ("round".equals(str)) {
return o.h.Round;
}
if ("bevel".equals(str)) {
return o.h.Bevel;
}
return null;
}
private void o(Attributes attributes) throws com.deepe.c.c.a.e {
a("<tspan>", new Object[0]);
k.ai aiVar = this.d;
if (aiVar == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
if (!(aiVar instanceof k.ax)) {
throw new com.deepe.c.c.a.e("Invalid document. <tspan> elements are only valid inside <text> or other <tspan> elements.");
}
k.au auVar = new k.au();
auVar.u = this.c;
auVar.v = this.d;
a((k.ak) auVar, attributes);
b(auVar, attributes);
a((k.af) auVar, attributes);
a((k.az) auVar, attributes);
this.d.a(auVar);
this.d = auVar;
auVar.a(auVar.v instanceof k.ba ? (k.ba) auVar.v : ((k.aw) auVar.v).h());
}
private void p(Attributes attributes) throws com.deepe.c.c.a.e {
a("<tref>", new Object[0]);
k.ai aiVar = this.d;
if (aiVar == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
if (!(aiVar instanceof k.ax)) {
throw new com.deepe.c.c.a.e("Invalid document. <tref> elements are only valid inside <text> or <tspan> elements.");
}
k.at atVar = new k.at();
atVar.u = this.c;
atVar.v = this.d;
a((k.ak) atVar, attributes);
b(atVar, attributes);
a((k.af) atVar, attributes);
a(atVar, attributes);
this.d.a(atVar);
atVar.a(atVar.v instanceof k.ba ? (k.ba) atVar.v : ((k.aw) atVar.v).h());
}
public static k.p[] p(String str) {
k.p n2;
p pVar = new p(str);
pVar.i();
if (pVar.h() || (n2 = pVar.n()) == null || n2.c()) {
return null;
}
float a2 = n2.a();
ArrayList arrayList = new ArrayList();
arrayList.add(n2);
while (!pVar.h()) {
pVar.j();
k.p n3 = pVar.n();
if (n3 == null || n3.c()) {
return null;
}
arrayList.add(n3);
a2 += n3.a();
}
if (a2 == 0.0f) {
return null;
}
return (k.p[]) arrayList.toArray(new k.p[0]);
}
public static o.j q(String str) {
int hashCode = str.hashCode();
if (hashCode == -1074341483) {
if (str.equals("middle")) {
return o.j.Middle;
}
return null;
} else if (hashCode == 100571) {
if (str.equals("end")) {
return o.j.End;
}
return null;
} else if (hashCode == 109757538 && str.equals("start")) {
return o.j.Start;
} else {
return null;
}
}
private void q(Attributes attributes) throws com.deepe.c.c.a.e {
a("<switch>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.ar arVar = new k.ar();
arVar.u = this.c;
arVar.v = this.d;
a((k.ak) arVar, attributes);
b(arVar, attributes);
a((k.n) arVar, attributes);
a((k.af) arVar, attributes);
this.d.a(arVar);
this.d = arVar;
}
public static Boolean r(String str) {
switch (str.hashCode()) {
case -1217487446:
if (!str.equals("hidden")) {
return null;
}
return Boolean.FALSE;
case -907680051:
if (!str.equals("scroll")) {
return null;
}
return Boolean.FALSE;
case 3005871:
if (!str.equals("auto")) {
return null;
}
return Boolean.TRUE;
case 466743410:
if (!str.equals("visible")) {
return null;
}
return Boolean.TRUE;
default:
return null;
}
}
private void r(Attributes attributes) throws com.deepe.c.c.a.e {
a("<symbol>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.as asVar = new k.as();
asVar.u = this.c;
asVar.v = this.d;
a((k.ak) asVar, attributes);
b(asVar, attributes);
a((k.af) asVar, attributes);
a((k.aq) asVar, attributes);
this.d.a(asVar);
this.d = asVar;
}
public static k.c s(String str) {
if (!"auto".equals(str) && str.startsWith("rect(")) {
p pVar = new p(str.substring(5));
pVar.i();
k.p b2 = b(pVar);
pVar.j();
k.p b3 = b(pVar);
pVar.j();
k.p b4 = b(pVar);
pVar.j();
k.p b5 = b(pVar);
pVar.i();
if (pVar.a(')') || pVar.h()) {
return new k.c(b2, b3, b4, b5);
}
return null;
}
return null;
}
private void s(Attributes attributes) throws com.deepe.c.c.a.e {
a("<marker>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.r rVar = new k.r();
rVar.u = this.c;
rVar.v = this.d;
a((k.ak) rVar, attributes);
b(rVar, attributes);
a((k.af) rVar, attributes);
a((k.aq) rVar, attributes);
a(rVar, attributes);
this.d.a(rVar);
this.d = rVar;
}
public static o.n t(String str) {
int hashCode = str.hashCode();
if (hashCode == 3387192) {
if (str.equals(com.baidu.mobads.sdk.internal.a.a)) {
return o.n.None;
}
return null;
} else if (hashCode == 1629199934 && str.equals("non-scaling-stroke")) {
return o.n.NonScalingStroke;
} else {
return null;
}
}
private void t(Attributes attributes) throws com.deepe.c.c.a.e {
a("<linearGradient>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.al alVar = new k.al();
alVar.u = this.c;
alVar.v = this.d;
a((k.ak) alVar, attributes);
b(alVar, attributes);
a((k.j) alVar, attributes);
a(alVar, attributes);
this.d.a(alVar);
this.d = alVar;
}
public static o.i u(String str) {
int hashCode = str.hashCode();
if (hashCode == -933002398) {
if (str.equals("optimizeQuality")) {
return o.i.optimizeQuality;
}
return null;
} else if (hashCode == 3005871) {
if (str.equals("auto")) {
return o.i.auto;
}
return null;
} else if (hashCode == 362741610 && str.equals("optimizeSpeed")) {
return o.i.optimizeSpeed;
} else {
return null;
}
}
private void u(Attributes attributes) throws com.deepe.c.c.a.e {
a("<radialGradient>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.ap apVar = new k.ap();
apVar.u = this.c;
apVar.v = this.d;
a((k.ak) apVar, attributes);
b(apVar, attributes);
a((k.j) apVar, attributes);
a(apVar, attributes);
this.d.a(apVar);
this.d = apVar;
}
public static o.f v(String str) {
int hashCode = str.hashCode();
if (hashCode == 3005871) {
if (str.equals("auto")) {
return o.f.auto;
}
return null;
} else if (hashCode == 2096783531 && str.equals("isolate")) {
return o.f.isolate;
} else {
return null;
}
}
private void v(Attributes attributes) throws com.deepe.c.c.a.e {
a("<stop>", new Object[0]);
k.ai aiVar = this.d;
if (aiVar == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
if (!(aiVar instanceof k.j)) {
throw new com.deepe.c.c.a.e("Invalid document. <stop> elements are only valid inside <linearGradient> or <radialGradient> elements.");
}
k.ad adVar = new k.ad();
adVar.u = this.c;
adVar.v = this.d;
a((k.ak) adVar, attributes);
b(adVar, attributes);
a(adVar, attributes);
this.d.a(adVar);
this.d = adVar;
}
public static k.p w(String str) {
if (PrerollVideoResponse.NORMAL.equals(str)) {
return k.p.c;
}
try {
k.p a2 = a(str);
if (a2.b == k.bc.percent) {
return null;
}
return a2;
} catch (com.deepe.c.c.a.e unused) {
return null;
}
}
private void w(Attributes attributes) throws com.deepe.c.c.a.e {
a("<solidColor>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.ac acVar = new k.ac();
acVar.u = this.c;
acVar.v = this.d;
a(acVar, attributes);
b(acVar, attributes);
this.d.a(acVar);
this.d = acVar;
}
protected static k.w x(String str) {
StringBuilder sb;
float k;
float a2;
float f2;
float f3;
float f4;
float f5;
k.w wVar;
p pVar = new p(str);
k.w wVar2 = new k.w();
if (pVar.h()) {
return wVar2;
}
int intValue = pVar.m().intValue();
int i = 109;
if (intValue != 77 && intValue != 109) {
return wVar2;
}
int i2 = intValue;
float f6 = 0.0f;
float f7 = 0.0f;
float f8 = 0.0f;
float f9 = 0.0f;
float f10 = 0.0f;
float f11 = 0.0f;
while (true) {
pVar.i();
switch (i2) {
case 65:
case 97:
float k2 = pVar.k();
float a3 = pVar.a(k2);
float a4 = pVar.a(a3);
Boolean a5 = pVar.a(Float.valueOf(a4));
Boolean a6 = pVar.a((Object) a5);
float a7 = pVar.a(a6);
float a8 = pVar.a(a7);
if (!Float.isNaN(a8) && k2 >= 0.0f && a3 >= 0.0f) {
if (i2 == 97) {
a7 += f6;
a8 += f8;
}
wVar2.a(k2, a3, a4, a5.booleanValue(), a6.booleanValue(), a7, a8);
f6 = a7;
f7 = f6;
f8 = a8;
f9 = f8;
break;
}
break;
case 67:
case V8Value.UNDEFINED:
k = pVar.k();
float a9 = pVar.a(k);
float a10 = pVar.a(a9);
float a11 = pVar.a(a10);
a2 = pVar.a(a11);
float a12 = pVar.a(a2);
if (!Float.isNaN(a12)) {
if (i2 == 99) {
a2 += f6;
a12 += f8;
k += f6;
a9 += f8;
a10 += f6;
a11 += f8;
}
f2 = a9;
f3 = a10;
f4 = a12;
f5 = a11;
wVar = wVar2;
wVar.a(k, f2, f3, f5, a2, f4);
f7 = f3;
f6 = a2;
f9 = f5;
f8 = f4;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 72:
case 104:
float k3 = pVar.k();
if (!Float.isNaN(k3)) {
if (i2 == 104) {
k3 += f6;
}
f6 = k3;
wVar2.b(f6, f8);
f7 = f6;
f9 = f8;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 76:
case 108:
float k4 = pVar.k();
float a13 = pVar.a(k4);
if (!Float.isNaN(a13)) {
if (i2 == 108) {
k4 += f6;
a13 += f8;
}
f6 = k4;
f8 = a13;
wVar2.b(f6, f8);
f7 = f6;
f9 = f8;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 77:
case 109:
float k5 = pVar.k();
float a14 = pVar.a(k5);
if (!Float.isNaN(a14)) {
if (i2 == i && !wVar2.a()) {
k5 += f6;
a14 += f8;
}
f6 = k5;
f8 = a14;
wVar2.a(f6, f8);
f7 = f6;
f10 = f7;
f9 = f8;
f11 = f9;
i2 = i2 != i ? 76 : 108;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 81:
case 113:
float k6 = pVar.k();
float a15 = pVar.a(k6);
float a16 = pVar.a(a15);
float a17 = pVar.a(a16);
if (!Float.isNaN(a17)) {
if (i2 == 113) {
a16 += f6;
a17 += f8;
k6 += f6;
a15 += f8;
}
float f12 = k6;
float f13 = a15;
wVar2.a(f12, f13, a16, a17);
f7 = f12;
f9 = f13;
f6 = a16;
f8 = a17;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 83:
case 115:
k = (f6 * 2.0f) - f7;
float f14 = (2.0f * f8) - f9;
float k7 = pVar.k();
float a18 = pVar.a(k7);
a2 = pVar.a(a18);
float a19 = pVar.a(a2);
if (!Float.isNaN(a19)) {
if (i2 == 115) {
a2 += f6;
a19 += f8;
k7 += f6;
a18 += f8;
}
f3 = k7;
f4 = a19;
f5 = a18;
wVar = wVar2;
f2 = f14;
wVar.a(k, f2, f3, f5, a2, f4);
f7 = f3;
f6 = a2;
f9 = f5;
f8 = f4;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 84:
case 116:
float f15 = (f6 * 2.0f) - f7;
float f16 = (2.0f * f8) - f9;
float k8 = pVar.k();
float a20 = pVar.a(k8);
if (!Float.isNaN(a20)) {
if (i2 == 116) {
k8 += f6;
a20 += f8;
}
f6 = k8;
f8 = a20;
wVar2.a(f15, f16, f6, f8);
f7 = f15;
f9 = f16;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 86:
case 118:
float k9 = pVar.k();
if (!Float.isNaN(k9)) {
if (i2 == 118) {
k9 += f8;
}
f8 = k9;
wVar2.b(f6, f8);
f7 = f6;
f9 = f8;
break;
} else {
sb = new StringBuilder("Bad path coords for ");
break;
}
case 90:
case 122:
wVar2.b();
f6 = f10;
f7 = f6;
f8 = f11;
f9 = f8;
break;
default:
return wVar2;
}
pVar.j();
if (pVar.h()) {
return wVar2;
}
if (pVar.v()) {
i2 = pVar.m().intValue();
}
i = 109;
}
}
private void x(Attributes attributes) throws com.deepe.c.c.a.e {
a("<clipPath>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.e eVar = new k.e();
eVar.u = this.c;
eVar.v = this.d;
a((k.ak) eVar, attributes);
b(eVar, attributes);
a((k.n) eVar, attributes);
a((k.af) eVar, attributes);
a(eVar, attributes);
this.d.a(eVar);
this.d = eVar;
}
public void y(String str) throws com.deepe.c.c.a.e {
StringBuilder sb;
if (this.g) {
return;
}
if (this.i) {
if (this.k == null) {
this.k = new StringBuilder(str.length());
}
sb = this.k;
} else if (!this.l) {
if (this.d instanceof k.ax) {
z(str);
return;
}
return;
} else {
if (this.m == null) {
this.m = new StringBuilder(str.length());
}
sb = this.m;
}
sb.append(str);
}
private void y(Attributes attributes) throws com.deepe.c.c.a.e {
a("<textPath>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.ay ayVar = new k.ay();
ayVar.u = this.c;
ayVar.v = this.d;
a((k.ak) ayVar, attributes);
b(ayVar, attributes);
a((k.af) ayVar, attributes);
a(ayVar, attributes);
this.d.a(ayVar);
this.d = ayVar;
ayVar.a(ayVar.v instanceof k.ba ? (k.ba) ayVar.v : ((k.aw) ayVar.v).h());
}
private void z(String str) throws com.deepe.c.c.a.e {
k.ag agVar = (k.ag) this.d;
int size = agVar.b().size();
k.am amVar = size == 0 ? null : agVar.b().get(size - 1);
if (!(amVar instanceof k.bb)) {
this.d.a(new k.bb(str));
return;
}
k.bb bbVar = (k.bb) amVar;
bbVar.a = String.valueOf(bbVar.a) + str;
}
private void z(Attributes attributes) throws com.deepe.c.c.a.e {
a("<pattern>", new Object[0]);
if (this.d == null) {
throw new com.deepe.c.c.a.e("Invalid document. Root element must be <svg>");
}
k.y yVar = new k.y();
yVar.u = this.c;
yVar.v = this.d;
a((k.ak) yVar, attributes);
b(yVar, attributes);
a((k.af) yVar, attributes);
a((k.aq) yVar, attributes);
a(yVar, attributes);
this.d.a(yVar);
this.d = yVar;
}
@Override
public k a(InputStream inputStream) throws com.deepe.c.c.a.e {
if (!inputStream.markSupported()) {
inputStream = new BufferedInputStream(inputStream);
}
try {
inputStream.mark(3);
int read = inputStream.read() + (inputStream.read() << 8);
inputStream.reset();
if (read == 35615) {
inputStream = new BufferedInputStream(new GZIPInputStream(inputStream));
}
} catch (IOException unused) {
}
try {
try {
if (a) {
a("Forcing SAX parser for this version of Android", new Object[0]);
c(inputStream);
k kVar = this.c;
try {
inputStream.close();
} catch (IOException unused2) {
l.b("Exception thrown closing input stream");
}
return kVar;
}
if (this.e) {
inputStream.mark(4096);
byte[] bArr = new byte[4096];
String str = new String(bArr, 0, inputStream.read(bArr));
inputStream.reset();
if (str.contains("<!ENTITY ")) {
a("Switching to SAX parser to process entities", new Object[0]);
c(inputStream);
k kVar2 = this.c;
try {
inputStream.close();
} catch (IOException unused3) {
l.b("Exception thrown closing input stream");
}
return kVar2;
}
}
b(inputStream);
k kVar3 = this.c;
try {
inputStream.close();
} catch (IOException unused4) {
l.b("Exception thrown closing input stream");
}
return kVar3;
} catch (Throwable th) {
try {
inputStream.close();
} catch (IOException unused5) {
l.b("Exception thrown closing input stream");
}
throw th;
}
} catch (IOException e2) {
l.a("Error occurred while performing check for entities. File may not be parsed correctly if it contains entity definitions.", e2);
b(inputStream);
k kVar4 = this.c;
try {
inputStream.close();
} catch (IOException unused6) {
l.b("Exception thrown closing input stream");
}
return kVar4;
}
}
@Override
public m a(com.deepe.c.c.a.d dVar) {
this.f = dVar;
return this;
}
public m a(boolean z) {
this.e = z;
return this;
}
}