-
Notifications
You must be signed in to change notification settings - Fork 39
/
factorio.js
2224 lines (2224 loc) · 99.6 KB
/
factorio.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 js_of_ocaml 2.8.4
(function(ai){"use strict";var
eL="%Li",a3=254,S=255,e3=224,fj=2147483647,fa="Invalid_argument",fu='"',al=16777215,br=616096519,bq=250,ft="<",bS="Basic Oil Processing",bu=1024,j=0.5,c1=65599,eV="jsError",e$="%ni",eK="input",fi="r",fh=246,cS="Solid Fuel",a2=862212904,dd=512,eU="End_of_file",fs=120,eT="Failure",fA="infinity",dc="Steel Furnace",c0="Chemical Plant",fJ="result",db="Advanced Oil Processing + Cracking",f="",fg="Stack_overflow",X=128,eS="Shared Resources",e2="goals",v=100,W="0",Q=248,fz="Offshore Pump",ff="Not_found",e9="Sys_blocked_io",e_="p",ar="outputh1",fy=103,da="oilprocessing",fI="fd ",fH=1023,e1="Match_failure",cQ="Rocket Silo",fG="Centrifuge",E="camlinternalFormat.ml",fr="Division_by_zero",c$=">",aL=1e3,cR="Stone Furnace",fe="setvisible",bW=500,eQ=-34,eR="Sys_error",c3="Advanced Oil Processing",fq="x",az=".",e0="Battery_MK2",aK="+",cZ=3.2,bt=65535,e8=-97,bT=1073741823,cV="timeunit",e7="%u",fp="%d",eZ="%li",e6=110,fd="Energy_shield_MK2",e5="%)",c5=-184774442,fo=57343,fx=785140586,cU=127,fn=200,c4="Burner Mining Drill",bs=997943714,c_="Assembling Machine 2",e4="2",fm=982028505,ak=" ",c6="Assembling Machine 3",fF="1",c9="e",eJ="Undefined_recursive_module",eY=")",cY="Pumpjack",c8="button",a0=-132619923,bR="Electric Mining Drill",eX=-65,aM="-",cT="nan",cX="solidfuel",fl=-48,fc=" \xc3\x97 ",a1="setting",eP=240,cW=" : file already exists",fk=2048,fw=56320,fE="b",fb=32752,eW="/",fv="Assert_failure",eI=3600,eO="0x",bV=114,fD="Power_armor_MK2",eH="%i",fC="Out_of_memory",c2=767175342,bU="Electric Furnace",eM="Assembling Machine 1",eN=32768,fB="index out of bounds",c7="Petroleum Gas";function
dm(d,e,c){var
b=new
Array(c);for(var
a=0;a<c;a++)b[a]=d[e+a];return b}function
dk(b,c,a){var
d=String.fromCharCode;if(c==0&&a<=4096&&a==b.length)return d.apply(null,b);var
e=f;for(;0<a;c+=bu,a-=bu)e+=d.apply(null,dm(b,c,Math.min(a,bu)));return e}function
bY(b){if(ai.Uint8Array)var
c=new(ai.Uint8Array)(b.l);else
var
c=new
Array(b.l);var
e=b.c,d=e.length,a=0;for(;a<d;a++)c[a]=e.charCodeAt(a);for(d=b.l;a<d;a++)c[a]=0;b.c=c;b.t=4;return c}function
aa(d,e,b,f,c){if(c==0)return 0;if(f==0&&(c>=b.l||b.t==2&&c>=b.c.length)){b.c=d.t==4?dk(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else
if(b.t==2&&f==b.c.length){b.c+=d.t==4?dk(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else{if(b.t!=4)bY(b);var
g=d.c,h=b.c;if(d.t==4)if(f<=e)for(var
a=0;a<c;a++)h[f+a]=g[e+a];else
for(var
a=c-1;a>=0;a--)h[f+a]=g[e+a];else{var
i=Math.min(c,g.length-e);for(var
a=0;a<i;a++)h[f+a]=g.charCodeAt(e+a);for(;a<c;a++)h[f+a]=0}}return 0}function
sc(c,e){var
d=c.length,b=new
Array(d+1),a=0;for(;a<d;a++)b[a]=c[a];b[a]=e;return b}function
a4(b,a){if(b.fun)return a4(b.fun,a);var
c=b.length,d=a.length,e=c-d;if(e==0)return b.apply(null,a);else
if(e<0)return a4(b.apply(null,dm(a,0,c)),dm(a,c,d-c));else
return function(c){return a4(b,sc(a,c))}}function
rY(b,a){throw[0,b,a]}function
a5(b,a){if(a.repeat)return a.repeat(b);var
c=f,d=0;if(b==0)return c;for(;;){if(b&1)c+=a;b>>=1;if(b==0)return c;a+=a;d++;if(d==9)a.slice(0,1)}}function
as(a){if(a.t==2)a.c+=a5(a.l-a.c.length,"\0");else
a.c=dk(a.c,0,a.c.length);a.t=0}function
fP(a){if(a.length<24){for(var
b=0;b<a.length;b++)if(a.charCodeAt(b)>cU)return false;return true}else
return!/[^\x00-\x7f]/.test(a)}function
r8(e){for(var
k=f,c=f,h,g,i,a,b=0,j=e.length;b<j;b++){g=e.charCodeAt(b);if(g<X){for(var
d=b+1;d<j&&(g=e.charCodeAt(d))<X;d++);if(d-b>dd){c.substr(0,1);k+=c;c=f;k+=e.slice(b,d)}else
c+=e.slice(b,d);if(d==j)break;b=d}a=1;if(++b<j&&((i=e.charCodeAt(b))&-64)==X){h=i+(g<<6);if(g<e3){a=h-12416;if(a<X)a=1}else{a=2;if(++b<j&&((i=e.charCodeAt(b))&-64)==X){h=i+(h<<6);if(g<eP){a=h-925824;if(a<fk||a>=55295&&a<57344)a=2}else{a=3;if(++b<j&&((i=e.charCodeAt(b))&-64)==X&&g<245){a=i-63447168+(h<<6);if(a<65536||a>1114111)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else
if(a>bt)c+=String.fromCharCode(55232+(a>>10),fw+(a&fH));else
c+=String.fromCharCode(a);if(c.length>bu){c.substr(0,1);k+=c;c=f}}return k+c}function
r7(a){switch(a.t){case
9:return a.c;default:as(a);case
0:if(fP(a.c)){a.t=9;return a.c}a.t=8;case
8:return r8(a.c)}}function
$(c,a,b){this.t=c;this.c=a;this.l=b}$.prototype.toString=function(){return r7(this)};function
a(a){return new
$(0,a,a.length)}function
dj(c,b){rY(c,a(b))}var
G=[0];function
aO(a){dj(G.Invalid_argument,a)}function
rk(){aO(fB)}function
T(a,b){if(b>>>0>=a.length-1)rk();return a}function
rl(a){if(isFinite(a)){if(Math.abs(a)>=2.22507385850720138e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function
rC(a,b){var
c=a[3]<<16,d=b[3]<<16;if(c>d)return 1;if(c<d)return-1;if(a[2]>b[2])return 1;if(a[2]<b[2])return-1;if(a[1]>b[1])return 1;if(a[1]<b[1])return-1;return 0}function
rN(a,b){if(a<b)return-1;if(a==b)return 0;return 1}function
r2(a,b){a.t&6&&as(a);b.t&6&&as(b);return a.c<b.c?-1:a.c>b.c?1:0}function
bw(a,b,h){var
d=[];for(;;){if(!(h&&a===b))if(a
instanceof
$)if(b
instanceof
$){if(a!==b){var
c=r2(a,b);if(c!=0)return c}}else
return 1;else
if(a
instanceof
Array&&a[0]===(a[0]|0)){var
e=a[0];if(e===a3)e=0;if(e===bq){a=a[1];continue}else
if(b
instanceof
Array&&b[0]===(b[0]|0)){var
f=b[0];if(f===a3)f=0;if(f===bq){b=b[1];continue}else
if(e!=f)return e<f?-1:1;else
switch(e){case
248:var
c=rN(a[2],b[2]);if(c!=0)return c;break;case
251:aO("equal: abstract value");case
255:var
c=rC(a,b);if(c!=0)return c;break;default:if(a.length!=b.length)return a.length<b.length?-1:1;if(a.length>1)d.push(a,b,1)}}else
return 1}else
if(b
instanceof
$||b
instanceof
Array&&b[0]===(b[0]|0))return-1;else
if(typeof
a!="number"&&a&&a.compare)return a.compare(b,h);else
if(typeof
a=="function")aO("equal: functional value");else{if(a<b)return-1;if(a>b)return 1;if(a!=b){if(!h)return NaN;if(a==a)return 1;if(b==b)return-1}}if(d.length==0)return 0;var
g=d.pop();b=d.pop();a=d.pop();if(g+1<a.length)d.push(a,b,g+1);a=a[g];b=b[g]}}function
bv(a,b){return bw(a,b,true)}function
F(a){if(a<0)aO("String.create");return new
$(a?2:9,f,a)}function
ro(a,c,b,d){if(b>0)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(d==0){a.c=f;a.t=2}else{a.c=a5(b,String.fromCharCode(d));a.t=b==a.l?0:2}else{if(a.t!=4)bY(a);for(b+=c;c<b;c++)a.c[c]=d}return 0}function
rp(a,b){if(a===b)return 0;if(a<b)return-1;if(a>b)return 1;if(a===a)return 1;if(b===b)return-1;return 0}function
rn(a){dj(G.Failure,a)}function
bX(a){if((a.t&6)!=0)as(a);return a.c}function
rq(a){var
b;a=bX(a);b=+a;if(a.length>0&&b===b)return b;a=a.replace(/_/g,f);b=+a;if(a.length>0&&b===b||/^[+-]?nan$/i.test(a))return b;var
c=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)p([+-]?[0-9]+)/i.exec(a);if(c){var
d=c[3].replace(/0+$/,f),g=parseInt(c[1]+c[2]+d,16),e=(c[4]|0)-4*d.length;b=g*Math.pow(2,e);return b}if(/^\+?inf(inity)?$/i.test(a))return Infinity;if(/^-inf(inity)?$/i.test(a))return-Infinity;rn("float_of_string")}function
di(d){d=bX(d);var
e=d.length;if(e>31)aO("format_int: format too long");var
a={justify:aK,signstyle:aM,filler:ak,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var
c=0;c<e;c++){var
b=d.charAt(c);switch(b){case"-":a.justify=aM;break;case"+":case" ":a.signstyle=b;break;case"0":a.filler=W;break;case"#":a.alternate=true;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":a.width=0;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.width=a.width*10+b;c++}c--;break;case".":a.prec=0;c++;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.prec=a.prec*10+b;c++}c--;case"d":case"i":a.signedconv=true;case"u":a.base=10;break;case"x":a.base=16;break;case"X":a.base=16;a.uppercase=true;break;case"o":a.base=8;break;case"e":case"f":case"g":a.signedconv=true;a.conv=b;break;case"E":case"F":case"G":a.signedconv=true;a.uppercase=true;a.conv=b.toLowerCase();break}}return a}function
de(b,g){if(b.uppercase)g=g.toUpperCase();var
e=g.length;if(b.signedconv&&(b.sign<0||b.signstyle!=aM))e++;if(b.alternate){if(b.base==8)e+=1;if(b.base==16)e+=2}var
c=f;if(b.justify==aK&&b.filler==ak)for(var
d=e;d<b.width;d++)c+=ak;if(b.signedconv)if(b.sign<0)c+=aM;else
if(b.signstyle!=aM)c+=b.signstyle;if(b.alternate&&b.base==8)c+=W;if(b.alternate&&b.base==16)c+=eO;if(b.justify==aK&&b.filler==W)for(var
d=e;d<b.width;d++)c+=W;c+=g;if(b.justify==aM)for(var
d=e;d<b.width;d++)c+=ak;return a(c)}function
rr(i,c){var
a,e=di(i),d=e.prec<0?6:e.prec;if(c<0||c==0&&1/c==-Infinity){e.sign=-1;c=-c}if(isNaN(c)){a=cT;e.filler=ak}else
if(!isFinite(c)){a="inf";e.filler=ak}else
switch(e.conv){case"e":var
a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==c9)a=a.slice(0,b-1)+W+a.slice(b-1);break;case"f":a=c.toFixed(d);break;case"g":d=d?d:1;a=c.toExponential(d-1);var
h=a.indexOf(c9),g=+a.slice(h+1);if(g<-4||c>=1e+21||c.toFixed(0).length>d){var
b=h-1;while(a.charAt(b)==W)b--;if(a.charAt(b)==az)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==c9)a=a.slice(0,b-1)+W+a.slice(b-1);break}else{var
f=d;if(g<0){f-=g+1;a=c.toFixed(f)}else
while(a=c.toFixed(f),a.length>d+1)f--;if(f){var
b=a.length-1;while(a.charAt(b)==W)b--;if(a.charAt(b)==az)b--;a=a.slice(0,b+1)}}break}return de(e,a)}function
bZ(e,c){if(bX(e)==fp)return a(f+c);var
b=di(e);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else
c>>>=0;var
d=c.toString(b.base);if(b.prec>=0){b.filler=ak;var
g=b.prec-d.length;if(g>0)d=a5(g,W)+d}return de(b,d)}var
rW=0;function
aB(){return rW++}function
fL(a,b){return+(bw(a,b,false)>=0)}if(!Math.imul)Math.imul=function(b,a){a|=0;return((b>>16)*a<<16)+(b&bt)*a|0};var
by=Math.imul;function
am(b,a){a=by(a,3432918353|0);a=a<<15|a>>>32-15;a=by(a,461845907);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(3864292196|0)|0}function
rw(b,a){var
d=a[1]|a[2]<<24,c=a[2]>>>8|a[3]<<16;b=am(b,c^d);return b}var
sb=Math.log2&&Math.log2(1.12355820928894744e+307)==1020;function
sa(a){if(sb)return Math.floor(Math.log2(a));var
b=0;if(a==0)return-Infinity;if(a>=1)while(a>=2){a/=2;b++}else
while(a<1){a*=2;b--}return b}function
fM(a){if(!isFinite(a)){if(isNaN(a))return[S,1,0,fb];return a>0?[S,0,0,fb]:[S,0,0,65520]}var
f=a==0&&1/a==-Infinity?eN:a>=0?0:eN;if(f)a=-a;var
b=sa(a)+fH;if(b<=0){b=0;a/=Math.pow(2,-1026)}else{a/=Math.pow(2,b-1027);if(a<16){a*=2;b-=1}if(b==0)a/=2}var
d=Math.pow(2,24),c=a|0;a=(a-c)*d;var
e=a|0;a=(a-e)*d;var
g=a|0;c=c&15|f|b<<4;return[S,g,e,c]}function
rv(a,e){var
b=fM(e),d=b[1]|b[2]<<24,c=b[2]>>>8|b[3]<<16;a=am(a,d);a=am(a,c);return a}function
ry(d,b){var
e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b[a]|b[a+1]<<8|b[a+2]<<16|b[a+3]<<24;d=am(d,c)}c=0;switch(e&3){case
3:c=b[a+2]<<16;case
2:c|=b[a+1]<<8;case
1:c|=b[a];d=am(d,c)}d^=e;return d}function
rz(d,b){var
e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b.charCodeAt(a)|b.charCodeAt(a+1)<<8|b.charCodeAt(a+2)<<16|b.charCodeAt(a+3)<<24;d=am(d,c)}c=0;switch(e&3){case
3:c=b.charCodeAt(a+2)<<16;case
2:c|=b.charCodeAt(a+1)<<8;case
1:c|=b.charCodeAt(a);d=am(d,c)}d^=e;return d}function
rx(a,b){switch(b.t&6){default:as(b);case
0:a=rz(a,b.c);break;case
2:a=ry(a,b.c)}return a}function
ru(a){a^=a>>>16;a=by(a,2246822507|0);a^=a>>>13;a=by(a,3266489909|0);a^=a>>>16;return a}var
fK=256;function
rt(j,k,m,l){var
f,g,h,d,c,b,a,e,i;d=k;if(d<0||d>fK)d=fK;c=j;b=m;f=[l];g=0;h=1;while(g<h&&c>0){a=f[g++];if(a
instanceof
Array&&a[0]===(a[0]|0))switch(a[0]){case
248:b=am(b,a[2]);c--;break;case
250:f[--g]=a[1];break;case
255:b=rw(b,a);c--;break;default:var
n=a.length-1<<10|a[0];b=am(b,n);for(e=1,i=a.length;e<i;e++){if(h>=d)break;f[h++]=a[e]}break}else
if(a
instanceof
$){b=rx(b,a);c--}else
if(a===(a|0)){b=am(b,a+a+1);c--}else
if(a===+a){b=rv(b,a);c--}}b=ru(b);return b&bT}function
rK(a){return[a[3]>>8,a[3]&S,a[2]>>16,a[2]>>8&S,a[2]&S,a[1]>>16,a[1]>>8&S,a[1]&S]}function
rA(d,g,a){var
c=0;function
f(a){g--;if(d<0||g<0)return;if(a
instanceof
Array&&a[0]===(a[0]|0))switch(a[0]){case
248:d--;c=c*c1+a[2]|0;break;case
250:g++;f(a);break;case
255:d--;c=c*c1+a[1]+(a[2]<<24)|0;break;default:d--;c=c*19+a[0]|0;for(var
b=a.length-1;b>0;b--)f(a[b])}else
if(a
instanceof
$){d--;switch(a.t&6){default:as(a);case
0:for(var
i=a.c,e=a.l,b=0;b<e;b++)c=c*19+i.charCodeAt(b)|0;break;case
2:for(var
h=a.c,e=a.l,b=0;b<e;b++)c=c*19+h[b]|0}}else
if(a===(a|0)){d--;c=c*c1+a|0}else
if(a===+a){d--;var
j=rK(fM(a));for(var
b=7;b>=0;b--)c=c*19+j[b]|0}}f(a);return c&bT}function
r9(e){for(var
g=f,b=g,a,i,c=0,h=e.length;c<h;c++){a=e.charCodeAt(c);if(a<X){for(var
d=c+1;d<h&&(a=e.charCodeAt(d))<X;d++);if(d-c>dd){b.substr(0,1);g+=b;b=f;g+=e.slice(c,d)}else
b+=e.slice(c,d);if(d==h)break;c=d}if(a<fk){b+=String.fromCharCode(192|a>>6);b+=String.fromCharCode(X|a&63)}else
if(a<55296||a>=fo)b+=String.fromCharCode(e3|a>>12,X|a>>6&63,X|a&63);else
if(a>=56319||c+1==h||(i=e.charCodeAt(c+1))<fw||i>fo)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+i-56613888;b+=String.fromCharCode(eP|a>>18,X|a>>12&63,X|a>>6&63,X|a&63)}if(b.length>bu){b.substr(0,1);g+=b;b=f}}return g+b}function
at(a){var
b=9;if(!fP(a))b=8,a=r9(a);return new
$(b,a,a.length)}function
rB(a,c,l){if(!isFinite(a)){if(isNaN(a))return at(cT);return at(a>0?fA:"-infinity")}var
j=a==0&&1/a==-Infinity?1:a>=0?0:1;if(j)a=-a;var
d=0;if(a==0);else
if(a<1)while(a<1&&d>-1022){a*=2;d--}else
while(a>=2){a/=2;d++}var
k=d<0?f:aK,e=f;if(j)e=aM;else
switch(l){case
43:e=aK;break;case
32:e=ak;break;default:break}if(c>=0&&c<13){var
h=Math.pow(2,c*4);a=Math.round(a*h)/h}var
b=a.toString(16);if(c>=0){var
i=b.indexOf(az);if(i<0)b+=az+a5(c,W);else{var
g=i+1+c;if(b.length<g)b+=a5(g-b.length,W);else
b=b.substr(0,g)}}return at(e+eO+b+e_+k+d.toString(10))}function
rF(a){return(a[3]|a[2]|a[1])==0}function
rI(a){return[S,a&al,a>>24&al,a>>31&bt]}function
fU(d){var
c=d.length,b=new
Array(c);for(var
a=0;a<c;a++)b[a]=d[a];return b}function
rJ(a,b){var
c=a[1]-b[1],d=a[2]-b[2]+(c>>24),e=a[3]-b[3]+(d>>24);return[S,c&al,d&al,e&bt]}function
fO(a,b){if(a[3]>b[3])return 1;if(a[3]<b[3])return-1;if(a[2]>b[2])return 1;if(a[2]<b[2])return-1;if(a[1]>b[1])return 1;if(a[1]<b[1])return-1;return 0}function
fN(a){a[3]=a[3]<<1|a[2]>>23;a[2]=(a[2]<<1|a[1]>>23)&al;a[1]=a[1]<<1&al}function
rG(a){a[1]=(a[1]>>>1|a[2]<<23)&al;a[2]=(a[2]>>>1|a[3]<<23)&al;a[3]=a[3]>>>1}function
rM(e,f){var
c=0,b=fU(e),a=fU(f),d=[S,0,0,0];while(fO(b,a)>0){c++;fN(a)}while(c>=0){c--;fN(d);if(fO(b,a)>=0){d[1]++;b=rJ(b,a)}rG(a)}return[0,d,b]}function
rL(a){return a[1]|a[2]<<24}function
rE(a){return a[3]<<16<0}function
rH(a){var
b=-a[1],c=-a[2]+(b>>24),d=-a[3]+(c>>24);return[S,b&al,c&al,d&bt]}function
rD(h,c){var
a=di(h);if(a.signedconv&&rE(c)){a.sign=-1;c=rH(c)}var
b=f,i=rI(a.base),g="0123456789abcdef";do{var
e=rM(c,i);c=e[1];b=g.charAt(rL(e[2]))+b}while(!rF(c));if(a.prec>=0){a.filler=ak;var
d=a.prec-b.length;if(d>0)b=a5(d,W)+b}return de(a,b)}var
b0={amp:/&/g,lt:/</g,quot:/\"/g,all:/[&<\"]/};function
fQ(a){if(!b0.all.test(a))return a;return a.replace(b0.amp,"&").replace(b0.lt,"<").replace(b0.quot,""")}function
rO(a,b){return+(bw(a,b,false)<=0)}function
rP(a,b){return+(bw(a,b,false)<0)}function
dg(a,d){var
a=a+1|0,b=new
Array(a);b[0]=0;for(var
c=1;c<a;c++)b[c]=d;return b}function
f0(a){return new
$(4,a,a.length)}var
rQ=function(){function
l(a,b){return a+b|0}function
a(d,a,c,f,b,e){a=l(l(a,d),l(f,e));return l(a<<b|a>>>32-b,c)}function
g(c,b,d,e,h,f,g){return a(b&d|~b&e,c,b,h,f,g)}function
h(d,b,e,c,h,f,g){return a(b&c|e&~c,d,b,h,f,g)}function
i(c,b,d,e,h,f,g){return a(b^d^e,c,b,h,f,g)}function
j(c,b,d,e,h,f,g){return a(d^(b|~e),c,b,h,f,g)}function
k(f,n){var
e=n;f[e>>2]|=X<<8*(e&3);for(e=(e&~3)+8;(e&63)<60;e+=4)f[(e>>2)-1]=0;f[(e>>2)-1]=n<<3;f[e>>2]=n>>29&536870911;var
k=[1732584193,4023233417,2562383102,271733878];for(e=0;e<f.length;e+=16){var
a=k[0],b=k[1],c=k[2],d=k[3];a=g(a,b,c,d,f[e+0],7,3614090360);d=g(d,a,b,c,f[e+1],12,3905402710);c=g(c,d,a,b,f[e+2],17,606105819);b=g(b,c,d,a,f[e+3],22,3250441966);a=g(a,b,c,d,f[e+4],7,4118548399);d=g(d,a,b,c,f[e+5],12,1200080426);c=g(c,d,a,b,f[e+6],17,2821735955);b=g(b,c,d,a,f[e+7],22,4249261313);a=g(a,b,c,d,f[e+8],7,1770035416);d=g(d,a,b,c,f[e+9],12,2336552879);c=g(c,d,a,b,f[e+10],17,4294925233);b=g(b,c,d,a,f[e+11],22,2304563134);a=g(a,b,c,d,f[e+12],7,1804603682);d=g(d,a,b,c,f[e+13],12,4254626195);c=g(c,d,a,b,f[e+14],17,2792965006);b=g(b,c,d,a,f[e+15],22,1236535329);a=h(a,b,c,d,f[e+1],5,4129170786);d=h(d,a,b,c,f[e+6],9,3225465664);c=h(c,d,a,b,f[e+11],14,643717713);b=h(b,c,d,a,f[e+0],20,3921069994);a=h(a,b,c,d,f[e+5],5,3593408605);d=h(d,a,b,c,f[e+10],9,38016083);c=h(c,d,a,b,f[e+15],14,3634488961);b=h(b,c,d,a,f[e+4],20,3889429448);a=h(a,b,c,d,f[e+9],5,568446438);d=h(d,a,b,c,f[e+14],9,3275163606);c=h(c,d,a,b,f[e+3],14,4107603335);b=h(b,c,d,a,f[e+8],20,1163531501);a=h(a,b,c,d,f[e+13],5,2850285829);d=h(d,a,b,c,f[e+2],9,4243563512);c=h(c,d,a,b,f[e+7],14,1735328473);b=h(b,c,d,a,f[e+12],20,2368359562);a=i(a,b,c,d,f[e+5],4,4294588738);d=i(d,a,b,c,f[e+8],11,2272392833);c=i(c,d,a,b,f[e+11],16,1839030562);b=i(b,c,d,a,f[e+14],23,4259657740);a=i(a,b,c,d,f[e+1],4,2763975236);d=i(d,a,b,c,f[e+4],11,1272893353);c=i(c,d,a,b,f[e+7],16,4139469664);b=i(b,c,d,a,f[e+10],23,3200236656);a=i(a,b,c,d,f[e+13],4,681279174);d=i(d,a,b,c,f[e+0],11,3936430074);c=i(c,d,a,b,f[e+3],16,3572445317);b=i(b,c,d,a,f[e+6],23,76029189);a=i(a,b,c,d,f[e+9],4,3654602809);d=i(d,a,b,c,f[e+12],11,3873151461);c=i(c,d,a,b,f[e+15],16,530742520);b=i(b,c,d,a,f[e+2],23,3299628645);a=j(a,b,c,d,f[e+0],6,4096336452);d=j(d,a,b,c,f[e+7],10,1126891415);c=j(c,d,a,b,f[e+14],15,2878612391);b=j(b,c,d,a,f[e+5],21,4237533241);a=j(a,b,c,d,f[e+12],6,1700485571);d=j(d,a,b,c,f[e+3],10,2399980690);c=j(c,d,a,b,f[e+10],15,4293915773);b=j(b,c,d,a,f[e+1],21,2240044497);a=j(a,b,c,d,f[e+8],6,1873313359);d=j(d,a,b,c,f[e+15],10,4264355552);c=j(c,d,a,b,f[e+6],15,2734768916);b=j(b,c,d,a,f[e+13],21,1309151649);a=j(a,b,c,d,f[e+4],6,4149444226);d=j(d,a,b,c,f[e+11],10,3174756917);c=j(c,d,a,b,f[e+2],15,718787259);b=j(b,c,d,a,f[e+9],21,3951481745);k[0]=l(a,k[0]);k[1]=l(b,k[1]);k[2]=l(c,k[2]);k[3]=l(d,k[3])}var
o=new
Array(16);for(var
e=0;e<4;e++)for(var
m=0;m<4;m++)o[e*4+m]=k[e]>>8*m&S;return o}return function(h,g,f){var
e=[];switch(h.t&6){default:as(h);case
0:var
d=h.c;for(var
a=0;a<f;a+=4){var
b=a+g;e[a>>2]=d.charCodeAt(b)|d.charCodeAt(b+1)<<8|d.charCodeAt(b+2)<<16|d.charCodeAt(b+3)<<24}for(;a<f;a++)e[a>>2]|=d.charCodeAt(a+g)<<8*(a&3);break;case
4:var
c=h.c;for(var
a=0;a<f;a+=4){var
b=a+g;e[a>>2]=c[b]|c[b+1]<<8|c[b+2]<<16|c[b+3]<<24}for(;a<f;a++)e[a>>2]|=c[a+g]<<8*(a&3)}return f0(k(e,f))}}();function
ah(a){dj(G.Sys_error,a)}function
dh(a){if(!a.opened)ah("Cannot flush a closed channel");if(a.buffer==f)return 0;if(a.output)switch(a.output.length){case
2:a.output(a,a.buffer);break;default:a.output(a.buffer)}a.buffer=f;return 0}var
f2=0;function
sd(){return new
Date().getTime()/aL}function
dn(){return Math.floor(sd())}function
aA(b){this.data=b;this.inode=f2++;var
a=dn();this.atime=a;this.mtime=a;this.ctime=a}aA.prototype={truncate:function(){this.data=F(0);this.modified()},modified:function(){var
a=dn();this.atime=a;this.mtime=a}};function
i(a){return a.l}function
fX(a){a=a
instanceof
$?a.toString():a;ah(a+": No such file or directory")}var
rm=eW;function
b1(a){a=a
instanceof
$?a.toString():a;if(a.charCodeAt(0)!=47)a=rm+a;var
d=a.split(eW),b=[];for(var
c=0;c<d.length;c++)switch(d[c]){case"..":if(b.length>1)b.pop();break;case".":break;case"":if(b.length==0)b.push(f);break;default:b.push(d[c]);break}b.orig=a;return b}function
aN(){this.content={};this.inode=f2++;var
a=dn();this.atime=a;this.mtime=a;this.ctime=a}aN.prototype={exists:function(a){return this.content[a]?1:0},mk:function(b,a){this.content[b]=a},get:function(a){return this.content[a]},list:function(){var
a=[];for(var
b
in
this.content)a.push(b);return a},remove:function(a){delete
this.content[a]}};var
b2=new
aN();b2.mk(f,new
aN());function
df(c){var
a=b2;for(var
b=0;b<c.length;b++){if(!(a.exists&&a.exists(c[b])))fX(c.orig);a=a.get(c[b])}return a}function
r5(b){var
c=b1(b),a=df(c);return a
instanceof
aN?1:0}function
se(a){if(a.t!=4)bY(a);return a.c}function
rs(h,c){var
e=b1(h),b=b2;for(var
f=0;f<e.length-1;f++){var
d=e[f];if(!b.exists(d))b.mk(d,new
aN());b=b.get(d);if(!(b
instanceof
aN))ah(e.orig+cW)}var
d=e[e.length-1];if(b.exists(d))ah(e.orig+cW);if(c
instanceof
aN)b.mk(d,c);else
if(c
instanceof
aA)b.mk(d,c);else
if(c
instanceof
$)b.mk(d,new
aA(c));else
if(c
instanceof
Array)b.mk(d,new
aA(f0(c)));else
if(c.toString){var
g=a(c.toString());b.mk(d,new
aA(g))}else
aO("caml_fs_register");return 0}function
r4(f){var
a=b2,c=b1(f),d,e;for(var
b=0;b<c.length;b++){if(a.auto){d=a.auto;e=b}if(!(a.exists&&a.exists(c[b])))return d?d(c,e):0;a=a.get(c[b])}return 1}function
bA(c,d,a){if(G.fds===undefined)G.fds=new
Array();a=a?a:{};var
b={};b.file=d;b.offset=a.append?i(d.data):0;b.flags=a;G.fds[c]=b;G.fd_last_idx=c;return c}function
sf(b,d,h){var
a={};while(d){switch(d[1]){case
0:a.rdonly=1;break;case
1:a.wronly=1;break;case
2:a.append=1;break;case
3:a.create=1;break;case
4:a.truncate=1;break;case
5:a.excl=1;break;case
6:a.binary=1;break;case
7:a.text=1;break;case
8:a.nonblock=1;break}d=d[2]}var
e=b.toString(),g=b1(b);if(a.rdonly&&a.wronly)ah(e+" : flags Open_rdonly and Open_wronly are not compatible");if(a.text&&a.binary)ah(e+" : flags Open_text and Open_binary are not compatible");if(r4(b)){if(r5(b))ah(e+" : is a directory");if(a.create&&a.excl)ah(e+cW);var
f=G.fd_last_idx?G.fd_last_idx:0,c=df(g);if(a.truncate)c.truncate();return bA(f+1,c,a)}else
if(a.create){var
f=G.fd_last_idx?G.fd_last_idx:0;rs(b,F(0));var
c=df(g);return bA(f+1,c,a)}else
fX(b)}bA(0,new
aA(F(0)));bA(1,new
aA(F(0)));bA(2,new
aA(F(0)));function
rR(b){var
a=G.fds[b];if(a.flags.wronly)ah(fI+b+" is writeonly");return{file:a.file,offset:a.offset,fd:b,opened:true,refill:null}}function
r_(a){var
b=ai;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stderr.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var
c=b.console;c&&c.error&&c.error(a)}}function
r$(a){var
b=ai;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stdout.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var
c=b.console;c&&c.log&&c.log(a)}}var
bx=new
Array();function
r1(b,h){var
g=a(h),c=i(g),f=i(b.file.data),e=b.offset;if(e+c>=f){var
d=F(e+c);aa(b.file.data,0,d,0,f);aa(g,0,d,e,c);b.file.data=d}b.offset+=c;b.file.modified();return 0}function
fR(a){var
b;switch(a){case
1:b=r$;break;case
2:b=r_;break;default:b=r1}var
d=G.fds[a];if(d.flags.rdonly)ah(fI+a+" is readonly");var
c={file:d.file,offset:d.offset,fd:a,opened:true,buffer:f,output:b};bx[c.fd]=c;return c}function
rS(){var
b=0;for(var
a=0;a<bx.length;a++)if(bx[a]&&bx[a].opened)b=[0,bx[a],b];return b}function
rT(a,d,g,f){if(!a.opened)ah("Cannot output to a closed channel");var
c;if(g==0&&i(d)==f)c=d;else{c=F(f);aa(d,g,c,0,f)}var
b=c.toString(),e=b.lastIndexOf("\n");if(e<0)a.buffer+=b;else{a.buffer+=b.substr(0,e+1);dh(a);a.buffer+=b.substr(e+1)}return 0}function
fW(a){throw a}function
rZ(){fW(G.Division_by_zero)}function
fS(b,a){if(a==0)rZ();return b%a}function
bz(a,b){return+(bw(a,b,false)!=0)}function
rV(b,a){b[0]=a;return 0}function
fV(a){return a
instanceof
Array?a[0]:a
instanceof
$?252:aL}function
ad(c,b,a){G[c+1]=b;if(a)G[a]=b}var
fT={};function
r0(a,b){fT[bX(a)]=b;return 0}function
B(a,b){if(a===b)return 1;a.t&6&&as(a);b.t&6&&as(b);return a.c==b.c?1:0}function
fZ(){aO(fB)}function
a6(a,b){switch(a.t&6){default:if(b>=a.c.length)return 0;case
0:return a.c.charCodeAt(b);case
4:return a.c[b]}}function
w(b,a){if(a>>>0>=b.l)fZ();return a6(b,a)}function
b3(a,b){return 1-B(a,b)}function
x(a,c,b){b&=S;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}bY(a)}a.c[c]=b;return 0}function
au(b,a,c){if(a>>>0>=b.l)fZ();return x(b,a,c)}function
r3(){return fj/4|0}function
rX(){fW(G.Not_found)}function
f1(c){var
a=ai,b=c.toString();if(a.process&&a.process.env&&a.process.env[b]!=undefined)return at(a.process.env[b]);rX()}function
r6(){var
a=new
Date()^4294967295*Math.random();return[0,a]}function
dl(a){var
b=1;while(a&&a.joo_tramp){a=a.joo_tramp.apply(null,a.joo_args);b++}return a}function
J(b,a){return{joo_tramp:b,joo_args:a}}function
fY(a){return a}function
rU(a){return fT[a]}function
ae(a){if(a
instanceof
Array)return a;if(ai.RangeError&&a
instanceof
ai.RangeError&&a.message&&a.message.match(/maximum call stack/i))return fY(G.Stack_overflow);if(ai.InternalError&&a
instanceof
ai.InternalError&&a.message&&a.message.match(/too much recursion/i))return fY(G.Stack_overflow);if(a
instanceof
ai.Error)return[0,rU(eV),a];return[0,G.Failure,at(String(a))]}function
c(a,b){return a.length==1?a(b):a4(a,[b])}function
ac(a,b,c){return a.length==2?a(b,c):a4(a,[b,c])}function
bQ(a,b,c,d){return a.length==3?a(b,c,d):a4(a,[b,c,d])}var
b4=[Q,a(eT),-3],dp=[Q,a(fa),-4],K=[Q,a(ff),-7],y=[Q,a(fv),-11],d4=a("body"),aJ=[a3,0,0];ad(11,[Q,a(eJ),-12],eJ);ad(10,y,fv);ad(9,[Q,a(e9),-10],e9);ad(8,[Q,a(fg),-9],fg);ad(7,[Q,a(e1),-8],e1);ad(6,K,ff);ad(5,[Q,a(fr),-6],fr);ad(4,[Q,a(eU),-5],eU);ad(3,dp,fa);ad(2,b4,eT);ad(1,[Q,a(eR),-2],eR);ad(0,[Q,a(fC),-1],fC);var
f8=a("output_substring"),f4=a("true"),f5=a("false"),ga=[0,a("list.ml"),227,11],gc=a("\\\\"),gd=a("\\'"),ge=a("\\b"),gf=a("\\t"),gg=a("\\n"),gh=a("\\r"),gb=a("Char.chr"),gn=a("String.contains_from / Bytes.contains_from"),gk=a("String.blit / Bytes.blit_string"),gj=a("Bytes.blit"),gi=a("String.sub / Bytes.sub"),go=a(f),gq=a("CamlinternalLazy.Undefined"),gv=a("Buffer.add_substring/add_subbytes"),gu=a("Buffer.add: cannot grow buffer"),gE=a("%c"),gF=a("%s"),gG=a(eH),gH=a(eZ),gI=a(e$),gJ=a(eL),gK=a("%f"),gL=a("%B"),gM=a("%{"),gN=a("%}"),gO=a("%("),gP=a(e5),gQ=a("%a"),gR=a("%t"),gS=a("%?"),gT=a("%r"),gU=a("%_r"),gV=[0,a(E),845,23],g6=[0,a(E),809,21],gY=[0,a(E),810,21],g7=[0,a(E),813,21],gZ=[0,a(E),814,21],g8=[0,a(E),817,19],g0=[0,a(E),818,19],g9=[0,a(E),821,22],g1=[0,a(E),822,22],g_=[0,a(E),826,30],g2=[0,a(E),827,30],g4=[0,a(E),831,26],gW=[0,a(E),832,26],g5=[0,a(E),841,28],gX=[0,a(E),842,28],g3=[0,a(E),846,23],ib=a(e7),h$=[0,a(E),1520,4],ia=a("Printf: bad conversion %["),ic=[0,a(E),1588,39],id=[0,a(E),1611,31],ie=[0,a(E),1612,31],ig=a("Printf: bad conversion %_"),ih=a("@{"),ii=a("@["),h8=a(cT),h9=a(az),h6=a("neg_infinity"),h7=a(fA),h1=a("%.12g"),hO=a("%nd"),hP=a("%+nd"),hQ=a("% nd"),hR=a(e$),hS=a("%+ni"),hT=a("% ni"),hU=a("%nx"),hV=a("%#nx"),hW=a("%nX"),hX=a("%#nX"),hY=a("%no"),hZ=a("%#no"),h0=a("%nu"),hB=a("%ld"),hC=a("%+ld"),hD=a("% ld"),hE=a(eZ),hF=a("%+li"),hG=a("% li"),hH=a("%lx"),hI=a("%#lx"),hJ=a("%lX"),hK=a("%#lX"),hL=a("%lo"),hM=a("%#lo"),hN=a("%lu"),ho=a("%Ld"),hp=a("%+Ld"),hq=a("% Ld"),hr=a(eL),hs=a("%+Li"),ht=a("% Li"),hu=a("%Lx"),hv=a("%#Lx"),hw=a("%LX"),hx=a("%#LX"),hy=a("%Lo"),hz=a("%#Lo"),hA=a("%Lu"),hb=a(fp),hc=a("%+d"),hd=a("% d"),he=a(eH),hf=a("%+i"),hg=a("% i"),hh=a("%x"),hi=a("%#x"),hj=a("%X"),hk=a("%#X"),hl=a("%o"),hm=a("%#o"),hn=a(e7),gw=a("@]"),gx=a("@}"),gy=a("@?"),gz=a("@\n"),gA=a("@."),gB=a("@@"),gC=a("@%"),gD=a("@"),g$=a("CamlinternalFormat.Type_mismatch"),ij=a(fq),ri=a("OCAMLRUNPARAM"),rg=a("CAMLRUNPARAM"),ik=a(f),iC=[3,0,3],iD=a(az),iy=a(c$),iz=a("</"),iv=a(c$),iw=a(ft),it=a("\n"),im=a("Format.Empty_queue"),is=[0,a(f)],iK=a("Js.Error"),iL=a(eV),iS=a("span"),iR=a("img"),iQ=a("a"),iP=a(e_),iO=a("div"),iN=a(c8),iM=a(eK),i7=a(f),i8=a(f),i5=a(eY),i6=a("find_tag("),i3=a(f),i2=a(f),i1=a(f),i0=a(f),iZ=a(f),iY=a(f),iX=a(f),iW=a(f),iV=a(f),iU=a(f),i9=a(c4),i_=a(bR),i$=a(eM),ja=a(c_),jb=a(c6),jc=a(cR),jd=a(dc),je=a(bU),jf=a(c0),jg=a(fG),ji=a(cY),jj=a(cQ),jk=a("Wood"),jl=[0,0],jm=a("Coal"),jn=[0,1],jo=[0,0],jp=a("Iron Ore"),jq=[0,1],jr=a("Copper Ore"),js=[0,1],jt=a("Stone"),ju=[0,1],jv=a(fz),jw=a("Water"),jx=[0,0],jy=[0,1200],jz=a("Crude Oil"),jA=[0,1],jB=[0,10],jC=a("Uranium Ore"),jD=[0,1],jE=a("Uranium-235"),jF=[0,1],jG=[0,0.007],jH=a("Iron Plate"),jI=[0,1],jJ=[0,0],jK=a("Copper Plate"),jL=[0,1],jM=[0,0],jN=a("Steel Plate"),jO=[0,1],jP=a("Stone Brick"),jQ=[0,1],jR=a(bS),jS=a(c7),jT=[0,1],jU=[0,0],jV=[0,40],jW=a(c3),jX=a(c7),jY=[0,1],jZ=[0,0],j0=[0,55],j2=a(db),j3=a(c7),j4=[0,1],j5=[0,0],j6=[0,90],j8=a("Sulfur"),j9=[0,1],j_=[0,2],j$=a("Sulfuric Acid"),ka=[0,1],kb=[0,50],kc=a("Plastic Bar"),kd=[0,1],ke=[0,2],kf=a("Battery"),kg=[0,1],kh=a("Iron Stick"),ki=[0,1],kj=[0,2],kk=a("Iron Gear Wheel"),kl=[0,1],km=a("Copper Cable"),kn=[0,1],ko=[0,2],kp=a("Electronic Circuit"),kq=[0,1],kr=a("Advanced Circuit"),ks=[0,1],kt=a("Processing Unit"),ku=[0,1],kv=a("Pipe"),kw=a("Engine Unit"),kx=[0,1],ky=a(bS),kz=a("Heavy Oil"),kA=[0,1],kB=[0,3],kC=a(bS),kD=a("Light Oil"),kE=[0,1],kF=[0,3],kG=a("Lubricant"),kH=[0,1],kI=[0,10],kJ=a("Electric Engine Unit"),kK=[0,1],kL=a("Flying Robot Frame"),kM=[0,1],kN=a("Transport Belt"),kO=[0,2],kP=a("Inserter"),kQ=a("Fast Inserter"),kR=a("Filter Inserter"),kT=a("Empty Barrel"),kU=[0,1],kW=a("Explosives"),kX=[0,1],kY=[0,2],kZ=a("Land Mine"),k0=[0,4],k2=a("Grenade"),k3=a("Cluster Grenade"),k5=a("Poison Capsule"),k7=a("Slowdown Capsule"),k9=a("Atomic Bomb"),k$=a("Speed Module"),la=a("Firearm Magazine"),lb=a("Piercing Rounds Magazine"),lc=a("Defender Capsule"),ld=a("Distractor Capsule"),le=a("Destroyer Capsule"),lg=a("Shotgun Shells"),lh=a("Piercing Shotgun Shells"),lj=a("Rocket"),lk=a("Explosive Rocket"),lm=a("Flamethrower Ammo"),lo=a("Cannon Shell"),lq=a("Explosive Cannon Shell"),lr=a("Efficiency Module"),ls=a("Efficiency Module 2"),lt=a("Efficiency Module 3"),lv=a("Productivity Module"),lw=a("Productivity Module 2"),lx=a("Productivity Module 3"),lz=a("Speed Module 2"),lA=a("Speed Module 3"),lC=a("Car"),lE=a("Tank"),lG=a("Logistic Robot"),lI=a("Construction Robot"),lK=a("Roboport"),lM=a("Underground Belt"),lN=[0,2],lO=a("Splitter"),lP=a("Fast Transport Belt"),lQ=a("Fast Underground Belt"),lR=[0,2],lS=a("Fast Splitter"),lT=a("Express Transport Belt"),lV=a("Express Underground Belt"),lW=[0,2],lY=a("Express Splitter"),l0=a("Burner Inserter"),l2=a("Long Handed Inserter"),l4=a("Stack Inserter"),l5=a("Stack Filter Inserter"),l7=a("Wooden Chest"),l9=a("Iron Chest"),l$=a("Steel Chest"),ma=a("Active Provider Chest"),mc=a("Passive Provider Chest"),me=a("Storage Chest"),mg=a("Requester Chest"),mi=a("Wall"),mj=a("Gate"),ml=a("Gun Turret"),mn=a("Flamethrower Turret"),mp=a("Laser Turret"),mq=a("Concrete"),mr=[0,10],ms=a(cR),mt=a(c4),mv=a(bR),mx=a(dc),mz=a(bU),mB=a("Lab"),mD=a(fG),mG=a("Beacon"),mI=a("Radar"),mJ=a("Small Electric Pole"),mK=[0,2],mM=a("Medium Electric Pole"),mO=a("Big Electric Pole"),mQ=a("Substation"),mS=a("Boiler"),mU=a("Steam Engine"),mW=a("Solar Panel"),mX=a("Accumulator"),mY=a("Lamp"),m0=a("Straight Rail"),m1=[0,2],m2=a("Pipe To Ground"),m3=[0,2],m5=a(fz),m7=a("Storage Tank"),m8=a("Oil Refinery"),m_=a(c0),na=a(cY),nc=a("Pump"),ne=a("Low Density Structure"),nf=[0,1],ng=a("Rocket Control Unit"),nh=[0,1],ni=a(cS),nj=[0,1],nl=a(cS),nm=[0,1],no=a(cS),np=[0,1],nq=a("Rocket Fuel"),nr=[0,1],ns=a(cQ),nt=a("Rocket Part"),nu=[0,1],nv=a("Satellite"),nw=a("Nuclear reactor"),ny=a("Heat pipe"),nA=a("Heat exchanger"),nC=a("Steam turbine"),nE=a("Fluid wagon"),nG=a("Automation Science Pack"),nH=[0,1],nJ=a("Logistic Science Pack"),nK=[0,1],nM=a("Chemical Science Pack"),nN=[0,1],nO=[0,2],nQ=a("Military Science Pack"),nR=[0,1],nS=[0,2],nU=a("Production Science Pack"),nV=[0,1],nW=[0,3],nY=a("Utility Science Pack"),nZ=[0,1],n0=[0,3],n2=a("Space Science Pack"),n3=[0,aL],n5=a("Modular armor"),n7=a("Power armor"),n9=a("Power armor MK2"),n_=a("Personal battery"),n$=a("Personal battery MK2"),oa=a("Energy shield"),ob=a("Energy Shield MK2"),oc=a("Portable solar panel"),oe=a("Portable fusion reactor"),og=a("Personal laser defense"),oi=a("Discharge defense"),ok=a("Exoskeleton"),om=a("Artillery Shell"),on=a("Rocket Components"),oo=a("Miscellaneous"),op=a("Electric Network"),oq=a("Machines & Furnaces & Pumps"),or=a("Logistics"),os=a("Modules"),ot=a("Player Equipment"),ou=a("Science Packs"),ov=a("Intermediate Products"),ow=a("Resources"),oL=a(db),oM=a("Light Oil Cracking"),oN=a(aK),oO=a("Heavy Oil Cracking"),oP=a(aK),oQ=a(c3),oR=a(".png"),oS=a("https://wiki.factorio.com/images/"),oT=a("https://wiki.factorio.com/index.php?title="),oU=[0,a("icon")],q9=[0,a("resource_category")],q7=[0,a("count")],q8=[0,a("resourceinput")],qx=a(f),qy=[0,a(e2)],qz=a("Non-Shared Resources"),qA=[0,a(ar)],qB=[0,a(e2)],qC=a(eS),qD=[0,a(ar)],qE=a("Thanks to Nick Sheffield for the great style sheet! Thanks to s3bash, dwahler and DeCristoforis for 0.15 recipes! Thanks to jab416171 for 0.16 recipes! Thanks to NixonK for patching image links! Thanks to TheOddler for the better CSS for small screens! Thanks to Iidebyo for patching several wrong recipes! Thanks to JuicyJuuce for even more recipes! Thanks to DeCristoforis for the Solid Fuel setting! Thanks to Saintis for the science pack category! Thanks to Lava84flow, SamuelWr, keeshoekzema and s3bash for the 0.17 recipes! And thanks to everyone who helped finding bugs or posted suggestions. This tool greatly improved thanks to you."),qF=a("Acknowledgments"),qG=[0,a(ar)],qH=a(az),qI=a("Reddit post"),qJ=[0,a("https://www.reddit.com/r/factorio/comments/4dmxib/my_factorio_planner_now_has_a_web_interface/")],qK=a("See also the "),qL=a(az),qM=a("GitHub"),qN=[0,a("https://github.com/doomeer/factorio")],qO=a("Source code is available on "),qP=a("Links"),qQ=[0,a(ar)],qR=a("Instead of entering the requested throughput, you can enter a number of machines that should run at full speed. To this end, simply prefix the number by the letter A to use the fastest machine, B to use the second best or C to use the third best. For instance, if you allow yellow and blue assembly machines in Advanced Settings, requesting b2 laser turrets means that 2 blue assembling machines should run at full speed. If you only allow blue assembly machines, b2 means nothing as there is no second-fastest machine. In this case, a2 would mean that 2 blue assembly machines should run at full speed."),qS=a("Tips"),qT=[0,a(ar)],qU=a("See the part after the # in the URL? It encodes your settings and updates automatically. It means you can share your settings easily with other people. You can also bookmark them and even use the Back button."),qV=a("Share Your Settings"),qW=[0,a(ar)],qX=a("When shared resources are used, they have a blue percentage next to them which shows how much of the total is used for this particular use."),qY=a("The checkbox controls whether the resource is shared. For instance, to produce Assembling Machine 1, you need iron plates for the machines themselves, but also for gears and for electronic circuits. Not sharing the plates means having three sets of furnaces, one for the circuits, one for the gears and one for the machines. Sharing the plates means having one set of furnaces to produce the plates which you then dispatch to other assemblers."),qZ=a(eS),q0=[0,a(ar)],q1=a("Set the number next to each resource to the requested throughput."),q2=a("Getting Started"),q3=[0,a(ar)],q4=a("Recipes were updated for version 0.17!"),q5=a("Current Version"),q6=[0,a(ar)],pI=a(f),pE=a("%"),pF=a("% productivity bonus: "),pG=a(" speed bonus: "),pH=[0,a(a1)],pD=[0,a("settings")],pJ=a("Note: if you use both blue and yellow machines, the productivity bonus which is used is the yellow one."),pK=a(cQ),pL=a(c0),pM=[0,a(" (not applied to Petroleum Gas)")],pN=a(c6),pO=a(c_),pP=a(bU),pQ=a(cY),pR=a(bR),pS=a("Solid fuel from petroleum gas"),pT=a(cX),pU=a("Solid fuel from light oil"),pV=a(cX),pW=a("Solid fuel from heavy oil"),pX=a(cX),pY=a("Solid fuel: "),pZ=[0,a(a1)],p0=a(db),p1=a(da),p2=a(c3),p3=a(da),p4=a(bS),p5=a(da),p6=a("Petroleum Gas: "),p7=[0,a(a1)],p8=a(c6),p9=a(c_),p_=a(eM),p$=a("Assembling Machines: "),qa=[0,a(a1)],qb=a(bU),qc=a(dc),qd=a(cR),qe=a("Furnaces: "),qf=[0,a(a1)],qg=a(bR),qh=a(c4),qi=a("Drills: "),qj=[0,a(a1)],qk=a("hours "),ql=a(cV),qm=a("minutes "),qn=a(cV),qo=a("seconds "),qp=a(cV),qq=a("Time Unit: "),qr=[0,a(f)],qs=a("Hide Advanced Settings"),qt=[0,a(fe)],qu=a("Advanced Settings"),qv=[0,a(fe)],qw=[0,a(fJ)],q_=[0,a(fJ)],q$=[0,a("rightcolumn")],ra=a("Reset"),rb=[0,a("index.html")],rc=[0,a(c8)],rd=[0,a(c8)],re=[0,a("leftcolumn")],rf=[0,a("main")],pC=a(f),pA=a(f),pB=a(f),pp=a("7"),po=a("6"),pn=a("5"),pm=a("4"),pl=a("3"),pk=a(e4),pj=a(fF),pi=a(W),ph=a(f),pd=a("g"),pf=a(f),pg=a(fi),pe=a(fi),pb=a(fE),pc=a(fE),pa=a(f),py=a("H"),pz=a("L"),pq=a("P"),pw=a(fF),px=a(W),pr=a(e4),ps=a("s"),pu=a("m"),pv=a("h"),pt=a(f),oX=a(fc),oY=a(f),oZ=a(" or "),o0=a(eY),o1=a("("),o2=a(ak),o3=[0,a("makerspace")],o9=a(e5),o_=a(" \xc2\xa0("),o$=[0,a("sharedpercent")],o4=a("/s"),o7=a("/min"),o8=a("/h"),o5=a(fc),o6=[0,a("goal")],oW=a(f),oA=[0,[8,15,0,0,0],a("%F")],oz=a(W),oB=a(fd),oC=a(e0),oD=a("Battery-equipment"),oE=a(fD),oG=a(fd),oH=a(e0),oI=a("Battery_MK1"),oJ=a(fD),oV=a(f);function
t(a){if(typeof
a==="number")return 0;else
switch(a[0]){case
0:return[0,t(a[1])];case
1:return[1,t(a[1])];case
2:return[2,t(a[1])];case
3:return[3,t(a[1])];case
4:return[4,t(a[1])];case
5:return[5,t(a[1])];case
6:return[6,t(a[1])];case
7:return[7,t(a[1])];case
8:var
c=a[1];return[8,c,t(a[2])];case
9:var
b=a[1];return[9,b,b,t(a[3])];case
10:return[10,t(a[1])];case
11:return[11,t(a[1])];case
12:return[12,t(a[1])];case
13:return[13,t(a[1])];default:return[14,t(a[1])]}}function
R(a,b){if(typeof
a==="number")return b;else
switch(a[0]){case
0:return[0,R(a[1],b)];case
1:return[1,R(a[1],b)];case
2:return[2,R(a[1],b)];case
3:return[3,R(a[1],b)];case
4:return[4,R(a[1],b)];case
5:return[5,R(a[1],b)];case
6:return[6,R(a[1],b)];case
7:return[7,R(a[1],b)];case
8:var
c=a[1];return[8,c,R(a[2],b)];case
9:var
d=a[2],e=a[1];return[9,e,d,R(a[3],b)];case
10:return[10,R(a[1],b)];case
11:return[11,R(a[1],b)];case
12:return[12,R(a[1],b)];case
13:return[13,R(a[1],b)];default:return[14,R(a[1],b)]}}function
s(a,b){if(typeof
a==="number")return b;else
switch(a[0]){case
0:return[0,s(a[1],b)];case
1:return[1,s(a[1],b)];case
2:var
c=a[1];return[2,c,s(a[2],b)];case
3:var
d=a[1];return[3,d,s(a[2],b)];case
4:var
e=a[3],f=a[2],g=a[1];return[4,g,f,e,s(a[4],b)];case
5:var
h=a[3],i=a[2],j=a[1];return[5,j,i,h,s(a[4],b)];case
6:var
k=a[3],l=a[2],m=a[1];return[6,m,l,k,s(a[4],b)];case
7:var
n=a[3],o=a[2],p=a[1];return[7,p,o,n,s(a[4],b)];case
8:var
q=a[3],r=a[2],t=a[1];return[8,t,r,q,s(a[4],b)];case
9:return[9,s(a[1],b)];case
10:return[10,s(a[1],b)];case
11:var
u=a[1];return[11,u,s(a[2],b)];case
12:var
v=a[1];return[12,v,s(a[2],b)];case
13:var
w=a[2],x=a[1];return[13,x,w,s(a[3],b)];case
14:var
y=a[2],z=a[1];return[14,z,y,s(a[3],b)];case
15:return[15,s(a[1],b)];case
16:return[16,s(a[1],b)];case
17:var
A=a[1];return[17,A,s(a[2],b)];case
18:var
B=a[1];return[18,B,s(a[2],b)];case
19:return[19,s(a[1],b)];case
20:var
C=a[2],D=a[1];return[20,D,C,s(a[3],b)];case
21:var
E=a[1];return[21,E,s(a[2],b)];case
22:return[22,s(a[1],b)];case
23:var
F=a[1];return[23,F,s(a[2],b)];default:var
G=a[2],H=a[1];return[24,H,G,s(a[3],b)]}}function
dq(a){throw[0,b4,a]}function
av(a){throw[0,dp,a]}aB(0);function
dr(b,a){return fL(b,a)?b:a}function
b5(a){return 0<=a?a:-a|0}var
f3=fj;function
H(d,c){var
a=i(d),e=i(c),b=F(a+e|0);aa(d,0,b,0,a);aa(c,0,b,a,e);return b}function
aw(a,b){if(a){var
c=a[1];return[0,c,aw(a[2],b)]}return b}rR(0);var
f6=fR(1),f7=fR(2),b6=[0,function(b){function
a(b){var
a=b;for(;;){if(a){var
c=a[2],d=a[1];try{dh(d)}catch(a){}var
a=c;continue}return 0}}return a(rS(0))}];function
f9(a){var
b=b6[1];b6[1]=function(d){c(a,0);return c(b,0)};return 0}function
f_(a){return c(b6[1],0)}function
a7(d,c){var
a=d,b=c;for(;;){if(a){var
e=[0,a[1],b],a=a[2],b=e;continue}return b}}function
a8(a){return a7(a,0)}function
b7(a){if(a){var
b=a[1];return aw(b,b7(a[2]))}return 0}function
O(b,a){if(a){var
d=a[2],e=c(b,a[1]);return[0,e,O(b,d)]}return 0}function
Y(d,b){var
a=b;for(;;){if(a){var
e=a[2];c(d,a[1]);var
a=e;continue}return 0}}function
f$(e,d){var
a=d;for(;;){if(a){var
b=a[1],f=a[2];if(c(e,b))return b;var
a=f;continue}throw K}}function
ds(f){var
g=0;return function(h){var
b=g,a=h;for(;;){if(a){var
d=a[2],e=a[1];if(c(f,e)){var
b=[0,e,b],a=d;continue}var
a=d;continue}return a8(b)}}}function
dt(d,c){var
b=d,a=c;for(;;){if(0===b)return a;if(a){var
b=b-1|0,a=a[2];continue}throw[0,y,ga]}}function
du(a){if(65<=a)if(!(90<a))return a+32|0;return a}function
aC(a,c){var
b=F(a);ro(b,0,a,c);return b}function
b8(a){var
b=i(a),c=F(b);aa(a,0,c,0,b);return c}function
dv(a){return b8(a)}function
dw(a){return b8(a)}function
dx(c,b,a){if(0<=b)if(0<=a)if(!((i(c)-a|0)<b)){var
d=F(a);aa(c,b,d,0,a);return d}return av(gi)}function
dy(c,b,a){return dx(c,b,a)}function
dz(e,c,d,b,a){if(0<=a)if(0<=c)if(!((i(e)-a|0)<c))if(0<=b)if(!((i(d)-a|0)<b))return aa(e,c,d,b,a);return av(gj)}function
af(e,c,d,b,a){if(0<=a)if(0<=c)if(!((i(e)-a|0)<c))if(0<=b)if(!((i(d)-a|0)<b))return aa(e,c,d,b,a);return av(gk)}function
gl(e,d,c,b){var
a=c;for(;;){if(d<=a)throw K;if(a6(e,a)===b)return a;var
a=a+1|0;continue}}function
gm(b,a,d){var
c=i(b);if(0<=a)if(!(c<a))try{gl(b,c,a,d);var
e=1;return e}catch(a){a=ae(a);if(a===K)return 0;throw a}return av(gn)}function
aP(b,a){return aC(b,a)}function
b9(c,b,a){return dx(c,b,a)}function
b_(c,b){if(b){var
e=b[1],g=[0,0],f=[0,0],h=b[2];Y(function(a){g[1]++;f[1]=f[1]+i(a)|0;return 0},b);var
d=F(f[1]+by(i(c),g[1]-1|0)|0);aa(e,0,d,0,i(e));var
a=[0,i(e)];Y(function(b){aa(c,0,d,a[1],i(c));a[1]=a[1]+i(c)|0;aa(b,0,d,a[1],i(b));a[1]=a[1]+i(b)|0;return 0},h);return d}return go}var
b$=r3(0),a9=(4*b$|0)-1|0;function
gp(b,a){return gm(b,0,a)}aB(0);aB(0);var
gr=[Q,gq,aB(0)];function
gs(a){throw gr}function
gt(a){var
d=a[1];a[1]=gs;try{var
b=c(d,0);a[1]=b;rV(a,bq);return b}catch(b){b=ae(b);a[1]=function(a){throw b};throw b}}function
dA(a){var
b=1<=a?a:1,c=a9<b?a9:b,d=F(c);return[0,d,0,c,d]}function
ca(a,c){var
b=[0,a[3]];for(;;){if(b[1]<(a[2]+c|0)){b[1]=2*b[1]|0;continue}if(a9<b[1])if((a[2]+c|0)<=a9)b[1]=a9;else
dq(gu);var
d=F(b[1]);dz(a[1],0,d,0,a[2]);a[1]=d;a[3]=b[1];return 0}}function
a_(a,c){var
b=i(c),d=a[2]+b|0;if(a[3]<d)ca(a,b);af(c,0,a[1],a[2],b);a[2]=d;return 0}var
cb=-6;function
dB(a){return[0,0,F(a)]}function
dC(a,g){var
b=i(a[2]),c=a[1]+g|0,d=b<c?1:0;if(d){var
e=F(dr(b*2|0,c));dz(a[2],0,e,0,b);a[2]=e;var
f=0}else
var
f=d;return f}function
a$(a,b){dC(a,1);au(a[2],a[1],b);a[1]=a[1]+1|0;return 0}function
L(a,c){var
b=i(c);dC(a,b);af(c,0,a[2],a[1],b);a[1]=a[1]+b|0;return 0}function
dD(a){return dy(a[2],0,a[1])}function
cc(b,c){var
a=c;for(;;)if(typeof
a==="number")return 0;else
switch(a[0]){case
0:var
d=a[1];L(b,gE);var
a=d;continue;case
1:var
e=a[1];L(b,gF);var
a=e;continue;case
2:var
f=a[1];L(b,gG);var
a=f;continue;case
3:var
g=a[1];L(b,gH);var
a=g;continue;case
4:var
h=a[1];L(b,gI);var
a=h;continue;case
5:var
i=a[1];L(b,gJ);var
a=i;continue;case
6:var
j=a[1];L(b,gK);var
a=j;continue;case
7:var
k=a[1];L(b,gL);var
a=k;continue;case
8:var
l=a[2],m=a[1];L(b,gM);cc(b,m);L(b,gN);var
a=l;continue;case
9:var
n=a[3],o=a[1];L(b,gO);cc(b,o);L(b,gP);var
a=n;continue;case
10:var
p=a[1];L(b,gQ);var
a=p;continue;case
11:var
q=a[1];L(b,gR);var
a=q;continue;case
12:var
r=a[1];L(b,gS);var
a=r;continue;case
13:var
s=a[1];L(b,gT);var
a=s;continue;default:var
t=a[1];L(b,gU);var
a=t;continue}}function
z(a){if(typeof
a==="number")return 0;else
switch(a[0]){case
0:return[0,z(a[1])];case
1:return[1,z(a[1])];case
2:return[2,z(a[1])];case
3:return[3,z(a[1])];case
4:return[4,z(a[1])];case
5:return[5,z(a[1])];case
6:return[6,z(a[1])];case
7:return[7,z(a[1])];case
8:var
b=a[1];return[8,b,z(a[2])];case
9:var
c=a[2],d=a[1];return[9,c,d,z(a[3])];case
10:return[10,z(a[1])];case
11:return[11,z(a[1])];case
12:return[12,z(a[1])];case
13:return[13,z(a[1])];default:return[14,z(a[1])]}}function
M(a){if(typeof
a==="number"){var
s=function(a){return 0},t=function(a){return 0},u=function(a){return 0};return[0,function(a){return 0},u,t,s]}else
switch(a[0]){case
0:var
b=M(a[1]),v=b[4],w=b[3],x=b[2],y=b[1],A=function(a){c(x,0);return 0};return[0,function(a){c(y,0);return 0},A,w,v];case
1:var
d=M(a[1]),B=d[4],D=d[3],E=d[2],F=d[1],G=function(a){c(E,0);return 0};return[0,function(a){c(F,0);return 0},G,D,B];case
2:var
e=M(a[1]),H=e[4],I=e[3],J=e[2],K=e[1],L=function(a){c(J,0);return 0};return[0,function(a){c(K,0);return 0},L,I,H];case
3:var
f=M(a[1]),N=f[4],O=f[3],P=f[2],Q=f[1],R=function(a){c(P,0);return 0};return[0,function(a){c(Q,0);return 0},R,O,N];case
4:var
g=M(a[1]),S=g[4],T=g[3],U=g[2],V=g[1],W=function(a){c(U,0);return 0};return[0,function(a){c(V,0);return 0},W,T,S];case
5:var
h=M(a[1]),X=h[4],Y=h[3],Z=h[2],_=h[1],$=function(a){c(Z,0);return 0};return[0,function(a){c(_,0);return 0},$,Y,X];case
6:var
i=M(a[1]),aa=i[4],ab=i[3],ac=i[2],ad=i[1],ae=function(a){c(ac,0);return 0};return[0,function(a){c(ad,0);return 0},ae,ab,aa];case
7:var
j=M(a[1]),af=j[4],ag=j[3],ah=j[2],ai=j[1],aj=function(a){c(ah,0);return 0};return[0,function(a){c(ai,0);return 0},aj,ag,af];case
8:var
k=M(a[2]),ak=k[4],al=k[3],am=k[2],an=k[1],ao=function(a){c(am,0);return 0};return[0,function(a){c(an,0);return 0},ao,al,ak];case
9:var
ap=a[2],aq=a[1],l=M(a[3]),ar=l[4],as=l[3],at=l[2],au=l[1],m=M(C(z(aq),ap)),av=m[4],aw=m[3],ax=m[2],ay=m[1],az=function(a){c(av,0);c(ar,0);return 0},aA=function(a){c(as,0);c(aw,0);return 0},aB=function(a){c(ax,0);c(at,0);return 0};return[0,function(a){c(au,0);c(ay,0);return 0},aB,aA,az];case
10:var
n=M(a[1]),aC=n[4],aD=n[3],aE=n[2],aF=n[1],aG=function(a){c(aE,0);return 0};return[0,function(a){c(aF,0);return 0},aG,aD,aC];case
11:var
o=M(a[1]),aH=o[4],aI=o[3],aJ=o[2],aK=o[1],aL=function(a){c(aJ,0);return 0};return[0,function(a){c(aK,0);return 0},aL,aI,aH];case
12:var
p=M(a[1]),aM=p[4],aN=p[3],aO=p[2],aP=p[1],aQ=function(a){c(aO,0);return 0};return[0,function(a){c(aP,0);return 0},aQ,aN,aM];case
13:var
q=M(a[1]),aR=q[4],aS=q[3],aT=q[2],aU=q[1],aV=function(a){c(aR,0);return 0},aW=function(a){c(aS,0);return 0},aX=function(a){c(aT,0);return 0};return[0,function(a){c(aU,0);return 0},aX,aW,aV];default:var
r=M(a[1]),aY=r[4],aZ=r[3],a0=r[2],a1=r[1],a2=function(a){c(aY,0);return 0},a3=function(a){c(aZ,0);return 0},a4=function(a){c(a0,0);return 0};return[0,function(a){c(a1,0);return 0},a4,a3,a2]}}function
C(d,b){if(typeof
d==="number")if(typeof
b==="number")return 0;else
switch(b[0]){case
10:var
a=0;break;case
11:var
a=1;break;case
12:var
a=2;break;case
13:var
a=3;break;case
14:var
a=4;break;case
8:var
a=5;break;case
9:var
a=6;break;default:throw[0,y,gV]}else
switch(d[0]){case
0:var
t=d[1];if(typeof
b==="number")var
e=1;else
switch(b[0]){case
0:return[0,C(t,b[1])];case
8:var
a=5,e=0;break;case
9:var
a=6,e=0;break;case
10:var
a=0,e=0;break;case
11:var
a=1,e=0;break;case
12:var
a=2,e=0;break;case
13:var
a=3,e=0;break;case
14:var
a=4,e=0;break;default:var
e=1}if(e)var
a=7;break;case
1:var
u=d[1];if(typeof
b==="number")var
f=1;else
switch(b[0]){case
1:return[1,C(u,b[1])];case
8:var
a=5,f=0;break;case
9:var
a=6,f=0;break;case
10:var
a=0,f=0;break;case
11:var
a=1,f=0;break;case
12:var
a=2,f=0;break;case
13:var
a=3,f=0;break;case
14:var
a=4,f=0;break;default:var
f=1}if(f)var
a=7;break;case
2:var
v=d[1];if(typeof
b==="number")var
g=1;else
switch(b[0]){case
2:return[2,C(v,b[1])];case
8:var
a=5,g=0;break;case
9:var
a=6,g=0;break;case
10:var
a=0,g=0;break;case
11:var
a=1,g=0;break;case
12:var
a=2,g=0;break;case
13:var
a=3,g=0;break;case
14:var
a=4,g=0;break;default:var
g=1}if(g)var
a=7;break;case
3:var
w=d[1];if(typeof
b==="number")var
h=1;else
switch(b[0]){case
3:return[3,C(w,b[1])];case
8:var
a=5,h=0;break;case
9:var
a=6,h=0;break;case
10:var
a=0,h=0;break;case
11:var
a=1,h=0;break;case
12:var
a=2,h=0;break;case
13:var
a=3,h=0;break;case
14:var
a=4,h=0;break;default:var
h=1}if(h)var
a=7;break;case
4:var
x=d[1];if(typeof
b==="number")var
i=1;else
switch(b[0]){case
4:return[4,C(x,b[1])];case
8:var
a=5,i=0;break;case
9:var
a=6,i=0;break;case
10:var
a=0,i=0;break;case
11:var
a=1,i=0;break;case
12:var
a=2,i=0;break;case
13:var
a=3,i=0;break;case
14:var
a=4,i=0;break;default:var
i=1}if(i)var
a=7;break;case
5:var
A=d[1];if(typeof
b==="number")var
j=1;else
switch(b[0]){case
5:return[5,C(A,b[1])];case
8:var
a=5,j=0;break;case
9:var
a=6,j=0;break;case
10:var
a=0,j=0;break;case
11:var
a=1,j=0;break;case
12:var
a=2,j=0;break;case
13:var
a=3,j=0;break;case
14:var
a=4,j=0;break;default:var
j=1}if(j)var
a=7;break;case
6:var
B=d[1];if(typeof
b==="number")var
k=1;else
switch(b[0]){case
6:return[6,C(B,b[1])];case
8:var
a=5,k=0;break;case
9:var
a=6,k=0;break;case
10:var
a=0,k=0;break;case
11:var
a=1,k=0;break;case
12:var
a=2,k=0;break;case
13:var
a=3,k=0;break;case
14:var
a=4,k=0;break;default:var
k=1}if(k)var
a=7;break;case
7:var
D=d[1];if(typeof
b==="number")var
l=1;else
switch(b[0]){case
7:return[7,C(D,b[1])];case
8:var
a=5,l=0;break;case
9:var
a=6,l=0;break;case
10:var
a=0,l=0;break;case
11:var
a=1,l=0;break;case
12:var
a=2,l=0;break;case
13:var
a=3,l=0;break;case
14:var
a=4,l=0;break;default:var
l=1}if(l)var
a=7;break;case
8:var
E=d[2],F=d[1];if(typeof
b==="number")var
n=1;else
switch(b[0]){case
8:var
G=b[1],H=C(E,b[2]);return[8,C(F,G),H];case
10:var
a=0,n=0;break;case
11:var
a=1,n=0;break;case
12:var
a=2,n=0;break;case
13:var
a=3,n=0;break;case
14:var
a=4,n=0;break;default:var
n=1}if(n)throw[0,y,g4];break;case
9:var
I=d[3],J=d[2],K=d[1];if(typeof
b==="number")var
m=1;else
switch(b[0]){case
8:var
a=5,m=0;break;case
9:var
L=b[3],N=b[2],O=b[1],s=M(C(z(J),O)),P=s[4];c(s[2],0);c(P,0);return[9,K,N,C(I,L)];case
10:var
a=0,m=0;break;case
11:var
a=1,m=0;break;case
12:var
a=2,m=0;break;case
13:var
a=3,m=0;break;case
14:var
a=4,m=0;break;default:var
m=1}if(m)throw[0,y,g5];break;case
10:var
Q=d[1];if(typeof
b!=="number"&&10===b[0])return[10,C(Q,b[1])];throw[0,y,g6];case
11:var
R=d[1];if(typeof
b==="number")var
r=1;else
switch(b[0]){case
10:var
a=0,r=0;break;case
11:return[11,C(R,b[1])];default:var
r=1}if(r)throw[0,y,g7];break;case
12:var
S=d[1];if(typeof
b==="number")var
q=1;else
switch(b[0]){case
10:var
a=0,q=0;break;case
11:var
a=1,q=0;break;case
12:return[12,C(S,b[1])];default:var
q=1}if(q)throw[0,y,g8];break;case
13:var
T=d[1];if(typeof
b==="number")var
p=1;else
switch(b[0]){case
10:var
a=0,p=0;break;case
11:var
a=1,p=0;break;case
12:var
a=2,p=0;break;case
13:return[13,C(T,b[1])];default:var
p=1}if(p)throw[0,y,g9];break;default:var
U=d[1];if(typeof
b==="number")var
o=1;else
switch(b[0]){case
10:var
a=0,o=0;break;case
11:var
a=1,o=0;break;case
12:var
a=2,o=0;break;case
13:var
a=3,o=0;break;case
14:return[14,C(U,b[1])];default:var