@mblinkov/whats-missing 20.0.54 → 20.0.56

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.
@@ -1,92 +1,18 @@
1
- import { jsx as d, jsxs as p, Fragment as Rn } from "react/jsx-runtime";
2
- import { useRef as G, useEffect as q, useState as h, useMemo as di } from "react";
3
- const oi = window.origin + "/cloud/speakid/games/whatsmissing/", gn = (o, g) => o.map(([a, s, ...b]) => ({
4
- src: `${oi}${g}/${s.replace(/\s/g, "%20")}.png`,
5
- name: s,
6
- aliases: b?.length ? b : void 0
7
- })), ri = [
8
- ["apple", "apple"],
9
- ["banana", "banana"],
10
- ["bread", "bread"],
11
- ["burger", "burger"],
12
- ["cake", "cake"],
13
- ["carrot", "carrot"],
14
- ["cheese", "cheese"],
15
- ["chicken", "chicken"],
16
- ["chocolate", "chocolate"],
17
- ["corn", "corn"],
18
- ["donut", "donut"],
19
- ["fish", "fish"],
20
- ["fries", "fries"],
21
- ["grapes", "grapes"],
22
- ["ice_cream", "ice cream"],
23
- ["milk", "milk"],
24
- ["orange", "orange"],
25
- ["pear", "pear"],
26
- ["pizza", "pizza"],
27
- ["rice", "rice"],
28
- ["sandwich", "sandwich"],
29
- ["soup", "soup"],
30
- ["strawberry", "strawberry"],
31
- ["tomato", "tomato"],
32
- ["watermelon", "watermelon"]
33
- ], hi = [
34
- ["bear", "bear"],
35
- ["cat", "cat"],
36
- ["crocodile", "crocodile", "alligator"],
37
- ["dolphin", "dolphin"],
38
- ["elephant", "elephant"],
39
- ["fox", "fox"],
40
- ["giraffe", "giraffe"],
41
- ["horse", "horse"],
42
- ["kangaroo", "kangaroo"],
43
- ["lion", "lion"],
44
- ["monkey", "monkey"],
45
- ["owl", "owl"],
46
- ["panda", "panda"],
47
- ["penguin", "penguin"],
48
- ["squirrel", "squirrel"],
49
- ["tiger", "tiger"],
50
- ["tortoise", "tortoise", "turtle"],
51
- ["wolf", "wolf"],
52
- ["zebra", "zebra"]
53
- ], si = [
54
- ["ball", "ball"],
55
- ["balloon", "balloon"],
56
- ["blocks", "blocks"],
57
- ["car", "car"],
58
- ["doll", "doll"],
59
- ["drum", "drum"],
60
- ["guitar", "guitar"],
61
- ["jump_rope", "jump rope"],
62
- ["kite", "kite"],
63
- ["paints", "paints"],
64
- ["plane", "plane"],
65
- ["puzzle", "puzzle"],
66
- ["rocket", "rocket"],
67
- ["scooter", "scooter"],
68
- ["skateboard", "skateboard"],
69
- ["slide", "slide"],
70
- ["teddy_bear", "teddy bear"],
71
- ["yo-yo", "yo-yo"],
72
- ["crayons", "crayons"]
73
- ], K = {
74
- food: gn(ri, "food"),
75
- animals: gn(hi, "animals"),
76
- toys: gn(si, "toys")
77
- }, gi = `
1
+ import { jsx as t, jsxs as l, Fragment as Mn } from "react/jsx-runtime";
2
+ import { useRef as F, useEffect as _, useState as r, useMemo as Rn } from "react";
3
+ const ri = `
78
4
  @keyframes spin {
79
5
  from { transform: rotate(0deg); }
80
6
  to { transform: rotate(360deg); }
81
7
  }
