discord-jadx/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventDescript...

56 lines
2.5 KiB
Java

package com.discord.widgets.guildscheduledevent;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.simpleast.core.node.Node;
import com.discord.simpleast.core.parser.Parser;
import com.discord.utilities.textprocessing.MessageParseState;
import com.discord.utilities.textprocessing.MessagePreprocessor;
import com.discord.utilities.textprocessing.MessageRenderContext;
import d0.g;
import d0.z.d.m;
import java.util.List;
import java.util.Set;
import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildScheduledEventDescriptionParser.kt */
public final class GuildScheduledEventDescriptionParser {
public static final Companion Companion = new Companion(null);
private static final Lazy INSTANCE$delegate = g.lazy(GuildScheduledEventDescriptionParser$Companion$INSTANCE$2.INSTANCE);
private final Lazy descriptionParser$delegate = g.lazy(GuildScheduledEventDescriptionParser$descriptionParser$2.INSTANCE);
/* compiled from: GuildScheduledEventDescriptionParser.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final GuildScheduledEventDescriptionParser getINSTANCE() {
Lazy access$getINSTANCE$cp = GuildScheduledEventDescriptionParser.access$getINSTANCE$cp();
Companion companion = GuildScheduledEventDescriptionParser.Companion;
return (GuildScheduledEventDescriptionParser) access$getINSTANCE$cp.getValue();
}
}
public static final /* synthetic */ Lazy access$getINSTANCE$cp() {
return INSTANCE$delegate;
}
private final Parser<MessageRenderContext, Node<MessageRenderContext>, MessageParseState> getDescriptionParser() {
return (Parser) this.descriptionParser$delegate.getValue();
}
public final List<Node<MessageRenderContext>> parse(String str) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION);
return Parser.parse$default(getDescriptionParser(), str, MessageParseState.Companion.getInitialState(), null, 4, null);
}
public final void updateAstForSpoiler(List<Node<MessageRenderContext>> list, Set<Integer> set) {
m.checkNotNullParameter(list, "ast");
m.checkNotNullParameter(set, "visibleSpoilerNodeIndices");
new MessagePreprocessor(-1, set, null, false, null, 28, null).process(list);
}
}