import java.util.*;
import java.util.zip.*;
import java.util.List;
import java.util.regex.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.table.*;
import java.io.*;
import java.net.*;
import java.lang.reflect.*;
import java.lang.ref.*;
import java.lang.management.*;
import java.security.*;
import java.security.spec.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.imageio.*;
import java.math.*;
import x30_pkg.x30_util;
import static x30_pkg.x30_util.l;
import static x30_pkg.x30_util.empty;
import static x30_pkg.x30_util.nempty;
import static x30_pkg.x30_util.fail;
import static x30_pkg.x30_util.indexOf;
import static x30_pkg.x30_util.getOpt;
import static x30_pkg.x30_util.newWeakHashMap;
import static x30_pkg.x30_util.newDangerousWeakHashMap;
import static x30_pkg.x30_util.get;
import static x30_pkg.x30_util.assertTrue;
import static x30_pkg.x30_util.isHeadless;
import static x30_pkg.x30_util.isAndroid;
import static x30_pkg.x30_util.isTrue;
import loadableUtils.utils;
import static loadableUtils.utils.print_byThread;
import static loadableUtils.utils._threadInfo;
import static loadableUtils.utils._threadInheritInfo;
import static loadableUtils.utils.dm_currentModule;
import static loadableUtils.utils.dm_current_mandatory;
import loadableUtils.utils.DynModule;
import loadableUtils.utils.DynPrintLog;
import loadableUtils.utils.DynObjectTable;
import javax.net.ssl.*;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.awt.datatransfer.StringSelection;
public class main {
public static A callF(Object f, Object... args) {
try {
if (f instanceof String)
return (A) callMC((String) f, args);
return (A) x30_util.callF(f, args);
} catch (Exception __e) {
throw rethrow(__e);
}
}
public static Object callMC(String method, Object... args) {
return call(mc(), method, args);
}
public static Object call(Object o) {
return callF(o);
}
public static A call(Object o, String method, Object... args) {
return x30_util.call(o, method, args);
}
public static void _onLoad_initUtils() {
utils.__javax = javax();
}
public static class Definition {
public static String _fieldOrder = "word definition";
public String word;
public String definition;
public Definition() {
}
public Definition(String word, String definition) {
this.definition = definition;
this.word = word;
}
public String toString() {
return "Definition(" + word + ", " + definition + ")";
}
public boolean equals(Object o) {
if (!(o instanceof Definition))
return false;
Definition x = (Definition) (o);
return eq(word, x.word) && eq(definition, x.definition);
}
public int hashCode() {
int h = 979046771;
h = h * 2 + _hashCode(word);
h = h * 2 + _hashCode(definition);
return h;
}
}
public static boolean _moduleClass_DefinitionsByVoice;
public static class DefinitionsByVoice extends DynObjectTable {
public boolean voiceMode;
public JComponent visualize() {
return withRightAlignedButtons(super.visualize(), dm_fieldCheckBox("voiceMode"));
}
public void start() {
super.start();
dm_useLocalMechListCopies();
dontPersist();
fieldsInOrder = true;
dm_onTopInput(new VF1() {
public void get(final String s) {
try {
reactTo(s);
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "reactTo(s)";
}
});
reactTo(dm_getTopInput());
}
public void _search(final String s) {
boolean wasEmpty = count() == 0;
List l = map(new F1() {
public Definition get(String def) {
try {
return new Definition(s, def);
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "Definition(s, def)";
}
}, dm_getDefinitions(s));
if (empty(l))
return;
addAll(l);
vmBus_send(wasEmpty ? "firstResults" : "moreResults", this);
if (voiceMode && wasEmpty)
dm_say(first(l).definition);
}
public void reactTo(final String s) {
AutoCloseable __4 = enter();
try {
q().add(new Runnable() {
public void run() {
try {
clear();
_search(s);
Matches m = new Matches();
for (String x : matchX_any_allRests(mL("Query Definition Patterns"), s)) _search(x);
if (nempty(data))
dm_showModule_noFocus();
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "clear();\r\n _search(s);\r\n new Matches m;\r\n for (String x : matchX_any...";
}
});
} finally {
_close(__4);
}
}
}
public static String programID() {
return getProgramID();
}
public static String programID(Object o) {
return getProgramID(o);
}
public static volatile StringBuffer local_log = new StringBuffer();
public static volatile Appendable print_log = local_log;
public static volatile int print_log_max = 1024 * 1024;
public static volatile int local_log_max = 100 * 1024;
public static boolean print_silent;
public static Object print_byThread_lock = new Object();
public static volatile ThreadLocal