@scrabble-solver/scrabble-solver 2.8.5 → 2.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +7 -7
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_8dgz12 +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/515.js +19 -8
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/pages/_app.js +3 -2
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/api/solve.js +5 -2
- package/.next/server/pages/index.html +3 -3
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/static/{TzKQ3IntkvaYmHBkWpfoi → VjSpyGDWyVaO0muz54q_j}/_buildManifest.js +1 -1
- package/.next/static/{TzKQ3IntkvaYmHBkWpfoi → VjSpyGDWyVaO0muz54q_j}/_ssgManifest.js +0 -0
- package/.next/static/chunks/56-e2797384ae4b0fc0.js +1 -0
- package/.next/static/chunks/pages/_app-5136d33b9b007fd7.js +1 -0
- package/.next/static/css/729bb37fe8f9bee6.css +1 -0
- package/.next/trace +42 -42
- package/package.json +9 -9
- package/src/components/Board/Board.tsx +3 -1
- package/src/components/Board/BoardPure.tsx +4 -1
- package/src/components/Board/components/Cell/Cell.module.scss +28 -11
- package/src/components/Board/components/Cell/Cell.tsx +12 -1
- package/src/components/Board/components/Cell/CellPure.tsx +3 -1
- package/src/components/Board/components/Cell/lib.ts +10 -2
- package/src/pages/_app.tsx +6 -3
- package/.next/static/chunks/56-2d34867599a0ac66.js +0 -1
- package/.next/static/chunks/pages/_app-6ffa2ab900772b67.js +0 -1
- package/.next/static/css/551d09cac435debb.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/scrabble-solver",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.6",
|
|
4
4
|
"description": "Scrabble Solver 2 - App",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16"
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@popperjs/core": "^2.11.6",
|
|
32
32
|
"@reduxjs/toolkit": "^1.8.5",
|
|
33
|
-
"@scrabble-solver/configs": "^2.8.
|
|
34
|
-
"@scrabble-solver/constants": "^2.8.
|
|
35
|
-
"@scrabble-solver/dictionaries": "^2.8.
|
|
36
|
-
"@scrabble-solver/logger": "^2.8.
|
|
37
|
-
"@scrabble-solver/solver": "^2.8.
|
|
38
|
-
"@scrabble-solver/types": "^2.8.
|
|
39
|
-
"@scrabble-solver/word-definitions": "^2.8.
|
|
33
|
+
"@scrabble-solver/configs": "^2.8.6",
|
|
34
|
+
"@scrabble-solver/constants": "^2.8.6",
|
|
35
|
+
"@scrabble-solver/dictionaries": "^2.8.6",
|
|
36
|
+
"@scrabble-solver/logger": "^2.8.6",
|
|
37
|
+
"@scrabble-solver/solver": "^2.8.6",
|
|
38
|
+
"@scrabble-solver/types": "^2.8.6",
|
|
39
|
+
"@scrabble-solver/word-definitions": "^2.8.6",
|
|
40
40
|
"classnames": "^2.3.2",
|
|
41
41
|
"next": "^12.3.1",
|
|
42
42
|
"normalize.css": "^8.0.1",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"env-cmd": "^10.1.0",
|
|
69
69
|
"sass": "^1.55.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "ec130aa77ac64b91ab82e79f130eb69ac561fffa"
|
|
72
72
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent, Ref } from 'react';
|
|
2
2
|
|
|
3
|
-
import { selectRowsWithCandidate, useTypedSelector } from 'state';
|
|
3
|
+
import { selectBoard, selectRowsWithCandidate, useTypedSelector } from 'state';
|
|
4
4
|
|
|
5
5
|
import BoardPure from './BoardPure';
|
|
6
6
|
import { useGrid } from './hooks';
|
|
@@ -13,12 +13,14 @@ interface Props {
|
|
|
13
13
|
|
|
14
14
|
const Board: FunctionComponent<Props> = ({ cellSize, className, innerRef }) => {
|
|
15
15
|
const rows = useTypedSelector(selectRowsWithCandidate);
|
|
16
|
+
const board = useTypedSelector(selectBoard);
|
|
16
17
|
const [{ lastDirection, refs }, { onDirectionToggle, onFocus, onKeyDown }] = useGrid(rows);
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<BoardPure
|
|
20
21
|
className={className}
|
|
21
22
|
cellSize={cellSize}
|
|
23
|
+
center={board.center}
|
|
22
24
|
innerRef={innerRef}
|
|
23
25
|
lastDirection={lastDirection}
|
|
24
26
|
refs={refs}
|
|
@@ -8,6 +8,7 @@ import { Cell as CellComponent } from './components';
|
|
|
8
8
|
interface Props {
|
|
9
9
|
className?: string;
|
|
10
10
|
cellSize: number;
|
|
11
|
+
center: Cell;
|
|
11
12
|
innerRef?: Ref<HTMLDivElement>;
|
|
12
13
|
lastDirection: 'horizontal' | 'vertical';
|
|
13
14
|
refs: RefObject<HTMLInputElement>[][];
|
|
@@ -19,11 +20,12 @@ interface Props {
|
|
|
19
20
|
|
|
20
21
|
const BoardPure: FunctionComponent<Props> = ({
|
|
21
22
|
className,
|
|
23
|
+
cellSize,
|
|
24
|
+
center,
|
|
22
25
|
innerRef,
|
|
23
26
|
lastDirection,
|
|
24
27
|
refs,
|
|
25
28
|
rows,
|
|
26
|
-
cellSize,
|
|
27
29
|
onDirectionToggle,
|
|
28
30
|
onFocus,
|
|
29
31
|
onKeyDown,
|
|
@@ -37,6 +39,7 @@ const BoardPure: FunctionComponent<Props> = ({
|
|
|
37
39
|
cell={cell}
|
|
38
40
|
direction={lastDirection}
|
|
39
41
|
inputRef={refs[y][x]}
|
|
42
|
+
isCenter={center.x === x && center.y === y}
|
|
40
43
|
key={x}
|
|
41
44
|
size={cellSize}
|
|
42
45
|
onDirectionToggle={onDirectionToggle}
|
|
@@ -13,6 +13,34 @@ $icon-size: 16px;
|
|
|
13
13
|
transition: var(--transition);
|
|
14
14
|
background-clip: padding-box;
|
|
15
15
|
|
|
16
|
+
&.bonusStart,
|
|
17
|
+
&.bonusWord2,
|
|
18
|
+
&.bonusWord3 {
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
&:before {
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
right: 0;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.bonusStart {
|
|
36
|
+
background-color: var(--color--red--light);
|
|
37
|
+
|
|
38
|
+
&:before {
|
|
39
|
+
content: '★';
|
|
40
|
+
color: var(--color--foreground--secondary);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
16
44
|
&.bonusCharacter1 {
|
|
17
45
|
background-color: var(--color--yellow--light);
|
|
18
46
|
}
|
|
@@ -39,22 +67,11 @@ $icon-size: 16px;
|
|
|
39
67
|
|
|
40
68
|
&.bonusWord2,
|
|
41
69
|
&.bonusWord3 {
|
|
42
|
-
position: relative;
|
|
43
70
|
background-color: var(--color--inactive);
|
|
44
71
|
|
|
45
72
|
&:before {
|
|
46
|
-
display: flex;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
align-items: center;
|
|
49
|
-
position: absolute;
|
|
50
|
-
top: 0;
|
|
51
|
-
bottom: 0;
|
|
52
|
-
left: 0;
|
|
53
|
-
right: 0;
|
|
54
73
|
font-size: 75%;
|
|
55
|
-
font-weight: bold;
|
|
56
74
|
color: white;
|
|
57
|
-
pointer-events: none;
|
|
58
75
|
}
|
|
59
76
|
}
|
|
60
77
|
|
|
@@ -13,12 +13,22 @@ interface Props {
|
|
|
13
13
|
className?: string;
|
|
14
14
|
direction: 'horizontal' | 'vertical';
|
|
15
15
|
inputRef: RefObject<HTMLInputElement>;
|
|
16
|
+
isCenter: boolean;
|
|
16
17
|
size: number;
|
|
17
18
|
onDirectionToggle: () => void;
|
|
18
19
|
onFocus: (x: number, y: number) => void;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
const Cell: FunctionComponent<Props> = ({
|
|
22
|
+
const Cell: FunctionComponent<Props> = ({
|
|
23
|
+
cell,
|
|
24
|
+
className,
|
|
25
|
+
direction,
|
|
26
|
+
inputRef,
|
|
27
|
+
isCenter,
|
|
28
|
+
size,
|
|
29
|
+
onDirectionToggle,
|
|
30
|
+
onFocus,
|
|
31
|
+
}) => {
|
|
22
32
|
const { tile, x, y } = cell;
|
|
23
33
|
const dispatch = useDispatch();
|
|
24
34
|
const translate = useTranslate();
|
|
@@ -53,6 +63,7 @@ const Cell: FunctionComponent<Props> = ({ cell, className, direction, inputRef,
|
|
|
53
63
|
className={className}
|
|
54
64
|
direction={direction}
|
|
55
65
|
inputRef={inputRef}
|
|
66
|
+
isCenter={isCenter}
|
|
56
67
|
isEmpty={isEmpty}
|
|
57
68
|
points={points}
|
|
58
69
|
size={size}
|
|
@@ -17,6 +17,7 @@ interface Props {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
direction: 'horizontal' | 'vertical';
|
|
19
19
|
inputRef: RefObject<HTMLInputElement>;
|
|
20
|
+
isCenter: boolean;
|
|
20
21
|
isEmpty: boolean;
|
|
21
22
|
points?: number;
|
|
22
23
|
size: number;
|
|
@@ -34,6 +35,7 @@ const CellPure: FunctionComponent<Props> = ({
|
|
|
34
35
|
className,
|
|
35
36
|
direction,
|
|
36
37
|
inputRef,
|
|
38
|
+
isCenter,
|
|
37
39
|
isEmpty,
|
|
38
40
|
points,
|
|
39
41
|
size,
|
|
@@ -45,7 +47,7 @@ const CellPure: FunctionComponent<Props> = ({
|
|
|
45
47
|
onToggleBlankClick,
|
|
46
48
|
}) => (
|
|
47
49
|
<div
|
|
48
|
-
className={classNames(styles.cell, getBonusClassname(cell, bonus), className, {
|
|
50
|
+
className={classNames(styles.cell, getBonusClassname(cell, bonus, isCenter), className, {
|
|
49
51
|
[styles.candidate]: cell.isCandidate(),
|
|
50
52
|
})}
|
|
51
53
|
style={style}
|
|
@@ -20,8 +20,16 @@ const CHARACTER_MULTIPLIER_CLASSNAMES: Record<number, string> = {
|
|
|
20
20
|
3: styles.bonusCharacterMultiplier3,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
export const getBonusClassname = (cell: Cell, bonus: Bonus | undefined): string | undefined => {
|
|
24
|
-
if (!
|
|
23
|
+
export const getBonusClassname = (cell: Cell, bonus: Bonus | undefined, isCenter: boolean): string | undefined => {
|
|
24
|
+
if (!cell.isEmpty) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (isCenter) {
|
|
29
|
+
return styles.bonusStart;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!bonus) {
|
|
25
33
|
return undefined;
|
|
26
34
|
}
|
|
27
35
|
|
package/src/pages/_app.tsx
CHANGED
|
@@ -7,7 +7,9 @@ import { createAppStore } from 'state';
|
|
|
7
7
|
|
|
8
8
|
import 'styles/global.scss';
|
|
9
9
|
|
|
10
|
-
const DESCRIPTION =
|
|
10
|
+
const DESCRIPTION =
|
|
11
|
+
// eslint-disable-next-line max-len
|
|
12
|
+
'Scrabble Solver 2 - Free and open-source analysis tool for Scrabble and Literaki. Quickly find top scoring words using given letters and board state. Available in English, French, German, Polish & Spanish.';
|
|
11
13
|
const KEYWORDS = [
|
|
12
14
|
'Scrabble',
|
|
13
15
|
'Solver',
|
|
@@ -54,8 +56,9 @@ const App: FunctionComponent<AppProps> = ({ Component, pageProps }) => (
|
|
|
54
56
|
|
|
55
57
|
<Provider store={store}>
|
|
56
58
|
<p style={{ fontSize: 0 }}>
|
|
57
|
-
Scrabble Solver 2 is
|
|
58
|
-
English, French, German, Polish &
|
|
59
|
+
Scrabble Solver 2 is a free and open-source analysis tool for Scrabble and Literaki. Quickly find top scoring
|
|
60
|
+
words using given letters and board state. Available in English, French, German, Polish & Spanish. Source code
|
|
61
|
+
is available on GitHub - contributions are welcome!
|
|
59
62
|
</p>
|
|
60
63
|
<Component {...pageProps} />
|
|
61
64
|
</Provider>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[56],{3056:function(e,t,n){"use strict";n.d(t,{$l:function(){return jt},Xy:function(){return Qt},Z$:function(){return $t},d4:function(){return On},TR:function(){return Bn},_m:function(){return zn},TX:function(){return An},F4:function(){return qn},fs:function(){return $n},u9:function(){return ha},Zr:function(){return Oa},hX:function(){return Za},tW:function(){return Ra}});var a,r=n(828),o=n(5893),s=n(3322),i=n(4184),l=n.n(i),c=n(7294),u=n(2761),d=n.n(u),h=n(7618),p=n(9473),f=n(8729),m=n(4924);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_.apply(this,arguments)}var v,g=function(e){return c.createElement("svg",_({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),a||(a=c.createElement("path",{d:"M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z",fill:"currentColor",fillRule:"evenodd"})))};function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},x.apply(this,arguments)}var b,y=function(e){return c.createElement("svg",x({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),v||(v=c.createElement("path",{d:"M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z",fill:"currentColor",fillRule:"evenodd"})))};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},j.apply(this,arguments)}var w,N=function(e){return c.createElement("svg",j({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),b||(b=c.createElement("path",{d:"M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z",fill:"currentColor",fillRule:"evenodd"})))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C.apply(this,arguments)}var M=function(e){return c.createElement("svg",C({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),w||(w=c.createElement("path",{d:"M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z",fill:"currentColor",fillRule:"evenodd"})))};var k;function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},E.apply(this,arguments)}var O,S=function(e){return c.createElement("svg",E({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),k||(k=c.createElement("path",{d:"M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z",fill:"currentColor"})))};function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},B.apply(this,arguments)}var Z,I=function(e){return c.createElement("svg",B({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),O||(O=c.createElement("path",{d:"M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm3.354 4.646L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 1 1 .708-.708z",fill:"currentColor"})))};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},z.apply(this,arguments)}var R,L=function(e){return c.createElement("svg",z({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),Z||(Z=c.createElement("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-7z",fill:"currentColor"})))};function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},T.apply(this,arguments)}var F,P,A=function(e){return c.createElement("svg",T({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),R||(R=c.createElement("path",{d:"M8.086 2.207a2 2 0 0 1 2.828 0l3.879 3.879a2 2 0 0 1 0 2.828l-5.5 5.5A2 2 0 0 1 7.879 15H5.12a2 2 0 0 1-1.414-.586l-2.5-2.5a2 2 0 0 1 0-2.828l6.879-6.879zm.66 11.34L3.453 8.254 1.914 9.793a1 1 0 0 0 0 1.414l2.5 2.5a1 1 0 0 0 .707.293H7.88a1 1 0 0 0 .707-.293l.16-.16z",fill:"currentColor"})))};function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},D.apply(this,arguments)}var K,V,q,U=function(e){return c.createElement("svg",D({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 750 500",role:"img"},e),F||(F=c.createElement("path",{fill:"#c60b1e",d:"M0 0h750v500H0z"})),P||(P=c.createElement("path",{fill:"#ffc400",d:"M0 125h750v250H0z"})))};function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},H.apply(this,arguments)}var W,X,G,Q,Y,J=function(e){return c.createElement("svg",H({viewBox:"0 0 24 15",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),K||(K=c.createElement("path",{fill:"#002395",d:"M0 0h8v15H0z"})),V||(V=c.createElement("path",{fill:"#FFF",d:"M8 0h8v15H8z"})),q||(q=c.createElement("path",{fill:"#ED2939",d:"M16 0h8v15h-8z"})))};function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},$.apply(this,arguments)}var ee,te,ne=function(e){return c.createElement("svg",$({viewBox:"0 0 60 30",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),W||(W=c.createElement("path",{d:"M0 0v30h60V0z",fill:"#00247d"})),X||(X=c.createElement("path",{d:"m0 0 60 30m0-30L0 30",stroke:"#fff",strokeWidth:6})),G||(G=c.createElement("path",{d:"m0 0 60 30m0-30L0 30",stroke:"#cf142b",strokeWidth:4})),Q||(Q=c.createElement("path",{d:"M30 0v30M0 15h60",stroke:"#fff",strokeWidth:10})),Y||(Y=c.createElement("path",{d:"M30 0v30M0 15h60",stroke:"#cf142b",strokeWidth:6})))};function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ae.apply(this,arguments)}var re,oe,se,ie,le,ce,ue,de,he,pe=function(e){return c.createElement("svg",ae({viewBox:"0 0 16 10",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),ee||(ee=c.createElement("path",{fill:"#fff",d:"M0 0h16v10H0z"})),te||(te=c.createElement("path",{fill:"#dc143c",d:"M0 5h16v5H0z"})))};function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fe.apply(this,arguments)}var me,_e,ve,ge=function(e){return c.createElement("svg",fe({viewBox:"0 0 7410 3900",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),re||(re=c.createElement("path",{fill:"#b22234",d:"M0 0h7410v3900H0z"})),oe||(oe=c.createElement("path",{d:"M0 450h7410m0 600H0m0 600h7410m0 600H0m0 600h7410m0 600H0",stroke:"#fff",strokeWidth:300})),se||(se=c.createElement("path",{fill:"#3c3b6e",d:"M0 0h2964v2100H0z"})),ie||(ie=c.createElement("g",{fill:"#fff"},c.createElement("g",{id:"FlagUs_svg__d"},c.createElement("g",{id:"FlagUs_svg__c"},c.createElement("g",{id:"FlagUs_svg__e"},c.createElement("g",{id:"FlagUs_svg__b"},c.createElement("path",{id:"FlagUs_svg__a",d:"m247 90 70.534 217.082-184.66-134.164h228.253L176.466 307.082z"}),c.createElement("use",{href:"#FlagUs_svg__a",y:420}),c.createElement("use",{href:"#FlagUs_svg__a",y:840}),c.createElement("use",{href:"#FlagUs_svg__a",y:1260})),c.createElement("use",{href:"#FlagUs_svg__a",y:1680})),c.createElement("use",{href:"#FlagUs_svg__b",x:247,y:210})),c.createElement("use",{href:"#FlagUs_svg__c",x:494})),c.createElement("use",{href:"#FlagUs_svg__d",x:988}),c.createElement("use",{href:"#FlagUs_svg__c",x:1976}),c.createElement("use",{href:"#FlagUs_svg__e",x:2470}))),le||(le=c.createElement("path",{d:"M0 0v30h60V0z",fill:"#00247d"})),ce||(ce=c.createElement("path",{d:"m0 0 60 30m0-30L0 30",stroke:"#fff",strokeWidth:6})),ue||(ue=c.createElement("path",{d:"m0 0 60 30m0-30L0 30",stroke:"#cf142b",strokeWidth:4})),de||(de=c.createElement("path",{d:"M30 0v30M0 15h60",stroke:"#fff",strokeWidth:10})),he||(he=c.createElement("path",{d:"M30 0v30M0 15h60",stroke:"#cf142b",strokeWidth:6})))};function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},xe.apply(this,arguments)}var be,ye=function(e){return c.createElement("svg",xe({viewBox:"0 0 20 12",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),me||(me=c.createElement("path",{d:"M0 0h20v4H0z"})),_e||(_e=c.createElement("path",{fill:"red",d:"M0 4h20v4H0z"})),ve||(ve=c.createElement("path",{fill:"#fc0",d:"M0 8h20v4H0z"})))};function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},je.apply(this,arguments)}var we,Ne=function(e){return c.createElement("svg",je({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),be||(be=c.createElement("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z",fill:"currentColor"})))};function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ce.apply(this,arguments)}var Me,ke=function(e){return c.createElement("svg",Ce({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),we||(we=c.createElement("path",{d:"M0 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6zm13 .25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-.5a.25.25 0 0 0-.25.25zM2.25 8a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h.5A.25.25 0 0 0 3 8.75v-.5A.25.25 0 0 0 2.75 8h-.5zM4 8.25v.5c0 .138.112.25.25.25h.5A.25.25 0 0 0 5 8.75v-.5A.25.25 0 0 0 4.75 8h-.5a.25.25 0 0 0-.25.25zM6.25 8a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h.5A.25.25 0 0 0 7 8.75v-.5A.25.25 0 0 0 6.75 8h-.5zM8 8.25v.5c0 .138.112.25.25.25h.5A.25.25 0 0 0 9 8.75v-.5A.25.25 0 0 0 8.75 8h-.5a.25.25 0 0 0-.25.25zM13.25 8a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-.5zm0 2a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-.5zm-3-2a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-1.5zm.75 2.25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-.5a.25.25 0 0 0-.25.25zM11.25 6a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-.5zM9 6.25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5A.25.25 0 0 0 9.75 6h-.5a.25.25 0 0 0-.25.25zM7.25 6a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h.5A.25.25 0 0 0 8 6.75v-.5A.25.25 0 0 0 7.75 6h-.5zM5 6.25v.5c0 .138.112.25.25.25h.5A.25.25 0 0 0 6 6.75v-.5A.25.25 0 0 0 5.75 6h-.5a.25.25 0 0 0-.25.25zM2.25 6a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 4 6.75v-.5A.25.25 0 0 0 3.75 6h-1.5zM2 10.25v.5c0 .138.112.25.25.25h.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-.5a.25.25 0 0 0-.25.25zM4.25 10a.25.25 0 0 0-.25.25v.5c0 .138.112.25.25.25h5.5a.25.25 0 0 0 .25-.25v-.5a.25.25 0 0 0-.25-.25h-5.5z",fill:"currentColor"})))};function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ee.apply(this,arguments)}var Oe,Se=function(e){return c.createElement("svg",Ee({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),Me||(Me=c.createElement("path",{d:"m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z",fill:"currentColor"})))};function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Be.apply(this,arguments)}var Ze,Ie=function(e){return c.createElement("svg",Be({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),Oe||(Oe=c.createElement("path",{d:"M16 9c4 2 5 9 5 9s1 4-5 4H8c-6 0-5-4-5-4s1-7 5-9m6-5-2-2-2 2-4-2 2 5h8l2-5-4 2Z",fill:"currentColor"})))};function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ze.apply(this,arguments)}var Re,Le=function(e){return c.createElement("svg",ze({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),Ze||(Ze=c.createElement("path",{d:"M3.5 2.5a.5.5 0 0 0-1 0v8.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L3.5 11.293V2.5zm3.5 1a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zM7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z",fill:"currentColor"})))};function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Te.apply(this,arguments)}var Fe=function(e){return c.createElement("svg",Te({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),Re||(Re=c.createElement("path",{d:"M3.5 12.5a.5.5 0 0 1-1 0V3.707L1.354 4.854a.5.5 0 1 1-.708-.708l2-1.999.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L3.5 3.707V12.5zm3.5-9a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zM7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z",fill:"currentColor"})))},Pe=n(5101),Ae=n.n(Pe),De=function(e){return e.preventDefault()},Ke=function(e){var t,n=e.autoFocus,a=e.canShowPoints,r=e.character,s=e.className,i=e.disabled,c=e.highlighted,u=e.inputRef,d=e.inputStyle,h=e.isBlank,p=e.placeholder,f=e.points,_=e.pointsStyle,v=e.raised,g=e.style,x=e.tabIndex,b=e.onFocus,y=e.onKeyDown;return(0,o.jsxs)("div",{className:l()(Ae().tile,s,(t={},(0,m.Z)(t,Ae().highlighted,c),(0,m.Z)(t,Ae().blank,h),(0,m.Z)(t,Ae().raised,v),(0,m.Z)(t,Ae().points1,1===f),(0,m.Z)(t,Ae().points2,2===f),(0,m.Z)(t,Ae().points3,3===f),(0,m.Z)(t,Ae().points4,4===f),(0,m.Z)(t,Ae().points5,"number"===typeof f&&f>=5),t)),style:g,children:[(0,o.jsx)("input",{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",autoFocus:n,className:Ae().character,disabled:i,maxLength:1,placeholder:p,ref:u,spellCheck:!1,style:d,tabIndex:x,value:r||"",onChange:De,onFocus:b,onKeyDown:y}),a&&(0,o.jsx)("span",{className:Ae().points,style:_,children:f})]})},Ve=(0,c.memo)(Ke),qe=function(e){var t=e.autoFocus,n=e.className,a=e.character,r=void 0===a?"":a,s=e.disabled,i=e.highlighted,l=e.inputRef,u=e.isBlank,d=e.placeholder,p=e.points,m=e.raised,_=e.size,v=e.tabIndex,g=e.onFocus,x=e.onKeyDown,b=(0,f.vc)(_),y=b.pointsFontSize,j=b.tileFontSize,w=b.tileSize,N=(0,c.useMemo)((function(){return{height:w,width:w}}),[w]),C=(0,c.useMemo)((function(){return{fontSize:j}}),[j]),M=(0,c.useMemo)((function(){return{fontSize:y}}),[y]),k=(0,c.useMemo)((function(){return l||(0,c.createRef)()}),[l]),E=!r||r===h.EMPTY_CELL,O=(u||!E)&&"undefined"!==typeof p;return(0,c.useEffect)((function(){t&&k.current&&k.current.focus()}),[t,k]),(0,o.jsx)(Ve,{autoFocus:t,canShowPoints:O,character:r,className:n,disabled:s,highlighted:i,inputRef:k,inputStyle:C,isBlank:u,placeholder:d,points:p,pointsStyle:M,raised:m,style:N,tabIndex:v,onFocus:g,onKeyDown:x})},Ue=n(6042),He=n(9396),We=n(9534),Xe=n(9815),Ge=n(5237),Qe=n(4956),Ye=n(1488),Je=n(3165),$e=n(194),et=n.n($e),tt=parseInt(et().ARROW_SIZE,10),nt=parseInt(et().OFFSET,10),at=[{name:"preventOverflow",options:{padding:parseInt(et().PREVENT_OVERFLOW,10),rootBoundary:"document"}},{name:"flip",options:{padding:tt,rootBoundary:"document"}},{name:"offset",options:{offset:[0,nt+tt]}}],rt=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.className,r=n.placement,s=void 0===r?"top":r,i=n.onBlur,u=void 0===i?f.ZT:i,d=n.onFocus,h=void 0===d?f.ZT:d,p=n.onMouseOut,_=void 0===p?f.ZT:p,v=n.onMouseOver,g=void 0===v?f.ZT:v,x=(0,Je.Ld)(),b=Boolean(e)||0===e,y=(0,Qe.Z)(),j=(0,c.useState)(!1),w=j[0],N=j[1],C=(0,c.useState)(null),M=C[0],k=C[1],E=(0,c.useState)(null),O=E[0],S=E[1],B=(0,c.useState)(null),Z=B[0],I=B[1],z=(0,Ge.D)(M,O,{modifiers:[{name:"arrow",options:{element:Z}}].concat((0,Xe.Z)(at)),placement:s}),R=z.attributes,L=z.styles,T=z.update,F=R.popper?R.popper["data-popper-placement"]:s,P=(0,c.useMemo)((function(){return w?{"aria-describedby":x}:{}}),[x,w]),A=(0,c.useCallback)((function(e){u(e),N(!1)}),[u]),D=(0,c.useCallback)((function(e){h(e),N(!0)}),[h]),K=(0,c.useCallback)((function(e){_(e),N(!1)}),[_]),V=(0,c.useCallback)((function(e){g(e),N(!0)}),[g]),q=(0,c.useMemo)((function(){return(0,He.Z)((0,Ue.Z)({},P),{ref:k,onBlur:A,onFocus:D,onMouseOut:K,onMouseOver:V})}),[P,A,D,K,V]);return(0,Ye.Z)((function(){y()&&T&&T()})),(0,Je.vI)((0,o.jsxs)("div",(0,He.Z)((0,Ue.Z)({className:l()(et().tooltip,a,(t={},(0,m.Z)(t,et().top,"top"===F),(0,m.Z)(t,et().right,"right"===F),(0,m.Z)(t,et().bottom,"bottom"===F),(0,m.Z)(t,et().left,"left"===F),t)),ref:S,style:L.popper},R.popper),{children:[(0,o.jsx)("div",{children:e}),(0,o.jsx)("div",{className:et().arrow,ref:I,style:L.arrow})]})),{disabled:!b||!w}),q},ot=n(2290),st=n.n(ot),it=function(e){var t=e.children,n=e.className,a=e.tooltip,r=(0,We.Z)(e,["children","className","tooltip"]),s=rt(a,r);return(0,o.jsx)("button",(0,He.Z)((0,Ue.Z)({className:l()(st().action,n),tabIndex:-1,type:"button"},r,s),{children:t}))},lt={1:st().bonusCharacter1,2:st().bonusCharacter2,3:st().bonusCharacter3,5:st().bonusCharacter5},ct={2:st().bonusWord2,3:st().bonusWord3},ut={2:st().bonusCharacterMultiplier2,3:st().bonusCharacterMultiplier3},dt=function(e,t){if(t&&e.isEmpty){var n=t.type;if(n===h.BONUS_WORD)return ht(t);if(n===h.BONUS_CHARACTER)return pt(t);throw new Error("Unknown bonus type: ".concat(n," ").concat(t.x," ").concat(t.y," ").concat(t.multiplier," ").concat(t.score))}},ht=function(e){return ct[e.multiplier]},pt=function(e){return e.score?lt[e.score]:ut[e.multiplier]},ft=function(e){var t=e.bonus,n=e.cell,a=e.className,r=e.direction,s=e.inputRef,i=e.isEmpty,c=e.points,u=e.size,d=e.style,h=e.tile,p=e.translate,f=e.onDirectionToggleClick,_=e.onFocus,v=e.onToggleBlankClick;return(0,o.jsxs)("div",{className:l()(st().cell,dt(n,t),a,(0,m.Z)({},st().candidate,n.isCandidate())),style:d,children:[(0,o.jsx)(qe,{className:st().tile,character:i?void 0:h.character,highlighted:n.isCandidate(),inputRef:s,isBlank:h.isBlank,points:c,raised:!i,size:u,tabIndex:0===n.x&&0===n.y?void 0:-1,onFocus:_}),(0,o.jsxs)("div",{className:st().actions,children:[(0,o.jsx)(it,{tooltip:p("cell.toggle-direction"),onClick:f,children:(0,o.jsx)(g,{className:l()(st().toggleDirection,(0,m.Z)({},st().right,"horizontal"===r))})}),!i&&(0,o.jsx)(it,{className:l()(st().blank,(0,m.Z)({},st().active,h.isBlank)),tooltip:h.isBlank?p("cell.set-not-blank"):p("cell.set-blank"),onClick:v,children:"B"})]})]})},mt=(0,c.memo)(ft),_t=function(e){var t=e.cell,n=e.className,a=e.direction,r=e.inputRef,i=e.size,l=e.onDirectionToggle,u=e.onFocus,d=t.tile,m=t.x,_=t.y,v=(0,p.I0)(),g=(0,s.qM)(),x=(0,s.ix)((function(e){return(0,s.O0)(e,t)})),b=(0,s.ix)((function(e){return(0,s.Zf)(e,t.tile)})),y=(0,f.vc)(i).tileFontSize,j=d.character===h.EMPTY_CELL,w=(0,c.useMemo)((function(){return{fontSize:y}}),[y]),N=(0,c.useCallback)((function(){return u(m,_)}),[m,_,u]),C=(0,c.useCallback)((function(){r.current&&r.current.focus(),v(s.I8.actions.toggleCellIsBlank({x:m,y:_}))}),[v,m,_]),M=(0,c.useCallback)((function(){r.current&&r.current.focus(),l()}),[l]);return(0,o.jsx)(mt,{bonus:x,cell:t,className:n,direction:a,inputRef:r,isEmpty:j,points:b,size:i,style:w,tile:d,translate:g,onDirectionToggleClick:M,onFocus:N,onToggleBlankClick:C})},vt=function(e){var t=e.className,n=e.innerRef,a=e.lastDirection,r=e.refs,s=e.rows,i=e.cellSize,c=e.onDirectionToggle,u=e.onFocus,h=e.onKeyDown;return(0,o.jsx)("div",{className:l()(d().board,t),ref:n,onKeyDown:h,children:s.map((function(e,t){return(0,o.jsx)("div",{className:d().row,children:e.map((function(e,n){return(0,o.jsx)(_t,{className:d().cell,cell:e,direction:a,inputRef:r[t][n],size:i,onDirectionToggle:c,onFocus:u},n)}))},t)}))})},gt=(0,c.memo)(vt),xt=n(7015),bt=function(e,t){for(var n=0;n<e.length;++n)for(var a=0;a<e[0].length;++a)if(t(e[n][a]))return{x:a,y:n}},yt=function(e){var t=e.length,n=e[0].length,a=(0,p.I0)(),r=(0,s.ix)(s.$o),o=(0,c.useMemo)((function(){return(0,f.DI)(n,t,(function(){return(0,c.createRef)()}))}),[n,t]),i=(0,c.useRef)({x:0,y:0}),l=(0,c.useState)("horizontal"),u=l[0],d=l[1],m=(0,xt.Z)(u),_=(0,c.useCallback)((function(e,a){var r,s=Math.min(Math.max(i.current.x+e,0),n-1),l=Math.min(Math.max(i.current.y+a,0),t-1);i.current={x:s,y:l},null===(r=o[l][s].current)||void 0===r||r.focus()}),[i,o]),v=(0,c.useCallback)((function(e){return bt(o,(function(t){return t.current===e}))}),[o]),g=(0,c.useCallback)((function(){d((function(e){return"vertical"===e?"horizontal":"vertical"}))}),[]),x=(0,c.useCallback)((function(e,t){i.current={x:e,y:t}}),[]),b=(0,c.useCallback)((function(e){var t="forward"===e?1:-1;"horizontal"===m.current?_(t,0):_(0,t)}),[_,m]),y=(0,c.useMemo)((function(){return(0,f.np)({onArrowDown:function(e){(0,f.yl)(e)?g():_(0,1)},onArrowLeft:function(e){(0,f.yl)(e)?g():_(-1,0)},onArrowRight:function(e){(0,f.yl)(e)?g():_(1,0)},onArrowUp:function(e){(0,f.yl)(e)?g():_(0,-1)},onBackspace:function(e){var t=v(e.target);t&&(a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},t),{value:h.EMPTY_CELL}))),b("backward"))},onDelete:function(e){var t=v(e.target);t&&(a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},t),{value:h.EMPTY_CELL}))),b("forward"))},onKeyDown:function(o){var i=v(o.target);if(i){var l=i.x,c=i.y,u=o.key.toLowerCase(),d=(0,f.yl)(o)&&"b"===u,p=r.getTwoCharacterTileByPrefix(u);if(d)a(s.I8.actions.toggleCellIsBlank(i));else{if((0,f.yl)(o)&&p)return o.preventDefault(),a(s.I8.actions.changeCellValue({x:l,y:c,value:p})),void b("forward");if(r.hasCharacter(u)){var m=l>0,_=l+1<n,g=c+1<t;if(c-1>0){var x=e[c-1][l].tile.character+u;if(r.twoCharacterTiles.includes(x))return void a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{y:c-1,value:x})))}if(g){var y=u+e[c+1][l].tile.character;if(r.twoCharacterTiles.includes(y))return a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{value:u}))),a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{y:c+1,value:h.EMPTY_CELL}))),void b("forward")}if(m){var j=e[c][l-1].tile.character+u;if(r.twoCharacterTiles.includes(j))return void a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{x:l-1,value:j})))}if(_){var w=u+e[c][l+1].tile.character;if(r.twoCharacterTiles.includes(w))return a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{value:u}))),a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{x:l+1,value:h.EMPTY_CELL}))),void b("forward")}if(!g||!_){var N=e[c][l].tile.character+u;if(r.twoCharacterTiles.includes(N))return void a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{value:N})))}a(s.I8.actions.changeCellValue((0,He.Z)((0,Ue.Z)({},i),{value:u}))),b("forward")}}}},onSpace:function(e){var t=v(e.target);t&&a(s.I8.actions.toggleCellIsBlank(t))}})}),[_,r,a,m,g,e]);return[{lastDirection:u,refs:o},{onDirectionToggle:g,onFocus:x,onKeyDown:y}]},jt=function(e){var t=e.cellSize,n=e.className,a=e.innerRef,i=(0,s.ix)(s.ZA),l=(0,r.Z)(yt(i),2),c=l[0],u=c.lastDirection,d=c.refs,h=l[1],p=h.onDirectionToggle,f=h.onFocus,m=h.onKeyDown;return(0,o.jsx)(gt,{className:n,cellSize:t,innerRef:a,lastDirection:u,refs:d,rows:i,onDirectionToggle:p,onFocus:f,onKeyDown:m})},wt=n(7437),Nt=n.n(wt),Ct=function(e){var t=e.children,n=e.className,a=e.Icon,r=e.tooltip,s=(0,We.Z)(e,["children","className","Icon","tooltip"]),i=rt(r,s);return(0,o.jsx)("button",(0,He.Z)((0,Ue.Z)({className:l()(Nt().button,n),type:"button"},s,i),{children:(0,o.jsxs)("span",{className:Nt().content,children:[(0,o.jsx)("span",{className:Nt().label,children:t}),(0,o.jsx)(a,{className:Nt().icon})]})}))},Mt=n(485),kt=function(){return(0,o.jsx)("style",{type:"text/css",children:"@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Open+Sans:wght@400;700&family=Roboto+Mono&display=swap');\n\ntext {\n font-family: 'Open Sans';\n}"})},Et=n(9418),Ot=n(4046),St=function(e){return Mt.fl+e*(Mt.rV+Mt.ku)},Bt=function(e){return Mt.uX+e*(Mt.rV+Mt.ku)},Zt=function(e,t){return e+2*t*(.5-Math.random())},It=function(e){var t=e.cellIndex,n=e.character,a=e.color,r=e.rowIndex,o=e.showPoints,s=Et.literaki[Ot.Locale.EN_US].getCharacterPoints(n.toLowerCase()),i=o?s:void 0,l="number"===typeof s?Mt.d4[s]:Mt.BF,c=St(t)+Mt.rV/2,u=Bt(0)+Mt.rV/2;return{character:n,color:a||l,points:i,size:Mt.rV,transform:"rotate(".concat(Zt(0,Mt.a_),", ").concat(c,", ").concat(u,")"),x:Zt(St(t),Mt.D),y:Zt(Bt(r),Mt.D)}},zt=function(e){var t=e.color,n=e.content,a=e.showPoints,r=n.map((function(e,n){return e.map((function(r,o){var s=e.slice(0,o).reduce((function(e,t){return e+t.length+" ".length}),0);return r.split("").map((function(e,r){return It({cellIndex:s+r,character:e,color:t,rowIndex:n,showPoints:a})}))}))}));return r.flat(2)},Rt=function(e){var t=e.reduce((function(e,t){var n=t.reduce((function(e,t){return e+t.length}),0)+Math.max(t.length-1,0);return Math.max(e,n)}),0),n=t*(Mt.rV+Mt.ku)-(0===t?0:Mt.ku),a=e.length*(Mt.rV+Mt.ku)-(0===e.length?0:Mt.ku);return"0 0 ".concat(n," ").concat(a)},Lt=n(6807),Tt=n.n(Lt),Ft=function(e){var t=e.character,n=e.className,a=e.color,r=e.points,s=e.size,i=e.transform,l=e.x,c=e.y;return(0,o.jsxs)("g",{className:n,transform:i,children:[(0,o.jsx)("rect",{fill:a,height:s,width:s,x:l,y:c}),(0,o.jsx)("text",{dominantBaseline:"central",fontFamily:"Open Sans",fontSize:.6*s,fontWeight:"bold",textAnchor:"middle",x:l+s/2,y:c+s/2,children:t}),"number"===typeof r&&(0,o.jsx)("text",{dominantBaseline:"text-after-edge",fontFamily:"Open Sans",fontSize:.25*s,fontWeight:"bold",textAnchor:"end",x:l+.9*s,y:c+.95*s,children:r})]})},Pt=function(e){var t,n=e.className,a=e.color,r=e.content,s=e.dropShadow,i=e.showPoints,u=e.style,d=e.wave,h=(0,c.useMemo)((function(){return zt({color:a,content:r,showPoints:i})}),[a,r,i]);return(0,o.jsxs)("svg",{className:l()(n,(t={},(0,m.Z)(t,Tt().dropShadow,s),(0,m.Z)(t,Tt().wave,d),t)),style:u,viewBox:Rt(r),xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(kt,{}),h.map((function(e,t){return(0,o.jsx)(Ft,{character:e.character,className:Tt().tile,color:e.color,points:e.points,size:e.size,transform:e.transform,x:e.x,y:e.y},t)}))]})},At=n(8426),Dt=n.n(At),Kt={error:"empty-state.error",info:"empty-state.info",success:"empty-state.success",warning:"empty-state.warning"},Vt={error:Mt.yg,info:Mt.pI,success:Mt.F1,warning:Mt.yr},qt=function(e){var t=e.className,n=e.children,a=e.type,r=(0,s.qM)(),i=(0,c.useMemo)((function(){return r(Kt[a])}),[r]),u=(0,c.useMemo)((function(){return[[i.toUpperCase()]]}),[i]);return(0,o.jsxs)("div",{className:l()(Dt().emptyState,t),children:[(0,o.jsx)(Pt,{className:Dt().tiles,color:Vt[a],content:u}),(0,o.jsx)("div",{className:Dt().content,children:n})]})},Ut=n(1500),Ht=n.n(Ut),Wt=function(e){var t=e.className,n=e.wave,a=void 0===n||n,r=(0,s.qM)(),i=(0,c.useMemo)((function(){return[[r("common.loading").toUpperCase()]]}),[r]);return(0,o.jsxs)("div",{className:l()(Ht().loading,t),children:[(0,o.jsx)("div",{className:Ht().dim}),(0,o.jsx)("div",{className:Ht().logo,children:(0,o.jsx)(Pt,{className:l()(Ht().tiles),content:i,dropShadow:!0,wave:a})})]})},Xt=n(3424),Gt=n.n(Xt),Qt=function(e){var t,n=e.className,a=(0,s.qM)(),r=(0,s.ix)(s.w1),i=r.definitions,c=r.isAllowed,u=r.isLoading,d=r.word;return(0,o.jsxs)("div",{className:l()(Gt().dictionary,n,(t={},(0,m.Z)(t,Gt().isAllowed,!0===c),(0,m.Z)(t,Gt().isNotAllowed,!1===c),t)),children:["undefined"===typeof d&&(0,o.jsx)(qt,{type:"info",children:a("dictionary.empty-state.uninitialized")}),"undefined"!==typeof d&&(0,o.jsxs)("div",{className:Gt().content,children:[d&&(0,o.jsx)("h2",{className:Gt().word,children:d}),!1===c&&(0,o.jsx)("div",{children:a("dictionary.empty-state.not-allowed")}),!0===c&&(0,o.jsxs)(o.Fragment,{children:[0===i.length&&(0,o.jsx)("div",{children:a("dictionary.empty-state.no-definitions")}),i.length>0&&(0,o.jsx)("ul",{className:Gt().definitions,children:i.map((function(e,t){return(0,o.jsx)("li",{className:Gt().definition,children:e},t)}))})]}),!u&&null===c&&(0,o.jsx)("div",{children:a("dictionary.empty-state.no-results")})]}),u&&(0,o.jsx)(Wt,{})]})},Yt=n(6436),Jt=n.n(Yt),$t=function(e){var t=e.className,n=(0,p.I0)(),a=(0,s.qM)(),r=(0,s.ix)(s.w1).input;return(0,o.jsx)("form",{className:l()(Jt().dictionaryInput,t),onSubmit:function(e){e.preventDefault(),n(s.lj.actions.submit())},children:(0,o.jsx)("input",{className:Jt().input,placeholder:a("dictionary.input.placeholder"),required:!0,type:"text",value:r,onChange:function(e){n(s.lj.actions.changeInput(e.target.value))}})})},en=n(5890),tn=n.n(en),nn=function(e){var t=e.children,n=e.className;return(0,o.jsx)("kbd",{className:l()(tn().key,n),children:t})},an=n(3253),rn=n.n(an),on=n(7682),sn=n.n(on),ln=function(e){var t=e.className,n=e.Icon,a=e.tooltip,r=(0,We.Z)(e,["className","Icon","tooltip"]),s=rt(a,r);return(0,o.jsx)("a",(0,He.Z)((0,Ue.Z)({className:l()(sn().squareButton,t),type:"button"},r,s),{children:(0,o.jsx)("span",{className:sn().content,children:(0,o.jsx)(n,{className:sn().icon})})}))},cn=Object.assign((function(e){var t=e.className,n=e.Icon,a=e.tooltip,r=(0,We.Z)(e,["className","Icon","tooltip"]),s=rt(a,r);return(0,o.jsx)("button",(0,He.Z)((0,Ue.Z)({className:l()(sn().squareButton,t),type:"button"},r,s),{children:(0,o.jsx)("span",{className:sn().content,children:(0,o.jsx)(n,{className:sn().icon})})}))}),{Link:ln}),un=n(5548),dn=n.n(un),hn=function(e){var t=e.children,n=e.className,a=e.title;return(0,o.jsxs)("section",{className:l()(dn().section,n),children:[(0,o.jsx)("h2",{className:dn().heading,children:a}),(0,o.jsx)("div",{children:t})]})},pn=n(3445),fn=n.n(pn),mn=Object.assign((function(e){var t=e.children,n=e.className,a=e.isOpen,r=e.title,i=e.onClose,c=(0,s.qM)();return(0,o.jsx)(rn(),{className:{afterOpen:fn().afterOpen,base:fn().modal,beforeClose:fn().beforeClose},closeTimeoutMS:Mt.MA,contentLabel:r,isOpen:a,overlayClassName:fn().overlay,onRequestClose:i,children:(0,o.jsxs)("div",{className:l()(fn().sidebar,n),children:[(0,o.jsxs)("div",{className:fn().header,children:[(0,o.jsx)("h1",{className:fn().title,children:r}),(0,o.jsx)(cn,{className:fn().closeButton,Icon:I,tooltip:c("common.close"),onClick:i})]}),(0,o.jsx)("div",{className:fn().content,children:t})]})})}),{Section:hn}),_n=n(8253),vn=n.n(_n),gn=function(e){var t=e.className,n=e.description,a=e.mapping;return(0,o.jsxs)("div",{className:l()(vn().mapping,t),children:[(0,o.jsx)("h3",{className:vn().description,children:n}),(0,o.jsx)("div",{className:vn().keys,children:a.map((function(e,t){return(0,o.jsxs)(c.Fragment,{children:[(0,o.jsx)("div",{className:vn().group,children:Array.isArray(e)?(0,o.jsxs)(o.Fragment,{children:[e[0],(0,o.jsx)("span",{className:vn().plus,children:"+"}),e[1]]}):e}),a.length>1&&t<a.length-1&&(0,o.jsx)("span",{className:vn().slash,children:"/"})]},t)}))})]})},xn=(0,o.jsx)(nn,{children:(0,o.jsx)(y,{})}),bn=(0,o.jsx)(nn,{children:(0,o.jsx)(M,{})}),yn=(0,o.jsx)(nn,{children:(0,o.jsx)(N,{})}),jn=(0,o.jsx)(nn,{children:(0,o.jsx)(g,{})}),wn=(0,o.jsx)(nn,{children:"\u2190 Backspace"}),Nn=(0,o.jsx)(nn,{children:(0,f.V5)()?"\u2318":"Ctrl"}),Cn=(0,o.jsx)(nn,{children:"Del"}),Mn=(0,o.jsx)(nn,{children:"Enter \u23ce"}),kn=(0,o.jsxs)(o.Fragment,{children:[xn,bn,yn,jn]}),En=(0,o.jsx)(nn,{children:"\u2423"}),On=function(e){var t=e.className,n=e.isOpen,a=e.onClose,i=(0,s.qM)(),l=(0,s.ix)(s.$o);return(0,o.jsxs)(mn,{className:t,isOpen:n,title:i("keyMap"),onClose:a,children:[(0,o.jsxs)(mn.Section,{title:i("keyMap.board-and-rack"),children:[(0,o.jsx)(gn,{description:i("keyMap.board-and-rack.navigate"),mapping:[kn]}),(0,o.jsx)(gn,{description:i("keyMap.board-and-rack.remove-tile"),mapping:[Cn,wn]}),(0,o.jsx)(gn,{description:i("keyMap.board-and-rack.submit"),mapping:[Mn]}),l.twoCharacterTiles.length>0&&(0,o.jsx)(gn,{description:i("keyMap.board-and-rack.insert-two-letter-tile"),mapping:[[Nn,(0,o.jsx)(o.Fragment,{children:l.twoCharacterTiles.map((function(e){var t=(0,r.Z)(e,1)[0];return(0,o.jsx)(nn,{children:t.toUpperCase()},t)}))})]]})]}),(0,o.jsxs)(mn.Section,{title:i("keyMap.board"),children:[(0,o.jsx)(gn,{description:i("keyMap.board.toggle-blank"),mapping:[En,[Nn,(0,o.jsx)(nn,{children:"B"},"b")]]}),(0,o.jsx)(gn,{description:i("keyMap.board.toggle-direction"),mapping:[[Nn,kn]]})]}),(0,o.jsx)(mn.Section,{title:i("keyMap.rack"),children:(0,o.jsx)(gn,{description:i("keyMap.rack.insert-blank"),mapping:[En]})})]})},Sn=[["SCRABBLE"],["SOLVER","2"]],Bn=function(e){var t=e.className,n=e.style;return(0,o.jsx)(Pt,{className:t,content:Sn,style:n})},Zn=n(9308),In=n.n(Zn),zn=function(e){var t=e.onClear,n=e.onShowKeyMap,a=e.onShowRemainingTiles,r=e.onShowSettings,i=(0,s.qM)(),c=(0,s.ix)(s.En);return(0,o.jsxs)("div",{className:In().navButtons,children:[(0,o.jsx)(cn.Link,{className:In().button,href:Mt.h4,Icon:Ne,rel:"noopener noreferrer",target:"_blank",tooltip:i("github")}),(0,o.jsx)("div",{className:In().separator}),(0,o.jsx)(cn,{className:In().button,Icon:ke,tooltip:i("keyMap"),onClick:n}),(0,o.jsx)(cn,{className:l()(In().button,(0,m.Z)({},In().error,c)),Icon:Ie,tooltip:i("remaining-tiles"),onClick:a}),(0,o.jsx)("div",{className:In().separator}),(0,o.jsx)(cn,{className:In().button,Icon:A,tooltip:i("common.clear"),onClick:t}),(0,o.jsx)(cn,{className:In().button,Icon:S,tooltip:i("settings"),onClick:r})]})},Rn=n(1664),Ln=n.n(Rn),Tn=n(2747),Fn=n.n(Tn),Pn=[["HTTP","404"]],An=function(){return(0,o.jsx)("div",{className:Fn().notFound,children:(0,o.jsx)(Ln(),{href:"/",children:(0,o.jsxs)("a",{className:Fn().link,children:[(0,o.jsx)(L,{className:Fn().icon}),(0,o.jsx)(Pt,{className:Fn().tiles,content:Pn})]})})})},Dn=n(6079),Kn=n.n(Dn),Vn=function(e){var t=e.activeIndexRef,n=e.character,a=e.index,r=e.inputRef,i=e.tile,l=e.onKeyDown,u=(0,p.I0)(),d=(0,s.qM)(),m=(0,s.ix)(s.$o),_=(0,s.ix)((function(e){return(0,s.Or)(e,n)})),v=(0,c.useCallback)((function(){t.current=a}),[a]),g=(0,c.useCallback)((function(e){u(s.O_.actions.changeCharacter({character:e,index:a}))}),[a]),x=(0,c.useMemo)((function(){return(0,f.np)({onBackspace:function(){return g(null)},onDelete:function(){return g(null)},onKeyDown:function(e){var t=e.key.toLowerCase(),n=m.getTwoCharacterTileByPrefix(t);(0,f.yl)(e)&&n?(e.preventDefault(),g(n)):(m.hasCharacter(t)||t===h.BLANK)&&g(t),l(e)}})}),[m,g,l]);return(0,o.jsx)(qe,{autoFocus:0===a,className:Kn().tile,character:null===n?void 0:n,highlighted:null!==i,inputRef:r,isBlank:n===h.BLANK,placeholder:d("rack.placeholder")[a],points:_,raised:!0,size:Mt.I_,tabIndex:0===a?void 0:-1,onFocus:v,onKeyDown:x},a)},qn=function(e){var t=e.className,n=(0,s.ix)(s.$o),a=(0,s.ix)(s.QB),r=(0,s.ix)(s.z$),i=(0,c.useMemo)((function(){return(0,f.gV)(a,r)}),[a,r]),u=i.length,d=(0,c.useMemo)((function(){return(0,f.Ri)(u).map((function(){return(0,c.createRef)()}))}),[u]),p=(0,c.useRef)(),m=(0,c.useCallback)((function(e){var t=Math.min(Math.max((p.current||0)+e,0),u-1),n=d[t].current;n&&n.focus(),p.current=t}),[p,u,d]),_=(0,c.useMemo)((function(){return(0,f.np)({onArrowLeft:function(e){e.preventDefault(),m(-1)},onArrowRight:function(e){e.preventDefault(),m(1)},onBackspace:function(){m(-1)},onKeyDown:function(e){var t=e.key.toLowerCase();(n.hasCharacter(t)||t===h.BLANK)&&m(1)}})}),[m,n]);return(0,o.jsx)("div",{className:l()(Kn().rack,t),children:i.map((function(e,t){var n=e.character,a=e.tile;return(0,o.jsx)(Vn,{activeIndexRef:p,character:n,index:t,inputRef:d[t],tile:a,onKeyDown:_},t)}))})},Un=n(9627),Hn=n.n(Un),Wn=function(e){var t=e.checked,n=e.children,a=e.className,r=e.disabled,s=e.id,i=e.name,c=e.value,u=e.onChange;return(0,o.jsxs)("label",{className:l()(Hn().radio,a,(0,m.Z)({},Hn().checked,t)),htmlFor:s,children:[(0,o.jsx)("input",{checked:t,className:Hn().input,disabled:r,id:s,name:i,type:"radio",value:c,onChange:u}),(0,o.jsx)("div",{className:Hn().icon}),(0,o.jsx)("div",{className:Hn().content,children:n})]})},Xn=n(9365),Gn=n.n(Xn),Qn=function(e){var t,n=e.tile,a=n.character,r=n.count,i=r-n.usedCount,c=(0,s.ix)((function(e){return(0,s.Or)(e,a)}));return(0,o.jsxs)("div",{className:l()(Gn().character,(t={},(0,m.Z)(t,Gn().finished,i<=0),(0,m.Z)(t,Gn().overused,i<0),t)),children:[(0,o.jsx)(qe,{character:a,className:Gn().tile,disabled:!0,isBlank:a===h.BLANK,points:c,raised:!0,size:Mt.mM}),(0,o.jsxs)("div",{className:Gn().count,children:[i," / ",r]})]},a)},Yn=n(5343),Jn=n.n(Yn),$n=function(e){var t=e.className,n=e.isOpen,a=e.onClose,r=(0,s.qM)(),i=(0,s.ix)(s.Yj);return(0,o.jsx)(mn,{className:t,isOpen:n,title:r("remaining-tiles"),onClose:a,children:i.map((function(e){var t=e.remainingCount,n=e.tiles,a=e.translationKey,s=e.totalCount;return(0,o.jsxs)("div",{className:Jn().group,children:[(0,o.jsx)("h2",{className:Jn().title,children:"".concat(r(a)," (").concat(t," / ").concat(s,")")}),(0,o.jsx)("div",{className:Jn().content,children:n.map((function(e){return(0,o.jsx)(Qn,{tile:e},e.character)}))})]},a)}))})},ea=n(6457),ta=n(2813),na=n.n(ta),aa=function(e){var t=e.className,n=(0,p.I0)(),a=(0,s.qM)(),r=(0,s.ix)(s.QL);return(0,o.jsx)("form",{className:l()(na().resultsInput,t),children:(0,o.jsx)("input",{className:na().input,placeholder:a("results.input.placeholder"),type:"text",value:r,onChange:function(e){n(s._C.actions.changeQuery(e.target.value))}})})},ra=n(3620),oa=n(9474),sa=n.n(oa),ia=[{className:sa().word,id:ra.M.Word,translationKey:"common.word"},{className:sa().stat,id:ra.M.TilesCount,translationKey:"common.tiles"},{className:sa().stat,id:ra.M.ConsonantsCount,translationKey:"common.consonants"},{className:sa().stat,id:ra.M.VowelsCount,translationKey:"common.vowels"},{className:sa().stat,id:ra.M.BlanksCount,translationKey:"common.blanks"},{className:sa().stat,id:ra.M.WordsCount,translationKey:"common.words"},{className:sa().points,id:ra.M.Points,translationKey:"common.points"}],la=function(e){var t=e.column,n=(0,p.I0)(),a=(0,s.qM)(),r=(0,s.ix)(s.R),i=(0,s.ix)(s.sH),c=rt(a(t.translationKey));return(0,o.jsx)("button",(0,He.Z)((0,Ue.Z)({className:l()(sa().headerButton,t.className),type:"button",onClick:function(){return e=t.id,void n(s._C.actions.sort(e));var e}},c),{children:(0,o.jsxs)("span",{className:sa().cell,children:[(0,o.jsx)("span",{className:sa().headerButtonLabel,children:a(t.translationKey)}),r===t.id&&(0,o.jsxs)(o.Fragment,{children:[i===ra.S.Ascending&&(0,o.jsx)(Fe,{className:sa().sortIcon}),i===ra.S.Descending&&(0,o.jsx)(Le,{className:sa().sortIcon})]})]})}),t.id)},ca=function(e){var t=e.className,n=e.translationKey,a=e.value,r=(0,s.qM)(),i=rt("".concat(r(n),": ").concat(a));return(0,o.jsx)("span",(0,He.Z)((0,Ue.Z)({className:l()(sa().cell,t)},i),{children:a}))},ua=function(e){var t=e.index,n=e.style,a=(0,p.I0)(),r=(0,s.ix)(s.dN)[t];return(0,o.jsx)("button",{className:sa().result,style:n,type:"button",onBlur:function(){a(s._C.actions.changeResultCandidate(null))},onClick:function(){a(s._C.actions.applyResult(r))},onFocus:function(){a(s._C.actions.changeResultCandidate(r))},onMouseEnter:function(){a(s._C.actions.changeResultCandidate(r))},onMouseLeave:function(){a(s._C.actions.changeResultCandidate(null))},children:(0,o.jsxs)("span",{className:sa().resultContent,children:[(0,o.jsx)(ca,{className:sa().word,translationKey:"common.word",value:r.word}),(0,o.jsx)(ca,{className:sa().stat,translationKey:"common.tiles",value:r.numberOfTiles}),(0,o.jsx)(ca,{className:sa().stat,translationKey:"common.consonants",value:r.numberOfConsonants}),(0,o.jsx)(ca,{className:sa().stat,translationKey:"common.vowels",value:r.numberOfVowels}),(0,o.jsx)(ca,{className:sa().stat,translationKey:"common.blanks",value:r.numberOfBlanks}),(0,o.jsx)(ca,{className:sa().stat,translationKey:"common.words",value:r.numberOfWords}),(0,o.jsx)(ca,{className:sa().points,translationKey:"common.points",value:r.points})]})})},da=function(){var e=(0,p.I0)(),t=(0,s.qM)(),n=(0,s.ix)(s.xU),a=(0,s.ix)(s.QB),r=(0,s.ix)(s.Mj),i=a.some((function(e){return null!==e}));return(0,o.jsx)(Ct,{className:sa().outdatedButton,disabled:n||!r||!i,Icon:Se,type:"submit",onClick:function(){e(s.TP.actions.submit())},children:t("results.solve")})},ha=function(e){var t=e.height,n=e.width,a=(0,s.qM)(),r=(0,s.ix)(s.f2),i=(0,s.ix)(s.dN),c=(0,s.ix)(s.xU),u=(0,s.ix)(s.Mj);return(0,o.jsxs)("div",{className:sa().results,children:[(0,o.jsx)("div",{className:sa().header,children:ia.map((function(e){return(0,o.jsx)(la,{column:e},e.id)}))}),"undefined"===typeof i&&(0,o.jsxs)(qt,{className:sa().emptyState,type:"info",children:[a("results.empty-state.uninitialized"),(0,o.jsx)(da,{})]}),"undefined"!==typeof i&&"undefined"!==typeof r&&(0,o.jsxs)(o.Fragment,{children:[u&&(0,o.jsxs)(qt,{className:sa().emptyState,type:"info",children:[a("results.empty-state.outdated"),(0,o.jsx)(da,{})]}),!u&&(0,o.jsxs)(o.Fragment,{children:[0===r.length&&(0,o.jsx)(qt,{className:sa().emptyState,type:"warning",children:a("results.empty-state.no-results")}),r.length>0&&0===i.length&&(0,o.jsx)(qt,{className:sa().emptyState,type:"info",children:a("results.empty-state.no-filtered-results")}),r.length>0&&i.length>0&&(0,o.jsx)(ea.t7,{className:l()(sa().list,(0,m.Z)({},sa().outdated,u)),height:t-Mt.$L-Mt.qp,itemCount:i.length,itemSize:Mt.rx,width:n,children:ua}),r.length>0&&(0,o.jsx)(aa,{className:sa().input})]})]}),c&&(0,o.jsx)(Wt,{})]})},pa=n(1511),fa=n.n(pa),ma=function(e){var t=e.children,n=e.className,a=e.contentClassName,r=e.onAnimationEnd;return(0,o.jsx)("div",{className:l()(fa().screen,n),onAnimationEnd:r,children:(0,o.jsx)("div",{className:l()(fa().content,a),children:t})})},_a=n(7352),va=n.n(_a),ga="null",xa=function(e){if("left"===e||"right"===e)return e;if(e===ga)return null;throw new Error('"'.concat(e,'" is not valid. Should be "left", "right", or "').concat(ga,'"'))},ba=function(e){var t=e.className,n=e.disabled,a=(0,p.I0)(),r=(0,s.qM)(),i=(0,s.ix)(s.uz),l=[{label:r("settings.autoGroupTiles.left"),value:"left"},{label:r("settings.autoGroupTiles.right"),value:"right"},{label:r("settings.autoGroupTiles.null"),value:ga}],c=function(e){var t=xa(e.target.value);a(s.xj.actions.changeAutoGroupTiles(t))};return(0,o.jsx)("div",{className:t,children:l.map((function(e){return(0,o.jsx)(Wn,{checked:i===xa(e.value),className:va().option,disabled:n,id:"autoGroupTiles",name:"autoGroupTiles",value:e.value,onChange:c,children:(0,o.jsx)("div",{className:va().label,children:e.label})},e.value)}))})},ya=n(4116),ja=n.n(ya),wa=[{label:Et.scrabble.name,value:Et.scrabble.id},{label:Et.literaki.name,value:Et.literaki.id}],Na=function(e){var t=e.className,n=e.disabled,a=(0,p.I0)(),r=(0,s.ix)(s.md),i=function(e){a(s.xj.actions.changeConfigId(e.target.value))};return(0,o.jsx)("div",{className:t,children:wa.map((function(e){return(0,o.jsx)(Wn,{checked:r===e.value,className:ja().option,disabled:n,id:"configId",name:"configId",value:e.value,onChange:i,children:(0,o.jsx)("div",{className:ja().label,children:e.label})},e.value)}))})},Ca=n(7689),Ma=n.n(Ca),ka=[{className:Ma().gb,Icon:ne,label:"English (GB)",value:Ot.Locale.EN_GB},{className:Ma().us,Icon:ge,label:"English (US)",value:Ot.Locale.EN_US},{className:Ma().fr,Icon:J,label:"Fran\xe7ais",value:Ot.Locale.FR_FR},{className:Ma().de,Icon:ye,label:"Deutsch",value:Ot.Locale.DE_DE},{className:Ma().pl,Icon:pe,label:"Polski",value:Ot.Locale.PL_PL},{className:Ma().es,Icon:U,label:"Espa\xf1ol",value:Ot.Locale.ES_ES}],Ea=function(e){var t=e.className,n=e.disabled,a=(0,p.I0)(),r=(0,s.ix)(s.fN),i=function(e){var t=e.target.value;a(s.xj.actions.changeLocale(t))};return(0,o.jsx)("div",{className:t,children:ka.map((function(e){var a=e.Icon,s=(0,We.Z)(e,["Icon"]);return(0,o.jsx)(Wn,{checked:r===s.value,className:l()(Ma().option,t,(0,m.Z)({},Ma().checked,r===s.value)),disabled:n,id:"locale",name:"locale",value:s.value,onChange:i,children:(0,o.jsxs)("span",{className:Ma().label,children:[(0,o.jsx)(a,{className:l()(Ma().flag,s.className)}),(0,o.jsx)("span",{children:s.label})]})},s.value)}))})},Oa=function(e){var t=e.className,n=e.isOpen,a=e.onClose,r=(0,s.qM)();return(0,o.jsxs)(mn,{className:t,isOpen:n,title:r("settings"),onClose:a,children:[(0,o.jsx)(mn.Section,{title:r("settings.game"),children:(0,o.jsx)(Na,{disabled:!n})}),(0,o.jsx)(mn.Section,{title:r("settings.language"),children:(0,o.jsx)(Ea,{disabled:!n})}),(0,o.jsx)(mn.Section,{title:r("settings.autoGroupTiles"),children:(0,o.jsx)(ba,{disabled:!n})})]})},Sa=n(6719),Ba=n.n(Sa),Za=function(e){var t=e.className,n=e.forceShow,a=e.onAnimationEnd;return(0,o.jsxs)(ma,{className:l()(Ba().splash,t,(0,m.Z)({},Ba().animated,!n)),onAnimationEnd:a,children:[(0,o.jsxs)("div",{className:Ba().logos,children:[(0,o.jsx)(Bn,{className:Ba().logoGrayscale}),(0,o.jsx)(Bn,{className:Ba().logoColor})]}),(0,o.jsx)("h1",{className:Ba().author,children:"by Kamil Mielnik"})]})},Ia=n(538),za=n.n(Ia),Ra=(0,c.forwardRef)((function(e,t){var n=e.children,a=e.className,r=(0,We.Z)(e,["children","className"]);return(0,o.jsx)("div",(0,He.Z)((0,Ue.Z)({className:l()(za().well,a),ref:t},r),{children:n}))}))},3165:function(e,t,n){"use strict";n.d(t,{Av:function(){return r},_:function(){return f},vI:function(){return g},Ld:function(){return b}});var a=n(4829),r=function(){var e=(0,a.Z)("(max-height: 800px)"),t=(0,a.Z)("(max-width: 1024px)");return e||t},o=n(7294),s=n(9473),i=n(8127),l=n(3322),c=function(){var e=(0,s.I0)(),t=(0,l.ix)(l.ZO);(0,i.Z)((function(){var t=l.Xb.getBoard();t&&e(l.I8.actions.init(t))})),(0,o.useEffect)((function(){t&&l.Xb.setBoard(t)}),[t])},u=function(){var e=(0,s.I0)(),t=(0,l.ix)(l.md);(0,i.Z)((function(){var t=l.Xb.getConfigId();t&&e(l.xj.actions.init({configId:t}))})),(0,o.useEffect)((function(){t&&l.Xb.setConfigId(t)}),[t])},d=n(8729),h=function(){var e=(0,s.I0)(),t=(0,l.ix)(l.fN);(0,i.Z)((function(){var t=l.Xb.getLocale();e(t?l.xj.actions.init({locale:t}):l.xj.actions.init({locale:(0,d.Nj)()}))})),(0,o.useEffect)((function(){t&&l.Xb.setLocale(t)}),[t])},p=function(){var e=(0,s.I0)(),t=(0,l.ix)(l.QB);(0,i.Z)((function(){var t=l.Xb.getRack();t&&e(l.O_.actions.init(t))})),(0,o.useEffect)((function(){t&&l.Xb.setRack(t)}),[t])},f=function(){p(),c(),u(),h()},m=n(5893),_=n(745),v=n(779),g=d.J8?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.disabled,a=void 0!==n&&n,r=t.tagName,s=void 0===r?"div":r,i=(0,o.useRef)(null);(0,o.useLayoutEffect)((function(){if(a)return d.ZT;var e=document.createElement(s);document.body.appendChild(e);var t=(0,_.createRoot)(e);return i.current=t,function(){setTimeout((function(){i.current=null,t.unmount(),e.remove()}),0)}}),[a,s]),(0,o.useLayoutEffect)((function(){i.current&&i.current.render((0,m.jsx)(v.Z,{children:e}))}),[e,a,i])}:d.ZT,x=n(7632),b=function(){return(0,o.useRef)((0,x.Z)()).current}},2761:function(e){e.exports={board:"Board_board__eA_bB",row:"Board_row__mezHN"}},2290:function(e){e.exports={cell:"Cell_cell__2GOSl",bonusCharacter1:"Cell_bonusCharacter1__zJUuA",bonusCharacter2:"Cell_bonusCharacter2__HZDn8",bonusCharacter3:"Cell_bonusCharacter3__pWf1f",bonusCharacter5:"Cell_bonusCharacter5__LdDrj",bonusCharacterMultiplier2:"Cell_bonusCharacterMultiplier2__Qpcd7",bonusCharacterMultiplier3:"Cell_bonusCharacterMultiplier3__0qtZY",bonusWord2:"Cell_bonusWord2__Ztd1C",bonusWord3:"Cell_bonusWord3__eTB6G",characterPoints1:"Cell_characterPoints1__CKxm0",characterPoints2:"Cell_characterPoints2__QkYnj",characterPoints3:"Cell_characterPoints3___SyO2",characterPoints5:"Cell_characterPoints5___OS_7",candidate:"Cell_candidate__qGOhc",actions:"Cell_actions__YOyrG",action:"Cell_action___13Yo",toggleDirection:"Cell_toggleDirection__1WgpQ",right:"Cell_right__ItPQR",blank:"Cell_blank__n7TRD",active:"Cell_active__L88UB"}},7437:function(e){e.exports={button:"Button_button__PjVhE",content:"Button_content__XZA3a",icon:"Button_icon__DJGKY",label:"Button_label__vFl5U"}},3424:function(e){e.exports={dictionary:"Dictionary_dictionary__0CM4j",content:"Dictionary_content__Ehz1U",word:"Dictionary_word__Y2PlX",isAllowed:"Dictionary_isAllowed__VfACe",isNotAllowed:"Dictionary_isNotAllowed__HvWIM",definitions:"Dictionary_definitions__UBslC",definition:"Dictionary_definition__lU1Vz"}},6436:function(e){e.exports={dictionaryInput:"DictionaryInput_dictionaryInput__fsGZD",input:"DictionaryInput_input__0ed6F"}},8426:function(e){e.exports={emptyState:"EmptyState_emptyState__iOAMZ",tiles:"EmptyState_tiles____Cln"}},5890:function(e){e.exports={key:"Key_key__JS7L0"}},8253:function(e){e.exports={mapping:"Mapping_mapping__GQrAe",description:"Mapping_description__osefE",keys:"Mapping_keys__BBLHM",group:"Mapping_group__4H8Aw",plus:"Mapping_plus__aoyZw",slash:"Mapping_slash__xSLL1"}},1500:function(e){e.exports={loading:"Loading_loading__RkVCa",dim:"Loading_dim__H3eXg",logo:"Loading_logo__1hwt4",tiles:"Loading_tiles__RNn33"}},9308:function(e){e.exports={navButtons:"NavButtons_navButtons__2jdaO",button:"NavButtons_button__1mjyl",separator:"NavButtons_separator__4FwOF",error:"NavButtons_error__UMVHy"}},2747:function(e){e.exports={notFound:"NotFound_notFound__yhPFA",link:"NotFound_link__a1OqI",icon:"NotFound_icon__zBP4O",tiles:"NotFound_tiles__Nxd8Z"}},6807:function(e){e.exports={wave:"PlainTiles_wave__MUPo5",tile:"PlainTiles_tile__4eIjX",dropShadow:"PlainTiles_dropShadow__TjPAL",hide:"PlainTiles_hide__ZXQ7t",progress:"PlainTiles_progress__GEq5G",pulse:"PlainTiles_pulse__MTQRB"}},6079:function(e){e.exports={rack:"Rack_rack__uEE8X",tile:"Rack_tile__kMzR_"}},9627:function(e){e.exports={radio:"Radio_radio__06IBr",icon:"Radio_icon__ORxR0",checked:"Radio_checked__MlqJv",input:"Radio_input__PFpGB",content:"Radio_content__08chi"}},9365:function(e){e.exports={character:"Character_character__FN97z",finished:"Character_finished__DsFyj",overused:"Character_overused__PEXhw",tile:"Character_tile__lqZEb",count:"Character_count__SSxGA"}},5343:function(e){e.exports={group:"RemainingTiles_group___8ILF",title:"RemainingTiles_title__QQYTv",content:"RemainingTiles_content__5cnQv"}},9474:function(e){e.exports={results:"Results_results__258ah",emptyState:"Results_emptyState__qSRMr",list:"Results_list__zp7CV",outdated:"Results_outdated__4j0Ql",header:"Results_header__RmHXo",headerButton:"Results_headerButton__qNx0w",headerButtonLabel:"Results_headerButtonLabel__XQiIP",result:"Results_result__bpPGb",resultContent:"Results_resultContent__fynvQ",word:"Results_word__j20u_",cell:"Results_cell__13BH5",stat:"Results_stat__EguZM",points:"Results_points__7BAKE",outdatedButton:"Results_outdatedButton__5fzwS",sortIcon:"Results_sortIcon__y02RA",input:"Results_input__B3K40"}},2813:function(e){e.exports={resultsInput:"ResultsInput_resultsInput__geMao",input:"ResultsInput_input__dc2PT"}},1511:function(e){e.exports={screen:"Screen_screen__VnMC9",closeButton:"Screen_closeButton__0QT6U",content:"Screen_content__t2VCW"}},7352:function(e){e.exports={option:"AutoGroupTilesSetting_option__cNX7P",label:"AutoGroupTilesSetting_label__njnKi"}},4116:function(e){e.exports={option:"ConfigSetting_option__T_XJr",label:"ConfigSetting_label__SKiut"}},7689:function(e){e.exports={option:"LocaleSetting_option__86eJS",flag:"LocaleSetting_flag__B1FNp",checked:"LocaleSetting_checked__9aDcB",label:"LocaleSetting_label__Nl2tL",es:"LocaleSetting_es__o6mp8",fr:"LocaleSetting_fr__h7FxL",gb:"LocaleSetting_gb__qt9o9",pl:"LocaleSetting_pl__Xg3Ib",us:"LocaleSetting_us__ov8al",de:"LocaleSetting_de__73PFW"}},3445:function(e){e.exports={modal:"Sidebar_modal__pavmk",afterOpen:"Sidebar_afterOpen__Y7kOz",sidebar:"Sidebar_sidebar__pTTPu",beforeClose:"Sidebar_beforeClose__vzZNQ",overlay:"Sidebar_overlay__fZ2ki",header:"Sidebar_header__6FiSo",title:"Sidebar_title__pzTL8",closeButton:"Sidebar_closeButton__TjUpw",content:"Sidebar_content__lLjwZ"}},5548:function(e){e.exports={section:"Section_section__Rd7qk",heading:"Section_heading___PU_r"}},6719:function(e){e.exports={splash:"Splash_splash__DJBx_",animated:"Splash_animated__p0GNp",hide:"Splash_hide__4sfov",logos:"Splash_logos__pFer4",pulse:"Splash_pulse__bc8xX",logoColor:"Splash_logoColor__InOR_",progress:"Splash_progress__82M_I",logoGrayscale:"Splash_logoGrayscale__qe_QT",author:"Splash_author__0gDgp",wave:"Splash_wave___xjSZ"}},7682:function(e){e.exports={squareButton:"SquareButton_squareButton__qwR9a",content:"SquareButton_content__1ucqM",icon:"SquareButton_icon__t5YSC"}},5101:function(e){e.exports={tile:"Tile_tile__14nuL",raised:"Tile_raised__WKori",points1:"Tile_points1__yl4Jl",points2:"Tile_points2__Xsbcp",points3:"Tile_points3__lJKOJ",points4:"Tile_points4__IylBI",points5:"Tile_points5__Kzick",blank:"Tile_blank__q2Ujv",character:"Tile_character__2XzcR",highlighted:"Tile_highlighted__eg00X",points:"Tile_points__z39vV"}},194:function(e){e.exports={ARROW_SIZE:"4px",PREVENT_OVERFLOW:"10px",OFFSET:"2px",tooltip:"Tooltip_tooltip__98Sw9",top:"Tooltip_top__Vk7yg",arrow:"Tooltip_arrow__9oy08",right:"Tooltip_right__kORxq",bottom:"Tooltip_bottom__QwH6o",left:"Tooltip_left__bSM_7"}},538:function(e){e.exports={well:"Well_well__WTn5e"}}}]);
|