82
8
  `;
83
9
  if (typeof document < "u" && !document.getElementById("spin-keyframes")) {
84
- const o = document.createElement("style");
85
- o.id = "spin-keyframes", o.innerHTML = gi, document.head.appendChild(o);
10
+ const w = document.createElement("style");
11
+ w.id = "spin-keyframes", w.innerHTML = ri, document.head.appendChild(w);
86
12
  }
87
- const ai = {
13
+ const hi = {
88
14
  animation: "spin 1.4s linear infinite"
89
- }, w = {
15
+ }, e = {
90
16
  gmCenterScreen: {
91
17
  position: "relative",
92
18
  zIndex: 1,
@@ -198,8 +124,8 @@ const ai = {
198
124
  // ✅ Обновлено только для качества логотипа
199
125
  gmLogoFixed: {
200
126
  position: "absolute",
201
- top: "16px",
202
- left: "24px",
127
+ top: "28px",
128
+ left: "16px",
203
129
  width: "120px",
204
130
  zIndex: 10,
205
131
  pointerEvents: "none",
@@ -219,11 +145,188 @@ const ai = {
219
145
  },
220
146
  gmHourglass: {
221
147
  fontSize: "42px",
222
- ...ai
148
+ ...hi
223
149
  }
224
- }, pi = () => {
225
- const o = document.createElement("style");
226
- o.id = "whats-missing-reset", o.textContent = `
150
+ }, si = window.origin + "/cloud/speakid/games/whatsmissing/", C = (w, a) => w.map(([g, s, ...p]) => ({
151
+ src: `${si}${a}/${s.replace(/\s/g, "%20")}.png`,
152
+ name: s,
153
+ aliases: p?.length ? p : void 0
154
+ })), ai = [
155
+ ["apple", "apple"],
156
+ ["banana", "banana"],
157
+ ["bread", "bread"],
158
+ ["burger", "burger"],
159
+ ["cake", "cake"],
160
+ ["carrot", "carrot"],
161
+ ["cheese", "cheese"],
162
+ ["chicken", "chicken"],
163
+ ["chocolate", "chocolate"],
164
+ ["corn", "corn"],
165
+ ["donut", "donut"],
166
+ ["fish", "fish"],
167
+ ["fries", "fries"],
168
+ ["grapes", "grapes"],
169
+ ["ice_cream", "ice cream"],
170
+ ["milk", "milk"],
171
+ ["orange", "orange"],
172
+ ["pear", "pear"],
173
+ ["pizza", "pizza"],
174
+ ["rice", "rice"],
175
+ ["sandwich", "sandwich"],
176
+ ["soup", "soup"],
177
+ ["strawberry", "strawberry"],
178
+ ["tomato", "tomato"],
179
+ ["watermelon", "watermelon"]
180
+ ], gi = [
181
+ ["bear", "bear"],
182
+ ["cat", "cat"],
183
+ ["crocodile", "crocodile", "alligator"],
184
+ ["dolphin", "dolphin"],
185
+ ["elephant", "elephant"],
186
+ ["fox", "fox"],
187
+ ["giraffe", "giraffe"],
188
+ ["horse", "horse"],
189
+ ["kangaroo", "kangaroo"],
190
+ ["lion", "lion"],
191
+ ["monkey", "monkey"],
192
+ ["owl", "owl"],
193
+ ["panda", "panda"],
194
+ ["penguin", "penguin"],
195
+ ["squirrel", "squirrel"],
196
+ ["tiger", "tiger"],
197
+ ["tortoise", "tortoise", "turtle"],
198
+ ["wolf", "wolf"],
199
+ ["zebra", "zebra"]
200
+ ], pi = [
201
+ ["ball", "ball"],
202
+ ["balloon", "balloon"],
203
+ ["blocks", "blocks"],
204
+ ["car", "car"],
205
+ ["doll", "doll"],
206
+ ["drum", "drum"],
207
+ ["guitar", "guitar"],
208
+ ["jump_rope", "jump rope"],
209
+ ["kite", "kite"],
210
+ ["paints", "paints"],
211
+ ["plane", "plane"],
212
+ ["puzzle", "puzzle"],
213
+ ["rocket", "rocket"],
214
+ ["scooter", "scooter"],
215
+ ["skateboard", "skateboard"],
216
+ ["slide", "slide"],
217
+ ["teddy_bear", "teddy bear"],
218
+ ["yo-yo", "yo-yo"],
219
+ ["crayons", "crayons"]
220
+ ], li = [
221
+ ["t-shirt", "T-shirt"],
222
+ ["dress", "dress"],
223
+ ["hat", "hat"],
224
+ ["shoes", "shoes"],
225
+ ["socks", "socks"],
226
+ ["coat", "coat"],
227
+ ["skirt", "skirt"],
228
+ ["trousers", "trousers"],
229
+ ["jacket", "jacket"],
230
+ ["scarf", "scarf"],
231
+ ["gloves", "gloves"],
232
+ ["shorts", "shorts"],
233
+ ["cap", "cap"],
234
+ ["boots", "boots"],
235
+ ["pyjamas", "pyjamas"]
236
+ ], ci = [
237
+ ["car", "car"],
238
+ ["bus", "bus"],
239
+ ["bike", "bike"],
240
+ ["train", "train"],
241
+ ["plane", "plane"],
242
+ ["boat", "boat"],
243
+ ["ship", "ship"],
244
+ ["helicopter", "helicopter"],
245
+ ["lorry", "lorry", "truck"],
246
+ ["taxi", "taxi"],
247
+ ["rocket", "rocket"],
248
+ ["van", "van"],
249
+ ["motorbike", "motorbike"],
250
+ ["tram", "tram"],
251
+ ["submarine", "submarine"]
252
+ ], xi = [
253
+ ["sun", "sun"],
254
+ ["cloud", "cloud"],
255
+ ["rain", "rain"],
256
+ ["tree", "tree"],
257
+ ["flower", "flower"],
258
+ ["grass", "grass"],
259
+ ["star", "star"],
260
+ ["moon", "moon"],
261
+ ["mountain", "mountain"],
262
+ ["river", "river"],
263
+ ["rainbow", "rainbow"],
264
+ ["snowman", "snowman"],
265
+ ["snow", "snow"],
266
+ ["butterfly", "butterfly"],
267
+ ["bird", "bird"]
268
+ ], Hi = [
269
+ ["bed", "bed"],
270
+ ["table", "table"],
271
+ ["chair", "chair"],
272
+ ["door", "door"],
273
+ ["window", "window"],
274
+ ["lamp", "lamp"],
275
+ ["sofa", "sofa"],
276
+ ["clock", "clock"],
277
+ ["key", "key"],
278
+ ["phone", "phone"],
279
+ ["tv", "TV"],
280
+ ["cup", "cup"],
281
+ ["plate", "plate"],
282
+ ["mirror", "mirror"],
283
+ ["book", "book"]
284
+ ], Wi = [
285
+ ["book", "book"],
286
+ ["pen", "pen"],
287
+ ["pencil", "pencil"],
288
+ ["bag", "bag"],
289
+ ["ruler", "ruler"],
290
+ ["rubber", "rubber", "eraser"],
291
+ ["desk", "desk"],
292
+ ["board", "board"],
293
+ ["crayon", "crayon"],
294
+ ["glue", "glue"],
295
+ ["scissors", "scissors"],
296
+ ["notebook", "notebook"],
297
+ ["pencil_case", "pencil case"],
298
+ ["paintbrush", "paintbrush"],
299
+ ["backpack", "backpack"]
300
+ ], Q = {
301
+ food: C(ai, "food"),
302
+ animals: C(gi, "animals"),
303
+ toys: C(pi, "toys"),
304
+ clothes: C(li, "clothes"),
305
+ transport: C(ci, "transport"),
306
+ nature: C(xi, "nature"),
307
+ home: C(Hi, "home"),
308
+ school: C(Wi, "school")
309
+ }, mi = [
310
+ "animals",
311
+ "food",
312
+ "toys",
313
+ "clothes",
314
+ "transport",
315
+ "nature",
316
+ "home",
317
+ "school"
318
+ ], ui = {
319
+ animals: "🐶 Animals",
320
+ food: "🍎 Food",
321
+ toys: "🧸 Toys",
322
+ clothes: "👕 Clothes",
323
+ transport: "🚗 Transport",
324
+ nature: "🌳 Nature",
325
+ home: "🏠 Home",
326
+ school: "📚 School"
327
+ }, fi = () => {
328
+ const w = document.createElement("style");
329
+ w.id = "whats-missing-reset", w.textContent = `
227
330
  #whats-missing-root, #whats-missing-root * {
228
331
  box-sizing: border-box;
229
332
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
@@ -250,12 +353,12 @@ const ai = {
250
353
  overflow: hidden !important;
251
354
  }
252
355
  `;
253
- const g = document.getElementById("whats-missing-reset");
254
- g && g.remove(), document.head.appendChild(o);
356
+ const a = document.getElementById("whats-missing-reset");
357
+ a && a.remove(), document.head.appendChild(w);
255
358
  };
