@mblinkov/whats-missing 0.0.9 → 20.0.1

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.
Files changed (80) hide show
  1. package/.prettierrc +9 -0
  2. package/dist/whats-missing.es.js +738 -249
  3. package/dist/whats-missing.umd.js +57 -1
  4. package/package.json +8 -49
  5. package/src/Game.styles.ts +205 -0
  6. package/src/Game.tsx +436 -0
  7. package/src/index.ts +4 -0
  8. package/src/themes.ts +91 -72
  9. package/tsconfig.json +19 -0
  10. package/vite.config.ts +33 -0
  11. package/dist/vite.svg +0 -1
  12. package/dist/whats-missing.css +0 -1
  13. package/src/Game.module.css +0 -183
  14. package/src/assets/Animals/bear.jpg +0 -0
  15. package/src/assets/Animals/cat.png +0 -0
  16. package/src/assets/Animals/crocodile.jpg +0 -0
  17. package/src/assets/Animals/dolphin.jpg +0 -0
  18. package/src/assets/Animals/elephant.jpg +0 -0
  19. package/src/assets/Animals/fox.jpg +0 -0
  20. package/src/assets/Animals/giraffe.jpg +0 -0
  21. package/src/assets/Animals/horse.jpg +0 -0
  22. package/src/assets/Animals/kangaroo.jpg +0 -0
  23. package/src/assets/Animals/lion.jpg +0 -0
  24. package/src/assets/Animals/monkey.jpg +0 -0
  25. package/src/assets/Animals/owl.jpg +0 -0
  26. package/src/assets/Animals/panda.jpg +0 -0
  27. package/src/assets/Animals/penguin.jpg +0 -0
  28. package/src/assets/Animals/rabbit.jpg +0 -0
  29. package/src/assets/Animals/squirrel.jpg +0 -0
  30. package/src/assets/Animals/tiger.png +0 -0
  31. package/src/assets/Animals/tortoise.jpg +0 -0
  32. package/src/assets/Animals/wolf.png +0 -0
  33. package/src/assets/Animals/zebra.jpg +0 -0
  34. package/src/assets/Food/apple.jpg +0 -0
  35. package/src/assets/Food/banana.jpg +0 -0
  36. package/src/assets/Food/bread.jpg +0 -0
  37. package/src/assets/Food/burger.jpg +0 -0
  38. package/src/assets/Food/cake.jpg +0 -0
  39. package/src/assets/Food/carrot.jpg +0 -0
  40. package/src/assets/Food/cheese.jpg +0 -0
  41. package/src/assets/Food/chicken.jpg +0 -0
  42. package/src/assets/Food/chocolate.jpg +0 -0
  43. package/src/assets/Food/corn.jpg +0 -0
  44. package/src/assets/Food/donut.jpg +0 -0
  45. package/src/assets/Food/fish.jpg +0 -0
  46. package/src/assets/Food/fries.jpg +0 -0
  47. package/src/assets/Food/grapes.jpg +0 -0
  48. package/src/assets/Food/ice cream.jpg +0 -0
  49. package/src/assets/Food/milk.jpg +0 -0
  50. package/src/assets/Food/orange.jpg +0 -0
  51. package/src/assets/Food/pear.jpg +0 -0
  52. package/src/assets/Food/pizza.jpg +0 -0
  53. package/src/assets/Food/rice.jpg +0 -0
  54. package/src/assets/Food/sandwich.jpg +0 -0
  55. package/src/assets/Food/soup.jpg +0 -0
  56. package/src/assets/Food/strawberry.jpg +0 -0
  57. package/src/assets/Food/tomato.jpg +0 -0
  58. package/src/assets/Food/watermelon.jpg +0 -0
  59. package/src/assets/Toys/ball.jpg +0 -0
  60. package/src/assets/Toys/balloon.jpg +0 -0
  61. package/src/assets/Toys/blocks.jpg +0 -0
  62. package/src/assets/Toys/car.jpg +0 -0
  63. package/src/assets/Toys/doll.jpg +0 -0
  64. package/src/assets/Toys/drum.jpg +0 -0
  65. package/src/assets/Toys/guitar.jpg +0 -0
  66. package/src/assets/Toys/jump rope.jpg +0 -0
  67. package/src/assets/Toys/kite.jpg +0 -0
  68. package/src/assets/Toys/paints.jpg +0 -0
  69. package/src/assets/Toys/plane.jpg +0 -0
  70. package/src/assets/Toys/puzzle.jpg +0 -0
  71. package/src/assets/Toys/rocket.jpg +0 -0
  72. package/src/assets/Toys/scooter.jpg +0 -0
  73. package/src/assets/Toys/skateboard.jpg +0 -0
  74. package/src/assets/Toys/slide.jpg +0 -0
  75. package/src/assets/Toys/teddy bear.jpg +0 -0
  76. package/src/assets/Toys/train.jpg +0 -0
  77. package/src/assets/Toys/yo-yo.jpg +0 -0
  78. package/src/assets/Toys//321/201rayons.jpg +0 -0
  79. package/src/assets/logo.png +0 -0
  80. package/src/assets/react.svg +0 -1
