正在查看: Tasker v6.5.11 应用的 RegexHelper.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.5.11 应用的 RegexHelper.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.joaomgcd.taskerm.pattern;
import android.app.Activity;
import androidx.annotation.Keep;
import com.joaomgcd.taskerm.util.ExtensionsContextKt;
import com.joaomgcd.taskerm.util.x2;
import com.joaomgcd.taskerm.util.z2;
import hk.o;
import java.util.List;
import ji.r;
import pg.w0;
import we.l0;
import we.x;
import xj.l;
import xj.p;
import yj.j0;
import yj.q;
public final class RegexHelper {
private final Activity a;
@Keep
private static final class RepeatTypes {
private static final rj.a $ENTRIES;
private static final RepeatTypes[] $VALUES;
private final p<Activity, String, String> get;
private final int titleResId;
public static final RepeatTypes None = new RepeatTypes("None", 0, 2131891208, a.i);
public static final RepeatTypes ZeroOrMore = new RepeatTypes("ZeroOrMore", 1, 2131891307, b.i);
public static final RepeatTypes OneOrMore = new RepeatTypes("OneOrMore", 2, 2131889303, c.i);
public static final RepeatTypes ExactNumber = new RepeatTypes("ExactNumber", 3, 2131887750, d.i);
public static final RepeatTypes Minimum = new RepeatTypes("Minimum", 4, 2131888732, e.i);
public static final RepeatTypes Maximum = new RepeatTypes("Maximum", 5, 2131888710, f.i);
public static final RepeatTypes MinAndMax = new RepeatTypes("MinAndMax", 6, 2131886788, g.i);
static final class a extends q implements p<Activity, String, String> {
public static final a i = new a();
a() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
yj.p.i(activity, "<anonymous parameter 0>");
yj.p.i(str, "<anonymous parameter 1>");
return "";
}
}
static final class b extends q implements p<Activity, String, String> {
public static final b i = new b();
b() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
yj.p.i(activity, "<anonymous parameter 0>");
yj.p.i(str, "<anonymous parameter 1>");
return "*";
}
}
static final class c extends q implements p<Activity, String, String> {
public static final c i = new c();
c() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
yj.p.i(activity, "<anonymous parameter 0>");
yj.p.i(str, "<anonymous parameter 1>");
return "+";
}
}
static final class d extends q implements p<Activity, String, String> {
public static final d i = new d();
d() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
String c;
yj.p.i(activity, "activity");
yj.p.i(str, "toRepeat");
c = com.joaomgcd.taskerm.pattern.b.c(activity, str, 2131888240);
return "{" + c + "}";
}
}
static final class e extends q implements p<Activity, String, String> {
public static final e i = new e();
e() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
String c;
yj.p.i(activity, "activity");
yj.p.i(str, "toRepeat");
c = com.joaomgcd.taskerm.pattern.b.c(activity, str, 2131888242);
return "{" + c + ",}";
}
}
static final class f extends q implements p<Activity, String, String> {
public static final f i = new f();
f() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
String c;
yj.p.i(activity, "activity");
yj.p.i(str, "toRepeat");
c = com.joaomgcd.taskerm.pattern.b.c(activity, str, 2131888241);
return "{1," + c + "}";
}
}
static final class g extends q implements p<Activity, String, String> {
public static final g i = new g();
g() {
super(2);
}
@Override
public final String l(Activity activity, String str) {
String c;
String c2;
yj.p.i(activity, "activity");
yj.p.i(str, "toRepeat");
c = com.joaomgcd.taskerm.pattern.b.c(activity, str, 2131888242);
c2 = com.joaomgcd.taskerm.pattern.b.c(activity, str, 2131888241);
return "{" + c + "," + c2 + "}";
}
}
private static final RepeatTypes[] $values() {
return new RepeatTypes[]{None, ZeroOrMore, OneOrMore, ExactNumber, Minimum, Maximum, MinAndMax};
}
static {
RepeatTypes[] $values = $values();
$VALUES = $values;
$ENTRIES = rj.b.a($values);
}
private RepeatTypes(String str, int i, int i2, p pVar) {
this.titleResId = i2;
this.get = pVar;
}
public static rj.a<RepeatTypes> getEntries() {
return $ENTRIES;
}
public static RepeatTypes valueOf(String str) {
return (RepeatTypes) Enum.valueOf(RepeatTypes.class, str);
}
public static RepeatTypes[] values() {
return (RepeatTypes[]) $VALUES.clone();
}
public final p<Activity, String, String> getGet() {
return this.get;
}
public final int getTitleResId() {
return this.titleResId;
}
}
static final class a extends q implements l<HelpTypes, Boolean> {
public static final a i = new a();
a() {
super(1);
}
@Override
public final Boolean invoke(HelpTypes helpTypes) {
yj.p.i(helpTypes, "it");
return Boolean.TRUE;
}
}
static final class b extends q implements l<HelpTypes, String> {
b() {
super(1);
}
@Override
public final String invoke(HelpTypes helpTypes) {
yj.p.i(helpTypes, "it");
return x2.Q4(helpTypes.getTitleResId(), RegexHelper.this.b(), new Object[0]);
}
}
static final class c extends q implements xj.a<String> {
c() {
super(0);
}
@Override
public final String invoke() {
if (!((l0) com.joaomgcd.taskerm.dialog.a.v1(RegexHelper.this.b(), 2131888915, 2131890797, 2131888370, 0, (String) null, 48, (Object) null).f()).k() || jg.c.t(RegexHelper.this.b(), x2.H4(2131890797, RegexHelper.this.b()), null, 2, null)) {
return RegexHelper.this.g();
}
ExtensionsContextKt.q(RegexHelper.this.b(), "https://www.regular-expressions.info/tutorial.html", false, false, false, 14, null);
return "";
}
}
static final class d extends q implements xj.a<String> {
final String i;
final j0<String> q;
d(String str, j0<String> j0Var) {
super(0);
this.i = str;
this.q = j0Var;
}
@Override
public final String invoke() {
return o.C(this.i, "AJIKJI!)(/){{][€]", this.q.i, false, 4, null);
}
}
static final class e extends q implements l<HelpTypes, Boolean> {
public static final e i = new e();
e() {
super(1);
}
@Override
public final Boolean invoke(HelpTypes helpTypes) {
yj.p.i(helpTypes, "it");
return Boolean.valueOf(!helpTypes.isGroup());
}
}
static final class f extends q implements l<RepeatTypes, String> {
f() {
super(1);
}
@Override
public final String invoke(RepeatTypes repeatTypes) {
yj.p.i(repeatTypes, "it");
return x2.Q4(repeatTypes.getTitleResId(), RegexHelper.this.b(), new Object[0]);
}
}
public static final class g extends q implements l<RepeatTypes, Boolean> {
public static final g i = new g();
public g() {
super(1);
}
@Override
public final Boolean invoke(RepeatTypes repeatTypes) {
yj.p.i(repeatTypes, "it");
return Boolean.TRUE;
}
}
public RegexHelper(Activity activity) {
yj.p.i(activity, "activity");
this.a = activity;
}
private final String c(String str) {
Activity activity = this.a;
String l = ((RepeatTypes) x.G(activity, x2.Q4(2131890216, activity, new Object[0]) + " " + str, RepeatTypes.class, new f(), g.i).f()).getGet().l(this.a, str);
if (l == null) {
l = "";
}
return str + l;
}
private final HelpTypes d(String str, String str2, l<? super HelpTypes, Boolean> lVar) {
Activity activity = this.a;
if (str != null) {
String str3 = str2 + ": " + str;
if (str3 != null) {
str2 = str3;
}
}
return (HelpTypes) x.G(activity, str2, HelpTypes.class, new b(), lVar).f();
}
static HelpTypes e(RegexHelper regexHelper, String str, String str2, l lVar, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
if ((i & 2) != 0) {
str2 = x2.Q4(2131888915, regexHelper.a, new Object[0]);
}
if ((i & 4) != 0) {
lVar = a.i;
}
return regexHelper.d(str, str2, lVar);
}
public final String g() {
String c2;
HelpTypes e2 = e(this, null, null, null, 7, null);
if (!e2.isGroup()) {
String invoke = e2.getGet().invoke(this.a);
return (invoke == null || (c2 = c(invoke)) == null) ? "" : c2;
}
j0 j0Var = new j0();
j0Var.i = "";
String invoke2 = e2.getGet().invoke(this.a);
if (invoke2 == null) {
throw new RuntimeException("No value for group");
}
d dVar = new d(invoke2, j0Var);
String Q4 = x2.Q4(2131886177, this.a, new Object[0]);
j0Var.i = h(dVar.invoke(), Q4);
while (true) {
Activity activity = this.a;
if (!((l0) com.joaomgcd.taskerm.dialog.a.u3(activity, 2131888158, x2.Q4(2131886174, activity, new Object[0]) + " " + ((Object) dVar.invoke()), 0, 8, (Object) null).f()).o()) {
return c(dVar.invoke());
}
j0Var.i = j0Var.i + h(dVar.invoke(), Q4);
}
}
private final String h(String str, String str2) {
String c2;
String invoke = d(str, str2, e.i).getGet().invoke(this.a);
return (invoke == null || (c2 = c(invoke)) == null) ? "" : c2;
}
public final Activity b() {
return this.a;
}
public final r<String> f() {
return w0.K0(new c());
}
@Keep
private static final class HelpTypes {
private static final rj.a $ENTRIES;
private static final HelpTypes[] $VALUES;
public static final HelpTypes AnyOfCharacters;
public static final HelpTypes Digit;
public static final HelpTypes NoneOfCharacters;
public static final HelpTypes NotWord;
public static final HelpTypes WhiteSpace;
private final l<Activity, String> get;
private final boolean isGroup;
private final int titleResId;
public static final HelpTypes NamedGroup = new HelpTypes("NamedGroup", 0, 2131889217, a.i, true);
public static final HelpTypes Group = new HelpTypes("Group", 1, 2131888158, b.i, true);
public static final HelpTypes Word = new HelpTypes("Word", 2, 2131891138, c.i, false, 4, null);
static final class a extends q implements l<Activity, String> {
public static final a i = new a();
a() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "activity");
Object f = com.joaomgcd.taskerm.dialog.a.t0(activity, 2131889217, 2131888316, (com.joaomgcd.taskerm.util.q) null, (Integer) null, (Integer) null, (List) null, 120, (Object) null).f();
yj.p.h(f, "blockingGet(...)");
return "(?<" + z2.R((String) f) + ">AJIKJI!)(/){{][€])";
}
}
static final class b extends q implements l<Activity, String> {
public static final b i = new b();
b() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "(AJIKJI!)(/){{][€])";
}
}
static final class c extends q implements l<Activity, String> {
public static final c i = new c();
c() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "\\w";
}
}
static final class d extends q implements l<Activity, String> {
public static final d i = new d();
d() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "\\W";
}
}
static final class e extends q implements l<Activity, String> {
public static final e i = new e();
e() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "\\s";
}
}
static final class f extends q implements l<Activity, String> {
public static final f i = new f();
f() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "[" + ((String) com.joaomgcd.taskerm.dialog.a.t0(activity, 2131886658, 2131891093, (com.joaomgcd.taskerm.util.q) null, (Integer) null, (Integer) null, (List) null, 120, (Object) null).f()) + "]";
}
}
static final class g extends q implements l<Activity, String> {
public static final g i = new g();
g() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "[^" + ((String) com.joaomgcd.taskerm.dialog.a.t0(activity, 2131889263, 2131891094, (com.joaomgcd.taskerm.util.q) null, (Integer) null, (Integer) null, (List) null, 120, (Object) null).f()) + "]";
}
}
static final class h extends q implements l<Activity, String> {
public static final h i = new h();
h() {
super(1);
}
@Override
public final String invoke(Activity activity) {
yj.p.i(activity, "it");
return "\\d";
}
}
private static final HelpTypes[] $values() {
return new HelpTypes[]{NamedGroup, Group, Word, NotWord, WhiteSpace, AnyOfCharacters, NoneOfCharacters, Digit};
}
static {
int i = 4;
yj.h hVar = null;
boolean z = false;
NotWord = new HelpTypes("NotWord", 3, 2131889270, d.i, z, i, hVar);
int i2 = 4;
yj.h hVar2 = null;
boolean z2 = false;
WhiteSpace = new HelpTypes("WhiteSpace", 4, 2131891096, e.i, z2, i2, hVar2);
AnyOfCharacters = new HelpTypes("AnyOfCharacters", 5, 2131886658, f.i, z, i, hVar);
NoneOfCharacters = new HelpTypes("NoneOfCharacters", 6, 2131889263, g.i, z2, i2, hVar2);
Digit = new HelpTypes("Digit", 7, 2131887426, h.i, z, i, hVar);
HelpTypes[] $values = $values();
$VALUES = $values;
$ENTRIES = rj.b.a($values);
}
private HelpTypes(String str, int i, int i2, l lVar, boolean z) {
this.titleResId = i2;
this.get = lVar;
this.isGroup = z;
}
public static rj.a<HelpTypes> getEntries() {
return $ENTRIES;
}
public static HelpTypes valueOf(String str) {
return (HelpTypes) Enum.valueOf(HelpTypes.class, str);
}
public static HelpTypes[] values() {
return (HelpTypes[]) $VALUES.clone();
}
public final l<Activity, String> getGet() {
return this.get;
}
public final int getTitleResId() {
return this.titleResId;
}
public final boolean isGroup() {
return this.isGroup;
}
HelpTypes(String str, int i, int i2, l lVar, boolean z, int i3, yj.h hVar) {
this(str, i, i2, lVar, (i3 & 4) != 0 ? false : z);
}
}
}