@timardex/cluemart-shared 1.5.497 → 1.5.498
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-WHHVPICK.mjs → chunk-AUTKJ6QP.mjs} +10 -8
- package/dist/chunk-AUTKJ6QP.mjs.map +1 -0
- package/dist/{chunk-D3WH67C5.mjs → chunk-O5IIN45V.mjs} +2 -2
- package/dist/formFields/index.cjs +4 -2
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/hooks/index.cjs +4 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +9 -7
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-WHHVPICK.mjs.map +0 -1
- /package/dist/{chunk-D3WH67C5.mjs.map → chunk-O5IIN45V.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-O5IIN45V.mjs";
|
|
2
2
|
import "../chunk-RQDZX76B.mjs";
|
|
3
3
|
import "../chunk-DWO35OY4.mjs";
|
|
4
4
|
import "../chunk-I7WE3EBR.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
dateFormat,
|
|
15
15
|
normalizeUrl,
|
|
16
16
|
timeFormat
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-AUTKJ6QP.mjs";
|
|
18
18
|
import {
|
|
19
19
|
EnumEventDateStatus,
|
|
20
20
|
EnumEventType,
|
package/dist/index.cjs
CHANGED
|
@@ -730,6 +730,7 @@ var priceUnits = [
|
|
|
730
730
|
|
|
731
731
|
// src/utils/dailyClueGame.ts
|
|
732
732
|
var import_dayjs = __toESM(require("dayjs"));
|
|
733
|
+
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
733
734
|
|
|
734
735
|
// src/types/game.ts
|
|
735
736
|
var gameScreenIdentifierList = [
|
|
@@ -825,6 +826,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
|
825
826
|
})(EnumGameStatus || {});
|
|
826
827
|
|
|
827
828
|
// src/utils/dailyClueGame.ts
|
|
829
|
+
import_dayjs.default.extend(import_utc.default);
|
|
828
830
|
function createSeededRng(seed) {
|
|
829
831
|
let t = seed >>> 0;
|
|
830
832
|
return function random() {
|
|
@@ -853,18 +855,18 @@ function seededShuffle(array6, seed) {
|
|
|
853
855
|
return result;
|
|
854
856
|
}
|
|
855
857
|
function getDayIndex(startDate) {
|
|
856
|
-
return (0, import_dayjs.default)().startOf("day").diff((0, import_dayjs.default)(startDate).startOf("day"), "day");
|
|
858
|
+
return (0, import_dayjs.default)().utc().startOf("day").diff((0, import_dayjs.default)(startDate).utc().startOf("day"), "day");
|
|
857
859
|
}
|
|
858
860
|
function computeDailyClueState(dailyClue) {
|
|
859
861
|
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
860
862
|
const { shuffled, collected } = dailyClue.letterInfo;
|
|
863
|
+
const today = (0, import_dayjs.default)().utc().startOf("day");
|
|
864
|
+
const start = (0, import_dayjs.default)(startDate).utc().startOf("day");
|
|
865
|
+
const end = (0, import_dayjs.default)(endDate).utc().startOf("day");
|
|
861
866
|
const shuffledPlacements = seededShuffle(
|
|
862
867
|
gameScreenIdentifierList,
|
|
863
|
-
|
|
868
|
+
start.toISOString()
|
|
864
869
|
);
|
|
865
|
-
const today = (0, import_dayjs.default)().startOf("day");
|
|
866
|
-
const start = (0, import_dayjs.default)(startDate).startOf("day");
|
|
867
|
-
const end = (0, import_dayjs.default)(endDate).startOf("day");
|
|
868
870
|
if (today.isBefore(start)) {
|
|
869
871
|
return null;
|
|
870
872
|
}
|
|
@@ -902,11 +904,11 @@ var import_dayjs2 = __toESM(require("dayjs"));
|
|
|
902
904
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
903
905
|
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
|
904
906
|
var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
|
|
905
|
-
var
|
|
907
|
+
var import_utc2 = __toESM(require("dayjs/plugin/utc.js"));
|
|
906
908
|
var dateFormat = "DD-MM-YYYY";
|
|
907
909
|
var timeFormat = "HH:mm";
|
|
908
910
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
909
|
-
import_dayjs2.default.extend(
|
|
911
|
+
import_dayjs2.default.extend(import_utc2.default);
|
|
910
912
|
import_dayjs2.default.extend(import_timezone.default);
|
|
911
913
|
import_dayjs2.default.extend(import_isSameOrAfter.default);
|
|
912
914
|
var NZ_TZ = "Pacific/Auckland";
|