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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
class PromptGenerator {
  constructor() {
    this.currentPrompts = [];
    this.promptsDiv = document.querySelector("#prompts");
    this.textArea = document.createElement("textarea");
    this.portraitDiv = document.querySelector("#portraitDiv");
    this.landscapesDiv = document.querySelector("#landscapesDiv");
    this.randomDiv = document.querySelector("#randomDiv");
    this.generatorOptionsButton = document.querySelector("#generatorOptionsButton");
    this.generatorOptionsDiv = document.querySelector("#generatorOptionsDiv");
    this.inputsDisclaimer = document.querySelector("#inputsDisclaimer");
    this.charactersInputDiv = document.querySelector("#charactersInputDiv");
    this.objectsInputDiv = document.querySelector("#objectsInputDiv");
    this.shownOptions = 0;
    this.currentGenerator = "random";
    this.currentCharacters = [];
    this.currentObjects = [];
    this.currentPlaces = [];
    this.currentArtists = [];
    this.currentStyles = [];
    this.currentColors = [];
    this.currentAdjectives = [];
    this.currentElements = [];
    this.currentImprovers = [];
    this.currentPrefixes = [];
    this.currentSuffixes = [];
  }

  generatePrompt() {
    // Determine if the prompt will have prefix
    const isPrefixePrompt = Math.random() < 0.25;

    // Determine if the prompt will have suffix
    const isSuffixPrompt = Math.random() < 0.1;

    // Check if the current generator is for portraits
    const isPortraitPrompt = this.currentGenerator === "portrait";

    // Get the selected portrait shot from the HTML select element
    const selectedPortraitShot = document.querySelector("#portraitShotSelect").value;

    // Define options for portrait shot types
    const portraitShotOptions = ["Full-Length Shot", "American Shot", "Medium Shot", "Close-Up Shot", "Extreme Close-Up Shot"];

    // Randomly select a portrait shot type
    const randomizedPortraitShot = portraitShotOptions[Math.floor(Math.random() * portraitShotOptions.length)];

    // Check if the current generator is for landscapes
    const isLandscapesPrompt = this.currentGenerator === "landscapes";

    // Get the selected landscapes shot from the HTML select element
    const selectedLandscapesShot = document.querySelector("#landscapesShotSelect").value;

    // Define options for landscape shot types
    const landscapesShotOptions = ["Long Shot", "Medium Shot", "Close-Up Shot", "Extreme Close-Up Shot"];

    // Randomly select a landscape shot type
    const randomizedLandscapesShot = landscapesShotOptions[Math.floor(Math.random() * landscapesShotOptions.length)];

    // Check whether various types of prompts are active based on checkbox values
    const isObjectsActive = document.querySelector("#objectsActive").checked;
    const isPlacesActive = document.querySelector("#placesActive").checked;
    const isArtistsActive = document.querySelector("#artistsActive").checked;
    const isStylesActive = document.querySelector("#stylesActive").checked;
    const isColorsActive = document.querySelector("#colorsActive").checked;
    const isAdjectivesActive = document.querySelector("#adjectivesActive").checked;
    const isElementsActive = document.querySelector("#elementsActive").checked;
    const isImproversActive = document.querySelector("#improversActive").checked;
    const isPrefixesActive = document.querySelector("#prefixesActive").checked;
    const isSuffixesActive = document.querySelector("#suffixesActive").checked;

    // Initialize prompt and mainSubject variables
    let prompt = "";
    let mainSubject = "";

    // Hide the "Places" checkbox if generating a landscapes prompt
    if (isLandscapesPrompt) {
      document.querySelector("#placesActive").classList.add("hidden");
    } else {
      document.querySelector("#placesActive").classList.remove("hidden");
    }

    // Get value from artists and styles number inputs
    let numArtists = Number(document.querySelector("#numArtists").value);
    let numStyles = Number(document.querySelector("#numStyles").value);

    //  initialize artists prompt & styles prompt parts
    let artistsPrompt = "";
    let stylesPrompt = "";

    // set content of artists & styles prompts parts depending on user number inputs
    for (let i = 0; i < numArtists; i++) {
      if (i < this.currentArtists.length) {
        artistsPrompt += `${this.randomElement(this.currentArtists.filter((artist) => !artistsPrompt.includes(artist)))}, `;
      }
    }
    artistsPrompt = artistsPrompt.slice(0, -2);

    for (let i = 0; i < numStyles; i++) {
      if (i < this.currentStyles.length) {
        stylesPrompt += `${this.randomElement(this.currentStyles.filter((style) => !stylesPrompt.includes(style)))}, `;
      }
    }
    stylesPrompt = stylesPrompt.slice(0, -2);

    if (isPortraitPrompt) {
      if (selectedPortraitShot !== "Random Shot") {
        // if a specific portrait shot is selected, add it to the prompt
        prompt += selectedPortraitShot + " ";
      } else {
        // otherwise, randomly choose whether to add a randomized portrait shot to the prompt
        prompt += Math.random() < 0.33 ? " " : `${randomizedPortraitShot} `;
      }
    } else if (isLandscapesPrompt) {
      if (selectedLandscapesShot !== "Random Shot") {
        // if a specific landscape shot is selected, add it to the prompt
        prompt += selectedLandscapesShot + " ";
      } else {
        // otherwise, randomly choose whether to add a randomized landscape shot to the prompt
        prompt += Math.random() < 0.33 ? " " : `${randomizedLandscapesShot} `;
      }
    }

    if (prompt.length > 1) {
      // if prompt has content, add "of" to the end of the prompt
      prompt += "of ";
    }

    if (!isLandscapesPrompt) {
      if ((isPrefixePrompt && isPrefixesActive) || this.currentPrefixes[0] !== prefixes[0]) {
        // if is a prefix prompt, add a random prefix
        prompt += `${this.randomElement(this.currentPrefixes)} `;
      }

      if (isObjectsActive && Math.random() < 0.1 && this.currentCharacters[0] === characters[0]) {
        // if objects are active, can add a random object as the main subject of the prompt
        mainSubject = this.randomElement(this.currentObjects);
        prompt += `${mainSubject}`;
      } else {
        // otherwise, add a random character as the main subject of the prompt, possibly with a random object
        mainSubject = this.randomElement(this.currentCharacters);
        if (Math.random() < 0.25 || this.currentObjects[0] !== objects[0]) {
          if (isObjectsActive) {
            prompt += `${mainSubject} with ${this.randomElement(this.currentObjects)}`;
          } else {
            prompt += `${mainSubject}`;
          }
        } else {
          prompt += `${mainSubject}`;
        }
      }

      // adds a random element to the prompt if element prompt is active
      if (isElementsActive) {
        prompt += ` of ${this.randomElement(this.currentElements)}`;
      }

      if ((isSuffixPrompt && isSuffixesActive) || this.currentSuffixes[0] !== suffixes[0]) {
        // if is a suffix prompt, add a random suffix
        prompt += ` ${this.randomElement(this.currentSuffixes)}`;
      }
    }

    // adds a random place to the prompt if landscape prompt is active, or a random place after the main subject if place prompt is active
    if (isLandscapesPrompt) {
      prompt += `${this.randomElement(this.currentPlaces)}`;
    } else if (isPlacesActive) {
      prompt += `, ${this.randomElement(this.currentPlaces)}`;
    }

    // Add a artists and/or styles to the prompt
    if (isArtistsActive && isStylesActive) {
      prompt += `, ${stylesPrompt} in ${artistsPrompt} style`;
    } else if (isArtistsActive) {
      prompt += `, ${artistsPrompt} style`;
    } else if (isStylesActive) {
      prompt += `, ${stylesPrompt}`;
    }

    // adds random adjectives to the prompt if adjective prompt is active
    if (isAdjectivesActive) {
      const adjective1 = this.randomElement(this.currentAdjectives);
      prompt += `, ${adjective1}`;
      if (this.currentAdjectives.length > 1) {
        prompt += `, ${this.randomElement(this.currentAdjectives.filter((adjective) => adjective !== adjective1))}`;
      }
    }

    // add improvers to the prompt if improver prompt is active
    if (isImproversActive) {
      prompt += `, ${this.randomElement(this.currentImprovers)}`;
    }

    // adds a random color palette to the prompt if color prompt is active
    if (isColorsActive) {
      prompt += `, ${this.randomElement(this.currentColors)}`;
    }

    // add the prompt to the arrays of prompts
    this.currentPrompts.push(prompt);
  }

