-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbundle.js
More file actions
6242 lines (6242 loc) · 314 KB
/
bundle.js
File metadata and controls
6242 lines (6242 loc) · 314 KB
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
( () => {
"use strict";
var e = {
7403: (e, t) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.KeyboardHandler = void 0,
t.KeyboardHandler = class {
constructor(e, t) {
this.keyDown = e => {
"Tab" === e.code && e.preventDefault(),
this.keys.has(e.code) || this.keyDownCallback(e.code, e.key),
this.keys.add(e.code),
this.chars.add(e.key)
}
,
this.keyUp = e => {
if ("MetaLeft" === e.code || "MetaRight" === e.code || "ControlLeft" === e.code || "ControlRight" === e.code)
return this.keys.clear(),
void this.chars.clear();
this.keys.has(e.code) && this.keyUpCallback(e.code),
this.keys.delete(e.code),
this.chars.delete(e.key)
}
,
this.keys = new Set,
this.chars = new Set,
this.keyDownCallback = e,
this.keyUpCallback = t,
document.addEventListener("keydown", this.keyDown),
document.addEventListener("keyup", this.keyUp)
}
dispose() {
document.removeEventListener("keydown", this.keyDown),
document.removeEventListener("keyup", this.keyUp)
}
getKeyPressed(e) {
return this.keys.has(e)
}
getShiftPressed() {
return this.getKeyPressed("ShiftLeft") || this.getKeyPressed("ShiftRight")
}
getCtrlPressed() {
const e = this.getKeyPressed("ControlLeft") || this.getKeyPressed("ControlRight")
, t = this.getKeyPressed("MetaLeft") || this.getKeyPressed("MetaRight");
return e || t
}
getCharPressed(e) {
return this.chars.has(e)
}
}
}
,
8463: (e, t) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.MouseHandler = void 0,
t.MouseHandler = class {
constructor(e, t, s, i) {
this.mouseMove = e => {
this.mouseX = e.clientX - this.rect.x,
this.mouseY = e.clientY - this.rect.y
}
,
this.mouseDown = e => {
0 === e.button && (this.mousePressed = !0),
1 === e.button && (e.preventDefault(),
this.wheelPressed = !0)
}
,
this.mouseUp = e => {
0 === e.button && (this.mousePressed = !1),
1 === e.button && (e.preventDefault(),
this.wheelPressed = !1)
}
,
this.wheel = e => {
this.wheelAction(e.deltaY),
this.mouseX = e.clientX - this.rect.x,
this.mouseY = e.clientY - this.rect.y
}
,
this.leftClick = e => {
this.leftClickCallback()
}
,
this.rightClick = e => {
this.rightClickCallback()
}
,
this.touchMove = e => {
e.preventDefault();
const t = e.touches[0];
this.mouseX = t.clientX - this.rect.x,
this.mouseY = t.clientY - this.rect.y
}
,
this.touchStart = e => {
this.mousePressed = !0;
const t = e.touches[0];
this.mouseX = t.clientX - this.rect.x,
this.mouseY = t.clientY - this.rect.y
}
,
this.touchEnd = e => {
this.mousePressed = !1
}
,
this.leftClickCallback = t,
this.rightClickCallback = s,
this.wheelAction = i,
this.mouseX = 0,
this.mouseY = 0,
this.mousePressed = !1,
this.wheelPressed = !1,
this.rect = e.getBoundingClientRect(),
document.addEventListener("mousemove", this.mouseMove),
document.addEventListener("mousedown", this.mouseDown),
document.addEventListener("mouseup", this.mouseUp),
document.addEventListener("wheel", this.wheel),
document.addEventListener("touchmove", this.touchMove, {
passive: !1
}),
document.addEventListener("touchstart", this.touchStart, {
passive: !1
}),
document.addEventListener("touchend", this.touchEnd, {
passive: !1
}),
document.addEventListener("click", this.leftClick),
document.addEventListener("contextmenu", this.rightClick)
}
dispose() {
document.removeEventListener("mousemove", this.mouseMove),
document.removeEventListener("mousedown", this.mouseDown),
document.removeEventListener("mouseup", this.mouseUp),
document.removeEventListener("wheel", this.wheel),
document.removeEventListener("touchmove", this.touchMove),
document.removeEventListener("touchstart", this.touchStart),
document.removeEventListener("touchend", this.touchEnd),
document.removeEventListener("click", this.leftClick),
document.removeEventListener("contextmenu", this.rightClick)
}
getMousePosition() {
return [this.mouseX, this.mouseY]
}
getMousePressed() {
return this.mousePressed
}
getWheelPressed() {
return this.wheelPressed
}
}
}
,
82: (e, t) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.ArrowData = void 0;
class s {
constructor() {
this.type = 0,
this.rotation = 0,
this.flipped = !1
}
static fromArrow(e) {
const t = new s;
return void 0 === e || (t.type = e.type,
t.rotation = e.rotation,
t.flipped = e.flipped),
t
}
static fromState(e, t, i) {
const n = new s;
return n.type = e,
n.rotation = t,
n.flipped = i,
n
}
static fromCopy(e) {
const t = new s;
return t.type = e.type,
t.rotation = e.rotation,
t.flipped = e.flipped,
t
}
equals(e) {
return this.type === e.type && this.rotation === e.rotation && this.flipped === e.flipped
}
}
t.ArrowData = s
}
,
370: (e, t) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.Arrow = void 0,
t.Arrow = class {
constructor() {
this.type = 0,
this.rotation = 0,
this.flipped = !1,
this.signal = 0,
this.signalsCount = 0,
this.lastType = 0,
this.lastRotation = 0,
this.lastFlipped = !1,
this.lastSignal = 0,
this.canBeEdited = !0
}
}
}
,
691: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.ChunkUpdates = void 0;
const i = s(3278);
var n;
!function(e) {
function t(e) {
void 0 !== e && e.signalsCount++
}
function s(e) {
void 0 !== e && (e.signal = 0)
}
function n(e) {
e.lastType = e.type,
e.lastRotation = e.rotation,
e.lastFlipped = e.flipped,
e.lastSignal = e.signal
}
function o(e, t, s, n, o, a=-1, r=0) {
o && (r = -r),
0 === n ? (s += a,
t += r) : 1 === n ? (t -= a,
s += r) : 2 === n ? (s -= a,
t -= r) : 3 === n && (t += a,
s -= r);
let l = e;
if (t >= i.CHUNK_SIZE ? s >= i.CHUNK_SIZE ? (l = e.adjacentChunks[3],
t -= i.CHUNK_SIZE,
s -= i.CHUNK_SIZE) : s < 0 ? (l = e.adjacentChunks[1],
t -= i.CHUNK_SIZE,
s += i.CHUNK_SIZE) : (l = e.adjacentChunks[2],
t -= i.CHUNK_SIZE) : t < 0 ? s < 0 ? (l = e.adjacentChunks[7],
t += i.CHUNK_SIZE,
s += i.CHUNK_SIZE) : s >= i.CHUNK_SIZE ? (l = e.adjacentChunks[5],
t += i.CHUNK_SIZE,
s -= i.CHUNK_SIZE) : (l = e.adjacentChunks[6],
t += i.CHUNK_SIZE) : s < 0 ? (l = e.adjacentChunks[0],
s += i.CHUNK_SIZE) : s >= i.CHUNK_SIZE && (l = e.adjacentChunks[4],
s -= i.CHUNK_SIZE),
void 0 !== l)
return l.getArrow(t, s)
}
e.update = function(e) {
e.chunks.forEach((e => function(e) {
for (let s = 0; s < i.CHUNK_SIZE; s++)
for (let a = 0; a < i.CHUNK_SIZE; a++) {
const i = e.getArrow(s, a);
n(i),
1 === i.type ? 1 === i.signal && t(o(e, s, a, i.rotation, i.flipped)) : 2 === i.type ? 1 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, 1)),
t(o(e, s, a, i.rotation, i.flipped, 1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, -1))) : 4 === i.type || 5 === i.type ? 1 === i.signal && t(o(e, s, a, i.rotation, i.flipped)) : 6 === i.type ? 1 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 1, 0))) : 7 === i.type ? 1 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, 1))) : 8 === i.type ? 1 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, 1)),
t(o(e, s, a, i.rotation, i.flipped, 0, -1))) : 9 === i.type ? 1 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, 1)),
t(o(e, s, a, i.rotation, i.flipped, 1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, -1))) : 10 === i.type ? 2 === i.signal && t(o(e, s, a, i.rotation, i.flipped, -2)) : 11 === i.type ? 2 === i.signal && t(o(e, s, a, i.rotation, i.flipped, -1, 1)) : 12 === i.type ? 2 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, -2, 0))) : 13 === i.type ? 2 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -2, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, 1))) : 14 === i.type ? 2 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, -1, 1))) : 15 === i.type || 16 === i.type || 17 === i.type || 18 === i.type || 19 === i.type ? 3 === i.signal && t(o(e, s, a, i.rotation, i.flipped)) : 20 === i.type ? 5 === i.signal && t(o(e, s, a, i.rotation, i.flipped)) : 21 === i.type ? 5 === i.signal && (t(o(e, s, a, i.rotation, i.flipped, -1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, 1)),
t(o(e, s, a, i.rotation, i.flipped, 1, 0)),
t(o(e, s, a, i.rotation, i.flipped, 0, -1))) : 22 === i.type ? 1 === i.signal && t(o(e, s, a, i.rotation, i.flipped)) : 24 === i.type && 5 === i.signal && t(o(e, s, a, i.rotation, i.flipped))
}
}(e))),
e.chunks.forEach((e => function(e) {
for (let t = 0; t < i.CHUNK_SIZE; t++)
for (let s = 0; s < i.CHUNK_SIZE; s++) {
const i = e.getArrow(t, s);
if (1 === i.type)
i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
else if (2 === i.type)
i.signal = 1;
else if (3 === i.type)
i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
else if (4 === i.type)
2 === i.signal ? i.signal = 1 : 0 === i.signal && i.signalsCount > 0 ? i.signal = 2 : 1 === i.signal && i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
else if (5 === i.type) {
const n = o(e, t, s, i.rotation, i.flipped, 1);
void 0 !== n && 0 !== n.lastSignal ? i.signal = 1 : i.signal = 0
} else if (6 === i.type)
i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
else if (7 === i.type)
i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
else if (8 === i.type)
i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
else if (9 === i.type)
0 === i.signal ? i.signal = 1 : 1 === i.signal && (i.signal = 2);
else if (10 === i.type)
i.signalsCount > 0 ? i.signal = 2 : i.signal = 0;
else if (11 === i.type)
i.signalsCount > 0 ? i.signal = 2 : i.signal = 0;
else if (12 === i.type)
i.signalsCount > 0 ? i.signal = 2 : i.signal = 0;
else if (13 === i.type)
i.signalsCount > 0 ? i.signal = 2 : i.signal = 0;
else if (14 === i.type)
i.signalsCount > 0 ? i.signal = 2 : i.signal = 0;
else if (15 === i.type)
i.signalsCount > 0 ? i.signal = 0 : i.signal = 3;
else if (16 === i.type)
i.signalsCount > 1 ? i.signal = 3 : i.signal = 0;
else if (17 === i.type)
i.signalsCount % 2 == 1 ? i.signal = 3 : i.signal = 0;
else if (18 === i.type)
i.signalsCount > 1 ? i.signal = 3 : 1 === i.signalsCount && (i.signal = 0);
else if (19 === i.type)
i.signalsCount > 0 && (0 === i.signal ? i.signal = 3 : i.signal = 0);
else if (20 === i.type)
i.signalsCount > 0 && Math.random() < .5 ? i.signal = 5 : i.signal = 0;
else if (21 === i.type)
i.signal = 0;
else if (22 === i.type) {
i.signalsCount > 0 ? i.signal = 1 : i.signal = 0;
const n = e.getLevelArrow(t, s);
null == n || n.update()
} else
23 === i.type ? i.signalsCount > 0 ? i.signal = 1 : i.signal = 0 : 24 === i.type && (i.signalsCount > 0 ? i.signal = 5 : i.signal = 0);
i.signalsCount = 0
}
}(e))),
e.chunks.forEach((e => function(e) {
for (let t = 0; t < i.CHUNK_SIZE; t++)
for (let n = 0; n < i.CHUNK_SIZE; n++) {
const i = e.getArrow(t, n);
3 === i.type && 1 === i.lastSignal && s(o(e, t, n, i.rotation, i.flipped))
}
}(e))),
e.chunks.forEach((e => function(e) {
e.levelArrows.forEach((e => {
23 === e.arrow.type && e.update()
}
))
}(e)))
}
,
e.wasArrowChanged = function(e) {
return e.type !== e.lastType || e.rotation !== e.lastRotation || e.flipped !== e.lastFlipped || e.signal !== e.lastSignal
}
,
e.clearSignals = function(e) {
e.chunks.forEach((e => {
for (let t = 0; t < i.CHUNK_SIZE; t++)
for (let s = 0; s < i.CHUNK_SIZE; s++) {
const i = e.getArrow(t, s);
i.signal = 0,
i.lastSignal = 0,
i.signalsCount = 0
}
e.levelArrows.forEach((e => {
e.state = null
}
))
}
))
}
}(n || (t.ChunkUpdates = n = {}))
}
,
8798: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.Chunk = void 0;
const i = s(370)
, n = s(3278);
t.Chunk = class {
constructor(e, t) {
this.x = e,
this.y = t,
this.adjacentChunks = new Array(8),
this.arrows = new Array(n.CHUNK_SIZE * n.CHUNK_SIZE);
for (let e = 0; e < n.CHUNK_SIZE; e++)
for (let t = 0; t < n.CHUNK_SIZE; t++)
this.arrows[e + t * n.CHUNK_SIZE] = new i.Arrow;
this.levelArrows = new Map
}
getArrow(e, t) {
return this.arrows[e + t * n.CHUNK_SIZE]
}
removeArrow(e, t) {
this.arrows[e + t * n.CHUNK_SIZE].type = 0,
this.arrows[e + t * n.CHUNK_SIZE].rotation = 0,
this.arrows[e + t * n.CHUNK_SIZE].flipped = !1,
this.arrows[e + t * n.CHUNK_SIZE].signal = 0
}
getLevelArrow(e, t) {
return this.levelArrows.get(e + t * n.CHUNK_SIZE)
}
isEmpty() {
for (let e = 0; e < n.CHUNK_SIZE; e++)
for (let t = 0; t < n.CHUNK_SIZE; t++)
if (0 !== this.arrows[e + t * n.CHUNK_SIZE].type)
return !1;
return !0
}
getArrowTypes() {
const e = new Set;
for (let t = 0; t < n.CHUNK_SIZE; t++)
for (let s = 0; s < n.CHUNK_SIZE; s++) {
const i = this.getArrow(t, s).type;
0 !== i && e.add(i)
}
return Array.from(e)
}
clear() {
for (let e = 0; e < n.CHUNK_SIZE; e++)
for (let t = 0; t < n.CHUNK_SIZE; t++)
this.arrows[e + t * n.CHUNK_SIZE].type = 0;
this.levelArrows.clear()
}
}
}
,
3278: (e, t) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.CHUNK_SIZE = t.CELL_SIZE = void 0,
t.CELL_SIZE = 256,
t.CHUNK_SIZE = 16
}
,
4817: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.GameMap = void 0;
const i = s(258)
, n = s(8798)
, o = s(3278);
t.GameMap = class {
constructor() {
this.chunks = new Map
}
setArrowType(e, t, s, n=!0) {
const a = this.getOrCreateChunkByArrowCoordinates(e, t)
, r = a.getArrow(e - a.x * o.CHUNK_SIZE, t - a.y * o.CHUNK_SIZE);
n && !r.canBeEdited || n && i.PlayerSettings.levelArrows.includes(r.type) || (r.type !== s && (r.signal = 0),
r.type = s)
}
setArrowSignal(e, t, s) {
const i = this.getArrowForEditing(e, t);
void 0 !== i && 0 !== i.type && (i.signal = s)
}
setArrowRotation(e, t, s, n=!0) {
const o = this.getArrowForEditing(e, t);
if (void 0 !== o && 0 !== o.type) {
if (n && !o.canBeEdited)
return;
if (n && i.PlayerSettings.levelArrows.includes(o.type))
return;
o.rotation = s
}
}
setArrowFlipped(e, t, s, n=!0) {
const o = this.getArrowForEditing(e, t);
if (void 0 !== o && 0 !== o.type) {
if (n && !o.canBeEdited)
return;
if (n && i.PlayerSettings.levelArrows.includes(o.type))
return;
o.flipped = s
}
}
getArrowType(e, t) {
const s = this.getArrow(e, t);
return void 0 === s ? 0 : s.type
}
resetArrow(e, t, s=!0) {
const n = this.getArrowForEditing(e, t);
void 0 !== n && (s && !n.canBeEdited || s && i.PlayerSettings.levelArrows.includes(n.type) || (n.type = 0,
n.signal = 0,
n.signalsCount = 0,
n.rotation = 0,
n.flipped = !1))
}
removeArrow(e, t, s=!0) {
const n = this.getChunkByArrowCoordinates(e, t);
if (void 0 === n)
return;
const o = this.getArrowForEditing(e, t);
if (void 0 !== o) {
if (s && !o.canBeEdited)
return;
if (s && i.PlayerSettings.levelArrows.includes(o.type))
return;
o.type = 0,
o.signal = 0,
o.signalsCount = 0,
o.rotation = 0,
o.flipped = !1
}
this.clearChunkIfEmpty(n)
}
getArrow(e, t) {
const s = this.getChunkByArrowCoordinates(e, t);
if (void 0 !== s)
return s.getArrow(e - s.x * o.CHUNK_SIZE, t - s.y * o.CHUNK_SIZE)
}
getChunk(e, t) {
const s = `${e},${t}`;
return this.chunks.get(s)
}
getOrCreateChunk(e, t) {
const s = `${e},${t}`
, i = this.chunks.get(s);
if (void 0 !== i)
return i;
const o = new n.Chunk(e,t);
this.chunks.set(s, o);
const a = [this.getChunk(e, t - 1), this.getChunk(e + 1, t - 1), this.getChunk(e + 1, t), this.getChunk(e + 1, t + 1), this.getChunk(e, t + 1), this.getChunk(e - 1, t + 1), this.getChunk(e - 1, t), this.getChunk(e - 1, t - 1)];
for (let e = 0; e < 8; e++) {
const t = a[e];
void 0 !== t && (o.adjacentChunks[e] = t,
t.adjacentChunks[(e + 4) % 8] = o)
}
return o
}
clear() {
this.chunks.forEach((e => {
e.clear(),
this.clearChunkIfEmpty(e)
}
))
}
getChunkByArrowCoordinates(e, t) {
const s = e < 0 ? 1 : 0
, i = t < 0 ? 1 : 0
, n = ~~((e + s) / o.CHUNK_SIZE) - s
, a = ~~((t + i) / o.CHUNK_SIZE) - i;
return this.getChunk(n, a)
}
clearChunkIfEmpty(e) {
if (e.isEmpty()) {
for (let t = 0; t < 8; t++) {
const s = e.adjacentChunks[t];
void 0 !== s && (s.adjacentChunks[(t + 4) % 8] = void 0)
}
this.chunks.delete(`${e.x},${e.y}`)
}
}
setLevelArrow(e) {
const t = this.getOrCreateChunkByArrowCoordinates(e.x, e.y)
, s = e.x - t.x * o.CHUNK_SIZE + (e.y - t.y * o.CHUNK_SIZE) * o.CHUNK_SIZE;
if (t.levelArrows.has(s))
return;
t.levelArrows.set(s, e);
const i = t.getArrow(e.x - t.x * o.CHUNK_SIZE, e.y - t.y * o.CHUNK_SIZE);
i.type = e.type,
e.arrow = i
}
getOrCreateChunkByArrowCoordinates(e, t) {
const s = e < 0 ? 1 : 0
, i = t < 0 ? 1 : 0
, n = ~~((e + s) / o.CHUNK_SIZE) - s
, a = ~~((t + i) / o.CHUNK_SIZE) - i;
return this.getOrCreateChunk(n, a)
}
getArrowForEditing(e, t) {
const s = this.getChunkByArrowCoordinates(e, t);
if (void 0 !== s)
return s.getArrow(e - s.x * o.CHUNK_SIZE, t - s.y * o.CHUNK_SIZE)
}
}
}
,
7514: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.LevelArrow = void 0;
const i = s(370);
t.LevelArrow = class {
constructor(e, t, s, n) {
this.type = e,
this.x = t,
this.y = s,
this.action = n,
this.levelAction = () => {}
,
this.state = null,
this.isStateValid = !1,
this.arrow = new i.Arrow
}
setAction(e) {
this.action = e
}
setLevelAction(e) {
this.levelAction = e
}
update() {
this.isStateValid = this.action(this)
}
updateLevel() {
this.levelAction()
}
isValid() {
return this.isStateValid
}
}
}
,
110: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.SelectedMap = void 0;
const i = s(2149)
, n = s(2714)
, o = s(974)
, a = s(370)
, r = s(3278)
, l = s(4817);
t.SelectedMap = class {
constructor() {
this.selectedArrows = new Set,
this.arrowsToPutOriginal = new Map,
this.arrowsToPut = new Map,
this.currentSelectedArrows = new Set,
this.currentSelectionFirstPoint = void 0,
this.currentSelectionSecondPoint = void 0,
this.rotationState = 0,
this.flipState = !1,
this.tempMap = new l.GameMap
}
select(e, t) {
this.currentSelectedArrows.add(`${e},${t}`)
}
deselect(e, t) {
this.selectedArrows.delete(`${e},${t}`)
}
clearCurrentSelection() {
this.currentSelectedArrows.clear()
}
clear() {
this.selectedArrows.clear()
}
getSelectedArrows() {
return [...this.selectedArrows, ...this.currentSelectedArrows]
}
getCount() {
return this.selectedArrows.size
}
updateSelectionFromCurrentSelection() {
this.selectedArrows = new Set([...this.selectedArrows, ...this.currentSelectedArrows]),
this.currentSelectedArrows.clear(),
this.currentSelectionFirstPoint = void 0,
this.currentSelectionSecondPoint = void 0
}
updateCurrentSelectedArea(e, t) {
void 0 !== this.currentSelectionFirstPoint ? this.currentSelectionSecondPoint = [e, t] : this.currentSelectionFirstPoint = [e, t]
}
updateMouseSelection(e, t, s, i) {
if (i || this.clear(),
this.updateCurrentSelectedArea(t, s),
void 0 === this.currentSelectionFirstPoint || void 0 === this.currentSelectionSecondPoint)
return;
const n = this.currentSelectionFirstPoint[0] - (this.currentSelectionFirstPoint[0] < 0 ? 1 : 0)
, o = this.currentSelectionFirstPoint[1] - (this.currentSelectionFirstPoint[1] < 0 ? 1 : 0)
, a = this.currentSelectionSecondPoint[0] - (this.currentSelectionSecondPoint[0] < 0 ? 1 : 0)
, r = this.currentSelectionSecondPoint[1] - (this.currentSelectionSecondPoint[1] < 0 ? 1 : 0)
, l = ~~n
, h = ~~o
, c = ~~a
, d = ~~r;
if (this.clearCurrentSelection(),
Math.abs(n - a) > .25 || Math.abs(o - r) > .25) {
const t = Math.min(l, c)
, s = Math.min(h, d)
, i = Math.max(l, c)
, n = Math.max(h, d);
for (let o = t; o <= i; o++)
for (let t = s; t <= n; t++)
0 !== e.getArrowType(o, t) && this.select(o, t)
}
}
getCurrentSelectedArea() {
if (void 0 !== this.currentSelectionFirstPoint && void 0 !== this.currentSelectionSecondPoint)
return [this.currentSelectionFirstPoint[0], this.currentSelectionFirstPoint[1], this.currentSelectionSecondPoint[0], this.currentSelectionSecondPoint[1]]
}
setArrow(e) {
const t = new a.Arrow;
t.type = e,
t.rotation = 0,
t.flipped = !1,
this.arrowsToPutOriginal.clear(),
this.arrowsToPutOriginal.set("0,0", t),
this.rotateOrFlipArrows(this.rotationState, this.flipState)
}
copyFromGameMap(e) {
this.rotationState = 0,
this.flipState = !1,
this.arrowsToPutOriginal.clear(),
this.arrowsToPut.clear();
let t = Number.MAX_SAFE_INTEGER
, s = Number.MAX_SAFE_INTEGER;
this.tempMap.clear(),
this.selectedArrows.forEach((i => {
const [n,o] = i.split(",").map((e => parseInt(e, 10)))
, a = e.getArrow(n, o);
void 0 !== a && a.canBeEdited && (t = Math.min(t, n),
s = Math.min(s, o))
}
)),
this.selectedArrows.forEach((i => {
const [n,o] = i.split(",").map((e => parseInt(e, 10)))
, a = n - t
, r = o - s
, l = e.getArrow(n, o);
void 0 !== l && l.canBeEdited && (this.tempMap.setArrowType(a, r, l.type),
this.tempMap.setArrowRotation(a, r, l.rotation),
this.tempMap.setArrowFlipped(a, r, l.flipped))
}
));
const i = (0,
n.save)(this.tempMap);
return o.Utils.arrayBufferToBase64(i)
}
pasteFromText(e, t, s) {
this.tempMap.clear();
try {
const s = window.atob(e).split("").map((e => e.charCodeAt(0)));
if ((0,
i.load)(this.tempMap, s),
0 === this.tempMap.chunks.size)
throw new Error("No chunks found");
t()
} catch (e) {
s()
}
this.arrowsToPutOriginal.clear(),
this.arrowsToPut.clear(),
this.tempMap.chunks.forEach((e => {
for (let t = 0; t < r.CHUNK_SIZE; t++)
for (let s = 0; s < r.CHUNK_SIZE; s++) {
const i = e.getArrow(t, s);
if (0 !== i.type && i.canBeEdited) {
const n = e.x * r.CHUNK_SIZE + t
, o = e.y * r.CHUNK_SIZE + s;
this.arrowsToPutOriginal.set(`${n},${o}`, i),
this.arrowsToPut.set(`${n},${o}`, i)
}
}
}
))
}
getCopiedArrows() {
return this.arrowsToPut
}
rotateOrFlipArrows(e, t) {
this.arrowsToPut.clear(),
null !== e && (this.rotationState = e),
t && (this.flipState = !this.flipState),
this.arrowsToPutOriginal.forEach(( (e, t) => {
let[s,i] = t.split(",").map((e => parseInt(e, 10)));
const n = new a.Arrow;
n.type = e.type,
n.rotation = e.rotation,
n.flipped = e.flipped;
let o = e.rotation;
this.flipState && (n.flipped = !n.flipped,
1 !== n.rotation && 3 !== n.rotation || (o = (e.rotation + 2) % 4),
s = -s),
n.rotation = o;
let r = s
, l = i;
1 === this.rotationState ? (r = -i,
l = s,
n.rotation = (o + 1) % 4) : 2 === this.rotationState ? (r = -s,
l = -i,
n.rotation = (o + 2) % 4) : 3 === this.rotationState && (r = i,
l = -s,
n.rotation = (o + 3) % 4),
this.arrowsToPut.set(`${r},${l}`, n)
}
))
}
dispose() {
this.selectedArrows.clear(),
this.arrowsToPutOriginal.clear(),
this.arrowsToPut.clear(),
this.currentSelectedArrows.clear()
}
}
}
,
2413: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.ArrowDescriptions = void 0;
const i = s(6161);
var n;
!function(e) {
const t = new Map([[0, new i.I18nText("Empty cell","Пустая клетка","Порожня клітина","Пустая клетка","Case vide")], [1, new i.I18nText("Arrow","Стрелка","Стрілка","Стрэлка","Flèche")], [2, new i.I18nText("Source block","Блок источника","Блок джерела","Блок крыніцы","Bloc de source")], [3, new i.I18nText("Blocker","Блокер","Блокер","Блокер","Bloqueur")], [4, new i.I18nText("Delay arrow","Стрелка задержки","Стрілка затримки","Стрэлка затрымкі","Flèche de retard")], [5, new i.I18nText("Signal detector","Детектор сигнала","Детектор сигналу","Дэтэктар сігналу","Directuer du signal")], [6, new i.I18nText("Splitter","Разветвитель","Розгалужувач","Разгалінавальнік","Diviseur")], [7, new i.I18nText("Splitter","Разветвитель","Розгалужувач","Разгалінавальнік","Diviseur")], [8, new i.I18nText("Splitter","Разветвитель","Розгалужувач","Разгалінавальнік","Diviseur")], [9, new i.I18nText("Pulse generator","Генератор импульса","Генератор імпульсу","Генератар імпульсу","Générateur de pulsion")], [10, new i.I18nText("Blue arrow","Синяя стрелка","Синя стрілка","Сіняя стрэлка","Flèche bleue")], [11, new i.I18nText("Diagonal arrow","Диагональная стрелка","Діагональна стрілка","Дыяганальная стрэлка","Flèche diagonale")], [12, new i.I18nText("Blue splitter","Синий разветвитель","Синій розгалужувач","Сіні разгалінавальнік","Diviseur bleu")], [13, new i.I18nText("Blue splitter","Синий разветвитель","Синій розгалужувач","Сіні разгалінавальнік","Diviseur bleu")], [14, new i.I18nText("Blue splitter","Синий разветвитель","Синій розгалужувач","Сіні разгалінавальнік","Diviseur bleu")], [15, new i.I18nText("Not gate","Отрицание","Заперечення","Адмоўнік","Porte logique de négation")], [16, new i.I18nText("And gate","И","І","І",'Porte logique "et"')], [17, new i.I18nText("XOR gate","Исключающее ИЛИ","Виняткове АБО","Выключнае АБО",'Porte logique de négation "XOR"')], [18, new i.I18nText("Latch","Триггер","Тригер","Трыгер","Déclencheur")], [19, new i.I18nText("T flip-flop","T-триггер","T-тригер","T-трыгер","Déclencheur-T")], [20, new i.I18nText("Randomizer","Рандомайзер","Рандомайзер","Рандамайзер","Randomiseur")], [21, new i.I18nText("Button","Кнопка","Кнопка","Кнопка","Bouton")], [22, new i.I18nText("Source","Источник","Джерело","Крыніца","Source")], [23, new i.I18nText("Target","Приемник","Приймач","Прыёмнік","Cible")], [24, new i.I18nText("Directional button","Направленная кнопка","Направлена кнопка","Накіраваная кнопка","Bouton dirrectionel")]])
, s = new Map([[0, new i.I18nText("Never.","Никогда.","Ніколи.","Ніколі.","Jamais")], [1, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","Avec n'importe quel signal intrant")], [2, new i.I18nText("Every time.","Всегда.","Завжди.","Заўсёды.","Toujours")], [3, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","Avec n'importe quel signal intrant")], [4, new i.I18nText("#b(Blue) on any incoming signal if not active.<br>#r(Red) if the current color is #b(blue).","#b(Синим) при любом входящем сигнале если не активна.<br>#r(Красным) если активна #b(синим).","#b(Синім) при будь-якому вхідному сигналі якщо не активна.<br>#r(Червоним) якщо активна #b(синім).","#b(Сіняй) пры любым уваходным сігнале калі не актыўна.<br>#r(Чырвонай) калі актыўна #b(сіняй).","#b(Bleu) non-actif n'importe le signal intrant.<br>#r(Rouge) si la couleur actuelle est : #b(bleu).")], [5, new i.I18nText("If an cell behind is active.","Если активна стрелка сзади.","Якщо активна стрілка ззаду.","Калі актыўна стрэлка ззаду.","Si la case derrière est active")], [6, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [7, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [8, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [9, new i.I18nText("#r(Red) if not active.<br>#b(Blue) if the current color is #r(red) or #b(blue).","#r(Красным) если не активна.<br>#b(Синим) если активна #r(красным) или #b(синим).","#r(Червоним) якщо не активна.<br>#b(Синім) якщо активна #r(червоним) або #b(синім).","#r(Чырвонай) калі не актыўна.<br>#b(Сіняй) калі актыўна #r(чырвонай) або #b(сіняй).","#r(Rouge) quand n'est pas actif.<br>#b(Bleu) quand est actif #r(rouge) ou #b(bleu).")], [10, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [11, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [12, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [13, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [14, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [15, new i.I18nText("When there are no incoming signals.","Когда нет входящих сигналов.","Коли немає вхідних сигналів.","Калі няма ўваходных сігналаў.","Quand il n'y a pas de signaux intrants")], [16, new i.I18nText("On at least two incoming signals.","При минимум двух входящих сигналах.","При мінімум двох вхідних сигналах.","Пры мінімум двух уваходных сігналах.","Au minimum de deux signaux intrants")], [17, new i.I18nText("On odd number of incoming signals.","При нечетном количестве входящих сигналов.","При непарній кількості вхідних сигналів.","Пры няцотнай колькасці ўваходных сігналаў.","Quand il y a un nombre de signaux intrants non-paire")], [18, new i.I18nText("On at least two incoming signals. Or when there are no incoming signals and already active.","При минимум двух входящих сигналах. Или когда нет входящих сигналов и уже активна.","При мінімум двох вхідних сигналах. Або коли немає вхідних сигналів і вже активна.","Пры мінімум двух уваходных сігналах. Або калі няма ўваходных сігналаў і ўжо актыўна.","Au minimum de deux signaux intrants. Ou quand il n'y a pas de signaux intrants et est encore actif")], [19, new i.I18nText("On any incoming signal if not active. Or when there are no incoming signals and already active.","При любом входящем сигнале, если не активна. Или когда нет входящих сигналов и уже активна.","При будь-якому вхідному сигналі, якщо не активна. Або коли немає вхідних сигналів і вже активна.","Пры любым уваходным сігнале, калі не актыўна. Або калі няма ўваходных сігналаў і ўжо актыўна.","N'importe le signal intrant, quand n'est pas actif. Ou quand il n'y a pas de signaux intrants et est déjà activé")], [20, new i.I18nText("On any incoming signal with 50% chance.","При любом входящем сигнале с 50% вероятностью.","При будь-якому вхідному сигналі з 50% ймовірністю.","Пры любым уваходным сігнале з 50% верагоднасцю.","N'importe le signal intrant avec une chance de 50%")], [21, new i.I18nText("When pressed with the left mouse button.","При нажатии левой кнопкой мыши.","При натисканні лівою кнопкою миші.","Пры націсканні левай кнопкай мышы.","Quand le bouton gauche de la souris est appuyé.")], [22, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [23, new i.I18nText("On any incoming signal.","Любым входящим сигналом.","Будь-яким вхідним сигналом.","Любым уваходным сігналам.","N'importe le signal intrant")], [24, new i.I18nText("When pressed with the left mouse button or on any incoming signal.","При нажатии левой кнопкой мыши или любым входящим сигналом.","При натисканні лівою кнопкою миші або будь-яким вхідним сигналом.","Пры націсканні левай кнопкай мышы або любым уваходным сігналам.","N'importe le signal intrant ou quand le bouton gauche de la souris est appuyé.")]])
, n = new Map([[0, new i.I18nText("Does nothing.","Ничего не делает.","Нічого не робить.","Нічога не робіць.","Ne fait rien")], [1, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un signal en avant.")], [2, new i.I18nText("Sends signals in four directions around it.","Передает сигналы в четырех направлениях вокруг себя.","Передає сигнали в чотирьох напрямках навколо себе.","Перадае сігналы ў чатырох напрамках навакол сябе.","Transmet des signaux dans les quatre directions autour de soi-même.")], [3, new i.I18nText("Turns off an arrow in front of it.","Выключает стрелку перед собой.","Вимикає стрілку перед собою.","Выключае стрэлку перад сабою.","Éteint une flèche devant lui")], [4, new i.I18nText("If the signal is #r(red) sends a signal forwards.","Если сигнал #r(красный), передает сигнал вперед.","Якщо сигнал #r(червоний), передає сигнал вперед.","Калі сігнал #r(чырвоны), перадае сігнал наперад.","Si le signal est #r(rouge), transmet un signal en avant.")], [5, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un signal en avant")], [6, new i.I18nText("Sends a signal both forwards and backwards.","Передает сигнал и вперед, и назад.","Передає сигнал і вперед, і назад.","Перадае сігнал і наперад, і назад.","Transmet un signal en avant et en arrière")], [7, new i.I18nText("Sends a signal forward and to the right.","Передает сигнал вперед и вправо.","Передає сигнал вперед і праворуч.","Перадае сігнал наперад і ўправа.","Transmet un signal en avant et à gauche")], [8, new i.I18nText("Sends a signal forward, right, and left.","Передает сигнал вперед, вправо и влево.","Передає сигнал вперед, праворуч і ліворуч.","Перадае сігнал наперад, управа і ўлева.","Transmet un signal en avant, à gauche et à droite.")], [9, new i.I18nText("If the signal is #r(red) sends signals in four directions around it.","Если сигнал #r(красный), передает сигналы в четырех направлениях вокруг себя.","Якщо сигнал #r(червоний), передає сигнали в чотирьох напрямках навколо себе.","Калі сігнал #r(чырвоны), перадае сігналы ў чатырох напрамках вакол сябе.","Si le signal est #r(rouge), transmet des signaux dans les quatre directions autour de soi-même.")], [10, new i.I18nText("Sends a signal forwards, skipping one cell.","Передает сигнал вперед через одну клетку.","Передає сигнал вперед через одну клітинку.","Перадае сігнал наперад праз адну клетку.","Transmet un signal en avant, en sautant une case.")], [11, new i.I18nText("Sends a signal diagonally.","Передает сигнал по диагонали.","Передає сигнал по діагоналі.","Перадае сігнал па дыяганалі.","Tranmet un signal en diagonale.")], [12, new i.I18nText("Sends a signal to the two cells directly in front of it.","Передает сигнал в две клетки перед собой.","Передає сигнал у дві клітинки перед собою.","Перадае сігнал у два клеткі перад сабою.","Transmet un signal dans les deux cases directement devant lui.")], [13, new i.I18nText("Sends a signal forwards, skipping one cell and to the right.","Передает сигнал вперед через одну клетку и вправо.","Передає сигнал вперед через одну клітинку і праворуч.","Перадае сігнал наперад праз адну клетку і ўправа.","Transmet un signal en avant et à droite, en sautant une case.")], [14, new i.I18nText("Sends a signal forwards and diagonally.","Передает сигнал вперед и по диагонали.","Передає сигнал вперед і по діагоналі.","Перадае сігнал наперад і па дыяганалі.","Transmet un signal en avant et en diagonale.")], [15, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un signal en avant.")], [16, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un signal en avant.")], [17, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un signal en avant.")], [18, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un ssignal en avant.")], [19, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un ssignal en avant.")], [20, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un ssignal en avant.")], [21, new i.I18nText("Sends signals in four directions around it.","Передает сигналы в четырех направлениях вокруг себя.","Передає сигнали в чотирьох напрямках навколо себе.","Перадае сігналы ў чатырох напрамках вакол сябе.","Transmet des signaux dans les quatre directions autour de soi-même.")], [22, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un ssignal en avant.")], [23, new i.I18nText("Does nothing.","Ничего не делает.","Нічого не робить.","Нічога не робіць.","Ne fait rien")], [24, new i.I18nText("Sends a signal forwards.","Передает сигнал вперед.","Передає сигнал вперед.","Перадае сігнал наперад.","Transmet un ssignal en avant.")]]);
e.getArrowsCount = function() {
return t.size
}
,
e.getArrowName = function(e) {
var s;
const i = null === (s = t.get(e)) || void 0 === s ? void 0 : s.get();
return void 0 !== i ? i : "Unknown"
}
,
e.getArrowActivation = function(e) {
var t;
const i = null === (t = s.get(e)) || void 0 === t ? void 0 : t.get();
return void 0 !== i ? i : "Unknown"
}
,
e.getArrowAction = function(e) {
var t;
const s = null === (t = n.get(e)) || void 0 === t ? void 0 : t.get();
return void 0 !== s ? s : "Unknown"
}
}(n || (t.ArrowDescriptions = n = {}))
}
,
7906: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.ControlsHintsText = void 0;
const i = s(6161);
var n;
!function(e) {
e.MOVE = new i.I18nText("move","двигаться","рухатися","рухацца","se déplacer"),
e.ROTATE = new i.I18nText("rotate","повернуть","обернути","абярыць","tourner"),
e.DELETE = new i.I18nText("delete","удалить","видалити","выдаліць","supprimer"),
e.SELECT = new i.I18nText("select","выделить","виділіць","вылучыць","sélectionner"),
e.UNDO = new i.I18nText("undo","отмена","відміна","адмена","annuler"),
e.PAUSE = new i.I18nText("pause","пауза","пауза","паўза","pause"),
e.MENU = new i.I18nText("menu","меню","меню","меню","menu"),
e.SET_ARROW = new i.I18nText("set","поставить","поставити","паставіць","mettre"),
e.FLIP = new i.I18nText("flip","отразить","відзеркаліць","адлюстраваць","refléter"),
e.PICK = new i.I18nText("pick","пипетка","піпетка","піпетка","pipette"),
e.INVENTORY = new i.I18nText("inventory","инвентарь","інвентар","інвентар","inventaire"),
e.FREE_CURSOR = new i.I18nText("free cursor","освободить курсор","звільніць курсор","зваліць курсор","libérer le curseur"),
e.COPY = new i.I18nText("copy","скопировать","скопіювати","скапіяваць","copier"),
e.PASTE = new i.I18nText("paste","вставить","вставити","ўставіць","coller"),
e.CUT = new i.I18nText("cut","вырезать","вирізати","выразаць","couper"),
e.DELETE_SELECTION = new i.I18nText("delete selection","удалить выделенное","видалити виділене","выдаліць вылучанае","supprimer la sélection"),
e.SELECT_OR_DESELECT = new i.I18nText("select / deselect","выделить / сбросить","виділіць / скинути","вылучыць / скінуць","sélectionner / désélectionner"),
e.ADD_SELECTION = new i.I18nText("add selection","добавить выделение","додати виділення","дадаць вылучэнне","ajouter une sélection")
}(n || (t.ControlsHintsText = n = {}))
}
,
3446: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.GameText = void 0;
const i = s(6161);
var n;
!function(e) {
e.SIGN_IN_WITH_GOOGLE = new i.I18nText("Sign in with Google","Войти через Google","Увійти через Google","Увайсці праз Google","Se connecter via Google"),
e.LOGIN_TEXT = new i.I18nText("Let’s play with simplicity to create complexity!","Создайте сложные структуры из простых элементов!","Створіть складні структури з простих елементів!","Стварыце складаныя структуры з простых элементаў!","Créez des structures compliquées avec des éléments simples !"),
e.LOGOUT = new i.I18nText("Logout","Выйти","Вийти","Выйсці","Se connecter"),
e.ARROWS_TITLE = new i.I18nText("Logic Arrows","Стрелочки","Стрілочки","Стрэлачкі","Fléchettes"),
e.MAPS = new i.I18nText("Maps","Карты","Мапи","Карты","Cartes"),
e.GUIDE = new i.I18nText("Guide","Гайд","Гайд","Гайд","Guide"),
e.MENU_BACK = new i.I18nText("Back","Назад","Назад","Назад","Retour"),
e.PERFOMANCE_TITLE = new i.I18nText("Perfomance","Производительность","Продуктивність","Прадукцыйнасць","Performance"),
e.PER_SECOND = new i.I18nText("per second","в секунду","за секунду","у секунду","par seconde"),
e.NEW_MAP = new i.I18nText("New map","Новая карта","Нова мапа","Новая карта","Nouvelle carte"),
e.MAP_NAME = new i.I18nText("Map name","Название карты","Назва мапи","Назва карты","Nom de la carte"),
e.MAP_DESCRIPTION = new i.I18nText("Map description","Описание карты","Опис мапи","Апісанне карты","Description de la carte"),
e.SAVING = new i.I18nText("Saving...","Сохранение...","Збереження...","Захаванне...","Sauvegarde..."),
e.SAVED = new i.I18nText("Saved","Сохранено","Збережено","Захавана","Sauvé"),
e.CANCEL = new i.I18nText("Cancel","Отмена","Скасувати","Адмяніць","Annuler"),
e.DELETE = new i.I18nText("Delete","Удалить","Видалити","Выдаліць","Supprimer"),
e.START_GAME = new i.I18nText("Start game","Начать игру","Почати гру","Пачаць гульню","Commencer le jeu"),
e.LEVELS = new i.I18nText("Levels","Уровни","Рівні","Узроўні","Niveaux"),
e.LEVEL = new i.I18nText("Level","Уровень","Рівень","Узровень","Niveau"),
e.ACCEPT = new i.I18nText("Accept","Принять","Прийняти","Прыняць","Accepter"),
e.SET_NAME = new i.I18nText("Enter your game name","Введите ваше имя в игре","Введіть ваше ім'я у грі","Увядзіце ваша імя ў гульні","Entrer votre pseudo"),
e.NAME = new i.I18nText("Name","Имя","Ім'я","Імя","Nom"),
e.ACCOUNT = new i.I18nText("Account","Аккаунт","Акаунт","Акаўнт","Compte"),
e.COMMUNITY_MAPS = new i.I18nText("Community maps","Карты сообщества","Мапи спільноти","Карты суполкі","Cartes de comminauté"),
e.NEWS = new i.I18nText("News","Новости","Новини","Навіны","Nouvelles"),
e.SETTINGS = new i.I18nText("Settings","Настройки","Налаштування","Налады","Paramètres"),
e.NAME_ERROR_TOO_SHORT = new i.I18nText("Name must be longer than 3 characters","Имя должно быть длиннее 3 символов","Ім'я повинно бути довшим за 3 символи","Імя павінна быць даўжэй чым за 3 сімвалы","Le nom doit être plus long que 3 symboles"),
e.NAME_ERROR_CHARS = new i.I18nText('Name can only contain English letters, numbers, spaces or "_" symbol','Имя может содержать только английские буквы, цифры, пробелы или символ "_"','Ім\'я може містити тільки англійські літери, цифри, пробіли або символ "_"','Імя можа ўтрымліваць толькі ангельскія літары, лічбы, прабелы або сімвал "_"','Le nom ne peut contenir que des lettres anglaises, espaces ou le symbole "_"'),
e.NAME_ERROR_SPACE = new i.I18nText("Name cannot start or end with a space","Имя не может начинаться или заканчиваться пробелом","Ім'я не може починатися або закінчуватися пробілом","Імя не можа пачынацца ці заканчвацца прабелам","Le nom ne doit pas se terminer avec une espace"),
e.NAME_ERROR_SPACES_COUNT = new i.I18nText("Name cannot contain more than one space in a row","Имя не может содержать больше одного пробела подряд","Ім'я не може містити більше одного пробілу поспіль","Імя не можа ўтрымліваць больш за адзін прабел пад радок","Le nom ne doit pas contenir plus qu'une espace de suite"),
e.NAME_ERROR_UNDERSCORES_COUNT = new i.I18nText('Name cannot contain more than one "_" symbol in a row','Имя не может содержать больше одного символа "_" подряд','Ім\'я не може містити більше одного символу "_" поспіль','Імя не можа ўтрымліваць больш за адзін сімвал "_" пад радок','Le nom ne doit pas contenir plus q\'un symbole "_" de suite'),
e.NAME_ERROR_CANNOT_START_WITH_DIGIT = new i.I18nText("Name cannot start with a digit","Имя не может начинаться с цифры","Ім'я не може починатися з цифри","Імя не можа пачынацца з лічбы","Le nom ne doit pas se commencer avec une chiffre"),
e.NAME_ERROR_EXIST_OR_UNAVAILABLE = new i.I18nText("This name already exists or unavailable","Это имя уже существует или недоступно","Це ім'я вже існує або недоступне","Гэта імя ўжо існуе або недаступна","Ce nom-ci est déjà pris ou indisponible"),
e.PRIVACY_POLICY = new i.I18nText("Privacy policy","Политика конфиденциальности","Політика конфіденційності","Палітыка канфідэнцыяльнасці","Politique de confidentialité"),
e.TERMS_AND_CONDITIONS = new i.I18nText("Terms and conditions","Условия использования","Умови використання","Умовы выкарыстання","Conditions d'usage"),
e.LEVEL_TESTING = new i.I18nText("Testing the level...","Тестирование уровня...","Тестування рівня...","Тэставанне ўзроўня...","Test du niveau..."),
e.MAPS_10_LVL = new i.I18nText("Complete level 10 to unlock maps","Пройдите уровень 10, чтобы разблокировать карты","Пройдіть рівень 10, щоби розблокувати мапи","Прайдзіце ўзровень 10, каб разблакаваць карты","Complétez le niveau 10 pour débloquer les cartes"),
e.UNABLE_TO_SAVE = new i.I18nText("Unable to save","Не удалось сохранить","Неможливо зберегти","Не атрымалася захаваць","Impossible de sauver"),
e.MAP_TOO_LARGE = new i.I18nText("Map is too large","Карта слишком большая","Мапа занадта вялікая","Карта занадта вялікая","La carte est trop grande"),
e.SHOW_SPOILER = new i.I18nText("Show spoiler","Показать подсказку","Показати підказку","Паказаць падказку","Montrer une astuce"),
e.COOKIES_TITLE = new i.I18nText("Accept cookies to start the game","Примите куки, чтобы начать игру","Прийміть кукі, щоби почати гру","Прымеце кукі, каб пачаць гульню",'Accepter les "Cookies" pour commencer le jeu'),
e.COOKIES_TEXT = new i.I18nText('Our website uses cookies for authentication and saving the game progress.\n We do not collect any cookies unless you click the "Accept" button below.','Наш сайт использует куки для аутентификации и сохранения прогресса игры.\n Мы не собираем никаких куки, пока вы не нажмете кнопку "Принять" ниже.','Наш сайт використовує кукі для аутентифікації та збереження прогресу гри.\n Ми не збираємо жодних кукі, поки ви не натиснете кнопку "Прийняти" нижче.','Наш сайт выкарыстоўвае кукі для аўтэнтыфікацыі і захавання прагрэсу гульні.\n Мы не збіраем ніякіх кукі, пакуль вы не націснеце кнопку "Прыняць" ніжэй.','Notre site web n\'utilise les "Cookies" que pour authentification et pour saver le progrès du jeu.\n L\'on ne collecte pas de "Cookies" si vous n\'avez encore pas cliqué sur le bouton "Accepter" ci-dessous'),
e.AUTOSAVING = new i.I18nText("Autosaving...","Автосохранение...","Автозбереження...","Аўтазахаванне...","Sauvegarde automatique"),
e.ACTIVATES = new i.I18nText("Activates:","Активируется:","Активується:","Актывуецца:","S'active :"),
e.ON_ACTIVATION = new i.I18nText("On activation:","При активации:","При активації:","Пры актывацыі:","Quand activé :"),
e.LANGUAGE = new i.I18nText("Language","Язык","Мова","Мова","Langue"),
e.SHOW_CONTROLS_HINTS = new i.I18nText("Show controls hints","Показывать подсказки управления","Показувати підказки управління","Паказваць падказкі кіравання","Afficher les conseils sur les contrôles"),
e.MAX_ZOOM_OUT = new i.I18nText("Max zoom out","Максимальное отдаление","Максимальне віддалення","Максімальнае аддаленне","Zoom arrière maximum")
}(n || (t.GameText = n = {}))
}
,
6161: (e, t, s) => {
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.I18nText = void 0;
const i = s(3295);
t.I18nText = class {
constructor(e, t, s, i, n) {
this.en = e,
this.ru = t,
this.ua = s,
this.by = i,
this.fr = n
}
get(...e) {
switch (i.LangSettings.getLanguage()) {
case "en":
default:
return "string" == typeof this.en ? this.en : this.en(e);
case "ru":
return "string" == typeof this.ru ? this.ru : this.ru(e);
case "ua":
return "string" == typeof this.ua ? this.ua : this.ua(e);
case "by":
return "string" == typeof this.by ? this.by : this.by(e);
case "fr":
return "string" == typeof this.fr ? this.fr : this.fr(e)
}
}
}
}
,
3295: (e, t) => {
var s;
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.LangSettings = void 0,
function(e) {
let t = "en";
e.languages = ["en", "ru", "ua", "by", "fr"],
e.languageNames = ["English", "Русский", "Українська", "Беларуская", "Français"],
e.htmlCodes = ["en", "ru", "uk", "be", "fr"],
e.getLanguage = function() {
return t
}
,
e.setLanguage = function(s) {
e.languages.includes(s) && (t = s,
document.documentElement.lang = e.htmlCodes[e.languages.indexOf(s)])
}
}(s || (t.LangSettings = s = {}))
}
,
3737: (e, t) => {
var s;
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.LangUtils = void 0,
function(e) {
e.getLanguageFromString = function(e) {
switch (e) {
case "en":
default:
return "en";
case "ru":
return "ru";
case "ua":