256
- class li {
257
- constructor(g) {
258
- this.seed = g;
359
+ class yi {
360
+ constructor(a) {
361
+ this.seed = a;
259
362
  }
260
363
  // Linear Congruential Generator (LCG)
261
364
  // Используем параметры из Numerical Recipes
@@ -263,172 +366,177 @@ class li {
263
366
  return this.seed = (this.seed * 1664525 + 1013904223) % Math.pow(2, 32), this.seed / Math.pow(2, 32);
264
367
  }
265
368
  // Генерирует случайное число от 0 до max (не включая max)
266
- nextInt(g) {
267
- return Math.floor(this.next() * g);
369
+ nextInt(a) {
370
+ return Math.floor(this.next() * a);
268
371
  }
269
372
  }
270
- const ci = (o, g) => {
271
- const a = Array.from({ length: o.length + 1 }, () => Array(g.length + 1).fill(0));
272
- for (let s = 0; s <= o.length; s++) a[s][0] = s;
273
- for (let s = 0; s <= g.length; s++) a[0][s] = s;
274
- for (let s = 1; s <= o.length; s++)
275
- for (let b = 1; b <= g.length; b++)
276
- a[s][b] = o[s - 1] === g[b - 1] ? a[s - 1][b - 1] : Math.min(a[s - 1][b - 1], a[s][b - 1], a[s - 1][b]) + 1;
277
- return a[o.length][g.length];
278
- }, xi = (o) => new Promise((g) => {
279
- const a = new Image();
280
- a.onload = () => g(a), a.onerror = () => g(a), a.src = o;
281
- }), an = async (o, g) => {
282
- const a = /* @__PURE__ */ new Map(), s = o.map(async (b) => {
283
- const v = await xi(b);
284
- a.set(b, v);
373
+ const bi = (w, a) => {
374
+ const g = Array.from({ length: w.length + 1 }, () => Array(a.length + 1).fill(0));
375
+ for (let s = 0; s <= w.length; s++) g[s][0] = s;
376
+ for (let s = 0; s <= a.length; s++) g[0][s] = s;
377
+ for (let s = 1; s <= w.length; s++)
378
+ for (let p = 1; p <= a.length; p++)
379
+ g[s][p] = w[s - 1] === a[p - 1] ? g[s - 1][p - 1] : Math.min(g[s - 1][p - 1], g[s][p - 1], g[s - 1][p]) + 1;
380
+ return g[w.length][a.length];
381
+ }, ki = (w) => new Promise((a) => {
382
+ const g = new Image();
383
+ g.onload = () => a(g), g.onerror = () => a(g), g.src = w;
384
+ }), cn = async (w, a) => {
385
+ const g = /* @__PURE__ */ new Map(), s = w.map(async (p) => {
386
+ const S = await ki(p);
387
+ g.set(p, S);
285
388
  });
286
- return await Promise.allSettled(s), a;
389
+ return await Promise.allSettled(s), g;
287
390
  };
288
- function mi({
289
- gameCubeSize: o,
290
- screenHeight: g,
291
- screenWidth: a,
391
+ function vi({
392
+ gameCubeSize: w,
393
+ screenHeight: a,
394
+ screenWidth: g,
292
395
  seed: s
293
396
  }) {
294
- const b = G(null);
295
- q(() => (pi(), () => {
397
+ const p = F(null);
398
+ _(() => (fi(), () => {
296
399
  document.documentElement.style.overflow = "", document.body.style.overflow = "";
297
400
  const i = document.getElementById("whats-missing-reset");
298
- i && i.remove(), k.current && k.current.abort();
401
+ i && i.remove(), P.current && P.current.abort();
299
402
  }), []);
300
- const [v, pn] = h(null), [L, ln] = h([]), [F, Mn] = h(4), [j, cn] = h(!1), [U, xn] = h(1), [z, Ln] = h(null), [P, Y] = h("ready"), [Hn, Wn] = h(10), [O, J] = h(10), [Q, mn] = h(20), [Bn, X] = h(0), [$, nn] = h(!1), [N, un] = h(""), [C, en] = h(!1), [tn, fn] = h(!1), [yn, E] = h(null), [Cn, wn] = h([]), [An, bn] = h([]), [n, jn] = h(!1), [En, V] = h(1), [In, Z] = h(null), [S, Dn] = h(!1), [l, Gn] = h(!1), [c, Fn] = h(!1), [x, Un] = h(!1), [H, Yn] = h(!1), [W, $n] = h(!1), [m, Nn] = h(!1), [u, Vn] = h(!1), [f, Zn] = h(!1), [dn, _n] = h(!1), [T, qn] = h(!1), on = G(/* @__PURE__ */ new Set()), _ = G(/* @__PURE__ */ new Map()), k = G(null), A = G(null);
301
- q(() => {
302
- s !== void 0 ? A.current = new li(s) : A.current = null;
403
+ const [S, U] = r(null), [k, D] = r([]), [G, Ln] = r(4), [xn, en] = r(1), [B, Hn] = r(!1), [Y, Wn] = r(1), [z, Cn] = r(null), [T, O] = r("ready"), [mn, un] = r(10), [tn, on] = r(10), [wn, fn] = r(20), [Bn, dn] = r(0), [V, rn] = r(!1), [N, yn] = r(""), [A, hn] = r(!1), [sn, bn] = r(!1), [kn, $] = r(null), [An, an] = r([]), [En, vn] = r([]), [n, jn] = r(!1), [Dn, Z] = r(1), [Sn, q] = r(null), [I, Gn] = r(!1), [c, $n] = r(!1), [x, Fn] = r(!1), [H, _n] = r(!1), [W, Un] = r(!1), [m, Yn] = r(!1), [u, On] = r(!1), [f, Vn] = r(!1), [y, Nn] = r(!1), [M, Zn] = r(!1), gn = F(/* @__PURE__ */ new Set()), K = F(/* @__PURE__ */ new Map()), P = F(null), E = F(null);
404
+ _(() => {
405
+ s !== void 0 ? E.current = new yi(s) : E.current = null;
303
406
  }, [s]);
304
- const Kn = () => A.current ? A.current.next() : Math.random(), Sn = (i) => A.current ? A.current.nextInt(i) : Math.floor(Math.random() * i);
305
- q(() => {
407
+ const qn = () => E.current ? E.current.next() : Math.random(), In = (i) => E.current ? E.current.nextInt(i) : Math.floor(Math.random() * i);
408
+ _(() => {
306
409
  const i = () => {
307
- const e = a ?? window.innerWidth, t = g ?? window.innerHeight, r = e < 768 || e === 926 && t === 428 || e === 932 && t === 430, y = t < 700, R = e / t > 1.8, I = e === 768 && t === 1024, hn = e === 1024 && t === 768, D = e === 820 && t === 1180, M = e === 1180 && t === 820, B = e === 540 && t === 720, kn = e === 720 && t === 540, zn = e === 1024 && t === 1366, Tn = e === 1366 && t === 1024, ii = e >= 1200 && t >= 600 && !r;
308
- Dn(ii), Gn(I), Fn(hn), Un(D), Yn(M), $n(B), Nn(kn), Vn(zn), Zn(Tn), qn(R);
309
- const ei = r && e > t || r || // ✅ ВСЕ мобильные устройства (включая portrait)
310
- t < 700 || R || // ✅ Широкие экраны
311
- e === 1366 && t === 766 || e === 1366 && t === 768 || e === 1280 && t === 720 || e === 1440 && t === 900 || I || hn || D || M || B || kn || zn || Tn || S;
312
- if (_n(ei), jn(r), r)
313
- Z(o && o >= 320 ? o : null), V(1);
314
- else if (y)
315
- Z(o && o >= 400 ? o : null), V(1);
410
+ const o = g ?? window.innerWidth, d = a ?? window.innerHeight, h = o < 768 || o === 926 && d === 428 || o === 932 && d === 430, b = d < 700, R = o / d > 1.8, v = o === 768 && d === 1024, zn = o === 1024 && d === 768, J = o === 820 && d === 1180, L = o === 1180 && d === 820, j = o === 540 && d === 720, ii = o === 720 && d === 540, ei = o === 1024 && d === 1366, ti = o === 1366 && d === 1024, oi = o >= 1200 && d >= 600 && !h;
411
+ if (Gn(oi), $n(v), Fn(zn), _n(J), Un(L), Yn(j), On(ii), Vn(ei), Nn(ti), Zn(R), jn(h), h)
412
+ q(w && w >= 320 ? w : null), Z(1);
413
+ else if (b)
414
+ q(w && w >= 400 ? w : null), Z(1);
316
415
  else if (R) {
317
- const sn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
318
- Z(sn), V(0.85);
416
+ const ln = w ? Math.max(400, Math.min(1200, w)) : Math.min(1e3, Math.min(o, d) * 0.9);
417
+ q(ln), Z(0.85);
319
418
  } else {
320
- const sn = o ? Math.max(400, Math.min(1200, o)) : Math.min(1e3, Math.min(e, t) * 0.9);
321
- Z(sn), V(1);
419
+ const ln = w ? Math.max(400, Math.min(1200, w)) : Math.min(1e3, Math.min(o, d) * 0.9);
420
+ q(ln), Z(1);
322
421
  }
323
422
  };
324
423
  return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
325
- }, [a, g, o]);
326
- const rn = (i) => [...i].sort(() => Kn() - 0.5).slice(0, 6), On = (i) => {
327
- k.current && k.current.abort(), k.current = new AbortController();
328
- const t = K[i].map((r) => r.src);
329
- an(t, k.current.signal).then((r) => {
330
- t.forEach((y) => {
331
- on.current.add(y), r.has(y) && _.current.set(y, r.get(y));
424
+ }, [g, a, w]);
425
+ const pn = (i) => [...i].sort(() => qn() - 0.5).slice(0, 6), Kn = (i) => {
426
+ P.current && P.current.abort(), P.current = new AbortController();
427
+ const d = Q[i].map((h) => h.src);
428
+ cn(d, P.current.signal).then((h) => {
429
+ d.forEach((b) => {
430
+ gn.current.add(b), h.has(b) && K.current.set(b, h.get(b));
332
431
  });
333
432
  }).catch(() => {
334
433
  });
335
- }, vn = () => {
336
- if (!v) return;
337
- const i = rn(K[v]);
338
- ln(i), cn(!0), nn(!1), xn(1), X(0), wn([]), bn([]);
339
- const e = i.map((t) => t.src);
340
- an(e, k.current?.signal).then((t) => {
341
- e.forEach((r) => {
342
- on.current.add(r), t.has(r) && _.current.set(r, t.get(r));
434
+ }, Tn = () => {
435
+ if (!S) return;
436
+ const i = pn(Q[S]);
437
+ D(i), Hn(!0), rn(!1), Wn(1), dn(0), an([]), vn([]);
438
+ const o = i.map((d) => d.src);
439
+ cn(o, P.current?.signal).then((d) => {
440
+ o.forEach((h) => {
441
+ gn.current.add(h), d.has(h) && K.current.set(h, d.get(h));
343
442
  });
344
443
  }).catch(() => {
345
444
  }), Pn(i, [], !0);
346
- }, Pn = (i = L, e = An, t = !1) => {
347
- const r = rn(i.length ? i : K[v]);
348
- let y = Sn(r.length), R = r[y].name, I = 0;
349
- for (; e.includes(R) && I < 20; )
350
- y = Sn(r.length), R = r[y].name, I++;
351
- if (ln(r), Ln(y), bn([...e, R]), en(!1), un(""), mn(20), E(null), v && !t) {
352
- const D = rn(K[v].filter((M) => !e.includes(M.name))).map((M) => M.src);
353
- an(D, k.current?.signal).then((M) => {
354
- D.forEach((B) => {
355
- on.current.add(B), M.has(B) && _.current.set(B, M.get(B));
445
+ }, Pn = (i = k, o = En, d = !1) => {
446
+ const h = pn(i.length ? i : Q[S]);
447
+ let b = In(h.length), R = h[b].name, v = 0;
448
+ for (; o.includes(R) && v < 20; )
449
+ b = In(h.length), R = h[b].name, v++;
450
+ if (D(h), Cn(b), vn([...o, R]), hn(!1), yn(""), fn(20), $(null), S && !d) {
451
+ const J = pn(Q[S].filter((L) => !o.includes(L.name))).map((L) => L.src);
452
+ cn(J, P.current?.signal).then((L) => {
453
+ J.forEach((j) => {
454
+ gn.current.add(j), L.has(j) && K.current.set(j, L.get(j));
356
455
  });
357
456
  }).catch(() => {
358
457
  });
359
458
  }
360
- t ? (Y("ready"), Wn(10), J(10)) : (Y("memorize"), J(10));
459
+ d ? (O("ready"), un(10), on(10)) : (O("memorize"), on(10));
361
460
  };
362
- q(() => {
363
- if (!(!j || $ || C)) {
364
- if (P === "ready")
365
- if (Hn <= 0) Y("memorize");
461
+ _(() => {
462
+ if (!(!B || V || A)) {
463
+ if (T === "ready")
464
+ if (mn <= 0) O("memorize");
366
465
  else {
367
- const i = setTimeout(() => Wn((e) => e - 1), 1e3);
466
+ const i = setTimeout(() => un((o) => o - 1), 1e3);
368
467
  return () => clearTimeout(i);
369
468
  }
370
- if (P === "memorize")
371
- if (O <= 0) Y("guess");
469
+ if (T === "memorize")
470
+ if (tn <= 0) O("guess");
372
471
  else {
373
- const i = setTimeout(() => J((e) => e - 1), 1e3);
472
+ const i = setTimeout(() => on((o) => o - 1), 1e3);
374
473
  return () => clearTimeout(i);
375
474
  }
376
- if (P === "guess") {
377
- if (Q <= 0) {
378
- en(!0), E("wrong");
379
- const e = L[z].name, t = L[z].aliases, r = [e, ...t || []].join(", ");
380
- wn((y) => [
381
- ...y,
382
- { round: U, answer: N, correct: r, result: "wrong" }
475
+ if (T === "guess") {
476
+ if (wn <= 0) {
477
+ hn(!0), $("wrong");
478
+ const o = k[z].name, d = k[z].aliases, h = [o, ...d || []].join(", ");
479
+ an((b) => [
480
+ ...b,
481
+ { round: Y, answer: N, correct: h, result: "wrong" }
383
482
  ]);
384
483
  return;
385
484
  }
386
- const i = setTimeout(() => mn((e) => e - 1), 1e3);
485
+ const i = setTimeout(() => fn((o) => o - 1), 1e3);
387
486
  return () => clearTimeout(i);
388
487
  }
389
488
  }
390
- }, [P, Hn, O, Q, j, $, C, L, z, U, N]);
489
+ }, [
490
+ T,
491
+ mn,
492
+ tn,
493
+ wn,
494
+ B,
495
+ V,
496
+ A,
497
+ k,
498
+ z,
499
+ Y,
500
+ N
501
+ ]);
391
502
  const Jn = () => {
392
- if (z === null || tn) return;
393
- const i = L[z].name, e = L[z].aliases, t = N.toLowerCase().trim();
394
- let r = "wrong";
395
- const y = [i, ...e || []].map((I) => I.toLowerCase()), R = [i, ...e || []].join(", ");
396
- y.includes(t) ? (X((I) => I + 1), E("correct"), r = "correct") : y.some((I) => ci(t, I) === 1) ? (X((I) => I + 0.5), E("almost"), r = "almost") : (E("wrong"), r = "wrong"), wn((I) => [...I, { round: U, answer: t, correct: R, result: r }]), fn(!0), setTimeout(() => {
397
- fn(!1), en(!0);
503
+ if (z === null || sn) return;
504
+ const i = k[z].name, o = k[z].aliases, d = N.toLowerCase().trim();
505
+ let h = "wrong";
506
+ const b = [i, ...o || []].map((v) => v.toLowerCase()), R = [i, ...o || []].join(", ");
507
+ b.includes(d) ? (dn((v) => v + 1), $("correct"), h = "correct") : b.some((v) => bi(d, v) === 1) ? (dn((v) => v + 0.5), $("almost"), h = "almost") : ($("wrong"), h = "wrong"), an((v) => [
508
+ ...v,
509
+ { round: Y, answer: d, correct: R, result: h }
510
+ ]), bn(!0), setTimeout(() => {
511
+ bn(!1), hn(!0);
398
512
  }, 600);
399
- }, Qn = () => U < F ? (xn((i) => i + 1), Pn()) : nn(!0), Xn = () => {
400
- k.current && k.current.abort(), cn(!1), nn(!1), pn(null);
401
- }, ni = di(
402
- () => {
403
- const i = a ?? window.innerWidth, e = g ?? window.innerHeight, t = !n && i >= 1200 && i <= 1400;
404
- return n && i > e || e < 700 && !t ? null : (
405
- // ensure logo is positioned inside the square container
406
- /* @__PURE__ */ d("div", { style: { ...w.gmLogoFixed, position: "absolute", top: 16, left: 16, zIndex: 30 }, children: /* @__PURE__ */ p("picture", { children: [
407
- /* @__PURE__ */ d(
408
- "source",
409
- {
410
- srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
411
- type: "image/svg+xml"
412
- }
413
- ),
414
- /* @__PURE__ */ d(
415
- "img",
416
- {
417
- src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
418
- alt: "SPEAKID Logo",
419
- style: w.gmLogoImg,
420
- loading: "lazy"
421
- }
422
- )
423
- ] }) })
424
- );
425
- },
426
- [n, a, g]
427
- );
428
- return /* @__PURE__ */ d(
513
+ }, Qn = () => Y < G ? (Wn((i) => i + 1), Pn()) : rn(!0), Xn = () => {
514
+ P.current && P.current.abort(), Hn(!1), rn(!1), U(null), en(2);
515
+ }, ni = Rn(() => (
516
+ // ensure logo is positioned inside the square container
517
+ /* @__PURE__ */ t("div", { style: { ...e.gmLogoFixed, position: "absolute", top: 28, left: 16, zIndex: 30 }, children: /* @__PURE__ */ l("picture", { children: [
518
+ /* @__PURE__ */ t(
519
+ "source",
520
+ {
521
+ srcSet: window.origin + "/cloud/speakid/games/whatsmissing/logo.svg",
522
+ type: "image/svg+xml"
523
+ }
524
+ ),
525
+ /* @__PURE__ */ t(
526
+ "img",
527
+ {
528
+ src: window.origin + "/cloud/speakid/games/whatsmissing/logo.png",
529
+ alt: "SPEAKID Logo",
530
+ style: e.gmLogoImg,
531
+ loading: "lazy"
532
+ }
533
+ )
534
+ ] }) })
535
+ ), []);
536
+ return /* @__PURE__ */ l(
429
537
  "div",
430
538
  {
431
- ref: b,
539
+ ref: p,
432
540
  style: {
433
541
  width: "100%",
434
542
  height: "100%",
@@ -444,290 +552,507 @@ function mi({
444
552
  right: 0,
445
553
  bottom: 0
446
554
  },
447
- children: /* @__PURE__ */ d(
448
- "div",
449
- {
450
- style: {
451
- width: n ? "100%" : In || o || 1e3,
452
- height: n ? "100%" : In || o || 1e3,
453
- display: "flex",
454
- justifyContent: "center",
455
- alignItems: "center",
456
- overflow: "hidden",
457
- borderRadius: n ? 0 : "20px",
458
- background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
459
- boxShadow: n ? "none" : "0 0 40px rgba(0,0,0,0.1)",
460
- margin: n ? "0 auto" : "unset",
461
- position: "relative",
462
- // needed so absolute logo is inside the square
463
- transform: `scale(${En})`
464
- // Применяем масштаб для широких экранов
465
- },
466
- children: /* @__PURE__ */ d(
467
- "div",
468
- {
469
- style: {
470
- transform: "translateZ(0)",
471
- width: "100%",
472
- height: "100%",
473
- display: "flex",
474
- justifyContent: "center",
475
- alignItems: "center"
476
- },
477
- children: /* @__PURE__ */ p("div", { id: "whats-missing-root", children: [
478
- !n && ni,
479
- !v && !j && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
480
- /* @__PURE__ */ d("h1", { style: w.gmHeadline1, children: "WHAT'S MISSING?" }),
481
- /* @__PURE__ */ d("p", { style: w.gmBodyM, children: "Select a theme:" }),
482
- /* @__PURE__ */ d("div", { style: { display: "flex", gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px" : "16px" }, children: ["animals", "food", "toys"].map((i) => /* @__PURE__ */ d("button", { style: {
483
- ...w.gmButton,
484
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 12px" : "12px 24px",
485
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
486
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "70px" : "auto"
487
- }, onClick: () => {
488
- pn(i), On(i);
489
- }, children: i === "animals" ? "🐶 Animals" : i === "food" ? "🍎 Food" : "🧸 Toys" }, i)) }),
490
- /* @__PURE__ */ p("div", { style: { marginTop: 24 }, children: [
491
- /* @__PURE__ */ d("p", { style: w.gmBodyS, children: "Choose number of rounds:" }),
492
- /* @__PURE__ */ d("div", { style: { display: "flex", gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px", marginTop: 8 }, children: [3, 4, 5].map((i) => /* @__PURE__ */ d(
555
+ children: [
556
+ ni,
557
+ /* @__PURE__ */ t(
558
+ "div",
559
+ {
560
+ style: {
561
+ width: n ? "100%" : Sn || w || 1e3,
562
+ height: n ? "100%" : Sn || w || 1e3,
563
+ display: "flex",
564
+ justifyContent: "center",
565
+ alignItems: "center",
566
+ overflow: "hidden",
567
+ borderRadius: 0,
568
+ background: "transparent",
569
+ boxShadow: "none",
570
+ margin: "0 auto",
571
+ position: "relative",
572
+ // needed so absolute logo is inside the square
573
+ transform: `scale(${Dn})`
574
+ // Применяем масштаб для широких экранов
575
+ },
576
+ children: /* @__PURE__ */ t(
577
+ "div",
578
+ {
579
+ style: {
580
+ transform: "translateZ(0)",
581
+ width: "100%",
582
+ height: "100%",
583
+ display: "flex",
584
+ justifyContent: "center",
585
+ alignItems: "center"
586
+ },
587
+ children: /* @__PURE__ */ l("div", { id: "whats-missing-root", style: { position: "relative", width: "100%", height: "100%" }, children: [
588
+ !S && !B && xn === 1 && /* @__PURE__ */ l("div", { style: { ...e.gmCenterScreen, transform: "none" }, children: [
589
+ /* @__PURE__ */ t("h1", { style: e.gmHeadline1, children: "WHAT'S MISSING?" }),
590
+ /* @__PURE__ */ l("div", { style: { marginTop: 24 }, children: [
591
+ /* @__PURE__ */ t("p", { style: e.gmBodyS, children: "Choose number of rounds:" }),
592
+ /* @__PURE__ */ t(
593
+ "div",
594
+ {
595
+ style: {
596
+ display: "flex",
597
+ gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
598
+ marginTop: 8
599
+ },
600
+ children: [3, 4, 5].map((i) => /* @__PURE__ */ t(
601
+ "button",
602
+ {
603
+ style: {
604
+ ...e.gmButton,
605
+ ...G === i ? e.gmButtonActive : {},
606
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 12px" : "14px 28px",
607
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "13px" : "18px",
608
+ minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "48px" : "64px"
609
+ },
610
+ onClick: () => Ln(i),
611
+ children: i
612
+ },
613
+ i
614
+ ))
615
+ }
616
+ )
617
+ ] }),
618
+ /* @__PURE__ */ t(
493
619
  "button",
494
620
  {
495
621
  style: {
496
- ...w.gmButton,
497
- ...F === i ? w.gmButtonActive : {},
498
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
499
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
500
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "40px" : "auto"
622
+ ...e.gmButton,
623
+ marginTop: 24,
624
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "10px 20px" : "14px 30px",
625
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "15px" : "18px",
626
+ minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "132px" : "160px"
501
627
  },
502
- onClick: () => Mn(i),
503
- children: i
504
- },
505
- i
506
- )) })
507
- ] })
508
- ] }),
509
- v && !j && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
510
- /* @__PURE__ */ p("h1", { style: w.gmHeadline1, children: [
511
- "Theme selected: ",
512
- v
628
+ onClick: () => en(2),
629
+ children: "Play"
630
+ }
631
+ )
513
632
  ] }),
514
- /* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
515
- "Rounds: ",
516
- F
633
+ !S && !B && xn === 2 && /* @__PURE__ */ l("div", { style: e.gmCenterScreen, children: [
634
+ /* @__PURE__ */ t("p", { style: e.gmBodyM, children: "Select a theme:" }),
635
+ /* @__PURE__ */ l("p", { style: e.gmBodyS, children: [
636
+ "Rounds: ",
637
+ G
638
+ ] }),
639
+ /* @__PURE__ */ t(
640
+ "div",
641
+ {
642
+ style: {
643
+ display: "grid",
644
+ gridTemplateColumns: n ? "repeat(2, 1fr)" : "repeat(4, 1fr)",
645
+ gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px" : "12px",
646
+ maxWidth: n ? 280 : 420,
647
+ margin: "0 auto"
648
+ },
649
+ children: mi.map((i) => /* @__PURE__ */ t(
650
+ "button",
651
+ {
652
+ style: {
653
+ ...e.gmButton,
654
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 12px" : "10px 16px",
655
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "14px"
656
+ },
657
+ onClick: () => {
658
+ U(i), Kn(i);
659
+ },
660
+ children: ui[i]
661
+ },
662
+ i
663
+ ))
664
+ }
665
+ ),
666
+ /* @__PURE__ */ t(
667
+ "button",
668
+ {
669
+ style: {
670
+ ...e.gmButton,
671
+ marginTop: 24,
672
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 16px" : "12px 24px",
673
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px",
674
+ minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "120px" : "auto"
675
+ },
676
+ onClick: () => en(1),
677
+ children: "Back"
678
+ }
679
+ )
517
680
  ] }),
518
- /* @__PURE__ */ d("button", { style: {
519
- ...w.gmButton,
520
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 16px" : "12px 24px",
521
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px",
522
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "120px" : "auto"
523
- }, onClick: vn, children: "▶ Start game" })
524
- ] }),
525
- $ && /* @__PURE__ */ p("div", { style: w.gmCenterScreen, children: [
526
- /* @__PURE__ */ d("h1", { style: {
527
- ...w.gmHeadline1,
528
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : w.gmHeadline1.marginTop,
529
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "2px" : w.gmHeadline1.marginBottom
530
- }, children: "Results" }),
531
- /* @__PURE__ */ p("h2", { style: {
532
- ...w.gmHeadline3,
533
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : w.gmHeadline3.marginTop,
534
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "2px" : w.gmHeadline3.marginBottom
535
- }, children: [
536
- "Your score: ",
537
- Bn,
538
- " / ",
539
- F
681
+ S && !B && /* @__PURE__ */ l("div", { style: e.gmCenterScreen, children: [
682
+ /* @__PURE__ */ l("h1", { style: e.gmHeadline1, children: [
683
+ "Theme selected: ",
684
+ S
685
+ ] }),
686
+ /* @__PURE__ */ l("p", { style: e.gmBodyM, children: [
687
+ "Rounds: ",
688
+ G
689
+ ] }),
690
+ /* @__PURE__ */ t(
691
+ "button",
692
+ {
693
+ style: {
694
+ ...e.gmButton,
695
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "8px 16px" : "12px 24px",
696
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "14px" : "16px",
697
+ minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "120px" : "auto"
698
+ },
699
+ onClick: Tn,
700
+ children: "▶ Start game"
701
+ }
702
+ )
540
703
  ] }),
541
- /* @__PURE__ */ d("p", { style: {
542
- ...w.gmBodyM,
543
- color: "#10b981",
544
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : "12px",
545
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "2px" : w.gmBodyM.marginBottom
546
- }, children: "Yahoo! You did it! 🍬✨" }),
547
- /* @__PURE__ */ p("table", { style: {
548
- ...w.gmTable,
549
- marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "0px" : "20px",
550
- marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || l || c || x || H || W || m || u || f ? "4px" : "32px"
551
- }, children: [
552
- /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ p("tr", { children: [
553
- /* @__PURE__ */ d("th", { children: "Round" }),
554
- /* @__PURE__ */ d("th", { children: "Your Answer" }),
555
- /* @__PURE__ */ d("th", { children: "Correct" }),
556
- /* @__PURE__ */ d("th", { children: "Result" })
557
- ] }) }),
558
- /* @__PURE__ */ d("tbody", { children: Cn.map((i, e) => /* @__PURE__ */ p("tr", { children: [
559
- /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.round }),
560
- /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.answer || "—" }),
561
- /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.correct }),
562
- /* @__PURE__ */ d("td", { style: w.gmTableCell, children: i.result === "correct" ? "✔ Correct" : i.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
563
- ] }, e)) })
704
+ V && /* @__PURE__ */ l("div", { style: e.gmCenterScreen, children: [
705
+ /* @__PURE__ */ t(
706
+ "h1",
707
+ {
708
+ style: {
709
+ ...e.gmHeadline1,
710
+ marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "0px" : e.gmHeadline1.marginTop,
711
+ marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "2px" : e.gmHeadline1.marginBottom
712
+ },
713
+ children: "Results"
714
+ }
715
+ ),
716
+ /* @__PURE__ */ l(
717
+ "h2",
718
+ {
719
+ style: {
720
+ ...e.gmHeadline3,
721
+ marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "0px" : e.gmHeadline3.marginTop,
722
+ marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "2px" : e.gmHeadline3.marginBottom
723
+ },
724
+ children: [
725
+ "Your score: ",
726
+ Bn,
727
+ " / ",
728
+ G
729
+ ]
730
+ }
731
+ ),
732
+ /* @__PURE__ */ t(
733
+ "p",
734
+ {
735
+ style: {
736
+ ...e.gmBodyM,
737
+ color: "#10b981",
738
+ marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "0px" : "12px",
739
+ marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "2px" : e.gmBodyM.marginBottom
740
+ },
741
+ children: "Yahoo! You did it! 🍬✨"
742
+ }
743
+ ),
744
+ /* @__PURE__ */ l(
745
+ "table",
746
+ {
747
+ style: {
748
+ ...e.gmTable,
749
+ marginTop: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "0px" : "20px",
750
+ marginBottom: n && window.innerWidth > window.innerHeight || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 || c || x || H || W || m || u || f || y ? "4px" : "32px"
751
+ },
752
+ children: [
753
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ l("tr", { children: [
754
+ /* @__PURE__ */ t("th", { children: "Round" }),
755
+ /* @__PURE__ */ t("th", { children: "Your Answer" }),
756
+ /* @__PURE__ */ t("th", { children: "Correct" }),
757
+ /* @__PURE__ */ t("th", { children: "Result" })
758
+ ] }) }),
759
+ /* @__PURE__ */ t("tbody", { children: An.map((i, o) => /* @__PURE__ */ l("tr", { children: [
760
+ /* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.round }),
761
+ /* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.answer || "—" }),
762
+ /* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.correct }),
763
+ /* @__PURE__ */ t("td", { style: e.gmTableCell, children: i.result === "correct" ? "✔ Correct" : i.result === "almost" ? "◐ Almost (0.5)" : "✘ Wrong" })
764
+ ] }, o)) })
765
+ ]
766
+ }
767
+ ),
768
+ /* @__PURE__ */ l(
769
+ "div",
770
+ {
771
+ style: {
772
+ display: "flex",
773
+ gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
774
+ marginTop: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I ? "12px" : "24px"
775
+ },
776
+ children: [
777
+ /* @__PURE__ */ t(
778
+ "button",
779
+ {
780
+ style: {
781
+ ...e.gmButton,
782
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
783
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
784
+ minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "80px" : "auto"
785
+ },
786
+ onClick: Tn,
787
+ children: "🔁 Play again"
788
+ }
789
+ ),
790
+ /* @__PURE__ */ t(
791
+ "button",
792
+ {
793
+ style: {
794
+ ...e.gmButton,
795
+ padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
796
+ fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
797
+ minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "80px" : "auto"
798
+ },
799
+ onClick: Xn,
800
+ children: "⬅️ Choose theme"
801
+ }
802
+ )
803
+ ]
804
+ }
805
+ )
564
806
  ] }),
565
- /* @__PURE__ */ p("div", { style: {
566
- display: "flex",
567
- gap: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px" : "12px",
568
- marginTop: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "2px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S ? "12px" : "24px"
569
- }, children: [
570
- /* @__PURE__ */ d("button", { style: {
571
- ...w.gmButton,
572
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
573
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
574
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "80px" : "auto"
575
- }, onClick: vn, children: "🔁 Play again" }),
576
- /* @__PURE__ */ d("button", { style: {
577
- ...w.gmButton,
578
- padding: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "6px 10px" : "12px 24px",
579
- fontSize: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "12px" : "16px",
580
- minWidth: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || window.innerWidth === 932 && window.innerHeight === 430 ? "80px" : "auto"
581
- }, onClick: Xn, children: "⬅️ Choose theme" })
582
- ] })
583
- ] }),
584
- j && !$ && /* @__PURE__ */ p("div", { style: w.gmGameLayout, children: [
585
- /* @__PURE__ */ p(
586
- "div",
587
- {
588
- style: {
589
- minHeight: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "45px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "50px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
590
- display: "flex",
591
- flexDirection: "column",
592
- justifyContent: "center",
593
- alignItems: "center",
594
- paddingTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
595
- },
596
- children: [
597
- P === "ready" && /* @__PURE__ */ p(Rn, { children: [
598
- /* @__PURE__ */ d("h1", { style: { ...w.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
599
- /* @__PURE__ */ d("div", { style: w.gmHourglass, children: "⏳" })
600
- ] }),
601
- P === "memorize" && /* @__PURE__ */ p("p", { style: { ...w.gmBodyM, color: "#10b981" }, children: [
602
- "MEMORIZE (",
603
- O,
604
- ")"
605
- ] }),
606
- P === "guess" && !C && /* @__PURE__ */ p("p", { style: w.gmBodyM, children: [
607
- "⏳ Time left: ",
608
- Q,
609
- "s"
610
- ] })
611
- ]
612
- }
613
- ),
614
- P !== "ready" && /* @__PURE__ */ d(
615
- "div",
616
- {
617
- style: {
618
- ...w.gmGrid,
619
- ...T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
620
- // ✅ Широкие экраны: полная ширина грида
621
- gridTemplateColumns: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "repeat(3, 1fr)" : n ? "repeat(2, 1fr)" : window.innerHeight < 700 ? "repeat(3, 1fr)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
622
- // desktop: 3 колонки фиксированного размера
623
- gridAutoRows: n && window.innerWidth > window.innerHeight ? "120px" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "100px" : n ? "150px" : window.innerHeight < 700 ? "140px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "240px" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
624
- // desktop: стандартная высота
625
- gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "12px" : n || window.innerHeight < 700 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "24px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
626
- justifyItems: "center",
627
- maxWidth: n && window.innerWidth > window.innerHeight ? "90%" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "95%" : "100%",
628
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "20px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
629
- },
630
- children: L.map((i, e) => {
631
- const t = z === e && P === "guess" && !C;
632
- return /* @__PURE__ */ d(
633
- "div",
634
- {
635
- style: {
636
- width: "100%",
637
- height: "100%",
638
- borderRadius: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px" : "12px",
639
- overflow: "hidden",
640
- boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 1px 4px rgba(0,0,0,0.1)" : "0 4px 12px rgba(0,0,0,0.15)",
641
- transition: "all 0.3s ease",
642
- cursor: "pointer",
643
- ...yn === "correct" && z === e ? {
644
- boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #10b981" : "0 0 20px #10b981",
645
- transform: "scale(1.03)"
646
- } : {},
647
- ...yn === "wrong" && z === e ? {
648
- boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #ef4444" : "0 0 20px #ef4444",
649
- transform: "scale(1.03)"
650
- } : {}
807
+ B && !V && /* @__PURE__ */ l("div", { style: e.gmGameLayout, children: [
808
+ /* @__PURE__ */ l(
809
+ "div",
810
+ {
811
+ style: {
812
+ minHeight: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "45px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "50px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "60px" : "160px",
813
+ display: "flex",
814
+ flexDirection: "column",
815
+ justifyContent: "center",
816
+ alignItems: "center",
817
+ paddingTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 || M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "15px" : "40px"
818
+ },
819
+ children: [
820
+ T === "ready" && /* @__PURE__ */ l(Mn, { children: [
821
+ /* @__PURE__ */ t("h1", { style: { ...e.gmHeadline1, color: "#ec4c44" }, children: "GET READY" }),
822
+ /* @__PURE__ */ t("div", { style: e.gmHourglass, children: "" })
823
+ ] }),
824
+ T === "memorize" && /* @__PURE__ */ l("p", { style: { ...e.gmBodyM, color: "#10b981" }, children: [
825
+ "MEMORIZE (",
826
+ tn,
827
+ ")"
828
+ ] }),
829
+ T === "guess" && !A && /* @__PURE__ */ l("p", { style: e.gmBodyM, children: [
830
+ "⏳ Time left: ",
831
+ wn,
832
+ "s"
833
+ ] })
834
+ ]
835
+ }
836
+ ),
837
+ T !== "ready" && /* @__PURE__ */ t(
838
+ "div",
839
+ {
840
+ style: {
841
+ ...e.gmGrid,
842
+ ...M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? { width: "100%" } : {},
843
+ // Широкие экраны: полная ширина грида
844
+ gridTemplateColumns: n && window.innerWidth > window.innerHeight || n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "repeat(3, 1fr)" : n ? "repeat(2, 1fr)" : window.innerHeight < 700 ? "repeat(3, 1fr)" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "repeat(3, 130px)" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "repeat(3, 150px)" : "repeat(3, 210px)",
845
+ // desktop: 3 колонки фиксированного размера
846
+ gridAutoRows: n && window.innerWidth > window.innerHeight ? "120px" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "100px" : n ? "150px" : window.innerHeight < 700 ? "140px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "240px" : typeof window < "u" && window.innerWidth === 1280 && window.innerHeight === 720 ? "130px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "150px" : "210px",
847
+ // desktop: стандартная высота
848
+ gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "12px" : n || window.innerHeight < 700 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "24px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "12px" : "20px",
849
+ justifyItems: "center",
850
+ maxWidth: n && window.innerWidth > window.innerHeight ? "90%" : n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "95%" : "100%",
851
+ padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "8px" : typeof window < "u" && window.devicePixelRatio >= 1.25 && window.devicePixelRatio <= 1.5 ? "20px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 ? "10px" : "16px"
852
+ },
853
+ children: k.map((i, o) => {
854
+ const d = z === o && T === "guess" && !A;
855
+ return /* @__PURE__ */ t(
856
+ "div",
857
+ {
858
+ style: {
859
+ width: "100%",
860
+ height: "100%",
861
+ borderRadius: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px" : "12px",
862
+ overflow: "hidden",
863
+ backgroundColor: "#ffffff",
864
+ boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 1px 4px rgba(0,0,0,0.1)" : "0 4px 12px rgba(0,0,0,0.15)",
865
+ transition: "all 0.3s ease",
866
+ cursor: "pointer",
867
+ ...kn === "correct" && z === o ? {
868
+ boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #10b981" : "0 0 20px #10b981",
869
+ transform: "scale(1.03)"
870
+ } : {},
871
+ ...kn === "wrong" && z === o ? {
872
+ boxShadow: n && window.innerWidth <= 375 && window.innerHeight <= 667 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "0 0 15px #ef4444" : "0 0 20px #ef4444",
873
+ transform: "scale(1.03)"
874
+ } : {}
875
+ },
876
+ children: !d && (() => {
877
+ const h = K.current.get(i.src), b = h?.complete && h.src ? h.src : i.src;
878
+ return /* @__PURE__ */ t(
879
+ "img",
880
+ {
881
+ src: b,
882
+ alt: i.name,
883
+ fetchPriority: "high",
884
+ loading: "eager",
885
+ decoding: "async",
886
+ style: {
887
+ width: "100%",
888
+ height: "100%",
889
+ objectFit: "contain",
890
+ objectPosition: "center"
891
+ }
892
+ },
893
+ `${i.src}-${h?.complete ? "loaded" : "pending"}`
894
+ );
895
+ })()
651
896
  },
652
- children: !t && (() => {
653
- const r = _.current.get(i.src), y = r?.complete && r.src ? r.src : i.src;
654
- return /* @__PURE__ */ d(
655
- "img",
656
- {
657
- src: y,
658
- alt: i.name,
659
- fetchPriority: "high",
660
- loading: "eager",
661
- decoding: "async",
662
- style: {
663
- width: "100%",
664
- height: "100%",
665
- objectFit: "cover"
897
+ o
898
+ );
899
+ })
900
+ }
901
+ ),
902
+ /* @__PURE__ */ l(
903
+ "div",
904
+ {
905
+ style: {
906
+ marginTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "1px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
907
+ height: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "40px" : M || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
908
+ },
909
+ children: [
910
+ T === "guess" && !A && /* @__PURE__ */ t(
911
+ "div",
912
+ {
913
+ style: {
914
+ display: "flex",
915
+ flexDirection: "row",
916
+ flexWrap: "nowrap",
917
+ alignItems: "center",
918
+ justifyContent: "center",
919
+ minWidth: 0,
920
+ gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "3px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
921
+ width: "100%",
922
+ maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "270px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
923
+ },
924
+ children: /* @__PURE__ */ l(Mn, { children: [
925
+ /* @__PURE__ */ t(
926
+ "input",
927
+ {
928
+ type: "text",
929
+ placeholder: "Type the missing word",
930
+ value: N,
931
+ onChange: (i) => yn(i.target.value),
932
+ style: {
933
+ ...e.gmInput,
934
+ flex: "1 1 0",
935
+ minWidth: 0,
936
+ width: "auto",
937
+ maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "170px" : (window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700, "250px"),
938
+ padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "5px 6px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
939
+ boxSizing: "border-box",
940
+ fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 ? "10px" : window.innerWidth === 896 && window.innerHeight === 414 ? "11px" : window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
941
+ }
666
942
  }
667
- },
668
- `${i.src}-${r?.complete ? "loaded" : "pending"}`
669
- );
670
- })()
671
- },
672
- e
673
- );
674
- })
675
- }
676
- ),
677
- /* @__PURE__ */ p("div", { style: {
678
- marginTop: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "1px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "4px" : "16px",
679
- height: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "40px" : T || typeof window < "u" && window.innerWidth / window.innerHeight > 1.8 || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "50px" : "80px"
680
- }, children: [
681
- P === "guess" && !C && /* @__PURE__ */ d("div", { style: {
682
- display: "flex",
683
- flexDirection: dn ? "row" : "column",
684
- gap: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "3px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f ? "8px" : n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "6px" : "12px",
685
- alignItems: "center",
686
- justifyContent: "center",
687
- width: "100%",
688
- maxWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "270px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "400px" : "300px"
689
- }, children: /* @__PURE__ */ p(Rn, { children: [
690
- /* @__PURE__ */ d(
691
- "input",
692
- {
693
- type: "text",
694
- placeholder: "Type the missing word",
695
- value: N,
696
- onChange: (i) => un(i.target.value),
697
- style: {
698
- ...w.gmInput,
699
- width: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "170px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "250px" : "auto",
700
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "5px 6px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
701
- fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 || n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 ? "10px" : window.innerWidth === 896 && window.innerHeight === 414 ? "11px" : window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
702
- flex: dn ? "1" : "none"
703
- }
704
- }
705
- ),
706
- /* @__PURE__ */ d(
707
- "button",
708
- {
709
- style: {
710
- ...w.gmButton,
711
- marginLeft: dn ? "8px" : "0",
712
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
713
- fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
714
- minWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "45px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "55px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
715
- flexShrink: 0
716
- },
717
- onClick: Jn,
718
- disabled: tn,
719
- children: tn ? "..." : "Check"
720
- }
721
- )
722
- ] }) }),
723
- C && /* @__PURE__ */ d("button", { style: {
724
- ...w.gmButton,
725
- padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
726
- fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || S || l || c || x || H || W || m || u || f || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
727
- }, onClick: Qn, children: "Next round" })
943
+ ),
944
+ /* @__PURE__ */ t(
945
+ "button",
946
+ {
947
+ style: {
948
+ ...e.gmButton,
949
+ marginLeft: 0,
950
+ padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
951
+ fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px",
952
+ minWidth: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "45px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "55px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "80px" : "100px",
953
+ flexShrink: 0
954
+ },
955
+ onClick: Jn,
956
+ disabled: sn,
957
+ children: sn ? "..." : "Check"
958
+ }
959
+ )
960
+ ] })
961
+ }
962
+ ),
963
+ A && /* @__PURE__ */ t(
964
+ "button",
965
+ {
966
+ style: {
967
+ ...e.gmButton,
968
+ padding: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "5px 8px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "6px 10px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
969
+ fontSize: n && window.innerWidth <= 375 && window.innerHeight <= 667 ? "10px" : n && window.innerWidth > window.innerHeight && window.innerHeight <= 428 || window.innerWidth === 896 && window.innerHeight === 414 || window.innerWidth === 844 && window.innerHeight === 390 || window.innerWidth === 926 && window.innerHeight === 428 ? "11px" : window.innerWidth === 1366 && window.innerHeight === 766 || window.innerWidth === 1366 && window.innerHeight === 768 || window.innerWidth === 1280 && window.innerHeight === 720 || window.innerWidth === 1440 && window.innerHeight === 900 || I || c || x || H || W || m || u || f || y || n && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "14px" : "16px"
970
+ },
971
+ onClick: Qn,
972
+ children: "Next round"
973
+ }
974
+ )
975
+ ]
976
+ }
977
+ )
728
978
  ] })
729
979
  ] })
730
- ] })
980
+ }
981
+ )
982
+ }
983
+ )
984
+ ]
985
+ }
986
+ );
987
+ }
988
+ const X = 1280, nn = 720;
989
+ function Si(w, a) {
990
+ const g = Math.min(w, a);
991
+ return w <= 768 ? Math.max(280, w - 20) : Math.max(400, Math.min(1200, g - 40));
992
+ }
993
+ function Pi({
994
+ gameCubeSize: w,
995
+ screenHeight: a,
996
+ screenWidth: g,
997
+ seed: s
998
+ }) {
999
+ const [p, S] = r(() => ({
1000
+ width: typeof window < "u" ? window.innerWidth : X,
1001
+ height: typeof window < "u" ? window.innerHeight : nn
1002
+ }));
1003
+ _(() => {
1004
+ const k = () => {
1005
+ S({
1006
+ width: window.innerWidth,
1007
+ height: window.innerHeight
1008
+ });
1009
+ };
1010
+ k(), window.addEventListener("resize", k), window.addEventListener("orientationchange", k);
1011
+ const D = new ResizeObserver(k);
1012
+ return D.observe(document.documentElement), () => {
1013
+ window.removeEventListener("resize", k), window.removeEventListener("orientationchange", k), D.disconnect();
1014
+ };
1015
+ }, []);
1016
+ const U = Rn(() => Math.min(p.width / X, p.height / nn), [p.width, p.height]);
1017
+ return /* @__PURE__ */ t(
1018
+ "div",
1019
+ {
1020
+ style: {
1021
+ position: "relative",
1022
+ width: "100%",
1023
+ height: "100%",
1024
+ overflow: "hidden"
1025
+ },
1026
+ children: /* @__PURE__ */ t(
1027
+ "div",
1028
+ {
1029
+ style: {
1030
+ position: "absolute",
1031
+ left: "50%",
1032
+ top: "50%",
1033
+ width: `${X}px`,
1034
+ height: `${nn}px`,
1035
+ transform: `translate(-50%, -50%) scale(${U})`,
1036
+ transformOrigin: "center center"
1037
+ },
1038
+ children: /* @__PURE__ */ t(
1039
+ "div",
1040
+ {
1041
+ style: {
1042
+ width: `${X}px`,
1043
+ height: `${nn}px`,
1044
+ position: "relative",
1045
+ overflow: "hidden"
1046
+ },
1047
+ children: /* @__PURE__ */ t(
1048
+ vi,
1049
+ {
1050
+ gameCubeSize: w ?? Si(p.width, p.height),
1051
+ screenWidth: g ?? p.width,
1052
+ screenHeight: a ?? p.height,
1053
+ seed: s
1054
+ }
1055
+ )
731
1056
  }
732
1057
  )
733
1058
  }
@@ -736,6 +1061,8 @@ function mi({
736
1061
  );
737
1062
  }
738
1063
  export {
739
- mi as Game,
740
- K as themes
1064
+ Pi as AdaptiveGameShell,
1065
+ Pi as Game,
1066
+ vi as RawGame,
1067
+ Q as themes
741
1068
  };