  generatePrompts(num) {
    // Clears out any existing prompts in the currentPrompts array and in the promptsDiv element.
    this.currentPrompts = [];
    this.promptsDiv.innerHTML = "";

    // Replaces the default arrays used for generating prompts with any user-provided input arrays, if available.
    this.replaceArraysWithUserInputs.bind(this);
    this.replaceArraysWithUserInputs();

    // Generates the prompts by calling the generatePrompt() function a specified number of times.
    for (let i = 0; i < num; i++) {
      this.generatePrompt();
    }

    // Creates a temporary document fragment and appends each new prompt line to it.
    const tempDocumentFragment = document.createDocumentFragment();
    for (let i = 0; i < this.currentPrompts.length; i++) {
      const newPromptLine = document.createElement("p");
      newPromptLine.classList.add("py-3");
      newPromptLine.textContent = `${this.currentPrompts[i]}`;
      tempDocumentFragment.appendChild(newPromptLine);
    }

    // Appends the entire temporary document fragment to the promptsDiv element in a single operation, which enhances performance.
    this.promptsDiv.appendChild(tempDocumentFragment);
  }

  showChosenGenerator() {
    // Hide all generator divs and show input divs
    this.portraitDiv.classList.add("hidden");
    this.landscapesDiv.classList.add("hidden");
    this.randomDiv.classList.add("hidden");
    this.charactersInputDiv.classList.remove("hidden");
    this.objectsInputDiv.classList.remove("hidden");
    document.querySelector("#elementsInputDiv").classList.remove("hidden");
    document.querySelector("#prefixesInputDiv").classList.remove("hidden");
    document.querySelector("#suffixesInputDiv").classList.remove("hidden");

    // Show places, prefixes and suffixes input divs and hide if current generator is landscapes
    document.querySelector("#placesActive").classList.remove("hidden");

    // Show the chosen generator div based on current generator variable
    if (this.currentGenerator === "portrait") {
      this.portraitDiv.classList.remove("hidden");
    } else if (this.currentGenerator === "landscapes") {
      this.landscapesDiv.classList.remove("hidden");
      this.charactersInputDiv.classList.add("hidden");
      this.objectsInputDiv.classList.add("hidden");
      document.querySelector("#elementsInputDiv").classList.add("hidden");
      document.querySelector("#prefixesInputDiv").classList.add("hidden");
      document.querySelector("#suffixesInputDiv").classList.add("hidden");
      document.querySelector("#placesActive").classList.add("hidden");
    } else if (this.currentGenerator === "random") {
      this.randomDiv.classList.remove("hidden");
    }
  }

  // Select a random element inside the array
  randomElement(array) {
    return array[Math.floor(Math.random() * array.length)];
  }

  // Copy the prompts to clipboard
  copyPromptsToClipboard(promptsArray) {
    this.textArea.textContent = promptsArray.join("\n");
    navigator.clipboard.writeText(this.textArea.textContent);
  }

  // check if textArea are empty
  checkUserArraysInputs(textArea) {
    return textArea.value !== "";
  }

