/**
* @license
For license information please see main.js.LICENSE.txt */
'use strict';
var _createClass = function() {
function defineProperties(target, props) {
var i = 0;
for (; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) {
descriptor.writable = true;
}
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
if (protoProps) {
defineProperties(Constructor.prototype, protoProps);
}
if (staticProps) {
defineProperties(Constructor, staticProps);
}
return Constructor;
};
}();
var _slicedToArray = function() {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
var _i = arr[Symbol.iterator]();
var _s;
for (; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) {
break;
}
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) {
_i["return"]();
}
} finally {
if (_d) {
throw _e;
}
}
}
return _arr;
}
return function(arr, i) {
if (Array.isArray(arr)) {
return arr;
} else {
if (Symbol.iterator in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
}
};
}();
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor : {
value : subClass,
enumerable : false,
writable : true,
configurable : true
}
});
if (superClass) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(subClass, superClass);
} else {
subClass.__proto__ = superClass;
}
}
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _toConsumableArray(arr) {
if (Array.isArray(arr)) {
var i = 0;
var arr2 = Array(arr.length);
for (; i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return Array.from(arr);
}
}
(function() {
function r(n) {
if (t[n]) {
return t[n].exports;
}
var module = t[n] = {
exports : {}
};
return thumbOpt[n].call(module.exports, module, module.exports, r), module.exports;
}
var thumbOpt = {
826 : function execute(module) {
!function(canCreateDiscussions) {
function callback(value) {
return parseInt(value) === value;
}
function push(e) {
if (!callback(e.length)) {
return false;
}
var i = 0;
for (; i < e.length; i++) {
if (!callback(e[i]) || e[i] < 0 || e[i] > 255) {
return false;
}
}
return true;
}
function coerceArray(arg, copy) {
if (arg.buffer && "Uint8Array" === arg.name) {
return copy && (arg = arg.slice ? arg.slice() : Array.prototype.slice.call(arg)), arg;
}
if (Array.isArray(arg)) {
if (!push(arg)) {
throw new Error("Array contains invalid value: " + arg);
}
return new Uint8Array(arg);
}
if (callback(arg.length) && push(arg)) {
return new Uint8Array(arg);
}
throw new Error("unsupported array-like object");
}
function createArray(length) {
return new Uint8Array(length);
}
function copyArray(str, src, x, start, end) {
if (!(null == start && null == end)) {
str = str.slice ? str.slice(start, end) : Array.prototype.slice.call(str, start, end);
}
src.set(str, x);
}
function convertToInt32(bytes) {
var result = [];
var i = 0;
for (; i < bytes.length; i = i + 4) {
result.push(bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]);
}
return result;
}
var buffer;
var toUnicode = {
toBytes : function toBytes(text) {
var keys = [];
var i = 0;
text = encodeURI(text);
for (; i < text.length;) {
var keySection = text.charCodeAt(i++);
if (37 === keySection) {
keys.push(parseInt(text.substr(i, 2), 16));
i = i + 2;
} else {
keys.push(keySection);
}
}
return coerceArray(keys);
},
fromBytes : function fromBytes(data) {
var UNICODE_SPACES = [];
var index = 0;
for (; index < data.length;) {
var i = data[index];
if (i < 128) {
UNICODE_SPACES.push(String.fromCharCode(i));
index++;
} else {
if (i > 191 && i < 224) {
UNICODE_SPACES.push(String.fromCharCode((31 & i) << 6 | 63 & data[index + 1]));
index = index + 2;
} else {
UNICODE_SPACES.push(String.fromCharCode((15 & i) << 12 | (63 & data[index + 1]) << 6 | 63 & data[index + 2]));
index = index + 3;
}
}
}
return UNICODE_SPACES.join("");
}
};
var original = (buffer = "0123456789abcdef", {
toBytes : function toBytes(s) {
var bytes = [];
var i = 0;
for (; i < s.length; i = i + 2) {
bytes.push(parseInt(s.substr(i, 2), 16));
}
return bytes;
},
fromBytes : function fromBytes(bytes) {
var outChance = [];
var i = 0;
for (; i < bytes.length; i++) {
var v = bytes[i];
outChance.push(buffer[(240 & v) >> 4] + buffer[15 & v]);
}
return outChance.join("");
}
});
var numberOfRounds = {
16 : 10,
24 : 12,
32 : 14
};
var vehiclesIndex = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];
var Si = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249,
2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246,
14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];
var S = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247,
228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181,
74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];
var blockp = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740,
1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436,
1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450,
4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085,
3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956,
3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068,
1841019862, 739644986];
var decblock = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980,
4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861,
1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895,
251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516,
1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654,
3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008,
4238890068, 3597515707, 975967766];
var g = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220,
2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784,
4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003,
3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131,
2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478,
1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308,
3151392187, 372911126];
var C = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760,
2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704,
4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573,
3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021,
2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428,
1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848,
3149649517, 370555436];
var blocki = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880,
3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422,
1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465,
337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012,
1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980,
3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265,
3576870512, 1215061108, 3501741890];
var encblock = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410,
2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461,
3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840,
3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837,
223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085,
3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980,
1893020342, 1950903388, 1120974935];
var B = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415,
830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286,
2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150,
2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104,
3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910,
3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922,
1551124588, 1463996600];
var y = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389,
1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201,
3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284,
4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584,
1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860,
3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237,
1817998408, 3092726480];
var b = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904,
3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739,
1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751,
3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284,
3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436,
875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232,
2370213795];
var a = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534,
901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514,
1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296,
1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929,
3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696,
2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461,
2827177882, 2743944855];
var x = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754,
3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554,
2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571,
1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639,
81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632,
1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676,
2594734927, 2544078150];
var key = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439,
1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589,
3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026,
2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674,
2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766,
777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201,
1335535747, 1184342925];
var AES = function AES(key) {
if (!(this instanceof AES)) {
throw Error("AES must be instanitated with `new`");
}
Object.defineProperty(this, "key", {
value : coerceArray(key, true)
});
this._prepare();
};
AES.prototype._prepare = function() {
var rounds = numberOfRounds[this.key.length];
if (null == rounds) {
throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
}
this._Ke = [];
this._Kd = [];
var i = 0;
for (; i <= rounds; i++) {
this._Ke.push([0, 0, 0, 0]);
this._Kd.push([0, 0, 0, 0]);
}
var index;
var roundKeyCount = 4 * (rounds + 1);
var KC = this.key.length / 4;
var tk = convertToInt32(this.key);
i = 0;
for (; i < KC; i++) {
index = i >> 2;
this._Ke[index][i % 4] = tk[i];
this._Kd[rounds - index][i % 4] = tk[i];
}
var tt;
var vin = 0;
var t = KC;
for (; t < roundKeyCount;) {
if (tt = tk[KC - 1], tk[0] ^= Si[tt >> 16 & 255] << 24 ^ Si[tt >> 8 & 255] << 16 ^ Si[255 & tt] << 8 ^ Si[tt >> 24 & 255] ^ vehiclesIndex[vin] << 24, vin = vin + 1, 8 != KC) {
i = 1;
for (; i < KC; i++) {
tk[i] ^= tk[i - 1];
}
} else {
i = 1;
for (; i < KC / 2; i++) {
tk[i] ^= tk[i - 1];
}
tt = tk[KC / 2 - 1];
tk[KC / 2] ^= Si[255 & tt] ^ Si[tt >> 8 & 255] << 8 ^ Si[tt >> 16 & 255] << 16 ^ Si[tt >> 24 & 255] << 24;
i = KC / 2 + 1;
for (; i < KC; i++) {
tk[i] ^= tk[i - 1];
}
}
i = 0;
for (; i < KC && t < roundKeyCount;) {
r = t >> 2;
c = t % 4;
this._Ke[r][c] = tk[i];
this._Kd[rounds - r][c] = tk[i++];
t++;
}
}
var r = 1;
for (; r < rounds; r++) {
var c = 0;
for (; c < 4; c++) {
tt = this._Kd[r][c];
this._Kd[r][c] = b[tt >> 24 & 255] ^ a[tt >> 16 & 255] ^ x[tt >> 8 & 255] ^ key[255 & tt];
}
}
};
AES.prototype.encrypt = function(plaintext) {
if (16 != plaintext.length) {
throw new Error("invalid plaintext size (must be 16 bytes)");
}
var rounds = this._Ke.length - 1;
var readed_dataset = [0, 0, 0, 0];
var t = convertToInt32(plaintext);
var i = 0;
for (; i < 4; i++) {
t[i] ^= this._Ke[0][i];
}
var r = 1;
for (; r < rounds; r++) {
i = 0;
for (; i < 4; i++) {
readed_dataset[i] = blockp[t[i] >> 24 & 255] ^ decblock[t[(i + 1) % 4] >> 16 & 255] ^ g[t[(i + 2) % 4] >> 8 & 255] ^ C[255 & t[(i + 3) % 4]] ^ this._Ke[r][i];
}
t = readed_dataset.slice();
}
var tt;
var result = createArray(16);
i = 0;
for (; i < 4; i++) {
tt = this._Ke[rounds][i];
result[4 * i] = 255 & (Si[t[i] >> 24 & 255] ^ tt >> 24);
result[4 * i + 1] = 255 & (Si[t[(i + 1) % 4] >> 16 & 255] ^ tt >> 16);
result[4 * i + 2] = 255 & (Si[t[(i + 2) % 4] >> 8 & 255] ^ tt >> 8);
result[4 * i + 3] = 255 & (Si[255 & t[(i + 3) % 4]] ^ tt);
}
return result;
};
AES.prototype.decrypt = function(ciphertext) {
if (16 != ciphertext.length) {
throw new Error("invalid ciphertext size (must be 16 bytes)");
}
var rounds = this._Kd.length - 1;
var readed_dataset = [0, 0, 0, 0];
var t = convertToInt32(ciphertext);
var i = 0;
for (; i < 4; i++) {
t[i] ^= this._Kd[0][i];
}
var r = 1;
for (; r < rounds; r++) {
i = 0;
for (; i < 4; i++) {
readed_dataset[i] = blocki[t[i] >> 24 & 255] ^ encblock[t[(i + 3) % 4] >> 16 & 255] ^ B[t[(i + 2) % 4] >> 8 & 255] ^ y[255 & t[(i + 1) % 4]] ^ this._Kd[r][i];
}
t = readed_dataset.slice();
}
var tt;
var result = createArray(16);
i = 0;
for (; i < 4; i++) {
tt = this._Kd[rounds][i];
result[4 * i] = 255 & (S[t[i] >> 24 & 255] ^ tt >> 24);
result[4 * i + 1] = 255 & (S[t[(i + 3) % 4] >> 16 & 255] ^ tt >> 16);
result[4 * i + 2] = 255 & (S[t[(i + 2) % 4] >> 8 & 255] ^ tt >> 8);
result[4 * i + 3] = 255 & (S[255 & t[(i + 1) % 4]] ^ tt);
}
return result;
};
var ModeOfOperationECB = function ModeOfOperationECB(key) {
if (!(this instanceof ModeOfOperationECB)) {
throw Error("AES must be instanitated with `new`");
}
this.description = "Electronic Code Block";
this.name = "ecb";
this._aes = new AES(key);
};
ModeOfOperationECB.prototype.encrypt = function(plaintext) {
if ((plaintext = coerceArray(plaintext)).length % 16 != 0) {
throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
}
var result = createArray(plaintext.length);
var block = createArray(16);
var i = 0;
for (; i < plaintext.length; i = i + 16) {
copyArray(plaintext, block, 0, i, i + 16);
copyArray(block = this._aes.encrypt(block), result, i);
}
return result;
};
ModeOfOperationECB.prototype.decrypt = function(ciphertext) {
if ((ciphertext = coerceArray(ciphertext)).length % 16 != 0) {
throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
}
var result = createArray(ciphertext.length);
var block = createArray(16);
var i = 0;
for (; i < ciphertext.length; i = i + 16) {
copyArray(ciphertext, block, 0, i, i + 16);
copyArray(block = this._aes.decrypt(block), result, i);
}
return result;
};
var ModeOfOperationCBC = function ModeOfOperationCBC(key, iv) {
if (!(this instanceof ModeOfOperationCBC)) {
throw Error("AES must be instanitated with `new`");
}
if (this.description = "Cipher Block Chaining", this.name = "cbc", iv) {
if (16 != iv.length) {
throw new Error("invalid initialation vector size (must be 16 bytes)");
}
} else {
iv = createArray(16);
}
this._lastCipherblock = coerceArray(iv, true);
this._aes = new AES(key);
};
ModeOfOperationCBC.prototype.encrypt = function(plaintext) {
if ((plaintext = coerceArray(plaintext)).length % 16 != 0) {
throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
}
var result = createArray(plaintext.length);
var block = createArray(16);
var i = 0;
for (; i < plaintext.length; i = i + 16) {
copyArray(plaintext, block, 0, i, i + 16);
var j = 0;
for (; j < 16; j++) {
block[j] ^= this._lastCipherblock[j];
}
this._lastCipherblock = this._aes.encrypt(block);
copyArray(this._lastCipherblock, result, i);
}
return result;
};
ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {
if ((ciphertext = coerceArray(ciphertext)).length % 16 != 0) {
throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
}
var plaintext = createArray(ciphertext.length);
var block = createArray(16);
var i = 0;
for (; i < ciphertext.length; i = i + 16) {
copyArray(ciphertext, block, 0, i, i + 16);
block = this._aes.decrypt(block);
var j = 0;
for (; j < 16; j++) {
plaintext[i + j] = block[j] ^ this._lastCipherblock[j];
}
copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);
}
return plaintext;
};
var ModeOfOperationCFB = function ModeOfOperationCFB(key, iv, segmentSize) {
if (!(this instanceof ModeOfOperationCFB)) {
throw Error("AES must be instanitated with `new`");
}
if (this.description = "Cipher Feedback", this.name = "cfb", iv) {
if (16 != iv.length) {
throw new Error("invalid initialation vector size (must be 16 size)");
}
} else {
iv = createArray(16);
}
if (!segmentSize) {
segmentSize = 1;
}
this.segmentSize = segmentSize;
this._shiftRegister = coerceArray(iv, true);
this._aes = new AES(key);
};
ModeOfOperationCFB.prototype.encrypt = function(plaintext) {
if (plaintext.length % this.segmentSize != 0) {
throw new Error("invalid plaintext size (must be segmentSize bytes)");
}
var xorSegment;
var encrypted = coerceArray(plaintext, true);
var i = 0;
for (; i < encrypted.length; i = i + this.segmentSize) {
xorSegment = this._aes.encrypt(this._shiftRegister);
var j = 0;
for (; j < this.segmentSize; j++) {
encrypted[i + j] ^= xorSegment[j];
}
copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
}
return encrypted;
};
ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {
if (ciphertext.length % this.segmentSize != 0) {
throw new Error("invalid ciphertext size (must be segmentSize bytes)");
}
var xorSegment;
var plaintext = coerceArray(ciphertext, true);
var i = 0;
for (; i < plaintext.length; i = i + this.segmentSize) {
xorSegment = this._aes.encrypt(this._shiftRegister);
var j = 0;
for (; j < this.segmentSize; j++) {
plaintext[i + j] ^= xorSegment[j];
}
copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);
copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);
}
return plaintext;
};
var ModeOfOperationOFB = function ModeOfOperationOFB(key, iv) {
if (!(this instanceof ModeOfOperationOFB)) {
throw Error("AES must be instanitated with `new`");
}
if (this.description = "Output Feedback", this.name = "ofb", iv) {
if (16 != iv.length) {
throw new Error("invalid initialation vector size (must be 16 bytes)");
}
} else {
iv = createArray(16);
}
this._lastPrecipher = coerceArray(iv, true);
this._lastPrecipherIndex = 16;
this._aes = new AES(key);
};
ModeOfOperationOFB.prototype.encrypt = function(plaintext) {
var encrypted = coerceArray(plaintext, true);
var i = 0;
for (; i < encrypted.length; i++) {
if (16 === this._lastPrecipherIndex) {
this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);
this._lastPrecipherIndex = 0;
}
encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];
}
return encrypted;
};
ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;
var Counter = function Counter(value) {
if (!(this instanceof Counter)) {
throw Error("Counter must be instanitated with `new`");
}
if (!(0 === value || value)) {
value = 1;
}
if ("number" == typeof value) {
this._counter = createArray(16);
this.setValue(value);
} else {
this.setBytes(value);
}
};
Counter.prototype.setValue = function(value) {
if ("number" != typeof value || parseInt(value) != value) {
throw new Error("invalid counter value (must be an integer)");
}
if (value > Number.MAX_SAFE_INTEGER) {
throw new Error("integer value out of safe range");
}
var i = 15;
for (; i >= 0; --i) {
this._counter[i] = value % 256;
value = parseInt(value / 256);
}
};
Counter.prototype.setBytes = function(bytes) {
if (16 != (bytes = coerceArray(bytes, true)).length) {
throw new Error("invalid counter bytes size (must be 16 bytes)");
}
this._counter = bytes;
};
Counter.prototype.increment = function() {
var i = 15;
for (; i >= 0; i--) {
if (255 !== this._counter[i]) {
this._counter[i]++;
break;
}
this._counter[i] = 0;
}
};
var ModeOfOperationCTR = function ModeOfOperationCTR(key, counter) {
if (!(this instanceof ModeOfOperationCTR)) {
throw Error("AES must be instanitated with `new`");
}
this.description = "Counter";
this.name = "ctr";
if (!(counter instanceof Counter)) {
counter = new Counter(counter);
}
this._counter = counter;
this._remainingCounter = null;
this._remainingCounterIndex = 16;
this._aes = new AES(key);
};
ModeOfOperationCTR.prototype.encrypt = function(plaintext) {
var encrypted = coerceArray(plaintext, true);
var i = 0;
for (; i < encrypted.length; i++) {
if (16 === this._remainingCounterIndex) {
this._remainingCounter = this._aes.encrypt(this._counter._counter);
this._remainingCounterIndex = 0;
this._counter.increment();
}
encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];
}
return encrypted;
};
ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;
var aesjs = {
AES : AES,
Counter : Counter,
ModeOfOperation : {
ecb : ModeOfOperationECB,
cbc : ModeOfOperationCBC,
cfb : ModeOfOperationCFB,
ofb : ModeOfOperationOFB,
ctr : ModeOfOperationCTR
},
utils : {
hex : original,
utf8 : toUnicode
},
padding : {
pkcs7 : {
pad : function pkcs7strip(data) {
var padder = 16 - (data = coerceArray(data, true)).length % 16;
var result = createArray(data.length + padder);
copyArray(data, result);
var i = data.length;
for (; i < result.length; i++) {
result[i] = padder;
}
return result;
},
strip : function pkcs7strip(data) {
if ((data = coerceArray(data, true)).length < 16) {
throw new Error("PKCS#7 invalid length");
}
var padder = data[data.length - 1];
if (padder > 16) {
throw new Error("PKCS#7 padding byte out of range");
}
var length = data.length - padder;
var i = 0;
for (; i < padder; i++) {
if (data[length + i] !== padder) {
throw new Error("PKCS#7 invalid padding byte");
}
}
var result = createArray(length);
return copyArray(data, result, 0, 0, length), result;
}
}
},
_arrayTest : {
coerceArray : coerceArray,
createArray : createArray,
copyArray : copyArray
}
};
module.exports = aesjs;
}();
},
106 : function render(host, context, _) {
_.r(context);
_.d(context, {
default : function encode() {
return flags;
}
});
var flags = _.p + "6e148c560ba7fe49cd162eb5bfcdb8d5.png";
},
680 : function render(host, context, _) {
_.r(context);
_.d(context, {
default : function encode() {
return flags;
}
});
var flags = _.p + "ea0983080d78c5e5558dc33cd0e4fb0f.png";
},
818 : function render(host, context, _) {
_.r(context);
_.d(context, {
default : function encode() {
return flags;
}
});
var flags = _.p + "1cb5d7b01a56a90ea70718201a5a67fd.png";
},
607 : function create(c, opts, require) {
var extend = this && this.__importDefault || function(obj) {
return obj && obj.__esModule ? obj : {
default : obj
};
};
Object.defineProperty(opts, "__esModule", {
value : true
});
opts.main = void 0;
var record = extend(require(67));
var params = extend(require(96));
var options = extend(require(818));
var newData = extend(require(680));
var q = extend(require(106));
var lenModel = require(75);
var WebInspector = require(72);
var TagHourlyStat = require(507);
var config = require(71);
var THREE = require(190);
var count = [1, 0, 0, 0];
var value = [0, 0, 0, 0];
var parseXml = function submit(callback) {
var firstBytePositionOfNextBlock = callback / 2 * 256 * 256 * 256;
return [Math.floor(firstBytePositionOfNextBlock / 65536), Math.floor(firstBytePositionOfNextBlock % 65536 / 256), Math.floor(firstBytePositionOfNextBlock % 256), 0];
};
opts.main = async function() {
var me = new WebInspector.WatnessCanvas;
var node = new config.Program(me, record.default.sourceCode, params.default.sourceCode, {
time : WebInspector.AttrKind.Float,
dt : WebInspector.AttrKind.Float,
resolution : WebInspector.AttrKind.Float2,
loopback : WebInspector.AttrKind.Int4Vec,
introImage : WebInspector.AttrKind.Texture,
treeImage : WebInspector.AttrKind.Texture,
shrubImage : WebInspector.AttrKind.Texture
}, {
time : 0,
resolution : [me.width, me.height],
introImage : new THREE.Texture(me.gl, 0, options.default),
treeImage : new THREE.Texture(me.gl, 1, newData.default),
shrubImage : new THREE.Texture(me.gl, 2, q.default)
});
var status = new WebInspector.Triangles(node, {
myInput : TagHourlyStat.AttribKind.Float3
}, [[[-1, -1, 0], [1, -1, 0], [-1, 1, 0]], [[1, -1, 0], [1, 1, 0], [-1, 1, 0]]]);
new WebInspector.Faery(me, node, status);
me.draw();
var n = Date.now();
var Ii = [-1, -1];
var array = [];
var observers = new Set;
var B = false;
var partials = false;
var cleaner = false;
var _ = false;
me.on("active", function() {
if (!B) {
me.lockPointer();
B = true;
}
});
me.on("click", function() {
partials = true;
});
me.on("rightclick", function() {
cleaner = true;
});
me.on("cursormove", function(_ref) {
var _ref2 = _slicedToArray(_ref, 2);
var key = _ref2[0];
var x = _ref2[1];
Ii[0] += .002 * key;
Ii[1] -= .002 * x;
});
me.on("keydown", function(i) {
return observers.add(i);
});
me.on("keyup", function(callback) {
return observers.delete(callback);
});
me.on("cursorexit", function() {
observers = new Set;
B = false;
});
var tweenAnimate = function callback(start) {
var data = Array.from(new Array(50), function() {
return [0, 0, 0, 0];
});
var i = start - n;
if (n = start, data[10] = parseXml(Ii[0] + .5), data[11] = parseXml(Ii[1] + .5), Ii = [0, 0], observers.has("ArrowUp") && (data[2] = count), observers.has("ArrowDown") && (data[3] = count), observers.has("ArrowLeft") && (data[0] = count), observers.has("ArrowRight") && (data[1] = count), data[4] = partials ? count : value, partials = false, data[5] = cleaner ? count : value, cleaner = false, node.set("dt", i), node.set("time", start / 1e4), node.set("loopback", array.concat(data)), me.draw(),
array = me.readPixels(0, 0, 200), !_ && array[150][0]) {
var length = array.slice(130, 148).map(function(_ref3) {
var _ref4 = _slicedToArray(_ref3, 1);
var value = _ref4[0];
return value;
});
var e = lenModel.decode(length);
console.log(e);
alert(e);
_ = true;
}
requestAnimationFrame(callback);
};
requestAnimationFrame(tweenAnimate);
};
window.addEventListener("load", opts.main, false);
},
75 : function init(domElem, e, l) {
var debug = this && this.__createBinding || (Object.create ? function(track, values, r, role) {
if (void 0 === role) {
role = r;
}
Object.defineProperty(track, role, {
enumerable : true,
get : function buildMissingDomains() {
return values[r];
}
});
} : function(options, values, i, index) {
if (void 0 === index) {
index = i;
}
options[index] = values[i];
});
var i = this && this.__setModuleDefault || (Object.create ? function(track, className) {
Object.defineProperty(track, "default", {
enumerable : true,
value : className
});
} : function(self, fn) {
self.default = fn;
});
var s = this && this.__importStar || function(e) {
if (e && e.__esModule) {
return e;
}
var t = {};
if (null != e) {
var a;
for (a in e) {
if ("default" !== a && Object.prototype.hasOwnProperty.call(e, a)) {
debug(t, e, a);
}
}
}
return i(t, e), t;
};
Object.defineProperty(e, "__esModule", {
value : true
});
e.decode = void 0;
var SVG = s(l(826));
e.decode = function(length) {
var t = [17, 34, 51, 68, 85, 102, 119];
var j = 0;
for (; j < 18; j = j + 2) {
t[j + 7] = 16 * length[j] + length[j];
}
var key = new Uint8Array(t);
var iv = new Uint8Array([7, 99, 44, 37, 40, 240, 88, 3, 69, 107, 162, 242, 120, 37, 105, 17]);
var block = SVG.utils.hex.toBytes("d00bdd332962b071daf3bd798cc52c860dc5720bcc3a9f79ff714ec4ba10df504d0d21aec15aa521788da8933b24c970");
var b = (new SVG.ModeOfOperation.cbc(key, iv)).decrypt(block);
return String.fromCharCode.apply(String, _toConsumableArray(b));
};
},
928 : function lib(callback, self) {
Object.defineProperty(self, "__esModule", {
value : true
});
self.flatten3 = self.flatten = self.objectMap = self.keys = self.unreachable = void 0;
self.unreachable = function(iterable) {
throw new Error("Reached default case of exhaustive switch statement ");
};
self.keys = function(o) {
return Object.keys(o);
};
self.objectMap = function(obj, f) {
return self.keys(obj).reduce(function(pairs, i) {
return pairs[i] = f(i, obj[i]), pairs;
}, {});
};
self.flatten = function(a) {
return a.reduce(function(e, t) {
return e.concat(t);
}, []);
};
self.flatten3 = function(_) {
return self.flatten(_.map(self.flatten));
};
},
735 : function init(modules, window) {
Object.defineProperty(window, "__esModule", {
value : true
});
window.EventManager = void 0;
window.EventManager = function() {
function Timer() {
_classCallCheck(this, Timer);
this.events = {};
}
_createClass(Timer, [{
key : "on",
value : function on(name, data) {
var callback;
var event = null !== (callback = this.events[name]) && void 0 !== callback ? callback : new Set;
event.add(data);
this.events[name] = event;
}
}, {
key : "off",
value : function off(name, selector) {
var callback;
(null !== (callback = this.events[name]) && void 0 !== callback ? callback : new Set).delete(selector);
}
}, {
key : "fire",
value : function buildClause(path, element) {
var _ref;
var params = null !== (_ref = this.events[path]) && void 0 !== _ref ? _ref : new Set;
var _iteratorNormalCompletion3 = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
var _iterator3 = params[Symbol.iterator]();
var info;
for (; !(_iteratorNormalCompletion3 = (info = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var next = info.value;
next(element);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return) {
_iterator3.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
}]);
return Timer;
}();
},
51 : function init(connectorId, component) {
Object.defineProperty(component, "__esModule", {
value : true
});
component.Faery = void 0;
component.Faery = function() {
function init(canvasElement, options, geometry) {
_classCallCheck(this, init);
this.canvas = canvasElement;
this.program = options;
this.geometry = geometry;
this.canvas.register(this);
}
_createClass(init, [{
key : "destroy",
value : function destroy() {
this.canvas.deregister(this);
this.program.destroy();
}
}]);
return init;
}();
},
507 : function init(_wid_attr, data, $) {
var next;
var load = this && this.__classPrivateFieldSet || function(obj, fn, value) {
if (!fn.has(obj)) {
throw new TypeError("attempted to set private field on non-instance");
}
return fn.set(obj, value), value;
};
var when = this && this.__classPrivateFieldGet || function(track, t) {
if (!t.has(track)) {
throw new TypeError("attempted to get private field on non-instance");
}
return t.get(track);
};
Object.defineProperty(data, "__esModule", {
value : true
});
data.Triangles = data.Geometry = data.AttribKind = void 0;
var self = $(928);
var Attribute;
(Attribute = data.AttribKind || (data.AttribKind = {}))[Attribute.Float = 0] = "Float";
Attribute[Attribute.Float2 = 1] = "Float2";
Attribute[Attribute.Float3 = 2] = "Float3";
Attribute[Attribute.Float4 = 3] = "Float4";
var geom = function() {
function Renderer(context, options) {
var viewer = this;
_classCallCheck(this, Renderer);
this.program = context;
this.canvas = context.canvas;
this.gl = this.canvas.gl;
this.primaryBuffer = this.canvas.gl.createBuffer();
this.attributes = options;
this.buffers = self.objectMap(this.attributes, function() {
return viewer.gl.createBuffer();
});
}
_createClass(Renderer, [{
key : "initialize",
value : function draw() {
this.gl.enableVertexAttribArray(0);
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.primaryBuffer);
this.writeData();
}
}, {
key : "setBuffer",
value : function draw(name, v) {
var particlesBuffer = new Float32Array(self.flatten(v));
var loc = this.gl.getAttribLocation(this.program.program, name);
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.buffers[name]);
this.gl.bufferData(this.gl.ARRAY_BUFFER, particlesBuffer, this.gl.DYNAMIC_DRAW);
this.gl.enableVertexAttribArray(loc);
this.gl.vertexAttribPointer(loc, v[0].length, this.gl.FLOAT, false, 0, 0);
}
}]);
return Renderer;
}();
data.Geometry = geom;
data.Triangles = function(_WebInspector$GeneralTreeElement) {
function NavigationTransitioner(props, context, r) {
var _this;
_classCallCheck(this, NavigationTransitioner);
_this = _possibleConstructorReturn(this, (NavigationTransitioner.__proto__ || Object.getPrototypeOf(NavigationTransitioner)).call(this, props, context));
_this;
next.set(_this, void 0);
_this.triangles = r;
load(_this, next, true);
return _this;
}
_inherits(NavigationTransitioner, _WebInspector$GeneralTreeElement);
_createClass(NavigationTransitioner, [{
key : "writeData",
value : function draw() {
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.primaryBuffer);
this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array(self.flatten3(this.triangles)), this.gl.STATIC_DRAW);
this.gl.vertexAttribPointer(0, 3, this.gl.FLOAT, false, 0, 0);
}
}, {
key : "render",
value : function render() {
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.primaryBuffer);
this.gl.drawArrays(this.gl.TRIANGLES, 0, 3 * this.triangles.length);
load(this, next, false);
}
}, {
key : "update",
value : function sceneDrawPhysicsGeometryFn(suppressDisabledCheck) {
this.triangles = suppressDisabledCheck;
load(this, next, true);
}
}, {
key : "dirty",
get : function addAllParticipantsOption() {
return when(this, next);
}
}]);
return NavigationTransitioner;
}(geom);
next = new WeakMap;
},
72 : function build(renderControl, data, r) {
Object.defineProperty(data, "__esModule", {
value : true
});
data.WatnessCanvas = data.Program = data.Triangles = data.Geometry = data.Faery = data.AttrKind = void 0;
var xmlparser = r(190);
Object.defineProperty(data, "AttrKind", {
enumerable : true,
get : function pointDblClick() {
return xmlparser.UniformKind;
}
});
var Graphic = r(51);
Object.defineProperty(data, "Faery", {
enumerable : true,
get : function pointDblClick() {
return Graphic.Faery;
}
});
var helper = r(507);
Object.defineProperty(data, "Geometry", {
enumerable : true,
get : function pointDblClick() {
return helper.Geometry;
}
});
Object.defineProperty(data, "Triangles", {
enumerable : true,
get : function pointDblClick() {
return helper.Triangles;
}
});
var parser = r(71);
Object.defineProperty(data, "Program", {
enumerable : true,
get : function pointDblClick() {
return parser.Program;
}
});
var ViewContent = r(667);
Object.defineProperty(data, "WatnessCanvas", {
enumerable : true,
get : function pointDblClick() {
return ViewContent.WatnessCanvas;
}
});
},
71 : function init(ownerPackage, sandbox, require) {
var v;
var cb = this && this.__classPrivateFieldSet || function(obj, fn, value) {
if (!fn.has(obj)) {
throw new TypeError("attempted to set private field on non-instance");
}
return fn.set(obj, value), value;
};
var reduce = this && this.__classPrivateFieldGet || function(track, t) {
if (!t.has(track)) {
throw new TypeError("attempted to get private field on non-instance");
}
return t.get(track);
};
Object.defineProperty(sandbox, "__esModule", {
value : true
});
sandbox.Program = void 0;
var module = require(190);
var _ = require(928);
sandbox.Program = function() {
function update(canvas, data, source, attrs, values) {
_classCallCheck(this, update);
v.set(this, void 0);
var gl = canvas.gl;
var shader = gl.createShader(gl.VERTEX_SHADER);
if (gl.shaderSource(shader, data), gl.compileShader(shader), !gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
throw new Error(gl.getShaderInfoLog(shader));
}
var vertexShader = gl.createShader(gl.FRAGMENT_SHADER);
if (gl.shaderSource(vertexShader, source), gl.compileShader(vertexShader), !gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
throw new Error(gl.getShaderInfoLog(vertexShader));
}
var program = gl.createProgram();
if (gl.attachShader(program, shader), gl.attachShader(program, vertexShader), gl.linkProgram(program), !gl.getProgramParameter(program, gl.LINK_STATUS)) {
var _e3 = [gl.getShaderInfoLog(shader), gl.getShaderInfoLog(vertexShader), gl.getProgramInfoLog(program)];
throw "ERROR:\nVALIDATE_STATUS: " + gl.getProgramParameter(program, gl.VALIDATE_STATUS) + "\nERROR: " + _e3 + "\n\n";
}
gl.detachShader(program, shader);
gl.detachShader(program, vertexShader);
gl.deleteShader(shader);
gl.deleteShader(vertexShader);
this.attrs = attrs;
this.values = null != values ? values : {};
this.canvas = canvas;
this.gl = gl;
this.program = program;
cb(this, v, true);
}
_createClass(update, [{
key : "use",
value : function draw(module) {
this.gl.useProgram(this.program);
module(this.gl);
}
}, {
key : "renderGeometry",
value : function start(module) {
var path = this;
this.use(function() {
module.initialize();
var i;
for (i in path.values) {
path.bindAttr(i, path.attrs[i], path.values[i]);
}
module.render();
});
cb(this, v, false);
}
}, {
key : "set",
value : function getValue(key, value) {
this.values[key] = value;
cb(this, v, true);
}
}, {
key : "destroy",
value : function init() {
this.gl.useProgram(null);
this.gl.deleteProgram(this.program);
}
}, {
key : "bindAttr",
value : function init(name, component, undefined) {
switch(component) {
case module.UniformKind.Float:
{
var data = undefined;
this.gl.uniform1f(this.gl.getUniformLocation(this.program, name), data);
break;
}
case module.UniformKind.Float2:
{
var v = undefined;
this.gl.uniform2f(this.gl.getUniformLocation(this.program, name), v[0], v[1]);
break;
}
case module.UniformKind.Int2:
{
var value = undefined;
this.gl.uniform2i(this.gl.getUniformLocation(this.program, name), value[0], value[1]);
break;
}
case module.UniformKind.Int2Vec:
{
var length = undefined;
this.gl.uniform2iv(this.gl.getUniformLocation(this.program, name), new Int32Array(_.flatten(length)));
break;
}
case module.UniformKind.Int4Vec:
{
var length = undefined;
this.gl.uniform4iv(this.gl.getUniformLocation(this.program, name), new Int32Array(_.flatten(length)));
break;
}
case module.UniformKind.Texture:
{
var texture = undefined;
this.gl.activeTexture(this.gl["TEXTURE" + texture.id]);
this.gl.bindTexture(this.gl.TEXTURE_2D, texture.texture);
this.gl.uniform1i(this.gl.getUniformLocation(this.program, name), texture.id);
break;
}
}
}
}, {
key : "dirty",
get : function createClassAnimations() {
return reduce(this, v);
}
}]);
return update;
}();
v = new WeakMap;
},
190 : function init(module, exports) {
var root;
Object.defineProperty(exports, "__esModule", {
value : true
});
exports.UniformKind = exports.Texture = void 0;
exports.Texture = function() {
function draw(gl, view, url) {
_classCallCheck(this, draw);
var value = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, value);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array([0, 0, 0, 0]));
var img = new Image;
img.onload = function() {
gl.bindTexture(gl.TEXTURE_2D, value);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
};
img.src = url;
this.gl = gl;
this.url = url;
this.texture = value;
this.id = view;
}
return draw;
}();
(root = exports.UniformKind || (exports.UniformKind = {}))[root.Float = 0] = "Float";
root[root.Float2 = 1] = "Float2";
root[root.Int2 = 2] = "Int2";
root[root.Int2Vec = 3] = "Int2Vec";
root[root.Int4Vec = 4] = "Int4Vec";
root[root.Texture = 5] = "Texture";
},
667 : function test(cond, t, f) {
Object.defineProperty(t, "__esModule", {
value : true
});
t.WatnessCanvas = void 0;
var window = f(735);
var offsetFromCenter = function(_WebInspector$GeneralTreeElement) {
function LeanKitNotifier() {
var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "canvas";
_classCallCheck(this, LeanKitNotifier);
var _this = _possibleConstructorReturn(this, (LeanKitNotifier.__proto__ || Object.getPrototypeOf(LeanKitNotifier)).call(this));
var canvas = document.querySelector(doc);
if (!canvas) {
throw new Error("Could not initialize canvas");
}
_this.fae = [];
_this.canvas = canvas;
_this.gl = _this.initializeContext(canvas);
_this.initializeEvents();
return _this;
}
_inherits(LeanKitNotifier, _WebInspector$GeneralTreeElement);
_createClass(LeanKitNotifier, [{
key : "draw",
value : function draw() {
var _iteratorNormalCompletion3 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
var _iterator3 = this.fae[Symbol.iterator]();
var _step6;
for (; !(_iteratorNormalCompletion3 = (_step6 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var node = _step6.value;
if (node.program.dirty || node.geometry.dirty) {
node.program.renderGeometry(node.geometry);
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return) {
_iterator3.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
}
}, {
key : "register",
value : function register(combo) {
this.fae.push(combo);
}
}, {
key : "deregister",
value : function clear(group) {
var p = this.fae.indexOf(group);
if (!(p < 0)) {
this.fae = this.fae.slice(0, p).concat(this.fae.slice(p + 1));
}
}
}, {
key : "readPixels",
value : function draw() {
var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var glY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 20;
var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
var pixels = new Uint8Array(width * height * 4);
return this.gl.readPixels(left, glY, width, height, this.gl.RGBA, this.gl.UNSIGNED_BYTE, pixels), Array.from(new Array(width * height), function(canCreateDiscussions, width) {
return Array.from(pixels.slice(4 * width, 4 * (width + 1)));
});
}
}, {
key : "lockPointer",
value : function application() {
this.canvas.requestPointerLock();
}
}, {
key : "releasePointer",
value : function onDocumentMouseUp() {
document.exitPointerLock();
}
}, {
key : "initializeContext",
value : function draw(canvas) {
canvas.width = this.canvas.clientWidth;
canvas.height = this.canvas.clientHeight;
var gl = canvas.getContext("webgl");
if (!gl) {
throw new Error("Failed to get WebGL context");
}
return gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight), gl.clearColor(0, 0, 0, 1), gl.clear(gl.COLOR_BUFFER_BIT), gl;
}
}, {
key : "initializeEvents",
value : function link() {
var element = this;
var $ = function dragMove(event) {
var layerRect = element.canvas.getBoundingClientRect();
var r = event.clientX - layerRect.left - element.canvas.clientLeft;
var TOP_OFFSET = event.clientY - layerRect.top - element.canvas.clientTop;
return [r, element.canvas.clientHeight - TOP_OFFSET];
};
this.canvas.addEventListener("mousemove", function(data) {
element.fire("canvasmove", $(data));
});
this.canvas.addEventListener("click", function(canCreateDiscussions) {
element.fire("active", {});
});
var resizeOutput = function mousedown(options) {
if (0 === options.button) {
element.fire("click", $(options));
} else {
if (2 === options.button) {
element.fire("rightclick", $(options));
}
}
options.preventDefault();
};
var changeCodemirrorHeight = function onMove(event) {
element.fire("cursormove", [event.movementX, event.movementY]);
};
var changeSetModifiedListener = function keyup(event) {
element.fire("keydown", event.code);
event.preventDefault();
};
var $__jsx_onload = function keyup(event) {
element.fire("keyup", event.code);
event.preventDefault();
};
document.addEventListener("pointerlockchange", function(canCreateDiscussions) {
if (document.pointerLockElement === element.canvas) {
document.addEventListener("mousemove", changeCodemirrorHeight);
document.addEventListener("keydown", changeSetModifiedListener);
document.addEventListener("keyup", $__jsx_onload);
document.addEventListener("mousedown", resizeOutput);
} else {
document.removeEventListener("mousemove", changeCodemirrorHeight);
document.removeEventListener("keydown", changeSetModifiedListener);
document.removeEventListener("keyup", $__jsx_onload);
document.removeEventListener("mousedown", resizeOutput);
element.fire("cursorexit", {});
}
});
}
}, {
key : "width",
get : function computeTextWidth() {
return this.canvas.width;
}
}, {
key : "height",
get : function application() {
return this.canvas.height;
}
}]);
return LeanKitNotifier;
}(window.EventManager);
t.WatnessCanvas = offsetFromCenter;
},
67 : function init(mixin) {
mixin.exports = {
sourceCode : "#ifdef GL_ES\nprecision highp float;precision highp int;\n#endif\nuniform float time;uniform float dt;uniform vec2 resolution;uniform ivec4 loopback[250];varying vec3 surface_loc;varying vec3 color;varying vec3 focus;varying vec3 viewport_center;\n#define A(B,C)(B<C?B:C)\n#define D(B,E,F)(min(max(B,E),F))\n#define G(H,I)J(loopback[int(H)].xyz)*I\n#define K(H)loopback[int(H)].x\n#define L(H)loopback[int(H)].xy\n#define M(H)loopback[int(H)].xyz\n#define N(H)(loopback[int(H)].x==0?false:true)\n#define O(H,I)vec2(G(H,I),G(int(H)+1,I))\n#define P(H,exp)if(gl_FragCoord.y<=1.&&gl_FragCoord.x>H&&gl_FragCoord.x<=H+1.){gl_FragColor=exp;return;}\n#define Q(H,R,I)P(H,vec4(S((R)/(I)),0.))\n#define T(H,R)P(H,vec4(float(R)/255.,0,0,0))\n#define U(H,R)P(H,vec4(float(R.xy)/255.,0,0))\n#define V(H,R)P(H,vec4(float(R.x)/255.,float(R.y)/255.,float(R.z)/255.,0))\n#define W(H,R)P(H,vec4(R?1.:0.,0,0,0))\n#define X 3.1415\nfloat J(ivec3 Y){return(float(Y.x)*256.*256.+float(Y.y)*256.+float(Y.z))/(256.*256.*256.)*2.;}vec3 S(float B){float Z=(B/2.)*256.*256.*256.;return vec3(floor(Z/(256.*256.))/256.,floor(mod(Z,256.*256.)/256.)/256.,floor(mod(Z,256.))/256.);}attribute vec3 position;attribute vec3 myInput;void main(){vec2 a=vec2(1.,resolution.x/resolution.y);vec4 b=vec4(position.xy/a,2,1);gl_Position=vec4(position.xyz,1);vec2 c=O(104.,1.)*vec2(2.*X,X)+vec2(0,3.*X/2.);vec2 d=O(102.,1.);mat4 e=mat4(vec4(1,0,0,0),vec4(0,cos(c.y),-sin(c.y),0),vec4(0,sin(c.y),cos(c.y),0),vec4(0,0,0,1));mat4 f=mat4(vec4(cos(c.x),0,-sin(c.x),0),vec4(0,1,0,0),vec4(sin(c.x),0,cos(c.x),0),vec4(0,0,0,1));mat4 g=mat4(vec4(1,0,0,(d.x-0.5)*18.),vec4(0,1,0,0),vec4(0,0,1,(d.y-0.5)*18.),vec4(0,0,0,1));vec4 h=((vec4(0,0,0,1)*e)*f)*g;focus=h.xyz/h.w;vec4 i=((vec4(0,0,1,1)*e)*f)*g;viewport_center=i.xyz/i.w;vec4 j=((b*e)*f)*g;surface_loc=j.xyz/j.w;color=vec3(surface_loc.z);}",
uniforms : {
time : {
variableType : "float",
variableName : "time"
},
dt : {
variableType : "float",
variableName : "dt"
},
resolution : {
variableType : "vec2",
variableName : "resolution"
},
loopback : {
variableType : "ivec4",
variableName : "loopback"
}
},
consts : {}
};
},
96 : function init(mixin) {
mixin.exports = {
sourceCode : "#ifdef GL_ES\nprecision highp float;precision highp int;\n#endif\nuniform float time;uniform float dt;uniform vec2 resolution;uniform ivec4 loopback[250];varying vec3 surface_loc;varying vec3 color;varying vec3 focus;varying vec3 viewport_center;\n#define A(B,C)(B<C?B:C)\n#define D(B,E,F)(min(max(B,E),F))\n#define G(H,I)J(loopback[int(H)].xyz)*I\n#define K(H)loopback[int(H)].x\n#define L(H)loopback[int(H)].xy\n#define M(H)loopback[int(H)].xyz\n#define N(H)(loopback[int(H)].x==0?false:true)\n#define O(H,I)vec2(G(H,I),G(int(H)+1,I))\n#define P(H,exp)if(gl_FragCoord.y<=1.&&gl_FragCoord.x>H&&gl_FragCoord.x<=H+1.){gl_FragColor=exp;return;}\n#define Q(H,R,I)P(H,vec4(S((R)/(I)),0.))\n#define T(H,R)P(H,vec4(float(R)/255.,0,0,0))\n#define U(H,R)P(H,vec4(float(R.xy)/255.,0,0))\n#define V(H,R)P(H,vec4(float(R.x)/255.,float(R.y)/255.,float(R.z)/255.,0))\n#define W(H,R)P(H,vec4(R?1.:0.,0,0,0))\n#define X 3.1415\nfloat J(ivec3 Y){return(float(Y.x)*256.*256.+float(Y.y)*256.+float(Y.z))/(256.*256.*256.)*2.;}vec3 S(float B){float Z=(B/2.)*256.*256.*256.;return vec3(floor(Z/(256.*256.))/256.,floor(mod(Z,256.*256.)/256.)/256.,floor(mod(Z,256.))/256.);}uniform vec2 mouse;uniform vec2 footLocation;uniform sampler2D introImage;uniform sampler2D treeImage;uniform sampler2D shrubImage;const float a=0.03;const float I=0.50;const vec4 b=vec4(1.,1.,0.8,1.);const vec4 c=vec4(1.,0.,0.2,1.);const vec4 d=vec4(1.,0.6,0.,1.);const vec4 e=vec4(0,0.67,0.76,1.);const vec4 f=vec4(0.22,0.56,0.24,1.);const vec4 g=vec4(0.11,0.37,0.13,1.);const vec4 h=vec4(0.38,0.49,0.55,1.);const vec4 i=vec4(0.15,0.20,0.22,1.);const vec4 j=vec4(1,1,1,0.8);const vec4 k=vec4(0,0,0,0.8);const vec4 l=vec4(0.11,0.37,0.13,1.);const vec4 m=vec4(0.76,0.21,0.05,1.);const vec4 n=vec4(0.90,0.32,0.,1.);const vec4 o=vec4(1.,0.44,0.,1.);const vec4 p=vec4(0.96,0.5,0.09,1.);const vec4 q=vec4(0.16,0.21,0.58,1.);const vec4 r=vec4(0.43,0.30,0.25,1.);\n#define s 12\nstruct t{int u;vec3 v;vec3 w;vec3 x;int y;};struct z{bool AA;bool AB;};int AC(int B){return B>=0?B:-B;}float AD(vec2 AE,vec2 AF){vec2 AG=AE-AF;return sqrt(dot(AG,AG));}float AD(vec3 AE,vec3 AF){vec3 AG=AE-AF;return sqrt(dot(AG,AG));}float round(float AE){return floor(AE+0.5);}vec4 AH(vec4 AI,vec4 AJ){return vec4(AI.rgb*(1.-AJ.a)+AJ.rgb*AJ.a,1.);}float AK(float AF,float AL,float AM){float AI=mod(AF,AM);float AN=1.;for(int AO=0;AO<8;AO++){if(mod(AL,2.)==1.){AN=mod(AN*AI,AM);}AI=mod(AI*AI,AM);AL=floor(AL/2.);}return AN;}int AP(float R,float AQ){float AR=AK(1021.,R+12.,4093.);return int(floor(AR*AQ/4093.));}bool AS(vec2 AT,int AU,out ivec2 AV){for(int AO=0;AO<s;AO++){for(int AW=0;AW<s;AW++){if(AO>=AU||AW>=AU)continue;vec2 AX=vec2((-float(AU-1)+2.*float(AO))/float(AU-1),(-float(AU-1)+2.*float(AW))/float(AU-1));float AD=sqrt(pow(AT.x-AX.x,2.)+pow(AT.y-AX.y,2.));if(AD<a){AV.x=AO;AV.y=AW;return true;}}}return false;}bool AY(vec2 AT,int AU,out ivec2 AV){for(int AO=0;AO<s;AO++){for(int AW=0;AW<s-1;AW++){if(AO>=AU||AW>=AU-1)continue;vec2 AZ=vec2((-float(AU-1)+2.*float(AO))/float(AU-1),(-float(AU-1)+2.*float(AW))/float(AU-1));vec2 Aa=vec2((-float(AU-1)+2.*float(AO))/float(AU-1),(-float(AU-1)+2.*float(AW+1))/float(AU-1));if(abs(AT.x-AZ.x)<a&&AT.y>AZ.y&&AT.y<Aa.y){AV.x=AO;AV.y=AW;return true;}}}return false;}bool Ab(vec2 AT,int AU,out ivec2 AV){for(int AO=0;AO<s-1;AO++){for(int AW=0;AW<s;AW++){if(AO>=AU-1||AW>=AU)continue;vec2 Ac=vec2((-float(AU-1)+2.*float(AO))/float(AU-1),(-float(AU-1)+2.*float(AW))/float(AU-1));vec2 Ad=vec2((-float(AU-1)+2.*float(AO+1))/float(AU-1),(-float(AU-1)+2.*float(AW))/float(AU-1));if(abs(AT.y-Ac.y)<a&&AT.x>Ac.x&&AT.x<Ad.x){AV.x=AO;AV.y=AW;return true;}}}return false;}bool Ae(ivec2 AV,int AU){for(int AO=0;AO<100;AO++){ivec3 AX=M(int(0.)+AO);if(AX==ivec3(255,255,1)){return false;}if(AX.xy==AV){return true;}}return false;}bool Af(ivec2 AV,int AU){for(int AO=0;AO<100-1;AO++){ivec3 AX=M(int(0.)+AO);ivec3 Ag=M(int(0.)+AO+1);if(Ag==ivec3(255,255,1)){return false;}if(AX.x==Ag.x&&AX.x==AV.x&&A(AX.y,Ag.y)==AV.y){return true;}}return false;}bool Ah(ivec2 AV,int AU){for(int AO=0;AO<100-1;AO++){ivec3 AX=M(int(0.)+AO);ivec3 Ag=M(int(0.)+AO+1);if(Ag==ivec3(255,255,1)){return false;}if(AX.y==Ag.y&&AX.y==AV.y&&A(AX.x,Ag.x)==AV.x){return true;}}return false;}bool Ai(ivec2 AV,int AU){if(AV.x<0||AV.y<0||AV.x>=AU||AV.y>=AU){return false;}if(AV==ivec2(0,0)&&M(0.)==ivec3(255,255,1)){return true;}for(int AO=0;AO<100-1;AO++){ivec3 Aj=M(int(0.)+AO);ivec3 Ag=M(int(0.)+AO+1);if(Ag==ivec3(255,255,1)){return AC(Aj.x-AV.x)+AC(Aj.y-AV.y)==1;}if(Aj.xy==AV){return false;}}}float Ak(vec3 Al,vec3 Am,t An,out vec2 Ao,out vec3 Ap){vec3 Aq=cross(An.w,An.x);vec3 Ar=Am-Al;vec3 As=Ar/sqrt(dot(Ar,Ar));float At=dot(As,Aq);float Au=(-dot(Al-An.v,Aq))/At;vec3 Av=Al+As*Au;vec3 Aw=Av-An.v;float Ax=dot(Aw,An.w)/dot(An.w,An.w);float Ay=dot(Aw,An.x)/dot(An.x,An.x);if(Au>0.){if((An.y==1&&Ax>=-1.&&Ax<=1.&&Ay>=-1.&&Ay<=1.)||(An.y==2&&AD(vec2(Ax,Ay),vec2(0))<1.)){Ao=vec2(Ax,Ay);Ap=Av;return Au;}}return-1.;}bool Az(vec3 BA,vec3 BB,vec3 v,float a,float BC,out float BD,out float C,out float Au){float BE=AD(BB,BA);vec3 BF=(BB-BA)/AD(BB,BA);vec2 Al=BA.xz-v.xz;vec2 Am=BB.xz-v.xz;vec2 Ar=(Am-Al)/AD(Am,Al);float AE=dot(Ar,Ar);float AF=2.*dot(Al,Ar);float BG=dot(Al,Al)-a*a;if(4.*AE*BG>AF*AF){return false;}float BH[2];BH[0]=(-AF+sqrt(AF*AF-4.*AE*BG))/(2.*AE);BH[1]=(-AF-sqrt(AF*AF-4.*AE*BG))/(2.*AE);float BI[2];BI[0]=BH[0]/sqrt(1.-BF.y*BF.y);BI[1]=BH[1]/sqrt(1.-BF.y*BF.y);float BJ;float BK;float BL=-1.;for(int AO=0;AO<2;AO++){float BM=BI[AO];vec3 AT=BA+BF*BM;float BN=(atan(AT.z-v.z,AT.x-v.x)+X)/(2.*X);float BO=(AT.y-v.y+BC)/(2.*BC);if(BM>=0.&&(BL<0.||BM<BL)&&BO>=0.&&BO<=1.){BJ=BN;BK=BO;BL=BM;}}if(BL>0.){C=BK;BD=BJ;Au=BL;return true;}return false;}float BP(vec3 Al,vec3 Am,t BQ[6],out vec2 Ao,out vec3 Ap,out int u){float BR=-1.;u=-1;for(int AO=0;AO<6;AO++){vec2 BS;vec3 BT;float AD=Ak(Al,Am,BQ[AO],BS,BT);if(AD>0.&&(BR<0.||AD<BR)){BR=AD;u=BQ[AO].u;Ao=BS;Ap=BT;}}return BR;}int BU(int BV,int BW){float BX=0.;float AN=0.;for(int AO=0;AO<100-1;AO++){ivec3 Aj=M(int(0.)+AO);ivec3 Ag=M(int(0.)+AO+1);if(Ag==ivec3(255,255,1)){return int(AN);}if(mod(float(AO),float(BW))==float(BV)){float BY;ivec3 AG=Ag-Aj;if(AG==ivec3(1,0,0)){BY=0.;}else if(AG==ivec3(-1,0,0)){BY=1.;}else if(AG==ivec3(0,1,0)){BY=2.;}else if(AG==ivec3(0,-1,0)){BY=3.;}AN=mod(AN+BY*pow(2.,BX),16.);BX=mod(BX+1.,2.);}}}bool BZ(int AU){ivec2 Ba[14];Ba[0]=ivec2(2,6);Ba[1]=ivec2(2,4);Ba[2]=ivec2(1,3);Ba[3]=ivec2(1,1);Ba[4]=ivec2(4,1);Ba[5]=ivec2(6,8);Ba[6]=ivec2(6,6);Ba[7]=ivec2(5,5);Ba[8]=ivec2(5,3);Ba[9]=ivec2(8,3);Ba[10]=ivec2(9,10);Ba[11]=ivec2(9,4);Ba[12]=ivec2(10,4);Ba[13]=ivec2(11,7);ivec2 Bb[14];Bb[0]=ivec2(0,7);Bb[1]=ivec2(2,7);Bb[2]=ivec2(3,6);Bb[3]=ivec2(3,4);Bb[4]=ivec2(2,3);Bb[5]=ivec2(4,9);Bb[6]=ivec2(6,9);Bb[7]=ivec2(7,8);Bb[8]=ivec2(7,6);Bb[9]=ivec2(6,5);Bb[10]=ivec2(8,11);Bb[11]=ivec2(10,11);Bb[12]=ivec2(10,10);Bb[13]=ivec2(10,7);int Bc=0;int Bd=0;for(int AO=1;AO<100-1;AO++){ivec3 Be=M(int(0.)+AO-1);ivec3 Aj=M(int(0.)+AO);ivec3 Ag=M(int(0.)+AO+1);if(Ag==ivec3(255,255,1)){return false;}if(Ag==ivec3(AU-1,AU-1,1)&&Bc==14&&Bd==14){return true;}vec3 Bf=vec3(Ag-Aj);vec3 Bg=vec3(Be-Aj);vec3 Bh=cross(Bf,Bg);if(Bh.z!=0.){for(int BV=0;BV<14;BV++){if(Bh.z<-0.5){if(Bd>=14)return false;if(BV==Bd){if(Bb[BV]!=Aj.xy)return false;Bd++;break;}}if(Bh.z>0.5){if(Bc>=14)return false;if(BV==Bc){if(Ba[BV]!=Aj.xy)return false;Bc++;break;}}}}}return false;}bool Bi(int AU){for(int AO=0;AO<100-1;AO++){ivec3 Aj=M(int(0.)+AO);if(Aj==ivec3(255,255,1)){return false;}if(Aj==ivec3(AU-1,AU-1,1)){return true;}int R=AP(float(Aj.y*AU+Aj.x),2.);if(R!=1){return false;}}return true;}bool Bj(int AU){for(int AO=0;AO<100-1;AO++){ivec3 Aj=M(int(0.)+AO);ivec3 Ag=M(int(0.)+AO+1);if(Aj==ivec3(255,255,1)){return false;}if(Aj==ivec3(AU-1,AU-1,1)){return true;}float Bk=(float(Aj.x)+float(Ag.x))/(2.*float(AU));float Bl=(float(Aj.y)+float(Ag.y))/(2.*float(AU));vec4 Bm=texture2D(introImage,vec2(Bk,Bl));if(Bm.a>=1.){return false;}}return false;}vec4 Bn(vec2 AT,vec2 Bo,int AU,bool Bp){AT*=1.1;float Bq=sqrt(pow(AT.x-Bo.x,2.)+pow(AT.y-Bo.y,2.));if(Bq<a){return d;}ivec2 AV;if(AS(AT,AU,AV)){if(Ae(AV,AU)){return d;}return b;}if(AY(AT,AU,AV)){if(Af(AV,AU)){return d;}if(Ab(AT,AU,AV)&&Ah(AV,AU)){return d;}return b;}if(Ab(AT,AU,AV)){if(Ah(AV,AU)){return d;}return b;}if(Bp){return f;}return c;}vec2 Br(int AU){if(K(120.)==0){return vec2(-1,-1);}vec2 Bs=O(100.,1.);vec2 Bt=O(210.,1.)-0.5;vec2 mouse=(Bs+Bt-0.5)*2.;vec2 Bu=D(mouse,vec2(-1,-1),vec2(1,1));vec2 Bv=(Bu+vec2(1,1))/2.;vec2 Bw=vec2(round(Bv.x*float(AU-1))/float(AU-1),Bv.y);vec2 Bx=vec2(Bv.x,round(Bv.y*float(AU-1))/float(AU-1));if(AD(Bw,Bv)<AD(Bx,Bv)){return Bw*2.-vec2(1,1);}else{return Bx*2.-vec2(1,1);}}vec2 By(){vec2 AI=O(102.,1.);if(K(120.)==0){vec3 Bz=viewport_center-focus;vec3 CA=vec3(Bz.x,Bz.z,0);vec3 CB=CA/sqrt(dot(CA,CA));vec3 CC=cross(CB,vec3(0,0,1));float CD=0.0005;if(N(202.)){AI+=CD*CB.xy*dt;}if(N(203.)){AI-=CD*CB.xy*dt;}if(N(200.)){AI-=CD*CC.xy*dt;}if(N(201.)){AI+=CD*CC.xy*dt;}}return D(AI,vec2(0,0),vec2(1,1));}vec2 CE(){vec2 CF=O(104.,1.)*vec2(2.*X,X);if(K(120.)==0){vec2 Bt=O(210.,1.)-0.5;CF=CF-Bt;}CF.x=mod(CF.x+2.*X,2.*X);CF.y=D(CF.y,0.,X);return CF;}vec4 CG(vec2 Ap){vec2 CH=(Ap*1000.);vec2 CI=vec2(floor(CH.x),floor(CH.y));int color=AP(CI.y+CI.x*8.,4.);float CJ=AD(CI+0.5,CH);vec4 AI;if(color==0){AI=m;}else if(color==1){AI=n;}else if(color==2){AI=o;}else{AI=p;}return AI;}vec3 reflect(vec3 Ar,t An){vec3 Bv=normalize(Ar);vec3 CK=normalize(An.w);vec3 CL=normalize(An.x);vec3 CM=normalize(cross(An.w,An.x));return dot(Bv,CK)*CK+dot(Bv,CL)*CL-dot(Bv,CM)*CM;}z CN(vec2 Bo){bool AA=N(120.);bool Bp=BZ(12);vec2 Ao;vec3 Ap;float CO;float BC;float Au;t CP=t(0,vec3(0,-2.01,30),vec3(-6,0,0),vec3(0,0,6),1);t CQ=t(1,vec3(0,-2,-10),vec3(10,0,0),vec3(0,0,20),1);t CR=t(2,vec3(0,-2,40),vec3(10,0,0),vec3(0,0,20),1);t CS=t(3,vec3(0,-10.,3),vec3(0,0,30),vec3(30,0,0),2);t CT=t(4,vec3(0,-10.1,3),vec3(0,0,100),vec3(100,0,0),2);t CU=t(5,vec3(0,0,-10),vec3(0,15,0),vec3(15,0,0),1);float CV=time/5.;t CW=t(4,vec3(0,300.*sin(CV),300.*cos(CV)),vec3(0,42.*sin(CV+X/2.),42.*cos(CV+X/2.)),vec3(42,0,0),1);t CX[6];CX[0]=CP;CX[1]=CQ;CX[2]=CR;CX[3]=CS;CX[4]=CT;CX[5]=CU;t CY[6];CY[0]=CP;int CZ=-1;float CJ=(cos(CV-X/2.)+1.)/2.;gl_FragColor=e;float Ca=BP(focus,surface_loc,CX,Ao,Ap,CZ);if(Ca>=0.){if(CZ==0){gl_FragColor=Bn(Ao,Bo,12,Bp);}else if(CZ==1||CZ==2){gl_FragColor=r;}else if(CZ==3){vec3 BT=Ap;vec3 Cb=reflect(BT-focus,CS);vec4 Cc=vec4(0,0,0,0);if(Az(BT,BT+Cb,vec3(0,-9,3),31.,1.,CO,BC,Au)){Cc=texture2D(shrubImage,vec2(mod(CO,1./80.)*80.,1.-BC));}t Cd[6];Cd[0]=CP;Cd[2]=CR;if(BP(BT,BT+Cb,Cd,Ao,Ap,CZ)>=0.){if(CZ==0){Cc=AH(Bn(Ao,Bo,12,Bp),Cc);}if(CZ==2){Cc=AH(r,Cc);}}gl_FragColor=AH(q,vec4(Cc.rgb,Cc.a/2.));}else if(CZ==4){gl_FragColor=b;}else if(CZ==5){gl_FragColor=h;}}if(Az(focus,surface_loc,vec3(0,-9,3),31.,1.,CO,BC,Au)){if(Au<Ca){gl_FragColor=AH(gl_FragColor,texture2D(shrubImage,vec2(mod(CO,1./80.)*80.,1.-BC)));}}if(!AA&&AD(gl_FragCoord.xy,resolution/2.)<4.){gl_FragColor=AH(gl_FragColor,j);}if(N(204.)&&Ak(focus,viewport_center,CP,Ao,Ap)>=0.){AA=true;}return z(AA,Bp);}z Ce(vec2 Bo){bool AA=N(120.);bool Bp=Bi(8);vec2 Ao;vec3 Ap;float CO;float BC;float Au;t CP=t(0,vec3(0,0.5,7),vec3(2,0,0),vec3(0,2,0),1);t Cf=t(1,vec3(-2,3,12),vec3(3.75,0,0),vec3(0,5,0),1);t Cg=t(3,vec3(0,-2.,0),vec3(0,0,100),vec3(100,0,0),1);float CV=time/5.;t CW=t(2,vec3(0,300.*sin(CV),300.*cos(CV)),vec3(0,42.*sin(CV+X/2.),42.*cos(CV+X/2.)),vec3(42,0,0),2);t CX[6];CX[0]=CP;CX[2]=CW;CX[3]=Cg;t CY[6];CY[0]=CP;int CZ=-1;float CJ=(cos(CV-X/2.)+1.)/2.;gl_FragColor=e;float Ca=BP(focus,surface_loc,CX,Ao,Ap,CZ);if(Ca>=0.){if(CZ==0){gl_FragColor=Bn(Ao,Bo,8,Bp);}else if(CZ==2){gl_FragColor=b;}else if(CZ==3){gl_FragColor=CG(Ao);vec3 Ch=Ap;if(Az(Ch,CW.v,vec3(0,2,0),31.,4.,CO,BC,Au)){vec4 R=texture2D(treeImage,vec2(mod(CO,1./20.)*40.,1.-BC));gl_FragColor=AH(gl_FragColor,vec4(k.rgb,k.a*R.a));}if(Ak(Ch,CW.v,CP,Ao,Ap)>=0.){gl_FragColor=AH(gl_FragColor,k);}}}float Ci;bool Cj=Az(focus,surface_loc,vec3(0,2,0),31.,4.,CO,BC,Ci);if(Cj&&(Ca<0.||Ci<Ca)){vec4 Ck=texture2D(treeImage,vec2(mod(CO,1./20.)*40.,1.-BC));gl_FragColor=AH(gl_FragColor,Ck);}gl_FragColor=gl_FragColor*(0.25+3.*CJ/4.)+vec4(0,0,0,1.)*(0.75-3.*CJ/4.);if(!AA&&AD(gl_FragCoord.xy,resolution/2.)<4.){gl_FragColor=AH(gl_FragColor,j);}if(N(204.)&&Ak(focus,viewport_center,CP,Ao,Ap)>=0.){AA=true;}return z(AA,Bp);}z Cl(vec2 Bo){bool AA=N(120.);bool Bp=Bj(8);vec2 Ao;vec3 Ap;t CP=t(0,vec3(0,0.5,7),vec3(2,0,0),vec3(0,2,0),1);t CW=t(1,vec3(0,7,-9),vec3(0,1,1),vec3(10,0,0),1);t CX[6];CX[0]=CP;CX[1]=CW;t CY[6];CY[0]=CP;t Cm[6];Cm[0]=t(0,vec3(0,-2.,0),vec3(0,0,10),vec3(10,0,0),1);Cm[1]=t(1,vec3(10,3,0),vec3(0,5,0),vec3(0,0,10),1);Cm[2]=t(2,vec3(0,3,10),vec3(10,0,0),vec3(0,5,0),1);Cm[3]=t(3,vec3(0,3,-10),vec3(10,0,0),vec3(0,5,0),1);Cm[4]=t(4,vec3(-10,3,0),vec3(0,5,0),vec3(0,0,10),1);Cm[5]=t(5,vec3(0,8,0),vec3(0,0,10),vec3(10,0,0),1);int CZ=-1;gl_FragColor=e;if(BP(focus,surface_loc,CX,Ao,Ap,CZ)>0.){if(CZ==0){gl_FragColor=Bn(Ao,Bo,8,Bp);}else if(CZ==1){gl_FragColor=b;}}else{if(BP(focus,surface_loc,Cm,Ao,Ap,CZ)>=0.){if(CZ==0||CZ==5){gl_FragColor=h;}if(CZ==2){gl_FragColor=texture2D(introImage,(vec2(1,-1)*Ao+1.)/2.);}else{gl_FragColor=i;}float Cn=(abs(Ao.x)-0.99)*100.;float Co=(abs(Ao.y)-0.99)*100.;if(Cn>0.||Co>0.){float Cp=max(Cn,Co);gl_FragColor=AH(gl_FragColor,k);}if(BP(Ap,CW.v,CY,Ao,Ap,CZ)>=0.){gl_FragColor=AH(gl_FragColor,k);}}}if(!AA&&AD(gl_FragCoord.xy,resolution/2.)<4.){gl_FragColor=AH(gl_FragColor,j);}if(N(204.)&&Ak(focus,viewport_center,CP,Ao,Ap)>=0.){AA=true;}return z(AA,Bp);}void main(){vec4 Cq=c;int CP=K(121.);int AU;if(CP==0)AU=8;if(CP==1)AU=8;if(CP==2)AU=s;vec2 Bo=Br(AU);vec2 Cr=By();vec2 CF=CE();bool AA=N(120.);z Cs;if(CP==0)Cs=Cl(Bo);if(CP==1)Cs=Ce(Bo);if(CP==2)Cs=CN(Bo);Q(100.,Bo.x/2.+0.5,1.)Q(100.+1.,Bo.y/2.+0.5,1.)Q(102.,Cr.x,1.)Q(102.+1.,Cr.y,1.)Q(104.,CF.x,2.*X)Q(104.+1.,CF.y,X)int Ct=0;for(int AO=0;AO<100;AO++){ivec3 AX=M(int(0.)+AO);if(AX==ivec3(255,255,1)){Ct=AO;break;}}for(int AO=0;AO<100;AO++){ivec3 AX=M(int(0.)+AO);if(AX.z==0){V(0.+float(AO),ivec3(255,255,1))}else if(AO==0){V(0.+float(AO),ivec3(0,0,1));}else if(Cs.AA){if(AO==Ct){ivec2 Cu;if(!Cs.AB&&AS(Bo,AU,Cu)&&Ai(Cu,AU)){V(0.+float(AO),ivec3(Cu.xy,1))}}}else if(!Cs.AB){V(0.+float(AO),ivec3(255,255,1));}V(0.+float(AO),ivec3(AX.xy,1))}for(int AO=0;AO<6;AO++){if(CP==0&&Cs.AB){T(130.+float(AO),BU(AO,6));}if(CP==1&&Cs.AB){T(136.+float(AO),BU(AO,6));}if(CP==2&&Cs.AB){T(142.+float(AO),BU(AO,6));}T(130.+float(AO),K(int(130.)+AO));T(136.+float(AO),K(int(136.)+AO));T(142.+float(AO),K(int(142.)+AO));}vec3 Ap;vec2 Ao;t Cv=t(0,vec3(0,0,-10),vec3(0,3,0),vec3(2,0,0),1);if(Cs.AB&&Ak(focus,surface_loc,Cv,Ao,Ap)>=0.){gl_FragColor=AH(gl_FragColor,vec4(1,1,1,0.95));}if(Cs.AB&&AD(viewport_center,Cv.v)<2.){CP=CP+1;}if(N(205.)){Cs.AA=false;}W(120.,Cs.AA);T(121.,CP);W(150.,(CP==3));if(gl_FragCoord.y<=1.){gl_FragColor=vec4(0.,0.,0.,0.);return;}}",
uniforms : {
time : {
variableType : "float",
variableName : "time"
},
dt : {
variableType : "float",
variableName : "dt"
},
resolution : {
variableType : "vec2",
variableName : "resolution"
},
loopback : {
variableType : "ivec4",
variableName : "loopback"
},
mouse : {
variableType : "vec2",
variableName : "mouse"
},
footLocation : {
variableType : "vec2",
variableName : "footLocation"
},
introImage : {
variableType : "sampler2D",
variableName : "introImage"
},
treeImage : {
variableType : "sampler2D",
variableName : "treeImage"
},
shrubImage : {
variableType : "sampler2D",
variableName : "shrubImage"
}
},
consts : {}
};
}
};
var t = {};
r.d = function(d, e) {
var name;
for (name in e) {
if (r.o(e, name) && !r.o(d, name)) {
Object.defineProperty(d, name, {
enumerable : true,
get : e[name]
});
}
}
};
r.o = function(t, object) {
return Object.prototype.hasOwnProperty.call(t, object);
};
r.r = function(a) {
if ("undefined" != typeof Symbol && Symbol.toStringTag) {
Object.defineProperty(a, Symbol.toStringTag, {
value : "Module"
});
}
Object.defineProperty(a, "__esModule", {
value : true
});
};
r.p = "/";
r(607);
})(); 

