.class Lcom/moji/lottie/ShapeStroke$Factory;
.super Ljava/lang/Object;
.source "ShapeStroke.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/lottie/ShapeStroke;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "Factory"
.end annotation


# direct methods
.method private constructor <init>()V
    .locals 0

    .line 74
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/ShapeStroke;
    .locals 14

    const-string v0, "nm"

    .line 78
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 79
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    const-string v0, "c"

    .line 80
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    invoke-static {v0, p1}, Lcom/moji/lottie/AnimatableColorValue$Factory;->a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/AnimatableColorValue;

    move-result-object v5

    const-string v0, "w"

    .line 82
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    invoke-static {v0, p1}, Lcom/moji/lottie/AnimatableFloatValue$Factory;->a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/AnimatableFloatValue;

    move-result-object v7

    const-string v0, "o"

    .line 85
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 84
    invoke-static {v0, p1}, Lcom/moji/lottie/AnimatableIntegerValue$Factory;->a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/AnimatableIntegerValue;

    move-result-object v6

    .line 86
    invoke-static {}, Lcom/moji/lottie/ShapeStroke$LineCapType;->values()[Lcom/moji/lottie/ShapeStroke$LineCapType;

    move-result-object v0

    const-string v1, "lc"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    const/4 v3, 0x1

    sub-int/2addr v1, v3

    aget-object v8, v0, v1

    .line 87
    invoke-static {}, Lcom/moji/lottie/ShapeStroke$LineJoinType;->values()[Lcom/moji/lottie/ShapeStroke$LineJoinType;

    move-result-object v0

    const-string v1, "lj"

    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v1

    sub-int/2addr v1, v3

    aget-object v9, v0, v1

    const-string v0, "d"

    .line 90
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_5

    const-string v0, "d"

    .line 91
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p0

    const/4 v0, 0x0

    move-object v10, v1

    const/4 v1, 0x0

    .line 92
    :goto_0
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-ge v1, v11, :cond_3

    .line 93
    invoke-virtual {p0, v1}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "n"

    .line 94
    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    const-string v13, "o"

    .line 95
    invoke-virtual {v12, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v13

    if-eqz v13, :cond_0

    const-string v10, "v"

    .line 96
    invoke-virtual {v11, v10}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v10

    .line 97
    invoke-static {v10, p1}, Lcom/moji/lottie/AnimatableFloatValue$Factory;->a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/AnimatableFloatValue;

    move-result-object v10

    goto :goto_1

    :cond_0
    const-string v13, "d"

    .line 98
    invoke-virtual {v12, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v13

    if-nez v13, :cond_1

    const-string v13, "g"

    invoke-virtual {v12, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v12

    if-eqz v12, :cond_2

    :cond_1
    const-string v12, "v"

    .line 99
    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v11

    .line 100
    invoke-static {v11, p1}, Lcom/moji/lottie/AnimatableFloatValue$Factory;->a(Lorg/json/JSONObject;Lcom/moji/lottie/LottieComposition;)Lcom/moji/lottie/AnimatableFloatValue;

    move-result-object v11

    invoke-interface {v4, v11}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_2
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 103
    :cond_3
    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result p0

    if-ne p0, v3, :cond_4

    .line 105
    invoke-interface {v4, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    invoke-interface {v4, p0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_4
    move-object v3, v10

    goto :goto_2

    :cond_5
    move-object v3, v1

    .line 108
    :goto_2
    new-instance p0, Lcom/moji/lottie/ShapeStroke;

    const/4 v10, 0x0

    move-object v1, p0

    invoke-direct/range {v1 .. v10}, Lcom/moji/lottie/ShapeStroke;-><init>(Ljava/lang/String;Lcom/moji/lottie/AnimatableFloatValue;Ljava/util/List;Lcom/moji/lottie/AnimatableColorValue;Lcom/moji/lottie/AnimatableIntegerValue;Lcom/moji/lottie/AnimatableFloatValue;Lcom/moji/lottie/ShapeStroke$LineCapType;Lcom/moji/lottie/ShapeStroke$LineJoinType;Lcom/moji/lottie/ShapeStroke$1;)V

    return-object p0
.end method
