@timardex/cluemart-shared 2.2.13 → 2.2.21

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.
Files changed (59) hide show
  1. package/dist/{ad-Ogzb0O0U.d.ts → ad-C4L_-r-4.d.ts} +10 -1
  2. package/dist/{ad-BdPabW-h.d.mts → ad-XtBAH4rD.d.mts} +10 -1
  3. package/dist/apollo/index.cjs +12 -7
  4. package/dist/apollo/index.cjs.map +1 -1
  5. package/dist/apollo/index.d.mts +11 -0
  6. package/dist/apollo/index.d.ts +11 -0
  7. package/dist/apollo/index.mjs +12 -7
  8. package/dist/apollo/index.mjs.map +1 -1
  9. package/dist/auth/index.cjs +36 -0
  10. package/dist/auth/index.cjs.map +1 -1
  11. package/dist/auth/index.mjs +2 -2
  12. package/dist/{chunk-OSSBKFNH.mjs → chunk-BR4XNXE7.mjs} +52 -1
  13. package/dist/chunk-BR4XNXE7.mjs.map +1 -0
  14. package/dist/{chunk-MRBTCICB.mjs → chunk-FWKZZMQR.mjs} +1 -1
  15. package/dist/chunk-FWKZZMQR.mjs.map +1 -0
  16. package/dist/{chunk-KGYLNZQW.mjs → chunk-KHC57ZNS.mjs} +3 -3
  17. package/dist/{chunk-4DFWOUOT.mjs → chunk-PUX53EZX.mjs} +3 -3
  18. package/dist/{chunk-YPWBK4WU.mjs → chunk-Q2WLLXTA.mjs} +2 -1
  19. package/dist/chunk-Q2WLLXTA.mjs.map +1 -0
  20. package/dist/{chunk-QSBAN3V5.mjs → chunk-TCV735VY.mjs} +2 -2
  21. package/dist/enums/index.cjs +1 -0
  22. package/dist/enums/index.cjs.map +1 -1
  23. package/dist/enums/index.d.mts +1 -0
  24. package/dist/enums/index.d.ts +1 -0
  25. package/dist/enums/index.mjs +1 -1
  26. package/dist/formFields/index.cjs.map +1 -1
  27. package/dist/formFields/index.mjs +4 -4
  28. package/dist/graphql/index.cjs +54 -0
  29. package/dist/graphql/index.cjs.map +1 -1
  30. package/dist/graphql/index.d.mts +29 -2
  31. package/dist/graphql/index.d.ts +29 -2
  32. package/dist/graphql/index.mjs +9 -3
  33. package/dist/hooks/index.cjs +36 -0
  34. package/dist/hooks/index.cjs.map +1 -1
  35. package/dist/hooks/index.d.mts +1 -1
  36. package/dist/hooks/index.d.ts +1 -1
  37. package/dist/hooks/index.mjs +6 -6
  38. package/dist/index.cjs +55 -0
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.mts +38 -1
  41. package/dist/index.d.ts +38 -1
  42. package/dist/index.mjs +52 -0
  43. package/dist/index.mjs.map +1 -1
  44. package/dist/region/index.cjs.map +1 -1
  45. package/dist/region/index.mjs +1 -1
  46. package/dist/sharing/index.mjs +1 -1
  47. package/dist/types/index.cjs.map +1 -1
  48. package/dist/types/index.d.mts +1 -1
  49. package/dist/types/index.d.ts +1 -1
  50. package/dist/types/index.mjs +2 -2
  51. package/dist/utils/index.cjs.map +1 -1
  52. package/dist/utils/index.mjs +3 -3
  53. package/package.json +1 -1
  54. package/dist/chunk-MRBTCICB.mjs.map +0 -1
  55. package/dist/chunk-OSSBKFNH.mjs.map +0 -1
  56. package/dist/chunk-YPWBK4WU.mjs.map +0 -1
  57. /package/dist/{chunk-KGYLNZQW.mjs.map → chunk-KHC57ZNS.mjs.map} +0 -0
  58. /package/dist/{chunk-4DFWOUOT.mjs.map → chunk-PUX53EZX.mjs.map} +0 -0
  59. /package/dist/{chunk-QSBAN3V5.mjs.map → chunk-TCV735VY.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/region/index.ts","../../src/enums/index.ts","../../src/region/constants.ts","../../src/region/useRegionSelectionState.ts","../../src/auth/UserProvider.tsx","../../src/utils/distance.ts"],"sourcesContent":["/**\n * Region selection — shared state hook and NZ region constants.\n *\n * The hook takes `location` as a prop (platform-specific: Expo geolocation on\n * mobile, `navigator.geolocation` on web) and reads `authUser` from the shared\n * auth context. Apps keep a thin local `RegionSelectionProvider` that feeds\n * the platform location and exposes the result via context.\n *\n * `\"use client\"`: required for Next.js; ignored by React Native.\n */\n\"use client\";\n\nexport { REGION_CENTERS, nzRegions, type RegionCenterType } from \"./constants\";\nexport {\n useRegionSelectionState,\n type IUseRegionSelectionReturn,\n type UseRegionSelectionStateArgs,\n} from \"./useRegionSelectionState\";\n","export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n}\n\nexport enum EnumChatReportReason {\n INAPPROPRIATE_CONTENT = \"Inappropriate_Content\",\n HARASSMENT_OR_BULLYING = \"Harassment_or_Bullying\",\n HATE_SPEECH = \"Hate_Speech\",\n SPAM_OR_SCAM = \"Spam_or_Scam\",\n VIOLENCE_OR_DANGEROUS_BEHAVIOR = \"Violence_or_Dangerous_Behavior\",\n OTHER = \"Other\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n OTHER = \"Not_Applicable\",\n}\n\nexport enum EnumFoodType {\n ADDITIVE_FREE = \"Additive_Free\",\n AIR_FRIED = \"Air_Fried\",\n ALLERGEN_FRIENDLY = \"Allergen_Friendly\",\n ATHLETE_FRIENDLY = \"Athlete_Friendly\",\n BAKED = \"Baked\",\n DAIRY_FREE = \"Dairy_Free\",\n DIABETIC_FRIENDLY = \"Diabetic_Friendly\",\n EGG_FREE = \"Egg_Free\",\n FRESH = \"Fresh\",\n GLUTEN_FREE = \"Gluten_Free\",\n GRILLED = \"Grilled\",\n HALAL = \"Halal\",\n HEART_HEALTHY = \"Heart_Healthy\",\n HIGH_FIBER = \"High_Fiber\",\n HIGH_PROTEIN = \"High_Protein\",\n KETO = \"Keto\",\n KOSHER = \"Kosher\",\n LACTOSE_FREE = \"Lactose_Free\",\n LOW_CALORIE = \"Low_Calorie\",\n LOW_CARB = \"Low_Carb\",\n LOW_FAT = \"Low_Fat\",\n LOW_SODIUM = \"Low_Sodium\",\n NO_ADDED_SUGAR = \"No_Added_Sugar\",\n NO_PRESERVATIVES = \"No_Preservatives\",\n NON_GMO = \"Non_GMO\",\n NUT_FREE = \"Nut_Free\",\n ORGANIC = \"Organic\",\n PALEO = \"Paleo\",\n PLANT_BASED = \"Plant_Based\",\n RAW = \"Raw\",\n SMOKED = \"Smoked\",\n SOY_FREE = \"Soy_Free\",\n SUGAR_FREE = \"Sugar_Free\",\n VEGAN = \"Vegan\",\n VEGETARIAN = \"Vegetarian\",\n}\n\nexport enum EnumResourceType {\n AFFILIATE = \"affiliate\",\n EVENT = \"event\",\n PARTNER = \"partner\",\n SCHOOL = \"school\",\n VENDOR = \"vendor\",\n VISITOR = \"visitor\",\n}\n\n/** `EnumResourceType` values that map to a stored resource — excludes the user-only `VISITOR` type. */\nexport type NonVisitorResourceType = Exclude<\n EnumResourceType,\n EnumResourceType.VISITOR\n>;\n\n/** Type guard that narrows an `EnumResourceType` to `NonVisitorResourceType`. */\nexport function isNonVisitorResourceType(\n value: EnumResourceType,\n): value is NonVisitorResourceType {\n return value !== EnumResourceType.VISITOR;\n}\n\nexport enum EnumEventType {\n MARKET = \"Market\",\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n}\n\nexport enum EnumPartnerType {\n CHARITY_PARTNER = \"Charity_Partner\",\n MEDIA_PARTNER = \"Media_Partner\",\n SUPPORTING_PARTNER = \"Supporting_Partner\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n EVENT_UPDATE_RELATION_TO_VENDOR = \"event_update_relation_to_vendor\",\n VENDOR_UPDATE_RELATION_TO_EVENT = \"vendor_update_relation_to_event\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n AFFILIATE_REWARD_RECEIVED = \"affiliate_reward_received\",\n APPROVED_AFFILIATE = \"approved_affiliate\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_PARTNER = \"approved_partner\",\n APPROVED_SCHOOL = \"approved_school\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_PARTNER = \"created_partner\",\n CREATED_VENDOR = \"created_vendor\",\n DAILY_CLUE_GAME = \"daily_clue_game\",\n DEACTIVATED_EVENT = \"deactivated_event\",\n DEACTIVATED_PARTNER = \"deactivated_partner\",\n DEACTIVATED_VENDOR = \"deactivated_vendor\",\n DECLINED_EVENT = \"declined_event\",\n DECLINED_PARTNER = \"declined_partner\",\n DECLINED_VENDOR = \"declined_vendor\",\n DOWNGRADED_EVENT = \"downgraded_event\",\n DOWNGRADED_PARTNER = \"downgraded_partner\",\n DOWNGRADED_VENDOR = \"downgraded_vendor\",\n EVENT_DATE_CANCELED = \"event_date_canceled\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n EVENT_UPDATE_RELATION_TO_VENDOR = EnumRelationResource.EVENT_UPDATE_RELATION_TO_VENDOR,\n EXPIRATION_REMINDER_EVENT = \"expiration_reminder_event\",\n EXPIRATION_REMINDER_PARTNER = \"expiration_reminder_partner\",\n EXPIRATION_REMINDER_VENDOR = \"expiration_reminder_vendor\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n NEW_POST_CREATED = \"new_post_created\",\n REGISTERED_USER_BY_SCHOOL_CODE = \"registered_user_by_school_code\",\n SYSTEM_ALERT = \"system_alert\",\n USER_COUPON_REDEEMED = \"user_coupon_redeemed\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n VENDOR_UPDATE_RELATION_TO_EVENT = EnumRelationResource.VENDOR_UPDATE_RELATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n CHAT = \"chat\",\n EVENT = EnumResourceType.EVENT,\n RELATION = \"relation\",\n SYSTEM = \"system\",\n VENDOR = EnumResourceType.VENDOR,\n}\n\nexport enum EnumRegions {\n All = \"All Regions\",\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n CanterburyWestCoast = \"Canterbury & West Coast\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelsonTasman = \"Marlborough & Nelson & Tasman\",\n Northland = \"Northland\",\n Otago = \"Otago\",\n Southland = \"Southland\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n STANDARD_PARTNER = \"standard_partner\",\n STANDARD_AFFILIATE = \"standard_affiliate\",\n STANDARD_SCHOOL = \"standard_school\",\n}\n\nexport enum LicenceExpiryDate {\n ONE_YEAR = \"1 year\",\n ONE_MONTH = \"1 month\",\n TWO_MONTHS = \"2 months\",\n THREE_MONTHS = \"3 months\",\n SIX_MONTHS = \"6 months\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n AFFILIATE = \"affiliate\",\n CUSTOMER = \"customer\",\n EVENT = \"event\",\n PARTNER = \"partner\",\n SCHOOL = \"school\",\n SUPER_ADMIN = \"super_admin\",\n VENDOR = \"vendor\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n\nexport enum EnumEventDateStatus {\n STARTING_SOON = \"Starting_Soon\",\n STARTED = \"Started\",\n TODAY = \"Today\",\n TOMORROW = \"Tomorrow\",\n THIS_WEEK = \"This_Week\",\n NEXT_WEEK = \"Next_Week\",\n UPCOMING = \"Upcoming\",\n ENDED = \"Ended\",\n RE_SCHEDULED = \"Rescheduled\",\n CANCELED = \"Canceled\",\n INVALID = \"Invalid\",\n}\n\nexport enum EnumSubscriptionStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n CANCELLED = \"cancelled\",\n NO_SUBSCRIPTION = \"no_subscription\",\n PAST_DUE = \"past_due\",\n TRIALING = \"trialing\",\n}\n\nexport enum EnumBillingPeriod {\n MONTHLY_CANCEL_ANYTIME = \"monthly_cancel_anytime\",\n YEARLY_ANNUAL_BILLED = \"yearly_annual_billed\",\n}\n\nexport enum EnumReward {\n MYSTERY_JOY_BOX = \"mystery_joy_box\",\n MYSTERY_SQUEEZE_BOX = \"mystery_squeeze_box\",\n MYSTERY_DELUXE_BOX = \"mystery_deluxe_box\",\n}\n","import { EnumRegions } from \"../enums\";\nimport type { Region } from \"../types\";\n\nexport type RegionCenterType = Region & { region: EnumRegions };\n\n/**\n * New Zealand region centres used to derive the nearest region from a\n * location and to map a region selection to map coordinates.\n *\n * The final `EnumRegions.All` entry is the NZ-wide default.\n */\nexport const REGION_CENTERS: RegionCenterType[] = [\n {\n latitude: -36.8485,\n latitudeDelta: 2,\n longitude: 174.7633,\n longitudeDelta: 2,\n region: EnumRegions.Auckland,\n },\n {\n latitude: -38.1387,\n latitudeDelta: 2,\n longitude: 176.2452,\n longitudeDelta: 2,\n region: EnumRegions.BayOfPlentyGisborne,\n },\n {\n latitude: -43.5321,\n latitudeDelta: 2,\n longitude: 172.6362,\n longitudeDelta: 2,\n region: EnumRegions.CanterburyWestCoast,\n },\n {\n latitude: -39.4928,\n latitudeDelta: 2,\n longitude: 176.912,\n longitudeDelta: 2,\n region: EnumRegions.HawkesBay,\n },\n {\n latitude: -40.3523,\n latitudeDelta: 2,\n longitude: 175.6082,\n longitudeDelta: 2,\n region: EnumRegions.ManawatuWanganui,\n },\n {\n latitude: -41.2706,\n latitudeDelta: 2,\n longitude: 173.284,\n longitudeDelta: 2,\n region: EnumRegions.MarlboroughNelsonTasman,\n },\n {\n latitude: -35.7251,\n latitudeDelta: 2,\n longitude: 174.3237,\n longitudeDelta: 2,\n region: EnumRegions.Northland,\n },\n {\n latitude: -45.8788,\n latitudeDelta: 2,\n longitude: 170.5028,\n longitudeDelta: 2,\n region: EnumRegions.Otago,\n },\n {\n latitude: -46.4132,\n latitudeDelta: 2,\n longitude: 168.3538,\n longitudeDelta: 2,\n region: EnumRegions.Southland,\n },\n {\n latitude: -39.0556,\n latitudeDelta: 2,\n longitude: 174.0752,\n longitudeDelta: 2,\n region: EnumRegions.Taranaki,\n },\n {\n latitude: -37.787,\n latitudeDelta: 2,\n longitude: 175.2793,\n longitudeDelta: 2,\n region: EnumRegions.Waikato,\n },\n {\n latitude: -41.2866,\n latitudeDelta: 2,\n longitude: 174.7756,\n longitudeDelta: 2,\n region: EnumRegions.Wellington,\n },\n {\n latitude: -36.8624942, // Default: New Zealand\n latitudeDelta: 2,\n longitude: 174.7450494,\n longitudeDelta: 2,\n region: EnumRegions.All,\n },\n];\n\n/**\n * All selectable NZ regions, excluding the `All` pseudo-region.\n */\nexport const nzRegions = Object.values(EnumRegions).filter(\n (region) => region !== EnumRegions.All,\n);\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useAuthUser } from \"../auth/UserProvider\";\nimport { EnumRegions } from \"../enums\";\nimport { getDistanceInMeters } from \"../utils/distance\";\n\nimport { REGION_CENTERS, type RegionCenterType } from \"./constants\";\n\nexport interface IUseRegionSelectionReturn {\n derivedRegion: RegionCenterType;\n handleResetRegion: () => void;\n handleSelectRegion: (region: EnumRegions) => void;\n loading: boolean;\n selectedRegion: RegionCenterType;\n}\n\ntype DeriveRegionLocation = {\n latitude: number;\n longitude: number;\n};\n\nexport interface UseRegionSelectionStateArgs {\n location: DeriveRegionLocation | null | undefined;\n}\n\n// AUDIT-DECISION: Fail fast if REGION_CENTERS is empty. It is a compile-time\n// constant, so an empty array means the import is broken — an invariant beats\n// a silent undefined that surfaces as a crash three screens away.\nfunction getDefaultRegion(): RegionCenterType {\n const [first] = REGION_CENTERS;\n if (first === undefined) {\n throw new Error(\n \"[useRegionSelectionState] REGION_CENTERS is empty — check the import.\",\n );\n }\n return first;\n}\n\n// AUDIT-DECISION: Pure helper — no side effects, no hook calls.\n// Accepts nullable inputs so callers never need to guard before calling it.\nfunction deriveRegion(\n location: DeriveRegionLocation | null | undefined,\n preferredRegion: EnumRegions | null | undefined,\n): RegionCenterType {\n // 1. Location available — pick nearest valid region.\n if (location) {\n const { latitude, longitude } = location;\n const userCoords: [number, number] = [longitude, latitude];\n\n let nearestRegion: RegionCenterType = getDefaultRegion();\n let nearestDistance = Infinity;\n\n for (const region of REGION_CENTERS) {\n const regionCoords: [number, number] = [\n region.longitude,\n region.latitude,\n ];\n const distance = getDistanceInMeters(userCoords, regionCoords);\n\n // AUDIT-DECISION: Skip non-finite distances — getDistanceInMeters\n // returns Infinity for invalid coords. We do not want a bogus distance to\n // \"win\" the reduce by being the first candidate with the starting Infinity\n // baseline, which was the original bug.\n if (Number.isFinite(distance) && distance < nearestDistance) {\n nearestDistance = distance;\n nearestRegion = region;\n }\n }\n\n // AUDIT-DECISION: If every distance was non-finite (malformed location),\n // fall through to the preference path rather than returning REGION_CENTERS[0]\n // unconditionally. This keeps the fallback chain consistent.\n if (Number.isFinite(nearestDistance)) {\n return nearestRegion;\n }\n }\n\n // 2. No usable location — use the user's stored preference.\n if (preferredRegion) {\n const preferred = REGION_CENTERS.find((r) => r.region === preferredRegion);\n if (preferred) return preferred;\n }\n\n // 3. Last resort — first entry in the array.\n return getDefaultRegion();\n}\n\nexport function useRegionSelectionState({\n location,\n}: UseRegionSelectionStateArgs): IUseRegionSelectionReturn {\n const { authUser } = useAuthUser();\n\n const preferredRegion = authUser?.preferredRegion as\n EnumRegions | null | undefined;\n\n // AUDIT-DECISION: Derive the initial region synchronously so the very first\n // render never sees undefined. deriveRegion is cheap (O(n) array scan).\n const [selectedRegion, setSelectedRegion] = useState<RegionCenterType>(() =>\n deriveRegion(location, preferredRegion ?? null),\n );\n // AUDIT-DECISION: Track the auto-derived default separately from the user's\n // manual selection. derivedRegion always reflects deriveRegion(location,\n // preferredRegion) — nearest location → preferred region → first region — so\n // consumers can detect divergence from the default and reset back to it.\n const [derivedRegion, setDerivedRegion] = useState<RegionCenterType>(() =>\n deriveRegion(location, preferredRegion ?? null),\n );\n const [loading, setLoading] = useState<boolean>(false);\n const [hasManualSelection, setHasManualSelection] = useState<boolean>(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // AUDIT-DECISION: Reset manual selection when the authenticated user changes\n // so the auto-derive re-runs for the new identity. Keying on authUser?._id\n // (not the full object) avoids false resets on reference-stable re-renders.\n const prevUserIdRef = useRef<string | undefined>(authUser?._id);\n useEffect(() => {\n if (prevUserIdRef.current !== authUser?._id) {\n prevUserIdRef.current = authUser?._id;\n setHasManualSelection(false);\n }\n }, [authUser?._id]);\n\n // AUDIT-DECISION: Compute and apply the derived region in a single effect —\n // no intermediate memo. This removes the two-cycle race window where the\n // memoised value existed before the state write committed.\n useEffect(() => {\n const derived = deriveRegion(location, preferredRegion ?? null);\n setDerivedRegion(derived);\n\n if (hasManualSelection) return;\n setSelectedRegion(derived);\n }, [location, preferredRegion, hasManualSelection]);\n\n const handleSelectRegion = useCallback((region: EnumRegions) => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n }\n\n const regionCenter =\n REGION_CENTERS.find((r) => r.region === region) ?? getDefaultRegion();\n\n setLoading(true);\n setSelectedRegion(regionCenter);\n setHasManualSelection(true);\n\n timerRef.current = setTimeout(() => {\n setLoading(false);\n timerRef.current = null;\n }, 500);\n }, []);\n\n const handleResetRegion = useCallback(() => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n\n setLoading(false);\n const derived = deriveRegion(location, preferredRegion ?? null);\n setDerivedRegion(derived);\n setSelectedRegion(derived);\n setHasManualSelection(false);\n }, [location, preferredRegion]);\n\n // Cleanup on unmount.\n useEffect(() => {\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n }\n };\n }, []);\n\n return {\n derivedRegion,\n handleResetRegion,\n handleSelectRegion,\n loading,\n selectedRegion,\n };\n}\n\nexport default useRegionSelectionState;\n","/**\n * Shared React context for auth session state.\n *\n * Apps keep a thin local UserProvider that calls their platform `useAuth`\n * (adapters) and pass the result here as `value`. Import `useAuthUser` from\n * this module (or re-export it) so consumers share one context instance.\n *\n * `\"use client\"`: required for Next.js; ignored by React Native.\n */\n\"use client\";\n\nimport React, { createContext, useContext, type ReactNode } from \"react\";\n\nimport type { UseAuthReturnType } from \"./types\";\n\nconst UserContext = createContext<UseAuthReturnType | undefined>(undefined);\n\n/**\n * Provides auth session value from the app's thin useAuth wrapper.\n */\nexport const UserProvider: React.FC<{\n children: ReactNode;\n value: UseAuthReturnType;\n}> = ({ children, value }) => {\n return <UserContext.Provider value={value}>{children}</UserContext.Provider>;\n};\n\nexport const useAuthUser = (): UseAuthReturnType => {\n const context = useContext(UserContext);\n if (!context) {\n throw new Error(\"useAuthUser must be used within a UserProvider\");\n }\n return context;\n};\n","export function getDistanceInMeters(\n coordinates1: number[],\n coordinates2: number[],\n): number {\n const [lon1, lat1] = coordinates1;\n const [lon2, lat2] = coordinates2;\n\n const values = [lon1, lat1, lon2, lat2];\n if (values.some((v) => !Number.isFinite(v))) {\n return Infinity;\n }\n\n const toRadians = (deg: number) => (deg * Math.PI) / 180;\n const R = 6371000; // Earth radius in meters\n\n const dLat = toRadians(lat2 - lat1);\n const dLon = toRadians(lon2 - lon1);\n const radLat1 = toRadians(lat1);\n const radLat2 = toRadians(lat2);\n\n const a =\n Math.sin(dLat / 2) ** 2 +\n Math.sin(dLon / 2) ** 2 * Math.cos(radLat1) * Math.cos(radLat2);\n\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return R * c;\n}\n\nexport function getDistanceInKilometers(\n coordinates1: number[],\n coordinates2: number[],\n): number {\n const distanceInMeters = getDistanceInMeters(coordinates1, coordinates2);\n\n if (!Number.isFinite(distanceInMeters)) {\n return Infinity;\n }\n\n return Math.round(distanceInMeters / 1000);\n}\n\nexport function formatDistance(\n coordinates1: number[],\n coordinates2: number[],\n): string {\n const distanceInMeters = getDistanceInMeters(coordinates1, coordinates2);\n\n if (!Number.isFinite(distanceInMeters)) {\n return \"—\";\n }\n\n const roundedMeters = Math.round(distanceInMeters);\n\n if (roundedMeters < 1000) {\n return `${roundedMeters} m`;\n }\n\n return `${Math.round(roundedMeters / 1000)} km`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+KO,IAAK,cAAL,kBAAKA,iBAAL;AACL,EAAAA,aAAA,SAAM;AACN,EAAAA,aAAA,cAAW;AACX,EAAAA,aAAA,yBAAsB;AACtB,EAAAA,aAAA,yBAAsB;AACtB,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,sBAAmB;AACnB,EAAAA,aAAA,6BAA0B;AAC1B,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,eAAY;AACZ,EAAAA,aAAA,cAAW;AACX,EAAAA,aAAA,aAAU;AACV,EAA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enums/index.ts","../../src/region/constants.ts","../../src/region/useRegionSelectionState.ts","../../src/auth/UserProvider.tsx","../../src/utils/distance.ts"],"sourcesContent":["/**\n * Region selection — shared state hook and NZ region constants.\n *\n * The hook takes `location` as a prop (platform-specific: Expo geolocation on\n * mobile, `navigator.geolocation` on web) and reads `authUser` from the shared\n * auth context. Apps keep a thin local `RegionSelectionProvider` that feeds\n * the platform location and exposes the result via context.\n *\n * `\"use client\"`: required for Next.js; ignored by React Native.\n */\n\"use client\";\n\nexport { REGION_CENTERS, nzRegions, type RegionCenterType } from \"./constants\";\nexport {\n useRegionSelectionState,\n type IUseRegionSelectionReturn,\n type UseRegionSelectionStateArgs,\n} from \"./useRegionSelectionState\";\n","export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n}\n\nexport enum EnumChatReportReason {\n INAPPROPRIATE_CONTENT = \"Inappropriate_Content\",\n HARASSMENT_OR_BULLYING = \"Harassment_or_Bullying\",\n HATE_SPEECH = \"Hate_Speech\",\n SPAM_OR_SCAM = \"Spam_or_Scam\",\n VIOLENCE_OR_DANGEROUS_BEHAVIOR = \"Violence_or_Dangerous_Behavior\",\n OTHER = \"Other\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n OTHER = \"Not_Applicable\",\n}\n\nexport enum EnumFoodType {\n ADDITIVE_FREE = \"Additive_Free\",\n AIR_FRIED = \"Air_Fried\",\n ALLERGEN_FRIENDLY = \"Allergen_Friendly\",\n ATHLETE_FRIENDLY = \"Athlete_Friendly\",\n BAKED = \"Baked\",\n DAIRY_FREE = \"Dairy_Free\",\n DIABETIC_FRIENDLY = \"Diabetic_Friendly\",\n EGG_FREE = \"Egg_Free\",\n FRESH = \"Fresh\",\n GLUTEN_FREE = \"Gluten_Free\",\n GRILLED = \"Grilled\",\n HALAL = \"Halal\",\n HEART_HEALTHY = \"Heart_Healthy\",\n HIGH_FIBER = \"High_Fiber\",\n HIGH_PROTEIN = \"High_Protein\",\n KETO = \"Keto\",\n KOSHER = \"Kosher\",\n LACTOSE_FREE = \"Lactose_Free\",\n LOW_CALORIE = \"Low_Calorie\",\n LOW_CARB = \"Low_Carb\",\n LOW_FAT = \"Low_Fat\",\n LOW_SODIUM = \"Low_Sodium\",\n NO_ADDED_SUGAR = \"No_Added_Sugar\",\n NO_PRESERVATIVES = \"No_Preservatives\",\n NON_GMO = \"Non_GMO\",\n NUT_FREE = \"Nut_Free\",\n ORGANIC = \"Organic\",\n PALEO = \"Paleo\",\n PLANT_BASED = \"Plant_Based\",\n RAW = \"Raw\",\n SMOKED = \"Smoked\",\n SOY_FREE = \"Soy_Free\",\n SUGAR_FREE = \"Sugar_Free\",\n VEGAN = \"Vegan\",\n VEGETARIAN = \"Vegetarian\",\n}\n\nexport enum EnumResourceType {\n AFFILIATE = \"affiliate\",\n EVENT = \"event\",\n PARTNER = \"partner\",\n SCHOOL = \"school\",\n VENDOR = \"vendor\",\n VISITOR = \"visitor\",\n}\n\n/** `EnumResourceType` values that map to a stored resource — excludes the user-only `VISITOR` type. */\nexport type NonVisitorResourceType = Exclude<\n EnumResourceType,\n EnumResourceType.VISITOR\n>;\n\n/** Type guard that narrows an `EnumResourceType` to `NonVisitorResourceType`. */\nexport function isNonVisitorResourceType(\n value: EnumResourceType,\n): value is NonVisitorResourceType {\n return value !== EnumResourceType.VISITOR;\n}\n\nexport enum EnumEventType {\n MARKET = \"Market\",\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n}\n\nexport enum EnumPartnerType {\n CHARITY_PARTNER = \"Charity_Partner\",\n MEDIA_PARTNER = \"Media_Partner\",\n SUPPORTING_PARTNER = \"Supporting_Partner\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n EVENT_UPDATE_RELATION_TO_VENDOR = \"event_update_relation_to_vendor\",\n VENDOR_UPDATE_RELATION_TO_EVENT = \"vendor_update_relation_to_event\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n AFFILIATE_REWARD_RECEIVED = \"affiliate_reward_received\",\n APPROVED_AFFILIATE = \"approved_affiliate\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_PARTNER = \"approved_partner\",\n APPROVED_SCHOOL = \"approved_school\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_PARTNER = \"created_partner\",\n CREATED_VENDOR = \"created_vendor\",\n CREATED_COUPON = \"created_coupon\",\n DAILY_CLUE_GAME = \"daily_clue_game\",\n DEACTIVATED_EVENT = \"deactivated_event\",\n DEACTIVATED_PARTNER = \"deactivated_partner\",\n DEACTIVATED_VENDOR = \"deactivated_vendor\",\n DECLINED_EVENT = \"declined_event\",\n DECLINED_PARTNER = \"declined_partner\",\n DECLINED_VENDOR = \"declined_vendor\",\n DOWNGRADED_EVENT = \"downgraded_event\",\n DOWNGRADED_PARTNER = \"downgraded_partner\",\n DOWNGRADED_VENDOR = \"downgraded_vendor\",\n EVENT_DATE_CANCELED = \"event_date_canceled\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n EVENT_UPDATE_RELATION_TO_VENDOR = EnumRelationResource.EVENT_UPDATE_RELATION_TO_VENDOR,\n EXPIRATION_REMINDER_EVENT = \"expiration_reminder_event\",\n EXPIRATION_REMINDER_PARTNER = \"expiration_reminder_partner\",\n EXPIRATION_REMINDER_VENDOR = \"expiration_reminder_vendor\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n NEW_POST_CREATED = \"new_post_created\",\n REGISTERED_USER_BY_SCHOOL_CODE = \"registered_user_by_school_code\",\n SYSTEM_ALERT = \"system_alert\",\n USER_COUPON_REDEEMED = \"user_coupon_redeemed\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n VENDOR_UPDATE_RELATION_TO_EVENT = EnumRelationResource.VENDOR_UPDATE_RELATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n CHAT = \"chat\",\n EVENT = EnumResourceType.EVENT,\n RELATION = \"relation\",\n SYSTEM = \"system\",\n VENDOR = EnumResourceType.VENDOR,\n}\n\nexport enum EnumRegions {\n All = \"All Regions\",\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n CanterburyWestCoast = \"Canterbury & West Coast\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelsonTasman = \"Marlborough & Nelson & Tasman\",\n Northland = \"Northland\",\n Otago = \"Otago\",\n Southland = \"Southland\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n STANDARD_PARTNER = \"standard_partner\",\n STANDARD_AFFILIATE = \"standard_affiliate\",\n STANDARD_SCHOOL = \"standard_school\",\n}\n\nexport enum LicenceExpiryDate {\n ONE_YEAR = \"1 year\",\n ONE_MONTH = \"1 month\",\n TWO_MONTHS = \"2 months\",\n THREE_MONTHS = \"3 months\",\n SIX_MONTHS = \"6 months\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n AFFILIATE = \"affiliate\",\n CUSTOMER = \"customer\",\n EVENT = \"event\",\n PARTNER = \"partner\",\n SCHOOL = \"school\",\n SUPER_ADMIN = \"super_admin\",\n VENDOR = \"vendor\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n\nexport enum EnumEventDateStatus {\n STARTING_SOON = \"Starting_Soon\",\n STARTED = \"Started\",\n TODAY = \"Today\",\n TOMORROW = \"Tomorrow\",\n THIS_WEEK = \"This_Week\",\n NEXT_WEEK = \"Next_Week\",\n UPCOMING = \"Upcoming\",\n ENDED = \"Ended\",\n RE_SCHEDULED = \"Rescheduled\",\n CANCELED = \"Canceled\",\n INVALID = \"Invalid\",\n}\n\nexport enum EnumSubscriptionStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n CANCELLED = \"cancelled\",\n NO_SUBSCRIPTION = \"no_subscription\",\n PAST_DUE = \"past_due\",\n TRIALING = \"trialing\",\n}\n\nexport enum EnumBillingPeriod {\n MONTHLY_CANCEL_ANYTIME = \"monthly_cancel_anytime\",\n YEARLY_ANNUAL_BILLED = \"yearly_annual_billed\",\n}\n\nexport enum EnumReward {\n MYSTERY_JOY_BOX = \"mystery_joy_box\",\n MYSTERY_SQUEEZE_BOX = \"mystery_squeeze_box\",\n MYSTERY_DELUXE_BOX = \"mystery_deluxe_box\",\n}\n","import { EnumRegions } from \"../enums\";\nimport type { Region } from \"../types\";\n\nexport type RegionCenterType = Region & { region: EnumRegions };\n\n/**\n * New Zealand region centres used to derive the nearest region from a\n * location and to map a region selection to map coordinates.\n *\n * The final `EnumRegions.All` entry is the NZ-wide default.\n */\nexport const REGION_CENTERS: RegionCenterType[] = [\n {\n latitude: -36.8485,\n latitudeDelta: 2,\n longitude: 174.7633,\n longitudeDelta: 2,\n region: EnumRegions.Auckland,\n },\n {\n latitude: -38.1387,\n latitudeDelta: 2,\n longitude: 176.2452,\n longitudeDelta: 2,\n region: EnumRegions.BayOfPlentyGisborne,\n },\n {\n latitude: -43.5321,\n latitudeDelta: 2,\n longitude: 172.6362,\n longitudeDelta: 2,\n region: EnumRegions.CanterburyWestCoast,\n },\n {\n latitude: -39.4928,\n latitudeDelta: 2,\n longitude: 176.912,\n longitudeDelta: 2,\n region: EnumRegions.HawkesBay,\n },\n {\n latitude: -40.3523,\n latitudeDelta: 2,\n longitude: 175.6082,\n longitudeDelta: 2,\n region: EnumRegions.ManawatuWanganui,\n },\n {\n latitude: -41.2706,\n latitudeDelta: 2,\n longitude: 173.284,\n longitudeDelta: 2,\n region: EnumRegions.MarlboroughNelsonTasman,\n },\n {\n latitude: -35.7251,\n latitudeDelta: 2,\n longitude: 174.3237,\n longitudeDelta: 2,\n region: EnumRegions.Northland,\n },\n {\n latitude: -45.8788,\n latitudeDelta: 2,\n longitude: 170.5028,\n longitudeDelta: 2,\n region: EnumRegions.Otago,\n },\n {\n latitude: -46.4132,\n latitudeDelta: 2,\n longitude: 168.3538,\n longitudeDelta: 2,\n region: EnumRegions.Southland,\n },\n {\n latitude: -39.0556,\n latitudeDelta: 2,\n longitude: 174.0752,\n longitudeDelta: 2,\n region: EnumRegions.Taranaki,\n },\n {\n latitude: -37.787,\n latitudeDelta: 2,\n longitude: 175.2793,\n longitudeDelta: 2,\n region: EnumRegions.Waikato,\n },\n {\n latitude: -41.2866,\n latitudeDelta: 2,\n longitude: 174.7756,\n longitudeDelta: 2,\n region: EnumRegions.Wellington,\n },\n {\n latitude: -36.8624942, // Default: New Zealand\n latitudeDelta: 2,\n longitude: 174.7450494,\n longitudeDelta: 2,\n region: EnumRegions.All,\n },\n];\n\n/**\n * All selectable NZ regions, excluding the `All` pseudo-region.\n */\nexport const nzRegions = Object.values(EnumRegions).filter(\n (region) => region !== EnumRegions.All,\n);\n","import { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useAuthUser } from \"../auth/UserProvider\";\nimport { EnumRegions } from \"../enums\";\nimport { getDistanceInMeters } from \"../utils/distance\";\n\nimport { REGION_CENTERS, type RegionCenterType } from \"./constants\";\n\nexport interface IUseRegionSelectionReturn {\n derivedRegion: RegionCenterType;\n handleResetRegion: () => void;\n handleSelectRegion: (region: EnumRegions) => void;\n loading: boolean;\n selectedRegion: RegionCenterType;\n}\n\ntype DeriveRegionLocation = {\n latitude: number;\n longitude: number;\n};\n\nexport interface UseRegionSelectionStateArgs {\n location: DeriveRegionLocation | null | undefined;\n}\n\n// AUDIT-DECISION: Fail fast if REGION_CENTERS is empty. It is a compile-time\n// constant, so an empty array means the import is broken — an invariant beats\n// a silent undefined that surfaces as a crash three screens away.\nfunction getDefaultRegion(): RegionCenterType {\n const [first] = REGION_CENTERS;\n if (first === undefined) {\n throw new Error(\n \"[useRegionSelectionState] REGION_CENTERS is empty — check the import.\",\n );\n }\n return first;\n}\n\n// AUDIT-DECISION: Pure helper — no side effects, no hook calls.\n// Accepts nullable inputs so callers never need to guard before calling it.\nfunction deriveRegion(\n location: DeriveRegionLocation | null | undefined,\n preferredRegion: EnumRegions | null | undefined,\n): RegionCenterType {\n // 1. Location available — pick nearest valid region.\n if (location) {\n const { latitude, longitude } = location;\n const userCoords: [number, number] = [longitude, latitude];\n\n let nearestRegion: RegionCenterType = getDefaultRegion();\n let nearestDistance = Infinity;\n\n for (const region of REGION_CENTERS) {\n const regionCoords: [number, number] = [\n region.longitude,\n region.latitude,\n ];\n const distance = getDistanceInMeters(userCoords, regionCoords);\n\n // AUDIT-DECISION: Skip non-finite distances — getDistanceInMeters\n // returns Infinity for invalid coords. We do not want a bogus distance to\n // \"win\" the reduce by being the first candidate with the starting Infinity\n // baseline, which was the original bug.\n if (Number.isFinite(distance) && distance < nearestDistance) {\n nearestDistance = distance;\n nearestRegion = region;\n }\n }\n\n // AUDIT-DECISION: If every distance was non-finite (malformed location),\n // fall through to the preference path rather than returning REGION_CENTERS[0]\n // unconditionally. This keeps the fallback chain consistent.\n if (Number.isFinite(nearestDistance)) {\n return nearestRegion;\n }\n }\n\n // 2. No usable location — use the user's stored preference.\n if (preferredRegion) {\n const preferred = REGION_CENTERS.find((r) => r.region === preferredRegion);\n if (preferred) return preferred;\n }\n\n // 3. Last resort — first entry in the array.\n return getDefaultRegion();\n}\n\nexport function useRegionSelectionState({\n location,\n}: UseRegionSelectionStateArgs): IUseRegionSelectionReturn {\n const { authUser } = useAuthUser();\n\n const preferredRegion = authUser?.preferredRegion as\n EnumRegions | null | undefined;\n\n // AUDIT-DECISION: Derive the initial region synchronously so the very first\n // render never sees undefined. deriveRegion is cheap (O(n) array scan).\n const [selectedRegion, setSelectedRegion] = useState<RegionCenterType>(() =>\n deriveRegion(location, preferredRegion ?? null),\n );\n // AUDIT-DECISION: Track the auto-derived default separately from the user's\n // manual selection. derivedRegion always reflects deriveRegion(location,\n // preferredRegion) — nearest location → preferred region → first region — so\n // consumers can detect divergence from the default and reset back to it.\n const [derivedRegion, setDerivedRegion] = useState<RegionCenterType>(() =>\n deriveRegion(location, preferredRegion ?? null),\n );\n const [loading, setLoading] = useState<boolean>(false);\n const [hasManualSelection, setHasManualSelection] = useState<boolean>(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // AUDIT-DECISION: Reset manual selection when the authenticated user changes\n // so the auto-derive re-runs for the new identity. Keying on authUser?._id\n // (not the full object) avoids false resets on reference-stable re-renders.\n const prevUserIdRef = useRef<string | undefined>(authUser?._id);\n useEffect(() => {\n if (prevUserIdRef.current !== authUser?._id) {\n prevUserIdRef.current = authUser?._id;\n setHasManualSelection(false);\n }\n }, [authUser?._id]);\n\n // AUDIT-DECISION: Compute and apply the derived region in a single effect —\n // no intermediate memo. This removes the two-cycle race window where the\n // memoised value existed before the state write committed.\n useEffect(() => {\n const derived = deriveRegion(location, preferredRegion ?? null);\n setDerivedRegion(derived);\n\n if (hasManualSelection) return;\n setSelectedRegion(derived);\n }, [location, preferredRegion, hasManualSelection]);\n\n const handleSelectRegion = useCallback((region: EnumRegions) => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n }\n\n const regionCenter =\n REGION_CENTERS.find((r) => r.region === region) ?? getDefaultRegion();\n\n setLoading(true);\n setSelectedRegion(regionCenter);\n setHasManualSelection(true);\n\n timerRef.current = setTimeout(() => {\n setLoading(false);\n timerRef.current = null;\n }, 500);\n }, []);\n\n const handleResetRegion = useCallback(() => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n\n setLoading(false);\n const derived = deriveRegion(location, preferredRegion ?? null);\n setDerivedRegion(derived);\n setSelectedRegion(derived);\n setHasManualSelection(false);\n }, [location, preferredRegion]);\n\n // Cleanup on unmount.\n useEffect(() => {\n return () => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n }\n };\n }, []);\n\n return {\n derivedRegion,\n handleResetRegion,\n handleSelectRegion,\n loading,\n selectedRegion,\n };\n}\n\nexport default useRegionSelectionState;\n","/**\n * Shared React context for auth session state.\n *\n * Apps keep a thin local UserProvider that calls their platform `useAuth`\n * (adapters) and pass the result here as `value`. Import `useAuthUser` from\n * this module (or re-export it) so consumers share one context instance.\n *\n * `\"use client\"`: required for Next.js; ignored by React Native.\n */\n\"use client\";\n\nimport React, { createContext, useContext, type ReactNode } from \"react\";\n\nimport type { UseAuthReturnType } from \"./types\";\n\nconst UserContext = createContext<UseAuthReturnType | undefined>(undefined);\n\n/**\n * Provides auth session value from the app's thin useAuth wrapper.\n */\nexport const UserProvider: React.FC<{\n children: ReactNode;\n value: UseAuthReturnType;\n}> = ({ children, value }) => {\n return <UserContext.Provider value={value}>{children}</UserContext.Provider>;\n};\n\nexport const useAuthUser = (): UseAuthReturnType => {\n const context = useContext(UserContext);\n if (!context) {\n throw new Error(\"useAuthUser must be used within a UserProvider\");\n }\n return context;\n};\n","export function getDistanceInMeters(\n coordinates1: number[],\n coordinates2: number[],\n): number {\n const [lon1, lat1] = coordinates1;\n const [lon2, lat2] = coordinates2;\n\n const values = [lon1, lat1, lon2, lat2];\n if (values.some((v) => !Number.isFinite(v))) {\n return Infinity;\n }\n\n const toRadians = (deg: number) => (deg * Math.PI) / 180;\n const R = 6371000; // Earth radius in meters\n\n const dLat = toRadians(lat2 - lat1);\n const dLon = toRadians(lon2 - lon1);\n const radLat1 = toRadians(lat1);\n const radLat2 = toRadians(lat2);\n\n const a =\n Math.sin(dLat / 2) ** 2 +\n Math.sin(dLon / 2) ** 2 * Math.cos(radLat1) * Math.cos(radLat2);\n\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return R * c;\n}\n\nexport function getDistanceInKilometers(\n coordinates1: number[],\n coordinates2: number[],\n): number {\n const distanceInMeters = getDistanceInMeters(coordinates1, coordinates2);\n\n if (!Number.isFinite(distanceInMeters)) {\n return Infinity;\n }\n\n return Math.round(distanceInMeters / 1000);\n}\n\nexport function formatDistance(\n coordinates1: number[],\n coordinates2: number[],\n): string {\n const distanceInMeters = getDistanceInMeters(coordinates1, coordinates2);\n\n if (!Number.isFinite(distanceInMeters)) {\n return \"—\";\n }\n\n const roundedMeters = Math.round(distanceInMeters);\n\n if (roundedMeters < 1000) {\n return `${roundedMeters} m`;\n }\n\n return `${Math.round(roundedMeters / 1000)} km`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgLO,IAAK,cAAL,kBAAKA,iBAAL;AACL,EAAAA,aAAA,SAAM;AACN,EAAAA,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AC;AAG9B,+BAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,SAAS,SAAS;AACpB,qBAAa,SAAS,OAAO;AAAA,MAC/B;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["EnumRegions","import_react"]}
@@ -7,7 +7,7 @@ import {
7
7
  } from "../chunk-RE4NZPYY.mjs";
8
8
  import {
9
9
  EnumRegions
10
- } from "../chunk-YPWBK4WU.mjs";
10
+ } from "../chunk-Q2WLLXTA.mjs";
11
11
 
