@timardex/cluemart-shared 1.5.544 → 1.5.545
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/dist/{chunk-7435FNA7.mjs → chunk-L47NQHZ6.mjs} +2 -2
- package/dist/{chunk-TERE6URA.mjs → chunk-Z3JWNX2U.mjs} +15 -21
- package/dist/chunk-Z3JWNX2U.mjs.map +1 -0
- package/dist/formFields/index.mjs +2 -2
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +14 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -20
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +14 -20
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-TERE6URA.mjs.map +0 -1
- /package/dist/{chunk-7435FNA7.mjs.map → chunk-L47NQHZ6.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -657,13 +657,14 @@ function computeDailyClueState(dailyClue) {
|
|
|
657
657
|
const today = nzStartOfDay();
|
|
658
658
|
const start = nzStartOfDay(startDate);
|
|
659
659
|
const end = nzStartOfDay(endDate);
|
|
660
|
+
if (today.isBefore(start)) {
|
|
661
|
+
return null;
|
|
662
|
+
}
|
|
660
663
|
const shuffledPlacements = seededShuffle(
|
|
661
664
|
gameScreenIdentifierList,
|
|
662
665
|
start.toISOString()
|
|
663
666
|
);
|
|
664
|
-
|
|
665
|
-
return null;
|
|
666
|
-
}
|
|
667
|
+
const index = getDayIndex(start, today);
|
|
667
668
|
if (today.isAfter(end)) {
|
|
668
669
|
return {
|
|
669
670
|
todaysClue: null,
|
|
@@ -671,31 +672,24 @@ function computeDailyClueState(dailyClue) {
|
|
|
671
672
|
todaysPlacement: null
|
|
672
673
|
};
|
|
673
674
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
today: today.format()
|
|
683
|
-
});
|
|
684
|
-
if (index < 0 || index >= shuffled.length) return null;
|
|
685
|
-
const collectedCount = (collected ?? []).length;
|
|
686
|
-
if (collectedCount > index) {
|
|
675
|
+
if (index < 0 || index >= shuffled.length || index >= shuffledPlacements.length) {
|
|
676
|
+
return null;
|
|
677
|
+
}
|
|
678
|
+
const letterToday = shuffled[index];
|
|
679
|
+
const placement = shuffledPlacements[index];
|
|
680
|
+
if (!letterToday || !placement) return null;
|
|
681
|
+
const alreadyCollectedToday = (collected ?? []).includes(letterToday);
|
|
682
|
+
if (alreadyCollectedToday) {
|
|
687
683
|
return {
|
|
688
684
|
todaysClue: null,
|
|
689
685
|
todaysLetter: null,
|
|
690
686
|
todaysPlacement: null
|
|
691
687
|
};
|
|
692
688
|
}
|
|
693
|
-
const letterToday = shuffled[index];
|
|
694
|
-
if (!letterToday) return null;
|
|
695
689
|
return {
|
|
696
|
-
todaysClue:
|
|
690
|
+
todaysClue: placement.clue,
|
|
697
691
|
todaysLetter: letterToday,
|
|
698
|
-
todaysPlacement:
|
|
692
|
+
todaysPlacement: placement.id
|
|
699
693
|
};
|
|
700
694
|
}
|
|
701
695
|
|