  // Check if user has put inputs, and then assign them to their respective arrays
  replaceArraysWithUserInputs() {
    const charactersInput = document.querySelector("#charactersTextArea");
    const objectsInput = document.querySelector("#objectsTextArea");
    const placesInput = document.querySelector("#placesTextArea");
    const artistsInput = document.querySelector("#artistsTextArea");
    const stylesInput = document.querySelector("#stylesTextArea");
    const colorsInput = document.querySelector("#colorsTextArea");
    const adjectivesInput = document.querySelector("#adjectivesTextArea");
    const elementsInput = document.querySelector("#elementsTextArea");
    const improversInput = document.querySelector("#improversTextArea");
    const prefixesInput = document.querySelector("#prefixesTextArea");
    const suffixesInput = document.querySelector("#suffixesTextArea");

    if (this.checkUserArraysInputs(charactersInput)) {
      this.currentCharacters = charactersInput.value.split(/\r?\n/);
      localStorage.setItem("characters", charactersInput.value);
    } else {
      this.currentCharacters = [...characters];
      localStorage.setItem("characters", "");
    }

    if (this.checkUserArraysInputs(objectsInput)) {
      this.currentObjects = objectsInput.value.split(/\r?\n/);
      localStorage.setItem("objects", objectsInput.value);
    } else {
      this.currentObjects = [...objects];
      localStorage.setItem("objects", "");
    }

    if (this.checkUserArraysInputs(placesInput)) {
      this.currentPlaces = placesInput.value.split(/\r?\n/);
      localStorage.setItem("places", placesInput.value);
    } else {
      this.currentPlaces = [...places];
      localStorage.setItem("places", "");
    }

    if (this.checkUserArraysInputs(artistsInput)) {
      this.currentArtists = artistsInput.value.split(/\r?\n/);
      localStorage.setItem("artists", artistsInput.value);
    } else {
      this.currentArtists = [...artists];
      localStorage.setItem("artists", "");
    }

    if (this.checkUserArraysInputs(stylesInput)) {
      this.currentStyles = stylesInput.value.split(/\r?\n/);
      localStorage.setItem("styles", stylesInput.value);
    } else {
      this.currentStyles = [...styles];
      localStorage.setItem("styles", "");
    }

    if (this.checkUserArraysInputs(colorsInput)) {
      this.currentColors = colorsInput.value.split(/\r?\n/);
      localStorage.setItem("colors", colorsInput.value);
    } else {
      this.currentColors = [...colors];
      localStorage.setItem("colors", "");
    }

    if (this.checkUserArraysInputs(adjectivesInput)) {
      this.currentAdjectives = adjectivesInput.value.split(/\r?\n/);
      localStorage.setItem("adjectives", adjectivesInput.value);
    } else {
      this.currentAdjectives = [...adjectives];
      localStorage.setItem("adjectives", "");
    }

    if (this.checkUserArraysInputs(elementsInput)) {
      this.currentElements = elementsInput.value.split(/\r?\n/);
      localStorage.setItem("elements", elementsInput.value);
    } else {
      this.currentElements = [...elements];
      localStorage.setItem("elements", "");
    }

    if (this.checkUserArraysInputs(improversInput)) {
      this.currentImprovers = improversInput.value.split(/\r?\n/);
      localStorage.setItem("improvers", improversInput.value);
    } else {
      this.currentImprovers = [...improvers];
      localStorage.setItem("improvers", "");
    }

    if (this.checkUserArraysInputs(prefixesInput)) {
      this.currentPrefixes = prefixesInput.value.split(/\r?\n/);
      localStorage.setItem("prefixes", prefixesInput.value);
    } else {
      this.currentPrefixes = [...prefixes];
      localStorage.setItem("prefixes", "");
    }

    if (this.checkUserArraysInputs(suffixesInput)) {
      this.currentSuffixes = suffixesInput.value.split(/\r?\n/);
      localStorage.setItem("suffixes", suffixesInput.value);
    } else {
      this.currentSuffixes = [...suffixes];
      localStorage.setItem("suffixes", "");
    }
  }

  // If user entered inputs previously, get them back into the text areas
  addPreviousUserInputs() {
    const charactersInput = document.querySelector("#charactersTextArea");
    const objectsInput = document.querySelector("#objectsTextArea");
    const placesInput = document.querySelector("#placesTextArea");
    const artistsInput = document.querySelector("#artistsTextArea");
    const stylesInput = document.querySelector("#stylesTextArea");
    const colorsInput = document.querySelector("#colorsTextArea");
    const adjectivesInput = document.querySelector("#adjectivesTextArea");
    const elementsInput = document.querySelector("#elementsTextArea");
    const improversInput = document.querySelector("#improversTextArea");
    const prefixesInput = document.querySelector("#prefixesTextArea");
    const suffixesInput = document.querySelector("#suffixesTextArea");

    charactersInput.value = localStorage.getItem("characters");
    objectsInput.value = localStorage.getItem("objects");
    placesInput.value = localStorage.getItem("places");
    artistsInput.value = localStorage.getItem("artists");
    stylesInput.value = localStorage.getItem("styles");
    colorsInput.value = localStorage.getItem("colors");
    adjectivesInput.value = localStorage.getItem("adjectives");
    elementsInput.value = localStorage.getItem("elements");
    improversInput.value = localStorage.getItem("improvers");
    prefixesInput.value = localStorage.getItem("prefixes");
    suffixesInput.value = localStorage.getItem("suffixes");
  }

  // Reset all user's inputs
  resetUserInputs() {
    const charactersInput = document.querySelector("#charactersTextArea");
    const objectsInput = document.querySelector("#objectsTextArea");
    const placesInput = document.querySelector("#placesTextArea");
    const artistsInput = document.querySelector("#artistsTextArea");
    const stylesInput = document.querySelector("#stylesTextArea");
    const colorsInput = document.querySelector("#colorsTextArea");
    const adjectivesInput = document.querySelector("#adjectivesTextArea");
    const elementsInput = document.querySelector("#elementsTextArea");
    const improversInput = document.querySelector("#improversTextArea");
    const prefixesInput = document.querySelector("#prefixesTextArea");
    const suffixesInput = document.querySelector("#suffixesTextArea");

    localStorage.setItem("characters", "");
    localStorage.setItem("objects", "");
    localStorage.setItem("places", "");
    localStorage.setItem("artists", "");
    localStorage.setItem("styles", "");
    localStorage.setItem("colors", "");
    localStorage.setItem("adjectives", "");
    localStorage.setItem("elements", "");
    localStorage.setItem("improvers", "");
    localStorage.setItem("prefixes", "");
    localStorage.setItem("suffixes", "");

    charactersInput.value = localStorage.getItem("characters");
    objectsInput.value = localStorage.getItem("objects");
    placesInput.value = localStorage.getItem("places");
    artistsInput.value = localStorage.getItem("artists");
    stylesInput.value = localStorage.getItem("styles");
    colorsInput.value = localStorage.getItem("colors");
    adjectivesInput.value = localStorage.getItem("adjectives");
    elementsInput.value = localStorage.getItem("elements");
    improversInput.value = localStorage.getItem("improvers");
    prefixesInput.value = localStorage.getItem("prefixes");
    suffixesInput.value = localStorage.getItem("suffixes");
  }
}

const promptGenerator = new PromptGenerator();

// Event listener to copy prompts to clipboard
document.querySelector("#promptsCopyButton").addEventListener("click", (event) => {
  promptGenerator.copyPromptsToClipboard(promptGenerator.currentPrompts);
});

// Event listener to generate prompts when pressing generate
document.querySelector("#generatePromptsButton").addEventListener("click", (event) => {
  const promptsNumber = document.querySelector("#promptsNumberInput").value;
  if (!isNaN(promptsNumber) && promptsNumber > 0 && promptsNumber <= 10000) {
    promptGenerator.generatePrompts(promptsNumber);
  } else {
    alert("Please enter a number of prompts to generate between 1 and 10000.");
  }
});

// flag to track whether the menu is open or closed
let isMenuOpen = false;