@@ -1,304 +1,793 @@
1
- import { jsxs as a, Fragment as rs, jsx as e } from "react/jsx-runtime";
2
- import { useState as n, useEffect as X } from "react";
3
- const ns = "_gmCenterScreen_skj5s_19", as = "_gmGameLayout_skj5s_19", cs = "_gmHeadline1_skj5s_34", gs = "_gmHeadline2_skj5s_35", is = "_gmHeadline3_skj5s_36", ls = "_gmBodyL_skj5s_38", ms = "_gmBodyM_skj5s_39", ds = "_gmBodyS_skj5s_40", hs = "_gmButton_skj5s_43", ps = "_gmActive_skj5s_58", js = "_gmLogoFixed_skj5s_64", us = "_gmProgressContainer_skj5s_76", As = "_gmProgressBar_skj5s_84", ks = "_gmGrid_skj5s_91", ws = "_gmCard_skj5s_102", ys = "_gmHop_skj5s_121", Cs = "_gmCorrect_skj5s_123", fs = "_gmWrong_skj5s_128", Es = "_gmFade_skj5s_139", Ts = "_gmFadeIn_skj5s_1", Bs = "_gmPulse_skj5s_145", Fs = "_gmTable_skj5s_148", Rs = "_gmAlmost_skj5s_159", Ss = "_gmInput_skj5s_163", t = {
4
- gmCenterScreen: ns,
5
- gmGameLayout: as,
6
- gmHeadline1: cs,
7
- gmHeadline2: gs,
8
- gmHeadline3: is,
9
- gmBodyL: ls,
10
- gmBodyM: ms,
11
- gmBodyS: ds,
12
- gmButton: hs,
13
- gmActive: ps,
14
- gmLogoFixed: js,
15
- gmProgressContainer: us,
16
- gmProgressBar: As,
17
- gmGrid: ks,
18
- gmCard: ws,
19
- gmHop: ys,
20
- gmCorrect: Cs,
21
- gmWrong: fs,
22
- gmFade: Es,
23
- gmFadeIn: Ts,
24
- gmPulse: Bs,
25
- gmTable: Fs,
26
- gmAlmost: Rs,
27
- gmInput: Ss
28
- }, Ls = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZEAAABFCAYAAACL+dvaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR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xD3HCDWEo4xtMBwqHcEPVZHTOvXdEYYS4MNaFy4XsNVba54nQA/QV02UJY1KE4yjwjZehzrSgEDAn1EMJ9iltqgbei+RWXsq5Iz3jBORls6S3TXt2FoWdUsrxhsTA52MEgVvCaDDc5sQVAo3pnVFegh+Ck96RHnF5kNdOQB68N/cNYKT/kHqeR99YyHnjwg5u+euQ9z33sCoitWyzb1IHNGrMbwrB6NgKyKdP5bHPOzTFt8C0hIS8JwtB8JuLQjy0sQ2dT+MWhUxxBBEZqwZ8KMkuvSMdsQ1hnSAgxEOj4Aukzb3pC/JAJJkuBLgJ9TGM3t+A9zOEIpapkRI6V5DekS6wdRL95PDqsfNEKLY81mR1GEe/gSB4FPhhjjF43imNslPcUMM5Olzk3JGMUB+IE5An7Y70Y5xyKFUJf8KexXgw8PXiBoKwQ4OHxXjuJa7RpjHN8E6JtL2Fe9SwEFitzNb7+PTpxaEy3oc49WRDCy8krzGsmIRhbheQHIhwH641bjAeDPhhNW5V2pDQtaYUxVBlWgkhnlo8zq6vL2K9jyaxx+OW8Bs4vegW/RGqOUjI5txoJPDR4DdqjS33xw2tTXVisUGakFNhgYJwHC8cr916lCoegT8Qj4XPQ9DS8An4p8j/IpJw0MOUOgFUWAbcDfQbxjewk+55TsWVwnROPWxDhik1OnNCcqF35AJCkxsnGrbajZ665oSrjsERkSYGuxv2vLH+qt+eekOEM8fpQr/XX7PPB5ss0dib12DaGEwb0/o7HUTGyScYjA8DH7bNneOw4P2OLLrHwgtJSuMk/b4ObpJkgSMe7j5EFj96xtZvt7MKH+oyz0kfV6lw2EuxuD+UURAEQZgI/wdUm/EYqXPURAAAAABJRU5ErkJggg==", V = {
29
- animals: [
30
- "src/assets/Animals/bear.jpg",
31
- "src/assets/Animals/cat.png",
32
- "src/assets/Animals/crocodile.jpg",
33
- "src/assets/Animals/dolphin.jpg",
34
- "src/assets/Animals/elephant.jpg",
35
- "src/assets/Animals/fox.jpg",
36
- "src/assets/Animals/giraffe.jpg",
37
- "src/assets/Animals/horse.jpg",
38
- "src/assets/Animals/kangaroo.jpg",
39
- "src/assets/Animals/lion.jpg",
40
- "src/assets/Animals/monkey.jpg",
41
- "src/assets/Animals/owl.jpg",
42
- "src/assets/Animals/panda.jpg",
43
- "src/assets/Animals/penguin.jpg",
44
- "src/assets/Animals/rabbit.jpg",
45
- "src/assets/Animals/squirrel.jpg",
46
- "src/assets/Animals/tiger.png",
47
- "src/assets/Animals/tortoise.jpg",
48
- "src/assets/Animals/wolf.png",
49
- "src/assets/Animals/zebra.jpg"
50
- ],
51
- food: [
52
- "src/assets/Food/apple.jpg",
53
- "src/assets/Food/banana.jpg",
54
- "src/assets/Food/bread.jpg",
55
- "src/assets/Food/carrot.jpg",
56
- "src/assets/Food/cake.jpg",
57
- "src/assets/Food/pizza.jpg",
58
- "src/assets/Food/rice.jpg",
59
- "src/assets/Food/burger.jpg",
60
- "src/assets/Food/cheese.jpg",
61
- "src/assets/Food/chocolate.jpg",
62
- "src/assets/Food/strawberry.jpg",
63
- "src/assets/Food/orange.jpg",
64
- "src/assets/Food/pear.jpg",
65
- "src/assets/Food/watermelon.jpg",
66
- "src/assets/Food/ice cream.jpg",
67
- "src/assets/Food/soup.jpg",
68
- "src/assets/Food/chicken.jpg",
69
- "src/assets/Food/fish.jpg",
70
- "src/assets/Food/fries.jpg",
71
- "src/assets/Food/tomato.jpg",
72
- "src/assets/Food/milk.jpg",
73
- "src/assets/Food/grapes.jpg",
74
- "src/assets/Food/corn.jpg",
75
- "src/assets/Food/donut.jpg",
76
- "src/assets/Food/sandwich.jpg"
77
- ],
78
- toys: [
79
- "src/assets/Toys/ball.jpg",
80
- "src/assets/Toys/balloon.jpg",
81
- "src/assets/Toys/blocks.jpg",
82
- "src/assets/Toys/car.jpg",
83
- "src/assets/Toys/doll.jpg",
84
- "src/assets/Toys/drum.jpg",
85
- "src/assets/Toys/guitar.jpg",
86
- "src/assets/Toys/jump rope.jpg",
87
- "src/assets/Toys/kite.jpg",
88
- "src/assets/Toys/paints.jpg",
89
- "src/assets/Toys/plane.jpg",
90
- "src/assets/Toys/puzzle.jpg",
91
- "src/assets/Toys/scooter.jpg",
92
- "src/assets/Toys/rocket.jpg",
93
- "src/assets/Toys/skateboard.jpg",
94
- "src/assets/Toys/slide.jpg",
95
- "src/assets/Toys/teddy bear.jpg",
96
- "src/assets/Toys/train.jpg",
97
- "src/assets/Toys/crayons.jpg",
98
- "src/assets/Toys/yo-yo.jpg"
99
- ]
100
- }, W = (c) => (c.split("/").pop() || "").replace(/\.(jpg|png|jpeg|webp)$/i, "").toLowerCase(), Us = (c, l) => {
101
- const g = Array.from(
102
- { length: c.length + 1 },
103
- () => Array(l.length + 1).fill(0)
104
- );
105
- for (let r = 0; r <= c.length; r++) g[r][0] = r;
106
- for (let r = 0; r <= l.length; r++) g[0][r] = r;
107
- for (let r = 1; r <= c.length; r++)
108
- for (let i = 1; i <= l.length; i++)
109
- g[r][i] = c[r - 1] === l[i - 1] ? g[r - 1][i - 1] : Math.min(g[r - 1][i - 1], g[r][i - 1], g[r - 1][i]) + 1;
110
- return g[c.length][l.length];
1
+ import de, { useEffect as ne, useState as f } from "react";
2
+ var ee = { exports: {} }, D = {};
3
+ /**
4
+ * @license React
5
+ * react-jsx-runtime.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var ae;
13
+ function ue() {
14
+ if (ae) return D;
15
+ ae = 1;
16
+ var a = Symbol.for("react.transitional.element"), p = Symbol.for("react.fragment");
17
+ function u(s, i, h) {
18
+ var x = null;
19
+ if (h !== void 0 && (x = "" + h), i.key !== void 0 && (x = "" + i.key), "key" in i) {
20
+ h = {};
21
+ for (var v in i)
22
+ v !== "key" && (h[v] = i[v]);
23
+ } else h = i;
24
+ return i = h.ref, {
25
+ $$typeof: a,
26
+ type: s,
27
+ key: x,
28
+ ref: i !== void 0 ? i : null,
29
+ props: h
30
+ };
31
+ }
32
+ return D.Fragment = p, D.jsx = u, D.jsxs = u, D;
33
+ }
34
+ var G = {};
35
+ /**
36
+ * @license React
37
+ * react-jsx-runtime.development.js
38
+ *
39
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
40
+ *
41
+ * This source code is licensed under the MIT license found in the
42
+ * LICENSE file in the root directory of this source tree.
43
+ */
44
+ var ie;
45
+ function me() {
46
+ return ie || (ie = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ function a(e) {
48
+ if (e == null) return null;
49
+ if (typeof e == "function")
50
+ return e.$$typeof === H ? null : e.displayName || e.name || null;
51
+ if (typeof e == "string") return e;
52
+ switch (e) {
53
+ case E:
54
+ return "Fragment";
55
+ case L:
56
+ return "Profiler";
57
+ case M:
58
+ return "StrictMode";
59
+ case A:
60
+ return "Suspense";
61
+ case F:
62
+ return "SuspenseList";
63
+ case R:
64
+ return "Activity";
65
+ }
66
+ if (typeof e == "object")
67
+ switch (typeof e.tag == "number" && console.error(
68
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
+ ), e.$$typeof) {
70
+ case V:
71
+ return "Portal";
72
+ case te:
73
+ return e.displayName || "Context";
74
+ case J:
75
+ return (e._context.displayName || "Context") + ".Consumer";
76
+ case W:
77
+ var n = e.render;
78
+ return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
+ case O:
80
+ return n = e.displayName || null, n !== null ? n : a(e.type) || "Memo";
81
+ case P:
82
+ n = e._payload, e = e._init;
83
+ try {
84
+ return a(e(n));
85
+ } catch {
86
+ }
87
+ }
88
+ return null;
89
+ }
90
+ function p(e) {
91
+ return "" + e;
92
+ }
93
+ function u(e) {
94
+ try {
95
+ p(e);
96
+ var n = !1;
97
+ } catch {
98
+ n = !0;
99
+ }
100
+ if (n) {
101
+ n = console;
102
+ var l = n.error, d = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
+ return l.call(
104
+ n,
105
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
+ d
107
+ ), p(e);
108
+ }
109
+ }
110
+ function s(e) {
111
+ if (e === E) return "<>";
112
+ if (typeof e == "object" && e !== null && e.$$typeof === P)
113
+ return "<...>";
114
+ try {
115
+ var n = a(e);
116
+ return n ? "<" + n + ">" : "<...>";
117
+ } catch {
118
+ return "<...>";
119
+ }
120
+ }
121
+ function i() {
122
+ var e = _.A;
123
+ return e === null ? null : e.getOwner();
124
+ }
125
+ function h() {
126
+ return Error("react-stack-top-frame");
127
+ }
128
+ function x(e) {
129
+ if (Y.call(e, "key")) {
130
+ var n = Object.getOwnPropertyDescriptor(e, "key").get;
131
+ if (n && n.isReactWarning) return !1;
132
+ }
133
+ return e.key !== void 0;
134
+ }
135
+ function v(e, n) {
136
+ function l() {
137
+ Z || (Z = !0, console.error(
138
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
+ n
140
+ ));
141
+ }
142
+ l.isReactWarning = !0, Object.defineProperty(e, "key", {
143
+ get: l,
144
+ configurable: !0
145
+ });
146
+ }
147
+ function C() {
148
+ var e = a(this.type);
149
+ return I[e] || (I[e] = !0, console.error(
150
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
+ )), e = this.props.ref, e !== void 0 ? e : null;
152
+ }
153
+ function U(e, n, l, d, z, $) {
154
+ var m = l.ref;
155
+ return e = {
156
+ $$typeof: N,
157
+ type: e,
158
+ key: n,
159
+ props: l,
160
+ _owner: d
161
+ }, (m !== void 0 ? m : null) !== null ? Object.defineProperty(e, "ref", {
162
+ enumerable: !1,
163
+ get: C
164
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
+ configurable: !1,
166
+ enumerable: !1,
167
+ writable: !0,
168
+ value: 0
169
+ }), Object.defineProperty(e, "_debugInfo", {
170
+ configurable: !1,
171
+ enumerable: !1,
172
+ writable: !0,
173
+ value: null
174
+ }), Object.defineProperty(e, "_debugStack", {
175
+ configurable: !1,
176
+ enumerable: !1,
177
+ writable: !0,
178
+ value: z
179
+ }), Object.defineProperty(e, "_debugTask", {
180
+ configurable: !1,
181
+ enumerable: !1,
182
+ writable: !0,
183
+ value: $
184
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
+ }
186
+ function y(e, n, l, d, z, $) {
187
+ var m = n.children;
188
+ if (m !== void 0)
189
+ if (d)
190
+ if (X(m)) {
191
+ for (d = 0; d < m.length; d++)
192
+ q(m[d]);
193
+ Object.freeze && Object.freeze(m);
194
+ } else
195
+ console.error(
196
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
+ );
198
+ else q(m);
199
+ if (Y.call(n, "key")) {
200
+ m = a(e);
201
+ var k = Object.keys(n).filter(function(c) {
202
+ return c !== "key";
203
+ });
204
+ d = 0 < k.length ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}", S[m + d] || (k = 0 < k.length ? "{" + k.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ `A props object containing a "key" prop is being spread into JSX:
206
+ let props = %s;
207
+ <%s {...props} />
208
+ React keys must be passed directly to JSX without using spread:
209
+ let props = %s;
210
+ <%s key={someKey} {...props} />`,
211
+ d,
212
+ m,
213
+ k,
214
+ m
215
+ ), S[m + d] = !0);
216
+ }
217
+ if (m = null, l !== void 0 && (u(l), m = "" + l), x(n) && (u(n.key), m = "" + n.key), "key" in n) {
218
+ l = {};
219
+ for (var r in n)
220
+ r !== "key" && (l[r] = n[r]);
221
+ } else l = n;
222
+ return m && v(
223
+ l,
224
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
+ ), U(
226
+ e,
227
+ m,
228
+ l,
229
+ i(),
230
+ z,
231
+ $
232
+ );
233
+ }
234
+ function q(e) {
235
+ g(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === P && (e._payload.status === "fulfilled" ? g(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
236
+ }
237
+ function g(e) {
238
+ return typeof e == "object" && e !== null && e.$$typeof === N;
239
+ }
240
+ var T = de, N = Symbol.for("react.transitional.element"), V = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), M = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), te = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), _ = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, X = Array.isArray, j = console.createTask ? console.createTask : function() {
241
+ return null;
242
+ };
243
+ T = {
244
+ react_stack_bottom_frame: function(e) {
245
+ return e();
246
+ }
247
+ };
248
+ var Z, I = {}, Q = T.react_stack_bottom_frame.bind(
249
+ T,
250
+ h
251
+ )(), B = j(s(h)), S = {};
252
+ G.Fragment = E, G.jsx = function(e, n, l) {
253
+ var d = 1e4 > _.recentlyCreatedOwnerStacks++;
254
+ return y(
255
+ e,
256
+ n,
257
+ l,
258
+ !1,
259
+ d ? Error("react-stack-top-frame") : Q,
260
+ d ? j(s(e)) : B
261
+ );
262
+ }, G.jsxs = function(e, n, l) {
263
+ var d = 1e4 > _.recentlyCreatedOwnerStacks++;
264
+ return y(
265
+ e,
266
+ n,
267
+ l,
268
+ !0,
269
+ d ? Error("react-stack-top-frame") : Q,
270
+ d ? j(s(e)) : B
271
+ );
272
+ };
273
+ })()), G;
274
+ }
275
+ var le;
276
+ function fe() {
277
+ return le || (le = 1, process.env.NODE_ENV === "production" ? ee.exports = ue() : ee.exports = me()), ee.exports;
278
+ }
279
+ var t = fe();
280
+ const pe = window.origin + "/cloud/speakid/games/whatsmissing/", oe = (a, p) => a.map(([u, s]) => ({
281
+ src: `${pe}${p}/${s.replace(/\s/g, "%20")}.png`,
282
+ name: s
283
+ })), ge = [
284
+ ["apple", "apple"],
285
+ ["banana", "banana"],
286
+ ["bread", "bread"],
287
+ ["burger", "burger"],
288
+ ["cake", "cake"],
289
+ ["carrot", "carrot"],
290
+ ["cheese", "cheese"],
291
+ ["chicken", "chicken"],
292
+ ["chocolate", "chocolate"],
293
+ ["corn", "corn"],
294
+ ["donut", "donut"],
295
+ ["fish", "fish"],
296
+ ["fries", "fries"],
297
+ ["grapes", "grapes"],
298
+ ["ice_cream", "ice cream"],
299
+ ["milk", "milk"],
300
+ ["orange", "orange"],
301
+ ["pear", "pear"],
302
+ ["pizza", "pizza"],
303
+ ["rice", "rice"],
304
+ ["sandwich", "sandwich"],
305
+ ["soup", "soup"],
306
+ ["strawberry", "strawberry"],
307
+ ["tomato", "tomato"],
308
+ ["watermelon", "watermelon"]
309
+ ], he = [
310
+ ["bear", "bear"],
311
+ ["cat", "cat"],
312
+ ["crocodile", "crocodile"],
313
+ ["dolphin", "dolphin"],
314
+ ["elephant", "elephant"],
315
+ ["fox", "fox"],
316
+ ["giraffe", "giraffe"],
317
+ ["horse", "horse"],
318
+ ["kangaroo", "kangaroo"],
319
+ ["lion", "lion"],
320
+ ["monkey", "monkey"],
321
+ ["owl", "owl"],
322
+ ["panda", "panda"],
323
+ ["penguin", "penguin"],
324
+ ["squirrel", "squirrel"],
325
+ ["tiger", "tiger"],
326
+ ["tortoise", "tortoise"],
327
+ ["wolf", "wolf"],
328
+ ["zebra", "zebra"]
329
+ ], xe = [
330
+ ["ball", "ball"],
331
+ ["balloon", "balloon"],
332
+ ["blocks", "blocks"],
333
+ ["car", "car"],
334
+ ["doll", "doll"],
335
+ ["drum", "drum"],
336
+ ["guitar", "guitar"],
337
+ ["jump_rope", "jump rope"],
338
+ ["kite", "kite"],
339
+ ["paints", "paints"],
340
+ ["plane", "plane"],
341
+ ["puzzle", "puzzle"],
342
+ ["rocket", "rocket"],
343
+ ["scooter", "scooter"],
344
+ ["skateboard", "skateboard"],
345
+ ["slide", "slide"],
346
+ ["teddy_bear", "teddy bear"],
347
+ ["yo-yo", "yo-yo"],
348
+ ["crayons", "crayons"]
349
+ ], ce = {
350
+ food: oe(ge, "food"),
351
+ animals: oe(he, "animals"),
352
+ toys: oe(xe, "toys")
353
+ }, be = `
354
+ @keyframes spin {
355
+ from { transform: rotate(0deg); }
356
+ to { transform: rotate(360deg); }
357
+ }
358
+ `;
359
+ if (typeof document < "u" && !document.getElementById("spin-keyframes")) {
360
+ const a = document.createElement("style");
361
+ a.id = "spin-keyframes", a.innerHTML = be, document.head.appendChild(a);
362
+ }
363
+ const ye = {
364
+ animation: "spin 1.4s linear infinite"
365
+ }, o = {
366
+ gmCenterScreen: {
367
+ position: "relative",
368
+ zIndex: 1,
369
+ minHeight: "100vh",
370
+ width: "100%",
371
+ display: "flex",
372
+ flexDirection: "column",
373
+ justifyContent: "center",
374
+ alignItems: "center",
375
+ textAlign: "center",
376
+ color: "#1f2937",
377
+ padding: "24px 16px",
378
+ boxSizing: "border-box",
379
+ transform: "translateY(20px)"
380
+ // чуть вниз, чтобы компенсировать логотип
381
+ },
382
+ gmHeadline1: {
383
+ fontWeight: 700,
384
+ fontSize: "clamp(28px, 4vw, 40px)",
385
+ lineHeight: "110%"
386
+ },
387
+ gmHeadline3: {
388
+ fontWeight: 600,
389
+ fontSize: "18px",
390
+ lineHeight: "130%"
391
+ },
392
+ gmBodyM: {
393
+ fontWeight: 400,
394
+ fontSize: "16px",
395
+ lineHeight: "140%"
396
+ },
397
+ gmBodyS: {
398
+ fontWeight: 400,
399
+ fontSize: "14px",
400
+ lineHeight: "140%",
401
+ color: "#6b7280"
402
+ },
403
+ gmButton: {
404
+ fontFamily: '"Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans"',
405
+ fontWeight: 600,
406
+ fontSize: "16px",
407
+ padding: "10px 16px",
408
+ borderRadius: "12px",
409
+ border: "1px solid #e5e7eb",
410
+ background: "#ec4c44",
411
+ color: "#ffffff",
412
+ cursor: "pointer",
413
+ boxShadow: "0 6px 18px rgba(236, 76, 68, .18)",
414
+ transition: "transform .06s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease"
415
+ },
416
+ gmButtonActive: {
417
+ background: "#333",
418
+ color: "#fff"
419
+ },
420
+ gmGameLayout: {
421
+ position: "relative",
422
+ width: "100%",
423
+ maxWidth: "600px",
424
+ // ограничение ширины для мобильных
425
+ minHeight: "100vh",
426
+ display: "flex",
427
+ flexDirection: "column",
428
+ alignItems: "center",
429
+ justifyContent: "center",
430
+ textAlign: "center",
431
+ color: "#1f2937",
432
+ padding: "16px 8px",
433
+ margin: "0 auto"
434
+ },
435
+ gmGrid: {
436
+ width: "100%",
437
+ maxWidth: "calc(210px * 3 + 20px * 2)",
438
+ margin: "0 auto",
439
+ display: "grid",
440
+ gridTemplateColumns: "repeat(3, 210px)",
441
+ gridAutoRows: "210px",
442
+ gap: "20px",
443
+ justifyContent: "center"
444
+ },
445
+ gmCard: {
446
+ border: "1px solid #e5e7eb",
447
+ borderRadius: "16px",
448
+ background: "#f9f9f9",
449
+ aspectRatio: "1 / 1",
450
+ display: "flex",
451
+ alignItems: "center",
452
+ justifyContent: "center",
453
+ overflow: "hidden",
454
+ transition: "transform .2s ease, box-shadow .2s ease, border-color .2s ease"
455
+ },
456
+ gmCorrect: {
457
+ border: "2px solid #10b981",
458
+ boxShadow: "0 0 18px rgba(16,185,129,.45)",
459
+ background: "#ecfdf5"
460
+ },
461
+ gmWrong: {
462
+ border: "2px solid #ec4c44",
463
+ boxShadow: "0 0 18px rgba(236,76,68,.35)",
464
+ background: "#fef2f2"
465
+ },
466
+ gmInput: {
467
+ padding: "6px 10px",
468
+ borderRadius: "6px",
469
+ border: "1px solid #ccc",
470
+ fontSize: "16px",
471
+ fontFamily: '"Geist", system-ui',
472
+ width: "160px"
473
+ },
474
+ gmTable: {
475
+ marginTop: "20px",
476
+ marginBottom: "32px",
477
+ borderCollapse: "collapse",
478
+ width: "100%",
479
+ maxWidth: "520px",
480
+ tableLayout: "fixed",
481
+ textAlign: "center"
482
+ },
483
+ gmTableCell: {
484
+ padding: "8px 12px",
485
+ borderBottom: "1px solid #e5e7eb",
486
+ whiteSpace: "nowrap",
487
+ overflow: "hidden",
488
+ textOverflow: "ellipsis"
489
+ },
490
+ gmLogoFixed: {
491
+ position: "sticky",
492
+ top: "16px",
493
+ left: "20px",
494
+ zIndex: 9999,
495
+ background: "white",
496
+ padding: "4px 8px",
497
+ borderRadius: "8px"
498
+ },
499
+ gmLogoImg: {
500
+ height: "clamp(28px, 5vw, 40px)",
501
+ width: "auto"
502
+ },
503
+ gmHourglass: {
504
+ fontSize: "42px",
505
+ ...ye
506
+ }
507
+ }, we = window.origin + "/cloud/speakid/games/whatsmissing/logo.png", Te = () => {
508
+ const a = document.createElement("style");
509
+ a.textContent = `
510
+ html, body, #root {
511
+ margin: 0;
512
+ padding: 0;
513
+ height: 100%;
514
+ }
515
+ *, *::before, *::after {
516
+ box-sizing: border-box;
517
+ }
518
+ body {
519
+ font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
520
+ background-color: #fff;
521
+ color: #1f2937;
522
+ }
523
+ button, input {
524
+ font-family: inherit;
525
+ outline: none;
526
+ border: none;
527
+ background: none;
528
+ }
529
+ img {
530
+ max-width: 100%;
531
+ height: auto;
532
+ display: block;
533
+ user-select: none;
534
+ }
535
+ @keyframes spin {
536
+ from { transform: rotate(0deg); }
537
+ to { transform: rotate(360deg); }
538
+ }
539
+ `, document.head.appendChild(a);
540
+ }, je = (a, p) => {
541
+ const u = Array.from({ length: a.length + 1 }, () => Array(p.length + 1).fill(0));
542
+ for (let s = 0; s <= a.length; s++) u[s][0] = s;
543
+ for (let s = 0; s <= p.length; s++) u[0][s] = s;
544
+ for (let s = 1; s <= a.length; s++)
545
+ for (let i = 1; i <= p.length; i++)
546
+ u[s][i] = a[s - 1] === p[i - 1] ? u[s - 1][i - 1] : Math.min(u[s - 1][i - 1], u[s][i - 1], u[s - 1][i]) + 1;
547
+ return u[a.length][p.length];
111
548
  };
112
- function Is() {
113
- const [c, l] = n(null), [g, r] = n([]), [i, K] = n(4), [u, U] = n(!1), [p, b] = n(1), [h, _] = n(null), [j, w] = n("ready"), [v, x] = n(3), [I, y] = n(7), [N, T] = n(0), [C, B] = n(!1), [D, H] = n(20), [f, P] = n(""), [A, F] = n(!1), [R, Q] = n(!1), [J, k] = n(
114
- null
115
- ), [Z, S] = n([]), [q, G] = n([]), [$, ss] = n(!1);
116
- X(() => {
117
- const s = () => ss(window.innerWidth < 768);
118
- return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
549
+ function Re() {
550
+ ne(() => {
551
+ Te();
119
552
  }, []);
120
- const Y = (s) => [...s].sort(() => Math.random() - 0.5).slice(0, 6), M = () => {
121
- if (!c) return;
122
- const s = Y(V[c]);
123
- r(s), U(!0), B(!1), b(1), T(0), S([]), G([]), O(s, [], !0);
124
- }, O = (s = g, o = q, d = !1) => {
125
- const m = Y(s.length ? s : V[c]);
126
- let E = Math.floor(Math.random() * m.length), L = m[E], z = 0;
127
- for (; o.includes(L) && z < 20; )
128
- E = Math.floor(Math.random() * m.length), L = m[E], z++;
129
- r(m), _(E), G([...o, L]), F(!1), P(""), H(20), k(null), d ? (w("ready"), x(3), y(7)) : (w("memorize"), y(7));
553
+ const [a, p] = f(null), [u, s] = f([]), [i, h] = f(4), [x, v] = f(!1), [C, U] = f(1), [y, q] = f(null), [g, T] = f("ready"), [N, V] = f(3), [E, M] = f(7), [L, J] = f(20), [te, W] = f(0), [A, F] = f(!1), [O, P] = f(""), [R, H] = f(!1), [_, Y] = f(!1), [X, j] = f(null), [Z, I] = f([]), [Q, B] = f([]), [S, e] = f(!1);
554
+ ne(() => {
555
+ const r = () => e(window.innerWidth < 768);
556
+ return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
557
+ }, []);
558
+ const n = (r) => [...r].sort(() => Math.random() - 0.5).slice(0, 6), l = () => {
559
+ if (!a) return;
560
+ const r = n(ce[a]);
561
+ s(r), v(!0), F(!1), U(1), W(0), I([]), B([]), d(r, [], !0);
562
+ }, d = (r = u, c = Q, w = !1) => {
563
+ const b = n(r.length ? r : ce[a]);
564
+ let K = Math.floor(Math.random() * b.length), re = b[K].name, se = 0;
565
+ for (; c.includes(re) && se < 20; )
566
+ K = Math.floor(Math.random() * b.length), re = b[K].name, se++;
567
+ s(b), q(K), B([...c, re]), H(!1), P(""), J(20), j(null), w ? (T("ready"), V(3), M(7)) : (T("memorize"), M(7));
130
568
  };
131
- X(() => {
132
- if (!(!u || C || A)) {
133
- if (j === "ready")
134
- if (v <= 0)
135
- w("memorize"), y(7);
569
+ ne(() => {
570
+ if (!(!x || A || R)) {
571
+ if (g === "ready")
572
+ if (N <= 0)
573
+ T("memorize");
136
574
  else {
137
- const s = setTimeout(() => x((o) => o - 1), 1e3);
138
- return () => clearTimeout(s);
575
+ const r = setTimeout(() => V((c) => c - 1), 1e3);
576
+ return () => clearTimeout(r);
139
577
  }
140
- if (j === "memorize")
141
- if (I <= 0)
142
- w("guess");
578
+ if (g === "memorize")
579
+ if (E <= 0)
580
+ T("guess");
143
581
  else {
144
- const s = setTimeout(() => y((o) => o - 1), 1e3);
145
- return () => clearTimeout(s);
582
+ const r = setTimeout(() => M((c) => c - 1), 1e3);
583
+ return () => clearTimeout(r);
146
584
  }
147
- if (j === "guess") {
148
- if (D <= 0) {
149
- F(!0), k("wrong");
150
- const o = W(g[h]);
151
- S((d) => [
152
- ...d,
153
- { round: p, answer: f, correct: o, result: "wrong" }
585
+ if (g === "guess") {
586
+ if (L <= 0) {
587
+ H(!0), j("wrong");
588
+ const c = u[y].name;
589
+ I((w) => [
590
+ ...w,
591
+ { round: C, answer: O, correct: c, result: "wrong" }
154
592
  ]);
155
593
  return;
156
594
  }
157
- const s = setTimeout(() => H((o) => o - 1), 1e3);
158
- return () => clearTimeout(s);
595
+ const r = setTimeout(() => J((c) => c - 1), 1e3);
596
+ return () => clearTimeout(r);
159
597
  }
160
598
  }
161
599
  }, [
162
- j,
163
- v,
164
- I,
165
- D,
600
+ g,
601
+ N,
602
+ E,
603
+ L,
604
+ x,
605
+ A,
606
+ R,
166
607
  u,
608
+ y,
167
609
  C,
168
- A,
169
- g,
170
- h,
171
- p,
172
- f
610
+ O
173
611
  ]);
174
- const es = () => {
175
- if (h === null || R) return;
176
- const s = W(g[h]), o = f.toLowerCase().trim();
177
- let d = "wrong";
178
- o === s ? (T((m) => m + 1), k("correct"), d = "correct") : Us(o, s) === 1 ? (T((m) => m + 0.5), k("almost"), d = "almost") : (k("wrong"), d = "wrong"), S((m) => [
179
- ...m,
180
- { round: p, answer: o, correct: s, result: d }
181
- ]), Q(!0), setTimeout(() => {
182
- Q(!1), F(!0);
612
+ const z = () => {
613
+ if (y === null || _) return;
614
+ const r = u[y].name, c = O.toLowerCase().trim();
615
+ let w = "wrong";
616
+ c === r ? (W((b) => b + 1), j("correct"), w = "correct") : je(c, r) === 1 ? (W((b) => b + 0.5), j("almost"), w = "almost") : (j("wrong"), w = "wrong"), I((b) => [
617
+ ...b,
618
+ { round: C, answer: c, correct: r, result: w }
619
+ ]), Y(!0), setTimeout(() => {
620
+ Y(!1), H(!0);
183
621
  }, 600);
184
- }, ts = () => {
185
- p < i ? (b((s) => s + 1), O()) : B(!0);
186
- }, os = () => {
187
- U(!1), B(!1), l(null);
188
- };
189
- return /* @__PURE__ */ a(rs, { children: [
190
- !$ && /* @__PURE__ */ e(() => /* @__PURE__ */ e("div", { className: t.gmLogoFixed, children: /* @__PURE__ */ e("img", { src: Ls, alt: "SPEAKID Logo" }) }), {}),
191
- !c && !u && /* @__PURE__ */ a("div", { className: t.gmCenterScreen, children: [
192
- /* @__PURE__ */ e("h1", { className: t.gmHeadline1, children: "WHAT'S MISSING?" }),
193
- /* @__PURE__ */ e("p", { className: t.gmBodyM, children: "Select a theme:" }),
194
- /* @__PURE__ */ a("div", { style: { display: "flex", gap: 16 }, children: [
195
- /* @__PURE__ */ e("button", { className: t.gmButton, onClick: () => l("animals"), children: "🐶 Animals" }),
196
- /* @__PURE__ */ e("button", { className: t.gmButton, onClick: () => l("food"), children: "🍎 Food" }),
197
- /* @__PURE__ */ e("button", { className: t.gmButton, onClick: () => l("toys"), children: "🧸 Toys" })
198
- ] }),
199
- /* @__PURE__ */ a("div", { style: { marginTop: 24 }, children: [
200
- /* @__PURE__ */ e("p", { className: t.gmBodyS, children: "Choose number of rounds:" }),
201
- /* @__PURE__ */ e("div", { style: { display: "flex", gap: 12, marginTop: 8 }, children: [3, 4, 5].map((s) => /* @__PURE__ */ e(
622
+ }, $ = () => C < i ? (U((r) => r + 1), d()) : F(!0), m = () => {
623
+ v(!1), F(!1), p(null);
624
+ }, k = () => /* @__PURE__ */ t.jsx("div", { style: o.gmLogoFixed, children: /* @__PURE__ */ t.jsx("img", { src: we, alt: "SPEAKID Logo", style: o.gmLogoImg }) });
625
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
626
+ !S && /* @__PURE__ */ t.jsx(k, {}),
627
+ !a && !x && /* @__PURE__ */ t.jsxs("div", { style: o.gmCenterScreen, children: [
628
+ /* @__PURE__ */ t.jsx("h1", { style: o.gmHeadline1, children: "WHAT'S MISSING?" }),
629
+ /* @__PURE__ */ t.jsx("p", { style: o.gmBodyM, children: "Select a theme:" }),
630
+ /* @__PURE__ */ t.jsx("div", { style: { display: "flex", gap: 16 }, children: ["animals", "food", "toys"].map((r) => /* @__PURE__ */ t.jsx("button", { style: o.gmButton, onClick: () => p(r), children: r === "animals" ? "🐶 Animals" : r === "food" ? "🍎 Food" : "🧸 Toys" }, r)) }),
631
+ /* @__PURE__ */ t.jsxs("div", { style: { marginTop: 24 }, children: [
632
+ /* @__PURE__ */ t.jsx("p", { style: o.gmBodyS, children: "Choose number of rounds:" }),
633
+ /* @__PURE__ */ t.jsx("div", { style: { display: "flex", gap: 12, marginTop: 8 }, children: [3, 4, 5].map((r) => /* @__PURE__ */ t.jsx(
202
634
  "button",
203
635
  {
204
- className: `${t.gmButton} ${i === s ? t.gmActive : ""}`,
205
- onClick: () => K(s),
206
- children: s
636
+ style: {
637
+ ...o.gmButton,
638
+ ...i === r ? o.gmButtonActive : {}
639
+ },
640
+ onClick: () => h(r),
641
+ children: r
207
642
  },
208
- s
643
+ r
209
644
  )) })
210
645
  ] })
211
646
  ] }),
212
- c && !u && /* @__PURE__ */ a("div", { className: t.gmCenterScreen, children: [
213
- /* @__PURE__ */ a("h1", { className: t.gmHeadline1, children: [
647
+ a && !x && /* @__PURE__ */ t.jsxs("div", { style: o.gmCenterScreen, children: [
648
+ /* @__PURE__ */ t.jsxs("h1", { style: o.gmHeadline1, children: [
214
649
  "Theme selected: ",
215
- c
650
+ a
651
+ ] }),
652
+ /* @__PURE__ */ t.jsxs("p", { style: o.gmBodyM, children: [
653
+ "Rounds: ",
654
+ i
216
655
  ] }),
217
- /* @__PURE__ */ e("button", { className: t.gmButton, onClick: M, children: "▶ Start game" })
656
+ /* @__PURE__ */ t.jsx("button", { style: o.gmButton, onClick: l, children: "▶ Start game" })
218
657
  ] }),
219
- C && /* @__PURE__ */ a("div", { className: t.gmCenterScreen, children: [
220
- /* @__PURE__ */ e("h1", { className: t.gmHeadline1, children: "Results" }),
221
- /* @__PURE__ */ a("h2", { className: t.gmHeadline3, children: [
658
+ A && /* @__PURE__ */ t.jsxs("div", { style: o.gmCenterScreen, children: [
659
+ /* @__PURE__ */ t.jsx("h1", { style: o.gmHeadline1, children: "Results" }),
660
+ /* @__PURE__ */ t.jsxs("h2", { style: o.gmHeadline3, children: [
222
661
  "Your score: ",
223
- N,
662
+ te,
224
663
  " / ",
225
664
  i
226
665
  ] }),
227
- /* @__PURE__ */ a("table", { className: t.gmTable, children: [
228
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
229
- /* @__PURE__ */ e("th", { children: "Round" }),
230
- /* @__PURE__ */ e("th", { children: "Your Answer" }),
231
- /* @__PURE__ */ e("th", { children: "Correct" }),
232
- /* @__PURE__ */ e("th", { children: "Result" })
666
+ /* @__PURE__ */ t.jsxs("table", { style: o.gmTable, children: [
667
+ /* @__PURE__ */ t.jsx("thead", { children: /* @__PURE__ */ t.jsxs("tr", { children: [
668
+ /* @__PURE__ */ t.jsx("th", { children: "Round" }),
669
+ /* @__PURE__ */ t.jsx("th", { children: "Your Answer" }),
670
+ /* @__PURE__ */ t.jsx("th", { children: "Correct" }),
671
+ /* @__PURE__ */ t.jsx("th", { children: "Result" })
233
672
  ] }) }),
234
- /* @__PURE__ */ e("tbody", { children: Z.map((s, o) => /* @__PURE__ */ a("tr", { children: [
235
- /* @__PURE__ */ e("td", { children: s.round }),
236
- /* @__PURE__ */ e("td", { children: s.answer || "—" }),
237
- /* @__PURE__ */ e("td", { children: s.correct }),
238
- /* @__PURE__ */ e("td", { className: t[`gm${s.result.charAt(0).toUpperCase() + s.result.slice(1)}`], children: s.result })
239
- ] }, o)) })
673
+ /* @__PURE__ */ t.jsx("tbody", { children: Z.map((r, c) => /* @__PURE__ */ t.jsxs("tr", { children: [
674
+ /* @__PURE__ */ t.jsx("td", { style: o.gmTableCell, children: r.round }),
675
+ /* @__PURE__ */ t.jsx("td", { style: o.gmTableCell, children: r.answer || "—" }),
676
+ /* @__PURE__ */ t.jsx("td", { style: o.gmTableCell, children: r.correct }),
677
+ /* @__PURE__ */ t.jsx("td", { style: o.gmTableCell, children: r.result === "correct" ? "✔ Correct" : r.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
678
+ ] }, c)) })
240
679
  ] }),
241
- /* @__PURE__ */ a("div", { style: { display: "flex", gap: 12, marginTop: 24 }, children: [
242
- /* @__PURE__ */ e("button", { className: t.gmButton, onClick: M, children: "🔁 Play again" }),
243
- /* @__PURE__ */ e("button", { className: t.gmButton, onClick: os, children: "⬅️ Choose theme" })
680
+ /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 12, marginTop: 24 }, children: [
681
+ /* @__PURE__ */ t.jsx("button", { style: o.gmButton, onClick: l, children: "🔁 Play again" }),
682
+ /* @__PURE__ */ t.jsx("button", { style: o.gmButton, onClick: m, children: "⬅️ Choose theme" })
244
683
  ] })
245
684
  ] }),
246
- u && !C && /* @__PURE__ */ a("div", { className: t.gmGameLayout, children: [
247
- /* @__PURE__ */ e("div", { className: t.gmProgressContainer, children: /* @__PURE__ */ e(
685
+ x && !A && /* @__PURE__ */ t.jsxs("div", { style: o.gmGameLayout, children: [
686
+ /* @__PURE__ */ t.jsxs(
248
687
  "div",
249
688
  {
250
- className: t.gmProgressBar,
251
- style: { width: `${p / i * 100}%` }
689
+ style: {
690
+ minHeight: 160,
691
+ display: "flex",
692
+ flexDirection: "column",
693
+ justifyContent: "center",
694
+ alignItems: "center"
695
+ },
696
+ children: [
697
+ g === "ready" && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
698
+ /* @__PURE__ */ t.jsx("h1", { style: { ...o.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
699
+ /* @__PURE__ */ t.jsx("div", { style: o.gmHourglass, children: "⏳" })
700
+ ] }),
701
+ g === "memorize" && /* @__PURE__ */ t.jsxs("p", { style: { ...o.gmBodyM, color: "#10b981" }, children: [
702
+ "MEMORIZE (",
703
+ E,
704
+ ")"
705
+ ] }),
706
+ g === "guess" && !R && /* @__PURE__ */ t.jsxs("p", { style: o.gmBodyM, children: [
707
+ "⏳ Time left: ",
708
+ L,
709
+ "s"
710
+ ] })
711
+ ]
252
712
  }
253
- ) }),
254
- /* @__PURE__ */ a("h2", { className: t.gmHeadline3, children: [
255
- "Round ",
256
- p,
257
- " of ",
258
- i,
259
- " Score: ",
260
- N
261
- ] }),
262
- /* @__PURE__ */ e("div", { className: t.gmGrid, children: g.map((s, o) => {
263
- const d = h === o && j === "guess" && !A;
264
- return /* @__PURE__ */ e(
265
- "div",
266
- {
267
- className: `${t.gmCard} ${J === "correct" && h === o ? t.gmCorrect : ""} ${J === "wrong" && h === o ? t.gmWrong : ""}`,
268
- children: !d && /* @__PURE__ */ e("img", { src: s, alt: `img-${o}` })
713
+ ),
714
+ g !== "ready" && /* @__PURE__ */ t.jsx(
715
+ "div",
716
+ {
717
+ style: {
718
+ ...o.gmGrid,
719
+ gridTemplateColumns: S ? "repeat(2, 1fr)" : "repeat(3, 210px)",
720
+ gridAutoRows: S ? "150px" : "210px",
721
+ gap: S ? "12px" : "20px",
722
+ justifyItems: "center",
723
+ // 🔹 увеличение только при >2000px
724
+ ...window.innerWidth > 2e3 ? {
725
+ gridTemplateColumns: "repeat(3, 260px)",
726
+ gridAutoRows: "260px",
727
+ gap: "28px"
728
+ } : {},
729
+ ...window.innerWidth > 2560 ? {
730
+ gridTemplateColumns: "repeat(3, 300px)",
731
+ gridAutoRows: "300px",
732
+ gap: "32px"
733
+ } : {}
269
734
  },
270
- o
271
- );
272
- }) }),
273
- /* @__PURE__ */ a("div", { style: { marginTop: 16, height: 80 }, children: [
274
- j === "guess" && !A && /* @__PURE__ */ a("div", { children: [
275
- /* @__PURE__ */ e(
735
+ children: u.map((r, c) => {
736
+ const w = y === c && g === "guess" && !R;
737
+ return /* @__PURE__ */ t.jsx(
738
+ "div",
739
+ {
740
+ style: {
741
+ ...o.gmCard,
742
+ ...X === "correct" && y === c ? o.gmCorrect : {},
743
+ ...X === "wrong" && y === c ? o.gmWrong : {}
744
+ },
745
+ children: !w && /* @__PURE__ */ t.jsx(
746
+ "img",
747
+ {
748
+ src: r.src,
749
+ alt: r.name,
750
+ style: {
751
+ width: "100%",
752
+ height: "100%",
753
+ objectFit: "cover"
754
+ }
755
+ }
756
+ )
757
+ },
758
+ c
759
+ );
760
+ })
761
+ }
762
+ ),
763
+ /* @__PURE__ */ t.jsxs("div", { style: { marginTop: 16, height: 80 }, children: [
764
+ g === "guess" && !R && /* @__PURE__ */ t.jsxs("div", { children: [
765
+ /* @__PURE__ */ t.jsx(
276
766
  "input",
277
767
  {
278
768
  type: "text",
279
769
  placeholder: "Type the missing word",
280
- value: f,
281
- onChange: (s) => P(s.target.value),
282
- className: t.gmInput
770
+ value: O,
771
+ onChange: (r) => P(r.target.value),
772
+ style: o.gmInput
283
773
  }
284
774
  ),
285
- /* @__PURE__ */ e(
775
+ /* @__PURE__ */ t.jsx(
286
776
  "button",
287
777
  {
288
- className: t.gmButton,
289
- onClick: es,
290
- disabled: R,
291
- style: { marginLeft: 8 },
292
- children: R ? "..." : "Check"
778
+ style: { ...o.gmButton, marginLeft: 8 },
779
+ onClick: z,
780
+ disabled: _,
781
+ children: _ ? "..." : "Check"
293
782
  }
294
783
  )
295
784
  ] }),
296
- A && /* @__PURE__ */ e("button", { className: t.gmButton, onClick: ts, children: "Next round" })
785
+ R && /* @__PURE__ */ t.jsx("button", { style: o.gmButton, onClick: $, children: "Next round" })
297
786
  ] })
298
787
  ] })
299
788
  ] });
300
789
  }
301
790
  export {
302
- Is as Game,
303
- V as themes
791
+ Re as Game,
792
+ ce as themes
304
793
  };