wynham-games 1.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +270 -0
- package/dist/games/Connect4.d.ts +37 -0
- package/dist/games/Connect4.d.ts.map +1 -0
- package/dist/games/Connect4.js +279 -0
- package/dist/games/Connect4.js.map +1 -0
- package/dist/games/Hangman.d.ts +30 -0
- package/dist/games/Hangman.d.ts.map +1 -0
- package/dist/games/Hangman.js +259 -0
- package/dist/games/Hangman.js.map +1 -0
- package/dist/games/RPS.d.ts +25 -0
- package/dist/games/RPS.d.ts.map +1 -0
- package/dist/games/RPS.js +187 -0
- package/dist/games/RPS.js.map +1 -0
- package/dist/games/Snake.d.ts +33 -0
- package/dist/games/Snake.d.ts.map +1 -0
- package/dist/games/Snake.js +222 -0
- package/dist/games/Snake.js.map +1 -0
- package/dist/games/TicTacToe.d.ts +32 -0
- package/dist/games/TicTacToe.d.ts.map +1 -0
- package/dist/games/TicTacToe.js +293 -0
- package/dist/games/TicTacToe.js.map +1 -0
- package/dist/games/index.d.ts +6 -0
- package/dist/games/index.d.ts.map +1 -0
- package/dist/games/index.js +17 -0
- package/dist/games/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/en-US.d.ts +103 -0
- package/dist/locales/en-US.d.ts.map +1 -0
- package/dist/locales/en-US.js +169 -0
- package/dist/locales/en-US.js.map +1 -0
- package/dist/locales/es.d.ts +103 -0
- package/dist/locales/es.d.ts.map +1 -0
- package/dist/locales/es.js +169 -0
- package/dist/locales/es.js.map +1 -0
- package/dist/locales/fr.d.ts +103 -0
- package/dist/locales/fr.d.ts.map +1 -0
- package/dist/locales/fr.js +169 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/index.d.ts +522 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +29 -0
- package/dist/locales/index.js.map +1 -0
- package/dist/locales/it.d.ts +103 -0
- package/dist/locales/it.d.ts.map +1 -0
- package/dist/locales/it.js +169 -0
- package/dist/locales/it.js.map +1 -0
- package/dist/structures/GameManager.d.ts +32 -0
- package/dist/structures/GameManager.d.ts.map +1 -0
- package/dist/structures/GameManager.js +183 -0
- package/dist/structures/GameManager.js.map +1 -0
- package/dist/structures/Types.d.ts +241 -0
- package/dist/structures/Types.d.ts.map +1 -0
- package/dist/structures/Types.js +51 -0
- package/dist/structures/Types.js.map +1 -0
- package/dist/structures/Utils.d.ts +49 -0
- package/dist/structures/Utils.d.ts.map +1 -0
- package/dist/structures/Utils.js +197 -0
- package/dist/structures/Utils.js.map +1 -0
- package/dist/variables/Game.d.ts +5 -0
- package/dist/variables/Game.d.ts.map +1 -0
- package/dist/variables/Game.js +84 -0
- package/dist/variables/Game.js.map +1 -0
- package/dist/variables/index.d.ts +2 -0
- package/dist/variables/index.d.ts.map +1 -0
- package/dist/variables/index.js +18 -0
- package/dist/variables/index.js.map +1 -0
- package/package.json +36 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
manager: {
|
|
5
|
+
alreadyPlaying: (time) => `> ❌ Sei già in una partita contro questo utente. Attendi ${time}s prima di riprovare.`,
|
|
6
|
+
selfPlay: "> `❌` Non puoi giocare contro te stesso.",
|
|
7
|
+
cantPlayWithBot: "> `❌` Non puoi giocare con un bot.",
|
|
8
|
+
wait: (time) => `Attendi ${time}s prima di poter utilizzare nuovamente il comando.`,
|
|
9
|
+
},
|
|
10
|
+
invite: {
|
|
11
|
+
question: (mention) => `${mention}, accetti la sfida?`,
|
|
12
|
+
notYourChallenge: "> `❌` Questa sfida non ti riguarda.",
|
|
13
|
+
timeout: (username) => `> \`⏱️\` **${username}** non ha risposto alla sfida.`,
|
|
14
|
+
declined: (username) => `> \`❌\` **${username}** ha rifiutato la sfida.`,
|
|
15
|
+
accept: "Accetta",
|
|
16
|
+
decline: "Rifiuta",
|
|
17
|
+
},
|
|
18
|
+
difficulty: {
|
|
19
|
+
title: "## 🤖 Scegli difficoltà",
|
|
20
|
+
selectPrompt: "Seleziona la difficoltà dell'avversario.",
|
|
21
|
+
notYourChoice: "> `❌` Questa scelta non ti riguarda.",
|
|
22
|
+
expired: "> `⏱️` Selezione scaduta.",
|
|
23
|
+
starting: (label) => `⏳ Avvio in modalità **${label}**...`,
|
|
24
|
+
easy: "Facile",
|
|
25
|
+
normal: "Normale",
|
|
26
|
+
hard: "Difficile",
|
|
27
|
+
impossible: "Impossibile",
|
|
28
|
+
},
|
|
29
|
+
tictactoe: {
|
|
30
|
+
title: "Tris",
|
|
31
|
+
inviteTitle: "Sfida a Tris",
|
|
32
|
+
turn: (emoji, username) => `${emoji} Turno di **${username}**`,
|
|
33
|
+
win: (emoji, username) => `> \`🏆\` ${emoji} **${username}** ha vinto!`,
|
|
34
|
+
draw: "> `🤝` **Pareggio!**",
|
|
35
|
+
timeout: "> `⏱️` Tempo scaduto.",
|
|
36
|
+
cellTaken: "> `❌` Questa casella è già occupata.",
|
|
37
|
+
notYourTurn: "> `❌` Non è il tuo turno.",
|
|
38
|
+
notYourGame: "> `❌` Non fai parte di questa partita.",
|
|
39
|
+
},
|
|
40
|
+
connect4: {
|
|
41
|
+
title: "Forza Quattro",
|
|
42
|
+
inviteTitle: "Sfida a Forza Quattro",
|
|
43
|
+
column: (n) => `Colonna ${n}`,
|
|
44
|
+
choosePlaceholder: "Scegli una colonna…",
|
|
45
|
+
firstTurn: (emoji, username, timestamp) => `> ${emoji} Turno di **${username}** (<t:${timestamp}:R>)`,
|
|
46
|
+
turn: (emoji, username, timestamp) => `> ${emoji} Turno di **${username}** (<t:${timestamp}:R>)`,
|
|
47
|
+
turnTimeout: (emoji, username, timestamp) => `> \`⏱️\` Tempo scaduto — ${emoji} Turno di **${username}** (<t:${timestamp}:R>)`,
|
|
48
|
+
win: (emoji, username) => `> \`🏆\` ${emoji} **${username}** ha vinto!`,
|
|
49
|
+
draw: "> `🤝` **Pareggio!**",
|
|
50
|
+
timeout: "> `⏱️` Tempo scaduto.",
|
|
51
|
+
cancelledBothMissed: "> `⏱️` Nessuno ha giocato — partita annullata.",
|
|
52
|
+
notYourTurn: "> `❌` Non è il tuo turno.",
|
|
53
|
+
columnFull: "> `❌` Questa colonna è piena.",
|
|
54
|
+
notYourGame: "> `❌` Non fai parte di questa partita.",
|
|
55
|
+
},
|
|
56
|
+
rps: {
|
|
57
|
+
title: "Carta Forbice Sasso",
|
|
58
|
+
inviteTitle: "Sfida a Carta Forbice Sasso",
|
|
59
|
+
rock: "Sasso",
|
|
60
|
+
paper: "Carta",
|
|
61
|
+
scissors: "Forbice",
|
|
62
|
+
makeChoice: "Fai la tua scelta!",
|
|
63
|
+
notYourGame: "> `❌` Non fai parte di questa partita.",
|
|
64
|
+
alreadyChose: "> `❌` Hai già fatto la tua scelta!",
|
|
65
|
+
chose: (emoji, label) => `> \`✅\` **Hai scelto ${emoji} ${label}** — in attesa del tuo avversario…`,
|
|
66
|
+
waiting: (username) => `✅ **${username}** ha scelto — in attesa dell'altro giocatore…`,
|
|
67
|
+
tie: (reveal) => `🤝 **Pareggio!**\n\n${reveal}`,
|
|
68
|
+
win: (username, reveal) => `🏆 **${username}** vince!\n\n${reveal}`,
|
|
69
|
+
defaultWin: (username) => `⏱️ **${username}** vince per forfait — l'avversario non ha risposto.`,
|
|
70
|
+
timeout: "⏱️ Tempo scaduto — nessuno ha risposto.",
|
|
71
|
+
},
|
|
72
|
+
hangman: {
|
|
73
|
+
title: "Impiccato",
|
|
74
|
+
inviteTitle: "Sfida all'Impiccato",
|
|
75
|
+
words: [
|
|
76
|
+
"CASA",
|
|
77
|
+
"GIARDINO",
|
|
78
|
+
"MACCHINA",
|
|
79
|
+
"MUSICA",
|
|
80
|
+
"SOLE",
|
|
81
|
+
"MONTAGNA",
|
|
82
|
+
"FIUME",
|
|
83
|
+
"SPIAGGIA",
|
|
84
|
+
"CIOCCOLATO",
|
|
85
|
+
"FORMAGGIO",
|
|
86
|
+
"PANETTIERE",
|
|
87
|
+
"PESCE",
|
|
88
|
+
"ELEFANTE",
|
|
89
|
+
"GIRAFFA",
|
|
90
|
+
"FARFALLA",
|
|
91
|
+
"FIORE",
|
|
92
|
+
"FORESTA",
|
|
93
|
+
"NUVOLA",
|
|
94
|
+
"STELLA",
|
|
95
|
+
"PIANETA",
|
|
96
|
+
"DRAGO",
|
|
97
|
+
"CAVALIERE",
|
|
98
|
+
"PRINCIPESSA",
|
|
99
|
+
"CASTELLO",
|
|
100
|
+
"TESORO",
|
|
101
|
+
"AVVENTURA",
|
|
102
|
+
"COMPUTER",
|
|
103
|
+
"TELEFONO",
|
|
104
|
+
"INTERNET",
|
|
105
|
+
"TASTIERA",
|
|
106
|
+
"CHITARRA",
|
|
107
|
+
"PIANOFORTE",
|
|
108
|
+
"COCCODRILLO",
|
|
109
|
+
"SERPENTE",
|
|
110
|
+
"PAPPAGALLO",
|
|
111
|
+
"DELFINO",
|
|
112
|
+
"BALENA",
|
|
113
|
+
"BAGUETTE",
|
|
114
|
+
"CORNETTO",
|
|
115
|
+
"FUNGO",
|
|
116
|
+
"LIMONE",
|
|
117
|
+
"CALCIO",
|
|
118
|
+
"NUOTO",
|
|
119
|
+
"ARRAMPICATA",
|
|
120
|
+
"CICLISMO",
|
|
121
|
+
"MISTERO",
|
|
122
|
+
"FANTASMA",
|
|
123
|
+
"PIRATA",
|
|
124
|
+
"NINJA",
|
|
125
|
+
"GALASSIA",
|
|
126
|
+
"COMETA",
|
|
127
|
+
"VULCANO",
|
|
128
|
+
"SQUALO",
|
|
129
|
+
"PANTERA",
|
|
130
|
+
"VOLPE",
|
|
131
|
+
"GUFO",
|
|
132
|
+
"TARTARUGA",
|
|
133
|
+
"UNICORNO",
|
|
134
|
+
"VAMPIRO",
|
|
135
|
+
"STREGONE",
|
|
136
|
+
"DETECTIVE",
|
|
137
|
+
"ALCHIMISTA",
|
|
138
|
+
"BIBLIOTECA",
|
|
139
|
+
"CARTOGRAFIA",
|
|
140
|
+
],
|
|
141
|
+
notYourTurn: "> `❌` Non è il tuo turno.",
|
|
142
|
+
notYourGame: "> `❌` Non fai parte di questa partita.",
|
|
143
|
+
alreadyGuessed: (letter) => `> \`❌\` Hai già proposto la lettera **${letter}**.`,
|
|
144
|
+
alreadyGuessedWord: (word) => `> \`❌\` La parola **${word}** è già stata proposta.`,
|
|
145
|
+
win: (username, word) => `> \`🎉\` **Bravo ${username}**! La parola era **${word}**.`,
|
|
146
|
+
lose: (word) => `> \`💀\` **Hai perso!** La parola era **${word}**.`,
|
|
147
|
+
turn: (username) => `Turno di **${username}** — Buona fortuna!`,
|
|
148
|
+
firstTurn: (username) => `Turno di **${username}** — Indovina la parola!`,
|
|
149
|
+
wrongLetters: (letters) => `Lettere o parole sbagliate: **${letters}**`,
|
|
150
|
+
noWrongLetters: "*Nessuna lettera sbagliata per ora.*",
|
|
151
|
+
menuLettersAM: "Lettere A → M",
|
|
152
|
+
menuLettersNZ: "Lettere N → Z",
|
|
153
|
+
guessButton: "Indovina la parola",
|
|
154
|
+
modalTitle: "Indovina la parola",
|
|
155
|
+
modalLabel: "Indovina la parola",
|
|
156
|
+
timeout: (word) => `> \`⏱️\` Tempo scaduto — La parola era **${word}**.`,
|
|
157
|
+
},
|
|
158
|
+
snake: {
|
|
159
|
+
title: "Snake",
|
|
160
|
+
start: "> `🎮` Usa i pulsanti per muoverti. Mangia la 🍎 ed evita i muri e la tua stessa coda!",
|
|
161
|
+
score: (score) => `> \`🍎\` Punteggio: **${score}**`,
|
|
162
|
+
gameOver: (score) => `> \`💀\` **Partita finita!** Punteggio finale: **${score}**.`,
|
|
163
|
+
quit: (score) => `> \`🛑\` **Partita interrotta.** Punteggio finale: **${score}**.`,
|
|
164
|
+
win: (score) => `> \`🏆\` **Hai riempito tutto il tabellone!** Punteggio finale: **${score}**.`,
|
|
165
|
+
timeout: (score) => `> \`⏱️\` Tempo scaduto — Punteggio finale: **${score}**.`,
|
|
166
|
+
notYourGame: "> `❌` Questa non è la tua partita.",
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=it.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"it.js","sourceRoot":"","sources":["../../src/locales/it.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACX,OAAO,EAAE;QACL,cAAc,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,4DAA4D,IAAI,uBAAuB;QACzH,QAAQ,EAAE,0CAA0C;QACpD,eAAe,EAAE,oCAAoC;QACrD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,WAAW,IAAI,oDAAoD;KAC9F;IACD,MAAM,EAAE;QACJ,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,GAAG,OAAO,qBAAqB;QAC9D,gBAAgB,EAAE,qCAAqC;QACvD,OAAO,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,cAAc,QAAQ,gCAAgC;QACrF,QAAQ,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,aAAa,QAAQ,2BAA2B;QAChF,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,SAAS;KACrB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,yBAAyB;QAChC,YAAY,EAAE,0CAA0C;QACxD,aAAa,EAAE,sCAAsC;QACrD,OAAO,EAAE,2BAA2B;QACpC,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,yBAAyB,KAAK,OAAO;QAClE,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE,aAAa;KAC5B;IACD,SAAS,EAAE;QACP,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,CAAC,KAAa,EAAE,QAAgB,EAAE,EAAE,CAAC,GAAG,KAAK,eAA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gD,KAAK,KAAK;QACtF,WAAW,EAAE,oCAAoC;KACpD;CACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Connect4Options, type RPSOptions, type TicTacToeOptions, type HangmanOptions, type SnakeOptions, type GameManagerOptions, GameNameType } from "../structures/Types";
|
|
2
|
+
import { Client, Interaction } from "discord.js";
|
|
3
|
+
import { CooldownsManager } from "./Utils";
|
|
4
|
+
export declare class GameManager {
|
|
5
|
+
/** The bot's client instance. */
|
|
6
|
+
readonly client: Client;
|
|
7
|
+
/** The manager's configuration options. */
|
|
8
|
+
readonly options: GameManagerOptions;
|
|
9
|
+
/** Cooldowns manager */
|
|
10
|
+
readonly cooldowns: typeof CooldownsManager;
|
|
11
|
+
/**
|
|
12
|
+
* @param client Your bot's Discord.js client.
|
|
13
|
+
* @param options Manager configuration options.
|
|
14
|
+
*/
|
|
15
|
+
constructor(client: Client, options?: GameManagerOptions);
|
|
16
|
+
/** Validates the given options */
|
|
17
|
+
private valideOptions;
|
|
18
|
+
/**
|
|
19
|
+
* Validates the players, shows the invite and launches the game.
|
|
20
|
+
* @param gameName The game to launch (see `GameNameType`).
|
|
21
|
+
* @param interaction The slash command interaction that triggers the game.
|
|
22
|
+
* @param options Players and visual customization.
|
|
23
|
+
*/
|
|
24
|
+
createGame(gameName: GameNameType.Connect4, interaction: Interaction, options: Connect4Options): Promise<void>;
|
|
25
|
+
createGame(gameName: GameNameType.RPS, interaction: Interaction, options: RPSOptions): Promise<void>;
|
|
26
|
+
createGame(gameName: GameNameType.TicTacToe, interaction: Interaction, options: TicTacToeOptions): Promise<void>;
|
|
27
|
+
createGame(gameName: GameNameType.Hangman, interaction: Interaction, options: HangmanOptions): Promise<void>;
|
|
28
|
+
createGame(gameName: GameNameType.Snake, interaction: Interaction, options: SnakeOptions): Promise<void>;
|
|
29
|
+
/** Checks that players are valid (not the same user, not a bot as challenger). */
|
|
30
|
+
private validatePlayers;
|
|
31
|
+
}
|
|
32
|
+
//# sour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UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA4JxG,kFAAkF;YACpE,eAAe;CAsBhC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GameManager = void 0;
|
|
4
|
+
const Types_1 = require("../structures/Types");
|
|
5
|
+
const discord_js_1 = require("discord.js");
|
|
6
|
+
const games_1 = require("../games");
|
|
7
|
+
const Utils_1 = require("../structures/Utils");
|
|
8
|
+
const Utils_2 = require("./Utils");
|
|
9
|
+
const locales_1 = require("../locales");
|
|
10
|
+
class GameManager {
|
|
11
|
+
/** The bot's client instance. */
|
|
12
|
+
client;
|
|
13
|
+
/** The manager's configuration options. */
|
|
14
|
+
options;
|
|
15
|
+
/** Cooldowns manager */
|
|
16
|
+
cooldowns = Utils_2.CooldownsManager;
|
|
17
|
+
/**
|
|
18
|
+
* @param client Your bot's Discord.js client.
|
|
19
|
+
* @param options Manager configuration options.
|
|
20
|
+
*/
|
|
21
|
+
constructor(client, options) {
|
|
22
|
+
this.valideOptions(client, options);
|
|
23
|
+
this.client = client;
|
|
24
|
+
this.options = {
|
|
25
|
+
antiSpam: {
|
|
26
|
+
enable: options?.antiSpam?.enable ?? true,
|
|
27
|
+
time: options?.antiSpam?.time ?? 5_000,
|
|
28
|
+
},
|
|
29
|
+
locale: options?.locale ?? discord_js_1.Locale.EnglishUS,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Validates the given options */
|
|
33
|
+
valideOptions(client, options) {
|
|
34
|
+
if (!client)
|
|
35
|
+
throw new Error("Client is required");
|
|
36
|
+
const supportedLocales = Object.keys(locales_1.locales);
|
|
37
|
+
if (options) {
|
|
38
|
+
if (options.locale && !supportedLocales.includes(options.locale))
|
|
39
|
+
throw new Error(`Locale "${options.locale}" is not supported. Available: ${supportedLocales.join(", ")}`);
|
|
40
|
+
if (options.antiSpam && !options.antiSpam.enable && (options.antiSpam.time ?? 5_000) <= 0)
|
|
41
|
+
throw new Error("Time must be greater than 0");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async createGame(gameName, interaction, options) {
|
|
45
|
+
if (!interaction.isRepliable())
|
|
46
|
+
throw new Error("Interaction is not repliable.");
|
|
47
|
+
if (!interaction.deferred && !interaction.replied)
|
|
48
|
+
await interaction.deferReply();
|
|
49
|
+
(0, Utils_1.gameCheck)(options);
|
|
50
|
+
const gameLocale = (0, Utils_1.getLang)(options.locale);
|
|
51
|
+
// Snake is single-player: no invite, no second player.
|
|
52
|
+
if (gameName === Types_1.GameNameType.Snake) {
|
|
53
|
+
const opt = options;
|
|
54
|
+
if (opt.player.bot) {
|
|
55
|
+
return void (await interaction.followUp({
|
|
56
|
+
embeds: [{ description: gameLocale.manager.cantPlayWithBot, color: discord_js_1.Colors.Red }],
|
|
57
|
+
flags: discord_js_1.MessageFlags.Ephemeral,
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
const cooldownKey = `${opt.player.id}-${gameName}`;
|
|
61
|
+
const playing = this.cooldowns.see(cooldownKey);
|
|
62
|
+
if (playing) {
|
|
63
|
+
return void (await interaction.followUp({ embeds: [{ description: gameLocale.manager.alreadyPlaying(playing), color: discord_js_1.Colors.Red }] }));
|
|
64
|
+
}
|
|
65
|
+
if (this.options.antiSpam && this.options.antiSpam.enable && this.options.antiSpam.time) {
|
|
66
|
+
const spamKey = `${opt.player.id}-spam`;
|
|
67
|
+
const time = this.cooldowns.see(spamKey);
|
|
68
|
+
if (time) {
|
|
69
|
+
return void (await interaction.followUp({ embeds: [{ description: gameLocale.manager.wait(time), color: discord_js_1.Colors.Red }] }));
|
|
70
|
+
}
|
|
71
|
+
this.cooldowns.add(spamKey, this.options.antiSpam.time);
|
|
72
|
+
}
|
|
73
|
+
await new games_1.Snake(this, interaction, opt, gameLocale).launch();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const { players: [player1, player2], players, } = options;
|
|
77
|
+
const time = this.cooldowns.see(`${player1.id}-${player2.id}-${gameName}`);
|
|
78
|
+
if (time)
|
|
79
|
+
return void (await interaction.followUp({ embeds: [{ description: gameLocale.manager.alreadyPlaying(time), color: discord_js_1.Colors.Red }] }));
|
|
80
|
+
if (this.options.antiSpam && this.options.antiSpam.enable && this.options.antiSpam.time) {
|
|
81
|
+
const cacheKey = `${[player1.id, player2.id].sort().join("-")}`;
|
|
82
|
+
const time = this.cooldowns.see(cacheKey);
|
|
83
|
+
if (time) {
|
|
84
|
+
return void (await interaction.followUp({
|
|
85
|
+
embeds: [{ description: gameLocale.manager.wait(time), color: discord_js_1.Colors.Red }],
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
this.cooldowns.add(cacheKey, this.options.antiSpam.time);
|
|
89
|
+
}
|
|
90
|
+
switch (gameName) {
|
|
91
|
+
case Types_1.GameNameType.Connect4: {
|
|
92
|
+
const validate = await this.validatePlayers(interaction, players, gameLocale);
|
|
93
|
+
if (!validate)
|
|
94
|
+
return;
|
|
95
|
+
const opt = options;
|
|
96
|
+
const menuWait = new Utils_1.MenuWaitPlayer(this, interaction, Types_1.GameNameType.Connect4, players, {
|
|
97
|
+
title: gameLocale.connect4.inviteTitle,
|
|
98
|
+
}, opt.locale);
|
|
99
|
+
if (!(await menuWait.verify()))
|
|
100
|
+
return;
|
|
101
|
+
await new games_1.Connect4(this, interaction, opt, gameLocale).launch();
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case Types_1.GameNameType.RPS: {
|
|
105
|
+
const opt = options;
|
|
106
|
+
if (player2.bot) {
|
|
107
|
+
await new games_1.RPS(this, interaction, opt, gameLocale).launch();
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const validate = await this.validatePlayers(interaction, players, gameLocale);
|
|
111
|
+
if (!validate)
|
|
112
|
+
return;
|
|
113
|
+
const menuWait = new Utils_1.MenuWaitPlayer(this, interaction, Types_1.GameNameType.RPS, players, {
|
|
114
|
+
title: gameLocale.rps.inviteTitle,
|
|
115
|
+
}, opt.locale);
|
|
116
|
+
if (!(await menuWait.verify()))
|
|
117
|
+
return;
|
|
118
|
+
await new games_1.RPS(this, interaction, opt, gameLocale).launch();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
case Types_1.GameNameType.TicTacToe: {
|
|
123
|
+
const opt = options;
|
|
124
|
+
if (player2.bot) {
|
|
125
|
+
const diff = await new Utils_1.MenuSelectDifficulty(this, interaction, Types_1.GameNameType.TicTacToe, players, opt.locale).waitForAnswer();
|
|
126
|
+
if (!diff)
|
|
127
|
+
break;
|
|
128
|
+
await new games_1.TicTacToe(this, interaction, { ...opt, difficulty: diff.difficulty }, gameLocale).launch();
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const validate = await this.validatePlayers(interaction, players, gameLocale);
|
|
132
|
+
if (!validate)
|
|
133
|
+
return;
|
|
134
|
+
const menuWait = new Utils_1.MenuWaitPlayer(this, interaction, Types_1.GameNameType.TicTacToe, players, {
|
|
135
|
+
title: gameLocale.tictactoe.inviteTitle,
|
|
136
|
+
}, opt.locale);
|
|
137
|
+
if (!(await menuWait.verify()))
|
|
138
|
+
return;
|
|
139
|
+
await new games_1.TicTacToe(this, interaction, opt, gameLocale).launch();
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
case Types_1.GameNameType.Hangman: {
|
|
144
|
+
const validate = await this.validatePlayers(interaction, players, gameLocale);
|
|
145
|
+
if (!validate)
|
|
146
|
+
return;
|
|
147
|
+
const opt = options;
|
|
148
|
+
const waitPlayer = new Utils_1.MenuWaitPlayer(this, interaction, Types_1.GameNameType.Hangman, players, {
|
|
149
|
+
title: gameLocale.hangman.inviteTitle,
|
|
150
|
+
}, opt.locale);
|
|
151
|
+
if (!(await waitPlayer.verify()))
|
|
152
|
+
return;
|
|
153
|
+
await new games_1.Hangman(this, interaction, opt, gameLocale).launch();
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
default:
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** Checks that players are valid (not the same user, not a bot as challenger). */
|
|
161
|
+
async validatePlayers(interaction, players, locale) {
|
|
162
|
+
if (!interaction.isRepliable())
|
|
163
|
+
return false;
|
|
164
|
+
const [player1, player2] = players;
|
|
165
|
+
if (player1.id === player2.id) {
|
|
166
|
+
await interaction.followUp({
|
|
167
|
+
embeds: [{ description: locale.manager.selfPlay, color: discord_js_1.Colors.Red }],
|
|
168
|
+
flags: discord_js_1.MessageFlags.Ephemeral,
|
|
169
|
+
});
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
if (player2.bot || player1.bot) {
|
|
173
|
+
await interaction.followUp({
|
|
174
|
+
embeds: [{ description: locale.manager.cantPlayWithBot, color: discord_js_1.Colors.Red }],
|
|
175
|
+
flags: discord_js_1.MessageFlags.Ephemeral,
|
|
176
|
+
});
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.GameManager = GameManager;
|
|
183
|
+
//# sourceMappingURL=GameManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameManager.js","sourceRoot":"","sources":["../../src/structures/GameManager.ts"],"names":[],"mappings":";;;AAAA,8CAAkM;AAClM,2CAAqF;AACrF,mCAAmE;AACnE,8CAA8F;AAC9F,mCAA2C;AAC3C,uCAAoC;AAEpC,MAAa,WAAW;IACpB,iCAAiC;IACjB,MAAM,CAAS;IAC/B,2CAA2C;IAC3B,OAAO,CAAqB;IAC5C,wBAAwB;IACR,SAAS,GAAG,wBAAgB,CAAC;IAE7C;;;OAGG;IACH,YAAY,MAAc,EAAE,OAA4B;QACpD,IAAI,CAAC,aAAa,CAAC,MAAM,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,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC/D,MAAM;YACV,CAAC;YAED;gBACI,MAAM;QACd,CAAC;IACL,CAAC;IAED,kFAAkF;IAC1E,KAAK,CAAC,eAAe,CAAC,WAAwB,EAAE,OAAqB,EAAE,MAAkB;QAC7F,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;YAAE,OAAO,KAAK,CAAC;QAE7C,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;QACnC,IAAI,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,EAAE,CAAC;YAC5B,MAAM,WAAW,CAAC,QAAQ,CAAC;gBACvB,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,mBAAM,CAAC,GAAG,EAAE,CAAC;gBACrE,KAAK,EAAE,yBAAY,CAAC,SAAS;aAChC,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YAC7B,MAAM,WAAW,CAAC,QAAQ,CAAC;gBACvB,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,mBAAM,CAAC,GAAG,EAAE,CAAC;gBAC5E,KAAK,EAAE,yBAAY,CAAC,SAAS;aAChC,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAjOD,kCAiOC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import type { Locale, User } from "discord.js";
|
|
2
|
+
import type { WynHamLocales } from "../locales";
|
|
3
|
+
export * from "../locales";
|
|
4
|
+
export interface GameManagerOptions {
|
|
5
|
+
/** Enable antispam — prevents the same user from starting two games within 15 minutes. Default: `true`. time in ms default: 5_000 */
|
|
6
|
+
antiSpam?: {
|
|
7
|
+
enable?: boolean;
|
|
8
|
+
time?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Default Discord locale for all games created by this manager.
|
|
12
|
+
* Individual game options can override this. Accepts `Locale.French`, `interaction.guildLocale`, etc.
|
|
13
|
+
* Default: `Locale.EnglishUS`.
|
|
14
|
+
*/
|
|
15
|
+
locale?: Locale;
|
|
16
|
+
}
|
|
17
|
+
export interface IGame {
|
|
18
|
+
launch(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare enum GameNameType {
|
|
21
|
+
Connect4 = "Connect4",
|
|
22
|
+
RPS = "RPS",
|
|
23
|
+
TicTacToe = "TicTacToe",
|
|
24
|
+
Hangman = "Hangman",
|
|
25
|
+
Snake = "Snake"
|
|
26
|
+
}
|
|
27
|
+
export declare enum BotDifficulty {
|
|
28
|
+
Easy = "easy",
|
|
29
|
+
Normal = "normal",
|
|
30
|
+
Hard = "hard",
|
|
31
|
+
Impossible = "impossible"
|
|
32
|
+
}
|
|
33
|
+
export declare enum InviteResult {
|
|
34
|
+
Accepted = "accepted",
|
|
35
|
+
Declined = "declined",
|
|
36
|
+
Timeout = "timeout"
|
|
37
|
+
}
|
|
38
|
+
export declare enum Choice {
|
|
39
|
+
Rock = "rock",
|
|
40
|
+
Paper = "paper",
|
|
41
|
+
Scissors = "scissors"
|
|
42
|
+
}
|
|
43
|
+
export declare enum InputType {
|
|
44
|
+
SelectMenu = "select",
|
|
45
|
+
Buttons = "buttons"
|
|
46
|
+
}
|
|
47
|
+
export interface Connect4Options {
|
|
48
|
+
/** Array of the 2 players. */
|
|
49
|
+
players: [User, User];
|
|
50
|
+
/** Max time (in seconds) a player has to take their turn before the game ends. Default: `30` seconds. */
|
|
51
|
+
turnTimeout?: number;
|
|
52
|
+
/** Discord locale for all in-game strings. Accepts `interaction.locale` or `Locale.French` etc. Default: `Locale.EnglishUS`. */
|
|
53
|
+
locale?: Locale;
|
|
54
|
+
/** Theme settings. */
|
|
55
|
+
theme?: {
|
|
56
|
+
/** Colors for the game board. */
|
|
57
|
+
colors?: {
|
|
58
|
+
/** Color during the game. Default: `0x5865f2` */
|
|
59
|
+
play?: number;
|
|
60
|
+
/** Color when a player wins. Default: `0xffd700` */
|
|
61
|
+
win?: number;
|
|
62
|
+
/** Color on draw or timeout. Default: `0x808080` */
|
|
63
|
+
draw?: number;
|
|
64
|
+
};
|
|
65
|
+
/** Emojis for the game board. */
|
|
66
|
+
emojis?: {
|
|
67
|
+
/** Player 1 pieces. Default: `🔴` */
|
|
68
|
+
player1?: string;
|
|
69
|
+
/** Player 2 pieces. Default: `🟡` */
|
|
70
|
+
player2?: string;
|
|
71
|
+
/** Empty cells. Default: `⬛` */
|
|
72
|
+
empty?: string;
|
|
73
|
+
/** Winning combination pieces. Default: `⚪` */
|
|
74
|
+
win?: string;
|
|
75
|
+
};
|
|
76
|
+
/** Column input mode. `InputType.Buttons` (default) or `InputType.SelectMenu` dropdown. */
|
|
77
|
+
inputType?: InputType;
|
|
78
|
+
};
|
|
79
|
+
/** Language settings. */
|
|
80
|
+
lang?: {
|
|
81
|
+
/** Title displayed on the game board. Default: `"Connect Four"` */
|
|
82
|
+
title?: string;
|
|
83
|
+
/** Title displayed in the invite message. Default: `"Connect Four Challenge"` */
|
|
84
|
+
inviteTitle?: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface RPSOptions {
|
|
88
|
+
/** Array of the 2 players. */
|
|
89
|
+
players: [User, User];
|
|
90
|
+
/** Max time (in seconds) a player has to make their choice before the game ends. Default: `30` seconds. */
|
|
91
|
+
turnTimeout?: number;
|
|
92
|
+
/** Discord locale for all in-game strings. Accepts `interaction.locale` or `Locale.French` etc. Default: `Locale.EnglishUS`. */
|
|
93
|
+
locale?: Locale;
|
|
94
|
+
/** Theme settings. */
|
|
95
|
+
theme?: {
|
|
96
|
+
colors?: {
|
|
97
|
+
/** Color during the game. Default: `0x5865f2` */
|
|
98
|
+
play?: number;
|
|
99
|
+
/** Color when a player wins. Default: `0xffd700` */
|
|
100
|
+
win?: number;
|
|
101
|
+
/** Color on tie or timeout. Default: `0x808080` */
|
|
102
|
+
draw?: number;
|
|
103
|
+
};
|
|
104
|
+
emojis?: {
|
|
105
|
+
/** Default: `✊` */
|
|
106
|
+
rock?: string;
|
|
107
|
+
/** Default: `🤚` */
|
|
108
|
+
paper?: string;
|
|
109
|
+
/** Default: `✌️` */
|
|
110
|
+
scissors?: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
lang?: {
|
|
114
|
+
/** Title displayed on the game board. Default: `"Rock Paper Scissors"` */
|
|
115
|
+
title?: string;
|
|
116
|
+
/** Title displayed in the invite message. Default: `"Rock Paper Scissors Challenge"` */
|
|
117
|
+
inviteTitle?: string;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export interface TicTacToeOptions {
|
|
121
|
+
/** Array of the 2 players. */
|
|
122
|
+
players: [User, User];
|
|
123
|
+
/** Max time (in seconds) a player has to take their turn before the game ends. Default: `30` seconds. */
|
|
124
|
+
turnTimeout?: number;
|
|
125
|
+
/**
|
|
126
|
+
* Bot difficulty — only used if player 2 is a bot.
|
|
127
|
+
* - `Easy` — always random.
|
|
128
|
+
* - `Normal` — plays optimally ~50% of the time, otherwise random.
|
|
129
|
+
* - `Hard` — plays optimally ~80% of the time.
|
|
130
|
+
* - `Impossible` — always optimal (unbeatable).
|
|
131
|
+
*
|
|
132
|
+
* Default: `Hard`.
|
|
133
|
+
*/
|
|
134
|
+
difficulty?: BotDifficulty;
|
|
135
|
+
/** Discord locale for all in-game strings. Accepts `interaction.locale` or `Locale.French` etc. Default: `Locale.EnglishUS`. */
|
|
136
|
+
locale?: Locale;
|
|
137
|
+
/** Theme settings. */
|
|
138
|
+
theme?: {
|
|
139
|
+
colors?: {
|
|
140
|
+
/** Color during the game. Default: `0x5865f2` */
|
|
141
|
+
play?: number;
|
|
142
|
+
/** Color when a player wins. Default: `0xffd700` */
|
|
143
|
+
win?: number;
|
|
144
|
+
/** Color on draw or timeout. Default: `0x808080` */
|
|
145
|
+
draw?: number;
|
|
146
|
+
};
|
|
147
|
+
emojis?: {
|
|
148
|
+
/** Player 1 pieces. Default: `❌` */
|
|
149
|
+
player1?: string;
|
|
150
|
+
/** Player 2 pieces. Default: `⭕` */
|
|
151
|
+
player2?: string;
|
|
152
|
+
/** Empty cells. Default: `⬜` */
|
|
153
|
+
empty?: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
lang?: {
|
|
157
|
+
/** Title displayed on the game board. Default: `"Tic-Tac-Toe"` */
|
|
158
|
+
title?: string;
|
|
159
|
+
/** Title displayed in the invite message. Default: `"Tic-Tac-Toe Challenge"` */
|
|
160
|
+
inviteTitle?: string;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface HangmanOptions {
|
|
164
|
+
/** Array of the 2 players. */
|
|
165
|
+
players: [User, User];
|
|
166
|
+
/** Max time (in seconds) a player has to take their turn before the game ends. Default: `30` seconds. */
|
|
167
|
+
turnTimeout?: number;
|
|
168
|
+
/** Number of lives. Default: `6`. */
|
|
169
|
+
lifeCount?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
170
|
+
/** Discord locale for all in-game strings and the word list. Overrides the GameManager locale. Default: `Locale.EnglishUS`. */
|
|
171
|
+
locale?: Locale;
|
|
172
|
+
/** Theme settings. */
|
|
173
|
+
theme?: {
|
|
174
|
+
colors?: {
|
|
175
|
+
/** Color during the game. Default: `0x5865f2` */
|
|
176
|
+
play?: number;
|
|
177
|
+
/** Color on win. Default: `0xffd700` */
|
|
178
|
+
win?: number;
|
|
179
|
+
/** Color on loss or timeout. Default: `0x808080` */
|
|
180
|
+
lose?: number;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
lang?: {
|
|
184
|
+
/** Title displayed on the game board. Default: `"Hangman"` */
|
|
185
|
+
title?: string;
|
|
186
|
+
/** Title displayed in the invite message. Default: `"Hangman Challenge"` */
|
|
187
|
+
inviteTitle?: string;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
export interface SnakeOptions {
|
|
191
|
+
/** The player. Snake is a single-player game, so only one user is required. */
|
|
192
|
+
player: User;
|
|
193
|
+
/** Max time (in seconds) the player can stay idle between two moves before the game ends. Default: `30` seconds. */
|
|
194
|
+
turnTimeout?: number;
|
|
195
|
+
/** Board width (number of cells). Clamped between `5` and `12`. Default: `10`. */
|
|
196
|
+
boardWidth?: number;
|
|
197
|
+
/** Board height (number of cells). Clamped between `5` and `12`. Default: `10`. */
|
|
198
|
+
boardHeight?: number;
|
|
199
|
+
/** Discord locale for all in-game strings. Accepts `interaction.locale` or `Locale.French` etc. Default: `Locale.EnglishUS`. */
|
|
200
|
+
locale?: Locale;
|
|
201
|
+
/** Theme settings. */
|
|
202
|
+
theme?: {
|
|
203
|
+
colors?: {
|
|
204
|
+
/** Color during the game. Default: `0x5865f2` */
|
|
205
|
+
play?: number;
|
|
206
|
+
/** Color when the board is fully filled (win). Default: `0xffd700` */
|
|
207
|
+
win?: number;
|
|
208
|
+
/** Color on game over or timeout. Default: `0x808080` */
|
|
209
|
+
lose?: number;
|
|
210
|
+
};
|
|
211
|
+
emojis?: {
|
|
212
|
+
/** Snake head. Default: `🟢` */
|
|
213
|
+
head?: string;
|
|
214
|
+
/** Snake body. Default: `🟩` */
|
|
215
|
+
body?: string;
|
|
216
|
+
/** Food. Default: `🍎` */
|
|
217
|
+
food?: string;
|
|
218
|
+
/** Empty cells. Default: `⬛` */
|
|
219
|
+
empty?: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
lang?: {
|
|
223
|
+
/** Title displayed on the game board. Default: `"Snake"` */
|
|
224
|
+
title?: string;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export type GameOptionsType = Connect4Options | RPSOptions | TicTacToeOptions | HangmanOptions | SnakeOptions;
|
|
228
|
+
/** Minimal structural interface for what game classes need from the manager. */
|
|
229
|
+
export interface GameManagerType {
|
|
230
|
+
readonly cooldowns: {
|
|
231
|
+
add(key: string, time: number): void;
|
|
232
|
+
delete(key: string): void;
|
|
233
|
+
replace(key: string, time: number): void;
|
|
234
|
+
reset(key: string, time: number): void;
|
|
235
|
+
see(key: string): number;
|
|
236
|
+
};
|
|
237
|
+
readonly options: GameManagerOptions;
|
|
238
|
+
}
|
|
239
|
+
/** Union of all built-in locale types — hovering in your IDE shows the actual translated strings. */
|
|
240
|
+
export type GameLocale = WynHamLocales;
|
|
241
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../src/structures/Types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,WAAW,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IAC/B,qIAAqI;IACrI,QAAQ,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,KAAK;IAClB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,oBAAY,YAAY;IACpB,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,KAAK,UAAU;CAClB;AAED,oBAAY,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,UAAU,eAAe;CAC5B;AAED,oBAAY,YAAY;IACpB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACtB;AAED,oBAAY,MAAM;IACd,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QA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