@timardex/cluemart-shared 2.0.18 → 2.1.0

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 (62) hide show
  1. package/dist/{ad-ZwLtQn9a.d.ts → ad-CUckkB7I.d.ts} +2 -2
  2. package/dist/{ad-xO8ltnGA.d.mts → ad-sqc3JME-.d.mts} +2 -2
  3. package/dist/{affiliate-Bv4PXBXC.d.mts → affiliate-7SDCo04C.d.mts} +2 -2
  4. package/dist/{affiliate-xDFlLdJI.d.ts → affiliate-C03r7ssL.d.ts} +2 -2
  5. package/dist/auth/index.d.mts +3 -3
  6. package/dist/auth/index.d.ts +3 -3
  7. package/dist/auth/index.mjs +4 -15
  8. package/dist/auth/index.mjs.map +1 -1
  9. package/dist/chunk-N46DFZ3R.mjs +20 -0
  10. package/dist/chunk-N46DFZ3R.mjs.map +1 -0
  11. package/dist/{chunk-JESR7H4R.mjs → chunk-PIEXGXTD.mjs} +1 -1
  12. package/dist/chunk-PIEXGXTD.mjs.map +1 -0
  13. package/dist/chunk-RE4NZPYY.mjs +43 -0
  14. package/dist/chunk-RE4NZPYY.mjs.map +1 -0
  15. package/dist/{chunk-5G3MQXQX.mjs → chunk-YPT2VOTM.mjs} +2 -2
  16. package/dist/{contactUs-DtKFwekV.d.ts → contactUs-BG3sJ6gc.d.ts} +1 -1
  17. package/dist/{contactUs-0IhAsiDW.d.mts → contactUs-CWFP59_0.d.mts} +1 -1
  18. package/dist/formFields/index.cjs.map +1 -1
  19. package/dist/formFields/index.d.mts +1 -1
  20. package/dist/formFields/index.d.ts +1 -1
  21. package/dist/formFields/index.mjs +3 -2
  22. package/dist/{global-C6w0hQ5Y.d.mts → global-BqeTWrvk.d.ts} +4 -1
  23. package/dist/{global-Coz5Jgi2.d.ts → global-CWo-hWKZ.d.mts} +4 -1
  24. package/dist/graphql/index.d.mts +5 -5
  25. package/dist/graphql/index.d.ts +5 -5
  26. package/dist/hooks/index.cjs.map +1 -1
  27. package/dist/hooks/index.d.mts +5 -5
  28. package/dist/hooks/index.d.ts +5 -5
  29. package/dist/hooks/index.mjs +3 -2
  30. package/dist/hooks/index.mjs.map +1 -1
  31. package/dist/index.cjs +43 -0
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.mts +8 -1
  34. package/dist/index.d.ts +8 -1
  35. package/dist/index.mjs +40 -0
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/map/index.d.mts +1 -1
  38. package/dist/map/index.d.ts +1 -1
  39. package/dist/region/index.cjs +290 -0
  40. package/dist/region/index.cjs.map +1 -0
  41. package/dist/region/index.d.mts +36 -0
  42. package/dist/region/index.d.ts +36 -0
  43. package/dist/region/index.mjs +220 -0
  44. package/dist/region/index.mjs.map +1 -0
  45. package/dist/{resourceActivities-DScv6fiM.d.ts → resourceActivities-BbhGFtZA.d.ts} +1 -1
  46. package/dist/{resourceActivities-DIK3bwZg.d.mts → resourceActivities-D81u7Mu0.d.mts} +1 -1
  47. package/dist/sharing/index.d.mts +1 -1
  48. package/dist/sharing/index.d.ts +1 -1
  49. package/dist/types/index.cjs.map +1 -1
  50. package/dist/types/index.d.mts +7 -7
  51. package/dist/types/index.d.ts +7 -7
  52. package/dist/types/index.mjs +1 -1
  53. package/dist/{user-DhxdbFT7.d.ts → user-2peJoOeK.d.ts} +1 -1
  54. package/dist/{user-BwcVKK-h.d.mts → user-DKcyf8gn.d.mts} +1 -1
  55. package/dist/utils/index.cjs +43 -0
  56. package/dist/utils/index.cjs.map +1 -1
  57. package/dist/utils/index.d.mts +8 -4
  58. package/dist/utils/index.d.ts +8 -4
  59. package/dist/utils/index.mjs +10 -2
  60. package/package.json +6 -1
  61. package/dist/chunk-JESR7H4R.mjs.map +0 -1
  62. /package/dist/{chunk-5G3MQXQX.mjs.map → chunk-YPT2VOTM.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/region/constants.ts","../../src/region/useRegionSelectionState.ts"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;AAWO,IAAM,iBAAqC;AAAA,EAChD;AAAA,IACE,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,gBAAgB;AAAA,IACh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NotificationResourceType, EnumEventDateStatus, EnumOSPlatform } from './enums/index.js';
2
- import { ao as LocationGeoType } from './global-Coz5Jgi2.js';
2
+ import { ao as LocationGeoType } from './global-BqeTWrvk.js';
3
3
 
4
4
  interface AdminUpdateResourceType {
5
5
  active: boolean;
@@ -1,5 +1,5 @@
1
1
  import { EnumResourceType, EnumChatType, EnumChatReportReason, EnumNotificationType, EnumNotificationResourceType, EnumEventDateStatus, EnumOSPlatform } from './enums/index.mjs';
2
- import { ao as LocationGeoType } from './global-C6w0hQ5Y.mjs';
2
+ import { ao as LocationGeoType } from './global-CWo-hWKZ.mjs';
3
3
 
4
4
  interface AdminUpdateResourceType {
5
5
  active: boolean;
@@ -1,4 +1,4 @@
1
- import { E as EventType, y as EventInfoFormData, i as VendorType, s as VendorInfoFormData, S as StallType, C as Category } from '../global-C6w0hQ5Y.mjs';
1
+ import { E as EventType, y as EventInfoFormData, i as VendorType, s as VendorInfoFormData, S as StallType, C as Category } from '../global-CWo-hWKZ.mjs';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { E as EventType, y as EventInfoFormData, i as VendorType, s as VendorInfoFormData, S as StallType, C as Category } from '../global-Coz5Jgi2.js';
1
+ import { E as EventType, y as EventInfoFormData, i as VendorType, s as VendorInfoFormData, S as StallType, C as Category } from '../global-BqeTWrvk.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -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 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 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 search?: string | null;\n}\n\n/** Server-side filter input for the admin vendors list query. */\nexport interface VendorListFilter {\n active?: boolean | 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 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;;;ACcL,IAAM,oBAAoB;;;ACrB1B,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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BAAmD;AAAA,EAC9D,4BAA0B,GAAG;AAAA,EAC7B,sCAA+B,GAAG;AAAA,EAClC,wCAAgC,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","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 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;AAA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ificationType","EnumAdShowOn","EnumAdPlatform","EnumAdStatus","EnumAdType","EnumAdStyle","EnumAdBookingSlotKind","EnumAdBookingState","EnumAdPaymentStatus","EnumAdEntitlementSource","EnumAdApprovalStatus","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
@@ -1,13 +1,13 @@
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-DIK3bwZg.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-xO8ltnGA.mjs';
3
- export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-0IhAsiDW.mjs';
4
- import { d as EventListItemType } from '../global-C6w0hQ5Y.mjs';
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 DateTimeType, a6 as DateTimeWithPriceType, a7 as DeviceInfo, a8 as EnumCouponListType, a9 as EnumCouponQualificationType, aa as EnumGameStatus, ab as EnumGameType, ac as EnumPostContentType, ad as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ae as EventListFilter, af as EventStatusType, E as EventType, a as FormDateField, F as FormField, ag as GameDate, G as GameDocType, ah as GameHistory, n as GameLeaderboard, ai as GamePlacement, aj as GamePlacementClue, ak as GameType, al as GeocodeLocation, am as GlobalGameData, an as ImageObjectType, ao as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ap as Nullable, O as OptionItem, aq as OwnerType, ar as PROMO_CODE_PREFIX, as as PaginationOptions, at as PartnerListFilter, au as PaymentInfoType, av as PostContentData, aw as PostContentFormData, ax as PostContentGame, ay as PostContentImage, az as PostContentList, aA as PostContentTextarea, aB as PostContentType, aC as PostContentVideo, aD as PostFileInput, A as PostFormData, aE as PostListFilter, aF as PostResource, m as PostType, P as PosterUsageType, aG as ProductCoupon, aH as PromoCodeType, aI as PuzzleAnswer, aJ as PuzzleAnsweredQuestion, aK as PuzzleBaseGame, aL as PuzzleGameData, aM as PuzzleQuestion, R as RefundPolicy, J as Region, aN as RelatedPostType, aO as RelationDate, aP as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aQ as ResourceContactDetailsType, aR as ResourceDetails, aS as ResourceImageType, aT as SocialMediaType, aU as SocialShareResourceType, S as StallType, aV as Subcategory, aW as SubcategoryItems, aX as TermsAgreement, u as UnregisteredVendorFormData, aY as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, aZ as UserListFilter, a_ as VendorAttributes, a$ as VendorAvailability, b0 as VendorCalendarData, V as VendorClaimTokenValidation, b1 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b2 as VendorListFilter, b3 as VendorProductList, i as VendorType, b4 as gameScreenIdentifierList, b5 as gameTypeToDisplayName } from '../global-C6w0hQ5Y.mjs';
6
- export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserType, U as UsersByPromoCode } from '../user-BwcVKK-h.mjs';
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-D81u7Mu0.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-sqc3JME-.mjs';
3
+ export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-CWFP59_0.mjs';
4
+ import { d as EventListItemType } from '../global-CWo-hWKZ.mjs';
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 DateTimeType, a6 as DateTimeWithPriceType, a7 as DeviceInfo, a8 as EnumCouponListType, a9 as EnumCouponQualificationType, aa as EnumGameStatus, ab as EnumGameType, ac as EnumPostContentType, ad as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ae as EventListFilter, af as EventStatusType, E as EventType, a as FormDateField, F as FormField, ag as GameDate, G as GameDocType, ah as GameHistory, n as GameLeaderboard, ai as GamePlacement, aj as GamePlacementClue, ak as GameType, al as GeocodeLocation, am as GlobalGameData, an as ImageObjectType, ao as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ap as Nullable, O as OptionItem, aq as OwnerType, ar as PROMO_CODE_PREFIX, as as PaginationOptions, at as PartnerListFilter, au as PaymentInfoType, av as PostContentData, aw as PostContentFormData, ax as PostContentGame, ay as PostContentImage, az as PostContentList, aA as PostContentTextarea, aB as PostContentType, aC as PostContentVideo, aD as PostFileInput, A as PostFormData, aE as PostListFilter, aF as PostResource, m as PostType, P as PosterUsageType, aG as ProductCoupon, aH as PromoCodeType, aI as PuzzleAnswer, aJ as PuzzleAnsweredQuestion, aK as PuzzleBaseGame, aL as PuzzleGameData, aM as PuzzleQuestion, R as RefundPolicy, J as Region, aN as RelatedPostType, aO as RelationDate, aP as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aQ as ResourceContactDetailsType, aR as ResourceDetails, aS as ResourceImageType, aT as SocialMediaType, aU as SocialShareResourceType, S as StallType, aV as Subcategory, aW as SubcategoryItems, aX as TermsAgreement, u as UnregisteredVendorFormData, aY as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, aZ as UserListFilter, a_ as VendorAttributes, a$ as VendorAvailability, b0 as VendorCalendarData, V as VendorClaimTokenValidation, b1 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b2 as VendorListFilter, b3 as VendorProductList, i as VendorType, b4 as gameScreenIdentifierList, b5 as gameTypeToDisplayName } from '../global-CWo-hWKZ.mjs';
6
+ export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserType, U as UsersByPromoCode } from '../user-DKcyf8gn.mjs';
7
7
  import { EnumOSPlatform } from '../enums/index.mjs';