12
12
  // src/region/constants.ts
13
13
  var REGION_CENTERS = [
@@ -72,7 +72,7 @@ import {
72
72
  splitShareDescriptionSections,
73
73
  stripOverlaySubtitleSpecialChars
74
74
  } from "../chunk-MTBH5LMV.mjs";
75
- import "../chunk-YPWBK4WU.mjs";
75
+ import "../chunk-Q2WLLXTA.mjs";
76
76
  export {
77
77
  DEFAULT_SHARE_OG_IMAGE,
78
78
  OG_DESCRIPTION_LINE_BREAK,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/index.ts","../../src/types/auth.ts","../../src/types/global.ts","../../src/types/ad.ts","../../src/types/resourceActivities.ts","../../src/types/post.ts","../../src/types/game/index.ts","../../src/types/game/dailyClue.ts","../../src/types/game/global.ts","../../src/types/subscription.ts","../../src/types/affiliate.ts","../../src/types/coupon/index.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./event\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./vendor\";\nexport * from \"./user\";\nexport * from \"./ad\";\nexport * from \"./resourceActivities\";\nexport * from \"./partner\";\nexport * from \"./post\";\nexport * from \"./pushToken\";\nexport * from \"./appSettings\";\nexport * from \"./billingCatalog\";\nexport * from \"./googleImportedMarket\";\nexport * from \"./game\";\nexport * from \"./game/dailyClue\";\nexport * from \"./game/global\";\nexport * from \"./game/puzzleGame\";\nexport * from \"./school\";\nexport * from \"./subscription\";\nexport * from \"./affiliate\";\nexport * from \"./coupon\";\n","import {\n CreateFormData,\n EnumOSPlatform,\n EnumResourceType,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType, UserFormData } from \"./user\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = Pick<\n UserFormData,\n | \"email\"\n | \"firstName\"\n | \"lastName\"\n | \"nickName\"\n | \"platform\"\n | \"preferredRegion\"\n | \"termsAgreement\"\n> & {\n interests: EnumResourceType[];\n password: string;\n promoCode?: PromoCodeType | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n\nexport type AuthPayloadType = {\n refreshToken: string | null;\n token: string;\n user: SafeUserType;\n};\n\nexport type AuthMutationResponse = MutationResponse<AuthPayloadType>;\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n","import {\n Control,\n FieldValues,\n FormState,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumPartnerType,\n EnumRegions,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n EnumUserRole,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\nimport { EnumPostType } from \"./post\";\nimport { VendorType } from \"./vendor\";\n\nexport const PROMO_CODE_PREFIX = \"CM-\";\n\nexport type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\n/** Uniform mutation response envelope used across GraphQL mutations. */\nexport type MutationResponse<T> = {\n data: T | null;\n message: string | null;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: Date;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n active: boolean;\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type UserLicenceType = {\n expiryDate: Date;\n issuedDate: Date;\n licenceType: EnumUserLicence;\n prevLicenceType?: EnumUserLicence | null;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n contactDetails: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n promoCodes?: PromoCodeType[] | null;\n region: string;\n socialMedia: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type RelatedPostType = {\n postActive: boolean;\n postId: string;\n postSlug: string;\n postType: EnumPostType;\n};\n\nexport type SocialShareResourceType = {\n qrCode: ResourceImageType;\n socialImage: ResourceImageType;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n approvedAt?: Date | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n relatedPost?: RelatedPostType | null;\n reviewCount?: number | null;\n sharePublic?: SocialShareResourceType | null;\n slug: string;\n updatedAt: Date | null;\n};\n\nexport type LocationGeoType = {\n coordinates: number[]; // [longitude, latitude]\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type LocationType = {\n city: string;\n country: string;\n fullAddress: string;\n geo: LocationGeoType;\n latitude: number;\n longitude: number;\n region: string;\n};\n\nexport type DateTimeType = {\n dateStatus: EnumEventDateStatus;\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type DateTimeFormValue = {\n dateStatus: EnumEventDateStatus;\n endDate?: string;\n endTime?: string;\n startDate?: string;\n startTime?: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type ResourceDetails = {\n dateTime: DateTimeType[] | null;\n description: string | null;\n eventStatus?: EventStatusType | null;\n location: LocationType | null;\n resourceCover: ResourceImageType | null;\n resourceId: string;\n resourceLogo: ResourceImageType | null;\n resourceName: string;\n resourceType: EnumResourceType;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type EventStatusType = {\n claimed: boolean;\n eventType: EnumEventType;\n googlePlaceId?: string | null;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n required?: boolean;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport type CategoryColorType = {\n primary: string;\n secondary: string;\n};\n\nexport interface Category {\n color?: CategoryColorType | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventListItemType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: FormState<T>;\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n getValues: UseFormGetValues<T>;\n}\n\n/** Offset-pagination input for plain list fields (events/vendors/partners/posts/users). */\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n}\n\n/** Server-side filter input for the super-admin users list query. */\nexport interface UserListFilter {\n active?: boolean | null;\n hasLicences?: boolean | null;\n role?: EnumUserRole | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin partners list query. */\nexport interface PartnerListFilter {\n active?: boolean | null;\n partnerType?: EnumPartnerType | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin vendors list query. */\nexport interface VendorListFilter {\n active?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin events list query. */\nexport interface EventListFilter {\n active?: boolean | null;\n claimed?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin posts list query. */\nexport interface PostListFilter {\n active?: boolean | null;\n postType?: EnumPostType | null;\n search?: string | null;\n}\n\nexport interface UseGetResourcesByRegionOptions extends PaginationOptions {\n onlyClaimed?: boolean;\n skip?: boolean;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n MARKET_SEARCH = \"Market_search\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdPlatform {\n MOBILE = \"mobile\",\n WEB = \"web\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport enum EnumAdBookingSlotKind {\n PAID = \"paid\",\n RESERVED = \"reserved\",\n}\n\nexport enum EnumAdBookingState {\n HELD = \"held\",\n PENDING_APPROVAL = \"pending_approval\",\n APPROVED = \"approved\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n REJECTED = \"rejected\",\n}\n\nexport enum EnumAdPaymentStatus {\n PENDING = \"pending\",\n PAID = \"paid\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n}\n\nexport enum EnumAdEntitlementSource {\n PRO_PLUS = \"pro_plus\",\n ADMIN = \"admin\",\n ORGANIZER = \"organizer\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumAdApprovalStatus {\n PENDING = \"pending\",\n APPROVED = \"approved\",\n REJECTED = \"rejected\",\n}\n\nexport type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;\n\nexport type AdDailyPriceKey = \"front_page_day\" | \"market_search_day\";\n\nexport type AdResource = {\n adDescription: string;\n adImage: string;\n adStyle: EnumAdStyle;\n adTitle: string;\n adType: EnumAdType;\n resourceId: string;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n resourceSlug: string;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\n}\n\n// Form state matches the validation schema: all resource fields are present.\n// Use empty strings / explicit enum defaults in `defaultValues` for \"create\" flows.\nexport type AdFormState = AdFormData;\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\nexport type CreateAdFormState = CreateFormData<AdFormState>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n adminManaged?: boolean;\n approvalStatus?: EnumAdApprovalStatus;\n bookingIds?: string[];\n bookingKind?: EnumAdBookingSlotKind;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n paymentStatus?: EnumAdPaymentStatus;\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n\nexport type AdBookingType = {\n _id: string;\n adId?: string | null;\n approvalStatus: EnumAdApprovalStatus;\n checkoutAttemptId?: string | null;\n currency?: string | null;\n dayKey: string;\n entitlementClaimKey?: string | null;\n entitlementSource?: EnumAdEntitlementSource | null;\n expiresAt?: Date | null;\n placement: AdPlacement;\n purchaseKey?: string | null;\n region: string;\n resource: AdResource;\n slotKind: EnumAdBookingSlotKind;\n slotNumber: number;\n state: EnumAdBookingState;\n stripeCheckoutSessionId?: string | null;\n stripePaymentIntentId?: string | null;\n unitAmount?: number | null;\n userId: string;\n};\n\nexport type AdDailyPriceType = {\n _id: string;\n active: boolean;\n currency: \"nzd\";\n key: AdDailyPriceKey;\n revision: number;\n unitAmount: number;\n};\n\nexport type AdSettingsType = {\n _id: \"default\";\n approvalRequired: boolean;\n minAppearancesPerHour: number;\n paidSlotsPerPlacement: number;\n reservedSlotsPerPlacement: number;\n rotationSeconds: number;\n};\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\" | \"userId\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport {\n CreateFormData,\n ResourceImageType,\n SocialShareResourceType,\n} from \"./global\";\n\nexport enum EnumPostType {\n CLUE_BITES = \"clue_bites\",\n //CLUE_GUIDES_FOR_ORGANISERS = \"clue_guides_for_organisers\",\n //CLUE_GUIDES_FOR_VENDORS = \"clue_guides_for_vendors\",\n MARKET_FACES = \"market_faces\",\n PLAY_AND_WIN = \"play_and_win\",\n}\n\nexport enum EnumPostContentType {\n GAME = \"game\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentGame = {\n game: BaseGameType;\n};\n\nexport type PostContentData =\n | PostContentGame\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport type PostResource = {\n resourceSlug: string;\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: PostResource | null;\n tags?: string[] | null;\n title: string;\n notifyUsers?: boolean | null;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<\n PostFormData,\n \"content\" | \"coverUpload\" | \"resource\"\n> & {\n _id: string;\n approvedAt?: Date | null;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n resource?: PostResource | null;\n slug: string;\n sharePublic?: SocialShareResourceType | null;\n updatedAt: Date | null;\n};\n","import { OwnerType } from \"../global\";\n\nimport { DailyClueBaseGame, DailyClueGameData } from \"./dailyClue\";\nimport { EnumGameType, GameDate } from \"./global\";\nimport { PuzzleBaseGame, PuzzleGameData } from \"./puzzleGame\";\n\nexport type BaseGameMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueBaseGame;\n [EnumGameType.MINI_QUIZ]: PuzzleBaseGame;\n [EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;\n};\n\nexport type BaseGameType = {\n gameType: EnumGameType;\n gameTypeId: string;\n gameTitle: string;\n} & {\n [K in keyof BaseGameMap]?: BaseGameMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n /** Per-event delta. Not persisted for overallGamePoints (computed at read time). */\n pointsEarned: number;\n /** Running total for this game instance; computed at read time, not stored in Mongo. */\n overallGamePoints?: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n [EnumGameType.MINI_QUIZ]: PuzzleGameData;\n [EnumGameType.ODD_ONE_OUT]: PuzzleGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n nickName: string;\n overallPoints: number;\n userId: string;\n};\n","import { GameDate, GlobalGameData } from \"./global\";\n\nconst OBJECT_ID_PATH_SEGMENT = \"[a-f0-9]{24}\";\nconst OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;\n\nexport const gameScreenIdentifierList = [\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/chat\",\n },\n {\n clue: \"Where you can find your loyalties.\",\n id: \"coupons\",\n match: \"/profile/account/coupons\",\n },\n {\n clue: \"A single moment worth showing up for.\",\n id: \"single-event\",\n match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"What’s happening around you, right now.\",\n id: \"events-near-me\",\n match: \"/events/events-near-me\",\n },\n {\n clue: \"Where events appear as pins on a map.\",\n id: \"events-map\",\n match: \"/events/events-map\",\n },\n {\n clue: \"A collection of events worth attending.\",\n id: \"events\",\n match: \"/events\",\n },\n {\n clue: \"What’s happening in a wider area — not just nearby.\",\n id: \"events-region\",\n match: /^\\/events\\/region\\/[^/]+$/,\n },\n {\n clue: \"Where fun becomes a challenge.\",\n id: \"games\",\n match: \"/profile/account/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/home\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"An organisation or creator supporting the community.\",\n id: \"single-partner\",\n match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Organisations and creators supporting the community.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/account/favourites\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/account\",\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"Where you can redeem your rewards.\",\n id: \"rewards\",\n match: \"/profile/account/rewards\",\n },\n {\n clue: \"A single published post in full view.\",\n id: \"single-visitor-post\",\n match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"One stallholder offering something valuable.\",\n id: \"single-vendor\",\n match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Where every stallholder waits under the right category.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"Where you browse articles and posts from around the platform.\",\n id: \"visitors\",\n match: \"/visitors\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\n },\n] as const;\n\nexport type GamePlacement = (typeof gameScreenIdentifierList)[number][\"id\"];\nexport type GamePlacementClue =\n (typeof gameScreenIdentifierList)[number][\"clue\"];\n\nexport type DailyClueBaseGame = {\n gameDate: GameDate;\n gameSolution: string;\n};\n\nexport type DailyClueGameData = GlobalGameData & {\n gameFields: DailyClueBaseGame;\n lastFoundDate: Date | null;\n letterInfo: {\n collected: string[] | null; // The letters the user has found, e.g. [\"C\", \"L\", \"U\"]\n solutionShuffled: string[]; // The letters of the solution, but shuffled, e.g. [\"L\", \"C\", \"U\"]\n todaysClue: GamePlacementClue | null; // The clue for user to find the letter, e.g. related to {todaysPlacement}\n todaysLetter: string | null; // The letter the user has to find today, e.g. \"C\"\n todaysPlacement: GamePlacement | null; // The screen where the user has to find the clue, e.g. \"HomeScreen\"\n };\n};\n","export enum EnumGameType {\n DAILY_CLUE = \"dailyClue\",\n MINI_QUIZ = \"miniQuiz\",\n ODD_ONE_OUT = \"oddOneOut\",\n}\n\nexport type GameDate = {\n startDate: Date;\n endDate: Date;\n};\n\nexport const gameTypeToDisplayName: Record<EnumGameType, string> = {\n [EnumGameType.DAILY_CLUE]: \"Daily Clue\",\n [EnumGameType.MINI_QUIZ]: \"Mini Quiz\",\n [EnumGameType.ODD_ONE_OUT]: \"Odd One Out\",\n};\n\nexport type GlobalGameData = {\n points: number;\n // User has found the clue 3 days in a row, this is incrementing if the user finds the clue and decrements if user misses a day\n streak: number;\n};\n","import { EnumUserLicence } from \"../enums\";\n\n/** Tier keys in descending priority (highest first) for licence resolution. */\nexport const TIERS_BY_PRIORITY = [\"pro_plus\", \"pro\", \"standard\"] as const;\n\n/** Canonical subscription tier keys — matches Stripe/server tier identifiers. */\nexport type Tier = (typeof TIERS_BY_PRIORITY)[number];\n\n/** User-facing tier labels (decoupled from the Tier discriminant). */\nexport const TIER_DISPLAY_LABELS: Record<Tier, string> = {\n pro: \"Pro\",\n // eslint-disable-next-line camelcase\n pro_plus: \"Pro+ Ads\",\n standard: \"Standard\",\n};\n\n/** Maps licence enums to their canonical tier key. */\nexport const TIER_FROM_LICENCE: Record<EnumUserLicence, Tier> = {\n [EnumUserLicence.PRO_EVENT]: \"pro\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"pro_plus\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"pro_plus\",\n [EnumUserLicence.PRO_VENDOR]: \"pro\",\n [EnumUserLicence.STANDARD_EVENT]: \"standard\",\n [EnumUserLicence.STANDARD_PARTNER]: \"standard\",\n [EnumUserLicence.STANDARD_VENDOR]: \"standard\",\n [EnumUserLicence.STANDARD_AFFILIATE]: \"standard\",\n [EnumUserLicence.STANDARD_SCHOOL]: \"standard\",\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport {\n CreateFormData,\n LocationType,\n OwnerType,\n PromoCodeType,\n SocialMediaType,\n} from \"./global\";\nimport { UserFormData } from \"./user\";\n\nexport enum EnumAffiliateParticipantType {\n INDIVIDUAL = \"INDIVIDUAL\",\n SOLE_TRADER = \"SOLE_TRADER\",\n COMPANY = \"COMPANY\",\n}\n\nexport type AffiliateContactDetails = {\n mobilePhone: string;\n};\n\nexport type AffiliateBankAccountDetailsType = {\n accountHolderName: string;\n accountNumber: string;\n};\n\nexport type AffiliateUserDefaultFields = Pick<\n UserFormData,\n \"email\" | \"firstName\" | \"lastName\" | \"termsAgreement\"\n>;\n\nexport type AffiliateDetailsType = AffiliateUserDefaultFields & {\n bankAccountDetails: AffiliateBankAccountDetailsType;\n contactDetails: AffiliateContactDetails;\n irdNumber: string;\n location: LocationType;\n participantType: EnumAffiliateParticipantType;\n socialMedia: SocialMediaType[] | null;\n};\n\nexport enum EnumAffiliateRewardType {\n ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = \"ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS\",\n ACTIVE_VENDOR_BONUS_REWARD = \"ACTIVE_VENDOR_BONUS_REWARD\",\n ACTIVE_VENDOR_PRO_SUBSCRIPTION = \"ACTIVE_VENDOR_PRO_SUBSCRIPTION\",\n ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = \"ACTIVE_VENDOR_STANDARD_SUBSCRIPTION\",\n NEW_EVENT_REGISTRATION = \"NEW_EVENT_REGISTRATION\",\n NEW_VENDOR_REGISTRATION = \"NEW_VENDOR_REGISTRATION\",\n}\n\nexport type AffiliateRewardType = {\n createdAt: Date;\n redeemedAt: Date | null;\n rewardDescription: string;\n rewardType: EnumAffiliateRewardType;\n rewardValue: number;\n};\n\nexport type AffiliateResourceType = {\n resourceActive: boolean;\n resourceDeletedAt: Date | null;\n resourceId: string;\n resourceName: string;\n resourceOwner: OwnerType;\n resourceType: EnumResourceType;\n rewards: AffiliateRewardType[];\n};\n\nexport type RedeemHistoryType = {\n paidAt?: Date | null;\n redeemedAt: Date;\n rewardValue: number;\n};\n\nexport interface AffiliateType {\n _id: string;\n active: boolean;\n approvedAt?: Date | null;\n affiliateBonusRewards?: AffiliateRewardType[] | null;\n affiliateCode: PromoCodeType | null;\n affiliateDetails: AffiliateDetailsType | null;\n affiliateResources: AffiliateResourceType[];\n createdAt: Date;\n deletedAt: Date | null;\n overallPoints: number;\n owner: OwnerType;\n redeemHistory?: RedeemHistoryType[] | null;\n updatedAt: Date | null;\n}\n\nexport type AffiliateFormData = Omit<\n AffiliateDetailsType,\n \"email\" | \"firstName\" | \"lastName\"\n>;\n\nexport type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;\n","import { EnumResourceType } from \"../../enums\";\nimport { CreateFormData, OwnerType, ResourceImageType } from \"../global\";\nimport { VendorProductList } from \"../vendor\";\n\nexport type ProductCoupon = {\n couponDocumentId: string;\n couponId: string;\n};\n\nexport enum EnumCouponQualificationType {\n PURCHASE = \"PURCHASE\",\n MARKET_VISIT = \"MARKET_VISIT\",\n MARKET_PASSPORT = \"MARKET_PASSPORT\",\n}\n\nexport type CouponPurchaseOption = {\n buy: number;\n get: number;\n maxRewardCount: number;\n type: EnumCouponQualificationType.PURCHASE;\n unit: string;\n};\n\nexport type CouponMarketVisitOption = {\n type: EnumCouponQualificationType.MARKET_VISIT;\n visits: number;\n};\n\nexport type CouponMarketPassportOption = {\n type: EnumCouponQualificationType.MARKET_PASSPORT;\n visits: number;\n};\n\nexport type CouponOption =\n CouponPurchaseOption | CouponMarketVisitOption | CouponMarketPassportOption;\n\nexport type CouponVendorProduct = {\n couponId: string;\n productId: string;\n vendorId: string;\n\n // Required only for MARKET_PASSPORT: which Vendor coupon contributes\n // progress when scanned.\n vendorCouponId?: string | null;\n};\n\nexport type CouponDefaultsFormData = {\n couponDescription: string;\n couponOption: CouponOption | null;\n couponVendorProducts?: CouponVendorProduct[];\n endDate: Date;\n resourceId: string;\n resourceType: EnumResourceType;\n startDate: Date;\n};\n\nexport type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;\n\nexport type CouponParticipantUserType = {\n couponCollectedCount: number;\n couponRedeemedAt: Date | null;\n couponRedeemedCount: number;\n couponCycleRedeemed: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n userId: string;\n // Not persisted; resolved on read by `attachCouponDataProducts` from\n // `UserModel` via the participant's `userId`.\n nickName?: string | null;\n};\n\nexport type CouponCodeType = {\n code: string;\n qrCode: ResourceImageType;\n shareableQrCode: ResourceImageType;\n};\n\nexport type CouponDataProductsType = {\n active: boolean | null;\n couponId: string;\n productsList: VendorProductList[];\n vendorId: string;\n vendorLogo: ResourceImageType | null;\n vendorName: string;\n};\n\nexport type CouponDataType = CouponDefaultsFormData & {\n _id: string;\n active: boolean;\n couponCode: CouponCodeType | null;\n createdAt: Date;\n deletedAt: Date | null;\n participantUsers: CouponParticipantUserType[] | null;\n // products are not saved in the database, but are returned by the backend for convenience\n products?: CouponDataProductsType[] | null;\n updatedAt: Date | null;\n};\n\nexport interface CouponType {\n _id: string;\n active: boolean;\n couponData: CouponDataType[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n updatedAt: Date | null;\n}\n\nexport enum EnumCouponListType {\n ACTIVE = \"active\",\n OWNED = \"owned\",\n SCANNED = \"scanned\",\n}\n\nexport type CouponTypeList = {\n active: {\n data: CouponType[] | null;\n listName: EnumCouponListType.ACTIVE;\n };\n owned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.OWNED;\n };\n scanned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.SCANNED;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACeL,IAAM,oBAAoB;;;ACtB1B,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AALL,SAAAA;AAAA,GAAA;AAQL,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,SAAM;AAFI,SAAAA;AAAA,GAAA;AAKL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,wBAAL,kBAAKC,2BA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AAgC,GAAG;AAAA,EACnC,8BAA2B,GAAG;AAAA,EAC9B,sCAA+B,GAAG;AAAA,EAClC,0CAAiC,GAAG;AAAA,EACpC,wCAAgC,GAAG;AAAA,EACnC,8CAAmC,GAAG;AAAA,EACtC,wCAAgC,GAAG;AACrC;;;AChBO,IAAK,+BAAL,kBAAKC,kCAAL;AACL,EAAAA,8BAAA,gBAAa;AACb,EAAAA,8BAAA,iBAAc;AACd,EAAAA,8BAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AA6BL,IAAK,0BAAL,kBAAKC,6BAAL;AACL,EAAAA,yBAAA,4CAAyC;AACzC,EAAAA,yBAAA,gCAA6B;AAC7B,EAAAA,yBAAA,oCAAiC;AACjC,EAAAA,yBAAA,yCAAsC;AACtC,EAAAA,yBAAA,4BAAyB;AACzB,EAAAA,yBAAA,6BAA0B;AANhB,SAAAA;AAAA,GAAA;;;AC/BL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,cAAW;AACX,EAAAA,6BAAA,kBAAe;AACf,EAAAA,6BAAA,qBAAkB;AAHR,SAAAA;AAAA,GAAA;AAmGL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdPlatform","EnumAdStatus","EnumAdType","EnumAdStyle","EnumAdBookingSlotKind","EnumAdBookingState","EnumAdPaymentStatus","EnumAdEntitlementSource","EnumAdApprovalStatus","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
1
+ {"version":3,"sources":["../../src/types/index.ts","../../src/types/auth.ts","../../src/types/global.ts","../../src/types/ad.ts","../../src/types/resourceActivities.ts","../../src/types/post.ts","../../src/types/game/index.ts","../../src/types/game/dailyClue.ts","../../src/types/game/global.ts","../../src/types/subscription.ts","../../src/types/affiliate.ts","../../src/types/coupon/index.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./event\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./vendor\";\nexport * from \"./user\";\nexport * from \"./ad\";\nexport * from \"./resourceActivities\";\nexport * from \"./partner\";\nexport * from \"./post\";\nexport * from \"./pushToken\";\nexport * from \"./appSettings\";\nexport * from \"./billingCatalog\";\nexport * from \"./googleImportedMarket\";\nexport * from \"./game\";\nexport * from \"./game/dailyClue\";\nexport * from \"./game/global\";\nexport * from \"./game/puzzleGame\";\nexport * from \"./school\";\nexport * from \"./subscription\";\nexport * from \"./affiliate\";\nexport * from \"./coupon\";\n","import {\n CreateFormData,\n EnumOSPlatform,\n EnumResourceType,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType, UserFormData } from \"./user\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = Pick<\n UserFormData,\n | \"email\"\n | \"firstName\"\n | \"lastName\"\n | \"nickName\"\n | \"platform\"\n | \"preferredRegion\"\n | \"termsAgreement\"\n> & {\n interests: EnumResourceType[];\n password: string;\n promoCode?: PromoCodeType | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n\nexport type AuthPayloadType = {\n refreshToken: string | null;\n token: string;\n user: SafeUserType;\n};\n\nexport type AuthMutationResponse = MutationResponse<AuthPayloadType>;\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n\nexport type StartImpersonationPayloadType = {\n expiresAt: Date;\n refreshToken: string;\n sessionId: string;\n token: string;\n user: SafeUserType;\n};\n\nexport type StartImpersonationMutationResponse =\n MutationResponse<StartImpersonationPayloadType>;\n\nexport type RefreshImpersonationMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n","import {\n Control,\n FieldValues,\n FormState,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumPartnerType,\n EnumRegions,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n EnumUserRole,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\nimport { EnumPostType } from \"./post\";\nimport { VendorType } from \"./vendor\";\n\nexport const PROMO_CODE_PREFIX = \"CM-\";\n\nexport type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\n/** Uniform mutation response envelope used across GraphQL mutations. */\nexport type MutationResponse<T> = {\n data: T | null;\n message: string | null;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: Date;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n active: boolean;\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type UserLicenceType = {\n expiryDate: Date;\n issuedDate: Date;\n licenceType: EnumUserLicence;\n prevLicenceType?: EnumUserLicence | null;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n contactDetails: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n promoCodes?: PromoCodeType[] | null;\n region: string;\n socialMedia: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type RelatedPostType = {\n postActive: boolean;\n postId: string;\n postSlug: string;\n postType: EnumPostType;\n};\n\nexport type SocialShareResourceType = {\n qrCode: ResourceImageType;\n socialImage: ResourceImageType;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n approvedAt?: Date | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n relatedPost?: RelatedPostType | null;\n reviewCount?: number | null;\n sharePublic?: SocialShareResourceType | null;\n slug: string;\n updatedAt: Date | null;\n};\n\nexport type LocationGeoType = {\n coordinates: number[]; // [longitude, latitude]\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type LocationType = {\n city: string;\n country: string;\n fullAddress: string;\n geo: LocationGeoType;\n latitude: number;\n longitude: number;\n region: string;\n};\n\nexport type DateTimeType = {\n dateStatus: EnumEventDateStatus;\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type DateTimeFormValue = {\n dateStatus: EnumEventDateStatus;\n endDate?: string;\n endTime?: string;\n startDate?: string;\n startTime?: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type ResourceDetails = {\n dateTime: DateTimeType[] | null;\n description: string | null;\n eventStatus?: EventStatusType | null;\n location: LocationType | null;\n resourceCover: ResourceImageType | null;\n resourceId: string;\n resourceLogo: ResourceImageType | null;\n resourceName: string;\n resourceType: EnumResourceType;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type EventStatusType = {\n claimed: boolean;\n eventType: EnumEventType;\n googlePlaceId?: string | null;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n required?: boolean;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport type CategoryColorType = {\n primary: string;\n secondary: string;\n};\n\nexport interface Category {\n color?: CategoryColorType | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventListItemType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: FormState<T>;\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n getValues: UseFormGetValues<T>;\n}\n\n/** Offset-pagination input for plain list fields (events/vendors/partners/posts/users). */\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n}\n\n/** Server-side filter input for the super-admin users list query. */\nexport interface UserListFilter {\n active?: boolean | null;\n hasLicences?: boolean | null;\n role?: EnumUserRole | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin partners list query. */\nexport interface PartnerListFilter {\n active?: boolean | null;\n partnerType?: EnumPartnerType | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin vendors list query. */\nexport interface VendorListFilter {\n active?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin events list query. */\nexport interface EventListFilter {\n active?: boolean | null;\n claimed?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin posts list query. */\nexport interface PostListFilter {\n active?: boolean | null;\n postType?: EnumPostType | null;\n search?: string | null;\n}\n\nexport interface UseGetResourcesByRegionOptions extends PaginationOptions {\n onlyClaimed?: boolean;\n skip?: boolean;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n MARKET_SEARCH = \"Market_search\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdPlatform {\n MOBILE = \"mobile\",\n WEB = \"web\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport enum EnumAdBookingSlotKind {\n PAID = \"paid\",\n RESERVED = \"reserved\",\n}\n\nexport enum EnumAdBookingState {\n HELD = \"held\",\n PENDING_APPROVAL = \"pending_approval\",\n APPROVED = \"approved\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n REJECTED = \"rejected\",\n}\n\nexport enum EnumAdPaymentStatus {\n PENDING = \"pending\",\n PAID = \"paid\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n}\n\nexport enum EnumAdEntitlementSource {\n PRO_PLUS = \"pro_plus\",\n ADMIN = \"admin\",\n ORGANIZER = \"organizer\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumAdApprovalStatus {\n PENDING = \"pending\",\n APPROVED = \"approved\",\n REJECTED = \"rejected\",\n}\n\nexport type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;\n\nexport type AdDailyPriceKey = \"front_page_day\" | \"market_search_day\";\n\nexport type AdResource = {\n adDescription: string;\n adImage: string;\n adStyle: EnumAdStyle;\n adTitle: string;\n adType: EnumAdType;\n resourceId: string;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n resourceSlug: string;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\n}\n\n// Form state matches the validation schema: all resource fields are present.\n// Use empty strings / explicit enum defaults in `defaultValues` for \"create\" flows.\nexport type AdFormState = AdFormData;\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\nexport type CreateAdFormState = CreateFormData<AdFormState>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n adminManaged?: boolean;\n approvalStatus?: EnumAdApprovalStatus;\n bookingIds?: string[];\n bookingKind?: EnumAdBookingSlotKind;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n paymentStatus?: EnumAdPaymentStatus;\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n\nexport type AdBookingType = {\n _id: string;\n adId?: string | null;\n approvalStatus: EnumAdApprovalStatus;\n checkoutAttemptId?: string | null;\n currency?: string | null;\n dayKey: string;\n entitlementClaimKey?: string | null;\n entitlementSource?: EnumAdEntitlementSource | null;\n expiresAt?: Date | null;\n placement: AdPlacement;\n purchaseKey?: string | null;\n region: string;\n resource: AdResource;\n slotKind: EnumAdBookingSlotKind;\n slotNumber: number;\n state: EnumAdBookingState;\n stripeCheckoutSessionId?: string | null;\n stripePaymentIntentId?: string | null;\n unitAmount?: number | null;\n userId: string;\n};\n\nexport type AdDailyPriceType = {\n _id: string;\n active: boolean;\n currency: \"nzd\";\n key: AdDailyPriceKey;\n revision: number;\n unitAmount: number;\n};\n\nexport type AdSettingsType = {\n _id: \"default\";\n approvalRequired: boolean;\n minAppearancesPerHour: number;\n paidSlotsPerPlacement: number;\n reservedSlotsPerPlacement: number;\n rotationSeconds: number;\n};\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\" | \"userId\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport {\n CreateFormData,\n ResourceImageType,\n SocialShareResourceType,\n} from \"./global\";\n\nexport enum EnumPostType {\n CLUE_BITES = \"clue_bites\",\n //CLUE_GUIDES_FOR_ORGANISERS = \"clue_guides_for_organisers\",\n //CLUE_GUIDES_FOR_VENDORS = \"clue_guides_for_vendors\",\n MARKET_FACES = \"market_faces\",\n PLAY_AND_WIN = \"play_and_win\",\n}\n\nexport enum EnumPostContentType {\n GAME = \"game\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentGame = {\n game: BaseGameType;\n};\n\nexport type PostContentData =\n | PostContentGame\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport type PostResource = {\n resourceSlug: string;\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: PostResource | null;\n tags?: string[] | null;\n title: string;\n notifyUsers?: boolean | null;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<\n PostFormData,\n \"content\" | \"coverUpload\" | \"resource\"\n> & {\n _id: string;\n approvedAt?: Date | null;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n resource?: PostResource | null;\n slug: string;\n sharePublic?: SocialShareResourceType | null;\n updatedAt: Date | null;\n};\n","import { OwnerType } from \"../global\";\n\nimport { DailyClueBaseGame, DailyClueGameData } from \"./dailyClue\";\nimport { EnumGameType, GameDate } from \"./global\";\nimport { PuzzleBaseGame, PuzzleGameData } from \"./puzzleGame\";\n\nexport type BaseGameMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueBaseGame;\n [EnumGameType.MINI_QUIZ]: PuzzleBaseGame;\n [EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;\n};\n\nexport type BaseGameType = {\n gameType: EnumGameType;\n gameTypeId: string;\n gameTitle: string;\n} & {\n [K in keyof BaseGameMap]?: BaseGameMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n /** Per-event delta. Not persisted for overallGamePoints (computed at read time). */\n pointsEarned: number;\n /** Running total for this game instance; computed at read time, not stored in Mongo. */\n overallGamePoints?: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n [EnumGameType.MINI_QUIZ]: PuzzleGameData;\n [EnumGameType.ODD_ONE_OUT]: PuzzleGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n nickName: string;\n overallPoints: number;\n userId: string;\n};\n","import { GameDate, GlobalGameData } from \"./global\";\n\nconst OBJECT_ID_PATH_SEGMENT = \"[a-f0-9]{24}\";\nconst OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;\n\nexport const gameScreenIdentifierList = [\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/chat\",\n },\n {\n clue: \"Where you can find your loyalties.\",\n id: \"coupons\",\n match: \"/profile/account/coupons\",\n },\n {\n clue: \"A single moment worth showing up for.\",\n id: \"single-event\",\n match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"What’s happening around you, right now.\",\n id: \"events-near-me\",\n match: \"/events/events-near-me\",\n },\n {\n clue: \"Where events appear as pins on a map.\",\n id: \"events-map\",\n match: \"/events/events-map\",\n },\n {\n clue: \"A collection of events worth attending.\",\n id: \"events\",\n match: \"/events\",\n },\n {\n clue: \"What’s happening in a wider area — not just nearby.\",\n id: \"events-region\",\n match: /^\\/events\\/region\\/[^/]+$/,\n },\n {\n clue: \"Where fun becomes a challenge.\",\n id: \"games\",\n match: \"/profile/account/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/home\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"An organisation or creator supporting the community.\",\n id: \"single-partner\",\n match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Organisations and creators supporting the community.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/account/favourites\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/account\",\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"Where you can redeem your rewards.\",\n id: \"rewards\",\n match: \"/profile/account/rewards\",\n },\n {\n clue: \"A single published post in full view.\",\n id: \"single-visitor-post\",\n match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"One stallholder offering something valuable.\",\n id: \"single-vendor\",\n match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Where every stallholder waits under the right category.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"Where you browse articles and posts from around the platform.\",\n id: \"visitors\",\n match: \"/visitors\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\n },\n] as const;\n\nexport type GamePlacement = (typeof gameScreenIdentifierList)[number][\"id\"];\nexport type GamePlacementClue =\n (typeof gameScreenIdentifierList)[number][\"clue\"];\n\nexport type DailyClueBaseGame = {\n gameDate: GameDate;\n gameSolution: string;\n};\n\nexport type DailyClueGameData = GlobalGameData & {\n gameFields: DailyClueBaseGame;\n lastFoundDate: Date | null;\n letterInfo: {\n collected: string[] | null; // The letters the user has found, e.g. [\"C\", \"L\", \"U\"]\n solutionShuffled: string[]; // The letters of the solution, but shuffled, e.g. [\"L\", \"C\", \"U\"]\n todaysClue: GamePlacementClue | null; // The clue for user to find the letter, e.g. related to {todaysPlacement}\n todaysLetter: string | null; // The letter the user has to find today, e.g. \"C\"\n todaysPlacement: GamePlacement | null; // The screen where the user has to find the clue, e.g. \"HomeScreen\"\n };\n};\n","export enum EnumGameType {\n DAILY_CLUE = \"dailyClue\",\n MINI_QUIZ = \"miniQuiz\",\n ODD_ONE_OUT = \"oddOneOut\",\n}\n\nexport type GameDate = {\n startDate: Date;\n endDate: Date;\n};\n\nexport const gameTypeToDisplayName: Record<EnumGameType, string> = {\n [EnumGameType.DAILY_CLUE]: \"Daily Clue\",\n [EnumGameType.MINI_QUIZ]: \"Mini Quiz\",\n [EnumGameType.ODD_ONE_OUT]: \"Odd One Out\",\n};\n\nexport type GlobalGameData = {\n points: number;\n // User has found the clue 3 days in a row, this is incrementing if the user finds the clue and decrements if user misses a day\n streak: number;\n};\n","import { EnumUserLicence } from \"../enums\";\n\n/** Tier keys in descending priority (highest first) for licence resolution. */\nexport const TIERS_BY_PRIORITY = [\"pro_plus\", \"pro\", \"standard\"] as const;\n\n/** Canonical subscription tier keys — matches Stripe/server tier identifiers. */\nexport type Tier = (typeof TIERS_BY_PRIORITY)[number];\n\n/** User-facing tier labels (decoupled from the Tier discriminant). */\nexport const TIER_DISPLAY_LABELS: Record<Tier, string> = {\n pro: \"Pro\",\n // eslint-disable-next-line camelcase\n pro_plus: \"Pro+ Ads\",\n standard: \"Standard\",\n};\n\n/** Maps licence enums to their canonical tier key. */\nexport const TIER_FROM_LICENCE: Record<EnumUserLicence, Tier> = {\n [EnumUserLicence.PRO_EVENT]: \"pro\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"pro_plus\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"pro_plus\",\n [EnumUserLicence.PRO_VENDOR]: \"pro\",\n [EnumUserLicence.STANDARD_EVENT]: \"standard\",\n [EnumUserLicence.STANDARD_PARTNER]: \"standard\",\n [EnumUserLicence.STANDARD_VENDOR]: \"standard\",\n [EnumUserLicence.STANDARD_AFFILIATE]: \"standard\",\n [EnumUserLicence.STANDARD_SCHOOL]: \"standard\",\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport {\n CreateFormData,\n LocationType,\n OwnerType,\n PromoCodeType,\n SocialMediaType,\n} from \"./global\";\nimport { UserFormData } from \"./user\";\n\nexport enum EnumAffiliateParticipantType {\n INDIVIDUAL = \"INDIVIDUAL\",\n SOLE_TRADER = \"SOLE_TRADER\",\n COMPANY = \"COMPANY\",\n}\n\nexport type AffiliateContactDetails = {\n mobilePhone: string;\n};\n\nexport type AffiliateBankAccountDetailsType = {\n accountHolderName: string;\n accountNumber: string;\n};\n\nexport type AffiliateUserDefaultFields = Pick<\n UserFormData,\n \"email\" | \"firstName\" | \"lastName\" | \"termsAgreement\"\n>;\n\nexport type AffiliateDetailsType = AffiliateUserDefaultFields & {\n bankAccountDetails: AffiliateBankAccountDetailsType;\n contactDetails: AffiliateContactDetails;\n irdNumber: string;\n location: LocationType;\n participantType: EnumAffiliateParticipantType;\n socialMedia: SocialMediaType[] | null;\n};\n\nexport enum EnumAffiliateRewardType {\n ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = \"ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS\",\n ACTIVE_VENDOR_BONUS_REWARD = \"ACTIVE_VENDOR_BONUS_REWARD\",\n ACTIVE_VENDOR_PRO_SUBSCRIPTION = \"ACTIVE_VENDOR_PRO_SUBSCRIPTION\",\n ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = \"ACTIVE_VENDOR_STANDARD_SUBSCRIPTION\",\n NEW_EVENT_REGISTRATION = \"NEW_EVENT_REGISTRATION\",\n NEW_VENDOR_REGISTRATION = \"NEW_VENDOR_REGISTRATION\",\n}\n\nexport type AffiliateRewardType = {\n createdAt: Date;\n redeemedAt: Date | null;\n rewardDescription: string;\n rewardType: EnumAffiliateRewardType;\n rewardValue: number;\n};\n\nexport type AffiliateResourceType = {\n resourceActive: boolean;\n resourceDeletedAt: Date | null;\n resourceId: string;\n resourceName: string;\n resourceOwner: OwnerType;\n resourceType: EnumResourceType;\n rewards: AffiliateRewardType[];\n};\n\nexport type RedeemHistoryType = {\n paidAt?: Date | null;\n redeemedAt: Date;\n rewardValue: number;\n};\n\nexport interface AffiliateType {\n _id: string;\n active: boolean;\n approvedAt?: Date | null;\n affiliateBonusRewards?: AffiliateRewardType[] | null;\n affiliateCode: PromoCodeType | null;\n affiliateDetails: AffiliateDetailsType | null;\n affiliateResources: AffiliateResourceType[];\n createdAt: Date;\n deletedAt: Date | null;\n overallPoints: number;\n owner: OwnerType;\n redeemHistory?: RedeemHistoryType[] | null;\n updatedAt: Date | null;\n}\n\nexport type AffiliateFormData = Omit<\n AffiliateDetailsType,\n \"email\" | \"firstName\" | \"lastName\"\n>;\n\nexport type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;\n","import { EnumResourceType } from \"../../enums\";\nimport { CreateFormData, OwnerType, ResourceImageType } from \"../global\";\nimport { VendorProductList } from \"../vendor\";\n\nexport type ProductCoupon = {\n couponDocumentId: string;\n couponId: string;\n};\n\nexport enum EnumCouponQualificationType {\n PURCHASE = \"PURCHASE\",\n MARKET_VISIT = \"MARKET_VISIT\",\n MARKET_PASSPORT = \"MARKET_PASSPORT\",\n}\n\nexport type CouponPurchaseOption = {\n buy: number;\n get: number;\n maxRewardCount: number;\n type: EnumCouponQualificationType.PURCHASE;\n unit: string;\n};\n\nexport type CouponMarketVisitOption = {\n type: EnumCouponQualificationType.MARKET_VISIT;\n visits: number;\n};\n\nexport type CouponMarketPassportOption = {\n type: EnumCouponQualificationType.MARKET_PASSPORT;\n visits: number;\n};\n\nexport type CouponOption =\n CouponPurchaseOption | CouponMarketVisitOption | CouponMarketPassportOption;\n\nexport type CouponVendorProduct = {\n couponId: string;\n productId: string;\n vendorId: string;\n\n // Required only for MARKET_PASSPORT: which Vendor coupon contributes\n // progress when scanned.\n vendorCouponId?: string | null;\n};\n\nexport type CouponDefaultsFormData = {\n couponDescription: string;\n couponOption: CouponOption | null;\n couponVendorProducts?: CouponVendorProduct[];\n endDate: Date;\n resourceId: string;\n resourceType: EnumResourceType;\n startDate: Date;\n};\n\nexport type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;\n\nexport type CouponParticipantUserType = {\n couponCollectedCount: number;\n couponRedeemedAt: Date | null;\n couponRedeemedCount: number;\n couponCycleRedeemed: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n userId: string;\n // Not persisted; resolved on read by `attachCouponDataProducts` from\n // `UserModel` via the participant's `userId`.\n nickName?: string | null;\n};\n\nexport type CouponCodeType = {\n code: string;\n qrCode: ResourceImageType;\n shareableQrCode: ResourceImageType;\n};\n\nexport type CouponDataProductsType = {\n active: boolean | null;\n couponId: string;\n productsList: VendorProductList[];\n vendorId: string;\n vendorLogo: ResourceImageType | null;\n vendorName: string;\n};\n\nexport type CouponDataType = CouponDefaultsFormData & {\n _id: string;\n active: boolean;\n couponCode: CouponCodeType | null;\n createdAt: Date;\n deletedAt: Date | null;\n participantUsers: CouponParticipantUserType[] | null;\n // products are not saved in the database, but are returned by the backend for convenience\n products?: CouponDataProductsType[] | null;\n updatedAt: Date | null;\n};\n\nexport interface CouponType {\n _id: string;\n active: boolean;\n couponData: CouponDataType[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n updatedAt: Date | null;\n}\n\nexport enum EnumCouponListType {\n ACTIVE = \"active\",\n OWNED = \"owned\",\n SCANNED = \"scanned\",\n}\n\nexport type CouponTypeList = {\n active: {\n data: CouponType[] | null;\n listName: EnumCouponListType.ACTIVE;\n };\n owned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.OWNED;\n };\n scanned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.SCANNED;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACeL,IAAM,oBAAoB;;;ACtB1B,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa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BAAe;AACf,EAAAA,6BAAA,qBAAkB;AAHR,SAAAA;AAAA,GAAA;AAmGL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdPlatform","EnumAdStatus","EnumAdType","EnumAdStyle","EnumAdBookingSlotKind","EnumAdBookingState","EnumAdPaymentStatus","EnumAdEntitlementSource","EnumAdApprovalStatus","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
@@ -1,5 +1,5 @@
1
1
  export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-DUReu_jD.mjs';
2
- export { q as AdBookingType, r as AdDailyPriceKey, s as AdDailyPriceType, j as AdFormData, t as AdFormState, u as AdPlacement, v as AdResource, w as AdSettingsFormData, x as AdSettingsType, a as AdType, m as AppSettingsFormData, c as AppSettingsType, A as AuthMutationResponse, y as AuthPayloadType, z as CreateAdFormData, k as CreateAdFormState, n as CreateAppSettingsFormData, C as CreateLoginFormData, l as CreatePartnerFormData, e as CreateRegisterFormData, f as CreateRequestPasswordResetFormData, h as CreateResetPasswordFormData, p as CreateSchoolFormData, g as CreateValidateVerificationTokenFormData, B as EnumAdApprovalStatus, D as EnumAdBookingSlotKind, F as EnumAdBookingState, G as EnumAdEntitlementSource, H as EnumAdPaymentStatus, E as EnumAdPlatform, b as EnumAdShowOn, I as EnumAdStatus, J as EnumAdStyle, K as EnumAdType, L as EnumVerificationType, M as LoginFormData, N as MarketingMaterialRequestInputType, i as PartnerFormData, P as PartnerType, O as PosterInputType, R as RefreshTokenMutationResponse, Q as RefreshTokenPayloadType, T as RegisterFormData, U as RequestPasswordResetFormData, V as ResetPasswordFormData, W as SchoolCampaignType, o as SchoolFormData, X as SchoolRegisteredUserType, d as SchoolReturnType, S as SchoolType, Y as ValidateVerificationTokenFormData } from '../ad-BdPabW-h.mjs';
2
+ export { s as AdBookingType, t as AdDailyPriceKey, u as AdDailyPriceType, l as AdFormData, v as AdFormState, w as AdPlacement, x as AdResource, y as AdSettingsFormData, z as AdSettingsType, b as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, B as AuthPayloadType, D as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, F as EnumAdApprovalStatus, G as EnumAdBookingSlotKind, H as EnumAdBookingState, I as EnumAdEntitlementSource, J as EnumAdPaymentStatus, E as EnumAdPlatform, c as EnumAdShowOn, K as EnumAdStatus, L as EnumAdStyle, M as EnumAdType, N as EnumVerificationType, O as LoginFormData, Q as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, T as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, U as RefreshTokenPayloadType, V as RegisterFormData, W as RequestPasswordResetFormData, X as ResetPasswordFormData, Y as SchoolCampaignType, q as SchoolFormData, Z as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, _ as StartImpersonationPayloadType, $ as ValidateVerificationTokenFormData } from '../ad-XtBAH4rD.mjs';
3
3
  export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-CwHKoGEt.mjs';
4
4
  import { d as EventListItemType } from '../global-D1r5ZuQO.mjs';
5
5
  export { K as BaseGameMap, N as BaseGameType, Q as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, T as CouponCodeType, W as CouponDataProductsType, X as CouponDataType, H as CouponDefaultsFormData, Y as CouponMarketPassportOption, Z as CouponMarketVisitOption, _ as CouponOption, $ as CouponParticipantUserType, a0 as CouponPurchaseOption, o as CouponType, p as CouponTypeList, a1 as CouponVendorProduct, I as CreateCouponFormData, x as CreateEventFormData, z as CreateEventInfoFormData, a2 as CreateFormData, D as CreatePostFormData, v as CreateUnregisteredVendorFormData, r as CreateVendorFormData, t as CreateVendorInfoFormData, a3 as DailyClueBaseGame, a4 as DailyClueGameData, a5 as DateTimeFormValue, a6 as DateTimeType, a7 as DateTimeWithPriceFormValue, a8 as DateTimeWithPriceType, a9 as DeviceInfo, aa as EnumCouponListType, ab as EnumCouponQualificationType, ac as EnumGameStatus, ad as EnumGameType, ae as EnumPostContentType, af as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ag as EventListFilter, ah as EventStatusType, E as EventType, a as FormDateField, F as FormField, ai as GameDate, G as GameDocType, aj as GameHistory, n as GameLeaderboard, ak as GamePlacement, al as GamePlacementClue, am as GameType, an as GeocodeLocation, ao as GlobalGameData, ap as ImageObjectType, aq as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ar as Nullable, O as OptionItem, as as OwnerType, at as PROMO_CODE_PREFIX, au as PaginationOptions, av as PartnerListFilter, aw as PaymentInfoType, ax as PostContentData, ay as PostContentFormData, az as PostContentGame, aA as PostContentImage, aB as PostContentList, aC as PostContentTextarea, aD as PostContentType, aE as PostContentVideo, aF as PostFileInput, A as PostFormData, aG as PostListFilter, aH as PostResource, m as PostType, P as PosterUsageType, aI as ProductCoupon, aJ as PromoCodeType, aK as PuzzleAnswer, aL as PuzzleAnsweredQuestion, aM as PuzzleBaseGame, aN as PuzzleGameData, aO as PuzzleQuestion, R as RefundPolicy, J as Region, aP as RelatedPostType, aQ as RelationDate, aR as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aS as ResourceContactDetailsType, aT as ResourceDetails, aU as ResourceImageType, aV as ResourceRelationField, aW as SocialMediaType, aX as SocialShareResourceType, S as StallType, aY as Subcategory, aZ as SubcategoryItems, a_ as TermsAgreement, u as UnregisteredVendorFormData, a$ as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, b0 as UserListFilter, b1 as VendorAttributes, b2 as VendorAvailability, b3 as VendorCalendarData, V as VendorClaimTokenValidation, b4 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b5 as VendorListFilter, b6 as VendorProductList, i as VendorType, b7 as gameScreenIdentifierList, b8 as gameTypeToDisplayName } from '../global-D1r5ZuQO.mjs';
@@ -1,5 +1,5 @@
1
1
  export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-Uz9uavhK.js';
2
- export { q as AdBookingType, r as AdDailyPriceKey, s as AdDailyPriceType, j as AdFormData, t as AdFormState, u as AdPlacement, v as AdResource, w as AdSettingsFormData, x as AdSettingsType, a as AdType, m as AppSettingsFormData, c as AppSettingsType, A as AuthMutationResponse, y as AuthPayloadType, z as CreateAdFormData, k as CreateAdFormState, n as CreateAppSettingsFormData, C as CreateLoginFormData, l as CreatePartnerFormData, e as CreateRegisterFormData, f as CreateRequestPasswordResetFormData, h as CreateResetPasswordFormData, p as CreateSchoolFormData, g as CreateValidateVerificationTokenFormData, B as EnumAdApprovalStatus, D as EnumAdBookingSlotKind, F as EnumAdBookingState, G as EnumAdEntitlementSource, H as EnumAdPaymentStatus, E as EnumAdPlatform, b as EnumAdShowOn, I as EnumAdStatus, J as EnumAdStyle, K as EnumAdType, L as EnumVerificationType, M as LoginFormData, N as MarketingMaterialRequestInputType, i as PartnerFormData, P as PartnerType, O as PosterInputType, R as RefreshTokenMutationResponse, Q as RefreshTokenPayloadType, T as RegisterFormData, U as RequestPasswordResetFormData, V as ResetPasswordFormData, W as SchoolCampaignType, o as SchoolFormData, X as SchoolRegisteredUserType, d as SchoolReturnType, S as SchoolType, Y as ValidateVerificationTokenFormData } from '../ad-Ogzb0O0U.js';
2
+ export { s as AdBookingType, t as AdDailyPriceKey, u as AdDailyPriceType, l as AdFormData, v as AdFormState, w as AdPlacement, x as AdResource, y as AdSettingsFormData, z as AdSettingsType, b as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, B as AuthPayloadType, D as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, F as EnumAdApprovalStatus, G as EnumAdBookingSlotKind, H as EnumAdBookingState, I as EnumAdEntitlementSource, J as EnumAdPaymentStatus, E as EnumAdPlatform, c as EnumAdShowOn, K as EnumAdStatus, L as EnumAdStyle, M as EnumAdType, N as EnumVerificationType, O as LoginFormData, Q as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, T as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, U as RefreshTokenPayloadType, V as RegisterFormData, W as RequestPasswordResetFormData, X as ResetPasswordFormData, Y as SchoolCampaignType, q as SchoolFormData, Z as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, _ as StartImpersonationPayloadType, $ as ValidateVerificationTokenFormData } from '../ad-C4L_-r-4.js';
3
3
  export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-CR-nghbk.js';
4
4
  import { d as EventListItemType } from '../global-B4mmQo6R.js';
5
5
  export { K as BaseGameMap, N as BaseGameType, Q as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, T as CouponCodeType, W as CouponDataProductsType, X as CouponDataType, H as CouponDefaultsFormData, Y as CouponMarketPassportOption, Z as CouponMarketVisitOption, _ as CouponOption, $ as CouponParticipantUserType, a0 as CouponPurchaseOption, o as CouponType, p as CouponTypeList, a1 as CouponVendorProduct, I as CreateCouponFormData, x as CreateEventFormData, z as CreateEventInfoFormData, a2 as CreateFormData, D as CreatePostFormData, v as CreateUnregisteredVendorFormData, r as CreateVendorFormData, t as CreateVendorInfoFormData, a3 as DailyClueBaseGame, a4 as DailyClueGameData, a5 as DateTimeFormValue, a6 as DateTimeType, a7 as DateTimeWithPriceFormValue, a8 as DateTimeWithPriceType, a9 as DeviceInfo, aa as EnumCouponListType, ab as EnumCouponQualificationType, ac as EnumGameStatus, ad as EnumGameType, ae as EnumPostContentType, af as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ag as EventListFilter, ah as EventStatusType, E as EventType, a as FormDateField, F as FormField, ai as GameDate, G as GameDocType, aj as GameHistory, n as GameLeaderboard, ak as GamePlacement, al as GamePlacementClue, am as GameType, an as GeocodeLocation, ao as GlobalGameData, ap as ImageObjectType, aq as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ar as Nullable, O as OptionItem, as as OwnerType, at as PROMO_CODE_PREFIX, au as PaginationOptions, av as PartnerListFilter, aw as PaymentInfoType, ax as PostContentData, ay as PostContentFormData, az as PostContentGame, aA as PostContentImage, aB as PostContentList, aC as PostContentTextarea, aD as PostContentType, aE as PostContentVideo, aF as PostFileInput, A as PostFormData, aG as PostListFilter, aH as PostResource, m as PostType, P as PosterUsageType, aI as ProductCoupon, aJ as PromoCodeType, aK as PuzzleAnswer, aL as PuzzleAnsweredQuestion, aM as PuzzleBaseGame, aN as PuzzleGameData, aO as PuzzleQuestion, R as RefundPolicy, J as Region, aP as RelatedPostType, aQ as RelationDate, aR as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aS as ResourceContactDetailsType, aT as ResourceDetails, aU as ResourceImageType, aV as ResourceRelationField, aW as SocialMediaType, aX as SocialShareResourceType, S as StallType, aY as Subcategory, aZ as SubcategoryItems, a_ as TermsAgreement, u as UnregisteredVendorFormData, a$ as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, b0 as UserListFilter, b1 as VendorAttributes, b2 as VendorAvailability, b3 as VendorCalendarData, V as VendorClaimTokenValidation, b4 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b5 as VendorListFilter, b6 as VendorProductList, i as VendorType, b7 as gameScreenIdentifierList, b8 as gameTypeToDisplayName } from '../global-B4mmQo6R.js';
@@ -22,13 +22,13 @@ import {
22
22
  PROMO_CODE_PREFIX,
23
23
  gameScreenIdentifierList,
24
24
  gameTypeToDisplayName
25
- } from "../chunk-MRBTCICB.mjs";
25
+ } from "../chunk-FWKZZMQR.mjs";
26
26
  import {
27
27
  TIERS_BY_PRIORITY,
28
28
  TIER_DISPLAY_LABELS,
29
29
  TIER_FROM_LICENCE
30
30
  } from "../chunk-DQ7ZHIXW.mjs";
31
- import "../chunk-YPWBK4WU.mjs";
31
+ import "../chunk-Q2WLLXTA.mjs";
32
32
  export {
33
33
  EnumActivity,
34
34
  EnumAdApprovalStatus,