-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
htmlAntiCopy.js
1589 lines (1271 loc) · 54.6 KB
/
htmlAntiCopy.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 v1.5.1 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
var NTI620757493 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI33555124 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555114 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555125 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33554456 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI889192520 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI889192527 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI33555130 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555121 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI603979779 = {size: 0,kind: 43,base: null,node: null,finalizer: null};
var NTI603979780 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI33555120 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555122 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555083 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555165 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33554440 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
var NTI33555164 = {size: 0, kind: 22, base: null, node: null, finalizer: null};
var NTI33555112 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555113 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33555128 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI33554439 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
var NNI33555128 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555128.node = NNI33555128;
var NNI33555113 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555113.node = NNI33555113;
NTI33555164.base = NTI33555112;
NTI33555165.base = NTI33555112;
var NNI33555112 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI33555164, name: "parent", sons: null},
{kind: 1, offset: "name", len: 0, typ: NTI33554440, name: "name", sons: null},
{kind: 1, offset: "message", len: 0, typ: NTI33554439, name: "msg", sons: null},
{kind: 1, offset: "trace", len: 0, typ: NTI33554439, name: "trace", sons: null},
{kind: 1, offset: "up", len: 0, typ: NTI33555165, name: "up", sons: null}]};
NTI33555112.node = NNI33555112;
var NNI33555083 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555083.node = NNI33555083;
NTI33555112.base = NTI33555083;
NTI33555113.base = NTI33555112;
NTI33555128.base = NTI33555113;
var NNI33555122 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555122.node = NNI33555122;
var NNI33555120 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555120.node = NNI33555120;
NTI33555120.base = NTI33555113;
NTI33555122.base = NTI33555120;
var NNI603979780 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a0", len: 0, typ: NTI603979779, name: "a0", sons: null},
{kind: 1, offset: "a1", len: 0, typ: NTI603979779, name: "a1", sons: null}]};
NTI603979780.node = NNI603979780;
var NNI33555121 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555121.node = NNI33555121;
NTI33555121.base = NTI33555120;
var NNI33555130 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555130.node = NNI33555130;
NTI33555130.base = NTI33555113;
var NNI889192527 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI889192520, name: "a", sons: null},
{kind: 1, offset: "b", len: 0, typ: NTI33554456, name: "b", sons: null}]};
NTI889192527.node = NNI889192527;
var NNI33555125 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555125.node = NNI33555125;
var NNI33555114 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555114.node = NNI33555114;
NTI33555114.base = NTI33555112;
NTI33555125.base = NTI33555114;
var NNI33555124 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI33555124.node = NNI33555124;
NTI33555124.base = NTI33555113;
var NNI620757493 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "a", len: 0, typ: NTI33554456, name: "a", sons: null},
{kind: 1, offset: "b", len: 0, typ: NTI33554456, name: "b", sons: null}]};
NTI620757493.node = NNI620757493;
var helper_603979827 = new Uint32Array([3198944359, 3630892171]);
function makeNimstrLit(c_33556797) {
var result = [];
for (var i = 0; i < c_33556797.length; ++i) {
result[i] = c_33556797.charCodeAt(i);
}
return result;
}
function cstrToNimstr(c_33556800) {
var ln = c_33556800.length;
var result = new Array(ln);
var r = 0;
for (var i = 0; i < ln; ++i) {
var ch = c_33556800.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_33556800.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;
}
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_33557136, src_33557137, ti_33557138) {
var result_33557147 = null;
switch (ti_33557138.kind) {
case 21:
case 22:
case 23:
case 5:
if (!(isFatPointer_33557127(ti_33557138))) {
result_33557147 = src_33557137;
}
else {
result_33557147 = [src_33557137[0], src_33557137[1]];
}
break;
case 19:
if (dest_33557136 === null || dest_33557136 === undefined) {
dest_33557136 = {};
}
else {
for (var key in dest_33557136) { delete dest_33557136[key]; }
}
for (var key in src_33557137) { dest_33557136[key] = src_33557137[key]; }
result_33557147 = dest_33557136;
break;
case 18:
case 17:
if (!((ti_33557138.base == null))) {
result_33557147 = nimCopy(dest_33557136, src_33557137, ti_33557138.base);
}
else {
if ((ti_33557138.kind == 17)) {
result_33557147 = (dest_33557136 === null || dest_33557136 === undefined) ? {m_type: ti_33557138} : dest_33557136;
}
else {
result_33557147 = (dest_33557136 === null || dest_33557136 === undefined) ? {} : dest_33557136;
}
}
nimCopyAux(result_33557147, src_33557137, ti_33557138.node);
break;
case 24:
case 4:
case 27:
case 16:
if (src_33557137 === null) {
result_33557147 = null;
}
else {
if (dest_33557136 === null || dest_33557136 === undefined) {
dest_33557136 = new Array(src_33557137.length);
}
else {
dest_33557136.length = src_33557137.length;
}
result_33557147 = dest_33557136;
for (var i = 0; i < src_33557137.length; ++i) {
result_33557147[i] = nimCopy(result_33557147[i], src_33557137[i], ti_33557138.base);
}
}
break;
case 28:
if (src_33557137 !== null) {
result_33557147 = src_33557137.slice(0);
}
break;
default:
result_33557147 = src_33557137;
break;
}
return result_33557147;
}
function toJSStr(s_33556803) {
var Temporary5;
var Temporary7;
var result_33556804 = null;
var res_33556838 = newSeq_33556821((s_33556803).length);
var i_33556839 = 0;
var j_33556840 = 0;
Label1: do {
Label2: while (true) {
if (!(i_33556839 < (s_33556803).length)) break Label2;
var c_33556841 = s_33556803[i_33556839];
if ((c_33556841 < 128)) {
res_33556838[j_33556840] = String.fromCharCode(c_33556841);
i_33556839 += 1;
}
else {
var helper_33556853 = newSeq_33556821(0);
Label3: do {
Label4: while (true) {
if (!true) break Label4;
var code_33556854 = c_33556841.toString(16);
if ((((code_33556854) == null ? 0 : (code_33556854).length) == 1)) {
helper_33556853.push("%0");;
}
else {
helper_33556853.push("%");;
}
helper_33556853.push(code_33556854);;
i_33556839 += 1;
if (((s_33556803).length <= i_33556839)) Temporary5 = true; else { Temporary5 = (s_33556803[i_33556839] < 128); } if (Temporary5) {
break Label3;
}
c_33556841 = s_33556803[i_33556839];
}
} while (false);
++excHandler;
Temporary7 = framePtr;
try {
res_33556838[j_33556840] = decodeURIComponent(helper_33556853.join(""));
--excHandler;
} catch (EXCEPTION) {
var prevJSError = lastJSError;
lastJSError = EXCEPTION;
--excHandler;
framePtr = Temporary7;
res_33556838[j_33556840] = helper_33556853.join("");
lastJSError = prevJSError;
} finally {
framePtr = Temporary7;
}
}
j_33556840 += 1;
}
} while (false);
if (res_33556838.length < j_33556840) { for (var i = res_33556838.length ; i < j_33556840 ; ++i) res_33556838.push(null); }
else { res_33556838.length = j_33556840; };
result_33556804 = res_33556838.join("");
return result_33556804;
}
function raiseException(e_33556664, ename_33556665) {
e_33556664.name = ename_33556665;
if ((excHandler == 0)) {
unhandledException(e_33556664);
}
throw e_33556664;
}
function chckIndx(i_33557180, a_33557181, b_33557182) {
var Temporary1;
var result_33557183 = 0;
BeforeRet: do {
if (!(a_33557181 <= i_33557180)) Temporary1 = false; else { Temporary1 = (i_33557180 <= b_33557182); } if (Temporary1) {
result_33557183 = i_33557180;
break BeforeRet;
}
else {
raiseIndexError(i_33557180, a_33557181, b_33557182);
}
} while (false);
return result_33557183;
}
function addInt(a_33556936, b_33556937) {
var result = a_33556936 + b_33556937;
checkOverflowInt(result);
return result;
}
function mnewString(len_33556889) {
return new Array(len_33556889);
}
var ConstSet2 = setConstr(60, 62, 94);
var ConstSet3 = setConstr(60, 62, 94);
var ConstSet4 = setConstr(45, 43, 32);
var ConstSet5 = setConstr([48, 57]);
var ConstSet6 = setConstr([48, 57]);
var ConstSet7 = setConstr([48, 57]);
function subInt(a_33556940, b_33556941) {
var result = a_33556940 - b_33556941;
checkOverflowInt(result);
return result;
}
function divInt(a_33556948, b_33556949) {
if (b_33556949 == 0) raiseDivByZero();
if (b_33556949 == -1 && a_33556948 == 2147483647) raiseOverflow();
return Math.trunc(a_33556948 / b_33556949);
}
function mulInt(a_33556944, b_33556945) {
var result = a_33556944 * b_33556945;
checkOverflowInt(result);
return result;
}
var ConstSet8 = setConstr([65, 90], [97, 122]);
function chckRange(i_33557185, a_33557186, b_33557187) {
var Temporary1;
var result_33557188 = 0;
BeforeRet: do {
if (!(a_33557186 <= i_33557185)) Temporary1 = false; else { Temporary1 = (i_33557185 <= b_33557187); } if (Temporary1) {
result_33557188 = i_33557185;
break BeforeRet;
}
else {
raiseRangeError();
}
} while (false);
return result_33557188;
}
function addChar(x_33557251, c_33557252) {
x_33557251.push(c_33557252);
}
function SetCard(a_33556892) {
var result = 0;
for (var elem in a_33556892) { ++result; }
return result;
}
var ConstSet9 = setConstr([97, 122], [65, 90], [48, 57], 95);
var ConstSet10 = setConstr([65, 90], [97, 122]);
var ConstSet11 = setConstr(32, [48, 57], [65, 90], 95, [97, 122]);
function nimCharToStr(x_33556514) {
var result_33556515 = [];
result_33556515 = nimCopy(null, mnewString(1), NTI33554439);
result_33556515[0] = x_33556514;
return result_33556515;
}
if (!Math.trunc) {
Math.trunc = function(v) {
v = +v;
if (!isFinite(v)) return v;
return (v - v % 1) || (v < 0 ? -0 : v === 0 ? v : 0);
};
}
var state_603979789 = [{a0: 1773455756, a1: 4275166512}];
if (globalThis.utcInstance_822085002 === undefined) {
utcInstance_822085002 = [null];
}
if (globalThis.localInstance_822085003 === undefined) {
localInstance_822085003 = [null];
}
function toFloat_33556001(i_33556002) {
var result_33556003 = 0.0;
result_33556003 = i_33556002;
return result_33556003;
}
function HEX2F_33557570(x_33557571, y_33557572) {
var result_33557573 = 0.0;
result_33557573 = (toFloat_33556001(x_33557571) / toFloat_33556001(y_33557572));
return result_33557573;
}
function epochTime_822086984() {
var result_822086985 = 0.0;
result_822086985 = HEX2F_33557570(new Date().getTime(), 1000);
return result_822086985;
}
function isFatPointer_33557127(ti_33557128) {
var result_33557129 = false;
BeforeRet: do {
result_33557129 = !((ConstSet1[ti_33557128.base.kind] != undefined));
break BeforeRet;
} while (false);
return result_33557129;
}
function nimCopyAux(dest_33557140, src_33557141, n_33557142) {
switch (n_33557142.kind) {
case 0:
break;
case 1:
dest_33557140[n_33557142.offset] = nimCopy(dest_33557140[n_33557142.offset], src_33557141[n_33557142.offset], n_33557142.typ);
break;
case 2:
for (var i = 0; i < n_33557142.sons.length; i++) {
nimCopyAux(dest_33557140, src_33557141, n_33557142.sons[i]);
}
break;
case 3:
dest_33557140[n_33557142.offset] = nimCopy(dest_33557140[n_33557142.offset], src_33557141[n_33557142.offset], n_33557142.typ);
for (var i = 0; i < n_33557142.sons.length; ++i) {
nimCopyAux(dest_33557140, src_33557141, n_33557142.sons[i][1]);
}
break;
}
}
function add_33556420(x_33556421, x_33556421_Idx, y_33556422) {
if (x_33556421[x_33556421_Idx] === null) { x_33556421[x_33556421_Idx] = []; }
var off = x_33556421[x_33556421_Idx].length;
x_33556421[x_33556421_Idx].length += y_33556422.length;
for (var i = 0; i < y_33556422.length; ++i) {
x_33556421[x_33556421_Idx][off+i] = y_33556422.charCodeAt(i);
}
}
function newSeq_33556821(len_33556823) {
var result_33556824 = [];
result_33556824 = new Array(len_33556823); for (var i = 0 ; i < len_33556823 ; ++i) { result_33556824[i] = null; }
return result_33556824;
}
function unhandledException(e_33556660) {
var buf_33556661 = [[]];
if (!(((e_33556660.message).length == 0))) {
buf_33556661[0].push.apply(buf_33556661[0], makeNimstrLit("Error: unhandled exception: "));;
buf_33556661[0].push.apply(buf_33556661[0], e_33556660.message);;
}
else {
buf_33556661[0].push.apply(buf_33556661[0], makeNimstrLit("Error: unhandled exception"));;
}
buf_33556661[0].push.apply(buf_33556661[0], makeNimstrLit(" ["));;
add_33556420(buf_33556661, 0, e_33556660.name);
buf_33556661[0].push.apply(buf_33556661[0], makeNimstrLit("]\x0A"));;
var cbuf_33556662 = toJSStr(buf_33556661[0]);
framePtr = null;
if (typeof(Error) !== "undefined") {
throw new Error(cbuf_33556662);
}
else {
throw cbuf_33556662;
}
}
function raiseIndexError(i_33556751, a_33556752, b_33556753) {
var Temporary1;
if ((b_33556753 < a_33556752)) {
Temporary1 = makeNimstrLit("index out of bounds, the container is empty");
}
else {
Temporary1 = (makeNimstrLit("index ") || []).concat(cstrToNimstr((i_33556751) + "") || [],makeNimstrLit(" not in ") || [],cstrToNimstr((a_33556752) + "") || [],makeNimstrLit(" .. ") || [],cstrToNimstr((b_33556753) + "") || []);
}
raiseException({message: nimCopy(null, Temporary1, NTI33554439), parent: null, m_type: NTI33555128, name: null, trace: [], up: null}, "IndexDefect");
}
function rotl_603979804(x_603979805, k_603979806) {
var result_603979807 = 0;
result_603979807 = ((x_603979805 << k_603979806) | (x_603979805 >>> ((64 - k_603979806) >>> 0)));
return result_603979807;
}
function next_603979816(r_603979817) {
var result_603979818 = 0;
var s0_603979819 = r_603979817.a0;
var s1_603979820 = r_603979817.a1;
result_603979818 = ((s0_603979819 + s1_603979820) >>> 0);
s1_603979820 = (s1_603979820 ^ s0_603979819);
r_603979817.a0 = ((rotl_603979804(s0_603979819, 55) ^ s1_603979820) ^ (s1_603979820 << 14));
r_603979817.a1 = rotl_603979804(s1_603979820, 36);
return result_603979818;
}
function raiseOverflow() {
raiseException({message: makeNimstrLit("over- or underflow"), parent: null, m_type: NTI33555122, name: null, trace: [], up: null}, "OverflowDefect");
}
function checkOverflowInt(a_33556934) {
if (a_33556934 > 2147483647 || a_33556934 < -2147483648) raiseOverflow();
}
function skipRandomNumbers_603979825(s_603979826) {
var s0_603979828 = 0;
var s1_603979829 = 0;
Label1: do {
var i_603979838 = 0;
var res_486539381 = 0;
Label2: do {
Label3: while (true) {
if (!(res_486539381 <= 1)) break Label3;
i_603979838 = res_486539381;
Label4: do {
var b_603979843 = 0;
var i_486539379 = 0;
Label5: do {
Label6: while (true) {
if (!(i_486539379 < 64)) break Label6;
b_603979843 = i_486539379;
if (!(((helper_603979827[chckIndx(i_603979838, 0, (helper_603979827).length - 1)] & (1 << b_603979843)) == 0))) {
s0_603979828 = (s0_603979828 ^ s_603979826.a0);
s1_603979829 = (s1_603979829 ^ s_603979826.a1);
}
var _ = next_603979816(s_603979826);
i_486539379 = addInt(i_486539379, 1);
}
} while (false);
} while (false);
res_486539381 = addInt(res_486539381, 1);
}
} while (false);
} while (false);
s_603979826.a0 = s0_603979828;
s_603979826.a1 = s1_603979829;
}
function initRand_603979992(seed_603979993) {
var Temporary1;
var result_603979994 = [({a0: 0, a1: 0})];
if (!((seed_603979993 == 0))) {
Temporary1 = seed_603979993;
}
else {
Temporary1 = 2147483647;
}
var seed_603980000 = Temporary1;
result_603979994[0].a0 = Math.floor(seed_603980000 / Math.pow(2, 16));
result_603979994[0].a1 = (seed_603980000 & 65535);
skipRandomNumbers_603979825(result_603979994[0]);
var _ = next_603979816(result_603979994[0]);
return result_603979994[0];
}
function initRand_603980017() {
var result_603980018 = ({a0: 0, a1: 0});
var time_603980019 = ((epochTime_822086984() * 1000.0) & 2147483647);
result_603980018 = nimCopy(result_603980018, initRand_603979992(time_603980019), NTI603979780);
return result_603980018;
}
function randomize_603980024() {
state_603979789[0] = nimCopy(state_603979789[0], initRand_603980017(), NTI603979780);
}
randomize_603980024();
function raiseDivByZero() {
raiseException({message: makeNimstrLit("division by zero"), parent: null, m_type: NTI33555121, name: null, trace: [], up: null}, "DivByZeroDefect");
}
function parseSaturatedNatural_872415548(s_872415549, b_872415550, b_872415550_Idx, start_872415551) {
var Temporary1;
var Temporary4;
var result_872415552 = 0;
var i_872415553 = start_872415551;
if (((i_872415553 < (s_872415549).length) && (s_872415549[chckIndx(i_872415553, 0, (s_872415549).length - 1)] == 43))) {
i_872415553 = addInt(i_872415553, 1);
}
if (!(i_872415553 < (s_872415549).length)) Temporary1 = false; else { Temporary1 = (ConstSet6[s_872415549[chckIndx(i_872415553, 0, (s_872415549).length - 1)]] != undefined); } if (Temporary1) {
b_872415550[b_872415550_Idx] = 0;
Label2: do {
Label3: while (true) {
if (!(i_872415553 < (s_872415549).length)) Temporary4 = false; else { Temporary4 = (ConstSet7[s_872415549[chckIndx(i_872415553, 0, (s_872415549).length - 1)]] != undefined); } if (!Temporary4) break Label3;
var c_872415572 = subInt(s_872415549[chckIndx(i_872415553, 0, (s_872415549).length - 1)], 48);
if ((b_872415550[b_872415550_Idx] <= divInt(subInt(2147483647, c_872415572), 10))) {
b_872415550[b_872415550_Idx] = addInt(mulInt(b_872415550[b_872415550_Idx], 10), c_872415572);
}
else {
b_872415550[b_872415550_Idx] = 2147483647;
}
i_872415553 = addInt(i_872415553, 1);
Label5: do {
Label6: while (true) {
if (!((i_872415553 < (s_872415549).length) && (s_872415549[chckIndx(i_872415553, 0, (s_872415549).length - 1)] == 95))) break Label6;
i_872415553 = addInt(i_872415553, 1);
}
} while (false);
}
} while (false);
result_872415552 = subInt(i_872415553, start_872415551);
}
return result_872415552;
}
function raiseRangeError() {
raiseException({message: makeNimstrLit("value out of range"), parent: null, m_type: NTI33555130, name: null, trace: [], up: null}, "RangeDefect");
}
function HEX5BHEX5D_956304538(s_956304541, x_956304542) {
var result_956304543 = [];
var a_956304545 = x_956304542.a;
var L_956304547 = addInt(subInt(subInt((s_956304541).length, x_956304542.b), a_956304545), 1);
result_956304543 = nimCopy(null, mnewString(chckRange(L_956304547, 0, 2147483647)), NTI33554439);
Label1: do {
var i_956304552 = 0;
var i_486539570 = 0;
Label2: do {
Label3: while (true) {
if (!(i_486539570 < L_956304547)) break Label3;
i_956304552 = i_486539570;
result_956304543[chckIndx(i_956304552, 0, (result_956304543).length - 1)] = s_956304541[chckIndx(addInt(i_956304552, a_956304545), 0, (s_956304541).length - 1)];
i_486539570 = addInt(i_486539570, 1);
}
} while (false);
} while (false);
return result_956304543;
}
function HEX2EHEX2E_889192528(a_889192531, b_889192532) {
var result_889192535 = ({a: 0, b: 0});
result_889192535 = nimCopy(result_889192535, {a: a_889192531, b: b_889192532}, NTI889192527);
return result_889192535;
}
function parseStandardFormatSpecifier_1056964666(s_1056964667, start_1056964668, ignoreUnknownSuffix_1056964669) {
var Temporary1;
var Temporary2;
var Temporary3;
var result_1056964670 = ({fill: 0, align: 0, sign: 0, alternateForm: false, padWithZero: false, minimumWidth: 0, precision: 0, typ: 0, endPosition: 0});
result_1056964670.fill = 32;
result_1056964670.align = 0;
result_1056964670.sign = 45;
var i_1056964672 = start_1056964668;
if (((addInt(i_1056964672, 1) < (s_1056964667).length) && (ConstSet2[s_1056964667[chckIndx(addInt(i_1056964672, 1), 0, (s_1056964667).length - 1)]] != undefined))) {
result_1056964670.fill = s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)];
result_1056964670.align = s_1056964667[chckIndx(addInt(i_1056964672, 1), 0, (s_1056964667).length - 1)];
i_1056964672 = addInt(i_1056964672, 2);
}
else {
if (((i_1056964672 < (s_1056964667).length) && (ConstSet3[s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)]] != undefined))) {
result_1056964670.align = s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)];
i_1056964672 = addInt(i_1056964672, 1);
}
}
if (((i_1056964672 < (s_1056964667).length) && (ConstSet4[s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)]] != undefined))) {
result_1056964670.sign = s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)];
i_1056964672 = addInt(i_1056964672, 1);
}
if (((i_1056964672 < (s_1056964667).length) && (s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)] == 35))) {
result_1056964670.alternateForm = true;
i_1056964672 = addInt(i_1056964672, 1);
}
if (!((addInt(i_1056964672, 1) < (s_1056964667).length) && (s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)] == 48))) Temporary1 = false; else { Temporary1 = (ConstSet5[s_1056964667[chckIndx(addInt(i_1056964672, 1), 0, (s_1056964667).length - 1)]] != undefined); } if (Temporary1) {
result_1056964670.padWithZero = true;
i_1056964672 = addInt(i_1056964672, 1);
}
var parsedLength_1056964709 = parseSaturatedNatural_872415548(s_1056964667, result_1056964670, "minimumWidth", i_1056964672);
i_1056964672 = addInt(i_1056964672, parsedLength_1056964709);
if (((i_1056964672 < (s_1056964667).length) && (s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)] == 46))) {
i_1056964672 = addInt(i_1056964672, 1);
var parsedLengthB_1056964718 = parseSaturatedNatural_872415548(s_1056964667, result_1056964670, "precision", i_1056964672);
i_1056964672 = addInt(i_1056964672, parsedLengthB_1056964718);
}
else {
result_1056964670.precision = -1;
}
if (!(i_1056964672 < (s_1056964667).length)) Temporary2 = false; else { Temporary2 = (ConstSet8[s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)]] != undefined); } if (Temporary2) {
result_1056964670.typ = s_1056964667[chckIndx(i_1056964672, 0, (s_1056964667).length - 1)];
i_1056964672 = addInt(i_1056964672, 1);
}
result_1056964670.endPosition = i_1056964672;
if (!!((i_1056964672 == (s_1056964667).length))) Temporary3 = false; else { Temporary3 = !(ignoreUnknownSuffix_1056964669); } if (Temporary3) {
raiseException({message: (makeNimstrLit("invalid format string, cannot parse: ") || []).concat(HEX5BHEX5D_956304538(s_1056964667, HEX2EHEX2E_889192528(i_1056964672, 1)) || []), parent: null, m_type: NTI33555125, name: null, trace: [], up: null}, "ValueError");
}
return result_1056964670;
}
function nucruneLen(s_956301322) {
var result_956301323 = 0;
result_956301323 = 0;
var i_956301324 = 0;
Label1: do {
Label2: while (true) {
if (!(i_956301324 < (s_956301322).length)) break Label2;
if ((s_956301322[chckIndx(i_956301324, 0, (s_956301322).length - 1)] <= 127)) {
i_956301324 = addInt(i_956301324, 1);
}
else {
if (((s_956301322[chckIndx(i_956301324, 0, (s_956301322).length - 1)] >>> 5) == 6)) {
i_956301324 = addInt(i_956301324, 2);
}
else {
if (((s_956301322[chckIndx(i_956301324, 0, (s_956301322).length - 1)] >>> 4) == 14)) {
i_956301324 = addInt(i_956301324, 3);
}
else {
if (((s_956301322[chckIndx(i_956301324, 0, (s_956301322).length - 1)] >>> 3) == 30)) {
i_956301324 = addInt(i_956301324, 4);
}
else {
if (((s_956301322[chckIndx(i_956301324, 0, (s_956301322).length - 1)] >>> 2) == 62)) {
i_956301324 = addInt(i_956301324, 5);
}
else {
if (((s_956301322[chckIndx(i_956301324, 0, (s_956301322).length - 1)] >>> 1) == 126)) {
i_956301324 = addInt(i_956301324, 6);
}
else {
i_956301324 = addInt(i_956301324, 1);
}
}}}}}
result_956301323 = addInt(result_956301323, 1);
}
} while (false);
return result_956301323;
}
function runeLenAt_956301377(s_956301378, i_956301379) {
var result_956301380 = 0;
if ((s_956301378[chckIndx(i_956301379, 0, (s_956301378).length - 1)] <= 127)) {
result_956301380 = 1;
}
else {
if (((s_956301378[chckIndx(i_956301379, 0, (s_956301378).length - 1)] >>> 5) == 6)) {
result_956301380 = 2;
}
else {
if (((s_956301378[chckIndx(i_956301379, 0, (s_956301378).length - 1)] >>> 4) == 14)) {
result_956301380 = 3;
}
else {
if (((s_956301378[chckIndx(i_956301379, 0, (s_956301378).length - 1)] >>> 3) == 30)) {
result_956301380 = 4;
}
else {
if (((s_956301378[chckIndx(i_956301379, 0, (s_956301378).length - 1)] >>> 2) == 62)) {
result_956301380 = 5;
}
else {
if (((s_956301378[chckIndx(i_956301379, 0, (s_956301378).length - 1)] >>> 1) == 126)) {
result_956301380 = 6;
}
else {
result_956301380 = 1;
}
}}}}}
return result_956301380;
}
function runeOffset_956301949(s_956301950, pos_956301951, start_956301952) {
var result_956301953 = 0;
BeforeRet: do {
var i_956301954 = 0;
var o_956301955 = start_956301952;
Label1: do {
Label2: while (true) {
if (!(i_956301954 < pos_956301951)) break Label2;
o_956301955 = addInt(o_956301955, chckRange(runeLenAt_956301377(s_956301950, o_956301955), 0, 2147483647));
if (((s_956301950).length <= o_956301955)) {
result_956301953 = -1;
break BeforeRet;
}
i_956301954 = addInt(i_956301954, 1);
}
} while (false);
result_956301953 = o_956301955;
break BeforeRet;
} while (false);
return result_956301953;
}
function validateUtf8_956301589(s_956301590) {
var Temporary3;
var Temporary4;
var Temporary5;
var Temporary6;
var Temporary7;
var Temporary8;
var result_956301591 = 0;
BeforeRet: do {
var i_956301592 = 0;
var L_956301593 = (s_956301590).length;
Label1: do {
Label2: while (true) {
if (!(i_956301592 < L_956301593)) break Label2;
if ((s_956301590[chckIndx(i_956301592, 0, (s_956301590).length - 1)] <= 127)) {
i_956301592 = addInt(i_956301592, 1);
}
else {
if (((s_956301590[chckIndx(i_956301592, 0, (s_956301590).length - 1)] >>> 5) == 6)) {
if ((s_956301590[chckIndx(i_956301592, 0, (s_956301590).length - 1)] < 194)) {
result_956301591 = i_956301592;
break BeforeRet;
}
if (!(addInt(i_956301592, 1) < L_956301593)) Temporary3 = false; else { Temporary3 = ((s_956301590[chckIndx(addInt(i_956301592, 1), 0, (s_956301590).length - 1)] >>> 6) == 2); } if (Temporary3) {
i_956301592 = addInt(i_956301592, 2);
}
else {
result_956301591 = i_956301592;
break BeforeRet;
}
}
else {
if (((s_956301590[chckIndx(i_956301592, 0, (s_956301590).length - 1)] >>> 4) == 14)) {
if (!(addInt(i_956301592, 2) < L_956301593)) Temporary5 = false; else { Temporary5 = ((s_956301590[chckIndx(addInt(i_956301592, 1), 0, (s_956301590).length - 1)] >>> 6) == 2); } if (!Temporary5) Temporary4 = false; else { Temporary4 = ((s_956301590[chckIndx(addInt(i_956301592, 2), 0, (s_956301590).length - 1)] >>> 6) == 2); } if (Temporary4) {
i_956301592 = addInt(i_956301592, 3);
}
else {
result_956301591 = i_956301592;
break BeforeRet;
}
}
else {
if (((s_956301590[chckIndx(i_956301592, 0, (s_956301590).length - 1)] >>> 3) == 30)) {
if (!(addInt(i_956301592, 3) < L_956301593)) Temporary8 = false; else { Temporary8 = ((s_956301590[chckIndx(addInt(i_956301592, 1), 0, (s_956301590).length - 1)] >>> 6) == 2); } if (!Temporary8) Temporary7 = false; else { Temporary7 = ((s_956301590[chckIndx(addInt(i_956301592, 2), 0, (s_956301590).length - 1)] >>> 6) == 2); } if (!Temporary7) Temporary6 = false; else { Temporary6 = ((s_956301590[chckIndx(addInt(i_956301592, 3), 0, (s_956301590).length - 1)] >>> 6) == 2); } if (Temporary6) {
i_956301592 = addInt(i_956301592, 4);
}
else {
result_956301591 = i_956301592;
break BeforeRet;
}
}
else {
result_956301591 = i_956301592;
break BeforeRet;
}
}}}
}
} while (false);
result_956301591 = -1;
break BeforeRet;
} while (false);
return result_956301591;
}
function nsuRepeatChar(c_838861819, count_838861820) {
var result_838861821 = [];
result_838861821 = nimCopy(null, mnewString(count_838861820), NTI33554439);
Label1: do {
var i_838861826 = 0;