-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdochack.js
1607 lines (1288 loc) · 53.9 KB
/
dochack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Generated by the Nim Compiler v2.0.0 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var NTI33554466 = {size: 0,kind: 1,base: null,node: null,finalizer: null};
var NTI721420302 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI33554435 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI973078607 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI973078613 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI134217745 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217749 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217751 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555173 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555181 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33554449 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
var NTI33554450 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
var NTI33555180 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33555177 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555178 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217741 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI134217743 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NNI134217743 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217743.node = NNI134217743;
var NNI134217741 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217741.node = NNI134217741;
var NNI33555178 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555178.node = NNI33555178;
NTI33555180.base = NTI33555177;
NTI33555181.base = NTI33555177;
var NNI33555177 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555180, name: "parent", sons: null},
{kind: 1, offset: "name", len: 0, typ: NTI33554450, name: "name", sons: null},
{kind: 1, offset: "message", len: 0, typ: NTI33554449, name: "msg", sons: null},
{kind: 1, offset: "trace", len: 0, typ: NTI33554449, name: "trace", sons: null},
{kind: 1, offset: "up", len: 0, typ: NTI33555181, name: "up", sons: null}]};
NTI33555177.node = NNI33555177;
var NNI33555173 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555173.node = NNI33555173;
NTI33555177.base = NTI33555173;
NTI33555178.base = NTI33555177;
NTI134217741.base = NTI33555178;
NTI134217743.base = NTI134217741;
var NNI134217751 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217751.node = NNI134217751;
NTI134217751.base = NTI33555178;
var NNI134217749 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217749.node = NNI134217749;
NTI134217749.base = NTI33555178;
var NNI134217745 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI134217745.node = NNI134217745;
NTI134217745.base = NTI33555178;
var NNI973078613 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI973078607, name: "a", sons: null},
{kind: 1, offset: "b", len: 0, typ: NTI33554435, name: "b", sons: null}]};
NTI973078613.node = NNI973078613;
var NNI721420302 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI33554435, name: "Field0", sons: null},
{kind: 1, offset: "Field1", len: 0, typ: NTI33554466, name: "Field1", sons: null}]};
NTI721420302.node = NNI721420302;
function mnewString(len_33557003) {
return new Array(len_33557003);
}
function toJSStr(s_33556901) {
var result_33556902 = null;
var res_33556943 = newSeq_33556919((s_33556901).length);
var i_33556944 = 0;
var j_33556945 = 0;
Label1: {
Label2: while (true) {
if (!(i_33556944 < (s_33556901).length)) break Label2;
var c_33556946 = s_33556901[i_33556944];
if ((c_33556946 < 128)) {
res_33556943[j_33556945] = String.fromCharCode(c_33556946);
i_33556944 += 1;
}
else {
var helper_33556959 = newSeq_33556919(0);
Label3: {
Label4: while (true) {
if (!true) break Label4;
var code_33556960 = c_33556946.toString(16);
if ((((code_33556960) == null ? 0 : (code_33556960).length) == 1)) {
helper_33556959.push("%0");;
}
else {
helper_33556959.push("%");;
}
helper_33556959.push(code_33556960);;
i_33556944 += 1;
if ((((s_33556901).length <= i_33556944) || (s_33556901[i_33556944] < 128))) {
break Label3;
}
c_33556946 = s_33556901[i_33556944];
}
};
++excHandler;
try {
res_33556943[j_33556945] = decodeURIComponent(helper_33556959.join(""));
--excHandler;
} catch (EXCEPTION) {
var prevJSError = lastJSError;
lastJSError = EXCEPTION;
--excHandler;
res_33556943[j_33556945] = helper_33556959.join("");
lastJSError = prevJSError;
} finally {
}
}
j_33556945 += 1;
}
};
if (res_33556943.length < j_33556945) { for (var i = res_33556943.length ; i < j_33556945 ; ++i) res_33556943.push(null); }
else { res_33556943.length = j_33556945; };
result_33556902 = res_33556943.join("");
return result_33556902;
}
function raiseException(e_33556653, ename_33556654) {
e_33556653.name = ename_33556654;
if ((excHandler == 0)) {
unhandledException(e_33556653);
}
throw e_33556653;
}
function addInt(a_33557050, b_33557051) {
var result = a_33557050 + b_33557051;
checkOverflowInt(result);
return result;
}
function chckRange(i_33557324, a_33557325, b_33557326) {
var result_33557327 = 0;
BeforeRet: {
if (((a_33557325 <= i_33557324) && (i_33557324 <= b_33557326))) {
result_33557327 = i_33557324;
break BeforeRet;
}
else {
raiseRangeError();
}
};
return result_33557327;
}
function setConstr() {
var result = {};
for (var i = 0; i < arguments.length; ++i) {
var x = arguments[i];
if (typeof(x) == "object") {
for (var j = x[0]; j <= x[1]; ++j) {
result[j] = true;
}
} else {
result[x] = true;
}
}
return result;
}
var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21);
function nimCopy(dest_33557268, src_33557269, ti_33557270) {
var result_33557279 = null;
switch (ti_33557270.kind) {
case 21:
case 22:
case 23:
case 5:
if (!(isFatPointer_33557259(ti_33557270))) {
result_33557279 = src_33557269;
}
else {
result_33557279 = [src_33557269[0], src_33557269[1]];
}
break;
case 19:
if (dest_33557268 === null || dest_33557268 === undefined) {
dest_33557268 = {};
}
else {
for (var key in dest_33557268) { delete dest_33557268[key]; }
}
for (var key in src_33557269) { dest_33557268[key] = src_33557269[key]; }
result_33557279 = dest_33557268;
break;
case 18:
case 17:
if (!((ti_33557270.base == null))) {
result_33557279 = nimCopy(dest_33557268, src_33557269, ti_33557270.base);
}
else {
if ((ti_33557270.kind == 17)) {
result_33557279 = (dest_33557268 === null || dest_33557268 === undefined) ? {m_type: ti_33557270} : dest_33557268;
}
else {
result_33557279 = (dest_33557268 === null || dest_33557268 === undefined) ? {} : dest_33557268;
}
}
nimCopyAux(result_33557279, src_33557269, ti_33557270.node);
break;
case 4:
case 16:
if(ArrayBuffer.isView(src_33557269)) {
if(dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) {
dest_33557268 = new src_33557269.constructor(src_33557269);
} else {
dest_33557268.set(src_33557269, 0);
}
result_33557279 = dest_33557268;
} else {
if (src_33557269 === null) {
result_33557279 = null;
}
else {
if (dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) {
dest_33557268 = new Array(src_33557269.length);
}
result_33557279 = dest_33557268;
for (var i = 0; i < src_33557269.length; ++i) {
result_33557279[i] = nimCopy(result_33557279[i], src_33557269[i], ti_33557270.base);
}
}
}
break;
case 24:
case 27:
if (src_33557269 === null) {
result_33557279 = null;
}
else {
if (dest_33557268 === null || dest_33557268 === undefined || dest_33557268.length != src_33557269.length) {
dest_33557268 = new Array(src_33557269.length);
}
result_33557279 = dest_33557268;
for (var i = 0; i < src_33557269.length; ++i) {
result_33557279[i] = nimCopy(result_33557279[i], src_33557269[i], ti_33557270.base);
}
}
break;
case 28:
if (src_33557269 !== null) {
result_33557279 = src_33557269.slice(0);
}
break;
default:
result_33557279 = src_33557269;
break;
}
return result_33557279;
}
function chckIndx(i_33557319, a_33557320, b_33557321) {
var result_33557322 = 0;
BeforeRet: {
if (((a_33557320 <= i_33557319) && (i_33557319 <= b_33557321))) {
result_33557322 = i_33557319;
break BeforeRet;
}
else {
raiseIndexError(i_33557319, a_33557320, b_33557321);
}
};
return result_33557322;
}
function makeNimstrLit(c_33556895) {
var result = [];
for (var i = 0; i < c_33556895.length; ++i) {
result[i] = c_33556895.charCodeAt(i);
}
return result;
}
function subInt(a_33557054, b_33557055) {
var result = a_33557054 - b_33557055;
checkOverflowInt(result);
return result;
}
function cstrToNimstr(c_33556898) {
var ln = c_33556898.length;
var result = new Array(ln);
var r = 0;
for (var i = 0; i < ln; ++i) {
var ch = c_33556898.charCodeAt(i);
if (ch < 128) {
result[r] = ch;
}
else {
if (ch < 2048) {
result[r] = (ch >> 6) | 192;
}
else {
if (ch < 55296 || ch >= 57344) {
result[r] = (ch >> 12) | 224;
}
else {
++i;
ch = 65536 + (((ch & 1023) << 10) | (c_33556898.charCodeAt(i) & 1023));
result[r] = (ch >> 18) | 240;
++r;
result[r] = ((ch >> 12) & 63) | 128;
}
++r;
result[r] = ((ch >> 6) & 63) | 128;
}
++r;
result[r] = (ch & 63) | 128;
}
++r;
}
return result;
}
var ConstSet2 = setConstr([65, 90]);
var ConstSet3 = setConstr(95, 32, 46);
var ConstSet4 = setConstr(95, 32, 46);
function mulInt(a_33557058, b_33557059) {
var result = a_33557058 * b_33557059;
checkOverflowInt(result);
return result;
}
var ConstSet5 = setConstr([97, 122]);
var ConstSet6 = setConstr([65, 90], [97, 122]);
var ConstSet7 = setConstr([97, 122]);
var ConstSet8 = setConstr([65, 90]);
var ConstSet9 = setConstr([65, 90], [97, 122]);
function nimMax(a_33557108, b_33557109) {
var Temporary1;
var result_33557110 = 0;
BeforeRet: {
if ((b_33557109 <= a_33557108)) {
Temporary1 = a_33557108;
}
else {
Temporary1 = b_33557109;
}
result_33557110 = Temporary1;
break BeforeRet;
};
return result_33557110;
}
function nimMin(a_33557104, b_33557105) {
var Temporary1;
var result_33557106 = 0;
BeforeRet: {
if ((a_33557104 <= b_33557105)) {
Temporary1 = a_33557104;
}
else {
Temporary1 = b_33557105;
}
result_33557106 = Temporary1;
break BeforeRet;
};
return result_33557106;
}
function addChar(x_33557415, c_33557416) {
x_33557415.push(c_33557416);
}
var objectID_1207959729 = [0];
function setTheme(theme_570425350) {
document.documentElement.setAttribute("data-theme", theme_570425350);
window.localStorage.setItem("theme", theme_570425350);
}
function add_33556373(x_33556374, x_33556374_Idx, y_33556375) {
if (x_33556374[x_33556374_Idx] === null) { x_33556374[x_33556374_Idx] = []; }
var off = x_33556374[x_33556374_Idx].length;
x_33556374[x_33556374_Idx].length += y_33556375.length;
for (var i = 0; i < y_33556375.length; ++i) {
x_33556374[x_33556374_Idx][off+i] = y_33556375.charCodeAt(i);
}
}
function newSeq_33556919(len_33556921) {
var result_33556922 = [];
result_33556922 = new Array(len_33556921); for (var i = 0 ; i < len_33556921 ; ++i) { result_33556922[i] = null; }
return result_33556922;
}
function unhandledException(e_33556649) {
var buf_33556650 = [[]];
if (!(((e_33556649.message).length == 0))) {
buf_33556650[0].push.apply(buf_33556650[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110,58,32]);;
buf_33556650[0].push.apply(buf_33556650[0], e_33556649.message);;
}
else {
buf_33556650[0].push.apply(buf_33556650[0], [69,114,114,111,114,58,32,117,110,104,97,110,100,108,101,100,32,101,120,99,101,112,116,105,111,110]);;
}
buf_33556650[0].push.apply(buf_33556650[0], [32,91]);;
add_33556373(buf_33556650, 0, e_33556649.name);
buf_33556650[0].push.apply(buf_33556650[0], [93,10]);;
var cbuf_33556651 = toJSStr(buf_33556650[0]);
if (typeof(Error) !== "undefined") {
throw new Error(cbuf_33556651);
}
else {
throw cbuf_33556651;
}
}
function raiseOverflow() {
raiseException({message: [111,118,101,114,45,32,111,114,32,117,110,100,101,114,102,108,111,119], parent: null, m_type: NTI134217743, name: null, trace: [], up: null}, "OverflowDefect");
}
function checkOverflowInt(a_33557048) {
if (a_33557048 > 2147483647 || a_33557048 < -2147483648) raiseOverflow();
}
function raiseRangeError() {
raiseException({message: [118,97,108,117,101,32,111,117,116,32,111,102,32,114,97,110,103,101], parent: null, m_type: NTI134217751, name: null, trace: [], up: null}, "RangeDefect");
}
function addChars_301990090(result_301990092, result_301990092_Idx, x_301990093, start_301990094, n_301990095) {
var Temporary1;
var old_301990096 = (result_301990092[result_301990092_Idx]).length;
if (result_301990092[result_301990092_Idx].length < (Temporary1 = chckRange(addInt(old_301990096, n_301990095), 0, 2147483647), Temporary1)) { for (var i = result_301990092[result_301990092_Idx].length; i < Temporary1; ++i) result_301990092[result_301990092_Idx].push(0); }
else {result_301990092[result_301990092_Idx].length = Temporary1; };
Label2: {
var iHEX60gensym4_301990110 = 0;
var i_570426543 = 0;
Label3: {
Label4: while (true) {
if (!(i_570426543 < n_301990095)) break Label4;
iHEX60gensym4_301990110 = i_570426543;
result_301990092[result_301990092_Idx][chckIndx(addInt(old_301990096, iHEX60gensym4_301990110), 0, (result_301990092[result_301990092_Idx]).length - 1)] = x_301990093.charCodeAt(chckIndx(addInt(start_301990094, iHEX60gensym4_301990110), 0, (x_301990093).length - 1));
i_570426543 = addInt(i_570426543, 1);
}
};
};
}
function addChars_301990086(result_301990088, result_301990088_Idx, x_301990089) {
addChars_301990090(result_301990088, result_301990088_Idx, x_301990089, 0, ((x_301990089) == null ? 0 : (x_301990089).length));
}
function addInt_301990111(result_301990112, result_301990112_Idx, x_301990113) {
addChars_301990086(result_301990112, result_301990112_Idx, ((x_301990113) + ""));
}
function addInt_301990129(result_301990130, result_301990130_Idx, x_301990131) {
addInt_301990111(result_301990130, result_301990130_Idx, BigInt(x_301990131));
}
function HEX24_385875976(x_385875977) {
var result_385875978 = [[]];
addInt_301990129(result_385875978, 0, x_385875977);
return result_385875978[0];
}
function isFatPointer_33557259(ti_33557260) {
var result_33557261 = false;
BeforeRet: {
result_33557261 = !((ConstSet1[ti_33557260.base.kind] != undefined));
break BeforeRet;
};
return result_33557261;
}
function nimCopyAux(dest_33557272, src_33557273, n_33557274) {
switch (n_33557274.kind) {
case 0:
break;
case 1:
dest_33557272[n_33557274.offset] = nimCopy(dest_33557272[n_33557274.offset], src_33557273[n_33557274.offset], n_33557274.typ);
break;
case 2:
for (var i = 0; i < n_33557274.sons.length; i++) {
nimCopyAux(dest_33557272, src_33557273, n_33557274.sons[i]);
}
break;
case 3:
dest_33557272[n_33557274.offset] = nimCopy(dest_33557272[n_33557274.offset], src_33557273[n_33557274.offset], n_33557274.typ);
for (var i = 0; i < n_33557274.sons.length; ++i) {
nimCopyAux(dest_33557272, src_33557273, n_33557274.sons[i][1]);
}
break;
}
}
function raiseIndexError(i_33556812, a_33556813, b_33556814) {
var Temporary1;
if ((b_33556814 < a_33556813)) {
Temporary1 = [105,110,100,101,120,32,111,117,116,32,111,102,32,98,111,117,110,100,115,44,32,116,104,101,32,99,111,110,116,97,105,110,101,114,32,105,115,32,101,109,112,116,121];
}
else {
Temporary1 = ([105,110,100,101,120,32] || []).concat(HEX24_385875976(i_33556812) || [],[32,110,111,116,32,105,110,32] || [],HEX24_385875976(a_33556813) || [],[32,46,46,32] || [],HEX24_385875976(b_33556814) || []);
}
raiseException({message: nimCopy(null, Temporary1, NTI33554449), parent: null, m_type: NTI134217749, name: null, trace: [], up: null}, "IndexDefect");
}
function sysFatal_268435501(message_268435504) {
raiseException({message: nimCopy(null, message_268435504, NTI33554449), m_type: NTI134217745, parent: null, name: null, trace: [], up: null}, "AssertionDefect");
}
function raiseAssert_268435499(msg_268435500) {
sysFatal_268435501(msg_268435500);
}
function failedAssertImpl_268435541(msg_268435542) {
raiseAssert_268435499(msg_268435542);
}
function onDOMLoaded(e_570425385) {
function HEX3Aanonymous_570425409(event_570425410) {
event_570425410.target.parentNode.style.display = "none";
event_570425410.target.parentNode.nextSibling.style.display = "inline";
}
document.getElementById("theme-select").value = window.localStorage.getItem("theme");
Label1: {
var pragmaDots_570425408 = null;
var colontmp__570426534 = [];
colontmp__570426534 = document.getElementsByClassName("pragmadots");
var i_570426536 = 0;
var L_570426537 = (colontmp__570426534).length;
Label2: {
Label3: while (true) {
if (!(i_570426536 < L_570426537)) break Label3;
pragmaDots_570425408 = colontmp__570426534[chckIndx(i_570426536, 0, (colontmp__570426534).length - 1)];
pragmaDots_570425408.onclick = HEX3Aanonymous_570425409;
i_570426536 = addInt(i_570426536, 1);
if (!(((colontmp__570426534).length == L_570426537))) {
failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
}
function isWhitespace_570425752(x_570425753) {
var result_570425754 = false;
result_570425754 = (((x_570425753.nodeName == "#text") && !/\S/.test(x_570425753.textContent)) || (x_570425753.nodeName == "#comment"));
return result_570425754;
}
function toToc_570425755(x_570425756, father_570425757) {
var Temporary5;
var Temporary6;
var Temporary7;
var Temporary8;
var Temporary15;
if ((x_570425756.nodeName == "UL")) {
var f_570425765 = {heading: null, kids: [], sortId: (father_570425757.kids).length, doSort: false};
var i_570425766 = 0;
Label1: {
Label2: while (true) {
if (!(i_570425766 < x_570425756.childNodes.length)) break Label2;
var nxt_570425767 = addInt(i_570425766, 1);
Label3: {
Label4: while (true) {
if (!(nxt_570425767 < x_570425756.childNodes.length)) Temporary5 = false; else { Temporary5 = isWhitespace_570425752(x_570425756.childNodes[nxt_570425767]); } if (!Temporary5) break Label4;
nxt_570425767 = addInt(nxt_570425767, 1);
}
};
if (!(nxt_570425767 < x_570425756.childNodes.length)) Temporary8 = false; else { Temporary8 = (x_570425756.childNodes[i_570425766].nodeName == "LI"); } if (!Temporary8) Temporary7 = false; else { Temporary7 = (x_570425756.childNodes[i_570425766].childNodes.length == 1); } if (!Temporary7) Temporary6 = false; else { Temporary6 = (x_570425756.childNodes[nxt_570425767].nodeName == "UL"); } if (Temporary6) {
var e_570425780 = {heading: x_570425756.childNodes[i_570425766].childNodes[0], kids: [], sortId: (f_570425765.kids).length, doSort: false};
var it_570425781 = x_570425756.childNodes[nxt_570425767];
Label9: {
var j_570425786 = 0;
var colontmp__570426550 = 0;
colontmp__570426550 = it_570425781.childNodes.length;
var i_570426551 = 0;
Label10: {
Label11: while (true) {
if (!(i_570426551 < colontmp__570426550)) break Label11;
j_570425786 = i_570426551;
toToc_570425755(it_570425781.childNodes[j_570425786], e_570425780);
i_570426551 = addInt(i_570426551, 1);
}
};
};
f_570425765.kids.push(e_570425780);;
i_570425766 = addInt(nxt_570425767, 1);
}
else {
toToc_570425755(x_570425756.childNodes[i_570425766], f_570425765);
i_570425766 = addInt(i_570425766, 1);
}
}
};
father_570425757.kids.push(f_570425765);;
}
else {
if (isWhitespace_570425752(x_570425756)) {
}
else {
if ((x_570425756.nodeName == "LI")) {
var idx_570425804 = [];
Label12: {
var i_570425809 = 0;
var colontmp__570426554 = 0;
colontmp__570426554 = x_570425756.childNodes.length;
var i_570426555 = 0;
Label13: {
Label14: while (true) {
if (!(i_570426555 < colontmp__570426554)) break Label14;
i_570425809 = i_570426555;
if (!(isWhitespace_570425752(x_570425756.childNodes[i_570425809]))) {
idx_570425804.push(i_570425809);;
}
i_570426555 = addInt(i_570426555, 1);
}
};
};
if (!((idx_570425804).length == 2)) Temporary15 = false; else { Temporary15 = (x_570425756.childNodes[idx_570425804[chckIndx(1, 0, (idx_570425804).length - 1)]].nodeName == "UL"); } if (Temporary15) {
var e_570425825 = {heading: x_570425756.childNodes[idx_570425804[chckIndx(0, 0, (idx_570425804).length - 1)]], kids: [], sortId: (father_570425757.kids).length, doSort: false};
var it_570425826 = x_570425756.childNodes[idx_570425804[chckIndx(1, 0, (idx_570425804).length - 1)]];
Label16: {
var j_570425831 = 0;
var colontmp__570426558 = 0;
colontmp__570426558 = it_570425826.childNodes.length;
var i_570426559 = 0;
Label17: {
Label18: while (true) {
if (!(i_570426559 < colontmp__570426558)) break Label18;
j_570425831 = i_570426559;
toToc_570425755(it_570425826.childNodes[j_570425831], e_570425825);
i_570426559 = addInt(i_570426559, 1);
}
};
};
father_570425757.kids.push(e_570425825);;
}
else {
Label19: {
var i_570425840 = 0;
var colontmp__570426562 = 0;
colontmp__570426562 = x_570425756.childNodes.length;
var i_570426563 = 0;
Label20: {
Label21: while (true) {
if (!(i_570426563 < colontmp__570426562)) break Label21;
i_570425840 = i_570426563;
toToc_570425755(x_570425756.childNodes[i_570425840], father_570425757);
i_570426563 = addInt(i_570426563, 1);
}
};
};
}
}
else {
father_570425757.kids.push({heading: x_570425756, kids: [], sortId: (father_570425757.kids).length, doSort: false});;
}
}}
}
function extractItems_570425543(x_570425544, heading_570425545, items_570425546, items_570425546_Idx) {
BeforeRet: {
if ((x_570425544 == null)) {
break BeforeRet;
}
if ((!((x_570425544.heading == null)) && (x_570425544.heading.textContent == heading_570425545))) {
Label1: {
var i_570425563 = 0;
var colontmp__570426566 = 0;
colontmp__570426566 = (x_570425544.kids).length;
var i_570426567 = 0;
Label2: {
Label3: while (true) {
if (!(i_570426567 < colontmp__570426566)) break Label3;
i_570425563 = i_570426567;
items_570425546[items_570425546_Idx].push(x_570425544.kids[chckIndx(i_570425563, 0, (x_570425544.kids).length - 1)].heading);;
i_570426567 = addInt(i_570426567, 1);
}
};
};
}
else {
Label4: {
var k_570425589 = null;
var i_570426571 = 0;
var L_570426572 = (x_570425544.kids).length;
Label5: {
Label6: while (true) {
if (!(i_570426571 < L_570426572)) break Label6;
k_570425589 = x_570425544.kids[chckIndx(i_570426571, 0, (x_570425544.kids).length - 1)];
extractItems_570425543(k_570425589, heading_570425545, items_570425546, items_570425546_Idx);
i_570426571 = addInt(i_570426571, 1);
if (!(((x_570425544.kids).length == L_570426572))) {
failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
}
};
}
function tree_570425474(tag_570425475, kids_570425476) {
var result_570425477 = null;
result_570425477 = document.createElement(tag_570425475);
Label1: {
var k_570425491 = null;
var i_570426584 = 0;
Label2: {
Label3: while (true) {
if (!(i_570426584 < (kids_570425476).length)) break Label3;
k_570425491 = kids_570425476[chckIndx(i_570426584, 0, (kids_570425476).length - 1)];
result_570425477.appendChild(k_570425491);
i_570426584 = addInt(i_570426584, 1);
}
};
};
return result_570425477;
}
function text_570425499(s_570425500) {
var result_570425501 = null;
result_570425501 = document.createTextNode(s_570425500);
return result_570425501;
}
function uncovered_570425944(x_570425945) {
var Temporary1;
var result_570425946 = null;
BeforeRet: {
if ((((x_570425945.kids).length == 0) && !((x_570425945.heading == null)))) {
if (!(x_570425945.heading.hasOwnProperty('__karaxMarker__'))) {
Temporary1 = x_570425945;
}
else {
Temporary1 = null;
}
result_570425946 = Temporary1;
break BeforeRet;
}
result_570425946 = {heading: x_570425945.heading, kids: [], sortId: x_570425945.sortId, doSort: x_570425945.doSort};
Label2: {
var k_570425961 = null;
var i_570426591 = 0;
var L_570426592 = (x_570425945.kids).length;
Label3: {
Label4: while (true) {
if (!(i_570426591 < L_570426592)) break Label4;
k_570425961 = x_570425945.kids[chckIndx(i_570426591, 0, (x_570425945.kids).length - 1)];
var y_570425962 = uncovered_570425944(k_570425961);
if (!((y_570425962 == null))) {
result_570425946.kids.push(y_570425962);;
}
i_570426591 = addInt(i_570426591, 1);
if (!(((x_570425945.kids).length == L_570426592))) {
failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
if (((result_570425946.kids).length == 0)) {
result_570425946 = null;
}
};
return result_570425946;
}
function mergeTocs_570425974(orig_570425975, news_570425976) {
var result_570425977 = null;
result_570425977 = uncovered_570425944(orig_570425975);
if ((result_570425977 == null)) {
result_570425977 = news_570425976;
}
else {
Label1: {
var i_570425989 = 0;
var colontmp__570426587 = 0;
colontmp__570426587 = (news_570425976.kids).length;
var i_570426588 = 0;
Label2: {
Label3: while (true) {
if (!(i_570426588 < colontmp__570426587)) break Label3;
i_570425989 = i_570426588;
result_570425977.kids.push(news_570425976.kids[chckIndx(i_570425989, 0, (news_570425976.kids).length - 1)]);;
i_570426588 = addInt(i_570426588, 1);
}
};
};
}
return result_570425977;
}
function buildToc_570425994(orig_570425995, types_570425996, procs_570425997) {
var result_570425998 = null;
var newStuff_570426003 = {heading: null, kids: [], doSort: true, sortId: 0};
Label1: {
var t_570426007 = null;
var i_570426579 = 0;
var L_570426580 = (types_570425996).length;
Label2: {
Label3: while (true) {
if (!(i_570426579 < L_570426580)) break Label3;
t_570426007 = types_570425996[chckIndx(i_570426579, 0, (types_570425996).length - 1)];
var c_570426012 = {heading: t_570426007.cloneNode(true), kids: [], doSort: true, sortId: 0};
t_570426007.__karaxMarker__ = true;
Label4: {
var p_570426016 = null;
var i_570426576 = 0;
var L_570426577 = (procs_570425997).length;
Label5: {
Label6: while (true) {
if (!(i_570426576 < L_570426577)) break Label6;
p_570426016 = procs_570425997[chckIndx(i_570426576, 0, (procs_570425997).length - 1)];
if (!(p_570426016.hasOwnProperty('__karaxMarker__'))) {
var xx_570426017 = p_570426016.parentNode.getElementsByClassName("attachedType");
if ((((xx_570426017).length == 1) && (xx_570426017[chckIndx(0, 0, (xx_570426017).length - 1)].textContent == t_570426007.textContent))) {
var q_570426022 = tree_570425474("A", [text_570425499(p_570426016.title)]);
q_570426022.setAttribute("href", p_570426016.getAttribute("href"));
c_570426012.kids.push({heading: q_570426022, kids: [], sortId: 0, doSort: false});;
p_570426016.__karaxMarker__ = true;
}
}
i_570426576 = addInt(i_570426576, 1);
if (!(((procs_570425997).length == L_570426577))) {
failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
newStuff_570426003.kids.push(c_570426012);;
i_570426579 = addInt(i_570426579, 1);
if (!(((types_570425996).length == L_570426580))) {
failedAssertImpl_268435541(makeNimstrLit("iterators.nim(246, 11) `len(a) == L` the length of the seq changed while iterating over it"));
}
}
};
};
result_570425998 = mergeTocs_570425974(orig_570425995, newStuff_570426003);
return result_570425998;
}
function add_570425492(parent_570425493, kid_570425494) {
if (((parent_570425493.nodeName == "TR") && ((kid_570425494.nodeName == "TD") || (kid_570425494.nodeName == "TH")))) {
var k_570425495 = document.createElement("TD");
k_570425495.appendChild(kid_570425494);
parent_570425493.appendChild(k_570425495);
}
else {
parent_570425493.appendChild(kid_570425494);
}
}
function setClass_570425496(e_570425497, value_570425498) {