function mobileMenuClickHandling(event) {
  // retrieve the hamburger button and the mobile menu
  const hamburgerButton = document.getElementById("hamburgerButton");
  const bgMobileMenu = document.getElementById("bgMobileMenu");
  const menuList = document.getElementById("menuList");

  const isClickOnButton = hamburgerButton.contains(event.target); // check if the clicked element is on the hamburger button

  if (isClickOnButton) {
    if (isMenuOpen) {
      menuList.classList.add("hidden"); // hide the menu
      bgMobileMenu.classList.add("hidden"); // hide the background filter
      hamburgerButton.blur(); // remove focus from the button
      document.body.style.overflowY = "visible";
    } else {
      menuList.classList.remove("hidden"); // show the menu
      bgMobileMenu.classList.remove("hidden"); // show the background filter
      document.body.style.overflowY = "hidden";
    }
    isMenuOpen = !isMenuOpen; // invert the flag
  } else if (menuList.contains(event.target)) {
    switchGenerator();
    menuList.classList.add("hidden"); // add the "hidden" class to hide the menu
    bgMobileMenu.classList.add("hidden"); // hide the background filter
    isMenuOpen = false; // set the flag to false
    document.body.style.overflowY = "visible";
  } else {
    menuList.classList.add("hidden"); // add the "hidden" class to hide the menu
    bgMobileMenu.classList.add("hidden"); // hide the background filter
    isMenuOpen = false; // set the flag to false
    document.body.style.overflowY = "visible";
  }
}

function mobileMenuFocusBack(event) {
  if (isMenuOpen && !menuList.contains(event.target)) {
    event.stopImmediatePropagation();
    hamburgerButton.focus();
  }
}

// add an event listener for the click on the hamburger button and anywhere except on the button
document.addEventListener("click", mobileMenuClickHandling);

// add an event listener for the focusin event
document.addEventListener("focusin", mobileMenuFocusBack);

// add a function to switch between generators
function switchGenerator() {
  const isClickOnPortrait = event.target.classList.contains("portraitLink");
  const isClickOnLandscapes = event.target.classList.contains("landscapesLink");
  const isClickOnRandom = event.target.classList.contains("randomLink");

  if (isClickOnPortrait) {
    promptGenerator.currentGenerator = "portrait";
  } else if (isClickOnLandscapes) {
    promptGenerator.currentGenerator = "landscapes";
  } else if (isClickOnRandom) {
    promptGenerator.currentGenerator = "random";
  }

  promptGenerator.showChosenGenerator();
}

// add an event listener to handle generator switching
document.querySelector("nav").addEventListener("click", switchGenerator);

// add a function to show generator options
function showGeneratorOptions() {
  if (promptGenerator.shownOptions == 0) {
    promptGenerator.generatorOptionsButton.textContent = promptGenerator.generatorOptionsButton.textContent.replace("Show", "Hide");
    promptGenerator.shownOptions++;
  } else {
    promptGenerator.generatorOptionsButton.textContent = promptGenerator.generatorOptionsButton.innerHTML.replace("Hide", "Show");
    promptGenerator.shownOptions--;
  }
  promptGenerator.inputsDisclaimer.classList.toggle("hidden");
  promptGenerator.generatorOptionsDiv.classList.toggle("hidden");
}

// add an event listener to show/hide the generator options
document.querySelector("#generatorOptionsButton").addEventListener("click", showGeneratorOptions);

// add an event listener to reset generators options
document.querySelector("#resetInputsButton").addEventListener("click", promptGenerator.resetUserInputs);

// add an event listener to number of artists input that revert to min or max value if user input is out of range
document.querySelector("#numArtists").addEventListener("change", () => {
  let numArtists = document.querySelector("#numArtists");
  let v = Number(numArtists.value);
  if (v < 1) {
    numArtists.value = 1;
  }
  if (v > 5) {
    numArtists.value = 5;
  }
});

// add an event listener to number of styles & mediums input that revert to min or max value if user input is out of range
document.querySelector("#numStyles").addEventListener("change", () => {
  let numStyles = document.querySelector("#numStyles");
  let v = Number(numStyles.value);
  if (v < 1) {
    numStyles.value = 1;
  }
  if (v > 3) {
    numStyles.value = 3;
  }
});

