Skip to content

Instantly share code, notes, and snippets.

(function () {
function setReactInput(input, val) {
var setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set;
setter.call(input, val);
input.dispatchEvent(new Event("input", { bubbles: true }));
}
// ── Read sources ───────────────────────────────────────────────────────────
(function () {
// ── Helpers ────────────────────────────────────────────────────────────────
function randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function setReactInput(input, val) {
var setter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set;
(function () {
// ── Lookup tables ──────────────────────────────────────────────────────────
var ODD = {
0:1, 1:0, 2:5, 3:7, 4:9, 5:13, 6:15, 7:17, 8:19, 9:21,
A:1, B:0, C:5, D:7, E:9, F:13, G:15, H:17, I:19, J:21,
K:2, L:4, M:18, N:20, O:11, P:3, Q:6, R:8, S:12, T:14,
U:16, V:10, W:22, X:25, Y:24, Z:23
};