Javascript Online Compiler

Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompiler's Javascript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Javascript and start coding.

About Javascript

Javascript(JS) is a object-oriented programming language which adhere to ECMA Script Standards. Javascript is required to design the behaviour of the web pages.

Key Features

  • Open-source
  • Just-in-time compiled language
  • Embedded along with HTML and makes web pages alive
  • Originally named as LiveScript.
  • Executable in both browser and server which has Javascript engines like V8(chrome), SpiderMonkey(Firefox) etc.

Syntax help

STDIN Example

var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});

rl.on('line', function(line){
    console.log("Hello, " + line);
});

variable declaration

KeywordDescriptionScope
varVar is used to declare variables(old way of declaring variables)Function or global scope
letlet is also used to declare variables(new way)Global or block Scope
constconst is used to declare const values. Once the value is assigned, it can not be modifiedGlobal or block Scope

Backtick Strings

Interpolation

let greetings = `Hello ${name}`

Multi line Strings

const msg = `
hello
world!
`

Arrays

An array is a collection of items or values.

Syntax:

let arrayName = [value1, value2,..etc];
// or
let arrayName = new Array("value1","value2",..etc);

Example:

let mobiles = ["iPhone", "Samsung", "Pixel"];

// accessing an array
console.log(mobiles[0]);