// Arrays of randomness
const characters = [
  "Mermaid",
  "Fairy",
  "Wizard",
  "Warrior",
  "Vampire",
  "Dragon",
  "Goddess",
  "Cyborg",
  "Robot",
  "Angel",
  "Demon",
  "Alien",
  "Ghost",
  "Ninja",
  "Samurai",
  "Pirate",
  "Knight",
  "Bard",
  "Werewolf",
  "Zombie",
  "Giant",
  "Golem",
  "Sphinx",
  "Chimera",
  "Medusa",
  "Minotaur",
  "Harpy",
  "Kraken",
  "Cthulhu",
  "Gorgon",
  "Hydra",
  "Banshee",
  "Satyr",
  "Cyclops",
  "Dwarf",
  "Elf",
  "Centaur",
  "Manticore",
  "Frost Giant",
  "Sandworm",
  "Kelpie",
  "Thunderbird",
  "Leviathan",
  "Thundercats",
  "Gargantua",
  "Ogre",
  "Goblin",
  "Halfling",
  "Harlequin",
  "Jinn",
  "Kitsune",
  "Lich",
  "Mummy",
  "Naga",
  "Oni",
  "Pixie",
  "Siren",
  "Sylph",
  "Treant",
  "Unicorn",
  "Wendigo",
  "Wraith",
  "Xenomorph",
  "Yokai",
  "Zephyr",
  "Zombie Dragon",
  "Abomination",
  "Aasimar",
  "Arachne",
  "Cambion",
  "Cerberus",
  "Changeling",
  "Djinn",
  "Dryad",
  "Gargoyle",
  "Gnoll",
  "Grim Reaper",
  "Half-Demon",
  "Hobgoblin",
  "Ifrit",
  "Incubus",
  "Kappa",
  "Lizardfolk",
  "Mind Flayer",
  "Mongrelfolk",
  "Myconid",
  "Orc",
  "Sahuagin",
  "Shapeshifter",
  "Spectre",
  "Tengu",
  "Titan",
  "Witch",
  "Yeti",
  "Yuan-Ti",
  "Archer",
  "Barbarian",
  "Beastmaster",
  "Cleric",
  "Druid",
  "Enchanter",
  "Executioner",
  "Gladiator",
  "Gunslinger",
  "Healer",
  "Hunter",
  "Illusionist",
  "Infernal",
  "Inventor",
  "Jester",
  "Knight Errant",
  "Mage Hunter",
  "Marauder",
  "Necromancer",
  "Ninja Assassin",
  "Paladin",
  "Psionicist",
  "Ranger",
  "Rogue",
  "Runemaster",
  "Savage",
  "Scout",
  "Shaman",
  "Sniper",
  "Soldier",
  "Sorcerer",
  "Spellblade",
  "Spymaster",
  "Swashbuckler",
  "Templar",
  "Thief",
  "Time Traveler",
  "Tracker",
  "Trickster",
  "Vampire Hunter",
  "Warlock",
  "Warrior Monk",
  "Witch Doctor",
  "Wizard Hunter",
  "Zealot",
  "Arcanist",
  "Demon Hunter",
  "Dragon Slayer",
  "Elementalist",
  "Basilisk",
  "Cockatrice",
  "Cryptid",
  "Darkling",
  "Dracolich",
  "Elemental",
  "Enchantress",
  "Fenrir",
  "Gryphon",
  "Harpie",
  "Imp",
  "Jotun",
  "Lindworm",
  "Merfolk",
  "Nephilim",
  "Phoenix",
  "Roc",
  "Sasquatch",
  "Spriggan",
  "Troll",
  "Ursine",
  "Valkyrie",
  "Vargr",
  "Will-o'-the-wisp",
  "Wyvern",
  "Xorn",
  "Yeth Hound",
  "Zilant",
  "Ankheg",
  "Barghest",
  "Catoblepas",
  "Direwolf",
  "Empusa",
  "Frost Worm",
  "Giant Scorpion",
  "Homunculus",
  "Illithid",
  "Juggernaut",
  "Kobold",
  "Lamia",
  "Megafauna",
  "Nightmare",
  "Ophidian",
  "Peryton",
  "Quetzalcoatlus",
  "Rat King",
  "Salamander",
  "Alchemist",
  "Fire Elemental",
  "Water Elemental",
  "Earth Elemental",
  "Air Elemental",
  "Meteor Elemental",
  "Ice Elemental",
  "Light Elemental",
  "Shadow Elemental",
  "Astral Elemental",
  "Faun",
  "Moai",
  "Wight",
  "Bogeyman",
  "Revenant",
  "Selkie",
  "Pegasus",
  "Weretiger",
  "Werebear",
  "Seraphim",
  "Cherubim",
  "Hobbit",
  "Skinwalker",
  "Poltergeist",
  "Ghoul",
  "Fomorian",
  "Vodyanoi",
  "Kobaloi",
  "Graeae",
  "Erinyes",
  "Hippogriff",
  "Shade",
  "Kodama",
  "Strigoi",
  "Qilin",
  "Dullahan",
  "Headless Horseman",
  "Aswang",
  "Stymphalian Birds",
  "Tengu Warrior",
  "Koschei",
  "Nuckelavee",
  "Hellhound",
  "Simurgh",
  "Boogeyman",
  "Amphisbaena",
  "Amarok",
  "Tatzelwurm",
  "Kaiju",
  "Sea Serpent",
  "Raiju",
  "Wyrm",
  "Ooze",
  "Rakshasa",
  "Balrog",
  "Grotesque",
  "Warg",
  "Quasit",
  "Skull Knight",
  "Nephalem",
  "Archmage",
  "Astrophysicist",
  "Geomancer",
  "Lunar Deity",
  "Solar Deity",
  "Diviner",
  "Cartomancer",
  "Voodoo Priest",
  "Spiritualist",
  "Elemental Lord",
  "Shadowmancer",
  "Lunar Sorceress",
  "Wyrm Rider",
  "Geomancer",
  "Electromancer",
  "Quantum Mage",
  "Psychonaut",
  "Cosmonaut",
  "Seer",
  "Cosmic Serpent",
  "Galactic Entity",
  "Void Entity",
  "Astral Traveler",
  "Oracle",
  "Battle Mage",
  "Scholar",
  "High Priest",
  "Moon Priestess",
  "Sun Priest",
  "Seidr",
  "Feng Shui Master",
  "Metalbender",
  "Earthbender",
  "Firebender",
  "Waterbender",
  "Airbender",
  "Cosmic Bender",
  "Hexblade",
  "Shieldbearer",
  "Lorekeeper",
  "Peacekeeper",
  "Oathkeeper",
  "Master of Whispers",
  "Master of Arms",
  "Master of Beasts",
  "Master of Elements",
  "Death Knight",
  "Life Knight",
  "Chaos Knight",
  "Order Knight",
  "Cosmic Knight",
  "Temporal Knight",
  "Eldritch Knight",
  "Keyblade Master",
  "Astral Knight",
  "Lunar Knight",
  "Solar Knight",
  "Elemental Knight",
  "Undying",
  "Celestial",
  "Sea King",
  "Sky Queen",
  "Earth Mother",
  "Void Master",
  "Time Warden",
  "Cosmic Warden",
  "Lunar Warden",
  "Sun Warden",
  "Star Warden",
  "Shadow Warden",
  "Spirit Warden",
  "Ghost Pirate",
  "Sea Witch",
  "Lunar Witch",
  "Solar Witch",
  "Star Witch",
  "Wight King",
  "Oblivion Queen",
  "Astral Dragon",
  "Meteor Dragon",
  "Rainbow Dragon",
  "Stardust Dragon",
  "Lunar Phoenix",
  "Solar Phoenix",
  "Cosmic Phoenix",
  "Shadow Phoenix",
  "Flame Phoenix",
  "Ocean Phoenix",
  "Mystic Archer",
  "Time Archer",
  "Astral Archer",
  "Rocket Archer",
  "Void Archer",
  "Shadow Archer",
  "Spectral Archer",
  "Battle Seer",
  "Wind Dancer",
  "Shadow Dancer",
  "Star Dancer",
  "Spirit Dancer",
  "Oath Dancer",
  "Cosmic Dancer",
  "Chaos Dancer",
  "Order Dancer",
  "Sky Dancer",
  "Earth Dancer",
  "Flame Dancer",
  "Mystic Dancer",
  "Jungle Shaman",
  "Desert Shaman",
  "Mountain Shaman",
  "Island Shaman",
  "Sky Shaman",
  "Battle Shaman",
  "Shadow Shaman",
  "Star Shaman",
  "Chaos Shaman",
  "Order Shaman",
  "Master Chief",
  "Solid Snake",
  "Kratos",
  "Geralt of Rivia",
  "Cloud Strife",
  "Aloy",
  "Lara Croft",
  "Link",
  "Sonic",
  "Mario",
  "Zelda",
  "Samus Aran",
  "Sephiroth",
  "Arthur Morgan",
  "Niko Bellic",
  "Marcus Fenix",
  "Jill Valentine",
  "Sub-Zero",
  "Scorpion",
  "Goku",
  "Naruto",
  "Saitama",
  "Spike Spiegel",
  "Inuyasha",
  "Edward Elric",
  "Astolfo",
  "Alucard",
  "Light Yagami",
  "Asuka Langley",
  "Totoro",
  "Kenshin Himura",
  "Frodo Baggins",
  "Harry Potter",
  "Aragorn",
  "Gandalf",
  "Jon Snow",
  "Daenerys Targaryen",
  "Voldemort",
  "Lara Croft",
  "Samus Aran",
  "Aloy",
  "Jill Valentine",
  "Sailor Moon",
  "Homura Akemi",
  "Saber",
  "Mikasa Ackerman",
  "Asuka Langley Soryu",
  "Rem",
  "Nami",
  "Bulma",
  "Hermione Granger",
  "Galadriel",
  "Éowyn",
  "Daenerys Targaryen",
  "Arya Stark",
  "Leia Organa",
  "Ripley",
  "Wonder Woman",
];

