apkfuckery/com.discord/smali_classes2/w/a0/j.smali
2020-02-20 20:33:18 +01:00

324 lines
6.4 KiB
Smali

.class public Lw/a0/j;
.super Ljava/lang/Object;
.source "Indent.kt"
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static final a(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Lkotlin/jvm/functions/Function1<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;"
}
.end annotation
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
sget-object p0, Lw/a0/j$a;->d:Lw/a0/j$a;
goto :goto_1
:cond_1
new-instance v0, Lw/a0/j$b;
invoke-direct {v0, p0}, Lw/a0/j$b;-><init>(Ljava/lang/String;)V
move-object p0, v0
:goto_1
return-object p0
.end method
.method public static synthetic trimMargin$default(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
.locals 13
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
const-string p1, "|"
:cond_0
const/4 p2, 0x0
if-eqz p0, :cond_d
const-string v0, "marginPrefix"
if-eqz p1, :cond_c
const-string v1, ""
const-string v2, "$this$replaceIndentByMargin"
invoke-static {p0, v2}, Lw/u/b/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v2, "newIndent"
invoke-static {v1, v2}, Lw/u/b/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1, v0}, Lw/u/b/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1}, Lw/a0/n;->isBlank(Ljava/lang/CharSequence;)Z
move-result v0
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_b
invoke-static {p0}, Lw/a0/s;->lines(Ljava/lang/CharSequence;)Ljava/util/List;
move-result-object v0
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result p0
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v2
const/4 v3, 0x0
mul-int/lit8 v2, v2, 0x0
add-int/2addr v2, p0
invoke-static {v1}, Lw/a0/j;->a(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
move-result-object p0
invoke-static {v0}, Le/k/a/c/e/p/g;->getLastIndex(Ljava/util/List;)I
move-result v1
new-instance v4, Ljava/util/ArrayList;
invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v5, 0x0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v6
if-eqz v6, :cond_a
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
add-int/lit8 v7, v5, 0x1
if-ltz v5, :cond_9
check-cast v6, Ljava/lang/String;
if-eqz v5, :cond_1
if-ne v5, v1, :cond_2
:cond_1
invoke-static {v6}, Lw/a0/n;->isBlank(Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_2
move-object v5, p2
goto :goto_5
:cond_2
invoke-interface {v6}, Ljava/lang/CharSequence;->length()I
move-result v5
const/4 v8, 0x0
:goto_1
const/4 v9, -0x1
if-ge v8, v5, :cond_4
invoke-interface {v6, v8}, Ljava/lang/CharSequence;->charAt(I)C
move-result v10
invoke-static {v10}, Le/k/a/c/e/p/g;->isWhitespace(C)Z
move-result v10
xor-int/lit8 v10, v10, 0x1
if-eqz v10, :cond_3
goto :goto_2
:cond_3
add-int/lit8 v8, v8, 0x1
goto :goto_1
:cond_4
const/4 v8, -0x1
:goto_2
if-ne v8, v9, :cond_5
goto :goto_3
:cond_5
const/4 v5, 0x4
invoke-static {v6, p1, v8, v3, v5}, Lw/a0/n;->startsWith$default(Ljava/lang/String;Ljava/lang/String;IZI)Z
move-result v5
if-eqz v5, :cond_6
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v5
add-int/2addr v5, v8
invoke-virtual {v6, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v5
const-string v8, "(this as java.lang.String).substring(startIndex)"
invoke-static {v5, v8}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_4
:cond_6
:goto_3
move-object v5, p2
:goto_4
if-eqz v5, :cond_7
invoke-interface {p0, v5}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/lang/String;
if-eqz v5, :cond_7
goto :goto_5
:cond_7
move-object v5, v6
:goto_5
if-eqz v5, :cond_8
invoke-interface {v4, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
:cond_8
move v5, v7
goto :goto_0
:cond_9
invoke-static {}, Le/k/a/c/e/p/g;->throwIndexOverflow()V
throw p2
:cond_a
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5, v2}, Ljava/lang/StringBuilder;-><init>(I)V
const/4 v7, 0x0
const/4 v8, 0x0
const/4 v9, 0x0
const/4 v10, 0x0
const/4 v11, 0x0
const/16 v12, 0x7c
const-string v6, "\n"
invoke-static/range {v4 .. v12}, Lw/q/l;->joinTo$default(Ljava/lang/Iterable;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;I)Ljava/lang/Appendable;
move-result-object p0
check-cast p0, Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string p1, "mapIndexedNotNull { inde\u2026\"\\n\")\n .toString()"
invoke-static {p0, p1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
:cond_b
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "marginPrefix must be non-blank string."
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_c
invoke-static {v0}, Lw/u/b/j;->a(Ljava/lang/String;)V
throw p2
:cond_d
const-string p0, "$this$trimMargin"
invoke-static {p0}, Lw/u/b/j;->a(Ljava/lang/String;)V
throw p2
.end method