speakid-build-a-sentence 1.0.1 → 1.0.3

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,5 +1,5 @@
1
- import tn, { useState as f, useCallback as We, useRef as Re, useEffect as ue, useMemo as rn, Component as on } from "react";
2
- var be = { exports: {} }, pe = {};
1
+ import rn, { useState as g, useCallback as Ee, useRef as Ie, useEffect as ue, useMemo as on, Component as sn } from "react";
2
+ var ve = { exports: {} }, pe = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.js
@@ -9,27 +9,27 @@ var be = { exports: {} }, pe = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Ie;
13
- function sn() {
14
- if (Ie) return pe;
15
- Ie = 1;
16
- var u = Symbol.for("react.transitional.element"), d = Symbol.for("react.fragment");
17
- function m(D, R, y) {
18
- var E = null;
19
- if (y !== void 0 && (E = "" + y), R.key !== void 0 && (E = "" + R.key), "key" in R) {
20
- y = {};
21
- for (var p in R)
22
- p !== "key" && (y[p] = R[p]);
23
- } else y = R;
24
- return R = y.ref, {
25
- $$typeof: u,
26
- type: D,
27
- key: E,
28
- ref: R !== void 0 ? R : null,
29
- props: y
12
+ var je;
13
+ function an() {
14
+ if (je) return pe;
15
+ je = 1;
16
+ var p = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
17
+ function S(T, W, w) {
18
+ var P = null;
19
+ if (w !== void 0 && (P = "" + w), W.key !== void 0 && (P = "" + W.key), "key" in W) {
20
+ w = {};
21
+ for (var R in W)
22
+ R !== "key" && (w[R] = W[R]);
23
+ } else w = W;
24
+ return W = w.ref, {
25
+ $$typeof: p,
26
+ type: T,
27
+ key: P,
28
+ ref: W !== void 0 ? W : null,
29
+ props: w
30
30
  };
31
31
  }
32
- return pe.Fragment = d, pe.jsx = m, pe.jsxs = m, pe;
32
+ return pe.Fragment = l, pe.jsx = S, pe.jsxs = S, pe;
33
33
  }
34
34
  var fe = {};
35
35
  /**
@@ -41,126 +41,126 @@ var fe = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var je;
45
- function an() {
46
- return je || (je = 1, process.env.NODE_ENV !== "production" && (function() {
47
- function u(e) {
44
+ var Pe;
45
+ function dn() {
46
+ return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && (function() {
47
+ function p(e) {
48
48
  if (e == null) return null;
49
49
  if (typeof e == "function")
50
- return e.$$typeof === Ee ? null : e.displayName || e.name || null;
50
+ return e.$$typeof === V ? null : e.displayName || e.name || null;
51
51
  if (typeof e == "string") return e;
52
52
  switch (e) {
53
- case M:
53
+ case E:
54
54
  return "Fragment";
55
- case ge:
55
+ case _:
56
56
  return "Profiler";
57
- case A:
57
+ case U:
58
58
  return "StrictMode";
59
- case le:
59
+ case j:
60
60
  return "Suspense";
61
- case N:
61
+ case ae:
62
62
  return "SuspenseList";
63
- case q:
63
+ case $:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof e == "object")
67
67
  switch (typeof e.tag == "number" && console.error(
68
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
69
  ), e.$$typeof) {
70
- case H:
70
+ case ge:
71
71
  return "Portal";
72
- case he:
72
+ case se:
73
73
  return e.displayName || "Context";
74
- case de:
74
+ case he:
75
75
  return (e._context.displayName || "Context") + ".Consumer";
76
- case j:
77
- var i = e.render;
78
- return e = e.displayName, e || (e = i.displayName || i.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
76
  case me:
80
- return i = e.displayName || null, i !== null ? i : u(e.type) || "Memo";
81
- case _:
82
- i = e._payload, e = e._init;
77
+ var a = e.render;
78
+ return e = e.displayName, e || (e = a.displayName || a.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
+ case z:
80
+ return a = e.displayName || null, a !== null ? a : p(e.type) || "Memo";
81
+ case J:
82
+ a = e._payload, e = e._init;
83
83
  try {
84
- return u(e(i));
84
+ return p(e(a));
85
85
  } catch {
86
86
  }
87
87
  }
88
88
  return null;
89
89
  }
90
- function d(e) {
90
+ function l(e) {
91
91
  return "" + e;
92
92
  }
93
- function m(e) {
93
+ function S(e) {
94
94
  try {
95
- d(e);
96
- var i = !1;
95
+ l(e);
96
+ var a = !1;
97
97
  } catch {
98
- i = !0;
98
+ a = !0;
99
99
  }
100
- if (i) {
101
- i = console;
102
- var h = i.error, v = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
- return h.call(
104
- i,
100
+ if (a) {
101
+ a = console;
102
+ var r = a.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
+ return r.call(
104
+ a,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- v
107
- ), d(e);
106
+ b
107
+ ), l(e);
108
108
  }
109
109
  }
110
- function D(e) {
111
- if (e === M) return "<>";
112
- if (typeof e == "object" && e !== null && e.$$typeof === _)
110
+ function T(e) {
111
+ if (e === E) return "<>";
112
+ if (typeof e == "object" && e !== null && e.$$typeof === J)
113
113
  return "<...>";
114
114
  try {
115
- var i = u(e);
116
- return i ? "<" + i + ">" : "<...>";
115
+ var a = p(e);
116
+ return a ? "<" + a + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function R() {
122
- var e = U.A;
121
+ function W() {
122
+ var e = we.A;
123
123
  return e === null ? null : e.getOwner();
124
124
  }
125
- function y() {
125
+ function w() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
- function E(e) {
129
- if (O.call(e, "key")) {
130
- var i = Object.getOwnPropertyDescriptor(e, "key").get;
131
- if (i && i.isReactWarning) return !1;
128
+ function P(e) {
129
+ if (de.call(e, "key")) {
130
+ var a = Object.getOwnPropertyDescriptor(e, "key").get;
131
+ if (a && a.isReactWarning) return !1;
132
132
  }
133
133
  return e.key !== void 0;
134
134
  }
135
- function p(e, i) {
136
- function h() {
137
- V || (V = !0, console.error(
135
+ function R(e, a) {
136
+ function r() {
137
+ c || (c = !0, console.error(
138
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
- i
139
+ a
140
140
  ));
141
141
  }
142
- h.isReactWarning = !0, Object.defineProperty(e, "key", {
143
- get: h,
142
+ r.isReactWarning = !0, Object.defineProperty(e, "key", {
143
+ get: r,
144
144
  configurable: !0
145
145
  });
146
146
  }
147
- function S() {
148
- var e = u(this.type);
149
- return Z[e] || (Z[e] = !0, console.error(
147
+ function f() {
148
+ var e = p(this.type);
149
+ return F[e] || (F[e] = !0, console.error(
150
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
151
  )), e = this.props.ref, e !== void 0 ? e : null;
152
152
  }
153
- function k(e, i, h, v, L, Q) {
154
- var w = h.ref;
153
+ function D(e, a, r, b, le, G) {
154
+ var x = r.ref;
155
155
  return e = {
156
- $$typeof: ae,
156
+ $$typeof: oe,
157
157
  type: e,
158
- key: i,
159
- props: h,
160
- _owner: v
161
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(e, "ref", {
158
+ key: a,
159
+ props: r,
160
+ _owner: b
161
+ }, (x !== void 0 ? x : null) !== null ? Object.defineProperty(e, "ref", {
162
162
  enumerable: !1,
163
- get: S
163
+ get: f
164
164
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
@@ -175,109 +175,109 @@ function an() {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
- value: L
178
+ value: le
179
179
  }), Object.defineProperty(e, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: Q
183
+ value: G
184
184
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
185
  }
186
- function W(e, i, h, v, L, Q) {
187
- var w = i.children;
188
- if (w !== void 0)
189
- if (v)
190
- if (z(w)) {
191
- for (v = 0; v < w.length; v++)
192
- P(w[v]);
193
- Object.freeze && Object.freeze(w);
186
+ function y(e, a, r, b, le, G) {
187
+ var x = a.children;
188
+ if (x !== void 0)
189
+ if (b)
190
+ if (M(x)) {
191
+ for (b = 0; b < x.length; b++)
192
+ I(x[b]);
193
+ Object.freeze && Object.freeze(x);
194
194
  } else
195
195
  console.error(
196
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
197
  );
198
- else P(w);
199
- if (O.call(i, "key")) {
200
- w = u(e);
201
- var $ = Object.keys(i).filter(function(F) {
202
- return F !== "key";
198
+ else I(x);
199
+ if (de.call(a, "key")) {
200
+ x = p(e);
201
+ var O = Object.keys(a).filter(function(Se) {
202
+ return Se !== "key";
203
203
  });
204
- v = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", I[w + v] || ($ = 0 < $.length ? "{" + $.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ b = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", L[x + b] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
- v,
212
- w,
213
- $,
214
- w
215
- ), I[w + v] = !0);
211
+ b,
212
+ x,
213
+ O,
214
+ x
215
+ ), L[x + b] = !0);
216
216
  }
217
- if (w = null, h !== void 0 && (m(h), w = "" + h), E(i) && (m(i.key), w = "" + i.key), "key" in i) {
218
- h = {};
219
- for (var ce in i)
220
- ce !== "key" && (h[ce] = i[ce]);
221
- } else h = i;
222
- return w && p(
223
- h,
217
+ if (x = null, r !== void 0 && (S(r), x = "" + r), P(a) && (S(a.key), x = "" + a.key), "key" in a) {
218
+ r = {};
219
+ for (var ce in a)
220
+ ce !== "key" && (r[ce] = a[ce]);
221
+ } else r = a;
222
+ return x && R(
223
+ r,
224
224
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), k(
225
+ ), D(
226
226
  e,
227
- w,
228
- h,
229
- R(),
230
- L,
231
- Q
227
+ x,
228
+ r,
229
+ W(),
230
+ le,
231
+ G
232
232
  );
233
233
  }
234
- function P(e) {
235
- Y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === _ && (e._payload.status === "fulfilled" ? Y(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
234
+ function I(e) {
235
+ H(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === J && (e._payload.status === "fulfilled" ? H(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
236
236
  }
237
- function Y(e) {
238
- return typeof e == "object" && e !== null && e.$$typeof === ae;
237
+ function H(e) {
238
+ return typeof e == "object" && e !== null && e.$$typeof === oe;
239
239
  }
240
- var J = tn, ae = Symbol.for("react.transitional.element"), H = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), ge = Symbol.for("react.profiler"), de = Symbol.for("react.consumer"), he = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), me = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), Ee = Symbol.for("react.client.reference"), U = J.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, z = Array.isArray, l = console.createTask ? console.createTask : function() {
240
+ var B = rn, oe = Symbol.for("react.transitional.element"), ge = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), he = Symbol.for("react.consumer"), se = Symbol.for("react.context"), me = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), ae = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), we = B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, de = Object.prototype.hasOwnProperty, M = Array.isArray, A = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
- J = {
243
+ B = {
244
244
  react_stack_bottom_frame: function(e) {
245
245
  return e();
246
246
  }
247
247
  };
248
- var V, Z = {}, we = J.react_stack_bottom_frame.bind(
249
- J,
250
- y
251
- )(), B = l(D(y)), I = {};
252
- fe.Fragment = M, fe.jsx = function(e, i, h) {
253
- var v = 1e4 > U.recentlyCreatedOwnerStacks++;
254
- return W(
248
+ var c, F = {}, X = B.react_stack_bottom_frame.bind(
249
+ B,
250
+ w
251
+ )(), xe = A(T(w)), L = {};
252
+ fe.Fragment = E, fe.jsx = function(e, a, r) {
253
+ var b = 1e4 > we.recentlyCreatedOwnerStacks++;
254
+ return y(
255
255
  e,
256
- i,
257
- h,
256
+ a,
257
+ r,
258
258
  !1,
259
- v ? Error("react-stack-top-frame") : we,
260
- v ? l(D(e)) : B
259
+ b ? Error("react-stack-top-frame") : X,
260
+ b ? A(T(e)) : xe
261
261
  );
262
- }, fe.jsxs = function(e, i, h) {
263
- var v = 1e4 > U.recentlyCreatedOwnerStacks++;
264
- return W(
262
+ }, fe.jsxs = function(e, a, r) {
263
+ var b = 1e4 > we.recentlyCreatedOwnerStacks++;
264
+ return y(
265
265
  e,
266
- i,
267
- h,
266
+ a,
267
+ r,
268
268
  !0,
269
- v ? Error("react-stack-top-frame") : we,
270
- v ? l(D(e)) : B
269
+ b ? Error("react-stack-top-frame") : X,
270
+ b ? A(T(e)) : xe
271
271
  );
272
272
  };
273
273
  })()), fe;
274
274
  }
275
- var Pe;
276
- function dn() {
277
- return Pe || (Pe = 1, process.env.NODE_ENV === "production" ? be.exports = sn() : be.exports = an()), be.exports;
275
+ var He;
276
+ function ln() {
277
+ return He || (He = 1, process.env.NODE_ENV === "production" ? ve.exports = an() : ve.exports = dn()), ve.exports;
278
278
  }
279
- var s = dn();
280
- const ln = `
279
+ var s = ln();
280
+ const cn = `
281
281
  @keyframes magic-sentence-spin {
282
282
  from { transform: rotate(0deg); }
283
283
  to { transform: rotate(360deg); }
@@ -312,10 +312,10 @@ const ln = `
312
312
  }
313
313
  `;
314
314
  if (typeof document < "u" && !document.getElementById("magic-sentence-keyframes")) {
315
- const u = document.createElement("style");
316
- u.id = "magic-sentence-keyframes", u.innerHTML = ln, document.head.appendChild(u);
315
+ const p = document.createElement("style");
316
+ p.id = "magic-sentence-keyframes", p.innerHTML = cn, document.head.appendChild(p);
317
317
  }
318
- const He = {
318
+ const Ce = {
319
319
  spin: {
320
320
  animation: "magic-sentence-spin 1.4s linear infinite"
321
321
  },
@@ -334,7 +334,7 @@ const He = {
334
334
  glow: {
335
335
  animation: "magic-sentence-glow 1s ease-in-out infinite"
336
336
  }
337
- }, g = {
337
+ }, h = {
338
338
  gmCenterScreen: {
339
339
  position: "relative",
340
340
  zIndex: 1,
@@ -448,62 +448,62 @@ const He = {
448
448
  },
449
449
  gmHourglass: {
450
450
  fontSize: "42px",
451
- ...He.spin
451
+ ...Ce.spin
452
452
  },
453
453
  // ===== Анимационные стили =====
454
- ...He
455
- }, cn = () => {
456
- const [u, d] = f([]), m = We((y, E, p) => {
457
- const S = [];
458
- y.trim() || S.push({
454
+ ...Ce
455
+ }, un = () => {
456
+ const [p, l] = g([]), S = Ee((w, P, R) => {
457
+ const f = [];
458
+ w.trim() || f.push({
459
459
  type: "empty",
460
460
  message: "Sentence cannot be empty"
461
- }), y.length > 41 && S.push({
461
+ }), w.length > 41 && f.push({
462
462
  type: "length",
463
- message: `Sentence is too long (${y.length}/41 characters)`
464
- }), y && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(y) && S.push({
463
+ message: `Sentence is too long (${w.length}/41 characters)`
464
+ }), w && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(w) && f.push({
465
465
  type: "characters",
466
466
  message: "Only Latin characters, numbers, spaces and punctuation are allowed"
467
467
  });
468
- const W = p.findIndex((P, Y) => Y !== E && P.toLowerCase().trim() === y.toLowerCase().trim());
469
- return W !== -1 && S.push({
468
+ const y = R.findIndex((I, H) => H !== P && I.toLowerCase().trim() === w.toLowerCase().trim());
469
+ return y !== -1 && f.push({
470
470
  type: "duplicate",
471
- message: `Duplicate sentence (same as sentence ${W + 1})`
472
- }), d(S), {
473
- isValid: S.length === 0,
474
- errors: S
471
+ message: `Duplicate sentence (same as sentence ${y + 1})`
472
+ }), l(f), {
473
+ isValid: f.length === 0,
474
+ errors: f
475
475
  };
476
- }, []), D = We((y) => {
477
- const E = [];
478
- return y.forEach((p, S) => {
479
- const k = m(p, S, y);
480
- E.push(...k.errors.map((W) => ({
481
- ...W,
482
- message: `Sentence ${S + 1}: ${W.message}`
476
+ }, []), T = Ee((w) => {
477
+ const P = [];
478
+ return w.forEach((R, f) => {
479
+ const D = S(R, f, w);
480
+ P.push(...D.errors.map((y) => ({
481
+ ...y,
482
+ message: `Sentence ${f + 1}: ${y.message}`
483
483
  })));
484
484
  }), {
485
- isValid: E.length === 0,
486
- errors: E
485
+ isValid: P.length === 0,
486
+ errors: P
487
487
  };
488
- }, [m]), R = We(() => {
489
- d([]);
488
+ }, [S]), W = Ee(() => {
489
+ l([]);
490
490
  }, []);
491
491
  return {
492
- errors: u,
493
- validateSentence: m,
494
- validateAllSentences: D,
495
- clearErrors: R
492
+ errors: p,
493
+ validateSentence: S,
494
+ validateAllSentences: T,
495
+ clearErrors: W
496
496
  };
497
- }, un = (u, d, m) => d && m ? `${u} word "${d}" ${m}` : d ? `${u} word "${d}"` : u, pn = (u, d, m = ["Enter", " "]) => {
498
- m.includes(u.key) && (u.preventDefault(), d());
499
- }, X = (u) => {
500
- const d = document.createElement("div");
501
- d.setAttribute("aria-live", "polite"), d.setAttribute("aria-atomic", "true"), d.style.position = "absolute", d.style.left = "-10000px", d.style.width = "1px", d.style.height = "1px", d.style.overflow = "hidden", document.body.appendChild(d), d.textContent = u, setTimeout(() => {
502
- document.body.removeChild(d);
497
+ }, pn = (p, l, S) => l && S ? `${p} word "${l}" ${S}` : l ? `${p} word "${l}"` : p, fn = (p, l, S = ["Enter", " "]) => {
498
+ S.includes(p.key) && (p.preventDefault(), l());
499
+ }, Y = (p) => {
500
+ const l = document.createElement("div");
501
+ l.setAttribute("aria-live", "polite"), l.setAttribute("aria-atomic", "true"), l.style.position = "absolute", l.style.left = "-10000px", l.style.width = "1px", l.style.height = "1px", l.style.overflow = "hidden", document.body.appendChild(l), l.textContent = p, setTimeout(() => {
502
+ document.body.removeChild(l);
503
503
  }, 1e3);
504
- }, fn = () => {
505
- const u = document.createElement("style");
506
- u.textContent = `
504
+ }, gn = () => {
505
+ const p = document.createElement("style");
506
+ p.textContent = `
507
507
  #magic-sentence-root, #magic-sentence-root * {
508
508
  box-sizing: border-box;
509
509
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
@@ -529,11 +529,11 @@ const He = {
529
529
  height: 100% !important;
530
530
  overflow: hidden !important;
531
531
  }
532
- `, document.head.appendChild(u);
533
- }, gn = (u) => [...u].sort(() => Math.random() - 0.5);
534
- function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
535
- const D = Re(null), { validateAllSentences: R, errors: y } = cn(), E = () => i || window.innerWidth < 768, p = () => i || window.innerWidth < 768 || window.innerWidth >= 320 && window.innerWidth <= 932 && window.innerHeight >= 390 && window.innerHeight <= 932, S = (n = "medium") => {
536
- if (!p())
532
+ `, document.head.appendChild(p);
533
+ }, hn = (p) => [...p].sort(() => Math.random() - 0.5);
534
+ function wn(p = {}) {
535
+ const { logoUrl: l, showLogo: S = !0, baseURL: T } = p, W = Ie(null), { validateAllSentences: w, errors: P } = un(), R = () => r || window.innerWidth < 768, f = () => r || window.innerWidth < 768 || window.innerWidth >= 320 && window.innerWidth <= 932 && window.innerHeight >= 390 && window.innerHeight <= 932, D = (n = "medium") => {
536
+ if (!f())
537
537
  return {
538
538
  padding: "12px 24px",
539
539
  fontSize: "16px",
@@ -560,114 +560,114 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
560
560
  };
561
561
  }
562
562
  };
563
- ue(() => (fn(), () => {
563
+ ue(() => (gn(), () => {
564
564
  document.body.style.overflow = "";
565
565
  }), []);
566
- const [k, W] = f("select"), [P, Y] = f(null), [J, ae] = f(null), [H, M] = f([]), [A, ge] = f(0), [de, he] = f([]), [j, le] = f([]), [N, me] = f(20), [_, q] = f(0), [Ee, U] = f(null), [O, z] = f(null), [l, V] = f(!1), [Z, we] = f(
566
+ const [y, I] = g("select"), [H, B] = g(null), [oe, ge] = g(null), [E, U] = g([]), [_, he] = g(0), [se, me] = g([]), [j, ae] = g([]), [z, J] = g(20), [$, V] = g(0), [we, de] = g(null), [M, A] = g(null), [c, F] = g(!1), [X, xe] = g(
567
567
  Number(localStorage.getItem("magicSentenceBest")) || 0
568
- ), B = Re(null), [I, e] = f({ list: null, index: null, side: null }), [i, h] = f(!1), [v, L] = f(1), [Q, w] = f(null), [$, ce] = f(!1), [F, Ce] = f(!1), [K, Ae] = f(!1), [ee, De] = f(!1), [ne, _e] = f(!1), [te, Oe] = f(!1), [ie, ze] = f(!1), [re, Me] = f(!1), [oe, Ne] = f(!1);
568
+ ), L = Ie(null), [e, a] = g({ list: null, index: null, side: null }), [r, b] = g(!1), [le, G] = g(1), [x, O] = g(null), [ce, Se] = g(!1), [q, Ae] = g(!1), [Z, De] = g(!1), [Q, _e] = g(!1), [K, Oe] = g(!1), [ee, ze] = g(!1), [ne, Me] = g(!1), [te, Le] = g(!1), [ie, Ne] = g(!1);
569
569
  ue(() => {
570
570
  const n = () => {
571
- const r = window.innerWidth, t = window.innerHeight, o = r < 768 || r === 926 && t === 428 || r === 932 && t === 430, a = t < 700, b = r === 768 && t === 1024, T = r === 1024 && t === 768, c = r === 820 && t === 1180, x = r === 1180 && t === 820, se = r === 540 && t === 720, C = r === 720 && t === 540, ke = r === 1024 && t === 1366, Ke = r === 1366 && t === 1024, en = r >= 1200 && t >= 600 && !o;
572
- if (ce(en), Ce(b), Ae(T), De(c), _e(x), Oe(se), ze(C), Me(ke), Ne(Ke), h(o), o)
573
- w(null), L(1);
574
- else if (a)
575
- w(null), L(1);
571
+ const i = window.innerWidth, t = window.innerHeight, o = i < 768 || i === 926 && t === 428 || i === 932 && t === 430, d = t < 700, v = i === 768 && t === 1024, k = i === 1024 && t === 768, u = i === 820 && t === 1180, m = i === 1180 && t === 820, re = i === 540 && t === 720, C = i === 720 && t === 540, Re = i === 1024 && t === 1366, en = i === 1366 && t === 1024, nn = i >= 1200 && t >= 600 && !o;
572
+ if (Se(nn), Ae(v), De(k), _e(u), Oe(m), ze(re), Me(C), Le(Re), Ne(en), b(o), o)
573
+ O(null), G(1);
574
+ else if (d)
575
+ O(null), G(1);
576
576
  else {
577
- const nn = Math.min(1e3, Math.min(r, t) * 0.9);
578
- w(nn), L(1);
577
+ const tn = Math.min(1e3, Math.min(i, t) * 0.9);
578
+ O(tn), G(1);
579
579
  }
580
580
  };
581
581
  return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
582
582
  }, []);
583
- const xe = (n, r, t, o) => {
584
- if (l) return;
585
- let a = [...de], b = [...j];
586
- const T = n === "bank" ? a : b, c = r === "bank" ? a : b, x = T.findIndex((ke) => ke.id === t);
587
- if (x === -1) return;
588
- const [se] = T.splice(x, 1);
583
+ const ye = (n, i, t, o) => {
584
+ if (c) return;
585
+ let d = [...se], v = [...j];
586
+ const k = n === "bank" ? d : v, u = i === "bank" ? d : v, m = k.findIndex((Re) => Re.id === t);
587
+ if (m === -1) return;
588
+ const [re] = k.splice(m, 1);
589
589
  let C = o;
590
- n === r && C !== null && C !== void 0 && C > x && (C = C - 1), C == null || C < 0 || C > c.length ? c.push(se) : c.splice(C, 0, se), n === "bank" ? a = T : b = T, r === "bank" ? a = c : b = c, he(a), le(b);
591
- }, ye = (n, r, t) => {
592
- if (n.preventDefault(), l) {
593
- e({ list: null, index: null, side: null });
590
+ n === i && C !== null && C !== void 0 && C > m && (C = C - 1), C == null || C < 0 || C > u.length ? u.push(re) : u.splice(C, 0, re), n === "bank" ? d = k : v = k, i === "bank" ? d = u : v = u, me(d), ae(v);
591
+ }, be = (n, i, t) => {
592
+ if (n.preventDefault(), c) {
593
+ a({ list: null, index: null, side: null });
594
594
  return;
595
595
  }
596
596
  const o = n.dataTransfer.getData("application/x-token") || (() => {
597
- const a = n.dataTransfer.getData("text/plain");
598
- if (!a) return "";
599
- const b = de.some((x) => x.id === a), T = j.some((x) => x.id === a), c = b ? "bank" : T ? "selected" : null;
600
- return c ? JSON.stringify({ from: c, id: a }) : "";
597
+ const d = n.dataTransfer.getData("text/plain");
598
+ if (!d) return "";
599
+ const v = se.some((m) => m.id === d), k = j.some((m) => m.id === d), u = v ? "bank" : k ? "selected" : null;
600
+ return u ? JSON.stringify({ from: u, id: d }) : "";
601
601
  })();
602
602
  if (o) {
603
603
  try {
604
- const a = JSON.parse(o);
605
- if (!a || !a.id || !a.from) return;
606
- xe(a.from, r, a.id, t);
604
+ const d = JSON.parse(o);
605
+ if (!d || !d.id || !d.from) return;
606
+ ye(d.from, i, d.id, t);
607
607
  } catch {
608
608
  }
609
- e({ list: null, index: null, side: null });
609
+ a({ list: null, index: null, side: null });
610
610
  }
611
611
  }, Be = (n) => {
612
- Y(n), M(Array(n).fill("")), W("time");
613
- }, Le = (n) => {
614
- ae(n), W("type");
615
- }, $e = (n, r) => {
616
- if (r.length > 41 || r && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(r))
612
+ B(n), U(Array(n).fill("")), I("time");
613
+ }, $e = (n) => {
614
+ ge(n), I("type");
615
+ }, Fe = (n, i) => {
616
+ if (i.length > 41 || i && !/^[a-zA-Z0-9\s.,!?;:'"-]*$/.test(i))
617
617
  return;
618
- const o = [...H];
619
- o[n] = r, M(o);
620
- const a = R(o);
621
- a.isValid || console.warn("Validation errors:", a.errors);
622
- }, Fe = (n) => n.trim().replace(/\s+/g, " "), Te = (n) => n <= 3 ? 20 : n <= 5 ? 18 : n <= 7 ? 16 : n <= 9 ? 14 : 12, Ge = () => {
623
- H.some((r) => r.trim().length === 0) || (M((r) => r.map((t) => Fe(t))), q(0), ge(0), U(null), W("getready"));
618
+ const o = [...E];
619
+ o[n] = i, U(o);
620
+ const d = w(o);
621
+ d.isValid || console.warn("Validation errors:", d.errors);
622
+ }, Ge = (n) => n.trim().replace(/\s+/g, " "), Te = (n) => n <= 3 ? 20 : n <= 5 ? 18 : n <= 7 ? 16 : n <= 9 ? 14 : 12, Ye = () => {
623
+ E.some((i) => i.trim().length === 0) || (U((i) => i.map((t) => Ge(t))), V(0), he(0), de(null), I("getready"));
624
624
  };
625
625
  ue(() => {
626
- if (k === "getready") {
627
- const n = setTimeout(() => ve(0), 3e3);
626
+ if (y === "getready") {
627
+ const n = setTimeout(() => ke(0), 3e3);
628
628
  return () => clearTimeout(n);
629
629
  }
630
- }, [k]);
631
- const ve = (n) => {
632
- const r = H[n];
633
- if (!r) return;
634
- const o = gn(
635
- r.trim().split(/\s+/).filter(Boolean)
636
- ).map((a, b) => ({
637
- id: `${Date.now()}-${n}-${b}-${Math.random().toString(36).slice(2)}`,
638
- text: a
630
+ }, [y]);
631
+ const ke = (n) => {
632
+ const i = E[n];
633
+ if (!i) return;
634
+ const o = hn(
635
+ i.trim().split(/\s+/).filter(Boolean)
636
+ ).map((d, v) => ({
637
+ id: `${Date.now()}-${n}-${v}-${Math.random().toString(36).slice(2)}`,
638
+ text: d
639
639
  }));
640
- he(o), le([]), ge(n), me(J || 20), z(null), V(!1), W("play");
640
+ me(o), ae([]), he(n), J(oe || 20), A(null), F(!1), I("play");
641
641
  };
642
642
  ue(() => {
643
- if (k === "play" && !l)
644
- if (B.current !== null && window.clearTimeout(B.current), N > 0)
645
- B.current = window.setTimeout(() => me((n) => n - 1), 1e3);
643
+ if (y === "play" && !c)
644
+ if (L.current !== null && window.clearTimeout(L.current), z > 0)
645
+ L.current = window.setTimeout(() => J((n) => n - 1), 1e3);
646
646
  else {
647
- V(!0);
648
- const r = H[A].trim().split(/\s+/), t = j.map((c) => c.text), o = r.filter((c) => !t.includes(c)).length, a = t.filter((c) => !r.includes(c)).length, b = r.filter((c, x) => c !== t[x]).length, T = o + a + b;
649
- T === 0 ? (z("correct"), G("correct"), X("Correct! Well done!")) : T === 1 ? (z("almost"), G("half"), X("Almost correct! Just one mistake.")) : (z("wrong"), G("wrong"), X("Not quite right. Keep trying!"));
647
+ F(!0);
648
+ const i = E[_].trim().split(/\s+/), t = j.map((u) => u.text), o = i.filter((u) => !t.includes(u)).length, d = t.filter((u) => !i.includes(u)).length, v = i.filter((u, m) => u !== t[m]).length, k = o + d + v;
649
+ k === 0 ? (A("correct"), N("correct"), Y("Correct! Well done!")) : k === 1 ? (A("almost"), N("half"), Y("Almost correct! Just one mistake.")) : (A("wrong"), N("wrong"), Y("Not quite right. Keep trying!"));
650
650
  }
651
651
  return () => {
652
- B.current !== null && window.clearTimeout(B.current);
652
+ L.current !== null && window.clearTimeout(L.current);
653
653
  };
654
- }, [k, N, l, H, A, j]);
655
- const Ye = (n = !0) => {
656
- if (l && n) {
657
- A + 1 < (P || 0) ? ve(A + 1) : (W("results"), setTimeout(() => Se(), 600));
654
+ }, [y, z, c, E, _, j]);
655
+ const Ue = (n = !0) => {
656
+ if (c && n) {
657
+ _ + 1 < (H || 0) ? ke(_ + 1) : (I("results"), setTimeout(() => We(), 600));
658
658
  return;
659
659
  }
660
- if (n && !l) {
661
- const t = H[A].trim().split(/\s+/), o = j.map((x) => x.text), a = t.filter((x) => !o.includes(x)).length, b = o.filter((x) => !t.includes(x)).length, T = t.filter((x, se) => x !== o[se]).length, c = a + b + T;
662
- c === 0 && N > 0 ? (q((x) => x + 1), z("correct"), G("correct"), X("Correct! Well done!")) : c === 1 ? (q((x) => x + 0.5), z("almost"), G("half"), X("Almost correct! Just one mistake.")) : (z("wrong"), G("wrong"), X("Not quite right. Keep trying!")), A + 1 < (P || 0) ? setTimeout(() => ve(A + 1), 800) : (W("results"), setTimeout(() => Se(), 600));
660
+ if (n && !c) {
661
+ const t = E[_].trim().split(/\s+/), o = j.map((m) => m.text), d = t.filter((m) => !o.includes(m)).length, v = o.filter((m) => !t.includes(m)).length, k = t.filter((m, re) => m !== o[re]).length, u = d + v + k;
662
+ u === 0 && z > 0 ? (V((m) => m + 1), A("correct"), N("correct"), Y("Correct! Well done!")) : u === 1 ? (V((m) => m + 0.5), A("almost"), N("half"), Y("Almost correct! Just one mistake.")) : (A("wrong"), N("wrong"), Y("Not quite right. Keep trying!")), _ + 1 < (H || 0) ? setTimeout(() => ke(_ + 1), 800) : (I("results"), setTimeout(() => We(), 600));
663
663
  }
664
664
  };
665
665
  ue(() => {
666
- k === "results" && _ > Z && (we(_), localStorage.setItem("magicSentenceBest", String(_)));
667
- }, [k, _, Z]);
668
- const G = (n) => {
669
- const r = new (window.AudioContext || window.webkitAudioContext)(), t = r.createOscillator(), o = r.createGain();
670
- switch (t.connect(o), o.connect(r.destination), n) {
666
+ y === "results" && $ > X && (xe($), localStorage.setItem("magicSentenceBest", String($)));
667
+ }, [y, $, X]);
668
+ const N = (n) => {
669
+ const i = new (window.AudioContext || window.webkitAudioContext)(), t = i.createOscillator(), o = i.createGain();
670
+ switch (t.connect(o), o.connect(i.destination), n) {
671
671
  case "start":
672
672
  t.frequency.value = 500;
673
673
  break;
@@ -684,37 +684,37 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
684
684
  t.frequency.value = 200;
685
685
  break;
686
686
  }
687
- o.gain.setValueAtTime(0.1, r.currentTime), t.start(), t.stop(r.currentTime + 0.2);
688
- }, Se = () => {
689
- const r = Date.now() + 2500, t = ["#ec4c44", "#f7c948", "#6fcf97", "#56ccf2", "#bb6bd9"], o = document.createElement("canvas"), a = o.getContext("2d");
687
+ o.gain.setValueAtTime(0.1, i.currentTime), t.start(), t.stop(i.currentTime + 0.2);
688
+ }, We = () => {
689
+ const i = Date.now() + 2500, t = ["#ec4c44", "#f7c948", "#6fcf97", "#56ccf2", "#bb6bd9"], o = document.createElement("canvas"), d = o.getContext("2d");
690
690
  o.width = window.innerWidth, o.height = window.innerHeight, o.style.position = "fixed", o.style.top = "0", o.style.left = "0", o.style.pointerEvents = "none", document.body.appendChild(o);
691
- const b = Array.from({ length: 100 }).map(() => ({
691
+ const v = Array.from({ length: 100 }).map(() => ({
692
692
  x: Math.random() * o.width,
693
693
  y: Math.random() * o.height - o.height,
694
694
  size: 6 + Math.random() * 6,
695
695
  color: t[Math.floor(Math.random() * t.length)],
696
696
  speed: 2 + Math.random() * 4,
697
697
  tilt: Math.random() * 2 * Math.PI
698
- })), T = () => {
699
- a.clearRect(0, 0, o.width, o.height), b.forEach((c) => {
700
- a.fillStyle = c.color, a.beginPath(), a.ellipse(c.x, c.y, c.size, c.size / 2, c.tilt, 0, 2 * Math.PI), a.fill(), c.y += c.speed, c.x += Math.sin(c.tilt);
701
- }), Date.now() < r ? requestAnimationFrame(T) : document.body.removeChild(o);
698
+ })), k = () => {
699
+ d.clearRect(0, 0, o.width, o.height), v.forEach((u) => {
700
+ d.fillStyle = u.color, d.beginPath(), d.ellipse(u.x, u.y, u.size, u.size / 2, u.tilt, 0, 2 * Math.PI), d.fill(), u.y += u.speed, u.x += Math.sin(u.tilt);
701
+ }), Date.now() < i ? requestAnimationFrame(k) : document.body.removeChild(o);
702
702
  };
703
- T();
704
- }, Je = () => /* @__PURE__ */ s.jsxs("div", { style: g.gmCenterScreen, children: [
705
- /* @__PURE__ */ s.jsx("h1", { style: g.gmHeadline1, children: "MAGIC SENTENCE" }),
706
- /* @__PURE__ */ s.jsx("p", { style: g.gmBodyM, children: "Select number of rounds" }),
703
+ k();
704
+ }, Je = () => /* @__PURE__ */ s.jsxs("div", { style: h.gmCenterScreen, children: [
705
+ /* @__PURE__ */ s.jsx("h1", { style: h.gmHeadline1, children: "MAGIC SENTENCE" }),
706
+ /* @__PURE__ */ s.jsx("p", { style: h.gmBodyM, children: "Select number of rounds" }),
707
707
  /* @__PURE__ */ s.jsx("div", { style: {
708
708
  display: "flex",
709
- gap: p() ? "8px" : "16px",
709
+ gap: f() ? "8px" : "16px",
710
710
  justifyContent: "center"
711
711
  }, children: [3, 4, 5].map((n) => /* @__PURE__ */ s.jsxs(
712
712
  "button",
713
713
  {
714
714
  onClick: () => Be(n),
715
715
  style: {
716
- ...g.gmButton,
717
- ...S("medium")
716
+ ...h.gmButton,
717
+ ...D("medium")
718
718
  },
719
719
  children: [
720
720
  n,
@@ -723,20 +723,20 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
723
723
  },
724
724
  n
725
725
  )) })
726
- ] }), Ve = () => /* @__PURE__ */ s.jsxs("div", { style: g.gmCenterScreen, children: [
727
- /* @__PURE__ */ s.jsx("h1", { style: g.gmHeadline1, children: "MAGIC SENTENCE" }),
728
- /* @__PURE__ */ s.jsx("p", { style: g.gmBodyM, children: "Select time per round" }),
726
+ ] }), Ve = () => /* @__PURE__ */ s.jsxs("div", { style: h.gmCenterScreen, children: [
727
+ /* @__PURE__ */ s.jsx("h1", { style: h.gmHeadline1, children: "MAGIC SENTENCE" }),
728
+ /* @__PURE__ */ s.jsx("p", { style: h.gmBodyM, children: "Select time per round" }),
729
729
  /* @__PURE__ */ s.jsx("div", { style: {
730
730
  display: "flex",
731
- gap: p() ? "8px" : "16px",
731
+ gap: f() ? "8px" : "16px",
732
732
  justifyContent: "center"
733
733
  }, children: [15, 20, 30].map((n) => /* @__PURE__ */ s.jsxs(
734
734
  "button",
735
735
  {
736
- onClick: () => Le(n),
736
+ onClick: () => $e(n),
737
737
  style: {
738
- ...g.gmButton,
739
- ...S("medium")
738
+ ...h.gmButton,
739
+ ...D("medium")
740
740
  },
741
741
  children: [
742
742
  n,
@@ -745,15 +745,15 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
745
745
  },
746
746
  n
747
747
  )) })
748
- ] }), Xe = () => /* @__PURE__ */ s.jsxs("div", { style: g.gmCenterScreen, children: [
749
- /* @__PURE__ */ s.jsxs("h2", { style: { ...g.gmBodyM, marginBottom: "0px" }, children: [
748
+ ] }), Xe = () => /* @__PURE__ */ s.jsxs("div", { style: h.gmCenterScreen, children: [
749
+ /* @__PURE__ */ s.jsxs("h2", { style: { ...h.gmBodyM, marginBottom: "0px" }, children: [
750
750
  "Type down ",
751
- P,
751
+ H,
752
752
  " sentence",
753
- P && P > 1 ? "s" : "",
753
+ H && H > 1 ? "s" : "",
754
754
  " for your student"
755
755
  ] }),
756
- /* @__PURE__ */ s.jsx("p", { style: { ...g.gmBodyS, marginBottom: "16px", marginTop: "0px", color: "#6b7280" }, children: "Maximum 41 characters per sentence" }),
756
+ /* @__PURE__ */ s.jsx("p", { style: { ...h.gmBodyS, marginBottom: "16px", marginTop: "0px", color: "#6b7280" }, children: "Maximum 41 characters per sentence" }),
757
757
  /* @__PURE__ */ s.jsx("div", { style: {
758
758
  display: "flex",
759
759
  flexDirection: "column",
@@ -764,78 +764,78 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
764
764
  // Минимальная ширина по содержимому
765
765
  maxWidth: "600px"
766
766
  // Ограничиваем максимальную ширину
767
- }, children: H.map((n, r) => /* @__PURE__ */ s.jsx(
767
+ }, children: E.map((n, i) => /* @__PURE__ */ s.jsx(
768
768
  "input",
769
769
  {
770
770
  value: n,
771
- placeholder: `Sentence ${r + 1}`,
772
- onChange: (t) => $e(r, t.target.value),
771
+ placeholder: `Sentence ${i + 1}`,
772
+ onChange: (t) => Fe(i, t.target.value),
773
773
  style: {
774
- ...g.gmInput,
775
- padding: p() ? "8px 12px" : "12px 16px",
776
- fontSize: p() ? "14px" : "16px",
774
+ ...h.gmInput,
775
+ padding: f() ? "8px 12px" : "12px 16px",
776
+ fontSize: f() ? "14px" : "16px",
777
777
  width: "100%",
778
778
  // Поля теперь будут шире благодаря увеличенной ширине контейнера
779
779
  textAlign: "center"
780
780
  // Центрируем placeholder текст
781
781
  }
782
782
  },
783
- r
783
+ i
784
784
  )) }),
785
785
  /* @__PURE__ */ s.jsx(
786
786
  "button",
787
787
  {
788
- onClick: Ge,
789
- disabled: H.some((n) => n.trim().length === 0),
788
+ onClick: Ye,
789
+ disabled: E.some((n) => n.trim().length === 0),
790
790
  style: {
791
- ...g.gmButton,
791
+ ...h.gmButton,
792
792
  marginTop: 30,
793
- background: H.some((n) => n.trim().length === 0) ? "#ccc" : "#ec4c44",
794
- cursor: H.some((n) => n.trim().length === 0) ? "not-allowed" : "pointer",
795
- ...S("large")
793
+ background: E.some((n) => n.trim().length === 0) ? "#ccc" : "#ec4c44",
794
+ cursor: E.some((n) => n.trim().length === 0) ? "not-allowed" : "pointer",
795
+ ...D("large")
796
796
  },
797
797
  children: "PLAY"
798
798
  }
799
799
  )
800
- ] }), qe = () => /* @__PURE__ */ s.jsxs("div", { style: g.gmReadyWrapper, children: [
800
+ ] }), qe = () => /* @__PURE__ */ s.jsxs("div", { style: h.gmReadyWrapper, children: [
801
801
  /* @__PURE__ */ s.jsx("h1", { style: {
802
- ...g.gmHeadline1,
803
- fontSize: p() ? "36px" : "72px",
802
+ ...h.gmHeadline1,
803
+ fontSize: f() ? "36px" : "72px",
804
804
  color: "#ec4c44",
805
805
  marginBottom: "20px",
806
806
  animation: "pulse 1s ease-in-out infinite"
807
807
  }, children: "GET READY" }),
808
- /* @__PURE__ */ s.jsx("div", { style: g.gmHourglass, children: "⏳" })
809
- ] }), Ue = () => /* @__PURE__ */ s.jsxs("div", { style: g.gmGameLayout, children: [
808
+ /* @__PURE__ */ s.jsx("div", { style: h.gmHourglass, children: "⏳" })
809
+ ] }), Ze = () => /* @__PURE__ */ s.jsxs("div", { style: h.gmGameLayout, children: [
810
810
  /* @__PURE__ */ s.jsxs("h2", { style: {
811
- marginBottom: p() ? "5px" : "10px",
812
- fontSize: p() ? "16px" : "20px"
811
+ marginBottom: f() ? "5px" : "10px",
812
+ fontSize: f() ? "16px" : "20px"
813
813
  }, children: [
814
814
  "Round ",
815
- A + 1,
815
+ _ + 1,
816
816
  "/",
817
- P,
817
+ H,
818
818
  " — ",
819
- l ? "TIME'S UP!" : `Time: ${N}s`
819
+ c ? "TIME'S UP!" : `Time: ${z}s`
820
820
  ] }),
821
821
  /* @__PURE__ */ s.jsx(
822
822
  "div",
823
823
  {
824
824
  style: {
825
825
  width: "60%",
826
- height: p() ? "8px" : "14px",
826
+ height: f() ? "8px" : "14px",
827
827
  borderRadius: 8,
828
828
  background: "#eee",
829
829
  overflow: "hidden",
830
- marginBottom: p() ? "10px" : "20px"
830
+ marginBottom: f() ? "10px" : "20px"
831
831
  },
832
832
  children: /* @__PURE__ */ s.jsx(
833
833
  "div",
834
834
  {
835
835
  style: {
836
836
  height: "100%",
837
- width: `${N / (J || 20) * 100}%`,
838
- background: N <= 5 ? "#ec4c44" : "#4caf50",
837
+ width: `${z / (oe || 20) * 100}%`,
838
+ background: z <= 5 ? "#ec4c44" : "#4caf50",
839
839
  transition: "width 1s linear"
840
840
  }
841
841
  }
@@ -846,63 +846,63 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
846
846
  "div",
847
847
  {
848
848
  onDragOver: (n) => n.preventDefault(),
849
- onDrop: (n) => ye(n, "bank", null),
849
+ onDrop: (n) => be(n, "bank", null),
850
850
  style: {
851
851
  display: "flex",
852
- flexWrap: E() ? "wrap" : "nowrap",
853
- gap: i || window.innerWidth < 768 ? "6px" : "10px",
852
+ flexWrap: R() ? "wrap" : "nowrap",
853
+ gap: r || window.innerWidth < 768 ? "6px" : "10px",
854
854
  justifyContent: "center",
855
- marginBottom: i || window.innerWidth < 768 ? "15px" : "30px",
856
- padding: i || window.innerWidth < 768 ? "5px" : "10px",
855
+ marginBottom: r || window.innerWidth < 768 ? "15px" : "30px",
856
+ padding: r || window.innerWidth < 768 ? "5px" : "10px",
857
857
  width: "100%",
858
858
  boxSizing: "border-box"
859
859
  },
860
- children: de.map((n, r) => /* @__PURE__ */ s.jsx(
860
+ children: se.map((n, i) => /* @__PURE__ */ s.jsx(
861
861
  "div",
862
862
  {
863
- draggable: !l,
863
+ draggable: !c,
864
864
  role: "button",
865
- tabIndex: l ? -1 : 0,
866
- "aria-label": l ? `Word: ${n.text} (time expired)` : un("Drag word", n.text, "to build sentence"),
865
+ tabIndex: c ? -1 : 0,
866
+ "aria-label": c ? `Word: ${n.text} (time expired)` : pn("Drag word", n.text, "to build sentence"),
867
867
  onDragStart: (t) => {
868
- if (l) {
868
+ if (c) {
869
869
  t.preventDefault();
870
870
  return;
871
871
  }
872
872
  t.dataTransfer.setData(
873
873
  "application/x-token",
874
874
  JSON.stringify({ from: "bank", id: n.id })
875
- ), t.dataTransfer.setData("text/plain", n.id), X(`Dragging word: ${n.text}`);
875
+ ), t.dataTransfer.setData("text/plain", n.id), Y(`Dragging word: ${n.text}`);
876
876
  },
877
877
  onKeyDown: (t) => {
878
- l || pn(t, () => xe("bank", "selected", n.id, null));
878
+ c || fn(t, () => ye("bank", "selected", n.id, null));
879
879
  },
880
880
  onDragOver: (t) => t.preventDefault(),
881
881
  onDrop: (t) => {
882
- const o = t.currentTarget.getBoundingClientRect(), a = o.left + o.width / 2, b = t.clientX > a ? r + 1 : r;
883
- e({ list: null, index: null, side: null }), t.stopPropagation(), ye(t, "bank", b);
882
+ const o = t.currentTarget.getBoundingClientRect(), d = o.left + o.width / 2, v = t.clientX > d ? i + 1 : i;
883
+ a({ list: null, index: null, side: null }), t.stopPropagation(), be(t, "bank", v);
884
884
  },
885
885
  onDragEnter: (t) => {
886
- if (l) return;
887
- const o = t.currentTarget.getBoundingClientRect(), a = o.left + o.width / 2;
888
- e({ list: "bank", index: r, side: t.clientX > a ? "right" : "left" });
886
+ if (c) return;
887
+ const o = t.currentTarget.getBoundingClientRect(), d = o.left + o.width / 2;
888
+ a({ list: "bank", index: i, side: t.clientX > d ? "right" : "left" });
889
889
  },
890
- onDragLeave: () => e({ list: null, index: null, side: null }),
890
+ onDragLeave: () => a({ list: null, index: null, side: null }),
891
891
  onClick: () => {
892
- l || xe("bank", "selected", n.id, null);
892
+ c || ye("bank", "selected", n.id, null);
893
893
  },
894
894
  style: {
895
- padding: i || window.innerWidth < 768 ? "6px 10px" : "10px 16px",
896
- borderRadius: i || window.innerWidth < 768 ? "6px" : "10px",
895
+ padding: r || window.innerWidth < 768 ? "6px 10px" : "10px 16px",
896
+ borderRadius: r || window.innerWidth < 768 ? "6px" : "10px",
897
897
  border: "1px solid #ccc",
898
- background: l ? "#f0f0f0" : "#f9f9f9",
899
- cursor: l ? "not-allowed" : "pointer",
900
- fontSize: i || window.innerWidth < 768 ? "12px" : "18px",
901
- borderLeft: I.list === "bank" && I.index === r && I.side === "left" ? "3px solid #3b82f6" : "1px solid #ccc",
902
- borderRight: I.list === "bank" && I.index === r && I.side === "right" ? "3px solid #3b82f6" : "1px solid #ccc",
898
+ background: c ? "#f0f0f0" : "#f9f9f9",
899
+ cursor: c ? "not-allowed" : "pointer",
900
+ fontSize: r || window.innerWidth < 768 ? "12px" : "18px",
901
+ borderLeft: e.list === "bank" && e.index === i && e.side === "left" ? "3px solid #3b82f6" : "1px solid #ccc",
902
+ borderRight: e.list === "bank" && e.index === i && e.side === "right" ? "3px solid #3b82f6" : "1px solid #ccc",
903
903
  flexShrink: 0,
904
904
  flexBasis: "auto",
905
- opacity: l ? 0.6 : 1,
905
+ opacity: c ? 0.6 : 1,
906
906
  transition: "opacity 0.3s ease"
907
907
  },
908
908
  children: n.text
@@ -915,33 +915,33 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
915
915
  "div",
916
916
  {
917
917
  onDragOver: (n) => n.preventDefault(),
918
- onDrop: (n) => ye(n, "selected", null),
918
+ onDrop: (n) => be(n, "selected", null),
919
919
  style: {
920
- minHeight: i || window.innerWidth < 768 ? "50px" : "70px",
920
+ minHeight: r || window.innerWidth < 768 ? "50px" : "70px",
921
921
  width: "auto",
922
922
  // Автоматическая ширина в зависимости от содержимого
923
923
  maxWidth: "none",
924
924
  // Убираем ограничение максимальной ширины
925
925
  minWidth: "245px",
926
926
  // Минимальная ширина для растягивания
927
- border: O === "correct" ? "2px dashed #4caf50" : O === "almost" ? "2px dashed #ff9800" : O === "wrong" ? "2px dashed #f44336" : "2px dashed #ccc",
928
- borderRadius: i || window.innerWidth < 768 ? "8px" : "12px",
929
- padding: i || window.innerWidth < 768 ? "8px" : "12px",
927
+ border: M === "correct" ? "2px dashed #4caf50" : M === "almost" ? "2px dashed #ff9800" : M === "wrong" ? "2px dashed #f44336" : "2px dashed #ccc",
928
+ borderRadius: r || window.innerWidth < 768 ? "8px" : "12px",
929
+ padding: r || window.innerWidth < 768 ? "8px" : "12px",
930
930
  display: "flex",
931
- flexWrap: E() ? "wrap" : "nowrap",
931
+ flexWrap: R() ? "wrap" : "nowrap",
932
932
  alignItems: "center",
933
933
  justifyContent: "center",
934
934
  fontSize: `${Te(j.length)}px`,
935
- background: O === "correct" ? "#e8f5e8" : O === "almost" ? "#fff3e0" : O === "wrong" ? "#ffebee" : "#fafafa",
936
- overflowX: E() ? "hidden" : "auto",
937
- whiteSpace: E() ? "normal" : "nowrap"
935
+ background: M === "correct" ? "#e8f5e8" : M === "almost" ? "#fff3e0" : M === "wrong" ? "#ffebee" : "#fafafa",
936
+ overflowX: R() ? "hidden" : "auto",
937
+ whiteSpace: R() ? "normal" : "nowrap"
938
938
  },
939
- children: j.map((n, r) => /* @__PURE__ */ s.jsx(
939
+ children: j.map((n, i) => /* @__PURE__ */ s.jsx(
940
940
  "span",
941
941
  {
942
- draggable: !l,
942
+ draggable: !c,
943
943
  onDragStart: (t) => {
944
- if (l) {
944
+ if (c) {
945
945
  t.preventDefault();
946
946
  return;
947
947
  }
@@ -952,28 +952,28 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
952
952
  },
953
953
  onDragOver: (t) => t.preventDefault(),
954
954
  onDrop: (t) => {
955
- const o = t.currentTarget.getBoundingClientRect(), a = o.left + o.width / 2, b = t.clientX > a ? r + 1 : r;
956
- e({ list: null, index: null, side: null }), t.stopPropagation(), ye(t, "selected", b);
955
+ const o = t.currentTarget.getBoundingClientRect(), d = o.left + o.width / 2, v = t.clientX > d ? i + 1 : i;
956
+ a({ list: null, index: null, side: null }), t.stopPropagation(), be(t, "selected", v);
957
957
  },
958
958
  onDragEnter: (t) => {
959
- if (l) return;
960
- const o = t.currentTarget.getBoundingClientRect(), a = o.left + o.width / 2;
961
- e({ list: "selected", index: r, side: t.clientX > a ? "right" : "left" });
959
+ if (c) return;
960
+ const o = t.currentTarget.getBoundingClientRect(), d = o.left + o.width / 2;
961
+ a({ list: "selected", index: i, side: t.clientX > d ? "right" : "left" });
962
962
  },
963
- onDragLeave: () => e({ list: null, index: null, side: null }),
963
+ onDragLeave: () => a({ list: null, index: null, side: null }),
964
964
  onClick: () => {
965
- l || xe("selected", "bank", n.id, null);
965
+ c || ye("selected", "bank", n.id, null);
966
966
  },
967
- title: l ? "Time expired" : "Click to remove back to bank",
967
+ title: c ? "Time expired" : "Click to remove back to bank",
968
968
  style: {
969
- padding: p() ? "4px 6px" : "6px 10px",
970
- margin: p() ? "2px" : "4px",
971
- borderRadius: p() ? "4px" : "8px",
972
- background: l ? "#f0f0f0" : "#ffe9e7",
973
- border: l ? "1px solid #ccc" : "1px solid #ec4c44",
974
- borderLeft: I.list === "selected" && I.index === r && I.side === "left" ? "3px solid #3b82f6" : void 0,
975
- borderRight: I.list === "selected" && I.index === r && I.side === "right" ? "3px solid #3b82f6" : void 0,
976
- cursor: l ? "not-allowed" : "pointer",
969
+ padding: f() ? "4px 6px" : "6px 10px",
970
+ margin: f() ? "2px" : "4px",
971
+ borderRadius: f() ? "4px" : "8px",
972
+ background: c ? "#f0f0f0" : "#ffe9e7",
973
+ border: c ? "1px solid #ccc" : "1px solid #ec4c44",
974
+ borderLeft: e.list === "selected" && e.index === i && e.side === "left" ? "3px solid #3b82f6" : void 0,
975
+ borderRight: e.list === "selected" && e.index === i && e.side === "right" ? "3px solid #3b82f6" : void 0,
976
+ cursor: c ? "not-allowed" : "pointer",
977
977
  userSelect: "none",
978
978
  fontSize: `${Te(j.length)}px`,
979
979
  // Адаптивный размер шрифта для слов
@@ -981,7 +981,7 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
981
981
  // Более плотный шрифт
982
982
  whiteSpace: "nowrap",
983
983
  // Запрещаем перенос слов
984
- opacity: l ? 0.6 : 1,
984
+ opacity: c ? 0.6 : 1,
985
985
  transition: "opacity 0.3s ease"
986
986
  },
987
987
  children: n.text
@@ -993,65 +993,65 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
993
993
  /* @__PURE__ */ s.jsx(
994
994
  "button",
995
995
  {
996
- onClick: () => Ye(!0),
997
- disabled: !l && j.length === 0,
996
+ onClick: () => Ue(!0),
997
+ disabled: !c && j.length === 0,
998
998
  style: {
999
- marginTop: p() ? "15px" : "30px",
1000
- fontSize: p() ? "14px" : "20px",
1001
- padding: p() ? "6px 12px" : "10px 24px",
1002
- borderRadius: p() ? "8px" : "12px",
1003
- background: l || j.length > 0 ? "#ec4c44" : "#ccc",
999
+ marginTop: f() ? "15px" : "30px",
1000
+ fontSize: f() ? "14px" : "20px",
1001
+ padding: f() ? "6px 12px" : "10px 24px",
1002
+ borderRadius: f() ? "8px" : "12px",
1003
+ background: c || j.length > 0 ? "#ec4c44" : "#ccc",
1004
1004
  color: "white",
1005
1005
  border: "none",
1006
- cursor: l || j.length > 0 ? "pointer" : "not-allowed"
1006
+ cursor: c || j.length > 0 ? "pointer" : "not-allowed"
1007
1007
  },
1008
1008
  children: "NEXT"
1009
1009
  }
1010
1010
  )
1011
- ] }), Ze = () => /* @__PURE__ */ s.jsxs("div", { style: g.gmCenterScreen, children: [
1011
+ ] }), Qe = () => /* @__PURE__ */ s.jsxs("div", { style: h.gmCenterScreen, children: [
1012
1012
  /* @__PURE__ */ s.jsx("h1", { style: {
1013
- ...g.gmHeadline1,
1014
- marginTop: (i && 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 || F || K || ee || ne || te || ie || re || oe, "0px"),
1015
- marginBottom: i && 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 || F || K || ee || ne || te || ie || re || oe ? "2px" : "10px",
1016
- fontSize: i && 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 ? "32px" : "clamp(28px, 4vw, 40px)"
1013
+ ...h.gmHeadline1,
1014
+ marginTop: (r && 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 || q || Z || Q || K || ee || ne || te || ie, "0px"),
1015
+ marginBottom: r && 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 || q || Z || Q || K || ee || ne || te || ie ? "2px" : "10px",
1016
+ fontSize: r && 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 ? "32px" : "clamp(28px, 4vw, 40px)"
1017
1017
  }, children: "Game Over 🎯" }),
1018
1018
  /* @__PURE__ */ s.jsxs("h2", { style: {
1019
- ...g.gmHeadline2,
1020
- marginTop: (i && 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 || F || K || ee || ne || te || ie || re || oe, "0px"),
1021
- marginBottom: i && 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 || F || K || ee || ne || te || ie || re || oe ? "2px" : "16px",
1022
- fontSize: i && 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 ? "18px" : "24px"
1019
+ ...h.gmHeadline2,
1020
+ marginTop: (r && 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 || q || Z || Q || K || ee || ne || te || ie, "0px"),
1021
+ marginBottom: r && 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 || q || Z || Q || K || ee || ne || te || ie ? "2px" : "16px",
1022
+ fontSize: r && 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 ? "18px" : "24px"
1023
1023
  }, children: [
1024
1024
  "Your score: ",
1025
- _,
1025
+ $,
1026
1026
  " out of ",
1027
- P
1027
+ H
1028
1028
  ] }),
1029
1029
  /* @__PURE__ */ s.jsxs("p", { style: {
1030
- ...g.gmBodyM,
1030
+ ...h.gmBodyM,
1031
1031
  color: "#10b981",
1032
- marginTop: i && 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 || F || K || ee || ne || te || ie || re || oe ? "0px" : "12px",
1033
- marginBottom: i && 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 || F || K || ee || ne || te || ie || re || oe ? "2px" : "16px",
1034
- fontSize: i && 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"
1032
+ marginTop: r && 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 || q || Z || Q || K || ee || ne || te || ie ? "0px" : "12px",
1033
+ marginBottom: r && 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 || q || Z || Q || K || ee || ne || te || ie ? "2px" : "16px",
1034
+ fontSize: r && 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"
1035
1035
  }, children: [
1036
1036
  "Best score: ",
1037
- Z
1037
+ X
1038
1038
  ] }),
1039
1039
  /* @__PURE__ */ s.jsxs("div", { style: {
1040
1040
  display: "flex",
1041
- gap: i && window.innerWidth > window.innerHeight || i && 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",
1042
- marginTop: i && window.innerWidth > window.innerHeight || i && 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 || $ ? "12px" : "24px"
1041
+ gap: r && window.innerWidth > window.innerHeight || r && 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",
1042
+ marginTop: r && window.innerWidth > window.innerHeight || r && 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 || ce ? "12px" : "24px"
1043
1043
  }, children: [
1044
1044
  /* @__PURE__ */ s.jsx(
1045
1045
  "button",
1046
1046
  {
1047
1047
  onClick: () => {
1048
- Se(), G("start"), setTimeout(() => {
1049
- W("getready"), U(null), V(!1);
1048
+ We(), N("start"), setTimeout(() => {
1049
+ I("getready"), de(null), F(!1);
1050
1050
  }, 800);
1051
1051
  },
1052
1052
  style: {
1053
- ...g.gmButton,
1054
- ...S("medium")
1053
+ ...h.gmButton,
1054
+ ...D("medium")
1055
1055
  },
1056
1056
  children: "🔁 Play again"
1057
1057
  }
@@ -1060,38 +1060,38 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
1060
1060
  "button",
1061
1061
  {
1062
1062
  onClick: () => {
1063
- G("click"), W("select"), Y(null), ae(null), M([]), q(0), le([]), V(!1);
1063
+ N("click"), I("select"), B(null), ge(null), U([]), V(0), ae([]), F(!1);
1064
1064
  },
1065
1065
  style: {
1066
- ...g.gmButton,
1067
- ...S("medium")
1066
+ ...h.gmButton,
1067
+ ...D("medium")
1068
1068
  },
1069
1069
  children: "⬅️ Exit"
1070
1070
  }
1071
1071
  )
1072
1072
  ] })
1073
- ] }), Qe = rn(
1073
+ ] }), Ke = on(
1074
1074
  () => {
1075
- let n = u;
1076
- return !n && m && (n = `${m.endsWith("/") ? m.slice(0, -1) : m}/logo.svg`), /* @__PURE__ */ s.jsx("div", { style: {
1077
- ...g.gmLogoFixed,
1078
- display: !d || i && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "none" : "block"
1075
+ let n = l;
1076
+ return n || (T ? n = `${T.endsWith("/") ? T.slice(0, -1) : T}/logo.svg` : n = `${window.origin}/browser/speakid/games/magic%20sentence/logo.svg`), /* @__PURE__ */ s.jsx("div", { style: {
1077
+ ...h.gmLogoFixed,
1078
+ display: !S || r && window.innerWidth > window.innerHeight || window.innerHeight < 700 ? "none" : "block"
1079
1079
  }, children: n ? /* @__PURE__ */ s.jsx(
1080
1080
  "img",
1081
1081
  {
1082
1082
  src: n,
1083
1083
  alt: "SPEAKID Logo",
1084
- style: g.gmLogoImg,
1084
+ style: h.gmLogoImg,
1085
1085
  loading: "lazy"
1086
1086
  }
1087
- ) : /* @__PURE__ */ s.jsx("div", { style: g.gmLogoImg, children: "SPEAKID" }) });
1087
+ ) : /* @__PURE__ */ s.jsx("div", { style: h.gmLogoImg, children: "SPEAKID" }) });
1088
1088
  },
1089
- [i, d, u, m]
1089
+ [r, S, l, T]
1090
1090
  );
1091
1091
  return /* @__PURE__ */ s.jsx(
1092
1092
  "div",
1093
1093
  {
1094
- ref: D,
1094
+ ref: W,
1095
1095
  style: {
1096
1096
  width: "100%",
1097
1097
  height: "100%",
@@ -1111,16 +1111,16 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
1111
1111
  "div",
1112
1112
  {
1113
1113
  style: {
1114
- width: i ? "100%" : Q || 1e3,
1115
- height: i ? "100%" : Q || 1e3,
1114
+ width: r ? "100%" : x || 1e3,
1115
+ height: r ? "100%" : x || 1e3,
1116
1116
  display: "flex",
1117
1117
  justifyContent: "center",
1118
1118
  alignItems: "center",
1119
1119
  overflow: "hidden",
1120
- borderRadius: i ? 0 : "20px",
1120
+ borderRadius: r ? 0 : "20px",
1121
1121
  background: "linear-gradient(to bottom, #fff8f8 0%, #f9fafb 100%)",
1122
- boxShadow: i ? "none" : "0 0 40px rgba(0,0,0,0.1)",
1123
- margin: i ? "0 auto" : "unset",
1122
+ boxShadow: r ? "none" : "0 0 40px rgba(0,0,0,0.1)",
1123
+ margin: r ? "0 auto" : "unset",
1124
1124
  position: "relative"
1125
1125
  },
1126
1126
  children: /* @__PURE__ */ s.jsx(
@@ -1135,13 +1135,13 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
1135
1135
  alignItems: "center"
1136
1136
  },
1137
1137
  children: /* @__PURE__ */ s.jsxs("div", { id: "magic-sentence-root", children: [
1138
- !i && Qe,
1139
- k === "select" && Je(),
1140
- k === "time" && Ve(),
1141
- k === "type" && Xe(),
1142
- k === "getready" && qe(),
1143
- k === "play" && Ue(),
1144
- k === "results" && Ze()
1138
+ !r && Ke,
1139
+ y === "select" && Je(),
1140
+ y === "time" && Ve(),
1141
+ y === "type" && Xe(),
1142
+ y === "getready" && qe(),
1143
+ y === "play" && Ze(),
1144
+ y === "results" && Qe()
1145
1145
  ] })
1146
1146
  }
1147
1147
  )
@@ -1150,20 +1150,20 @@ function mn({ logoUrl: u, showLogo: d = !0, baseURL: m } = {}) {
1150
1150
  }
1151
1151
  );
1152
1152
  }
1153
- class wn extends on {
1154
- constructor(d) {
1155
- super(d), this.state = { hasError: !1 };
1153
+ class xn extends sn {
1154
+ constructor(l) {
1155
+ super(l), this.state = { hasError: !1 };
1156
1156
  }
1157
- static getDerivedStateFromError(d) {
1157
+ static getDerivedStateFromError(l) {
1158
1158
  return {
1159
1159
  hasError: !0,
1160
- error: d
1160
+ error: l
1161
1161
  };
1162
1162
  }
1163
- componentDidCatch(d, m) {
1164
- console.error("Game Error:", d, m), this.setState({
1165
- error: d,
1166
- errorInfo: m
1163
+ componentDidCatch(l, S) {
1164
+ console.error("Game Error:", l, S), this.setState({
1165
+ error: l,
1166
+ errorInfo: S
1167
1167
  });
1168
1168
  }
1169
1169
  handleReset = () => {
@@ -1198,8 +1198,8 @@ class wn extends on {
1198
1198
  cursor: "pointer",
1199
1199
  transition: "background-color 0.2s"
1200
1200
  },
1201
- onMouseOver: (d) => d.currentTarget.style.backgroundColor = "#b91c1c",
1202
- onMouseOut: (d) => d.currentTarget.style.backgroundColor = "#dc2626",
1201
+ onMouseOver: (l) => l.currentTarget.style.backgroundColor = "#b91c1c",
1202
+ onMouseOut: (l) => l.currentTarget.style.backgroundColor = "#dc2626",
1203
1203
  children: "🔄 Restart Game"
1204
1204
  }
1205
1205
  ),
@@ -1221,12 +1221,12 @@ class wn extends on {
1221
1221
  }
1222
1222
  }
1223
1223
  export {
1224
- wn as ErrorBoundary,
1225
- mn as Game,
1226
- X as announceToScreenReader,
1227
- un as createAriaLabel,
1228
- mn as default,
1229
- pn as handleKeyDown,
1230
- cn as useValidation
1224
+ xn as ErrorBoundary,
1225
+ wn as Game,
1226
+ Y as announceToScreenReader,
1227
+ pn as createAriaLabel,
1228
+ wn as default,
1229
+ fn as handleKeyDown,
1230
+ un as useValidation
1231
1231
  };
1232
1232
  //# sourceMappingURL=speakid-build-a-sentence.es.js.map