const objects = [
  "Sword",
  "Amulet",
  "Crystal",
  "Potion",
  "Book",
  "Staff",
  "Wand",
  "Ring",
  "Armor",
  "Helm",
  "Goblet",
  "Chalice",
  "Crown",
  "Scepter",
  "Medallion",
  "Orb",
  "Talisman",
  "Relic",
  "Binoculars",
  "Spear",
  "Dagger",
  "Bow and Arrow",
  "Shield",
  "Mace",
  "Hammer",
  "Axe",
  "Crossbow",
  "Whip",
  "Bolas",
  "Poison",
  "Chainsaw",
  "Katana",
  "Glaive",
  "Shuriken",
  "Sniper",
  "Gun",
  "T-shirt",
  "Shirt",
  "Skirt",
  "Sneakers",
  "Jeans",
  "Sunglasses",
  "Baseball Cap",
  "Boots",
  "High Heels",
  "Excalibur",
  "Mjölnir",
  "Lightsaber",
  "Cape",
  "Leather Jacket",
  "Dragonscale Armor",
  "Refined Armor",
  "Heavy Armor",
  "Light Armor",
  "Laptop",
  "Smartphone",
  "Tablet",
  "Camera",
  "Chains",
  "Rope",
  "Breastplate",
  "Gauntlets",
  "Shin Guards",
  "Cuirass",
  "Gorget",
  "Pauldrons",
  "Vambraces",
  "Greaves",
  "Beanie",
  "Bucket Hat",
  "Beret",
  "Cloak",
  "Sarong",
  "Kilt",
  "Chaps",
  "Quiver",
  "Holster",
  "Backpack",
  "Bracelet",
  "Choker",
  "Pendant",
  "Kimono",
  "Toga",
  "Fedora",
  "Tutu",
  "Turban",
  "Fanny Pack",
  "Combat Boots",
  "Aviator Glasses",
];

const places = [
  "Underwater City",
  "Sky Castle",
  "Forest Temple",
  "Haunted Mansion",
  "Crystal Cavern",
  "Ice Fortress",
  "Volcano Lair",
  "Cyber City",
  "Steam Punk Metropolis",
  "Enchanted Garden",
  "Dark Dimension",
  "Celestial Palace",
  "Underground Tunnels",
  "Frozen Wasteland",
  "Desert Oasis",
  "Jungle Ruins",
  "Floating Island",
  "Time Warp",
  "Alien Planet",
  "Deep Space Station",
  "Magical Academy",
  "Futuristic Laboratory",
  "Ancient Library",
  "Artificial Intelligence Network",
  "Giant's Lair",
  "Chaos Realm",
  "Fairy Tale Castle",
  "Post-Apocalyptic City",
  "Interdimensional Nexus",
  "Dreamscape",
  "Abandoned Asylum",
  "Sunken Ship",
  "Forbidden Temple",
  "Lost City",
  "Parallel Universe",
  "Mystic Marsh",
  "Parallel World",
  "Underground Kingdom",
  "Dark Forest",
  "Crystal Palace",
  "Cursed Island",
  "Rainbow Valley",
  "Fire Mountain",
  "Hidden Cave",
  "Sky Kingdom",
  "Savage Wilds",
  "Mystical Mountain",
  "Ancient Pyramid",
  "Tropical Beach",
  "Elemental Plane",
  "Outer Space Colony",
  "Underground Bunker",
  "Lunar Base",
  "Forgotten Citadel",
  "Ancient Catacombs",
  "Holographic Theme Park",
  "Crystal Lake",
  "Floating Market",
  "Underground Volcano",
  "Abandoned Space Station",
  "Surreal Landscape",
  "Crystal Tower",
  "Mystical Island",
  "Mysterious Labyrinth",
  "Jungle Canopy",
  "Enchanted Marketplace",
  "Sunken Cityscape",
  "Haunted Forest",
  "Space Elevator",
  "Crystal Lagoon",
  "Magma Chamber",
  "Thundering Waterfall",
  "Ethereal Valley",
  "Abandoned Subway System",
  "Mirrored City",
  "Ancient Citadel",
  "Frozen Tundra",
  "Haunted Amusement Park",
  "Sunken Ruins",
  "Enchanted Castle",
  "Sandswept Canyon",
  "Orbital Station",
  "Lost Wilderness",
  "Aurora Borealis",
  "Giant Redwood Forest",
  "Futuristic Casino",
  "Mythical Underworld",
  "Infinite Desert",
  "Mystical Labyrinth",
  "Galactic Gateway",
  "Submerged Cavern",
  "Eternal Ice Fields",
  "Dark Matter Realm",
  "Holographic City",
  "Celestial Observatory",
  "Nebula Cluster",
  "Glacier National Park",
  "Undiscovered Island",
  "Underground Laboratory",
  "Retro Arcade",
  "Crystal Gardens",
  "Chromatic Coastline",
  "Iridescent Reef",
  "Lunar Colony",
  "Rainforest Canopy",
  "Hyperborean Forest",
  "Tesseract Station",
  "Magnetic Caves",
  "Abyssal Trench",
  "Interstellar Hub",
  "Exoplanet Outpost",
  "Emerald Canyon",
  "Spectral Sands",
  "Lost Oasis",
  "Nebula Nebula",
  "Astral Nexus",
  "Radiant Cityscape",
  "Euphoric Eden",
  "Pixelated Wonderland",
  "Clockwork Metropolis",
  "Ethereal Plane",
  "Neo-Tokyo Megapolis",
  "Doomsday New York",
  "Osaka",
  "Futuristic New York",
  "Gothic Paris",
  "Cybernetic London",
  "Spectral Rome",
  "Mythical Cairo",
  "Enchanted Sydney",
  "Steampunk San Francisco",
  "Eerie New Orleans",
  "Epic Berlin",
  "Venice of Dreams",
  "Steampunk London",
  "Retrofuturistic Moscow",
  "Ruins of Rome",
  "Shanghai Skybridge",
  "Cybernetic Arena",
  "Witch's Cottage",
  "Infinite Jungle",
  "Robot Zoo",
  "Elven Treehouse",
  "Desert Mirage",
  "Virtual Reality Playground",
  "Crystalized Cave",
  "Dragon's Den",
  "Sacred Waterfall",
  "Dimensional Library",
  "Moonlit Orchard",
  "Alchemist's Tower",
  "Haunted Graveyard",
  "Oceanic Abyss",
  "Temporal Café",
  "Lost Atlantis",
  "Vampire Castle",
  "Invisible Maze",
  "Cherry Blossom Temple",
  "Digital Utopia",
  "Celestial Zoo",
  "Pirate Cove",
  "Forest of Echoes",
  "Mars Colony",
  "Alien Zoo",
  "Petrified Forest",
  "Goblin Market",
  "Cursed Zoo",
  "Eldritch Library",
  "Heavenly Observatory",
  "Magic School",
  "Undying Desert",
  "Temporal Rift",
  "Robot Factory",
  "Spacecraft Graveyard",
  "Arctic Wilderness",
  "Lush Savannah",
  "Carnival of Nightmares",
  "Starlit Beach",
];