8
8
  export { a as BillingCatalogDefinition, B as BillingCatalogEntryType, b as BillingCatalogInitialEntry, c as BillingCatalogKey, d as BillingCatalogPriceHistoryEntry, P as PaidVendorBillingPeriod, e as PaidVendorLicence, S as SyncBillingCatalogPriceInput, U as UpdateBillingCatalogPriceInput } from '../billingCatalog-DDAU9BWV.mjs';
9
9
  export { a as TIERS_BY_PRIORITY, b as TIER_DISPLAY_LABELS, c as TIER_FROM_LICENCE, T as Tier } from '../subscription-bmAdrnfi.mjs';
10
- export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-Bv4PXBXC.mjs';
10
+ export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-7SDCo04C.mjs';
11
11
  import '../images/index.mjs';
12
12
  import 'react-hook-form';
13
13
 
@@ -1,13 +1,13 @@
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-DScv6fiM.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-ZwLtQn9a.js';
3
- export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-DtKFwekV.js';
4
- import { d as EventListItemType } from '../global-Coz5Jgi2.js';
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 DateTimeType, a6 as DateTimeWithPriceType, a7 as DeviceInfo, a8 as EnumCouponListType, a9 as EnumCouponQualificationType, aa as EnumGameStatus, ab as EnumGameType, ac as EnumPostContentType, ad as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ae as EventListFilter, af as EventStatusType, E as EventType, a as FormDateField, F as FormField, ag as GameDate, G as GameDocType, ah as GameHistory, n as GameLeaderboard, ai as GamePlacement, aj as GamePlacementClue, ak as GameType, al as GeocodeLocation, am as GlobalGameData, an as ImageObjectType, ao as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ap as Nullable, O as OptionItem, aq as OwnerType, ar as PROMO_CODE_PREFIX, as as PaginationOptions, at as PartnerListFilter, au as PaymentInfoType, av as PostContentData, aw as PostContentFormData, ax as PostContentGame, ay as PostContentImage, az as PostContentList, aA as PostContentTextarea, aB as PostContentType, aC as PostContentVideo, aD as PostFileInput, A as PostFormData, aE as PostListFilter, aF as PostResource, m as PostType, P as PosterUsageType, aG as ProductCoupon, aH as PromoCodeType, aI as PuzzleAnswer, aJ as PuzzleAnsweredQuestion, aK as PuzzleBaseGame, aL as PuzzleGameData, aM as PuzzleQuestion, R as RefundPolicy, J as Region, aN as RelatedPostType, aO as RelationDate, aP as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aQ as ResourceContactDetailsType, aR as ResourceDetails, aS as ResourceImageType, aT as SocialMediaType, aU as SocialShareResourceType, S as StallType, aV as Subcategory, aW as SubcategoryItems, aX as TermsAgreement, u as UnregisteredVendorFormData, aY as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, aZ as UserListFilter, a_ as VendorAttributes, a$ as VendorAvailability, b0 as VendorCalendarData, V as VendorClaimTokenValidation, b1 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b2 as VendorListFilter, b3 as VendorProductList, i as VendorType, b4 as gameScreenIdentifierList, b5 as gameTypeToDisplayName } from '../global-Coz5Jgi2.js';
6
- export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserType, U as UsersByPromoCode } from '../user-DhxdbFT7.js';
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-BbhGFtZA.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-CUckkB7I.js';
3
+ export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-BG3sJ6gc.js';
4
+ import { d as EventListItemType } from '../global-BqeTWrvk.js';
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 DateTimeType, a6 as DateTimeWithPriceType, a7 as DeviceInfo, a8 as EnumCouponListType, a9 as EnumCouponQualificationType, aa as EnumGameStatus, ab as EnumGameType, ac as EnumPostContentType, ad as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ae as EventListFilter, af as EventStatusType, E as EventType, a as FormDateField, F as FormField, ag as GameDate, G as GameDocType, ah as GameHistory, n as GameLeaderboard, ai as GamePlacement, aj as GamePlacementClue, ak as GameType, al as GeocodeLocation, am as GlobalGameData, an as ImageObjectType, ao as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ap as Nullable, O as OptionItem, aq as OwnerType, ar as PROMO_CODE_PREFIX, as as PaginationOptions, at as PartnerListFilter, au as PaymentInfoType, av as PostContentData, aw as PostContentFormData, ax as PostContentGame, ay as PostContentImage, az as PostContentList, aA as PostContentTextarea, aB as PostContentType, aC as PostContentVideo, aD as PostFileInput, A as PostFormData, aE as PostListFilter, aF as PostResource, m as PostType, P as PosterUsageType, aG as ProductCoupon, aH as PromoCodeType, aI as PuzzleAnswer, aJ as PuzzleAnsweredQuestion, aK as PuzzleBaseGame, aL as PuzzleGameData, aM as PuzzleQuestion, R as RefundPolicy, J as Region, aN as RelatedPostType, aO as RelationDate, aP as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aQ as ResourceContactDetailsType, aR as ResourceDetails, aS as ResourceImageType, aT as SocialMediaType, aU as SocialShareResourceType, S as StallType, aV as Subcategory, aW as SubcategoryItems, aX as TermsAgreement, u as UnregisteredVendorFormData, aY as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, aZ as UserListFilter, a_ as VendorAttributes, a$ as VendorAvailability, b0 as VendorCalendarData, V as VendorClaimTokenValidation, b1 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b2 as VendorListFilter, b3 as VendorProductList, i as VendorType, b4 as gameScreenIdentifierList, b5 as gameTypeToDisplayName } from '../global-BqeTWrvk.js';
6
+ export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserType, U as UsersByPromoCode } from '../user-2peJoOeK.js';
7
7
  import { EnumOSPlatform } from '../enums/index.js';