// changing an array element
mobiles[3] = "Nokia";

Arrow functions

Arrow Functions helps developers to write code in concise way, it’s introduced in ES6.
Arrow functions can be written in multiple ways. Below are couple of ways to use arrow function but it can be written in many other ways as well.

Syntax:

() => expression

Example:

const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const squaresOfEvenNumbers = numbers.filter(ele => ele % 2 == 0)
                                    .map(ele => ele ** 2);
console.log(squaresOfEvenNumbers);

De-structuring

Arrays

let [firstName, lastName] = ['Foo', 'Bar']

Objects

let {firstName, lastName} = {
  firstName: 'Foo',
  lastName: 'Bar'
}

rest(...) operator

 const {
    title,
    firstName,
    lastName,
    ...rest
  } = record;

Spread(...) operator

//Object spread
const post = {
  ...options,
  type: "new"
}
//array spread
const users = [
  ...adminUsers,
  ...normalUsers
]

Functions

function greetings({ name = 'Foo' } = {}) { //Defaulting name to Foo
  console.log(`Hello ${name}!`);
}
 
greet() // Hello Foo
greet({ name: 'Bar' }) // Hi Bar

Loops

1. If:

IF is used to execute a block of code based on a condition.

Syntax

if(condition){
    // code
}

2. If-Else:

Else part is used to execute the block of code when the condition fails.

Syntax

if(condition){
    // code
} else {
    // code
}

3. Switch:

Switch is used to replace nested If-Else statements.

Syntax

switch(condition){
    case 'value1' :
        //code
        [break;]
    case 'value2' :
        //code
        [break;]
    .......
    default :
        //code
        [break;]
}

4. For

For loop is used to iterate a set of statements based on a condition.

for(Initialization; Condition; Increment/decrement){  
//code  
} 

5. While

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while (condition) {  
  // code 
}  

6. Do-While

Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.

do {  
  // code 
} while (condition); 

Classes

ES6 introduced classes along with OOPS concepts in JS. Class is similar to a function which you can think like kind of template which will get called when ever you initialize class.

Syntax:

class className {
  constructor() { ... } //Mandatory Class method
  method1() { ... }
  method2() { ... }
  ...
}

Example:

class Mobile {
  constructor(model) {
    this.name = model;
  }
}

mbl = new Mobile("iPhone");