const elements = [
  "Fire",
  "Water",
  "Air",
  "Earth",
  "Lightning",
  "Ice",
  "Nature",
  "Darkness",
  "Light",
  "Metal",
  "Shadow",
  "Blood",
  "Lava",
  "Crystal",
  "Poison",
  "Time",
  "Space",
  "Gravity",
  "Sound",
  "Electricity",
  "Plasma",
  "Radiation",
  "Magma",
  "Smoke",
  "Steam",
  "Void",
  "Wind",
  "Plantlife",
  "Moon",
  "Sun",
  "Stars",
  "Sand",
  "Ash",
  "Quicksand",
  "Frost",
  "Acid",
  "Thunder",
  "Psychic Energy",
  "Dimensional Rift",
  "Cosmic Dust",
  "Spirit",
  "Gravity Waves",
  "Invisibility",
  "Psychokinesis",
  "Luminosity",
  "Chaos",
  "Magnetism",
  "Antimatter",
  "Pulse",
  "Gravity Flux",
  "Echolocation",
  "Photosynthesis",
  "Radiance",
  "Oblivion",
  "Memory",
  "Gravity Well",
  "Nanobots",
  "Nuclear Energy",
  "Psionics",
  "Phase Shift",
];

const adjectives = [
  "Ethereal",
  "Whimsical",
  "Mysterious",
  "Eerie",
  "Futuristic",
  "Gothic",
  "Serene",
  "Enigmatic",
  "Otherworldly",
  "Surreal",
  "Mythical",
  "Transcendent",
  "Celestial",
  "Nostalgic",
  "Hypnotic",
  "Cinematic",
  "Awe-Inspiring",
  "Epic",
  "Radiant",
  "Ornate",
  "Holographic",
  "Prismatic",
  "Intricate",
  "Majestic",
  "Harmonious",
  "Opulent",
  "Spectral",
  "Dramatic",
  "Glimmering",
  "Dreamlike",
  "Hyperrealistic",
  "Melancholic",
  "Psychedelic",
  "Retro-Futuristic",
  "Post-Apocalyptic",
  "Neon",
  "Saturated",
  "Sculptural",
  "Minimalist",
  "Abstract",
  "Vibrant",
  "Cosmic",
  "Organic",
  "Luminous",
  "Tranquil",
  "Whirlwind",
  "Hazy",
  "Fragile",
  "Crisp",
  "Dynamic",
  "Galactic",
  "Flamboyant",
  "Shimmering",
  "Misty",
  "Idyllic",
  "Nebulous",
  "Rustic",
  "Fleeting",
  "Nimble",
  "Spirited",
  "Geometric",
  "Polygonal",
  "Golden Hour",
  "Underwater",
  "Pokémon",
];

const styles = [
  "Digital Art",
  "Surrealism",
  "Concept Art",
  "Illustration",
  "Character Design",
  "Anime",
  "Realism",
  "Impressionism",
  "Pop Art",
  "Steampunk",
  "Pixel Art",
  "Graffiti Art",
  "Fantasy Art",
  "Futurism",
  "Art Deco",
  "Minimalism",
  "Street Art",
  "Hyperrealism",
  "Glitch Art",
  "Photorealism",
  "Calligraphy",
  "Ink",
  "Woodcut Print",
  "Manga",
  "Sketch",
  "Drawing",
  "Doodle",
  "Dot Art",
  "Stipple",
  "Anatomical Drawing",
  "Visual Novel",
  "Graphic Novel",
  "Hand-Drawn",
  "Graphite",
  "Colored Pencil",
  "Pastel Art",
  "Blackboard",
  "Splatter Paint",
  "Paper-Marbling",
  "Logo",
  "Comic Book",
  "Poster",
  "Kirigami",
  "Origami",
  "Frame",
  "Wall Decal",
  "Banner",
  "Papercutting",
  "Ice Carving",
  "Linocut",
  "Wood-Carving",
  "Light Art",
  "Bokeh",
  "Wildlife Photography",
  "Portrait",
  "Microscopic",
  "Ultra-Wide Angle",
  "Depth of Field",
  "Closeup",
  "Blur Effect",
  "Lens Flare",
  "Punk",
];

const colors = [
  "Warm Color Palette",
  "Colorful",
  "Rainbow",
  "Spectral Color",
  "Inverted Colors",
  "Neon",
  "Electric Colors",
  "Complimentary-Colors",
  "Dark Mode",
  "Triadic-Colors",
  "Polychromatic Colors",
  "Tones of Black",
  "Black and White",
  "Monochrome",
  "Sepia",
  "High Contrast",
  "Low Contrast",
  "Technicolor",
  "Atari Graphics",
  "Adobe RGB",
  "Hexadecimal",
  "Vintage",
  "Pastel Palette",
  "Metallic Colors",
  "Fire Tones",
  "Shades of Gray",
  "Pop Art Colors",
  "Night Colors",
  "Cool Tones",
  "Warm Tones",
  "Red Monochrome",
  "Green Monochrome",
  "Blue Monochrome",
  "Yellow Monochrome",
  "Purple Monochrome",
];

