@timardex/cluemart-shared 1.5.493 → 1.5.494
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-USQKKCIA.mjs → chunk-534WN2SR.mjs} +7 -3
- package/dist/chunk-534WN2SR.mjs.map +1 -0
- package/dist/{chunk-4LT5GOOP.mjs → chunk-DXNREXCC.mjs} +3 -3
- package/dist/{chunk-GSNFQJBZ.mjs → chunk-KPO6ZYQ4.mjs} +2 -95
- package/dist/chunk-KPO6ZYQ4.mjs.map +1 -0
- package/dist/chunk-QG5DPPZI.mjs +96 -0
- package/dist/chunk-QG5DPPZI.mjs.map +1 -0
- package/dist/{chunk-KYDS4REE.mjs → chunk-YTEETYG7.mjs} +95 -17
- package/dist/chunk-YTEETYG7.mjs.map +1 -0
- package/dist/enums/index.cjs +6 -2
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +7 -3
- package/dist/enums/index.d.ts +7 -3
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs +8 -5
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +4 -3
- package/dist/game-DTrJRy_s.d.mts +120 -0
- package/dist/game-lvz2AUuu.d.ts +120 -0
- package/dist/graphql/index.d.mts +2 -1
- package/dist/graphql/index.d.ts +2 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +21 -18
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.mjs +5 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +202 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +200 -119
- package/dist/index.mjs.map +1 -1
- package/dist/{post-C67Q-sXR.d.ts → post-DXOToXeT.d.ts} +3 -119
- package/dist/{post-C9rtHepe.d.mts → post-wptsHKVN.d.mts} +3 -119
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.mjs +6 -4
- package/dist/utils/index.cjs +171 -14
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +11 -1
- package/dist/utils/index.d.ts +11 -1
- package/dist/utils/index.mjs +7 -2
- package/package.json +1 -1
- package/dist/chunk-GSNFQJBZ.mjs.map +0 -1
- package/dist/chunk-KYDS4REE.mjs.map +0 -1
- package/dist/chunk-USQKKCIA.mjs.map +0 -1
- /package/dist/{chunk-4LT5GOOP.mjs.map → chunk-DXNREXCC.mjs.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -77,6 +77,7 @@ __export(index_exports, {
|
|
|
77
77
|
categoryColors: () => categoryColors,
|
|
78
78
|
cluemartSocialMedia: () => cluemartSocialMedia,
|
|
79
79
|
companyContactFields: () => companyContactFields,
|
|
80
|
+
computeDailyClueState: () => computeDailyClueState,
|
|
80
81
|
contactUsFields: () => contactUsFields,
|
|
81
82
|
darkColors: () => darkColors,
|
|
82
83
|
dateFormat: () => dateFormat,
|
|
@@ -120,6 +121,7 @@ __export(index_exports, {
|
|
|
120
121
|
requestPasswordResetFields: () => requestPasswordResetFields,
|
|
121
122
|
requirementsOptions: () => requirementsOptions,
|
|
122
123
|
resetPasswordFields: () => resetPasswordFields,
|
|
124
|
+
seededShuffle: () => seededShuffle,
|
|
123
125
|
socialMediaFields: () => socialMediaFields,
|
|
124
126
|
sortDatesChronologically: () => sortDatesChronologically,
|
|
125
127
|
stallTypeOptions: () => stallTypeOptions,
|
|
@@ -419,9 +421,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
419
421
|
EnumNotificationResourceType2["DEACTIVATED_EVENT"] = "deactivated_event";
|
|
420
422
|
EnumNotificationResourceType2["DEACTIVATED_PARTNER"] = "deactivated_partner";
|
|
421
423
|
EnumNotificationResourceType2["DEACTIVATED_VENDOR"] = "deactivated_vendor";
|
|
424
|
+
EnumNotificationResourceType2["DOWNGRADED_EVENT"] = "downgraded_event";
|
|
425
|
+
EnumNotificationResourceType2["DOWNGRADED_PARTNER"] = "downgraded_partner";
|
|
426
|
+
EnumNotificationResourceType2["DOWNGRADED_VENDOR"] = "downgraded_vendor";
|
|
422
427
|
EnumNotificationResourceType2["DECLINED_EVENT"] = "declined_event";
|
|
423
428
|
EnumNotificationResourceType2["DECLINED_PARTNER"] = "declined_partner";
|
|
424
429
|
EnumNotificationResourceType2["DECLINED_VENDOR"] = "declined_vendor";
|
|
430
|
+
EnumNotificationResourceType2["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
|
|
425
431
|
EnumNotificationResourceType2["EVENT_INVITE_VENDOR"] = "event_invite_vendor" /* EVENT_INVITE_VENDOR */;
|
|
426
432
|
EnumNotificationResourceType2["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
427
433
|
EnumNotificationResourceType2["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
|
|
@@ -433,11 +439,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
433
439
|
return EnumNotificationResourceType2;
|
|
434
440
|
})(EnumNotificationResourceType || {});
|
|
435
441
|
var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType2) => {
|
|
442
|
+
EnumNotificationType2["CHAT"] = "chat";
|
|
436
443
|
EnumNotificationType2["EVENT"] = "event" /* EVENT */;
|
|
437
|
-
EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
|
|
438
444
|
EnumNotificationType2["RELATION"] = "relation";
|
|
439
|
-
EnumNotificationType2["CHAT"] = "chat";
|
|
440
445
|
EnumNotificationType2["SYSTEM"] = "system";
|
|
446
|
+
EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
|
|
441
447
|
return EnumNotificationType2;
|
|
442
448
|
})(EnumNotificationType || {});
|
|
443
449
|
var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
|
|
@@ -722,25 +728,190 @@ var priceUnits = [
|
|
|
722
728
|
{ label: "Half dozen", value: "HALF_DOZEN" }
|
|
723
729
|
];
|
|
724
730
|
|
|
725
|
-
// src/utils/
|
|
731
|
+
// src/utils/dailyClueGame.ts
|
|
726
732
|
var import_dayjs = __toESM(require("dayjs"));
|
|
733
|
+
|
|
734
|
+
// src/types/game.ts
|
|
735
|
+
var gameScreenIdentifierList = [
|
|
736
|
+
{
|
|
737
|
+
clue: "Where your actions turn into a timeline.",
|
|
738
|
+
id: "activities"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
clue: "Where conversations happen without speaking.",
|
|
742
|
+
id: "chat"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
clue: "The place to redefine who you are.",
|
|
746
|
+
id: "edit-profile"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
clue: "A single moment worth showing up for.",
|
|
750
|
+
id: "event"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
clue: "What\u2019s happening around you, right now.",
|
|
754
|
+
id: "events-near-me"
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
clue: "A collection of things worth attending.",
|
|
758
|
+
id: "events"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
clue: "What\u2019s happening in a wider area\u2014not just nearby.",
|
|
762
|
+
id: "events/region"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
clue: "Where fun becomes a challenge.",
|
|
766
|
+
id: "games"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
clue: "Your starting point for everything.",
|
|
770
|
+
id: "home"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
clue: "Where the app taps you on the shoulder.",
|
|
774
|
+
id: "notifications"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
clue: "Where you fine-tune your experience.",
|
|
778
|
+
id: "options"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
clue: "A single collaborator in the ecosystem.",
|
|
782
|
+
id: "partner"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
clue: "The network behind the scenes.",
|
|
786
|
+
id: "partners"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
clue: "Where you share something with everyone.",
|
|
790
|
+
id: "post"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
clue: "Your identity, on display.",
|
|
794
|
+
id: "profile"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
clue: "One provider offering something valuable.",
|
|
798
|
+
id: "vendor"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
clue: "A marketplace of providers.",
|
|
802
|
+
id: "vendors"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
clue: "People who stopped by to see you.",
|
|
806
|
+
id: "visitors"
|
|
807
|
+
}
|
|
808
|
+
];
|
|
809
|
+
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
810
|
+
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
811
|
+
return EnumGameType2;
|
|
812
|
+
})(EnumGameType || {});
|
|
813
|
+
var gameTypeToDisplayName = {
|
|
814
|
+
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
815
|
+
};
|
|
816
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
817
|
+
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
818
|
+
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
819
|
+
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
820
|
+
return EnumGameStatus2;
|
|
821
|
+
})(EnumGameStatus || {});
|
|
822
|
+
|
|
823
|
+
// src/utils/dailyClueGame.ts
|
|
824
|
+
function createSeededRng(seed) {
|
|
825
|
+
let t = seed >>> 0;
|
|
826
|
+
return function random() {
|
|
827
|
+
t += 1831565813;
|
|
828
|
+
let x = t;
|
|
829
|
+
x = Math.imul(x ^ x >>> 15, x | 1);
|
|
830
|
+
x ^= x + Math.imul(x ^ x >>> 7, x | 61);
|
|
831
|
+
return ((x ^ x >>> 14) >>> 0) / 4294967296;
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function hashStringToNumber(seed) {
|
|
835
|
+
let hash = 2166136261;
|
|
836
|
+
for (let i = 0; i < seed.length; i++) {
|
|
837
|
+
hash ^= seed.codePointAt(i) ?? 0;
|
|
838
|
+
hash = Math.imul(hash, 16777619);
|
|
839
|
+
}
|
|
840
|
+
return hash >>> 0;
|
|
841
|
+
}
|
|
842
|
+
function seededShuffle(array6, seed) {
|
|
843
|
+
const rng = createSeededRng(hashStringToNumber(seed));
|
|
844
|
+
const result = [...array6];
|
|
845
|
+
for (let i = result.length - 1; i > 0; i--) {
|
|
846
|
+
const j = Math.floor(rng() * (i + 1));
|
|
847
|
+
[result[i], result[j]] = [result[j], result[i]];
|
|
848
|
+
}
|
|
849
|
+
return result;
|
|
850
|
+
}
|
|
851
|
+
function getDayIndex(startDate) {
|
|
852
|
+
return (0, import_dayjs.default)().startOf("day").diff((0, import_dayjs.default)(startDate).startOf("day"), "day");
|
|
853
|
+
}
|
|
854
|
+
function computeDailyClueState(dailyClue) {
|
|
855
|
+
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
856
|
+
const { shuffled, collected } = dailyClue.letterInfo;
|
|
857
|
+
const shuffledPlacements = seededShuffle(
|
|
858
|
+
gameScreenIdentifierList,
|
|
859
|
+
startDate.toISOString()
|
|
860
|
+
);
|
|
861
|
+
const today = (0, import_dayjs.default)().startOf("day");
|
|
862
|
+
const start = (0, import_dayjs.default)(startDate).startOf("day");
|
|
863
|
+
const end = (0, import_dayjs.default)(endDate).startOf("day");
|
|
864
|
+
if (today.isBefore(start)) {
|
|
865
|
+
return null;
|
|
866
|
+
}
|
|
867
|
+
if (today.isAfter(end)) {
|
|
868
|
+
return null;
|
|
869
|
+
}
|
|
870
|
+
const index = getDayIndex(startDate);
|
|
871
|
+
if (index < 0 || index >= shuffled.length) return null;
|
|
872
|
+
if (collected?.includes(shuffled[index])) {
|
|
873
|
+
return null;
|
|
874
|
+
}
|
|
875
|
+
if (today.isAfter(end)) {
|
|
876
|
+
return {
|
|
877
|
+
gameHistory: {
|
|
878
|
+
gameDate: dailyClue.gameFields.gameDate,
|
|
879
|
+
gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
|
|
880
|
+
gameType: dailyClue.gameFields.gameType,
|
|
881
|
+
pointsEarned: dailyClue.points
|
|
882
|
+
},
|
|
883
|
+
todaysClue: null,
|
|
884
|
+
todaysLetter: null,
|
|
885
|
+
todaysPlacement: null
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
return {
|
|
889
|
+
gameHistory: null,
|
|
890
|
+
todaysClue: shuffledPlacements[index].clue,
|
|
891
|
+
todaysLetter: shuffled[index],
|
|
892
|
+
todaysPlacement: shuffledPlacements[index].id
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// src/utils/index.ts
|
|
897
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
727
898
|
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
728
899
|
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
|
729
900
|
var import_timezone = __toESM(require("dayjs/plugin/timezone.js"));
|
|
730
901
|
var import_utc = __toESM(require("dayjs/plugin/utc.js"));
|
|
731
902
|
var dateFormat = "DD-MM-YYYY";
|
|
732
903
|
var timeFormat = "HH:mm";
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
904
|
+
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
905
|
+
import_dayjs2.default.extend(import_utc.default);
|
|
906
|
+
import_dayjs2.default.extend(import_timezone.default);
|
|
907
|
+
import_dayjs2.default.extend(import_isSameOrAfter.default);
|
|
737
908
|
var NZ_TZ = "Pacific/Auckland";
|
|
738
909
|
function toNZTime(date3) {
|
|
739
|
-
return (0,
|
|
910
|
+
return (0, import_dayjs2.default)(date3).tz(NZ_TZ).format();
|
|
740
911
|
}
|
|
741
912
|
var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
742
913
|
const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
|
|
743
|
-
const dateTime = timeStr ? (0,
|
|
914
|
+
const dateTime = timeStr ? (0, import_dayjs2.default)(dateTimeStr, `${dateFormat} ${timeFormat}`) : (0, import_dayjs2.default)(dateStr, dateFormat);
|
|
744
915
|
const formattedDate = dateTime.format("dddd, D MMMM, YYYY");
|
|
745
916
|
const formattedTime = dateTime.format("h:mm a");
|
|
746
917
|
switch (display) {
|
|
@@ -755,9 +926,9 @@ var formatDate = (dateStr, display = "datetime", timeStr) => {
|
|
|
755
926
|
}
|
|
756
927
|
};
|
|
757
928
|
var getCurrentAndFutureDates = (dates) => {
|
|
758
|
-
const now = (0,
|
|
929
|
+
const now = (0, import_dayjs2.default)();
|
|
759
930
|
return dates.filter((dateObj) => {
|
|
760
|
-
const dateTime = (0,
|
|
931
|
+
const dateTime = (0, import_dayjs2.default)(
|
|
761
932
|
`${dateObj.startDate} ${dateObj.startTime}`,
|
|
762
933
|
`${dateFormat} ${timeFormat}`
|
|
763
934
|
);
|
|
@@ -765,16 +936,15 @@ var getCurrentAndFutureDates = (dates) => {
|
|
|
765
936
|
});
|
|
766
937
|
};
|
|
767
938
|
var isFutureDatesBeforeThreshold = (date3, minHoursFromNow) => {
|
|
768
|
-
const threshold = minHoursFromNow ? (0,
|
|
769
|
-
const dateTime = (0,
|
|
939
|
+
const threshold = minHoursFromNow ? (0, import_dayjs2.default)().add(minHoursFromNow, "hour") : (0, import_dayjs2.default)().startOf("day");
|
|
940
|
+
const dateTime = (0, import_dayjs2.default)(
|
|
770
941
|
`${date3.startDate} ${date3.startTime}`,
|
|
771
942
|
`${dateFormat} ${timeFormat}`
|
|
772
943
|
);
|
|
773
944
|
return dateTime.isSameOrAfter(threshold);
|
|
774
945
|
};
|
|
775
946
|
var formatTimestamp = (timestamp) => {
|
|
776
|
-
const formattedDate = (0,
|
|
777
|
-
const formattedTime = (0, import_dayjs.default)(timestamp).tz("Pacific/Auckland").format(timeFormat);
|
|
947
|
+
const formattedDate = (0, import_dayjs2.default)(timestamp).tz("Pacific/Auckland").format(dateFormat);
|
|
778
948
|
return formatDate(formattedDate, "date");
|
|
779
949
|
};
|
|
780
950
|
var isIsoDateString = (value) => {
|
|
@@ -825,8 +995,8 @@ function sortDatesChronologically(dates) {
|
|
|
825
995
|
}
|
|
826
996
|
return [...dates].sort((a, b) => {
|
|
827
997
|
const dateTimeFormat = `${dateFormat} ${timeFormat}`;
|
|
828
|
-
const dateA = (0,
|
|
829
|
-
const dateB = (0,
|
|
998
|
+
const dateA = (0, import_dayjs2.default)(`${a.startDate} ${a.startTime}`, dateTimeFormat);
|
|
999
|
+
const dateB = (0, import_dayjs2.default)(`${b.startDate} ${b.startTime}`, dateTimeFormat);
|
|
830
1000
|
return dateA.valueOf() - dateB.valueOf();
|
|
831
1001
|
});
|
|
832
1002
|
}
|
|
@@ -6313,7 +6483,7 @@ var React = __toESM(require("react"));
|
|
|
6313
6483
|
var import_react_hook_form = require("react-hook-form");
|
|
6314
6484
|
|
|
6315
6485
|
// src/yupSchema/global.ts
|
|
6316
|
-
var
|
|
6486
|
+
var import_dayjs3 = __toESM(require("dayjs"));
|
|
6317
6487
|
var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
6318
6488
|
var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"));
|
|
6319
6489
|
var yup = __toESM(require("yup"));
|
|
@@ -6342,8 +6512,8 @@ var noLeadingZeros = (fieldName, options = {}) => {
|
|
|
6342
6512
|
return true;
|
|
6343
6513
|
};
|
|
6344
6514
|
};
|
|
6345
|
-
|
|
6346
|
-
|
|
6515
|
+
import_dayjs3.default.extend(import_isSameOrAfter2.default);
|
|
6516
|
+
import_dayjs3.default.extend(import_customParseFormat2.default);
|
|
6347
6517
|
var emailRequiredSchema = yup.string().email("Invalid email address").required("Email is required").label("Email").transform(
|
|
6348
6518
|
(value) => typeof value === "string" ? value.trim().toLowerCase() : value
|
|
6349
6519
|
);
|
|
@@ -6374,12 +6544,12 @@ var contactDetailsSchema = yup.object({
|
|
|
6374
6544
|
landlinePhone: landlinePhoneSchema
|
|
6375
6545
|
}).nullable().default(void 0);
|
|
6376
6546
|
var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
|
|
6377
|
-
const now = (0,
|
|
6378
|
-
return value ? (0,
|
|
6547
|
+
const now = (0, import_dayjs3.default)();
|
|
6548
|
+
return value ? (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
|
|
6379
6549
|
});
|
|
6380
6550
|
var startDateNotInPastTest = yup.string().test("not-in-past", "Start date cannot be in the past", (value) => {
|
|
6381
|
-
const now = (0,
|
|
6382
|
-
return value ? (0,
|
|
6551
|
+
const now = (0, import_dayjs3.default)();
|
|
6552
|
+
return value ? (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
|
|
6383
6553
|
});
|
|
6384
6554
|
var endDateAfterStartDateTest = yup.string().test(
|
|
6385
6555
|
"end-after-start",
|
|
@@ -6387,8 +6557,8 @@ var endDateAfterStartDateTest = yup.string().test(
|
|
|
6387
6557
|
function(value) {
|
|
6388
6558
|
const { startDate } = this.parent;
|
|
6389
6559
|
if (!startDate || !value) return false;
|
|
6390
|
-
return (0,
|
|
6391
|
-
(0,
|
|
6560
|
+
return (0, import_dayjs3.default)(value, dateFormat, true).isSameOrAfter(
|
|
6561
|
+
(0, import_dayjs3.default)(startDate, dateFormat, true),
|
|
6392
6562
|
"day"
|
|
6393
6563
|
);
|
|
6394
6564
|
}
|
|
@@ -6399,12 +6569,12 @@ var endTimeMustBeAfterStartTimeTest = yup.string().test(
|
|
|
6399
6569
|
function(value) {
|
|
6400
6570
|
const { startDate, endDate, startTime } = this.parent;
|
|
6401
6571
|
if (!startDate || !endDate || !startTime || !value) return false;
|
|
6402
|
-
const startDateTime = (0,
|
|
6572
|
+
const startDateTime = (0, import_dayjs3.default)(
|
|
6403
6573
|
`${startDate} ${startTime}`,
|
|
6404
6574
|
`${dateFormat} ${timeFormat}`,
|
|
6405
6575
|
true
|
|
6406
6576
|
);
|
|
6407
|
-
const endDateTime = (0,
|
|
6577
|
+
const endDateTime = (0, import_dayjs3.default)(
|
|
6408
6578
|
`${endDate} ${value}`,
|
|
6409
6579
|
`${dateFormat} ${timeFormat}`,
|
|
6410
6580
|
true
|
|
@@ -6416,10 +6586,10 @@ var startTimeCannotBeInPastTest = yup.string().test(
|
|
|
6416
6586
|
"valid-start-time",
|
|
6417
6587
|
"Start time cannot be in the past",
|
|
6418
6588
|
function(value) {
|
|
6419
|
-
const now = (0,
|
|
6589
|
+
const now = (0, import_dayjs3.default)();
|
|
6420
6590
|
const { startDate } = this.parent;
|
|
6421
6591
|
if (!startDate || !value) return false;
|
|
6422
|
-
const startDateTime = (0,
|
|
6592
|
+
const startDateTime = (0, import_dayjs3.default)(
|
|
6423
6593
|
`${startDate} ${value}`,
|
|
6424
6594
|
`${dateFormat} ${timeFormat}`,
|
|
6425
6595
|
true
|
|
@@ -8025,95 +8195,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
8025
8195
|
EnumActivity2["VIEW"] = "VIEW";
|
|
8026
8196
|
return EnumActivity2;
|
|
8027
8197
|
})(EnumActivity || {});
|
|
8028
|
-
|
|
8029
|
-
// src/types/game.ts
|
|
8030
|
-
var gameScreenIdentifierList = [
|
|
8031
|
-
{
|
|
8032
|
-
clue: "Where your actions turn into a timeline.",
|
|
8033
|
-
id: "activities"
|
|
8034
|
-
},
|
|
8035
|
-
{
|
|
8036
|
-
clue: "Where conversations happen without speaking.",
|
|
8037
|
-
id: "chat"
|
|
8038
|
-
},
|
|
8039
|
-
{
|
|
8040
|
-
clue: "The place to redefine who you are.",
|
|
8041
|
-
id: "edit-profile"
|
|
8042
|
-
},
|
|
8043
|
-
{
|
|
8044
|
-
clue: "A single moment worth showing up for.",
|
|
8045
|
-
id: "event"
|
|
8046
|
-
},
|
|
8047
|
-
{
|
|
8048
|
-
clue: "What\u2019s happening around you, right now.",
|
|
8049
|
-
id: "events-near-me"
|
|
8050
|
-
},
|
|
8051
|
-
{
|
|
8052
|
-
clue: "A collection of things worth attending.",
|
|
8053
|
-
id: "events"
|
|
8054
|
-
},
|
|
8055
|
-
{
|
|
8056
|
-
clue: "What\u2019s happening in a wider area\u2014not just nearby.",
|
|
8057
|
-
id: "events/region"
|
|
8058
|
-
},
|
|
8059
|
-
{
|
|
8060
|
-
clue: "Where fun becomes a challenge.",
|
|
8061
|
-
id: "games"
|
|
8062
|
-
},
|
|
8063
|
-
{
|
|
8064
|
-
clue: "Your starting point for everything.",
|
|
8065
|
-
id: "home"
|
|
8066
|
-
},
|
|
8067
|
-
{
|
|
8068
|
-
clue: "Where the app taps you on the shoulder.",
|
|
8069
|
-
id: "notifications"
|
|
8070
|
-
},
|
|
8071
|
-
{
|
|
8072
|
-
clue: "Where you fine-tune your experience.",
|
|
8073
|
-
id: "options"
|
|
8074
|
-
},
|
|
8075
|
-
{
|
|
8076
|
-
clue: "A single collaborator in the ecosystem.",
|
|
8077
|
-
id: "partner"
|
|
8078
|
-
},
|
|
8079
|
-
{
|
|
8080
|
-
clue: "The network behind the scenes.",
|
|
8081
|
-
id: "partners"
|
|
8082
|
-
},
|
|
8083
|
-
{
|
|
8084
|
-
clue: "Where you share something with everyone.",
|
|
8085
|
-
id: "post"
|
|
8086
|
-
},
|
|
8087
|
-
{
|
|
8088
|
-
clue: "Your identity, on display.",
|
|
8089
|
-
id: "profile"
|
|
8090
|
-
},
|
|
8091
|
-
{
|
|
8092
|
-
clue: "One provider offering something valuable.",
|
|
8093
|
-
id: "vendor"
|
|
8094
|
-
},
|
|
8095
|
-
{
|
|
8096
|
-
clue: "A marketplace of providers.",
|
|
8097
|
-
id: "vendors"
|
|
8098
|
-
},
|
|
8099
|
-
{
|
|
8100
|
-
clue: "People who stopped by to see you.",
|
|
8101
|
-
id: "visitors"
|
|
8102
|
-
}
|
|
8103
|
-
];
|
|
8104
|
-
var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
|
|
8105
|
-
EnumGameType2["DAILY_CLUE"] = "dailyClue";
|
|
8106
|
-
return EnumGameType2;
|
|
8107
|
-
})(EnumGameType || {});
|
|
8108
|
-
var gameTypeToDisplayName = {
|
|
8109
|
-
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
8110
|
-
};
|
|
8111
|
-
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
8112
|
-
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
8113
|
-
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
8114
|
-
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
8115
|
-
return EnumGameStatus2;
|
|
8116
|
-
})(EnumGameStatus || {});
|
|
8117
8198
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8118
8199
|
0 && (module.exports = {
|
|
8119
8200
|
ANDROID_URL,
|
|
@@ -8163,6 +8244,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
|
8163
8244
|
categoryColors,
|
|
8164
8245
|
cluemartSocialMedia,
|
|
8165
8246
|
companyContactFields,
|
|
8247
|
+
computeDailyClueState,
|
|
8166
8248
|
contactUsFields,
|
|
8167
8249
|
darkColors,
|
|
8168
8250
|
dateFormat,
|
|
@@ -8206,6 +8288,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
|
8206
8288
|
requestPasswordResetFields,
|
|
8207
8289
|
requirementsOptions,
|
|
8208
8290
|
resetPasswordFields,
|
|
8291
|
+
seededShuffle,
|
|
8209
8292
|
socialMediaFields,
|
|
8210
8293
|
sortDatesChronologically,
|
|
8211
8294
|
stallTypeOptions,
|