@scrabble-solver/scrabble-solver 2.8.6 → 2.8.8
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 +10 -10
- 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/413.js +266 -110
- package/.next/server/chunks/{206.js → 429.js} +2 -4137
- package/.next/server/chunks/515.js +197 -91
- package/.next/server/chunks/{907.js → 911.js} +134 -367
- package/.next/server/chunks/939.js +218 -0
- 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.nft.json +1 -1
- package/.next/server/pages/api/dictionary/[locale]/[word].js +33 -17
- package/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
- package/.next/server/pages/api/solve.js +399 -56
- package/.next/server/pages/api/solve.js.nft.json +1 -1
- package/.next/server/pages/api/visit.js +3 -2
- package/.next/server/pages/api/visit.js.nft.json +1 -1
- package/.next/server/pages/index.html +3 -7
- package/.next/server/pages/index.js +12 -14
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/index.json +1 -1
- package/.next/static/chunks/615-d258f6c528c18622.js +1 -0
- package/.next/static/chunks/pages/{404-30c06e61d256c5b2.js → 404-8eb3ba4f0ba17e08.js} +1 -1
- package/.next/static/chunks/pages/_app-4a663fd3d5ca4524.js +1 -0
- package/.next/static/chunks/pages/index-1a9826d740cc8830.js +1 -0
- package/.next/static/css/180c6c26317ac90f.css +1 -0
- package/.next/static/css/751e8a14776d05d8.css +1 -0
- package/.next/static/z3J3qmq1nazbDv_ENIkCo/_buildManifest.js +1 -0
- package/.next/static/{VjSpyGDWyVaO0muz54q_j → z3J3qmq1nazbDv_ENIkCo}/_ssgManifest.js +0 -0
- package/.next/trace +41 -42
- package/package.json +9 -9
- package/src/api/index.ts +3 -9
- package/src/api/isBoardValid.ts +43 -0
- package/src/api/isCellValid.ts +26 -0
- package/src/api/isRowValid.ts +19 -0
- package/src/components/Board/components/Cell/Cell.module.scss +34 -9
- package/src/components/Board/components/Cell/Cell.tsx +23 -4
- package/src/components/Board/components/Cell/CellPure.tsx +29 -1
- package/src/components/Board/hooks/useGrid.ts +1 -0
- package/src/components/Dictionary/Dictionary.module.scss +20 -0
- package/src/components/Dictionary/Dictionary.tsx +40 -29
- package/src/components/Results/Cell.tsx +3 -2
- package/src/components/Results/Result.tsx +16 -6
- package/src/components/ResultsInput/ResultsInput.tsx +11 -3
- package/src/hooks/useIsTablet.ts +2 -2
- package/src/i18n/de.json +1 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/es.json +1 -0
- package/src/i18n/fr.json +1 -0
- package/src/i18n/pl.json +1 -0
- package/src/icons/Flag.svg +4 -0
- package/src/icons/Star.svg +4 -0
- package/src/icons/index.ts +2 -0
- package/src/lib/getRemainingTiles.ts +1 -1
- package/src/lib/index.ts +2 -1
- package/src/lib/isRegExp.ts +11 -0
- package/src/lib/isStringArray.ts +5 -0
- package/src/lib/sortResults.ts +5 -5
- package/src/pages/api/dictionary/[locale]/[word].ts +35 -11
- package/src/pages/api/solve.ts +39 -19
- package/src/pages/api/visit.ts +1 -0
- package/src/pages/index.module.scss +5 -11
- package/src/pages/index.tsx +5 -5
- package/src/sdk/{findWordDefinition.ts → findWordDefinitions.ts} +3 -3
- package/src/sdk/index.ts +1 -1
- package/src/state/rootReducer.ts +10 -1
- package/src/state/sagas.ts +32 -12
- package/src/state/selectors.ts +41 -7
- package/src/state/slices/cellFilterInitialState.ts +7 -0
- package/src/state/slices/cellFilterSlice.ts +24 -0
- package/src/state/slices/dictionaryInitialState.ts +3 -3
- package/src/state/slices/dictionarySlice.ts +4 -10
- package/src/state/slices/index.ts +2 -0
- package/src/types/index.ts +1 -0
- package/.next/static/VjSpyGDWyVaO0muz54q_j/_buildManifest.js +0 -1
- package/.next/static/chunks/56-e2797384ae4b0fc0.js +0 -1
- package/.next/static/chunks/pages/_app-5136d33b9b007fd7.js +0 -1
- package/.next/static/chunks/pages/index-13ea7770a65c69ee.js +0 -1
- package/.next/static/css/3159cfe62ff742a3.css +0 -1
- package/.next/static/css/729bb37fe8f9bee6.css +0 -1
- package/src/api/validateBoard.ts +0 -45
- package/src/api/validateCell.ts +0 -40
- package/src/api/validateCharacter.ts +0 -14
- package/src/api/validateCharacters.ts +0 -24
- package/src/api/validateConfigId.ts +0 -9
- package/src/api/validateLocale.ts +0 -15
- package/src/api/validateRow.ts +0 -17
- package/src/api/validateTile.ts +0 -21
- package/src/api/validateWord.ts +0 -11
- package/src/lib/isLocale.ts +0 -7
|
@@ -220,13 +220,13 @@ const tiles_1 = __webpack_require__(87529);
|
|
|
220
220
|
const base = {
|
|
221
221
|
allTilesBonusScore: 50,
|
|
222
222
|
blankScore: 0,
|
|
223
|
+
blanksCount: 2,
|
|
223
224
|
boardHeight: 15,
|
|
224
225
|
boardWidth: 15,
|
|
225
226
|
bonuses: bonuses_1.default,
|
|
226
227
|
id: 'literaki',
|
|
227
|
-
|
|
228
|
+
maximumCharactersCount: 7,
|
|
228
229
|
name: 'Literaki',
|
|
229
|
-
numberOfBlanks: 2,
|
|
230
230
|
};
|
|
231
231
|
const literaki = {
|
|
232
232
|
id: base.id,
|
|
@@ -570,13 +570,13 @@ const tiles_1 = __webpack_require__(29213);
|
|
|
570
570
|
const base = {
|
|
571
571
|
allTilesBonusScore: 50,
|
|
572
572
|
blankScore: 0,
|
|
573
|
+
blanksCount: 2,
|
|
573
574
|
boardHeight: 15,
|
|
574
575
|
boardWidth: 15,
|
|
575
576
|
bonuses: bonuses_1.default,
|
|
576
577
|
id: 'scrabble',
|
|
577
|
-
|
|
578
|
+
maximumCharactersCount: 7,
|
|
578
579
|
name: 'Scrabble',
|
|
579
|
-
numberOfBlanks: 2,
|
|
580
580
|
};
|
|
581
581
|
const scrabble = {
|
|
582
582
|
id: base.id,
|
|
@@ -861,7 +861,7 @@ exports.VOWELS = ['a', 'ą', 'ä', 'e', 'ę', 'i', 'o', 'ó', 'ö', 'u', 'ü', '
|
|
|
861
861
|
|
|
862
862
|
/***/ }),
|
|
863
863
|
|
|
864
|
-
/***/
|
|
864
|
+
/***/ 92237:
|
|
865
865
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
866
866
|
|
|
867
867
|
|
|
@@ -881,6 +881,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
881
881
|
"Mf": () => (/* reexport */ lib_inverseDirection),
|
|
882
882
|
"yl": () => (/* reexport */ lib_isCtrl),
|
|
883
883
|
"V5": () => (/* reexport */ lib_isMac),
|
|
884
|
+
"Kj": () => (/* reexport */ lib_isRegExp),
|
|
884
885
|
"HP": () => (/* reexport */ lib_memoize),
|
|
885
886
|
"ZT": () => (/* reexport */ lib_noop),
|
|
886
887
|
"uj": () => (/* reexport */ lib_sortResults),
|
|
@@ -888,7 +889,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
888
889
|
"gV": () => (/* reexport */ lib_zipCharactersAndTiles)
|
|
889
890
|
});
|
|
890
891
|
|
|
891
|
-
// UNUSED EXPORTS: comparator, createKeyComparator, getRemainingTilesCount, getTotalRemainingTilesCount,
|
|
892
|
+
// UNUSED EXPORTS: comparator, createKeyComparator, getRemainingTilesCount, getTotalRemainingTilesCount, isStringArray, numberComparator, reverseComparator, stringComparator
|
|
892
893
|
|
|
893
894
|
;// CONCATENATED MODULE: ./src/lib/canUseDom.ts
|
|
894
895
|
const canUseDom = Boolean( false && 0);
|
|
@@ -1033,7 +1034,7 @@ const getRemainingTiles = (config, board, characters)=>{
|
|
|
1033
1034
|
]));
|
|
1034
1035
|
const blank = {
|
|
1035
1036
|
character: constants_build.BLANK,
|
|
1036
|
-
count: config.
|
|
1037
|
+
count: config.blanksCount,
|
|
1037
1038
|
score: config.blankScore,
|
|
1038
1039
|
usedCount: nonEmptyCells.filter((cell)=>cell.tile.isBlank).length + characters.filter((character)=>character === constants_build.BLANK).length
|
|
1039
1040
|
};
|
|
@@ -1132,12 +1133,6 @@ const isCtrl = (event)=>{
|
|
|
1132
1133
|
};
|
|
1133
1134
|
/* harmony default export */ const lib_isCtrl = (isCtrl);
|
|
1134
1135
|
|
|
1135
|
-
;// CONCATENATED MODULE: ./src/lib/isLocale.ts
|
|
1136
|
-
|
|
1137
|
-
const locales = Object.values(build.Locale);
|
|
1138
|
-
const isLocale = (locale)=>locales.includes(locale);
|
|
1139
|
-
/* harmony default export */ const lib_isLocale = ((/* unused pure expression or super */ null && (isLocale)));
|
|
1140
|
-
|
|
1141
1136
|
;// CONCATENATED MODULE: ./src/lib/isMac.ts
|
|
1142
1137
|
const isMac = ()=>{
|
|
1143
1138
|
if (!globalThis.navigator) {
|
|
@@ -1147,6 +1142,18 @@ const isMac = ()=>{
|
|
|
1147
1142
|
};
|
|
1148
1143
|
/* harmony default export */ const lib_isMac = (isMac);
|
|
1149
1144
|
|
|
1145
|
+
;// CONCATENATED MODULE: ./src/lib/isRegExp.ts
|
|
1146
|
+
const isRegExp = (value)=>{
|
|
1147
|
+
try {
|
|
1148
|
+
// eslint-disable-next-line no-new
|
|
1149
|
+
new RegExp(value);
|
|
1150
|
+
return true;
|
|
1151
|
+
} catch {
|
|
1152
|
+
return false;
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
/* harmony default export */ const lib_isRegExp = (isRegExp);
|
|
1156
|
+
|
|
1150
1157
|
;// CONCATENATED MODULE: ./src/lib/memoize.ts
|
|
1151
1158
|
const memoize = (fn)=>{
|
|
1152
1159
|
const cache = [];
|
|
@@ -1194,13 +1201,13 @@ const reverseComparator = (comparator)=>{
|
|
|
1194
1201
|
|
|
1195
1202
|
|
|
1196
1203
|
const comparators = {
|
|
1197
|
-
[types/* ResultColumn.BlanksCount */.M.BlanksCount]: lib_createKeyComparator("
|
|
1198
|
-
[types/* ResultColumn.ConsonantsCount */.M.ConsonantsCount]: lib_createKeyComparator("
|
|
1204
|
+
[types/* ResultColumn.BlanksCount */.M.BlanksCount]: lib_createKeyComparator("blanksCount"),
|
|
1205
|
+
[types/* ResultColumn.ConsonantsCount */.M.ConsonantsCount]: lib_createKeyComparator("consonantsCount"),
|
|
1199
1206
|
[types/* ResultColumn.Points */.M.Points]: lib_createKeyComparator("points"),
|
|
1200
|
-
[types/* ResultColumn.TilesCount */.M.TilesCount]: lib_createKeyComparator("
|
|
1201
|
-
[types/* ResultColumn.VowelsCount */.M.VowelsCount]: lib_createKeyComparator("
|
|
1207
|
+
[types/* ResultColumn.TilesCount */.M.TilesCount]: lib_createKeyComparator("tilesCount"),
|
|
1208
|
+
[types/* ResultColumn.VowelsCount */.M.VowelsCount]: lib_createKeyComparator("vowelsCount"),
|
|
1202
1209
|
[types/* ResultColumn.Word */.M.Word]: lib_createKeyComparator("word"),
|
|
1203
|
-
[types/* ResultColumn.WordsCount */.M.WordsCount]: lib_createKeyComparator("
|
|
1210
|
+
[types/* ResultColumn.WordsCount */.M.WordsCount]: lib_createKeyComparator("wordsCount")
|
|
1204
1211
|
};
|
|
1205
1212
|
const sortResults = (results, column, sortDirection)=>{
|
|
1206
1213
|
if (typeof results === "undefined") {
|
|
@@ -1299,6 +1306,7 @@ const zipCharactersAndTiles = (characters, tiles)=>{
|
|
|
1299
1306
|
|
|
1300
1307
|
|
|
1301
1308
|
|
|
1309
|
+
|
|
1302
1310
|
|
|
1303
1311
|
|
|
1304
1312
|
/***/ }),
|
|
@@ -1408,7 +1416,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
1408
1416
|
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__);
|
|
1409
1417
|
/* harmony import */ var redux_saga__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75998);
|
|
1410
1418
|
/* harmony import */ var _rootReducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12935);
|
|
1411
|
-
/* harmony import */ var _sagas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
1419
|
+
/* harmony import */ var _sagas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58531);
|
|
1412
1420
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([redux_saga__WEBPACK_IMPORTED_MODULE_1__]);
|
|
1413
1421
|
redux_saga__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
1414
1422
|
|
|
@@ -1455,9 +1463,11 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
1455
1463
|
/* harmony export */ "dN": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.dN),
|
|
1456
1464
|
/* harmony export */ "f2": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.f2),
|
|
1457
1465
|
/* harmony export */ "fN": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.fN),
|
|
1466
|
+
/* harmony export */ "id": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.id),
|
|
1458
1467
|
/* harmony export */ "ix": () => (/* reexport safe */ _useTypedSelector__WEBPACK_IMPORTED_MODULE_6__.Z),
|
|
1459
1468
|
/* harmony export */ "j2": () => (/* reexport safe */ _actions__WEBPACK_IMPORTED_MODULE_0__.j),
|
|
1460
1469
|
/* harmony export */ "lj": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.lj),
|
|
1470
|
+
/* harmony export */ "mO": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.mO),
|
|
1461
1471
|
/* harmony export */ "mc": () => (/* reexport safe */ _actions__WEBPACK_IMPORTED_MODULE_0__.m),
|
|
1462
1472
|
/* harmony export */ "md": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.md),
|
|
1463
1473
|
/* harmony export */ "qM": () => (/* reexport safe */ _useTranslate__WEBPACK_IMPORTED_MODULE_5__.Z),
|
|
@@ -1473,7 +1483,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
1473
1483
|
/* harmony import */ var _createAppStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33282);
|
|
1474
1484
|
/* harmony import */ var _localStorage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83773);
|
|
1475
1485
|
/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6114);
|
|
1476
|
-
/* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
1486
|
+
/* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8772);
|
|
1477
1487
|
/* harmony import */ var _useTranslate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41573);
|
|
1478
1488
|
/* harmony import */ var _useTypedSelector__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(53872);
|
|
1479
1489
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_createAppStore__WEBPACK_IMPORTED_MODULE_1__]);
|
|
@@ -1556,11 +1566,12 @@ const localStorage = {
|
|
|
1556
1566
|
/* harmony export */ });
|
|
1557
1567
|
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86695);
|
|
1558
1568
|
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__);
|
|
1559
|
-
/* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1569
|
+
/* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8772);
|
|
1560
1570
|
|
|
1561
1571
|
|
|
1562
1572
|
const rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)({
|
|
1563
1573
|
board: _slices__WEBPACK_IMPORTED_MODULE_1__/* .boardSlice.reducer */ .I8.reducer,
|
|
1574
|
+
cellFilter: _slices__WEBPACK_IMPORTED_MODULE_1__/* .cellFilterSlice.reducer */ .mO.reducer,
|
|
1564
1575
|
dictionary: _slices__WEBPACK_IMPORTED_MODULE_1__/* .dictionarySlice.reducer */ .lj.reducer,
|
|
1565
1576
|
rack: _slices__WEBPACK_IMPORTED_MODULE_1__/* .rackSlice.reducer */ .O_.reducer,
|
|
1566
1577
|
results: _slices__WEBPACK_IMPORTED_MODULE_1__/* .resultsSlice.reducer */ ._C.reducer,
|
|
@@ -1572,7 +1583,7 @@ const rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)({
|
|
|
1572
1583
|
|
|
1573
1584
|
/***/ }),
|
|
1574
1585
|
|
|
1575
|
-
/***/
|
|
1586
|
+
/***/ 58531:
|
|
1576
1587
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1577
1588
|
|
|
1578
1589
|
|
|
@@ -1586,15 +1597,15 @@ var build = __webpack_require__(34046);
|
|
|
1586
1597
|
// EXTERNAL MODULE: external "redux-saga/effects"
|
|
1587
1598
|
var effects_ = __webpack_require__(56477);
|
|
1588
1599
|
// EXTERNAL MODULE: ./src/lib/index.ts + 27 modules
|
|
1589
|
-
var lib = __webpack_require__(
|
|
1590
|
-
;// CONCATENATED MODULE: ./src/sdk/
|
|
1600
|
+
var lib = __webpack_require__(92237);
|
|
1601
|
+
;// CONCATENATED MODULE: ./src/sdk/findWordDefinitions.ts
|
|
1591
1602
|
|
|
1592
|
-
const
|
|
1603
|
+
const findWordDefinitions = async (locale, word)=>{
|
|
1593
1604
|
const url = `/api/dictionary/${locale}/${word}`;
|
|
1594
1605
|
const json = await fetch(url).then((response)=>response.json());
|
|
1595
|
-
return build.WordDefinition.fromJson
|
|
1606
|
+
return json.map(build.WordDefinition.fromJson);
|
|
1596
1607
|
};
|
|
1597
|
-
/* harmony default export */ const
|
|
1608
|
+
/* harmony default export */ const sdk_findWordDefinitions = (findWordDefinitions);
|
|
1598
1609
|
|
|
1599
1610
|
;// CONCATENATED MODULE: ./src/sdk/solve.ts
|
|
1600
1611
|
const solve = ({ board , characters , configId , locale })=>{
|
|
@@ -1630,8 +1641,8 @@ const visit = ()=>{
|
|
|
1630
1641
|
var actions = __webpack_require__(89969);
|
|
1631
1642
|
// EXTERNAL MODULE: ./src/state/selectors.ts + 6 modules
|
|
1632
1643
|
var selectors = __webpack_require__(6114);
|
|
1633
|
-
// EXTERNAL MODULE: ./src/state/slices/index.ts +
|
|
1634
|
-
var slices = __webpack_require__(
|
|
1644
|
+
// EXTERNAL MODULE: ./src/state/slices/index.ts + 14 modules
|
|
1645
|
+
var slices = __webpack_require__(8772);
|
|
1635
1646
|
;// CONCATENATED MODULE: ./src/state/sagas.ts
|
|
1636
1647
|
|
|
1637
1648
|
|
|
@@ -1641,8 +1652,9 @@ var slices = __webpack_require__(28546);
|
|
|
1641
1652
|
|
|
1642
1653
|
|
|
1643
1654
|
const SUBMIT_DELAY = 150;
|
|
1644
|
-
const
|
|
1655
|
+
const memoizedFindWordDefinitions = (0,lib/* memoize */.HP)(sdk_findWordDefinitions);
|
|
1645
1656
|
function* rootSaga() {
|
|
1657
|
+
yield (0,effects_.takeEvery)(slices/* boardSlice.actions.changeCellValue.type */.I8.actions.changeCellValue.type, onCellValueChange);
|
|
1646
1658
|
yield (0,effects_.takeEvery)(slices/* resultsSlice.actions.applyResult.type */._C.actions.applyResult.type, onApplyResult);
|
|
1647
1659
|
yield (0,effects_.takeEvery)(slices/* resultsSlice.actions.changeResultCandidate.type */._C.actions.changeResultCandidate.type, onResultCandidateChange);
|
|
1648
1660
|
yield (0,effects_.takeEvery)(slices/* settingsSlice.actions.changeConfigId.type */.xj.actions.changeConfigId.type, onConfigIdChange);
|
|
@@ -1652,9 +1664,16 @@ function* rootSaga() {
|
|
|
1652
1664
|
yield (0,effects_.takeLatest)(actions/* reset.type */.m.type, onReset);
|
|
1653
1665
|
yield (0,effects_.takeLatest)(slices/* solveSlice.actions.submit.type */.TP.actions.submit.type, onSubmit);
|
|
1654
1666
|
}
|
|
1667
|
+
function* onCellValueChange({ payload }) {
|
|
1668
|
+
const isFiltered = yield (0,effects_.select)((state)=>(0,selectors/* selectCellIsFiltered */.id)(state, payload));
|
|
1669
|
+
if (isFiltered) {
|
|
1670
|
+
yield (0,effects_.put)(slices/* cellFilterSlice.actions.toggle */.mO.actions.toggle(payload));
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1655
1673
|
function* onApplyResult({ payload: result }) {
|
|
1656
1674
|
const autoGroupTiles = yield (0,effects_.select)(selectors/* selectAutoGroupTiles */.uz);
|
|
1657
1675
|
yield (0,effects_.put)(slices/* boardSlice.actions.applyResult */.I8.actions.applyResult(result));
|
|
1676
|
+
yield (0,effects_.put)(slices/* cellFilterSlice.actions.reset */.mO.actions.reset());
|
|
1658
1677
|
yield (0,effects_.put)(slices/* rackSlice.actions.removeTiles */.O_.actions.removeTiles(result.tiles));
|
|
1659
1678
|
yield (0,effects_.put)(slices/* rackSlice.actions.groupTiles */.O_.actions.groupTiles(autoGroupTiles));
|
|
1660
1679
|
}
|
|
@@ -1666,12 +1685,12 @@ function* onConfigIdChange() {
|
|
|
1666
1685
|
function* onDictionarySubmit() {
|
|
1667
1686
|
const { input: word } = yield (0,effects_.select)(selectors/* selectDictionary */.w1);
|
|
1668
1687
|
const locale = yield (0,effects_.select)(selectors/* selectLocale */.fN);
|
|
1669
|
-
if (!
|
|
1688
|
+
if (!memoizedFindWordDefinitions.hasCache(locale, word)) {
|
|
1670
1689
|
yield (0,effects_.delay)(SUBMIT_DELAY);
|
|
1671
1690
|
}
|
|
1672
1691
|
try {
|
|
1673
|
-
const
|
|
1674
|
-
yield (0,effects_.put)(slices/* dictionarySlice.actions.submitSuccess */.lj.actions.submitSuccess(
|
|
1692
|
+
const wordDefinitions = yield (0,effects_.call)(memoizedFindWordDefinitions, locale, word);
|
|
1693
|
+
yield (0,effects_.put)(slices/* dictionarySlice.actions.submitSuccess */.lj.actions.submitSuccess(wordDefinitions));
|
|
1675
1694
|
} catch (error) {
|
|
1676
1695
|
yield (0,effects_.put)(slices/* dictionarySlice.actions.submitFailure */.lj.actions.submitFailure());
|
|
1677
1696
|
}
|
|
@@ -1682,6 +1701,7 @@ function* onInitialize() {
|
|
|
1682
1701
|
}
|
|
1683
1702
|
function* onReset() {
|
|
1684
1703
|
yield (0,effects_.put)(slices/* boardSlice.actions.reset */.I8.actions.reset());
|
|
1704
|
+
yield (0,effects_.put)(slices/* cellFilterSlice.actions.reset */.mO.actions.reset());
|
|
1685
1705
|
yield (0,effects_.put)(slices/* dictionarySlice.actions.reset */.lj.actions.reset());
|
|
1686
1706
|
yield (0,effects_.put)(slices/* rackSlice.actions.reset */.O_.actions.reset());
|
|
1687
1707
|
yield (0,effects_.put)(slices/* resultsSlice.actions.reset */._C.actions.reset());
|
|
@@ -1693,7 +1713,7 @@ function* onLocaleChange() {
|
|
|
1693
1713
|
}
|
|
1694
1714
|
function* onResultCandidateChange({ payload: result }) {
|
|
1695
1715
|
if (result) {
|
|
1696
|
-
yield (0,effects_.put)(slices/* dictionarySlice.actions.changeInput */.lj.actions.changeInput(result.
|
|
1716
|
+
yield (0,effects_.put)(slices/* dictionarySlice.actions.changeInput */.lj.actions.changeInput(result.words.join(", ")));
|
|
1697
1717
|
yield (0,effects_.put)(slices/* dictionarySlice.actions.submit */.lj.actions.submit());
|
|
1698
1718
|
}
|
|
1699
1719
|
}
|
|
@@ -1730,15 +1750,15 @@ function* onSubmit() {
|
|
|
1730
1750
|
function* ensureProperTilesCount() {
|
|
1731
1751
|
const { config } = yield (0,effects_.select)(selectors/* selectConfig */.$o);
|
|
1732
1752
|
const characters = yield (0,effects_.select)(selectors/* selectCharacters */.yp);
|
|
1733
|
-
if (config.
|
|
1734
|
-
const differenceCount = Math.abs(config.
|
|
1753
|
+
if (config.maximumCharactersCount > characters.length) {
|
|
1754
|
+
const differenceCount = Math.abs(config.maximumCharactersCount - characters.length);
|
|
1735
1755
|
yield (0,effects_.put)(slices/* rackSlice.actions.init */.O_.actions.init([
|
|
1736
1756
|
...characters,
|
|
1737
1757
|
...Array(differenceCount).fill(null)
|
|
1738
1758
|
]));
|
|
1739
|
-
} else if (config.
|
|
1740
|
-
const nonNulls = characters.filter(Boolean).slice(0, config.
|
|
1741
|
-
const differenceCount1 = Math.abs(config.
|
|
1759
|
+
} else if (config.maximumCharactersCount < characters.length) {
|
|
1760
|
+
const nonNulls = characters.filter(Boolean).slice(0, config.maximumCharactersCount);
|
|
1761
|
+
const differenceCount1 = Math.abs(config.maximumCharactersCount - nonNulls.length);
|
|
1742
1762
|
const autoGroupTiles = yield (0,effects_.select)(selectors/* selectAutoGroupTiles */.uz);
|
|
1743
1763
|
yield (0,effects_.put)(slices/* rackSlice.actions.init */.O_.actions.init([
|
|
1744
1764
|
...nonNulls,
|
|
@@ -1761,6 +1781,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1761
1781
|
"uz": () => (/* binding */ selectAutoGroupTiles),
|
|
1762
1782
|
"ZO": () => (/* binding */ selectBoard),
|
|
1763
1783
|
"O0": () => (/* binding */ selectCellBonus),
|
|
1784
|
+
"id": () => (/* binding */ selectCellIsFiltered),
|
|
1764
1785
|
"Or": () => (/* binding */ selectCharacterPoints),
|
|
1765
1786
|
"yp": () => (/* binding */ selectCharacters),
|
|
1766
1787
|
"$o": () => (/* binding */ selectConfig),
|
|
@@ -1782,7 +1803,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1782
1803
|
"nb": () => (/* binding */ selectTranslations)
|
|
1783
1804
|
});
|
|
1784
1805
|
|
|
1785
|
-
// UNUSED EXPORTS: selectHasBoardChanged, selectHaveCharactersChanged, selectLastSolvedParameters, selectRemainingTiles, selectResultCandidate, selectResultCandidateCells, selectResults, selectTranslation
|
|
1806
|
+
// UNUSED EXPORTS: selectCellFilter, selectHasBoardChanged, selectHaveCharactersChanged, selectLastSolvedParameters, selectRemainingTiles, selectResultCandidate, selectResultCandidateCells, selectResults, selectTranslation
|
|
1786
1807
|
|
|
1787
1808
|
// EXTERNAL MODULE: external "@reduxjs/toolkit"
|
|
1788
1809
|
var toolkit_ = __webpack_require__(75184);
|
|
@@ -1791,15 +1812,15 @@ var build = __webpack_require__(89418);
|
|
|
1791
1812
|
// EXTERNAL MODULE: ../types/build/index.js
|
|
1792
1813
|
var types_build = __webpack_require__(34046);
|
|
1793
1814
|
;// CONCATENATED MODULE: ./src/i18n/de.json
|
|
1794
|
-
const de_namespaceObject = JSON.parse('{"cell.set-blank":"Als Blanko markieren","cell.set-not-blank":"Nicht als Blanko markieren","cell.toggle-direction":"Schreibrichtung - klicken zum Wechseln","common.blanks":"Blankos","common.clear":"Löschen","common.close":"Schließen","common.consonants":"Konsonanten","common.loading":"Laden","common.points":"Punkte","common.tiles":"Steine","common.two-letter-tiles":"Zwei-Buchstaben","common.vowels":"Vokale","common.word":"Wort","common.words":"Wörter","dictionary.empty-state.no-definitions":"Wort existiert im Wörterbuch aber hat keine Definition.","dictionary.empty-state.no-results":"Wort kann nicht im Wörterbuch gefunden werden.","dictionary.empty-state.not-allowed":"Dieses Wort ist nicht erlaubt.","dictionary.empty-state.uninitialized":"Die Wörterbuchdefinition des letzten markierten Wortes wird hier angezeigt.","dictionary.input.placeholder":"Durchsuche Wörterbuch...","empty-state.error":"Fehler","empty-state.info":"Info","empty-state.success":"Juhuu!","empty-state.warning":"Oje!","github":"Schau dieses Projekt auf GitHub an","keyMap":"Tastaturkürzel","keyMap.board":"Brett","keyMap.board.toggle-blank":"Als Blanko markieren / aufheben","keyMap.board.toggle-direction":"Schreibrichtung umschalten","keyMap.board-and-rack":"Brett & Ablage","keyMap.board-and-rack.insert-two-letter-tile":"Zwei-Buchstaben Stein hinzufügen","keyMap.board-and-rack.navigate":"Navigieren","keyMap.board-and-rack.remove-tile":"Stein entfernen","keyMap.board-and-rack.submit":"Lösen starten","keyMap.rack":"Ablage","keyMap.rack.insert-blank":"Blanko hinzufügen (Leertaste)","rack.placeholder":"Steine…","remaining-tiles":"Restliche Steine","results.empty-state.no-filtered-results":"Keine Ergebnisse für diese Anfrage.","results.empty-state.no-results":"Keine Ergebnisse - kein Wort konnte generiert werden.","results.empty-state.outdated":"Ergebnisse sind alt. Klicken zum Aktualisieren.","results.empty-state.uninitialized":"Wörter die aus deinen Buchstaben generiert wurden erscheinen hier.","results.input.placeholder":"Suchergebnisse... (RegExp)","results.solve":"Lösen","settings":"Einstellungen","settings.autoGroupTiles":"Restliche Steine gruppieren","settings.autoGroupTiles.left":"Linke Seite","settings.autoGroupTiles.right":"Rechte Seite","settings.autoGroupTiles.null":"Nicht gruppieren","settings.game":"Spiel","settings.language":"Sprache"}');
|
|
1815
|
+
const de_namespaceObject = JSON.parse('{"cell.filter-cell":"Zielort - klicken zum Wechseln","cell.set-blank":"Als Blanko markieren","cell.set-not-blank":"Nicht als Blanko markieren","cell.toggle-direction":"Schreibrichtung - klicken zum Wechseln","common.blanks":"Blankos","common.clear":"Löschen","common.close":"Schließen","common.consonants":"Konsonanten","common.loading":"Laden","common.points":"Punkte","common.tiles":"Steine","common.two-letter-tiles":"Zwei-Buchstaben","common.vowels":"Vokale","common.word":"Wort","common.words":"Wörter","dictionary.empty-state.no-definitions":"Wort existiert im Wörterbuch aber hat keine Definition.","dictionary.empty-state.no-results":"Wort kann nicht im Wörterbuch gefunden werden.","dictionary.empty-state.not-allowed":"Dieses Wort ist nicht erlaubt.","dictionary.empty-state.uninitialized":"Die Wörterbuchdefinition des letzten markierten Wortes wird hier angezeigt.","dictionary.input.placeholder":"Durchsuche Wörterbuch...","empty-state.error":"Fehler","empty-state.info":"Info","empty-state.success":"Juhuu!","empty-state.warning":"Oje!","github":"Schau dieses Projekt auf GitHub an","keyMap":"Tastaturkürzel","keyMap.board":"Brett","keyMap.board.toggle-blank":"Als Blanko markieren / aufheben","keyMap.board.toggle-direction":"Schreibrichtung umschalten","keyMap.board-and-rack":"Brett & Ablage","keyMap.board-and-rack.insert-two-letter-tile":"Zwei-Buchstaben Stein hinzufügen","keyMap.board-and-rack.navigate":"Navigieren","keyMap.board-and-rack.remove-tile":"Stein entfernen","keyMap.board-and-rack.submit":"Lösen starten","keyMap.rack":"Ablage","keyMap.rack.insert-blank":"Blanko hinzufügen (Leertaste)","rack.placeholder":"Steine…","remaining-tiles":"Restliche Steine","results.empty-state.no-filtered-results":"Keine Ergebnisse für diese Anfrage.","results.empty-state.no-results":"Keine Ergebnisse - kein Wort konnte generiert werden.","results.empty-state.outdated":"Ergebnisse sind alt. Klicken zum Aktualisieren.","results.empty-state.uninitialized":"Wörter die aus deinen Buchstaben generiert wurden erscheinen hier.","results.input.placeholder":"Suchergebnisse... (RegExp)","results.solve":"Lösen","settings":"Einstellungen","settings.autoGroupTiles":"Restliche Steine gruppieren","settings.autoGroupTiles.left":"Linke Seite","settings.autoGroupTiles.right":"Rechte Seite","settings.autoGroupTiles.null":"Nicht gruppieren","settings.game":"Spiel","settings.language":"Sprache"}');
|
|
1795
1816
|
;// CONCATENATED MODULE: ./src/i18n/en.json
|
|
1796
|
-
const en_namespaceObject = JSON.parse('{"cell.set-blank":"Mark it a blank","cell.set-not-blank":"Mark it not a blank","cell.toggle-direction":"Typing direction - click to toggle","common.blanks":"Blanks","common.clear":"Clear","common.close":"Close","common.consonants":"Consonants","common.loading":"Loading","common.points":"Points","common.tiles":"Tiles","common.two-letter-tiles":"Two-letter","common.vowels":"Vowels","common.word":"Word","common.words":"Words","dictionary.empty-state.no-definitions":"Word exists in the dictionary but it does not have a definition.","dictionary.empty-state.no-results":"Unable to find word definition in dictionary.","dictionary.empty-state.not-allowed":"This word is not allowed.","dictionary.empty-state.uninitialized":"Dictionary definition of the last highlighted word will be shown here.","dictionary.input.placeholder":"Search dictionary...","empty-state.error":"Error","empty-state.info":"Info","empty-state.success":"Yeah!","empty-state.warning":"Oops!","github":"See this project on GitHub","keyMap":"Keyboard shortcuts","keyMap.board":"Board","keyMap.board.toggle-blank":"Mark/unmark tile as a blank","keyMap.board.toggle-direction":"Toggle typing direction","keyMap.board-and-rack":"Board & rack","keyMap.board-and-rack.insert-two-letter-tile":"Insert two-letter tile","keyMap.board-and-rack.navigate":"Navigate","keyMap.board-and-rack.remove-tile":"Remove tile","keyMap.board-and-rack.submit":"Start solving","keyMap.rack":"Rack","keyMap.rack.insert-blank":"Insert blank (spacebar)","rack.placeholder":"Letters","remaining-tiles":"Remaining tiles","results.empty-state.no-filtered-results":"No result matches this query.","results.empty-state.no-results":"No results - unable to generate any words.","results.empty-state.outdated":"Results are outdated. Click below to update.","results.empty-state.uninitialized":"Words generated from your letters will be shown here.","results.input.placeholder":"Search results... (RegExp)","results.solve":"Solve","settings":"Settings","settings.autoGroupTiles":"Group remaining tiles","settings.autoGroupTiles.left":"On the left","settings.autoGroupTiles.right":"On the right","settings.autoGroupTiles.null":"Do not group","settings.game":"Game","settings.language":"Language"}');
|
|
1817
|
+
const en_namespaceObject = JSON.parse('{"cell.filter-cell":"Target destination - click to toggle","cell.set-blank":"Mark it a blank","cell.set-not-blank":"Mark it not a blank","cell.toggle-direction":"Typing direction - click to toggle","common.blanks":"Blanks","common.clear":"Clear","common.close":"Close","common.consonants":"Consonants","common.loading":"Loading","common.points":"Points","common.tiles":"Tiles","common.two-letter-tiles":"Two-letter","common.vowels":"Vowels","common.word":"Word","common.words":"Words","dictionary.empty-state.no-definitions":"Word exists in the dictionary but it does not have a definition.","dictionary.empty-state.no-results":"Unable to find word definition in dictionary.","dictionary.empty-state.not-allowed":"This word is not allowed.","dictionary.empty-state.uninitialized":"Dictionary definition of the last highlighted word will be shown here.","dictionary.input.placeholder":"Search dictionary...","empty-state.error":"Error","empty-state.info":"Info","empty-state.success":"Yeah!","empty-state.warning":"Oops!","github":"See this project on GitHub","keyMap":"Keyboard shortcuts","keyMap.board":"Board","keyMap.board.toggle-blank":"Mark/unmark tile as a blank","keyMap.board.toggle-direction":"Toggle typing direction","keyMap.board-and-rack":"Board & rack","keyMap.board-and-rack.insert-two-letter-tile":"Insert two-letter tile","keyMap.board-and-rack.navigate":"Navigate","keyMap.board-and-rack.remove-tile":"Remove tile","keyMap.board-and-rack.submit":"Start solving","keyMap.rack":"Rack","keyMap.rack.insert-blank":"Insert blank (spacebar)","rack.placeholder":"Letters","remaining-tiles":"Remaining tiles","results.empty-state.no-filtered-results":"No result matches this query.","results.empty-state.no-results":"No results - unable to generate any words.","results.empty-state.outdated":"Results are outdated. Click below to update.","results.empty-state.uninitialized":"Words generated from your letters will be shown here.","results.input.placeholder":"Search results... (RegExp)","results.solve":"Solve","settings":"Settings","settings.autoGroupTiles":"Group remaining tiles","settings.autoGroupTiles.left":"On the left","settings.autoGroupTiles.right":"On the right","settings.autoGroupTiles.null":"Do not group","settings.game":"Game","settings.language":"Language"}');
|
|
1797
1818
|
;// CONCATENATED MODULE: ./src/i18n/es.json
|
|
1798
|
-
const es_namespaceObject = JSON.parse('{"cell.set-blank":"Marcar como en blanco","cell.set-not-blank":"Marcar como no en blanco","cell.toggle-direction":"Dirección de escritura: haga clic para alternar","common.blanks":"Blancos","common.clear":"Borrar","common.close":"Cerrar","common.consonants":"Consonantes","common.loading":"Cargando","common.points":"Puntos","common.tiles":"Longitud","common.two-letter-tiles":"Dos letras","common.vowels":"Vocales","common.word":"Palabra","common.words":"Palabras","dictionary.empty-state.no-definitions":"La palabra existe en el diccionario pero no tiene una definición.","dictionary.empty-state.no-results":"No se puede encontrar la definición de palabra en el diccionario.","dictionary.empty-state.not-allowed":"Esta palabra no es aceptable.","dictionary.empty-state.uninitialized":"Aquí se mostrará la definición del diccionario de la última palabra resaltada.","dictionary.input.placeholder":"Busca el diccionario...","empty-state.error":"Error","empty-state.info":"Info","empty-state.success":"Sí!","empty-state.warning":"Vaya!","github":"Ver este proyecto en GitHub","keyMap":"Atajos de teclado","keyMap.board":"Tablero","keyMap.board.toggle-blank":"Marcar / desmarcar un espacio en blanco","keyMap.board.toggle-direction":"Alternar dirección de escritura","keyMap.board-and-rack":"Tablero y estante","keyMap.board-and-rack.insert-two-letter-tile":"Insertar mosaico de dos letras","keyMap.board-and-rack.navigate":"Navegar","keyMap.board-and-rack.remove-tile":"Quitar Letra","keyMap.board-and-rack.submit":"Empezar a resolver","keyMap.rack":"Estante","keyMap.rack.insert-blank":"Insertar espacio en blanco (barra espaciadora)","rack.placeholder":"Letras…","remaining-tiles":"Casillas restantes","results.empty-state.no-filtered-results":"Ningún resultado coincide con esta consulta.","results.empty-state.no-results":"No hay resultados; no se pueden generar palabras","results.empty-state.outdated":"Los resultados están desactualizados. Haga clic a continuación para actualizar.","results.empty-state.uninitialized":"Aquí se mostrarán las palabras generadas a partir de sus letras.","results.input.placeholder":"Busque una solución... (RegExp)","results.solve":"Resolver","settings":"Configuración","settings.autoGroupTiles":"Agrupar casillas restantes","settings.autoGroupTiles.left":"A la izquierda","settings.autoGroupTiles.right":"A la derecha","settings.autoGroupTiles.null":"No agrupar","settings.game":"Juego","settings.language":"Idioma"}');
|
|
1819
|
+
const es_namespaceObject = JSON.parse('{"cell.filter-cell":"Destino objetivo: haga clic para alternar","cell.set-blank":"Marcar como en blanco","cell.set-not-blank":"Marcar como no en blanco","cell.toggle-direction":"Dirección de escritura: haga clic para alternar","common.blanks":"Blancos","common.clear":"Borrar","common.close":"Cerrar","common.consonants":"Consonantes","common.loading":"Cargando","common.points":"Puntos","common.tiles":"Longitud","common.two-letter-tiles":"Dos letras","common.vowels":"Vocales","common.word":"Palabra","common.words":"Palabras","dictionary.empty-state.no-definitions":"La palabra existe en el diccionario pero no tiene una definición.","dictionary.empty-state.no-results":"No se puede encontrar la definición de palabra en el diccionario.","dictionary.empty-state.not-allowed":"Esta palabra no es aceptable.","dictionary.empty-state.uninitialized":"Aquí se mostrará la definición del diccionario de la última palabra resaltada.","dictionary.input.placeholder":"Busca el diccionario...","empty-state.error":"Error","empty-state.info":"Info","empty-state.success":"Sí!","empty-state.warning":"Vaya!","github":"Ver este proyecto en GitHub","keyMap":"Atajos de teclado","keyMap.board":"Tablero","keyMap.board.toggle-blank":"Marcar / desmarcar un espacio en blanco","keyMap.board.toggle-direction":"Alternar dirección de escritura","keyMap.board-and-rack":"Tablero y estante","keyMap.board-and-rack.insert-two-letter-tile":"Insertar mosaico de dos letras","keyMap.board-and-rack.navigate":"Navegar","keyMap.board-and-rack.remove-tile":"Quitar Letra","keyMap.board-and-rack.submit":"Empezar a resolver","keyMap.rack":"Estante","keyMap.rack.insert-blank":"Insertar espacio en blanco (barra espaciadora)","rack.placeholder":"Letras…","remaining-tiles":"Casillas restantes","results.empty-state.no-filtered-results":"Ningún resultado coincide con esta consulta.","results.empty-state.no-results":"No hay resultados; no se pueden generar palabras","results.empty-state.outdated":"Los resultados están desactualizados. Haga clic a continuación para actualizar.","results.empty-state.uninitialized":"Aquí se mostrarán las palabras generadas a partir de sus letras.","results.input.placeholder":"Busque una solución... (RegExp)","results.solve":"Resolver","settings":"Configuración","settings.autoGroupTiles":"Agrupar casillas restantes","settings.autoGroupTiles.left":"A la izquierda","settings.autoGroupTiles.right":"A la derecha","settings.autoGroupTiles.null":"No agrupar","settings.game":"Juego","settings.language":"Idioma"}');
|
|
1799
1820
|
;// CONCATENATED MODULE: ./src/i18n/fr.json
|
|
1800
|
-
const fr_namespaceObject = JSON.parse('{"cell.set-blank":"Marquer comme vide","cell.set-not-blank":"Marquer comme non vide","cell.toggle-direction":"Direction d\'écriture - cliquer pour changer","common.blanks":"Cases vides","common.clear":"Effacer","common.close":"Fermer","common.consonants":"Consonnes","common.loading":"Chargement","common.points":"Points","common.tiles":"Cases","common.two-letter-tiles":"Deux lettres","common.vowels":"Voyelles","common.word":"Mot","common.words":"Mots","dictionary.empty-state.no-definitions":"Le mot existe dans le dictionary mais n\'a pas de définition.","dictionary.empty-state.no-results":"Impossible de trouver une définition pour ce mot dans le dictionaire.","dictionary.empty-state.not-allowed":"Ce mot n\'est pas pas acceptable.","dictionary.empty-state.uninitialized":"La définition dictionaire du dernier mot surligné sera affichée ici.","dictionary.input.placeholder":"Rechercher dans le dictionnaire...","empty-state.error":"Erreur","empty-state.info":"Info","empty-state.success":"Ouais!","empty-state.warning":"Oups!","github":"Voir ce projet sur GitHub","keyMap":"Raccourcis clavier","keyMap.board":"Plateau","keyMap.board.toggle-blank":"Marqué/Démarqué la case en tant que vide","keyMap.board.toggle-direction":"Faire basculer la direction d\'écriture","keyMap.board-and-rack":"Plateau & chevalet","keyMap.board-and-rack.insert-two-letter-tile":"Insérer une tuile de deux lettres","keyMap.board-and-rack.navigate":"Naviguer","keyMap.board-and-rack.remove-tile":"Supprimer une case","keyMap.board-and-rack.submit":"Commencer la résolution","keyMap.rack":"Chevalet","keyMap.rack.insert-blank":"Inserer une case vide (spacebar)","rack.placeholder":"Lettres","remaining-tiles":"Cases restantes","results.empty-state.no-filtered-results":"Aucun résultat ne correspond à cette requête","results.empty-state.no-results":"Pas de résultats - impossible de générer des mots.","results.empty-state.outdated":"Les résultats sont dépassé. Cliquer ci-dessous pour mettre à jour.","results.empty-state.uninitialized":"Words generated from your letters will be shown here.","results.input.placeholder":"Rechercher les résultats... (RegExp)","results.solve":"Résoudre","settings":"Options","settings.autoGroupTiles":"Grouper les cases restantes","settings.autoGroupTiles.left":"Vers la droite","settings.autoGroupTiles.right":"Vers la gauche","settings.autoGroupTiles.null":"Ne pas grouper","settings.game":"Jeu","settings.language":"Langue"}');
|
|
1821
|
+
const fr_namespaceObject = JSON.parse('{"cell.filter-cell":"Destination cible - cliquer pour changer","cell.set-blank":"Marquer comme vide","cell.set-not-blank":"Marquer comme non vide","cell.toggle-direction":"Direction d\'écriture - cliquer pour changer","common.blanks":"Cases vides","common.clear":"Effacer","common.close":"Fermer","common.consonants":"Consonnes","common.loading":"Chargement","common.points":"Points","common.tiles":"Cases","common.two-letter-tiles":"Deux lettres","common.vowels":"Voyelles","common.word":"Mot","common.words":"Mots","dictionary.empty-state.no-definitions":"Le mot existe dans le dictionary mais n\'a pas de définition.","dictionary.empty-state.no-results":"Impossible de trouver une définition pour ce mot dans le dictionaire.","dictionary.empty-state.not-allowed":"Ce mot n\'est pas pas acceptable.","dictionary.empty-state.uninitialized":"La définition dictionaire du dernier mot surligné sera affichée ici.","dictionary.input.placeholder":"Rechercher dans le dictionnaire...","empty-state.error":"Erreur","empty-state.info":"Info","empty-state.success":"Ouais!","empty-state.warning":"Oups!","github":"Voir ce projet sur GitHub","keyMap":"Raccourcis clavier","keyMap.board":"Plateau","keyMap.board.toggle-blank":"Marqué/Démarqué la case en tant que vide","keyMap.board.toggle-direction":"Faire basculer la direction d\'écriture","keyMap.board-and-rack":"Plateau & chevalet","keyMap.board-and-rack.insert-two-letter-tile":"Insérer une tuile de deux lettres","keyMap.board-and-rack.navigate":"Naviguer","keyMap.board-and-rack.remove-tile":"Supprimer une case","keyMap.board-and-rack.submit":"Commencer la résolution","keyMap.rack":"Chevalet","keyMap.rack.insert-blank":"Inserer une case vide (spacebar)","rack.placeholder":"Lettres","remaining-tiles":"Cases restantes","results.empty-state.no-filtered-results":"Aucun résultat ne correspond à cette requête","results.empty-state.no-results":"Pas de résultats - impossible de générer des mots.","results.empty-state.outdated":"Les résultats sont dépassé. Cliquer ci-dessous pour mettre à jour.","results.empty-state.uninitialized":"Words generated from your letters will be shown here.","results.input.placeholder":"Rechercher les résultats... (RegExp)","results.solve":"Résoudre","settings":"Options","settings.autoGroupTiles":"Grouper les cases restantes","settings.autoGroupTiles.left":"Vers la droite","settings.autoGroupTiles.right":"Vers la gauche","settings.autoGroupTiles.null":"Ne pas grouper","settings.game":"Jeu","settings.language":"Langue"}');
|
|
1801
1822
|
;// CONCATENATED MODULE: ./src/i18n/pl.json
|
|
1802
|
-
const pl_namespaceObject = JSON.parse('{"cell.set-blank":"Oznacz jako blank","cell.set-not-blank":"Oznacz jako nie blank","cell.toggle-direction":"Kierunek wpisywania - kliknij aby zmienić","common.blanks":"Blanki","common.clear":"Wyczyść","common.close":"Zamknij","common.consonants":"Spółgłoski","common.loading":"Ładowanie","common.points":"Punkty","common.tiles":"Płytki","common.two-letter-tiles":"Dwuliterowe","common.vowels":"Samogłoski","common.word":"Słowo","common.words":"Słowa","dictionary.empty-state.no-definitions":"Słowo istnieje w słowniku ale nie posiada definicji.","dictionary.empty-state.no-results":"Nie udało się znaleźć definicji słowa w słowniku.","dictionary.empty-state.not-allowed":"To słowo nie jest dopuszczalne w grach.","dictionary.empty-state.uninitialized":"Tu zostanie wyświetlona słownikowa definicja ostatnio podświetlonego słowa.","dictionary.input.placeholder":"Szukaj w słowniku...","empty-state.error":"Błąd","empty-state.info":"Info","empty-state.success":"Hurra!","empty-state.warning":"Ups!","github":"Zobacz ten projekt na GitHubie","keyMap":"Skróty klawiszowe","keyMap.board":"Plansza","keyMap.board.toggle-blank":"Oznacz/odznacz płytkę jako blank","keyMap.board.toggle-direction":"Zmień kierunek wpisywania","keyMap.board-and-rack":"Plansza i stojak","keyMap.board-and-rack.insert-two-letter-tile":"Wstaw dwuliterową płytkę","keyMap.board-and-rack.navigate":"Nawigacja","keyMap.board-and-rack.remove-tile":"Zdejmij płytkę","keyMap.board-and-rack.submit":"Rozpocznij wyszukiwanie","keyMap.rack":"Stojak","keyMap.rack.insert-blank":"Wstaw blanka (spacja)","rack.placeholder":"Literki","remaining-tiles":"Pozostałe płytki","results.empty-state.no-filtered-results":"Żaden wynik nie pasuje do tej kwerendy.","results.empty-state.no-results":"Brak wyników - nie można wygenerować żadnego słowa.","results.empty-state.outdated":"Wyniki są nieaktualne. Kliknij poniżej, aby zaktualizować.","results.empty-state.uninitialized":"Tu zostaną wyświetlone słowa wygenerowane z Twoich liter.","results.input.placeholder":"Szukaj rozwiązania... (RegExp)","results.solve":"Rozwiąż","settings":"Opcje","settings.autoGroupTiles":"Grupuj pozostałe płytki","settings.autoGroupTiles.left":"Po lewej","settings.autoGroupTiles.right":"Po prawej","settings.autoGroupTiles.null":"Nie grupuj","settings.game":"Gra","settings.language":"Język"}');
|
|
1823
|
+
const pl_namespaceObject = JSON.parse('{"cell.filter-cell":"Miejsce docelowe - kliknij aby zmienić","cell.set-blank":"Oznacz jako blank","cell.set-not-blank":"Oznacz jako nie blank","cell.toggle-direction":"Kierunek wpisywania - kliknij aby zmienić","common.blanks":"Blanki","common.clear":"Wyczyść","common.close":"Zamknij","common.consonants":"Spółgłoski","common.loading":"Ładowanie","common.points":"Punkty","common.tiles":"Płytki","common.two-letter-tiles":"Dwuliterowe","common.vowels":"Samogłoski","common.word":"Słowo","common.words":"Słowa","dictionary.empty-state.no-definitions":"Słowo istnieje w słowniku ale nie posiada definicji.","dictionary.empty-state.no-results":"Nie udało się znaleźć definicji słowa w słowniku.","dictionary.empty-state.not-allowed":"To słowo nie jest dopuszczalne w grach.","dictionary.empty-state.uninitialized":"Tu zostanie wyświetlona słownikowa definicja ostatnio podświetlonego słowa.","dictionary.input.placeholder":"Szukaj w słowniku...","empty-state.error":"Błąd","empty-state.info":"Info","empty-state.success":"Hurra!","empty-state.warning":"Ups!","github":"Zobacz ten projekt na GitHubie","keyMap":"Skróty klawiszowe","keyMap.board":"Plansza","keyMap.board.toggle-blank":"Oznacz/odznacz płytkę jako blank","keyMap.board.toggle-direction":"Zmień kierunek wpisywania","keyMap.board-and-rack":"Plansza i stojak","keyMap.board-and-rack.insert-two-letter-tile":"Wstaw dwuliterową płytkę","keyMap.board-and-rack.navigate":"Nawigacja","keyMap.board-and-rack.remove-tile":"Zdejmij płytkę","keyMap.board-and-rack.submit":"Rozpocznij wyszukiwanie","keyMap.rack":"Stojak","keyMap.rack.insert-blank":"Wstaw blanka (spacja)","rack.placeholder":"Literki","remaining-tiles":"Pozostałe płytki","results.empty-state.no-filtered-results":"Żaden wynik nie pasuje do tej kwerendy.","results.empty-state.no-results":"Brak wyników - nie można wygenerować żadnego słowa.","results.empty-state.outdated":"Wyniki są nieaktualne. Kliknij poniżej, aby zaktualizować.","results.empty-state.uninitialized":"Tu zostaną wyświetlone słowa wygenerowane z Twoich liter.","results.input.placeholder":"Szukaj rozwiązania... (RegExp)","results.solve":"Rozwiąż","settings":"Opcje","settings.autoGroupTiles":"Grupuj pozostałe płytki","settings.autoGroupTiles.left":"Po lewej","settings.autoGroupTiles.right":"Po prawej","settings.autoGroupTiles.null":"Nie grupuj","settings.game":"Gra","settings.language":"Język"}');
|
|
1803
1824
|
;// CONCATENATED MODULE: ./src/i18n/index.ts
|
|
1804
1825
|
|
|
1805
1826
|
|
|
@@ -1818,17 +1839,19 @@ const i18n = {
|
|
|
1818
1839
|
/* harmony default export */ const src_i18n = (i18n);
|
|
1819
1840
|
|
|
1820
1841
|
// EXTERNAL MODULE: ./src/lib/index.ts + 27 modules
|
|
1821
|
-
var lib = __webpack_require__(
|
|
1842
|
+
var lib = __webpack_require__(92237);
|
|
1822
1843
|
;// CONCATENATED MODULE: ./src/state/selectors.ts
|
|
1823
1844
|
|
|
1824
1845
|
|
|
1825
1846
|
|
|
1826
1847
|
|
|
1827
1848
|
const selectCell = (_, cell)=>cell;
|
|
1849
|
+
const selectPoint = (_, point)=>point;
|
|
1828
1850
|
const selectCharacter = (_, character)=>character;
|
|
1829
1851
|
const selectTile = (_, tile)=>tile;
|
|
1830
1852
|
const selectBoardRoot = (state)=>state.board;
|
|
1831
1853
|
const selectDictionaryRoot = (state)=>state.dictionary;
|
|
1854
|
+
const selectCellFilterRoot = (state)=>state.cellFilter;
|
|
1832
1855
|
const selectRackRoot = (state)=>state.rack;
|
|
1833
1856
|
const selectResultsRoot = (state)=>state.results;
|
|
1834
1857
|
const selectSettingsRoot = (state)=>state.settings;
|
|
@@ -1848,6 +1871,13 @@ const selectConfig = (0,toolkit_.createSelector)([
|
|
|
1848
1871
|
selectConfigId,
|
|
1849
1872
|
selectLocale
|
|
1850
1873
|
], build.getLocaleConfig);
|
|
1874
|
+
const selectCellFilter = selectCellFilterRoot;
|
|
1875
|
+
const selectCellIsFiltered = (0,toolkit_.createSelector)([
|
|
1876
|
+
selectCellFilter,
|
|
1877
|
+
selectPoint
|
|
1878
|
+
], (cellFilter, { x , y })=>{
|
|
1879
|
+
return cellFilter.some((cell)=>cell.x === x && cell.y === y);
|
|
1880
|
+
});
|
|
1851
1881
|
const selectResults = (0,toolkit_.createSelector)([
|
|
1852
1882
|
selectResultsRoot
|
|
1853
1883
|
], (results)=>results.results);
|
|
@@ -1865,17 +1895,36 @@ const selectSortedResults = (0,toolkit_.createSelector)([
|
|
|
1865
1895
|
selectResultsSortColumn,
|
|
1866
1896
|
selectResultsSortDirection
|
|
1867
1897
|
], lib/* sortResults */.uj);
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1898
|
+
const filterResultsByQuery = (results, query)=>{
|
|
1899
|
+
if (query.trim().length === 0) {
|
|
1900
|
+
return results;
|
|
1901
|
+
}
|
|
1902
|
+
let regExp;
|
|
1903
|
+
try {
|
|
1904
|
+
regExp = new RegExp(query, "gi");
|
|
1905
|
+
} catch {
|
|
1873
1906
|
return results;
|
|
1874
1907
|
}
|
|
1875
1908
|
return results.filter((result)=>{
|
|
1876
|
-
|
|
1909
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1877
1910
|
return regExp.test(result.word);
|
|
1878
1911
|
});
|
|
1912
|
+
};
|
|
1913
|
+
const selectSortedFilteredResults = (0,toolkit_.createSelector)([
|
|
1914
|
+
selectSortedResults,
|
|
1915
|
+
selectResultsQuery,
|
|
1916
|
+
selectCellFilter
|
|
1917
|
+
], (results, query, cellFilter)=>{
|
|
1918
|
+
if (!results) {
|
|
1919
|
+
return results;
|
|
1920
|
+
}
|
|
1921
|
+
const filteredByQuery = filterResultsByQuery(results, query);
|
|
1922
|
+
if (!cellFilter) {
|
|
1923
|
+
return filteredByQuery;
|
|
1924
|
+
}
|
|
1925
|
+
return filteredByQuery.filter((result)=>{
|
|
1926
|
+
return cellFilter.every(({ x , y })=>result.cells.some((cell)=>cell.x === x && cell.y === y));
|
|
1927
|
+
});
|
|
1879
1928
|
});
|
|
1880
1929
|
const selectResultCandidate = (0,toolkit_.createSelector)([
|
|
1881
1930
|
selectResultsRoot
|
|
@@ -1963,13 +2012,14 @@ const selectRemainingTilesGroups = (0,toolkit_.createSelector)([
|
|
|
1963
2012
|
|
|
1964
2013
|
/***/ }),
|
|
1965
2014
|
|
|
1966
|
-
/***/
|
|
2015
|
+
/***/ 8772:
|
|
1967
2016
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1968
2017
|
|
|
1969
2018
|
|
|
1970
2019
|
// EXPORTS
|
|
1971
2020
|
__webpack_require__.d(__webpack_exports__, {
|
|
1972
2021
|
"I8": () => (/* reexport */ slices_boardSlice),
|
|
2022
|
+
"mO": () => (/* reexport */ slices_cellFilterSlice),
|
|
1973
2023
|
"lj": () => (/* reexport */ slices_dictionarySlice),
|
|
1974
2024
|
"O_": () => (/* reexport */ slices_rackSlice),
|
|
1975
2025
|
"_C": () => (/* reexport */ slices_resultsSlice),
|
|
@@ -1977,7 +2027,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1977
2027
|
"TP": () => (/* reexport */ slices_solveSlice)
|
|
1978
2028
|
});
|
|
1979
2029
|
|
|
1980
|
-
// UNUSED EXPORTS: boardInitialState, dictionaryInitialState, rackInitialState, resultsInitialState, settingsInitialState, solveInitialState
|
|
2030
|
+
// UNUSED EXPORTS: boardInitialState, cellFilterInitialState, dictionaryInitialState, rackInitialState, resultsInitialState, settingsInitialState, solveInitialState
|
|
1981
2031
|
|
|
1982
2032
|
// EXTERNAL MODULE: ../configs/build/index.js
|
|
1983
2033
|
var build = __webpack_require__(89418);
|
|
@@ -2072,13 +2122,38 @@ const boardSlice = (0,toolkit_.createSlice)({
|
|
|
2072
2122
|
});
|
|
2073
2123
|
/* harmony default export */ const slices_boardSlice = (boardSlice);
|
|
2074
2124
|
|
|
2125
|
+
;// CONCATENATED MODULE: ./src/state/slices/cellFilterInitialState.ts
|
|
2126
|
+
const cellFilterInitialState = [];
|
|
2127
|
+
/* harmony default export */ const slices_cellFilterInitialState = (cellFilterInitialState);
|
|
2128
|
+
|
|
2129
|
+
;// CONCATENATED MODULE: ./src/state/slices/cellFilterSlice.ts
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
const cellFilterSlice = (0,toolkit_.createSlice)({
|
|
2133
|
+
initialState: slices_cellFilterInitialState,
|
|
2134
|
+
name: "cellFilter",
|
|
2135
|
+
reducers: {
|
|
2136
|
+
toggle: (state, action)=>{
|
|
2137
|
+
const { x , y } = action.payload;
|
|
2138
|
+
const has = state.some((point)=>point.x === x && point.y === y);
|
|
2139
|
+
if (has) {
|
|
2140
|
+
return state.filter((point)=>point.x !== x || point.y !== y);
|
|
2141
|
+
}
|
|
2142
|
+
return [
|
|
2143
|
+
...state,
|
|
2144
|
+
action.payload
|
|
2145
|
+
];
|
|
2146
|
+
},
|
|
2147
|
+
reset: ()=>slices_cellFilterInitialState
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
/* harmony default export */ const slices_cellFilterSlice = (cellFilterSlice);
|
|
2151
|
+
|
|
2075
2152
|
;// CONCATENATED MODULE: ./src/state/slices/dictionaryInitialState.ts
|
|
2076
2153
|
const dictionaryInitialState = {
|
|
2077
|
-
definitions: [],
|
|
2078
2154
|
input: "",
|
|
2079
|
-
isAllowed: null,
|
|
2080
2155
|
isLoading: false,
|
|
2081
|
-
|
|
2156
|
+
results: []
|
|
2082
2157
|
};
|
|
2083
2158
|
/* harmony default export */ const slices_dictionaryInitialState = (dictionaryInitialState);
|
|
2084
2159
|
|
|
@@ -2099,28 +2174,22 @@ const dictionarySlice = (0,toolkit_.createSlice)({
|
|
|
2099
2174
|
submit: (state)=>{
|
|
2100
2175
|
return {
|
|
2101
2176
|
...state,
|
|
2102
|
-
definitions: slices_dictionaryInitialState.definitions,
|
|
2103
|
-
isAllowed: slices_dictionaryInitialState.isAllowed,
|
|
2104
2177
|
isLoading: true,
|
|
2105
|
-
|
|
2178
|
+
results: slices_dictionaryInitialState.results
|
|
2106
2179
|
};
|
|
2107
2180
|
},
|
|
2108
2181
|
submitFailure: (state)=>{
|
|
2109
2182
|
return {
|
|
2110
2183
|
...state,
|
|
2111
|
-
definitions: slices_dictionaryInitialState.definitions,
|
|
2112
|
-
isAllowed: false,
|
|
2113
2184
|
isLoading: false,
|
|
2114
|
-
|
|
2185
|
+
results: slices_dictionaryInitialState.results
|
|
2115
2186
|
};
|
|
2116
2187
|
},
|
|
2117
2188
|
submitSuccess: (state, action)=>{
|
|
2118
2189
|
return {
|
|
2119
2190
|
...state,
|
|
2120
|
-
definitions: action.payload.definitions,
|
|
2121
|
-
isAllowed: action.payload.isAllowed,
|
|
2122
2191
|
isLoading: false,
|
|
2123
|
-
|
|
2192
|
+
results: action.payload
|
|
2124
2193
|
};
|
|
2125
2194
|
}
|
|
2126
2195
|
}
|
|
@@ -2128,7 +2197,7 @@ const dictionarySlice = (0,toolkit_.createSlice)({
|
|
|
2128
2197
|
/* harmony default export */ const slices_dictionarySlice = (dictionarySlice);
|
|
2129
2198
|
|
|
2130
2199
|
// EXTERNAL MODULE: ./src/lib/index.ts + 27 modules
|
|
2131
|
-
var lib = __webpack_require__(
|
|
2200
|
+
var lib = __webpack_require__(92237);
|
|
2132
2201
|
;// CONCATENATED MODULE: ./src/state/slices/rackInitialState.ts
|
|
2133
2202
|
const rackInitialState = [
|
|
2134
2203
|
null,
|
|
@@ -2350,6 +2419,8 @@ const solveSlice = (0,toolkit_.createSlice)({
|
|
|
2350
2419
|
|
|
2351
2420
|
|
|
2352
2421
|
|
|
2422
|
+
|
|
2423
|
+
|
|
2353
2424
|
/***/ }),
|
|
2354
2425
|
|
|
2355
2426
|
/***/ 41573:
|
|
@@ -2440,8 +2511,8 @@ const Tile_1 = __importDefault(__webpack_require__(25275));
|
|
|
2440
2511
|
class Board {
|
|
2441
2512
|
constructor({ rows }) {
|
|
2442
2513
|
this.rows = rows;
|
|
2443
|
-
this.
|
|
2444
|
-
this.
|
|
2514
|
+
this.columnsCount = rows[0].length;
|
|
2515
|
+
this.rowsCount = rows.length;
|
|
2445
2516
|
}
|
|
2446
2517
|
static create(width, height) {
|
|
2447
2518
|
return Board.fromStringArray(Array(height).fill(Array(width).fill(' ').join('')));
|
|
@@ -2462,8 +2533,8 @@ class Board {
|
|
|
2462
2533
|
});
|
|
2463
2534
|
}
|
|
2464
2535
|
get center() {
|
|
2465
|
-
const x = Math.floor(this.
|
|
2466
|
-
const y = Math.floor(this.
|
|
2536
|
+
const x = Math.floor(this.columnsCount / 2);
|
|
2537
|
+
const y = Math.floor(this.rowsCount / 2);
|
|
2467
2538
|
return this.rows[y][x];
|
|
2468
2539
|
}
|
|
2469
2540
|
clone() {
|
|
@@ -2474,20 +2545,20 @@ class Board {
|
|
|
2474
2545
|
return this.collidesUp(cell) || this.collidesDown(cell) || this.collidesLeft(cell) || this.collidesRight(cell);
|
|
2475
2546
|
}
|
|
2476
2547
|
collidesDown({ x, y }) {
|
|
2477
|
-
return y < this.
|
|
2548
|
+
return y < this.rowsCount - 1 && !this.rows[y + 1][x].isEmpty;
|
|
2478
2549
|
}
|
|
2479
2550
|
collidesLeft({ x, y }) {
|
|
2480
2551
|
return x > 0 && !this.rows[y][x - 1].isEmpty;
|
|
2481
2552
|
}
|
|
2482
2553
|
collidesRight({ x, y }) {
|
|
2483
|
-
return x < this.
|
|
2554
|
+
return x < this.columnsCount - 1 && !this.rows[y][x + 1].isEmpty;
|
|
2484
2555
|
}
|
|
2485
2556
|
collidesUp({ x, y }) {
|
|
2486
2557
|
return y > 0 && !this.rows[y - 1][x].isEmpty;
|
|
2487
2558
|
}
|
|
2488
2559
|
equals(other) {
|
|
2489
|
-
return (this.
|
|
2490
|
-
this.
|
|
2560
|
+
return (this.columnsCount === other.columnsCount &&
|
|
2561
|
+
this.rowsCount === other.rowsCount &&
|
|
2491
2562
|
this.rows.every((row, rowIndex) => {
|
|
2492
2563
|
return row.every((cell, cellIndex) => {
|
|
2493
2564
|
return cell.equals(other.rows[rowIndex][cellIndex]);
|
|
@@ -2529,6 +2600,34 @@ class Board {
|
|
|
2529
2600
|
exports["default"] = Board;
|
|
2530
2601
|
|
|
2531
2602
|
|
|
2603
|
+
/***/ }),
|
|
2604
|
+
|
|
2605
|
+
/***/ 46936:
|
|
2606
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2607
|
+
|
|
2608
|
+
|
|
2609
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2610
|
+
exports.isBoardJson = void 0;
|
|
2611
|
+
const CellJson_1 = __webpack_require__(59819);
|
|
2612
|
+
const isBoardJson = (value) => {
|
|
2613
|
+
if (!Array.isArray(value)) {
|
|
2614
|
+
return false;
|
|
2615
|
+
}
|
|
2616
|
+
for (const row of value) {
|
|
2617
|
+
if (!Array.isArray(value)) {
|
|
2618
|
+
return false;
|
|
2619
|
+
}
|
|
2620
|
+
for (const cell of row) {
|
|
2621
|
+
if (!(0, CellJson_1.isCellJson)(cell)) {
|
|
2622
|
+
return false;
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
return true;
|
|
2627
|
+
};
|
|
2628
|
+
exports.isBoardJson = isBoardJson;
|
|
2629
|
+
|
|
2630
|
+
|
|
2532
2631
|
/***/ }),
|
|
2533
2632
|
|
|
2534
2633
|
/***/ 37706:
|
|
@@ -2588,9 +2687,6 @@ class Cell {
|
|
|
2588
2687
|
this.y = y;
|
|
2589
2688
|
}
|
|
2590
2689
|
static fromJson(json) {
|
|
2591
|
-
if (!json) {
|
|
2592
|
-
return Cell.Null;
|
|
2593
|
-
}
|
|
2594
2690
|
return new Cell({
|
|
2595
2691
|
isEmpty: json.isEmpty,
|
|
2596
2692
|
tile: Tile_1.default.fromJson(json.tile),
|
|
@@ -2627,21 +2723,32 @@ class Cell {
|
|
|
2627
2723
|
return this.tile.toString();
|
|
2628
2724
|
}
|
|
2629
2725
|
}
|
|
2630
|
-
Cell.Null = Object.freeze({
|
|
2631
|
-
isEmpty: true,
|
|
2632
|
-
tile: Tile_1.default.Null,
|
|
2633
|
-
x: 0,
|
|
2634
|
-
y: 0,
|
|
2635
|
-
clone: () => Cell.Null,
|
|
2636
|
-
equals: (other) => other === Cell.Null,
|
|
2637
|
-
hasTile: () => false,
|
|
2638
|
-
isCandidate: () => false,
|
|
2639
|
-
toString: () => '',
|
|
2640
|
-
toJson: () => null,
|
|
2641
|
-
});
|
|
2642
2726
|
exports["default"] = Cell;
|
|
2643
2727
|
|
|
2644
2728
|
|
|
2729
|
+
/***/ }),
|
|
2730
|
+
|
|
2731
|
+
/***/ 59819:
|
|
2732
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2733
|
+
|
|
2734
|
+
|
|
2735
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2736
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2737
|
+
};
|
|
2738
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2739
|
+
exports.isCellJson = void 0;
|
|
2740
|
+
const isObject_1 = __importDefault(__webpack_require__(24814));
|
|
2741
|
+
const TileJson_1 = __webpack_require__(214);
|
|
2742
|
+
const isCellJson = (value) => {
|
|
2743
|
+
return ((0, isObject_1.default)(value) &&
|
|
2744
|
+
typeof value.isEmpty === 'boolean' &&
|
|
2745
|
+
((0, TileJson_1.isTileJson)(value.tile) || value.tile === null) &&
|
|
2746
|
+
typeof value.x === 'number' &&
|
|
2747
|
+
typeof value.y === 'number');
|
|
2748
|
+
};
|
|
2749
|
+
exports.isCellJson = isCellJson;
|
|
2750
|
+
|
|
2751
|
+
|
|
2645
2752
|
/***/ }),
|
|
2646
2753
|
|
|
2647
2754
|
/***/ 19582:
|
|
@@ -2709,6 +2816,9 @@ class Config {
|
|
|
2709
2816
|
get blankScore() {
|
|
2710
2817
|
return this.config.blankScore;
|
|
2711
2818
|
}
|
|
2819
|
+
get blanksCount() {
|
|
2820
|
+
return this.config.blanksCount;
|
|
2821
|
+
}
|
|
2712
2822
|
get boardHeight() {
|
|
2713
2823
|
return this.config.boardHeight;
|
|
2714
2824
|
}
|
|
@@ -2751,11 +2861,8 @@ class Config {
|
|
|
2751
2861
|
isTwoCharacterTilePrefix(character) {
|
|
2752
2862
|
return typeof this.getTwoCharacterTileByPrefix(character) !== 'undefined';
|
|
2753
2863
|
}
|
|
2754
|
-
get
|
|
2755
|
-
return this.config.
|
|
2756
|
-
}
|
|
2757
|
-
get numberOfBlanks() {
|
|
2758
|
-
return this.config.numberOfBlanks;
|
|
2864
|
+
get maximumCharactersCount() {
|
|
2865
|
+
return this.config.maximumCharactersCount;
|
|
2759
2866
|
}
|
|
2760
2867
|
get tiles() {
|
|
2761
2868
|
return this.config.tiles;
|
|
@@ -2836,6 +2943,7 @@ exports["default"] = HorizontalPattern;
|
|
|
2836
2943
|
|
|
2837
2944
|
|
|
2838
2945
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2946
|
+
exports.isLocale = void 0;
|
|
2839
2947
|
// eslint-disable-next-line no-shadow
|
|
2840
2948
|
var Locale;
|
|
2841
2949
|
(function (Locale) {
|
|
@@ -2846,6 +2954,9 @@ var Locale;
|
|
|
2846
2954
|
Locale["PL_PL"] = "pl-PL";
|
|
2847
2955
|
Locale["DE_DE"] = "de-DE";
|
|
2848
2956
|
})(Locale || (Locale = {}));
|
|
2957
|
+
const locales = Object.values(Locale);
|
|
2958
|
+
const isLocale = (locale) => locales.includes(locale);
|
|
2959
|
+
exports.isLocale = isLocale;
|
|
2849
2960
|
exports["default"] = Locale;
|
|
2850
2961
|
|
|
2851
2962
|
|
|
@@ -2862,9 +2973,9 @@ class Pattern {
|
|
|
2862
2973
|
this.cells = cells;
|
|
2863
2974
|
}
|
|
2864
2975
|
canBePlaced(config) {
|
|
2865
|
-
const
|
|
2866
|
-
const
|
|
2867
|
-
return (
|
|
2976
|
+
const emptyCellsCount = this.getEmptyCellsCount();
|
|
2977
|
+
const isUsedCellsCountInRange = emptyCellsCount >= 1 && emptyCellsCount <= config.maximumCharactersCount;
|
|
2978
|
+
return (isUsedCellsCountInRange &&
|
|
2868
2979
|
(this.hasAtLeast1NonEmptyCell() || this.collides() || (this.goesThroughBoardCenter() && this.board.isEmpty())));
|
|
2869
2980
|
}
|
|
2870
2981
|
clone() {
|
|
@@ -2879,7 +2990,7 @@ class Pattern {
|
|
|
2879
2990
|
getIndexOfFirstCellWithoutTile() {
|
|
2880
2991
|
return this.cells.findIndex((cell) => !cell.hasTile());
|
|
2881
2992
|
}
|
|
2882
|
-
|
|
2993
|
+
getEmptyCellsCount() {
|
|
2883
2994
|
return this.cells.filter((cell) => cell.isEmpty).length;
|
|
2884
2995
|
}
|
|
2885
2996
|
goesThroughBoardCenter() {
|
|
@@ -2921,28 +3032,29 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2921
3032
|
const constants_1 = __webpack_require__(7618);
|
|
2922
3033
|
const Cell_1 = __importDefault(__webpack_require__(52251));
|
|
2923
3034
|
class Result {
|
|
2924
|
-
constructor({ cells, id,
|
|
3035
|
+
constructor({ cells, id, collisions, points, }) {
|
|
2925
3036
|
const tiles = getTiles(cells);
|
|
3037
|
+
this.blanksCount = getBlanks(tiles).length;
|
|
2926
3038
|
this.cells = cells;
|
|
3039
|
+
this.collisions = collisions;
|
|
3040
|
+
this.consonantsCount = getConsonants(tiles).length;
|
|
2927
3041
|
this.id = id;
|
|
2928
3042
|
this.length = cells.length;
|
|
2929
|
-
this.numberOfCollisions = numberOfCollisions;
|
|
2930
|
-
this.numberOfConsonants = getConsonants(tiles).length;
|
|
2931
|
-
this.numberOfBlanks = getBlanks(tiles).length;
|
|
2932
|
-
this.numberOfTiles = tiles.length;
|
|
2933
|
-
this.numberOfVowels = getVowels(tiles).length;
|
|
2934
|
-
this.numberOfWords = 1 + this.numberOfCollisions;
|
|
2935
3043
|
this.points = points;
|
|
2936
3044
|
this.pointsRatio = getPointsRatio(tiles, points);
|
|
2937
3045
|
this.tiles = tiles;
|
|
2938
3046
|
this.tilesCharacters = getTilesCharacters(tiles);
|
|
3047
|
+
this.tilesCount = tiles.length;
|
|
3048
|
+
this.vowelsCount = getVowels(tiles).length;
|
|
2939
3049
|
this.word = getWord(cells);
|
|
3050
|
+
this.words = getWords(cells, collisions);
|
|
3051
|
+
this.wordsCount = 1 + this.collisions.length;
|
|
2940
3052
|
}
|
|
2941
3053
|
static fromJson(json) {
|
|
2942
3054
|
return new Result({
|
|
2943
|
-
cells: json.cells.map(Cell_1.default.fromJson),
|
|
2944
3055
|
id: json.id,
|
|
2945
|
-
|
|
3056
|
+
cells: json.cells.map(Cell_1.default.fromJson),
|
|
3057
|
+
collisions: json.collisions.map((collision) => collision.map(Cell_1.default.fromJson)),
|
|
2946
3058
|
points: json.points,
|
|
2947
3059
|
});
|
|
2948
3060
|
}
|
|
@@ -2950,7 +3062,7 @@ class Result {
|
|
|
2950
3062
|
return {
|
|
2951
3063
|
cells: this.cells.map((cell) => cell.toJson()),
|
|
2952
3064
|
id: this.id,
|
|
2953
|
-
|
|
3065
|
+
collisions: this.collisions.map((collision) => collision.map((cell) => cell.toJson())),
|
|
2954
3066
|
points: this.points,
|
|
2955
3067
|
};
|
|
2956
3068
|
}
|
|
@@ -2965,6 +3077,10 @@ const getPointsRatio = (tiles, points) => points / tiles.length;
|
|
|
2965
3077
|
const getTiles = (cells) => cells.filter(({ isEmpty }) => isEmpty).map(({ tile }) => tile);
|
|
2966
3078
|
const getTilesCharacters = (tiles) => getNonBlankCharacters(tiles).sort(charactersComparator).join('');
|
|
2967
3079
|
const getWord = (cells) => cells.map(String).join('');
|
|
3080
|
+
const getWords = (cells, collisions) => [
|
|
3081
|
+
getWord(cells),
|
|
3082
|
+
...collisions.map((collision) => collision.map(String).join('')),
|
|
3083
|
+
];
|
|
2968
3084
|
const isConsonant = ({ character, isBlank }) => constants_1.CONSONANTS.includes(character) && !isBlank;
|
|
2969
3085
|
const isVowel = ({ character, isBlank }) => constants_1.VOWELS.includes(character) && !isBlank;
|
|
2970
3086
|
exports["default"] = Result;
|
|
@@ -3022,6 +3138,24 @@ Tile.Null = Object.freeze({
|
|
|
3022
3138
|
exports["default"] = Tile;
|
|
3023
3139
|
|
|
3024
3140
|
|
|
3141
|
+
/***/ }),
|
|
3142
|
+
|
|
3143
|
+
/***/ 214:
|
|
3144
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3145
|
+
|
|
3146
|
+
|
|
3147
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3148
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3149
|
+
};
|
|
3150
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3151
|
+
exports.isTileJson = void 0;
|
|
3152
|
+
const isObject_1 = __importDefault(__webpack_require__(24814));
|
|
3153
|
+
const isTileJson = (value) => {
|
|
3154
|
+
return (0, isObject_1.default)(value) && typeof value.character === 'string' && typeof value.isBlank === 'boolean';
|
|
3155
|
+
};
|
|
3156
|
+
exports.isTileJson = isTileJson;
|
|
3157
|
+
|
|
3158
|
+
|
|
3025
3159
|
/***/ }),
|
|
3026
3160
|
|
|
3027
3161
|
/***/ 65168:
|
|
@@ -3145,27 +3279,36 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3145
3279
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3146
3280
|
};
|
|
3147
3281
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3148
|
-
exports.WordDefinition = exports.WordBonus = exports.VerticalPattern = exports.Tile = exports.Result = exports.Pattern = exports.Locale = exports.HorizontalPattern = exports.Config = exports.CharacterBonus = exports.Cell = exports.Bonus = exports.Board = void 0;
|
|
3282
|
+
exports.WordDefinition = exports.WordBonus = exports.VerticalPattern = exports.isTileJson = exports.Tile = exports.Result = exports.Pattern = exports.isLocale = exports.Locale = exports.isObject = exports.HorizontalPattern = exports.Config = exports.CharacterBonus = exports.isCellJson = exports.Cell = exports.Bonus = exports.isBoardJson = exports.Board = void 0;
|
|
3149
3283
|
var Board_1 = __webpack_require__(80559);
|
|
3150
3284
|
Object.defineProperty(exports, "Board", ({ enumerable: true, get: function () { return __importDefault(Board_1).default; } }));
|
|
3285
|
+
var BoardJson_1 = __webpack_require__(46936);
|
|
3286
|
+
Object.defineProperty(exports, "isBoardJson", ({ enumerable: true, get: function () { return BoardJson_1.isBoardJson; } }));
|
|
3151
3287
|
var Bonus_1 = __webpack_require__(37706);
|
|
3152
3288
|
Object.defineProperty(exports, "Bonus", ({ enumerable: true, get: function () { return __importDefault(Bonus_1).default; } }));
|
|
3153
3289
|
var Cell_1 = __webpack_require__(52251);
|
|
3154
3290
|
Object.defineProperty(exports, "Cell", ({ enumerable: true, get: function () { return __importDefault(Cell_1).default; } }));
|
|
3291
|
+
var CellJson_1 = __webpack_require__(59819);
|
|
3292
|
+
Object.defineProperty(exports, "isCellJson", ({ enumerable: true, get: function () { return CellJson_1.isCellJson; } }));
|
|
3155
3293
|
var CharacterBonus_1 = __webpack_require__(19582);
|
|
3156
3294
|
Object.defineProperty(exports, "CharacterBonus", ({ enumerable: true, get: function () { return __importDefault(CharacterBonus_1).default; } }));
|
|
3157
3295
|
var Config_1 = __webpack_require__(28433);
|
|
3158
3296
|
Object.defineProperty(exports, "Config", ({ enumerable: true, get: function () { return __importDefault(Config_1).default; } }));
|
|
3159
3297
|
var HorizontalPattern_1 = __webpack_require__(49594);
|
|
3160
3298
|
Object.defineProperty(exports, "HorizontalPattern", ({ enumerable: true, get: function () { return __importDefault(HorizontalPattern_1).default; } }));
|
|
3299
|
+
var isObject_1 = __webpack_require__(24814);
|
|
3300
|
+
Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return __importDefault(isObject_1).default; } }));
|
|
3161
3301
|
var Locale_1 = __webpack_require__(26634);
|
|
3162
3302
|
Object.defineProperty(exports, "Locale", ({ enumerable: true, get: function () { return __importDefault(Locale_1).default; } }));
|
|
3303
|
+
Object.defineProperty(exports, "isLocale", ({ enumerable: true, get: function () { return Locale_1.isLocale; } }));
|
|
3163
3304
|
var Pattern_1 = __webpack_require__(63207);
|
|
3164
3305
|
Object.defineProperty(exports, "Pattern", ({ enumerable: true, get: function () { return __importDefault(Pattern_1).default; } }));
|
|
3165
3306
|
var Result_1 = __webpack_require__(30091);
|
|
3166
3307
|
Object.defineProperty(exports, "Result", ({ enumerable: true, get: function () { return __importDefault(Result_1).default; } }));
|
|
3167
3308
|
var Tile_1 = __webpack_require__(25275);
|
|
3168
3309
|
Object.defineProperty(exports, "Tile", ({ enumerable: true, get: function () { return __importDefault(Tile_1).default; } }));
|
|
3310
|
+
var TileJson_1 = __webpack_require__(214);
|
|
3311
|
+
Object.defineProperty(exports, "isTileJson", ({ enumerable: true, get: function () { return TileJson_1.isTileJson; } }));
|
|
3169
3312
|
var VerticalPattern_1 = __webpack_require__(65168);
|
|
3170
3313
|
Object.defineProperty(exports, "VerticalPattern", ({ enumerable: true, get: function () { return __importDefault(VerticalPattern_1).default; } }));
|
|
3171
3314
|
var WordBonus_1 = __webpack_require__(58627);
|
|
@@ -3174,6 +3317,19 @@ var WordDefinition_1 = __webpack_require__(31560);
|
|
|
3174
3317
|
Object.defineProperty(exports, "WordDefinition", ({ enumerable: true, get: function () { return __importDefault(WordDefinition_1).default; } }));
|
|
3175
3318
|
|
|
3176
3319
|
|
|
3320
|
+
/***/ }),
|
|
3321
|
+
|
|
3322
|
+
/***/ 24814:
|
|
3323
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3327
|
+
const isObject = (value) => {
|
|
3328
|
+
return typeof value === 'object' && value !== null;
|
|
3329
|
+
};
|
|
3330
|
+
exports["default"] = isObject;
|
|
3331
|
+
|
|
3332
|
+
|
|
3177
3333
|
/***/ })
|
|
3178
3334
|
|
|
3179
3335
|
};
|