const artists = [
  "Alan Lee",
  "Cyril Rolando",
  "David Mack",
  "Donato Giancola",
  "Greg Rutkowski",
  "Ismail Inceoglu",
  "John Berkey",
  "Michael Garmash",
  "Peter Mohrbacher",
  "Sparth",
  "Vincent Di Fate",
  "Akihiko Yoshida",
  "Artgerm",
  "Charlie Bowater",
  "Frank Frazetta",
  "Hsiao-Ron Cheng",
  "Ilya Kuvshinov",
  "Joshua Middleton",
  "Krenz Cushart",
  "Lois Van Baarle",
  "Makoto Shinkai",
  "Rossdraws",
  "Wenjun Lin",
  "Anna Dittmann",
  "Agnes Cecile",
  "Alphonse Mucha",
  "Audrey Kawasaki",
  "Boris Vallejo",
  "Carne Griffiths",
  "Conrad Roset",
  "JC Leyendecker",
  "Joseph Lorusso",
  "Jovana Rikalo",
  "Karol Bak",
  "Marco Mazzoni",
  "Miho Hirano",
  "Rebeca Saray",
  "Robert McGinnis",
  "Russ Mills",
  "Tom Bagshaw",
  "Tristan Eaton",
  "Ed Mell",
  "Jessica Rossier",
  "Hubert Robert",
  "Ian McQue",
  "Marc Simonetti",
  "Raphael Lacoste",
  "Bernie Wrightson",
  "H.R. Giger",
  "Richard Corben",
  "Wayne Barlowe",
  "Zdzislaw Beksinski",
  "Hokusai Katsushika",
  "Akira Toriyama",
  "Eiichiro Oda",
  "Masashi Kishimoto",
  "Osamu Tezuka",
  "Vincent van Gogh",
  "Leonardo da Vinci",
  "Frida Kahlo",
  "Pablo Picasso",
  "Georgia O'Keeffe",
  "Ansel Adams",
  "Dorothea Lange",
  "Robert Capa",
  "Cindy Sherman",
  "Henri Cartier-Bresson",
  "Michelangelo",
  "Auguste Rodin",
  "Louise Bourgeois",
  "Donatello",
  "Constantin Brâncuși",
  "Milton Glaser",
  "Paul Rand",
  "Jessica Walsh",
  "Shepard Fairey",
  "Mary Blair",
  "Charles Schulz",
  "Bill Watterson",
  "Jack Kirby",
  "Stan Lee",
  "R. Crumb",
  "Banksy",
  "JR",
  "Shepard Fairey",
  "Kobra",
  "Obey",
  "Rembrandt van Rijn",
  "Claude Monet",
  "Edvard Munch",
  "Caravaggio",
  "Johannes Vermeer",
  "Salvador Dalí",
  "John Singer Sargent",
  "Egon Schiele",
  "Marc Chagall",
  "Henri Matisse",
  "Edgar Degas",
  "Jackson Pollock",
  "Wassily Kandinsky",
  "Édouard Manet",
  "Diego Rivera",
  "Giotto di Bondone",
  "Amedeo Modigliani",
  "Toulouse-Lautrec",
  "Piet Mondrian",
  "Francisco Goya",
  "Hayao Miyazaki",
  "Genndy Tartakovsky",
  "Naoko Takeuchi",
  "Hiromu Arakawa",
  "Bruce Timm",
  "Makoto Shinkai",
  "Rebecca Sugar",
  "Alex Hirsch",
  "Pendleton Ward",
  "Bryan Konietzko and Michael Dante DiMartino",
  "Junji Ito",
  "Yoshitaka Amano",
  "Rumiko Takahashi",
  "Mamoru Hosoda",
  "Craig McCracken",
  "Glen Keane",
  "Tite Kubo",
  "Hirohiko Araki",
  "Nick Park",
  "Tetsuya Nomura",
  "Annie Leibovitz",
  "Steve McCurry",
  "Yousuf Karsh",
  "Diane Arbus",
  "Vivian Maier",
  "Richard Avedon",
  "Sebastião Salgado",
  "Irving Penn",
  "Robert Frank",
  "Gordon Parks",
  "Studio Ghibli",
  "Madhouse",
  "Pixar Animation Studios",
  "Toei Animation",
  "Rooster Teeth",
  "Ankama Studio",
  "Ankama Games",
];

const prefixes = [
  "Zombie",
  "Superhero",
  "Robot",
  "Pirate",
  "Alien",
  "Wizard",
  "Vampire",
  "Werewolf",
  "Ninja",
  "Dragon",
  "Cyborg",
  "Time-traveler",
  "Space",
  "Giant",
  "Tiny",
  "Invisible",
  "Goblin",
  "Goddess",
  "Sorceress",
  "Witch",
  "Ghost",
  "Saiyan",
  "Astral",
  "Bionic",
  "Steampunk",
  "Chrono",
  "Quantum",
  "Cybernetic",
  "Galactic",
  "Arcane",
  "Mystic",
  "Eldritch",
  "Apocalyptic",
  "Elemental",
  "Divine",
  "Fallen",
  "Monstrous",
  "Mutated",
  "Psionic",
  "Supernatural",
  "Feral",
  "Aquatic",
  "Subterranean",
  "Celestial",
  "Phantasmal",
  "Revenant",
  "Living",
  "Sentient",
  "Spectral",
  "Mechanical",
  "Biological",
  "Mythic",
  "Fabled",
  "Demonic",
  "Shadow",
  "Lunar",
  "Solar",
  "Stellar",
  "Arctic",
  "Tropical",
  "Imperial",
  "Royal",
  "Majestic",
  "Temporal",
  "Dimensional",
  "Vigilante",
  "Cosmic",
  "Primordial",
  "Cursed",
  "Blessed",
  "Synthetic",
  "Aether",
  "Serpentine",
  "Nomadic",
  "Tribal",
  "High",
  "Low",
  "Cunning",
  "Ruthless",
  "Infernal",
  "Heavenly",
  "Abyssal",
  "Unholy",
  "Radiant",
  "Miraculous",
  "Noble",
  "Twisted",
  "Tormented",
  "Warped",
  "Grotesque",
  "Ascendant",
  "Dystopian",
  "Utopian",
  "Relentless",
  "Carnal",
  "Martial",
  "Aerial",
  "Aquamarine",
  "Ivory",
  "Amber",
  "Obsidian",
  "Coral",
  "Verdant",
  "Frigid",
  "Fiery",
  "Volcanic",
  "Magnetic",
  "Elastic",
  "Immortal",
  "Mortal",
  "Digital",
  "Equestrian",
  "Feathered",
  "Scaled",
  "Translucent",
  "Ornamental",
  "Alchemical",
  "Incorporeal",
  "Reclusive",
  "Avian",
  "Venomous",
  "Electric",
];

const suffixes = [
  "dancing",
  "flying",
  "running",
  "singing",
  "fighting",
  "swimming",
  "climbing",
  "jumping",
  "laughing",
  "crying",
  "shouting",
  "exploring",
  "sleeping",
  "eating",
  "walking",
  "sneaking",
  "teleporting",
  "summoning",
  "twirling",
  "mystifying",
  "illuminating",
  "contemplating",
  "enchanting",
  "whispering",
  "wandering",
  "daydreaming",
  "captivating",
  "vanishing",
];

const improvers = [
  "masterpiece, trending on artstation",
  "trending on deviantart",
  "award-winning",
  "masterpiece",
  "intricate and detailed",
  "hyper-realistic",
  "ethereal beauty",
  "surreal masterpiece",
  "jaw-dropping",
  "psychedelic",
  "colorful and vibrant",
];

promptGenerator.addPreviousUserInputs();

// generate 10 random prompts
promptGenerator.generatePrompts(10);