8
8
  export { a as BillingCatalogDefinition, B as BillingCatalogEntryType, b as BillingCatalogInitialEntry, c as BillingCatalogKey, d as BillingCatalogPriceHistoryEntry, P as PaidVendorBillingPeriod, e as PaidVendorLicence, S as SyncBillingCatalogPriceInput, U as UpdateBillingCatalogPriceInput } from '../billingCatalog-oWAfZX95.js';
9
9
  export { a as TIERS_BY_PRIORITY, b as TIER_DISPLAY_LABELS, c as TIER_FROM_LICENCE, T as Tier } from '../subscription-BU8GvH2K.js';
10
- export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-xDFlLdJI.js';
10
+ export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-C03r7ssL.js';
11
11
  import '../images/index.js';
12
12
  import 'react-hook-form';
13
13
 
@@ -22,7 +22,7 @@ import {
22
22
  PROMO_CODE_PREFIX,
23
23
  gameScreenIdentifierList,
24
24
  gameTypeToDisplayName
25
- } from "../chunk-JESR7H4R.mjs";
25
+ } from "../chunk-PIEXGXTD.mjs";
26
26
  import {
27
27
  TIERS_BY_PRIORITY,
28
28
  TIER_DISPLAY_LABELS,
@@ -1,5 +1,5 @@
1
1
  import { EnumOSPlatform, EnumResourceType, EnumReward, EnumUserRole, EnumBillingPeriod, EnumUserLicence, EnumSubscriptionStatus, EnumNotificationResourceType } from './enums/index.js';
2
- import { aS as ResourceImageType, L as LocationType, aX as TermsAgreement, l as UserLicenceType, aH as PromoCodeType, a5 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-Coz5Jgi2.js';
2
+ import { aS as ResourceImageType, L as LocationType, aX as TermsAgreement, l as UserLicenceType, aH as PromoCodeType, a5 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-BqeTWrvk.js';
3
3
 
4
4
  /**
5
5
  * Canonical permission IDs. Add new permissions here first, then map them in
@@ -1,5 +1,5 @@
1
1
  import { EnumOSPlatform, EnumResourceType, EnumReward, EnumUserRole, EnumBillingPeriod, EnumUserLicence, EnumSubscriptionStatus, EnumNotificationResourceType } from './enums/index.mjs';
2
- import { aS as ResourceImageType, L as LocationType, aX as TermsAgreement, l as UserLicenceType, aH as PromoCodeType, a5 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-C6w0hQ5Y.mjs';
2
+ import { aS as ResourceImageType, L as LocationType, aX as TermsAgreement, l as UserLicenceType, aH as PromoCodeType, a5 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-CWo-hWKZ.mjs';
3
3
 
4
4
  /**
5
5
  * Canonical permission IDs. Add new permissions here first, then map them in
@@ -76,6 +76,7 @@ __export(utils_exports, {
76
76
  filterVendorEventsBySelectedDate: () => filterVendorEventsBySelectedDate,
77
77
  findEventDateTimeByIsoDate: () => findEventDateTimeByIsoDate,
78
78
  formatDate: () => formatDate,
79
+ formatDistance: () => formatDistance,
79
80
  formatIrdNumber: () => formatIrdNumber,
80
81
  formatNZBankAccount: () => formatNZBankAccount,
81
82
  formatTimestamp: () => formatTimestamp,
@@ -84,6 +85,8 @@ __export(utils_exports, {
84
85
  getAllowedEventDateStatuses: () => getAllowedEventDateStatuses,
85
86
  getBillingCatalogKeyForSelection: () => getBillingCatalogKeyForSelection,
86
87
  getCurrentAndFutureDates: () => getCurrentAndFutureDates,
88
+ getDistanceInKilometers: () => getDistanceInKilometers,
89
+ getDistanceInMeters: () => getDistanceInMeters,
87
90
  getErrorMessage: () => getErrorMessage,
88
91
  getEventCalendarIsoDates: () => getEventCalendarIsoDates,
89
92
  getEventDatesWithStallholders: () => getEventDatesWithStallholders,
@@ -458,6 +461,43 @@ function computeDailyClueState(dailyClue) {
458
461
  };
459
462
  }
460
463
 
464
+ // src/utils/distance.ts
465
+ function getDistanceInMeters(coordinates1, coordinates2) {
466
+ const [lon1, lat1] = coordinates1;
467
+ const [lon2, lat2] = coordinates2;
468
+ const values = [lon1, lat1, lon2, lat2];
469
+ if (values.some((v) => !Number.isFinite(v))) {
470
+ return Infinity;
471
+ }
472
+ const toRadians = (deg) => deg * Math.PI / 180;
473
+ const R = 6371e3;
474
+ const dLat = toRadians(lat2 - lat1);
475
+ const dLon = toRadians(lon2 - lon1);
476
+ const radLat1 = toRadians(lat1);
477
+ const radLat2 = toRadians(lat2);
478
+ const a = Math.sin(dLat / 2) ** 2 + Math.sin(dLon / 2) ** 2 * Math.cos(radLat1) * Math.cos(radLat2);
479
+ const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
480
+ return R * c;
481
+ }
482
+ function getDistanceInKilometers(coordinates1, coordinates2) {
483
+ const distanceInMeters = getDistanceInMeters(coordinates1, coordinates2);
484
+ if (!Number.isFinite(distanceInMeters)) {
485
+ return Infinity;
486
+ }
487
+ return Math.round(distanceInMeters / 1e3);
488
+ }
489
+ function formatDistance(coordinates1, coordinates2) {
490
+ const distanceInMeters = getDistanceInMeters(coordinates1, coordinates2);
491
+ if (!Number.isFinite(distanceInMeters)) {
492
+ return "\u2014";
493
+ }
494
+ const roundedMeters = Math.round(distanceInMeters);
495
+ if (roundedMeters < 1e3) {
496
+ return `${roundedMeters} m`;
497
+ }
498
+ return `${Math.round(roundedMeters / 1e3)} km`;
499
+ }
500
+
461
501
  // src/utils/pagination.ts
462
502
  var DEFAULT_PAGE_SIZE = 50;
463
503
  function defaultGetId(item) {
@@ -2274,6 +2314,7 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
2274
2314
  filterVendorEventsBySelectedDate,
2275
2315
  findEventDateTimeByIsoDate,
2276
2316
  formatDate,
2317
+ formatDistance,
2277
2318
  formatIrdNumber,
2278
2319
  formatNZBankAccount,
2279
2320
  formatTimestamp,
@@ -2282,6 +2323,8 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
2282
2323
  getAllowedEventDateStatuses,
2283
2324
  getBillingCatalogKeyForSelection,
2284
2325
  getCurrentAndFutureDates,
2326
+ getDistanceInKilometers,
2327
+ getDistanceInMeters,
2285
2328
  getErrorMessage,
2286
2329
  getEventCalendarIsoDates,
2287
2330
  getEventDatesWithStallholders,