@timardex/cluemart-server-shared 1.0.206 → 1.0.207

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../node_modules/@timardex/cluemart-shared/src/enums/index.ts","../node_modules/@timardex/cluemart-shared/src/formFields/vendor/vendor.ts","../node_modules/@timardex/cluemart-shared/src/types/game/dailyClue.ts","../node_modules/@timardex/cluemart-shared/src/utils/date.ts","../node_modules/@timardex/cluemart-shared/src/utils/dailyClueGame.ts","../node_modules/@timardex/cluemart-shared/src/utils/utils.ts","../node_modules/@timardex/cluemart-shared/src/utils/school.ts","../node_modules/@timardex/cluemart-shared/src/formFields/vendor/vendorInfo.ts","../node_modules/@timardex/cluemart-shared/src/formFields/event/event.ts","../node_modules/@timardex/cluemart-shared/src/formFields/event/eventInfo.ts","../node_modules/@timardex/cluemart-shared/src/formFields/global.ts","../node_modules/@timardex/cluemart-shared/src/formFields/auth.ts","../node_modules/@timardex/cluemart-shared/src/formFields/user.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/clothingAndFashion.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/electronicsAndTechnology.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/foodAndBeverages.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/handmadeAndLocalProducts.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/healthAndWellness.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/homeGardenHousehold.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/petProductsAndAnimalGoods.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/serviceAndExperience.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/toysChildren.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/vintageAndAntique.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/index.ts","../node_modules/@timardex/cluemart-shared/src/formFields/socialMedia.ts","../node_modules/@timardex/cluemart-shared/src/formFields/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/formFields/partner.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/admin/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/admin.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/event.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/global.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/vendor.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/auth.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/auth.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/chat/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/chat.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/chat.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/chat/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/subscriptions/chat.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/event/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/event.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/user.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/partner.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/event/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/notifications/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/notification.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/notification.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/notifications/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/notifications/hooksSubscription.ts","../node_modules/@timardex/cluemart-shared/src/graphql/subscriptions/notification.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/poster.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/poster.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/pushToken.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/pushToken.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/relation/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/relation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/relation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/relation/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/vendor/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/vendor.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/vendor/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/user/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/user.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/user/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/ad/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/ad.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/ad.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/ad/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/resourceActivities/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/resourceActivities.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/resourceActivities/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/resourceActivities.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/stripe/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/stripe.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/stripe/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/stripe.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/partner/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/partner.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/partner/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/post/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/post.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/post.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/game/dailyClue.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/game/puzzleGame.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/post/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/appSettings/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/appSettings.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/appSettings.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/appSettings/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/game/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/game.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/game/game.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/game/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/school/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/school.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/school.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/school/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/images/index.ts","../node_modules/@timardex/cluemart-shared/src/sharing/relationShareTypes.ts","../node_modules/@timardex/cluemart-shared/src/sharing/constants.ts","../node_modules/@timardex/cluemart-shared/src/sharing/formatCategoryLabel.ts","../node_modules/@timardex/cluemart-shared/src/sharing/joinShareDescriptionSections.ts","../node_modules/@timardex/cluemart-shared/src/sharing/buildRelationShareDescription.ts","../node_modules/@timardex/cluemart-shared/src/sharing/buildPublicShareDescription.ts","../node_modules/@timardex/cluemart-shared/src/sharing/buildShareUrl.ts","../node_modules/@timardex/cluemart-shared/src/sharing/normalizeShareDescription.ts","../node_modules/@timardex/cluemart-shared/src/sharing/normalizeShareRouteId.ts","../node_modules/@timardex/cluemart-shared/src/storage/index.ts","../node_modules/@timardex/cluemart-shared/src/theme/index.ts","../node_modules/@timardex/cluemart-shared/src/types/auth.ts","../node_modules/@timardex/cluemart-shared/src/types/global.ts","../node_modules/@timardex/cluemart-shared/src/types/ad.ts","../node_modules/@timardex/cluemart-shared/src/types/resourceActivities.ts","../node_modules/@timardex/cluemart-shared/src/types/post.ts","../node_modules/@timardex/cluemart-shared/src/types/game/index.ts","../node_modules/@timardex/cluemart-shared/src/types/game/global.ts","../node_modules/@timardex/cluemart-shared/src/types/subscription.ts","../node_modules/tslib/tslib.es6.mjs","../node_modules/ts-invariant/src/invariant.ts","../node_modules/graphql/jsutils/devAssert.mjs","../node_modules/graphql/jsutils/isObjectLike.mjs","../node_modules/graphql/jsutils/invariant.mjs","../node_modules/graphql/language/location.mjs","../node_modules/graphql/language/printLocation.mjs","../node_modules/graphql/error/GraphQLError.mjs","../node_modules/graphql/error/syntaxError.mjs","../node_modules/graphql/language/ast.mjs","../node_modules/graphql/language/directiveLocation.mjs","../node_modules/graphql/language/kinds.mjs","../node_modules/graphql/language/characterClasses.mjs","../node_modules/graphql/language/blockString.mjs","../node_modules/graphql/language/tokenKind.mjs","../node_modules/graphql/language/lexer.mjs","../node_modules/graphql/jsutils/inspect.mjs","../node_modules/graphql/jsutils/instanceOf.mjs","../node_modules/graphql/language/source.mjs","../node_modules/graphql/language/parser.mjs","../node_modules/graphql-tag/src/index.ts","../node_modules/@apollo/src/core/index.ts","../src/mongoose/Ad.ts","../src/mongoose/chat/Chat.ts","../src/mongoose/chat/ChatReport.ts","../src/mongoose/global.ts","../src/mongoose/Relation.ts","../src/mongoose/event/EventInfo.ts","../src/mongoose/GoogleImportedMarket.ts","../src/mongoose/Notification.ts","../node_modules/@timardex/cluemart-shared/src/enums/index.ts","../src/mongoose/PushToken.ts","../src/mongoose/ResourceActivity.ts","../src/mongoose/User.ts","../src/mongoose/VerificationToken.ts","../src/mongoose/vendor/Vendor.ts","../src/mongoose/vendor/VendorInfo.ts","../src/mongoose/vendor/UnregisteredVendor.ts","../src/mongoose/event/Event.ts","../src/mongoose/Partner.ts","../src/mongoose/Post.ts","../src/mongoose/AppSetting.ts","../src/mongoose/game/Game.ts","../src/mongoose/game/DailyClue.ts","../src/mongoose/game/utils.ts","../src/mongoose/game/PuzzleGame.ts","../src/mongoose/School.ts","../src/service/database.ts","../src/service/saveNotificationsInDb.ts","../src/service/sendPushNotifications.ts","../src/service/updateAdStatus.ts","../src/service/associate.ts","../src/service/vendor.ts","../src/service/objectIdToString.ts","../src/service/event.ts","../src/service/relations.ts","../src/types/index.ts"],"sourcesContent":["export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n}\n\nexport enum EnumChatReportReason {\n INAPPROPRIATE_CONTENT = \"Inappropriate_Content\",\n HARASSMENT_OR_BULLYING = \"Harassment_or_Bullying\",\n HATE_SPEECH = \"Hate_Speech\",\n SPAM_OR_SCAM = \"Spam_or_Scam\",\n VIOLENCE_OR_DANGEROUS_BEHAVIOR = \"Violence_or_Dangerous_Behavior\",\n OTHER = \"Other\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n OTHER = \"Not_Applicable\",\n}\n\nexport enum EnumFoodType {\n ADDITIVE_FREE = \"Additive_Free\",\n AIR_FRIED = \"Air_Fried\",\n ALLERGEN_FRIENDLY = \"Allergen_Friendly\",\n ATHLETE_FRIENDLY = \"Athlete_Friendly\",\n BAKED = \"Baked\",\n DAIRY_FREE = \"Dairy_Free\",\n DIABETIC_FRIENDLY = \"Diabetic_Friendly\",\n EGG_FREE = \"Egg_Free\",\n FRESH = \"Fresh\",\n GLUTEN_FREE = \"Gluten_Free\",\n GRILLED = \"Grilled\",\n HALAL = \"Halal\",\n HEART_HEALTHY = \"Heart_Healthy\",\n HIGH_FIBER = \"High_Fiber\",\n HIGH_PROTEIN = \"High_Protein\",\n KETO = \"Keto\",\n KOSHER = \"Kosher\",\n LACTOSE_FREE = \"Lactose_Free\",\n LOW_CALORIE = \"Low_Calorie\",\n LOW_CARB = \"Low_Carb\",\n LOW_FAT = \"Low_Fat\",\n LOW_SODIUM = \"Low_Sodium\",\n NO_ADDED_SUGAR = \"No_Added_Sugar\",\n NO_PRESERVATIVES = \"No_Preservatives\",\n NON_GMO = \"Non_GMO\",\n NUT_FREE = \"Nut_Free\",\n ORGANIC = \"Organic\",\n PALEO = \"Paleo\",\n PLANT_BASED = \"Plant_Based\",\n RAW = \"Raw\",\n SMOKED = \"Smoked\",\n SOY_FREE = \"Soy_Free\",\n SUGAR_FREE = \"Sugar_Free\",\n VEGAN = \"Vegan\",\n VEGETARIAN = \"Vegetarian\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumEventType {\n MARKET = \"Market\",\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n}\n\nexport enum EnumPartnerType {\n CHARITY_PARTNER = \"Charity_Partner\",\n MEDIA_PARTNER = \"Media_Partner\",\n SUPPORTING_PARTNER = \"Supporting_Partner\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n EVENT_UPDATE_RELATION_TO_VENDOR = \"event_update_relation_to_vendor\",\n VENDOR_UPDATE_RELATION_TO_EVENT = \"vendor_update_relation_to_event\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n ADDED_AS_ASSOCIATE_EVENT = \"added_as_associate_event\",\n ADDED_AS_ASSOCIATE_PARTNER = \"added_as_associate_partner\",\n ADDED_AS_ASSOCIATE_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_PARTNER = \"approved_partner\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_PARTNER = \"created_partner\",\n CREATED_VENDOR = \"created_vendor\",\n DAILY_CLUE_GAME = \"daily_clue_game\",\n DEACTIVATED_EVENT = \"deactivated_event\",\n DEACTIVATED_PARTNER = \"deactivated_partner\",\n DEACTIVATED_VENDOR = \"deactivated_vendor\",\n DECLINED_EVENT = \"declined_event\",\n DECLINED_PARTNER = \"declined_partner\",\n DECLINED_VENDOR = \"declined_vendor\",\n DOWNGRADED_EVENT = \"downgraded_event\",\n DOWNGRADED_PARTNER = \"downgraded_partner\",\n DOWNGRADED_VENDOR = \"downgraded_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n EVENT_UPDATE_RELATION_TO_VENDOR = EnumRelationResource.EVENT_UPDATE_RELATION_TO_VENDOR,\n EXPIRATION_REMINDER_EVENT = \"expiration_reminder_event\",\n EXPIRATION_REMINDER_PARTNER = \"expiration_reminder_partner\",\n EXPIRATION_REMINDER_VENDOR = \"expiration_reminder_vendor\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n NEW_POST_CREATED = \"new_post_created\",\n REGISTERED_USER_BY_SCHOOL_CODE = \"registered_user_by_school_code\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n VENDOR_UPDATE_RELATION_TO_EVENT = EnumRelationResource.VENDOR_UPDATE_RELATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n CHAT = \"chat\",\n EVENT = EnumResourceType.EVENT,\n RELATION = \"relation\",\n SYSTEM = \"system\",\n VENDOR = EnumResourceType.VENDOR,\n}\n\nexport enum EnumRegions {\n All = \"All Regions\",\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n CanterburyWestCoast = \"Canterbury & West Coast\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelsonTasman = \"Marlborough & Nelson & Tasman\",\n Northland = \"Northland\",\n Otago = \"Otago\",\n Southland = \"Southland\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n STANDARD_PARTNER = \"standard_partner\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n CUSTOMER = \"customer\",\n MARKETING = \"marketing\",\n MODERATOR = \"moderator\",\n SUPPORT = \"support\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n\nexport enum EnumEventDateStatus {\n STARTING_SOON = \"Starting_Soon\",\n STARTED = \"Started\",\n TODAY = \"Today\",\n TOMORROW = \"Tomorrow\",\n THIS_WEEK = \"This_Week\",\n NEXT_WEEK = \"Next_Week\",\n UPCOMING = \"Upcoming\",\n ENDED = \"Ended\",\n RE_SCHEDULED = \"Rescheduled\",\n CANCELED = \"Canceled\",\n}\n\nexport enum EnumSubscriptionStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n CANCELLED = \"cancelled\",\n NO_SUBSCRIPTION = \"no_subscription\",\n PAST_DUE = \"past_due\",\n TRIALING = \"trialing\",\n}\n\nexport enum EnumBillingPeriod {\n MONTHLY_CANCEL_ANYTIME = \"monthly_cancel_anytime\",\n YEARLY_ANNUAL_BILLED = \"yearly_annual_billed\",\n YEARLY_MONTHLY_BILLED = \"yearly_monthly_billed\",\n}\n","import { FormDateField, FormField, OptionItem } from \"../../types/global\";\n\nexport const vendorBasicInfoFields: FormField[] = [\n {\n helperText: \"Business Name *\",\n name: \"name\",\n placeholder: \"Business Name\",\n },\n {\n helperText: \"Description *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n];\n\nexport const vendorFullAddress: FormField = {\n helperText: \"Enter address\",\n name: \"fullAddress\",\n placeholder: \"Start typing to find address\",\n};\n\nexport const vendorStartDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"Start Date\",\n name: \"startDate\",\n placeholder: \"Start Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"Start Time\",\n name: \"startTime\",\n placeholder: \"Start Time\",\n },\n];\n\nexport const vendorEndDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"End Date\",\n name: \"endDate\",\n placeholder: \"End Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"End Time\",\n name: \"endTime\",\n placeholder: \"End Time\",\n },\n];\n\nexport const vendorAvailability: FormField[] = [\n {\n name: \"availability.school\",\n placeholder: \"School events\",\n },\n {\n name: \"availability.private\",\n placeholder: \"Private events\",\n },\n {\n name: \"availability.corporate\",\n placeholder: \"Corporate events\",\n },\n];\n\nexport const vendorLocationDescription: FormField = {\n helperText: \"Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n};\n\nexport const vendorMenuFields: FormField[] = [\n {\n helperText: \"Item name\",\n name: \"name\",\n placeholder: \"Item name\",\n },\n {\n helperText: \"Price\",\n keyboardType: \"decimal-pad\",\n name: \"price\",\n placeholder: \"Price\",\n },\n {\n helperText: \"Item Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Item Description\",\n },\n];\n\nexport const productLabelGroups = [\n {\n category: \"Food Sensitivity\",\n items: [\n { abbreviation: \"DF\", fullName: \"Dairy-Free\" },\n { abbreviation: \"EF\", fullName: \"Egg-Free\" },\n { abbreviation: \"GF\", fullName: \"Gluten-Free\" },\n { abbreviation: \"NF\", fullName: \"Nut-Free\" },\n ],\n },\n {\n category: \"Lifestyle\",\n items: [\n { abbreviation: \"KETO\", fullName: \"Keto-Friendly\" },\n { abbreviation: \"P\", fullName: \"Paleo\" },\n { abbreviation: \"V\", fullName: \"Vegan\" },\n { abbreviation: \"VG\", fullName: \"Vegetarian\" },\n { abbreviation: \"KID\", fullName: \"Kid-Friendly\" }, // Gyerekbarát\n { abbreviation: \"PET\", fullName: \"Pet-Friendly Product\" }, // Állatok\n ],\n },\n {\n category: \"Natural\",\n items: [\n { abbreviation: \"ECO\", fullName: \"Eco-Friendly\" },\n { abbreviation: \"ORGANIC\", fullName: \"Organic Product\" },\n { abbreviation: \"NAT\", fullName: \"Natural Product\" }, // Természetesség\n { abbreviation: \"NPF\", fullName: \"Non-Pesticide / Chemical-Free\" },\n { abbreviation: \"PLN\", fullName: \"Plant-Based\" },\n ],\n },\n {\n category: \"Market Character\",\n items: [\n { abbreviation: \"HM\", fullName: \"Handmade\" },\n { abbreviation: \"LOC\", fullName: \"Local Product\" },\n { abbreviation: \"ART\", fullName: \"Artisan\" },\n { abbreviation: \"LTD\", fullName: \"Limited Edition\" },\n ],\n },\n {\n category: \"Cosmetic / Natural\",\n items: [\n { abbreviation: \"AROM\", fullName: \"Aromatherapy\" },\n { abbreviation: \"CRF\", fullName: \"Cruelty-Free\" },\n { abbreviation: \"HYPO\", fullName: \"Hypoallergenic\" },\n { abbreviation: \"BODY\", fullName: \"Body Care\" }, // Testápolás\n ],\n },\n {\n category: \"Wellbeing\",\n items: [\n { abbreviation: \"CARE\", fullName: \"Health Support Product\" }, // Egészség / testi jóllét\n { abbreviation: \"PHYS\", fullName: \"Physical Wellbeing\" }, // Fizikai jóllét\n { abbreviation: \"MENTAL\", fullName: \"Mental Wellbeing\" }, // Mentális jóllét\n { abbreviation: \"RELAX\", fullName: \"Relaxation Product\" }, // Relaxáció / lazítás\n { abbreviation: \"SPIRIT\", fullName: \"Spiritual Wellbeing\" }, // Lelki jóllét\n ],\n },\n {\n category: \"Tech & Digital\",\n items: [\n { abbreviation: \"TECH\", fullName: \"Technology Product\" }, // Technológia\n { abbreviation: \"DIGI\", fullName: \"Digital Technology\" }, // Digitális technológia\n ],\n },\n {\n category: \"Practical & Home\",\n items: [\n { abbreviation: \"PRAC\", fullName: \"Practical Solution\" }, // Praktikum\n { abbreviation: \"HOME\", fullName: \"Home & Living\" }, // Otthon / lakókörnyezet\n ],\n },\n {\n category: \"Sustainability\",\n items: [\n { abbreviation: \"ZWP\", fullName: \"Zero-Waste Product\" },\n { abbreviation: \"SUST\", fullName: \"Sustainable Product\" }, // Fenntarthatóság\n ],\n },\n];\n\nexport const priceUnits: OptionItem[] = [\n { label: \"Piece\", value: \"PIECE\" },\n { label: \"Portion\", value: \"PORTION\" },\n { label: \"Slice\", value: \"SLICE\" },\n { label: \"Cup\", value: \"CUP\" },\n { label: \"Bottle\", value: \"BOTTLE\" },\n { label: \"Can\", value: \"CAN\" },\n { label: \"Jar\", value: \"JAR\" },\n { label: \"Box\", value: \"BOX\" },\n { label: \"Pack\", value: \"PACK\" },\n { label: \"Bag\", value: \"BAG\" },\n { label: \"Bunch\", value: \"BUNCH\" },\n { label: \"Tray\", value: \"TRAY\" },\n { label: \"Punnet\", value: \"PUNNET\" },\n { label: \"Gr\", value: \"GRAM\" },\n { label: \"Kg\", value: \"KILOGRAM\" },\n { label: \"L\", value: \"LITRE\" },\n { label: \"Ml\", value: \"MILLILITRE\" },\n { label: \"Dozen\", value: \"DOZEN\" },\n { label: \"Half dozen\", value: \"HALF_DOZEN\" },\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 your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/activities\",\n },\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/profile/chat\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/edit-profile\",\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: \"/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\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: \"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: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\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] 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","import dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport timezone from \"dayjs/plugin/timezone.js\";\nimport utc from \"dayjs/plugin/utc.js\";\n\nexport const dateFormat = \"DD-MM-YYYY\";\nexport const timeFormat = \"HH:mm\";\n\n// Enable custom format parsing\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isSameOrAfter);\n\nconst NZ_TZ = \"Pacific/Auckland\";\n\nexport function toNZTime(date?: Date | string) {\n return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);\n}\n\n/** Start of the calendar day in Pacific/Auckland (daily games, streaks, etc.). */\nexport function nzStartOfDay(\n input?: Date | string | number | null,\n): dayjs.Dayjs {\n if (input == null) {\n return dayjs().tz(NZ_TZ).startOf(\"day\");\n }\n return dayjs.tz(input, NZ_TZ).startOf(\"day\");\n}\n\ntype DateFormat = \"date\" | \"time\" | \"datetime\";\n\n/**\n * Format a date string to a more readable format.\n * @param dateStr - the date string\n * @param timeStr - optional time string\n * @param display - 'date' | 'time' | 'datetime'\n * @returns formatted string based on display option\n */\nexport const formatDate = (\n dateStr: string,\n display: DateFormat = \"datetime\",\n timeStr?: string,\n) => {\n // Combine date and time into a single string if time is provided\n const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;\n\n // Parse with formats\n const dateTime = timeStr\n ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`)\n : dayjs(dateStr, dateFormat);\n\n // Format parts\n const formattedDate = dateTime.format(\"dddd, D MMMM, YYYY\");\n const formattedTime = dateTime.format(\"h:mm a\");\n\n // Return based on display option\n switch (display) {\n case \"date\":\n return formattedDate;\n case \"time\":\n return formattedTime;\n case \"datetime\":\n return `${formattedDate} at ${formattedTime}`;\n default:\n return formattedDate;\n }\n};\n\nexport const getCurrentAndFutureDates = <\n T extends { startDate: string; startTime: string },\n>(\n dates: T[],\n): T[] => {\n const now = dayjs(); // current date and time\n\n return dates.filter((dateObj) => {\n const dateTime = dayjs(\n `${dateObj.startDate} ${dateObj.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n return dateTime.isSameOrAfter(now);\n });\n};\n\nexport const isFutureDatesBeforeThreshold = (\n date: {\n startDate: string;\n startTime: string;\n },\n minHoursFromNow: number,\n): boolean => {\n const threshold = minHoursFromNow\n ? dayjs().add(minHoursFromNow, \"hour\")\n : dayjs().startOf(\"day\");\n\n const dateTime = dayjs(\n `${date.startDate} ${date.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n\n return dateTime.isSameOrAfter(threshold);\n};\n\nexport const formatTimestamp = (timestamp: string) => {\n const formattedDate = toNZTime(timestamp).format(dateFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const isIsoDateString = (value: unknown): value is string => {\n return typeof value === \"string\" && !isNaN(Date.parse(value));\n};\n\n/**\n * Sort an array of date strings by their proximity to the current date.\n * @param dates - The array of date strings to sort.\n * @returns - The sorted array of date strings.\n */\nexport function sortDatesChronologically<\n T extends { startDate: string; startTime: string },\n>(dates: T[]): T[] {\n if (!dates || !dates.length) {\n return [];\n }\n\n return [...dates].sort((a, b) => {\n const dateTimeFormat = `${dateFormat} ${timeFormat}`;\n const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);\n const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);\n return dateA.valueOf() - dateB.valueOf(); // chronological order\n });\n}\n","import type { Dayjs } from \"dayjs\";\n\nimport {\n DailyClueGameData,\n GamePlacement,\n GamePlacementClue,\n gameScreenIdentifierList,\n} from \"../types/game/dailyClue\";\n\nimport { nzStartOfDay } from \"./date\";\n\nfunction createSeededRng(seed: number) {\n let t = seed >>> 0;\n\n return function random() {\n t += 0x6d2b79f5;\n let x = t;\n\n x = Math.imul(x ^ (x >>> 15), x | 1);\n x ^= x + Math.imul(x ^ (x >>> 7), x | 61);\n\n return ((x ^ (x >>> 14)) >>> 0) / 4294967296;\n };\n}\n\nfunction hashStringToNumber(seed: string): number {\n let hash = 2166136261;\n\n for (let i = 0; i < seed.length; i++) {\n hash ^= seed.codePointAt(i) ?? 0;\n hash = Math.imul(hash, 16777619);\n }\n\n return hash >>> 0;\n}\n\n/** Seeded shuffle so all players see the same letter order / placements for a game. */\nexport function seededShuffle<T>(array: readonly T[], seed: string): T[] {\n const rng = createSeededRng(hashStringToNumber(seed));\n const result = [...array];\n\n for (let i = result.length - 1; i > 0; i--) {\n const j = Math.floor(rng() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n\n return result;\n}\n\nfunction getDayIndex(start: Dayjs, today: Dayjs): number {\n return today.diff(start, \"day\");\n}\n\nexport function computeDailyClueState(dailyClue: DailyClueGameData): {\n todaysClue: GamePlacementClue | null;\n todaysLetter: string | null;\n todaysPlacement: GamePlacement | null;\n} | null {\n const { startDate, endDate } = dailyClue.gameFields.gameDate;\n const { solutionShuffled, collected } = dailyClue.letterInfo;\n\n const today = nzStartOfDay();\n const start = nzStartOfDay(startDate);\n const end = nzStartOfDay(endDate);\n\n // Before game starts\n if (today.isBefore(start)) {\n return null;\n }\n\n const shuffledPlacements = seededShuffle(\n gameScreenIdentifierList,\n start.toISOString(),\n );\n\n const index = getDayIndex(start, today);\n\n // After game ends\n if (today.isAfter(end)) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // Safety: index must exist in BOTH arrays\n if (\n index < 0 ||\n index >= solutionShuffled.length ||\n index >= shuffledPlacements.length\n ) {\n return null;\n }\n\n const letterToday = solutionShuffled[index];\n const placement = shuffledPlacements[index];\n\n if (!letterToday || !placement) return null;\n\n const alreadyCollectedToday = (collected ?? []).includes(letterToday);\n\n // Already completed today\n if (alreadyCollectedToday) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // Active state\n return {\n todaysClue: placement.clue,\n todaysLetter: letterToday,\n todaysPlacement: placement.id,\n };\n}\n","import {\n EnumInviteStatus,\n EnumPaymentMethod,\n EnumRegions,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"src/enums\";\nimport { OptionItem, SocialMediaType } from \"src/types\";\n\nimport { isIsoDateString } from \"./date\";\n\nexport const removeTypename = (obj: any): any => {\n // Preserve Date objects\n if (obj instanceof Date) {\n return obj;\n }\n\n // Preserve File objects (for apollo-upload-client)\n if (obj instanceof File) {\n return obj;\n }\n\n // Preserve ISO date strings\n if (isIsoDateString(obj)) {\n return obj;\n }\n\n // Handle arrays\n if (Array.isArray(obj)) {\n return obj.map(removeTypename);\n }\n\n // Handle plain objects only\n if (obj !== null && typeof obj === \"object\") {\n const { __typename, ...cleanedObj } = obj;\n\n return Object.keys(cleanedObj).reduce((acc: any, key) => {\n acc[key] = removeTypename(cleanedObj[key]);\n return acc;\n }, {});\n }\n\n // Primitives\n return obj;\n};\n\n/**\n * Truncate text to a specified length and append ellipsis if necessary.\n * @param text\n * @param maxLength\n * @returns\n */\nexport const truncateText = (text: string, maxLength: number = 30): string => {\n return text.length > maxLength ? text.substring(0, maxLength) + \"...\" : text;\n};\n\n/**\n * Convert an array of strings to an array of objects with label and value properties.\n * @param items - The array of strings to convert.\n * @returns - The converted array of objects.\n */\nexport const mapArrayToOptions = (items: string[]): OptionItem[] =>\n items.map((item) => ({\n label: item,\n value: item,\n }));\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str\n .split(\" \")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n};\n\nexport const statusOptions = [\n ...Object.values(EnumInviteStatus)\n .map((status) => ({\n label: status,\n value: status,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)), // Sort the options alphabetically\n];\n\nexport const availableRegionTypes = Object.values(EnumRegions);\nexport const availableRegionOptions: OptionItem[] =\n mapArrayToOptions(availableRegionTypes);\n\nexport const paymentMethodOptions: OptionItem[] = mapArrayToOptions(\n Object.values(EnumPaymentMethod),\n);\n\nexport function normalizeUrl(url: string): string {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n return `https://${url}`;\n }\n return url;\n}\n\nexport const licenseNiceNames: Record<EnumUserLicence, string> = {\n [EnumUserLicence.PRO_EVENT]: \"Pro Event\",\n [EnumUserLicence.PRO_VENDOR]: \"Pro Stallholder\",\n [EnumUserLicence.STANDARD_EVENT]: \"Standard Event\",\n [EnumUserLicence.STANDARD_VENDOR]: \"Standard Stallholder\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"Pro+Ads Event\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"Pro+Ads Stallholder\",\n [EnumUserLicence.STANDARD_PARTNER]: \"Partner\",\n};\n\nexport const cluemartSocialMedia: SocialMediaType[] = [\n {\n link: \"https://www.facebook.com/ClueMartApp\",\n name: EnumSocialMedia.FACEBOOK,\n },\n {\n link: \"https://www.instagram.com/cluemart_app\",\n name: EnumSocialMedia.INSTAGRAM,\n },\n {\n link: \"https://www.tiktok.com/@cluemart\",\n name: EnumSocialMedia.TIKTOK,\n },\n {\n link: \"https://www.youtube.com/@ClueMart-App-NZ\",\n name: EnumSocialMedia.YOUTUBE,\n },\n];\n\nexport const IOS_URL = \"https://apps.apple.com/nz/app/cluemart/id6747251008\";\nexport const ANDROID_URL =\n \"https://play.google.com/store/apps/details?id=com.timardex.cluemart\";\n\nexport const DEFAULT_RESOURCES_RETURN_LIMIT = 1000;\nexport const DEFAULT_RESOURCES_RETURN_OFFSET = 0;\nexport const CLUEMART_MAIN_DOMAIN_URL = \"https://cluemart.co.nz\";\n","export const SCHOOL_MIN_STUDENT_COUNT = 300;\nexport const SCHOOL_MAX_STUDENT_COUNT = 0;\n","import { EnumFoodFlavor } from \"src/enums\";\n\nimport { FormField, OptionItem } from \"../../types\";\nimport { mapArrayToOptions } from \"../../utils\";\n\nexport const vendorElectricity: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. amps, voltage, etc.\",\n isTextArea: true,\n name: \"requirements.electricity.details\",\n placeholder: \"Electricity requirements\",\n },\n isRequired: {\n name: \"requirements.electricity.isRequired\",\n placeholder: \"Do you require electricity?\",\n },\n};\n\nexport const vendorGazebo: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. size, etc.\",\n isTextArea: true,\n name: \"requirements.gazebo.details\",\n placeholder: \"Gazebo requirements\",\n },\n isRequired: {\n name: \"requirements.gazebo.isRequired\",\n placeholder: \"Do you require Gazebo?\",\n },\n};\n\nexport const vendorTable: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. size, etc.\",\n isTextArea: true,\n name: \"requirements.table.details\",\n placeholder: \"Table requirements\",\n },\n isRequired: {\n name: \"requirements.table.isRequired\",\n placeholder: \"Do you require Table?\",\n },\n};\n\nexport const vendorPriceRange: {\n max: FormField;\n min: FormField;\n} = {\n max: {\n helperText: \"Product maximum price\",\n name: \"product.priceRange.max\",\n placeholder: \"Maximum price: \",\n },\n min: {\n helperText: \"Product minimum price\",\n name: \"product.priceRange.min\",\n placeholder: \"Minimum price: \",\n },\n};\n\nexport const vendorStallSize: {\n depth: FormField;\n width: FormField;\n} = {\n depth: {\n helperText: \"Stall size in depth\",\n name: \"stallInfo.size.depth\",\n placeholder: \"Stall Depth: \",\n },\n width: {\n helperText: \"Stall size in width\",\n name: \"stallInfo.size.width\",\n placeholder: \"Stall Width: \",\n },\n};\n\nexport const vendorPackaging: FormField = {\n helperText: \"Select packaging type, you can select more than one\",\n name: \"product.packaging\",\n placeholder: \"Packaging type\",\n};\n\nexport const vendorProducedIn: FormField = {\n helperText:\n \"Select where the product is produced, you can select more than one\",\n name: \"product.producedIn\",\n placeholder: \"Produced type\",\n};\n\nexport const vendorFoodFlavour: FormField = {\n helperText: \"You can select more than one food flavour\",\n name: \"product.foodFlavors\",\n placeholder: \"Food flavours\",\n};\n\nexport const vendorCompliance: FormField[] = [\n {\n name: \"compliance.liabilityInsurance\",\n placeholder: \"Liability Insurance\",\n },\n {\n name: \"compliance.foodBeverageLicense\",\n placeholder: \"Food and Beverage License\",\n },\n];\n\nconst packagingTypes = [\n \"Biodegradable\",\n \"Compostable\",\n \"Fabric\",\n \"Glass\",\n \"Other\",\n \"Paper\",\n \"Plastic\",\n \"Recyclable\",\n \"Reusable\",\n \"Single-use\",\n \"Wood\",\n];\n\nconst producedIngTypes = [\n \"Commercial Kitchen\",\n \"Home Premises\",\n \"Factory\",\n \"Farm\",\n \"Other\",\n];\n\nexport const packagingOptions: OptionItem[] = mapArrayToOptions(packagingTypes);\nexport const producedIngOptions: OptionItem[] =\n mapArrayToOptions(producedIngTypes);\nexport const foodFlavourOptions: OptionItem[] = Object.values(\n EnumFoodFlavor,\n).map((flavour) => ({\n label: flavour.replaceAll(\"_\", \" \"),\n value: flavour,\n}));\n","import { FormDateField, FormField, OptionItem } from \"../../types/global\";\n\nexport const eventBasicInfoFields: FormField[] = [\n {\n helperText: \"Name of the Event *\",\n name: \"name\",\n placeholder: \"Name\",\n },\n {\n helperText:\n \"NZBN number (required – ClueMart only accepts events with valid NZBN number) *\",\n keyboardType: \"number-pad\",\n name: \"nzbn\",\n placeholder: \"NZBN number\",\n },\n {\n helperText: \"Name of the Provider (if applicable)\",\n name: \"provider\",\n placeholder: \"Provider\",\n },\n {\n helperText: \"Description of the Event *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n];\n\nexport const eventStartDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"Start Date of the Event *\",\n name: \"startDate\",\n placeholder: \"Start Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"Start Time of the Event *\",\n name: \"startTime\",\n placeholder: \"Start Time\",\n },\n];\n\nexport const eventEndDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"End Date of the Event *\",\n name: \"endDate\",\n placeholder: \"End Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"End Time of the Event *\",\n name: \"endTime\",\n placeholder: \"End Time\",\n },\n];\n\nexport const availableTagTypes = [\n { icon: \"human-male-female-child\", label: \"All Ages\" },\n { icon: \"weather-sunny\", label: \"Day Market\" },\n { icon: \"account-child\", label: \"Family Friendly\" },\n { icon: \"ticket-percent\", label: \"Free Entry\" },\n { icon: \"home-city\", label: \"Indoor Market\" },\n { icon: \"music\", label: \"Live Music\" },\n { icon: \"bus\", label: \"Near Bustop\" },\n { icon: \"slide\", label: \"Near Playground\" },\n { icon: \"train\", label: \"Near Train Station\" },\n { icon: \"weather-night\", label: \"Night Market\" },\n { icon: \"tree\", label: \"Outdoor Market\" },\n { icon: \"car\", label: \"Parking Available\" },\n { icon: \"dog\", label: \"Pet Friendly\" },\n { icon: \"ship-wheel\", label: \"Port Nearby\" },\n { icon: \"toilet\", label: \"Toilet Available\" },\n { icon: \"wheelchair-accessibility\", label: \"Wheelchair Accessible\" },\n];\n\nexport const tagOptions: OptionItem[] = availableTagTypes.map((tag) => ({\n label: tag.label,\n value: tag.label,\n}));\n","import { RefundPolicy, Requirement, StallType } from \"../../types/event\";\nimport { FormField } from \"../../types/global\";\n\nexport const eventInfo: FormField[] = [\n {\n helperText: \"Application Deadline (hours before event start) *\",\n keyboardType: \"number-pad\",\n name: \"applicationDeadlineHours\",\n placeholder: \"Application Deadline (in hours)\",\n },\n {\n helperText:\n \"Payment Due (hours after application or invitation acceptance) *\",\n keyboardType: \"number-pad\",\n name: \"paymentDueHours\",\n placeholder: \"Payment Due (in hours)\",\n },\n {\n helperText: \"Pack-In Time (hours before event start) *\",\n keyboardType: \"number-pad\",\n name: \"packInTime\",\n placeholder: \"Pack In Time (in hours)\",\n },\n];\n\nexport const eventInfoPaymentInfo: FormField[] = [\n {\n helperText: \"Account holder name *\",\n name: \"accountHolderName\",\n placeholder: \"Account holder name\",\n },\n {\n helperText: \"Account number *\",\n keyboardType: \"number-pad\",\n name: \"accountNumber\",\n placeholder: \"Account number\",\n },\n {\n helperText: \"Payment link, where applicants can pay *\",\n keyboardType: \"url\",\n name: \"link\",\n placeholder: \"Payment link\",\n },\n];\n\nexport const requirementsOptions: Requirement[] = [\n {\n category: \"Environment\",\n label: \"All packaging must be eco-friendly or recyclable where possible.\",\n value: false,\n },\n {\n category: \"Environment\",\n label: \"No single-use plastic bags are to be handed out.\",\n value: false,\n },\n {\n category: \"Environment\",\n label:\n \"Stall area must be left clean with no trace of activity after pack-down.\",\n value: false,\n },\n {\n category: \"Environment\",\n label:\n \"No disposal of oils, fats, or chemicals in public drains or on grassed areas.\",\n value: false,\n },\n {\n category: \"Environment\",\n label:\n \"You must provide bins at your site for rubbish and recycling, and take away all bins including rubbish, to dispose of outside of the town centre.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label:\n \"Food must be prepared and stored according to your food regulation.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label: \"The stallholder must display a current food grade certificate.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label: \"Only licensed food vendors may sell ready-to-eat food items.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label:\n \"Handwashing facilities must be available at your stall if preparing food.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label: \"You must have a food safety plan in place for your stall.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label:\n \"Allergens must be clearly listed on packaged and unpackaged food items.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"All stallholders must comply with local council regulations.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"No unauthorised subletting of stall space to other vendors.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Gas bottles and fuel containers must be secured and in good condition if applicable.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Fire extinguishers must be available for stalls using cooking or heating equipment.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Stallholders must not sell items that are illegal or prohibited by law.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"All electrical equipment must be tested and tagged.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Noise levels must be kept to a minimum unless part of a permitted performance.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Pets at the stall must be secured and well-behaved at all times.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Cables must be secured and not create tripping hazards.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Stalls must not obstruct emergency access routes.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"First aid kit must be available at the stall for minor injuries.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Stallholders must hold valid liability insurance where required.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"You must secure your gazebo and equipment to withstand wind or bad weather.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"You are responsible for the safety of your setup and any potential hazards.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"Generators must be quiet and pre-approved by the event organiser.\",\n value: false,\n },\n {\n category: \"Operations\",\n label:\n \"Only approved products or services may be sold — no last-minute changes.\",\n value: false,\n },\n {\n category: \"Operations\",\n label:\n \"Stallholders must arrive and be fully set up by the designated opening time.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"You may not pack down your stall before the event officially ends.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"You must be self-sufficient in all operations.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"Stall layout must be kept within your allocated space.\",\n value: false,\n },\n];\n\nconst stallTypes = [\n \"1.8m table only\",\n \"2x2m mini stall\",\n \"3x3m tent site\",\n \"Corner stall\",\n \"Craft stall with power\",\n \"Craft stall without power\",\n \"Double stall (6x3m)\",\n \"Food truck site\",\n \"Food vendor with power\",\n \"Food vendor without power\",\n \"Inside hall stall\",\n \"Non-profit/community stall\",\n \"Outdoor open area\",\n \"Shared table space\",\n \"Wall-based vendor\",\n \"Workshop/seating area\",\n] as const;\n\nexport const stallTypeOptions: StallType[] = stallTypes.map((type) => ({\n label: type,\n price: 0,\n stallCapacity: 0,\n}));\n\nexport const refundPolicyOptions: RefundPolicy[] = [\n {\n category: \"Cancelled by Vendor\",\n label: \"Full refund if cancelled 30+ days before the event.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"50% refund if cancelled 14–29 days before the event.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"No refund if cancelled less than 14 days before the event.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"Full refund if cancelled due to illness or emergency.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"No refund for no-shows or last-minute cancellations.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"No refund\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label: \"Full refund if the event is cancelled by the organiser.\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label: \"Credit towards a future event if cancelled by the organiser.\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label:\n \"Refund only in cases of force majeure (e.g., natural disasters, government restrictions).\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label: \"No refund\",\n value: false,\n },\n];\n","import { FormField } from \"src/types/global\";\n\nexport const emailField: FormField = {\n helperText: \"Enter email address\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n};\n\nexport const companyContactFields: FormField[] = [\n {\n ...emailField,\n name: \"contactDetails.email\",\n },\n {\n helperText: \"Enter your mobile phone number\",\n keyboardType: \"phone-pad\",\n name: \"contactDetails.mobilePhone\",\n placeholder: \"Mobile Phone Number\",\n },\n {\n helperText: \"Enter your landline phone number\",\n keyboardType: \"phone-pad\",\n name: \"contactDetails.landlinePhone\",\n placeholder: \"Landline Phone Number\",\n },\n];\n","import { FormField } from \"../types/global\";\n\nimport { emailField } from \"./global\";\n\nexport const loginFields: FormField[] = [\n {\n ...emailField,\n required: true,\n },\n {\n helperText: \"Enter password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n required: true,\n secureTextEntry: true,\n },\n];\n\nexport const registerFields: FormField[] = [\n {\n helperText: \"Enter first name\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n required: true,\n },\n {\n helperText: \"Enter last name\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n required: true,\n },\n {\n ...emailField,\n required: true,\n },\n {\n helperText: \"Enter password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n required: true,\n secureTextEntry: true,\n },\n {\n helperText: \"Promotional code (optional)\",\n keyboardType: \"default\",\n name: \"promoCode\",\n placeholder: \"Promotional Code\",\n required: false,\n },\n];\n\nexport const requestPasswordResetFields: FormField[] = [\n {\n ...emailField,\n helperText: \"Enter email address to reset your password\",\n required: true,\n },\n];\n\nexport const resetPasswordFields: FormField[] = [\n {\n helperText: \"Enter your new password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n required: true,\n secureTextEntry: true,\n },\n {\n helperText: \"Confirm your new password\",\n keyboardType: \"default\",\n name: \"confirmPassword\",\n placeholder: \"Confirm Password\",\n required: true,\n secureTextEntry: true,\n },\n];\n\nexport const validateVerificationTokenFields: FormField[] = [\n {\n ...emailField,\n disabled: true,\n helperText: \"Your email address\",\n },\n {\n helperText: \"Enter the Verification code sent to you by email\",\n keyboardType: \"number-pad\",\n name: \"verificationToken\",\n placeholder: \"Verification code\",\n required: true,\n },\n];\n","import { FormField } from \"../types/global\";\n\nimport { emailField } from \"./global\";\n\nexport const profileFields: FormField[] = [\n {\n ...emailField,\n disabled: true,\n helperText: \"Email cannot be changed\",\n },\n {\n helperText: \"Enter first name\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n },\n {\n helperText: \"Enter last name\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n helperText: \"Enter your new password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n {\n helperText: \"Confirm your new password\",\n keyboardType: \"default\",\n name: \"confirmPassword\",\n placeholder: \"Confirm Password\",\n secureTextEntry: true,\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const clothingAndFashion: Category[] = [\n {\n id: \"clothing-fashion\",\n name: \"Clothing & Fashion\",\n description:\n \"New, handmade, or upcycled clothing and accessories with a creative twist.\",\n subcategories: [\n {\n id: \"apparel-babywear\",\n name: \"Apparel & Babywear\",\n items: [\n {\n id: \"apparel\",\n name: \"Apparel\",\n description: \"Dresses, t-shirts, jumpers, rompers, sets, kidswear.\",\n },\n {\n id: \"baby-toddler-apparel\",\n name: \"Baby & Toddler Apparel\",\n description:\n \"Handmade baby clothes, soft shoes, bibs, hats, knitted sets.\",\n },\n {\n id: \"upcycled-fashion\",\n name: \"Upcycled Fashion\",\n description:\n \"Reworked garments, patchwork pieces, restyled vintage.\",\n },\n {\n id: \"other-wearable-items\",\n name: \"Other wearable items\",\n description: \"Unique clothing not listed above.\",\n },\n ],\n },\n {\n id: \"fashion-accessories\",\n name: \"Fashion Accessories\",\n items: [\n {\n id: \"accessories\",\n name: \"Accessories\",\n description: \"Scarves, belts, gloves, hats, headbands, caps.\",\n },\n {\n id: \"shoes\",\n name: \"Shoes\",\n description: \"Handmade shoes, baby booties, sandals, slippers.\",\n },\n {\n id: \"bags-wallets\",\n name: \"Bags & Wallets\",\n description:\n \"Leather bags, fabric purses, wallets, backpacks, totes.\",\n },\n {\n id: \"other-accessories\",\n name: \"Other accessories\",\n description: \"Brooches, pins, or hybrid functional items.\",\n },\n ],\n },\n {\n id: \"jewelry-creative-wearables\",\n name: \"Jewelry & Creative Wearables\",\n items: [\n {\n id: \"jewelry\",\n name: \"Jewelry\",\n description: \"Necklaces, earrings, bracelets, rings, anklets.\",\n },\n {\n id: \"other-creative-wearables\",\n name: \"Other creative wearables\",\n description:\n \"Wearable art, statement pieces, bold handmade designs.\",\n },\n ],\n },\n {\n id: \"traditional-cultural-clothing-accessories\",\n name: \"Traditional & Cultural Clothing and Accessories\",\n items: [\n {\n id: \"traditional-clothing-accessories\",\n name: \"Traditional Clothing & Accessories \",\n description:\n \"raditional clothing, jewellery, accessories and footwear from around the world, including both handmade and non-handmade items.\",\n },\n {\n id: \"other-traditional-cultural-items\",\n name: \"Other Traditional & Cultural Items\",\n description:\n \"traditional or culturally inspired wearables and decorative cultural pieces such as plates, table linens and similar items.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const electronicsAndTechnology: Category[] = [\n {\n id: \"electronics-technology\",\n name: \"Electronics & Technology\",\n description:\n \"New, second-hand, or handmade tech and digital items commonly found at markets.\",\n subcategories: [\n {\n id: \"mobile-everyday-tech\",\n name: \"Mobile & Everyday Tech\",\n items: [\n {\n id: \"mobile-phone-accessories\",\n name: \"Mobile & Phone Accessories\",\n description:\n \"Phone cases, holders, screen protectors, charging cables, power banks, grips.\",\n },\n {\n id: \"other-mobile-gadgets\",\n name: \"Other mobile gadgets\",\n description:\n \"Stands, styluses, SIM tools, cleaning kits, wallet accessories.\",\n },\n ],\n },\n {\n id: \"audio-music-creative-tech\",\n name: \"Audio, Music & Creative Tech\",\n items: [\n {\n id: \"audio-music-tech\",\n name: \"Audio & Music Tech\",\n description:\n \"Portable speakers, headphones, mini radios, Bluetooth adapters, sound accessories.\",\n },\n {\n id: \"instruments-music-gear\",\n name: \"Instruments & Music Gear\",\n description:\n \"Small electronic instruments, DIY synth kits, drum pads, loop machines.\",\n },\n {\n id: \"recording-creative-devices\",\n name: \"Recording & Creative Devices\",\n description:\n \"USB microphones, podcast tools, voice recorders, mobile lighting, content tools.\",\n },\n {\n id: \"other-audio-music-items\",\n name: \"Other audio or music-related items\",\n description: \"Musical gadgets or creative gear not listed above.\",\n },\n ],\n },\n {\n id: \"diy-gadgets-secondhand-finds\",\n name: \"DIY, Gadgets & Second-Hand Finds\",\n items: [\n {\n id: \"diy-electronics-tools\",\n name: \"DIY Electronics & Tools\",\n description:\n \"LED lights, USB gadgets, circuit boards, repair kits, tech-themed toys, novelty items.\",\n },\n {\n id: \"other-tech-finds\",\n name: \"Other Tech Finds\",\n description:\n \"Used electronics, smart gadgets, wearable tech, calculators, tablet stands, e-waste upcycles.\",\n },\n {\n id: \"other-technology-innovation-items\",\n name: \"Other technology or innovation-related items\",\n description: \"Anything not covered but clearly tech-driven.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const foodAndBeverages: Category[] = [\n {\n id: \"food-beverages\",\n name: \"Food & Beverages\",\n description:\n \"Fresh produce, drinks, sweet and savoury street food, ready-to-eat meals, and packaged goods.\",\n subcategories: [\n {\n id: \"fresh-food-groceries\",\n name: \"Fresh Food & Groceries\",\n items: [\n {\n id: \"fruits-vegetables\",\n name: \"Fruits & Vegetables\",\n description:\n \"Fresh seasonal fruit, organic vegetables, specialty produce, berries, tropical fruit, heritage varieties.\",\n },\n {\n id: \"meat-seafood\",\n name: \"Meat & Seafood\",\n description:\n \"Butcher cuts, fresh fish, smoked meats, sausages, seafood platters, artisanal jerky.\",\n },\n {\n id: \"dairy-eggs\",\n name: \"Dairy & Eggs\",\n description:\n \"Farm eggs, handmade cheeses, yoghurt, fresh milk, goat’s milk products.\",\n },\n {\n id: \"bakery-pastries\",\n name: \"Bakery & Pastries\",\n description:\n \"Freshly baked bread, sourdough, bagels, croissants, focaccia, traditional baked goods.\",\n },\n {\n id: \"spices-condiments\",\n name: \"Spices & Condiments\",\n description:\n \"Dried herbs, spice blends, specialty salts, hot sauces, infused oils, chutneys.\",\n },\n {\n id: \"packaged-specialty-foods\",\n name: \"Packaged & Specialty Foods\",\n description:\n \"Honey, jams, preserves, pickles, nut butters, sauces, pre-packaged snacks.\",\n },\n {\n id: \"other-fresh-food-items\",\n name: \"Other fresh food items\",\n description:\n \"Items that don’t fit above, e.g. fermented foods, plant-based substitutes.\",\n },\n ],\n },\n {\n id: \"beverages-specialty-drinks\",\n name: \"Beverages & Specialty Drinks\",\n items: [\n {\n id: \"fresh-juices-smoothies\",\n name: \"Fresh Juices & Smoothies\",\n description:\n \"Cold-pressed juices, detox blends, fruit smoothies, tropical mixes.\",\n },\n {\n id: \"coffee-teas\",\n name: \"Coffee & Teas\",\n description:\n \"Espresso, pour-over coffee, herbal teas, matcha, bubble tea, locally blended tea.\",\n },\n {\n id: \"dairy-plant-based-drinks\",\n name: \"Dairy & Plant-Based Drinks\",\n description:\n \"Milkshakes, lassis, almond/oat milk drinks, coconut water.\",\n },\n {\n id: \"alcoholic-beverages\",\n name: \"Alcoholic Beverages\",\n description:\n \"Local wines, craft beer, mead, cider, infused spirits, cocktail kits.\",\n },\n {\n id: \"other-beverages\",\n name: \"Other beverages\",\n description:\n \"Kombucha, kefir, energy drinks, non-alcoholic wines or beers.\",\n },\n ],\n },\n {\n id: \"savoury-prepared-foods-street-food\",\n name: \"Savoury Prepared Foods & Street Food\",\n items: [\n {\n id: \"local-specialties\",\n name: \"Local Specialties\",\n description:\n \"Meat pies, hangi, seafood chowder, fry bread, traditional NZ dishes.\",\n },\n {\n id: \"asian-cuisine\",\n name: \"Asian Cuisine\",\n description:\n \"Sushi, bao buns, dumplings, ramen, satay, spring rolls, fried rice.\",\n },\n {\n id: \"mediterranean-cuisine\",\n name: \"Mediterranean Cuisine\",\n description: \"Falafel, hummus wraps, souvlaki, Greek salad, dolma.\",\n },\n {\n id: \"italian-delights\",\n name: \"Italian Delights\",\n description: \"Pizza, calzone, focaccia, fresh pasta, arancini.\",\n },\n {\n id: \"bbq-grilled-foods\",\n name: \"BBQ & Grilled Foods\",\n description: \"Kebabs, grilled chicken, ribs, burgers, sausages.\",\n },\n {\n id: \"savoury-crepes-pancakes\",\n name: \"Savoury Crepes & Pancakes\",\n description: \"Filled savoury crepes, mini savoury pancakes.\",\n },\n {\n id: \"savoury-baked-goods-pastries\",\n name: \"Savoury Baked Goods & Pastries\",\n description:\n \"Quiches, savoury muffins, filled savoury pastries, empanadas.\",\n },\n {\n id: \"vegan-vegetarian-dishes\",\n name: \"Vegan & Vegetarian Dishes\",\n description:\n \"Buddha bowls, plant-based burgers, salads, vegan sushi.\",\n },\n {\n id: \"other-savoury-foods\",\n name: \"Other Savoury Foods\",\n description: \"Fusion dishes, mixed platters, savoury meal kits.\",\n },\n ],\n },\n {\n id: \"sweet-prepared-foods\",\n name: \"Sweet Prepared Foods\",\n items: [\n {\n id: \"sweet-crepes-pancakes-fried-treats\",\n name: \"Sweet Crepes, Pancakes & Fried Treats\",\n description: \"Crepes, waffles, mini pancakes, muffins, doughnuts.\",\n },\n {\n id: \"sweet-baked-goods-desserts\",\n name: \"Sweet Baked Goods & Desserts\",\n description: \"Cakes, pastries, slices, trifles, layered desserts.\",\n },\n {\n id: \"fruit-based-snacks\",\n name: \"Fruit-Based Snacks\",\n description:\n \"Fruit skewers, dried fruit packs, chocolate-dipped fruit.\",\n },\n {\n id: \"candy-confectionery\",\n name: \"Candy & Confectionery\",\n description: \"Fudge, handmade candies, toffee, nougat, brittle.\",\n },\n {\n id: \"other-sweet-foods\",\n name: \"Other Sweet Foods\",\n description: \"Fusion desserts, sweet platters, sweet meal kits.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const handmadeAndLocalProducts: Category[] = [\n {\n id: \"handmade-local-products\",\n name: \"Handmade & Local Products\",\n description: \"Unique, handmade, or locally produced artisan goods.\",\n subcategories: [\n {\n id: \"home-living\",\n name: \"Home & Living\",\n items: [\n {\n id: \"ceramics-pottery\",\n name: \"Ceramics & Pottery\",\n description:\n \"Handmade mugs, vases, bowls, decorative plates, plant pots.\",\n },\n {\n id: \"candles-home-scents\",\n name: \"Candles & Home Scents\",\n description:\n \"Soy candles, beeswax candles, wax melts, incense sticks, room sprays and herbal sachets.\",\n },\n {\n id: \"botanical-crafts\",\n name: \"Botanical Crafts\",\n description: \"Dried-flower décor and pressed-flower crafts\",\n },\n {\n id: \"textiles-embroidery\",\n name: \"Textiles & Embroidery\",\n description:\n \"Handsewn items, embroidered napkins, home linens, aprons, fabric gift wraps, handmade fabric bags, quilted goods, personalized textile gifts.\",\n },\n {\n id: \"woodcraft-metalcraft\",\n name: \"Woodcraft & Metalcraft\",\n description:\n \"Wooden boards, handmade frames, sculptures, metal signs, furniture.\",\n },\n {\n id: \"handmade-soaps-natural-body-goods\",\n name: \"Handmade Soaps & Natural Body Goods\",\n description: \"Handmade soaps, balms, oils, bath items\",\n },\n {\n id: \"seasonal-festive-crafts\",\n name: \"Seasonal & Festive Crafts\",\n description: \"Christmas, Easter and seasonal handmade decor\",\n },\n {\n id: \"other-home-living-products\",\n name: \"Other home & living products\",\n description:\n \"Items that don't fit above but serve home-related purposes.\",\n },\n ],\n },\n {\n id: \"art-personal-expression\",\n name: \"Art & Personal Expression\",\n items: [\n {\n id: \"paintings-illustrations\",\n name: \"Paintings & Illustrations\",\n description:\n \"Paintings, canvas art, hand-drawn illustrations, digital prints, graphic art and calligraphy pieces.\",\n },\n {\n id: \"sculptures-carvings\",\n name: \"Sculptures & Carvings \",\n description:\n \"Sculptures made from wood, stone, metal, clay or resin, carved decorative pieces and artistic 3D works.\",\n },\n {\n id: \"creative-handmade-alternative-art\",\n name: \"Creative Handmade & Alternative Art\",\n description:\n \"Handmade textile décor, fabric ornaments, mixed-media art, creative craft pieces and modern handmade artworks.\",\n },\n {\n id: \"handmade-mini-figures-decor\",\n name: \"Handmade Mini Figures & Décor\",\n description:\n \"Small handmade figures, tiny houses and crafted mini decorative items.\",\n },\n {\n id: \"other-artistic-expressive-products\",\n name: \"Other Artistic or Expressive Products\",\n description:\n \"Custom artworks, specialty handmade décor, unique crafts.\",\n },\n ],\n },\n {\n id: \"handmade-jewellery-accessories-cultural-crafts\",\n name: \"Handmade Jewellery, Accessories & Cultural Crafts\",\n items: [\n {\n id: \"jewellery-handmade-items-nz-traditional-materials\",\n name: \"Jewellery & Handmade Items from NZ Traditional Materials\",\n description:\n \"Handmade jewellery and decorative or functional items crafted from pounamu, bone, wood and other traditional New Zealand materials.\",\n },\n {\n id: \"maori-pasifika-cultural-crafts-clothing\",\n name: \"Māori & Pasifika Cultural Crafts and Clothing\",\n description:\n \"Culturally inspired handmade items, accessories and garments featuring Māori or Pasifika motifs, traditional patterns and regional craftsmanship.\",\n },\n {\n id: \"traditional-handmade-clothing-jewellery-crafts-global-cultures\",\n name: \"Traditional Handmade Clothing, Jewellery & Crafts from Global Cultures\",\n description:\n \"Handcrafted clothing, jewellery and cultural items from diverse traditions — including Asian, African, European, Middle Eastern, Indian, Chinese, Japanese, Pacific, and other culturally significant handmade pieces.\",\n },\n {\n id: \"other-handmade-cultural-items\",\n name: \"Other Handmade Cultural Items\",\n description:\n \"Unique or culturally inspired handmade pieces not specifically covered in the categories above.\",\n },\n ],\n },\n {\n id: \"gift-ideas-accessories\",\n name: \"Gift Ideas & Accessories\",\n items: [\n {\n id: \"handmade-pens-keychains-fridge-magnets\",\n name: \"Handmade Pens, Keychains and Fridge Magnets\",\n description: null,\n },\n {\n id: \"gift-packaging-wrapping-accessories\",\n name: \"Gift Packaging & Wrapping Accessories\",\n description: null,\n },\n {\n id: \"handmade-crochet-knitting-fibre-crafts\",\n name: \"Handmade Crochet, Knitting & Fibre Crafts\",\n description:\n \"Handmade crochet and knitted items, fabric-based crafts, small decorative pieces, creative fibre artworks and unique handcrafted accessories.\",\n },\n {\n id: \"handmade-toys-mini-play-items\",\n name: \"Handmade Toys & Mini Play Items\",\n description:\n \"small handmade toys, soft toys, wooden miniatures, crochet or felt play pieces\",\n },\n {\n id: \"other-small-handmade-gifts-accessories\",\n name: \"Other small handmade gifts or accessories\",\n description: \"Compact creative items made to surprise or delight.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const healthAndWellness: Category[] = [\n {\n id: \"health-wellness\",\n name: \"Health & Wellness\",\n description:\n \"Natural products and services that promote wellbeing, body care, and holistic health.\",\n subcategories: [\n {\n id: \"body-skincare\",\n name: \"Body & Skincare\",\n items: [\n {\n id: \"skincare-body-products\",\n name: \"Skincare & Body Products\",\n description:\n \"Soaps, creams, lip balms, bath salts, bath bombs, body oils, natural deodorants.\",\n },\n {\n id: \"other-body-care-items\",\n name: \"Other body care items\",\n description:\n \"Additional handmade or eco-conscious personal care goods.\",\n },\n ],\n },\n {\n id: \"aromatherapy-herbal-wellness\",\n name: \"Aromatherapy & Herbal Wellness\",\n items: [\n {\n id: \"aromatherapy-herbal-remedies\",\n name: \"Aromatherapy & Herbal Remedies\",\n description:\n \"Essential oils, herbal balms, massage oils, salves, natural teas, rollers.\",\n },\n {\n id: \"other-herbal-aroma-products\",\n name: \"Other herbal or aroma-based products\",\n description: \"Wellness blends, herb sachets, custom infusions.\",\n },\n ],\n },\n {\n id: \"wellness-tools-accessories\",\n name: \"Wellness Tools & Accessories\",\n items: [\n {\n id: \"wellness-accessories\",\n name: \"Wellness Accessories\",\n description:\n \"Yoga mats, meditation cushions, eye pillows, incense, smudging sticks, eco water bottles, wellness journals.\",\n },\n {\n id: \"spiritual-tools-crystals\",\n name: \"Spiritual Tools & Crystals\",\n description:\n \"Healing crystals, gemstone bracelets, pendulums, sprays, spiritual kits, altar decor.\",\n },\n {\n id: \"other-wellness-spiritual-items\",\n name: \"Other wellness or spiritual items\",\n description: \"Items that aid relaxation, focus, or inner work.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const homeGardenHousehold: Category[] = [\n {\n id: \"home-garden-household-goods\",\n name: \"Home, Garden & Household Goods\",\n description:\n \"Functional, decorative, and eco-conscious products designed for everyday use indoors and outdoors.\",\n subcategories: [\n {\n id: \"home-decor-living\",\n name: \"Home Decor & Living\",\n items: [\n {\n id: \"home-decor\",\n name: \"Home Decor\",\n description:\n \"Cushions, wall art, table runners, vases, trays, mirrors, handmade centerpieces.\",\n },\n {\n id: \"kitchenware-dining\",\n name: \"Kitchenware & Dining\",\n description:\n \"Mugs, bowls, cutting boards, utensils, jars, coasters, kitchen textiles.\",\n },\n {\n id: \"mini-figures-decor\",\n name: \"Mini Figures & Décor\",\n description:\n \"handmade or non-handmade small figures, tiny houses and miniature decorative items.\",\n },\n {\n id: \"other-indoor-home-items\",\n name: \"Other indoor home items\",\n description:\n \"Any decorative or practical household items not listed above.\",\n },\n ],\n },\n {\n id: \"cleaning-eco-essentials\",\n name: \"Cleaning & Eco Essentials\",\n items: [\n {\n id: \"cleaning-eco-supplies\",\n name: \"Cleaning & Eco Supplies\",\n description:\n \"Beeswax wraps, reusable cloths, brushes, natural soaps, detergent bars, eco sponges.\",\n },\n {\n id: \"other-eco-cleaning-items\",\n name: \"Other eco or cleaning items\",\n description: \"Environmentally friendly goods not listed above.\",\n },\n ],\n },\n {\n id: \"garden-outdoor-living\",\n name: \"Garden & Outdoor Living\",\n items: [\n {\n id: \"plants-botanical-decor\",\n name: \"Plants & Botanical Decor\",\n description:\n \"Potted herbs, succulents, dried flowers, terrariums, plant-based ornaments.\",\n },\n {\n id: \"fresh-flowers-botanical-bouquets\",\n name: \"Fresh Flowers & Botanical Bouquets\",\n description:\n \"Cut flowers, seasonal bouquets, simple floral arrangements, native flower selections, and other fresh botanical items.\",\n },\n {\n id: \"natural-decor-nature-inspired-elements\",\n name: \"Natural Decor & Nature-Inspired Elements\",\n description:\n \"Seashell décor, driftwood pieces, sand ornaments, natural wood accents, stone or mineral decorations, and other nature-based decorative items.\",\n },\n {\n id: \"garden-tools-outdoor-items\",\n name: \"Garden Tools & Outdoor Items\",\n description:\n \"Plant markers, garden signs, stakes, small tools, wind chimes, gifts.\",\n },\n {\n id: \"other-outdoor-garden-products\",\n name: \"Other outdoor or garden products\",\n description: \"Functional or decorative items for outside use.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const petProductsAndAnimalGoods: Category[] = [\n {\n id: \"pet-products-animal-goods\",\n name: \"Pet Products & Animal Goods\",\n description: \"Items for pets, pet lovers, or animal-themed market stalls.\",\n subcategories: [\n {\n id: \"products-for-pets\",\n name: \"Products for Pets\",\n items: [\n {\n id: \"pet-food-treats\",\n name: \"Pet Food & Treats\",\n description:\n \"Homemade dog biscuits, cat snacks, natural chews, pet-safe cakes, training treats.\",\n },\n {\n id: \"apparel-toys-accessories\",\n name: \"Apparel, Toys & Accessories\",\n description:\n \"Leashes, collars, harnesses, toys, grooming tools, beds, travel gear, jumpers, bandanas.\",\n },\n {\n id: \"other-pet-products\",\n name: \"Other pet products\",\n description: \"Any pet-related items not listed above.\",\n },\n ],\n },\n {\n id: \"small-pets-birds-exotic-animals\",\n name: \"Small Pets, Birds & Exotic Animals\",\n items: [\n {\n id: \"products-small-pets-birds-exotics\",\n name: \"Products for Small Pets, Birds & Exotics\",\n description:\n \"Toys, enclosures, perches, feeding bowls, bedding, habitat decor, transport gear, and care items for birds, rabbits, hamsters, reptiles, turtles, aquarium pets, and other exotic species.\",\n },\n {\n id: \"other-small-exotic-animal-items\",\n name: \"Other small or exotic animal items\",\n description: \"Unusual accessories for non-mainstream pets.\",\n },\n ],\n },\n {\n id: \"farm-working-animals\",\n name: \"Farm & Working Animals\",\n items: [\n {\n id: \"goods-for-farm-working-animals\",\n name: \"Goods for Farm & Working Animals\",\n description:\n \"Treats, care products, equipment, signage and accessories for chickens, goats, alpacas, horses, and other livestock.\",\n },\n {\n id: \"other-farm-animal-items\",\n name: \"Other farm animal-related items\",\n description:\n \"Rural, barnyard, or utility-specific gear not listed above.\",\n },\n ],\n },\n {\n id: \"animal-themed-gifts-custom-items\",\n name: \"Animal-Themed Gifts & Custom Items\",\n items: [\n {\n id: \"pet-art-custom-gifts\",\n name: \"Pet Art & Custom Gifts\",\n description:\n \"Pet portraits, name tags, personalized bowls, breed-specific items, pet-themed home decor and stationery.\",\n },\n {\n id: \"other-animal-themed-gifts\",\n name: \"Other animal-themed gifts\",\n description:\n \"Artistic or sentimental items made for animal lovers.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"src/types\";\n\n/* eslint-disable sort-keys */\nexport const serviceAndExperience: Category[] = [\n {\n id: \"services-experiences\",\n name: \"Services & Experiences\",\n description:\n \"On-site offerings that provide entertainment, personal care, learning, or interactive activities beyond products.\",\n subcategories: [\n {\n id: \"personal-care-body-art\",\n name: \"Personal Care & Body Art\",\n items: [\n {\n id: \"nails-handcare\",\n name: \"Nails & Handcare\",\n description:\n \"Nail painting, decoration, quick manicures, temporary nail extensions.\",\n },\n {\n id: \"hair-styling-braiding\",\n name: \"Hair Styling & Braiding\",\n description:\n \"Hair braiding, plaits, child-friendly festival hairstyles.\",\n },\n {\n id: \"face-body-decoration\",\n name: \"Face & Body Decoration\",\n description:\n \"Henna, glitter tattoos, face painting, light makeup, eyelash styling, professional tattooing (where permitted).\",\n },\n {\n id: \"other-beauty-grooming-services\",\n name: \"Other beauty or grooming services\",\n description: \"Small-scale personal care options offered on-site.\",\n },\n ],\n },\n {\n id: \"practical-wellness-services\",\n name: \"Practical & Wellness Services\",\n items: [\n {\n id: \"mobile-practical-services\",\n name: \"Mobile & Practical Services\",\n description:\n \"Shoe repair, phone repairs, knife sharpening, key cutting, battery replacement, bike repairs, engraving.\",\n },\n {\n id: \"wellness-alternative-therapies\",\n name: \"Wellness & Alternative Therapies\",\n description:\n \"Massage, aromatherapy, reflexology, energy healing (e.g. Reiki), natural consultations.\",\n },\n {\n id: \"other-service-based-offerings\",\n name: \"Other service-based offerings\",\n description: \"Wellness or functional services not listed above.\",\n },\n ],\n },\n {\n id: \"creative-educational-experiences\",\n name: \"Creative & Educational Experiences\",\n items: [\n {\n id: \"creative-workshops-maker-services\",\n name: \"Creative Workshops & Maker Services\",\n description:\n \"Candle making, pottery, jewelry crafting, soap or balm workshops, calligraphy, seasonal crafts.\",\n },\n {\n id: \"education-awareness-stalls\",\n name: \"Education & Awareness Stalls\",\n description:\n \"Eco awareness, cultural storytelling, local history, first aid demos, health booths, sustainability education, kids’ science displays.\",\n },\n {\n id: \"other-creative-educational-services\",\n name: \"Other creative or educational services\",\n description:\n \"Informal learning, demonstrations, or community-focused sessions.\",\n },\n ],\n },\n {\n id: \"kids-activities-family-fun\",\n name: \"Kids’ Activities & Family Fun\",\n items: [\n {\n id: \"kids-activities-fun\",\n name: \"Kids’ Activities & Fun\",\n description:\n \"Face painting, glitter tattoos, pony rides, bouncy castles, small amusement rides, balloon twisting, animal petting zones.\",\n },\n {\n id: \"other-family-oriented-activities\",\n name: \"Other family-oriented activities\",\n description:\n \"On-site entertainment that engages children or family groups.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"src/types\";\n\n/* eslint-disable sort-keys */\nexport const toysChildren: Category[] = [\n {\n id: \"toys-childrens-items\",\n name: \"Toys & Children’s Items\",\n description: \"Products and services made for or inspired by children.\",\n subcategories: [\n {\n id: \"toys-playthings\",\n name: \"Toys & Playthings\",\n items: [\n {\n id: \"toys-classic-electric-character\",\n name: \"Toys – Classic, Electric & Character-Based\",\n description:\n \"Building blocks, dolls, puzzles, plush animals, toy vehicles, remote-control toys, light-up gadgets, character figurines, themed playsets.\",\n },\n {\n id: \"handmade-toys-crafty-playthings\",\n name: \"Handmade Toys & Crafty Playthings\",\n description:\n \"Wooden puzzles, crocheted animals, felt toys, fabric dolls, DIY kits, nature-inspired games, sensory toys.\",\n },\n {\n id: \"other-play-items\",\n name: \"Other play items\",\n description:\n \"Toys not listed above, including limited-edition or hybrid items.\",\n },\n ],\n },\n {\n id: \"educational-developmental\",\n name: \"Educational & Developmental\",\n items: [\n {\n id: \"educational-developmental-tools\",\n name: \"Educational & Developmental Tools\",\n description:\n \"STEM kits, Montessori toys, storybooks, picture books, flashcards, early learning games, language tools.\",\n },\n {\n id: \"other-educational-experience-based-items\",\n name: \"Other educational or experience-based items\",\n description:\n \"Creative experiences or learning aids not listed above.\",\n },\n ],\n },\n {\n id: \"baby-kidswear-accessories\",\n name: \"Baby & Kidswear + Accessories\",\n items: [\n {\n id: \"baby-kidswear-accessories\",\n name: \"Baby & Kidswear + Accessories\",\n description:\n \"Handmade baby clothes, toddler outfits, bibs, hats, headbands, bags, pacifier clips, soft shoes.\",\n },\n {\n id: \"baby-developmental-soft-toys\",\n name: \"Baby Developmental Soft Toys\",\n description:\n \"Sensory toys, rattles, fabric books, teething items, high-contrast cards, and early-skill. Montessori materials designed to support infants’ cognitive and motor development.\",\n },\n {\n id: \"other-childrens-clothing-accessories\",\n name: \"Other children’s clothing or accessories\",\n description: \"Unique fashion or functional pieces for kids.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const vintageAndAntique: Category[] = [\n {\n id: \"vintage-antique\",\n name: \"Vintage & Antique\",\n description:\n \"Unique, historic, or nostalgic items with collectible or decorative value.\",\n subcategories: [\n {\n id: \"vintage-antique-clothing-accessories\",\n name: \"Vintage & Antique Clothing & Accessories\",\n items: [\n {\n id: \"clothing-vintage-fashion\",\n name: \"Clothing and wearable items from past eras\",\n description:\n \"Vintage dresses, jackets, hats, gloves, belts, bags, shoes, jewellery.\",\n },\n {\n id: \"other-clothing-accessory-items\",\n name: \"Other clothing-related items\",\n description:\n \"Hair clips, brooches, pins, scarf rings, small fashion accessories.\",\n },\n ],\n },\n {\n id: \"collectibles-memorabilia\",\n name: \"Collectibles & Memorabilia\",\n items: [\n {\n id: \"small-collectible-items\",\n name: \"Small collectible items with historical or nostalgic significance\",\n description:\n \"Coins, stamps, toys, postcards, comics, sports cards, vintage packaging.\",\n },\n {\n id: \"other-collectible-items\",\n name: \"Other collectible items\",\n description:\n \"Rare small objects, miniature figurines, special-edition items.\",\n },\n ],\n },\n {\n id: \"homewares-decor-curiosities\",\n name: \"Homewares, Decor & Curiosities\",\n items: [\n {\n id: \"decorative-functional-vintage-items\",\n name: \"Decorative or functional items with a vintage or antique aesthetic\",\n description:\n \"Teacups, plates, vases, mirrors, clocks, furniture, old tools, lanterns, typewriters, curiosities.\",\n },\n {\n id: \"handmade-vintage-art\",\n name: \"Handmade vintage art\",\n description: \"Paintings, sculptures, crafted pieces.\",\n },\n {\n id: \"other-home-decor-items\",\n name: \"Other home or decor items\",\n description:\n \"Decorative pieces not listed above, unique household objects.\",\n },\n ],\n },\n {\n id: \"vintage-media-printed-nostalgia\",\n name: \"Vintage Media & Printed Nostalgia\",\n items: [\n {\n id: \"older-media-printed-works\",\n name: \"Older media formats and printed works\",\n description:\n \"Vinyl records, cassette tapes, CDs, DVDs, books, magazines, board games, posters.\",\n },\n {\n id: \"other-media-printed-items\",\n name: \"Other media or printed items\",\n description: \"Maps, manuals, leaflets, out-of-print materials.\",\n },\n ],\n },\n {\n id: \"other-vintage-antique-items\",\n name: \"Other Vintage & Antique Items\",\n items: [\n {\n id: \"any-vintage-antique-items-not-listed\",\n name: \"Any vintage or antique items not listed above\",\n description: \"Unique, rare or uncategorised pieces.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"../../types/global\";\n\nimport { clothingAndFashion } from \"./clothingAndFashion\";\nimport { electronicsAndTechnology } from \"./electronicsAndTechnology\";\nimport { foodAndBeverages } from \"./foodAndBeverages\";\nimport { handmadeAndLocalProducts } from \"./handmadeAndLocalProducts\";\nimport { healthAndWellness } from \"./healthAndWellness\";\nimport { homeGardenHousehold } from \"./homeGardenHousehold\";\nimport { petProductsAndAnimalGoods } from \"./petProductsAndAnimalGoods\";\nimport { serviceAndExperience } from \"./serviceAndExperience\";\nimport { toysChildren } from \"./toysChildren\";\nimport { vintageAndAntique } from \"./vintageAndAntique\";\n\nexport const categoryColors: Record<string, string> = {\n \"clothing-fashion\": \"#9D4EDD\",\n \"electronics-technology\": \"#3AF3FF\",\n \"food-beverages\": \"#FF0D1F\",\n \"handmade-local-products\": \"#EE7E54\",\n \"health-wellness\": \"#E23794\",\n \"home-garden-household-goods\": \"#067325\",\n \"pet-products-animal-goods\": \"#68E788\",\n \"services-experiences\": \"#2E16A5\",\n \"toys-childrens-items\": \"#FFF966\",\n \"vintage-antique\": \"#8D6748\",\n};\n\nconst assignColorToCategories = (categories: Category[]): Category[] => {\n const result = categories.map((category) => ({\n ...category,\n color: categoryColors[category.id],\n }));\n return result;\n};\n\nexport const availableCategories = assignColorToCategories([\n ...foodAndBeverages,\n ...handmadeAndLocalProducts,\n ...clothingAndFashion,\n ...homeGardenHousehold,\n ...toysChildren,\n ...healthAndWellness,\n ...electronicsAndTechnology,\n ...vintageAndAntique,\n ...petProductsAndAnimalGoods,\n ...serviceAndExperience,\n]);\n","import { FormField } from \"../types/global\";\n\nconst socialMedia = [\n {\n key: \"facebook\",\n name: \"Facebook\",\n placeholder: \"https://www.facebook.com/your-page\",\n },\n {\n key: \"instagram\",\n name: \"Instagram\",\n placeholder: \"https://www.instagram.com/your-profile\",\n },\n {\n key: \"tiktok\",\n name: \"TikTok\",\n placeholder: \"https://www.tiktok.com/@your-profile\",\n },\n {\n key: \"twitter\",\n name: \"Twitter\",\n placeholder: \"https://twitter.com/your-profile\",\n },\n {\n key: \"website\",\n name: \"Website\",\n placeholder: \"https://www.yourwebsite.com\",\n },\n {\n key: \"youtube\",\n name: \"YouTube\",\n placeholder: \"https://www.youtube.com/channel/your-channel\",\n },\n];\nexport const socialMediaFields: FormField[] = socialMedia.map((link) => ({\n helperText: link.name,\n keyboardType: \"url\",\n name: link.key,\n placeholder: link.placeholder,\n}));\n","import { FormField } from \"src/types\";\n\nimport { emailField } from \"./global\";\n\nexport const contactUsFields: FormField[] = [\n {\n helperText: \"Enter first name *\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n },\n {\n helperText: \"Enter last name *\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n ...emailField,\n helperText: \"Enter email address *\",\n },\n {\n helperText: \"Enter your message *\",\n isTextArea: true,\n keyboardType: \"default\",\n name: \"message\",\n placeholder: \"Message\",\n },\n];\n","import { FormField } from \"../types/global\";\n\nexport const partnerBasicInfoFields: FormField[] = [\n {\n helperText: \"Business Name *\",\n name: \"name\",\n placeholder: \"Business Name\",\n },\n {\n helperText:\n \"NZBN number (required – ClueMart only accepts partners with valid NZBN number) *\",\n keyboardType: \"number-pad\",\n name: \"nzbn\",\n placeholder: \"NZBN number\",\n },\n {\n helperText: \"Description *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n];\n","import { useMutation } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport {\n ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION,\n ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION,\n ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,\n} from \"src/graphql/mutations/admin\";\nimport { GET_EVENT } from \"src/graphql/queries/event\";\nimport { GET_VENDOR } from \"src/graphql/queries/vendor\";\n\nexport const useAdminUpdateResourceType = () => {\n const [adminUpdateResourceType, { loading, error }] = useMutation<{\n adminUpdateResourceType: {\n resourceId: string;\n resourceType: EnumResourceType;\n };\n }>(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract resourceId and resourceType from the mutation response\n const adminUpdateResourceType =\n mutationResult?.data?.adminUpdateResourceType;\n const resourceId = adminUpdateResourceType?.resourceId;\n const resourceType = adminUpdateResourceType?.resourceType;\n\n if (!resourceId) return [];\n\n const detectQuery =\n resourceType === EnumResourceType.EVENT ? GET_EVENT : GET_VENDOR;\n\n return [\n {\n query: detectQuery,\n variables: { _id: resourceId },\n },\n ];\n },\n });\n\n return {\n adminUpdateResourceType,\n error,\n loading,\n };\n};\n\nexport const useAdminResendUserVerificationEmail = () => {\n const [adminResendUserVerificationEmail, { loading, error }] = useMutation(\n ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION,\n );\n\n return {\n adminResendUserVerificationEmail,\n error,\n loading,\n };\n};\n\nexport const useAdminPermanentlyDeleteResource = () => {\n const [adminPermanentlyDeleteResource, { loading, error }] = useMutation(\n ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION,\n );\n\n return {\n adminPermanentlyDeleteResource,\n error,\n loading,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = gql`\n mutation adminUpdateResourceType($input: AdminUpdateResourceInputType!) {\n adminUpdateResourceType(input: $input) {\n active\n resourceId\n resourceType\n }\n }\n`;\n\nexport const ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = gql`\n mutation adminResendUserVerificationEmail($userId: ID!) {\n adminResendUserVerificationEmail(userId: $userId)\n }\n`;\n\nexport const ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = gql`\n mutation adminPermanentlyDeleteResource(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n adminPermanentlyDeleteResource(\n resourceId: $resourceId\n resourceType: $resourceType\n )\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n DATETIME_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n ASSOCIATES_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n RELATION_DATES_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n STALL_TYPE_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n EVENT_LIST_ITEM,\n} from \"./global\";\n\nexport const EVENT_INFO = gql`\n fragment EventInfoFields on EventInfoType {\n _id\n applicationDeadlineHours\n dateTime {\n dateStatus\n endDate\n endTime\n stallTypes {\n ...StallTypeFields\n }\n startDate\n startTime\n }\n eventId\n packInTime\n paymentDueHours\n paymentInfo {\n accountHolderName\n accountNumber\n link\n paymentMethod\n }\n refundPolicy {\n category\n label\n value\n }\n requirements {\n category\n label\n value\n }\n }\n ${STALL_TYPE_FIELDS_FRAGMENT}\n`;\n\nexport const EVENT = gql`\n fragment EventFields on EventType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n adIds\n cover {\n ...ResourceImageFields\n }\n claimed\n createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n dateTime {\n ...DateTimeFields\n }\n description\n deletedAt\n googlePlaceId\n images {\n ...ResourceImageFields\n }\n eventType\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n eventInfoId\n name\n nzbn\n owner {\n ...OwnerFields\n }\n promoCodes\n provider\n posterUsage {\n ...PosterUsageFields\n }\n region\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n rating\n reviewCount\n rainOrShine\n socialMedia {\n ...SocialMediaFields\n }\n tags\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n\nexport const GET_EVENTS = gql`\n query getEvents {\n events {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENT = gql`\n query getEvent($_id: ID!) {\n event(_id: $_id) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const GET_EVENT_BY_PLACE_ID = gql`\n query getEventByPlaceId($googlePlaceId: String!) {\n eventByPlaceId(googlePlaceId: $googlePlaceId) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENTS_BY_REGION = gql`\n query getEventsByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n eventsByRegion(region: $region, options: $options) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const SEARCH_EVENTS = gql`\n query searchEvents($region: String, $search: String, $tags: [String]) {\n eventsSearch(region: $region, search: $search, tags: $tags) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENTS_NEAR_ME = gql`\n query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {\n eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENT_INFO = gql`\n query getEventInfo($eventId: ID!) {\n eventInfo(eventId: $eventId) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const POSTER_USAGE_FIELDS_FRAGMENT = gql`\n fragment PosterUsageFields on PosterUsageType {\n month\n count\n }\n`;\n\nexport const SOCIAL_MEDIA_FIELDS_FRAGMENT = gql`\n fragment SocialMediaFields on SocialMediaType {\n name\n link\n }\n`;\n\nexport const RESOURCE_IMAGE_FIELDS_FRAGMENT = gql`\n fragment ResourceImageFields on ResourceImageType {\n active\n source\n title\n }\n`;\n\nexport const OWNER_FIELDS_FRAGMENT = gql`\n fragment OwnerFields on OwnerType {\n email\n userId\n }\n`;\n\nexport const CATEGORY_FIELDS_FRAGMENT = gql`\n fragment CategoryFields on CategoryType {\n id\n name\n subcategories {\n id\n items {\n id\n name\n }\n name\n }\n }\n`;\n\nexport const LICENCE_FIELDS_FRAGMENT = gql`\n fragment LicenceFields on UserLicenceType {\n expiryDate\n issuedDate\n licenceType\n prevLicenceType\n }\n`;\n\nexport const ASSOCIATES_FIELDS_FRAGMENT = gql`\n fragment AssociatesFields on AssociateType {\n email\n resourceId\n resourceType\n licence {\n ...LicenceFields\n }\n }\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n\nexport const TERMS_AGREEMENT_FIELDS_FRAGMENT = gql`\n fragment TermsAgreementFields on TermsAgreementType {\n appBuildNumber\n appId\n appVersion\n brand\n deviceName\n installationId\n manufacturer\n modelName\n osName\n osVersion\n termVersion\n timestamp\n }\n`;\n\nexport const DATETIME_FIELDS_FRAGMENT = gql`\n fragment DateTimeFields on DateTimeType {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n }\n`;\n\nconst USER_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment UserActivityFields on UserActivityType {\n favourites {\n events\n partners\n vendors\n }\n going {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n interested {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n present {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n }\n ${DATETIME_FIELDS_FRAGMENT}\n`;\n\nexport const USER_FIELDS_FRAGMENT = gql`\n fragment UserFields on UserType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n avatar {\n ...ResourceImageFields\n }\n createdAt\n deletedAt\n email\n events\n firstName\n game\n isTester\n lastName\n licences {\n ...LicenceFields\n }\n partner\n overallPoints\n platform\n preferredRegion\n promoCodes\n role\n school\n termsAgreement {\n ...TermsAgreementFields\n }\n userActivity {\n ...UserActivityFields\n }\n vendor\n updatedAt\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${USER_ACTIVITY_FIELDS_FRAGMENT}\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n\nexport const STALL_TYPE_FIELDS_FRAGMENT = gql`\n fragment StallTypeFields on StallTypeType {\n label\n price\n stallCapacity\n }\n`;\n\nexport const RELATION_DATES_FRAGMENT = gql`\n fragment RelationDates on RelationDateType {\n dateTime {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n stallType {\n ...StallTypeFields\n }\n }\n lastUpdateBy {\n resourceId\n userEmail\n }\n paymentReference\n status\n }\n ${STALL_TYPE_FIELDS_FRAGMENT}\n`;\n\nexport const CONTACT_DETAILS_FIELDS_FRAGMENT = gql`\n fragment ContactDetailsFields on ContactDetailsType {\n email\n landlinePhone\n mobilePhone\n }\n`;\n\nexport const LOCATION_GEO_FIELDS_FRAGMENT = gql`\n fragment LocationGeoFields on LocationGeoType {\n coordinates\n type\n }\n`;\n\nexport const LOCATION_FIELDS_FRAGMENT = gql`\n fragment LocationFields on LocationType {\n city\n country\n fullAddress\n geo {\n ...LocationGeoFields\n }\n latitude\n longitude\n region\n }\n ${LOCATION_GEO_FIELDS_FRAGMENT}\n`;\n\nexport const EVENT_LIST_ITEM = gql`\n fragment EventListItemFields on EventListItemType {\n _id\n active\n claimed\n cover {\n ...ResourceImageFields\n }\n createdAt\n dateTime {\n ...DateTimeFields\n }\n deletedAt\n description\n eventType\n googlePlaceId\n images {\n ...ResourceImageFields\n }\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n rainOrShine\n rating\n region\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n reviewCount\n updatedAt\n }\n ${DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n OWNER_FIELDS_FRAGMENT,\n CATEGORY_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n RELATION_DATES_FRAGMENT,\n ASSOCIATES_FIELDS_FRAGMENT,\n DATETIME_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n} from \"./global\";\n\nconst VENDOR_DATETIME_FIELDS_FRAGMENT = gql`\n fragment VendorDateTimeFields on VendorDateTimeType {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n }\n`;\n\nconst VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = gql`\n fragment VendorProductListFields on VendorProductListType {\n description\n name\n price\n priceUnit\n productGroups\n }\n`;\n\nexport const VENDOR = gql`\n fragment VendorFields on VendorType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n adIds\n availability {\n corporate\n private\n school\n }\n vendorInfoId\n categories {\n ...CategoryFields\n }\n calendar {\n active\n calendarData {\n dateTime {\n ...VendorDateTimeFields\n }\n description\n location {\n ...LocationFields\n }\n }\n }\n contactDetails {\n ...ContactDetailsFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n claimed\n description\n deletedAt\n foodTruck\n images {\n ...ResourceImageFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n owner {\n ...OwnerFields\n }\n products {\n active\n productsList {\n ...VendorProductListFields\n }\n }\n promoCodes\n posterUsage {\n ...PosterUsageFields\n }\n rating\n region\n reviewCount\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n socialMedia {\n ...SocialMediaFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n vendorType\n unregisteredVendorId\n }\n ${CATEGORY_FIELDS_FRAGMENT}\n ${VENDOR_DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n\nconst VENDOR_ATTRIBUTES_FRAGMENT = gql`\n fragment VendorAttributesFields on VendorAttributesType {\n details\n isRequired\n }\n`;\n\nexport const VENDOR_INFO = gql`\n fragment VendorInfoFields on VendorInfoType {\n _id\n compliance {\n foodBeverageLicense\n liabilityInsurance\n }\n documents {\n ...ResourceImageFields\n }\n requirements {\n electricity {\n ...VendorAttributesFields\n }\n gazebo {\n ...VendorAttributesFields\n }\n table {\n ...VendorAttributesFields\n }\n }\n product {\n foodFlavors\n packaging\n priceRange {\n max\n min\n }\n producedIn\n }\n stallInfo {\n size {\n depth\n width\n }\n }\n vendorId\n }\n ${VENDOR_ATTRIBUTES_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nconst UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql`\n fragment UnregisteredVendorInvitationFields on UnregisteredVendorInvitationType {\n dateTime {\n ...DateTimeFields\n }\n inviterId\n }\n ${DATETIME_FIELDS_FRAGMENT}\n`;\n\nexport const UNREGISTERED_VENDOR = gql`\n fragment UnregisteredVendorFields on UnregisteredVendorType {\n _id\n active\n categoryIds\n claimed\n createdAt\n deletedAt\n email\n invitations {\n ...UnregisteredVendorInvitationFields\n }\n name\n region\n updatedAt\n }\n ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}\n`;\n\nexport const GET_VENDORS = gql`\n query getVendors {\n vendors {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDOR = gql`\n query getVendor($_id: ID!) {\n vendor(_id: $_id) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDORS_BY_REGION = gql`\n query getVendorsByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n vendorsByRegion(region: $region, options: $options) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const SEARCH_VENDORS = gql`\n query searchVendors($search: String!, $region: String) {\n vendorSearch(search: $search, region: $region) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDOR_INFO = gql`\n query getVendorInfo($vendorId: ID!) {\n vendorInfo(vendorId: $vendorId) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const GET_UNREGISTERED_VENDORS = gql`\n query getUnregisteredVendors {\n unregisteredVendors {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const GET_UNREGISTERED_VENDORS_BY_INVITER_ID = gql`\n query getUnregisteredVendorsByInviterId($inviterId: ID!) {\n unregisteredVendorsByInviterId(inviterId: $inviterId) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const GET_UNREGISTERED_VENDOR = gql`\n query getUnregisteredVendor($_id: ID!) {\n unregisteredVendor(_id: $_id) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { AuthPayloadType, RefreshTokenPayloadType } from \"src/types/auth\";\n\nimport {\n REQUEST_PASSWORD_RESET_MUTATION,\n LOGIN_MUTATION,\n REGISTER_MUTATION,\n VALIDATE_VERIFICATION_TOKEN_MUTATION,\n RESET_PASSWORD_MUTATION,\n LOGOUT_MUTATION,\n REFRESH_TOKEN_MUTATION,\n} from \"../mutations/auth\";\n\nexport const useRegister = () => {\n const [register, { loading, error }] = useMutation<{\n register: AuthPayloadType;\n }>(REGISTER_MUTATION);\n return { error, loading, register };\n};\n\nexport const useLogin = () => {\n const [login, { loading, error }] = useMutation<{\n login: AuthPayloadType;\n }>(LOGIN_MUTATION);\n return { error, loading, login };\n};\n\nexport const useLogout = () => {\n const [logout, { loading, error }] = useMutation(LOGOUT_MUTATION);\n return { error, loading, logout };\n};\n\nexport const useRefreshToken = () => {\n const [refreshToken, { loading, error }] = useMutation<{\n refreshToken: RefreshTokenPayloadType;\n }>(REFRESH_TOKEN_MUTATION);\n return { error, loading, refreshToken };\n};\n\nexport const useRequestPasswordReset = () => {\n const [requestPasswordReset, { loading, error }] = useMutation(\n REQUEST_PASSWORD_RESET_MUTATION,\n );\n\n return { error, loading, requestPasswordReset };\n};\n\nexport const useValidateVerificationToken = () => {\n const [validateVerificationToken, { loading, error }] = useMutation(\n VALIDATE_VERIFICATION_TOKEN_MUTATION,\n );\n\n return { error, loading, validateVerificationToken };\n};\n\nexport const useResetPassword = () => {\n const [resetPassword, { loading, error }] = useMutation(\n RESET_PASSWORD_MUTATION,\n );\n\n return { error, loading, resetPassword };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { USER_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const REGISTER_MUTATION = gql`\n mutation register($input: RegisterInputType!) {\n register(input: $input) {\n message\n refreshToken\n token\n user {\n ...UserFields\n }\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const LOGIN_MUTATION = gql`\n mutation login($input: LoginInputType!) {\n login(input: $input) {\n message\n refreshToken\n token\n user {\n ...UserFields\n }\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const LOGOUT_MUTATION = gql`\n mutation logout {\n logout {\n message\n }\n }\n`;\n\nexport const REFRESH_TOKEN_MUTATION = gql`\n mutation refreshToken($input: RefreshTokenInputType!) {\n refreshToken(input: $input) {\n refreshToken\n token\n }\n }\n`;\n\nexport const RESET_PASSWORD_MUTATION = gql`\n mutation resetPassword($input: ResetPasswordInputType!) {\n resetPassword(input: $input) {\n message\n }\n }\n`;\n\nexport const REQUEST_PASSWORD_RESET_MUTATION = gql`\n mutation requestPasswordReset($input: RequestPasswordResetInputType!) {\n requestPasswordReset(input: $input) {\n message\n }\n }\n`;\n\nexport const VALIDATE_VERIFICATION_TOKEN_MUTATION = gql`\n mutation validateVerificationToken(\n $input: ValidateVerificationTokenInputType!\n ) {\n validateVerificationToken(input: $input) {\n message\n }\n }\n`;\n","import { PureQueryOptions, useMutation } from \"@apollo/client\";\n\nimport {\n ADD_PARTICIPANT_TO_CHAT_MUTATION,\n DELETE_CHAT_MUTATION,\n REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,\n SEND_CHAT_MESSAGE_MUTATION,\n TOGGLE_CHAT_MESSAGE_LIKE_MUTATION,\n MARK_CHAT_MESSAGES_SEEN_MUTATION,\n REPORT_CHAT_USER_MUTATION,\n CREATE_PRIVATE_CHAT_MUTATION,\n} from \"../../mutations/chat\";\nimport { CHAT, GET_CHATS_BY_REGION, USER_CHATS } from \"../../queries/chat\";\n\nexport const useCreatePrivateChat = () => {\n const [createPrivateChat, { loading, error }] = useMutation<{\n createPrivateChat: {\n _id: string;\n };\n }>(CREATE_PRIVATE_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: USER_CHATS }],\n });\n\n return { createPrivateChat, error, loading };\n};\n\nexport const useSendChatMessage = () => {\n const [sendChatMessage, { loading, error }] = useMutation<{\n sendChatMessage: {\n _id: string;\n };\n }>(SEND_CHAT_MESSAGE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract chatId from the mutation response\n const chatId = mutationResult?.data?.sendChatMessage?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n ];\n },\n });\n\n return { error, loading, sendChatMessage };\n};\n\nexport const useDeleteChat = () => {\n const [deleteChat, { loading, error }] = useMutation(DELETE_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: USER_CHATS }],\n });\n\n return { deleteChat, error, loading };\n};\n\nexport const useAddParticipantToChat = () => {\n const [addParticipantToChat, { loading, error }] = useMutation<{\n addParticipantToChat: {\n _id: string;\n };\n }>(ADD_PARTICIPANT_TO_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract chatId from the mutation response\n const chatId = mutationResult?.data?.addParticipantToChat?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n {\n query: USER_CHATS,\n },\n ];\n },\n });\n\n return { addParticipantToChat, error, loading };\n};\n\nexport const useRemoveParticipantFromChat = () => {\n const [removeParticipantFromChat, { loading, error }] = useMutation<{\n removeParticipantFromChat: {\n success: boolean;\n region?: string | null;\n };\n }>(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult): PureQueryOptions[] => {\n const region = mutationResult?.data?.removeParticipantFromChat?.region;\n\n const queries: PureQueryOptions[] = [{ query: USER_CHATS }];\n\n if (region && region.trim() !== \"\") {\n queries.push({\n query: GET_CHATS_BY_REGION,\n variables: { region },\n });\n }\n\n return queries;\n },\n });\n\n return { error, loading, removeParticipantFromChat };\n};\n\nexport const useToggleChatMessageLike = () => {\n const [toggleChatMessageLike, { loading, error }] = useMutation<{\n toggleChatMessageLike: {\n _id: string;\n };\n }>(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const chatId = mutationResult?.data?.toggleChatMessageLike?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n ];\n },\n });\n\n return { error, loading, toggleChatMessageLike };\n};\n\nexport const useMarkChatMessagesSeen = () => {\n const [markChatMessagesSeen, { loading, error }] = useMutation<{\n markChatMessagesSeen: {\n _id: string;\n };\n }>(MARK_CHAT_MESSAGES_SEEN_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const chatId = mutationResult?.data?.markChatMessagesSeen?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n ];\n },\n });\n\n return { error, loading, markChatMessagesSeen };\n};\n\nexport const useReportChatUser = () => {\n const [reportChatUser, { loading, error }] = useMutation(\n REPORT_CHAT_USER_MUTATION,\n );\n\n return { error, loading, reportChatUser };\n};\n","import { gql } from \"@apollo/client\";\n\nimport {\n CHAT_FIELDS_FRAGMENT,\n CHAT_REPORT_FIELDS_FRAGMENT,\n} from \"../queries/chat\";\n\nexport const CREATE_PRIVATE_CHAT_MUTATION = gql`\n mutation createPrivateChat($userId: ID!) {\n createPrivateChat(userId: $userId) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const SEND_CHAT_MESSAGE_MUTATION = gql`\n mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {\n sendChatMessage(_id: $_id, input: $input) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_CHAT_MUTATION = gql`\n mutation deleteChat($_id: ID!) {\n deleteChat(_id: $_id)\n }\n`;\n\nexport const ADD_PARTICIPANT_TO_CHAT_MUTATION = gql`\n mutation addParticipantToChat($chatId: ID!, $userId: ID!) {\n addParticipantToChat(chatId: $chatId, userId: $userId) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`\n mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {\n removeParticipantFromChat(chatId: $chatId, userId: $userId) {\n success\n region\n }\n }\n`;\n\nexport const TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`\n mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {\n toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`\n mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {\n markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const REPORT_CHAT_USER_MUTATION = gql`\n mutation reportChatUser($input: ReportChatUserInputType!) {\n reportChatUser(input: $input) {\n ...ChatReportFields\n }\n }\n ${CHAT_REPORT_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const CHAT_MESSAGE_FIELDS_FRAGMENT = gql`\n fragment ChatMessageFields on ChatMessageType {\n _id\n content\n createdAt\n replyToMessageId\n replyPreview {\n senderId\n senderName\n contentPreview\n }\n likedBy {\n userId\n createdAt\n }\n senderId\n seenBy {\n userId\n seenAt\n }\n updatedAt\n }\n`;\n\nexport const CHAT_PARTICIPANT = gql`\n fragment ChatParticipantFields on ChatParticipantType {\n active\n isAssociate\n userAvatar\n userEmail\n userId\n userName\n }\n`;\n\nexport const CHAT_FIELDS_FRAGMENT = gql`\n fragment ChatFields on ChatType {\n _id\n active\n chatDescription\n chatName\n chatType\n createdAt\n deletedAt\n messages {\n ...ChatMessageFields\n }\n participants {\n ...ChatParticipantFields\n }\n region\n updatedAt\n }\n ${CHAT_MESSAGE_FIELDS_FRAGMENT}\n ${CHAT_PARTICIPANT}\n`;\n\nexport const CHAT = gql`\n query chat($_id: ID!) {\n chat(_id: $_id) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const USER_CHATS = gql`\n query userChats {\n userChats {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const GET_CHATS_BY_REGION = gql`\n query getChatsByRegion($region: String!) {\n chatsByRegion(region: $region) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const CHAT_REPORT_FIELDS_FRAGMENT = gql`\n fragment ChatReportFields on ReportChatUserType {\n _id\n chatId\n createdAt\n reason {\n reasonType\n details\n }\n reportedUserId\n reporterUserId\n resolved\n updatedAt\n }\n`;\n\nexport const GET_REPORTED_CHAT_USERS = gql`\n query getReportedChatUsers {\n reportedChatUsers {\n ...ChatReportFields\n }\n }\n ${CHAT_REPORT_FIELDS_FRAGMENT}\n`;\n","import { useQuery, useSubscription } from \"@apollo/client\";\n\nimport { GET_CHAT_MESSAGE } from \"src/graphql/subscriptions/chat\";\n\nimport { ChatType, ReportChatUser } from \"../../../types/chat\";\nimport {\n CHAT,\n GET_CHATS_BY_REGION,\n GET_REPORTED_CHAT_USERS,\n USER_CHATS,\n} from \"../../queries/chat\";\n\nexport const useGetChat = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ chat: ChatType }>(CHAT, {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n const chat = data?.chat;\n\n return { chat, error, loading, refetch };\n};\n\nexport const useGetUserChats = () => {\n const { loading, error, data, refetch } = useQuery<{ userChats: ChatType[] }>(\n USER_CHATS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const userChats = data?.userChats || [];\n\n return { error, loading, refetch, userChats };\n};\n\nexport const useGetChatSubscription = () => {\n const { data, loading, error } = useSubscription<{ getChat: ChatType }>(\n GET_CHAT_MESSAGE,\n );\n\n const chat = data?.getChat;\n\n return { chat, error, loading };\n};\n\nexport const useGetChatsByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n chatsByRegion: ChatType[];\n }>(GET_CHATS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables: { region },\n });\n\n const chatsByRegion = data?.chatsByRegion || [];\n\n return { chatsByRegion, error, loading, refetch };\n};\n\nexport const useGetReportedChatUsers = () => {\n const { loading, error, data, refetch } = useQuery<{\n reportedChatUsers: ReportChatUser[];\n }>(GET_REPORTED_CHAT_USERS, {\n fetchPolicy: \"network-only\",\n });\n\n const reportedChatUsers = data?.reportedChatUsers || [];\n\n return { error, loading, refetch, reportedChatUsers };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { CHAT_FIELDS_FRAGMENT } from \"../queries/chat\";\n\nexport const GET_CHAT_MESSAGE = gql`\n subscription {\n getChatMessage {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { CONTACT_US_MUTATION } from \"../mutations/contactUs\";\n\nexport const useContactUs = () => {\n const [contactUs, { loading, error }] = useMutation(CONTACT_US_MUTATION);\n return { contactUs, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const CONTACT_US_MUTATION = gql`\n mutation contactUs($input: ContactUsInputType!) {\n contactUs(input: $input) {\n message\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_EVENT_INFO_MUTATION,\n CREATE_EVENT_MUTATION,\n DELETE_EVENT_MUTATION,\n UPDATE_EVENT_INFO_MUTATION,\n UPDATE_EVENT_MUTATION,\n} from \"../../mutations/event\";\nimport { GET_EVENT, GET_EVENT_INFO } from \"../../queries/event\";\nimport { GET_USER_EVENTS } from \"../../queries/user\";\n\nexport const useCreateEvent = () => {\n const [createEvent, { loading, error }] = useMutation(CREATE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_EVENTS }],\n });\n\n return { createEvent, error, loading };\n};\n\nexport const useUpdateEvent = () => {\n const [updateEvent, { loading, error }] = useMutation<{\n updateEvent: {\n _id: string;\n };\n }>(UPDATE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract eventId from the mutation response\n const eventId = mutationResult?.data?.updateEvent?._id;\n\n if (!eventId) return [];\n\n return [\n {\n query: GET_USER_EVENTS,\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n ];\n },\n });\n\n return { error, loading, updateEvent };\n};\n\nexport const useDeleteEvent = () => {\n const [deleteEvent, { loading, error }] = useMutation(DELETE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_EVENTS }],\n });\n return { deleteEvent, error, loading };\n};\n\nexport const useCreateEventInfo = () => {\n const [createEventInfo, { loading, error }] = useMutation<{\n createEventInfo: {\n eventId: string;\n };\n }>(CREATE_EVENT_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract eventId from the mutation response\n const eventId = mutationResult?.data?.createEventInfo?.eventId;\n\n if (!eventId) return [];\n\n return [\n {\n query: GET_EVENT_INFO,\n variables: { eventId }, // Pass the eventId for refetching\n },\n {\n query: GET_USER_EVENTS,\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n ];\n },\n });\n\n return { createEventInfo, error, loading };\n};\n\nexport const useUpdateEventInfo = () => {\n const [updateEventInfo, { loading, error }] = useMutation<{\n updateEventInfo: {\n eventId: string;\n };\n }>(UPDATE_EVENT_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract eventId from the mutation response\n const eventId = mutationResult?.data?.updateEventInfo?.eventId;\n\n if (!eventId) return [];\n\n return [\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_USER_EVENTS,\n },\n ];\n },\n });\n\n return { error, loading, updateEventInfo };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT, EVENT_INFO } from \"../queries/event\";\n\nexport const CREATE_EVENT_MUTATION = gql`\n mutation createEvent($input: EventInputType!) {\n createEvent(input: $input) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const UPDATE_EVENT_MUTATION = gql`\n mutation updateEvent($_id: ID!, $input: EventInputType!) {\n updateEvent(_id: $_id, input: $input) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const DELETE_EVENT_MUTATION = gql`\n mutation deleteEvent($_id: ID!) {\n deleteEvent(_id: $_id)\n }\n`;\n\nexport const CREATE_EVENT_INFO_MUTATION = gql`\n mutation createEventInfo($input: EventInfoInputType!) {\n createEventInfo(input: $input) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n\nexport const UPDATE_EVENT_INFO_MUTATION = gql`\n mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {\n updateEventInfo(_id: $_id, input: $input) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT } from \"./event\";\nimport { EVENT_LIST_ITEM, USER_FIELDS_FRAGMENT } from \"./global\";\nimport { PARTNER } from \"./partner\";\nimport { VENDOR } from \"./vendor\";\n\nexport const GET_USERS = gql`\n query getUsers {\n users {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_USER = gql`\n query getUser($_id: ID!) {\n user(_id: $_id) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_USER_EVENTS = gql`\n query getUserEvents {\n userEvents {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const GET_USER_VENDORS = gql`\n query getUserVendors {\n userVendors {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_USER_PARTNERS = gql`\n query getUserPartners {\n userPartners {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_USER_ACTIVITIES = gql`\n query getUserActivities {\n userActivities {\n favourites {\n events {\n ...EventListItemFields\n }\n partners {\n ...PartnerFields\n }\n vendors {\n ...VendorFields\n }\n }\n going {\n events {\n ...EventListItemFields\n }\n }\n interested {\n events {\n ...EventListItemFields\n }\n }\n present {\n events {\n ...EventListItemFields\n }\n }\n }\n }\n ${EVENT_LIST_ITEM}\n ${VENDOR}\n ${PARTNER}\n`;\n\nexport const GET_USER_RESOURCES = gql`\n query getUserResources($userId: ID!) {\n userResources(userId: $userId) {\n resources {\n _id\n logo\n name\n resourceType\n }\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n ASSOCIATES_FIELDS_FRAGMENT,\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const PARTNER = gql`\n fragment PartnerFields on PartnerType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n adIds\n cover {\n ...ResourceImageFields\n }\n createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n description\n deletedAt\n images {\n ...ResourceImageFields\n }\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n nzbn\n owner {\n ...OwnerFields\n }\n partnerType\n posterUsage {\n ...PosterUsageFields\n }\n rating\n region\n reviewCount\n socialMedia {\n ...SocialMediaFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n`;\n\nexport const GET_PARTNERS = gql`\n query getPartners {\n partners {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_PARTNER = gql`\n query getPartner($_id: ID!) {\n partner(_id: $_id) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_PARTNERS_BY_REGION = gql`\n query getPartnersByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n partnersByRegion(region: $region, options: $options) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const SEARCH_PARTNERS = gql`\n query searchPartners($search: String!, $region: String) {\n partnersSearch(search: $search, region: $region) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n EventInfoType,\n EventListItemType,\n EventType,\n} from \"../../../types/event\";\nimport { UseGetResourcesByRegionOptions } from \"../../../types/global\";\nimport {\n GET_EVENT,\n GET_EVENT_BY_PLACE_ID,\n GET_EVENT_INFO,\n GET_EVENTS,\n GET_EVENTS_BY_REGION,\n GET_EVENTS_NEAR_ME,\n SEARCH_EVENTS,\n} from \"../../queries/event\";\n\nexport const useGetEvents = () => {\n const { loading, error, data, refetch } = useQuery<{\n events: EventListItemType[];\n }>(GET_EVENTS, {\n fetchPolicy: \"network-only\",\n });\n\n const events = data?.events || [];\n\n return { error, events, loading, refetch };\n};\n\nexport const useGetEvent = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{\n event: EventType | null;\n }>(GET_EVENT, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: { _id },\n });\n\n const event = data?.event || null;\n\n return { error, event, loading, refetch };\n};\n\nexport const useGetEventByPlaceId = (googlePlaceId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventByPlaceId: EventListItemType | null;\n }>(GET_EVENT_BY_PLACE_ID, {\n fetchPolicy: \"network-only\",\n skip: !googlePlaceId,\n variables: { googlePlaceId },\n });\n\n const eventByPlaceId = data?.eventByPlaceId || null;\n\n return { error, eventByPlaceId, loading, refetch };\n};\n\nexport const useGetEventsByRegion = (\n region: string,\n options?: UseGetResourcesByRegionOptions,\n) => {\n const variables = {\n options,\n region,\n };\n const { loading, error, data, refetch, fetchMore } = useQuery<{\n eventsByRegion: EventListItemType[];\n }>(GET_EVENTS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables,\n });\n\n const eventsByRegion = data?.eventsByRegion || [];\n\n return {\n error,\n eventsByRegion,\n fetchMore,\n loading,\n refetch,\n };\n};\n\nexport const useSearchEvents = (\n region: string,\n\n search?: string,\n\n tags?: string[],\n) => {\n const normalizedSearch = search?.trim() ?? \"\";\n const normalizedTags = (tags ?? []).filter(Boolean);\n\n const shouldRunQuery =\n Boolean(region?.trim()) &&\n (normalizedSearch.length > 3 || normalizedTags.length > 0);\n\n const { loading, error, data, refetch } = useQuery<{\n eventsSearch: EventListItemType[];\n }>(SEARCH_EVENTS, {\n fetchPolicy: \"network-only\",\n skip: !shouldRunQuery,\n variables: {\n region,\n search: normalizedSearch,\n tags: normalizedTags,\n },\n });\n\n return {\n error,\n eventsSearch: data?.eventsSearch ?? [],\n loading,\n refetch,\n };\n};\n\nexport const useGetEventsNearMe = (location: {\n latitude: number;\n longitude: number;\n radius?: number;\n}) => {\n const { loading, error, data, refetch } = useQuery<{\n eventsNearMe: EventListItemType[];\n }>(GET_EVENTS_NEAR_ME, {\n fetchPolicy: \"network-only\",\n skip: !location.latitude || !location.longitude,\n variables: {\n latitude: location.latitude,\n longitude: location.longitude,\n radius: location.radius || 10000, // Default to 10km if no radius is provided\n },\n });\n\n const eventsNearMe = data?.eventsNearMe || [];\n\n return { error, eventsNearMe, loading, refetch };\n};\n\nexport const useGetEventInfo = (eventId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventInfo: EventInfoType;\n }>(GET_EVENT_INFO, {\n fetchPolicy: \"network-only\",\n skip: !eventId || eventId === \"\",\n variables: { eventId },\n });\n\n const eventInfo = data?.eventInfo;\n\n return { error, eventInfo, loading, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_BULK_NOTIFICATIONS,\n DELETE_ALL_NOTIFICATIONS,\n DELETE_NOTIFICATION,\n MARK_ALL_NOTIFICATIONS_READ,\n MARK_NOTIFICATION_READ,\n} from \"src/graphql/mutations/notification\";\nimport {\n GET_NOTIFICATION_COUNT,\n GET_USER_NOTIFICATIONS,\n} from \"src/graphql/queries/notification\";\n\nexport const useCreateBulkNotifications = () => {\n const [createBulkNotifications, { loading, error }] = useMutation(\n CREATE_BULK_NOTIFICATIONS,\n );\n return { createBulkNotifications, error, loading };\n};\n\nexport const useMarkNotificationRead = () => {\n const [markNotificationRead, { loading, error }] = useMutation(\n MARK_NOTIFICATION_READ,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { error, loading, markNotificationRead };\n};\n\nexport const useMarkAllNotificationsRead = () => {\n const [markAllNotificationsRead, { loading, error }] = useMutation(\n MARK_ALL_NOTIFICATIONS_READ,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { error, loading, markAllNotificationsRead };\n};\n\nexport const useDeleteNotification = () => {\n const [deleteNotification, { loading, error }] = useMutation(\n DELETE_NOTIFICATION,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { deleteNotification, error, loading };\n};\n\nexport const useDeleteAllNotifications = () => {\n const [deleteAllNotifications, { loading, error }] = useMutation(\n DELETE_ALL_NOTIFICATIONS,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { deleteAllNotifications, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { NOTIFICATION_FRAGMENT } from \"../queries/notification\";\n\nexport const CREATE_BULK_NOTIFICATIONS = gql`\n mutation createBulkNotifications($input: CreateBulkNotificationInput!) {\n createBulkNotifications(input: $input) {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const MARK_NOTIFICATION_READ = gql`\n mutation markNotificationRead($_id: ID!) {\n markNotificationRead(_id: $_id) {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const MARK_ALL_NOTIFICATIONS_READ = gql`\n mutation markAllNotificationsRead {\n markAllNotificationsRead\n }\n`;\n\nexport const DELETE_NOTIFICATION = gql`\n mutation deleteNotification($_id: ID!) {\n deleteNotification(_id: $_id)\n }\n`;\n\nexport const DELETE_ALL_NOTIFICATIONS = gql`\n mutation deleteAllNotifications {\n deleteAllNotifications\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const NOTIFICATION_FRAGMENT = gql`\n fragment NotificationFields on Notification {\n _id\n userId\n title\n message\n type\n isRead\n data {\n resourceId\n resourceName\n resourceType\n }\n createdAt\n updatedAt\n }\n`;\n\nexport const GET_USER_NOTIFICATIONS = gql`\n query getUserNotifications($limit: Int, $offset: Int) {\n userNotifications(limit: $limit, offset: $offset) {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const GET_NOTIFICATION_COUNT = gql`\n query getNotificationCount {\n notificationCount {\n total\n unread\n }\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { NotificationCount, NotificationType } from \"../../../types\";\nimport {\n GET_NOTIFICATION_COUNT,\n GET_USER_NOTIFICATIONS,\n} from \"../../queries/notification\";\n\nexport const useGetUserNotifications = (limit?: number, offset?: number) => {\n const { data, loading, error, refetch } = useQuery<{\n userNotifications: NotificationType[];\n }>(GET_USER_NOTIFICATIONS, {\n fetchPolicy: \"no-cache\",\n variables: { limit, offset },\n });\n\n return {\n error,\n loading,\n notifications: data?.userNotifications || [],\n refetch,\n };\n};\n\nexport const useGetNotificationCount = () => {\n const { data, loading, error, refetch } = useQuery<{\n notificationCount: NotificationCount;\n }>(GET_NOTIFICATION_COUNT, {\n fetchPolicy: \"no-cache\",\n });\n\n return {\n error,\n loading,\n notificationCount: data?.notificationCount || { total: 0, unread: 0 },\n refetch,\n };\n};\n","import { useSubscription } from \"@apollo/client\";\n\nimport { NotificationCount, NotificationType } from \"../../../types\";\nimport {\n GET_NOTIFICATION_COUNT_SUBSCRIPTION,\n GET_NOTIFICATIONS_SUBSCRIPTION,\n} from \"../../subscriptions/notification\";\n\nexport const useGetUserNotificationsSubscription = () => {\n const { data, loading, error } = useSubscription<{\n getUserNotifications: NotificationType[];\n }>(GET_NOTIFICATIONS_SUBSCRIPTION, {\n fetchPolicy: \"no-cache\",\n shouldResubscribe: true,\n });\n\n return {\n error,\n loading,\n notifications: data?.getUserNotifications,\n };\n};\n\nexport const useGetNotificationCountSubscription = () => {\n const { data, loading, error } = useSubscription<{\n getNotificationCount: NotificationCount;\n }>(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {\n fetchPolicy: \"no-cache\",\n shouldResubscribe: true,\n });\n\n return {\n error,\n loading,\n notificationCount: data?.getNotificationCount,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { NOTIFICATION_FRAGMENT } from \"../queries/notification\";\n\nexport const GET_NOTIFICATIONS_SUBSCRIPTION = gql`\n subscription {\n getUserNotifications {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const GET_NOTIFICATION_COUNT_SUBSCRIPTION = gql`\n subscription {\n getNotificationCount {\n total\n unread\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { CREATE_POSTER_MUTATION } from \"../mutations/poster\";\nimport { GET_USER_EVENTS, GET_USER_VENDORS } from \"../queries/user\";\n\nexport const useCreatePoster = () => {\n const [createPoster, { loading, error }] = useMutation(\n CREATE_POSTER_MUTATION,\n {\n refetchQueries: [{ query: GET_USER_EVENTS }, { query: GET_USER_VENDORS }],\n },\n );\n return { createPoster, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { POSTER_USAGE_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const CREATE_POSTER_MUTATION = gql`\n mutation createPoster($input: PosterInputType!) {\n createPoster(input: $input) {\n message\n posterUsage {\n ...PosterUsageFields\n }\n }\n }\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { CREATE_PUSH_TOKEN_MUTATION } from \"../mutations/pushToken\";\n\nexport const useCreatePushToken = () => {\n const [createPushToken, { loading, error }] = useMutation(\n CREATE_PUSH_TOKEN_MUTATION,\n );\n return { createPushToken, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const CREATE_PUSH_TOKEN_MUTATION = gql`\n mutation createPushToken($input: PushTokenInput!) {\n createPushToken(input: $input) {\n success\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport { RelationType } from \"src/types\";\n\nimport {\n CREATE_RELATION_MUTATION,\n DELETE_RELATION_MUTATION,\n UPDATE_RELATION_MUTATION,\n} from \"../../mutations/relation\";\nimport { USER_CHATS } from \"../../queries/chat\";\nimport { GET_EVENT, GET_EVENT_INFO } from \"../../queries/event\";\nimport {\n GET_EVENT_RELATIONS,\n GET_RELATION_BY_EVENT_AND_VENDOR,\n GET_RESOURCE_CONNECTIONS,\n GET_VENDOR_RELATIONS,\n} from \"../../queries/relation\";\nimport { GET_VENDOR } from \"../../queries/vendor\";\n\nexport const useCreateRelation = () => {\n const [createRelation, { loading, error }] = useMutation<{\n createRelation: RelationType;\n }>(CREATE_RELATION_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract relationId from the mutation response\n const createRelation = mutationResult?.data?.createRelation;\n const eventId = createRelation?.eventId;\n const vendorId = createRelation?.vendorId;\n\n const resourceType = createRelation?.lastUpdateBy;\n const resourceId =\n resourceType === EnumResourceType.EVENT ? eventId : vendorId;\n\n return [\n {\n query: GET_EVENT_RELATIONS,\n variables: { eventId },\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_VENDOR_RELATIONS,\n variables: { vendorId },\n },\n {\n query: GET_VENDOR,\n variables: { _id: vendorId },\n },\n {\n query: GET_RELATION_BY_EVENT_AND_VENDOR,\n variables: { eventId, vendorId },\n },\n {\n query: GET_RESOURCE_CONNECTIONS,\n variables: { resourceId, resourceType },\n },\n {\n query: USER_CHATS,\n },\n ];\n },\n });\n\n return { createRelation, error, loading };\n};\n\nexport const useUpdateRelation = () => {\n const [updateRelation, { loading, error }] = useMutation<{\n updateRelation: RelationType;\n }>(UPDATE_RELATION_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const updateRelation = mutationResult?.data?.updateRelation;\n const eventId = updateRelation?.eventId;\n const vendorId = updateRelation?.vendorId;\n\n const resourceType = updateRelation?.lastUpdateBy;\n const resourceId =\n resourceType === EnumResourceType.EVENT ? eventId : vendorId;\n\n return [\n {\n query: GET_EVENT_RELATIONS,\n variables: { eventId },\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_VENDOR_RELATIONS,\n variables: { vendorId },\n },\n {\n query: GET_VENDOR,\n variables: { _id: vendorId },\n },\n {\n query: GET_RELATION_BY_EVENT_AND_VENDOR,\n variables: { eventId, vendorId },\n },\n {\n query: GET_RESOURCE_CONNECTIONS,\n variables: { resourceId, resourceType },\n },\n ];\n },\n });\n\n return { error, loading, updateRelation };\n};\n\nexport const useDeleteRelation = () => {\n const [deleteRelation, { loading, error }] = useMutation<{\n deleteRelation: RelationType;\n }>(DELETE_RELATION_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract relationId from the mutation response\n const deleteRelation = mutationResult?.data?.deleteRelation;\n const eventId = deleteRelation?.eventId;\n const vendorId = deleteRelation?.vendorId;\n const resourceType = deleteRelation?.lastUpdateBy;\n const resourceId =\n resourceType === EnumResourceType.EVENT ? eventId : vendorId;\n return [\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_EVENT_RELATIONS,\n variables: { eventId },\n },\n {\n query: GET_VENDOR_RELATIONS,\n variables: { vendorId },\n },\n {\n query: GET_RELATION_BY_EVENT_AND_VENDOR,\n variables: { eventId, vendorId },\n },\n {\n query: GET_RESOURCE_CONNECTIONS,\n variables: { resourceId, resourceType },\n },\n {\n query: USER_CHATS,\n },\n ];\n },\n });\n return { deleteRelation, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { RELATION_FIELDS_FRAGMENT } from \"../queries/relation\";\n\nexport const CREATE_RELATION_MUTATION = gql`\n mutation createRelation($input: RelationInputType!) {\n createRelation(input: $input) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_RELATION_MUTATION = gql`\n mutation updateRelation($_id: ID!, $input: RelationInputType!) {\n updateRelation(_id: $_id, input: $input) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_RELATION_MUTATION = gql`\n mutation deleteRelation($_id: ID!) {\n deleteRelation(_id: $_id) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT_LIST_ITEM, RELATION_DATES_FRAGMENT } from \"./global\";\nimport { VENDOR } from \"./vendor\";\n\nexport const RELATION_FIELDS_FRAGMENT = gql`\n fragment RelationFields on RelationType {\n _id\n active\n chatId\n createdAt\n lastUpdateBy\n eventId\n relationDates {\n ...RelationDates\n }\n relationType\n vendorId\n updatedAt\n }\n ${RELATION_DATES_FRAGMENT}\n`;\n\nexport const GET_RELATION = gql`\n query getRelation($_id: ID!) {\n relation(_id: $_id) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_RELATION_BY_EVENT_AND_VENDOR = gql`\n query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {\n relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_EVENT_RELATIONS = gql`\n query getEventRelations($eventId: ID!) {\n eventRelations(eventId: $eventId) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_VENDOR_RELATIONS = gql`\n query getVendorRelations($vendorId: ID!) {\n vendorRelations(vendorId: $vendorId) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_RESOURCE_CONNECTIONS = gql`\n query getResourceConnections(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {\n events {\n ...EventListItemFields\n }\n vendors {\n ...VendorFields\n }\n }\n }\n ${VENDOR}\n ${EVENT_LIST_ITEM}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"../../../enums\";\nimport { ResourceConnectionsType } from \"../../../types\";\nimport { RelationType } from \"../../../types/relation\";\nimport {\n GET_EVENT_RELATIONS,\n GET_RELATION_BY_EVENT_AND_VENDOR,\n GET_RESOURCE_CONNECTIONS,\n GET_RELATION,\n GET_VENDOR_RELATIONS,\n} from \"../../queries/relation\";\n\nexport const useGetRelation = (_id?: string) => {\n const { loading, error, data, refetch } = useQuery<{\n relation: RelationType;\n }>(GET_RELATION, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: _id ? { _id } : undefined,\n });\n\n const relation = data?.relation;\n\n return { error, loading, refetch, relation };\n};\n\nexport const useGetRelationByEventAndVendor = (\n eventId: string,\n vendorId: string,\n) => {\n const { loading, error, data, refetch } = useQuery<{\n relationByEventAndVendor: RelationType;\n }>(GET_RELATION_BY_EVENT_AND_VENDOR, {\n fetchPolicy: \"network-only\",\n skip: !eventId || eventId === \"\" || !vendorId || vendorId === \"\",\n variables: { eventId, vendorId },\n });\n\n const relationByEventAndVendor = data?.relationByEventAndVendor;\n\n return { error, loading, refetch, relationByEventAndVendor };\n};\n\nexport const useGetEventRelations = (eventId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventRelations: RelationType[];\n }>(GET_EVENT_RELATIONS, {\n fetchPolicy: \"network-only\",\n skip: !eventId || eventId === \"\",\n variables: { eventId },\n });\n\n const eventRelations = data?.eventRelations || [];\n\n return { error, eventRelations, loading, refetch };\n};\n\nexport const useGetVendorRelations = (vendorId?: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorRelations: RelationType[];\n }>(GET_VENDOR_RELATIONS, {\n fetchPolicy: \"network-only\",\n skip: !vendorId || vendorId === \"\",\n variables: { vendorId },\n });\n\n const vendorRelations = data?.vendorRelations || [];\n\n return { error, loading, refetch, vendorRelations };\n};\n\nexport const useGetResourceConnections = (\n resourceId: string,\n resourceType: EnumResourceType,\n) => {\n const { loading, error, data, refetch } = useQuery<{\n resourceConnections: ResourceConnectionsType;\n }>(GET_RESOURCE_CONNECTIONS, {\n fetchPolicy: \"network-only\",\n skip: !resourceId || resourceId === \"\" || !resourceType,\n variables: { resourceId, resourceType },\n });\n\n const resourceConnections = data?.resourceConnections;\n\n return { error, loading, refetch, resourceConnections };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport { GET_USER_VENDORS } from \"src/graphql/queries/user\";\n\nimport {\n CREATE_UNREGISTERED_VENDOR_MUTATION,\n CREATE_VENDOR_INFO_MUTATION,\n CREATE_VENDOR_MUTATION,\n DELETE_UNREGISTERED_VENDOR_MUTATION,\n DELETE_VENDOR_MUTATION,\n UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION,\n UPDATE_UNREGISTERED_VENDOR_MUTATION,\n UPDATE_VENDOR_INFO_MUTATION,\n UPDATE_VENDOR_MUTATION,\n} from \"../../mutations/vendor\";\nimport { GET_VENDOR, GET_VENDOR_INFO } from \"../../queries/vendor\";\n\nexport const useCreateVendor = () => {\n const [createVendor, { loading, error }] = useMutation(\n CREATE_VENDOR_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_VENDORS }],\n },\n );\n\n return { createVendor, error, loading };\n};\n\nexport const useUpdateVendor = () => {\n const [updateVendor, { loading, error }] = useMutation(\n UPDATE_VENDOR_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_VENDORS }],\n },\n );\n return { error, loading, updateVendor };\n};\n\nexport const useDeleteVendor = () => {\n const [deleteVendor, { loading, error }] = useMutation(\n DELETE_VENDOR_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_VENDORS }],\n },\n );\n return { deleteVendor, error, loading };\n};\n\nexport const useCreateVendorInfo = () => {\n const [createVendorInfo, { loading, error }] = useMutation<{\n createVendorInfo: { vendorId: string };\n }>(CREATE_VENDOR_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract vendorId from the mutation response\n const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;\n\n if (!vendorId) return [];\n\n return [\n {\n query: GET_VENDOR_INFO,\n variables: { vendorId }, // Pass the vendorId for refetching\n },\n {\n query: GET_USER_VENDORS,\n },\n {\n query: GET_VENDOR,\n variables: { _id: vendorId },\n },\n ];\n },\n });\n\n return { createVendorInfo, error, loading };\n};\n\nexport const useUpdateVendorInfo = () => {\n const [updateVendorInfo, { loading, error }] = useMutation<{\n updateVendorInfo: { vendorId: string };\n }>(UPDATE_VENDOR_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract vendorId from the mutation response\n const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;\n\n if (!vendorId) return [];\n\n return [\n {\n query: GET_VENDOR_INFO,\n variables: { vendorId }, // Pass the vendorId for refetching\n },\n ];\n },\n });\n\n return { error, loading, updateVendorInfo };\n};\n\nexport const useCreateUnregisteredVendor = () => {\n const [createUnregisteredVendor, { loading, error }] = useMutation(\n CREATE_UNREGISTERED_VENDOR_MUTATION,\n );\n\n return { createUnregisteredVendor, error, loading };\n};\n\nexport const useUpdateUnregisteredVendor = () => {\n const [updateUnregisteredVendor, { loading, error }] = useMutation(\n UPDATE_UNREGISTERED_VENDOR_MUTATION,\n );\n return { error, loading, updateUnregisteredVendor };\n};\n\nexport const useDeleteUnregisteredVendor = () => {\n const [deleteUnregisteredVendor, { loading, error }] = useMutation(\n DELETE_UNREGISTERED_VENDOR_MUTATION,\n );\n return { deleteUnregisteredVendor, error, loading };\n};\n\nexport const useUnlinkUnregisteredVendorByInviterId = () => {\n const [unlinkUnregisteredVendorByInviterId, { loading, error }] = useMutation(\n UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION,\n );\n return { error, loading, unlinkUnregisteredVendorByInviterId };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { UNREGISTERED_VENDOR, VENDOR, VENDOR_INFO } from \"../queries/vendor\";\n\nexport const CREATE_VENDOR_MUTATION = gql`\n mutation createVendor($input: VendorInputType!) {\n createVendor(input: $input) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const UPDATE_VENDOR_MUTATION = gql`\n mutation updateVendor($_id: ID!, $input: VendorInputType!) {\n updateVendor(_id: $_id, input: $input) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const DELETE_VENDOR_MUTATION = gql`\n mutation deleteVendor($_id: ID!) {\n deleteVendor(_id: $_id)\n }\n`;\n\nexport const CREATE_VENDOR_INFO_MUTATION = gql`\n mutation createVendorInfo($input: VendorInfoInputType!) {\n createVendorInfo(input: $input) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const UPDATE_VENDOR_INFO_MUTATION = gql`\n mutation updateVendorInfo($_id: ID!, $input: VendorInfoInputType!) {\n updateVendorInfo(_id: $_id, input: $input) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const CREATE_UNREGISTERED_VENDOR_MUTATION = gql`\n mutation createUnregisteredVendor($input: UnregisteredVendorInputType!) {\n createUnregisteredVendor(input: $input) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const UPDATE_UNREGISTERED_VENDOR_MUTATION = gql`\n mutation updateUnregisteredVendor(\n $_id: ID!\n $input: UnregisteredVendorInputType!\n ) {\n updateUnregisteredVendor(_id: $_id, input: $input) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const DELETE_UNREGISTERED_VENDOR_MUTATION = gql`\n mutation deleteUnregisteredVendor($_id: ID!) {\n deleteUnregisteredVendor(_id: $_id)\n }\n`;\n\nexport const UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION = gql`\n mutation unlinkUnregisteredVendorByInviterId($_id: ID!, $inviterId: ID!) {\n unlinkUnregisteredVendorByInviterId(_id: $_id, inviterId: $inviterId)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { UseGetResourcesByRegionOptions } from \"../../../types/global\";\nimport {\n UnregisteredVendorType,\n VendorInfoType,\n VendorType,\n} from \"../../../types/vendor\";\nimport {\n GET_UNREGISTERED_VENDOR,\n GET_UNREGISTERED_VENDORS,\n GET_UNREGISTERED_VENDORS_BY_INVITER_ID,\n GET_VENDOR,\n GET_VENDOR_INFO,\n GET_VENDORS,\n GET_VENDORS_BY_REGION,\n SEARCH_VENDORS,\n} from \"../../queries/vendor\";\n\nexport const useGetVendors = () => {\n const { loading, error, data, refetch } = useQuery<{ vendors: VendorType[] }>(\n GET_VENDORS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const vendors = data?.vendors || [];\n\n return {\n error,\n loading,\n refetch,\n vendors,\n };\n};\n\nexport const useGetVendor = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ vendor: VendorType }>(\n GET_VENDOR,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const vendor = data?.vendor;\n\n return { error, loading, refetch, vendor };\n};\n\nexport const useGetVendorsByRegion = (\n region: string,\n options?: UseGetResourcesByRegionOptions,\n) => {\n const variables = {\n options,\n region,\n };\n const { loading, error, data, refetch, fetchMore } = useQuery<{\n vendorsByRegion: VendorType[];\n }>(GET_VENDORS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables,\n });\n\n const vendorsByRegion = data?.vendorsByRegion || [];\n\n return {\n error,\n fetchMore,\n loading,\n refetch,\n vendorsByRegion,\n };\n};\n\nexport const useSearchVendors = (search: string, region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorSearch: VendorType[];\n }>(SEARCH_VENDORS, {\n fetchPolicy: \"network-only\",\n skip: search.length < 3 || !region || region === \"\",\n variables: { region, search },\n });\n\n const vendorSearch = data?.vendorSearch || [];\n\n return { error, loading, refetch, vendorSearch };\n};\n\nexport const useGetVendorInfo = (vendorId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorInfo: VendorInfoType;\n }>(GET_VENDOR_INFO, {\n fetchPolicy: \"network-only\",\n skip: !vendorId || vendorId === \"\",\n variables: { vendorId },\n });\n\n const vendorInfo = data?.vendorInfo;\n\n return {\n error,\n loading,\n refetch,\n vendorInfo,\n };\n};\n\nexport const useGetUnregisteredVendors = () => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendors: UnregisteredVendorType[];\n }>(GET_UNREGISTERED_VENDORS, {\n fetchPolicy: \"network-only\",\n });\n\n const unregisteredVendors = data?.unregisteredVendors || [];\n\n return {\n error,\n loading,\n refetch,\n unregisteredVendors,\n };\n};\n\nexport const useGetUnregisteredVendorsByInviterId = (inviterId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendorsByInviterId: UnregisteredVendorType[];\n }>(GET_UNREGISTERED_VENDORS_BY_INVITER_ID, {\n fetchPolicy: \"network-only\",\n skip: !inviterId || inviterId === \"\",\n variables: { inviterId },\n });\n\n const unregisteredVendorsByInviterId =\n data?.unregisteredVendorsByInviterId || [];\n\n return { error, loading, refetch, unregisteredVendorsByInviterId };\n};\n\nexport const useGetUnregisteredVendor = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendor: UnregisteredVendorType;\n }>(GET_UNREGISTERED_VENDOR, {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n const unregisteredVendor = data?.unregisteredVendor;\n\n return { error, loading, refetch, unregisteredVendor };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_VENDORS,\n} from \"src/graphql/queries/user\";\nimport { UserLicenceType, SafeUserType } from \"src/types\";\n\nimport {\n ADD_USER_FAVOURITE_RESOURCE_MUTATION,\n ADD_USER_GOING_RESOURCE_MUTATION,\n ADD_USER_INTEREST_RESOURCE_MUTATION,\n ADD_USER_PRESENT_RESOURCE_MUTATION,\n CREATE_USER_MUTATION,\n DELETE_USER_MUTATION,\n REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,\n REMOVE_USER_GOING_RESOURCE_MUTATION,\n REMOVE_USER_INTEREST_RESOURCE_MUTATION,\n REMOVE_USER_PRESENT_RESOURCE_MUTATION,\n SELECT_STANDARD_PACKAGE_MUTATION,\n UPDATE_USER_MUTATION,\n} from \"../../mutations/user\";\n\nexport const useCreateUser = () => {\n const [createUser, { loading, error }] = useMutation<{\n createUser: SafeUserType;\n }>(CREATE_USER_MUTATION);\n\n return { createUser, error, loading };\n};\n\nexport const useUpdateUser = () => {\n const [updateUser, { loading, error }] = useMutation<{\n updateUser: SafeUserType;\n }>(UPDATE_USER_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract userId from the mutation response\n const userId = mutationResult?.data?.updateUser?._id;\n\n if (!userId) return [];\n\n return [{ query: GET_USER, variables: { _id: userId } }];\n },\n });\n\n return { error, loading, updateUser };\n};\n\nexport const useDeleteUser = () => {\n const [deleteUser, { loading, error }] = useMutation(DELETE_USER_MUTATION);\n\n return { deleteUser, error, loading };\n};\n\nexport const useAddUserFavouriteResource = () => {\n const [addUserFavouriteResource, { loading, error }] = useMutation(\n ADD_USER_FAVOURITE_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserFavouriteResource, error, loading };\n};\n\nexport const useRemoveUserFavouriteResource = () => {\n const [removeUserFavouriteResource, { loading, error }] = useMutation(\n REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserFavouriteResource };\n};\n\nexport const useAddUserInterestResource = () => {\n const [addUserInterestResource, { loading, error }] = useMutation(\n ADD_USER_INTEREST_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserInterestResource, error, loading };\n};\n\nexport const useRemoveUserInterestResource = () => {\n const [removeUserInterestResource, { loading, error }] = useMutation(\n REMOVE_USER_INTEREST_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserInterestResource };\n};\n\nexport const useAddUserGoingResource = () => {\n const [addUserGoingResource, { loading, error }] = useMutation(\n ADD_USER_GOING_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserGoingResource, error, loading };\n};\n\nexport const useRemoveUserGoingResource = () => {\n const [removeUserGoingResource, { loading, error }] = useMutation(\n REMOVE_USER_GOING_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserGoingResource };\n};\n\nexport const useAddUserPresentResource = () => {\n const [addUserPresentResource, { loading, error }] = useMutation(\n ADD_USER_PRESENT_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserPresentResource, error, loading };\n};\n\nexport const useRemoveUserPresentResource = () => {\n const [removeUserPresentResource, { loading, error }] = useMutation(\n REMOVE_USER_PRESENT_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserPresentResource };\n};\n\nexport const useSelectStandardPackage = () => {\n const [selectStandardPackage, { loading, error }] = useMutation<{\n selectStandardPackage: {\n userId: string;\n message: string;\n licences: UserLicenceType[];\n };\n }>(SELECT_STANDARD_PACKAGE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract userId from the mutation response\n const userId = mutationResult?.data?.selectStandardPackage?.userId;\n\n if (!userId) return [];\n\n return [\n { query: GET_USER, variables: { _id: userId } },\n { query: GET_USER_EVENTS },\n { query: GET_USER_VENDORS },\n ];\n },\n });\n\n return { error, loading, selectStandardPackage };\n};\n","import { gql } from \"@apollo/client\";\n\nimport {\n LICENCE_FIELDS_FRAGMENT,\n USER_FIELDS_FRAGMENT,\n} from \"../queries/global\";\n\nexport const CREATE_USER_MUTATION = gql`\n mutation createUser($input: UserInputType!) {\n createUser(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_USER_MUTATION = gql`\n mutation updateUser($_id: ID!, $input: UserInputType!) {\n updateUser(_id: $_id, input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_USER_MUTATION = gql`\n mutation deleteUser($email: String!) {\n deleteUser(email: $email)\n }\n`;\n\nexport const ADD_USER_FAVOURITE_RESOURCE_MUTATION = gql`\n mutation addUserFavouriteResource(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n addUserFavouriteResource(\n resourceId: $resourceId\n resourceType: $resourceType\n ) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = gql`\n mutation removeUserFavouriteResource(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n removeUserFavouriteResource(\n resourceId: $resourceId\n resourceType: $resourceType\n ) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const ADD_USER_INTEREST_RESOURCE_MUTATION = gql`\n mutation addUserInterestResource($input: UserActivityInputType!) {\n addUserInterestResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_INTEREST_RESOURCE_MUTATION = gql`\n mutation removeUserInterestResource($input: UserActivityInputType!) {\n removeUserInterestResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const ADD_USER_GOING_RESOURCE_MUTATION = gql`\n mutation addUserGoingResource($input: UserActivityInputType!) {\n addUserGoingResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_GOING_RESOURCE_MUTATION = gql`\n mutation removeUserGoingResource($input: UserActivityInputType!) {\n removeUserGoingResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const ADD_USER_PRESENT_RESOURCE_MUTATION = gql`\n mutation addUserPresentResource($input: UserActivityInputType!) {\n addUserPresentResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_PRESENT_RESOURCE_MUTATION = gql`\n mutation removeUserPresentResource($input: UserActivityInputType!) {\n removeUserPresentResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const SELECT_STANDARD_PACKAGE_MUTATION = gql`\n mutation selectStandardPackage($selectedLicence: LicencesEnumType!) {\n selectStandardPackage(selectedLicence: $selectedLicence) {\n licences {\n ...LicenceFields\n }\n userId\n message\n }\n }\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n EventListItemType,\n EventType,\n PartnerType,\n VendorType,\n ResourceByUser,\n SafeUserType,\n} from \"src/types\";\n\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_PARTNERS,\n GET_USER_RESOURCES,\n GET_USER_VENDORS,\n GET_USERS,\n} from \"../../queries/user\";\n\nexport const useGetUsers = () => {\n const { loading, error, data, refetch } = useQuery<{ users: SafeUserType[] }>(\n GET_USERS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const users = data?.users || [];\n\n return { error, loading, refetch, users };\n};\n\nexport const useGetUser = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ user: SafeUserType }>(\n GET_USER,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const user = data?.user;\n\n return { error, loading, refetch, user };\n};\n\nexport const useGetUserEvents = () => {\n const { loading, error, data, refetch } = useQuery<{\n userEvents: EventType[];\n }>(GET_USER_EVENTS, {\n fetchPolicy: \"network-only\",\n });\n\n const userEvents = data?.userEvents || [];\n\n return { error, loading, refetch, userEvents };\n};\n\nexport const useGetUserVendors = () => {\n const { loading, error, data, refetch } = useQuery<{\n userVendors: VendorType[];\n }>(GET_USER_VENDORS, {\n fetchPolicy: \"network-only\",\n });\n\n const userVendors = data?.userVendors || [];\n\n return { error, loading, refetch, userVendors };\n};\n\nexport const useGetUserPartners = () => {\n const { loading, error, data, refetch } = useQuery<{\n userPartners: PartnerType[];\n }>(GET_USER_PARTNERS, {\n fetchPolicy: \"network-only\",\n });\n\n const userPartners = data?.userPartners || [];\n\n return { error, loading, refetch, userPartners };\n};\n\nexport const useGetUserActivities = () => {\n const { loading, error, data, refetch } = useQuery<{\n userActivities: {\n favourites: {\n events: EventListItemType[];\n partners: PartnerType[];\n vendors: VendorType[];\n };\n going: {\n events: EventListItemType[];\n };\n interested: {\n events: EventListItemType[];\n };\n present: {\n events: EventListItemType[];\n };\n };\n }>(GET_USER_ACTIVITIES, {\n fetchPolicy: \"network-only\",\n });\n\n const userActivities = {\n favourites: {\n events: data?.userActivities.favourites.events || [],\n partners: data?.userActivities.favourites.partners || [],\n vendors: data?.userActivities.favourites.vendors || [],\n },\n going: {\n events: data?.userActivities.going.events || [],\n },\n interested: {\n events: data?.userActivities.interested.events || [],\n },\n present: {\n events: data?.userActivities.present.events || [],\n },\n };\n\n return { error, loading, refetch, userActivities };\n};\n\nexport const useGetUserResources = (userId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n userResources: {\n resources: ResourceByUser[];\n };\n }>(GET_USER_RESOURCES, {\n fetchPolicy: \"network-only\",\n skip: !userId || userId === \"\",\n variables: { userId },\n });\n\n const userResources = data?.userResources.resources || [];\n\n return { error, loading, refetch, userResources };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_AD_MUTATION,\n DELETE_AD_MUTATION,\n UPDATE_AD_MUTATION,\n} from \"src/graphql/mutations/ad\";\nimport { GET_ADS } from \"src/graphql/queries/ad\";\n\nexport const useCreateAd = () => {\n const [createAd, { loading, error }] = useMutation(CREATE_AD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_ADS }],\n });\n\n return {\n createAd,\n error,\n loading,\n };\n};\n\nexport const useUpdateAd = () => {\n const [updateAd, { loading, error }] = useMutation(UPDATE_AD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_ADS }],\n });\n\n return {\n error,\n loading,\n updateAd,\n };\n};\n\nexport const useDeleteAd = () => {\n const [deleteAd, { loading, error }] = useMutation(DELETE_AD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_ADS }],\n });\n\n return {\n deleteAd,\n error,\n loading,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { AD_FIELDS_FRAGMENT } from \"../queries/ad\";\n\nexport const CREATE_AD_MUTATION = gql`\n mutation createAd($input: AdInputType!) {\n createAd(input: $input) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_AD_MUTATION = gql`\n mutation updateAd($_id: ID!, $input: AdInputType!) {\n updateAd(_id: $_id, input: $input) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_AD_MUTATION = gql`\n mutation deleteAd($_id: ID!) {\n deleteAd(_id: $_id)\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const AD_FIELDS_FRAGMENT = gql`\n fragment AdFields on AdType {\n _id\n active\n clicks\n createdAt\n end\n impressions\n resource {\n adDescription\n adImage\n adStyle\n adTitle\n adType\n resourceId\n resourceName\n resourceRegion\n resourceType\n }\n showOn\n start\n status\n targetRegion\n updatedAt\n }\n`;\n\nexport const GET_ADS = gql`\n query getAds {\n ads {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const GET_AD = gql`\n query getAd($_id: ID!) {\n ad(_id: $_id) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const GET_ADS_BY_REGION = gql`\n query getAdsByRegion($region: String!, $status: AdStatusTypeEnum) {\n adsByRegion(region: $region, status: $status) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { GET_ADS, GET_AD, GET_ADS_BY_REGION } from \"src/graphql/queries/ad\";\nimport { AdType, EnumAdStatus } from \"src/types\";\n\nexport const useGetAds = () => {\n const { data, loading, error, refetch } = useQuery<{ ads: AdType[] }>(\n GET_ADS,\n {\n fetchPolicy: \"no-cache\",\n },\n );\n\n return {\n ads: data?.ads || [],\n error,\n loading,\n refetch,\n };\n};\n\nexport const useGetAd = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{ ad: AdType }>(GET_AD, {\n fetchPolicy: \"no-cache\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n return {\n ad: data?.ad,\n error,\n loading,\n refetch,\n };\n};\n\nexport const useGetAdsByRegion = (region: string, status?: EnumAdStatus) => {\n const { data, loading, error, refetch } = useQuery<{\n adsByRegion: AdType[];\n }>(GET_ADS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region || region === \"\",\n variables: { region, status },\n });\n\n return {\n adsByRegion: data?.adsByRegion || [],\n error,\n loading,\n refetch,\n };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport { CREATE_RESOURCE_ACTIVITY_MUTATION } from \"src/graphql/mutations/resourceActivities\";\n\nexport const useCreateResourceActivity = () => {\n const [createResourceActivity, { loading, error }] = useMutation(\n CREATE_RESOURCE_ACTIVITY_MUTATION,\n );\n\n return { createResourceActivity, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const CREATE_RESOURCE_ACTIVITY_MUTATION = gql`\n mutation createResourceActivity($input: ResourceActivityInputType!) {\n createResourceActivity(input: $input)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport { GET_RESOURCE_ACTIVITY } from \"src/graphql/queries/resourceActivities\";\nimport { ResourceActivityType } from \"src/types\";\n\nexport const useGetResourceActivity = (\n resourceId: string,\n resourceType: EnumResourceType,\n) => {\n const { data, loading, error, refetch } = useQuery<{\n resourceActivity: ResourceActivityType;\n }>(GET_RESOURCE_ACTIVITY, {\n fetchPolicy: \"network-only\",\n variables: { resourceId, resourceType },\n });\n\n return {\n error,\n loading,\n refetch,\n resourceActivity: data?.resourceActivity || null,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { LOCATION_GEO_FIELDS_FRAGMENT } from \"./global\";\n\nconst RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment ResourceActivityFields on ResourceActivityType {\n resourceId\n resourceType\n activity {\n activityType\n location {\n ...LocationGeoFields\n }\n dateStatus\n startDate\n startTime\n timestamp\n userAgent\n userId\n }\n }\n ${LOCATION_GEO_FIELDS_FRAGMENT}\n`;\n\nexport const GET_RESOURCE_ACTIVITY = gql`\n query getResourceActivity(\n $resourceType: ResourceTypeEnum!\n $resourceId: ID!\n ) {\n resourceActivity(resourceType: $resourceType, resourceId: $resourceId) {\n ...ResourceActivityFields\n }\n }\n ${RESOURCE_ACTIVITY_FIELDS_FRAGMENT}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n GET_USER,\n GET_USER_EVENTS,\n GET_USER_VENDORS,\n} from \"src/graphql/queries/user\";\nimport { UserLicenceType } from \"src/types\";\n\nimport {\n CANCEL_SUBSCRIPTION_MUTATION,\n CREATE_CHECKOUT_SESSION_MUTATION,\n CREATE_CUSTOMER_PORTAL,\n SELECT_PACKAGE_MUTATION,\n UPDATE_SUBSCRIPTION_PLAN_MUTATION,\n} from \"../../mutations/stripe\";\n\nexport const useCreateCheckoutSession = () => {\n const [createCheckoutSession, { loading, error }] = useMutation(\n CREATE_CHECKOUT_SESSION_MUTATION,\n );\n\n return { createCheckoutSession, error, loading };\n};\n\nexport const useCancelSubscription = () => {\n const [cancelSubscription, { loading, error }] = useMutation(\n CANCEL_SUBSCRIPTION_MUTATION,\n );\n\n return { cancelSubscription, error, loading };\n};\n\nexport const useUpdateSubscriptionPlan = () => {\n const [updateSubscriptionPlan, { loading, error }] = useMutation(\n UPDATE_SUBSCRIPTION_PLAN_MUTATION,\n );\n\n return { error, loading, updateSubscriptionPlan };\n};\n\nexport const useCreateCustomerPortal = () => {\n const [createCustomerPortal, { loading, error }] = useMutation(\n CREATE_CUSTOMER_PORTAL,\n );\n\n return { createCustomerPortal, error, loading };\n};\n\nexport const useSelectPackage = () => {\n const [selectPackage, { loading, error }] = useMutation<{\n selectPackage: {\n checkoutUrl?: string;\n userId: string;\n message: string;\n licences: UserLicenceType[];\n };\n }>(SELECT_PACKAGE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract userId from the mutation response\n const userId = mutationResult?.data?.selectPackage?.userId;\n\n if (!userId) return [];\n\n return [\n { query: GET_USER, variables: { _id: userId } },\n { query: GET_USER_EVENTS },\n { query: GET_USER_VENDORS },\n ];\n },\n });\n\n return { error, loading, selectPackage };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { LICENCE_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const CREATE_CHECKOUT_SESSION_MUTATION = gql`\n mutation createCheckoutSession(\n $planId: LicencesEnumType!\n $billingPeriod: BillingPeriodEnumType\n ) {\n createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {\n sessionId\n checkoutUrl\n }\n }\n`;\n\nexport const CANCEL_SUBSCRIPTION_MUTATION = gql`\n mutation cancelSubscription {\n cancelSubscription\n }\n`;\n\nexport const UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql`\n mutation updateSubscriptionPlan(\n $newPlanId: LicencesEnumType!\n $billingPeriod: BillingPeriodEnumType\n ) {\n updateSubscriptionPlan(\n newPlanId: $newPlanId\n billingPeriod: $billingPeriod\n ) {\n subscriptionId\n status\n priceId\n currentPlan\n }\n }\n`;\n\nexport const CREATE_CUSTOMER_PORTAL = gql`\n mutation createCustomerPortal($returnUrl: String) {\n createCustomerPortal(returnUrl: $returnUrl) {\n portalUrl\n }\n }\n`;\n\nexport const SELECT_PACKAGE_MUTATION = gql`\n mutation selectPackage(\n $billingPeriod: BillingPeriodEnumType\n $selectedLicence: LicencesEnumType!\n $useStripe: Boolean\n ) {\n selectPackage(\n billingPeriod: $billingPeriod\n selectedLicence: $selectedLicence\n useStripe: $useStripe\n ) {\n checkoutUrl\n licences {\n ...LicenceFields\n }\n userId\n message\n }\n }\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n SubscriptionStatusData,\n SubscriptionPlansResponse,\n} from \"../../../types/user\";\nimport {\n GET_SUBSCRIPTION_STATUS,\n GET_SUBSCRIPTION_PLANS,\n} from \"../../queries/stripe\";\n\nexport const useGetSubscriptionStatus = () => {\n const { data, loading, error, refetch } = useQuery<{\n getSubscriptionStatus: SubscriptionStatusData;\n }>(GET_SUBSCRIPTION_STATUS);\n\n return {\n data: data?.getSubscriptionStatus,\n error,\n loading,\n refetch,\n };\n};\n\nexport const useGetSubscriptionPlans = () => {\n const { data, loading, error, refetch } = useQuery<{\n getSubscriptionPlans: SubscriptionPlansResponse;\n }>(GET_SUBSCRIPTION_PLANS);\n\n return {\n data: data?.getSubscriptionPlans,\n error,\n loading,\n refetch,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const GET_SUBSCRIPTION_STATUS = gql`\n query getSubscriptionStatus {\n getSubscriptionStatus {\n subscriptionId\n status\n priceId\n currentPlan\n }\n }\n`;\n\nexport const GET_SUBSCRIPTION_PLANS = gql`\n query getSubscriptionPlans {\n getSubscriptionPlans {\n plans {\n name\n description\n licenceType\n billingPeriod\n stripeProductId\n stripePriceId\n isEligibleForDiscount\n pricing {\n basePrice\n discountedPrice\n hasDiscount\n discountPercent\n discountAmount\n currency\n formattedBasePrice\n formattedDiscountedPrice\n }\n }\n isNewUser\n isTester\n appliedDiscountType\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_PARTNER_MUTATION,\n DELETE_PARTNER_MUTATION,\n UPDATE_PARTNER_MUTATION,\n} from \"src/graphql/mutations/partner\";\nimport { GET_USER_PARTNERS } from \"src/graphql/queries/user\";\n\nexport const useCreatePartner = () => {\n const [createPartner, { loading, error }] = useMutation(\n CREATE_PARTNER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_PARTNERS }],\n },\n );\n\n return { createPartner, error, loading };\n};\n\nexport const useUpdatePartner = () => {\n const [updatePartner, { loading, error }] = useMutation(\n UPDATE_PARTNER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_PARTNERS }],\n },\n );\n\n return { error, loading, updatePartner };\n};\n\nexport const useDeletePartner = () => {\n const [deletePartner, { loading, error }] = useMutation(\n DELETE_PARTNER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_PARTNERS }],\n },\n );\n\n return { deletePartner, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { PARTNER } from \"../queries/partner\";\n\nexport const CREATE_PARTNER_MUTATION = gql`\n mutation createPartner($input: PartnerInputType!) {\n createPartner(input: $input) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const UPDATE_PARTNER_MUTATION = gql`\n mutation updatePartner($_id: ID!, $input: PartnerInputType!) {\n updatePartner(_id: $_id, input: $input) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const DELETE_PARTNER_MUTATION = gql`\n mutation deletePartner($_id: ID!) {\n deletePartner(_id: $_id)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { PartnerType } from \"src/types/partner\";\n\nimport { UseGetResourcesByRegionOptions } from \"../../../types/global\";\nimport {\n GET_PARTNER,\n GET_PARTNERS,\n GET_PARTNERS_BY_REGION,\n SEARCH_PARTNERS,\n} from \"../../queries/partner\";\n\nexport const useGetPartners = () => {\n const { loading, error, data, refetch } = useQuery<{\n partners: PartnerType[];\n }>(GET_PARTNERS, {\n fetchPolicy: \"network-only\",\n });\n const partners = data?.partners || [];\n\n return {\n error,\n loading,\n partners,\n refetch,\n };\n};\n\nexport const useGetPartner = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ partner: PartnerType }>(\n GET_PARTNER,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const partner = data?.partner;\n\n return { error, loading, partner, refetch };\n};\n\nexport const useGetPartnersByRegion = (\n region: string,\n options?: UseGetResourcesByRegionOptions,\n) => {\n const variables = {\n options,\n region,\n };\n const { loading, error, data, refetch, fetchMore } = useQuery<{\n partnersByRegion: PartnerType[];\n }>(GET_PARTNERS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables,\n });\n\n const partnersByRegion = data?.partnersByRegion || [];\n\n return {\n error,\n fetchMore,\n loading,\n partnersByRegion,\n refetch,\n };\n};\n\nexport const useSearchPartners = (search: string, region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n partnersSearch: PartnerType[];\n }>(SEARCH_PARTNERS, {\n fetchPolicy: \"network-only\",\n skip: search.length < 3 || !region || region === \"\",\n variables: { region, search },\n });\n\n const partnersSearch = data?.partnersSearch || [];\n\n return { error, loading, partnersSearch, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_POST_MUTATION,\n DELETE_POST_MUTATION,\n UPDATE_POST_MUTATION,\n} from \"src/graphql/mutations/post\";\nimport { GET_POSTS } from \"src/graphql/queries/post\";\n\nexport const useCreatePost = () => {\n const [createPost, { loading, error }] = useMutation(CREATE_POST_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_POSTS }],\n });\n\n return { createPost, error, loading };\n};\n\nexport const useUpdatePost = () => {\n const [updatePost, { loading, error }] = useMutation(UPDATE_POST_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_POSTS }],\n });\n\n return { error, loading, updatePost };\n};\n\nexport const useDeletePost = () => {\n const [deletePost, { loading, error }] = useMutation(DELETE_POST_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_POSTS }],\n });\n\n return { deletePost, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { POST_FIELDS_FRAGMENT } from \"../queries/post\";\n\nexport const CREATE_POST_MUTATION = gql`\n mutation createPost($input: PostInputType!) {\n createPost(input: $input) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_POST_MUTATION = gql`\n mutation updatePost($_id: ID!, $input: PostInputType!) {\n updatePost(_id: $_id, input: $input) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_POST_MUTATION = gql`\n mutation deletePost($_id: ID!) {\n deletePost(_id: $_id)\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT } from \"./game/dailyClue\";\nimport { PUZZLE_BASE_GAME_FIELDS_FRAGMENT } from \"./game/puzzleGame\";\nimport { RESOURCE_IMAGE_FIELDS_FRAGMENT } from \"./global\";\n\nconst BASE_GAME_FIELDS_FRAGMENT = gql`\n fragment BaseGameFields on BaseGameType {\n gameTypeId\n gameTitle\n gameType\n dailyClue {\n ...DailyClueBaseGameFields\n }\n miniQuiz {\n ...PuzzleBaseGameFields\n }\n oddOneOut {\n ...PuzzleBaseGameFields\n }\n }\n ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}\n ${PUZZLE_BASE_GAME_FIELDS_FRAGMENT}\n`;\n\nconst POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`\n fragment PostContentDataFields on PostContentData {\n game {\n ...BaseGameFields\n }\n textarea {\n title\n data\n }\n images {\n ...ResourceImageFields\n }\n video {\n source\n title\n }\n list {\n title\n items {\n text\n }\n }\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${BASE_GAME_FIELDS_FRAGMENT}\n`;\n\nconst POST_CONTENT_FIELDS_FRAGMENT = gql`\n fragment PostContentFields on PostContentType {\n contentData {\n ...PostContentDataFields\n }\n contentOrder\n contentType\n }\n ${POST_CONTENT_DATA_FIELDS_FRAGMENT}\n`;\n\nexport const POST_FIELDS_FRAGMENT = gql`\n fragment PostFields on PostType {\n _id\n active\n caption\n content {\n ...PostContentFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n deletedAt\n postType\n resource {\n resourceId\n resourceRegion\n resourceType\n }\n tags\n title\n updatedAt\n }\n ${POST_CONTENT_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nexport const GET_POSTS = gql`\n query getPosts {\n posts {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const GET_POST = gql`\n query getPost($_id: ID!) {\n post(_id: $_id) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const GET_POSTS_BY_TYPE = gql`\n query getPostsByType($postType: PostTypeEnum!) {\n postsByType(postType: $postType) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const GAME_DATE_FIELDS_FRAGMENT = gql`\n fragment GameDateFields on GameDateType {\n startDate\n endDate\n }\n`;\n\nexport const DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT = gql`\n fragment DailyClueBaseGameFields on DailyClueBaseGameType {\n gameDate {\n ...GameDateFields\n }\n gameSolution\n }\n ${GAME_DATE_FIELDS_FRAGMENT}\n`;\n\nexport const DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`\n fragment DailyClueGameDataFields on DailyClueGameDataType {\n gameFields {\n ...DailyClueBaseGameFields\n }\n lastFoundDate\n points\n letterInfo {\n collected\n solutionShuffled\n todaysClue\n todaysLetter\n todaysPlacement\n }\n streak\n }\n ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nconst PUZZLE_ANSWER_FIELDS_FRAGMENT = gql`\n fragment PuzzleAnswerFields on PuzzleAnswerType {\n answer\n answerId\n correct\n }\n`;\n\nconst PUZZLE_QUESTION_FIELDS_FRAGMENT = gql`\n fragment PuzzleQuestionFields on PuzzleQuestionType {\n answers {\n ...PuzzleAnswerFields\n }\n question\n questionId\n }\n ${PUZZLE_ANSWER_FIELDS_FRAGMENT}\n`;\n\nconst PUZZLE_ANSWERED_QUESTION_FIELDS_FRAGMENT = gql`\n fragment PuzzleAnsweredQuestionFields on PuzzleAnsweredQuestionType {\n questionId\n selectedAnswerId\n }\n`;\n\nexport const PUZZLE_BASE_GAME_FIELDS_FRAGMENT = gql`\n fragment PuzzleBaseGameFields on PuzzleBaseGameType {\n questions {\n ...PuzzleQuestionFields\n }\n }\n ${PUZZLE_QUESTION_FIELDS_FRAGMENT}\n`;\n\nexport const PUZZLE_GAME_DATA_FIELDS_FRAGMENT = gql`\n fragment PuzzleGameDataFields on PuzzleGameDataType {\n gameFields {\n ...PuzzleBaseGameFields\n }\n answeredQuestions {\n ...PuzzleAnsweredQuestionFields\n }\n points\n streak\n }\n ${PUZZLE_BASE_GAME_FIELDS_FRAGMENT}\n ${PUZZLE_ANSWERED_QUESTION_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n GET_POST,\n GET_POSTS,\n GET_POSTS_BY_TYPE,\n} from \"src/graphql/queries/post\";\nimport { EnumPostType, PostType } from \"src/types\";\n\nexport const useGetPosts = () => {\n const { data, loading, error, refetch } = useQuery<{\n posts: PostType[];\n }>(GET_POSTS, {\n fetchPolicy: \"network-only\",\n });\n\n return { error, loading, posts: data?.posts || [], refetch };\n};\n\nexport const useGetPost = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{\n post: PostType;\n }>(GET_POST, {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n return { error, loading, post: data?.post, refetch };\n};\n\nexport const useGetPostsByType = (postType: EnumPostType) => {\n const { data, loading, error, refetch } = useQuery<{\n postsByType: PostType[];\n }>(GET_POSTS_BY_TYPE, {\n fetchPolicy: \"network-only\",\n skip: !postType,\n variables: { postType },\n });\n\n return { error, loading, postsByType: data?.postsByType || [], refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CRAWL_GOOGLE_MARKETS_MUTATION,\n UPDATE_APP_SETTINGS_MUTATION,\n UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION,\n} from \"src/graphql/mutations/appSettings\";\nimport { GET_APP_SETTINGS } from \"src/graphql/queries/appSettings\";\n\nexport const useUpdateAppSettings = () => {\n const [updateAppSettings, { loading, error }] = useMutation(\n UPDATE_APP_SETTINGS_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_APP_SETTINGS }],\n },\n );\n\n return { error, loading, updateAppSettings };\n};\n\nexport const useCrawlGoogleMarkets = () => {\n const [crawlGoogleMarkets, { loading, error }] = useMutation<{\n crawlGoogleMarkets: {\n message: string;\n };\n }>(CRAWL_GOOGLE_MARKETS_MUTATION);\n\n return { crawlGoogleMarkets, error, loading };\n};\n\nexport const useUpdateGoogleImportedMarkets = () => {\n const [updateGoogleImportedMarkets, { loading, error }] = useMutation<{\n updateGoogleImportedMarkets: {\n message: string;\n };\n }>(UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION);\n\n return { error, loading, updateGoogleImportedMarkets };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const UPDATE_APP_SETTINGS_MUTATION = gql`\n mutation updateAppSettings($input: AppSettingsInputType!) {\n updateAppSettings(input: $input)\n }\n`;\n\nexport const CRAWL_GOOGLE_MARKETS_MUTATION = gql`\n mutation crawlGoogleMarkets {\n crawlGoogleMarkets {\n message\n }\n }\n`;\n\nexport const UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION = gql`\n mutation updateGoogleImportedMarkets {\n updateGoogleImportedMarkets {\n message\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const APP_SETTINGS_FIELDS_FRAGMENT = gql`\n fragment AppSettingsFields on AppSettingsType {\n _id\n appVersion\n createdAt\n isOfflineMode\n key\n updatedAt\n }\n`;\n\nexport const GET_APP_SETTINGS = gql`\n query getAppSettings {\n appSettings {\n ...AppSettingsFields\n }\n }\n ${APP_SETTINGS_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { GET_APP_SETTINGS } from \"src/graphql/queries/appSettings\";\nimport { AppSettingsType } from \"src/types/appSettings\";\n\nexport const useGetAppSettings = () => {\n const { loading, error, data, refetch } = useQuery<{\n appSettings: AppSettingsType;\n }>(GET_APP_SETTINGS, {\n fetchPolicy: \"network-only\",\n });\n\n const appSettings = data?.appSettings || null;\n\n return { appSettings, error, loading, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n LEAVE_GAME_MUTATION,\n START_GAME_MUTATION,\n UPDATE_DAILY_CLUE_MUTATION,\n UPDATE_PUZZLE_GAME_MUTATION,\n} from \"src/graphql/mutations/game\";\nimport { GET_GAME, GET_GAMES } from \"src/graphql/queries/game/game\";\nimport { GET_USER } from \"src/graphql/queries/user\";\nimport { GameDocType } from \"src/types\";\n\nexport const useStartGame = () => {\n const [startGame, { loading, error }] = useMutation<{\n startGame: GameDocType;\n }>(START_GAME_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract gameId from the mutation response\n const gameId = mutationResult?.data?.startGame?._id;\n const userId = mutationResult?.data?.startGame?.owner?.userId;\n\n if (!gameId || !userId) return [];\n\n return [\n {\n query: GET_GAME,\n variables: { _id: gameId }, // Pass the gameId for refetching\n },\n {\n query: GET_USER,\n variables: { _id: userId }, // Pass the userId for refetching\n },\n ];\n },\n });\n\n return { error, loading, startGame };\n};\n\nexport const useLeaveGame = () => {\n const [leaveGame, { loading, error }] = useMutation(LEAVE_GAME_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [\n {\n query: GET_GAMES,\n },\n ],\n });\n\n return { error, leaveGame, loading };\n};\n\nexport const useUpdateDailyClueGame = () => {\n const [updateDailyClueGame, { loading, error }] = useMutation<{\n updateDailyClueGame: GameDocType;\n }>(UPDATE_DAILY_CLUE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract gameId from the mutation response\n const gameId = mutationResult?.data?.updateDailyClueGame?._id;\n\n if (!gameId) return [];\n\n return [\n {\n query: GET_GAME,\n variables: { _id: gameId }, // Pass the gameId for refetching\n },\n ];\n },\n });\n\n return { error, loading, updateDailyClueGame };\n};\n\nexport const useUpdatePuzzleGame = () => {\n const [updatePuzzleGame, { loading, error }] = useMutation<{\n updatePuzzleGame: GameDocType;\n }>(UPDATE_PUZZLE_GAME_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract gameId from the mutation response\n const gameId = mutationResult?.data?.updatePuzzleGame?._id;\n\n if (!gameId) return [];\n\n return [\n {\n query: GET_GAME,\n variables: { _id: gameId }, // Pass the gameId for refetching\n },\n ];\n },\n });\n\n return { error, loading, updatePuzzleGame };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { GAME_DOC_FIELDS_FRAGMENT } from \"../queries/game/game\";\n\nexport const START_GAME_MUTATION = gql`\n mutation startGame($input: BaseGameInputType!) {\n startGame(input: $input) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const LEAVE_GAME_MUTATION = gql`\n mutation leaveGame(\n $_id: ID!\n $gameType: GameTypeEnumType!\n $gameTypeId: String!\n ) {\n leaveGame(_id: $_id, gameType: $gameType, gameTypeId: $gameTypeId)\n }\n`;\n\nexport const UPDATE_DAILY_CLUE_MUTATION = gql`\n mutation updateDailyClueGame(\n $_id: ID!\n $foundLetter: String!\n $gameType: GameTypeEnumType!\n $gameTypeId: String!\n ) {\n updateDailyClueGame(\n _id: $_id\n foundLetter: $foundLetter\n gameType: $gameType\n gameTypeId: $gameTypeId\n ) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_PUZZLE_GAME_MUTATION = gql`\n mutation updatePuzzleGame(\n $_id: ID!\n $answeredQuestions: [PuzzleAnsweredQuestionInputType!]!\n $gameType: GameTypeEnumType!\n $gameTypeId: String!\n ) {\n updatePuzzleGame(\n _id: $_id\n answeredQuestions: $answeredQuestions\n gameType: $gameType\n gameTypeId: $gameTypeId\n ) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { OWNER_FIELDS_FRAGMENT } from \"../global\";\n\nimport {\n DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT,\n GAME_DATE_FIELDS_FRAGMENT,\n} from \"./dailyClue\";\nimport { PUZZLE_GAME_DATA_FIELDS_FRAGMENT } from \"./puzzleGame\";\n\nconst GAME_HISTORY_FIELDS_FRAGMENT = gql`\n fragment GameHistoryFields on GameHistoryType {\n createdAt\n gameDate {\n ...GameDateFields\n }\n gameStatus\n gameTitle\n gameType\n gameTypeId\n overallGamePoints\n pointsEarned\n }\n ${GAME_DATE_FIELDS_FRAGMENT}\n`;\n\nconst GAME_DATA_FIELDS_FRAGMENT = gql`\n fragment GameDataFields on GameDataType {\n dailyClue {\n ...DailyClueGameDataFields\n }\n miniQuiz {\n ...PuzzleGameDataFields\n }\n oddOneOut {\n ...PuzzleGameDataFields\n }\n }\n ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}\n ${PUZZLE_GAME_DATA_FIELDS_FRAGMENT}\n`;\n\nconst GAME_FIELDS_FRAGMENT = gql`\n fragment GameFields on GameType {\n _id\n active\n createdAt\n gameData {\n ...GameDataFields\n }\n gameHistory {\n ...GameHistoryFields\n }\n gameType\n gameTypeId\n gameTitle\n updatedAt\n }\n ${GAME_DATA_FIELDS_FRAGMENT}\n ${GAME_HISTORY_FIELDS_FRAGMENT}\n`;\n\nexport const GAME_DOC_FIELDS_FRAGMENT = gql`\n fragment GameDocFields on GameDocType {\n _id\n active\n createdAt\n deletedAt\n games {\n ...GameFields\n }\n owner {\n ...OwnerFields\n }\n points\n updatedAt\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${GAME_FIELDS_FRAGMENT}\n`;\n\nexport const GET_GAMES = gql`\n query getGames {\n games {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const GET_GAME = gql`\n query getGame($_id: ID) {\n game(_id: $_id) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const GET_GAME_LEADERBOARD = gql`\n query getGameLeaderboard {\n gameLeaderboard {\n gameHistory {\n ...GameHistoryFields\n }\n overallPoints\n owner {\n ...OwnerFields\n }\n }\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${GAME_HISTORY_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n GET_GAME,\n GET_GAME_LEADERBOARD,\n GET_GAMES,\n} from \"src/graphql/queries/game/game\";\nimport { GameLeaderboard, GameDocType } from \"src/types/game\";\n\nexport const useGetGames = () => {\n const { loading, error, data, refetch } = useQuery<{\n games: GameDocType[];\n }>(GET_GAMES, {\n fetchPolicy: \"network-only\",\n });\n\n const games = data?.games || [];\n\n return { error, games, loading, refetch };\n};\n\nexport const useGetGame = (_id?: string | null) => {\n const { loading, error, data, refetch } = useQuery<{\n game: GameDocType | null;\n }>(GET_GAME, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: _id ? { _id } : undefined,\n });\n\n const game = data?.game || null;\n\n return { error, game, loading, refetch };\n};\n\nexport const useGetGameLeaderboard = () => {\n const { loading, error, data, refetch } = useQuery<{\n gameLeaderboard: GameLeaderboard[];\n }>(GET_GAME_LEADERBOARD, {\n fetchPolicy: \"network-only\",\n });\n\n const gameLeaderboard = data?.gameLeaderboard || [];\n\n return { error, gameLeaderboard, loading, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_SCHOOL_MUTATION,\n DELETE_SCHOOL_MUTATION,\n REQUEST_MARKETING_MATERIAL_MUTATION,\n UPDATE_SCHOOL_MUTATION,\n} from \"../../mutations/school\";\nimport { GET_SCHOOLS } from \"../../queries/school\";\n\nexport const useCreateSchool = () => {\n const [createSchool, { loading, error }] = useMutation(\n CREATE_SCHOOL_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_SCHOOLS }],\n },\n );\n\n return { createSchool, error, loading };\n};\n\nexport const useUpdateSchool = () => {\n const [updateSchool, { loading, error }] = useMutation(\n UPDATE_SCHOOL_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_SCHOOLS }],\n },\n );\n\n return { error, loading, updateSchool };\n};\n\nexport const useDeleteSchool = () => {\n const [deleteSchool, { loading, error }] = useMutation(\n DELETE_SCHOOL_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_SCHOOLS }],\n },\n );\n return { deleteSchool, error, loading };\n};\n\nexport const useRequestMarketingMaterial = () => {\n const [requestMarketingMaterial, { loading, error }] = useMutation(\n REQUEST_MARKETING_MATERIAL_MUTATION,\n );\n\n return { error, loading, requestMarketingMaterial };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { SCHOOL } from \"../queries/school\";\n\nexport const CREATE_SCHOOL_MUTATION = gql`\n mutation createSchool($input: SchoolInputType!) {\n createSchool(input: $input) {\n ...SchoolFields\n }\n }\n ${SCHOOL}\n`;\n\nexport const UPDATE_SCHOOL_MUTATION = gql`\n mutation updateSchool($_id: ID!, $input: SchoolInputType!) {\n updateSchool(_id: $_id, input: $input) {\n ...SchoolFields\n }\n }\n ${SCHOOL}\n`;\n\nexport const DELETE_SCHOOL_MUTATION = gql`\n mutation deleteSchool($_id: ID!) {\n deleteSchool(_id: $_id)\n }\n`;\n\nexport const REQUEST_MARKETING_MATERIAL_MUTATION = gql`\n mutation requestMarketingMaterial(\n $input: MarketingMaterialRequestInputType!\n ) {\n requestMarketingMaterial(input: $input) {\n message\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n} from \"./global\";\n\nconst SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = gql`\n fragment SchoolRegisteredUsersFields on SchoolRegisteredUserType {\n _id\n avatar {\n ...ResourceImageFields\n }\n email\n firstName\n lastName\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nconst SCHOOL_CAMPAIGN_FIELDS_FRAGMENT = gql`\n fragment SchoolCampaignFields on SchoolCampaignType {\n endDate\n name\n startDate\n }\n`;\n\nexport const SCHOOL = gql`\n fragment SchoolFields on SchoolType {\n _id\n active\n campaigns {\n ...SchoolCampaignFields\n }\n contactDetails {\n ...ContactDetailsFields\n }\n location {\n ...LocationFields\n }\n createdAt\n deletedAt\n logo {\n ...ResourceImageFields\n }\n name\n owner {\n ...OwnerFields\n }\n overallPoints\n ranking\n region\n studentCount\n schoolCode\n socialMedia {\n ...SocialMediaFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${SCHOOL_CAMPAIGN_FIELDS_FRAGMENT}\n`;\n\nexport const GET_SCHOOL = gql`\n query getSchool($_id: ID!) {\n school(_id: $_id) {\n school {\n ...SchoolFields\n }\n users {\n ...SchoolRegisteredUsersFields\n }\n }\n }\n ${SCHOOL}\n ${SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT}\n`;\n\nexport const GET_SCHOOLS = gql`\n query getSchools {\n schools {\n ...SchoolFields\n }\n }\n ${SCHOOL}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { SchoolReturnType, SchoolType } from \"../../../types/school\";\nimport { GET_SCHOOL, GET_SCHOOLS } from \"../../queries/school\";\n\nexport const useGetSchools = () => {\n const { data, loading, error, refetch } = useQuery<{ schools: SchoolType[] }>(\n GET_SCHOOLS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n return {\n error,\n loading,\n refetch,\n schools: data?.schools || [],\n };\n};\n\nexport const useGetSchool = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{\n school: SchoolReturnType;\n }>(GET_SCHOOL, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: { _id },\n });\n\n return {\n error,\n loading,\n refetch,\n school: data?.school || null,\n };\n};\n","const PKG = \"@timardex/cluemart-shared\" as const;\nexport const IMAGE_EXTENSION = \".webp\" as const;\n\n/**\n * Basenames under the shared images directory — use with `getSharedImagePath` from `@timardex/cluemart-shared/images/node` (Express / Node).\n * This object is the single source of poster keys; `posters` is derived from it. Add an image with `IMAGE_EXTENSION` under `src/images/posters/` when adding an entry.\n * `images/node` reads this at runtime for `getSharedImagePath` allow-listing.\n */\nexport const posterIds = [\n \"mini-market1\",\n \"mini-market2\",\n \"mini-market3\",\n \"mini-market4\",\n \"mini-market5\",\n \"poster1\",\n \"poster2\",\n \"poster3\",\n \"poster4\",\n] as const;\n\nexport const posterFiles = Object.fromEntries(\n posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof posterIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\n/**\n * Basenames for assets under `src/images/clui/` in source; they are copied flat into `dist/images/` (same as posters).\n * `images/node` reads this at runtime for `getSharedImagePath` allow-listing.\n */\nexport const cluiIds = [\n \"cluiTui\",\n \"sima\",\n \"tablas\",\n \"telefonos\",\n \"ugralos\",\n] as const;\n\nexport const cluiFiles = Object.fromEntries(\n cluiIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof cluiIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const iconIds = [\n \"apple-maps-icon\",\n \"facebook\",\n \"google-maps-icon\",\n \"instagram\",\n \"meet\",\n \"poll\",\n \"tiktok\",\n \"tip\",\n \"waze-maps-icon\",\n \"website\",\n \"youtube\",\n] as const;\n\nexport const iconFiles = Object.fromEntries(\n iconIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof iconIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const badgeIds = [\"corporate\", \"private\", \"school\"] as const;\n\nexport const badgeFiles = Object.fromEntries(\n badgeIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof badgeIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const logoIds = [\n \"googleMaps-logo-dark\",\n \"googleMaps-logo-light\",\n \"logo-atr\",\n \"logo-dark\",\n \"logo\",\n] as const;\n\nexport const logoFiles = Object.fromEntries(\n logoIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof logoIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const otherImagesIds = [\n \"banner-horizontal\",\n \"banner-vertical\",\n \"gazebo-top\",\n \"qr-code\",\n \"store-android\",\n \"store-ios\",\n] as const;\n\nexport const otherImagesFiles = Object.fromEntries(\n otherImagesIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof otherImagesIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\n/**\n * Module specifiers for each poster (not resolved file URLs). Use a static import or require with these paths\n * so your bundler resolves the file, e.g.\n * `import poster1 from \"@timardex/cluemart-shared/images/poster1.webp\"`\n * or `require(\"@timardex/cluemart-shared/images/poster1.webp\")` (React Native / Metro).\n *\n * Derived from `posterFiles` so keys and filenames stay aligned.\n */\nexport const posters = Object.fromEntries(\n (\n Object.entries(posterFiles) as [\n keyof typeof posterFiles,\n (typeof posterFiles)[keyof typeof posterFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof posterFiles]: `${typeof PKG}/images/${(typeof posterFiles)[K]}`;\n};\n\n/**\n * Module specifiers for Clui assets (same flat `@…/images/<file>.webp` pattern as posters), e.g.\n * `import clui from \"@timardex/cluemart-shared/images/cluiTui.webp\"`.\n */\nexport const cluiImages = Object.fromEntries(\n (\n Object.entries(cluiFiles) as [\n keyof typeof cluiFiles,\n (typeof cluiFiles)[keyof typeof cluiFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof cluiFiles]: `${typeof PKG}/images/${(typeof cluiFiles)[K]}`;\n};\n\nexport const icons = Object.fromEntries(\n (\n Object.entries(iconFiles) as [\n keyof typeof iconFiles,\n (typeof iconFiles)[keyof typeof iconFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof iconFiles]: `${typeof PKG}/images/${(typeof iconFiles)[K]}`;\n};\n\nexport const badges = Object.fromEntries(\n (\n Object.entries(badgeFiles) as [\n keyof typeof badgeFiles,\n (typeof badgeFiles)[keyof typeof badgeFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof badgeFiles]: `${typeof PKG}/images/${(typeof badgeFiles)[K]}`;\n};\n\nexport const logos = Object.fromEntries(\n (\n Object.entries(logoFiles) as [\n keyof typeof logoFiles,\n (typeof logoFiles)[keyof typeof logoFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof logoFiles]: `${typeof PKG}/images/${(typeof logoFiles)[K]}`;\n};\n\nexport const otherImages = Object.fromEntries(\n (\n Object.entries(otherImagesFiles) as [\n keyof typeof otherImagesFiles,\n (typeof otherImagesFiles)[keyof typeof otherImagesFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof otherImagesFiles]: `${typeof PKG}/images/${(typeof otherImagesFiles)[K]}`;\n};\n\nexport type PosterAssetId = keyof typeof posters;\n\n/** A single filename under the shared images directory (values of `posterFiles`). */\nexport type PosterImageBasename = (typeof posterFiles)[PosterAssetId];\n\nexport type CluiImageId = keyof typeof cluiImages;\n\n/** Basename under the shared images directory (values of `cluiFiles`). */\nexport type CluiImageBasename = (typeof cluiFiles)[CluiImageId];\n\nexport type IconId = keyof typeof icons;\nexport type IconBasename = (typeof iconFiles)[IconId];\n\nexport type BadgeId = keyof typeof badges;\nexport type BadgeBasename = (typeof badgeFiles)[BadgeId];\n\nexport type LogoId = keyof typeof logos;\nexport type LogoBasename = (typeof logoFiles)[LogoId];\n\nexport type OtherImagesId = keyof typeof otherImages;\nexport type OtherImagesBasename = (typeof otherImagesFiles)[OtherImagesId];\n","/** Path segments for relation share URLs — must match mobile `RelationTitle` values. */\nexport const RELATION_SHARE_INVITATION = \"invitation\" as const;\nexport const RELATION_SHARE_APPLICATION = \"application\" as const;\n\nexport const RELATION_SHARE_RESOURCE_TYPES = [\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_APPLICATION,\n] as const;\n\nexport type RelationShareResourceType =\n (typeof RELATION_SHARE_RESOURCE_TYPES)[number];\n\nexport function isRelationShareResourceType(\n resourceType: string,\n): resourceType is RelationShareResourceType {\n return (RELATION_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import { CLUEMART_MAIN_DOMAIN_URL } from \"src/utils\";\n\nimport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_RESOURCE_TYPES,\n isRelationShareResourceType,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport const SHARE_SITE_URL = CLUEMART_MAIN_DOMAIN_URL;\n\n/** Calendar marker for invitation market-dates share copy (U+1F4C5 📅). */\nexport const SHARE_CALENDAR_ICON = \"\\u{1F4C5}\";\n\nexport const SHARE_MARKET_DATES_SECTION_HEADING = `${SHARE_CALENDAR_ICON} Market dates:`;\n\n/** Check mark for invitation requirements share copy (U+2705 ✅). */\nexport const SHARE_CHECKMARK_ICON = \"\\u{2705}\";\n\nexport const SHARE_REQUIREMENTS_SECTION_HEADING = `${SHARE_CHECKMARK_ICON} Requirements:`;\n\n/** Information marker for tags share copy (U+2139 ℹ️). */\nexport const SHARE_INFO_ICON = \"\\u{2139}\\u{FE0F}\";\n\nexport const SHARE_TAGS_SECTION_HEADING = `${SHARE_INFO_ICON} Tags:`;\n\n/** Standalone line when `rainOrShine` is true (invitation share + OG section parsing). */\nexport const SHARE_RAIN_OR_SHINE_LINE = \"Rain or Shine\";\n\n/** Standalone line when `foodTruck` is true (application share + OG section parsing). */\nexport const SHARE_FOOD_TRUCK_LINE = \"Food Truck\";\n\n/** Prefix for application compliance line (share text + OG section parsing). */\nexport const SHARE_COMPLIANCE_PREFIX = `${SHARE_CHECKMARK_ICON} Compliance:`;\n\n/** Label tag for application categories share copy (U+1F3F7 🏷️). */\nexport const SHARE_CATEGORY_ICON = \"\\u{1F3F7}\\u{FE0F}\";\n\nexport const SHARE_CATEGORIES_SECTION_HEADING = `${SHARE_CATEGORY_ICON} Categories:`;\n\n/** Straight ruler for application stall-size share copy (U+1F4CF 📏). */\nexport const SHARE_RULER_ICON = \"\\u{1F4CF}\";\n\n/** Prefix for application stall-size line (share text + OG section parsing). */\nexport const SHARE_STALL_SIZE_PREFIX = `${SHARE_RULER_ICON} Stall size:`;\n\n/** Dollar marker for price-range share copy (U+0024 $ — text, not emoji, so it stays black). */\nexport const SHARE_DOLLAR_ICON = \"$\";\n\n/** Prefix for application price-range line (share text + OG section parsing). */\nexport const SHARE_PRICE_RANGE_PREFIX = `${SHARE_DOLLAR_ICON} Price range:`;\n\n/** Alarm clock for invitation application-deadline share copy (U+23F0 ⏰). */\nexport const SHARE_CLOCK_ICON = \"\\u{23F0}\";\n\n/** Prefix for the invitation application-deadline sentence (share text + OG section parsing). */\nexport const SHARE_APPLICATION_DEADLINE_PREFIX = `${SHARE_CLOCK_ICON} Application deadline:`;\n\n/** First line on share sheet messages, Facebook SDK quote, and `og:description`. */\nexport const SHARE_MORE_INFO_LINE = \"Shared from ClueMart\";\n\nexport const DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;\n\nexport const RESOURCE_SHARE_TYPES = [\n \"market\",\n \"stallholder\",\n \"partner\",\n] as const;\n\nexport type ResourceShareType = (typeof RESOURCE_SHARE_TYPES)[number];\n\nexport const POST_SHARE_RESOURCE_TYPES = [\n \"daily_meets\",\n \"daily_tips\",\n \"daily_games\",\n] as const;\n\nexport type PostShareResourceType = (typeof POST_SHARE_RESOURCE_TYPES)[number];\n\nexport type ShareResourceType =\n | ResourceShareType\n | PostShareResourceType\n | RelationShareResourceType;\n\nexport const SHARE_RESOURCE_LABEL: Record<ShareResourceType, string> = {\n [RELATION_SHARE_APPLICATION]: \"Application\",\n [RELATION_SHARE_INVITATION]: \"Invitation\",\n daily_games: \"Daily Game\",\n daily_meets: \"Daily Meet\",\n daily_tips: \"Daily Tip\",\n market: \"Market\",\n partner: \"Partner\",\n stallholder: \"Stallholder\",\n};\n\nexport function isPostShareResourceType(\n resourceType: ShareResourceType,\n): resourceType is PostShareResourceType {\n return (POST_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import type { Category } from \"../types/global\";\n\nexport function formatCategoryLabel(category: Category): string {\n const subcategoryNames = category.subcategories\n .map((subcategory) => subcategory.name)\n .filter(Boolean);\n\n if (subcategoryNames.length === 0) {\n return category.name;\n }\n\n return `${category.name} (${subcategoryNames.join(\", \")})`;\n}\n","import { SHARE_MORE_INFO_LINE } from \"./constants\";\n\n/** Blank line between share sections — title, address, dates, URL, etc. */\nexport const SHARE_DESCRIPTION_SECTION_BREAK = \"\\n\\n\";\n\n/**\n * Line break for `og:description` meta content. Use instead of `\\n` — Next.js\n * HTML serialisation collapses literal newlines to spaces; Facebook reads `&#10;`.\n */\nexport const OG_DESCRIPTION_LINE_BREAK = \"&#10;\";\n\n/** Joins OG description sections for Facebook link cards (and Twitter). */\nexport function joinShareOgDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .map((section) => (typeof section === \"string\" ? section.trim() : \"\"))\n .filter((section): section is string => section.length > 0)\n .map((section) => section.replace(/\\n/g, OG_DESCRIPTION_LINE_BREAK))\n .join(OG_DESCRIPTION_LINE_BREAK);\n}\n\nexport function joinShareDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .filter((section): section is string => Boolean(section))\n .join(SHARE_DESCRIPTION_SECTION_BREAK);\n}\n\n/** Prepends the standard share branding line when assembling display text. */\nexport function appendShareMoreInfoLine(description: string): string {\n const trimmed = description.trim();\n if (trimmed.startsWith(SHARE_MORE_INFO_LINE)) {\n return trimmed;\n }\n if (trimmed.length === 0) {\n return SHARE_MORE_INFO_LINE;\n }\n return joinShareDescriptionSections([SHARE_MORE_INFO_LINE, trimmed]);\n}\n","import type { StallType } from \"../types/event\";\nimport { formatDate } from \"../utils/date\";\n\nimport {\n SHARE_APPLICATION_DEADLINE_PREFIX,\n SHARE_CATEGORIES_SECTION_HEADING,\n SHARE_FOOD_TRUCK_LINE,\n SHARE_MARKET_DATES_SECTION_HEADING,\n SHARE_RAIN_OR_SHINE_LINE,\n SHARE_REQUIREMENTS_SECTION_HEADING,\n SHARE_COMPLIANCE_PREFIX,\n SHARE_PRICE_RANGE_PREFIX,\n SHARE_STALL_SIZE_PREFIX,\n SHARE_TAGS_SECTION_HEADING,\n} from \"./constants\";\nimport { formatCategoryLabel } from \"./formatCategoryLabel\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\nimport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\nexport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\n/** Formats event `startDate` (`DD-MM-YYYY`) for share copy — same as share preview UI. */\nexport function formatShareMarketDate(dateStr: string): string {\n return formatDate(dateStr, \"date\");\n}\n\nexport function formatStallCapacityLabel(stallCapacity: number): string {\n return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : \" - Full\";\n}\n\nexport function formatShareStallLine(stall: StallType): string {\n return ` - ${stall.label} — $${stall.price}${formatStallCapacityLabel(stall.stallCapacity)}`;\n}\n\n/** Nested market dates + per-date stall lines for invitation share copy. */\nexport function formatShareInvitationMarketDatesSection(\n dateTime: ShareEventInfoForInvitation[\"dateTime\"],\n): string {\n const dateBlocks = dateTime.map((date) => {\n const formattedDate = formatShareMarketDate(date.startDate);\n const stallLines = date.stallTypes.map(formatShareStallLine);\n return [`- ${formattedDate}`, ...stallLines].join(\"\\n\");\n });\n\n return `${SHARE_MARKET_DATES_SECTION_HEADING}\\n${dateBlocks.join(\"\\n\")}`;\n}\n\nexport function formatShareRainOrShineLine(\n rainOrShine: boolean,\n): string | null {\n return rainOrShine ? SHARE_RAIN_OR_SHINE_LINE : null;\n}\n\nexport function formatShareIsFoodTrueLine(foodTruck: boolean): string | null {\n return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;\n}\n\n/** Bulleted requirements list for invitation share copy. */\nexport function formatShareInvitationRequirementsSection(\n requirements: ShareEventInfoForInvitation[\"requirements\"] | null,\n): string | null {\n const bullets = (requirements ?? [])\n .filter((item) => item.value)\n .map((item) => item.label.trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_REQUIREMENTS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\nexport function formatShareTagsSection(tags: string[]): string | null {\n const bullets = tags\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => `- ${tag}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_TAGS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Bulleted categories list for application share copy. */\nexport function formatShareApplicationCategoriesSection(\n categories: ShareVendorForApplication[\"categories\"],\n): string | null {\n const bullets = categories\n .map((category) => formatCategoryLabel(category).trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_CATEGORIES_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Stall dimensions line for application share copy. */\nexport function formatShareApplicationStallSizeLine(size: {\n width: string;\n depth: string;\n}): string {\n return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m × ${size.depth}m`;\n}\n\n/** Bulleted compliance list for application share copy. */\nexport function formatShareApplicationComplianceSection(\n compliance: ShareVendorInfoForApplication[\"compliance\"],\n): string | null {\n const bullets = [\n compliance?.liabilityInsurance && \"Liability insurance\",\n compliance?.foodBeverageLicense && \"Food & beverage licence\",\n ]\n .filter((label): label is string => Boolean(label))\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_COMPLIANCE_PREFIX}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Price range line for application share copy. */\nexport function formatShareApplicationPriceRangeLine(priceRange: {\n min: string;\n max: string;\n}): string {\n return `${SHARE_PRICE_RANGE_PREFIX} $${priceRange.min} – $${priceRange.max}`;\n}\n\n/** Application-deadline sentence for invitation share copy. */\nexport function formatShareInvitationApplicationDeadlineLine(\n applicationDeadlineHours: number,\n): string {\n return `${SHARE_APPLICATION_DEADLINE_PREFIX} vendors must apply at least ${applicationDeadlineHours} hours before each market date.`;\n}\n\nexport function buildInvitationShareDescription(\n event: ShareEventForInvitation,\n eventInfo: ShareEventInfoForInvitation | null | undefined,\n): string {\n const stallTypes =\n eventInfo?.dateTime?.flatMap((date) => date.stallTypes) ?? [];\n\n if (!eventInfo || stallTypes.length === 0) {\n return event.description?.trim() || \"\";\n }\n\n const sections = [\n event.location.fullAddress,\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(event.tags),\n formatShareInvitationMarketDatesSection(eventInfo.dateTime),\n formatShareInvitationApplicationDeadlineLine(\n eventInfo.applicationDeadlineHours,\n ),\n formatShareInvitationRequirementsSection(eventInfo.requirements),\n ];\n\n return joinShareDescriptionSections(sections);\n}\n\nexport function buildApplicationShareDescription(\n vendor: ShareVendorForApplication,\n vendorInfo: ShareVendorInfoForApplication | null | undefined,\n): string {\n if (!vendorInfo) {\n return vendor.description?.trim() || \"\";\n }\n\n const profileDescription = vendor.description?.trim();\n\n const sections = [\n formatShareIsFoodTrueLine(vendor.foodTruck),\n formatShareApplicationCategoriesSection(vendor.categories),\n formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),\n formatShareApplicationComplianceSection(vendorInfo.compliance),\n formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),\n profileDescription,\n ];\n\n return joinShareDescriptionSections(sections);\n}\n","import {\n formatShareIsFoodTrueLine,\n formatShareRainOrShineLine,\n formatShareTagsSection,\n} from \"./buildRelationShareDescription\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\n\n/** Minimal event fields for public (market) share copy — matches in-app preview. */\nexport type ShareEventForPublic = {\n description?: string | null;\n rainOrShine: boolean;\n tags: string[];\n};\n\n/** Minimal vendor fields for public (stallholder) share copy — matches in-app preview. */\nexport type ShareVendorForPublic = {\n description?: string | null;\n foodTruck: boolean;\n};\n\nexport function buildPublicEventShareDescription(\n event: ShareEventForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(event.tags),\n event.description?.trim(),\n ]);\n}\n\nexport function buildPublicVendorShareDescription(\n vendor: ShareVendorForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareIsFoodTrueLine(vendor.foodTruck),\n vendor.description?.trim(),\n ]);\n}\n","import {\n POST_SHARE_RESOURCE_TYPES,\n RESOURCE_SHARE_TYPES,\n SHARE_SITE_URL,\n} from \"./constants\";\nimport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n} from \"./relationShareTypes\";\n\n/** Path segments for public resource share URLs (markets, posts, etc.). */\nexport const PUBLIC_SHARE_PATH_TYPES = [\n ...RESOURCE_SHARE_TYPES,\n ...POST_SHARE_RESOURCE_TYPES,\n] as const;\n\nexport type PublicSharePathType = (typeof PUBLIC_SHARE_PATH_TYPES)[number];\n\nexport type RelationSharePathType =\n | typeof RELATION_SHARE_INVITATION\n | typeof RELATION_SHARE_APPLICATION;\n\nexport type ShareType = PublicSharePathType | RelationSharePathType;\n\n/** Alternation for deep-link regexes — keep in sync with {@link ShareType}. */\nexport const SHARE_TYPE_PATH_REGEX = [\n ...PUBLIC_SHARE_PATH_TYPES,\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n].join(\"|\");\n\nexport function buildShareUrl(\n type: ShareType,\n id: string,\n utmMedium: string = \"app\",\n): string {\n return `${SHARE_SITE_URL}/share/${type}/${encodeURIComponent(id)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;\n}\n","import { SHARE_MORE_INFO_LINE, type ShareResourceType } from \"./constants\";\nimport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n} from \"./joinShareDescriptionSections\";\n\nexport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n};\n\n/** Trims share text and collapses spaces per line; preserves `\\n\\n` section breaks. */\nexport function normalizeShareText(value: string | null | undefined): string {\n if (value == null) {\n return \"\";\n }\n return value\n .trim()\n .split(\"\\n\")\n .map((line) => {\n const match = line.match(/^([ \\t]*)(.*)$/);\n if (!match) {\n return line;\n }\n const [, leading, rest] = match;\n return leading + rest.trim().replace(/[ \\t]{2,}/g, \" \");\n })\n .join(\"\\n\")\n .replace(/\\n{3,}/g, \"\\n\\n\");\n}\n\n/** Branding line placement — first so Facebook truncation does not drop it. */\nexport type ShareMessageFooterPlacement = \"before-body\";\n\nexport function shareMessageFooterPlacementForType(\n _shareType?: ShareResourceType,\n): ShareMessageFooterPlacement {\n return \"before-body\";\n}\n\n/**\n * Ordered sections for share-sheet / Facebook SDK quote text:\n * {@link SHARE_MORE_INFO_LINE} → title → description (full body or post caption).\n */\nexport function buildShareMessageSections(input: {\n title?: string | null;\n description?: string | null;\n shareType?: ShareResourceType;\n}): string[] {\n const title = normalizeShareText(input.title);\n const description = normalizeShareText(input.description);\n\n return [SHARE_MORE_INFO_LINE, title, description].filter(\n (section) => section.length > 0,\n );\n}\n\nexport function splitShareDescriptionSections(value: string): string[] {\n const trimmed = normalizeShareText(value);\n if (!trimmed) {\n return [];\n }\n\n if (/\\n\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n if (/\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n return [trimmed];\n}\n\n/**\n * Formats share descriptions for Open Graph / Twitter meta tags.\n * Sections are joined with {@link OG_DESCRIPTION_LINE_BREAK} (`&#10;`).\n */\nexport function normalizeShareOgDescription(value: string): string {\n return joinShareOgDescriptionSections(splitShareDescriptionSections(value));\n}\n\n/**\n * Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).\n *\n * Title + blank lines + body sections. URL is omitted — `contentUrl` supplies\n * the link card (OG on `/share/*` controls card title/image).\n */\nexport function buildFacebookShareQuote(\n title: string,\n description: string,\n shareType?: ShareResourceType,\n): string | undefined {\n const sections = buildShareMessageSections({ title, description, shareType });\n const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();\n return quote.length > 0 ? quote : undefined;\n}\n\n/**\n * Open Graph / Twitter description from pre-built section strings.\n * Prefer {@link joinShareOgDescriptionSections} when sections are already known.\n */\nexport function buildShareOgDescriptionFromSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return joinShareOgDescriptionSections(sections);\n}\n\n/** Open Graph / Twitter description — body sections only (`og:title` is separate). */\nexport function buildShareOgDescription(\n _title: string,\n description: string,\n): string {\n return joinShareOgDescriptionSections(\n splitShareDescriptionSections(description),\n );\n}\n","import type { ShareResourceType } from \"./constants\";\n\nexport function normalizeShareRouteId(id: string): string {\n try {\n return decodeURIComponent(id);\n } catch {\n return id;\n }\n}\n\nexport function buildSharePagePath(\n resourceType: ShareResourceType,\n rawId: string,\n): string {\n return `/share/${resourceType}/${encodeURIComponent(normalizeShareRouteId(rawId))}`;\n}\n","export const SAVED_PASSWORD_KEY = \"savedPassword\";\nexport const SAVED_EMAIL_KEY = \"savedEmail\";\nexport const SAVED_TOKEN_KEY = \"savedToken\";\nexport const SAVED_REFRESH_TOKEN_KEY = \"savedRefreshToken\";\nexport const USER_STORAGE_KEY = \"authUser\";\n","export const darkColors = {\n background: \"#3D3D3F\",\n card: \"#1c1c1e\",\n primary: \"#c96520\", // burnt orange — same hue, lower brightness\n quaternary: \"#3d7a68\", // barely shifted from light — already sits well on dark\n secondary: \"#7a4f78\", // muted plum — visible but not vivid\n tertiary: \"#4e5099\", // dusty indigo\n textMuted: \"#8e8e93\",\n};\n\nexport const lightColors = {\n background: \"#ffffff\",\n card: \"#f1f2f6\",\n primary: \"#ff7a00\",\n quaternary: \"#3b7c67\",\n secondary: \"#371134\",\n tertiary: \"#191a75\",\n textMuted: \"#6c757d\",\n};\n\nexport const fonts = {\n bold: {\n fontFamily: \"Roboto-Bold\",\n fontWeight: \"700\" as const,\n },\n heavy: {\n fontFamily: \"Roboto-ExtraBold\",\n fontWeight: \"900\" as const,\n },\n medium: {\n fontFamily: \"Roboto-Medium\",\n fontWeight: \"500\" as const,\n },\n regular: {\n fontFamily: \"Roboto-Regular\",\n fontWeight: \"400\" as const,\n },\n};\n","import {\n CreateFormData,\n EnumOSPlatform,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { SafeUserType } 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 = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n promoCode?: PromoCodeType | null;\n termsAgreement?: TermsAgreement | 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 message: string;\n token: string;\n refreshToken: string | null;\n user: SafeUserType;\n};\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\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 EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\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\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: string;\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 | null;\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 AssociateType = {\n email: string;\n resourceId: string;\n resourceType: EnumResourceType;\n licence: UserLicenceType;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n associates: AssociateType[] | null;\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 owner?: OwnerType | null;\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 BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n reviewCount?: number | null;\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 interface Category {\n color?: string | 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\nexport interface UseGetResourcesByRegionOptions {\n onlyClaimed?: boolean;\n limit?: number;\n offset?: number;\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 PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\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 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};\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 clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\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\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_GAMES = \"daily_games\",\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 interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: {\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n } | 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<PostFormData, \"content\" | \"coverUpload\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | 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 overallPoints: number;\n owner: OwnerType;\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};\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","const genericMessage = \"Invariant Violation\";\nconst {\n setPrototypeOf = function (obj: any, proto: any) {\n obj.__proto__ = proto;\n return obj;\n },\n} = Object as any;\n\nexport class InvariantError extends Error {\n framesToPop = 1;\n name = genericMessage;\n constructor(message: string | number = genericMessage) {\n super(\n typeof message === \"number\"\n ? `${genericMessage}: ${message} (see https://github.com/apollographql/invariant-packages)`\n : message\n );\n setPrototypeOf(this, InvariantError.prototype);\n }\n}\n\nexport function invariant(\n condition: any,\n message?: string | number,\n): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n\nconst verbosityLevels = [\"debug\", \"log\", \"warn\", \"error\", \"silent\"] as const;\nexport type VerbosityLevel = (typeof verbosityLevels)[number];\nexport type ConsoleMethodName = Exclude<VerbosityLevel, \"silent\">;\nlet verbosityLevel = verbosityLevels.indexOf(\"log\");\n\nfunction wrapConsoleMethod<M extends ConsoleMethodName>(name: M) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n const method = console[name] || console.log;\n return method.apply(console, arguments as any);\n }\n } as (typeof console)[M];\n}\n\nexport namespace invariant {\n export const debug = wrapConsoleMethod(\"debug\");\n export const log = wrapConsoleMethod(\"log\");\n export const warn = wrapConsoleMethod(\"warn\");\n export const error = wrapConsoleMethod(\"error\");\n}\n\nexport function setVerbosity(level: VerbosityLevel): VerbosityLevel {\n const old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\n\nexport default invariant;\n","/** @internal */\nexport function devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n *\n * @internal\n */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","/** @internal */\nexport function invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","/** @category Source */\nimport { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/** Represents a location in a Source. */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n * @param source - The source document that contains the position.\n * @param position - The UTF-8 character offset in the source body.\n * @returns The 1-indexed line and column for the given source position.\n * @example\n * ```ts\n * import { Source, getLocation } from 'graphql/language';\n *\n * const source = new Source('type Query { hello: String }');\n * const location = getLocation(source, 13);\n *\n * location; // => { line: 1, column: 14 }\n * ```\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n","/** @category Source */\nimport { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n * @param location - The AST location to print.\n * @returns A formatted source excerpt with line and column information.\n * @example\n * ```ts\n * import { parse, printLocation } from 'graphql/language';\n *\n * const document = parse('type Query { hello: String }');\n * const location = document.definitions[0].loc;\n *\n * if (location) {\n * const printed = printLocation(location);\n *\n * printed; // => 'GraphQL request:1:1\\n1 | type Query { hello: String }\\n | ^'\n * }\n * ```\n */\nexport function printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n * @param source - The source document that contains the location.\n * @param sourceLocation - The 1-indexed line and column to print.\n * @returns A formatted source excerpt with line and column information.\n * @example\n * ```ts\n * import { Source, printSourceLocation } from 'graphql/language';\n *\n * const source = new Source('type Query { hello: String }');\n * const printed = printSourceLocation(source, { line: 1, column: 14 });\n *\n * printed; // => 'GraphQL request:1:14\\n1 | type Query { hello: String }\\n | ^'\n * ```\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","/** @category Errors */\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /** An array of GraphQL AST Nodes corresponding to this error. */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /** Original error that caused this GraphQLError, if one exists. */\n\n /** Extension fields to add to the formatted error. */\n\n /**\n * Creates a GraphQLError instance.\n * @param message - Human-readable error message.\n * @param options - Error metadata such as source locations, response path, original error, and extensions.\n * This positional-arguments constructor overload is deprecated. Use the\n * `GraphQLError(message, options)` overload instead.\n * @example\n * ```ts\n * // Create an error from AST nodes and response metadata.\n * import { parse } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const document = parse('{ greeting }');\n * const fieldNode = document.definitions[0].selectionSet.selections[0];\n * const error = new GraphQLError('Cannot query this field.', {\n * nodes: fieldNode,\n * path: ['greeting'],\n * extensions: { code: 'FORBIDDEN' },\n * });\n *\n * error.message; // => 'Cannot query this field.'\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.extensions; // => { code: 'FORBIDDEN' }\n * ```\n * @example\n * ```ts\n * // This variant derives locations from source positions and preserves the original error.\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError('Resolver failed.', {\n * source,\n * positions: [2],\n * path: ['greeting'],\n * originalError,\n * });\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * ```\n */\n\n /**\n * Creates a GraphQLError instance using the legacy positional constructor.\n * This deprecated overload will be removed in v17. Prefer the\n * `GraphQLErrorOptions` object overload, which keeps optional error metadata\n * in a single options bag.\n * @param message - Human-readable error message.\n * @param nodes - AST node or nodes associated with this error.\n * @param source - Source document used to derive error locations.\n * @param positions - Character offsets in the source document associated with\n * this error.\n * @param path - Response path where this error occurred during execution.\n * @param originalError - Original error that caused this GraphQLError, if one\n * exists.\n * @param extensions - Extension fields to include in the formatted error.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError(\n * 'Resolver failed.',\n * undefined,\n * source,\n * [2],\n * ['greeting'],\n * originalError,\n * { code: 'INTERNAL' },\n * );\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * error.extensions; // => { code: 'INTERNAL' }\n * ```\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n /**\n * Returns this error as a human-readable message with source locations.\n * @returns The formatted error string.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Cannot query field \"name\".', {\n * source: new Source('{ name }'),\n * positions: [2],\n * });\n *\n * error.toString(); // => 'Cannot query field \"name\".\\n\\nGraphQL request:1:3\\n1 | { name }\\n | ^'\n * ```\n */\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Resolver failed.', {\n * path: ['viewer', 'name'],\n * extensions: { code: 'INTERNAL' },\n * });\n *\n * error.toJSON(); // => { message: 'Resolver failed.', path: ['viewer', 'name'], extensions: { code: 'INTERNAL' } }\n * ```\n */\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/** See: https://spec.graphql.org/draft/#sec-Errors */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source. This deprecated helper is retained\n * for backwards compatibility; call `error.toString()` instead because\n * printError will be removed in v17.\n * @param error - The error to format.\n * @returns The printed string representation.\n * @example\n * ```ts\n * import { GraphQLError, printError } from 'graphql/error';\n *\n * const message = printError(new GraphQLError('Example error'));\n *\n * message; // => 'Example error'\n * ```\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification. This deprecated\n * helper is retained for backwards compatibility; call `error.toJSON()`\n * instead because formatError will be removed in v17.\n * @param error - The error to format.\n * @returns The JSON-serializable formatted error.\n * @example\n * ```ts\n * import { GraphQLError, formatError } from 'graphql/error';\n *\n * const formatted = formatError(new GraphQLError('Example error'));\n *\n * formatted; // => { message: 'Example error' }\n * ```\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n","/** @category Errors */\nimport { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n * @param source - The GraphQL source containing the syntax error.\n * @param position - Character offset where the syntax error was encountered.\n * @param description - Human-readable description of the syntax error.\n * @returns A GraphQLError located at the syntax error position.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { syntaxError } from 'graphql/error';\n *\n * const error = syntaxError(new Source('query {'), 7, 'Expected Name');\n *\n * error.message; // => 'Syntax Error: Expected Name'\n * error.locations; // => [{ line: 1, column: 8 }]\n * ```\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","/** @category AST */\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The Token at which this Node begins. */\n\n /** The Token at which this Node ends. */\n\n /** The Source document the AST represents. */\n\n /**\n * Creates a Location instance.\n * @param startToken - The start token.\n * @param endToken - The end token.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Location, Source, Token, TokenKind } from 'graphql/language';\n *\n * const source = new Source('{ hello }');\n * const startToken = new Token(TokenKind.BRACE_L, 0, 1, 1, 1);\n * const endToken = new Token(TokenKind.BRACE_R, 8, 9, 1, 9);\n * const location = new Location(startToken, endToken, source);\n *\n * location.start; // => 0\n * location.end; // => 9\n * location.source.body; // => '{ hello }'\n * ```\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n /**\n * Returns a JSON representation of this location.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { parse } from 'graphql/language';\n *\n * const document = parse('{ hello }');\n * const location = document.loc?.toJSON();\n *\n * location; // => { start: 0, end: 9 }\n * ```\n */\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /** The kind of Token. */\n\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The 1-indexed line number on which this Token appears. */\n\n /** The 1-indexed column number at which this Token begins. */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n\n /** Next token in the token stream, including ignored tokens. */\n\n /**\n * Creates a Token instance.\n * @param kind - Token kind produced by lexical analysis.\n * @param start - Character offset where this token begins.\n * @param end - Character offset where this token ends.\n * @param line - One-indexed line number where this token begins.\n * @param column - One-indexed column number where this token begins.\n * @param value - Interpreted value for non-punctuation tokens.\n * @example\n * ```ts\n * import { Token, TokenKind } from 'graphql/language';\n *\n * const token = new Token(TokenKind.NAME, 2, 7, 1, 3, 'hello');\n *\n * token.kind; // => TokenKind.NAME\n * token.value; // => 'hello'\n * token.toJSON(); // => { kind: 'Name', value: 'hello', line: 1, column: 3 }\n * ```\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n /**\n * Returns a JSON representation of this token.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance().toJSON();\n *\n * token; // => { kind: '{', value: undefined, line: 1, column: 1 }\n * ```\n */\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/** The list of all possible AST node types. */\n\n/** @internal */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'description',\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: [\n 'description',\n 'variable',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'description',\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: [\n 'description',\n 'name',\n 'arguments',\n 'directives',\n 'locations',\n ],\n SchemaExtension: ['directives', 'operationTypes'],\n DirectiveExtension: ['name', 'directives'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n TypeCoordinate: ['name'],\n MemberCoordinate: ['name', 'memberName'],\n ArgumentCoordinate: ['name', 'fieldName', 'argumentName'],\n DirectiveCoordinate: ['name'],\n DirectiveArgumentCoordinate: ['name', 'argumentName'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/** @internal */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** An identifier in a GraphQL document. */\n\n/**\n * The operation types supported by GraphQL executable definitions.\n * @category Kinds\n */\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n/** A variable declaration in an operation or legacy fragment definition. */\n","/** @category Kinds */\n\n/** The set of allowed directive location values. */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n DirectiveLocation['DIRECTIVE_DEFINITION'] = 'DIRECTIVE_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * Deprecated legacy alias for the enum type representing directive location\n * values. This alias will be removed in v17. In v17, `DirectiveLocation` is\n * exported as the single public symbol for both the runtime object and the\n * corresponding TypeScript type.\n * @deprecated Will be removed in v17. In v17, use `DirectiveLocation` as both\n * the runtime value and the type.\n */\n","/** @category Kinds */\n\n/** The set of allowed kind values for AST nodes. */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['DIRECTIVE_EXTENSION'] = 'DirectiveExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n Kind['TYPE_COORDINATE'] = 'TypeCoordinate';\n Kind['MEMBER_COORDINATE'] = 'MemberCoordinate';\n Kind['ARGUMENT_COORDINATE'] = 'ArgumentCoordinate';\n Kind['DIRECTIVE_COORDINATE'] = 'DirectiveCoordinate';\n Kind['DIRECTIVE_ARGUMENT_COORDINATE'] = 'DirectiveArgumentCoordinate';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * Deprecated legacy alias for the enum type representing the possible kind\n * values of AST nodes. This alias will be removed in v17. In v17, `Kind` is\n * exported as the single public symbol for both the runtime object and the\n * corresponding TypeScript type.\n * @deprecated Will be removed in v17. In v17, use `Kind` as both the runtime\n * value and the type.\n */\n","/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/** @internal */\n\nexport function isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","/** @category Lexing */\n\n/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '<SOF>';\n TokenKind['EOF'] = '<EOF>';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['DOT'] = '.';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * Deprecated legacy alias for the enum type representing token kind values.\n * This alias will be removed in v17. In v17, `TokenKind` is exported as the\n * single public symbol for both the runtime object and the corresponding\n * TypeScript type.\n * @deprecated Will be removed in v17. In v17, use `TokenKind` as both the\n * runtime value and the type.\n */\n","/** @category Lexing */\nimport { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * A Lexer interface which provides common properties and methods required for\n * lexing GraphQL source.\n *\n * @internal\n */\n\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\nexport class Lexer {\n /** Source document used to derive error locations. */\n\n /** Most recent non-ignored token returned by the lexer. */\n\n /** Current non-ignored token at the lexer cursor. */\n\n /** The (1-indexed) line containing the current token. */\n\n /** Character offset where the current line starts. */\n\n /**\n * Creates a Lexer instance.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Lexer, Source, TokenKind } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n *\n * lexer.token.kind; // => TokenKind.SOF\n * lexer.advance().kind; // => TokenKind.BRACE_L\n * lexer.advance().value; // => 'hello'\n * lexer.advance().kind; // => TokenKind.BRACE_R\n * ```\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n * @returns The next non-ignored token.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance();\n *\n * token.kind; // => '{'\n * lexer.token; // => token\n * ```\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n * @returns The next non-ignored token without advancing the lexer.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.lookahead();\n *\n * token.kind; // => '{'\n * lexer.token.kind; // => '<SOF>'\n * ```\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/** @internal */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.DOT ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n *\n * @internal\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n *\n * @internal\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n *\n * @internal\n */\n\nexport function printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n *\n * @internal\n */\n\nexport function createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n *\n * @internal\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n *\n * @internal\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n *\n * @internal\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n *\n * @internal\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n *\n * @internal\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n *\n * @internal\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n *\n * @internal\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n *\n * @internal\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n *\n * @internal\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n *\n * @internal\n */\n\nexport function readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n *\n * @internal\n */\n\nexport function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { inspect } from './inspect.mjs';\n/* c8 ignore next 3 */\n\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n *\n * @internal\n */\n\nexport const instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = inspect(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n","/** @category Source */\nimport { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n /** The GraphQL source text. */\n\n /** Name used in diagnostics for this source, such as a file path or request name. */\n\n /** One-indexed line and column where this source begins. */\n\n /**\n * Creates a Source instance.\n * @param body - The GraphQL source text.\n * @param name - Name used in diagnostics for this source.\n * @param locationOffset - One-indexed line and column where this source begins.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n *\n * const source = new Source(\n * 'type Query { greeting: String }',\n * 'schema.graphql',\n * { line: 10, column: 1 },\n * );\n *\n * source.body; // => 'type Query { greeting: String }'\n * source.name; // => 'schema.graphql'\n * source.locationOffset; // => { line: 10, column: 1 }\n * ```\n */\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n devAssert(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n devAssert(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","/** @category Parsing */\nimport { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { SchemaCoordinateLexer } from './schemaCoordinateLexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/** Configuration options to control parser behavior */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n * @param source - A GraphQL source string or source object.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL document AST.\n * @example\n * ```ts\n * // Parse a GraphQL document with the default parser options.\n * import { parse } from 'graphql/language';\n *\n * const document = parse('{ hero { name } }');\n *\n * document.kind; // => 'Document'\n * ```\n * @example\n * ```ts\n * // This variant enables parser options and provides an explicit lexer.\n * import { Lexer, Source, parse } from 'graphql/language';\n *\n * const document = parse('fragment A($var: Boolean) on Query { field }', {\n * allowLegacyFragmentVariables: true,\n * maxTokens: 20,\n * noLocation: true,\n * });\n * const directiveDocument = parse('directive @foo @bar on FIELD', {\n * experimentalDirectivesOnDirectiveDefinitions: true,\n * });\n * const source = new Source('{ hero }');\n * const lexerDocument = parse(source, { lexer: new Lexer(source) });\n *\n * document.definitions[0].kind; // => 'FragmentDefinition'\n * document.loc; // => undefined\n * directiveDocument.definitions[0].kind; // => 'DirectiveDefinition'\n * lexerDocument.definitions[0].kind; // => 'OperationDefinition'\n * ```\n */\nexport function parse(source, options) {\n const parser = new Parser(source, options);\n const document = parser.parseDocument();\n Object.defineProperty(document, 'tokenCount', {\n enumerable: false,\n value: parser.tokenCount,\n });\n return document;\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n * @param source - A GraphQL source string or source object containing a value.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL value AST.\n * @example\n * ```ts\n * import { parseValue } from 'graphql/language';\n *\n * const value = parseValue('[42]');\n *\n * value.kind; // => 'ListValue'\n * ```\n */\n\nexport function parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n * @param source - A GraphQL source string or source object containing a constant value.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL constant value AST.\n * @example\n * ```ts\n * import { parseConstValue } from 'graphql/language';\n *\n * const value = parseConstValue('{ enabled: true }');\n *\n * value.kind; // => 'ObjectValue'\n * parseConstValue('$variable'); // throws an error\n * ```\n */\n\nexport function parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n * @param source - A GraphQL source string or source object containing a type reference.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL type AST.\n * @example\n * ```ts\n * import { parseType } from 'graphql/language';\n *\n * const type = parseType('[String!]');\n *\n * type.kind; // => 'ListType'\n * ```\n */\n\nexport function parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * Given a string containing a GraphQL Schema Coordinate (ex. `Type.field`),\n * parse the AST for that schema coordinate.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * Consider providing the results to the utility function:\n * resolveASTSchemaCoordinate(). Or calling resolveSchemaCoordinate() directly\n * with an unparsed source.\n * @param source - A GraphQL source string or source object containing a schema coordinate.\n * @returns The parsed GraphQL schema coordinate AST.\n * @example\n * ```ts\n * import { parseSchemaCoordinate } from 'graphql/language';\n *\n * const coordinate = parseSchemaCoordinate('Query.hero');\n *\n * coordinate.kind; // => 'MemberCoordinate'\n * ```\n */\n\nexport function parseSchemaCoordinate(source) {\n const sourceObj = isSource(source) ? source : new Source(source);\n const lexer = new SchemaCoordinateLexer(sourceObj);\n const parser = new Parser(source, {\n lexer,\n });\n parser.expectToken(TokenKind.SOF);\n const coordinate = parser.parseSchemaCoordinate();\n parser.expectToken(TokenKind.EOF);\n return coordinate;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n constructor(source, options = {}) {\n const { lexer, ..._options } = options;\n\n if (lexer) {\n this._lexer = lexer;\n } else {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n }\n\n this._options = _options;\n this._tokenCounter = 0;\n }\n\n get tokenCount() {\n return this._tokenCounter;\n }\n /**\n * Converts a name lex token into a name parse node.\n *\n * @internal\n */\n\n parseName() {\n const token = this.expectToken(TokenKind.NAME);\n return this.node(token, {\n kind: Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n *\n * @internal\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: Kind.DOCUMENT,\n definitions: this.many(\n TokenKind.SOF,\n this.parseDefinition,\n TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n *\n * @internal\n */\n\n parseDefinition() {\n if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (hasDescription && keywordToken.kind === TokenKind.BRACE_L) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are not supported on shorthand queries.',\n );\n }\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, only GraphQL definitions support descriptions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n *\n * @internal\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation: OperationTypeNode.QUERY,\n description: undefined,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const description = this.parseDescription();\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation,\n description,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n *\n * @internal\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return OperationTypeNode.QUERY;\n\n case 'mutation':\n return OperationTypeNode.MUTATION;\n\n case 'subscription':\n return OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n *\n * @internal\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseVariableDefinition,\n TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n *\n * @internal\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: Kind.VARIABLE_DEFINITION,\n description: this.parseDescription(),\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n *\n * @internal\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return this.node(start, {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n *\n * @internal\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: Kind.SELECTION_SET,\n selections: this.many(\n TokenKind.BRACE_L,\n this.parseSelection,\n TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n *\n * @internal\n */\n\n parseSelection() {\n return this.peek(TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n *\n * @internal\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n *\n * @internal\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n *\n * @internal\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n *\n * @internal\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return this.node(start, {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n *\n * @internal\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n description,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n description,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n *\n * @internal\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n *\n * @internal\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.INT,\n value: token.value,\n });\n\n case TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.FLOAT,\n value: token.value,\n });\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: Kind.ENUM,\n value: token.value,\n });\n }\n\n case TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n *\n * @internal\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n *\n * @internal\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n *\n * @internal\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n *\n * @internal\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n *\n * @internal\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return this.node(start, {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n *\n * @internal\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return this.node(start, {\n kind: Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n *\n * @internal\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n *\n * @internal\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n *\n * @internal\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n *\n * @internal\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n *\n * @internal\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n *\n * @internal\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseFieldDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n *\n * @internal\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n *\n * @internal\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseInputValueDef,\n TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n *\n * @internal\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n *\n * @internal\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n *\n * @internal\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n *\n * @internal\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS)\n ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n *\n * @internal\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n *\n * @internal\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n *\n * @internal\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n *\n * @internal\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseInputValueDef,\n TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n * - DirectiveDefinitionExtension\n *\n * @internal\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n\n case 'directive':\n if (this._options.experimentalDirectivesOnDirectiveDefinitions) {\n return this.parseDirectiveDefinitionExtension();\n }\n\n break;\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n *\n * @internal\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n *\n * @internal\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n *\n * @internal\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n *\n * @internal\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n *\n * @internal\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n *\n * @internal\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n *\n * @internal\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n\n parseDirectiveDefinitionExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.DIRECTIVE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n *\n * @internal\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const directives = this._options\n .experimentalDirectivesOnDirectiveDefinitions\n ? this.parseConstDirectives()\n : [];\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n directives,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n *\n * @internal\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n * `DIRECTIVE_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Schema Coordinates\n\n /**\n * SchemaCoordinate :\n * - Name\n * - Name . Name\n * - Name . Name ( Name : )\n * - \\@ Name\n * - \\@ Name ( Name : )\n * @returns Parsed schema coordinate AST.\n * @example\n * ```ts\n * import { Parser, Source } from 'graphql/language';\n *\n * const typeCoordinate = new Parser(new Source('User.name')).parseSchemaCoordinate();\n * const directiveCoordinate = new Parser(new Source('@include(if:)')).parseSchemaCoordinate();\n *\n * typeCoordinate.name.value; // => 'User'\n * typeCoordinate.memberName?.value; // => 'name'\n * directiveCoordinate.name.value; // => 'deprecated'\n * directiveCoordinate.argumentName?.value; // => 'reason'\n * ```\n */\n\n parseSchemaCoordinate() {\n const start = this._lexer.token;\n const ofDirective = this.expectOptionalToken(TokenKind.AT);\n const name = this.parseName();\n let memberName;\n\n if (!ofDirective && this.expectOptionalToken(TokenKind.DOT)) {\n memberName = this.parseName();\n }\n\n let argumentName;\n\n if (\n (ofDirective || memberName) &&\n this.expectOptionalToken(TokenKind.PAREN_L)\n ) {\n argumentName = this.parseName();\n this.expectToken(TokenKind.COLON);\n this.expectToken(TokenKind.PAREN_R);\n }\n\n if (ofDirective) {\n if (argumentName) {\n return this.node(start, {\n kind: Kind.DIRECTIVE_ARGUMENT_COORDINATE,\n name,\n argumentName,\n });\n }\n\n return this.node(start, {\n kind: Kind.DIRECTIVE_COORDINATE,\n name,\n });\n } else if (memberName) {\n if (argumentName) {\n return this.node(start, {\n kind: Kind.ARGUMENT_COORDINATE,\n name,\n fieldName: memberName,\n argumentName,\n });\n }\n\n return this.node(start, {\n kind: Kind.MEMBER_COORDINATE,\n name,\n memberName,\n });\n }\n\n return this.node(start, {\n kind: Kind.TYPE_COORDINATE,\n name,\n });\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n *\n * @internal\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n *\n * @internal\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n *\n * @internal\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n *\n * @internal\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n *\n * @internal\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n *\n * @internal\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n *\n * @internal\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n *\n * @internal\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n *\n * @internal\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n *\n * @internal\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n *\n * @internal\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (token.kind !== TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (maxTokens !== undefined && this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n *\n * @internal\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n *\n * @internal\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n","import { parse } from 'graphql';\n\nimport {\n DocumentNode,\n DefinitionNode,\n Location,\n} from 'graphql/language/ast';\n\n// A map docString -> graphql document\nconst docCache = new Map<string, DocumentNode>();\n\n// A map fragmentName -> [normalized source]\nconst fragmentSourceMap = new Map<string, Set<string>>();\n\nlet printFragmentWarnings = true;\nlet experimentalFragmentVariables = false;\n\n// Strip insignificant whitespace\n// Note that this could do a lot more, such as reorder fields etc.\nfunction normalize(string: string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\n\nfunction cacheKeyFromLoc(loc: Location) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\n\n// Take a unstripped parsed document (query/mutation or even fragment), and\n// check all fragment definitions, checking for name->source uniqueness.\n// We also want to make sure only unique fragments exist in the document.\nfunction processFragments(ast: DocumentNode) {\n const seenKeys = new Set<string>();\n const definitions: DefinitionNode[] = [];\n\n ast.definitions.forEach(fragmentDefinition => {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc!);\n\n // We know something about this fragment\n let sourceKeySet = fragmentSourceMap.get(fragmentName)!;\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n // this is a problem because the app developer is trying to register another fragment with\n // the same name as one previously registered. So, we tell them about it.\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n } else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n\n sourceKeySet.add(sourceKey);\n\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n } else {\n definitions.push(fragmentDefinition);\n }\n });\n\n return {\n ...ast,\n definitions,\n };\n}\n\nfunction stripLoc(doc: DocumentNode) {\n const workSet = new Set<Record<string, any>>(doc.definitions);\n\n workSet.forEach(node => {\n if (node.loc) delete node.loc;\n Object.keys(node).forEach(key => {\n const value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n\n const loc = doc.loc as Record<string, any>;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n\n return doc;\n}\n\nfunction parseDocument(source: string) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n const parsed = parse(source, {\n // graphql 14,15,16\n experimentalFragmentVariables,\n // graphql 14\n allowLegacyFragmentVariables: experimentalFragmentVariables,\n // graphql 17\n experimentalFragmentArguments: experimentalFragmentVariables,\n } as any);\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(\n cacheKey,\n // check that all \"new\" fragments inside the documents are consistent with\n // existing fragments of the same name\n stripLoc(processFragments(parsed)),\n );\n }\n return docCache.get(cacheKey)!;\n}\n\n// XXX This should eventually disallow arbitrary string interpolation, like Relay does\nexport function gql(\n literals: string | readonly string[],\n ...args: any[]\n) {\n\n if (typeof literals === 'string') {\n literals = [literals];\n }\n\n let result = literals[0];\n\n args.forEach((arg, i) => {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n } else {\n result += arg;\n }\n result += literals[i + 1];\n });\n\n return parseDocument(result);\n}\n\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\n\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\n\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\n\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\n\nconst extras = {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n};\n\nexport namespace gql {\n export const {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n } = extras;\n}\n\ngql.default = gql;\n\nexport default gql;\n","/* Core */\n\nexport type { ApolloClientOptions, DefaultOptions } from \"./ApolloClient.js\";\nexport { ApolloClient, mergeOptions } from \"./ApolloClient.js\";\nexport type { FetchMoreOptions } from \"./ObservableQuery.js\";\nexport { ObservableQuery } from \"./ObservableQuery.js\";\nexport type {\n QueryOptions,\n WatchQueryOptions,\n MutationOptions,\n SubscriptionOptions,\n FetchPolicy,\n WatchQueryFetchPolicy,\n MutationFetchPolicy,\n RefetchWritePolicy,\n ErrorPolicy,\n FetchMoreQueryOptions,\n SubscribeToMoreOptions,\n SubscribeToMoreFunction,\n UpdateQueryMapFn,\n UpdateQueryOptions,\n SubscribeToMoreUpdateQueryFn,\n} from \"./watchQueryOptions.js\";\nexport { NetworkStatus, isNetworkRequestSettled } from \"./networkStatus.js\";\nexport type * from \"./types.js\";\nexport type { Resolver, FragmentMatcher } from \"./LocalState.js\";\nexport { isApolloError, ApolloError } from \"../errors/index.js\";\n/* Cache */\n\nexport type {\n // All the exports (types) from ../cache, minus cacheSlot,\n // which we want to keep semi-private.\n Transaction,\n DataProxy,\n InMemoryCacheConfig,\n ReactiveVar,\n TypePolicies,\n TypePolicy,\n FieldPolicy,\n FieldReadFunction,\n FieldMergeFunction,\n FieldFunctionOptions,\n PossibleTypesMap,\n WatchFragmentOptions,\n WatchFragmentResult,\n} from \"../cache/index.js\";\nexport {\n Cache,\n ApolloCache,\n InMemoryCache,\n MissingFieldError,\n defaultDataIdFromObject,\n makeVar,\n} from \"../cache/index.js\";\n\nexport type * from \"../cache/inmemory/types.js\";\n\n/* Link */\n\nexport * from \"../link/core/index.js\";\nexport * from \"../link/http/index.js\";\nexport type { ServerError } from \"../link/utils/index.js\";\nexport {\n fromError,\n toPromise,\n fromPromise,\n throwServerError,\n} from \"../link/utils/index.js\";\n\n/* Masking */\nexport type {\n DataMasking,\n FragmentType,\n Masked,\n MaskedDocumentNode,\n MaybeMasked,\n Unmasked,\n} from \"../masking/index.js\";\n\n/* Utilities */\n\nexport type {\n DocumentTransformCacheKey,\n Observer,\n ObservableSubscription,\n Reference,\n StoreObject,\n} from \"../utilities/index.js\";\nexport {\n DocumentTransform,\n Observable,\n isReference,\n makeReference,\n} from \"../utilities/index.js\";\n\n/* Supporting */\n\n// The verbosity of invariant.{log,warn,error} can be controlled globally\n// (for anyone using the same ts-invariant package) by passing \"log\",\n// \"warn\", \"error\", or \"silent\" to setVerbosity (\"log\" is the default).\n// Note that all invariant.* logging is hidden in production.\nimport { setVerbosity } from \"ts-invariant\";\nexport { setVerbosity as setLogVerbosity };\nsetVerbosity(__DEV__ ? \"log\" : \"silent\");\n\n// Note that importing `gql` by itself, then destructuring\n// additional properties separately before exporting, is intentional.\n// Due to the way the `graphql-tag` library is setup, certain bundlers\n// can't find the properties added to the exported `gql` function without\n// additional guidance (e.g. Rollup - see\n// https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module).\n// Instead of having people that are using bundlers with `@apollo/client` add\n// extra bundler config to help `graphql-tag` exports be found (which would be\n// awkward since they aren't importing `graphql-tag` themselves), this\n// workaround of pulling the extra properties off the `gql` function,\n// then re-exporting them separately, helps keeps bundlers happy without any\n// additional config changes.\nexport {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n} from \"graphql-tag\";\n","import {\n AdType,\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n EnumResourceType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst schemaAdresource = new MongooseSchema<AdType[\"resource\"]>({\n adDescription: { required: true, type: String },\n adImage: { required: true, type: String },\n adStyle: {\n default: EnumAdStyle.BLOOM,\n enum: Object.values(EnumAdStyle),\n required: true,\n type: String,\n },\n adTitle: { required: true, type: String },\n adType: {\n default: EnumAdType.SPONSORED,\n enum: Object.values(EnumAdType),\n required: true,\n type: String,\n },\n resourceId: { required: true, type: String },\n resourceName: { required: true, type: String },\n resourceRegion: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n});\n\nconst schema = new MongooseSchema<AdType>(\n {\n active: { default: true, type: Boolean },\n clicks: { default: 0, required: true, type: Number },\n end: { required: true, type: Date },\n impressions: { default: 0, required: true, type: Number },\n resource: { required: true, type: schemaAdresource },\n showOn: {\n default: [EnumAdShowOn.FRONT_PAGE],\n enum: Object.values(EnumAdShowOn),\n required: true,\n type: [String],\n },\n start: { required: true, type: Date },\n status: {\n default: EnumAdStatus.ACTIVE,\n enum: Object.values(EnumAdStatus),\n required: true,\n type: String,\n },\n targetRegion: { required: false, type: [String] },\n },\n {\n timestamps: true,\n },\n);\n\n// Compound index for background job queries\nschema.index({\n end: 1,\n start: 1,\n status: 1,\n});\n\nexport const AdModel =\n (mongoose.models.Ad as mongoose.Model<AdType>) ||\n mongoose.model<AdType>(\"Ad\", schema);\n","import {\n ChatMessageType,\n ChatType,\n EnumChatType,\n ParticipantType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaChatMessageReplyPreviewType = Omit<\n NonNullable<ChatMessageType[\"replyPreview\"]>,\n \"senderId\"\n> & {\n senderId: ObjectId;\n};\n\nexport type SchemaChatMessageReactionType = Omit<\n NonNullable<ChatMessageType[\"likedBy\"]>[number],\n \"userId\"\n> & {\n userId: ObjectId;\n};\n\nexport type SchemaChatMessageSeenType = Omit<\n NonNullable<ChatMessageType[\"seenBy\"]>[number],\n \"userId\"\n> & {\n userId: ObjectId;\n};\n\nexport type SchemaChatMessageType = Omit<\n ChatMessageType,\n \"senderId\" | \"replyToMessageId\" | \"replyPreview\" | \"likedBy\" | \"seenBy\"\n> & {\n senderId: ObjectId;\n replyToMessageId?: ObjectId | null;\n replyPreview?: SchemaChatMessageReplyPreviewType | null;\n likedBy?: SchemaChatMessageReactionType[];\n seenBy?: SchemaChatMessageSeenType[];\n};\n\nexport type SchemaParticipantType = Omit<ParticipantType, \"userId\"> & {\n userId: ObjectId;\n};\n\nconst MessageReplyPreviewSchema =\n new MongooseSchema<SchemaChatMessageReplyPreviewType>(\n {\n contentPreview: { required: true, type: String },\n senderId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n senderName: { required: true, type: String },\n },\n { _id: false },\n );\n\nconst MessageReactionSchema = new MongooseSchema<SchemaChatMessageReactionType>(\n {\n createdAt: { required: true, type: Date },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nconst MessageSeenSchema = new MongooseSchema<SchemaChatMessageSeenType>(\n {\n seenAt: { required: true, type: Date },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nconst MessageSchema = new MongooseSchema<SchemaChatMessageType>(\n {\n content: { required: true, type: String },\n likedBy: { default: [], required: false, type: [MessageReactionSchema] },\n replyPreview: {\n required: false,\n type: MessageReplyPreviewSchema,\n },\n replyToMessageId: {\n ref: \"Chat.messages\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n seenBy: { default: [], required: false, type: [MessageSeenSchema] },\n senderId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nexport type SchemaChatType = Omit<ChatType, \"participants\" | \"messages\"> & {\n participants: SchemaParticipantType[];\n messages: SchemaChatMessageType[];\n};\n\nconst ParticipantSchema = new MongooseSchema<SchemaParticipantType>(\n {\n active: { default: true, required: true, type: Boolean },\n isAssociate: { default: null, required: false, type: Boolean },\n userAvatar: { required: false, type: String },\n userEmail: { required: true, type: String },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n userName: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst ChatSchema = new MongooseSchema<SchemaChatType>(\n {\n active: { default: true, required: true, type: Boolean },\n chatDescription: { required: false, type: String },\n chatName: { required: true, type: String },\n chatType: {\n enum: Object.values(EnumChatType),\n required: true,\n type: String,\n },\n deletedAt: { default: null, required: false, type: Date },\n messages: [MessageSchema],\n participants: [ParticipantSchema],\n region: { default: null, required: false, type: String },\n },\n {\n timestamps: true,\n },\n);\n\nChatSchema.index({\n \"participants.active\": 1,\n \"participants.userId\": 1,\n updatedAt: -1,\n});\n\nexport const ChatModel =\n (mongoose.models.Chat as mongoose.Model<SchemaChatType>) ||\n mongoose.model<SchemaChatType>(\"Chat\", ChatSchema);\n","import {\n EnumChatReportReason,\n ReportChatUser,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaChatReportType = Omit<\n ReportChatUser,\n \"reporterUserId\" | \"reportedUserId\" | \"chatId\"\n> & {\n reporterUserId: ObjectId;\n reportedUserId: ObjectId;\n chatId: ObjectId;\n};\n\nconst ReasonSchema = new MongooseSchema<\n NonNullable<ReportChatUser[\"reason\"]>,\n null,\n unknown\n>(\n {\n details: { default: null, required: false, type: String },\n reasonType: {\n enum: Object.values(EnumChatReportReason),\n required: true,\n type: String,\n },\n },\n { _id: false },\n);\n\nconst ChatReportSchema = new MongooseSchema<SchemaChatReportType>(\n {\n chatId: {\n ref: \"Chat\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n reason: { required: true, type: ReasonSchema },\n reportedUserId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n reporterUserId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n resolved: { default: false, required: true, type: Boolean },\n },\n { timestamps: true },\n);\n\nChatReportSchema.index({ chatId: 1, reportedUserId: 1 });\nChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });\n\nexport const ChatReportModel =\n (mongoose.models.ChatReport as mongoose.Model<SchemaChatReportType>) ||\n mongoose.model<SchemaChatReportType>(\"ChatReport\", ChatReportSchema);\n","import {\n AssociateType,\n Category,\n DateTimeType,\n EnumEventDateStatus,\n EnumResourceType,\n EnumUserLicence,\n LocationGeoType,\n LocationType,\n OwnerType,\n PosterUsageType,\n RelationDate,\n ResourceContactDetailsType,\n ResourceImageType,\n SocialMediaType,\n Subcategory,\n TermsAgreement,\n UserLicenceType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { relationDatesSchema } from \"./Relation\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaOwnerType = Omit<OwnerType, \"userId\"> & {\n userId: ObjectId;\n};\n\nexport const OwnerTypeSchema = new MongooseSchema<SchemaOwnerType>(\n {\n email: { required: true, type: String },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const SocialMediaTypeSchema = new MongooseSchema<SocialMediaType>(\n {\n link: { required: true, type: String },\n name: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field\n);\n\nexport const ResourceImageTypeSchema = new MongooseSchema<ResourceImageType>(\n {\n active: { default: true, type: Boolean },\n source: { required: false, type: String },\n title: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst SubCategorySchema = new MongooseSchema<Subcategory>(\n {\n id: { required: false, type: String },\n items: [\n {\n id: { required: false, type: String },\n name: { required: false, type: String },\n },\n ],\n name: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const CategorySchema = new MongooseSchema<Category>(\n {\n id: { required: true, type: String },\n name: { required: true, type: String },\n subcategories: [SubCategorySchema],\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst PosterUsageTypeSchema = new MongooseSchema<PosterUsageType>(\n {\n count: { default: 0, required: false, type: Number },\n month: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const userLicenseSchema = new MongooseSchema<UserLicenceType>(\n {\n expiryDate: { required: true, type: Date },\n issuedDate: { required: true, type: Date },\n licenceType: {\n enum: Object.values(EnumUserLicence),\n required: true,\n type: String,\n },\n prevLicenceType: {\n enum: Object.values(EnumUserLicence),\n required: false,\n type: String,\n },\n },\n { _id: false, timestamps: false },\n);\n\nexport const associatesSchema = new MongooseSchema<AssociateType>(\n {\n email: { required: true, type: String },\n licence: {\n required: true,\n type: userLicenseSchema,\n },\n resourceId: {\n required: true,\n type: String,\n },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const ContactDetailsSchema =\n new MongooseSchema<ResourceContactDetailsType>(\n {\n email: { required: false, type: String },\n landlinePhone: { required: false, type: String },\n mobilePhone: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n );\n\nexport const termsAgreementSchema = new MongooseSchema<TermsAgreement>(\n {\n appBuildNumber: { required: true, type: String },\n appId: { required: true, type: String },\n appVersion: { required: true, type: String },\n brand: { required: true, type: String },\n deviceName: { required: true, type: String },\n installationId: { required: true, type: String },\n manufacturer: { required: true, type: String },\n modelName: { required: true, type: String },\n osName: { required: true, type: String },\n osVersion: { required: true, type: String },\n termVersion: { required: true, type: String },\n timestamp: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const resourceRelationsSchema = new MongooseSchema<{\n relationId: ObjectId;\n relationDates: RelationDate[];\n}>(\n {\n relationDates: {\n default: [],\n required: false,\n type: [relationDatesSchema],\n },\n relationId: {\n ref: \"Relation\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nexport const dateTimeSchema = new MongooseSchema<DateTimeType>(\n {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n endDate: { required: true, type: String },\n endTime: { required: true, type: String },\n startDate: { required: true, type: String },\n startTime: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const locationGeoSchema = new MongooseSchema<LocationGeoType>(\n {\n coordinates: { required: true, type: [Number] }, // [longitude, latitude]\n type: { default: \"Point\", enum: [\"Point\"], required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const locationsSchema = new MongooseSchema<LocationType>(\n {\n city: { required: true, type: String },\n country: { required: true, type: String },\n fullAddress: { required: true, type: String },\n geo: {\n required: true,\n type: locationGeoSchema,\n },\n latitude: { required: true, type: Number },\n longitude: { required: true, type: Number },\n region: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const baseResourceFields = {\n active: { default: false, required: true, type: Boolean },\n adIds: {\n ref: \"Ad\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n associates: {\n required: false,\n type: [associatesSchema],\n },\n contactDetails: { required: false, type: ContactDetailsSchema },\n cover: {\n required: true,\n type: ResourceImageTypeSchema,\n },\n deletedAt: { default: null, required: false, type: Date },\n description: { required: true, type: String },\n images: { required: false, type: [ResourceImageTypeSchema] },\n logo: { required: false, type: ResourceImageTypeSchema },\n name: { required: true, type: String },\n owner: {\n required: false,\n type: OwnerTypeSchema,\n },\n posterUsage: { required: false, type: PosterUsageTypeSchema },\n promoCodes: { required: false, type: [String] },\n rating: { required: false, type: Number },\n region: { required: true, type: String },\n reviewCount: { required: false, type: Number },\n socialMedia: { required: false, type: [SocialMediaTypeSchema] },\n termsAgreement: { required: true, type: termsAgreementSchema },\n};\n","import {\n EnumEventDateStatus,\n EnumInviteStatus,\n EnumRelationResource,\n EnumResourceType,\n RelationDate,\n RelationType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { StallTypeSchema } from \"./event/EventInfo\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst relationDateTimeSchema = new MongooseSchema<RelationDate[\"dateTime\"]>(\n {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: true,\n type: String,\n },\n endDate: { required: true, type: String },\n endTime: { required: true, type: String },\n stallType: StallTypeSchema,\n startDate: { required: true, type: String },\n startTime: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const relationDatesSchema = new MongooseSchema<RelationDate>(\n {\n dateTime: {\n required: true,\n type: relationDateTimeSchema,\n },\n lastUpdateBy: {\n resourceId: { required: false, type: String },\n userEmail: { required: false, type: String },\n },\n paymentReference: { required: false, type: String },\n status: {\n enum: Object.values(EnumInviteStatus),\n required: false,\n type: String,\n },\n },\n { _id: false },\n);\n\nexport type SchemaRelationType = Omit<\n RelationType,\n \"eventId\" | \"vendorId\" | \"chatId\"\n> & {\n eventId: ObjectId;\n vendorId: ObjectId;\n chatId: ObjectId;\n};\n/**\n * This is the schema for the relation type.\n * It is used to define the structure of the relation type in the database.\n * The schema is used by Mongoose to create a model for the relation type.\n */\nexport const RelationTypeSchema = new MongooseSchema<SchemaRelationType>(\n {\n active: { default: true, required: true, type: Boolean },\n chatId: {\n ref: \"Chat\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n deletedAt: { default: null, required: false, type: Date },\n eventId: {\n ref: \"Event\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n lastUpdateBy: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n relationDates: [relationDatesSchema],\n relationType: {\n enum: Object.values(EnumRelationResource),\n required: true,\n type: String,\n },\n vendorId: {\n ref: \"Vendor\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nRelationTypeSchema.index({\n eventId: 1,\n \"relationDates.startDate\": 1,\n \"relationDates.startTime\": 1,\n \"relationDates.status\": 1,\n vendorId: 1,\n});\n\n// --- IMPORTANT: bind custom model type ---\nexport const RelationModel =\n (mongoose.models.Relation as mongoose.Model<SchemaRelationType>) ||\n mongoose.model<SchemaRelationType>(\"Relation\", RelationTypeSchema);\n","import {\n DateTimeWithPriceType,\n EnumEventDateStatus,\n EnumPaymentMethod,\n EventInfoType,\n PaymentInfoType,\n RefundPolicy,\n Requirement,\n StallType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport const StallTypeSchema = new MongooseSchema<StallType>(\n {\n label: { required: false, type: String },\n price: { required: false, type: Number },\n stallCapacity: { required: false, type: Number },\n },\n {\n _id: false, // Prevents Mongoose from creating an additional _id field for subdocuments\n },\n);\n\nconst dateTimeSchema = new MongooseSchema<DateTimeWithPriceType>(\n {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n endDate: { required: true, type: String },\n endTime: { required: true, type: String },\n stallTypes: [StallTypeSchema],\n startDate: { required: true, type: String },\n startTime: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst paymentInfoSchema = new MongooseSchema<PaymentInfoType>(\n {\n accountHolderName: { required: false, type: String },\n accountNumber: { required: false, type: String },\n link: { required: false, type: String },\n paymentMethod: {\n enum: Object.values(EnumPaymentMethod),\n required: true,\n type: String,\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field\n);\n\nconst requirementsSchema = new MongooseSchema<Requirement>(\n {\n category: { required: true, type: String },\n label: { required: true, type: String },\n value: { required: true, type: Boolean },\n },\n {\n _id: false, // Prevents Mongoose from creating an additional _id field for\n },\n);\n\nexport const refundPolicySchema = new MongooseSchema<RefundPolicy>(\n {\n category: { required: true, type: String },\n label: { required: true, type: String },\n value: { required: true, type: Boolean },\n },\n { _id: false },\n);\n\nexport type SchemaEventInfoType = Omit<EventInfoType, \"eventId\"> & {\n eventId: ObjectId;\n};\n\n/**\n * This is the schema for the event info type.\n * It is used to define the structure of the event info type in the database.\n * The schema is used by Mongoose to create a model for the event info type.\n */\nconst schema = new MongooseSchema<SchemaEventInfoType>(\n {\n active: { default: true, type: Boolean },\n applicationDeadlineHours: { required: true, type: Number },\n dateTime: { required: true, type: [dateTimeSchema] },\n eventId: {\n ref: \"Event\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n packInTime: { required: true, type: Number },\n paymentDueHours: { required: true, type: Number },\n paymentInfo: { required: true, type: [paymentInfoSchema] },\n refundPolicy: { required: true, type: [refundPolicySchema] },\n requirements: { required: false, type: [requirementsSchema] },\n },\n { timestamps: true },\n);\n\nexport const EventInfoModel =\n (mongoose.models.EventInfo as mongoose.Model<SchemaEventInfoType>) ||\n mongoose.model<SchemaEventInfoType>(\"EventInfo\", schema);\n","import {\n EnumEventType,\n GoogleAddressComponent,\n GoogleImportedMarket,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport {\n dateTimeSchema,\n locationsSchema,\n ResourceImageTypeSchema,\n resourceRelationsSchema,\n} from \"./global\";\n\nexport type SchemaGoogleImportedMarket = Omit<\n GoogleImportedMarket,\n \"eventId\" | \"claimedByUserId\"\n> & {\n eventId?: mongoose.Types.ObjectId;\n claimedByUserId?: mongoose.Types.ObjectId;\n};\n\nconst MongooseSchema = mongoose.Schema;\n\nconst addressComponentSchema = new MongooseSchema<GoogleAddressComponent>(\n {\n longName: { required: false, type: String },\n shortName: { required: false, type: String },\n types: { required: false, type: [String] },\n },\n { _id: false },\n);\n\n/**\n * This is the schema for the GoogleImportedMarket type.\n * It is used to define the structure of the GoogleImportedMarket type in the database.\n * The schema is used by Mongoose to create a model for the GoogleImportedMarket type.\n */\nconst schema = new MongooseSchema<SchemaGoogleImportedMarket>(\n {\n active: { default: false, required: true, type: Boolean },\n address: { required: true, type: String },\n addressComponents: { required: false, type: [addressComponentSchema] },\n businessStatus: { required: false, type: String },\n claimed: { default: false, required: true, type: Boolean },\n claimedAt: { default: null, required: false, type: Date },\n claimedByUserId: {\n ref: \"User\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n cover: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n dateTime: [dateTimeSchema],\n deletedAt: { default: null, required: false, type: Date },\n description: { required: true, type: String },\n eventId: {\n ref: \"Event\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n eventType: {\n enum: Object.values(EnumEventType),\n required: true,\n type: String,\n },\n googleMapsUrl: { required: false, type: String },\n googlePlaceId: {\n required: true,\n type: String,\n unique: true, // unique, indexed\n },\n images: { required: false, type: [ResourceImageTypeSchema] }, // array of photo_reference\n importedAt: { default: () => new Date(), required: true, type: Date },\n location: {\n required: true, // optional because lat/lng may expire after 30 days\n type: locationsSchema,\n },\n logo: { required: false, type: ResourceImageTypeSchema },\n name: { required: true, type: String },\n openingHours: { required: false, type: [String] },\n rainOrShine: { required: true, type: Boolean },\n rating: { required: false, type: Number },\n region: { required: false, type: String },\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\n },\n reviewCount: { required: false, type: Number },\n slug: { required: true, type: String },\n website: { required: false, type: String },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up searches\nschema.index({ \"location.geo\": \"2dsphere\" });\nschema.index({ name: 1 });\nschema.index({ region: 1 });\n\nexport const GoogleImportedMarketModel =\n (mongoose.models\n .GoogleImportedMarket as mongoose.Model<SchemaGoogleImportedMarket>) ||\n mongoose.model<SchemaGoogleImportedMarket>(\"GoogleImportedMarket\", schema);\n","import {\n CreateBulkNotificationInput,\n NotificationType,\n EnumNotificationResourceType,\n EnumNotificationType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaCreateBulkNotificationInput = Omit<\n CreateBulkNotificationInput,\n \"userIds\"\n> & {\n userIds: ObjectId[];\n};\n\nexport type SchemaNotificationType = Omit<NotificationType, \"userId\"> & {\n userId: ObjectId;\n};\n/**\n * Schema for storing in-app notifications\n * Each notification is tied to a specific user and can be marked as read/unread\n */\nconst schema = new MongooseSchema<SchemaNotificationType>(\n {\n data: {\n resourceId: { required: true, type: String },\n resourceName: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumNotificationResourceType),\n required: true,\n type: String,\n },\n },\n isRead: { default: false, index: true, required: true, type: Boolean },\n message: { required: true, type: String },\n title: { required: true, type: String },\n type: {\n default: EnumNotificationType.SYSTEM,\n enum: Object.values(EnumNotificationType),\n required: true,\n type: String,\n },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\n// Compound index for efficient queries\nschema.index({ isRead: 1, userId: 1 });\nschema.index({ createdAt: -1, userId: 1 });\n\nexport const NotificationModel =\n (mongoose.models.Notification as mongoose.Model<SchemaNotificationType>) ||\n mongoose.model<SchemaNotificationType>(\"Notification\", schema);\n","export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n}\n\nexport enum EnumChatReportReason {\n INAPPROPRIATE_CONTENT = \"Inappropriate_Content\",\n HARASSMENT_OR_BULLYING = \"Harassment_or_Bullying\",\n HATE_SPEECH = \"Hate_Speech\",\n SPAM_OR_SCAM = \"Spam_or_Scam\",\n VIOLENCE_OR_DANGEROUS_BEHAVIOR = \"Violence_or_Dangerous_Behavior\",\n OTHER = \"Other\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n OTHER = \"Not_Applicable\",\n}\n\nexport enum EnumFoodType {\n ADDITIVE_FREE = \"Additive_Free\",\n AIR_FRIED = \"Air_Fried\",\n ALLERGEN_FRIENDLY = \"Allergen_Friendly\",\n ATHLETE_FRIENDLY = \"Athlete_Friendly\",\n BAKED = \"Baked\",\n DAIRY_FREE = \"Dairy_Free\",\n DIABETIC_FRIENDLY = \"Diabetic_Friendly\",\n EGG_FREE = \"Egg_Free\",\n FRESH = \"Fresh\",\n GLUTEN_FREE = \"Gluten_Free\",\n GRILLED = \"Grilled\",\n HALAL = \"Halal\",\n HEART_HEALTHY = \"Heart_Healthy\",\n HIGH_FIBER = \"High_Fiber\",\n HIGH_PROTEIN = \"High_Protein\",\n KETO = \"Keto\",\n KOSHER = \"Kosher\",\n LACTOSE_FREE = \"Lactose_Free\",\n LOW_CALORIE = \"Low_Calorie\",\n LOW_CARB = \"Low_Carb\",\n LOW_FAT = \"Low_Fat\",\n LOW_SODIUM = \"Low_Sodium\",\n NO_ADDED_SUGAR = \"No_Added_Sugar\",\n NO_PRESERVATIVES = \"No_Preservatives\",\n NON_GMO = \"Non_GMO\",\n NUT_FREE = \"Nut_Free\",\n ORGANIC = \"Organic\",\n PALEO = \"Paleo\",\n PLANT_BASED = \"Plant_Based\",\n RAW = \"Raw\",\n SMOKED = \"Smoked\",\n SOY_FREE = \"Soy_Free\",\n SUGAR_FREE = \"Sugar_Free\",\n VEGAN = \"Vegan\",\n VEGETARIAN = \"Vegetarian\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumEventType {\n MARKET = \"Market\",\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n}\n\nexport enum EnumPartnerType {\n CHARITY_PARTNER = \"Charity_Partner\",\n MEDIA_PARTNER = \"Media_Partner\",\n SUPPORTING_PARTNER = \"Supporting_Partner\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n EVENT_UPDATE_RELATION_TO_VENDOR = \"event_update_relation_to_vendor\",\n VENDOR_UPDATE_RELATION_TO_EVENT = \"vendor_update_relation_to_event\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n ADDED_AS_ASSOCIATE_EVENT = \"added_as_associate_event\",\n ADDED_AS_ASSOCIATE_PARTNER = \"added_as_associate_partner\",\n ADDED_AS_ASSOCIATE_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_PARTNER = \"approved_partner\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_PARTNER = \"created_partner\",\n CREATED_VENDOR = \"created_vendor\",\n DAILY_CLUE_GAME = \"daily_clue_game\",\n DEACTIVATED_EVENT = \"deactivated_event\",\n DEACTIVATED_PARTNER = \"deactivated_partner\",\n DEACTIVATED_VENDOR = \"deactivated_vendor\",\n DECLINED_EVENT = \"declined_event\",\n DECLINED_PARTNER = \"declined_partner\",\n DECLINED_VENDOR = \"declined_vendor\",\n DOWNGRADED_EVENT = \"downgraded_event\",\n DOWNGRADED_PARTNER = \"downgraded_partner\",\n DOWNGRADED_VENDOR = \"downgraded_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n EVENT_UPDATE_RELATION_TO_VENDOR = EnumRelationResource.EVENT_UPDATE_RELATION_TO_VENDOR,\n EXPIRATION_REMINDER_EVENT = \"expiration_reminder_event\",\n EXPIRATION_REMINDER_PARTNER = \"expiration_reminder_partner\",\n EXPIRATION_REMINDER_VENDOR = \"expiration_reminder_vendor\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n NEW_POST_CREATED = \"new_post_created\",\n REGISTERED_USER_BY_SCHOOL_CODE = \"registered_user_by_school_code\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n VENDOR_UPDATE_RELATION_TO_EVENT = EnumRelationResource.VENDOR_UPDATE_RELATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n CHAT = \"chat\",\n EVENT = EnumResourceType.EVENT,\n RELATION = \"relation\",\n SYSTEM = \"system\",\n VENDOR = EnumResourceType.VENDOR,\n}\n\nexport enum EnumRegions {\n All = \"All Regions\",\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n CanterburyWestCoast = \"Canterbury & West Coast\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelsonTasman = \"Marlborough & Nelson & Tasman\",\n Northland = \"Northland\",\n Otago = \"Otago\",\n Southland = \"Southland\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n STANDARD_PARTNER = \"standard_partner\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n CUSTOMER = \"customer\",\n MARKETING = \"marketing\",\n MODERATOR = \"moderator\",\n SUPPORT = \"support\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n\nexport enum EnumEventDateStatus {\n STARTING_SOON = \"Starting_Soon\",\n STARTED = \"Started\",\n TODAY = \"Today\",\n TOMORROW = \"Tomorrow\",\n THIS_WEEK = \"This_Week\",\n NEXT_WEEK = \"Next_Week\",\n UPCOMING = \"Upcoming\",\n ENDED = \"Ended\",\n RE_SCHEDULED = \"Rescheduled\",\n CANCELED = \"Canceled\",\n}\n\nexport enum EnumSubscriptionStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n CANCELLED = \"cancelled\",\n NO_SUBSCRIPTION = \"no_subscription\",\n PAST_DUE = \"past_due\",\n TRIALING = \"trialing\",\n}\n\nexport enum EnumBillingPeriod {\n MONTHLY_CANCEL_ANYTIME = \"monthly_cancel_anytime\",\n YEARLY_ANNUAL_BILLED = \"yearly_annual_billed\",\n YEARLY_MONTHLY_BILLED = \"yearly_monthly_billed\",\n}\n","import { PushTokenType } from \"@timardex/cluemart-shared\";\nimport { EnumOSPlatform } from \"@timardex/cluemart-shared/enums\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaPushTokenType = Omit<PushTokenType, \"userId\"> & {\n userId: ObjectId;\n};\n\n/**\n * This is the schema for the push token type.\n * It is used to define the structure of the push token type in the database.\n * The schema is used by Mongoose to create a model for the push token type.\n */\nconst schema = new MongooseSchema<SchemaPushTokenType>(\n {\n platform: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n token: { required: true, type: String },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nexport const PushTokenModel =\n (mongoose.models.PushToken as mongoose.Model<SchemaPushTokenType>) ||\n mongoose.model<SchemaPushTokenType>(\"PushToken\", schema);\n","import {\n EnumActivity,\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n ResourceActivityEntry,\n ResourceActivityType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { locationGeoSchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst ActivitySchema = new MongooseSchema<ResourceActivityEntry>(\n {\n activityType: {\n enum: Object.values(EnumActivity),\n required: true,\n type: String,\n },\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n location: {\n required: false,\n type: locationGeoSchema,\n },\n startDate: { required: false, type: String },\n startTime: { required: false, type: String },\n timestamp: { default: Date.now, type: Date },\n userAgent: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n userId: { required: false, type: String },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<ResourceActivityType>(\n {\n activity: { default: [], type: [ActivitySchema] },\n resourceId: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n },\n { timestamps: true },\n);\n\nschema.index({ resourceId: 1, resourceType: 1 }, { unique: true }); // one per entity\nschema.index({ \"views.location\": \"2dsphere\" });\n\nexport const ResourceActivityModel =\n (mongoose.models.ResourceActivity as mongoose.Model<ResourceActivityType>) ||\n mongoose.model<ResourceActivityType>(\"ResourceActivity\", schema);\n","import {\n EnumOSPlatform,\n EnumSubscriptionStatus,\n EnumUserLicence,\n EnumUserRole,\n StripeSubscription,\n UserActivityEvent,\n UserType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n associatesSchema,\n dateTimeSchema,\n locationsSchema,\n ResourceImageTypeSchema,\n termsAgreementSchema,\n userLicenseSchema,\n} from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaUserActivityEvent = Omit<UserActivityEvent, \"resourceId\"> & {\n resourceId: ObjectId;\n};\n\nexport type SchemaUserType = Omit<\n UserType,\n \"vendor\" | \"events\" | \"partner\" | \"userActivity\" | \"_id\" | \"game\" | \"school\"\n> & {\n _id: ObjectId;\n events: ObjectId[];\n game: ObjectId;\n partner: ObjectId;\n school: ObjectId;\n vendor: ObjectId;\n userActivity: {\n favourites: {\n events: ObjectId[];\n vendors: ObjectId[];\n partners: ObjectId[];\n };\n interested: {\n events: SchemaUserActivityEvent[];\n };\n going: {\n events: SchemaUserActivityEvent[];\n };\n present: {\n events: SchemaUserActivityEvent[];\n };\n };\n};\n\nconst userActivityEventSchema = new MongooseSchema<SchemaUserActivityEvent>(\n {\n dateTime: dateTimeSchema,\n resourceId: {\n ref: \"Event\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nconst userActivityFavouritesSchema = new MongooseSchema(\n {\n events: {\n ref: \"Event\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n partners: {\n ref: \"Partner\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n vendors: {\n ref: \"Vendor\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n },\n { _id: false },\n);\n\nconst stripeSchema = new MongooseSchema<StripeSubscription>(\n {\n currentPlan: {\n enum: Object.values(EnumUserLicence),\n required: false,\n type: String,\n },\n customerId: {\n required: false,\n type: String,\n },\n endDate: {\n required: false,\n type: Date,\n },\n startDate: {\n required: false,\n type: Date,\n },\n status: {\n enum: Object.values(EnumSubscriptionStatus),\n required: false,\n type: String,\n },\n subscriptionId: {\n required: false,\n type: String,\n },\n },\n { _id: false },\n);\n\n/**\n * This is the schema for the user type.\n * It is used to define the structure of the user type in the database.\n * The schema is used by Mongoose to create a model for the user type.\n */\nconst schema = new MongooseSchema<SchemaUserType>(\n {\n active: { default: false, required: true, type: Boolean },\n associates: {\n required: false,\n type: [associatesSchema],\n },\n avatar: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n deletedAt: { default: null, required: false, type: Date },\n email: { required: true, type: String },\n events: {\n ref: \"Event\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n firstName: { required: true, type: String },\n game: {\n ref: \"Game\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n isTester: { default: false, required: true, type: Boolean },\n lastName: { required: true, type: String },\n licences: {\n required: false,\n type: [userLicenseSchema],\n },\n location: {\n required: false,\n type: locationsSchema,\n },\n overallPoints: { default: 0, required: false, type: Number },\n partner: {\n ref: \"Partner\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n password: { required: true, type: String },\n platform: {\n enum: Object.values(EnumOSPlatform),\n required: false,\n type: String,\n },\n preferredRegion: {\n required: true,\n type: String,\n },\n promoCodes: {\n required: false,\n type: [String],\n },\n refreshToken: {\n required: false,\n type: String,\n },\n role: {\n default: EnumUserRole.CUSTOMER,\n enum: Object.values(EnumUserRole),\n required: true,\n type: String,\n },\n school: {\n ref: \"School\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n stripe: {\n required: false,\n type: stripeSchema,\n },\n termsAgreement: termsAgreementSchema,\n userActivity: {\n favourites: {\n default: () => ({ events: [], vendors: [] }),\n type: userActivityFavouritesSchema,\n },\n going: {\n events: [userActivityEventSchema],\n },\n interested: {\n events: [userActivityEventSchema],\n },\n present: {\n events: [userActivityEventSchema],\n },\n },\n vendor: {\n ref: \"Vendor\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { strict: false, timestamps: true },\n);\n\n// 🔹 Add indexes to speed up searches\nschema.index({ \"associates.email\": 1 });\nschema.index({ \"licences.expiryDate\": 1 });\nschema.index({ \"licences.licenceType\": 1 });\n\nexport const UserModel =\n (mongoose.models.User as mongoose.Model<SchemaUserType>) ||\n mongoose.model<SchemaUserType>(\"User\", schema);\n","import mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport interface VerificationTokenType {\n email: string;\n verificationToken: string;\n createdAt: Date;\n}\n\nconst schema = new MongooseSchema<VerificationTokenType>(\n {\n createdAt: {\n default: Date.now,\n expires: 24 * 60 * 60, // 24 hours in seconds (MongoDB TTL expects seconds)\n required: true,\n type: Date,\n }, // Token expires after 1 day\n email: { required: true, type: String },\n verificationToken: { required: true, type: String },\n },\n { timestamps: true },\n);\n\nexport const VerificationTokenModel =\n (mongoose.models\n .VerificationToken as mongoose.Model<VerificationTokenType>) ||\n mongoose.model<VerificationTokenType>(\"VerificationToken\", schema);\n","import {\n EnumEventDateStatus,\n EnumVendorType,\n VendorCalendarData,\n VendorProductList,\n VendorType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n baseResourceFields,\n CategorySchema,\n locationsSchema,\n resourceRelationsSchema,\n SchemaOwnerType,\n} from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst productTypeSchema = new MongooseSchema<VendorProductList>(\n {\n description: { required: false, type: String },\n name: { required: false, type: String },\n price: { required: false, type: Number },\n priceUnit: { required: false, type: String },\n productGroups: { required: false, type: [String] },\n },\n { _id: false },\n);\n\nconst productWrapperSchema = new MongooseSchema<VendorType[\"products\"]>(\n {\n active: { default: false, type: Boolean },\n productsList: { required: false, type: [productTypeSchema] },\n },\n { _id: false },\n);\n\nconst calendarSchema = new MongooseSchema<VendorCalendarData>(\n {\n dateTime: {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n endDate: { required: false, type: String },\n endTime: { required: false, type: String },\n startDate: { required: false, type: String },\n startTime: { required: false, type: String },\n },\n description: { required: false, type: String },\n location: {\n required: false,\n type: locationsSchema,\n },\n },\n { _id: false },\n);\n\nconst calendarWrapperSchema = new MongooseSchema<VendorType[\"calendar\"]>(\n {\n active: { default: false, type: Boolean },\n calendarData: { required: false, type: [calendarSchema] },\n },\n { _id: false },\n);\n\nexport type SchemaVendorType = Omit<\n VendorType,\n \"vendorInfoId\" | \"owner\" | \"adIds\" | \"unregisteredVendorId\"\n> & {\n adIds?: ObjectId[];\n owner: SchemaOwnerType;\n vendorInfoId: ObjectId;\n unregisteredVendorId?: ObjectId | null;\n};\n\nconst schema = new MongooseSchema<SchemaVendorType>(\n {\n ...baseResourceFields, // Importing base resource fields from global.ts\n availability: {\n corporate: { default: false, required: false, type: Boolean },\n private: { default: false, required: false, type: Boolean },\n school: { default: false, required: false, type: Boolean },\n },\n calendar: {\n required: false,\n type: calendarWrapperSchema,\n },\n categories: { required: true, type: [CategorySchema] },\n claimed: { default: true, required: false, type: Boolean },\n foodTruck: { required: true, type: Boolean },\n products: { required: false, type: productWrapperSchema },\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\n },\n unregisteredVendorId: {\n ref: \"UnregisteredVendor\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n vendorInfoId: {\n ref: \"VendorInfo\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n vendorType: {\n enum: Object.values(EnumVendorType),\n required: true,\n type: String,\n },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up regex-based searches\nschema.index({ name: 1 });\nschema.index({ description: 1 });\nschema.index({ region: 1 });\nschema.index({ \"categories.name\": 1 });\nschema.index({ \"associates.email\": 1 });\n\nexport const VendorModel =\n (mongoose.models.Vendor as mongoose.Model<SchemaVendorType>) ||\n mongoose.model<SchemaVendorType>(\"Vendor\", schema);\n","import {\n EnumFoodFlavor,\n VendorAttributes,\n VendorInfoType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { ResourceImageTypeSchema } from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaVendorInfoType = Omit<VendorInfoType, \"vendorId\"> & {\n vendorId: ObjectId;\n};\n\nconst AttributesSchema = new MongooseSchema<VendorAttributes>(\n {\n details: { required: false, type: String },\n isRequired: { default: false, required: true, type: Boolean },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<SchemaVendorInfoType>(\n {\n active: { default: true, type: Boolean },\n compliance: {\n foodBeverageLicense: { default: false, required: false, type: Boolean },\n liabilityInsurance: { default: false, required: false, type: Boolean },\n },\n documents: [ResourceImageTypeSchema],\n product: {\n foodFlavors: {\n enum: Object.values(EnumFoodFlavor),\n required: true,\n type: [String],\n },\n packaging: { required: true, type: [String] },\n priceRange: {\n max: { required: true, type: String },\n min: { required: true, type: String },\n },\n producedIn: { required: true, type: [String] },\n },\n requirements: {\n electricity: AttributesSchema,\n gazebo: AttributesSchema,\n table: AttributesSchema,\n },\n stallInfo: {\n size: {\n depth: { required: true, type: String },\n width: { required: true, type: String },\n },\n },\n vendorId: {\n ref: \"Vendor\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nexport const VendorInfoModel =\n (mongoose.models.VendorInfo as mongoose.Model<SchemaVendorInfoType>) ||\n mongoose.model<SchemaVendorInfoType>(\"VendorInfo\", schema);\n","import {\n UnregisteredVendorInvitationType,\n UnregisteredVendorType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { dateTimeSchema } from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaUnregisteredVendorInvitationType = Omit<\n UnregisteredVendorInvitationType,\n \"inviterId\"\n> & {\n inviterId: ObjectId;\n};\n\nexport type SchemaUnregisteredVendorType = Omit<\n UnregisteredVendorType,\n \"invitations\" | \"claimedByUserId\"\n> & {\n invitations: SchemaUnregisteredVendorInvitationType[];\n claimedByUserId?: mongoose.Types.ObjectId;\n};\n\nconst invitationSchema =\n new MongooseSchema<SchemaUnregisteredVendorInvitationType>(\n {\n dateTime: { required: true, type: [dateTimeSchema] },\n inviterId: {\n ref: \"Event\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n );\n\nconst schema = new MongooseSchema<SchemaUnregisteredVendorType>(\n {\n active: { default: true, required: true, type: Boolean },\n categoryIds: { required: true, type: [String] },\n claimed: { default: false, required: true, type: Boolean },\n claimedAt: { default: null, required: false, type: Date },\n claimedByUserId: {\n ref: \"User\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n deletedAt: { default: null, required: false, type: Date },\n email: { required: false, type: String },\n invitations: { required: true, type: [invitationSchema] },\n name: { required: true, type: String },\n region: { required: true, type: String },\n },\n { timestamps: true },\n);\n\nschema.index({ name: 1 });\nschema.index({ email: 1 });\n\nexport const UnregisteredVendorModel =\n (mongoose.models\n .UnregisteredVendor as mongoose.Model<SchemaUnregisteredVendorType>) ||\n mongoose.model<SchemaUnregisteredVendorType>(\"UnregisteredVendor\", schema);\n","import { EnumEventType, EventType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n baseResourceFields,\n dateTimeSchema,\n locationsSchema,\n resourceRelationsSchema,\n SchemaOwnerType,\n} from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaEventType = Omit<\n EventType,\n \"eventInfoId\" | \"owner\" | \"adIds\"\n> & {\n adIds?: ObjectId[];\n eventInfoId: ObjectId;\n owner: SchemaOwnerType;\n};\n\n/**\n * This is the schema for the event type.\n * It is used to define the structure of the event type in the database.\n * The schema is used by Mongoose to create a model for the event type.\n */\nconst schema = new MongooseSchema<SchemaEventType>(\n {\n ...baseResourceFields, // Importing base resource fields from global.ts\n claimed: { default: true, required: false, type: Boolean },\n dateTime: { required: true, type: [dateTimeSchema] },\n eventInfoId: {\n ref: \"EventInfo\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n eventType: {\n enum: Object.values(EnumEventType),\n required: true,\n type: String,\n },\n googlePlaceId: {\n default: null,\n required: false,\n type: String,\n },\n location: {\n required: true,\n type: locationsSchema,\n },\n nzbn: { required: true, type: String },\n provider: { required: false, type: String },\n rainOrShine: { required: true, type: Boolean },\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\n },\n tags: { required: true, type: [String] },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up regex-based searches\nschema.index({ name: 1 });\nschema.index({ description: 1 });\nschema.index({ region: 1 });\nschema.index({ \"location.geo\": \"2dsphere\" });\nschema.index({ tags: 1 });\nschema.index({ \"associates.email\": 1 });\n\nexport const EventModel =\n (mongoose.models.Event as mongoose.Model<SchemaEventType>) ||\n mongoose.model<SchemaEventType>(\"Event\", schema);\n","import { EnumPartnerType, PartnerType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { baseResourceFields, locationsSchema, SchemaOwnerType } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaPartnerType = Omit<PartnerType, \"owner\" | \"adIds\"> & {\n adIds?: ObjectId[];\n owner: SchemaOwnerType;\n};\n\nconst schema = new MongooseSchema<SchemaPartnerType>(\n {\n ...baseResourceFields,\n location: {\n required: true,\n type: locationsSchema,\n },\n nzbn: { required: true, type: String },\n partnerType: {\n enum: Object.values(EnumPartnerType),\n required: true,\n type: String,\n },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up regex-based searches\nschema.index({ name: 1 });\nschema.index({ description: 1 });\nschema.index({ region: 1 });\nschema.index({ \"location.geo\": \"2dsphere\" });\nschema.index({ \"associates.email\": 1 });\n\nexport const PartnerModel =\n (mongoose.models.Partner as mongoose.Model<SchemaPartnerType>) ||\n mongoose.model<SchemaPartnerType>(\"Partner\", schema);\n","import {\n EnumPostContentType,\n EnumPostType,\n EnumResourceType,\n PostContentType,\n PostType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose, { Schema } from \"mongoose\";\n\nimport { ResourceImageTypeSchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaPostType = PostType;\n\nconst contentSchema = new MongooseSchema<PostContentType>(\n {\n contentData: Schema.Types.Mixed,\n contentOrder: { required: true, type: Number },\n contentType: {\n enum: Object.values(EnumPostContentType),\n required: true,\n type: String,\n },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<SchemaPostType>(\n {\n active: { default: false, required: true, type: Boolean },\n caption: { required: true, type: String },\n content: {\n default: [],\n required: false,\n type: [contentSchema],\n },\n cover: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n deletedAt: { default: null, required: false, type: Date },\n postType: {\n enum: Object.values(EnumPostType),\n required: true,\n type: String,\n },\n resource: {\n required: false,\n type: {\n resourceId: { required: true, type: String },\n resourceRegion: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n },\n },\n tags: { default: [], required: false, type: [String] },\n title: { required: true, type: String },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up searches by title and tags\nschema.index({ title: 1 });\nschema.index({ tags: 1 });\n\nexport const PostModel =\n (mongoose.models.Post as mongoose.Model<SchemaPostType>) ||\n mongoose.model<SchemaPostType>(\"Post\", schema);\n","import { AppSettingsType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport const APP_SETTINGS_ID = \"APP_SETTINGS_DOCUMENT_ID\";\n\nconst AppSettingSchema = new MongooseSchema<AppSettingsType>(\n {\n activeSchoolsStudentCountTotal: {\n default: 0,\n required: true,\n type: Number,\n },\n activeSchoolsStudentCountUpdatedAt: {\n default: Date.now,\n required: true,\n type: Date,\n },\n appVersion: { default: \"1.0.1\", required: true, type: String },\n isOfflineMode: { default: false, required: true, type: Boolean },\n key: {\n default: APP_SETTINGS_ID,\n immutable: true, // ✅ prevents changes after creation\n required: true,\n type: String,\n unique: true, // ✅ allowed here\n },\n },\n { timestamps: true },\n);\n\nexport const AppSettingModel =\n (mongoose.models.AppSetting as mongoose.Model<AppSettingsType>) ||\n mongoose.model<AppSettingsType>(\"AppSetting\", AppSettingSchema);\n","import {\n EnumGameStatus,\n EnumGameType,\n GameDocType,\n GameHistory,\n GameType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { OwnerTypeSchema } from \"../global\";\n\nimport { schemaDailyClueGameData } from \"./DailyClue\";\nimport { schemaPuzzleGameData } from \"./PuzzleGame\";\nimport { schemaGameDate } from \"./utils\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaGameType = Omit<GameType, \"_id\"> & {\n _id: ObjectId;\n};\n\n// REMOVE partial when other game types are added\nconst gameDataSchemas: Partial<Record<EnumGameType, any>> = {\n [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,\n [EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,\n [EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData,\n};\n\nconst gameDataDefinition = Object.fromEntries(\n Object.entries(gameDataSchemas).map(([key, schema]) => [\n key,\n { default: null, required: false, type: schema },\n ]),\n);\n\nconst gameHistorySchema = new MongooseSchema<GameHistory>(\n {\n createdAt: { required: true, type: Date },\n gameDate: { required: true, type: schemaGameDate },\n gameStatus: {\n enum: Object.values(EnumGameStatus),\n required: true,\n type: String,\n },\n gameTitle: { required: true, type: String },\n gameType: {\n enum: Object.values(EnumGameType),\n required: true,\n type: String,\n },\n gameTypeId: { required: true, type: String },\n pointsEarned: { default: 0, required: true, type: Number },\n },\n { _id: false },\n);\n\nconst gameTypeSchema = new MongooseSchema<SchemaGameType>(\n {\n active: { default: true, required: true, type: Boolean },\n gameData: gameDataDefinition,\n gameHistory: { default: [], required: true, type: [gameHistorySchema] },\n gameTitle: { required: true, type: String },\n gameType: {\n enum: Object.values(EnumGameType),\n required: true,\n type: String,\n },\n gameTypeId: { required: true, type: String },\n },\n { timestamps: true },\n);\n\nconst schema = new MongooseSchema<GameDocType>(\n {\n active: { default: false, required: true, type: Boolean },\n deletedAt: { default: null, required: false, type: Date },\n games: { default: [], required: false, type: [gameTypeSchema] },\n owner: {\n required: true,\n type: OwnerTypeSchema,\n },\n points: { default: 0, required: true, type: Number },\n },\n { timestamps: true },\n);\n\nexport const GameModel =\n (mongoose.models.Game as mongoose.Model<GameDocType>) ||\n mongoose.model<GameDocType>(\"Game\", schema);\n","import {\n DailyClueBaseGame,\n DailyClueGameData,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { schemaGameDate } from \"./utils\";\n\nconst MongooseSchema = mongoose.Schema;\n\n/*\n DAILY CLUE GAME DATA SCHEMA\n**/\nconst schemaLetters = new MongooseSchema<DailyClueGameData[\"letterInfo\"]>(\n {\n collected: { required: false, type: [String] },\n solutionShuffled: { required: true, type: [String] },\n // todaysLetter and todaysPlacement is generated in the backend, so they are not required\n },\n { _id: false },\n);\n\n/**\n * ✅ Shared definition (THIS replaces .obj usage)\n * related to Post Model, PostContentData is using BaseGame\n */\nconst schemaDailyClueBaseGame = new MongooseSchema<DailyClueBaseGame>(\n {\n gameDate: { required: true, type: schemaGameDate },\n gameSolution: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const schemaDailyClueGameData = new MongooseSchema<DailyClueGameData>(\n {\n gameFields: { required: true, type: schemaDailyClueBaseGame },\n lastFoundDate: { default: null, required: false, type: Date },\n letterInfo: {\n required: true,\n type: schemaLetters,\n },\n points: { default: 0, required: true, type: Number },\n streak: { default: 0, required: true, type: Number },\n },\n { _id: false },\n);\n","import { GameDate } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\n// ✅ Shared definition\nexport const schemaGameDate = new MongooseSchema<GameDate>(\n {\n endDate: { required: true, type: Date },\n startDate: { required: true, type: Date },\n },\n { _id: false },\n);\n","import {\n PuzzleAnswer,\n PuzzleAnsweredQuestion,\n PuzzleBaseGame,\n PuzzleGameData,\n PuzzleQuestion,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst schemaPuzzleAnswer = new MongooseSchema<PuzzleAnswer>(\n {\n answer: { required: true, type: String },\n answerId: { required: true, type: String },\n correct: { required: true, type: Boolean },\n },\n { _id: false },\n);\n\nconst schemaPuzzleQuestion = new MongooseSchema<PuzzleQuestion>(\n {\n answers: { required: true, type: [schemaPuzzleAnswer] },\n question: { required: true, type: String },\n questionId: { required: true, type: String },\n },\n { _id: false },\n);\n\nconst schemaPuzzleBaseGame = new MongooseSchema<PuzzleBaseGame>(\n {\n questions: { required: true, type: [schemaPuzzleQuestion] },\n },\n { _id: false },\n);\n\nconst schemaPuzzleAnsweredQuestion = new MongooseSchema<PuzzleAnsweredQuestion>(\n {\n questionId: { required: true, type: String },\n selectedAnswerId: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const schemaPuzzleGameData = new MongooseSchema<PuzzleGameData>(\n {\n answeredQuestions: {\n default: null,\n required: false,\n type: [schemaPuzzleAnsweredQuestion],\n },\n gameFields: { required: true, type: schemaPuzzleBaseGame },\n points: { default: 0, required: true, type: Number },\n streak: { default: 0, required: true, type: Number },\n },\n { _id: false },\n);\n","import { SchoolCampaignType, SchoolType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport {\n ContactDetailsSchema,\n locationsSchema,\n OwnerTypeSchema,\n ResourceImageTypeSchema,\n SocialMediaTypeSchema,\n termsAgreementSchema,\n} from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\ntype SchoolDocument = Omit<SchoolType, \"ranking\">;\n\nconst campaignsSchema = new MongooseSchema<SchoolCampaignType>(\n {\n endDate: { required: true, type: Date },\n name: { required: true, type: String },\n startDate: { required: true, type: Date },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<SchoolDocument>(\n {\n // New schools are active by default\n active: { default: true, required: true, type: Boolean },\n campaigns: { required: false, type: [campaignsSchema] },\n contactDetails: { required: false, type: ContactDetailsSchema },\n deletedAt: { default: null, required: false, type: Date },\n location: {\n required: true,\n type: locationsSchema,\n },\n logo: { required: false, type: ResourceImageTypeSchema },\n name: { required: true, type: String },\n overallPoints: { default: 0, required: false, type: Number },\n owner: {\n required: true,\n type: OwnerTypeSchema,\n },\n region: { required: true, type: String },\n schoolCode: { required: true, type: String },\n socialMedia: { required: false, type: [SocialMediaTypeSchema] },\n studentCount: { default: 0, required: true, type: Number },\n termsAgreement: { required: true, type: termsAgreementSchema },\n },\n { timestamps: true },\n);\n\nexport const SchoolModel =\n (mongoose.models.School as mongoose.Model<SchoolDocument>) ||\n mongoose.model<SchoolDocument>(\"School\", schema);\n","import mongoose from \"mongoose\";\n\n/**\n * Connect to MongoDB using Mongoose.\n * Supports both local MongoDB (via MONGODB_URI) and MongoDB Atlas (via individual env vars).\n */\nexport const connectToDatabase = async ({\n appName,\n dbName,\n dbPassword,\n dbUser,\n mongodbUri,\n}: {\n appName: string;\n dbName: string;\n dbPassword: string;\n dbUser: string;\n mongodbUri: string;\n}) => {\n try {\n // Check if MONGODB_URI is provided (for local Docker MongoDB)\n const mongoUri = mongodbUri\n ? mongodbUri\n : // Fallback to MongoDB Atlas connection string\n `mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`;\n\n await mongoose.connect(mongoUri);\n\n const connectionType = mongodbUri ? \"Local MongoDB\" : \"MongoDB Atlas\";\n console.log(\n `${connectionType} connected from server/src/service/database.ts`,\n );\n } catch (err) {\n console.error(\"Error connecting to MongoDB:\", err);\n throw err; // You can throw the error if you want to stop the server in case of connection failure\n }\n};\n","import {\n SchemaCreateBulkNotificationInput,\n NotificationModel,\n} from \"src/mongoose/Notification\";\nimport { ObjectId } from \"src/types\";\n\n/**\n * Create notifications in the database for multiple users\n * This is typically called when sending push notifications\n */\nexport async function saveNotificationsInDb(\n payload: SchemaCreateBulkNotificationInput,\n): Promise<ObjectId[]> {\n const { data, message, title, type, userIds } = payload;\n console.log('NOTIFICATION DATA', JSON.stringify(payload, null, 2));\n try {\n const notifications = userIds.map((userId) => ({\n data,\n isRead: false,\n message,\n title,\n type,\n userId,\n }));\n\n // Save notifications to database\n await NotificationModel.insertMany(notifications);\n console.log(\n `Created ${notifications.length} notifications for ${userIds.length} users`,\n );\n\n return [...new Set(userIds)];\n } catch (error) {\n console.error(\"Failed to create notifications:\", error);\n return [];\n //throw new Error(`Failed to create notifications: ${error}`);\n }\n}\n","import { NotificationDataType } from \"@timardex/cluemart-shared\";\nimport { Expo, ExpoPushMessage, ExpoPushTicket } from \"expo-server-sdk\";\n\nimport { SchemaCreateBulkNotificationInput } from \"src/mongoose/Notification\";\nimport { PushTokenModel } from \"src/mongoose/PushToken\";\n\nconst expo = new Expo();\n\n/**\n * Safely extract tokens from ExpoPushMessage handling both string and array cases\n */\nfunction extractTokensFromMessage(message: ExpoPushMessage): string[] {\n return Array.isArray(message.to) ? message.to : [message.to];\n}\n\ninterface CreatePushMessagesOptions {\n tokens: string[];\n message: string;\n title: string;\n data: NotificationDataType;\n}\n\n/**\n * Create push messages from valid tokens\n */\nfunction createPushMessages({\n tokens,\n message,\n title,\n data,\n}: CreatePushMessagesOptions): {\n messages: ExpoPushMessage[];\n invalidTokens: string[];\n} {\n const messages: ExpoPushMessage[] = [];\n const invalidTokens: string[] = [];\n\n for (const token of tokens) {\n if (!Expo.isExpoPushToken(token)) {\n invalidTokens.push(token);\n continue;\n }\n\n messages.push({\n body: message,\n data: { ...data },\n sound: \"default\",\n title,\n to: token,\n });\n }\n\n return { invalidTokens, messages };\n}\n\n/**\n * Process chunk results and extract failed tokens\n */\nfunction processChunkResults(\n tickets: ExpoPushTicket[],\n chunk: ExpoPushMessage[],\n): { successCount: number; failedTokens: string[] } {\n let successCount = 0;\n const failedTokens: string[] = [];\n\n for (const [ticketIndex, ticket] of tickets.entries()) {\n if (ticket.status === \"error\") {\n const message = chunk[ticketIndex];\n if (message) {\n const tokens = extractTokensFromMessage(message);\n if (ticket.details?.error === \"DeviceNotRegistered\") {\n failedTokens.push(...tokens);\n }\n console.log(\"Push notification error\", {\n error: ticket.details?.error,\n tokens,\n });\n }\n } else {\n successCount++;\n }\n }\n\n return { failedTokens, successCount };\n}\n\n/**\n * Send a single chunk of push notifications\n */\nasync function sendChunk(\n chunk: ExpoPushMessage[],\n chunkIndex: number,\n): Promise<{ successCount: number; failedTokens: string[] }> {\n try {\n const tickets = await expo.sendPushNotificationsAsync(chunk);\n const { successCount, failedTokens } = processChunkResults(tickets, chunk);\n\n console.log(\n `Chunk ${chunkIndex + 1}: Sent ${successCount}/${chunk.length} notifications successfully`,\n );\n\n return { failedTokens, successCount };\n } catch (error) {\n console.log(\"Error sending Expo push notification chunk\", {\n chunkIndex,\n chunkSize: chunk.length,\n error: error instanceof Error ? error.message : String(error),\n });\n return { failedTokens: [], successCount: 0 };\n }\n}\n\nexport async function sendPushNotifications({\n data,\n message,\n title,\n userIds,\n}: SchemaCreateBulkNotificationInput) {\n const pushTokens = await PushTokenModel.find({ userId: { $in: userIds } });\n const expoTokens = pushTokens.map((token) => token.token);\n\n if (!data) return;\n\n const { messages, invalidTokens } = createPushMessages({\n data,\n message,\n title,\n tokens: expoTokens,\n });\n\n // Log invalid tokens\n if (invalidTokens.length > 0) {\n console.log(`Found ${invalidTokens.length} invalid push tokens`);\n }\n\n if (messages.length === 0) {\n console.log(\"No valid messages to send after filtering tokens\");\n return;\n }\n\n // Send notifications in chunks\n const chunks = expo.chunkPushNotifications(messages);\n let totalSuccessCount = 0;\n const allFailedTokens: string[] = [];\n\n for (const [chunkIndex, chunk] of chunks.entries()) {\n const { successCount, failedTokens } = await sendChunk(\n chunk,\n chunkIndex + 1,\n );\n totalSuccessCount += successCount;\n allFailedTokens.push(...failedTokens);\n }\n\n // Log final results\n console.log(\n `Sent push notification to ${totalSuccessCount}/${messages.length} tokens across ${chunks.length} chunks`,\n );\n\n if (allFailedTokens.length > 0) {\n console.log(`Found ${allFailedTokens.length} failed push tokens`);\n }\n}\n","import { EnumAdStatus } from \"@timardex/cluemart-shared\";\n\nimport { AdModel } from \"src/mongoose\";\n\n/**\n * Updates ad statuses based on start/end dates and validity\n */\nexport async function updateAdStatuses(): Promise<void> {\n const now = new Date();\n\n // invalid\n const invalidResult = await AdModel.updateMany(\n {\n $or: [\n { start: { $exists: false } },\n { end: { $exists: false } },\n { $expr: { $gt: [\"$start\", \"$end\"] } },\n ],\n status: { $ne: EnumAdStatus.PAUSED },\n },\n { $set: { status: EnumAdStatus.PAUSED } },\n );\n\n // expired\n const expiredResult = await AdModel.updateMany(\n { end: { $lte: now }, status: { $ne: EnumAdStatus.EXPIRED } },\n { $set: { status: EnumAdStatus.EXPIRED } },\n );\n\n // active\n const activeResult = await AdModel.updateMany(\n {\n end: { $gt: now },\n start: { $lte: now },\n status: { $ne: EnumAdStatus.ACTIVE },\n },\n { $set: { status: EnumAdStatus.ACTIVE } },\n );\n\n // paused\n const pausedResult = await AdModel.updateMany(\n { start: { $gt: now }, status: { $ne: EnumAdStatus.PAUSED } },\n { $set: { status: EnumAdStatus.PAUSED } },\n );\n\n console.log(\n `✅ Ad statuses updated: invalid=${invalidResult.modifiedCount}, expired=${expiredResult.modifiedCount}, active=${activeResult.modifiedCount}, paused=${pausedResult.modifiedCount}`,\n );\n}\n","import { EnumChatType, EnumResourceType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ChatModel, UserModel } from \"src/mongoose\";\nimport { ObjectId } from \"src/types\";\n\ninterface RemoveAssociateFromResourceParams {\n resourceId: string | ObjectId;\n resourceOwnerId: string | ObjectId;\n resourceType: EnumResourceType;\n}\n\ninterface ResourceAssociateScope {\n normalizedResourceId: string;\n resourceType: EnumResourceType;\n}\n\nfunction normalizeObjectId(id: string | ObjectId): ObjectId {\n return typeof id === \"string\" ? new mongoose.Types.ObjectId(id) : id;\n}\n\nasync function getAssociateEmailsForResource({\n normalizedResourceId,\n resourceType,\n}: ResourceAssociateScope): Promise<string[]> {\n const usersWithAssociates = await UserModel.find(\n {\n associates: {\n $elemMatch: {\n resourceId: normalizedResourceId,\n resourceType,\n },\n },\n },\n {\n associates: 1,\n },\n ).lean();\n\n return [\n ...new Set(\n usersWithAssociates.flatMap((user) =>\n (user.associates ?? [])\n .filter(\n (associate) =>\n associate.resourceId === normalizedResourceId &&\n associate.resourceType === resourceType,\n )\n .map((associate) => associate.email),\n ),\n ),\n ];\n}\n\nasync function pullAssociatesFromUsers({\n normalizedResourceId,\n resourceType,\n}: ResourceAssociateScope): Promise<void> {\n await UserModel.updateMany(\n {\n associates: {\n $elemMatch: {\n resourceId: normalizedResourceId,\n resourceType,\n },\n },\n },\n {\n $pull: {\n associates: {\n resourceId: normalizedResourceId,\n resourceType,\n },\n },\n },\n );\n}\n\nasync function pullAssociateParticipantsFromChats(\n resourceOwnerId: ObjectId,\n associateEmails: string[],\n): Promise<void> {\n await ChatModel.updateMany(\n {\n active: true,\n chatType: EnumChatType.RELATION,\n deletedAt: null,\n participants: {\n $elemMatch: {\n userId: resourceOwnerId,\n },\n },\n },\n {\n $pull: {\n participants: {\n isAssociate: true,\n userEmail: {\n $in: associateEmails,\n },\n },\n },\n },\n );\n}\n\n/**\n * Removes all associates linked to a resource\n * and removes related associate chat participants.\n */\nexport async function removeAssociateFromResource({\n resourceId,\n resourceOwnerId,\n resourceType,\n}: RemoveAssociateFromResourceParams): Promise<void> {\n try {\n const scope: ResourceAssociateScope = {\n normalizedResourceId: resourceId.toString(),\n resourceType,\n };\n\n const associateEmails = await getAssociateEmailsForResource(scope);\n\n if (associateEmails.length === 0) {\n return;\n }\n\n await pullAssociatesFromUsers(scope);\n await pullAssociateParticipantsFromChats(\n normalizeObjectId(resourceOwnerId),\n associateEmails,\n );\n } catch (error) {\n console.error(\n `[removeAssociateFromResource] Failed for resourceId=${resourceId}, resourceType=${resourceType}`,\n error,\n );\n }\n}\n","import { EnumResourceType, EnumUserLicence } from \"@timardex/cluemart-shared\";\n\nimport { UserModel, VendorModel, SchemaVendorType } from \"src/mongoose\";\nimport { ObjectId } from \"src/types\";\n\nimport { removeAssociateFromResource } from \"./associate\";\n\nexport async function updateVendorBasedOnUserLicense(\n userId: ObjectId,\n licenceType: EnumUserLicence,\n): Promise<void> {\n try {\n /**\n * Fetch user vendor reference\n */\n const user = await UserModel.findById(userId)\n .select(\"vendor\")\n .lean()\n .exec();\n\n if (!user?.vendor) {\n console.warn(`[updateVendor] No vendor found for userId=${userId}`);\n return;\n }\n\n /**\n * Fetch vendor\n */\n const vendor = await VendorModel.findById(user.vendor)\n .lean<SchemaVendorType>()\n .exec();\n\n if (!vendor) {\n console.warn(`[updateVendor] Vendor not found for id=${user.vendor}`);\n return;\n }\n\n /**\n * Build vendor update payload\n */\n const updateData: Partial<SchemaVendorType> = {};\n\n const isStandardVendor = licenceType === EnumUserLicence.STANDARD_VENDOR;\n\n if (isStandardVendor) {\n updateData.associates = [];\n\n updateData.availability = {\n corporate: false,\n private: false,\n school: false,\n };\n\n updateData.products = {\n active: false,\n productsList: vendor.products?.productsList ?? [],\n };\n\n updateData.calendar = {\n active: false,\n calendarData: vendor.calendar?.calendarData ?? [],\n };\n }\n\n /**\n * Image rules\n * STANDARD_VENDOR => only first 6 active\n * PRO_VENDOR => all active\n */\n updateData.images = (vendor.images ?? []).map((image, index) => ({\n ...image,\n active: isStandardVendor ? index < 6 : true,\n }));\n\n /**\n * Persist vendor updates\n */\n await VendorModel.updateOne({ _id: vendor._id }, { $set: updateData });\n\n /**\n * Cleanup associates for STANDARD licence\n */\n if (isStandardVendor) {\n await removeAssociateFromResource({\n resourceId: vendor._id,\n resourceOwnerId: vendor.owner.userId,\n resourceType: EnumResourceType.VENDOR,\n });\n }\n } catch (error) {\n console.error(\"[updateVendorBasedOnUserLicense] Failed:\", error);\n }\n}\n","import mongoose from \"mongoose\";\n\n/**\n * Recursively converts all ObjectId fields to strings in an object\n * This is needed because GraphQL expects string IDs, not ObjectIds\n */\nexport function convertObjectIdsToStrings(obj: any): any {\n if (obj === null || obj === undefined) {\n return obj;\n }\n\n if (obj instanceof mongoose.Types.ObjectId) {\n return obj.toString();\n }\n\n if (Array.isArray(obj)) {\n return obj.map(convertObjectIdsToStrings);\n }\n\n if (typeof obj === \"object\") {\n const converted: any = {};\n for (const [key, value] of Object.entries(obj)) {\n converted[key] = convertObjectIdsToStrings(value);\n }\n return converted;\n }\n\n return obj;\n}\n","import { EventListItemType } from \"@timardex/cluemart-shared\";\n\nimport { EventModel, GoogleImportedMarketModel } from \"src/mongoose\";\nimport { ObjectId } from \"src/types\";\n\nimport { convertObjectIdsToStrings } from \"./objectIdToString\";\n\ntype EventOrMarket = Pick<EventListItemType, \"_id\" | \"name\"> | null;\n\n/**\n * This function attempts to find an Event or a Google Imported Market by the given resource ID.\n * It first normalizes the resource ID to a string format, then performs parallel queries to both collections.\n * If an Event is found, it returns that; otherwise, it checks for a Google Imported Market and returns it if found.\n * If neither is found, it returns null.\n * @param resourceId - The ID of the resource to find, which can be an ObjectId, string, null, or undefined.\n * @returns A promise that resolves to either an Event or a Google Imported Market object containing _id and name, or null if not found.\n */\n\nexport async function findEventOrImportedMarketById(\n resourceId: ObjectId | string | null | undefined,\n): Promise<EventOrMarket> {\n if (!resourceId) {\n return null;\n }\n\n const normalizedId = convertObjectIdsToStrings(resourceId) as string;\n\n const [eventDoc, googleImportedDoc] = await Promise.all([\n EventModel.findById(normalizedId)\n .select(\"_id name\")\n .lean<Pick<EventListItemType, \"_id\" | \"name\">>()\n .exec(),\n GoogleImportedMarketModel.findById(normalizedId)\n .select(\"_id name\")\n .lean<Pick<EventListItemType, \"_id\" | \"name\">>()\n .exec(),\n ]);\n\n return eventDoc ?? googleImportedDoc;\n}\n","import {\n DateTimeWithPriceType,\n EnumInviteStatus,\n} from \"@timardex/cluemart-shared\";\nimport { DateTimeType } from \"@timardex/cluemart-shared/types\";\n\nimport { SchemaRelationType } from \"src/mongoose/Relation\";\n\ntype EventDateSlot = Pick<DateTimeType, \"startDate\" | \"startTime\">;\n\n/**\n * Returns true when at least one startDate/startTime slot from the previous\n * schedule is absent from the next schedule (i.e. a date was removed).\n */\nexport function didRemoveAnyEventDates(\n previousDateTime: EventDateSlot[] | undefined,\n nextDateTime: EventDateSlot[] | undefined,\n): boolean {\n if (!previousDateTime?.length) {\n return false;\n }\n\n return previousDateTime.some(\n (prev) =>\n !nextDateTime?.some(\n (next) =>\n next.startDate === prev.startDate &&\n next.startTime === prev.startTime,\n ),\n );\n}\n\n/**\n * Helper: Update relationDates based on event's dateTime\n * Marks dates as UNAVAILABLE if they no longer exist in the event's dateTime.\n */\nexport function updateRelationDatesToUnavailable(\n relationDates: SchemaRelationType[\"relationDates\"],\n eventDateTime: DateTimeWithPriceType[] | undefined,\n): SchemaRelationType[\"relationDates\"] {\n return relationDates.map((relationDate) => {\n // Check if this relationDate exists in the event's dateTime\n const existsInEvent =\n eventDateTime?.some(\n (dt) =>\n dt.startDate === relationDate.dateTime.startDate &&\n dt.startTime === relationDate.dateTime.startTime,\n ) ?? false;\n\n return {\n ...relationDate,\n status: existsInEvent\n ? relationDate.status\n : EnumInviteStatus.UNAVAILABLE,\n };\n });\n}\n","import { EnumUserRole } from \"@timardex/cluemart-shared\";\nimport { NotificationCount } from \"@timardex/cluemart-shared/types\";\nimport express from \"express\";\nimport mongoose from \"mongoose\";\n\nimport { SchemaChatType } from \"../mongoose/chat/Chat\";\nimport { SchemaNotificationType } from \"../mongoose/Notification\";\n\n// chnage to export type ObjectId = mongoose.Types.ObjectId;\n// chnage in server when setting decideGameType\nexport type ObjectId = mongoose.Types.ObjectId;\n\nexport enum EnumPubSubEvents {\n GET_CHAT_MESSAGE = \"GET_CHAT_MESSAGE\",\n GET_NOTIFICATIONS = \"GET_NOTIFICATIONS\",\n GET_NOTIFICATIONS_COUNT = \"GET_NOTIFICATIONS_COUNT\",\n USER_TYPING = \"USER_TYPING\",\n}\n\nexport interface AuthUser {\n email: string;\n role: EnumUserRole;\n userId: ObjectId;\n}\n\nexport interface SubscriptionPayload {\n getChatMessage?: SchemaChatType;\n userTyping?: SchemaChatType; // NOT USED\n getNotifications?: SchemaNotificationType[];\n // Used only for filtering; not part of the GraphQL schema output\n getNotificationsUserId?: ObjectId;\n getNotificationsCount?: NotificationCount & { userId: ObjectId };\n}\n\nexport interface GraphQLContext {\n appVersion: string | null;\n user: AuthUser | null;\n pubsub: {\n publish: (\n eventName: EnumPubSubEvents,\n payload: SubscriptionPayload,\n ) => void;\n subscribe: (eventName: EnumPubSubEvents) => AsyncIterable<any>;\n };\n request: express.Request;\n response: express.Response;\n}\n\nexport { mongoose, express };\n"],"mappings":";AGAA,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AACrB,OAAO,SAAS;;;AoHYhB,IAAI,gBAAgB,SAAS,GAAG,GAAG;AACjC,kBAAgB,OAAO,kBAClB,EAAE,WAAW,CAAC,EAAE,aAAa,SAAS,SAAUA,IAAGC,IAAG;AAAE,IAAAD,GAAE,YAAYC;AAAA,EAAG,KAC1E,SAAUD,IAAGC,IAAG;AAAE,aAAS,KAAKA,GAAG,KAAI,OAAO,UAAU,eAAe,KAAKA,IAAG,CAAC,EAAG,CAAAD,GAAE,CAAC,IAAIC,GAAE,CAAC;AAAA,EAAG;AACpG,SAAO,cAAc,GAAG,CAAC;AAC3B;AAEO,SAAS,UAAU,GAAG,GAAG;AAC9B,MAAI,OAAO,MAAM,cAAc,MAAM;AACjC,UAAM,IAAI,UAAU,yBAAyB,OAAO,CAAC,IAAI,+BAA+B;AAC5F,gBAAc,GAAG,CAAC;AAClB,WAAS,KAAK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;AACF;AAEO,IAAM,6BAA0C;EACrD;IACE,GAAG;IACH,YAAY;IACZ,UAAU;EACZ;AACF;AAqBO,IAAM,kCAA+C;EAC1D;IACE,GAAG;IACH,UAAU;IACV,YAAY;EACd;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,UAAU;EACZ;AACF;AC3FO,IAAM,gBAA6B;EACxC;IACE,GAAG;IACH,UAAU;IACV,YAAY;EACd;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,iBAAiB;EACnB;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,iBAAiB;EACnB;AACF;ACjCO,IAAM,qBAAiC;EAC5C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;IACF;EACF;AACF;ACnGO,IAAM,2BAAuC;EAClD;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;AC/EO,IAAM,mBAA+B;EAC1C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;ACpLO,IAAM,2BAAuC;EAClD;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;AC9JO,IAAM,oBAAgC;EAC3C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;ACnEO,IAAM,sBAAkC;EAC7C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;AC3FO,IAAM,4BAAwC;EACnD;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;IACF;EACF;AACF;ACpFO,IAAM,uBAAmC;EAC9C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;IACF;EACF;AACF;ACvGO,IAAM,eAA2B;EACtC;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;ACzEO,IAAM,oBAAgC;EAC3C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EAC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AAO;AAAA,EACT;AAEA,SAAO,iBAAiB;AAAA,IACtB,CAAC,SACC,CAAC,cAAc;AAAA,MACb,CAAC,SACC,KAAK,cAAc,KAAK,aACxB,KAAK,cAAc,KAAK;AAAA,IAC5B;AAAA,EACJ;AACF;AAMO,SAAS,iCACd,eACA,eACqC;AACrC,SAAO,cAAc,IAAI,CAAC,iBAAiB;AAEzC,UAAM,gBACJ,eAAe;AAAA,MACb,CAAC,OACC,GAAG,cAAc,aAAa,SAAS,aACvC,GAAG,cAAc,aAAa,SAAS;AAAA,IAC3C,KAAK;AAEP,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,gBACJ,aAAa,SACb,iBAAiB;AAAA,IACvB;AAAA,EACF,CAAC;AACH;;;ACtDA,OAAO,aAAa;AACpB,OAAOC,gBAAc;AASd,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;","names":["d","b","__assign","InvariantError","invariant","invariant","invariant","OperationTypeNode","DirectiveLocation","Kind","TokenKind","instanceOf","EnumInviteStatus","EnumChatReportReason","EnumChatType","EnumPaymentMethod","EnumFoodFlavor","EnumResourceType","EnumEventType","EnumVendorType","EnumPartnerType","EnumOSPlatform","EnumRelationResource","EnumNotificationResourceType","EnumNotificationType","EnumRegions","EnumUserLicence","EnumUserRole","EnumEventDateStatus","EnumSubscriptionStatus","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","mongoose","MongooseSchema","mongoose","MongooseSchema","mongoose","mongoose","mongoose","MongooseSchema","schema","MongooseSchema","mongoose","MongooseSchema","mongoose","dateTimeSchema","mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","mongoose","MongooseSchema","schema","EnumOSPlatform","mongoose","MongooseSchema","schema","EnumOSPlatform","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","dateTimeSchema","schema","mongoose","MongooseSchema","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","dateTimeSchema","schema","mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","mongoose","mongoose","MongooseSchema","MongooseSchema","mongoose","mongoose","MongooseSchema","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","mongoose","mongoose","mongoose","mongoose","EnumPubSubEvents"]}
1
+ {"version":3,"sources":["../node_modules/@timardex/cluemart-shared/src/enums/index.ts","../node_modules/@timardex/cluemart-shared/src/formFields/vendor/vendor.ts","../node_modules/@timardex/cluemart-shared/src/types/game/dailyClue.ts","../node_modules/@timardex/cluemart-shared/src/utils/date.ts","../node_modules/@timardex/cluemart-shared/src/utils/dailyClueGame.ts","../node_modules/@timardex/cluemart-shared/src/utils/utils.ts","../node_modules/@timardex/cluemart-shared/src/utils/school.ts","../node_modules/@timardex/cluemart-shared/src/formFields/vendor/vendorInfo.ts","../node_modules/@timardex/cluemart-shared/src/formFields/event/event.ts","../node_modules/@timardex/cluemart-shared/src/formFields/event/eventInfo.ts","../node_modules/@timardex/cluemart-shared/src/formFields/global.ts","../node_modules/@timardex/cluemart-shared/src/formFields/auth.ts","../node_modules/@timardex/cluemart-shared/src/formFields/user.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/clothingAndFashion.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/electronicsAndTechnology.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/foodAndBeverages.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/handmadeAndLocalProducts.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/healthAndWellness.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/homeGardenHousehold.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/petProductsAndAnimalGoods.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/serviceAndExperience.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/toysChildren.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/vintageAndAntique.ts","../node_modules/@timardex/cluemart-shared/src/formFields/categories/index.ts","../node_modules/@timardex/cluemart-shared/src/formFields/socialMedia.ts","../node_modules/@timardex/cluemart-shared/src/formFields/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/formFields/partner.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/admin/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/admin.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/event.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/global.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/vendor.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/auth.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/auth.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/chat/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/chat.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/chat.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/chat/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/subscriptions/chat.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/event/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/event.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/user.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/partner.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/event/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/notifications/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/notification.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/notification.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/notifications/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/notifications/hooksSubscription.ts","../node_modules/@timardex/cluemart-shared/src/graphql/subscriptions/notification.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/poster.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/poster.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/pushToken.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/pushToken.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/relation/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/relation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/relation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/relation/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/vendor/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/vendor.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/vendor/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/user/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/user.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/user/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/ad/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/ad.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/ad.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/ad/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/resourceActivities/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/resourceActivities.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/resourceActivities/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/resourceActivities.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/stripe/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/stripe.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/stripe/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/stripe.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/partner/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/partner.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/partner/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/post/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/post.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/post.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/game/dailyClue.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/game/puzzleGame.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/post/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/appSettings/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/appSettings.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/appSettings.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/appSettings/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/game/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/game.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/game/game.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/game/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/school/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/school.ts","../node_modules/@timardex/cluemart-shared/src/graphql/queries/school.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/school/hooksQuery.ts","../node_modules/@timardex/cluemart-shared/src/images/index.ts","../node_modules/@timardex/cluemart-shared/src/sharing/relationShareTypes.ts","../node_modules/@timardex/cluemart-shared/src/sharing/constants.ts","../node_modules/@timardex/cluemart-shared/src/sharing/formatCategoryLabel.ts","../node_modules/@timardex/cluemart-shared/src/sharing/joinShareDescriptionSections.ts","../node_modules/@timardex/cluemart-shared/src/sharing/buildRelationShareDescription.ts","../node_modules/@timardex/cluemart-shared/src/sharing/buildPublicShareDescription.ts","../node_modules/@timardex/cluemart-shared/src/sharing/buildShareUrl.ts","../node_modules/@timardex/cluemart-shared/src/sharing/normalizeShareDescription.ts","../node_modules/@timardex/cluemart-shared/src/sharing/normalizeShareRouteId.ts","../node_modules/@timardex/cluemart-shared/src/storage/index.ts","../node_modules/@timardex/cluemart-shared/src/theme/index.ts","../node_modules/@timardex/cluemart-shared/src/types/auth.ts","../node_modules/@timardex/cluemart-shared/src/types/global.ts","../node_modules/@timardex/cluemart-shared/src/types/ad.ts","../node_modules/@timardex/cluemart-shared/src/types/resourceActivities.ts","../node_modules/@timardex/cluemart-shared/src/types/post.ts","../node_modules/@timardex/cluemart-shared/src/types/game/index.ts","../node_modules/@timardex/cluemart-shared/src/types/game/global.ts","../node_modules/@timardex/cluemart-shared/src/types/subscription.ts","../node_modules/tslib/tslib.es6.mjs","../node_modules/ts-invariant/src/invariant.ts","../node_modules/graphql/jsutils/devAssert.mjs","../node_modules/graphql/jsutils/isObjectLike.mjs","../node_modules/graphql/jsutils/invariant.mjs","../node_modules/graphql/language/location.mjs","../node_modules/graphql/language/printLocation.mjs","../node_modules/graphql/error/GraphQLError.mjs","../node_modules/graphql/error/syntaxError.mjs","../node_modules/graphql/language/ast.mjs","../node_modules/graphql/language/directiveLocation.mjs","../node_modules/graphql/language/kinds.mjs","../node_modules/graphql/language/characterClasses.mjs","../node_modules/graphql/language/blockString.mjs","../node_modules/graphql/language/tokenKind.mjs","../node_modules/graphql/language/lexer.mjs","../node_modules/graphql/jsutils/inspect.mjs","../node_modules/graphql/jsutils/instanceOf.mjs","../node_modules/graphql/language/source.mjs","../node_modules/graphql/language/parser.mjs","../node_modules/graphql-tag/src/index.ts","../node_modules/@apollo/src/core/index.ts","../src/mongoose/Ad.ts","../src/mongoose/chat/Chat.ts","../src/mongoose/chat/ChatReport.ts","../src/mongoose/global.ts","../src/mongoose/Relation.ts","../src/mongoose/event/EventInfo.ts","../src/mongoose/GoogleImportedMarket.ts","../src/mongoose/Notification.ts","../node_modules/@timardex/cluemart-shared/src/enums/index.ts","../src/mongoose/PushToken.ts","../src/mongoose/ResourceActivity.ts","../src/mongoose/User.ts","../src/mongoose/VerificationToken.ts","../src/mongoose/vendor/Vendor.ts","../src/mongoose/vendor/VendorInfo.ts","../src/mongoose/vendor/UnregisteredVendor.ts","../src/mongoose/event/Event.ts","../src/mongoose/Partner.ts","../src/mongoose/Post.ts","../src/mongoose/AppSetting.ts","../src/mongoose/game/Game.ts","../src/mongoose/game/DailyClue.ts","../src/mongoose/game/utils.ts","../src/mongoose/game/PuzzleGame.ts","../src/mongoose/School.ts","../src/service/database.ts","../src/service/saveNotificationsInDb.ts","../src/service/sendPushNotifications.ts","../src/service/updateAdStatus.ts","../src/service/associate.ts","../src/service/vendor.ts","../src/service/objectIdToString.ts","../src/service/event.ts","../src/service/relations.ts","../src/types/index.ts"],"sourcesContent":["export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n}\n\nexport enum EnumChatReportReason {\n INAPPROPRIATE_CONTENT = \"Inappropriate_Content\",\n HARASSMENT_OR_BULLYING = \"Harassment_or_Bullying\",\n HATE_SPEECH = \"Hate_Speech\",\n SPAM_OR_SCAM = \"Spam_or_Scam\",\n VIOLENCE_OR_DANGEROUS_BEHAVIOR = \"Violence_or_Dangerous_Behavior\",\n OTHER = \"Other\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n OTHER = \"Not_Applicable\",\n}\n\nexport enum EnumFoodType {\n ADDITIVE_FREE = \"Additive_Free\",\n AIR_FRIED = \"Air_Fried\",\n ALLERGEN_FRIENDLY = \"Allergen_Friendly\",\n ATHLETE_FRIENDLY = \"Athlete_Friendly\",\n BAKED = \"Baked\",\n DAIRY_FREE = \"Dairy_Free\",\n DIABETIC_FRIENDLY = \"Diabetic_Friendly\",\n EGG_FREE = \"Egg_Free\",\n FRESH = \"Fresh\",\n GLUTEN_FREE = \"Gluten_Free\",\n GRILLED = \"Grilled\",\n HALAL = \"Halal\",\n HEART_HEALTHY = \"Heart_Healthy\",\n HIGH_FIBER = \"High_Fiber\",\n HIGH_PROTEIN = \"High_Protein\",\n KETO = \"Keto\",\n KOSHER = \"Kosher\",\n LACTOSE_FREE = \"Lactose_Free\",\n LOW_CALORIE = \"Low_Calorie\",\n LOW_CARB = \"Low_Carb\",\n LOW_FAT = \"Low_Fat\",\n LOW_SODIUM = \"Low_Sodium\",\n NO_ADDED_SUGAR = \"No_Added_Sugar\",\n NO_PRESERVATIVES = \"No_Preservatives\",\n NON_GMO = \"Non_GMO\",\n NUT_FREE = \"Nut_Free\",\n ORGANIC = \"Organic\",\n PALEO = \"Paleo\",\n PLANT_BASED = \"Plant_Based\",\n RAW = \"Raw\",\n SMOKED = \"Smoked\",\n SOY_FREE = \"Soy_Free\",\n SUGAR_FREE = \"Sugar_Free\",\n VEGAN = \"Vegan\",\n VEGETARIAN = \"Vegetarian\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumEventType {\n MARKET = \"Market\",\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n}\n\nexport enum EnumPartnerType {\n CHARITY_PARTNER = \"Charity_Partner\",\n MEDIA_PARTNER = \"Media_Partner\",\n SUPPORTING_PARTNER = \"Supporting_Partner\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n EVENT_UPDATE_RELATION_TO_VENDOR = \"event_update_relation_to_vendor\",\n VENDOR_UPDATE_RELATION_TO_EVENT = \"vendor_update_relation_to_event\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n ADDED_AS_ASSOCIATE_EVENT = \"added_as_associate_event\",\n ADDED_AS_ASSOCIATE_PARTNER = \"added_as_associate_partner\",\n ADDED_AS_ASSOCIATE_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_PARTNER = \"approved_partner\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_PARTNER = \"created_partner\",\n CREATED_VENDOR = \"created_vendor\",\n DAILY_CLUE_GAME = \"daily_clue_game\",\n DEACTIVATED_EVENT = \"deactivated_event\",\n DEACTIVATED_PARTNER = \"deactivated_partner\",\n DEACTIVATED_VENDOR = \"deactivated_vendor\",\n DECLINED_EVENT = \"declined_event\",\n DECLINED_PARTNER = \"declined_partner\",\n DECLINED_VENDOR = \"declined_vendor\",\n DOWNGRADED_EVENT = \"downgraded_event\",\n DOWNGRADED_PARTNER = \"downgraded_partner\",\n DOWNGRADED_VENDOR = \"downgraded_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n EVENT_UPDATE_RELATION_TO_VENDOR = EnumRelationResource.EVENT_UPDATE_RELATION_TO_VENDOR,\n EXPIRATION_REMINDER_EVENT = \"expiration_reminder_event\",\n EXPIRATION_REMINDER_PARTNER = \"expiration_reminder_partner\",\n EXPIRATION_REMINDER_VENDOR = \"expiration_reminder_vendor\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n NEW_POST_CREATED = \"new_post_created\",\n REGISTERED_USER_BY_SCHOOL_CODE = \"registered_user_by_school_code\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n VENDOR_UPDATE_RELATION_TO_EVENT = EnumRelationResource.VENDOR_UPDATE_RELATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n CHAT = \"chat\",\n EVENT = EnumResourceType.EVENT,\n RELATION = \"relation\",\n SYSTEM = \"system\",\n VENDOR = EnumResourceType.VENDOR,\n}\n\nexport enum EnumRegions {\n All = \"All Regions\",\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n CanterburyWestCoast = \"Canterbury & West Coast\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelsonTasman = \"Marlborough & Nelson & Tasman\",\n Northland = \"Northland\",\n Otago = \"Otago\",\n Southland = \"Southland\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n STANDARD_PARTNER = \"standard_partner\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n CUSTOMER = \"customer\",\n MARKETING = \"marketing\",\n MODERATOR = \"moderator\",\n SUPPORT = \"support\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n\nexport enum EnumEventDateStatus {\n STARTING_SOON = \"Starting_Soon\",\n STARTED = \"Started\",\n TODAY = \"Today\",\n TOMORROW = \"Tomorrow\",\n THIS_WEEK = \"This_Week\",\n NEXT_WEEK = \"Next_Week\",\n UPCOMING = \"Upcoming\",\n ENDED = \"Ended\",\n RE_SCHEDULED = \"Rescheduled\",\n CANCELED = \"Canceled\",\n}\n\nexport enum EnumSubscriptionStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n CANCELLED = \"cancelled\",\n NO_SUBSCRIPTION = \"no_subscription\",\n PAST_DUE = \"past_due\",\n TRIALING = \"trialing\",\n}\n\nexport enum EnumBillingPeriod {\n MONTHLY_CANCEL_ANYTIME = \"monthly_cancel_anytime\",\n YEARLY_ANNUAL_BILLED = \"yearly_annual_billed\",\n YEARLY_MONTHLY_BILLED = \"yearly_monthly_billed\",\n}\n\nexport enum EnumReward {\n MYSTERY_JOY_BOX = \"mystery_joy_box\",\n MYSTERY_SQUEEZE_BOX = \"mystery_squeeze_box\",\n MYSTERY_DELUXE_BOX = \"mystery_deluxe_box\",\n}\n","import { FormDateField, FormField, OptionItem } from \"../../types/global\";\n\nexport const vendorBasicInfoFields: FormField[] = [\n {\n helperText: \"Business Name *\",\n name: \"name\",\n placeholder: \"Business Name\",\n },\n {\n helperText: \"Description *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n];\n\nexport const vendorFullAddress: FormField = {\n helperText: \"Enter address\",\n name: \"fullAddress\",\n placeholder: \"Start typing to find address\",\n};\n\nexport const vendorStartDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"Start Date\",\n name: \"startDate\",\n placeholder: \"Start Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"Start Time\",\n name: \"startTime\",\n placeholder: \"Start Time\",\n },\n];\n\nexport const vendorEndDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"End Date\",\n name: \"endDate\",\n placeholder: \"End Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"End Time\",\n name: \"endTime\",\n placeholder: \"End Time\",\n },\n];\n\nexport const vendorAvailability: FormField[] = [\n {\n name: \"availability.school\",\n placeholder: \"School events\",\n },\n {\n name: \"availability.private\",\n placeholder: \"Private events\",\n },\n {\n name: \"availability.corporate\",\n placeholder: \"Corporate events\",\n },\n];\n\nexport const vendorLocationDescription: FormField = {\n helperText: \"Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n};\n\nexport const vendorMenuFields: FormField[] = [\n {\n helperText: \"Item name\",\n name: \"name\",\n placeholder: \"Item name\",\n },\n {\n helperText: \"Price\",\n keyboardType: \"decimal-pad\",\n name: \"price\",\n placeholder: \"Price\",\n },\n {\n helperText: \"Item Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Item Description\",\n },\n];\n\nexport const productLabelGroups = [\n {\n category: \"Food Sensitivity\",\n items: [\n { abbreviation: \"DF\", fullName: \"Dairy-Free\" },\n { abbreviation: \"EF\", fullName: \"Egg-Free\" },\n { abbreviation: \"GF\", fullName: \"Gluten-Free\" },\n { abbreviation: \"NF\", fullName: \"Nut-Free\" },\n ],\n },\n {\n category: \"Lifestyle\",\n items: [\n { abbreviation: \"KETO\", fullName: \"Keto-Friendly\" },\n { abbreviation: \"P\", fullName: \"Paleo\" },\n { abbreviation: \"V\", fullName: \"Vegan\" },\n { abbreviation: \"VG\", fullName: \"Vegetarian\" },\n { abbreviation: \"KID\", fullName: \"Kid-Friendly\" }, // Gyerekbarát\n { abbreviation: \"PET\", fullName: \"Pet-Friendly Product\" }, // Állatok\n ],\n },\n {\n category: \"Natural\",\n items: [\n { abbreviation: \"ECO\", fullName: \"Eco-Friendly\" },\n { abbreviation: \"ORGANIC\", fullName: \"Organic Product\" },\n { abbreviation: \"NAT\", fullName: \"Natural Product\" }, // Természetesség\n { abbreviation: \"NPF\", fullName: \"Non-Pesticide / Chemical-Free\" },\n { abbreviation: \"PLN\", fullName: \"Plant-Based\" },\n ],\n },\n {\n category: \"Market Character\",\n items: [\n { abbreviation: \"HM\", fullName: \"Handmade\" },\n { abbreviation: \"LOC\", fullName: \"Local Product\" },\n { abbreviation: \"ART\", fullName: \"Artisan\" },\n { abbreviation: \"LTD\", fullName: \"Limited Edition\" },\n ],\n },\n {\n category: \"Cosmetic / Natural\",\n items: [\n { abbreviation: \"AROM\", fullName: \"Aromatherapy\" },\n { abbreviation: \"CRF\", fullName: \"Cruelty-Free\" },\n { abbreviation: \"HYPO\", fullName: \"Hypoallergenic\" },\n { abbreviation: \"BODY\", fullName: \"Body Care\" }, // Testápolás\n ],\n },\n {\n category: \"Wellbeing\",\n items: [\n { abbreviation: \"CARE\", fullName: \"Health Support Product\" }, // Egészség / testi jóllét\n { abbreviation: \"PHYS\", fullName: \"Physical Wellbeing\" }, // Fizikai jóllét\n { abbreviation: \"MENTAL\", fullName: \"Mental Wellbeing\" }, // Mentális jóllét\n { abbreviation: \"RELAX\", fullName: \"Relaxation Product\" }, // Relaxáció / lazítás\n { abbreviation: \"SPIRIT\", fullName: \"Spiritual Wellbeing\" }, // Lelki jóllét\n ],\n },\n {\n category: \"Tech & Digital\",\n items: [\n { abbreviation: \"TECH\", fullName: \"Technology Product\" }, // Technológia\n { abbreviation: \"DIGI\", fullName: \"Digital Technology\" }, // Digitális technológia\n ],\n },\n {\n category: \"Practical & Home\",\n items: [\n { abbreviation: \"PRAC\", fullName: \"Practical Solution\" }, // Praktikum\n { abbreviation: \"HOME\", fullName: \"Home & Living\" }, // Otthon / lakókörnyezet\n ],\n },\n {\n category: \"Sustainability\",\n items: [\n { abbreviation: \"ZWP\", fullName: \"Zero-Waste Product\" },\n { abbreviation: \"SUST\", fullName: \"Sustainable Product\" }, // Fenntarthatóság\n ],\n },\n];\n\nexport const priceUnits: OptionItem[] = [\n { label: \"Piece\", value: \"PIECE\" },\n { label: \"Portion\", value: \"PORTION\" },\n { label: \"Slice\", value: \"SLICE\" },\n { label: \"Cup\", value: \"CUP\" },\n { label: \"Bottle\", value: \"BOTTLE\" },\n { label: \"Can\", value: \"CAN\" },\n { label: \"Jar\", value: \"JAR\" },\n { label: \"Box\", value: \"BOX\" },\n { label: \"Pack\", value: \"PACK\" },\n { label: \"Bag\", value: \"BAG\" },\n { label: \"Bunch\", value: \"BUNCH\" },\n { label: \"Tray\", value: \"TRAY\" },\n { label: \"Punnet\", value: \"PUNNET\" },\n { label: \"Gr\", value: \"GRAM\" },\n { label: \"Kg\", value: \"KILOGRAM\" },\n { label: \"L\", value: \"LITRE\" },\n { label: \"Ml\", value: \"MILLILITRE\" },\n { label: \"Dozen\", value: \"DOZEN\" },\n { label: \"Half dozen\", value: \"HALF_DOZEN\" },\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 your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/activities\",\n },\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/profile/chat\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/edit-profile\",\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: \"/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\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: \"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: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\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] 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","import dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport timezone from \"dayjs/plugin/timezone.js\";\nimport utc from \"dayjs/plugin/utc.js\";\n\nexport const dateFormat = \"DD-MM-YYYY\";\nexport const timeFormat = \"HH:mm\";\n\n// Enable custom format parsing\ndayjs.extend(customParseFormat);\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(isSameOrAfter);\n\nconst NZ_TZ = \"Pacific/Auckland\";\n\nexport function toNZTime(date?: Date | string) {\n return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);\n}\n\n/** Start of the calendar day in Pacific/Auckland (daily games, streaks, etc.). */\nexport function nzStartOfDay(\n input?: Date | string | number | null,\n): dayjs.Dayjs {\n if (input == null) {\n return dayjs().tz(NZ_TZ).startOf(\"day\");\n }\n return dayjs.tz(input, NZ_TZ).startOf(\"day\");\n}\n\ntype DateFormat = \"date\" | \"time\" | \"datetime\";\n\n/**\n * Format a date string to a more readable format.\n * @param dateStr - the date string\n * @param timeStr - optional time string\n * @param display - 'date' | 'time' | 'datetime'\n * @returns formatted string based on display option\n */\nexport const formatDate = (\n dateStr: string,\n display: DateFormat = \"datetime\",\n timeStr?: string,\n) => {\n // Combine date and time into a single string if time is provided\n const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;\n\n // Parse with formats\n const dateTime = timeStr\n ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`)\n : dayjs(dateStr, dateFormat);\n\n // Format parts\n const formattedDate = dateTime.format(\"dddd, D MMMM, YYYY\");\n const formattedTime = dateTime.format(\"h:mm a\");\n\n // Return based on display option\n switch (display) {\n case \"date\":\n return formattedDate;\n case \"time\":\n return formattedTime;\n case \"datetime\":\n return `${formattedDate} at ${formattedTime}`;\n default:\n return formattedDate;\n }\n};\n\nexport const getCurrentAndFutureDates = <\n T extends { startDate: string; startTime: string },\n>(\n dates: T[],\n): T[] => {\n const now = dayjs(); // current date and time\n\n return dates.filter((dateObj) => {\n const dateTime = dayjs(\n `${dateObj.startDate} ${dateObj.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n return dateTime.isSameOrAfter(now);\n });\n};\n\nexport const isFutureDatesBeforeThreshold = (\n date: {\n startDate: string;\n startTime: string;\n },\n minHoursFromNow: number,\n): boolean => {\n const threshold = minHoursFromNow\n ? dayjs().add(minHoursFromNow, \"hour\")\n : dayjs().startOf(\"day\");\n\n const dateTime = dayjs(\n `${date.startDate} ${date.startTime}`,\n `${dateFormat} ${timeFormat}`,\n );\n\n return dateTime.isSameOrAfter(threshold);\n};\n\nexport const formatTimestamp = (timestamp: string) => {\n const formattedDate = toNZTime(timestamp).format(dateFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const isIsoDateString = (value: unknown): value is string => {\n return typeof value === \"string\" && !isNaN(Date.parse(value));\n};\n\n/**\n * Sort an array of date strings by their proximity to the current date.\n * @param dates - The array of date strings to sort.\n * @returns - The sorted array of date strings.\n */\nexport function sortDatesChronologically<\n T extends { startDate: string; startTime: string },\n>(dates: T[]): T[] {\n if (!dates || !dates.length) {\n return [];\n }\n\n return [...dates].sort((a, b) => {\n const dateTimeFormat = `${dateFormat} ${timeFormat}`;\n const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);\n const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);\n return dateA.valueOf() - dateB.valueOf(); // chronological order\n });\n}\n","import type { Dayjs } from \"dayjs\";\n\nimport {\n DailyClueGameData,\n GamePlacement,\n GamePlacementClue,\n gameScreenIdentifierList,\n} from \"../types/game/dailyClue\";\n\nimport { nzStartOfDay } from \"./date\";\n\nfunction createSeededRng(seed: number) {\n let t = seed >>> 0;\n\n return function random() {\n t += 0x6d2b79f5;\n let x = t;\n\n x = Math.imul(x ^ (x >>> 15), x | 1);\n x ^= x + Math.imul(x ^ (x >>> 7), x | 61);\n\n return ((x ^ (x >>> 14)) >>> 0) / 4294967296;\n };\n}\n\nfunction hashStringToNumber(seed: string): number {\n let hash = 2166136261;\n\n for (let i = 0; i < seed.length; i++) {\n hash ^= seed.codePointAt(i) ?? 0;\n hash = Math.imul(hash, 16777619);\n }\n\n return hash >>> 0;\n}\n\n/** Seeded shuffle so all players see the same letter order / placements for a game. */\nexport function seededShuffle<T>(array: readonly T[], seed: string): T[] {\n const rng = createSeededRng(hashStringToNumber(seed));\n const result = [...array];\n\n for (let i = result.length - 1; i > 0; i--) {\n const j = Math.floor(rng() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n\n return result;\n}\n\nfunction getDayIndex(start: Dayjs, today: Dayjs): number {\n return today.diff(start, \"day\");\n}\n\nexport function computeDailyClueState(dailyClue: DailyClueGameData): {\n todaysClue: GamePlacementClue | null;\n todaysLetter: string | null;\n todaysPlacement: GamePlacement | null;\n} | null {\n const { startDate, endDate } = dailyClue.gameFields.gameDate;\n const { solutionShuffled, collected } = dailyClue.letterInfo;\n\n const today = nzStartOfDay();\n const start = nzStartOfDay(startDate);\n const end = nzStartOfDay(endDate);\n\n // Before game starts\n if (today.isBefore(start)) {\n return null;\n }\n\n const shuffledPlacements = seededShuffle(\n gameScreenIdentifierList,\n start.toISOString(),\n );\n\n const index = getDayIndex(start, today);\n\n // After game ends\n if (today.isAfter(end)) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // Safety: index must exist in BOTH arrays\n if (\n index < 0 ||\n index >= solutionShuffled.length ||\n index >= shuffledPlacements.length\n ) {\n return null;\n }\n\n const letterToday = solutionShuffled[index];\n const placement = shuffledPlacements[index];\n\n if (!letterToday || !placement) return null;\n\n const alreadyCollectedToday = (collected ?? []).includes(letterToday);\n\n // Already completed today\n if (alreadyCollectedToday) {\n return {\n todaysClue: null,\n todaysLetter: null,\n todaysPlacement: null,\n };\n }\n\n // Active state\n return {\n todaysClue: placement.clue,\n todaysLetter: letterToday,\n todaysPlacement: placement.id,\n };\n}\n","import {\n EnumInviteStatus,\n EnumPaymentMethod,\n EnumRegions,\n EnumReward,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"src/enums\";\nimport { OptionItem, SocialMediaType } from \"src/types\";\n\nimport { isIsoDateString } from \"./date\";\n\nexport const removeTypename = (obj: any): any => {\n // Preserve Date objects\n if (obj instanceof Date) {\n return obj;\n }\n\n // Preserve File objects (for apollo-upload-client)\n if (obj instanceof File) {\n return obj;\n }\n\n // Preserve ISO date strings\n if (isIsoDateString(obj)) {\n return obj;\n }\n\n // Handle arrays\n if (Array.isArray(obj)) {\n return obj.map(removeTypename);\n }\n\n // Handle plain objects only\n if (obj !== null && typeof obj === \"object\") {\n const { __typename, ...cleanedObj } = obj;\n\n return Object.keys(cleanedObj).reduce((acc: any, key) => {\n acc[key] = removeTypename(cleanedObj[key]);\n return acc;\n }, {});\n }\n\n // Primitives\n return obj;\n};\n\n/**\n * Truncate text to a specified length and append ellipsis if necessary.\n * @param text\n * @param maxLength\n * @returns\n */\nexport const truncateText = (text: string, maxLength: number = 30): string => {\n return text.length > maxLength ? text.substring(0, maxLength) + \"...\" : text;\n};\n\n/**\n * Convert an array of strings to an array of objects with label and value properties.\n * @param items - The array of strings to convert.\n * @returns - The converted array of objects.\n */\nexport const mapArrayToOptions = (items: string[]): OptionItem[] =>\n items.map((item) => ({\n label: item,\n value: item,\n }));\n\nexport const capitalizeFirstLetter = (str: string): string => {\n return str\n .split(\" \")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n};\n\nexport const statusOptions = [\n ...Object.values(EnumInviteStatus)\n .map((status) => ({\n label: status,\n value: status,\n }))\n .sort((a, b) => a.label.localeCompare(b.label)), // Sort the options alphabetically\n];\n\nexport const availableRegionTypes = Object.values(EnumRegions);\nexport const availableRegionOptions: OptionItem[] =\n mapArrayToOptions(availableRegionTypes);\n\nexport const paymentMethodOptions: OptionItem[] = mapArrayToOptions(\n Object.values(EnumPaymentMethod),\n);\n\nexport function normalizeUrl(url: string): string {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n return `https://${url}`;\n }\n return url;\n}\n\nexport const licenseNiceNames: Record<EnumUserLicence, string> = {\n [EnumUserLicence.PRO_EVENT]: \"Pro Event\",\n [EnumUserLicence.PRO_VENDOR]: \"Pro Stallholder\",\n [EnumUserLicence.STANDARD_EVENT]: \"Standard Event\",\n [EnumUserLicence.STANDARD_VENDOR]: \"Standard Stallholder\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"Pro+Ads Event\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"Pro+Ads Stallholder\",\n [EnumUserLicence.STANDARD_PARTNER]: \"Partner\",\n};\n\nexport const cluemartSocialMedia: SocialMediaType[] = [\n {\n link: \"https://www.facebook.com/ClueMartApp\",\n name: EnumSocialMedia.FACEBOOK,\n },\n {\n link: \"https://www.instagram.com/cluemart_app\",\n name: EnumSocialMedia.INSTAGRAM,\n },\n {\n link: \"https://www.tiktok.com/@cluemart\",\n name: EnumSocialMedia.TIKTOK,\n },\n {\n link: \"https://www.youtube.com/@ClueMart-App-NZ\",\n name: EnumSocialMedia.YOUTUBE,\n },\n];\n\nexport const IOS_URL = \"https://apps.apple.com/nz/app/cluemart/id6747251008\";\nexport const ANDROID_URL =\n \"https://play.google.com/store/apps/details?id=com.timardex.cluemart\";\n\nexport const DEFAULT_RESOURCES_RETURN_LIMIT = 1000;\nexport const DEFAULT_RESOURCES_RETURN_OFFSET = 0;\nexport const CLUEMART_MAIN_DOMAIN_URL = \"https://cluemart.co.nz\";\n\nexport const rewardNiceNames: Record<\n EnumReward,\n { name: string; points: number }\n> = {\n [EnumReward.MYSTERY_JOY_BOX]: {\n name: \"Mystery Joy Box\",\n points: 250,\n },\n [EnumReward.MYSTERY_SQUEEZE_BOX]: {\n name: \"Mystery Squeeze Box\",\n points: 350,\n },\n [EnumReward.MYSTERY_DELUXE_BOX]: {\n name: \"Mystery Deluxe Box\",\n points: 500,\n },\n};\n","export const SCHOOL_MIN_STUDENT_COUNT = 300;\nexport const SCHOOL_MAX_STUDENT_COUNT = 0;\n","import { EnumFoodFlavor } from \"src/enums\";\n\nimport { FormField, OptionItem } from \"../../types\";\nimport { mapArrayToOptions } from \"../../utils\";\n\nexport const vendorElectricity: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. amps, voltage, etc.\",\n isTextArea: true,\n name: \"requirements.electricity.details\",\n placeholder: \"Electricity requirements\",\n },\n isRequired: {\n name: \"requirements.electricity.isRequired\",\n placeholder: \"Do you require electricity?\",\n },\n};\n\nexport const vendorGazebo: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. size, etc.\",\n isTextArea: true,\n name: \"requirements.gazebo.details\",\n placeholder: \"Gazebo requirements\",\n },\n isRequired: {\n name: \"requirements.gazebo.isRequired\",\n placeholder: \"Do you require Gazebo?\",\n },\n};\n\nexport const vendorTable: {\n details: FormField;\n isRequired: FormField;\n} = {\n details: {\n helperText: \"Please describe details e.g. size, etc.\",\n isTextArea: true,\n name: \"requirements.table.details\",\n placeholder: \"Table requirements\",\n },\n isRequired: {\n name: \"requirements.table.isRequired\",\n placeholder: \"Do you require Table?\",\n },\n};\n\nexport const vendorPriceRange: {\n max: FormField;\n min: FormField;\n} = {\n max: {\n helperText: \"Product maximum price\",\n name: \"product.priceRange.max\",\n placeholder: \"Maximum price: \",\n },\n min: {\n helperText: \"Product minimum price\",\n name: \"product.priceRange.min\",\n placeholder: \"Minimum price: \",\n },\n};\n\nexport const vendorStallSize: {\n depth: FormField;\n width: FormField;\n} = {\n depth: {\n helperText: \"Stall size in depth\",\n name: \"stallInfo.size.depth\",\n placeholder: \"Stall Depth: \",\n },\n width: {\n helperText: \"Stall size in width\",\n name: \"stallInfo.size.width\",\n placeholder: \"Stall Width: \",\n },\n};\n\nexport const vendorPackaging: FormField = {\n helperText: \"Select packaging type, you can select more than one\",\n name: \"product.packaging\",\n placeholder: \"Packaging type\",\n};\n\nexport const vendorProducedIn: FormField = {\n helperText:\n \"Select where the product is produced, you can select more than one\",\n name: \"product.producedIn\",\n placeholder: \"Produced type\",\n};\n\nexport const vendorFoodFlavour: FormField = {\n helperText: \"You can select more than one food flavour\",\n name: \"product.foodFlavors\",\n placeholder: \"Food flavours\",\n};\n\nexport const vendorCompliance: FormField[] = [\n {\n name: \"compliance.liabilityInsurance\",\n placeholder: \"Liability Insurance\",\n },\n {\n name: \"compliance.foodBeverageLicense\",\n placeholder: \"Food and Beverage License\",\n },\n];\n\nconst packagingTypes = [\n \"Biodegradable\",\n \"Compostable\",\n \"Fabric\",\n \"Glass\",\n \"Other\",\n \"Paper\",\n \"Plastic\",\n \"Recyclable\",\n \"Reusable\",\n \"Single-use\",\n \"Wood\",\n];\n\nconst producedIngTypes = [\n \"Commercial Kitchen\",\n \"Home Premises\",\n \"Factory\",\n \"Farm\",\n \"Other\",\n];\n\nexport const packagingOptions: OptionItem[] = mapArrayToOptions(packagingTypes);\nexport const producedIngOptions: OptionItem[] =\n mapArrayToOptions(producedIngTypes);\nexport const foodFlavourOptions: OptionItem[] = Object.values(\n EnumFoodFlavor,\n).map((flavour) => ({\n label: flavour.replaceAll(\"_\", \" \"),\n value: flavour,\n}));\n","import { FormDateField, FormField, OptionItem } from \"../../types/global\";\n\nexport const eventBasicInfoFields: FormField[] = [\n {\n helperText: \"Name of the Event *\",\n name: \"name\",\n placeholder: \"Name\",\n },\n {\n helperText:\n \"NZBN number (required – ClueMart only accepts events with valid NZBN number) *\",\n keyboardType: \"number-pad\",\n name: \"nzbn\",\n placeholder: \"NZBN number\",\n },\n {\n helperText: \"Name of the Provider (if applicable)\",\n name: \"provider\",\n placeholder: \"Provider\",\n },\n {\n helperText: \"Description of the Event *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n];\n\nexport const eventStartDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"Start Date of the Event *\",\n name: \"startDate\",\n placeholder: \"Start Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"Start Time of the Event *\",\n name: \"startTime\",\n placeholder: \"Start Time\",\n },\n];\n\nexport const eventEndDateFields: FormDateField[] = [\n {\n dateMode: \"date\",\n helperText: \"End Date of the Event *\",\n name: \"endDate\",\n placeholder: \"End Date\",\n },\n {\n dateMode: \"time\",\n helperText: \"End Time of the Event *\",\n name: \"endTime\",\n placeholder: \"End Time\",\n },\n];\n\nexport const availableTagTypes = [\n { icon: \"human-male-female-child\", label: \"All Ages\" },\n { icon: \"weather-sunny\", label: \"Day Market\" },\n { icon: \"account-child\", label: \"Family Friendly\" },\n { icon: \"ticket-percent\", label: \"Free Entry\" },\n { icon: \"home-city\", label: \"Indoor Market\" },\n { icon: \"music\", label: \"Live Music\" },\n { icon: \"bus\", label: \"Near Bustop\" },\n { icon: \"slide\", label: \"Near Playground\" },\n { icon: \"train\", label: \"Near Train Station\" },\n { icon: \"weather-night\", label: \"Night Market\" },\n { icon: \"tree\", label: \"Outdoor Market\" },\n { icon: \"car\", label: \"Parking Available\" },\n { icon: \"dog\", label: \"Pet Friendly\" },\n { icon: \"ship-wheel\", label: \"Port Nearby\" },\n { icon: \"toilet\", label: \"Toilet Available\" },\n { icon: \"wheelchair-accessibility\", label: \"Wheelchair Accessible\" },\n];\n\nexport const tagOptions: OptionItem[] = availableTagTypes.map((tag) => ({\n label: tag.label,\n value: tag.label,\n}));\n","import { RefundPolicy, Requirement, StallType } from \"../../types/event\";\nimport { FormField } from \"../../types/global\";\n\nexport const eventInfo: FormField[] = [\n {\n helperText: \"Application Deadline (hours before event start) *\",\n keyboardType: \"number-pad\",\n name: \"applicationDeadlineHours\",\n placeholder: \"Application Deadline (in hours)\",\n },\n {\n helperText:\n \"Payment Due (hours after application or invitation acceptance) *\",\n keyboardType: \"number-pad\",\n name: \"paymentDueHours\",\n placeholder: \"Payment Due (in hours)\",\n },\n {\n helperText: \"Pack-In Time (hours before event start) *\",\n keyboardType: \"number-pad\",\n name: \"packInTime\",\n placeholder: \"Pack In Time (in hours)\",\n },\n];\n\nexport const eventInfoPaymentInfo: FormField[] = [\n {\n helperText: \"Account holder name *\",\n name: \"accountHolderName\",\n placeholder: \"Account holder name\",\n },\n {\n helperText: \"Account number *\",\n keyboardType: \"number-pad\",\n name: \"accountNumber\",\n placeholder: \"Account number\",\n },\n {\n helperText: \"Payment link, where applicants can pay *\",\n keyboardType: \"url\",\n name: \"link\",\n placeholder: \"Payment link\",\n },\n];\n\nexport const requirementsOptions: Requirement[] = [\n {\n category: \"Environment\",\n label: \"All packaging must be eco-friendly or recyclable where possible.\",\n value: false,\n },\n {\n category: \"Environment\",\n label: \"No single-use plastic bags are to be handed out.\",\n value: false,\n },\n {\n category: \"Environment\",\n label:\n \"Stall area must be left clean with no trace of activity after pack-down.\",\n value: false,\n },\n {\n category: \"Environment\",\n label:\n \"No disposal of oils, fats, or chemicals in public drains or on grassed areas.\",\n value: false,\n },\n {\n category: \"Environment\",\n label:\n \"You must provide bins at your site for rubbish and recycling, and take away all bins including rubbish, to dispose of outside of the town centre.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label:\n \"Food must be prepared and stored according to your food regulation.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label: \"The stallholder must display a current food grade certificate.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label: \"Only licensed food vendors may sell ready-to-eat food items.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label:\n \"Handwashing facilities must be available at your stall if preparing food.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label: \"You must have a food safety plan in place for your stall.\",\n value: false,\n },\n {\n category: \"Food Safety\",\n label:\n \"Allergens must be clearly listed on packaged and unpackaged food items.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"All stallholders must comply with local council regulations.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"No unauthorised subletting of stall space to other vendors.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Gas bottles and fuel containers must be secured and in good condition if applicable.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Fire extinguishers must be available for stalls using cooking or heating equipment.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Stallholders must not sell items that are illegal or prohibited by law.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"All electrical equipment must be tested and tagged.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"Noise levels must be kept to a minimum unless part of a permitted performance.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Pets at the stall must be secured and well-behaved at all times.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Cables must be secured and not create tripping hazards.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Stalls must not obstruct emergency access routes.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"First aid kit must be available at the stall for minor injuries.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label: \"Stallholders must hold valid liability insurance where required.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"You must secure your gazebo and equipment to withstand wind or bad weather.\",\n value: false,\n },\n {\n category: \"Legal & Safety\",\n label:\n \"You are responsible for the safety of your setup and any potential hazards.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"Generators must be quiet and pre-approved by the event organiser.\",\n value: false,\n },\n {\n category: \"Operations\",\n label:\n \"Only approved products or services may be sold — no last-minute changes.\",\n value: false,\n },\n {\n category: \"Operations\",\n label:\n \"Stallholders must arrive and be fully set up by the designated opening time.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"You may not pack down your stall before the event officially ends.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"You must be self-sufficient in all operations.\",\n value: false,\n },\n {\n category: \"Operations\",\n label: \"Stall layout must be kept within your allocated space.\",\n value: false,\n },\n];\n\nconst stallTypes = [\n \"1.8m table only\",\n \"2x2m mini stall\",\n \"3x3m tent site\",\n \"Corner stall\",\n \"Craft stall with power\",\n \"Craft stall without power\",\n \"Double stall (6x3m)\",\n \"Food truck site\",\n \"Food vendor with power\",\n \"Food vendor without power\",\n \"Inside hall stall\",\n \"Non-profit/community stall\",\n \"Outdoor open area\",\n \"Shared table space\",\n \"Wall-based vendor\",\n \"Workshop/seating area\",\n] as const;\n\nexport const stallTypeOptions: StallType[] = stallTypes.map((type) => ({\n label: type,\n price: 0,\n stallCapacity: 0,\n}));\n\nexport const refundPolicyOptions: RefundPolicy[] = [\n {\n category: \"Cancelled by Vendor\",\n label: \"Full refund if cancelled 30+ days before the event.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"50% refund if cancelled 14–29 days before the event.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"No refund if cancelled less than 14 days before the event.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"Full refund if cancelled due to illness or emergency.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"No refund for no-shows or last-minute cancellations.\",\n value: false,\n },\n {\n category: \"Cancelled by Vendor\",\n label: \"No refund\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label: \"Full refund if the event is cancelled by the organiser.\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label: \"Credit towards a future event if cancelled by the organiser.\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label:\n \"Refund only in cases of force majeure (e.g., natural disasters, government restrictions).\",\n value: false,\n },\n {\n category: \"Cancelled by Organiser\",\n label: \"No refund\",\n value: false,\n },\n];\n","import { FormField } from \"src/types/global\";\n\nexport const emailField: FormField = {\n helperText: \"Enter email address\",\n keyboardType: \"email-address\",\n name: \"email\",\n placeholder: \"Email\",\n};\n\nexport const companyContactFields: FormField[] = [\n {\n ...emailField,\n name: \"contactDetails.email\",\n },\n {\n helperText: \"Enter your mobile phone number\",\n keyboardType: \"phone-pad\",\n name: \"contactDetails.mobilePhone\",\n placeholder: \"Mobile Phone Number\",\n },\n {\n helperText: \"Enter your landline phone number\",\n keyboardType: \"phone-pad\",\n name: \"contactDetails.landlinePhone\",\n placeholder: \"Landline Phone Number\",\n },\n];\n","import { FormField } from \"../types/global\";\n\nimport { emailField } from \"./global\";\n\nexport const loginFields: FormField[] = [\n {\n ...emailField,\n required: true,\n },\n {\n helperText: \"Enter password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n required: true,\n secureTextEntry: true,\n },\n];\n\nexport const registerFields: FormField[] = [\n {\n helperText: \"Enter first name\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n required: true,\n },\n {\n helperText: \"Enter last name\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n required: true,\n },\n {\n ...emailField,\n required: true,\n },\n {\n helperText: \"Enter password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n required: true,\n secureTextEntry: true,\n },\n {\n helperText: \"Promotional code (optional)\",\n keyboardType: \"default\",\n name: \"promoCode\",\n placeholder: \"Promotional Code\",\n required: false,\n },\n];\n\nexport const requestPasswordResetFields: FormField[] = [\n {\n ...emailField,\n helperText: \"Enter email address to reset your password\",\n required: true,\n },\n];\n\nexport const resetPasswordFields: FormField[] = [\n {\n helperText: \"Enter your new password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n required: true,\n secureTextEntry: true,\n },\n {\n helperText: \"Confirm your new password\",\n keyboardType: \"default\",\n name: \"confirmPassword\",\n placeholder: \"Confirm Password\",\n required: true,\n secureTextEntry: true,\n },\n];\n\nexport const validateVerificationTokenFields: FormField[] = [\n {\n ...emailField,\n disabled: true,\n helperText: \"Your email address\",\n },\n {\n helperText: \"Enter the Verification code sent to you by email\",\n keyboardType: \"number-pad\",\n name: \"verificationToken\",\n placeholder: \"Verification code\",\n required: true,\n },\n];\n","import { FormField } from \"../types/global\";\n\nimport { emailField } from \"./global\";\n\nexport const profileFields: FormField[] = [\n {\n ...emailField,\n disabled: true,\n helperText: \"Email cannot be changed\",\n },\n {\n helperText: \"Enter first name\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n },\n {\n helperText: \"Enter last name\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n helperText: \"Enter your new password\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n {\n helperText: \"Confirm your new password\",\n keyboardType: \"default\",\n name: \"confirmPassword\",\n placeholder: \"Confirm Password\",\n secureTextEntry: true,\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const clothingAndFashion: Category[] = [\n {\n id: \"clothing-fashion\",\n name: \"Clothing & Fashion\",\n description:\n \"New, handmade, or upcycled clothing and accessories with a creative twist.\",\n subcategories: [\n {\n id: \"apparel-babywear\",\n name: \"Apparel & Babywear\",\n items: [\n {\n id: \"apparel\",\n name: \"Apparel\",\n description: \"Dresses, t-shirts, jumpers, rompers, sets, kidswear.\",\n },\n {\n id: \"baby-toddler-apparel\",\n name: \"Baby & Toddler Apparel\",\n description:\n \"Handmade baby clothes, soft shoes, bibs, hats, knitted sets.\",\n },\n {\n id: \"upcycled-fashion\",\n name: \"Upcycled Fashion\",\n description:\n \"Reworked garments, patchwork pieces, restyled vintage.\",\n },\n {\n id: \"other-wearable-items\",\n name: \"Other wearable items\",\n description: \"Unique clothing not listed above.\",\n },\n ],\n },\n {\n id: \"fashion-accessories\",\n name: \"Fashion Accessories\",\n items: [\n {\n id: \"accessories\",\n name: \"Accessories\",\n description: \"Scarves, belts, gloves, hats, headbands, caps.\",\n },\n {\n id: \"shoes\",\n name: \"Shoes\",\n description: \"Handmade shoes, baby booties, sandals, slippers.\",\n },\n {\n id: \"bags-wallets\",\n name: \"Bags & Wallets\",\n description:\n \"Leather bags, fabric purses, wallets, backpacks, totes.\",\n },\n {\n id: \"other-accessories\",\n name: \"Other accessories\",\n description: \"Brooches, pins, or hybrid functional items.\",\n },\n ],\n },\n {\n id: \"jewelry-creative-wearables\",\n name: \"Jewelry & Creative Wearables\",\n items: [\n {\n id: \"jewelry\",\n name: \"Jewelry\",\n description: \"Necklaces, earrings, bracelets, rings, anklets.\",\n },\n {\n id: \"other-creative-wearables\",\n name: \"Other creative wearables\",\n description:\n \"Wearable art, statement pieces, bold handmade designs.\",\n },\n ],\n },\n {\n id: \"traditional-cultural-clothing-accessories\",\n name: \"Traditional & Cultural Clothing and Accessories\",\n items: [\n {\n id: \"traditional-clothing-accessories\",\n name: \"Traditional Clothing & Accessories \",\n description:\n \"raditional clothing, jewellery, accessories and footwear from around the world, including both handmade and non-handmade items.\",\n },\n {\n id: \"other-traditional-cultural-items\",\n name: \"Other Traditional & Cultural Items\",\n description:\n \"traditional or culturally inspired wearables and decorative cultural pieces such as plates, table linens and similar items.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const electronicsAndTechnology: Category[] = [\n {\n id: \"electronics-technology\",\n name: \"Electronics & Technology\",\n description:\n \"New, second-hand, or handmade tech and digital items commonly found at markets.\",\n subcategories: [\n {\n id: \"mobile-everyday-tech\",\n name: \"Mobile & Everyday Tech\",\n items: [\n {\n id: \"mobile-phone-accessories\",\n name: \"Mobile & Phone Accessories\",\n description:\n \"Phone cases, holders, screen protectors, charging cables, power banks, grips.\",\n },\n {\n id: \"other-mobile-gadgets\",\n name: \"Other mobile gadgets\",\n description:\n \"Stands, styluses, SIM tools, cleaning kits, wallet accessories.\",\n },\n ],\n },\n {\n id: \"audio-music-creative-tech\",\n name: \"Audio, Music & Creative Tech\",\n items: [\n {\n id: \"audio-music-tech\",\n name: \"Audio & Music Tech\",\n description:\n \"Portable speakers, headphones, mini radios, Bluetooth adapters, sound accessories.\",\n },\n {\n id: \"instruments-music-gear\",\n name: \"Instruments & Music Gear\",\n description:\n \"Small electronic instruments, DIY synth kits, drum pads, loop machines.\",\n },\n {\n id: \"recording-creative-devices\",\n name: \"Recording & Creative Devices\",\n description:\n \"USB microphones, podcast tools, voice recorders, mobile lighting, content tools.\",\n },\n {\n id: \"other-audio-music-items\",\n name: \"Other audio or music-related items\",\n description: \"Musical gadgets or creative gear not listed above.\",\n },\n ],\n },\n {\n id: \"diy-gadgets-secondhand-finds\",\n name: \"DIY, Gadgets & Second-Hand Finds\",\n items: [\n {\n id: \"diy-electronics-tools\",\n name: \"DIY Electronics & Tools\",\n description:\n \"LED lights, USB gadgets, circuit boards, repair kits, tech-themed toys, novelty items.\",\n },\n {\n id: \"other-tech-finds\",\n name: \"Other Tech Finds\",\n description:\n \"Used electronics, smart gadgets, wearable tech, calculators, tablet stands, e-waste upcycles.\",\n },\n {\n id: \"other-technology-innovation-items\",\n name: \"Other technology or innovation-related items\",\n description: \"Anything not covered but clearly tech-driven.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const foodAndBeverages: Category[] = [\n {\n id: \"food-beverages\",\n name: \"Food & Beverages\",\n description:\n \"Fresh produce, drinks, sweet and savoury street food, ready-to-eat meals, and packaged goods.\",\n subcategories: [\n {\n id: \"fresh-food-groceries\",\n name: \"Fresh Food & Groceries\",\n items: [\n {\n id: \"fruits-vegetables\",\n name: \"Fruits & Vegetables\",\n description:\n \"Fresh seasonal fruit, organic vegetables, specialty produce, berries, tropical fruit, heritage varieties.\",\n },\n {\n id: \"meat-seafood\",\n name: \"Meat & Seafood\",\n description:\n \"Butcher cuts, fresh fish, smoked meats, sausages, seafood platters, artisanal jerky.\",\n },\n {\n id: \"dairy-eggs\",\n name: \"Dairy & Eggs\",\n description:\n \"Farm eggs, handmade cheeses, yoghurt, fresh milk, goat’s milk products.\",\n },\n {\n id: \"bakery-pastries\",\n name: \"Bakery & Pastries\",\n description:\n \"Freshly baked bread, sourdough, bagels, croissants, focaccia, traditional baked goods.\",\n },\n {\n id: \"spices-condiments\",\n name: \"Spices & Condiments\",\n description:\n \"Dried herbs, spice blends, specialty salts, hot sauces, infused oils, chutneys.\",\n },\n {\n id: \"packaged-specialty-foods\",\n name: \"Packaged & Specialty Foods\",\n description:\n \"Honey, jams, preserves, pickles, nut butters, sauces, pre-packaged snacks.\",\n },\n {\n id: \"other-fresh-food-items\",\n name: \"Other fresh food items\",\n description:\n \"Items that don’t fit above, e.g. fermented foods, plant-based substitutes.\",\n },\n ],\n },\n {\n id: \"beverages-specialty-drinks\",\n name: \"Beverages & Specialty Drinks\",\n items: [\n {\n id: \"fresh-juices-smoothies\",\n name: \"Fresh Juices & Smoothies\",\n description:\n \"Cold-pressed juices, detox blends, fruit smoothies, tropical mixes.\",\n },\n {\n id: \"coffee-teas\",\n name: \"Coffee & Teas\",\n description:\n \"Espresso, pour-over coffee, herbal teas, matcha, bubble tea, locally blended tea.\",\n },\n {\n id: \"dairy-plant-based-drinks\",\n name: \"Dairy & Plant-Based Drinks\",\n description:\n \"Milkshakes, lassis, almond/oat milk drinks, coconut water.\",\n },\n {\n id: \"alcoholic-beverages\",\n name: \"Alcoholic Beverages\",\n description:\n \"Local wines, craft beer, mead, cider, infused spirits, cocktail kits.\",\n },\n {\n id: \"other-beverages\",\n name: \"Other beverages\",\n description:\n \"Kombucha, kefir, energy drinks, non-alcoholic wines or beers.\",\n },\n ],\n },\n {\n id: \"savoury-prepared-foods-street-food\",\n name: \"Savoury Prepared Foods & Street Food\",\n items: [\n {\n id: \"local-specialties\",\n name: \"Local Specialties\",\n description:\n \"Meat pies, hangi, seafood chowder, fry bread, traditional NZ dishes.\",\n },\n {\n id: \"asian-cuisine\",\n name: \"Asian Cuisine\",\n description:\n \"Sushi, bao buns, dumplings, ramen, satay, spring rolls, fried rice.\",\n },\n {\n id: \"mediterranean-cuisine\",\n name: \"Mediterranean Cuisine\",\n description: \"Falafel, hummus wraps, souvlaki, Greek salad, dolma.\",\n },\n {\n id: \"italian-delights\",\n name: \"Italian Delights\",\n description: \"Pizza, calzone, focaccia, fresh pasta, arancini.\",\n },\n {\n id: \"bbq-grilled-foods\",\n name: \"BBQ & Grilled Foods\",\n description: \"Kebabs, grilled chicken, ribs, burgers, sausages.\",\n },\n {\n id: \"savoury-crepes-pancakes\",\n name: \"Savoury Crepes & Pancakes\",\n description: \"Filled savoury crepes, mini savoury pancakes.\",\n },\n {\n id: \"savoury-baked-goods-pastries\",\n name: \"Savoury Baked Goods & Pastries\",\n description:\n \"Quiches, savoury muffins, filled savoury pastries, empanadas.\",\n },\n {\n id: \"vegan-vegetarian-dishes\",\n name: \"Vegan & Vegetarian Dishes\",\n description:\n \"Buddha bowls, plant-based burgers, salads, vegan sushi.\",\n },\n {\n id: \"other-savoury-foods\",\n name: \"Other Savoury Foods\",\n description: \"Fusion dishes, mixed platters, savoury meal kits.\",\n },\n ],\n },\n {\n id: \"sweet-prepared-foods\",\n name: \"Sweet Prepared Foods\",\n items: [\n {\n id: \"sweet-crepes-pancakes-fried-treats\",\n name: \"Sweet Crepes, Pancakes & Fried Treats\",\n description: \"Crepes, waffles, mini pancakes, muffins, doughnuts.\",\n },\n {\n id: \"sweet-baked-goods-desserts\",\n name: \"Sweet Baked Goods & Desserts\",\n description: \"Cakes, pastries, slices, trifles, layered desserts.\",\n },\n {\n id: \"fruit-based-snacks\",\n name: \"Fruit-Based Snacks\",\n description:\n \"Fruit skewers, dried fruit packs, chocolate-dipped fruit.\",\n },\n {\n id: \"candy-confectionery\",\n name: \"Candy & Confectionery\",\n description: \"Fudge, handmade candies, toffee, nougat, brittle.\",\n },\n {\n id: \"other-sweet-foods\",\n name: \"Other Sweet Foods\",\n description: \"Fusion desserts, sweet platters, sweet meal kits.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const handmadeAndLocalProducts: Category[] = [\n {\n id: \"handmade-local-products\",\n name: \"Handmade & Local Products\",\n description: \"Unique, handmade, or locally produced artisan goods.\",\n subcategories: [\n {\n id: \"home-living\",\n name: \"Home & Living\",\n items: [\n {\n id: \"ceramics-pottery\",\n name: \"Ceramics & Pottery\",\n description:\n \"Handmade mugs, vases, bowls, decorative plates, plant pots.\",\n },\n {\n id: \"candles-home-scents\",\n name: \"Candles & Home Scents\",\n description:\n \"Soy candles, beeswax candles, wax melts, incense sticks, room sprays and herbal sachets.\",\n },\n {\n id: \"botanical-crafts\",\n name: \"Botanical Crafts\",\n description: \"Dried-flower décor and pressed-flower crafts\",\n },\n {\n id: \"textiles-embroidery\",\n name: \"Textiles & Embroidery\",\n description:\n \"Handsewn items, embroidered napkins, home linens, aprons, fabric gift wraps, handmade fabric bags, quilted goods, personalized textile gifts.\",\n },\n {\n id: \"woodcraft-metalcraft\",\n name: \"Woodcraft & Metalcraft\",\n description:\n \"Wooden boards, handmade frames, sculptures, metal signs, furniture.\",\n },\n {\n id: \"handmade-soaps-natural-body-goods\",\n name: \"Handmade Soaps & Natural Body Goods\",\n description: \"Handmade soaps, balms, oils, bath items\",\n },\n {\n id: \"seasonal-festive-crafts\",\n name: \"Seasonal & Festive Crafts\",\n description: \"Christmas, Easter and seasonal handmade decor\",\n },\n {\n id: \"other-home-living-products\",\n name: \"Other home & living products\",\n description:\n \"Items that don't fit above but serve home-related purposes.\",\n },\n ],\n },\n {\n id: \"art-personal-expression\",\n name: \"Art & Personal Expression\",\n items: [\n {\n id: \"paintings-illustrations\",\n name: \"Paintings & Illustrations\",\n description:\n \"Paintings, canvas art, hand-drawn illustrations, digital prints, graphic art and calligraphy pieces.\",\n },\n {\n id: \"sculptures-carvings\",\n name: \"Sculptures & Carvings \",\n description:\n \"Sculptures made from wood, stone, metal, clay or resin, carved decorative pieces and artistic 3D works.\",\n },\n {\n id: \"creative-handmade-alternative-art\",\n name: \"Creative Handmade & Alternative Art\",\n description:\n \"Handmade textile décor, fabric ornaments, mixed-media art, creative craft pieces and modern handmade artworks.\",\n },\n {\n id: \"handmade-mini-figures-decor\",\n name: \"Handmade Mini Figures & Décor\",\n description:\n \"Small handmade figures, tiny houses and crafted mini decorative items.\",\n },\n {\n id: \"other-artistic-expressive-products\",\n name: \"Other Artistic or Expressive Products\",\n description:\n \"Custom artworks, specialty handmade décor, unique crafts.\",\n },\n ],\n },\n {\n id: \"handmade-jewellery-accessories-cultural-crafts\",\n name: \"Handmade Jewellery, Accessories & Cultural Crafts\",\n items: [\n {\n id: \"jewellery-handmade-items-nz-traditional-materials\",\n name: \"Jewellery & Handmade Items from NZ Traditional Materials\",\n description:\n \"Handmade jewellery and decorative or functional items crafted from pounamu, bone, wood and other traditional New Zealand materials.\",\n },\n {\n id: \"maori-pasifika-cultural-crafts-clothing\",\n name: \"Māori & Pasifika Cultural Crafts and Clothing\",\n description:\n \"Culturally inspired handmade items, accessories and garments featuring Māori or Pasifika motifs, traditional patterns and regional craftsmanship.\",\n },\n {\n id: \"traditional-handmade-clothing-jewellery-crafts-global-cultures\",\n name: \"Traditional Handmade Clothing, Jewellery & Crafts from Global Cultures\",\n description:\n \"Handcrafted clothing, jewellery and cultural items from diverse traditions — including Asian, African, European, Middle Eastern, Indian, Chinese, Japanese, Pacific, and other culturally significant handmade pieces.\",\n },\n {\n id: \"other-handmade-cultural-items\",\n name: \"Other Handmade Cultural Items\",\n description:\n \"Unique or culturally inspired handmade pieces not specifically covered in the categories above.\",\n },\n ],\n },\n {\n id: \"gift-ideas-accessories\",\n name: \"Gift Ideas & Accessories\",\n items: [\n {\n id: \"handmade-pens-keychains-fridge-magnets\",\n name: \"Handmade Pens, Keychains and Fridge Magnets\",\n description: null,\n },\n {\n id: \"gift-packaging-wrapping-accessories\",\n name: \"Gift Packaging & Wrapping Accessories\",\n description: null,\n },\n {\n id: \"handmade-crochet-knitting-fibre-crafts\",\n name: \"Handmade Crochet, Knitting & Fibre Crafts\",\n description:\n \"Handmade crochet and knitted items, fabric-based crafts, small decorative pieces, creative fibre artworks and unique handcrafted accessories.\",\n },\n {\n id: \"handmade-toys-mini-play-items\",\n name: \"Handmade Toys & Mini Play Items\",\n description:\n \"small handmade toys, soft toys, wooden miniatures, crochet or felt play pieces\",\n },\n {\n id: \"other-small-handmade-gifts-accessories\",\n name: \"Other small handmade gifts or accessories\",\n description: \"Compact creative items made to surprise or delight.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const healthAndWellness: Category[] = [\n {\n id: \"health-wellness\",\n name: \"Health & Wellness\",\n description:\n \"Natural products and services that promote wellbeing, body care, and holistic health.\",\n subcategories: [\n {\n id: \"body-skincare\",\n name: \"Body & Skincare\",\n items: [\n {\n id: \"skincare-body-products\",\n name: \"Skincare & Body Products\",\n description:\n \"Soaps, creams, lip balms, bath salts, bath bombs, body oils, natural deodorants.\",\n },\n {\n id: \"other-body-care-items\",\n name: \"Other body care items\",\n description:\n \"Additional handmade or eco-conscious personal care goods.\",\n },\n ],\n },\n {\n id: \"aromatherapy-herbal-wellness\",\n name: \"Aromatherapy & Herbal Wellness\",\n items: [\n {\n id: \"aromatherapy-herbal-remedies\",\n name: \"Aromatherapy & Herbal Remedies\",\n description:\n \"Essential oils, herbal balms, massage oils, salves, natural teas, rollers.\",\n },\n {\n id: \"other-herbal-aroma-products\",\n name: \"Other herbal or aroma-based products\",\n description: \"Wellness blends, herb sachets, custom infusions.\",\n },\n ],\n },\n {\n id: \"wellness-tools-accessories\",\n name: \"Wellness Tools & Accessories\",\n items: [\n {\n id: \"wellness-accessories\",\n name: \"Wellness Accessories\",\n description:\n \"Yoga mats, meditation cushions, eye pillows, incense, smudging sticks, eco water bottles, wellness journals.\",\n },\n {\n id: \"spiritual-tools-crystals\",\n name: \"Spiritual Tools & Crystals\",\n description:\n \"Healing crystals, gemstone bracelets, pendulums, sprays, spiritual kits, altar decor.\",\n },\n {\n id: \"other-wellness-spiritual-items\",\n name: \"Other wellness or spiritual items\",\n description: \"Items that aid relaxation, focus, or inner work.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const homeGardenHousehold: Category[] = [\n {\n id: \"home-garden-household-goods\",\n name: \"Home, Garden & Household Goods\",\n description:\n \"Functional, decorative, and eco-conscious products designed for everyday use indoors and outdoors.\",\n subcategories: [\n {\n id: \"home-decor-living\",\n name: \"Home Decor & Living\",\n items: [\n {\n id: \"home-decor\",\n name: \"Home Decor\",\n description:\n \"Cushions, wall art, table runners, vases, trays, mirrors, handmade centerpieces.\",\n },\n {\n id: \"kitchenware-dining\",\n name: \"Kitchenware & Dining\",\n description:\n \"Mugs, bowls, cutting boards, utensils, jars, coasters, kitchen textiles.\",\n },\n {\n id: \"mini-figures-decor\",\n name: \"Mini Figures & Décor\",\n description:\n \"handmade or non-handmade small figures, tiny houses and miniature decorative items.\",\n },\n {\n id: \"other-indoor-home-items\",\n name: \"Other indoor home items\",\n description:\n \"Any decorative or practical household items not listed above.\",\n },\n ],\n },\n {\n id: \"cleaning-eco-essentials\",\n name: \"Cleaning & Eco Essentials\",\n items: [\n {\n id: \"cleaning-eco-supplies\",\n name: \"Cleaning & Eco Supplies\",\n description:\n \"Beeswax wraps, reusable cloths, brushes, natural soaps, detergent bars, eco sponges.\",\n },\n {\n id: \"other-eco-cleaning-items\",\n name: \"Other eco or cleaning items\",\n description: \"Environmentally friendly goods not listed above.\",\n },\n ],\n },\n {\n id: \"garden-outdoor-living\",\n name: \"Garden & Outdoor Living\",\n items: [\n {\n id: \"plants-botanical-decor\",\n name: \"Plants & Botanical Decor\",\n description:\n \"Potted herbs, succulents, dried flowers, terrariums, plant-based ornaments.\",\n },\n {\n id: \"fresh-flowers-botanical-bouquets\",\n name: \"Fresh Flowers & Botanical Bouquets\",\n description:\n \"Cut flowers, seasonal bouquets, simple floral arrangements, native flower selections, and other fresh botanical items.\",\n },\n {\n id: \"natural-decor-nature-inspired-elements\",\n name: \"Natural Decor & Nature-Inspired Elements\",\n description:\n \"Seashell décor, driftwood pieces, sand ornaments, natural wood accents, stone or mineral decorations, and other nature-based decorative items.\",\n },\n {\n id: \"garden-tools-outdoor-items\",\n name: \"Garden Tools & Outdoor Items\",\n description:\n \"Plant markers, garden signs, stakes, small tools, wind chimes, gifts.\",\n },\n {\n id: \"other-outdoor-garden-products\",\n name: \"Other outdoor or garden products\",\n description: \"Functional or decorative items for outside use.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const petProductsAndAnimalGoods: Category[] = [\n {\n id: \"pet-products-animal-goods\",\n name: \"Pet Products & Animal Goods\",\n description: \"Items for pets, pet lovers, or animal-themed market stalls.\",\n subcategories: [\n {\n id: \"products-for-pets\",\n name: \"Products for Pets\",\n items: [\n {\n id: \"pet-food-treats\",\n name: \"Pet Food & Treats\",\n description:\n \"Homemade dog biscuits, cat snacks, natural chews, pet-safe cakes, training treats.\",\n },\n {\n id: \"apparel-toys-accessories\",\n name: \"Apparel, Toys & Accessories\",\n description:\n \"Leashes, collars, harnesses, toys, grooming tools, beds, travel gear, jumpers, bandanas.\",\n },\n {\n id: \"other-pet-products\",\n name: \"Other pet products\",\n description: \"Any pet-related items not listed above.\",\n },\n ],\n },\n {\n id: \"small-pets-birds-exotic-animals\",\n name: \"Small Pets, Birds & Exotic Animals\",\n items: [\n {\n id: \"products-small-pets-birds-exotics\",\n name: \"Products for Small Pets, Birds & Exotics\",\n description:\n \"Toys, enclosures, perches, feeding bowls, bedding, habitat decor, transport gear, and care items for birds, rabbits, hamsters, reptiles, turtles, aquarium pets, and other exotic species.\",\n },\n {\n id: \"other-small-exotic-animal-items\",\n name: \"Other small or exotic animal items\",\n description: \"Unusual accessories for non-mainstream pets.\",\n },\n ],\n },\n {\n id: \"farm-working-animals\",\n name: \"Farm & Working Animals\",\n items: [\n {\n id: \"goods-for-farm-working-animals\",\n name: \"Goods for Farm & Working Animals\",\n description:\n \"Treats, care products, equipment, signage and accessories for chickens, goats, alpacas, horses, and other livestock.\",\n },\n {\n id: \"other-farm-animal-items\",\n name: \"Other farm animal-related items\",\n description:\n \"Rural, barnyard, or utility-specific gear not listed above.\",\n },\n ],\n },\n {\n id: \"animal-themed-gifts-custom-items\",\n name: \"Animal-Themed Gifts & Custom Items\",\n items: [\n {\n id: \"pet-art-custom-gifts\",\n name: \"Pet Art & Custom Gifts\",\n description:\n \"Pet portraits, name tags, personalized bowls, breed-specific items, pet-themed home decor and stationery.\",\n },\n {\n id: \"other-animal-themed-gifts\",\n name: \"Other animal-themed gifts\",\n description:\n \"Artistic or sentimental items made for animal lovers.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"src/types\";\n\n/* eslint-disable sort-keys */\nexport const serviceAndExperience: Category[] = [\n {\n id: \"services-experiences\",\n name: \"Services & Experiences\",\n description:\n \"On-site offerings that provide entertainment, personal care, learning, or interactive activities beyond products.\",\n subcategories: [\n {\n id: \"personal-care-body-art\",\n name: \"Personal Care & Body Art\",\n items: [\n {\n id: \"nails-handcare\",\n name: \"Nails & Handcare\",\n description:\n \"Nail painting, decoration, quick manicures, temporary nail extensions.\",\n },\n {\n id: \"hair-styling-braiding\",\n name: \"Hair Styling & Braiding\",\n description:\n \"Hair braiding, plaits, child-friendly festival hairstyles.\",\n },\n {\n id: \"face-body-decoration\",\n name: \"Face & Body Decoration\",\n description:\n \"Henna, glitter tattoos, face painting, light makeup, eyelash styling, professional tattooing (where permitted).\",\n },\n {\n id: \"other-beauty-grooming-services\",\n name: \"Other beauty or grooming services\",\n description: \"Small-scale personal care options offered on-site.\",\n },\n ],\n },\n {\n id: \"practical-wellness-services\",\n name: \"Practical & Wellness Services\",\n items: [\n {\n id: \"mobile-practical-services\",\n name: \"Mobile & Practical Services\",\n description:\n \"Shoe repair, phone repairs, knife sharpening, key cutting, battery replacement, bike repairs, engraving.\",\n },\n {\n id: \"wellness-alternative-therapies\",\n name: \"Wellness & Alternative Therapies\",\n description:\n \"Massage, aromatherapy, reflexology, energy healing (e.g. Reiki), natural consultations.\",\n },\n {\n id: \"other-service-based-offerings\",\n name: \"Other service-based offerings\",\n description: \"Wellness or functional services not listed above.\",\n },\n ],\n },\n {\n id: \"creative-educational-experiences\",\n name: \"Creative & Educational Experiences\",\n items: [\n {\n id: \"creative-workshops-maker-services\",\n name: \"Creative Workshops & Maker Services\",\n description:\n \"Candle making, pottery, jewelry crafting, soap or balm workshops, calligraphy, seasonal crafts.\",\n },\n {\n id: \"education-awareness-stalls\",\n name: \"Education & Awareness Stalls\",\n description:\n \"Eco awareness, cultural storytelling, local history, first aid demos, health booths, sustainability education, kids’ science displays.\",\n },\n {\n id: \"other-creative-educational-services\",\n name: \"Other creative or educational services\",\n description:\n \"Informal learning, demonstrations, or community-focused sessions.\",\n },\n ],\n },\n {\n id: \"kids-activities-family-fun\",\n name: \"Kids’ Activities & Family Fun\",\n items: [\n {\n id: \"kids-activities-fun\",\n name: \"Kids’ Activities & Fun\",\n description:\n \"Face painting, glitter tattoos, pony rides, bouncy castles, small amusement rides, balloon twisting, animal petting zones.\",\n },\n {\n id: \"other-family-oriented-activities\",\n name: \"Other family-oriented activities\",\n description:\n \"On-site entertainment that engages children or family groups.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"src/types\";\n\n/* eslint-disable sort-keys */\nexport const toysChildren: Category[] = [\n {\n id: \"toys-childrens-items\",\n name: \"Toys & Children’s Items\",\n description: \"Products and services made for or inspired by children.\",\n subcategories: [\n {\n id: \"toys-playthings\",\n name: \"Toys & Playthings\",\n items: [\n {\n id: \"toys-classic-electric-character\",\n name: \"Toys – Classic, Electric & Character-Based\",\n description:\n \"Building blocks, dolls, puzzles, plush animals, toy vehicles, remote-control toys, light-up gadgets, character figurines, themed playsets.\",\n },\n {\n id: \"handmade-toys-crafty-playthings\",\n name: \"Handmade Toys & Crafty Playthings\",\n description:\n \"Wooden puzzles, crocheted animals, felt toys, fabric dolls, DIY kits, nature-inspired games, sensory toys.\",\n },\n {\n id: \"other-play-items\",\n name: \"Other play items\",\n description:\n \"Toys not listed above, including limited-edition or hybrid items.\",\n },\n ],\n },\n {\n id: \"educational-developmental\",\n name: \"Educational & Developmental\",\n items: [\n {\n id: \"educational-developmental-tools\",\n name: \"Educational & Developmental Tools\",\n description:\n \"STEM kits, Montessori toys, storybooks, picture books, flashcards, early learning games, language tools.\",\n },\n {\n id: \"other-educational-experience-based-items\",\n name: \"Other educational or experience-based items\",\n description:\n \"Creative experiences or learning aids not listed above.\",\n },\n ],\n },\n {\n id: \"baby-kidswear-accessories\",\n name: \"Baby & Kidswear + Accessories\",\n items: [\n {\n id: \"baby-kidswear-accessories\",\n name: \"Baby & Kidswear + Accessories\",\n description:\n \"Handmade baby clothes, toddler outfits, bibs, hats, headbands, bags, pacifier clips, soft shoes.\",\n },\n {\n id: \"baby-developmental-soft-toys\",\n name: \"Baby Developmental Soft Toys\",\n description:\n \"Sensory toys, rattles, fabric books, teething items, high-contrast cards, and early-skill. Montessori materials designed to support infants’ cognitive and motor development.\",\n },\n {\n id: \"other-childrens-clothing-accessories\",\n name: \"Other children’s clothing or accessories\",\n description: \"Unique fashion or functional pieces for kids.\",\n },\n ],\n },\n ],\n },\n];\n","/* eslint-disable sort-keys */\nimport { Category } from \"src/types\";\n\nexport const vintageAndAntique: Category[] = [\n {\n id: \"vintage-antique\",\n name: \"Vintage & Antique\",\n description:\n \"Unique, historic, or nostalgic items with collectible or decorative value.\",\n subcategories: [\n {\n id: \"vintage-antique-clothing-accessories\",\n name: \"Vintage & Antique Clothing & Accessories\",\n items: [\n {\n id: \"clothing-vintage-fashion\",\n name: \"Clothing and wearable items from past eras\",\n description:\n \"Vintage dresses, jackets, hats, gloves, belts, bags, shoes, jewellery.\",\n },\n {\n id: \"other-clothing-accessory-items\",\n name: \"Other clothing-related items\",\n description:\n \"Hair clips, brooches, pins, scarf rings, small fashion accessories.\",\n },\n ],\n },\n {\n id: \"collectibles-memorabilia\",\n name: \"Collectibles & Memorabilia\",\n items: [\n {\n id: \"small-collectible-items\",\n name: \"Small collectible items with historical or nostalgic significance\",\n description:\n \"Coins, stamps, toys, postcards, comics, sports cards, vintage packaging.\",\n },\n {\n id: \"other-collectible-items\",\n name: \"Other collectible items\",\n description:\n \"Rare small objects, miniature figurines, special-edition items.\",\n },\n ],\n },\n {\n id: \"homewares-decor-curiosities\",\n name: \"Homewares, Decor & Curiosities\",\n items: [\n {\n id: \"decorative-functional-vintage-items\",\n name: \"Decorative or functional items with a vintage or antique aesthetic\",\n description:\n \"Teacups, plates, vases, mirrors, clocks, furniture, old tools, lanterns, typewriters, curiosities.\",\n },\n {\n id: \"handmade-vintage-art\",\n name: \"Handmade vintage art\",\n description: \"Paintings, sculptures, crafted pieces.\",\n },\n {\n id: \"other-home-decor-items\",\n name: \"Other home or decor items\",\n description:\n \"Decorative pieces not listed above, unique household objects.\",\n },\n ],\n },\n {\n id: \"vintage-media-printed-nostalgia\",\n name: \"Vintage Media & Printed Nostalgia\",\n items: [\n {\n id: \"older-media-printed-works\",\n name: \"Older media formats and printed works\",\n description:\n \"Vinyl records, cassette tapes, CDs, DVDs, books, magazines, board games, posters.\",\n },\n {\n id: \"other-media-printed-items\",\n name: \"Other media or printed items\",\n description: \"Maps, manuals, leaflets, out-of-print materials.\",\n },\n ],\n },\n {\n id: \"other-vintage-antique-items\",\n name: \"Other Vintage & Antique Items\",\n items: [\n {\n id: \"any-vintage-antique-items-not-listed\",\n name: \"Any vintage or antique items not listed above\",\n description: \"Unique, rare or uncategorised pieces.\",\n },\n ],\n },\n ],\n },\n];\n","import { Category } from \"../../types/global\";\n\nimport { clothingAndFashion } from \"./clothingAndFashion\";\nimport { electronicsAndTechnology } from \"./electronicsAndTechnology\";\nimport { foodAndBeverages } from \"./foodAndBeverages\";\nimport { handmadeAndLocalProducts } from \"./handmadeAndLocalProducts\";\nimport { healthAndWellness } from \"./healthAndWellness\";\nimport { homeGardenHousehold } from \"./homeGardenHousehold\";\nimport { petProductsAndAnimalGoods } from \"./petProductsAndAnimalGoods\";\nimport { serviceAndExperience } from \"./serviceAndExperience\";\nimport { toysChildren } from \"./toysChildren\";\nimport { vintageAndAntique } from \"./vintageAndAntique\";\n\nexport const categoryColors: Record<string, string> = {\n \"clothing-fashion\": \"#9D4EDD\",\n \"electronics-technology\": \"#3AF3FF\",\n \"food-beverages\": \"#FF0D1F\",\n \"handmade-local-products\": \"#EE7E54\",\n \"health-wellness\": \"#E23794\",\n \"home-garden-household-goods\": \"#067325\",\n \"pet-products-animal-goods\": \"#68E788\",\n \"services-experiences\": \"#2E16A5\",\n \"toys-childrens-items\": \"#FFF966\",\n \"vintage-antique\": \"#8D6748\",\n};\n\nconst assignColorToCategories = (categories: Category[]): Category[] => {\n const result = categories.map((category) => ({\n ...category,\n color: categoryColors[category.id],\n }));\n return result;\n};\n\nexport const availableCategories = assignColorToCategories([\n ...foodAndBeverages,\n ...handmadeAndLocalProducts,\n ...clothingAndFashion,\n ...homeGardenHousehold,\n ...toysChildren,\n ...healthAndWellness,\n ...electronicsAndTechnology,\n ...vintageAndAntique,\n ...petProductsAndAnimalGoods,\n ...serviceAndExperience,\n]);\n","import { FormField } from \"../types/global\";\n\nconst socialMedia = [\n {\n key: \"facebook\",\n name: \"Facebook\",\n placeholder: \"https://www.facebook.com/your-page\",\n },\n {\n key: \"instagram\",\n name: \"Instagram\",\n placeholder: \"https://www.instagram.com/your-profile\",\n },\n {\n key: \"tiktok\",\n name: \"TikTok\",\n placeholder: \"https://www.tiktok.com/@your-profile\",\n },\n {\n key: \"twitter\",\n name: \"Twitter\",\n placeholder: \"https://twitter.com/your-profile\",\n },\n {\n key: \"website\",\n name: \"Website\",\n placeholder: \"https://www.yourwebsite.com\",\n },\n {\n key: \"youtube\",\n name: \"YouTube\",\n placeholder: \"https://www.youtube.com/channel/your-channel\",\n },\n];\nexport const socialMediaFields: FormField[] = socialMedia.map((link) => ({\n helperText: link.name,\n keyboardType: \"url\",\n name: link.key,\n placeholder: link.placeholder,\n}));\n","import { FormField } from \"src/types\";\n\nimport { emailField } from \"./global\";\n\nexport const contactUsFields: FormField[] = [\n {\n helperText: \"Enter first name *\",\n keyboardType: \"default\",\n name: \"firstName\",\n placeholder: \"First Name\",\n },\n {\n helperText: \"Enter last name *\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n ...emailField,\n helperText: \"Enter email address *\",\n },\n {\n helperText: \"Enter your message *\",\n isTextArea: true,\n keyboardType: \"default\",\n name: \"message\",\n placeholder: \"Message\",\n },\n];\n","import { FormField } from \"../types/global\";\n\nexport const partnerBasicInfoFields: FormField[] = [\n {\n helperText: \"Business Name *\",\n name: \"name\",\n placeholder: \"Business Name\",\n },\n {\n helperText:\n \"NZBN number (required – ClueMart only accepts partners with valid NZBN number) *\",\n keyboardType: \"number-pad\",\n name: \"nzbn\",\n placeholder: \"NZBN number\",\n },\n {\n helperText: \"Description *\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Description\",\n },\n];\n","import { useMutation } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport {\n ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION,\n ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION,\n ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,\n} from \"src/graphql/mutations/admin\";\nimport { GET_EVENT } from \"src/graphql/queries/event\";\nimport { GET_VENDOR } from \"src/graphql/queries/vendor\";\n\nexport const useAdminUpdateResourceType = () => {\n const [adminUpdateResourceType, { loading, error }] = useMutation<{\n adminUpdateResourceType: {\n resourceId: string;\n resourceType: EnumResourceType;\n };\n }>(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract resourceId and resourceType from the mutation response\n const adminUpdateResourceType =\n mutationResult?.data?.adminUpdateResourceType;\n const resourceId = adminUpdateResourceType?.resourceId;\n const resourceType = adminUpdateResourceType?.resourceType;\n\n if (!resourceId) return [];\n\n const detectQuery =\n resourceType === EnumResourceType.EVENT ? GET_EVENT : GET_VENDOR;\n\n return [\n {\n query: detectQuery,\n variables: { _id: resourceId },\n },\n ];\n },\n });\n\n return {\n adminUpdateResourceType,\n error,\n loading,\n };\n};\n\nexport const useAdminResendUserVerificationEmail = () => {\n const [adminResendUserVerificationEmail, { loading, error }] = useMutation(\n ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION,\n );\n\n return {\n adminResendUserVerificationEmail,\n error,\n loading,\n };\n};\n\nexport const useAdminPermanentlyDeleteResource = () => {\n const [adminPermanentlyDeleteResource, { loading, error }] = useMutation(\n ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION,\n );\n\n return {\n adminPermanentlyDeleteResource,\n error,\n loading,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = gql`\n mutation adminUpdateResourceType($input: AdminUpdateResourceInputType!) {\n adminUpdateResourceType(input: $input) {\n active\n resourceId\n resourceType\n }\n }\n`;\n\nexport const ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = gql`\n mutation adminResendUserVerificationEmail($userId: ID!) {\n adminResendUserVerificationEmail(userId: $userId)\n }\n`;\n\nexport const ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = gql`\n mutation adminPermanentlyDeleteResource(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n adminPermanentlyDeleteResource(\n resourceId: $resourceId\n resourceType: $resourceType\n )\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n DATETIME_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n ASSOCIATES_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n RELATION_DATES_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n STALL_TYPE_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n EVENT_LIST_ITEM,\n} from \"./global\";\n\nexport const EVENT_INFO = gql`\n fragment EventInfoFields on EventInfoType {\n _id\n applicationDeadlineHours\n dateTime {\n dateStatus\n endDate\n endTime\n stallTypes {\n ...StallTypeFields\n }\n startDate\n startTime\n }\n eventId\n packInTime\n paymentDueHours\n paymentInfo {\n accountHolderName\n accountNumber\n link\n paymentMethod\n }\n refundPolicy {\n category\n label\n value\n }\n requirements {\n category\n label\n value\n }\n }\n ${STALL_TYPE_FIELDS_FRAGMENT}\n`;\n\nexport const EVENT = gql`\n fragment EventFields on EventType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n adIds\n cover {\n ...ResourceImageFields\n }\n claimed\n createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n dateTime {\n ...DateTimeFields\n }\n description\n deletedAt\n googlePlaceId\n images {\n ...ResourceImageFields\n }\n eventType\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n eventInfoId\n name\n nzbn\n owner {\n ...OwnerFields\n }\n promoCodes\n provider\n posterUsage {\n ...PosterUsageFields\n }\n region\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n rating\n reviewCount\n rainOrShine\n socialMedia {\n ...SocialMediaFields\n }\n tags\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n\nexport const GET_EVENTS = gql`\n query getEvents {\n events {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENT = gql`\n query getEvent($_id: ID!) {\n event(_id: $_id) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const GET_EVENT_BY_PLACE_ID = gql`\n query getEventByPlaceId($googlePlaceId: String!) {\n eventByPlaceId(googlePlaceId: $googlePlaceId) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENTS_BY_REGION = gql`\n query getEventsByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n eventsByRegion(region: $region, options: $options) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const SEARCH_EVENTS = gql`\n query searchEvents($region: String, $search: String, $tags: [String]) {\n eventsSearch(region: $region, search: $search, tags: $tags) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENTS_NEAR_ME = gql`\n query getEventsNearMe($latitude: Float!, $longitude: Float!, $radius: Int) {\n eventsNearMe(latitude: $latitude, longitude: $longitude, radius: $radius) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENT_INFO = gql`\n query getEventInfo($eventId: ID!) {\n eventInfo(eventId: $eventId) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const POSTER_USAGE_FIELDS_FRAGMENT = gql`\n fragment PosterUsageFields on PosterUsageType {\n month\n count\n }\n`;\n\nexport const SOCIAL_MEDIA_FIELDS_FRAGMENT = gql`\n fragment SocialMediaFields on SocialMediaType {\n name\n link\n }\n`;\n\nexport const RESOURCE_IMAGE_FIELDS_FRAGMENT = gql`\n fragment ResourceImageFields on ResourceImageType {\n active\n source\n title\n }\n`;\n\nexport const OWNER_FIELDS_FRAGMENT = gql`\n fragment OwnerFields on OwnerType {\n email\n userId\n }\n`;\n\nexport const CATEGORY_FIELDS_FRAGMENT = gql`\n fragment CategoryFields on CategoryType {\n id\n name\n subcategories {\n id\n items {\n id\n name\n }\n name\n }\n }\n`;\n\nexport const LICENCE_FIELDS_FRAGMENT = gql`\n fragment LicenceFields on UserLicenceType {\n expiryDate\n issuedDate\n licenceType\n prevLicenceType\n }\n`;\n\nexport const ASSOCIATES_FIELDS_FRAGMENT = gql`\n fragment AssociatesFields on AssociateType {\n email\n resourceId\n resourceType\n licence {\n ...LicenceFields\n }\n }\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n\nexport const TERMS_AGREEMENT_FIELDS_FRAGMENT = gql`\n fragment TermsAgreementFields on TermsAgreementType {\n appBuildNumber\n appId\n appVersion\n brand\n deviceName\n installationId\n manufacturer\n modelName\n osName\n osVersion\n termVersion\n timestamp\n }\n`;\n\nexport const DATETIME_FIELDS_FRAGMENT = gql`\n fragment DateTimeFields on DateTimeType {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n }\n`;\n\nexport const LOCATION_GEO_FIELDS_FRAGMENT = gql`\n fragment LocationGeoFields on LocationGeoType {\n coordinates\n type\n }\n`;\n\nexport const LOCATION_FIELDS_FRAGMENT = gql`\n fragment LocationFields on LocationType {\n city\n country\n fullAddress\n geo {\n ...LocationGeoFields\n }\n latitude\n longitude\n region\n }\n ${LOCATION_GEO_FIELDS_FRAGMENT}\n`;\n\nconst USER_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment UserActivityFields on UserActivityType {\n favourites {\n events\n partners\n vendors\n }\n going {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n interested {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n present {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n }\n ${DATETIME_FIELDS_FRAGMENT}\n`;\n\nexport const REDEEMED_REWARD_FIELDS_FRAGMENT = gql`\n fragment RedeemedRewardFields on RedeemedRewardType {\n name\n pointsUsed\n redeemedAt\n }\n`;\n\nexport const USER_FIELDS_FRAGMENT = gql`\n fragment UserFields on UserType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n avatar {\n ...ResourceImageFields\n }\n createdAt\n deletedAt\n email\n events\n firstName\n game\n isTester\n lastName\n licences {\n ...LicenceFields\n }\n location {\n ...LocationFields\n }\n partner\n overallPoints\n platform\n preferredRegion\n promoCodes\n role\n redeemedRewards {\n ...RedeemedRewardFields\n }\n school\n termsAgreement {\n ...TermsAgreementFields\n }\n userActivity {\n ...UserActivityFields\n }\n vendor\n updatedAt\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${USER_ACTIVITY_FIELDS_FRAGMENT}\n ${LICENCE_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${REDEEMED_REWARD_FIELDS_FRAGMENT}\n`;\n\nexport const STALL_TYPE_FIELDS_FRAGMENT = gql`\n fragment StallTypeFields on StallTypeType {\n label\n price\n stallCapacity\n }\n`;\n\nexport const RELATION_DATES_FRAGMENT = gql`\n fragment RelationDates on RelationDateType {\n dateTime {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n stallType {\n ...StallTypeFields\n }\n }\n lastUpdateBy {\n resourceId\n userEmail\n }\n paymentReference\n status\n }\n ${STALL_TYPE_FIELDS_FRAGMENT}\n`;\n\nexport const CONTACT_DETAILS_FIELDS_FRAGMENT = gql`\n fragment ContactDetailsFields on ContactDetailsType {\n email\n landlinePhone\n mobilePhone\n }\n`;\n\nexport const EVENT_LIST_ITEM = gql`\n fragment EventListItemFields on EventListItemType {\n _id\n active\n claimed\n cover {\n ...ResourceImageFields\n }\n createdAt\n dateTime {\n ...DateTimeFields\n }\n deletedAt\n description\n eventType\n googlePlaceId\n images {\n ...ResourceImageFields\n }\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n rainOrShine\n rating\n region\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n reviewCount\n updatedAt\n }\n ${DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n OWNER_FIELDS_FRAGMENT,\n CATEGORY_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n RELATION_DATES_FRAGMENT,\n ASSOCIATES_FIELDS_FRAGMENT,\n DATETIME_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n} from \"./global\";\n\nconst VENDOR_DATETIME_FIELDS_FRAGMENT = gql`\n fragment VendorDateTimeFields on VendorDateTimeType {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n }\n`;\n\nconst VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = gql`\n fragment VendorProductListFields on VendorProductListType {\n description\n name\n price\n priceUnit\n productGroups\n }\n`;\n\nexport const VENDOR = gql`\n fragment VendorFields on VendorType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n adIds\n availability {\n corporate\n private\n school\n }\n vendorInfoId\n categories {\n ...CategoryFields\n }\n calendar {\n active\n calendarData {\n dateTime {\n ...VendorDateTimeFields\n }\n description\n location {\n ...LocationFields\n }\n }\n }\n contactDetails {\n ...ContactDetailsFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n claimed\n description\n deletedAt\n foodTruck\n images {\n ...ResourceImageFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n owner {\n ...OwnerFields\n }\n products {\n active\n productsList {\n ...VendorProductListFields\n }\n }\n promoCodes\n posterUsage {\n ...PosterUsageFields\n }\n rating\n region\n reviewCount\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n socialMedia {\n ...SocialMediaFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n vendorType\n unregisteredVendorId\n }\n ${CATEGORY_FIELDS_FRAGMENT}\n ${VENDOR_DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n\nconst VENDOR_ATTRIBUTES_FRAGMENT = gql`\n fragment VendorAttributesFields on VendorAttributesType {\n details\n isRequired\n }\n`;\n\nexport const VENDOR_INFO = gql`\n fragment VendorInfoFields on VendorInfoType {\n _id\n compliance {\n foodBeverageLicense\n liabilityInsurance\n }\n documents {\n ...ResourceImageFields\n }\n requirements {\n electricity {\n ...VendorAttributesFields\n }\n gazebo {\n ...VendorAttributesFields\n }\n table {\n ...VendorAttributesFields\n }\n }\n product {\n foodFlavors\n packaging\n priceRange {\n max\n min\n }\n producedIn\n }\n stallInfo {\n size {\n depth\n width\n }\n }\n vendorId\n }\n ${VENDOR_ATTRIBUTES_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nconst UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql`\n fragment UnregisteredVendorInvitationFields on UnregisteredVendorInvitationType {\n dateTime {\n ...DateTimeFields\n }\n inviterId\n }\n ${DATETIME_FIELDS_FRAGMENT}\n`;\n\nexport const UNREGISTERED_VENDOR = gql`\n fragment UnregisteredVendorFields on UnregisteredVendorType {\n _id\n active\n categoryIds\n claimed\n createdAt\n deletedAt\n email\n invitations {\n ...UnregisteredVendorInvitationFields\n }\n name\n region\n updatedAt\n }\n ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}\n`;\n\nexport const GET_VENDORS = gql`\n query getVendors {\n vendors {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDOR = gql`\n query getVendor($_id: ID!) {\n vendor(_id: $_id) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDORS_BY_REGION = gql`\n query getVendorsByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n vendorsByRegion(region: $region, options: $options) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const SEARCH_VENDORS = gql`\n query searchVendors($search: String!, $region: String) {\n vendorSearch(search: $search, region: $region) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDOR_INFO = gql`\n query getVendorInfo($vendorId: ID!) {\n vendorInfo(vendorId: $vendorId) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const GET_UNREGISTERED_VENDORS = gql`\n query getUnregisteredVendors {\n unregisteredVendors {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const GET_UNREGISTERED_VENDORS_BY_INVITER_ID = gql`\n query getUnregisteredVendorsByInviterId($inviterId: ID!) {\n unregisteredVendorsByInviterId(inviterId: $inviterId) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const GET_UNREGISTERED_VENDOR = gql`\n query getUnregisteredVendor($_id: ID!) {\n unregisteredVendor(_id: $_id) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { AuthPayloadType, RefreshTokenPayloadType } from \"src/types/auth\";\n\nimport {\n REQUEST_PASSWORD_RESET_MUTATION,\n LOGIN_MUTATION,\n REGISTER_MUTATION,\n VALIDATE_VERIFICATION_TOKEN_MUTATION,\n RESET_PASSWORD_MUTATION,\n LOGOUT_MUTATION,\n REFRESH_TOKEN_MUTATION,\n} from \"../mutations/auth\";\n\nexport const useRegister = () => {\n const [register, { loading, error }] = useMutation<{\n register: AuthPayloadType;\n }>(REGISTER_MUTATION);\n return { error, loading, register };\n};\n\nexport const useLogin = () => {\n const [login, { loading, error }] = useMutation<{\n login: AuthPayloadType;\n }>(LOGIN_MUTATION);\n return { error, loading, login };\n};\n\nexport const useLogout = () => {\n const [logout, { loading, error }] = useMutation(LOGOUT_MUTATION);\n return { error, loading, logout };\n};\n\nexport const useRefreshToken = () => {\n const [refreshToken, { loading, error }] = useMutation<{\n refreshToken: RefreshTokenPayloadType;\n }>(REFRESH_TOKEN_MUTATION);\n return { error, loading, refreshToken };\n};\n\nexport const useRequestPasswordReset = () => {\n const [requestPasswordReset, { loading, error }] = useMutation(\n REQUEST_PASSWORD_RESET_MUTATION,\n );\n\n return { error, loading, requestPasswordReset };\n};\n\nexport const useValidateVerificationToken = () => {\n const [validateVerificationToken, { loading, error }] = useMutation(\n VALIDATE_VERIFICATION_TOKEN_MUTATION,\n );\n\n return { error, loading, validateVerificationToken };\n};\n\nexport const useResetPassword = () => {\n const [resetPassword, { loading, error }] = useMutation(\n RESET_PASSWORD_MUTATION,\n );\n\n return { error, loading, resetPassword };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { USER_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const REGISTER_MUTATION = gql`\n mutation register($input: RegisterInputType!) {\n register(input: $input) {\n message\n refreshToken\n token\n user {\n ...UserFields\n }\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const LOGIN_MUTATION = gql`\n mutation login($input: LoginInputType!) {\n login(input: $input) {\n message\n refreshToken\n token\n user {\n ...UserFields\n }\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const LOGOUT_MUTATION = gql`\n mutation logout {\n logout {\n message\n }\n }\n`;\n\nexport const REFRESH_TOKEN_MUTATION = gql`\n mutation refreshToken($input: RefreshTokenInputType!) {\n refreshToken(input: $input) {\n refreshToken\n token\n }\n }\n`;\n\nexport const RESET_PASSWORD_MUTATION = gql`\n mutation resetPassword($input: ResetPasswordInputType!) {\n resetPassword(input: $input) {\n message\n }\n }\n`;\n\nexport const REQUEST_PASSWORD_RESET_MUTATION = gql`\n mutation requestPasswordReset($input: RequestPasswordResetInputType!) {\n requestPasswordReset(input: $input) {\n message\n }\n }\n`;\n\nexport const VALIDATE_VERIFICATION_TOKEN_MUTATION = gql`\n mutation validateVerificationToken(\n $input: ValidateVerificationTokenInputType!\n ) {\n validateVerificationToken(input: $input) {\n message\n }\n }\n`;\n","import { PureQueryOptions, useMutation } from \"@apollo/client\";\n\nimport {\n ADD_PARTICIPANT_TO_CHAT_MUTATION,\n DELETE_CHAT_MUTATION,\n REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,\n SEND_CHAT_MESSAGE_MUTATION,\n TOGGLE_CHAT_MESSAGE_LIKE_MUTATION,\n MARK_CHAT_MESSAGES_SEEN_MUTATION,\n REPORT_CHAT_USER_MUTATION,\n CREATE_PRIVATE_CHAT_MUTATION,\n} from \"../../mutations/chat\";\nimport { CHAT, GET_CHATS_BY_REGION, USER_CHATS } from \"../../queries/chat\";\n\nexport const useCreatePrivateChat = () => {\n const [createPrivateChat, { loading, error }] = useMutation<{\n createPrivateChat: {\n _id: string;\n };\n }>(CREATE_PRIVATE_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: USER_CHATS }],\n });\n\n return { createPrivateChat, error, loading };\n};\n\nexport const useSendChatMessage = () => {\n const [sendChatMessage, { loading, error }] = useMutation<{\n sendChatMessage: {\n _id: string;\n };\n }>(SEND_CHAT_MESSAGE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract chatId from the mutation response\n const chatId = mutationResult?.data?.sendChatMessage?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n ];\n },\n });\n\n return { error, loading, sendChatMessage };\n};\n\nexport const useDeleteChat = () => {\n const [deleteChat, { loading, error }] = useMutation(DELETE_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: USER_CHATS }],\n });\n\n return { deleteChat, error, loading };\n};\n\nexport const useAddParticipantToChat = () => {\n const [addParticipantToChat, { loading, error }] = useMutation<{\n addParticipantToChat: {\n _id: string;\n };\n }>(ADD_PARTICIPANT_TO_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract chatId from the mutation response\n const chatId = mutationResult?.data?.addParticipantToChat?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n {\n query: USER_CHATS,\n },\n ];\n },\n });\n\n return { addParticipantToChat, error, loading };\n};\n\nexport const useRemoveParticipantFromChat = () => {\n const [removeParticipantFromChat, { loading, error }] = useMutation<{\n removeParticipantFromChat: {\n success: boolean;\n region?: string | null;\n };\n }>(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult): PureQueryOptions[] => {\n const region = mutationResult?.data?.removeParticipantFromChat?.region;\n\n const queries: PureQueryOptions[] = [{ query: USER_CHATS }];\n\n if (region && region.trim() !== \"\") {\n queries.push({\n query: GET_CHATS_BY_REGION,\n variables: { region },\n });\n }\n\n return queries;\n },\n });\n\n return { error, loading, removeParticipantFromChat };\n};\n\nexport const useToggleChatMessageLike = () => {\n const [toggleChatMessageLike, { loading, error }] = useMutation<{\n toggleChatMessageLike: {\n _id: string;\n };\n }>(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const chatId = mutationResult?.data?.toggleChatMessageLike?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n ];\n },\n });\n\n return { error, loading, toggleChatMessageLike };\n};\n\nexport const useMarkChatMessagesSeen = () => {\n const [markChatMessagesSeen, { loading, error }] = useMutation<{\n markChatMessagesSeen: {\n _id: string;\n };\n }>(MARK_CHAT_MESSAGES_SEEN_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const chatId = mutationResult?.data?.markChatMessagesSeen?._id;\n\n return [\n {\n query: CHAT,\n variables: { _id: chatId },\n },\n ];\n },\n });\n\n return { error, loading, markChatMessagesSeen };\n};\n\nexport const useReportChatUser = () => {\n const [reportChatUser, { loading, error }] = useMutation(\n REPORT_CHAT_USER_MUTATION,\n );\n\n return { error, loading, reportChatUser };\n};\n","import { gql } from \"@apollo/client\";\n\nimport {\n CHAT_FIELDS_FRAGMENT,\n CHAT_REPORT_FIELDS_FRAGMENT,\n} from \"../queries/chat\";\n\nexport const CREATE_PRIVATE_CHAT_MUTATION = gql`\n mutation createPrivateChat($userId: ID!) {\n createPrivateChat(userId: $userId) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const SEND_CHAT_MESSAGE_MUTATION = gql`\n mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {\n sendChatMessage(_id: $_id, input: $input) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_CHAT_MUTATION = gql`\n mutation deleteChat($_id: ID!) {\n deleteChat(_id: $_id)\n }\n`;\n\nexport const ADD_PARTICIPANT_TO_CHAT_MUTATION = gql`\n mutation addParticipantToChat($chatId: ID!, $userId: ID!) {\n addParticipantToChat(chatId: $chatId, userId: $userId) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`\n mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {\n removeParticipantFromChat(chatId: $chatId, userId: $userId) {\n success\n region\n }\n }\n`;\n\nexport const TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`\n mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {\n toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`\n mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {\n markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const REPORT_CHAT_USER_MUTATION = gql`\n mutation reportChatUser($input: ReportChatUserInputType!) {\n reportChatUser(input: $input) {\n ...ChatReportFields\n }\n }\n ${CHAT_REPORT_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const CHAT_MESSAGE_FIELDS_FRAGMENT = gql`\n fragment ChatMessageFields on ChatMessageType {\n _id\n content\n createdAt\n replyToMessageId\n replyPreview {\n senderId\n senderName\n contentPreview\n }\n likedBy {\n userId\n createdAt\n }\n senderId\n seenBy {\n userId\n seenAt\n }\n updatedAt\n }\n`;\n\nexport const CHAT_PARTICIPANT = gql`\n fragment ChatParticipantFields on ChatParticipantType {\n active\n isAssociate\n userAvatar\n userEmail\n userId\n userName\n }\n`;\n\nexport const CHAT_FIELDS_FRAGMENT = gql`\n fragment ChatFields on ChatType {\n _id\n active\n chatDescription\n chatName\n chatType\n createdAt\n deletedAt\n messages {\n ...ChatMessageFields\n }\n participants {\n ...ChatParticipantFields\n }\n region\n updatedAt\n }\n ${CHAT_MESSAGE_FIELDS_FRAGMENT}\n ${CHAT_PARTICIPANT}\n`;\n\nexport const CHAT = gql`\n query chat($_id: ID!) {\n chat(_id: $_id) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const USER_CHATS = gql`\n query userChats {\n userChats {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const GET_CHATS_BY_REGION = gql`\n query getChatsByRegion($region: String!) {\n chatsByRegion(region: $region) {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n\nexport const CHAT_REPORT_FIELDS_FRAGMENT = gql`\n fragment ChatReportFields on ReportChatUserType {\n _id\n chatId\n createdAt\n reason {\n reasonType\n details\n }\n reportedUserId\n reporterUserId\n resolved\n updatedAt\n }\n`;\n\nexport const GET_REPORTED_CHAT_USERS = gql`\n query getReportedChatUsers {\n reportedChatUsers {\n ...ChatReportFields\n }\n }\n ${CHAT_REPORT_FIELDS_FRAGMENT}\n`;\n","import { useQuery, useSubscription } from \"@apollo/client\";\n\nimport { GET_CHAT_MESSAGE } from \"src/graphql/subscriptions/chat\";\n\nimport { ChatType, ReportChatUser } from \"../../../types/chat\";\nimport {\n CHAT,\n GET_CHATS_BY_REGION,\n GET_REPORTED_CHAT_USERS,\n USER_CHATS,\n} from \"../../queries/chat\";\n\nexport const useGetChat = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ chat: ChatType }>(CHAT, {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n const chat = data?.chat;\n\n return { chat, error, loading, refetch };\n};\n\nexport const useGetUserChats = () => {\n const { loading, error, data, refetch } = useQuery<{ userChats: ChatType[] }>(\n USER_CHATS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const userChats = data?.userChats || [];\n\n return { error, loading, refetch, userChats };\n};\n\nexport const useGetChatSubscription = () => {\n const { data, loading, error } = useSubscription<{ getChat: ChatType }>(\n GET_CHAT_MESSAGE,\n );\n\n const chat = data?.getChat;\n\n return { chat, error, loading };\n};\n\nexport const useGetChatsByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n chatsByRegion: ChatType[];\n }>(GET_CHATS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables: { region },\n });\n\n const chatsByRegion = data?.chatsByRegion || [];\n\n return { chatsByRegion, error, loading, refetch };\n};\n\nexport const useGetReportedChatUsers = () => {\n const { loading, error, data, refetch } = useQuery<{\n reportedChatUsers: ReportChatUser[];\n }>(GET_REPORTED_CHAT_USERS, {\n fetchPolicy: \"network-only\",\n });\n\n const reportedChatUsers = data?.reportedChatUsers || [];\n\n return { error, loading, refetch, reportedChatUsers };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { CHAT_FIELDS_FRAGMENT } from \"../queries/chat\";\n\nexport const GET_CHAT_MESSAGE = gql`\n subscription {\n getChatMessage {\n ...ChatFields\n }\n }\n ${CHAT_FIELDS_FRAGMENT}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { CONTACT_US_MUTATION } from \"../mutations/contactUs\";\n\nexport const useContactUs = () => {\n const [contactUs, { loading, error }] = useMutation(CONTACT_US_MUTATION);\n return { contactUs, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const CONTACT_US_MUTATION = gql`\n mutation contactUs($input: ContactUsInputType!) {\n contactUs(input: $input) {\n message\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_EVENT_INFO_MUTATION,\n CREATE_EVENT_MUTATION,\n DELETE_EVENT_MUTATION,\n UPDATE_EVENT_INFO_MUTATION,\n UPDATE_EVENT_MUTATION,\n} from \"../../mutations/event\";\nimport { GET_EVENT, GET_EVENT_INFO } from \"../../queries/event\";\nimport { GET_USER_EVENTS } from \"../../queries/user\";\n\nexport const useCreateEvent = () => {\n const [createEvent, { loading, error }] = useMutation(CREATE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_EVENTS }],\n });\n\n return { createEvent, error, loading };\n};\n\nexport const useUpdateEvent = () => {\n const [updateEvent, { loading, error }] = useMutation<{\n updateEvent: {\n _id: string;\n };\n }>(UPDATE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract eventId from the mutation response\n const eventId = mutationResult?.data?.updateEvent?._id;\n\n if (!eventId) return [];\n\n return [\n {\n query: GET_USER_EVENTS,\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n ];\n },\n });\n\n return { error, loading, updateEvent };\n};\n\nexport const useDeleteEvent = () => {\n const [deleteEvent, { loading, error }] = useMutation(DELETE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_EVENTS }],\n });\n return { deleteEvent, error, loading };\n};\n\nexport const useCreateEventInfo = () => {\n const [createEventInfo, { loading, error }] = useMutation<{\n createEventInfo: {\n eventId: string;\n };\n }>(CREATE_EVENT_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract eventId from the mutation response\n const eventId = mutationResult?.data?.createEventInfo?.eventId;\n\n if (!eventId) return [];\n\n return [\n {\n query: GET_EVENT_INFO,\n variables: { eventId }, // Pass the eventId for refetching\n },\n {\n query: GET_USER_EVENTS,\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n ];\n },\n });\n\n return { createEventInfo, error, loading };\n};\n\nexport const useUpdateEventInfo = () => {\n const [updateEventInfo, { loading, error }] = useMutation<{\n updateEventInfo: {\n eventId: string;\n };\n }>(UPDATE_EVENT_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract eventId from the mutation response\n const eventId = mutationResult?.data?.updateEventInfo?.eventId;\n\n if (!eventId) return [];\n\n return [\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_USER_EVENTS,\n },\n ];\n },\n });\n\n return { error, loading, updateEventInfo };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT, EVENT_INFO } from \"../queries/event\";\n\nexport const CREATE_EVENT_MUTATION = gql`\n mutation createEvent($input: EventInputType!) {\n createEvent(input: $input) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const UPDATE_EVENT_MUTATION = gql`\n mutation updateEvent($_id: ID!, $input: EventInputType!) {\n updateEvent(_id: $_id, input: $input) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const DELETE_EVENT_MUTATION = gql`\n mutation deleteEvent($_id: ID!) {\n deleteEvent(_id: $_id)\n }\n`;\n\nexport const CREATE_EVENT_INFO_MUTATION = gql`\n mutation createEventInfo($input: EventInfoInputType!) {\n createEventInfo(input: $input) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n\nexport const UPDATE_EVENT_INFO_MUTATION = gql`\n mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {\n updateEventInfo(_id: $_id, input: $input) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT } from \"./event\";\nimport { EVENT_LIST_ITEM, USER_FIELDS_FRAGMENT } from \"./global\";\nimport { PARTNER } from \"./partner\";\nimport { VENDOR } from \"./vendor\";\n\nexport const GET_USERS = gql`\n query getUsers {\n users {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_USER = gql`\n query getUser($_id: ID!) {\n user(_id: $_id) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_USER_EVENTS = gql`\n query getUserEvents {\n userEvents {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const GET_USER_VENDORS = gql`\n query getUserVendors {\n userVendors {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_USER_PARTNERS = gql`\n query getUserPartners {\n userPartners {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_USER_ACTIVITIES = gql`\n query getUserActivities {\n userActivities {\n favourites {\n events {\n ...EventListItemFields\n }\n partners {\n ...PartnerFields\n }\n vendors {\n ...VendorFields\n }\n }\n going {\n events {\n ...EventListItemFields\n }\n }\n interested {\n events {\n ...EventListItemFields\n }\n }\n present {\n events {\n ...EventListItemFields\n }\n }\n }\n }\n ${EVENT_LIST_ITEM}\n ${VENDOR}\n ${PARTNER}\n`;\n\nexport const GET_USER_RESOURCES = gql`\n query getUserResources($userId: ID!) {\n userResources(userId: $userId) {\n resources {\n _id\n logo\n name\n resourceType\n }\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n ASSOCIATES_FIELDS_FRAGMENT,\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const PARTNER = gql`\n fragment PartnerFields on PartnerType {\n _id\n active\n associates {\n ...AssociatesFields\n }\n adIds\n cover {\n ...ResourceImageFields\n }\n createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n description\n deletedAt\n images {\n ...ResourceImageFields\n }\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n nzbn\n owner {\n ...OwnerFields\n }\n partnerType\n posterUsage {\n ...PosterUsageFields\n }\n rating\n region\n reviewCount\n socialMedia {\n ...SocialMediaFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${ASSOCIATES_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n`;\n\nexport const GET_PARTNERS = gql`\n query getPartners {\n partners {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_PARTNER = gql`\n query getPartner($_id: ID!) {\n partner(_id: $_id) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_PARTNERS_BY_REGION = gql`\n query getPartnersByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n partnersByRegion(region: $region, options: $options) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const SEARCH_PARTNERS = gql`\n query searchPartners($search: String!, $region: String) {\n partnersSearch(search: $search, region: $region) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n EventInfoType,\n EventListItemType,\n EventType,\n} from \"../../../types/event\";\nimport { UseGetResourcesByRegionOptions } from \"../../../types/global\";\nimport {\n GET_EVENT,\n GET_EVENT_BY_PLACE_ID,\n GET_EVENT_INFO,\n GET_EVENTS,\n GET_EVENTS_BY_REGION,\n GET_EVENTS_NEAR_ME,\n SEARCH_EVENTS,\n} from \"../../queries/event\";\n\nexport const useGetEvents = () => {\n const { loading, error, data, refetch } = useQuery<{\n events: EventListItemType[];\n }>(GET_EVENTS, {\n fetchPolicy: \"network-only\",\n });\n\n const events = data?.events || [];\n\n return { error, events, loading, refetch };\n};\n\nexport const useGetEvent = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{\n event: EventType | null;\n }>(GET_EVENT, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: { _id },\n });\n\n const event = data?.event || null;\n\n return { error, event, loading, refetch };\n};\n\nexport const useGetEventByPlaceId = (googlePlaceId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventByPlaceId: EventListItemType | null;\n }>(GET_EVENT_BY_PLACE_ID, {\n fetchPolicy: \"network-only\",\n skip: !googlePlaceId,\n variables: { googlePlaceId },\n });\n\n const eventByPlaceId = data?.eventByPlaceId || null;\n\n return { error, eventByPlaceId, loading, refetch };\n};\n\nexport const useGetEventsByRegion = (\n region: string,\n options?: UseGetResourcesByRegionOptions,\n) => {\n const variables = {\n options,\n region,\n };\n const { loading, error, data, refetch, fetchMore } = useQuery<{\n eventsByRegion: EventListItemType[];\n }>(GET_EVENTS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables,\n });\n\n const eventsByRegion = data?.eventsByRegion || [];\n\n return {\n error,\n eventsByRegion,\n fetchMore,\n loading,\n refetch,\n };\n};\n\nexport const useSearchEvents = (\n region: string,\n\n search?: string,\n\n tags?: string[],\n) => {\n const normalizedSearch = search?.trim() ?? \"\";\n const normalizedTags = (tags ?? []).filter(Boolean);\n\n const shouldRunQuery =\n Boolean(region?.trim()) &&\n (normalizedSearch.length > 3 || normalizedTags.length > 0);\n\n const { loading, error, data, refetch } = useQuery<{\n eventsSearch: EventListItemType[];\n }>(SEARCH_EVENTS, {\n fetchPolicy: \"network-only\",\n skip: !shouldRunQuery,\n variables: {\n region,\n search: normalizedSearch,\n tags: normalizedTags,\n },\n });\n\n return {\n error,\n eventsSearch: data?.eventsSearch ?? [],\n loading,\n refetch,\n };\n};\n\nexport const useGetEventsNearMe = (location: {\n latitude: number;\n longitude: number;\n radius?: number;\n}) => {\n const { loading, error, data, refetch } = useQuery<{\n eventsNearMe: EventListItemType[];\n }>(GET_EVENTS_NEAR_ME, {\n fetchPolicy: \"network-only\",\n skip: !location.latitude || !location.longitude,\n variables: {\n latitude: location.latitude,\n longitude: location.longitude,\n radius: location.radius || 10000, // Default to 10km if no radius is provided\n },\n });\n\n const eventsNearMe = data?.eventsNearMe || [];\n\n return { error, eventsNearMe, loading, refetch };\n};\n\nexport const useGetEventInfo = (eventId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventInfo: EventInfoType;\n }>(GET_EVENT_INFO, {\n fetchPolicy: \"network-only\",\n skip: !eventId || eventId === \"\",\n variables: { eventId },\n });\n\n const eventInfo = data?.eventInfo;\n\n return { error, eventInfo, loading, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_BULK_NOTIFICATIONS,\n DELETE_ALL_NOTIFICATIONS,\n DELETE_NOTIFICATION,\n MARK_ALL_NOTIFICATIONS_READ,\n MARK_NOTIFICATION_READ,\n} from \"src/graphql/mutations/notification\";\nimport {\n GET_NOTIFICATION_COUNT,\n GET_USER_NOTIFICATIONS,\n} from \"src/graphql/queries/notification\";\n\nexport const useCreateBulkNotifications = () => {\n const [createBulkNotifications, { loading, error }] = useMutation(\n CREATE_BULK_NOTIFICATIONS,\n );\n return { createBulkNotifications, error, loading };\n};\n\nexport const useMarkNotificationRead = () => {\n const [markNotificationRead, { loading, error }] = useMutation(\n MARK_NOTIFICATION_READ,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { error, loading, markNotificationRead };\n};\n\nexport const useMarkAllNotificationsRead = () => {\n const [markAllNotificationsRead, { loading, error }] = useMutation(\n MARK_ALL_NOTIFICATIONS_READ,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { error, loading, markAllNotificationsRead };\n};\n\nexport const useDeleteNotification = () => {\n const [deleteNotification, { loading, error }] = useMutation(\n DELETE_NOTIFICATION,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { deleteNotification, error, loading };\n};\n\nexport const useDeleteAllNotifications = () => {\n const [deleteAllNotifications, { loading, error }] = useMutation(\n DELETE_ALL_NOTIFICATIONS,\n {\n refetchQueries: [\n {\n query: GET_USER_NOTIFICATIONS,\n },\n {\n query: GET_NOTIFICATION_COUNT,\n },\n ],\n },\n );\n return { deleteAllNotifications, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { NOTIFICATION_FRAGMENT } from \"../queries/notification\";\n\nexport const CREATE_BULK_NOTIFICATIONS = gql`\n mutation createBulkNotifications($input: CreateBulkNotificationInput!) {\n createBulkNotifications(input: $input) {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const MARK_NOTIFICATION_READ = gql`\n mutation markNotificationRead($_id: ID!) {\n markNotificationRead(_id: $_id) {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const MARK_ALL_NOTIFICATIONS_READ = gql`\n mutation markAllNotificationsRead {\n markAllNotificationsRead\n }\n`;\n\nexport const DELETE_NOTIFICATION = gql`\n mutation deleteNotification($_id: ID!) {\n deleteNotification(_id: $_id)\n }\n`;\n\nexport const DELETE_ALL_NOTIFICATIONS = gql`\n mutation deleteAllNotifications {\n deleteAllNotifications\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const NOTIFICATION_FRAGMENT = gql`\n fragment NotificationFields on Notification {\n _id\n userId\n title\n message\n type\n isRead\n data {\n resourceId\n resourceName\n resourceType\n }\n createdAt\n updatedAt\n }\n`;\n\nexport const GET_USER_NOTIFICATIONS = gql`\n query getUserNotifications($limit: Int, $offset: Int) {\n userNotifications(limit: $limit, offset: $offset) {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const GET_NOTIFICATION_COUNT = gql`\n query getNotificationCount {\n notificationCount {\n total\n unread\n }\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { NotificationCount, NotificationType } from \"../../../types\";\nimport {\n GET_NOTIFICATION_COUNT,\n GET_USER_NOTIFICATIONS,\n} from \"../../queries/notification\";\n\nexport const useGetUserNotifications = (limit?: number, offset?: number) => {\n const { data, loading, error, refetch } = useQuery<{\n userNotifications: NotificationType[];\n }>(GET_USER_NOTIFICATIONS, {\n fetchPolicy: \"no-cache\",\n variables: { limit, offset },\n });\n\n return {\n error,\n loading,\n notifications: data?.userNotifications || [],\n refetch,\n };\n};\n\nexport const useGetNotificationCount = () => {\n const { data, loading, error, refetch } = useQuery<{\n notificationCount: NotificationCount;\n }>(GET_NOTIFICATION_COUNT, {\n fetchPolicy: \"no-cache\",\n });\n\n return {\n error,\n loading,\n notificationCount: data?.notificationCount || { total: 0, unread: 0 },\n refetch,\n };\n};\n","import { useSubscription } from \"@apollo/client\";\n\nimport { NotificationCount, NotificationType } from \"../../../types\";\nimport {\n GET_NOTIFICATION_COUNT_SUBSCRIPTION,\n GET_NOTIFICATIONS_SUBSCRIPTION,\n} from \"../../subscriptions/notification\";\n\nexport const useGetUserNotificationsSubscription = () => {\n const { data, loading, error } = useSubscription<{\n getUserNotifications: NotificationType[];\n }>(GET_NOTIFICATIONS_SUBSCRIPTION, {\n fetchPolicy: \"no-cache\",\n shouldResubscribe: true,\n });\n\n return {\n error,\n loading,\n notifications: data?.getUserNotifications,\n };\n};\n\nexport const useGetNotificationCountSubscription = () => {\n const { data, loading, error } = useSubscription<{\n getNotificationCount: NotificationCount;\n }>(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {\n fetchPolicy: \"no-cache\",\n shouldResubscribe: true,\n });\n\n return {\n error,\n loading,\n notificationCount: data?.getNotificationCount,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { NOTIFICATION_FRAGMENT } from \"../queries/notification\";\n\nexport const GET_NOTIFICATIONS_SUBSCRIPTION = gql`\n subscription {\n getUserNotifications {\n ...NotificationFields\n }\n }\n ${NOTIFICATION_FRAGMENT}\n`;\n\nexport const GET_NOTIFICATION_COUNT_SUBSCRIPTION = gql`\n subscription {\n getNotificationCount {\n total\n unread\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { CREATE_POSTER_MUTATION } from \"../mutations/poster\";\nimport { GET_USER_EVENTS, GET_USER_VENDORS } from \"../queries/user\";\n\nexport const useCreatePoster = () => {\n const [createPoster, { loading, error }] = useMutation(\n CREATE_POSTER_MUTATION,\n {\n refetchQueries: [{ query: GET_USER_EVENTS }, { query: GET_USER_VENDORS }],\n },\n );\n return { createPoster, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { POSTER_USAGE_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const CREATE_POSTER_MUTATION = gql`\n mutation createPoster($input: PosterInputType!) {\n createPoster(input: $input) {\n message\n posterUsage {\n ...PosterUsageFields\n }\n }\n }\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { CREATE_PUSH_TOKEN_MUTATION } from \"../mutations/pushToken\";\n\nexport const useCreatePushToken = () => {\n const [createPushToken, { loading, error }] = useMutation(\n CREATE_PUSH_TOKEN_MUTATION,\n );\n return { createPushToken, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const CREATE_PUSH_TOKEN_MUTATION = gql`\n mutation createPushToken($input: PushTokenInput!) {\n createPushToken(input: $input) {\n success\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport { RelationType } from \"src/types\";\n\nimport {\n CREATE_RELATION_MUTATION,\n DELETE_RELATION_MUTATION,\n UPDATE_RELATION_MUTATION,\n} from \"../../mutations/relation\";\nimport { USER_CHATS } from \"../../queries/chat\";\nimport { GET_EVENT, GET_EVENT_INFO } from \"../../queries/event\";\nimport {\n GET_EVENT_RELATIONS,\n GET_RELATION_BY_EVENT_AND_VENDOR,\n GET_RESOURCE_CONNECTIONS,\n GET_VENDOR_RELATIONS,\n} from \"../../queries/relation\";\nimport { GET_VENDOR } from \"../../queries/vendor\";\n\nexport const useCreateRelation = () => {\n const [createRelation, { loading, error }] = useMutation<{\n createRelation: RelationType;\n }>(CREATE_RELATION_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract relationId from the mutation response\n const createRelation = mutationResult?.data?.createRelation;\n const eventId = createRelation?.eventId;\n const vendorId = createRelation?.vendorId;\n\n const resourceType = createRelation?.lastUpdateBy;\n const resourceId =\n resourceType === EnumResourceType.EVENT ? eventId : vendorId;\n\n return [\n {\n query: GET_EVENT_RELATIONS,\n variables: { eventId },\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_VENDOR_RELATIONS,\n variables: { vendorId },\n },\n {\n query: GET_VENDOR,\n variables: { _id: vendorId },\n },\n {\n query: GET_RELATION_BY_EVENT_AND_VENDOR,\n variables: { eventId, vendorId },\n },\n {\n query: GET_RESOURCE_CONNECTIONS,\n variables: { resourceId, resourceType },\n },\n {\n query: USER_CHATS,\n },\n ];\n },\n });\n\n return { createRelation, error, loading };\n};\n\nexport const useUpdateRelation = () => {\n const [updateRelation, { loading, error }] = useMutation<{\n updateRelation: RelationType;\n }>(UPDATE_RELATION_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const updateRelation = mutationResult?.data?.updateRelation;\n const eventId = updateRelation?.eventId;\n const vendorId = updateRelation?.vendorId;\n\n const resourceType = updateRelation?.lastUpdateBy;\n const resourceId =\n resourceType === EnumResourceType.EVENT ? eventId : vendorId;\n\n return [\n {\n query: GET_EVENT_RELATIONS,\n variables: { eventId },\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId },\n },\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_VENDOR_RELATIONS,\n variables: { vendorId },\n },\n {\n query: GET_VENDOR,\n variables: { _id: vendorId },\n },\n {\n query: GET_RELATION_BY_EVENT_AND_VENDOR,\n variables: { eventId, vendorId },\n },\n {\n query: GET_RESOURCE_CONNECTIONS,\n variables: { resourceId, resourceType },\n },\n ];\n },\n });\n\n return { error, loading, updateRelation };\n};\n\nexport const useDeleteRelation = () => {\n const [deleteRelation, { loading, error }] = useMutation<{\n deleteRelation: RelationType;\n }>(DELETE_RELATION_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract relationId from the mutation response\n const deleteRelation = mutationResult?.data?.deleteRelation;\n const eventId = deleteRelation?.eventId;\n const vendorId = deleteRelation?.vendorId;\n const resourceType = deleteRelation?.lastUpdateBy;\n const resourceId =\n resourceType === EnumResourceType.EVENT ? eventId : vendorId;\n return [\n {\n query: GET_EVENT_INFO,\n variables: { eventId },\n },\n {\n query: GET_EVENT_RELATIONS,\n variables: { eventId },\n },\n {\n query: GET_VENDOR_RELATIONS,\n variables: { vendorId },\n },\n {\n query: GET_RELATION_BY_EVENT_AND_VENDOR,\n variables: { eventId, vendorId },\n },\n {\n query: GET_RESOURCE_CONNECTIONS,\n variables: { resourceId, resourceType },\n },\n {\n query: USER_CHATS,\n },\n ];\n },\n });\n return { deleteRelation, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { RELATION_FIELDS_FRAGMENT } from \"../queries/relation\";\n\nexport const CREATE_RELATION_MUTATION = gql`\n mutation createRelation($input: RelationInputType!) {\n createRelation(input: $input) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_RELATION_MUTATION = gql`\n mutation updateRelation($_id: ID!, $input: RelationInputType!) {\n updateRelation(_id: $_id, input: $input) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_RELATION_MUTATION = gql`\n mutation deleteRelation($_id: ID!) {\n deleteRelation(_id: $_id) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT_LIST_ITEM, RELATION_DATES_FRAGMENT } from \"./global\";\nimport { VENDOR } from \"./vendor\";\n\nexport const RELATION_FIELDS_FRAGMENT = gql`\n fragment RelationFields on RelationType {\n _id\n active\n chatId\n createdAt\n lastUpdateBy\n eventId\n relationDates {\n ...RelationDates\n }\n relationType\n vendorId\n updatedAt\n }\n ${RELATION_DATES_FRAGMENT}\n`;\n\nexport const GET_RELATION = gql`\n query getRelation($_id: ID!) {\n relation(_id: $_id) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_RELATION_BY_EVENT_AND_VENDOR = gql`\n query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {\n relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_EVENT_RELATIONS = gql`\n query getEventRelations($eventId: ID!) {\n eventRelations(eventId: $eventId) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_VENDOR_RELATIONS = gql`\n query getVendorRelations($vendorId: ID!) {\n vendorRelations(vendorId: $vendorId) {\n ...RelationFields\n }\n }\n ${RELATION_FIELDS_FRAGMENT}\n`;\n\nexport const GET_RESOURCE_CONNECTIONS = gql`\n query getResourceConnections(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {\n events {\n ...EventListItemFields\n }\n vendors {\n ...VendorFields\n }\n }\n }\n ${VENDOR}\n ${EVENT_LIST_ITEM}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"../../../enums\";\nimport { ResourceConnectionsType } from \"../../../types\";\nimport { RelationType } from \"../../../types/relation\";\nimport {\n GET_EVENT_RELATIONS,\n GET_RELATION_BY_EVENT_AND_VENDOR,\n GET_RESOURCE_CONNECTIONS,\n GET_RELATION,\n GET_VENDOR_RELATIONS,\n} from \"../../queries/relation\";\n\nexport const useGetRelation = (_id?: string) => {\n const { loading, error, data, refetch } = useQuery<{\n relation: RelationType;\n }>(GET_RELATION, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: _id ? { _id } : undefined,\n });\n\n const relation = data?.relation;\n\n return { error, loading, refetch, relation };\n};\n\nexport const useGetRelationByEventAndVendor = (\n eventId: string,\n vendorId: string,\n) => {\n const { loading, error, data, refetch } = useQuery<{\n relationByEventAndVendor: RelationType;\n }>(GET_RELATION_BY_EVENT_AND_VENDOR, {\n fetchPolicy: \"network-only\",\n skip: !eventId || eventId === \"\" || !vendorId || vendorId === \"\",\n variables: { eventId, vendorId },\n });\n\n const relationByEventAndVendor = data?.relationByEventAndVendor;\n\n return { error, loading, refetch, relationByEventAndVendor };\n};\n\nexport const useGetEventRelations = (eventId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventRelations: RelationType[];\n }>(GET_EVENT_RELATIONS, {\n fetchPolicy: \"network-only\",\n skip: !eventId || eventId === \"\",\n variables: { eventId },\n });\n\n const eventRelations = data?.eventRelations || [];\n\n return { error, eventRelations, loading, refetch };\n};\n\nexport const useGetVendorRelations = (vendorId?: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorRelations: RelationType[];\n }>(GET_VENDOR_RELATIONS, {\n fetchPolicy: \"network-only\",\n skip: !vendorId || vendorId === \"\",\n variables: { vendorId },\n });\n\n const vendorRelations = data?.vendorRelations || [];\n\n return { error, loading, refetch, vendorRelations };\n};\n\nexport const useGetResourceConnections = (\n resourceId: string,\n resourceType: EnumResourceType,\n) => {\n const { loading, error, data, refetch } = useQuery<{\n resourceConnections: ResourceConnectionsType;\n }>(GET_RESOURCE_CONNECTIONS, {\n fetchPolicy: \"network-only\",\n skip: !resourceId || resourceId === \"\" || !resourceType,\n variables: { resourceId, resourceType },\n });\n\n const resourceConnections = data?.resourceConnections;\n\n return { error, loading, refetch, resourceConnections };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport { GET_USER_VENDORS } from \"src/graphql/queries/user\";\n\nimport {\n CREATE_UNREGISTERED_VENDOR_MUTATION,\n CREATE_VENDOR_INFO_MUTATION,\n CREATE_VENDOR_MUTATION,\n DELETE_UNREGISTERED_VENDOR_MUTATION,\n DELETE_VENDOR_MUTATION,\n UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION,\n UPDATE_UNREGISTERED_VENDOR_MUTATION,\n UPDATE_VENDOR_INFO_MUTATION,\n UPDATE_VENDOR_MUTATION,\n} from \"../../mutations/vendor\";\nimport { GET_VENDOR, GET_VENDOR_INFO } from \"../../queries/vendor\";\n\nexport const useCreateVendor = () => {\n const [createVendor, { loading, error }] = useMutation(\n CREATE_VENDOR_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_VENDORS }],\n },\n );\n\n return { createVendor, error, loading };\n};\n\nexport const useUpdateVendor = () => {\n const [updateVendor, { loading, error }] = useMutation(\n UPDATE_VENDOR_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_VENDORS }],\n },\n );\n return { error, loading, updateVendor };\n};\n\nexport const useDeleteVendor = () => {\n const [deleteVendor, { loading, error }] = useMutation(\n DELETE_VENDOR_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_VENDORS }],\n },\n );\n return { deleteVendor, error, loading };\n};\n\nexport const useCreateVendorInfo = () => {\n const [createVendorInfo, { loading, error }] = useMutation<{\n createVendorInfo: { vendorId: string };\n }>(CREATE_VENDOR_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract vendorId from the mutation response\n const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;\n\n if (!vendorId) return [];\n\n return [\n {\n query: GET_VENDOR_INFO,\n variables: { vendorId }, // Pass the vendorId for refetching\n },\n {\n query: GET_USER_VENDORS,\n },\n {\n query: GET_VENDOR,\n variables: { _id: vendorId },\n },\n ];\n },\n });\n\n return { createVendorInfo, error, loading };\n};\n\nexport const useUpdateVendorInfo = () => {\n const [updateVendorInfo, { loading, error }] = useMutation<{\n updateVendorInfo: { vendorId: string };\n }>(UPDATE_VENDOR_INFO_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract vendorId from the mutation response\n const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;\n\n if (!vendorId) return [];\n\n return [\n {\n query: GET_VENDOR_INFO,\n variables: { vendorId }, // Pass the vendorId for refetching\n },\n ];\n },\n });\n\n return { error, loading, updateVendorInfo };\n};\n\nexport const useCreateUnregisteredVendor = () => {\n const [createUnregisteredVendor, { loading, error }] = useMutation(\n CREATE_UNREGISTERED_VENDOR_MUTATION,\n );\n\n return { createUnregisteredVendor, error, loading };\n};\n\nexport const useUpdateUnregisteredVendor = () => {\n const [updateUnregisteredVendor, { loading, error }] = useMutation(\n UPDATE_UNREGISTERED_VENDOR_MUTATION,\n );\n return { error, loading, updateUnregisteredVendor };\n};\n\nexport const useDeleteUnregisteredVendor = () => {\n const [deleteUnregisteredVendor, { loading, error }] = useMutation(\n DELETE_UNREGISTERED_VENDOR_MUTATION,\n );\n return { deleteUnregisteredVendor, error, loading };\n};\n\nexport const useUnlinkUnregisteredVendorByInviterId = () => {\n const [unlinkUnregisteredVendorByInviterId, { loading, error }] = useMutation(\n UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION,\n );\n return { error, loading, unlinkUnregisteredVendorByInviterId };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { UNREGISTERED_VENDOR, VENDOR, VENDOR_INFO } from \"../queries/vendor\";\n\nexport const CREATE_VENDOR_MUTATION = gql`\n mutation createVendor($input: VendorInputType!) {\n createVendor(input: $input) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const UPDATE_VENDOR_MUTATION = gql`\n mutation updateVendor($_id: ID!, $input: VendorInputType!) {\n updateVendor(_id: $_id, input: $input) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const DELETE_VENDOR_MUTATION = gql`\n mutation deleteVendor($_id: ID!) {\n deleteVendor(_id: $_id)\n }\n`;\n\nexport const CREATE_VENDOR_INFO_MUTATION = gql`\n mutation createVendorInfo($input: VendorInfoInputType!) {\n createVendorInfo(input: $input) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const UPDATE_VENDOR_INFO_MUTATION = gql`\n mutation updateVendorInfo($_id: ID!, $input: VendorInfoInputType!) {\n updateVendorInfo(_id: $_id, input: $input) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const CREATE_UNREGISTERED_VENDOR_MUTATION = gql`\n mutation createUnregisteredVendor($input: UnregisteredVendorInputType!) {\n createUnregisteredVendor(input: $input) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const UPDATE_UNREGISTERED_VENDOR_MUTATION = gql`\n mutation updateUnregisteredVendor(\n $_id: ID!\n $input: UnregisteredVendorInputType!\n ) {\n updateUnregisteredVendor(_id: $_id, input: $input) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const DELETE_UNREGISTERED_VENDOR_MUTATION = gql`\n mutation deleteUnregisteredVendor($_id: ID!) {\n deleteUnregisteredVendor(_id: $_id)\n }\n`;\n\nexport const UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION = gql`\n mutation unlinkUnregisteredVendorByInviterId($_id: ID!, $inviterId: ID!) {\n unlinkUnregisteredVendorByInviterId(_id: $_id, inviterId: $inviterId)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { UseGetResourcesByRegionOptions } from \"../../../types/global\";\nimport {\n UnregisteredVendorType,\n VendorInfoType,\n VendorType,\n} from \"../../../types/vendor\";\nimport {\n GET_UNREGISTERED_VENDOR,\n GET_UNREGISTERED_VENDORS,\n GET_UNREGISTERED_VENDORS_BY_INVITER_ID,\n GET_VENDOR,\n GET_VENDOR_INFO,\n GET_VENDORS,\n GET_VENDORS_BY_REGION,\n SEARCH_VENDORS,\n} from \"../../queries/vendor\";\n\nexport const useGetVendors = () => {\n const { loading, error, data, refetch } = useQuery<{ vendors: VendorType[] }>(\n GET_VENDORS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const vendors = data?.vendors || [];\n\n return {\n error,\n loading,\n refetch,\n vendors,\n };\n};\n\nexport const useGetVendor = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ vendor: VendorType }>(\n GET_VENDOR,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const vendor = data?.vendor;\n\n return { error, loading, refetch, vendor };\n};\n\nexport const useGetVendorsByRegion = (\n region: string,\n options?: UseGetResourcesByRegionOptions,\n) => {\n const variables = {\n options,\n region,\n };\n const { loading, error, data, refetch, fetchMore } = useQuery<{\n vendorsByRegion: VendorType[];\n }>(GET_VENDORS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables,\n });\n\n const vendorsByRegion = data?.vendorsByRegion || [];\n\n return {\n error,\n fetchMore,\n loading,\n refetch,\n vendorsByRegion,\n };\n};\n\nexport const useSearchVendors = (search: string, region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorSearch: VendorType[];\n }>(SEARCH_VENDORS, {\n fetchPolicy: \"network-only\",\n skip: search.length < 3 || !region || region === \"\",\n variables: { region, search },\n });\n\n const vendorSearch = data?.vendorSearch || [];\n\n return { error, loading, refetch, vendorSearch };\n};\n\nexport const useGetVendorInfo = (vendorId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorInfo: VendorInfoType;\n }>(GET_VENDOR_INFO, {\n fetchPolicy: \"network-only\",\n skip: !vendorId || vendorId === \"\",\n variables: { vendorId },\n });\n\n const vendorInfo = data?.vendorInfo;\n\n return {\n error,\n loading,\n refetch,\n vendorInfo,\n };\n};\n\nexport const useGetUnregisteredVendors = () => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendors: UnregisteredVendorType[];\n }>(GET_UNREGISTERED_VENDORS, {\n fetchPolicy: \"network-only\",\n });\n\n const unregisteredVendors = data?.unregisteredVendors || [];\n\n return {\n error,\n loading,\n refetch,\n unregisteredVendors,\n };\n};\n\nexport const useGetUnregisteredVendorsByInviterId = (inviterId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendorsByInviterId: UnregisteredVendorType[];\n }>(GET_UNREGISTERED_VENDORS_BY_INVITER_ID, {\n fetchPolicy: \"network-only\",\n skip: !inviterId || inviterId === \"\",\n variables: { inviterId },\n });\n\n const unregisteredVendorsByInviterId =\n data?.unregisteredVendorsByInviterId || [];\n\n return { error, loading, refetch, unregisteredVendorsByInviterId };\n};\n\nexport const useGetUnregisteredVendor = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendor: UnregisteredVendorType;\n }>(GET_UNREGISTERED_VENDOR, {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n const unregisteredVendor = data?.unregisteredVendor;\n\n return { error, loading, refetch, unregisteredVendor };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_VENDORS,\n} from \"src/graphql/queries/user\";\nimport { UserLicenceType, SafeUserType, RedeemRewardResponse } from \"src/types\";\n\nimport {\n ADD_USER_FAVOURITE_RESOURCE_MUTATION,\n ADD_USER_GOING_RESOURCE_MUTATION,\n ADD_USER_INTEREST_RESOURCE_MUTATION,\n ADD_USER_PRESENT_RESOURCE_MUTATION,\n CREATE_USER_MUTATION,\n DELETE_USER_MUTATION,\n REDEEM_REWARD_MUTATION,\n REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,\n REMOVE_USER_GOING_RESOURCE_MUTATION,\n REMOVE_USER_INTEREST_RESOURCE_MUTATION,\n REMOVE_USER_PRESENT_RESOURCE_MUTATION,\n SELECT_STANDARD_PACKAGE_MUTATION,\n UPDATE_USER_MUTATION,\n} from \"../../mutations/user\";\n\nexport const useCreateUser = () => {\n const [createUser, { loading, error }] = useMutation<{\n createUser: SafeUserType;\n }>(CREATE_USER_MUTATION);\n\n return { createUser, error, loading };\n};\n\nexport const useUpdateUser = () => {\n const [updateUser, { loading, error }] = useMutation<{\n updateUser: SafeUserType;\n }>(UPDATE_USER_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract userId from the mutation response\n const userId = mutationResult?.data?.updateUser?._id;\n\n if (!userId) return [];\n\n return [{ query: GET_USER, variables: { _id: userId } }];\n },\n });\n\n return { error, loading, updateUser };\n};\n\nexport const useDeleteUser = () => {\n const [deleteUser, { loading, error }] = useMutation(DELETE_USER_MUTATION);\n\n return { deleteUser, error, loading };\n};\n\nexport const useRedeemReward = () => {\n const [redeemReward, { loading, error }] = useMutation<{\n redeemReward: RedeemRewardResponse;\n }>(REDEEM_REWARD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n const userId = mutationResult?.data?.redeemReward?.userId;\n\n if (!userId) return [];\n\n return [\n {\n query: GET_USER,\n variables: { _id: userId }, // Pass the userId for refetching\n },\n ];\n },\n });\n\n return { error, loading, redeemReward };\n};\n\nexport const useAddUserFavouriteResource = () => {\n const [addUserFavouriteResource, { loading, error }] = useMutation(\n ADD_USER_FAVOURITE_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserFavouriteResource, error, loading };\n};\n\nexport const useRemoveUserFavouriteResource = () => {\n const [removeUserFavouriteResource, { loading, error }] = useMutation(\n REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserFavouriteResource };\n};\n\nexport const useAddUserInterestResource = () => {\n const [addUserInterestResource, { loading, error }] = useMutation(\n ADD_USER_INTEREST_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserInterestResource, error, loading };\n};\n\nexport const useRemoveUserInterestResource = () => {\n const [removeUserInterestResource, { loading, error }] = useMutation(\n REMOVE_USER_INTEREST_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserInterestResource };\n};\n\nexport const useAddUserGoingResource = () => {\n const [addUserGoingResource, { loading, error }] = useMutation(\n ADD_USER_GOING_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserGoingResource, error, loading };\n};\n\nexport const useRemoveUserGoingResource = () => {\n const [removeUserGoingResource, { loading, error }] = useMutation(\n REMOVE_USER_GOING_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserGoingResource };\n};\n\nexport const useAddUserPresentResource = () => {\n const [addUserPresentResource, { loading, error }] = useMutation(\n ADD_USER_PRESENT_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { addUserPresentResource, error, loading };\n};\n\nexport const useRemoveUserPresentResource = () => {\n const [removeUserPresentResource, { loading, error }] = useMutation(\n REMOVE_USER_PRESENT_RESOURCE_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_ACTIVITIES }],\n },\n );\n\n return { error, loading, removeUserPresentResource };\n};\n\nexport const useSelectStandardPackage = () => {\n const [selectStandardPackage, { loading, error }] = useMutation<{\n selectStandardPackage: {\n userId: string;\n message: string;\n licences: UserLicenceType[];\n };\n }>(SELECT_STANDARD_PACKAGE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract userId from the mutation response\n const userId = mutationResult?.data?.selectStandardPackage?.userId;\n\n if (!userId) return [];\n\n return [\n { query: GET_USER, variables: { _id: userId } },\n { query: GET_USER_EVENTS },\n { query: GET_USER_VENDORS },\n ];\n },\n });\n\n return { error, loading, selectStandardPackage };\n};\n","import { gql } from \"@apollo/client\";\n\nimport {\n LICENCE_FIELDS_FRAGMENT,\n USER_FIELDS_FRAGMENT,\n} from \"../queries/global\";\n\nexport const CREATE_USER_MUTATION = gql`\n mutation createUser($input: UserInputType!) {\n createUser(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_USER_MUTATION = gql`\n mutation updateUser($_id: ID!, $input: UserInputType!) {\n updateUser(_id: $_id, input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_USER_MUTATION = gql`\n mutation deleteUser($email: String!) {\n deleteUser(email: $email)\n }\n`;\n\nexport const REDEEM_REWARD_MUTATION = gql`\n mutation redeemReward($input: RedeemRewardInputType!) {\n redeemReward(input: $input) {\n message\n userId\n }\n }\n`;\n\nexport const ADD_USER_FAVOURITE_RESOURCE_MUTATION = gql`\n mutation addUserFavouriteResource(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n addUserFavouriteResource(\n resourceId: $resourceId\n resourceType: $resourceType\n ) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = gql`\n mutation removeUserFavouriteResource(\n $resourceId: ID!\n $resourceType: ResourceTypeEnum!\n ) {\n removeUserFavouriteResource(\n resourceId: $resourceId\n resourceType: $resourceType\n ) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const ADD_USER_INTEREST_RESOURCE_MUTATION = gql`\n mutation addUserInterestResource($input: UserActivityInputType!) {\n addUserInterestResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_INTEREST_RESOURCE_MUTATION = gql`\n mutation removeUserInterestResource($input: UserActivityInputType!) {\n removeUserInterestResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const ADD_USER_GOING_RESOURCE_MUTATION = gql`\n mutation addUserGoingResource($input: UserActivityInputType!) {\n addUserGoingResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_GOING_RESOURCE_MUTATION = gql`\n mutation removeUserGoingResource($input: UserActivityInputType!) {\n removeUserGoingResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const ADD_USER_PRESENT_RESOURCE_MUTATION = gql`\n mutation addUserPresentResource($input: UserActivityInputType!) {\n addUserPresentResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const REMOVE_USER_PRESENT_RESOURCE_MUTATION = gql`\n mutation removeUserPresentResource($input: UserActivityInputType!) {\n removeUserPresentResource(input: $input) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const SELECT_STANDARD_PACKAGE_MUTATION = gql`\n mutation selectStandardPackage($selectedLicence: LicencesEnumType!) {\n selectStandardPackage(selectedLicence: $selectedLicence) {\n licences {\n ...LicenceFields\n }\n userId\n message\n }\n }\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n EventListItemType,\n EventType,\n PartnerType,\n VendorType,\n ResourceByUser,\n SafeUserType,\n} from \"src/types\";\n\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_PARTNERS,\n GET_USER_RESOURCES,\n GET_USER_VENDORS,\n GET_USERS,\n} from \"../../queries/user\";\n\nexport const useGetUsers = () => {\n const { loading, error, data, refetch } = useQuery<{ users: SafeUserType[] }>(\n GET_USERS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const users = data?.users || [];\n\n return { error, loading, refetch, users };\n};\n\nexport const useGetUser = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ user: SafeUserType }>(\n GET_USER,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const user = data?.user;\n\n return { error, loading, refetch, user };\n};\n\nexport const useGetUserEvents = () => {\n const { loading, error, data, refetch } = useQuery<{\n userEvents: EventType[];\n }>(GET_USER_EVENTS, {\n fetchPolicy: \"network-only\",\n });\n\n const userEvents = data?.userEvents || [];\n\n return { error, loading, refetch, userEvents };\n};\n\nexport const useGetUserVendors = () => {\n const { loading, error, data, refetch } = useQuery<{\n userVendors: VendorType[];\n }>(GET_USER_VENDORS, {\n fetchPolicy: \"network-only\",\n });\n\n const userVendors = data?.userVendors || [];\n\n return { error, loading, refetch, userVendors };\n};\n\nexport const useGetUserPartners = () => {\n const { loading, error, data, refetch } = useQuery<{\n userPartners: PartnerType[];\n }>(GET_USER_PARTNERS, {\n fetchPolicy: \"network-only\",\n });\n\n const userPartners = data?.userPartners || [];\n\n return { error, loading, refetch, userPartners };\n};\n\nexport const useGetUserActivities = () => {\n const { loading, error, data, refetch } = useQuery<{\n userActivities: {\n favourites: {\n events: EventListItemType[];\n partners: PartnerType[];\n vendors: VendorType[];\n };\n going: {\n events: EventListItemType[];\n };\n interested: {\n events: EventListItemType[];\n };\n present: {\n events: EventListItemType[];\n };\n };\n }>(GET_USER_ACTIVITIES, {\n fetchPolicy: \"network-only\",\n });\n\n const userActivities = {\n favourites: {\n events: data?.userActivities.favourites.events || [],\n partners: data?.userActivities.favourites.partners || [],\n vendors: data?.userActivities.favourites.vendors || [],\n },\n going: {\n events: data?.userActivities.going.events || [],\n },\n interested: {\n events: data?.userActivities.interested.events || [],\n },\n present: {\n events: data?.userActivities.present.events || [],\n },\n };\n\n return { error, loading, refetch, userActivities };\n};\n\nexport const useGetUserResources = (userId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n userResources: {\n resources: ResourceByUser[];\n };\n }>(GET_USER_RESOURCES, {\n fetchPolicy: \"network-only\",\n skip: !userId || userId === \"\",\n variables: { userId },\n });\n\n const userResources = data?.userResources.resources || [];\n\n return { error, loading, refetch, userResources };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_AD_MUTATION,\n DELETE_AD_MUTATION,\n UPDATE_AD_MUTATION,\n} from \"src/graphql/mutations/ad\";\nimport { GET_ADS } from \"src/graphql/queries/ad\";\n\nexport const useCreateAd = () => {\n const [createAd, { loading, error }] = useMutation(CREATE_AD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_ADS }],\n });\n\n return {\n createAd,\n error,\n loading,\n };\n};\n\nexport const useUpdateAd = () => {\n const [updateAd, { loading, error }] = useMutation(UPDATE_AD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_ADS }],\n });\n\n return {\n error,\n loading,\n updateAd,\n };\n};\n\nexport const useDeleteAd = () => {\n const [deleteAd, { loading, error }] = useMutation(DELETE_AD_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_ADS }],\n });\n\n return {\n deleteAd,\n error,\n loading,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { AD_FIELDS_FRAGMENT } from \"../queries/ad\";\n\nexport const CREATE_AD_MUTATION = gql`\n mutation createAd($input: AdInputType!) {\n createAd(input: $input) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_AD_MUTATION = gql`\n mutation updateAd($_id: ID!, $input: AdInputType!) {\n updateAd(_id: $_id, input: $input) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_AD_MUTATION = gql`\n mutation deleteAd($_id: ID!) {\n deleteAd(_id: $_id)\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const AD_FIELDS_FRAGMENT = gql`\n fragment AdFields on AdType {\n _id\n active\n clicks\n createdAt\n end\n impressions\n resource {\n adDescription\n adImage\n adStyle\n adTitle\n adType\n resourceId\n resourceName\n resourceRegion\n resourceType\n }\n showOn\n start\n status\n targetRegion\n updatedAt\n }\n`;\n\nexport const GET_ADS = gql`\n query getAds {\n ads {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const GET_AD = gql`\n query getAd($_id: ID!) {\n ad(_id: $_id) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n\nexport const GET_ADS_BY_REGION = gql`\n query getAdsByRegion($region: String!, $status: AdStatusTypeEnum) {\n adsByRegion(region: $region, status: $status) {\n ...AdFields\n }\n }\n ${AD_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { GET_ADS, GET_AD, GET_ADS_BY_REGION } from \"src/graphql/queries/ad\";\nimport { AdType, EnumAdStatus } from \"src/types\";\n\nexport const useGetAds = () => {\n const { data, loading, error, refetch } = useQuery<{ ads: AdType[] }>(\n GET_ADS,\n {\n fetchPolicy: \"no-cache\",\n },\n );\n\n return {\n ads: data?.ads || [],\n error,\n loading,\n refetch,\n };\n};\n\nexport const useGetAd = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{ ad: AdType }>(GET_AD, {\n fetchPolicy: \"no-cache\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n return {\n ad: data?.ad,\n error,\n loading,\n refetch,\n };\n};\n\nexport const useGetAdsByRegion = (region: string, status?: EnumAdStatus) => {\n const { data, loading, error, refetch } = useQuery<{\n adsByRegion: AdType[];\n }>(GET_ADS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region || region === \"\",\n variables: { region, status },\n });\n\n return {\n adsByRegion: data?.adsByRegion || [],\n error,\n loading,\n refetch,\n };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport { CREATE_RESOURCE_ACTIVITY_MUTATION } from \"src/graphql/mutations/resourceActivities\";\n\nexport const useCreateResourceActivity = () => {\n const [createResourceActivity, { loading, error }] = useMutation(\n CREATE_RESOURCE_ACTIVITY_MUTATION,\n );\n\n return { createResourceActivity, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const CREATE_RESOURCE_ACTIVITY_MUTATION = gql`\n mutation createResourceActivity($input: ResourceActivityInputType!) {\n createResourceActivity(input: $input)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport { GET_RESOURCE_ACTIVITY } from \"src/graphql/queries/resourceActivities\";\nimport { ResourceActivityType } from \"src/types\";\n\nexport const useGetResourceActivity = (\n resourceId: string,\n resourceType: EnumResourceType,\n) => {\n const { data, loading, error, refetch } = useQuery<{\n resourceActivity: ResourceActivityType;\n }>(GET_RESOURCE_ACTIVITY, {\n fetchPolicy: \"network-only\",\n variables: { resourceId, resourceType },\n });\n\n return {\n error,\n loading,\n refetch,\n resourceActivity: data?.resourceActivity || null,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { LOCATION_GEO_FIELDS_FRAGMENT } from \"./global\";\n\nconst RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment ResourceActivityFields on ResourceActivityType {\n resourceId\n resourceType\n activity {\n activityType\n location {\n ...LocationGeoFields\n }\n dateStatus\n startDate\n startTime\n timestamp\n userAgent\n userId\n }\n }\n ${LOCATION_GEO_FIELDS_FRAGMENT}\n`;\n\nexport const GET_RESOURCE_ACTIVITY = gql`\n query getResourceActivity(\n $resourceType: ResourceTypeEnum!\n $resourceId: ID!\n ) {\n resourceActivity(resourceType: $resourceType, resourceId: $resourceId) {\n ...ResourceActivityFields\n }\n }\n ${RESOURCE_ACTIVITY_FIELDS_FRAGMENT}\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n GET_USER,\n GET_USER_EVENTS,\n GET_USER_VENDORS,\n} from \"src/graphql/queries/user\";\nimport { UserLicenceType } from \"src/types\";\n\nimport {\n CANCEL_SUBSCRIPTION_MUTATION,\n CREATE_CHECKOUT_SESSION_MUTATION,\n CREATE_CUSTOMER_PORTAL,\n SELECT_PACKAGE_MUTATION,\n UPDATE_SUBSCRIPTION_PLAN_MUTATION,\n} from \"../../mutations/stripe\";\n\nexport const useCreateCheckoutSession = () => {\n const [createCheckoutSession, { loading, error }] = useMutation(\n CREATE_CHECKOUT_SESSION_MUTATION,\n );\n\n return { createCheckoutSession, error, loading };\n};\n\nexport const useCancelSubscription = () => {\n const [cancelSubscription, { loading, error }] = useMutation(\n CANCEL_SUBSCRIPTION_MUTATION,\n );\n\n return { cancelSubscription, error, loading };\n};\n\nexport const useUpdateSubscriptionPlan = () => {\n const [updateSubscriptionPlan, { loading, error }] = useMutation(\n UPDATE_SUBSCRIPTION_PLAN_MUTATION,\n );\n\n return { error, loading, updateSubscriptionPlan };\n};\n\nexport const useCreateCustomerPortal = () => {\n const [createCustomerPortal, { loading, error }] = useMutation(\n CREATE_CUSTOMER_PORTAL,\n );\n\n return { createCustomerPortal, error, loading };\n};\n\nexport const useSelectPackage = () => {\n const [selectPackage, { loading, error }] = useMutation<{\n selectPackage: {\n checkoutUrl?: string;\n userId: string;\n message: string;\n licences: UserLicenceType[];\n };\n }>(SELECT_PACKAGE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract userId from the mutation response\n const userId = mutationResult?.data?.selectPackage?.userId;\n\n if (!userId) return [];\n\n return [\n { query: GET_USER, variables: { _id: userId } },\n { query: GET_USER_EVENTS },\n { query: GET_USER_VENDORS },\n ];\n },\n });\n\n return { error, loading, selectPackage };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { LICENCE_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const CREATE_CHECKOUT_SESSION_MUTATION = gql`\n mutation createCheckoutSession(\n $planId: LicencesEnumType!\n $billingPeriod: BillingPeriodEnumType\n ) {\n createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {\n sessionId\n checkoutUrl\n }\n }\n`;\n\nexport const CANCEL_SUBSCRIPTION_MUTATION = gql`\n mutation cancelSubscription {\n cancelSubscription\n }\n`;\n\nexport const UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql`\n mutation updateSubscriptionPlan(\n $newPlanId: LicencesEnumType!\n $billingPeriod: BillingPeriodEnumType\n ) {\n updateSubscriptionPlan(\n newPlanId: $newPlanId\n billingPeriod: $billingPeriod\n ) {\n subscriptionId\n status\n priceId\n currentPlan\n }\n }\n`;\n\nexport const CREATE_CUSTOMER_PORTAL = gql`\n mutation createCustomerPortal($returnUrl: String) {\n createCustomerPortal(returnUrl: $returnUrl) {\n portalUrl\n }\n }\n`;\n\nexport const SELECT_PACKAGE_MUTATION = gql`\n mutation selectPackage(\n $billingPeriod: BillingPeriodEnumType\n $selectedLicence: LicencesEnumType!\n $useStripe: Boolean\n ) {\n selectPackage(\n billingPeriod: $billingPeriod\n selectedLicence: $selectedLicence\n useStripe: $useStripe\n ) {\n checkoutUrl\n licences {\n ...LicenceFields\n }\n userId\n message\n }\n }\n ${LICENCE_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n SubscriptionStatusData,\n SubscriptionPlansResponse,\n} from \"../../../types/user\";\nimport {\n GET_SUBSCRIPTION_STATUS,\n GET_SUBSCRIPTION_PLANS,\n} from \"../../queries/stripe\";\n\nexport const useGetSubscriptionStatus = () => {\n const { data, loading, error, refetch } = useQuery<{\n getSubscriptionStatus: SubscriptionStatusData;\n }>(GET_SUBSCRIPTION_STATUS);\n\n return {\n data: data?.getSubscriptionStatus,\n error,\n loading,\n refetch,\n };\n};\n\nexport const useGetSubscriptionPlans = () => {\n const { data, loading, error, refetch } = useQuery<{\n getSubscriptionPlans: SubscriptionPlansResponse;\n }>(GET_SUBSCRIPTION_PLANS);\n\n return {\n data: data?.getSubscriptionPlans,\n error,\n loading,\n refetch,\n };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const GET_SUBSCRIPTION_STATUS = gql`\n query getSubscriptionStatus {\n getSubscriptionStatus {\n subscriptionId\n status\n priceId\n currentPlan\n }\n }\n`;\n\nexport const GET_SUBSCRIPTION_PLANS = gql`\n query getSubscriptionPlans {\n getSubscriptionPlans {\n plans {\n name\n description\n licenceType\n billingPeriod\n stripeProductId\n stripePriceId\n isEligibleForDiscount\n pricing {\n basePrice\n discountedPrice\n hasDiscount\n discountPercent\n discountAmount\n currency\n formattedBasePrice\n formattedDiscountedPrice\n }\n }\n isNewUser\n isTester\n appliedDiscountType\n }\n }\n`;\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_PARTNER_MUTATION,\n DELETE_PARTNER_MUTATION,\n UPDATE_PARTNER_MUTATION,\n} from \"src/graphql/mutations/partner\";\nimport { GET_USER_PARTNERS } from \"src/graphql/queries/user\";\n\nexport const useCreatePartner = () => {\n const [createPartner, { loading, error }] = useMutation(\n CREATE_PARTNER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_PARTNERS }],\n },\n );\n\n return { createPartner, error, loading };\n};\n\nexport const useUpdatePartner = () => {\n const [updatePartner, { loading, error }] = useMutation(\n UPDATE_PARTNER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_PARTNERS }],\n },\n );\n\n return { error, loading, updatePartner };\n};\n\nexport const useDeletePartner = () => {\n const [deletePartner, { loading, error }] = useMutation(\n DELETE_PARTNER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_PARTNERS }],\n },\n );\n\n return { deletePartner, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { PARTNER } from \"../queries/partner\";\n\nexport const CREATE_PARTNER_MUTATION = gql`\n mutation createPartner($input: PartnerInputType!) {\n createPartner(input: $input) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const UPDATE_PARTNER_MUTATION = gql`\n mutation updatePartner($_id: ID!, $input: PartnerInputType!) {\n updatePartner(_id: $_id, input: $input) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const DELETE_PARTNER_MUTATION = gql`\n mutation deletePartner($_id: ID!) {\n deletePartner(_id: $_id)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { PartnerType } from \"src/types/partner\";\n\nimport { UseGetResourcesByRegionOptions } from \"../../../types/global\";\nimport {\n GET_PARTNER,\n GET_PARTNERS,\n GET_PARTNERS_BY_REGION,\n SEARCH_PARTNERS,\n} from \"../../queries/partner\";\n\nexport const useGetPartners = () => {\n const { loading, error, data, refetch } = useQuery<{\n partners: PartnerType[];\n }>(GET_PARTNERS, {\n fetchPolicy: \"network-only\",\n });\n const partners = data?.partners || [];\n\n return {\n error,\n loading,\n partners,\n refetch,\n };\n};\n\nexport const useGetPartner = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ partner: PartnerType }>(\n GET_PARTNER,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const partner = data?.partner;\n\n return { error, loading, partner, refetch };\n};\n\nexport const useGetPartnersByRegion = (\n region: string,\n options?: UseGetResourcesByRegionOptions,\n) => {\n const variables = {\n options,\n region,\n };\n const { loading, error, data, refetch, fetchMore } = useQuery<{\n partnersByRegion: PartnerType[];\n }>(GET_PARTNERS_BY_REGION, {\n fetchPolicy: \"network-only\",\n skip: !region || region === \"\",\n variables,\n });\n\n const partnersByRegion = data?.partnersByRegion || [];\n\n return {\n error,\n fetchMore,\n loading,\n partnersByRegion,\n refetch,\n };\n};\n\nexport const useSearchPartners = (search: string, region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n partnersSearch: PartnerType[];\n }>(SEARCH_PARTNERS, {\n fetchPolicy: \"network-only\",\n skip: search.length < 3 || !region || region === \"\",\n variables: { region, search },\n });\n\n const partnersSearch = data?.partnersSearch || [];\n\n return { error, loading, partnersSearch, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_POST_MUTATION,\n DELETE_POST_MUTATION,\n UPDATE_POST_MUTATION,\n} from \"src/graphql/mutations/post\";\nimport { GET_POSTS } from \"src/graphql/queries/post\";\n\nexport const useCreatePost = () => {\n const [createPost, { loading, error }] = useMutation(CREATE_POST_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_POSTS }],\n });\n\n return { createPost, error, loading };\n};\n\nexport const useUpdatePost = () => {\n const [updatePost, { loading, error }] = useMutation(UPDATE_POST_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_POSTS }],\n });\n\n return { error, loading, updatePost };\n};\n\nexport const useDeletePost = () => {\n const [deletePost, { loading, error }] = useMutation(DELETE_POST_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_POSTS }],\n });\n\n return { deletePost, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { POST_FIELDS_FRAGMENT } from \"../queries/post\";\n\nexport const CREATE_POST_MUTATION = gql`\n mutation createPost($input: PostInputType!) {\n createPost(input: $input) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_POST_MUTATION = gql`\n mutation updatePost($_id: ID!, $input: PostInputType!) {\n updatePost(_id: $_id, input: $input) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_POST_MUTATION = gql`\n mutation deletePost($_id: ID!) {\n deletePost(_id: $_id)\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT } from \"./game/dailyClue\";\nimport { PUZZLE_BASE_GAME_FIELDS_FRAGMENT } from \"./game/puzzleGame\";\nimport { RESOURCE_IMAGE_FIELDS_FRAGMENT } from \"./global\";\n\nconst BASE_GAME_FIELDS_FRAGMENT = gql`\n fragment BaseGameFields on BaseGameType {\n gameTypeId\n gameTitle\n gameType\n dailyClue {\n ...DailyClueBaseGameFields\n }\n miniQuiz {\n ...PuzzleBaseGameFields\n }\n oddOneOut {\n ...PuzzleBaseGameFields\n }\n }\n ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}\n ${PUZZLE_BASE_GAME_FIELDS_FRAGMENT}\n`;\n\nconst POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`\n fragment PostContentDataFields on PostContentData {\n game {\n ...BaseGameFields\n }\n textarea {\n title\n data\n }\n images {\n ...ResourceImageFields\n }\n video {\n source\n title\n }\n list {\n title\n items {\n text\n }\n }\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${BASE_GAME_FIELDS_FRAGMENT}\n`;\n\nconst POST_CONTENT_FIELDS_FRAGMENT = gql`\n fragment PostContentFields on PostContentType {\n contentData {\n ...PostContentDataFields\n }\n contentOrder\n contentType\n }\n ${POST_CONTENT_DATA_FIELDS_FRAGMENT}\n`;\n\nexport const POST_FIELDS_FRAGMENT = gql`\n fragment PostFields on PostType {\n _id\n active\n caption\n content {\n ...PostContentFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n deletedAt\n postType\n resource {\n resourceId\n resourceRegion\n resourceType\n }\n tags\n title\n updatedAt\n }\n ${POST_CONTENT_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nexport const GET_POSTS = gql`\n query getPosts {\n posts {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const GET_POST = gql`\n query getPost($_id: ID!) {\n post(_id: $_id) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n\nexport const GET_POSTS_BY_TYPE = gql`\n query getPostsByType($postType: PostTypeEnum!) {\n postsByType(postType: $postType) {\n ...PostFields\n }\n }\n ${POST_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const GAME_DATE_FIELDS_FRAGMENT = gql`\n fragment GameDateFields on GameDateType {\n startDate\n endDate\n }\n`;\n\nexport const DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT = gql`\n fragment DailyClueBaseGameFields on DailyClueBaseGameType {\n gameDate {\n ...GameDateFields\n }\n gameSolution\n }\n ${GAME_DATE_FIELDS_FRAGMENT}\n`;\n\nexport const DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql`\n fragment DailyClueGameDataFields on DailyClueGameDataType {\n gameFields {\n ...DailyClueBaseGameFields\n }\n lastFoundDate\n points\n letterInfo {\n collected\n solutionShuffled\n todaysClue\n todaysLetter\n todaysPlacement\n }\n streak\n }\n ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nconst PUZZLE_ANSWER_FIELDS_FRAGMENT = gql`\n fragment PuzzleAnswerFields on PuzzleAnswerType {\n answer\n answerId\n correct\n }\n`;\n\nconst PUZZLE_QUESTION_FIELDS_FRAGMENT = gql`\n fragment PuzzleQuestionFields on PuzzleQuestionType {\n answers {\n ...PuzzleAnswerFields\n }\n question\n questionId\n }\n ${PUZZLE_ANSWER_FIELDS_FRAGMENT}\n`;\n\nconst PUZZLE_ANSWERED_QUESTION_FIELDS_FRAGMENT = gql`\n fragment PuzzleAnsweredQuestionFields on PuzzleAnsweredQuestionType {\n questionId\n selectedAnswerId\n }\n`;\n\nexport const PUZZLE_BASE_GAME_FIELDS_FRAGMENT = gql`\n fragment PuzzleBaseGameFields on PuzzleBaseGameType {\n questions {\n ...PuzzleQuestionFields\n }\n }\n ${PUZZLE_QUESTION_FIELDS_FRAGMENT}\n`;\n\nexport const PUZZLE_GAME_DATA_FIELDS_FRAGMENT = gql`\n fragment PuzzleGameDataFields on PuzzleGameDataType {\n gameFields {\n ...PuzzleBaseGameFields\n }\n answeredQuestions {\n ...PuzzleAnsweredQuestionFields\n }\n points\n streak\n }\n ${PUZZLE_BASE_GAME_FIELDS_FRAGMENT}\n ${PUZZLE_ANSWERED_QUESTION_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n GET_POST,\n GET_POSTS,\n GET_POSTS_BY_TYPE,\n} from \"src/graphql/queries/post\";\nimport { EnumPostType, PostType } from \"src/types\";\n\nexport const useGetPosts = () => {\n const { data, loading, error, refetch } = useQuery<{\n posts: PostType[];\n }>(GET_POSTS, {\n fetchPolicy: \"network-only\",\n });\n\n return { error, loading, posts: data?.posts || [], refetch };\n};\n\nexport const useGetPost = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{\n post: PostType;\n }>(GET_POST, {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n });\n\n return { error, loading, post: data?.post, refetch };\n};\n\nexport const useGetPostsByType = (postType: EnumPostType) => {\n const { data, loading, error, refetch } = useQuery<{\n postsByType: PostType[];\n }>(GET_POSTS_BY_TYPE, {\n fetchPolicy: \"network-only\",\n skip: !postType,\n variables: { postType },\n });\n\n return { error, loading, postsByType: data?.postsByType || [], refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CRAWL_GOOGLE_MARKETS_MUTATION,\n UPDATE_APP_SETTINGS_MUTATION,\n UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION,\n} from \"src/graphql/mutations/appSettings\";\nimport { GET_APP_SETTINGS } from \"src/graphql/queries/appSettings\";\n\nexport const useUpdateAppSettings = () => {\n const [updateAppSettings, { loading, error }] = useMutation(\n UPDATE_APP_SETTINGS_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_APP_SETTINGS }],\n },\n );\n\n return { error, loading, updateAppSettings };\n};\n\nexport const useCrawlGoogleMarkets = () => {\n const [crawlGoogleMarkets, { loading, error }] = useMutation<{\n crawlGoogleMarkets: {\n message: string;\n };\n }>(CRAWL_GOOGLE_MARKETS_MUTATION);\n\n return { crawlGoogleMarkets, error, loading };\n};\n\nexport const useUpdateGoogleImportedMarkets = () => {\n const [updateGoogleImportedMarkets, { loading, error }] = useMutation<{\n updateGoogleImportedMarkets: {\n message: string;\n };\n }>(UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION);\n\n return { error, loading, updateGoogleImportedMarkets };\n};\n","import { gql } from \"@apollo/client\";\n\nexport const UPDATE_APP_SETTINGS_MUTATION = gql`\n mutation updateAppSettings($input: AppSettingsInputType!) {\n updateAppSettings(input: $input)\n }\n`;\n\nexport const CRAWL_GOOGLE_MARKETS_MUTATION = gql`\n mutation crawlGoogleMarkets {\n crawlGoogleMarkets {\n message\n }\n }\n`;\n\nexport const UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION = gql`\n mutation updateGoogleImportedMarkets {\n updateGoogleImportedMarkets {\n message\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const APP_SETTINGS_FIELDS_FRAGMENT = gql`\n fragment AppSettingsFields on AppSettingsType {\n _id\n appVersion\n createdAt\n isOfflineMode\n key\n updatedAt\n }\n`;\n\nexport const GET_APP_SETTINGS = gql`\n query getAppSettings {\n appSettings {\n ...AppSettingsFields\n }\n }\n ${APP_SETTINGS_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { GET_APP_SETTINGS } from \"src/graphql/queries/appSettings\";\nimport { AppSettingsType } from \"src/types/appSettings\";\n\nexport const useGetAppSettings = () => {\n const { loading, error, data, refetch } = useQuery<{\n appSettings: AppSettingsType;\n }>(GET_APP_SETTINGS, {\n fetchPolicy: \"network-only\",\n });\n\n const appSettings = data?.appSettings || null;\n\n return { appSettings, error, loading, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n LEAVE_GAME_MUTATION,\n START_GAME_MUTATION,\n UPDATE_DAILY_CLUE_MUTATION,\n UPDATE_PUZZLE_GAME_MUTATION,\n} from \"src/graphql/mutations/game\";\nimport { GET_GAME, GET_GAMES } from \"src/graphql/queries/game/game\";\nimport { GET_USER } from \"src/graphql/queries/user\";\nimport { GameDocType } from \"src/types\";\n\nexport const useStartGame = () => {\n const [startGame, { loading, error }] = useMutation<{\n startGame: GameDocType;\n }>(START_GAME_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract gameId from the mutation response\n const gameId = mutationResult?.data?.startGame?._id;\n const userId = mutationResult?.data?.startGame?.owner?.userId;\n\n if (!gameId || !userId) return [];\n\n return [\n {\n query: GET_GAME,\n variables: { _id: gameId }, // Pass the gameId for refetching\n },\n {\n query: GET_USER,\n variables: { _id: userId }, // Pass the userId for refetching\n },\n ];\n },\n });\n\n return { error, loading, startGame };\n};\n\nexport const useLeaveGame = () => {\n const [leaveGame, { loading, error }] = useMutation(LEAVE_GAME_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [\n {\n query: GET_GAMES,\n },\n ],\n });\n\n return { error, leaveGame, loading };\n};\n\nexport const useUpdateDailyClueGame = () => {\n const [updateDailyClueGame, { loading, error }] = useMutation<{\n updateDailyClueGame: GameDocType;\n }>(UPDATE_DAILY_CLUE_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract gameId from the mutation response\n const gameId = mutationResult?.data?.updateDailyClueGame?._id;\n\n if (!gameId) return [];\n\n return [\n {\n query: GET_GAME,\n variables: { _id: gameId }, // Pass the gameId for refetching\n },\n ];\n },\n });\n\n return { error, loading, updateDailyClueGame };\n};\n\nexport const useUpdatePuzzleGame = () => {\n const [updatePuzzleGame, { loading, error }] = useMutation<{\n updatePuzzleGame: GameDocType;\n }>(UPDATE_PUZZLE_GAME_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract gameId from the mutation response\n const gameId = mutationResult?.data?.updatePuzzleGame?._id;\n\n if (!gameId) return [];\n\n return [\n {\n query: GET_GAME,\n variables: { _id: gameId }, // Pass the gameId for refetching\n },\n ];\n },\n });\n\n return { error, loading, updatePuzzleGame };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { GAME_DOC_FIELDS_FRAGMENT } from \"../queries/game/game\";\n\nexport const START_GAME_MUTATION = gql`\n mutation startGame($input: BaseGameInputType!) {\n startGame(input: $input) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const LEAVE_GAME_MUTATION = gql`\n mutation leaveGame(\n $_id: ID!\n $gameType: GameTypeEnumType!\n $gameTypeId: String!\n ) {\n leaveGame(_id: $_id, gameType: $gameType, gameTypeId: $gameTypeId)\n }\n`;\n\nexport const UPDATE_DAILY_CLUE_MUTATION = gql`\n mutation updateDailyClueGame(\n $_id: ID!\n $foundLetter: String!\n $gameType: GameTypeEnumType!\n $gameTypeId: String!\n ) {\n updateDailyClueGame(\n _id: $_id\n foundLetter: $foundLetter\n gameType: $gameType\n gameTypeId: $gameTypeId\n ) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_PUZZLE_GAME_MUTATION = gql`\n mutation updatePuzzleGame(\n $_id: ID!\n $answeredQuestions: [PuzzleAnsweredQuestionInputType!]!\n $gameType: GameTypeEnumType!\n $gameTypeId: String!\n ) {\n updatePuzzleGame(\n _id: $_id\n answeredQuestions: $answeredQuestions\n gameType: $gameType\n gameTypeId: $gameTypeId\n ) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { OWNER_FIELDS_FRAGMENT } from \"../global\";\n\nimport {\n DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT,\n GAME_DATE_FIELDS_FRAGMENT,\n} from \"./dailyClue\";\nimport { PUZZLE_GAME_DATA_FIELDS_FRAGMENT } from \"./puzzleGame\";\n\nconst GAME_HISTORY_FIELDS_FRAGMENT = gql`\n fragment GameHistoryFields on GameHistoryType {\n createdAt\n gameDate {\n ...GameDateFields\n }\n gameStatus\n gameTitle\n gameType\n gameTypeId\n overallGamePoints\n pointsEarned\n }\n ${GAME_DATE_FIELDS_FRAGMENT}\n`;\n\nconst GAME_DATA_FIELDS_FRAGMENT = gql`\n fragment GameDataFields on GameDataType {\n dailyClue {\n ...DailyClueGameDataFields\n }\n miniQuiz {\n ...PuzzleGameDataFields\n }\n oddOneOut {\n ...PuzzleGameDataFields\n }\n }\n ${DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT}\n ${PUZZLE_GAME_DATA_FIELDS_FRAGMENT}\n`;\n\nconst GAME_FIELDS_FRAGMENT = gql`\n fragment GameFields on GameType {\n _id\n active\n createdAt\n gameData {\n ...GameDataFields\n }\n gameHistory {\n ...GameHistoryFields\n }\n gameType\n gameTypeId\n gameTitle\n updatedAt\n }\n ${GAME_DATA_FIELDS_FRAGMENT}\n ${GAME_HISTORY_FIELDS_FRAGMENT}\n`;\n\nexport const GAME_DOC_FIELDS_FRAGMENT = gql`\n fragment GameDocFields on GameDocType {\n _id\n active\n createdAt\n deletedAt\n games {\n ...GameFields\n }\n owner {\n ...OwnerFields\n }\n points\n updatedAt\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${GAME_FIELDS_FRAGMENT}\n`;\n\nexport const GET_GAMES = gql`\n query getGames {\n games {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const GET_GAME = gql`\n query getGame($_id: ID) {\n game(_id: $_id) {\n ...GameDocFields\n }\n }\n ${GAME_DOC_FIELDS_FRAGMENT}\n`;\n\nexport const GET_GAME_LEADERBOARD = gql`\n query getGameLeaderboard {\n gameLeaderboard {\n gameHistory {\n ...GameHistoryFields\n }\n overallPoints\n owner {\n ...OwnerFields\n }\n }\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${GAME_HISTORY_FIELDS_FRAGMENT}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n GET_GAME,\n GET_GAME_LEADERBOARD,\n GET_GAMES,\n} from \"src/graphql/queries/game/game\";\nimport { GameLeaderboard, GameDocType } from \"src/types/game\";\n\nexport const useGetGames = () => {\n const { loading, error, data, refetch } = useQuery<{\n games: GameDocType[];\n }>(GET_GAMES, {\n fetchPolicy: \"network-only\",\n });\n\n const games = data?.games || [];\n\n return { error, games, loading, refetch };\n};\n\nexport const useGetGame = (_id?: string | null) => {\n const { loading, error, data, refetch } = useQuery<{\n game: GameDocType | null;\n }>(GET_GAME, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: _id ? { _id } : undefined,\n });\n\n const game = data?.game || null;\n\n return { error, game, loading, refetch };\n};\n\nexport const useGetGameLeaderboard = () => {\n const { loading, error, data, refetch } = useQuery<{\n gameLeaderboard: GameLeaderboard[];\n }>(GET_GAME_LEADERBOARD, {\n fetchPolicy: \"network-only\",\n });\n\n const gameLeaderboard = data?.gameLeaderboard || [];\n\n return { error, gameLeaderboard, loading, refetch };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport {\n CREATE_SCHOOL_MUTATION,\n DELETE_SCHOOL_MUTATION,\n REQUEST_MARKETING_MATERIAL_MUTATION,\n UPDATE_SCHOOL_MUTATION,\n} from \"../../mutations/school\";\nimport { GET_SCHOOLS } from \"../../queries/school\";\n\nexport const useCreateSchool = () => {\n const [createSchool, { loading, error }] = useMutation(\n CREATE_SCHOOL_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_SCHOOLS }],\n },\n );\n\n return { createSchool, error, loading };\n};\n\nexport const useUpdateSchool = () => {\n const [updateSchool, { loading, error }] = useMutation(\n UPDATE_SCHOOL_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_SCHOOLS }],\n },\n );\n\n return { error, loading, updateSchool };\n};\n\nexport const useDeleteSchool = () => {\n const [deleteSchool, { loading, error }] = useMutation(\n DELETE_SCHOOL_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_SCHOOLS }],\n },\n );\n return { deleteSchool, error, loading };\n};\n\nexport const useRequestMarketingMaterial = () => {\n const [requestMarketingMaterial, { loading, error }] = useMutation(\n REQUEST_MARKETING_MATERIAL_MUTATION,\n );\n\n return { error, loading, requestMarketingMaterial };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { SCHOOL } from \"../queries/school\";\n\nexport const CREATE_SCHOOL_MUTATION = gql`\n mutation createSchool($input: SchoolInputType!) {\n createSchool(input: $input) {\n ...SchoolFields\n }\n }\n ${SCHOOL}\n`;\n\nexport const UPDATE_SCHOOL_MUTATION = gql`\n mutation updateSchool($_id: ID!, $input: SchoolInputType!) {\n updateSchool(_id: $_id, input: $input) {\n ...SchoolFields\n }\n }\n ${SCHOOL}\n`;\n\nexport const DELETE_SCHOOL_MUTATION = gql`\n mutation deleteSchool($_id: ID!) {\n deleteSchool(_id: $_id)\n }\n`;\n\nexport const REQUEST_MARKETING_MATERIAL_MUTATION = gql`\n mutation requestMarketingMaterial(\n $input: MarketingMaterialRequestInputType!\n ) {\n requestMarketingMaterial(input: $input) {\n message\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n} from \"./global\";\n\nconst SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT = gql`\n fragment SchoolRegisteredUsersFields on SchoolRegisteredUserType {\n _id\n active\n avatar {\n ...ResourceImageFields\n }\n email\n firstName\n lastName\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nconst SCHOOL_CAMPAIGN_FIELDS_FRAGMENT = gql`\n fragment SchoolCampaignFields on SchoolCampaignType {\n endDate\n name\n startDate\n }\n`;\n\nexport const SCHOOL = gql`\n fragment SchoolFields on SchoolType {\n _id\n active\n campaigns {\n ...SchoolCampaignFields\n }\n contactDetails {\n ...ContactDetailsFields\n }\n location {\n ...LocationFields\n }\n createdAt\n deletedAt\n logo {\n ...ResourceImageFields\n }\n name\n owner {\n ...OwnerFields\n }\n overallPoints\n ranking\n region\n studentCount\n schoolCode\n socialMedia {\n ...SocialMediaFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${SCHOOL_CAMPAIGN_FIELDS_FRAGMENT}\n`;\n\nexport const GET_SCHOOL = gql`\n query getSchool($_id: ID!) {\n school(_id: $_id) {\n school {\n ...SchoolFields\n }\n users {\n ...SchoolRegisteredUsersFields\n }\n }\n }\n ${SCHOOL}\n ${SCHOOL_REGISTERED_USERS_FIELDS_FRAGMENT}\n`;\n\nexport const GET_SCHOOLS = gql`\n query getSchools {\n schools {\n ...SchoolFields\n }\n }\n ${SCHOOL}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { SchoolReturnType, SchoolType } from \"../../../types/school\";\nimport { GET_SCHOOL, GET_SCHOOLS } from \"../../queries/school\";\n\nexport const useGetSchools = () => {\n const { data, loading, error, refetch } = useQuery<{ schools: SchoolType[] }>(\n GET_SCHOOLS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n return {\n error,\n loading,\n refetch,\n schools: data?.schools || [],\n };\n};\n\nexport const useGetSchool = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{\n school: SchoolReturnType;\n }>(GET_SCHOOL, {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: { _id },\n });\n\n return {\n error,\n loading,\n refetch,\n school: data?.school || null,\n };\n};\n","const PKG = \"@timardex/cluemart-shared\" as const;\nexport const IMAGE_EXTENSION = \".webp\" as const;\n\n/**\n * Basenames under the shared images directory — use with `getSharedImagePath` from `@timardex/cluemart-shared/images/node` (Express / Node).\n * This object is the single source of poster keys; `posters` is derived from it. Add an image with `IMAGE_EXTENSION` under `src/images/posters/` when adding an entry.\n * `images/node` reads this at runtime for `getSharedImagePath` allow-listing.\n */\nexport const posterIds = [\n \"mini-market1\",\n \"mini-market2\",\n \"mini-market3\",\n \"mini-market4\",\n \"mini-market5\",\n \"poster1\",\n \"poster2\",\n \"poster3\",\n \"poster4\",\n] as const;\n\nexport const posterFiles = Object.fromEntries(\n posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof posterIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\n/**\n * Basenames for assets under `src/images/clui/` in source; they are copied flat into `dist/images/` (same as posters).\n * `images/node` reads this at runtime for `getSharedImagePath` allow-listing.\n */\nexport const cluiIds = [\n \"cluiTui\",\n \"sima\",\n \"tablas\",\n \"telefonos\",\n \"ugralos\",\n] as const;\n\nexport const cluiFiles = Object.fromEntries(\n cluiIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof cluiIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const iconIds = [\n \"apple-maps-icon\",\n \"facebook\",\n \"google-maps-icon\",\n \"instagram\",\n \"meet\",\n \"poll\",\n \"tiktok\",\n \"tip\",\n \"waze-maps-icon\",\n \"website\",\n \"youtube\",\n] as const;\n\nexport const iconFiles = Object.fromEntries(\n iconIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof iconIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const badgeIds = [\"corporate\", \"private\", \"school\"] as const;\n\nexport const badgeFiles = Object.fromEntries(\n badgeIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof badgeIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const logoIds = [\n \"googleMaps-logo-dark\",\n \"googleMaps-logo-light\",\n \"logo-atr\",\n \"logo-dark\",\n \"logo\",\n] as const;\n\nexport const logoFiles = Object.fromEntries(\n logoIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof logoIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\nexport const otherImagesIds = [\n \"banner-horizontal\",\n \"banner-vertical\",\n \"gazebo-top\",\n \"qr-code\",\n \"store-android\",\n \"store-ios\",\n] as const;\n\nexport const otherImagesFiles = Object.fromEntries(\n otherImagesIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`]),\n) as {\n readonly [K in (typeof otherImagesIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`;\n};\n\n/**\n * Module specifiers for each poster (not resolved file URLs). Use a static import or require with these paths\n * so your bundler resolves the file, e.g.\n * `import poster1 from \"@timardex/cluemart-shared/images/poster1.webp\"`\n * or `require(\"@timardex/cluemart-shared/images/poster1.webp\")` (React Native / Metro).\n *\n * Derived from `posterFiles` so keys and filenames stay aligned.\n */\nexport const posters = Object.fromEntries(\n (\n Object.entries(posterFiles) as [\n keyof typeof posterFiles,\n (typeof posterFiles)[keyof typeof posterFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof posterFiles]: `${typeof PKG}/images/${(typeof posterFiles)[K]}`;\n};\n\n/**\n * Module specifiers for Clui assets (same flat `@…/images/<file>.webp` pattern as posters), e.g.\n * `import clui from \"@timardex/cluemart-shared/images/cluiTui.webp\"`.\n */\nexport const cluiImages = Object.fromEntries(\n (\n Object.entries(cluiFiles) as [\n keyof typeof cluiFiles,\n (typeof cluiFiles)[keyof typeof cluiFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof cluiFiles]: `${typeof PKG}/images/${(typeof cluiFiles)[K]}`;\n};\n\nexport const icons = Object.fromEntries(\n (\n Object.entries(iconFiles) as [\n keyof typeof iconFiles,\n (typeof iconFiles)[keyof typeof iconFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof iconFiles]: `${typeof PKG}/images/${(typeof iconFiles)[K]}`;\n};\n\nexport const badges = Object.fromEntries(\n (\n Object.entries(badgeFiles) as [\n keyof typeof badgeFiles,\n (typeof badgeFiles)[keyof typeof badgeFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof badgeFiles]: `${typeof PKG}/images/${(typeof badgeFiles)[K]}`;\n};\n\nexport const logos = Object.fromEntries(\n (\n Object.entries(logoFiles) as [\n keyof typeof logoFiles,\n (typeof logoFiles)[keyof typeof logoFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof logoFiles]: `${typeof PKG}/images/${(typeof logoFiles)[K]}`;\n};\n\nexport const otherImages = Object.fromEntries(\n (\n Object.entries(otherImagesFiles) as [\n keyof typeof otherImagesFiles,\n (typeof otherImagesFiles)[keyof typeof otherImagesFiles],\n ][]\n ).map(([key, file]) => [key, `${PKG}/images/${file}`]),\n) as {\n readonly [K in keyof typeof otherImagesFiles]: `${typeof PKG}/images/${(typeof otherImagesFiles)[K]}`;\n};\n\nexport type PosterAssetId = keyof typeof posters;\n\n/** A single filename under the shared images directory (values of `posterFiles`). */\nexport type PosterImageBasename = (typeof posterFiles)[PosterAssetId];\n\nexport type CluiImageId = keyof typeof cluiImages;\n\n/** Basename under the shared images directory (values of `cluiFiles`). */\nexport type CluiImageBasename = (typeof cluiFiles)[CluiImageId];\n\nexport type IconId = keyof typeof icons;\nexport type IconBasename = (typeof iconFiles)[IconId];\n\nexport type BadgeId = keyof typeof badges;\nexport type BadgeBasename = (typeof badgeFiles)[BadgeId];\n\nexport type LogoId = keyof typeof logos;\nexport type LogoBasename = (typeof logoFiles)[LogoId];\n\nexport type OtherImagesId = keyof typeof otherImages;\nexport type OtherImagesBasename = (typeof otherImagesFiles)[OtherImagesId];\n","/** Path segments for relation share URLs — must match mobile `RelationTitle` values. */\nexport const RELATION_SHARE_INVITATION = \"invitation\" as const;\nexport const RELATION_SHARE_APPLICATION = \"application\" as const;\n\nexport const RELATION_SHARE_RESOURCE_TYPES = [\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_APPLICATION,\n] as const;\n\nexport type RelationShareResourceType =\n (typeof RELATION_SHARE_RESOURCE_TYPES)[number];\n\nexport function isRelationShareResourceType(\n resourceType: string,\n): resourceType is RelationShareResourceType {\n return (RELATION_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import { CLUEMART_MAIN_DOMAIN_URL } from \"src/utils\";\n\nimport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n RELATION_SHARE_RESOURCE_TYPES,\n isRelationShareResourceType,\n type RelationShareResourceType,\n} from \"./relationShareTypes\";\n\nexport const SHARE_SITE_URL = CLUEMART_MAIN_DOMAIN_URL;\n\n/** Calendar marker for invitation market-dates share copy (U+1F4C5 📅). */\nexport const SHARE_CALENDAR_ICON = \"\\u{1F4C5}\";\n\nexport const SHARE_MARKET_DATES_SECTION_HEADING = `${SHARE_CALENDAR_ICON} Market dates:`;\n\n/** Check mark for invitation requirements share copy (U+2705 ✅). */\nexport const SHARE_CHECKMARK_ICON = \"\\u{2705}\";\n\nexport const SHARE_REQUIREMENTS_SECTION_HEADING = `${SHARE_CHECKMARK_ICON} Requirements:`;\n\n/** Information marker for tags share copy (U+2139 ℹ️). */\nexport const SHARE_INFO_ICON = \"\\u{2139}\\u{FE0F}\";\n\nexport const SHARE_TAGS_SECTION_HEADING = `${SHARE_INFO_ICON} Tags:`;\n\n/** Standalone line when `rainOrShine` is true (invitation share + OG section parsing). */\nexport const SHARE_RAIN_OR_SHINE_LINE = \"Rain or Shine\";\n\n/** Standalone line when `foodTruck` is true (application share + OG section parsing). */\nexport const SHARE_FOOD_TRUCK_LINE = \"Food Truck\";\n\n/** Prefix for application compliance line (share text + OG section parsing). */\nexport const SHARE_COMPLIANCE_PREFIX = `${SHARE_CHECKMARK_ICON} Compliance:`;\n\n/** Label tag for application categories share copy (U+1F3F7 🏷️). */\nexport const SHARE_CATEGORY_ICON = \"\\u{1F3F7}\\u{FE0F}\";\n\nexport const SHARE_CATEGORIES_SECTION_HEADING = `${SHARE_CATEGORY_ICON} Categories:`;\n\n/** Straight ruler for application stall-size share copy (U+1F4CF 📏). */\nexport const SHARE_RULER_ICON = \"\\u{1F4CF}\";\n\n/** Prefix for application stall-size line (share text + OG section parsing). */\nexport const SHARE_STALL_SIZE_PREFIX = `${SHARE_RULER_ICON} Stall size:`;\n\n/** Dollar marker for price-range share copy (U+0024 $ — text, not emoji, so it stays black). */\nexport const SHARE_DOLLAR_ICON = \"$\";\n\n/** Prefix for application price-range line (share text + OG section parsing). */\nexport const SHARE_PRICE_RANGE_PREFIX = `${SHARE_DOLLAR_ICON} Price range:`;\n\n/** Alarm clock for invitation application-deadline share copy (U+23F0 ⏰). */\nexport const SHARE_CLOCK_ICON = \"\\u{23F0}\";\n\n/** Prefix for the invitation application-deadline sentence (share text + OG section parsing). */\nexport const SHARE_APPLICATION_DEADLINE_PREFIX = `${SHARE_CLOCK_ICON} Application deadline:`;\n\n/** First line on share sheet messages, Facebook SDK quote, and `og:description`. */\nexport const SHARE_MORE_INFO_LINE = \"Shared from ClueMart\";\n\nexport const DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;\n\nexport const RESOURCE_SHARE_TYPES = [\n \"market\",\n \"stallholder\",\n \"partner\",\n] as const;\n\nexport type ResourceShareType = (typeof RESOURCE_SHARE_TYPES)[number];\n\nexport const POST_SHARE_RESOURCE_TYPES = [\n \"daily_meets\",\n \"daily_tips\",\n \"daily_games\",\n] as const;\n\nexport type PostShareResourceType = (typeof POST_SHARE_RESOURCE_TYPES)[number];\n\nexport type ShareResourceType =\n | ResourceShareType\n | PostShareResourceType\n | RelationShareResourceType;\n\nexport const SHARE_RESOURCE_LABEL: Record<ShareResourceType, string> = {\n [RELATION_SHARE_APPLICATION]: \"Application\",\n [RELATION_SHARE_INVITATION]: \"Invitation\",\n daily_games: \"Daily Game\",\n daily_meets: \"Daily Meet\",\n daily_tips: \"Daily Tip\",\n market: \"Market\",\n partner: \"Partner\",\n stallholder: \"Stallholder\",\n};\n\nexport function isPostShareResourceType(\n resourceType: ShareResourceType,\n): resourceType is PostShareResourceType {\n return (POST_SHARE_RESOURCE_TYPES as readonly string[]).includes(\n resourceType,\n );\n}\n","import type { Category } from \"../types/global\";\n\nexport function formatCategoryLabel(category: Category): string {\n const subcategoryNames = category.subcategories\n .map((subcategory) => subcategory.name)\n .filter(Boolean);\n\n if (subcategoryNames.length === 0) {\n return category.name;\n }\n\n return `${category.name} (${subcategoryNames.join(\", \")})`;\n}\n","import { SHARE_MORE_INFO_LINE } from \"./constants\";\n\n/** Blank line between share sections — title, address, dates, URL, etc. */\nexport const SHARE_DESCRIPTION_SECTION_BREAK = \"\\n\\n\";\n\n/**\n * Line break for `og:description` meta content. Use instead of `\\n` — Next.js\n * HTML serialisation collapses literal newlines to spaces; Facebook reads `&#10;`.\n */\nexport const OG_DESCRIPTION_LINE_BREAK = \"&#10;\";\n\n/** Joins OG description sections for Facebook link cards (and Twitter). */\nexport function joinShareOgDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .map((section) => (typeof section === \"string\" ? section.trim() : \"\"))\n .filter((section): section is string => section.length > 0)\n .map((section) => section.replace(/\\n/g, OG_DESCRIPTION_LINE_BREAK))\n .join(OG_DESCRIPTION_LINE_BREAK);\n}\n\nexport function joinShareDescriptionSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return sections\n .filter((section): section is string => Boolean(section))\n .join(SHARE_DESCRIPTION_SECTION_BREAK);\n}\n\n/** Prepends the standard share branding line when assembling display text. */\nexport function appendShareMoreInfoLine(description: string): string {\n const trimmed = description.trim();\n if (trimmed.startsWith(SHARE_MORE_INFO_LINE)) {\n return trimmed;\n }\n if (trimmed.length === 0) {\n return SHARE_MORE_INFO_LINE;\n }\n return joinShareDescriptionSections([SHARE_MORE_INFO_LINE, trimmed]);\n}\n","import type { StallType } from \"../types/event\";\nimport { formatDate } from \"../utils/date\";\n\nimport {\n SHARE_APPLICATION_DEADLINE_PREFIX,\n SHARE_CATEGORIES_SECTION_HEADING,\n SHARE_FOOD_TRUCK_LINE,\n SHARE_MARKET_DATES_SECTION_HEADING,\n SHARE_RAIN_OR_SHINE_LINE,\n SHARE_REQUIREMENTS_SECTION_HEADING,\n SHARE_COMPLIANCE_PREFIX,\n SHARE_PRICE_RANGE_PREFIX,\n SHARE_STALL_SIZE_PREFIX,\n SHARE_TAGS_SECTION_HEADING,\n} from \"./constants\";\nimport { formatCategoryLabel } from \"./formatCategoryLabel\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\nimport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\nexport type {\n ShareEventForInvitation,\n ShareEventInfoForInvitation,\n ShareVendorForApplication,\n ShareVendorInfoForApplication,\n} from \"./shareRelationTypes\";\n\n/** Formats event `startDate` (`DD-MM-YYYY`) for share copy — same as share preview UI. */\nexport function formatShareMarketDate(dateStr: string): string {\n return formatDate(dateStr, \"date\");\n}\n\nexport function formatStallCapacityLabel(stallCapacity: number): string {\n return stallCapacity > 0 ? ` (${stallCapacity} spaces available)` : \" - Full\";\n}\n\nexport function formatShareStallLine(stall: StallType): string {\n return ` - ${stall.label} — $${stall.price}${formatStallCapacityLabel(stall.stallCapacity)}`;\n}\n\n/** Nested market dates + per-date stall lines for invitation share copy. */\nexport function formatShareInvitationMarketDatesSection(\n dateTime: ShareEventInfoForInvitation[\"dateTime\"],\n): string {\n const dateBlocks = dateTime.map((date) => {\n const formattedDate = formatShareMarketDate(date.startDate);\n const stallLines = date.stallTypes.map(formatShareStallLine);\n return [`- ${formattedDate}`, ...stallLines].join(\"\\n\");\n });\n\n return `${SHARE_MARKET_DATES_SECTION_HEADING}\\n${dateBlocks.join(\"\\n\")}`;\n}\n\nexport function formatShareRainOrShineLine(\n rainOrShine: boolean,\n): string | null {\n return rainOrShine ? SHARE_RAIN_OR_SHINE_LINE : null;\n}\n\nexport function formatShareIsFoodTrueLine(foodTruck: boolean): string | null {\n return foodTruck ? SHARE_FOOD_TRUCK_LINE : null;\n}\n\n/** Bulleted requirements list for invitation share copy. */\nexport function formatShareInvitationRequirementsSection(\n requirements: ShareEventInfoForInvitation[\"requirements\"] | null,\n): string | null {\n const bullets = (requirements ?? [])\n .filter((item) => item.value)\n .map((item) => item.label.trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_REQUIREMENTS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\nexport function formatShareTagsSection(tags: string[]): string | null {\n const bullets = tags\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => `- ${tag}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_TAGS_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Bulleted categories list for application share copy. */\nexport function formatShareApplicationCategoriesSection(\n categories: ShareVendorForApplication[\"categories\"],\n): string | null {\n const bullets = categories\n .map((category) => formatCategoryLabel(category).trim())\n .filter((label) => label.length > 0)\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_CATEGORIES_SECTION_HEADING}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Stall dimensions line for application share copy. */\nexport function formatShareApplicationStallSizeLine(size: {\n width: string;\n depth: string;\n}): string {\n return `${SHARE_STALL_SIZE_PREFIX} ${size.width}m × ${size.depth}m`;\n}\n\n/** Bulleted compliance list for application share copy. */\nexport function formatShareApplicationComplianceSection(\n compliance: ShareVendorInfoForApplication[\"compliance\"],\n): string | null {\n const bullets = [\n compliance?.liabilityInsurance && \"Liability insurance\",\n compliance?.foodBeverageLicense && \"Food & beverage licence\",\n ]\n .filter((label): label is string => Boolean(label))\n .map((label) => `- ${label}`);\n if (bullets.length === 0) {\n return null;\n }\n return `${SHARE_COMPLIANCE_PREFIX}\\n${bullets.join(\"\\n\")}`;\n}\n\n/** Price range line for application share copy. */\nexport function formatShareApplicationPriceRangeLine(priceRange: {\n min: string;\n max: string;\n}): string {\n return `${SHARE_PRICE_RANGE_PREFIX} $${priceRange.min} – $${priceRange.max}`;\n}\n\n/** Application-deadline sentence for invitation share copy. */\nexport function formatShareInvitationApplicationDeadlineLine(\n applicationDeadlineHours: number,\n): string {\n return `${SHARE_APPLICATION_DEADLINE_PREFIX} vendors must apply at least ${applicationDeadlineHours} hours before each market date.`;\n}\n\nexport function buildInvitationShareDescription(\n event: ShareEventForInvitation,\n eventInfo: ShareEventInfoForInvitation | null | undefined,\n): string {\n const stallTypes =\n eventInfo?.dateTime?.flatMap((date) => date.stallTypes) ?? [];\n\n if (!eventInfo || stallTypes.length === 0) {\n return event.description?.trim() || \"\";\n }\n\n const sections = [\n event.location.fullAddress,\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(event.tags),\n formatShareInvitationMarketDatesSection(eventInfo.dateTime),\n formatShareInvitationApplicationDeadlineLine(\n eventInfo.applicationDeadlineHours,\n ),\n formatShareInvitationRequirementsSection(eventInfo.requirements),\n ];\n\n return joinShareDescriptionSections(sections);\n}\n\nexport function buildApplicationShareDescription(\n vendor: ShareVendorForApplication,\n vendorInfo: ShareVendorInfoForApplication | null | undefined,\n): string {\n if (!vendorInfo) {\n return vendor.description?.trim() || \"\";\n }\n\n const profileDescription = vendor.description?.trim();\n\n const sections = [\n formatShareIsFoodTrueLine(vendor.foodTruck),\n formatShareApplicationCategoriesSection(vendor.categories),\n formatShareApplicationStallSizeLine(vendorInfo.stallInfo.size),\n formatShareApplicationComplianceSection(vendorInfo.compliance),\n formatShareApplicationPriceRangeLine(vendorInfo.product.priceRange),\n profileDescription,\n ];\n\n return joinShareDescriptionSections(sections);\n}\n","import {\n formatShareIsFoodTrueLine,\n formatShareRainOrShineLine,\n formatShareTagsSection,\n} from \"./buildRelationShareDescription\";\nimport { joinShareDescriptionSections } from \"./joinShareDescriptionSections\";\n\n/** Minimal event fields for public (market) share copy — matches in-app preview. */\nexport type ShareEventForPublic = {\n description?: string | null;\n rainOrShine: boolean;\n tags: string[];\n};\n\n/** Minimal vendor fields for public (stallholder) share copy — matches in-app preview. */\nexport type ShareVendorForPublic = {\n description?: string | null;\n foodTruck: boolean;\n};\n\nexport function buildPublicEventShareDescription(\n event: ShareEventForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareRainOrShineLine(event.rainOrShine),\n formatShareTagsSection(event.tags),\n event.description?.trim(),\n ]);\n}\n\nexport function buildPublicVendorShareDescription(\n vendor: ShareVendorForPublic,\n): string {\n return joinShareDescriptionSections([\n formatShareIsFoodTrueLine(vendor.foodTruck),\n vendor.description?.trim(),\n ]);\n}\n","import {\n POST_SHARE_RESOURCE_TYPES,\n RESOURCE_SHARE_TYPES,\n SHARE_SITE_URL,\n} from \"./constants\";\nimport {\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n} from \"./relationShareTypes\";\n\n/** Path segments for public resource share URLs (markets, posts, etc.). */\nexport const PUBLIC_SHARE_PATH_TYPES = [\n ...RESOURCE_SHARE_TYPES,\n ...POST_SHARE_RESOURCE_TYPES,\n] as const;\n\nexport type PublicSharePathType = (typeof PUBLIC_SHARE_PATH_TYPES)[number];\n\nexport type RelationSharePathType =\n | typeof RELATION_SHARE_INVITATION\n | typeof RELATION_SHARE_APPLICATION;\n\nexport type ShareType = PublicSharePathType | RelationSharePathType;\n\n/** Alternation for deep-link regexes — keep in sync with {@link ShareType}. */\nexport const SHARE_TYPE_PATH_REGEX = [\n ...PUBLIC_SHARE_PATH_TYPES,\n RELATION_SHARE_APPLICATION,\n RELATION_SHARE_INVITATION,\n].join(\"|\");\n\nexport function buildShareUrl(\n type: ShareType,\n id: string,\n utmMedium: string = \"app\",\n): string {\n return `${SHARE_SITE_URL}/share/${type}/${encodeURIComponent(id)}?utm_source=share&utm_medium=${utmMedium}&utm_campaign=${type}`;\n}\n","import { SHARE_MORE_INFO_LINE, type ShareResourceType } from \"./constants\";\nimport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n} from \"./joinShareDescriptionSections\";\n\nexport {\n joinShareOgDescriptionSections,\n OG_DESCRIPTION_LINE_BREAK,\n SHARE_DESCRIPTION_SECTION_BREAK,\n};\n\n/** Trims share text and collapses spaces per line; preserves `\\n\\n` section breaks. */\nexport function normalizeShareText(value: string | null | undefined): string {\n if (value == null) {\n return \"\";\n }\n return value\n .trim()\n .split(\"\\n\")\n .map((line) => {\n const match = line.match(/^([ \\t]*)(.*)$/);\n if (!match) {\n return line;\n }\n const [, leading, rest] = match;\n return leading + rest.trim().replace(/[ \\t]{2,}/g, \" \");\n })\n .join(\"\\n\")\n .replace(/\\n{3,}/g, \"\\n\\n\");\n}\n\n/** Branding line placement — first so Facebook truncation does not drop it. */\nexport type ShareMessageFooterPlacement = \"before-body\";\n\nexport function shareMessageFooterPlacementForType(\n _shareType?: ShareResourceType,\n): ShareMessageFooterPlacement {\n return \"before-body\";\n}\n\n/**\n * Ordered sections for share-sheet / Facebook SDK quote text:\n * {@link SHARE_MORE_INFO_LINE} → title → description (full body or post caption).\n */\nexport function buildShareMessageSections(input: {\n title?: string | null;\n description?: string | null;\n shareType?: ShareResourceType;\n}): string[] {\n const title = normalizeShareText(input.title);\n const description = normalizeShareText(input.description);\n\n return [SHARE_MORE_INFO_LINE, title, description].filter(\n (section) => section.length > 0,\n );\n}\n\nexport function splitShareDescriptionSections(value: string): string[] {\n const trimmed = normalizeShareText(value);\n if (!trimmed) {\n return [];\n }\n\n if (/\\n\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n if (/\\n/.test(trimmed)) {\n return trimmed\n .split(/\\n+/)\n .map((section) => normalizeShareText(section))\n .filter((section) => section.length > 0);\n }\n\n return [trimmed];\n}\n\n/**\n * Formats share descriptions for Open Graph / Twitter meta tags.\n * Sections are joined with {@link OG_DESCRIPTION_LINE_BREAK} (`&#10;`).\n */\nexport function normalizeShareOgDescription(value: string): string {\n return joinShareOgDescriptionSections(splitShareDescriptionSections(value));\n}\n\n/**\n * Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).\n *\n * Title + blank lines + body sections. URL is omitted — `contentUrl` supplies\n * the link card (OG on `/share/*` controls card title/image).\n */\nexport function buildFacebookShareQuote(\n title: string,\n description: string,\n shareType?: ShareResourceType,\n): string | undefined {\n const sections = buildShareMessageSections({ title, description, shareType });\n const quote = sections.join(SHARE_DESCRIPTION_SECTION_BREAK).trim();\n return quote.length > 0 ? quote : undefined;\n}\n\n/**\n * Open Graph / Twitter description from pre-built section strings.\n * Prefer {@link joinShareOgDescriptionSections} when sections are already known.\n */\nexport function buildShareOgDescriptionFromSections(\n sections: ReadonlyArray<string | false | null | undefined>,\n): string {\n return joinShareOgDescriptionSections(sections);\n}\n\n/** Open Graph / Twitter description — body sections only (`og:title` is separate). */\nexport function buildShareOgDescription(\n _title: string,\n description: string,\n): string {\n return joinShareOgDescriptionSections(\n splitShareDescriptionSections(description),\n );\n}\n","import type { ShareResourceType } from \"./constants\";\n\nexport function normalizeShareRouteId(id: string): string {\n try {\n return decodeURIComponent(id);\n } catch {\n return id;\n }\n}\n\nexport function buildSharePagePath(\n resourceType: ShareResourceType,\n rawId: string,\n): string {\n return `/share/${resourceType}/${encodeURIComponent(normalizeShareRouteId(rawId))}`;\n}\n","export const SAVED_PASSWORD_KEY = \"savedPassword\";\nexport const SAVED_EMAIL_KEY = \"savedEmail\";\nexport const SAVED_TOKEN_KEY = \"savedToken\";\nexport const SAVED_REFRESH_TOKEN_KEY = \"savedRefreshToken\";\nexport const USER_STORAGE_KEY = \"authUser\";\n","export const darkColors = {\n background: \"#3D3D3F\",\n card: \"#1c1c1e\",\n primary: \"#c96520\", // burnt orange — same hue, lower brightness\n quaternary: \"#3d7a68\", // barely shifted from light — already sits well on dark\n secondary: \"#7a4f78\", // muted plum — visible but not vivid\n tertiary: \"#4e5099\", // dusty indigo\n textMuted: \"#8e8e93\",\n};\n\nexport const lightColors = {\n background: \"#ffffff\",\n card: \"#f1f2f6\",\n primary: \"#ff7a00\",\n quaternary: \"#3b7c67\",\n secondary: \"#371134\",\n tertiary: \"#191a75\",\n textMuted: \"#6c757d\",\n};\n\nexport const fonts = {\n bold: {\n fontFamily: \"Roboto-Bold\",\n fontWeight: \"700\" as const,\n },\n heavy: {\n fontFamily: \"Roboto-ExtraBold\",\n fontWeight: \"900\" as const,\n },\n medium: {\n fontFamily: \"Roboto-Medium\",\n fontWeight: \"500\" as const,\n },\n regular: {\n fontFamily: \"Roboto-Regular\",\n fontWeight: \"400\" as const,\n },\n};\n","import {\n CreateFormData,\n EnumOSPlatform,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { SafeUserType } 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 = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n promoCode?: PromoCodeType | null;\n termsAgreement?: TermsAgreement | 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 message: string;\n token: string;\n refreshToken: string | null;\n user: SafeUserType;\n};\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\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 EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\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\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: string;\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 | null;\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 AssociateType = {\n email: string;\n resourceId: string;\n resourceType: EnumResourceType;\n licence: UserLicenceType;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n associates: AssociateType[] | null;\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 owner?: OwnerType | null;\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 BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n reviewCount?: number | null;\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 interface Category {\n color?: string | 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\nexport interface UseGetResourcesByRegionOptions {\n onlyClaimed?: boolean;\n limit?: number;\n offset?: number;\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 PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\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 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};\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 clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\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\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_GAMES = \"daily_games\",\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 interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: {\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n } | 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<PostFormData, \"content\" | \"coverUpload\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | 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 overallPoints: number;\n owner: OwnerType;\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};\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","const genericMessage = \"Invariant Violation\";\nconst {\n setPrototypeOf = function (obj: any, proto: any) {\n obj.__proto__ = proto;\n return obj;\n },\n} = Object as any;\n\nexport class InvariantError extends Error {\n framesToPop = 1;\n name = genericMessage;\n constructor(message: string | number = genericMessage) {\n super(\n typeof message === \"number\"\n ? `${genericMessage}: ${message} (see https://github.com/apollographql/invariant-packages)`\n : message\n );\n setPrototypeOf(this, InvariantError.prototype);\n }\n}\n\nexport function invariant(\n condition: any,\n message?: string | number,\n): asserts condition {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\n\nconst verbosityLevels = [\"debug\", \"log\", \"warn\", \"error\", \"silent\"] as const;\nexport type VerbosityLevel = (typeof verbosityLevels)[number];\nexport type ConsoleMethodName = Exclude<VerbosityLevel, \"silent\">;\nlet verbosityLevel = verbosityLevels.indexOf(\"log\");\n\nfunction wrapConsoleMethod<M extends ConsoleMethodName>(name: M) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n const method = console[name] || console.log;\n return method.apply(console, arguments as any);\n }\n } as (typeof console)[M];\n}\n\nexport namespace invariant {\n export const debug = wrapConsoleMethod(\"debug\");\n export const log = wrapConsoleMethod(\"log\");\n export const warn = wrapConsoleMethod(\"warn\");\n export const error = wrapConsoleMethod(\"error\");\n}\n\nexport function setVerbosity(level: VerbosityLevel): VerbosityLevel {\n const old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\n\nexport default invariant;\n","/** @internal */\nexport function devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n *\n * @internal\n */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","/** @internal */\nexport function invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","/** @category Source */\nimport { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/** Represents a location in a Source. */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n * @param source - The source document that contains the position.\n * @param position - The UTF-8 character offset in the source body.\n * @returns The 1-indexed line and column for the given source position.\n * @example\n * ```ts\n * import { Source, getLocation } from 'graphql/language';\n *\n * const source = new Source('type Query { hello: String }');\n * const location = getLocation(source, 13);\n *\n * location; // => { line: 1, column: 14 }\n * ```\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n","/** @category Source */\nimport { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n * @param location - The AST location to print.\n * @returns A formatted source excerpt with line and column information.\n * @example\n * ```ts\n * import { parse, printLocation } from 'graphql/language';\n *\n * const document = parse('type Query { hello: String }');\n * const location = document.definitions[0].loc;\n *\n * if (location) {\n * const printed = printLocation(location);\n *\n * printed; // => 'GraphQL request:1:1\\n1 | type Query { hello: String }\\n | ^'\n * }\n * ```\n */\nexport function printLocation(location) {\n return printSourceLocation(\n location.source,\n getLocation(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n * @param source - The source document that contains the location.\n * @param sourceLocation - The 1-indexed line and column to print.\n * @returns A formatted source excerpt with line and column information.\n * @example\n * ```ts\n * import { Source, printSourceLocation } from 'graphql/language';\n *\n * const source = new Source('type Query { hello: String }');\n * const printed = printSourceLocation(source, { line: 1, column: 14 });\n *\n * printed; // => 'GraphQL request:1:14\\n1 | type Query { hello: String }\\n | ^'\n * ```\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","/** @category Errors */\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /** An array of GraphQL AST Nodes corresponding to this error. */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /** Original error that caused this GraphQLError, if one exists. */\n\n /** Extension fields to add to the formatted error. */\n\n /**\n * Creates a GraphQLError instance.\n * @param message - Human-readable error message.\n * @param options - Error metadata such as source locations, response path, original error, and extensions.\n * This positional-arguments constructor overload is deprecated. Use the\n * `GraphQLError(message, options)` overload instead.\n * @example\n * ```ts\n * // Create an error from AST nodes and response metadata.\n * import { parse } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const document = parse('{ greeting }');\n * const fieldNode = document.definitions[0].selectionSet.selections[0];\n * const error = new GraphQLError('Cannot query this field.', {\n * nodes: fieldNode,\n * path: ['greeting'],\n * extensions: { code: 'FORBIDDEN' },\n * });\n *\n * error.message; // => 'Cannot query this field.'\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.extensions; // => { code: 'FORBIDDEN' }\n * ```\n * @example\n * ```ts\n * // This variant derives locations from source positions and preserves the original error.\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError('Resolver failed.', {\n * source,\n * positions: [2],\n * path: ['greeting'],\n * originalError,\n * });\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * ```\n */\n\n /**\n * Creates a GraphQLError instance using the legacy positional constructor.\n * This deprecated overload will be removed in v17. Prefer the\n * `GraphQLErrorOptions` object overload, which keeps optional error metadata\n * in a single options bag.\n * @param message - Human-readable error message.\n * @param nodes - AST node or nodes associated with this error.\n * @param source - Source document used to derive error locations.\n * @param positions - Character offsets in the source document associated with\n * this error.\n * @param path - Response path where this error occurred during execution.\n * @param originalError - Original error that caused this GraphQLError, if one\n * exists.\n * @param extensions - Extension fields to include in the formatted error.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError(\n * 'Resolver failed.',\n * undefined,\n * source,\n * [2],\n * ['greeting'],\n * originalError,\n * { code: 'INTERNAL' },\n * );\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * error.extensions; // => { code: 'INTERNAL' }\n * ```\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n /**\n * Returns this error as a human-readable message with source locations.\n * @returns The formatted error string.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Cannot query field \"name\".', {\n * source: new Source('{ name }'),\n * positions: [2],\n * });\n *\n * error.toString(); // => 'Cannot query field \"name\".\\n\\nGraphQL request:1:3\\n1 | { name }\\n | ^'\n * ```\n */\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Resolver failed.', {\n * path: ['viewer', 'name'],\n * extensions: { code: 'INTERNAL' },\n * });\n *\n * error.toJSON(); // => { message: 'Resolver failed.', path: ['viewer', 'name'], extensions: { code: 'INTERNAL' } }\n * ```\n */\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/** See: https://spec.graphql.org/draft/#sec-Errors */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source. This deprecated helper is retained\n * for backwards compatibility; call `error.toString()` instead because\n * printError will be removed in v17.\n * @param error - The error to format.\n * @returns The printed string representation.\n * @example\n * ```ts\n * import { GraphQLError, printError } from 'graphql/error';\n *\n * const message = printError(new GraphQLError('Example error'));\n *\n * message; // => 'Example error'\n * ```\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification. This deprecated\n * helper is retained for backwards compatibility; call `error.toJSON()`\n * instead because formatError will be removed in v17.\n * @param error - The error to format.\n * @returns The JSON-serializable formatted error.\n * @example\n * ```ts\n * import { GraphQLError, formatError } from 'graphql/error';\n *\n * const formatted = formatError(new GraphQLError('Example error'));\n *\n * formatted; // => { message: 'Example error' }\n * ```\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n","/** @category Errors */\nimport { GraphQLError } from './GraphQLError.mjs';\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n * @param source - The GraphQL source containing the syntax error.\n * @param position - Character offset where the syntax error was encountered.\n * @param description - Human-readable description of the syntax error.\n * @returns A GraphQLError located at the syntax error position.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { syntaxError } from 'graphql/error';\n *\n * const error = syntaxError(new Source('query {'), 7, 'Expected Name');\n *\n * error.message; // => 'Syntax Error: Expected Name'\n * error.locations; // => [{ line: 1, column: 8 }]\n * ```\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","/** @category AST */\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The Token at which this Node begins. */\n\n /** The Token at which this Node ends. */\n\n /** The Source document the AST represents. */\n\n /**\n * Creates a Location instance.\n * @param startToken - The start token.\n * @param endToken - The end token.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Location, Source, Token, TokenKind } from 'graphql/language';\n *\n * const source = new Source('{ hello }');\n * const startToken = new Token(TokenKind.BRACE_L, 0, 1, 1, 1);\n * const endToken = new Token(TokenKind.BRACE_R, 8, 9, 1, 9);\n * const location = new Location(startToken, endToken, source);\n *\n * location.start; // => 0\n * location.end; // => 9\n * location.source.body; // => '{ hello }'\n * ```\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n /**\n * Returns a JSON representation of this location.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { parse } from 'graphql/language';\n *\n * const document = parse('{ hello }');\n * const location = document.loc?.toJSON();\n *\n * location; // => { start: 0, end: 9 }\n * ```\n */\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /** The kind of Token. */\n\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The 1-indexed line number on which this Token appears. */\n\n /** The 1-indexed column number at which this Token begins. */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n\n /** Next token in the token stream, including ignored tokens. */\n\n /**\n * Creates a Token instance.\n * @param kind - Token kind produced by lexical analysis.\n * @param start - Character offset where this token begins.\n * @param end - Character offset where this token ends.\n * @param line - One-indexed line number where this token begins.\n * @param column - One-indexed column number where this token begins.\n * @param value - Interpreted value for non-punctuation tokens.\n * @example\n * ```ts\n * import { Token, TokenKind } from 'graphql/language';\n *\n * const token = new Token(TokenKind.NAME, 2, 7, 1, 3, 'hello');\n *\n * token.kind; // => TokenKind.NAME\n * token.value; // => 'hello'\n * token.toJSON(); // => { kind: 'Name', value: 'hello', line: 1, column: 3 }\n * ```\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n /**\n * Returns a JSON representation of this token.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance().toJSON();\n *\n * token; // => { kind: '{', value: undefined, line: 1, column: 1 }\n * ```\n */\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/** The list of all possible AST node types. */\n\n/** @internal */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'description',\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: [\n 'description',\n 'variable',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'description',\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: [\n 'description',\n 'name',\n 'arguments',\n 'directives',\n 'locations',\n ],\n SchemaExtension: ['directives', 'operationTypes'],\n DirectiveExtension: ['name', 'directives'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n TypeCoordinate: ['name'],\n MemberCoordinate: ['name', 'memberName'],\n ArgumentCoordinate: ['name', 'fieldName', 'argumentName'],\n DirectiveCoordinate: ['name'],\n DirectiveArgumentCoordinate: ['name', 'argumentName'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/** @internal */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** An identifier in a GraphQL document. */\n\n/**\n * The operation types supported by GraphQL executable definitions.\n * @category Kinds\n */\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n/** A variable declaration in an operation or legacy fragment definition. */\n","/** @category Kinds */\n\n/** The set of allowed directive location values. */\nvar DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n DirectiveLocation['DIRECTIVE_DEFINITION'] = 'DIRECTIVE_DEFINITION';\n})(DirectiveLocation || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * Deprecated legacy alias for the enum type representing directive location\n * values. This alias will be removed in v17. In v17, `DirectiveLocation` is\n * exported as the single public symbol for both the runtime object and the\n * corresponding TypeScript type.\n * @deprecated Will be removed in v17. In v17, use `DirectiveLocation` as both\n * the runtime value and the type.\n */\n","/** @category Kinds */\n\n/** The set of allowed kind values for AST nodes. */\nvar Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['DIRECTIVE_EXTENSION'] = 'DirectiveExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n Kind['TYPE_COORDINATE'] = 'TypeCoordinate';\n Kind['MEMBER_COORDINATE'] = 'MemberCoordinate';\n Kind['ARGUMENT_COORDINATE'] = 'ArgumentCoordinate';\n Kind['DIRECTIVE_COORDINATE'] = 'DirectiveCoordinate';\n Kind['DIRECTIVE_ARGUMENT_COORDINATE'] = 'DirectiveArgumentCoordinate';\n})(Kind || (Kind = {}));\n\nexport { Kind };\n/**\n * Deprecated legacy alias for the enum type representing the possible kind\n * values of AST nodes. This alias will be removed in v17. In v17, `Kind` is\n * exported as the single public symbol for both the runtime object and the\n * corresponding TypeScript type.\n * @deprecated Will be removed in v17. In v17, use `Kind` as both the runtime\n * value and the type.\n */\n","/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nexport function isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nexport function isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nexport function isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nexport function isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","import { isWhiteSpace } from './characterClasses.mjs';\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\n\nexport function dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (i < str.length && isWhiteSpace(str.charCodeAt(i))) {\n ++i;\n }\n\n return i;\n}\n/** @internal */\n\nexport function isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","/** @category Lexing */\n\n/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '<SOF>';\n TokenKind['EOF'] = '<EOF>';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['DOT'] = '.';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (TokenKind = {}));\n\nexport { TokenKind };\n/**\n * Deprecated legacy alias for the enum type representing token kind values.\n * This alias will be removed in v17. In v17, `TokenKind` is exported as the\n * single public symbol for both the runtime object and the corresponding\n * TypeScript type.\n * @deprecated Will be removed in v17. In v17, use `TokenKind` as both the\n * runtime value and the type.\n */\n","/** @category Lexing */\nimport { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * A Lexer interface which provides common properties and methods required for\n * lexing GraphQL source.\n *\n * @internal\n */\n\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\nexport class Lexer {\n /** Source document used to derive error locations. */\n\n /** Most recent non-ignored token returned by the lexer. */\n\n /** Current non-ignored token at the lexer cursor. */\n\n /** The (1-indexed) line containing the current token. */\n\n /** Character offset where the current line starts. */\n\n /**\n * Creates a Lexer instance.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Lexer, Source, TokenKind } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n *\n * lexer.token.kind; // => TokenKind.SOF\n * lexer.advance().kind; // => TokenKind.BRACE_L\n * lexer.advance().value; // => 'hello'\n * lexer.advance().kind; // => TokenKind.BRACE_R\n * ```\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n * @returns The next non-ignored token.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance();\n *\n * token.kind; // => '{'\n * lexer.token; // => token\n * ```\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n * @returns The next non-ignored token without advancing the lexer.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.lookahead();\n *\n * token.kind; // => '{'\n * lexer.token.kind; // => '<SOF>'\n * ```\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/** @internal */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.DOT ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n *\n * @internal\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n *\n * @internal\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n *\n * @internal\n */\n\nexport function printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n *\n * @internal\n */\n\nexport function createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n *\n * @internal\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n *\n * @internal\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n *\n * @internal\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n *\n * @internal\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n *\n * @internal\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n *\n * @internal\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n *\n * @internal\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n *\n * @internal\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n *\n * @internal\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n *\n * @internal\n */\n\nexport function readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","const MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n *\n * @internal\n */\n\nexport function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","import { inspect } from './inspect.mjs';\n/* c8 ignore next 3 */\n\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n *\n * @internal\n */\n\nexport const instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = inspect(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\n","/** @category Source */\nimport { devAssert } from '../jsutils/devAssert.mjs';\nimport { inspect } from '../jsutils/inspect.mjs';\nimport { instanceOf } from '../jsutils/instanceOf.mjs';\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n /** The GraphQL source text. */\n\n /** Name used in diagnostics for this source, such as a file path or request name. */\n\n /** One-indexed line and column where this source begins. */\n\n /**\n * Creates a Source instance.\n * @param body - The GraphQL source text.\n * @param name - Name used in diagnostics for this source.\n * @param locationOffset - One-indexed line and column where this source begins.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n *\n * const source = new Source(\n * 'type Query { greeting: String }',\n * 'schema.graphql',\n * { line: 10, column: 1 },\n * );\n *\n * source.body; // => 'type Query { greeting: String }'\n * source.name; // => 'schema.graphql'\n * source.locationOffset; // => { line: 10, column: 1 }\n * ```\n */\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n devAssert(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n devAssert(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","/** @category Parsing */\nimport { syntaxError } from '../error/syntaxError.mjs';\nimport { Location, OperationTypeNode } from './ast.mjs';\nimport { DirectiveLocation } from './directiveLocation.mjs';\nimport { Kind } from './kinds.mjs';\nimport { isPunctuatorTokenKind, Lexer } from './lexer.mjs';\nimport { SchemaCoordinateLexer } from './schemaCoordinateLexer.mjs';\nimport { isSource, Source } from './source.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/** Configuration options to control parser behavior */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n * @param source - A GraphQL source string or source object.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL document AST.\n * @example\n * ```ts\n * // Parse a GraphQL document with the default parser options.\n * import { parse } from 'graphql/language';\n *\n * const document = parse('{ hero { name } }');\n *\n * document.kind; // => 'Document'\n * ```\n * @example\n * ```ts\n * // This variant enables parser options and provides an explicit lexer.\n * import { Lexer, Source, parse } from 'graphql/language';\n *\n * const document = parse('fragment A($var: Boolean) on Query { field }', {\n * allowLegacyFragmentVariables: true,\n * maxTokens: 20,\n * noLocation: true,\n * });\n * const directiveDocument = parse('directive @foo @bar on FIELD', {\n * experimentalDirectivesOnDirectiveDefinitions: true,\n * });\n * const source = new Source('{ hero }');\n * const lexerDocument = parse(source, { lexer: new Lexer(source) });\n *\n * document.definitions[0].kind; // => 'FragmentDefinition'\n * document.loc; // => undefined\n * directiveDocument.definitions[0].kind; // => 'DirectiveDefinition'\n * lexerDocument.definitions[0].kind; // => 'OperationDefinition'\n * ```\n */\nexport function parse(source, options) {\n const parser = new Parser(source, options);\n const document = parser.parseDocument();\n Object.defineProperty(document, 'tokenCount', {\n enumerable: false,\n value: parser.tokenCount,\n });\n return document;\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n * @param source - A GraphQL source string or source object containing a value.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL value AST.\n * @example\n * ```ts\n * import { parseValue } from 'graphql/language';\n *\n * const value = parseValue('[42]');\n *\n * value.kind; // => 'ListValue'\n * ```\n */\n\nexport function parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n * @param source - A GraphQL source string or source object containing a constant value.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL constant value AST.\n * @example\n * ```ts\n * import { parseConstValue } from 'graphql/language';\n *\n * const value = parseConstValue('{ enabled: true }');\n *\n * value.kind; // => 'ObjectValue'\n * parseConstValue('$variable'); // throws an error\n * ```\n */\n\nexport function parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n * @param source - A GraphQL source string or source object containing a type reference.\n * @param options - Optional parser configuration.\n * @returns The parsed GraphQL type AST.\n * @example\n * ```ts\n * import { parseType } from 'graphql/language';\n *\n * const type = parseType('[String!]');\n *\n * type.kind; // => 'ListType'\n * ```\n */\n\nexport function parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * Given a string containing a GraphQL Schema Coordinate (ex. `Type.field`),\n * parse the AST for that schema coordinate.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * Consider providing the results to the utility function:\n * resolveASTSchemaCoordinate(). Or calling resolveSchemaCoordinate() directly\n * with an unparsed source.\n * @param source - A GraphQL source string or source object containing a schema coordinate.\n * @returns The parsed GraphQL schema coordinate AST.\n * @example\n * ```ts\n * import { parseSchemaCoordinate } from 'graphql/language';\n *\n * const coordinate = parseSchemaCoordinate('Query.hero');\n *\n * coordinate.kind; // => 'MemberCoordinate'\n * ```\n */\n\nexport function parseSchemaCoordinate(source) {\n const sourceObj = isSource(source) ? source : new Source(source);\n const lexer = new SchemaCoordinateLexer(sourceObj);\n const parser = new Parser(source, {\n lexer,\n });\n parser.expectToken(TokenKind.SOF);\n const coordinate = parser.parseSchemaCoordinate();\n parser.expectToken(TokenKind.EOF);\n return coordinate;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport class Parser {\n constructor(source, options = {}) {\n const { lexer, ..._options } = options;\n\n if (lexer) {\n this._lexer = lexer;\n } else {\n const sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n }\n\n this._options = _options;\n this._tokenCounter = 0;\n }\n\n get tokenCount() {\n return this._tokenCounter;\n }\n /**\n * Converts a name lex token into a name parse node.\n *\n * @internal\n */\n\n parseName() {\n const token = this.expectToken(TokenKind.NAME);\n return this.node(token, {\n kind: Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n *\n * @internal\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: Kind.DOCUMENT,\n definitions: this.many(\n TokenKind.SOF,\n this.parseDefinition,\n TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n *\n * @internal\n */\n\n parseDefinition() {\n if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (hasDescription && keywordToken.kind === TokenKind.BRACE_L) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are not supported on shorthand queries.',\n );\n }\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n }\n\n if (hasDescription) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, only GraphQL definitions support descriptions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n *\n * @internal\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation: OperationTypeNode.QUERY,\n description: undefined,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const description = this.parseDescription();\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: Kind.OPERATION_DEFINITION,\n operation,\n description,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n *\n * @internal\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return OperationTypeNode.QUERY;\n\n case 'mutation':\n return OperationTypeNode.MUTATION;\n\n case 'subscription':\n return OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n *\n * @internal\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseVariableDefinition,\n TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n *\n * @internal\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: Kind.VARIABLE_DEFINITION,\n description: this.parseDescription(),\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n *\n * @internal\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return this.node(start, {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n *\n * @internal\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: Kind.SELECTION_SET,\n selections: this.many(\n TokenKind.BRACE_L,\n this.parseSelection,\n TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n *\n * @internal\n */\n\n parseSelection() {\n return this.peek(TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n *\n * @internal\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n *\n * @internal\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n *\n * @internal\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n *\n * @internal\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return this.node(start, {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n *\n * @internal\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n description,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: Kind.FRAGMENT_DEFINITION,\n description,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n *\n * @internal\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n *\n * @internal\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.INT,\n value: token.value,\n });\n\n case TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.FLOAT,\n value: token.value,\n });\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: Kind.ENUM,\n value: token.value,\n });\n }\n\n case TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n *\n * @internal\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n *\n * @internal\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n *\n * @internal\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return this.node(start, {\n kind: Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n *\n * @internal\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n *\n * @internal\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return this.node(start, {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n *\n * @internal\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return this.node(start, {\n kind: Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n *\n * @internal\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n *\n * @internal\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n *\n * @internal\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n *\n * @internal\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n *\n * @internal\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n *\n * @internal\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseFieldDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n *\n * @internal\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n *\n * @internal\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n TokenKind.PAREN_L,\n this.parseInputValueDef,\n TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n *\n * @internal\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n *\n * @internal\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n *\n * @internal\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n *\n * @internal\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS)\n ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n *\n * @internal\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n *\n * @internal\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n *\n * @internal\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw syntaxError(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n *\n * @internal\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n *\n * @internal\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n TokenKind.BRACE_L,\n this.parseInputValueDef,\n TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n * - DirectiveDefinitionExtension\n *\n * @internal\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n\n case 'directive':\n if (this._options.experimentalDirectivesOnDirectiveDefinitions) {\n return this.parseDirectiveDefinitionExtension();\n }\n\n break;\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n *\n * @internal\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n *\n * @internal\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n *\n * @internal\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n *\n * @internal\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n *\n * @internal\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n *\n * @internal\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n *\n * @internal\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n\n parseDirectiveDefinitionExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: Kind.DIRECTIVE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n *\n * @internal\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const directives = this._options\n .experimentalDirectivesOnDirectiveDefinitions\n ? this.parseConstDirectives()\n : [];\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n directives,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n *\n * @internal\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n * `DIRECTIVE_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Schema Coordinates\n\n /**\n * SchemaCoordinate :\n * - Name\n * - Name . Name\n * - Name . Name ( Name : )\n * - \\@ Name\n * - \\@ Name ( Name : )\n * @returns Parsed schema coordinate AST.\n * @example\n * ```ts\n * import { Parser, Source } from 'graphql/language';\n *\n * const typeCoordinate = new Parser(new Source('User.name')).parseSchemaCoordinate();\n * const directiveCoordinate = new Parser(new Source('@include(if:)')).parseSchemaCoordinate();\n *\n * typeCoordinate.name.value; // => 'User'\n * typeCoordinate.memberName?.value; // => 'name'\n * directiveCoordinate.name.value; // => 'deprecated'\n * directiveCoordinate.argumentName?.value; // => 'reason'\n * ```\n */\n\n parseSchemaCoordinate() {\n const start = this._lexer.token;\n const ofDirective = this.expectOptionalToken(TokenKind.AT);\n const name = this.parseName();\n let memberName;\n\n if (!ofDirective && this.expectOptionalToken(TokenKind.DOT)) {\n memberName = this.parseName();\n }\n\n let argumentName;\n\n if (\n (ofDirective || memberName) &&\n this.expectOptionalToken(TokenKind.PAREN_L)\n ) {\n argumentName = this.parseName();\n this.expectToken(TokenKind.COLON);\n this.expectToken(TokenKind.PAREN_R);\n }\n\n if (ofDirective) {\n if (argumentName) {\n return this.node(start, {\n kind: Kind.DIRECTIVE_ARGUMENT_COORDINATE,\n name,\n argumentName,\n });\n }\n\n return this.node(start, {\n kind: Kind.DIRECTIVE_COORDINATE,\n name,\n });\n } else if (memberName) {\n if (argumentName) {\n return this.node(start, {\n kind: Kind.ARGUMENT_COORDINATE,\n name,\n fieldName: memberName,\n argumentName,\n });\n }\n\n return this.node(start, {\n kind: Kind.MEMBER_COORDINATE,\n name,\n memberName,\n });\n }\n\n return this.node(start, {\n kind: Kind.TYPE_COORDINATE,\n name,\n });\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n *\n * @internal\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n *\n * @internal\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n *\n * @internal\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n *\n * @internal\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n *\n * @internal\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n *\n * @internal\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n *\n * @internal\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n *\n * @internal\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n *\n * @internal\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n *\n * @internal\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n *\n * @internal\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (token.kind !== TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (maxTokens !== undefined && this._tokenCounter > maxTokens) {\n throw syntaxError(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n *\n * @internal\n */\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n *\n * @internal\n */\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? `\"${kind}\"` : kind;\n}\n","import { parse } from 'graphql';\n\nimport {\n DocumentNode,\n DefinitionNode,\n Location,\n} from 'graphql/language/ast';\n\n// A map docString -> graphql document\nconst docCache = new Map<string, DocumentNode>();\n\n// A map fragmentName -> [normalized source]\nconst fragmentSourceMap = new Map<string, Set<string>>();\n\nlet printFragmentWarnings = true;\nlet experimentalFragmentVariables = false;\n\n// Strip insignificant whitespace\n// Note that this could do a lot more, such as reorder fields etc.\nfunction normalize(string: string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\n\nfunction cacheKeyFromLoc(loc: Location) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\n\n// Take a unstripped parsed document (query/mutation or even fragment), and\n// check all fragment definitions, checking for name->source uniqueness.\n// We also want to make sure only unique fragments exist in the document.\nfunction processFragments(ast: DocumentNode) {\n const seenKeys = new Set<string>();\n const definitions: DefinitionNode[] = [];\n\n ast.definitions.forEach(fragmentDefinition => {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc!);\n\n // We know something about this fragment\n let sourceKeySet = fragmentSourceMap.get(fragmentName)!;\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n // this is a problem because the app developer is trying to register another fragment with\n // the same name as one previously registered. So, we tell them about it.\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n } else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n\n sourceKeySet.add(sourceKey);\n\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n } else {\n definitions.push(fragmentDefinition);\n }\n });\n\n return {\n ...ast,\n definitions,\n };\n}\n\nfunction stripLoc(doc: DocumentNode) {\n const workSet = new Set<Record<string, any>>(doc.definitions);\n\n workSet.forEach(node => {\n if (node.loc) delete node.loc;\n Object.keys(node).forEach(key => {\n const value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n\n const loc = doc.loc as Record<string, any>;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n\n return doc;\n}\n\nfunction parseDocument(source: string) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n const parsed = parse(source, {\n // graphql 14,15,16\n experimentalFragmentVariables,\n // graphql 14\n allowLegacyFragmentVariables: experimentalFragmentVariables,\n // graphql 17\n experimentalFragmentArguments: experimentalFragmentVariables,\n } as any);\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(\n cacheKey,\n // check that all \"new\" fragments inside the documents are consistent with\n // existing fragments of the same name\n stripLoc(processFragments(parsed)),\n );\n }\n return docCache.get(cacheKey)!;\n}\n\n// XXX This should eventually disallow arbitrary string interpolation, like Relay does\nexport function gql(\n literals: string | readonly string[],\n ...args: any[]\n) {\n\n if (typeof literals === 'string') {\n literals = [literals];\n }\n\n let result = literals[0];\n\n args.forEach((arg, i) => {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n } else {\n result += arg;\n }\n result += literals[i + 1];\n });\n\n return parseDocument(result);\n}\n\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\n\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\n\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\n\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\n\nconst extras = {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n};\n\nexport namespace gql {\n export const {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n } = extras;\n}\n\ngql.default = gql;\n\nexport default gql;\n","/* Core */\n\nexport type { ApolloClientOptions, DefaultOptions } from \"./ApolloClient.js\";\nexport { ApolloClient, mergeOptions } from \"./ApolloClient.js\";\nexport type { FetchMoreOptions } from \"./ObservableQuery.js\";\nexport { ObservableQuery } from \"./ObservableQuery.js\";\nexport type {\n QueryOptions,\n WatchQueryOptions,\n MutationOptions,\n SubscriptionOptions,\n FetchPolicy,\n WatchQueryFetchPolicy,\n MutationFetchPolicy,\n RefetchWritePolicy,\n ErrorPolicy,\n FetchMoreQueryOptions,\n SubscribeToMoreOptions,\n SubscribeToMoreFunction,\n UpdateQueryMapFn,\n UpdateQueryOptions,\n SubscribeToMoreUpdateQueryFn,\n} from \"./watchQueryOptions.js\";\nexport { NetworkStatus, isNetworkRequestSettled } from \"./networkStatus.js\";\nexport type * from \"./types.js\";\nexport type { Resolver, FragmentMatcher } from \"./LocalState.js\";\nexport { isApolloError, ApolloError } from \"../errors/index.js\";\n/* Cache */\n\nexport type {\n // All the exports (types) from ../cache, minus cacheSlot,\n // which we want to keep semi-private.\n Transaction,\n DataProxy,\n InMemoryCacheConfig,\n ReactiveVar,\n TypePolicies,\n TypePolicy,\n FieldPolicy,\n FieldReadFunction,\n FieldMergeFunction,\n FieldFunctionOptions,\n PossibleTypesMap,\n WatchFragmentOptions,\n WatchFragmentResult,\n} from \"../cache/index.js\";\nexport {\n Cache,\n ApolloCache,\n InMemoryCache,\n MissingFieldError,\n defaultDataIdFromObject,\n makeVar,\n} from \"../cache/index.js\";\n\nexport type * from \"../cache/inmemory/types.js\";\n\n/* Link */\n\nexport * from \"../link/core/index.js\";\nexport * from \"../link/http/index.js\";\nexport type { ServerError } from \"../link/utils/index.js\";\nexport {\n fromError,\n toPromise,\n fromPromise,\n throwServerError,\n} from \"../link/utils/index.js\";\n\n/* Masking */\nexport type {\n DataMasking,\n FragmentType,\n Masked,\n MaskedDocumentNode,\n MaybeMasked,\n Unmasked,\n} from \"../masking/index.js\";\n\n/* Utilities */\n\nexport type {\n DocumentTransformCacheKey,\n Observer,\n ObservableSubscription,\n Reference,\n StoreObject,\n} from \"../utilities/index.js\";\nexport {\n DocumentTransform,\n Observable,\n isReference,\n makeReference,\n} from \"../utilities/index.js\";\n\n/* Supporting */\n\n// The verbosity of invariant.{log,warn,error} can be controlled globally\n// (for anyone using the same ts-invariant package) by passing \"log\",\n// \"warn\", \"error\", or \"silent\" to setVerbosity (\"log\" is the default).\n// Note that all invariant.* logging is hidden in production.\nimport { setVerbosity } from \"ts-invariant\";\nexport { setVerbosity as setLogVerbosity };\nsetVerbosity(__DEV__ ? \"log\" : \"silent\");\n\n// Note that importing `gql` by itself, then destructuring\n// additional properties separately before exporting, is intentional.\n// Due to the way the `graphql-tag` library is setup, certain bundlers\n// can't find the properties added to the exported `gql` function without\n// additional guidance (e.g. Rollup - see\n// https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module).\n// Instead of having people that are using bundlers with `@apollo/client` add\n// extra bundler config to help `graphql-tag` exports be found (which would be\n// awkward since they aren't importing `graphql-tag` themselves), this\n// workaround of pulling the extra properties off the `gql` function,\n// then re-exporting them separately, helps keeps bundlers happy without any\n// additional config changes.\nexport {\n gql,\n resetCaches,\n disableFragmentWarnings,\n enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables,\n} from \"graphql-tag\";\n","import {\n AdType,\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n EnumResourceType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst schemaAdresource = new MongooseSchema<AdType[\"resource\"]>({\n adDescription: { required: true, type: String },\n adImage: { required: true, type: String },\n adStyle: {\n default: EnumAdStyle.BLOOM,\n enum: Object.values(EnumAdStyle),\n required: true,\n type: String,\n },\n adTitle: { required: true, type: String },\n adType: {\n default: EnumAdType.SPONSORED,\n enum: Object.values(EnumAdType),\n required: true,\n type: String,\n },\n resourceId: { required: true, type: String },\n resourceName: { required: true, type: String },\n resourceRegion: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n});\n\nconst schema = new MongooseSchema<AdType>(\n {\n active: { default: true, type: Boolean },\n clicks: { default: 0, required: true, type: Number },\n end: { required: true, type: Date },\n impressions: { default: 0, required: true, type: Number },\n resource: { required: true, type: schemaAdresource },\n showOn: {\n default: [EnumAdShowOn.FRONT_PAGE],\n enum: Object.values(EnumAdShowOn),\n required: true,\n type: [String],\n },\n start: { required: true, type: Date },\n status: {\n default: EnumAdStatus.ACTIVE,\n enum: Object.values(EnumAdStatus),\n required: true,\n type: String,\n },\n targetRegion: { required: false, type: [String] },\n },\n {\n timestamps: true,\n },\n);\n\n// Compound index for background job queries\nschema.index({\n end: 1,\n start: 1,\n status: 1,\n});\n\nexport const AdModel =\n (mongoose.models.Ad as mongoose.Model<AdType>) ||\n mongoose.model<AdType>(\"Ad\", schema);\n","import {\n ChatMessageType,\n ChatType,\n EnumChatType,\n ParticipantType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaChatMessageReplyPreviewType = Omit<\n NonNullable<ChatMessageType[\"replyPreview\"]>,\n \"senderId\"\n> & {\n senderId: ObjectId;\n};\n\nexport type SchemaChatMessageReactionType = Omit<\n NonNullable<ChatMessageType[\"likedBy\"]>[number],\n \"userId\"\n> & {\n userId: ObjectId;\n};\n\nexport type SchemaChatMessageSeenType = Omit<\n NonNullable<ChatMessageType[\"seenBy\"]>[number],\n \"userId\"\n> & {\n userId: ObjectId;\n};\n\nexport type SchemaChatMessageType = Omit<\n ChatMessageType,\n \"senderId\" | \"replyToMessageId\" | \"replyPreview\" | \"likedBy\" | \"seenBy\"\n> & {\n senderId: ObjectId;\n replyToMessageId?: ObjectId | null;\n replyPreview?: SchemaChatMessageReplyPreviewType | null;\n likedBy?: SchemaChatMessageReactionType[];\n seenBy?: SchemaChatMessageSeenType[];\n};\n\nexport type SchemaParticipantType = Omit<ParticipantType, \"userId\"> & {\n userId: ObjectId;\n};\n\nconst MessageReplyPreviewSchema =\n new MongooseSchema<SchemaChatMessageReplyPreviewType>(\n {\n contentPreview: { required: true, type: String },\n senderId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n senderName: { required: true, type: String },\n },\n { _id: false },\n );\n\nconst MessageReactionSchema = new MongooseSchema<SchemaChatMessageReactionType>(\n {\n createdAt: { required: true, type: Date },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nconst MessageSeenSchema = new MongooseSchema<SchemaChatMessageSeenType>(\n {\n seenAt: { required: true, type: Date },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nconst MessageSchema = new MongooseSchema<SchemaChatMessageType>(\n {\n content: { required: true, type: String },\n likedBy: { default: [], required: false, type: [MessageReactionSchema] },\n replyPreview: {\n required: false,\n type: MessageReplyPreviewSchema,\n },\n replyToMessageId: {\n ref: \"Chat.messages\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n seenBy: { default: [], required: false, type: [MessageSeenSchema] },\n senderId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nexport type SchemaChatType = Omit<ChatType, \"participants\" | \"messages\"> & {\n participants: SchemaParticipantType[];\n messages: SchemaChatMessageType[];\n};\n\nconst ParticipantSchema = new MongooseSchema<SchemaParticipantType>(\n {\n active: { default: true, required: true, type: Boolean },\n isAssociate: { default: null, required: false, type: Boolean },\n userAvatar: { required: false, type: String },\n userEmail: { required: true, type: String },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n userName: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst ChatSchema = new MongooseSchema<SchemaChatType>(\n {\n active: { default: true, required: true, type: Boolean },\n chatDescription: { required: false, type: String },\n chatName: { required: true, type: String },\n chatType: {\n enum: Object.values(EnumChatType),\n required: true,\n type: String,\n },\n deletedAt: { default: null, required: false, type: Date },\n messages: [MessageSchema],\n participants: [ParticipantSchema],\n region: { default: null, required: false, type: String },\n },\n {\n timestamps: true,\n },\n);\n\nChatSchema.index({\n \"participants.active\": 1,\n \"participants.userId\": 1,\n updatedAt: -1,\n});\n\nexport const ChatModel =\n (mongoose.models.Chat as mongoose.Model<SchemaChatType>) ||\n mongoose.model<SchemaChatType>(\"Chat\", ChatSchema);\n","import {\n EnumChatReportReason,\n ReportChatUser,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaChatReportType = Omit<\n ReportChatUser,\n \"reporterUserId\" | \"reportedUserId\" | \"chatId\"\n> & {\n reporterUserId: ObjectId;\n reportedUserId: ObjectId;\n chatId: ObjectId;\n};\n\nconst ReasonSchema = new MongooseSchema<\n NonNullable<ReportChatUser[\"reason\"]>,\n null,\n unknown\n>(\n {\n details: { default: null, required: false, type: String },\n reasonType: {\n enum: Object.values(EnumChatReportReason),\n required: true,\n type: String,\n },\n },\n { _id: false },\n);\n\nconst ChatReportSchema = new MongooseSchema<SchemaChatReportType>(\n {\n chatId: {\n ref: \"Chat\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n reason: { required: true, type: ReasonSchema },\n reportedUserId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n reporterUserId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n resolved: { default: false, required: true, type: Boolean },\n },\n { timestamps: true },\n);\n\nChatReportSchema.index({ chatId: 1, reportedUserId: 1 });\nChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });\n\nexport const ChatReportModel =\n (mongoose.models.ChatReport as mongoose.Model<SchemaChatReportType>) ||\n mongoose.model<SchemaChatReportType>(\"ChatReport\", ChatReportSchema);\n","import {\n AssociateType,\n Category,\n DateTimeType,\n EnumEventDateStatus,\n EnumResourceType,\n EnumUserLicence,\n LocationGeoType,\n LocationType,\n OwnerType,\n PosterUsageType,\n RelationDate,\n ResourceContactDetailsType,\n ResourceImageType,\n SocialMediaType,\n Subcategory,\n TermsAgreement,\n UserLicenceType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { relationDatesSchema } from \"./Relation\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaOwnerType = Omit<OwnerType, \"userId\"> & {\n userId: ObjectId;\n};\n\nexport const OwnerTypeSchema = new MongooseSchema<SchemaOwnerType>(\n {\n email: { required: true, type: String },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const SocialMediaTypeSchema = new MongooseSchema<SocialMediaType>(\n {\n link: { required: true, type: String },\n name: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field\n);\n\nexport const ResourceImageTypeSchema = new MongooseSchema<ResourceImageType>(\n {\n active: { default: true, type: Boolean },\n source: { required: false, type: String },\n title: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst SubCategorySchema = new MongooseSchema<Subcategory>(\n {\n id: { required: false, type: String },\n items: [\n {\n id: { required: false, type: String },\n name: { required: false, type: String },\n },\n ],\n name: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const CategorySchema = new MongooseSchema<Category>(\n {\n id: { required: true, type: String },\n name: { required: true, type: String },\n subcategories: [SubCategorySchema],\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst PosterUsageTypeSchema = new MongooseSchema<PosterUsageType>(\n {\n count: { default: 0, required: false, type: Number },\n month: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const userLicenseSchema = new MongooseSchema<UserLicenceType>(\n {\n expiryDate: { required: true, type: Date },\n issuedDate: { required: true, type: Date },\n licenceType: {\n enum: Object.values(EnumUserLicence),\n required: true,\n type: String,\n },\n prevLicenceType: {\n enum: Object.values(EnumUserLicence),\n required: false,\n type: String,\n },\n },\n { _id: false, timestamps: false },\n);\n\nexport const associatesSchema = new MongooseSchema<AssociateType>(\n {\n email: { required: true, type: String },\n licence: {\n required: true,\n type: userLicenseSchema,\n },\n resourceId: {\n required: true,\n type: String,\n },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const ContactDetailsSchema =\n new MongooseSchema<ResourceContactDetailsType>(\n {\n email: { required: false, type: String },\n landlinePhone: { required: false, type: String },\n mobilePhone: { required: false, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n );\n\nexport const termsAgreementSchema = new MongooseSchema<TermsAgreement>(\n {\n appBuildNumber: { required: true, type: String },\n appId: { required: true, type: String },\n appVersion: { required: true, type: String },\n brand: { required: true, type: String },\n deviceName: { required: true, type: String },\n installationId: { required: true, type: String },\n manufacturer: { required: true, type: String },\n modelName: { required: true, type: String },\n osName: { required: true, type: String },\n osVersion: { required: true, type: String },\n termVersion: { required: true, type: String },\n timestamp: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const resourceRelationsSchema = new MongooseSchema<{\n relationId: ObjectId;\n relationDates: RelationDate[];\n}>(\n {\n relationDates: {\n default: [],\n required: false,\n type: [relationDatesSchema],\n },\n relationId: {\n ref: \"Relation\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nexport const dateTimeSchema = new MongooseSchema<DateTimeType>(\n {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n endDate: { required: true, type: String },\n endTime: { required: true, type: String },\n startDate: { required: true, type: String },\n startTime: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const locationGeoSchema = new MongooseSchema<LocationGeoType>(\n {\n coordinates: { required: true, type: [Number] }, // [longitude, latitude]\n type: { default: \"Point\", enum: [\"Point\"], required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const locationsSchema = new MongooseSchema<LocationType>(\n {\n city: { required: true, type: String },\n country: { required: true, type: String },\n fullAddress: { required: true, type: String },\n geo: {\n required: true,\n type: locationGeoSchema,\n },\n latitude: { required: true, type: Number },\n longitude: { required: true, type: Number },\n region: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport const baseResourceFields = {\n active: { default: false, required: true, type: Boolean },\n adIds: {\n ref: \"Ad\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n associates: {\n required: false,\n type: [associatesSchema],\n },\n contactDetails: { required: false, type: ContactDetailsSchema },\n cover: {\n required: true,\n type: ResourceImageTypeSchema,\n },\n deletedAt: { default: null, required: false, type: Date },\n description: { required: true, type: String },\n images: { required: false, type: [ResourceImageTypeSchema] },\n logo: { required: false, type: ResourceImageTypeSchema },\n name: { required: true, type: String },\n owner: {\n required: false,\n type: OwnerTypeSchema,\n },\n posterUsage: { required: false, type: PosterUsageTypeSchema },\n promoCodes: { required: false, type: [String] },\n rating: { required: false, type: Number },\n region: { required: true, type: String },\n reviewCount: { required: false, type: Number },\n socialMedia: { required: false, type: [SocialMediaTypeSchema] },\n termsAgreement: { required: true, type: termsAgreementSchema },\n};\n","import {\n EnumEventDateStatus,\n EnumInviteStatus,\n EnumRelationResource,\n EnumResourceType,\n RelationDate,\n RelationType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { StallTypeSchema } from \"./event/EventInfo\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst relationDateTimeSchema = new MongooseSchema<RelationDate[\"dateTime\"]>(\n {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: true,\n type: String,\n },\n endDate: { required: true, type: String },\n endTime: { required: true, type: String },\n stallType: StallTypeSchema,\n startDate: { required: true, type: String },\n startTime: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const relationDatesSchema = new MongooseSchema<RelationDate>(\n {\n dateTime: {\n required: true,\n type: relationDateTimeSchema,\n },\n lastUpdateBy: {\n resourceId: { required: false, type: String },\n userEmail: { required: false, type: String },\n },\n paymentReference: { required: false, type: String },\n status: {\n enum: Object.values(EnumInviteStatus),\n required: false,\n type: String,\n },\n },\n { _id: false },\n);\n\nexport type SchemaRelationType = Omit<\n RelationType,\n \"eventId\" | \"vendorId\" | \"chatId\"\n> & {\n eventId: ObjectId;\n vendorId: ObjectId;\n chatId: ObjectId;\n};\n/**\n * This is the schema for the relation type.\n * It is used to define the structure of the relation type in the database.\n * The schema is used by Mongoose to create a model for the relation type.\n */\nexport const RelationTypeSchema = new MongooseSchema<SchemaRelationType>(\n {\n active: { default: true, required: true, type: Boolean },\n chatId: {\n ref: \"Chat\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n deletedAt: { default: null, required: false, type: Date },\n eventId: {\n ref: \"Event\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n lastUpdateBy: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n relationDates: [relationDatesSchema],\n relationType: {\n enum: Object.values(EnumRelationResource),\n required: true,\n type: String,\n },\n vendorId: {\n ref: \"Vendor\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nRelationTypeSchema.index({\n eventId: 1,\n \"relationDates.startDate\": 1,\n \"relationDates.startTime\": 1,\n \"relationDates.status\": 1,\n vendorId: 1,\n});\n\n// --- IMPORTANT: bind custom model type ---\nexport const RelationModel =\n (mongoose.models.Relation as mongoose.Model<SchemaRelationType>) ||\n mongoose.model<SchemaRelationType>(\"Relation\", RelationTypeSchema);\n","import {\n DateTimeWithPriceType,\n EnumEventDateStatus,\n EnumPaymentMethod,\n EventInfoType,\n PaymentInfoType,\n RefundPolicy,\n Requirement,\n StallType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport const StallTypeSchema = new MongooseSchema<StallType>(\n {\n label: { required: false, type: String },\n price: { required: false, type: Number },\n stallCapacity: { required: false, type: Number },\n },\n {\n _id: false, // Prevents Mongoose from creating an additional _id field for subdocuments\n },\n);\n\nconst dateTimeSchema = new MongooseSchema<DateTimeWithPriceType>(\n {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n endDate: { required: true, type: String },\n endTime: { required: true, type: String },\n stallTypes: [StallTypeSchema],\n startDate: { required: true, type: String },\n startTime: { required: true, type: String },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst paymentInfoSchema = new MongooseSchema<PaymentInfoType>(\n {\n accountHolderName: { required: false, type: String },\n accountNumber: { required: false, type: String },\n link: { required: false, type: String },\n paymentMethod: {\n enum: Object.values(EnumPaymentMethod),\n required: true,\n type: String,\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field\n);\n\nconst requirementsSchema = new MongooseSchema<Requirement>(\n {\n category: { required: true, type: String },\n label: { required: true, type: String },\n value: { required: true, type: Boolean },\n },\n {\n _id: false, // Prevents Mongoose from creating an additional _id field for\n },\n);\n\nexport const refundPolicySchema = new MongooseSchema<RefundPolicy>(\n {\n category: { required: true, type: String },\n label: { required: true, type: String },\n value: { required: true, type: Boolean },\n },\n { _id: false },\n);\n\nexport type SchemaEventInfoType = Omit<EventInfoType, \"eventId\"> & {\n eventId: ObjectId;\n};\n\n/**\n * This is the schema for the event info type.\n * It is used to define the structure of the event info type in the database.\n * The schema is used by Mongoose to create a model for the event info type.\n */\nconst schema = new MongooseSchema<SchemaEventInfoType>(\n {\n active: { default: true, type: Boolean },\n applicationDeadlineHours: { required: true, type: Number },\n dateTime: { required: true, type: [dateTimeSchema] },\n eventId: {\n ref: \"Event\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n packInTime: { required: true, type: Number },\n paymentDueHours: { required: true, type: Number },\n paymentInfo: { required: true, type: [paymentInfoSchema] },\n refundPolicy: { required: true, type: [refundPolicySchema] },\n requirements: { required: false, type: [requirementsSchema] },\n },\n { timestamps: true },\n);\n\nexport const EventInfoModel =\n (mongoose.models.EventInfo as mongoose.Model<SchemaEventInfoType>) ||\n mongoose.model<SchemaEventInfoType>(\"EventInfo\", schema);\n","import {\n EnumEventType,\n GoogleAddressComponent,\n GoogleImportedMarket,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport {\n dateTimeSchema,\n locationsSchema,\n ResourceImageTypeSchema,\n resourceRelationsSchema,\n} from \"./global\";\n\nexport type SchemaGoogleImportedMarket = Omit<\n GoogleImportedMarket,\n \"eventId\" | \"claimedByUserId\"\n> & {\n eventId?: mongoose.Types.ObjectId;\n claimedByUserId?: mongoose.Types.ObjectId;\n};\n\nconst MongooseSchema = mongoose.Schema;\n\nconst addressComponentSchema = new MongooseSchema<GoogleAddressComponent>(\n {\n longName: { required: false, type: String },\n shortName: { required: false, type: String },\n types: { required: false, type: [String] },\n },\n { _id: false },\n);\n\n/**\n * This is the schema for the GoogleImportedMarket type.\n * It is used to define the structure of the GoogleImportedMarket type in the database.\n * The schema is used by Mongoose to create a model for the GoogleImportedMarket type.\n */\nconst schema = new MongooseSchema<SchemaGoogleImportedMarket>(\n {\n active: { default: false, required: true, type: Boolean },\n address: { required: true, type: String },\n addressComponents: { required: false, type: [addressComponentSchema] },\n businessStatus: { required: false, type: String },\n claimed: { default: false, required: true, type: Boolean },\n claimedAt: { default: null, required: false, type: Date },\n claimedByUserId: {\n ref: \"User\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n cover: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n dateTime: [dateTimeSchema],\n deletedAt: { default: null, required: false, type: Date },\n description: { required: true, type: String },\n eventId: {\n ref: \"Event\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n eventType: {\n enum: Object.values(EnumEventType),\n required: true,\n type: String,\n },\n googleMapsUrl: { required: false, type: String },\n googlePlaceId: {\n required: true,\n type: String,\n unique: true, // unique, indexed\n },\n images: { required: false, type: [ResourceImageTypeSchema] }, // array of photo_reference\n importedAt: { default: () => new Date(), required: true, type: Date },\n location: {\n required: true, // optional because lat/lng may expire after 30 days\n type: locationsSchema,\n },\n logo: { required: false, type: ResourceImageTypeSchema },\n name: { required: true, type: String },\n openingHours: { required: false, type: [String] },\n rainOrShine: { required: true, type: Boolean },\n rating: { required: false, type: Number },\n region: { required: false, type: String },\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\n },\n reviewCount: { required: false, type: Number },\n slug: { required: true, type: String },\n website: { required: false, type: String },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up searches\nschema.index({ \"location.geo\": \"2dsphere\" });\nschema.index({ name: 1 });\nschema.index({ region: 1 });\n\nexport const GoogleImportedMarketModel =\n (mongoose.models\n .GoogleImportedMarket as mongoose.Model<SchemaGoogleImportedMarket>) ||\n mongoose.model<SchemaGoogleImportedMarket>(\"GoogleImportedMarket\", schema);\n","import {\n CreateBulkNotificationInput,\n NotificationType,\n EnumNotificationResourceType,\n EnumNotificationType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaCreateBulkNotificationInput = Omit<\n CreateBulkNotificationInput,\n \"userIds\"\n> & {\n userIds: ObjectId[];\n};\n\nexport type SchemaNotificationType = Omit<NotificationType, \"userId\"> & {\n userId: ObjectId;\n};\n/**\n * Schema for storing in-app notifications\n * Each notification is tied to a specific user and can be marked as read/unread\n */\nconst schema = new MongooseSchema<SchemaNotificationType>(\n {\n data: {\n resourceId: { required: true, type: String },\n resourceName: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumNotificationResourceType),\n required: true,\n type: String,\n },\n },\n isRead: { default: false, index: true, required: true, type: Boolean },\n message: { required: true, type: String },\n title: { required: true, type: String },\n type: {\n default: EnumNotificationType.SYSTEM,\n enum: Object.values(EnumNotificationType),\n required: true,\n type: String,\n },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\n// Compound index for efficient queries\nschema.index({ isRead: 1, userId: 1 });\nschema.index({ createdAt: -1, userId: 1 });\n\nexport const NotificationModel =\n (mongoose.models.Notification as mongoose.Model<SchemaNotificationType>) ||\n mongoose.model<SchemaNotificationType>(\"Notification\", schema);\n","export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n}\n\nexport enum EnumChatReportReason {\n INAPPROPRIATE_CONTENT = \"Inappropriate_Content\",\n HARASSMENT_OR_BULLYING = \"Harassment_or_Bullying\",\n HATE_SPEECH = \"Hate_Speech\",\n SPAM_OR_SCAM = \"Spam_or_Scam\",\n VIOLENCE_OR_DANGEROUS_BEHAVIOR = \"Violence_or_Dangerous_Behavior\",\n OTHER = \"Other\",\n}\n\nexport enum EnumChatType {\n GROUP = \"group\",\n PRIVATE = \"private\",\n RELATION = \"relation\",\n}\n\nexport enum EnumPaymentMethod {\n CASH = \"cash\",\n EFTPOS = \"eftpos\",\n BANK_TRANSFER = \"bank_transfer\",\n PAYPAL = \"paypal\",\n STRIPE = \"stripe\",\n}\n\nexport enum EnumFoodFlavor {\n SALTY = \"Salty\",\n SAVOURY = \"Savoury\",\n SPICY = \"Spicy\",\n SWEET = \"Sweet\",\n OTHER = \"Not_Applicable\",\n}\n\nexport enum EnumFoodType {\n ADDITIVE_FREE = \"Additive_Free\",\n AIR_FRIED = \"Air_Fried\",\n ALLERGEN_FRIENDLY = \"Allergen_Friendly\",\n ATHLETE_FRIENDLY = \"Athlete_Friendly\",\n BAKED = \"Baked\",\n DAIRY_FREE = \"Dairy_Free\",\n DIABETIC_FRIENDLY = \"Diabetic_Friendly\",\n EGG_FREE = \"Egg_Free\",\n FRESH = \"Fresh\",\n GLUTEN_FREE = \"Gluten_Free\",\n GRILLED = \"Grilled\",\n HALAL = \"Halal\",\n HEART_HEALTHY = \"Heart_Healthy\",\n HIGH_FIBER = \"High_Fiber\",\n HIGH_PROTEIN = \"High_Protein\",\n KETO = \"Keto\",\n KOSHER = \"Kosher\",\n LACTOSE_FREE = \"Lactose_Free\",\n LOW_CALORIE = \"Low_Calorie\",\n LOW_CARB = \"Low_Carb\",\n LOW_FAT = \"Low_Fat\",\n LOW_SODIUM = \"Low_Sodium\",\n NO_ADDED_SUGAR = \"No_Added_Sugar\",\n NO_PRESERVATIVES = \"No_Preservatives\",\n NON_GMO = \"Non_GMO\",\n NUT_FREE = \"Nut_Free\",\n ORGANIC = \"Organic\",\n PALEO = \"Paleo\",\n PLANT_BASED = \"Plant_Based\",\n RAW = \"Raw\",\n SMOKED = \"Smoked\",\n SOY_FREE = \"Soy_Free\",\n SUGAR_FREE = \"Sugar_Free\",\n VEGAN = \"Vegan\",\n VEGETARIAN = \"Vegetarian\",\n}\n\nexport enum EnumResourceType {\n EVENT = \"event\",\n VENDOR = \"vendor\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumEventType {\n MARKET = \"Market\",\n EXPO = \"Expo\",\n FAIR = \"Fair\",\n FESTIVAL = \"Festival\",\n}\n\nexport enum EnumVendorType {\n STALLHOLDER = \"Stallholder\",\n SHOP = \"Shop\",\n}\n\nexport enum EnumPartnerType {\n CHARITY_PARTNER = \"Charity_Partner\",\n MEDIA_PARTNER = \"Media_Partner\",\n SUPPORTING_PARTNER = \"Supporting_Partner\",\n}\n\nexport enum EnumOSPlatform {\n ANDROID = \"android\",\n IOS = \"ios\",\n WEB = \"web\",\n}\n\nexport enum EnumRelationResource {\n EVENT_INVITE_VENDOR = \"event_invite_vendor\",\n EVENT_UPDATE_RELATION_TO_VENDOR = \"event_update_relation_to_vendor\",\n VENDOR_UPDATE_RELATION_TO_EVENT = \"vendor_update_relation_to_event\",\n VENDOR_APPLICATION_TO_EVENT = \"vendor_application_to_event\",\n}\n\nexport enum EnumNotificationResourceType {\n ADDED_AS_ASSOCIATE_EVENT = \"added_as_associate_event\",\n ADDED_AS_ASSOCIATE_PARTNER = \"added_as_associate_partner\",\n ADDED_AS_ASSOCIATE_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_PARTNER = \"approved_partner\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_PARTNER = \"created_partner\",\n CREATED_VENDOR = \"created_vendor\",\n DAILY_CLUE_GAME = \"daily_clue_game\",\n DEACTIVATED_EVENT = \"deactivated_event\",\n DEACTIVATED_PARTNER = \"deactivated_partner\",\n DEACTIVATED_VENDOR = \"deactivated_vendor\",\n DECLINED_EVENT = \"declined_event\",\n DECLINED_PARTNER = \"declined_partner\",\n DECLINED_VENDOR = \"declined_vendor\",\n DOWNGRADED_EVENT = \"downgraded_event\",\n DOWNGRADED_PARTNER = \"downgraded_partner\",\n DOWNGRADED_VENDOR = \"downgraded_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n EVENT_UPDATE_RELATION_TO_VENDOR = EnumRelationResource.EVENT_UPDATE_RELATION_TO_VENDOR,\n EXPIRATION_REMINDER_EVENT = \"expiration_reminder_event\",\n EXPIRATION_REMINDER_PARTNER = \"expiration_reminder_partner\",\n EXPIRATION_REMINDER_VENDOR = \"expiration_reminder_vendor\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n NEW_POST_CREATED = \"new_post_created\",\n REGISTERED_USER_BY_SCHOOL_CODE = \"registered_user_by_school_code\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n VENDOR_UPDATE_RELATION_TO_EVENT = EnumRelationResource.VENDOR_UPDATE_RELATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n CHAT = \"chat\",\n EVENT = EnumResourceType.EVENT,\n RELATION = \"relation\",\n SYSTEM = \"system\",\n VENDOR = EnumResourceType.VENDOR,\n}\n\nexport enum EnumRegions {\n All = \"All Regions\",\n Auckland = \"Auckland\",\n BayOfPlentyGisborne = \"Bay of Plenty & Gisborne\",\n CanterburyWestCoast = \"Canterbury & West Coast\",\n HawkesBay = \"Hawke's Bay\",\n ManawatuWanganui = \"Manawatu-Wanganui\",\n MarlboroughNelsonTasman = \"Marlborough & Nelson & Tasman\",\n Northland = \"Northland\",\n Otago = \"Otago\",\n Southland = \"Southland\",\n Taranaki = \"Taranaki\",\n Waikato = \"Waikato\",\n Wellington = \"Wellington\",\n}\n\nexport enum ImageTypeEnum {\n AVATAR = \"avatar\",\n COVER = \"cover\",\n IMAGE = \"image\",\n LOGO = \"logo\",\n}\n\nexport enum EnumUserLicence {\n PRO_EVENT = \"pro_event\",\n PRO_PLUS_EVENT = \"pro_plus_event\",\n PRO_PLUS_VENDOR = \"pro_plus_vendor\",\n PRO_VENDOR = \"pro_vendor\",\n STANDARD_EVENT = \"standard_event\",\n STANDARD_VENDOR = \"standard_vendor\",\n STANDARD_PARTNER = \"standard_partner\",\n}\n\nexport enum EnumUserRole {\n ADMIN = \"admin\",\n CUSTOMER = \"customer\",\n MARKETING = \"marketing\",\n MODERATOR = \"moderator\",\n SUPPORT = \"support\",\n}\n\nexport enum EnumSocialMedia {\n FACEBOOK = \"facebook\",\n INSTAGRAM = \"instagram\",\n TIKTOK = \"tiktok\",\n TWITTER = \"twitter\",\n WEBSITE = \"website\",\n YOUTUBE = \"youtube\",\n}\n\nexport enum EnumEventDateStatus {\n STARTING_SOON = \"Starting_Soon\",\n STARTED = \"Started\",\n TODAY = \"Today\",\n TOMORROW = \"Tomorrow\",\n THIS_WEEK = \"This_Week\",\n NEXT_WEEK = \"Next_Week\",\n UPCOMING = \"Upcoming\",\n ENDED = \"Ended\",\n RE_SCHEDULED = \"Rescheduled\",\n CANCELED = \"Canceled\",\n}\n\nexport enum EnumSubscriptionStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n CANCELLED = \"cancelled\",\n NO_SUBSCRIPTION = \"no_subscription\",\n PAST_DUE = \"past_due\",\n TRIALING = \"trialing\",\n}\n\nexport enum EnumBillingPeriod {\n MONTHLY_CANCEL_ANYTIME = \"monthly_cancel_anytime\",\n YEARLY_ANNUAL_BILLED = \"yearly_annual_billed\",\n YEARLY_MONTHLY_BILLED = \"yearly_monthly_billed\",\n}\n\nexport enum EnumReward {\n MYSTERY_JOY_BOX = \"mystery_joy_box\",\n MYSTERY_SQUEEZE_BOX = \"mystery_squeeze_box\",\n MYSTERY_DELUXE_BOX = \"mystery_deluxe_box\",\n}\n","import { PushTokenType } from \"@timardex/cluemart-shared\";\nimport { EnumOSPlatform } from \"@timardex/cluemart-shared/enums\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaPushTokenType = Omit<PushTokenType, \"userId\"> & {\n userId: ObjectId;\n};\n\n/**\n * This is the schema for the push token type.\n * It is used to define the structure of the push token type in the database.\n * The schema is used by Mongoose to create a model for the push token type.\n */\nconst schema = new MongooseSchema<SchemaPushTokenType>(\n {\n platform: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n token: { required: true, type: String },\n userId: {\n ref: \"User\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nexport const PushTokenModel =\n (mongoose.models.PushToken as mongoose.Model<SchemaPushTokenType>) ||\n mongoose.model<SchemaPushTokenType>(\"PushToken\", schema);\n","import {\n EnumActivity,\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n ResourceActivityEntry,\n ResourceActivityType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { locationGeoSchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst ActivitySchema = new MongooseSchema<ResourceActivityEntry>(\n {\n activityType: {\n enum: Object.values(EnumActivity),\n required: true,\n type: String,\n },\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n location: {\n required: false,\n type: locationGeoSchema,\n },\n startDate: { required: false, type: String },\n startTime: { required: false, type: String },\n timestamp: { default: Date.now, type: Date },\n userAgent: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n userId: { required: false, type: String },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<ResourceActivityType>(\n {\n activity: { default: [], type: [ActivitySchema] },\n resourceId: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n },\n { timestamps: true },\n);\n\nschema.index({ resourceId: 1, resourceType: 1 }, { unique: true }); // one per entity\nschema.index({ \"views.location\": \"2dsphere\" });\n\nexport const ResourceActivityModel =\n (mongoose.models.ResourceActivity as mongoose.Model<ResourceActivityType>) ||\n mongoose.model<ResourceActivityType>(\"ResourceActivity\", schema);\n","import {\n EnumOSPlatform,\n EnumReward,\n EnumSubscriptionStatus,\n EnumUserLicence,\n EnumUserRole,\n RedeemedReward,\n StripeSubscription,\n UserActivityEvent,\n UserType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n associatesSchema,\n dateTimeSchema,\n locationsSchema,\n ResourceImageTypeSchema,\n termsAgreementSchema,\n userLicenseSchema,\n} from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaUserActivityEvent = Omit<UserActivityEvent, \"resourceId\"> & {\n resourceId: ObjectId;\n};\n\nexport type SchemaUserType = Omit<\n UserType,\n \"vendor\" | \"events\" | \"partner\" | \"userActivity\" | \"_id\" | \"game\" | \"school\"\n> & {\n _id: ObjectId;\n events: ObjectId[];\n game: ObjectId;\n partner: ObjectId;\n school: ObjectId;\n vendor: ObjectId;\n userActivity: {\n favourites: {\n events: ObjectId[];\n vendors: ObjectId[];\n partners: ObjectId[];\n };\n interested: {\n events: SchemaUserActivityEvent[];\n };\n going: {\n events: SchemaUserActivityEvent[];\n };\n present: {\n events: SchemaUserActivityEvent[];\n };\n };\n};\n\nconst userActivityEventSchema = new MongooseSchema<SchemaUserActivityEvent>(\n {\n dateTime: dateTimeSchema,\n resourceId: {\n ref: \"Event\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n);\n\nconst userActivityFavouritesSchema = new MongooseSchema(\n {\n events: {\n ref: \"Event\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n partners: {\n ref: \"Partner\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n vendors: {\n ref: \"Vendor\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n },\n { _id: false },\n);\n\nconst stripeSchema = new MongooseSchema<StripeSubscription>(\n {\n currentPlan: {\n enum: Object.values(EnumUserLicence),\n required: false,\n type: String,\n },\n customerId: {\n required: false,\n type: String,\n },\n endDate: {\n required: false,\n type: Date,\n },\n startDate: {\n required: false,\n type: Date,\n },\n status: {\n enum: Object.values(EnumSubscriptionStatus),\n required: false,\n type: String,\n },\n subscriptionId: {\n required: false,\n type: String,\n },\n },\n { _id: false },\n);\n\nconst redeemedRewardSchema = new MongooseSchema<RedeemedReward>(\n {\n name: {\n enum: Object.values(EnumReward),\n required: true,\n type: String,\n },\n pointsUsed: { required: true, type: Number },\n redeemedAt: { required: true, type: Date },\n },\n { _id: false },\n);\n\n/**\n * This is the schema for the user type.\n * It is used to define the structure of the user type in the database.\n * The schema is used by Mongoose to create a model for the user type.\n */\nconst schema = new MongooseSchema<SchemaUserType>(\n {\n active: { default: false, required: true, type: Boolean },\n associates: {\n required: false,\n type: [associatesSchema],\n },\n avatar: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n deletedAt: { default: null, required: false, type: Date },\n email: { required: true, type: String },\n events: {\n ref: \"Event\",\n required: false,\n type: [mongoose.Schema.Types.ObjectId],\n },\n firstName: { required: true, type: String },\n game: {\n ref: \"Game\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n isTester: { default: false, required: true, type: Boolean },\n lastName: { required: true, type: String },\n licences: {\n required: false,\n type: [userLicenseSchema],\n },\n location: {\n required: false,\n type: locationsSchema,\n },\n overallPoints: { default: 0, required: false, type: Number },\n partner: {\n ref: \"Partner\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n password: { required: true, type: String },\n platform: {\n enum: Object.values(EnumOSPlatform),\n required: false,\n type: String,\n },\n preferredRegion: {\n required: true,\n type: String,\n },\n promoCodes: {\n required: false,\n type: [String],\n },\n redeemedRewards: {\n required: false,\n type: [redeemedRewardSchema],\n },\n refreshToken: {\n required: false,\n type: String,\n },\n role: {\n default: EnumUserRole.CUSTOMER,\n enum: Object.values(EnumUserRole),\n required: true,\n type: String,\n },\n school: {\n ref: \"School\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n stripe: {\n required: false,\n type: stripeSchema,\n },\n termsAgreement: termsAgreementSchema,\n userActivity: {\n favourites: {\n default: () => ({ events: [], vendors: [] }),\n type: userActivityFavouritesSchema,\n },\n going: {\n events: [userActivityEventSchema],\n },\n interested: {\n events: [userActivityEventSchema],\n },\n present: {\n events: [userActivityEventSchema],\n },\n },\n vendor: {\n ref: \"Vendor\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { strict: false, timestamps: true },\n);\n\n// 🔹 Add indexes to speed up searches\nschema.index({ \"associates.email\": 1 });\nschema.index({ \"licences.expiryDate\": 1 });\nschema.index({ \"licences.licenceType\": 1 });\n\nexport const UserModel =\n (mongoose.models.User as mongoose.Model<SchemaUserType>) ||\n mongoose.model<SchemaUserType>(\"User\", schema);\n","import mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport interface VerificationTokenType {\n email: string;\n verificationToken: string;\n createdAt: Date;\n}\n\nconst schema = new MongooseSchema<VerificationTokenType>(\n {\n createdAt: {\n default: Date.now,\n expires: 24 * 60 * 60, // 24 hours in seconds (MongoDB TTL expects seconds)\n required: true,\n type: Date,\n }, // Token expires after 1 day\n email: { required: true, type: String },\n verificationToken: { required: true, type: String },\n },\n { timestamps: true },\n);\n\nexport const VerificationTokenModel =\n (mongoose.models\n .VerificationToken as mongoose.Model<VerificationTokenType>) ||\n mongoose.model<VerificationTokenType>(\"VerificationToken\", schema);\n","import {\n EnumEventDateStatus,\n EnumVendorType,\n VendorCalendarData,\n VendorProductList,\n VendorType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n baseResourceFields,\n CategorySchema,\n locationsSchema,\n resourceRelationsSchema,\n SchemaOwnerType,\n} from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst productTypeSchema = new MongooseSchema<VendorProductList>(\n {\n description: { required: false, type: String },\n name: { required: false, type: String },\n price: { required: false, type: Number },\n priceUnit: { required: false, type: String },\n productGroups: { required: false, type: [String] },\n },\n { _id: false },\n);\n\nconst productWrapperSchema = new MongooseSchema<VendorType[\"products\"]>(\n {\n active: { default: false, type: Boolean },\n productsList: { required: false, type: [productTypeSchema] },\n },\n { _id: false },\n);\n\nconst calendarSchema = new MongooseSchema<VendorCalendarData>(\n {\n dateTime: {\n dateStatus: {\n enum: Object.values(EnumEventDateStatus),\n required: false,\n type: String,\n },\n endDate: { required: false, type: String },\n endTime: { required: false, type: String },\n startDate: { required: false, type: String },\n startTime: { required: false, type: String },\n },\n description: { required: false, type: String },\n location: {\n required: false,\n type: locationsSchema,\n },\n },\n { _id: false },\n);\n\nconst calendarWrapperSchema = new MongooseSchema<VendorType[\"calendar\"]>(\n {\n active: { default: false, type: Boolean },\n calendarData: { required: false, type: [calendarSchema] },\n },\n { _id: false },\n);\n\nexport type SchemaVendorType = Omit<\n VendorType,\n \"vendorInfoId\" | \"owner\" | \"adIds\" | \"unregisteredVendorId\"\n> & {\n adIds?: ObjectId[];\n owner: SchemaOwnerType;\n vendorInfoId: ObjectId;\n unregisteredVendorId?: ObjectId | null;\n};\n\nconst schema = new MongooseSchema<SchemaVendorType>(\n {\n ...baseResourceFields, // Importing base resource fields from global.ts\n availability: {\n corporate: { default: false, required: false, type: Boolean },\n private: { default: false, required: false, type: Boolean },\n school: { default: false, required: false, type: Boolean },\n },\n calendar: {\n required: false,\n type: calendarWrapperSchema,\n },\n categories: { required: true, type: [CategorySchema] },\n claimed: { default: true, required: false, type: Boolean },\n foodTruck: { required: true, type: Boolean },\n products: { required: false, type: productWrapperSchema },\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\n },\n unregisteredVendorId: {\n ref: \"UnregisteredVendor\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n vendorInfoId: {\n ref: \"VendorInfo\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n vendorType: {\n enum: Object.values(EnumVendorType),\n required: true,\n type: String,\n },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up regex-based searches\nschema.index({ name: 1 });\nschema.index({ description: 1 });\nschema.index({ region: 1 });\nschema.index({ \"categories.name\": 1 });\nschema.index({ \"associates.email\": 1 });\n\nexport const VendorModel =\n (mongoose.models.Vendor as mongoose.Model<SchemaVendorType>) ||\n mongoose.model<SchemaVendorType>(\"Vendor\", schema);\n","import {\n EnumFoodFlavor,\n VendorAttributes,\n VendorInfoType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { ResourceImageTypeSchema } from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaVendorInfoType = Omit<VendorInfoType, \"vendorId\"> & {\n vendorId: ObjectId;\n};\n\nconst AttributesSchema = new MongooseSchema<VendorAttributes>(\n {\n details: { required: false, type: String },\n isRequired: { default: false, required: true, type: Boolean },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<SchemaVendorInfoType>(\n {\n active: { default: true, type: Boolean },\n compliance: {\n foodBeverageLicense: { default: false, required: false, type: Boolean },\n liabilityInsurance: { default: false, required: false, type: Boolean },\n },\n documents: [ResourceImageTypeSchema],\n product: {\n foodFlavors: {\n enum: Object.values(EnumFoodFlavor),\n required: true,\n type: [String],\n },\n packaging: { required: true, type: [String] },\n priceRange: {\n max: { required: true, type: String },\n min: { required: true, type: String },\n },\n producedIn: { required: true, type: [String] },\n },\n requirements: {\n electricity: AttributesSchema,\n gazebo: AttributesSchema,\n table: AttributesSchema,\n },\n stallInfo: {\n size: {\n depth: { required: true, type: String },\n width: { required: true, type: String },\n },\n },\n vendorId: {\n ref: \"Vendor\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { timestamps: true },\n);\n\nexport const VendorInfoModel =\n (mongoose.models.VendorInfo as mongoose.Model<SchemaVendorInfoType>) ||\n mongoose.model<SchemaVendorInfoType>(\"VendorInfo\", schema);\n","import {\n UnregisteredVendorInvitationType,\n UnregisteredVendorType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { dateTimeSchema } from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaUnregisteredVendorInvitationType = Omit<\n UnregisteredVendorInvitationType,\n \"inviterId\"\n> & {\n inviterId: ObjectId;\n};\n\nexport type SchemaUnregisteredVendorType = Omit<\n UnregisteredVendorType,\n \"invitations\" | \"claimedByUserId\"\n> & {\n invitations: SchemaUnregisteredVendorInvitationType[];\n claimedByUserId?: mongoose.Types.ObjectId;\n};\n\nconst invitationSchema =\n new MongooseSchema<SchemaUnregisteredVendorInvitationType>(\n {\n dateTime: { required: true, type: [dateTimeSchema] },\n inviterId: {\n ref: \"Event\",\n required: true,\n type: mongoose.Schema.Types.ObjectId,\n },\n },\n { _id: false },\n );\n\nconst schema = new MongooseSchema<SchemaUnregisteredVendorType>(\n {\n active: { default: true, required: true, type: Boolean },\n categoryIds: { required: true, type: [String] },\n claimed: { default: false, required: true, type: Boolean },\n claimedAt: { default: null, required: false, type: Date },\n claimedByUserId: {\n ref: \"User\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n deletedAt: { default: null, required: false, type: Date },\n email: { required: false, type: String },\n invitations: { required: true, type: [invitationSchema] },\n name: { required: true, type: String },\n region: { required: true, type: String },\n },\n { timestamps: true },\n);\n\nschema.index({ name: 1 });\nschema.index({ email: 1 });\n\nexport const UnregisteredVendorModel =\n (mongoose.models\n .UnregisteredVendor as mongoose.Model<SchemaUnregisteredVendorType>) ||\n mongoose.model<SchemaUnregisteredVendorType>(\"UnregisteredVendor\", schema);\n","import { EnumEventType, EventType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n baseResourceFields,\n dateTimeSchema,\n locationsSchema,\n resourceRelationsSchema,\n SchemaOwnerType,\n} from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaEventType = Omit<\n EventType,\n \"eventInfoId\" | \"owner\" | \"adIds\"\n> & {\n adIds?: ObjectId[];\n eventInfoId: ObjectId;\n owner: SchemaOwnerType;\n};\n\n/**\n * This is the schema for the event type.\n * It is used to define the structure of the event type in the database.\n * The schema is used by Mongoose to create a model for the event type.\n */\nconst schema = new MongooseSchema<SchemaEventType>(\n {\n ...baseResourceFields, // Importing base resource fields from global.ts\n claimed: { default: true, required: false, type: Boolean },\n dateTime: { required: true, type: [dateTimeSchema] },\n eventInfoId: {\n ref: \"EventInfo\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n eventType: {\n enum: Object.values(EnumEventType),\n required: true,\n type: String,\n },\n googlePlaceId: {\n default: null,\n required: false,\n type: String,\n },\n location: {\n required: true,\n type: locationsSchema,\n },\n nzbn: { required: true, type: String },\n provider: { required: false, type: String },\n rainOrShine: { required: true, type: Boolean },\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\n },\n tags: { required: true, type: [String] },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up regex-based searches\nschema.index({ name: 1 });\nschema.index({ description: 1 });\nschema.index({ region: 1 });\nschema.index({ \"location.geo\": \"2dsphere\" });\nschema.index({ tags: 1 });\nschema.index({ \"associates.email\": 1 });\n\nexport const EventModel =\n (mongoose.models.Event as mongoose.Model<SchemaEventType>) ||\n mongoose.model<SchemaEventType>(\"Event\", schema);\n","import { EnumPartnerType, PartnerType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { baseResourceFields, locationsSchema, SchemaOwnerType } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaPartnerType = Omit<PartnerType, \"owner\" | \"adIds\"> & {\n adIds?: ObjectId[];\n owner: SchemaOwnerType;\n};\n\nconst schema = new MongooseSchema<SchemaPartnerType>(\n {\n ...baseResourceFields,\n location: {\n required: true,\n type: locationsSchema,\n },\n nzbn: { required: true, type: String },\n partnerType: {\n enum: Object.values(EnumPartnerType),\n required: true,\n type: String,\n },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up regex-based searches\nschema.index({ name: 1 });\nschema.index({ description: 1 });\nschema.index({ region: 1 });\nschema.index({ \"location.geo\": \"2dsphere\" });\nschema.index({ \"associates.email\": 1 });\n\nexport const PartnerModel =\n (mongoose.models.Partner as mongoose.Model<SchemaPartnerType>) ||\n mongoose.model<SchemaPartnerType>(\"Partner\", schema);\n","import {\n EnumPostContentType,\n EnumPostType,\n EnumResourceType,\n PostContentType,\n PostType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose, { Schema } from \"mongoose\";\n\nimport { ResourceImageTypeSchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaPostType = PostType;\n\nconst contentSchema = new MongooseSchema<PostContentType>(\n {\n contentData: Schema.Types.Mixed,\n contentOrder: { required: true, type: Number },\n contentType: {\n enum: Object.values(EnumPostContentType),\n required: true,\n type: String,\n },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<SchemaPostType>(\n {\n active: { default: false, required: true, type: Boolean },\n caption: { required: true, type: String },\n content: {\n default: [],\n required: false,\n type: [contentSchema],\n },\n cover: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n deletedAt: { default: null, required: false, type: Date },\n postType: {\n enum: Object.values(EnumPostType),\n required: true,\n type: String,\n },\n resource: {\n required: false,\n type: {\n resourceId: { required: true, type: String },\n resourceRegion: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n },\n },\n tags: { default: [], required: false, type: [String] },\n title: { required: true, type: String },\n },\n { timestamps: true },\n);\n\n// 🔹 Add indexes to speed up searches by title and tags\nschema.index({ title: 1 });\nschema.index({ tags: 1 });\n\nexport const PostModel =\n (mongoose.models.Post as mongoose.Model<SchemaPostType>) ||\n mongoose.model<SchemaPostType>(\"Post\", schema);\n","import { AppSettingsType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport const APP_SETTINGS_ID = \"APP_SETTINGS_DOCUMENT_ID\";\n\nconst AppSettingSchema = new MongooseSchema<AppSettingsType>(\n {\n activeSchoolsStudentCountTotal: {\n default: 0,\n required: true,\n type: Number,\n },\n activeSchoolsStudentCountUpdatedAt: {\n default: Date.now,\n required: true,\n type: Date,\n },\n appVersion: { default: \"1.0.1\", required: true, type: String },\n isOfflineMode: { default: false, required: true, type: Boolean },\n key: {\n default: APP_SETTINGS_ID,\n immutable: true, // ✅ prevents changes after creation\n required: true,\n type: String,\n unique: true, // ✅ allowed here\n },\n },\n { timestamps: true },\n);\n\nexport const AppSettingModel =\n (mongoose.models.AppSetting as mongoose.Model<AppSettingsType>) ||\n mongoose.model<AppSettingsType>(\"AppSetting\", AppSettingSchema);\n","import {\n EnumGameStatus,\n EnumGameType,\n GameDocType,\n GameHistory,\n GameType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport { OwnerTypeSchema } from \"../global\";\n\nimport { schemaDailyClueGameData } from \"./DailyClue\";\nimport { schemaPuzzleGameData } from \"./PuzzleGame\";\nimport { schemaGameDate } from \"./utils\";\n\nconst MongooseSchema = mongoose.Schema;\n\nexport type SchemaGameType = Omit<GameType, \"_id\"> & {\n _id: ObjectId;\n};\n\n// REMOVE partial when other game types are added\nconst gameDataSchemas: Partial<Record<EnumGameType, any>> = {\n [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,\n [EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,\n [EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData,\n};\n\nconst gameDataDefinition = Object.fromEntries(\n Object.entries(gameDataSchemas).map(([key, schema]) => [\n key,\n { default: null, required: false, type: schema },\n ]),\n);\n\nconst gameHistorySchema = new MongooseSchema<GameHistory>(\n {\n createdAt: { required: true, type: Date },\n gameDate: { required: true, type: schemaGameDate },\n gameStatus: {\n enum: Object.values(EnumGameStatus),\n required: true,\n type: String,\n },\n gameTitle: { required: true, type: String },\n gameType: {\n enum: Object.values(EnumGameType),\n required: true,\n type: String,\n },\n gameTypeId: { required: true, type: String },\n pointsEarned: { default: 0, required: true, type: Number },\n },\n { _id: false },\n);\n\nconst gameTypeSchema = new MongooseSchema<SchemaGameType>(\n {\n active: { default: true, required: true, type: Boolean },\n gameData: gameDataDefinition,\n gameHistory: { default: [], required: true, type: [gameHistorySchema] },\n gameTitle: { required: true, type: String },\n gameType: {\n enum: Object.values(EnumGameType),\n required: true,\n type: String,\n },\n gameTypeId: { required: true, type: String },\n },\n { timestamps: true },\n);\n\nconst schema = new MongooseSchema<GameDocType>(\n {\n active: { default: false, required: true, type: Boolean },\n deletedAt: { default: null, required: false, type: Date },\n games: { default: [], required: false, type: [gameTypeSchema] },\n owner: {\n required: true,\n type: OwnerTypeSchema,\n },\n points: { default: 0, required: true, type: Number },\n },\n { timestamps: true },\n);\n\nexport const GameModel =\n (mongoose.models.Game as mongoose.Model<GameDocType>) ||\n mongoose.model<GameDocType>(\"Game\", schema);\n","import {\n DailyClueBaseGame,\n DailyClueGameData,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { schemaGameDate } from \"./utils\";\n\nconst MongooseSchema = mongoose.Schema;\n\n/*\n DAILY CLUE GAME DATA SCHEMA\n**/\nconst schemaLetters = new MongooseSchema<DailyClueGameData[\"letterInfo\"]>(\n {\n collected: { required: false, type: [String] },\n solutionShuffled: { required: true, type: [String] },\n // todaysLetter and todaysPlacement is generated in the backend, so they are not required\n },\n { _id: false },\n);\n\n/**\n * ✅ Shared definition (THIS replaces .obj usage)\n * related to Post Model, PostContentData is using BaseGame\n */\nconst schemaDailyClueBaseGame = new MongooseSchema<DailyClueBaseGame>(\n {\n gameDate: { required: true, type: schemaGameDate },\n gameSolution: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const schemaDailyClueGameData = new MongooseSchema<DailyClueGameData>(\n {\n gameFields: { required: true, type: schemaDailyClueBaseGame },\n lastFoundDate: { default: null, required: false, type: Date },\n letterInfo: {\n required: true,\n type: schemaLetters,\n },\n points: { default: 0, required: true, type: Number },\n streak: { default: 0, required: true, type: Number },\n },\n { _id: false },\n);\n","import { GameDate } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\n// ✅ Shared definition\nexport const schemaGameDate = new MongooseSchema<GameDate>(\n {\n endDate: { required: true, type: Date },\n startDate: { required: true, type: Date },\n },\n { _id: false },\n);\n","import {\n PuzzleAnswer,\n PuzzleAnsweredQuestion,\n PuzzleBaseGame,\n PuzzleGameData,\n PuzzleQuestion,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst schemaPuzzleAnswer = new MongooseSchema<PuzzleAnswer>(\n {\n answer: { required: true, type: String },\n answerId: { required: true, type: String },\n correct: { required: true, type: Boolean },\n },\n { _id: false },\n);\n\nconst schemaPuzzleQuestion = new MongooseSchema<PuzzleQuestion>(\n {\n answers: { required: true, type: [schemaPuzzleAnswer] },\n question: { required: true, type: String },\n questionId: { required: true, type: String },\n },\n { _id: false },\n);\n\nconst schemaPuzzleBaseGame = new MongooseSchema<PuzzleBaseGame>(\n {\n questions: { required: true, type: [schemaPuzzleQuestion] },\n },\n { _id: false },\n);\n\nconst schemaPuzzleAnsweredQuestion = new MongooseSchema<PuzzleAnsweredQuestion>(\n {\n questionId: { required: true, type: String },\n selectedAnswerId: { required: true, type: String },\n },\n { _id: false },\n);\n\nexport const schemaPuzzleGameData = new MongooseSchema<PuzzleGameData>(\n {\n answeredQuestions: {\n default: null,\n required: false,\n type: [schemaPuzzleAnsweredQuestion],\n },\n gameFields: { required: true, type: schemaPuzzleBaseGame },\n points: { default: 0, required: true, type: Number },\n streak: { default: 0, required: true, type: Number },\n },\n { _id: false },\n);\n","import { SchoolCampaignType, SchoolType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport {\n ContactDetailsSchema,\n locationsSchema,\n OwnerTypeSchema,\n ResourceImageTypeSchema,\n SocialMediaTypeSchema,\n termsAgreementSchema,\n} from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\ntype SchoolDocument = Omit<SchoolType, \"ranking\">;\n\nconst campaignsSchema = new MongooseSchema<SchoolCampaignType>(\n {\n endDate: { required: true, type: Date },\n name: { required: true, type: String },\n startDate: { required: true, type: Date },\n },\n { _id: false },\n);\n\nconst schema = new MongooseSchema<SchoolDocument>(\n {\n // New schools are active by default\n active: { default: true, required: true, type: Boolean },\n campaigns: { required: false, type: [campaignsSchema] },\n contactDetails: { required: false, type: ContactDetailsSchema },\n deletedAt: { default: null, required: false, type: Date },\n location: {\n required: true,\n type: locationsSchema,\n },\n logo: { required: false, type: ResourceImageTypeSchema },\n name: { required: true, type: String },\n overallPoints: { default: 0, required: false, type: Number },\n owner: {\n required: true,\n type: OwnerTypeSchema,\n },\n region: { required: true, type: String },\n schoolCode: { required: true, type: String },\n socialMedia: { required: false, type: [SocialMediaTypeSchema] },\n studentCount: { default: 0, required: true, type: Number },\n termsAgreement: { required: true, type: termsAgreementSchema },\n },\n { timestamps: true },\n);\n\nexport const SchoolModel =\n (mongoose.models.School as mongoose.Model<SchoolDocument>) ||\n mongoose.model<SchoolDocument>(\"School\", schema);\n","import mongoose from \"mongoose\";\n\n/**\n * Connect to MongoDB using Mongoose.\n * Supports both local MongoDB (via MONGODB_URI) and MongoDB Atlas (via individual env vars).\n */\nexport const connectToDatabase = async ({\n appName,\n dbName,\n dbPassword,\n dbUser,\n mongodbUri,\n}: {\n appName: string;\n dbName: string;\n dbPassword: string;\n dbUser: string;\n mongodbUri: string;\n}) => {\n try {\n // Check if MONGODB_URI is provided (for local Docker MongoDB)\n const mongoUri = mongodbUri\n ? mongodbUri\n : // Fallback to MongoDB Atlas connection string\n `mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`;\n\n await mongoose.connect(mongoUri);\n\n const connectionType = mongodbUri ? \"Local MongoDB\" : \"MongoDB Atlas\";\n console.log(\n `${connectionType} connected from server/src/service/database.ts`,\n );\n } catch (err) {\n console.error(\"Error connecting to MongoDB:\", err);\n throw err; // You can throw the error if you want to stop the server in case of connection failure\n }\n};\n","import {\n SchemaCreateBulkNotificationInput,\n NotificationModel,\n} from \"src/mongoose/Notification\";\nimport { ObjectId } from \"src/types\";\n\n/**\n * Create notifications in the database for multiple users\n * This is typically called when sending push notifications\n */\nexport async function saveNotificationsInDb(\n payload: SchemaCreateBulkNotificationInput,\n): Promise<ObjectId[]> {\n const { data, message, title, type, userIds } = payload;\n console.log('NOTIFICATION DATA', JSON.stringify(payload, null, 2));\n try {\n const notifications = userIds.map((userId) => ({\n data,\n isRead: false,\n message,\n title,\n type,\n userId,\n }));\n\n // Save notifications to database\n await NotificationModel.insertMany(notifications);\n console.log(\n `Created ${notifications.length} notifications for ${userIds.length} users`,\n );\n\n return [...new Set(userIds)];\n } catch (error) {\n console.error(\"Failed to create notifications:\", error);\n return [];\n //throw new Error(`Failed to create notifications: ${error}`);\n }\n}\n","import { NotificationDataType } from \"@timardex/cluemart-shared\";\nimport { Expo, ExpoPushMessage, ExpoPushTicket } from \"expo-server-sdk\";\n\nimport { SchemaCreateBulkNotificationInput } from \"src/mongoose/Notification\";\nimport { PushTokenModel } from \"src/mongoose/PushToken\";\n\nconst expo = new Expo();\n\n/**\n * Safely extract tokens from ExpoPushMessage handling both string and array cases\n */\nfunction extractTokensFromMessage(message: ExpoPushMessage): string[] {\n return Array.isArray(message.to) ? message.to : [message.to];\n}\n\ninterface CreatePushMessagesOptions {\n tokens: string[];\n message: string;\n title: string;\n data: NotificationDataType;\n}\n\n/**\n * Create push messages from valid tokens\n */\nfunction createPushMessages({\n tokens,\n message,\n title,\n data,\n}: CreatePushMessagesOptions): {\n messages: ExpoPushMessage[];\n invalidTokens: string[];\n} {\n const messages: ExpoPushMessage[] = [];\n const invalidTokens: string[] = [];\n\n for (const token of tokens) {\n if (!Expo.isExpoPushToken(token)) {\n invalidTokens.push(token);\n continue;\n }\n\n messages.push({\n body: message,\n data: { ...data },\n sound: \"default\",\n title,\n to: token,\n });\n }\n\n return { invalidTokens, messages };\n}\n\n/**\n * Process chunk results and extract failed tokens\n */\nfunction processChunkResults(\n tickets: ExpoPushTicket[],\n chunk: ExpoPushMessage[],\n): { successCount: number; failedTokens: string[] } {\n let successCount = 0;\n const failedTokens: string[] = [];\n\n for (const [ticketIndex, ticket] of tickets.entries()) {\n if (ticket.status === \"error\") {\n const message = chunk[ticketIndex];\n if (message) {\n const tokens = extractTokensFromMessage(message);\n if (ticket.details?.error === \"DeviceNotRegistered\") {\n failedTokens.push(...tokens);\n }\n console.log(\"Push notification error\", {\n error: ticket.details?.error,\n tokens,\n });\n }\n } else {\n successCount++;\n }\n }\n\n return { failedTokens, successCount };\n}\n\n/**\n * Send a single chunk of push notifications\n */\nasync function sendChunk(\n chunk: ExpoPushMessage[],\n chunkIndex: number,\n): Promise<{ successCount: number; failedTokens: string[] }> {\n try {\n const tickets = await expo.sendPushNotificationsAsync(chunk);\n const { successCount, failedTokens } = processChunkResults(tickets, chunk);\n\n console.log(\n `Chunk ${chunkIndex + 1}: Sent ${successCount}/${chunk.length} notifications successfully`,\n );\n\n return { failedTokens, successCount };\n } catch (error) {\n console.log(\"Error sending Expo push notification chunk\", {\n chunkIndex,\n chunkSize: chunk.length,\n error: error instanceof Error ? error.message : String(error),\n });\n return { failedTokens: [], successCount: 0 };\n }\n}\n\nexport async function sendPushNotifications({\n data,\n message,\n title,\n userIds,\n}: SchemaCreateBulkNotificationInput) {\n const pushTokens = await PushTokenModel.find({ userId: { $in: userIds } });\n const expoTokens = pushTokens.map((token) => token.token);\n\n if (!data) return;\n\n const { messages, invalidTokens } = createPushMessages({\n data,\n message,\n title,\n tokens: expoTokens,\n });\n\n // Log invalid tokens\n if (invalidTokens.length > 0) {\n console.log(`Found ${invalidTokens.length} invalid push tokens`);\n }\n\n if (messages.length === 0) {\n console.log(\"No valid messages to send after filtering tokens\");\n return;\n }\n\n // Send notifications in chunks\n const chunks = expo.chunkPushNotifications(messages);\n let totalSuccessCount = 0;\n const allFailedTokens: string[] = [];\n\n for (const [chunkIndex, chunk] of chunks.entries()) {\n const { successCount, failedTokens } = await sendChunk(\n chunk,\n chunkIndex + 1,\n );\n totalSuccessCount += successCount;\n allFailedTokens.push(...failedTokens);\n }\n\n // Log final results\n console.log(\n `Sent push notification to ${totalSuccessCount}/${messages.length} tokens across ${chunks.length} chunks`,\n );\n\n if (allFailedTokens.length > 0) {\n console.log(`Found ${allFailedTokens.length} failed push tokens`);\n }\n}\n","import { EnumAdStatus } from \"@timardex/cluemart-shared\";\n\nimport { AdModel } from \"src/mongoose\";\n\n/**\n * Updates ad statuses based on start/end dates and validity\n */\nexport async function updateAdStatuses(): Promise<void> {\n const now = new Date();\n\n // invalid\n const invalidResult = await AdModel.updateMany(\n {\n $or: [\n { start: { $exists: false } },\n { end: { $exists: false } },\n { $expr: { $gt: [\"$start\", \"$end\"] } },\n ],\n status: { $ne: EnumAdStatus.PAUSED },\n },\n { $set: { status: EnumAdStatus.PAUSED } },\n );\n\n // expired\n const expiredResult = await AdModel.updateMany(\n { end: { $lte: now }, status: { $ne: EnumAdStatus.EXPIRED } },\n { $set: { status: EnumAdStatus.EXPIRED } },\n );\n\n // active\n const activeResult = await AdModel.updateMany(\n {\n end: { $gt: now },\n start: { $lte: now },\n status: { $ne: EnumAdStatus.ACTIVE },\n },\n { $set: { status: EnumAdStatus.ACTIVE } },\n );\n\n // paused\n const pausedResult = await AdModel.updateMany(\n { start: { $gt: now }, status: { $ne: EnumAdStatus.PAUSED } },\n { $set: { status: EnumAdStatus.PAUSED } },\n );\n\n console.log(\n `✅ Ad statuses updated: invalid=${invalidResult.modifiedCount}, expired=${expiredResult.modifiedCount}, active=${activeResult.modifiedCount}, paused=${pausedResult.modifiedCount}`,\n );\n}\n","import { EnumChatType, EnumResourceType } from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ChatModel, UserModel } from \"src/mongoose\";\nimport { ObjectId } from \"src/types\";\n\ninterface RemoveAssociateFromResourceParams {\n resourceId: string | ObjectId;\n resourceOwnerId: string | ObjectId;\n resourceType: EnumResourceType;\n}\n\ninterface ResourceAssociateScope {\n normalizedResourceId: string;\n resourceType: EnumResourceType;\n}\n\nfunction normalizeObjectId(id: string | ObjectId): ObjectId {\n return typeof id === \"string\" ? new mongoose.Types.ObjectId(id) : id;\n}\n\nasync function getAssociateEmailsForResource({\n normalizedResourceId,\n resourceType,\n}: ResourceAssociateScope): Promise<string[]> {\n const usersWithAssociates = await UserModel.find(\n {\n associates: {\n $elemMatch: {\n resourceId: normalizedResourceId,\n resourceType,\n },\n },\n },\n {\n associates: 1,\n },\n ).lean();\n\n return [\n ...new Set(\n usersWithAssociates.flatMap((user) =>\n (user.associates ?? [])\n .filter(\n (associate) =>\n associate.resourceId === normalizedResourceId &&\n associate.resourceType === resourceType,\n )\n .map((associate) => associate.email),\n ),\n ),\n ];\n}\n\nasync function pullAssociatesFromUsers({\n normalizedResourceId,\n resourceType,\n}: ResourceAssociateScope): Promise<void> {\n await UserModel.updateMany(\n {\n associates: {\n $elemMatch: {\n resourceId: normalizedResourceId,\n resourceType,\n },\n },\n },\n {\n $pull: {\n associates: {\n resourceId: normalizedResourceId,\n resourceType,\n },\n },\n },\n );\n}\n\nasync function pullAssociateParticipantsFromChats(\n resourceOwnerId: ObjectId,\n associateEmails: string[],\n): Promise<void> {\n await ChatModel.updateMany(\n {\n active: true,\n chatType: EnumChatType.RELATION,\n deletedAt: null,\n participants: {\n $elemMatch: {\n userId: resourceOwnerId,\n },\n },\n },\n {\n $pull: {\n participants: {\n isAssociate: true,\n userEmail: {\n $in: associateEmails,\n },\n },\n },\n },\n );\n}\n\n/**\n * Removes all associates linked to a resource\n * and removes related associate chat participants.\n */\nexport async function removeAssociateFromResource({\n resourceId,\n resourceOwnerId,\n resourceType,\n}: RemoveAssociateFromResourceParams): Promise<void> {\n try {\n const scope: ResourceAssociateScope = {\n normalizedResourceId: resourceId.toString(),\n resourceType,\n };\n\n const associateEmails = await getAssociateEmailsForResource(scope);\n\n if (associateEmails.length === 0) {\n return;\n }\n\n await pullAssociatesFromUsers(scope);\n await pullAssociateParticipantsFromChats(\n normalizeObjectId(resourceOwnerId),\n associateEmails,\n );\n } catch (error) {\n console.error(\n `[removeAssociateFromResource] Failed for resourceId=${resourceId}, resourceType=${resourceType}`,\n error,\n );\n }\n}\n","import { EnumResourceType, EnumUserLicence } from \"@timardex/cluemart-shared\";\n\nimport { UserModel, VendorModel, SchemaVendorType } from \"src/mongoose\";\nimport { ObjectId } from \"src/types\";\n\nimport { removeAssociateFromResource } from \"./associate\";\n\nexport async function updateVendorBasedOnUserLicense(\n userId: ObjectId,\n licenceType: EnumUserLicence,\n): Promise<void> {\n try {\n /**\n * Fetch user vendor reference\n */\n const user = await UserModel.findById(userId)\n .select(\"vendor\")\n .lean()\n .exec();\n\n if (!user?.vendor) {\n console.warn(`[updateVendor] No vendor found for userId=${userId}`);\n return;\n }\n\n /**\n * Fetch vendor\n */\n const vendor = await VendorModel.findById(user.vendor)\n .lean<SchemaVendorType>()\n .exec();\n\n if (!vendor) {\n console.warn(`[updateVendor] Vendor not found for id=${user.vendor}`);\n return;\n }\n\n /**\n * Build vendor update payload\n */\n const updateData: Partial<SchemaVendorType> = {};\n\n const isStandardVendor = licenceType === EnumUserLicence.STANDARD_VENDOR;\n\n if (isStandardVendor) {\n updateData.associates = [];\n\n updateData.availability = {\n corporate: false,\n private: false,\n school: false,\n };\n\n updateData.products = {\n active: false,\n productsList: vendor.products?.productsList ?? [],\n };\n\n updateData.calendar = {\n active: false,\n calendarData: vendor.calendar?.calendarData ?? [],\n };\n }\n\n /**\n * Image rules\n * STANDARD_VENDOR => only first 6 active\n * PRO_VENDOR => all active\n */\n updateData.images = (vendor.images ?? []).map((image, index) => ({\n ...image,\n active: isStandardVendor ? index < 6 : true,\n }));\n\n /**\n * Persist vendor updates\n */\n await VendorModel.updateOne({ _id: vendor._id }, { $set: updateData });\n\n /**\n * Cleanup associates for STANDARD licence\n */\n if (isStandardVendor) {\n await removeAssociateFromResource({\n resourceId: vendor._id,\n resourceOwnerId: vendor.owner.userId,\n resourceType: EnumResourceType.VENDOR,\n });\n }\n } catch (error) {\n console.error(\"[updateVendorBasedOnUserLicense] Failed:\", error);\n }\n}\n","import mongoose from \"mongoose\";\n\n/**\n * Recursively converts all ObjectId fields to strings in an object\n * This is needed because GraphQL expects string IDs, not ObjectIds\n */\nexport function convertObjectIdsToStrings(obj: any): any {\n if (obj === null || obj === undefined) {\n return obj;\n }\n\n if (obj instanceof mongoose.Types.ObjectId) {\n return obj.toString();\n }\n\n if (Array.isArray(obj)) {\n return obj.map(convertObjectIdsToStrings);\n }\n\n if (typeof obj === \"object\") {\n const converted: any = {};\n for (const [key, value] of Object.entries(obj)) {\n converted[key] = convertObjectIdsToStrings(value);\n }\n return converted;\n }\n\n return obj;\n}\n","import { EventListItemType } from \"@timardex/cluemart-shared\";\n\nimport { EventModel, GoogleImportedMarketModel } from \"src/mongoose\";\nimport { ObjectId } from \"src/types\";\n\nimport { convertObjectIdsToStrings } from \"./objectIdToString\";\n\ntype EventOrMarket = Pick<EventListItemType, \"_id\" | \"name\"> | null;\n\n/**\n * This function attempts to find an Event or a Google Imported Market by the given resource ID.\n * It first normalizes the resource ID to a string format, then performs parallel queries to both collections.\n * If an Event is found, it returns that; otherwise, it checks for a Google Imported Market and returns it if found.\n * If neither is found, it returns null.\n * @param resourceId - The ID of the resource to find, which can be an ObjectId, string, null, or undefined.\n * @returns A promise that resolves to either an Event or a Google Imported Market object containing _id and name, or null if not found.\n */\n\nexport async function findEventOrImportedMarketById(\n resourceId: ObjectId | string | null | undefined,\n): Promise<EventOrMarket> {\n if (!resourceId) {\n return null;\n }\n\n const normalizedId = convertObjectIdsToStrings(resourceId) as string;\n\n const [eventDoc, googleImportedDoc] = await Promise.all([\n EventModel.findById(normalizedId)\n .select(\"_id name\")\n .lean<Pick<EventListItemType, \"_id\" | \"name\">>()\n .exec(),\n GoogleImportedMarketModel.findById(normalizedId)\n .select(\"_id name\")\n .lean<Pick<EventListItemType, \"_id\" | \"name\">>()\n .exec(),\n ]);\n\n return eventDoc ?? googleImportedDoc;\n}\n","import {\n DateTimeWithPriceType,\n EnumInviteStatus,\n} from \"@timardex/cluemart-shared\";\nimport { DateTimeType } from \"@timardex/cluemart-shared/types\";\n\nimport { SchemaRelationType } from \"src/mongoose/Relation\";\n\ntype EventDateSlot = Pick<DateTimeType, \"startDate\" | \"startTime\">;\n\n/**\n * Returns true when at least one startDate/startTime slot from the previous\n * schedule is absent from the next schedule (i.e. a date was removed).\n */\nexport function didRemoveAnyEventDates(\n previousDateTime: EventDateSlot[] | undefined,\n nextDateTime: EventDateSlot[] | undefined,\n): boolean {\n if (!previousDateTime?.length) {\n return false;\n }\n\n return previousDateTime.some(\n (prev) =>\n !nextDateTime?.some(\n (next) =>\n next.startDate === prev.startDate &&\n next.startTime === prev.startTime,\n ),\n );\n}\n\n/**\n * Helper: Update relationDates based on event's dateTime\n * Marks dates as UNAVAILABLE if they no longer exist in the event's dateTime.\n */\nexport function updateRelationDatesToUnavailable(\n relationDates: SchemaRelationType[\"relationDates\"],\n eventDateTime: DateTimeWithPriceType[] | undefined,\n): SchemaRelationType[\"relationDates\"] {\n return relationDates.map((relationDate) => {\n // Check if this relationDate exists in the event's dateTime\n const existsInEvent =\n eventDateTime?.some(\n (dt) =>\n dt.startDate === relationDate.dateTime.startDate &&\n dt.startTime === relationDate.dateTime.startTime,\n ) ?? false;\n\n return {\n ...relationDate,\n status: existsInEvent\n ? relationDate.status\n : EnumInviteStatus.UNAVAILABLE,\n };\n });\n}\n","import { EnumUserRole } from \"@timardex/cluemart-shared\";\nimport { NotificationCount } from \"@timardex/cluemart-shared/types\";\nimport express from \"express\";\nimport mongoose from \"mongoose\";\n\nimport { SchemaChatType } from \"../mongoose/chat/Chat\";\nimport { SchemaNotificationType } from \"../mongoose/Notification\";\n\n// chnage to export type ObjectId = mongoose.Types.ObjectId;\n// chnage in server when setting decideGameType\nexport type ObjectId = mongoose.Types.ObjectId;\n\nexport enum EnumPubSubEvents {\n GET_CHAT_MESSAGE = \"GET_CHAT_MESSAGE\",\n GET_NOTIFICATIONS = \"GET_NOTIFICATIONS\",\n GET_NOTIFICATIONS_COUNT = \"GET_NOTIFICATIONS_COUNT\",\n USER_TYPING = \"USER_TYPING\",\n}\n\nexport interface AuthUser {\n email: string;\n role: EnumUserRole;\n userId: ObjectId;\n}\n\nexport interface SubscriptionPayload {\n getChatMessage?: SchemaChatType;\n userTyping?: SchemaChatType; // NOT USED\n getNotifications?: SchemaNotificationType[];\n // Used only for filtering; not part of the GraphQL schema output\n getNotificationsUserId?: ObjectId;\n getNotificationsCount?: NotificationCount & { userId: ObjectId };\n}\n\nexport interface GraphQLContext {\n appVersion: string | null;\n user: AuthUser | null;\n pubsub: {\n publish: (\n eventName: EnumPubSubEvents,\n payload: SubscriptionPayload,\n ) => void;\n subscribe: (eventName: EnumPubSubEvents) => AsyncIterable<any>;\n };\n request: express.Request;\n response: express.Response;\n}\n\nexport { mongoose, express };\n"],"mappings":";AGAA,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,OAAO,mBAAmB;AAC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AM;IACN,aAAa;IACb,iBAAiB;EACnB;AACF;ACjCO,IAAM,qBAAiC;EAC5C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;IACF;EACF;AACF;ACnGO,IAAM,2BAAuC;EAClD;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;AC/EO,IAAM,mBAA+B;EAC1C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;ACpLO,IAAM,2BAAuC;EAClD;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;AC9JO,IAAM,oBAAgC;EAC3C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;ACnEO,IAAM,sBAAkC;EAC7C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;AC3FO,IAAM,4BAAwC;EACnD;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;IACF;EACF;AACF;ACpFO,IAAM,uBAAmC;EAC9C;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;IACF;EACF;AACF;ACvGO,IAAM,eAA2B;EACtC;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,eAAe;MACb;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;QACF;MACF;MACA;QACE,IAAI;QACJ,MAAM;QACN,OAAO;UACL;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aACE;UACJ;UACA;YACE,IAAI;YACJ,MAAM;YACN,aAAa;UACf;QACF;MACF;IACF;EACF;AACF;ACzEO,IAAM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iBAAiB;AAAA,IACtB,CAAC,SACC,CAAC,cAAc;AAAA,MACb,CAAC,SACC,KAAK,cAAc,KAAK,aACxB,KAAK,cAAc,KAAK;AAAA,IAC5B;AAAA,EACJ;AACF;AAMO,SAAS,iCACd,eACA,eACqC;AACrC,SAAO,cAAc,IAAI,CAAC,iBAAiB;AAEzC,UAAM,gBACJ,eAAe;AAAA,MACb,CAAC,OACC,GAAG,cAAc,aAAa,SAAS,aACvC,GAAG,cAAc,aAAa,SAAS;AAAA,IAC3C,KAAK;AAEP,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,gBACJ,aAAa,SACb,iBAAiB;AAAA,IACvB;AAAA,EACF,CAAC;AACH;;;ACtDA,OAAO,aAAa;AACpB,OAAOC,gBAAc;AASd,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,sBAAmB;AACnB,EAAAA,kBAAA,uBAAoB;AACpB,EAAAA,kBAAA,6BAA0B;AAC1B,EAAAA,kBAAA,iBAAc;AAJJ,SAAAA;AAAA,GAAA;","names":["d","b","__assign","InvariantError","invariant","invariant","invariant","OperationTypeNode","DirectiveLocation","Kind","TokenKind","instanceOf","EnumInviteStatus","EnumChatReportReason","EnumChatType","EnumPaymentMethod","EnumFoodFlavor","EnumResourceType","EnumEventType","EnumVendorType","EnumPartnerType","EnumOSPlatform","EnumRelationResource","EnumNotificationResourceType","EnumNotificationType","EnumRegions","EnumUserLicence","EnumUserRole","EnumEventDateStatus","EnumSubscriptionStatus","EnumReward","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","mongoose","MongooseSchema","mongoose","MongooseSchema","mongoose","mongoose","mongoose","MongooseSchema","schema","MongooseSchema","mongoose","MongooseSchema","mongoose","dateTimeSchema","mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","mongoose","MongooseSchema","schema","EnumOSPlatform","mongoose","MongooseSchema","schema","EnumOSPlatform","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","dateTimeSchema","schema","mongoose","MongooseSchema","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","dateTimeSchema","schema","mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","mongoose","mongoose","MongooseSchema","MongooseSchema","mongoose","mongoose","MongooseSchema","MongooseSchema","mongoose","schema","mongoose","MongooseSchema","mongoose","schema","mongoose","mongoose","mongoose","mongoose","mongoose","EnumPubSubEvents"]}