@timardex/cluemart-server-shared 1.0.65 → 1.0.69

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/react/cjs/react.production.js","../node_modules/react/cjs/react.development.js","../node_modules/react/index.js","../node_modules/property-expr/index.js","../node_modules/tiny-case/index.js","../node_modules/toposort/index.js","../src/index.ts","../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/utils/index.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/testers.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/tester.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/tester/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/tester.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/tester/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/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/hooks/useLocationSearch.ts","../node_modules/@timardex/cluemart-shared/src/hooks/vendor/useVendorForm.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/global.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/event.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/vendor.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/user.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/auth.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/tester.ts","../node_modules/@timardex/cluemart-shared/src/types/tester.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/ad.ts","../node_modules/@timardex/cluemart-shared/src/types/ad.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/partner.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/post.ts","../node_modules/@timardex/cluemart-shared/src/types/post.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/appSettings.ts","../node_modules/@timardex/cluemart-shared/src/hooks/utils.ts","../node_modules/@timardex/cluemart-shared/src/hooks/vendor/useVendorInfoForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/event/useEventForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/event/useEventInfoForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useUserForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useLoginForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useRegisterForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useRequestPasswordResetForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useValidateVerificationTokenForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useResetPasswordForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useTesterForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useContactUsForm.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useAdForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/partner/usePartnerForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/usePostForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useAppSettingsForm.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/resourceActivities.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","../node_modules/yup/index.esm.js","../src/mongoose/Ad.ts","../src/mongoose/global.ts","../src/mongoose/Relation.ts","../src/mongoose/event/EventInfo.ts","../src/mongoose/Chat.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/Tester.ts","../src/mongoose/User.ts","../src/mongoose/VerificationToken.ts","../src/mongoose/vendor/Vendor.ts","../src/mongoose/vendor/VendorInfo.ts","../src/mongoose/event/Event.ts","../src/mongoose/Partner.ts","../src/mongoose/Post.ts","../src/mongoose/AppSetting.ts","../src/service/database.ts","../src/service/saveNotificationsInDb.ts","../src/service/sendPushNotifications.ts","../src/service/updateAdStatus.ts","../src/types/index.ts"],"sourcesContent":["/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.2.3\";\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ioInfo = payload._ioInfo;\n null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n null != _ioInfo && (_ioInfo.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 && (_ioInfo2.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n ioInfo.value = thenable;\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n };\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.2.3\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * Based on Kendo UI Core expression code <https://github.com/telerik/kendo-ui-core#license-information>\n */\n'use strict'\n\nfunction Cache(maxSize) {\n this._maxSize = maxSize\n this.clear()\n}\nCache.prototype.clear = function () {\n this._size = 0\n this._values = Object.create(null)\n}\nCache.prototype.get = function (key) {\n return this._values[key]\n}\nCache.prototype.set = function (key, value) {\n this._size >= this._maxSize && this.clear()\n if (!(key in this._values)) this._size++\n\n return (this._values[key] = value)\n}\n\nvar SPLIT_REGEX = /[^.^\\]^[]+|(?=\\[\\]|\\.\\.)/g,\n DIGIT_REGEX = /^\\d+$/,\n LEAD_DIGIT_REGEX = /^\\d/,\n SPEC_CHAR_REGEX = /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g,\n CLEAN_QUOTES_REGEX = /^\\s*(['\"]?)(.*?)(\\1)\\s*$/,\n MAX_CACHE_SIZE = 512\n\nvar pathCache = new Cache(MAX_CACHE_SIZE),\n setCache = new Cache(MAX_CACHE_SIZE),\n getCache = new Cache(MAX_CACHE_SIZE)\n\nvar config\n\nmodule.exports = {\n Cache: Cache,\n\n split: split,\n\n normalizePath: normalizePath,\n\n setter: function (path) {\n var parts = normalizePath(path)\n\n return (\n setCache.get(path) ||\n setCache.set(path, function setter(obj, value) {\n var index = 0\n var len = parts.length\n var data = obj\n\n while (index < len - 1) {\n var part = parts[index]\n if (\n part === '__proto__' ||\n part === 'constructor' ||\n part === 'prototype'\n ) {\n return obj\n }\n\n data = data[parts[index++]]\n }\n data[parts[index]] = value\n })\n )\n },\n\n getter: function (path, safe) {\n var parts = normalizePath(path)\n return (\n getCache.get(path) ||\n getCache.set(path, function getter(data) {\n var index = 0,\n len = parts.length\n while (index < len) {\n if (data != null || !safe) data = data[parts[index++]]\n else return\n }\n return data\n })\n )\n },\n\n join: function (segments) {\n return segments.reduce(function (path, part) {\n return (\n path +\n (isQuoted(part) || DIGIT_REGEX.test(part)\n ? '[' + part + ']'\n : (path ? '.' : '') + part)\n )\n }, '')\n },\n\n forEach: function (path, cb, thisArg) {\n forEach(Array.isArray(path) ? path : split(path), cb, thisArg)\n },\n}\n\nfunction normalizePath(path) {\n return (\n pathCache.get(path) ||\n pathCache.set(\n path,\n split(path).map(function (part) {\n return part.replace(CLEAN_QUOTES_REGEX, '$2')\n })\n )\n )\n}\n\nfunction split(path) {\n return path.match(SPLIT_REGEX) || ['']\n}\n\nfunction forEach(parts, iter, thisArg) {\n var len = parts.length,\n part,\n idx,\n isArray,\n isBracket\n\n for (idx = 0; idx < len; idx++) {\n part = parts[idx]\n\n if (part) {\n if (shouldBeQuoted(part)) {\n part = '\"' + part + '\"'\n }\n\n isBracket = isQuoted(part)\n isArray = !isBracket && /^\\d+$/.test(part)\n\n iter.call(thisArg, part, isBracket, isArray, idx, parts)\n }\n }\n}\n\nfunction isQuoted(str) {\n return (\n typeof str === 'string' && str && [\"'\", '\"'].indexOf(str.charAt(0)) !== -1\n )\n}\n\nfunction hasLeadingNumber(part) {\n return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX)\n}\n\nfunction hasSpecialChars(part) {\n return SPEC_CHAR_REGEX.test(part)\n}\n\nfunction shouldBeQuoted(part) {\n return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part))\n}\n","const reWords = /[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*/g\n\nconst words = (str) => str.match(reWords) || []\n\nconst upperFirst = (str) => str[0].toUpperCase() + str.slice(1)\n\nconst join = (str, d) => words(str).join(d).toLowerCase()\n\nconst camelCase = (str) =>\n words(str).reduce(\n (acc, next) =>\n `${acc}${\n !acc\n ? next.toLowerCase()\n : next[0].toUpperCase() + next.slice(1).toLowerCase()\n }`,\n '',\n )\n\nconst pascalCase = (str) => upperFirst(camelCase(str))\n\nconst snakeCase = (str) => join(str, '_')\n\nconst kebabCase = (str) => join(str, '-')\n\nconst sentenceCase = (str) => upperFirst(join(str, ' '))\n\nconst titleCase = (str) => words(str).map(upperFirst).join(' ')\n\nmodule.exports = {\n words,\n upperFirst,\n camelCase,\n pascalCase,\n snakeCase,\n kebabCase,\n sentenceCase,\n titleCase,\n}\n","\n/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nmodule.exports = function(edges) {\n return toposort(uniqueNodes(edges), edges)\n}\n\nmodule.exports.array = toposort\n\nfunction toposort(nodes, edges) {\n var cursor = nodes.length\n , sorted = new Array(cursor)\n , visited = {}\n , i = cursor\n // Better data structures make algorithm much faster.\n , outgoingEdges = makeOutgoingEdges(edges)\n , nodesHash = makeNodesHash(nodes)\n\n // check for unknown nodes\n edges.forEach(function(edge) {\n if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {\n throw new Error('Unknown node. There is an unknown node in the supplied edges.')\n }\n })\n\n while (i--) {\n if (!visited[i]) visit(nodes[i], i, new Set())\n }\n\n return sorted\n\n function visit(node, i, predecessors) {\n if(predecessors.has(node)) {\n var nodeRep\n try {\n nodeRep = \", node was:\" + JSON.stringify(node)\n } catch(e) {\n nodeRep = \"\"\n }\n throw new Error('Cyclic dependency' + nodeRep)\n }\n\n if (!nodesHash.has(node)) {\n throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: '+JSON.stringify(node))\n }\n\n if (visited[i]) return;\n visited[i] = true\n\n var outgoing = outgoingEdges.get(node) || new Set()\n outgoing = Array.from(outgoing)\n\n if (i = outgoing.length) {\n predecessors.add(node)\n do {\n var child = outgoing[--i]\n visit(child, nodesHash.get(child), predecessors)\n } while (i)\n predecessors.delete(node)\n }\n\n sorted[--cursor] = node\n }\n}\n\nfunction uniqueNodes(arr){\n var res = new Set()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n res.add(edge[0])\n res.add(edge[1])\n }\n return Array.from(res)\n}\n\nfunction makeOutgoingEdges(arr){\n var edges = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n if (!edges.has(edge[0])) edges.set(edge[0], new Set())\n if (!edges.has(edge[1])) edges.set(edge[1], new Set())\n edges.get(edge[0]).add(edge[1])\n }\n return edges\n}\n\nfunction makeNodesHash(arr){\n var res = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n res.set(arr[i], i)\n }\n return res\n}\n","export * from \"./mongoose\";\nexport * from \"./service\";\nexport * from \"./types\";\n","export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\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 = \"Other\",\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 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_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_VENDOR = \"created_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n EVENT = EnumResourceType.EVENT,\n VENDOR = EnumResourceType.VENDOR,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport enum EnumRegions {\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_WEEKEND = \"This_Weekend\",\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 } 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 vendorMultiLocation: FormField = {\n helperText:\n \"Usefull when you are not only selling products on Events but also providing services at other locations.\",\n name: \"multiLocation\",\n placeholder: \"Multi location\",\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: \"Item Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Item Description\",\n },\n {\n helperText: \"Price\",\n keyboardType: \"decimal-pad\",\n name: \"price\",\n placeholder: \"Price\",\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 ],\n },\n {\n category: \"Natural\",\n items: [\n { abbreviation: \"ECO\", fullName: \"Eco-Friendly\" },\n { abbreviation: \"ORGANIC\", fullName: \"Organic Product\" },\n ],\n },\n {\n category: \"Market Character\",\n items: [\n { abbreviation: \"HM\", fullName: \"Handmade\" },\n { abbreviation: \"LOC\", fullName: \"Local Product\" },\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 ],\n },\n {\n category: \"Animal Related\",\n items: [\n { abbreviation: \"GF-PET\", fullName: \"Grain-Free (Pet)\" },\n { abbreviation: \"PF\", fullName: \"Pet-Friendly\" },\n ],\n },\n {\n category: \"Plant / Natural\",\n items: [\n { abbreviation: \"NPF\", fullName: \"Non-Pesticide / Chemical-Free\" },\n { abbreviation: \"PLN\", fullName: \"Plant-Based\" },\n ],\n },\n {\n category: \"Gift / Design\",\n items: [\n { abbreviation: \"ART\", fullName: \"Artisan\" },\n { abbreviation: \"LTD\", fullName: \"Limited Edition\" },\n ],\n },\n {\n category: \"Sustainability\",\n items: [{ abbreviation: \"ZWP\", fullName: \"Zero-Waste Product\" }],\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\nimport {\n EnumInviteStatus,\n EnumPaymentMethod,\n EnumRegions,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"../enums\";\nimport { OptionItem, Region, SocialMediaType } from \"../types/global\";\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 dayjs(date).tz(NZ_TZ).format();\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 = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(dateFormat);\n\n const formattedTime = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(timeFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const defaultRegion: Region = {\n latitude: -36.8624942, // Default: New Zealand\n latitudeDelta: 5.0,\n longitude: 174.7450494,\n longitudeDelta: 5.0,\n};\n\nconst isIsoDateString = (value: unknown): value is string => {\n return typeof value === \"string\" && !isNaN(Date.parse(value));\n};\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\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\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+ Event\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"Pro+ 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","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 \"Recyclable\",\n \"Reusable\",\n \"Single-use\",\n \"Glass\",\n \"Paper\",\n \"Plastic\",\n \"Wood\",\n \"Other\",\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,\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 { 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 electricity: {\n price: null,\n selected: false,\n },\n label: type,\n price: 0,\n stallCapacity: 0,\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 },\n {\n helperText: \"Enter password *\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\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 },\n {\n helperText: \"Enter last name *\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n ...emailField,\n },\n {\n helperText: \"Enter password *\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n];\n\nexport const requestPasswordResetFields: FormField[] = [\n {\n ...emailField,\n helperText: \"Enter email address to reset your password *\",\n },\n];\n\nexport const resetPasswordFields: FormField[] = [\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\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 },\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 testersFields: FormField[] = [\n {\n helperText: \"Enter your business name *\",\n keyboardType: \"default\",\n name: \"businessName\",\n placeholder: \"Business Name *\",\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 ...emailField,\n helperText: \"Enter email address *\",\n },\n {\n helperText: \"Enter your mobile phone number *\",\n keyboardType: \"phone-pad\",\n name: \"mobilePhone\",\n placeholder: \"Mobile Phone Number *\",\n },\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 events 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_RESEND_TESTER_VERIFICATION_EMAIL_MUTATION,\n ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION,\n ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,\n ADMIN_UPDATE_TESTER_MUTATION,\n} from \"src/graphql/mutations/admin\";\nimport { GET_EVENT } from \"src/graphql/queries/event\";\nimport { GET_TESTER } from \"src/graphql/queries/tester\";\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 useAdminUpdateTester = () => {\n const [adminUpdateTester, { loading, error }] = useMutation<{\n adminUpdateTester: {\n _id: string;\n approved: boolean;\n };\n }>(ADMIN_UPDATE_TESTER_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract testerId from the mutation response\n const adminUpdateTester = mutationResult?.data?.adminUpdateTester;\n const testerId = adminUpdateTester?._id;\n\n return [\n {\n query: GET_TESTER,\n variables: { _id: testerId },\n },\n ];\n },\n });\n return {\n adminUpdateTester,\n error,\n loading,\n };\n};\n\nexport const useAdminResendTesterVerificationEmail = () => {\n const [adminResendTesterVerificationEmail, { loading, error }] = useMutation(\n ADMIN_RESEND_TESTER_VERIFICATION_EMAIL_MUTATION,\n );\n\n return {\n adminResendTesterVerificationEmail,\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","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_UPDATE_TESTER_MUTATION = gql`\n mutation adminUpdateTester($input: AdminUpdateTesterInputType!) {\n adminUpdateTester(input: $input) {\n _id\n approved\n }\n }\n`;\n\nexport const ADMIN_RESEND_TESTER_VERIFICATION_EMAIL_MUTATION = gql`\n mutation adminResendTesterVerificationEmail($testerId: ID!) {\n adminResendTesterVerificationEmail(testerId: $testerId)\n }\n`;\n\nexport const ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = gql`\n mutation adminResendUserVerificationEmail($userId: ID!) {\n adminResendUserVerificationEmail(userId: $userId)\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n EVENT_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 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 createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n dateTime {\n ...EventDateTimeFields\n }\n description\n deletedAt\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 socialMedia {\n ...SocialMediaFields\n }\n rainOrShine\n tags\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${EVENT_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_EVENTS_BY_REGION = gql`\n query getEventsByRegion($region: String!) {\n eventsByRegion(region: $region) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const SEARCH_EVENTS = gql`\n query searchEvents($search: String!, $region: String) {\n eventsSearch(search: $search, region: $region) {\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 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 }\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 EVENT_DATETIME_FIELDS_FRAGMENT = gql`\n fragment EventDateTimeFields on EventDateTimeType {\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 vendors\n }\n going {\n events {\n resourceId\n dateTime {\n ...EventDateTimeFields\n }\n }\n }\n interested {\n events {\n resourceId\n dateTime {\n ...EventDateTimeFields\n }\n }\n }\n present {\n events {\n resourceId\n dateTime {\n ...EventDateTimeFields\n }\n }\n }\n }\n ${EVENT_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 isTester\n lastName\n licences {\n ...LicenceFields\n }\n platform\n preferredRegion\n refreshToken\n role\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 electricity {\n price\n selected\n }\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_FIELDS_FRAGMENT = gql`\n fragment LocationFields on LocationType {\n city\n coordinates\n country\n fullAddress\n latitude\n longitude\n region\n type\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 ...EventDateTimeFields\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 reviewCount\n updatedAt\n }\n ${EVENT_DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;","import { gql } from \"@apollo/client\";\n\nimport { CATEGORY_FIELDS_FRAGMENT } from \"./global\";\n\nconst TESTER_VENDOR_FIELDS_FRAGMENT = gql`\n fragment TesterVendorFields on TesterVendorType {\n categories {\n ...CategoryFields\n }\n productsOrServices\n marketsAttended {\n name\n city\n }\n sellingFrequency\n yearlySellingApprox\n questionary {\n uploadStallProfileFirstWeek\n applyToAtLeastOneMarket\n tryVisitorFeatures\n completeFeedbackQuestionnaire\n sendPhotoForSocialMedia\n appearInVideoIntroduction\n socialMediaFeatureReason\n excitementAboutApp\n usefulnessExpectations\n testingPeriodConcerns\n }\n }\n ${CATEGORY_FIELDS_FRAGMENT}\n`;\n\nconst TESTER_EVENT_FIELDS_FRAGMENT = gql`\n fragment TesterEventFields on TesterEventType {\n organizedMarketCount\n markets {\n name\n cityOrVenue\n frequency\n averageStallCount\n }\n questionary {\n allowMarketingAppearance\n completeFinalQuestionnaire\n dailyCoordinationNeeds\n interestedInCharityInitiative\n inviteStallholders\n manageApplicationsAndCommunication\n organizerExpectations\n completeMarketProfileFirstWeek\n spaceForClueMart\n uploadStallList\n }\n }\n`;\n\nexport const TESTER_FIELDS_FRAGMENT = gql`\n fragment TesterFields on TesterType {\n _id\n active\n approved\n businessName\n consents {\n betaTestConsent\n privacyConsent\n }\n createdAt\n email\n firstName\n lastName\n mobilePhone\n osType\n region\n resourceType\n updatedAt\n vendor {\n ...TesterVendorFields\n }\n event {\n ...TesterEventFields\n }\n }\n ${TESTER_VENDOR_FIELDS_FRAGMENT}\n ${TESTER_EVENT_FIELDS_FRAGMENT}\n`;\n\nexport const GET_TESTERS = gql`\n query getTesters {\n testers {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_TESTER = gql`\n query getTester($_id: ID!) {\n tester(_id: $_id) {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_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 EVENT_DATETIME_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const VENDOR_LOCATION_FIELDS_FRAGMENT = gql`\n fragment VendorLocationFields on VendorLocationType {\n city\n coordinates\n country\n fullAddress\n latitude\n longitude\n region\n type\n }\n`;\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\nexport const VENDOR_MENU_FIELDS_FRAGMENT = gql`\n fragment VendorMenuFields on VendorMenuType {\n description\n name\n price\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 contactDetails {\n ...ContactDetailsFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n description\n deletedAt\n foodTruck\n images {\n ...ResourceImageFields\n }\n locations {\n dateTime {\n ...VendorDateTimeFields\n }\n description\n location {\n ...VendorLocationFields\n }\n }\n logo {\n ...ResourceImageFields\n }\n multiLocation\n name\n owner {\n ...OwnerFields\n }\n products {\n ...VendorMenuFields\n }\n promoCodes\n posterUsage {\n ...PosterUsageFields\n }\n region\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 }\n ${CATEGORY_FIELDS_FRAGMENT}\n ${VENDOR_DATETIME_FIELDS_FRAGMENT}\n ${VENDOR_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_MENU_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 ...EventDateTimeFields\n }\n eventId\n location {\n ...LocationFields\n }\n }\n ${EVENT_DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n`;\n\nexport const UNREGISTERED_VENDOR = gql`\n fragment UnregisteredVendorFields on UnregisteredVendorType {\n _id\n categories {\n ...CategoryFields\n }\n createdAt\n deletedAt\n email\n invitations {\n ...UnregisteredVendorInvitationFields\n }\n name\n region\n updatedAt\n }\n ${CATEGORY_FIELDS_FRAGMENT}\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($region: String!) {\n vendorsByRegion(region: $region) {\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_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 {\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(REGISTER_MUTATION);\n return { error, loading, register };\n};\n\nexport const useLogin = () => {\n const [login, { loading, error }] = useMutation(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 REFRESH_TOKEN_MUTATION,\n );\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 { 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} from \"../../mutations/chat\";\nimport { CHAT, USER_CHATS } from \"../../queries/chat\";\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 REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: USER_CHATS }],\n },\n );\n\n return { error, loading, removeParticipantFromChat };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { CHAT_FIELDS_FRAGMENT } from \"../queries/chat\";\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 }\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 senderId\n updatedAt\n }\n`;\n\nexport const CHAT_PARTICIPANT = gql`\n fragment ChatParticipantFields on ChatParticipantType {\n active\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 chatName\n chatType\n createdAt\n deletedAt\n messages {\n ...ChatMessageFields\n }\n participants {\n ...ChatParticipantFields\n }\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","import { useQuery, useSubscription } from \"@apollo/client\";\n\nimport { GET_CHAT_MESSAGE } from \"src/graphql/subscriptions/chat\";\n\nimport { ChatType } from \"../../../types/chat\";\nimport { CHAT, USER_CHATS } 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,\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","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(UPDATE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_EVENTS }],\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 }, // Pass the eventId for refetching\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId }, // Pass the eventId for refetching\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 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`;\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 region\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($region: String!) {\n partnersByRegion(region: $region) {\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 { EventInfoType, EventType } from \"../../../types/event\";\nimport {\n GET_EVENT,\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<{ events: EventType[] }>(\n GET_EVENTS,\n {\n fetchPolicy: \"network-only\",\n },\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<{ event: EventType }>(\n GET_EVENT,\n {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: { _id },\n },\n );\n\n const event = data?.event;\n\n return { error, event, loading, refetch };\n};\n\nexport const useGetEventsByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventsByRegion: EventType[];\n }>(GET_EVENTS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region,\n variables: { region },\n });\n\n const eventsByRegion = data?.eventsByRegion || [];\n\n return { error, eventsByRegion, loading, refetch };\n};\n\nexport const useSearchEvents = (search: string, region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventsSearch: EventType[];\n }>(SEARCH_EVENTS, {\n fetchPolicy: \"network-only\",\n skip: search.length < 3,\n variables: { region, search },\n });\n\n const eventsSearch = data?.eventsSearch || [];\n\n return { error, eventsSearch, loading, refetch };\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: EventType[];\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,\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: {\n eventId: string;\n vendorId: string;\n lastUpdateBy: EnumResourceType;\n };\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 apiMessage\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 },\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 || !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,\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,\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 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 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","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","import { useQuery } from \"@apollo/client\";\n\nimport {\n UnregisteredVendorType,\n VendorInfoType,\n VendorType,\n} from \"../../../types/vendor\";\nimport {\n GET_UNREGISTERED_VENDOR,\n GET_UNREGISTERED_VENDORS,\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,\n variables: { _id },\n },\n );\n\n const vendor = data?.vendor;\n\n return { error, loading, refetch, vendor };\n};\n\nexport const useGetVendorsByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorsByRegion: VendorType[];\n }>(GET_VENDORS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region,\n variables: { region },\n });\n\n const vendorsByRegion = data?.vendorsByRegion || [];\n\n return { error, loading, refetch, vendorsByRegion };\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,\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,\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 useGetUnregisteredVendor = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendor: UnregisteredVendorType;\n }>(GET_UNREGISTERED_VENDOR, {\n fetchPolicy: \"network-only\",\n skip: !_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 CREATE_TESTER_MUTATION,\n DELETE_TESTER_MUTATION,\n UPDATE_TESTER_MUTATION,\n} from \"src/graphql/mutations/tester\";\nimport { GET_TESTERS } from \"src/graphql/queries/tester\";\n\nexport const useCreateTester = () => {\n const [createTester, { data, loading, error }] = useMutation(\n CREATE_TESTER_MUTATION,\n );\n\n return {\n createTester,\n data,\n error,\n loading,\n };\n};\n\nexport const useUpdateTester = () => {\n const [updateTester, { data, loading, error }] = useMutation(\n UPDATE_TESTER_MUTATION,\n );\n\n return {\n data,\n error,\n loading,\n updateTester,\n };\n};\n\nexport const useDeleteTester = () => {\n const [deleteTester, { loading, error }] = useMutation(\n DELETE_TESTER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_TESTERS }],\n },\n );\n\n return { deleteTester, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { TESTER_FIELDS_FRAGMENT } from \"../queries/tester\";\n\nexport const CREATE_TESTER_MUTATION = gql`\n mutation createTester($input: TesterInputType!) {\n createTester(input: $input) {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_TESTER_MUTATION = gql`\n mutation updateTester($_id: ID!, $input: TesterInputType!) {\n updateTester(_id: $_id, input: $input) {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_TESTER_MUTATION = gql`\n mutation deleteTester($_id: ID!) {\n deleteTester(_id: $_id)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { GET_TESTER, GET_TESTERS } from \"src/graphql/queries/tester\";\nimport { TesterType } from \"src/types/tester\";\n\nexport const useGetTesters = () => {\n const { data, loading, error, refetch } = useQuery<{ testers: TesterType[] }>(\n GET_TESTERS,\n );\n\n const testers = data?.testers || [];\n return {\n error,\n loading,\n refetch,\n testers,\n };\n};\n\nexport const useGetTester = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{ tester: TesterType }>(\n GET_TESTER,\n {\n skip: !_id,\n variables: { _id },\n },\n );\n\n const tester = data?.tester;\n\n return { error, loading, refetch, tester };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport { GET_USER, GET_USER_ACTIVITIES } from \"src/graphql/queries/user\";\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 UPDATE_USER_MUTATION,\n} from \"../../mutations/user\";\n\nexport const useCreateUser = () => {\n const [createUser, { loading, error }] = useMutation(CREATE_USER_MUTATION);\n\n return { createUser, error, loading };\n};\n\nexport const useUpdateUser = () => {\n const [updateUser, { loading, error }] = useMutation<{\n updateUser: { _id: string };\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","import { gql } from \"@apollo/client\";\n\nimport { USER_FIELDS_FRAGMENT } 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","import { useQuery } from \"@apollo/client\";\n\nimport { EventListItemType, EventType, VendorType } from \"src/types\";\n\nimport { UserType } from \"../../../types/user\";\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_VENDORS,\n GET_USERS,\n} from \"../../queries/user\";\n\nexport const useGetUsers = () => {\n const { loading, error, data, refetch } = useQuery<{ users: UserType[] }>(\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: UserType }>(\n GET_USER,\n {\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 useGetUserActivities = () => {\n const { loading, error, data, refetch } = useQuery<{\n userActivities: {\n favourites: {\n events: EventType[];\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 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","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\nimport { SOCIAL_MEDIA_FIELDS_FRAGMENT } from \"./global\";\n\nexport const AD_FIELDS_FRAGMENT = gql`\n fragment AdFields on AdType {\n _id\n active\n adStyle\n adType\n clicks\n createdAt\n end\n impressions\n resourceCover\n resourceDescription\n resourceId\n resourceLogo\n resourceName\n resourceRegion\n resourceType\n showOn\n socialMedia {\n ...SocialMediaFields\n }\n start\n status\n targetRegion\n updatedAt\n }\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\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,\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,\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\nconst RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment ResourceActivityFields on ResourceActivityType {\n resourceId\n resourceType\n activity {\n activityType\n location {\n type\n coordinates\n }\n dateStatus\n startDate\n startTime\n timestamp\n userAgent\n userId\n }\n }\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 $removedLicence: LicencesEnumType\n $selectedLicence: LicencesEnumType!\n $useStripe: Boolean\n ) {\n selectPackage(\n billingPeriod: $billingPeriod\n removedLicence: $removedLicence\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 { SubscriptionStatusData } from \"../../../types/user\";\nimport { GET_SUBSCRIPTION_STATUS } 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","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","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 {\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,\n variables: { _id },\n },\n );\n\n const partner = data?.partner;\n\n return { error, loading, partner, refetch };\n};\n\nexport const useGetPartnersByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n partnersByRegion: PartnerType[];\n }>(GET_PARTNERS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region,\n variables: { region },\n });\n\n const partnersByRegion = data?.partnersByRegion || [];\n\n return { error, loading, partnersByRegion, refetch };\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,\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 { RESOURCE_IMAGE_FIELDS_FRAGMENT } from \"./global\";\n\nconst POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`\n fragment PostContentDataFields on PostContentData {\n cover {\n ...ResourceImageFields\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`;\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 createdAt\n deletedAt\n postType\n tags\n title\n updatedAt\n }\n ${POST_CONTENT_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 { 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\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 skip: !_id,\n variables: { _id },\n });\n\n return { error, loading, post: data?.post || null, refetch };\n};\n\nexport const useGetPostsByType = (postType: EnumPostType) => {\n const { data, loading, error, refetch } = useQuery<{\n postsByType: PostType[];\n }>(GET_POSTS_BY_TYPE, {\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} 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","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","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 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","/* eslint-disable camelcase */\nimport { LocationType } from \"../types/global\";\n\nexport interface PlacePrediction {\n place_id: string;\n description: string;\n}\n\ninterface PlaceDetails {\n addressComponents: {\n longText: string;\n shortText: string;\n types: string[];\n }[];\n formattedAddress: string;\n location: {\n latitude: number;\n longitude: number;\n };\n}\n\ninterface AutocompleteResponse {\n suggestions?: Array<{\n placePrediction?: {\n placeId?: string;\n text?: {\n text?: string;\n };\n };\n }>;\n}\n\ninterface UseLocation {\n getPredictions: (text: string) => Promise<PlacePrediction[] | undefined>;\n getPlaceDetails: (placeId: string) => Promise<LocationType | undefined>;\n}\n\n/** Handles API request errors */\nconst handleApiError = (error: unknown, message: string) => {\n console.error(message, error);\n};\n\n/**\n * Custom hook to manage location search functionality.\n *\n * @returns {UseLocation} - The functions to get predictions and place details.\n */\nexport const useLocationSearch = (googleApi: string): UseLocation => {\n const getPredictions = async (\n text: string,\n ): Promise<PlacePrediction[] | undefined> => {\n try {\n const response = await fetch(\n \"https://places.googleapis.com/v1/places:autocomplete\",\n {\n body: JSON.stringify({\n includedRegionCodes: [\"nz\"],\n input: text,\n languageCode: \"en\",\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-Goog-Api-Key\": googleApi,\n \"X-Goog-FieldMask\":\n \"suggestions.placePrediction.placeId,suggestions.placePrediction.text.text\",\n },\n method: \"POST\",\n },\n );\n\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n const data = (await response.json()) as AutocompleteResponse;\n const suggestions = data.suggestions ?? [];\n const predictions = suggestions\n .map((suggestion) => suggestion.placePrediction)\n .filter(Boolean)\n .map((prediction) => ({\n description: prediction?.text?.text || \"\",\n place_id: prediction?.placeId || \"\",\n }))\n .filter((prediction) => prediction.place_id && prediction.description);\n\n return predictions;\n } catch (error) {\n console.error(\"Error fetching predictions:\", error);\n handleApiError(error, \"Failed to fetch address predictions.\");\n }\n };\n\n const getPlaceDetails = async (\n placeId: string,\n ): Promise<LocationType | undefined> => {\n try {\n const response = await fetch(\n `https://places.googleapis.com/v1/places/${placeId}`,\n {\n headers: {\n \"X-Goog-Api-Key\": googleApi,\n \"X-Goog-FieldMask\": \"addressComponents,formattedAddress,location\",\n },\n },\n );\n\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n const result = (await response.json()) as PlaceDetails;\n const { latitude, longitude } = result.location;\n const { addressComponents, formattedAddress } = result;\n\n const address = addressComponents.reduce((acc, item) => {\n if (item.types.includes(\"street_number\")) {\n return { ...acc, streetNumber: item.longText };\n }\n if (item.types.includes(\"route\")) {\n return { ...acc, streetName: item.longText };\n }\n if (item.types.includes(\"locality\")) {\n return { ...acc, city: item.longText };\n }\n if (item.types.includes(\"administrative_area_level_1\")) {\n return { ...acc, region: item.longText };\n }\n if (item.types.includes(\"country\")) {\n return { ...acc, country: item.longText };\n }\n return acc;\n }, {} as LocationType);\n\n const newLocation = {\n city: address.city ? address.city.toLowerCase() : \"\",\n coordinates: [longitude, latitude], // [longitude, latitude]\n country: address.country,\n fullAddress: formattedAddress,\n latitude,\n longitude,\n region: address.region ? address.region.replace(/ Region$/, \"\") : \"\", // Remove \" Region\" suffix\n type: \"Point\" as const, // Mongoose GeoJSON type\n };\n\n return newLocation;\n } catch (error) {\n handleApiError(error, \"Failed to fetch place details.\");\n }\n };\n\n return {\n getPlaceDetails,\n getPredictions,\n };\n};\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateVendorFormData, VendorFormData } from \"../../types/vendor\";\nimport { vendorSchema } from \"../../yupSchema\";\nimport {\n defaultVendorFormValues,\n mapBaseResourceTypeToFormData,\n} from \"../utils\";\n\n/**\n * Custom hook to manage the vendor form state and validation.\n *\n * @param {VendorFormData} data - The initial form data.\n * @returns {CreateVendorFormData} - The form methods and state.\n */\nexport function useVendorForm(data?: VendorFormData): CreateVendorFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<VendorFormData>({\n defaultValues: defaultVendorFormValues,\n resolver: yupResolver(vendorSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n ...mapBaseResourceTypeToFormData(data),\n availability: data.availability,\n categories: data.categories,\n foodTruck: data.foodTruck,\n locations: data.locations,\n multiLocation: data.multiLocation,\n products: data.products,\n vendorType: data.vendorType,\n });\n } else {\n reset(defaultVendorFormValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n associates,\n availability,\n categories,\n contactDetails,\n cover,\n coverUpload,\n foodTruck,\n description,\n images,\n imagesUpload,\n locations,\n logo,\n logoUpload,\n multiLocation,\n name,\n owner,\n products,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n vendorType,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n associates,\n availability,\n categories,\n contactDetails,\n cover,\n coverUpload,\n description,\n foodTruck,\n images,\n imagesUpload,\n locations,\n logo,\n logoUpload,\n multiLocation,\n name,\n owner,\n products,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n vendorType,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","/* eslint-disable sort-keys */\nimport dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport * as yup from \"yup\";\nimport { TestFunction } from \"yup\";\n\nimport {\n EnumEventDateStatus,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"src/enums\";\n\nimport { dateFormat, normalizeUrl, timeFormat } from \"../utils\";\n\ntype NoLeadingZerosOptions = {\n allowDecimal?: boolean;\n};\n\nexport const nzBankAccountRegex = /^\\d{2}-\\d{4}-\\d{7}-\\d{2}$/;\n\nexport const nzbnRegex = /^94\\d{11}$/;\n\nexport const normalizedUrlTransform = () =>\n yup\n .string()\n .trim()\n .transform((value) =>\n typeof value === \"string\" ? value.toLowerCase() : value,\n )\n .transform((value) =>\n typeof value === \"string\" ? normalizeUrl(value) : value,\n );\n\nexport const noLeadingZeros = (\n fieldName: string,\n options: NoLeadingZerosOptions = {},\n): TestFunction<number | undefined> => {\n return function (value, context) {\n const original = context.originalValue;\n\n // Only validate string input (what the user actually typed)\n if (typeof original !== \"string\") {\n return true;\n }\n\n // Allow empty (handled by required / min)\n if (original === \"\") {\n return true;\n }\n\n const regex = options.allowDecimal\n ? /^0\\d+(\\.\\d+)?$/ // \"03\", \"003\", \"01.5\"\n : /^0\\d+$/; // \"03\", \"003\"\n\n if (regex.test(original)) {\n return context.createError({\n message: `${fieldName} must not have leading zeros`,\n });\n }\n\n return true;\n };\n};\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(customParseFormat);\n\n// ✅ Reusable Required Email Schema\nexport const emailRequiredSchema = yup\n .string()\n .email(\"Invalid email address\")\n .required(\"Email is required\")\n .label(\"Email\")\n .transform((value) =>\n typeof value === \"string\" ? value.trim().toLowerCase() : value,\n );\n\nexport const emailOptionalSchema = yup\n .string()\n .nullable()\n .notRequired()\n .transform((value) =>\n typeof value === \"string\" ? value.trim().toLowerCase() : value,\n )\n .test(\n \"is-valid-email\",\n \"Invalid email address\",\n (value) => !value || yup.string().email().isValidSync(value),\n )\n .label(\"Email\");\n\n// Mobile: starts with 02, 9-11 digits\nexport const mobileRegex = /^02\\d{7,9}$/;\n// Landline: starts with 03, 04, 06, 07, 09 (but not 090), 7 digits after area code\nconst landlineRegex = /^(0(3|4|6|7|9)[0-9]{7})$/;\n\nexport const mobilePhoneSchema = yup\n .string()\n .label(\"Mobile Phone\")\n .nullable()\n .notRequired()\n .test(\n \"mobile-phone\",\n \"Mobile must start with 02 and be 9–11 digits\",\n (value) => !value || mobileRegex.test(value), // skip empty values\n );\n\nconst landlinePhoneSchema = yup\n .string()\n .label(\"Landline Phone\")\n .nullable()\n .notRequired()\n .test(\n \"landline-phone\",\n \"Landline must start with 03, 04, 06, 07, or 09 (not 090) and have 7 digits after area code\",\n (value) => !value || landlineRegex.test(value), // skip empty values\n );\n\nexport const contactDetailsSchema = yup\n .object({\n email: emailOptionalSchema,\n mobilePhone: mobilePhoneSchema,\n landlinePhone: landlinePhoneSchema,\n })\n .nullable()\n .default(undefined);\n\n// DATE AND TIME SCHEMA\nexport const endDateNotInPastTest = yup\n .string()\n .test(\"not-in-past\", \"End date cannot be in the past\", (value) => {\n const now = dayjs(); // Current date and time\n return value\n ? dayjs(value, dateFormat, true).isSameOrAfter(now, \"day\")\n : false;\n });\n\nexport const startDateNotInPastTest = yup\n .string()\n .test(\"not-in-past\", \"Start date cannot be in the past\", (value) => {\n const now = dayjs(); // Current date and time\n return value\n ? dayjs(value, dateFormat, true).isSameOrAfter(now, \"day\")\n : false;\n });\n\nexport const endDateAfterStartDateTest = yup\n .string()\n .test(\n \"end-after-start\",\n \"End date cannot be before start date\",\n function (value) {\n const { startDate } = this.parent;\n if (!startDate || !value) return false;\n return dayjs(value, dateFormat, true).isSameOrAfter(\n dayjs(startDate, dateFormat, true),\n \"day\",\n );\n },\n );\n\nexport const endTimeMustBeAfterStartTimeTest = yup\n .string()\n .test(\n \"valid-end-time\",\n \"End time must be after start time\",\n function (value) {\n const { startDate, endDate, startTime } = this.parent;\n if (!startDate || !endDate || !startTime || !value) return false;\n\n const startDateTime = dayjs(\n `${startDate} ${startTime}`,\n `${dateFormat} ${timeFormat}`,\n true,\n );\n const endDateTime = dayjs(\n `${endDate} ${value}`,\n `${dateFormat} ${timeFormat}`,\n true,\n );\n\n return endDateTime.isAfter(startDateTime);\n },\n );\n\nexport const startTimeCannotBeInPastTest = yup\n .string()\n .test(\n \"valid-start-time\",\n \"Start time cannot be in the past\",\n function (value) {\n const now = dayjs(); // Current date and time\n const { startDate } = this.parent;\n if (!startDate || !value) return false;\n const startDateTime = dayjs(\n `${startDate} ${value}`,\n `${dateFormat} ${timeFormat}`,\n true,\n );\n return startDateTime.isSameOrAfter(now);\n },\n );\n\nexport const dateTimeSchema = yup.object().shape({\n dateStatus: yup\n .mixed<EnumEventDateStatus>()\n .oneOf(Object.values(EnumEventDateStatus))\n .required(\"Date status is required\"),\n endDate: yup\n .string()\n .label(\"End Date\")\n .concat(endDateNotInPastTest)\n .concat(endDateAfterStartDateTest)\n .required(\"End date is required\"),\n endTime: yup\n .string()\n .label(\"End Time\")\n .concat(endTimeMustBeAfterStartTimeTest)\n .required(\"End time is required\"),\n startDate: yup\n .string()\n .label(\"Start Date\")\n .concat(startDateNotInPastTest)\n .required(\"Start date is required\"),\n startTime: yup\n .string()\n .label(\"Start Time\")\n .concat(startTimeCannotBeInPastTest)\n .required(\"Start time is required\"),\n});\n\nconst stallTypesSchema = yup.object({\n label: yup\n .string()\n .trim()\n .label(\"Stall Type\")\n .required(\"Stall type is required\"),\n price: yup\n .number()\n .label(\"Stall Price\")\n .min(0.1, \"Stall price must be at least 0.1\")\n .required(\"Stall price is required\")\n .test(\n \"no-leading-zeros\",\n \"\",\n noLeadingZeros(\"Stall price\", { allowDecimal: true }),\n ),\n stallCapacity: yup\n .number()\n .label(\"Stall Capacity\")\n .typeError(\"Stall capacity must be a number\")\n .min(1, \"Stall capacity must be at least 1\")\n .integer(\"Stall capacity must be a whole number\")\n .required(\"Stall capacity is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Stall capacity\")),\n electricity: yup\n .object({\n selected: yup\n .boolean()\n .nullable()\n .optional()\n .label(\"Electricity Available\"),\n price: yup\n .number()\n .transform((value, originalValue) =>\n originalValue === \"\" ? null : value,\n )\n .integer(\"Electricity price must be a whole number\")\n .test(\n \"no-leading-zeros\",\n \"\",\n noLeadingZeros(\"Electricity price\", { allowDecimal: true }),\n )\n .nullable()\n .optional(),\n })\n .nullable()\n .optional()\n .label(\"Electricity Information\"),\n});\n\nexport const dateTimeWithPriceSchema = dateTimeSchema.shape({\n stallTypes: yup\n .array()\n .of(stallTypesSchema)\n .min(1, \"At least one stall type is required\")\n .required(\"Stall types are required\"),\n});\n\nexport const locationSchema = yup.object().shape({\n city: yup.string().label(\"City\").required(\"City is required\"),\n coordinates: yup\n .array()\n .of(yup.number().required(\"Coordinates must be numbers\"))\n .length(\n 2,\n \"Coordinates must contain exactly two numbers (longitude, latitude)\",\n )\n .required(\"Coordinates are required\"),\n country: yup.string().label(\"Country\").required(\"Country is required\"),\n fullAddress: yup.string().label(\"Address\").required(\"Address is required\"),\n latitude: yup.number().label(\"Latitude\").required(\"Latitude is required\"),\n longitude: yup.number().label(\"Longitude\").required(\"Longitude is required\"),\n region: yup.string().label(\"Region\").required(\"Region is required\"),\n type: yup\n .string()\n .oneOf([\"Point\"], \"Type must be 'Point'\")\n .default(\"Point\")\n .required(\"Type is required\"),\n});\n\n// ✅ Reusable Password Schema\nexport const passwordSchema = yup\n .string()\n .trim()\n .label(\"Password\")\n .min(8, \"Password must be at least 8 characters long\")\n .required(\"Password is required\");\n\nexport const socialMediaSchema = yup.object({\n name: yup\n .mixed<EnumSocialMedia>()\n .oneOf(Object.values(EnumSocialMedia))\n .label(\"Social Media Name\")\n .optional(),\n link: yup.string().when(\"name\", {\n is: (name: EnumSocialMedia | undefined) => !!name, // If name has a value\n then: () =>\n normalizedUrlTransform()\n .required(\"Link is required when name is set\")\n .url(\"Link must be a valid URL\")\n .label(\"Social Media Link\"),\n otherwise: (schema) => schema.notRequired(),\n }),\n});\n\nexport const globalResourceSchema = yup.object().shape({\n active: yup.boolean().required(\"Active is required\"),\n cover: yup.object({\n source: yup.string().label(\"Cover\").required(\"Cover is required\"),\n title: yup.string().label(\"Cover Title\").required(\"Cover is required\"),\n }),\n contactDetails: contactDetailsSchema,\n description: yup\n .string()\n .label(\"Description\")\n .trim()\n .min(3)\n .required(\"Description is required\"),\n name: yup\n .string()\n .label(\"Name\")\n .trim()\n .min(3)\n .max(40)\n .required(\"Name is required\"),\n region: yup.string().label(\"Region\").required(\"Region is required\"),\n socialMedia: yup.array().of(socialMediaSchema).nullable().default(null),\n associates: yup\n .array()\n .of(\n yup.object().shape({\n email: emailRequiredSchema,\n resourceId: yup\n .string()\n .label(\"Resource ID\")\n .required(\"Resource ID is required\"),\n resourceType: yup\n .mixed<EnumResourceType>()\n .oneOf(Object.values(EnumResourceType))\n .label(\"Resource Type\")\n .required(\"Resource Type is required\"),\n licence: yup.object({\n expiryDate: yup.date().required(\"Expiry Date is required\"),\n issuedDate: yup.date().required(\"Issued Date is required\"),\n licenceType: yup\n .mixed<EnumUserLicence>()\n .oneOf(Object.values(EnumUserLicence))\n .label(\"Licence Type\")\n .required(\"Licence Type is required\"),\n }),\n }),\n )\n .nullable()\n .default(null),\n});\n\nexport const categorySchema = yup.array().of(\n yup.object().shape({\n id: yup.string().required(\"Category id is required\"),\n name: yup.string().required(\"Category name is required\"),\n subcategories: yup\n .array()\n .of(\n yup.object().shape({\n id: yup.string().defined(),\n items: yup\n .array()\n .of(\n yup.object().shape({\n id: yup.string().defined(),\n name: yup.string().defined(),\n }),\n )\n .nullable(),\n name: yup.string().defined(),\n }),\n )\n .min(1, \"At least one subcategory is required\")\n .required(\"Subcategories are required\"),\n }),\n);\n","/* eslint-disable sort-keys */\nimport * as yup from \"yup\";\n\nimport { EnumEventType, EnumPaymentMethod } from \"../enums\";\n\nimport {\n dateTimeSchema,\n dateTimeWithPriceSchema,\n globalResourceSchema,\n locationSchema,\n noLeadingZeros,\n normalizedUrlTransform,\n nzBankAccountRegex,\n nzbnRegex,\n} from \"./global\";\n\nexport const eventSchema = globalResourceSchema.shape({\n dateTime: yup\n .array()\n .of(dateTimeSchema)\n .min(1, \"At least one Event date required\")\n .max(50, \"You can only add up to 50 Event dates\") // <-- enforce max 50\n .required(\"DateTime is required\")\n .test(\n \"unique-start-date-time\",\n \"Start Date and Start Time must be unique\",\n function (value) {\n if (!value) return true;\n\n const seen = new Set<string>();\n for (const item of value) {\n // Only validate uniqueness when both fields exist\n if (!item.startDate || !item.startTime) continue;\n\n const key = `${item.startDate}_${item.startTime}`;\n\n if (seen.has(key)) {\n return false;\n }\n\n seen.add(key);\n }\n return true;\n },\n ),\n eventType: yup\n .mixed<EnumEventType>()\n .oneOf(Object.values(EnumEventType))\n .required(\"Please select an Event type\"),\n location: locationSchema,\n nzbn: yup\n .string()\n .required(\"NZBN is required\")\n .matches(nzbnRegex, \"NZBN must be 13 digits and start with 94\"),\n rainOrShine: yup\n .boolean()\n .label(\"Rain or Shine\")\n .required(\"Please specify if the event is rain or shine\"),\n tags: yup\n .array()\n .of(yup.string().defined())\n .min(1, \"Tags are required\")\n .required(\"Tags are required\"),\n});\n\nconst paymentInfoSchema = yup.object({\n paymentMethod: yup\n .mixed<EnumPaymentMethod>()\n .oneOf(Object.values(EnumPaymentMethod))\n .required(\"Please select a Payment method\"),\n\n accountHolderName: yup.string().when(\"paymentMethod\", {\n is: EnumPaymentMethod.BANK_TRANSFER,\n then: (schema) =>\n schema\n .required(\"Account holder name is required for bank transfer\")\n .trim(),\n otherwise: (schema) => schema.notRequired(),\n }),\n\n accountNumber: yup.string().when(\"paymentMethod\", {\n is: EnumPaymentMethod.BANK_TRANSFER,\n then: (schema) =>\n schema\n .required(\"Account number is required for bank transfer\")\n .matches(\n nzBankAccountRegex,\n \"Account number must be in format: XX-XXXX-XXXXXXX-XX\",\n )\n .trim(),\n otherwise: (schema) => schema.notRequired(),\n }),\n\n link: yup.string().when(\"paymentMethod\", {\n is: (val: EnumPaymentMethod) =>\n val === EnumPaymentMethod.PAYPAL || val === EnumPaymentMethod.STRIPE,\n then: () =>\n normalizedUrlTransform()\n .url(\"Link must be a valid URL\")\n .required(\"Link is required for PayPal/Stripe\"),\n otherwise: (schema) => schema.notRequired(),\n }),\n});\n\nexport const eventInfoSchema = yup.object().shape({\n applicationDeadlineHours: yup\n .number()\n .label(\"Application Deadline Hours\")\n .nullable()\n .transform((value, originalValue) => (originalValue === \"\" ? null : value))\n .typeError(\"Application deadline hours must be a number\")\n .min(1, \"Application deadline hours must be at least 1\")\n .required(\"Application deadline hours is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Application deadline hours\")),\n dateTime: yup\n .array()\n .of(dateTimeWithPriceSchema)\n .required(\"DateTime is required\"),\n eventId: yup.string().trim().required(\"Event ID is required\"),\n packInTime: yup\n .number()\n .label(\"Pack In Time\")\n .typeError(\"Pack in time must be a number\")\n .min(1, \"Pack in time must be at least 1\")\n .required(\"Pack in time is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Pack in time\")),\n paymentDueHours: yup\n .number()\n .label(\"Payment Due Hours\")\n .typeError(\"Payment due hours must be a number\")\n .min(1, \"Payment due hours must be at least 1\")\n .required(\"Payment due hours is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Payment due hours\"))\n .test(\n \"payment-before-deadline\",\n \"Payment due hours must be less than application deadline hours\",\n function (value) {\n const { applicationDeadlineHours } = this.parent;\n\n // Both are numbers (enforced by schema), so direct comparison is fine\n return value < applicationDeadlineHours;\n },\n ),\n paymentInfo: yup\n .array()\n .of(paymentInfoSchema)\n .min(1, \"At least one payment info is required\")\n .required(\"Payment info is required\"),\n});\n","import * as yup from \"yup\";\n\nimport { EnumFoodFlavor, EnumVendorType } from \"src/enums\";\n\nimport {\n categorySchema,\n dateTimeSchema,\n emailRequiredSchema,\n globalResourceSchema,\n locationSchema,\n} from \"./global\";\n\nconst vendroMenuSchema = yup.object().shape({\n description: yup.string().trim().max(100).optional().nullable(),\n price: yup\n .number()\n .transform((value, originalValue) => (originalValue === \"\" ? null : value))\n .min(0)\n .optional()\n .nullable(),\n title: yup.string().trim().max(50).optional().nullable(),\n});\n\nexport const vendorSchema = globalResourceSchema.shape({\n categories: categorySchema\n .min(1, \"Category list must contain at least one item\")\n .required(\"Categories are required\"),\n foodTruck: yup\n .boolean()\n .label(\"Food Truck\")\n .required(\"Please specify if the vendor is a food truck\"),\n multiLocation: yup.boolean().required(\"Multi location is required\"),\n products: yup.array().of(vendroMenuSchema).nullable().default(null),\n vendorType: yup\n .mixed<EnumVendorType>()\n .oneOf(Object.values(EnumVendorType))\n .required(\"Please select a Vendor type\"),\n});\n\nexport const unregisteredVendorSchema = yup.object().shape({\n categories: categorySchema\n .min(1, \"Category list must contain at least one item\")\n .required(\"Categories are required\"),\n email: emailRequiredSchema,\n invitations: yup\n .array()\n .of(\n yup.object({\n dateTime: yup\n .array()\n .of(dateTimeSchema)\n .required(\"DateTime is required\"),\n eventId: yup.string().required(\"Event ID is required\"),\n location: locationSchema,\n }),\n )\n .nullable()\n .default(null),\n name: yup\n .string()\n .label(\"Name\")\n .trim()\n .min(3)\n .max(40)\n .required(\"Name is required\"),\n region: yup.string().label(\"Region\").required(\"Region is required\"),\n});\n\nexport const vendorInfoSchema = yup.object().shape({\n product: yup.object().shape({\n foodFlavors: yup\n .array()\n .of(\n yup\n .mixed<EnumFoodFlavor>()\n .oneOf(Object.values(EnumFoodFlavor), \"Invalid flavor selected\")\n .required(\"Flavor is required\"),\n )\n .min(1, \"Food flavors list must contain at least one item\")\n .required(\"Food flavors are required\"),\n packaging: yup\n .array()\n .of(yup.string().defined())\n .min(1, \"Packaging list must contain at least one item\")\n .required(\"Packaging is required\"),\n priceRange: yup.object().shape({\n max: yup\n .number()\n .min(1)\n .required(\"Max price is required\")\n .test(\n \"is-greater\",\n \"Max price must be greater than or equal to Min price\",\n function (max) {\n const { min } = this.parent;\n return max >= min;\n },\n ),\n min: yup.number().min(1).required(\"Min price is required\"),\n }),\n producedIn: yup\n .array()\n .of(yup.string().defined())\n .min(1, \"Produced in list must contain at least one item\")\n .required(\"Produced in is required\"),\n }),\n requirements: yup\n .object()\n .shape({\n electricity: yup.object().shape({\n details: yup\n .string()\n .trim()\n .test(\n \"details-required\",\n \"Please add electricity details\",\n function (value) {\n return (\n !this.parent?.isRequired || (value?.trim().length ?? 0) > 0\n );\n },\n )\n .nullable(),\n isRequired: yup\n .boolean()\n .required(\"Electricity requirement is required\"),\n }),\n gazebo: yup.object().shape({\n details: yup\n .string()\n .trim()\n .test(\n \"details-required\",\n \"Please add gazebo details\",\n function (value) {\n return (\n !this.parent?.isRequired || (value?.trim().length ?? 0) > 0\n );\n },\n )\n .nullable(),\n isRequired: yup.boolean().required(\"Gazebo requirement is required\"),\n }),\n table: yup.object().shape({\n details: yup\n .string()\n .trim()\n .test(\n \"details-required\",\n \"Please add table details\",\n function (value) {\n return (\n !this.parent?.isRequired || (value?.trim().length ?? 0) > 0\n );\n },\n )\n .nullable(),\n isRequired: yup.boolean().required(\"Table requirement is required\"),\n }),\n })\n .optional(),\n stallInfo: yup.object().shape({\n size: yup.object().shape({\n depth: yup.number().min(1).required(\"Depth is required\"),\n width: yup.number().min(1).required(\"Width is required\"),\n }),\n }),\n vendorId: yup.string().trim().required(\"Vendor ID is required\"),\n});\n","/* eslint-disable sort-keys */\nimport * as yup from \"yup\";\n\nimport { EnumUserRole } from \"../enums\";\n\nimport { emailRequiredSchema } from \"./global\";\n\nexport const userSchema = yup.object().shape({\n active: yup.boolean().required(\"Active is required\"),\n email: emailRequiredSchema,\n firstName: yup\n .string()\n .label(\"First Name\")\n .required(\"First name is required\"),\n lastName: yup.string().label(\"Last Name\").required(\"Last name is required\"),\n isTester: yup.boolean().required(\"Tester status is required\"),\n password: yup\n .string()\n .nullable()\n .trim()\n .label(\"Password\")\n // simple rule: if user enters something → must be at least 8 chars\n .min(8, \"Password must be at least 8 characters long\")\n .notRequired(),\n preferredRegion: yup\n .string()\n .label(\"Preferred Region\")\n .required(\"Preferred region is required\"),\n confirmPassword: yup\n .string()\n .nullable()\n .trim()\n .label(\"Confirm Password\")\n .when(\"password\", {\n is: (val: string | null) => !!val, // only necessary if password typed\n then: (schema) =>\n schema\n .required(\"Confirm Password is required\")\n .oneOf([yup.ref(\"password\")], \"Passwords must match\"),\n otherwise: (schema) => schema.notRequired(),\n }),\n role: yup\n .mixed<EnumUserRole>()\n .oneOf(Object.values(EnumUserRole))\n .required(\"Role is required\"),\n});\n","import * as yup from \"yup\";\n\nimport { emailRequiredSchema, passwordSchema } from \"./global\";\n\nexport const loginSchema = yup.object().shape({\n email: emailRequiredSchema,\n password: passwordSchema,\n});\n\nexport const registerSchema = yup.object().shape({\n email: emailRequiredSchema,\n firstName: yup\n .string()\n .label(\"First Name\")\n .required(\"First Name is required\"),\n lastName: yup.string().label(\"Last Name\").required(\"Last Name is required\"),\n password: passwordSchema,\n preferredRegion: yup\n .string()\n .label(\"Preferred Region\")\n .required(\"Preferred Region is required\"),\n});\n\nexport const requestPasswordResetSchema = yup.object().shape({\n email: emailRequiredSchema,\n});\n\nexport const resetPasswordSchema = yup.object().shape({\n email: emailRequiredSchema,\n password: passwordSchema,\n // eslint-disable-next-line sort-keys\n confirmPassword: yup\n .string()\n .oneOf([yup.ref(\"password\")], \"Passwords must match\")\n .required(\"Confirm Password is required\"),\n});\n\nexport const validateVerificationTokenSchema = yup.object().shape({\n email: emailRequiredSchema,\n verificationToken: yup\n .string()\n .required(\"Verification code is required\")\n .matches(/^\\d{6}$/, \"Verification code must be exactly 6 digits\"),\n});\n","import * as yup from \"yup\";\n\nimport { EnumOSPlatform, EnumResourceType } from \"src/enums\";\nimport {\n OrganizedMarketCount,\n OrganizerMarketFrequency,\n TesterEvent,\n TesterVendor,\n VendorSellingFrequency,\n} from \"src/types/tester\";\n\nimport {\n categorySchema,\n emailRequiredSchema,\n mobileRegex,\n noLeadingZeros,\n} from \"./global\";\n\nconst testerVendorSchema = yup.object().shape({\n categories: categorySchema\n .min(1, \"Category list must contain at least one item\")\n .required(\"Categories are required\"),\n marketsAttended: yup\n .array()\n .of(\n yup.object().shape({\n city: yup.string().trim().required(\"City is required\"),\n name: yup.string().trim().required(\"Market name is required\"),\n }),\n )\n .min(1, \"At least one market must be provided\")\n .required(\"Markets attended are required\"),\n productsOrServices: yup\n .string()\n .trim()\n .required(\"Products or services description is required\"),\n questionary: yup\n .object()\n .shape({\n appearInVideoIntroduction: yup.boolean().optional(),\n applyToAtLeastOneMarket: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n completeFeedbackQuestionnaire: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n excitementAboutApp: yup.string().trim().optional(),\n sendPhotoForSocialMedia: yup.boolean().optional(),\n socialMediaFeatureReason: yup.string().trim().optional(),\n testingPeriodConcerns: yup.string().trim().optional(),\n tryVisitorFeatures: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n uploadStallProfileFirstWeek: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n usefulnessExpectations: yup.string().trim().optional(),\n })\n .required(\"Questionary is required\"),\n sellingFrequency: yup\n .mixed<VendorSellingFrequency>()\n .oneOf(\n Object.values(VendorSellingFrequency),\n \"Please select a valid selling frequency\",\n )\n .required(\"Required field\"),\n yearlySellingApprox: yup\n .number()\n .nonNullable()\n .transform((value, originalValue) =>\n originalValue === \"\" ? undefined : value,\n )\n .label(\"Yearly Selling Approx\")\n .min(1, \"Yearly selling approximate must be at least 1\")\n .integer(\"Yearly selling approximate must be a whole number\")\n .required(\"Yearly selling approximate is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Yearly selling approximate\")),\n});\n\nconst testerEventSchema = yup.object().shape({\n markets: yup\n .array()\n .of(\n yup.object().shape({\n averageStallCount: yup\n .number()\n .nonNullable()\n .transform((value, originalValue) =>\n originalValue === \"\" ? undefined : value,\n )\n .label(\"Average Stall Count\")\n .min(1, \"Average stall count must be at least 1\")\n .integer(\"Average stall count must be a whole number\")\n .required(\"Average stall count is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Average stall count\")),\n cityOrVenue: yup.string().trim().required(\"City or venue is required\"),\n frequency: yup\n .mixed<OrganizerMarketFrequency>()\n .oneOf(\n Object.values(OrganizerMarketFrequency),\n \"Please select a valid frequency\",\n )\n .required(\"Frequency is required\"),\n name: yup.string().trim().required(\"Market name is required\"),\n }),\n )\n .min(1, \"At least one market must be provided\")\n .required(\"Markets are required\"),\n organizedMarketCount: yup\n .mixed<OrganizedMarketCount>()\n .oneOf(\n Object.values(OrganizedMarketCount),\n \"Please select a valid market count\",\n )\n .required(\"Organized market count is required\"),\n\n questionary: yup\n .object()\n .shape({\n allowMarketingAppearance: yup.boolean().optional(),\n completeFinalQuestionnaire: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n completeMarketProfileFirstWeek: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n dailyCoordinationNeeds: yup.string().trim().optional(),\n interestedInCharityInitiative: yup.boolean().optional(),\n inviteStallholders: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n manageApplicationsAndCommunication: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n organizerExpectations: yup.string().trim().optional(),\n spaceForClueMart: yup.boolean().optional(),\n uploadStallList: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n })\n .required(\"Questionary is required\"),\n});\n\nexport const testerSchema = yup.object().shape({\n businessName: yup.string().required(\"Business name is required\"),\n consents: yup.object().shape({\n betaTestConsent: yup\n .boolean()\n .oneOf([true], \"You must consent to beta testing\")\n .required(\"Beta test consent is required\"),\n privacyConsent: yup\n .boolean()\n .oneOf([true], \"You must accept the Privacy Policy\")\n .required(\"Privacy consent is required\"),\n }),\n email: emailRequiredSchema,\n event: yup.object().when(\"resourceType\", {\n is: (resourceType: EnumResourceType) =>\n resourceType === EnumResourceType.EVENT,\n otherwise: (schema) => schema.nullable().optional(),\n then: (schema) =>\n schema\n .required(\"Event information is required\")\n .shape(testerEventSchema.fields),\n }) as unknown as yup.Schema<TesterEvent | null | undefined>,\n firstName: yup.string().required(\"First name is required\"),\n lastName: yup.string().required(\"Last name is required\"),\n mobilePhone: yup\n .string()\n .label(\"Mobile Phone\")\n .required(\"Mobile phone is required\")\n .test(\n \"mobile-phone\",\n \"Mobile must start with 02 and be 9–11 digits\",\n (value) => !value || mobileRegex.test(value), // skip empty values\n ),\n osType: yup\n .mixed<EnumOSPlatform>()\n .oneOf(Object.values(EnumOSPlatform), \"Please select Android or iOS\")\n .required(\"OS Type is required\"),\n region: yup.string().required(\"Region is required\"),\n resourceType: yup\n .mixed<EnumResourceType>()\n .oneOf(\n Object.values(EnumResourceType),\n \"Please select Event or Stallholder\",\n )\n .required(\"Resource Type is required\"),\n vendor: yup.object().when(\"resourceType\", {\n is: (resourceType: EnumResourceType) =>\n resourceType === EnumResourceType.VENDOR,\n otherwise: (schema) => schema.nullable().optional(),\n then: (schema) =>\n schema\n .required(\"Vendor information is required\")\n .shape(testerVendorSchema.fields),\n }) as unknown as yup.Schema<TesterVendor | null | undefined>,\n});\n","import { EnumOSPlatform, EnumResourceType } from \"src/enums\";\n\nimport { Category, CreateFormData } from \"./global\";\n\nexport enum OrganizedMarketCount {\n ONE = \"One\",\n TWO_TO_THREE = \"Two_to_Three\",\n FOUR_TO_FIVE = \"Four_to_Five\",\n MORE_THAN_FIVE = \"More_than_Five\",\n}\n\nexport enum VendorSellingFrequency {\n TWICE_A_WEEK = \"Two_to_Three_times_a_week\",\n ONCE_A_WEEK = \"Once_a_week\",\n ONE_TO_TWO_TIMES_A_MONTH = \"One_to_Two_times_a_month\",\n LESS_OFTEN = \"Less_often\",\n}\n\nexport enum OrganizerMarketFrequency {\n WEEKLY = \"Weekly\",\n FORTNIGHTLY = \"Fortnightly\",\n MONTHLY = \"Monthly\",\n SEASONAL = \"Seasonal\",\n}\n\nexport type TesterVendor = {\n categories: Category[];\n marketsAttended: { name: string; city: string }[];\n productsOrServices: string;\n sellingFrequency: VendorSellingFrequency;\n yearlySellingApprox: number;\n questionary: {\n appearInVideoIntroduction?: boolean; // Q15 (Yes / No)\n applyToAtLeastOneMarket: boolean; // Q11\n completeFeedbackQuestionnaire: boolean; // Q13\n excitementAboutApp?: string; // Q17\n sendPhotoForSocialMedia?: boolean; // Q14 (Yes / No)\n socialMediaFeatureReason?: string; // Q16 (optional free text)\n testingPeriodConcerns?: string; // Q19 (optional)\n tryVisitorFeatures: boolean; // Q12\n uploadStallProfileFirstWeek: boolean; // Q10\n usefulnessExpectations?: string; // Q18\n };\n};\n\nexport type TesterEvent = {\n /** Organizer background */\n organizedMarketCount: OrganizedMarketCount;\n markets: {\n name: string;\n cityOrVenue: string;\n frequency: OrganizerMarketFrequency;\n averageStallCount: number;\n }[];\n questionary: {\n allowMarketingAppearance?: boolean;\n completeFinalQuestionnaire: boolean;\n interestedInCharityInitiative?: boolean;\n inviteStallholders: boolean;\n manageApplicationsAndCommunication: boolean;\n completeMarketProfileFirstWeek: boolean;\n spaceForClueMart?: boolean;\n uploadStallList: boolean;\n organizerExpectations?: string;\n dailyCoordinationNeeds?: string;\n };\n};\n\nexport interface TesterFormData {\n businessName: string;\n consents: {\n privacyConsent: boolean;\n betaTestConsent: boolean;\n };\n email: string;\n event?: TesterEvent | null;\n firstName: string;\n lastName: string;\n mobilePhone: string;\n osType: EnumOSPlatform;\n region: string;\n resourceType: EnumResourceType;\n vendor?: TesterVendor | null;\n}\n\nexport type CreateTesterFormData = CreateFormData<TesterFormData>;\n\nexport interface TesterType extends TesterFormData {\n _id: string;\n active: boolean;\n approved: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n}\n","/* eslint-disable sort-keys */\nimport * as yup from \"yup\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport {\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n} from \"src/types/ad\";\n\nimport { socialMediaSchema } from \"./global\";\n\nexport const adSchema = yup.object().shape({\n active: yup.boolean().required(\"Active status is required\"),\n adStyle: yup\n .mixed<EnumAdStyle>()\n .oneOf(Object.values(EnumAdStyle), \"Please select a valid ad style\")\n .required(\"Ad style is required\"),\n adType: yup\n .mixed<EnumAdType>()\n .oneOf(Object.values(EnumAdType), \"Please select a valid ad type\")\n .required(\"Ad type is required\"),\n clui: yup.string().nullable().notRequired(),\n end: yup\n .date()\n .required(\"End date is required\")\n .test(\"is-future-date\", \"End date must be in the future\", (value) => {\n if (!value) return false;\n const endDate = new Date(value);\n const now = new Date();\n return endDate > now;\n })\n .when(\"start\", {\n is: (val: string) => val && val.length > 0,\n then: (schema) =>\n schema.test(\n \"is-after-start\",\n \"End date must be after start date\",\n function (value) {\n const { start } = this.parent;\n if (!value || !start) return false;\n return new Date(value) > new Date(start);\n },\n ),\n }),\n resourceCover: yup\n .string()\n .url(\"Resource cover must be a valid URL\")\n .required(\"Resource cover is required\"),\n resourceDescription: yup\n .string()\n .required(\"Resource description is required\"),\n resourceId: yup.string().required(\"Resource ID is required\"),\n resourceLogo: yup\n .string()\n .url(\"Resource logo must be a valid URL\")\n .nullable()\n .notRequired(),\n resourceName: yup.string().required(\"Resource name is required\"),\n resourceRegion: yup.string().required(\"Resource region is required\"),\n resourceType: yup\n .mixed<EnumResourceType>()\n .oneOf(Object.values(EnumResourceType), \"Please select Event or Vendor\")\n .required(\"Resource Type is required\"),\n showOn: yup\n .mixed<EnumAdShowOn>()\n .oneOf(\n Object.values(EnumAdShowOn),\n \"Please select a valid display location\",\n )\n .required(\"Display location is required\"),\n socialMedia: yup.array().of(socialMediaSchema).nullable().optional(),\n status: yup\n .mixed<EnumAdStatus>()\n .oneOf(Object.values(EnumAdStatus))\n .required(\"Ad status is required\"),\n start: yup.date().when(\"status\", {\n is: (status: EnumAdStatus) => status !== EnumAdStatus.ACTIVE,\n then: () =>\n yup\n .date()\n .required(\"Start date is required\")\n .test(\"is-future-date\", \"Start date must be in the future\", (value) => {\n if (!value) return false;\n return value > new Date();\n }),\n otherwise: () => yup.date().nullable().notRequired(),\n }),\n targetRegion: yup.string().nullable().notRequired(),\n});\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } 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 interface AdFormData {\n active: boolean;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clui?: string | null;\n end: Date; // ISO date string\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n showOn: EnumAdShowOn;\n socialMedia?: SocialMediaType[] | null;\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion?: string | null;\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\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 * as yup from \"yup\";\n\nimport { EnumPartnerType } from \"src/enums\";\n\nimport { globalResourceSchema, locationSchema, nzbnRegex } from \"./global\";\n\nexport const partnerSchema = globalResourceSchema.shape({\n location: locationSchema,\n nzbn: yup\n .string()\n .required(\"NZBN is required\")\n .matches(nzbnRegex, \"NZBN must be 13 digits and start with 94\"),\n partnerType: yup\n .mixed<EnumPartnerType>()\n .oneOf(Object.values(EnumPartnerType))\n .required(\"Please select a Partner type\"),\n});\n","import * as yup from \"yup\";\n\nimport {\n EnumPostContentType,\n EnumPostType,\n PostContentData,\n} from \"src/types/post\";\n\n/* ------------------------------------------------------------------ */\n/* Post content block schema */\n/* ------------------------------------------------------------------ */\n\nexport const postContentSchema = yup.object().shape({\n contentData: yup.mixed<PostContentData>().optional().nullable(),\n contentOrder: yup.number().nullable(),\n contentType: yup\n .mixed<EnumPostContentType>()\n .oneOf(Object.values(EnumPostContentType))\n .nullable(),\n});\n\n/* ------------------------------------------------------------------ */\n/* Final post schema */\n/* ------------------------------------------------------------------ */\n\nexport const postSchema = yup.object().shape({\n active: yup.boolean().required(),\n caption: yup.string().required(),\n content: yup.array().of(postContentSchema).required(),\n postType: yup\n .mixed<EnumPostType>()\n .oneOf(Object.values(EnumPostType))\n .required(),\n\n tags: yup.array().of(yup.string().required()).nullable().optional(),\n title: yup.string().required(),\n});\n","import { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_POLL = \"daily_poll\",\n}\n\nexport enum EnumPostContentType {\n COVER = \"cover\",\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 PostContentCover = {\n cover: ResourceImageType;\n coverUpload?: PostFileInput | null;\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 PostContentData =\n | PostContentCover\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 postType: EnumPostType;\n tags?: string[] | null;\n title: string;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\" | \"coverUpload\">;\n};\n\nexport type PostType = Omit<PostFormData, \"content\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n updatedAt: Date | null;\n};\n","import * as yup from \"yup\";\n\nexport const appSettingsSchema = yup.object({\n appVersion: yup\n .string()\n .trim()\n .label(\"App Version\")\n .matches(\n /^\\d+\\.\\d+\\.\\d+$/,\n \"App Version must be in the format X.Y.Z (e.g. 1.12.50)\",\n )\n .required(\"App Version is required\"),\n});\n","import {\n EnumEventType,\n EnumFoodFlavor,\n EnumPartnerType,\n EnumVendorType,\n} from \"src/enums\";\n\nimport {\n BaseResourceTypeFormData,\n EventFormData,\n EventInfoFormData,\n LocationType,\n PartnerFormData,\n UnregisteredVendorFormData,\n VendorFormData,\n VendorInfoFormData,\n} from \"../types\";\n\nconst defaultLocation: LocationType = {\n city: \"\",\n coordinates: [0, 0], // [longitude, latitude]\n country: \"\",\n fullAddress: \"\",\n latitude: 0,\n longitude: 0,\n region: \"\",\n type: \"Point\", // Default type for GeoJSON\n};\n\nexport const globalDefaultValues: BaseResourceTypeFormData = {\n active: false,\n associates: null,\n contactDetails: {\n email: null,\n landlinePhone: null,\n mobilePhone: null,\n },\n cover: {\n source: \"\",\n title: \"\",\n },\n coverUpload: {\n source: \"\",\n title: \"\",\n },\n description: \"\",\n images: null,\n imagesUpload: null,\n logo: null,\n logoUpload: null,\n name: \"\",\n promoCodes: [],\n region: \"\",\n socialMedia: [],\n};\n\nexport const defaultPartnerFormValues: PartnerFormData = {\n ...globalDefaultValues,\n location: defaultLocation,\n nzbn: \"\",\n partnerType: EnumPartnerType.CHARITY_PARTNER,\n};\n\nexport const defaultEventFormValues: EventFormData = {\n ...globalDefaultValues,\n dateTime: [],\n eventType: EnumEventType.MARKET,\n location: defaultLocation,\n nzbn: \"\",\n provider: null,\n rainOrShine: false,\n tags: [],\n};\n\nexport const defaultEventInfoFormValues: EventInfoFormData = {\n applicationDeadlineHours: 24,\n dateTime: [],\n eventId: \"\",\n packInTime: 2, // e.g., 2 hours before event opens\n paymentDueHours: 12,\n paymentInfo: [],\n requirements: [],\n};\n\nexport const defaultVendorFormValues: VendorFormData = {\n ...globalDefaultValues,\n availability: {\n corporate: false,\n private: false,\n school: false,\n },\n categories: [],\n foodTruck: false,\n locations: null,\n multiLocation: false,\n products: null,\n vendorType: EnumVendorType.STALLHOLDER,\n};\n\nexport const defaultUnregisteredVendorFormValues: UnregisteredVendorFormData = {\n categories: [],\n email: \"\",\n invitations: null,\n name: \"\",\n region: \"\",\n};\n\nexport const defaultVendorInfoFormValues: VendorInfoFormData = {\n compliance: { foodBeverageLicense: false, liabilityInsurance: false },\n documents: null,\n documentsUpload: null,\n product: {\n foodFlavors: [] as EnumFoodFlavor[],\n packaging: [],\n priceRange: { max: 0, min: 0 },\n producedIn: [],\n },\n requirements: {\n electricity: { details: null, isRequired: false },\n gazebo: { details: null, isRequired: false },\n table: { details: null, isRequired: false },\n },\n stallInfo: {\n size: { depth: 0, width: 0 },\n },\n vendorId: \"\",\n};\n\nexport function mapBaseResourceTypeToFormData(\n data: BaseResourceTypeFormData,\n): BaseResourceTypeFormData {\n return {\n _id: data._id,\n active: data.active,\n associates: data.associates,\n contactDetails: data.contactDetails,\n cover: data.cover,\n coverUpload: data.coverUpload,\n description: data.description,\n images: data.images,\n imagesUpload: data.imagesUpload,\n logo: data.logo,\n logoUpload: data.logoUpload,\n name: data.name,\n owner: data.owner,\n promoCodes: data.promoCodes,\n region: data.region,\n socialMedia: data.socialMedia,\n termsAgreement: data.termsAgreement,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateVendorInfoFormData,\n VendorInfoFormData,\n} from \"../../types/vendor\";\nimport { vendorInfoSchema } from \"../../yupSchema\";\nimport { defaultVendorInfoFormValues } from \"../utils\";\n\nexport function useVendorInfoForm(\n data?: VendorInfoFormData,\n): CreateVendorInfoFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<VendorInfoFormData>({\n defaultValues: defaultVendorInfoFormValues,\n resolver: yupResolver(vendorInfoSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n _id: data._id,\n compliance: data.compliance,\n documents: data.documents,\n documentsUpload: data.documentsUpload,\n product: data.product,\n requirements: data.requirements,\n stallInfo: data.stallInfo,\n vendorId: data.vendorId,\n });\n } else {\n reset(defaultVendorInfoFormValues);\n }\n }, [data]);\n\n const {\n _id,\n compliance,\n documents,\n documentsUpload,\n product,\n requirements,\n stallInfo,\n vendorId,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n compliance,\n documents,\n documentsUpload,\n product,\n requirements,\n stallInfo,\n vendorId,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateEventFormData, EventFormData } from \"../../types/event\";\nimport { eventSchema } from \"../../yupSchema\";\nimport {\n defaultEventFormValues,\n mapBaseResourceTypeToFormData,\n} from \"../utils\";\n\n/**\n * Custom hook to manage the event form state and validation.\n *\n * @param {EventFormData} data - The initial form data.\n * @returns {CreateEventFormData} - The form methods and state.\n */\nexport function useEventForm(data?: EventFormData): CreateEventFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<EventFormData>({\n defaultValues: defaultEventFormValues,\n resolver: yupResolver(eventSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n ...mapBaseResourceTypeToFormData(data),\n dateTime: data.dateTime,\n eventType: data.eventType,\n location: data.location,\n nzbn: data.nzbn,\n provider: data.provider,\n rainOrShine: data.rainOrShine,\n tags: data.tags,\n });\n } else {\n reset(defaultEventFormValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n dateTime,\n description,\n eventType,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n promoCodes,\n provider,\n rainOrShine,\n region,\n socialMedia,\n tags,\n termsAgreement,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n dateTime,\n description,\n eventType,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n promoCodes,\n provider,\n rainOrShine,\n region,\n socialMedia,\n tags,\n termsAgreement,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateEventInfoFormData, EventInfoFormData } from \"../../types/event\";\nimport { eventInfoSchema } from \"../../yupSchema\";\nimport { defaultEventInfoFormValues } from \"../utils\";\n\n/**\n * Custom hook to manage the event form state and validation.\n *\n * @param {EventInfoFormData} data - The initial form data.\n * @returns {CreateEventInfoFormData} - The form methods and state.\n */\nexport function useEventInfoForm(\n data?: EventInfoFormData,\n): CreateEventInfoFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<EventInfoFormData>({\n defaultValues: defaultEventInfoFormValues,\n resolver: yupResolver(eventInfoSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n _id: data._id,\n applicationDeadlineHours: data.applicationDeadlineHours,\n dateTime: data.dateTime,\n eventId: data.eventId,\n packInTime: data.packInTime,\n paymentDueHours: data.paymentDueHours,\n paymentInfo: data.paymentInfo,\n requirements: data.requirements,\n });\n } else {\n reset(defaultEventInfoFormValues);\n }\n }, [data]);\n\n const {\n _id,\n applicationDeadlineHours,\n dateTime,\n eventId,\n packInTime,\n paymentDueHours,\n paymentInfo,\n requirements,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n applicationDeadlineHours,\n dateTime,\n eventId,\n packInTime,\n paymentDueHours,\n paymentInfo,\n requirements,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { Resolver, useForm } from \"react-hook-form\";\n\nimport { EnumUserRole } from \"../enums\";\nimport { CreateUserFormData, UserFormData } from \"../types/user\";\nimport { userSchema } from \"../yupSchema/user\";\n\nconst defaultValues: UserFormData = {\n active: false,\n avatar: null,\n avatarUpload: null,\n confirmPassword: \"\",\n email: \"\",\n firstName: \"\",\n isTester: false,\n lastName: \"\",\n password: null,\n preferredRegion: \"\",\n role: EnumUserRole.CUSTOMER,\n};\n\n/**\n * Custom hook to manage the user form state and validation.\n *\n * @param {UserFormData} data - The initial form data.\n * @returns {CreateUserFormData} - The form methods and state.\n */\nexport function useUserForm(data?: UserFormData): CreateUserFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<UserFormData>({\n defaultValues,\n resolver: yupResolver(userSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n _id: data._id,\n active: data.active,\n avatar: data.avatar,\n avatarUpload: data.avatarUpload,\n email: data.email,\n firstName: data.firstName,\n isTester: data.isTester,\n lastName: data.lastName,\n password: data.password,\n preferredRegion: data.preferredRegion,\n role: data.role,\n termsAgreement: data.termsAgreement,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n avatar,\n avatarUpload,\n email,\n firstName,\n isTester,\n lastName,\n password,\n preferredRegion,\n role,\n termsAgreement,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n avatar,\n avatarUpload,\n email,\n firstName,\n isTester,\n lastName,\n password,\n preferredRegion,\n role,\n termsAgreement,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateLoginFormData, LoginFormData } from \"../../types/auth\";\nimport { loginSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: LoginFormData = {\n email: \"\",\n password: \"\",\n};\n\n/**\n * Custom hook to manage the login form state and validation.\n *\n * @returns {CreateLoginFormData} - The form methods and state.\n */\nexport function useLoginForm(): CreateLoginFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<LoginFormData>({\n defaultValues,\n resolver: yupResolver(loginSchema),\n });\n\n const { email, password } = getValues();\n\n return {\n control,\n fields: {\n email,\n password,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateRegisterFormData, RegisterFormData } from \"../../types/auth\";\nimport { registerSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: RegisterFormData = {\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n password: \"\",\n preferredRegion: \"\",\n};\n\n/**\n * Custom hook to manage the register form state and validation.\n *\n * @returns {CreateRegisterFormData} - The form methods and state.\n */\nexport function useRegisterForm(): CreateRegisterFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<RegisterFormData>({\n defaultValues,\n resolver: yupResolver(registerSchema),\n });\n\n const { email, firstName, lastName, password, preferredRegion } = getValues();\n\n return {\n control,\n fields: {\n email,\n firstName,\n lastName,\n password,\n preferredRegion,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateRequestPasswordResetFormData,\n RequestPasswordResetFormData,\n} from \"../../types/auth\";\nimport { requestPasswordResetSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: RequestPasswordResetFormData = {\n email: \"\",\n};\n\nexport function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<RequestPasswordResetFormData>({\n defaultValues,\n resolver: yupResolver(requestPasswordResetSchema),\n });\n\n const { email } = getValues();\n\n return {\n control,\n fields: {\n email,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateValidateVerificationTokenFormData,\n ValidateVerificationTokenFormData,\n} from \"../../types/auth\";\nimport { validateVerificationTokenSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: ValidateVerificationTokenFormData = {\n email: \"\",\n verificationToken: \"\",\n};\n\nexport function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<ValidateVerificationTokenFormData>({\n defaultValues,\n resolver: yupResolver(validateVerificationTokenSchema),\n });\n\n const { email, verificationToken } = getValues();\n\n return {\n control,\n fields: {\n email,\n verificationToken,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateResetPasswordFormData,\n ResetPasswordFormData,\n} from \"../../types/auth\";\nimport { resetPasswordSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: ResetPasswordFormData = {\n confirmPassword: \"\",\n email: \"\",\n password: \"\",\n};\n\nexport function useResetPasswordForm(): CreateResetPasswordFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<ResetPasswordFormData>({\n defaultValues,\n resolver: yupResolver(resetPasswordSchema),\n });\n\n const { confirmPassword, email, password } = getValues();\n\n return {\n control,\n fields: {\n confirmPassword,\n email,\n password,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { EnumOSPlatform, EnumResourceType } from \"src/enums\";\nimport { CreateTesterFormData, TesterFormData } from \"src/types/tester\";\nimport { testerSchema } from \"src/yupSchema/tester\";\n\nconst defaultValues = {\n businessName: \"\",\n consents: {\n betaTestConsent: false,\n privacyConsent: false,\n },\n email: \"\",\n event: {},\n firstName: \"\",\n lastName: \"\",\n mobilePhone: \"\",\n osType: \"\" as EnumOSPlatform,\n region: \"\",\n resourceType: \"\" as EnumResourceType,\n vendor: {},\n};\n\nexport function useTesterForm(data?: TesterFormData): CreateTesterFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<TesterFormData>({\n defaultValues,\n resolver: yupResolver(testerSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n businessName: data.businessName,\n consents: data.consents,\n email: data.email,\n event: data.event,\n firstName: data.firstName,\n lastName: data.lastName,\n mobilePhone: data.mobilePhone,\n osType: data.osType,\n region: data.region,\n resourceType: data.resourceType,\n vendor: data.vendor,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const {\n businessName,\n consents,\n email,\n event,\n firstName,\n lastName,\n mobilePhone,\n osType,\n region,\n resourceType,\n vendor,\n } = getValues();\n\n return {\n control,\n fields: {\n businessName,\n consents,\n email,\n event,\n firstName,\n lastName,\n mobilePhone,\n osType,\n region,\n resourceType,\n vendor,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n ContactUsFormData,\n CreateContactUsFormData,\n} from \"src/types/contactUs\";\nimport { contactUsSchema } from \"src/yupSchema/contactUs\";\n\nconst defaultValues = {\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n message: \"\",\n};\n\nexport function useContactUsForm(\n data?: ContactUsFormData,\n): CreateContactUsFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<ContactUsFormData>({\n defaultValues,\n resolver: yupResolver(contactUsSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n email: data.email,\n firstName: data.firstName,\n lastName: data.lastName,\n message: data.message,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const { email, firstName, lastName, message } = getValues();\n\n return {\n control,\n fields: {\n email,\n firstName,\n lastName,\n message,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import * as yup from \"yup\";\n\nimport { emailRequiredSchema } from \"./global\";\n\nexport const contactUsSchema = yup.object().shape({\n email: emailRequiredSchema,\n firstName: yup\n .string()\n .label(\"First Name\")\n .required(\"First name is required\"),\n lastName: yup.string().label(\"Last Name\").required(\"Last name is required\"),\n message: yup.string().label(\"Message\").required(\"Message is required\"),\n});\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { Resolver, useForm } from \"react-hook-form\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport {\n AdFormData,\n CreateAdFormData,\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n} from \"src/types/ad\";\nimport { adSchema } from \"src/yupSchema\";\n\nconst defaultValues: AdFormData = {\n active: true,\n adStyle: EnumAdStyle.BLOOM, // default to bloom\n adType: EnumAdType.SPONSORED, // default to sponsored\n clui: null,\n end: new Date(),\n resourceCover: \"\",\n resourceDescription: \"\",\n resourceId: \"\",\n resourceLogo: null,\n resourceName: \"\",\n resourceRegion: \"\",\n resourceType: \"\" as EnumResourceType.EVENT, // default to event\n showOn: EnumAdShowOn.FRONT_PAGE, // default to front page\n socialMedia: [],\n start: new Date(),\n status: EnumAdStatus.PAUSED, // default to paused\n targetRegion: null,\n};\n\nexport function useAdForm(data?: AdFormData): CreateAdFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<AdFormData>({\n defaultValues: defaultValues,\n resolver: yupResolver(adSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n active: data.active,\n adStyle: data.adStyle,\n adType: data.adType,\n clui: data.clui,\n end: data.end,\n resourceCover: data.resourceCover,\n resourceDescription: data.resourceDescription,\n resourceId: data.resourceId,\n resourceLogo: data.resourceLogo,\n resourceName: data.resourceName,\n resourceRegion: data.resourceRegion,\n resourceType: data.resourceType,\n socialMedia: data.socialMedia,\n start: data.start,\n status: data.status,\n targetRegion: data.targetRegion,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const {\n active,\n adStyle,\n adType,\n clui,\n end,\n resourceCover,\n resourceDescription,\n resourceId,\n resourceLogo,\n resourceName,\n resourceRegion,\n resourceType,\n showOn,\n socialMedia,\n start,\n status,\n targetRegion,\n } = getValues();\n\n return {\n control,\n fields: {\n active,\n adStyle,\n adType,\n clui,\n end,\n resourceCover,\n resourceDescription,\n resourceId,\n resourceLogo,\n resourceName,\n resourceRegion,\n resourceType,\n showOn,\n socialMedia,\n start,\n status,\n targetRegion,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreatePartnerFormData, PartnerFormData } from \"src/types/partner\";\nimport { partnerSchema } from \"src/yupSchema/partner\";\n\nimport {\n defaultPartnerFormValues,\n mapBaseResourceTypeToFormData,\n} from \"../utils\";\n\n/**\n * Custom hook to manage the partner form state and validation.\n *\n * @param {PartnerFormData} data - The initial form data.\n * @returns {CreatePartnerFormData} - The form methods and state.\n */\nexport function usePartnerForm(data?: PartnerFormData): CreatePartnerFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<PartnerFormData>({\n defaultValues: defaultPartnerFormValues,\n resolver: yupResolver(partnerSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n ...mapBaseResourceTypeToFormData(data),\n location: data.location,\n nzbn: data.nzbn,\n partnerType: data.partnerType,\n });\n } else {\n reset(defaultPartnerFormValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n description,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n partnerType,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n description,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n partnerType,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreatePostFormData, EnumPostType, PostFormData } from \"src/types/post\";\nimport { postSchema } from \"src/yupSchema/post\";\n\nconst defaultValues: PostFormData = {\n active: true,\n caption: \"\",\n content: [],\n postType: EnumPostType.DAILY_MEETS,\n tags: [],\n title: \"\",\n};\n\nexport function usePostForm(data?: PostFormData): CreatePostFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<PostFormData>({\n defaultValues,\n resolver: yupResolver(postSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n active: data.active,\n caption: data.caption,\n content: data.content,\n postType: data.postType,\n tags: data.tags,\n title: data.title,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const { active, caption, content, postType, tags, title } = getValues();\n\n return {\n control,\n fields: {\n active,\n caption,\n content,\n postType,\n tags,\n title,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n AppSettingsFormData,\n CreateAppSettingsFormData,\n} from \"src/types/appSettings\";\nimport { appSettingsSchema } from \"src/yupSchema/appSettings\";\n\nconst defaultValues = {\n appVersion: \"\",\n};\n\nexport function useAppSettingsForm(\n data?: AppSettingsFormData,\n): CreateAppSettingsFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<AppSettingsFormData>({\n defaultValues,\n resolver: yupResolver(appSettingsSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n appVersion: data.appVersion,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const { appVersion } = getValues();\n\n return {\n control,\n fields: {\n appVersion,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\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: \"#ff7a00\",\n quaternary: \"#3b7c67\",\n secondary: \"#371134\",\n tertiary: \"#191a75\",\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 EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\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: {\n type: \"Point\";\n coordinates: number[]; // [longitude, latitude]\n } | 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: string;\n activity: Omit<ResourceActivityEntry, \"timestamp\">;\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","export 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 */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","export 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","import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\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","import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\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 */\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","import { 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 /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\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 /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\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 get [Symbol.toStringTag]() {\n return 'GraphQLError';\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 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/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\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.\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","import { 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 */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\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 /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\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 get [Symbol.toStringTag]() {\n return 'Location';\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 /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\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 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 get [Symbol.toStringTag]() {\n return 'Token';\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/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\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: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\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/**\n * @internal\n */\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/** Name */\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","/**\n * The set of allowed directive location values.\n */\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 || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","/**\n * The set of allowed kind values for AST nodes.\n */\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['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 * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\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/**\n * @internal\n */\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","/**\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 * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","import { 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 /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\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 get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\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 */\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/**\n * @internal\n */\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\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\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\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\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\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\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\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\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\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\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\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\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\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","import { 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 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 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","import { 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/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\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 */\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 */\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 */\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 */\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\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\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\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\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\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\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\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\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\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\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\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\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\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\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\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\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\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\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 */\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 }\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\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\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\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\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\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\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\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 * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\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 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 repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\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 */\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 */\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\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\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\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\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\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\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\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\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\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\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\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\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\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 experimentalFragmentVariables,\n allowLegacyFragmentVariables: 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 { getter, forEach, split, normalizePath, join } from 'property-expr';\nimport { camelCase, snakeCase } from 'tiny-case';\nimport toposort from 'toposort';\n\nconst toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && 1 / val < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\nfunction printSimpleValue(val, quoteStrings = false) {\n if (val == null || val === true || val === false) return '' + val;\n const typeOf = typeof val;\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n const tag = toString.call(val).slice(8, -1);\n if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n if (tag === 'RegExp') return regExpToString.call(val);\n return null;\n}\nfunction printValue(value, quoteStrings) {\n let result = printSimpleValue(value, quoteStrings);\n if (result !== null) return result;\n return JSON.stringify(value, function (key, value) {\n let result = printSimpleValue(this[key], quoteStrings);\n if (result !== null) return result;\n return value;\n }, 2);\n}\n\nfunction toArray(value) {\n return value == null ? [] : [].concat(value);\n}\n\nlet _Symbol$toStringTag, _Symbol$hasInstance, _Symbol$toStringTag2;\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\n_Symbol$toStringTag = Symbol.toStringTag;\nclass ValidationErrorNoStack {\n constructor(errorOrErrors, value, field, type) {\n this.name = void 0;\n this.message = void 0;\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.params = void 0;\n this.errors = void 0;\n this.inner = void 0;\n this[_Symbol$toStringTag] = 'Error';\n this.name = 'ValidationError';\n this.value = value;\n this.path = field;\n this.type = type;\n this.errors = [];\n this.inner = [];\n toArray(errorOrErrors).forEach(err => {\n if (ValidationError.isError(err)) {\n this.errors.push(...err.errors);\n const innerErrors = err.inner.length ? err.inner : [err];\n this.inner.push(...innerErrors);\n } else {\n this.errors.push(err);\n }\n });\n this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n }\n}\n_Symbol$hasInstance = Symbol.hasInstance;\n_Symbol$toStringTag2 = Symbol.toStringTag;\nclass ValidationError extends Error {\n static formatError(message, params) {\n // Attempt to make the path more friendly for error message interpolation.\n const path = params.label || params.path || 'this';\n // Store the original path under `originalPath` so it isn't lost to custom\n // message functions; e.g., ones provided in `setLocale()` calls.\n params = Object.assign({}, params, {\n path,\n originalPath: params.path\n });\n if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n if (typeof message === 'function') return message(params);\n return message;\n }\n static isError(err) {\n return err && err.name === 'ValidationError';\n }\n constructor(errorOrErrors, value, field, type, disableStack) {\n const errorNoStack = new ValidationErrorNoStack(errorOrErrors, value, field, type);\n if (disableStack) {\n return errorNoStack;\n }\n super();\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.params = void 0;\n this.errors = [];\n this.inner = [];\n this[_Symbol$toStringTag2] = 'Error';\n this.name = errorNoStack.name;\n this.message = errorNoStack.message;\n this.type = errorNoStack.type;\n this.value = errorNoStack.value;\n this.path = errorNoStack.path;\n this.errors = errorNoStack.errors;\n this.inner = errorNoStack.inner;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ValidationError);\n }\n }\n static [_Symbol$hasInstance](inst) {\n return ValidationErrorNoStack[Symbol.hasInstance](inst) || super[Symbol.hasInstance](inst);\n }\n}\n\nlet mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n defined: '${path} must be defined',\n notNull: '${path} cannot be null',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: ({\n path,\n type,\n value,\n originalValue\n }) => {\n const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.';\n return type !== 'mixed' ? `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + castMsg : `${path} must match the configured type. ` + `The validated value was: \\`${printValue(value, true)}\\`` + castMsg;\n }\n};\nlet string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n uuid: '${path} must be a valid UUID',\n datetime: '${path} must be a valid ISO date-time',\n datetime_precision: '${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits',\n datetime_offset: '${path} must be a valid ISO date-time with UTC \"Z\" timezone',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nlet number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nlet date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nlet boolean = {\n isValue: '${path} field must be ${value}'\n};\nlet object = {\n noUnknown: '${path} field has unspecified keys: ${unknown}',\n exact: '${path} object contains unknown properties: ${properties}'\n};\nlet array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items',\n length: '${path} must have ${length} items'\n};\nlet tuple = {\n notType: params => {\n const {\n path,\n value,\n spec\n } = params;\n const typeLen = spec.types.length;\n if (Array.isArray(value)) {\n if (value.length < typeLen) return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n if (value.length > typeLen) return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n }\n return ValidationError.formatError(mixed.notType, params);\n }\n};\nvar locale = Object.assign(Object.create(null), {\n mixed,\n string,\n number,\n date,\n object,\n array,\n boolean,\n tuple\n});\n\nconst isSchema = obj => obj && obj.__isYupSchema__;\n\nclass Condition {\n static fromOptions(refs, config) {\n if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n let {\n is,\n then,\n otherwise\n } = config;\n let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n return new Condition(refs, (values, schema) => {\n var _branch;\n let branch = check(...values) ? then : otherwise;\n return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;\n });\n }\n constructor(refs, builder) {\n this.fn = void 0;\n this.refs = refs;\n this.refs = refs;\n this.fn = builder;\n }\n resolve(base, options) {\n let values = this.refs.map(ref =>\n // TODO: ? operator here?\n ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n let schema = this.fn(values, base, options);\n if (schema === undefined ||\n // @ts-ignore this can be base\n schema === base) {\n return base;\n }\n if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n return schema.resolve(options);\n }\n}\n\nconst prefixes = {\n context: '$',\n value: '.'\n};\nfunction create$9(key, options) {\n return new Reference(key, options);\n}\nclass Reference {\n constructor(key, options = {}) {\n this.key = void 0;\n this.isContext = void 0;\n this.isValue = void 0;\n this.isSibling = void 0;\n this.path = void 0;\n this.getter = void 0;\n this.map = void 0;\n if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n this.key = key.trim();\n if (key === '') throw new TypeError('ref must be a non-empty string');\n this.isContext = this.key[0] === prefixes.context;\n this.isValue = this.key[0] === prefixes.value;\n this.isSibling = !this.isContext && !this.isValue;\n let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n this.path = this.key.slice(prefix.length);\n this.getter = this.path && getter(this.path, true);\n this.map = options.map;\n }\n getValue(value, parent, context) {\n let result = this.isContext ? context : this.isValue ? value : parent;\n if (this.getter) result = this.getter(result || {});\n if (this.map) result = this.map(result);\n return result;\n }\n\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {Object=} options.context\n * @param {Object=} options.parent\n */\n cast(value, options) {\n return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n }\n resolve() {\n return this;\n }\n describe() {\n return {\n type: 'ref',\n key: this.key\n };\n }\n toString() {\n return `Ref(${this.key})`;\n }\n static isRef(value) {\n return value && value.__isYupRef;\n }\n}\n\n// @ts-ignore\nReference.prototype.__isYupRef = true;\n\nconst isAbsent = value => value == null;\n\nfunction createValidation(config) {\n function validate({\n value,\n path = '',\n options,\n originalValue,\n schema\n }, panic, next) {\n const {\n name,\n test,\n params,\n message,\n skipAbsent\n } = config;\n let {\n parent,\n context,\n abortEarly = schema.spec.abortEarly,\n disableStackTrace = schema.spec.disableStackTrace\n } = options;\n const resolveOptions = {\n value,\n parent,\n context\n };\n function createError(overrides = {}) {\n const nextParams = resolveParams(Object.assign({\n value,\n originalValue,\n label: schema.spec.label,\n path: overrides.path || path,\n spec: schema.spec,\n disableStackTrace: overrides.disableStackTrace || disableStackTrace\n }, params, overrides.params), resolveOptions);\n const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);\n error.params = nextParams;\n return error;\n }\n const invalid = abortEarly ? panic : next;\n let ctx = {\n path,\n parent,\n type: name,\n from: options.from,\n createError,\n resolve(item) {\n return resolveMaybeRef(item, resolveOptions);\n },\n options,\n originalValue,\n schema\n };\n const handleResult = validOrError => {\n if (ValidationError.isError(validOrError)) invalid(validOrError);else if (!validOrError) invalid(createError());else next(null);\n };\n const handleError = err => {\n if (ValidationError.isError(err)) invalid(err);else panic(err);\n };\n const shouldSkip = skipAbsent && isAbsent(value);\n if (shouldSkip) {\n return handleResult(true);\n }\n let result;\n try {\n var _result;\n result = test.call(ctx, value, ctx);\n if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {\n if (options.sync) {\n throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n }\n return Promise.resolve(result).then(handleResult, handleError);\n }\n } catch (err) {\n handleError(err);\n return;\n }\n handleResult(result);\n }\n validate.OPTIONS = config;\n return validate;\n}\n\n// Warning: mutates the input\nfunction resolveParams(params, options) {\n if (!params) return params;\n for (const key of Object.keys(params)) {\n params[key] = resolveMaybeRef(params[key], options);\n }\n return params;\n}\nfunction resolveMaybeRef(item, options) {\n return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;\n}\n\nfunction getIn(schema, path, value, context = value) {\n let parent, lastPart, lastPartDebug;\n\n // root path: ''\n if (!path) return {\n parent,\n parentPath: path,\n schema\n };\n forEach(path, (_part, isBracket, isArray) => {\n let part = isBracket ? _part.slice(1, _part.length - 1) : _part;\n schema = schema.resolve({\n context,\n parent,\n value\n });\n let isTuple = schema.type === 'tuple';\n let idx = isArray ? parseInt(part, 10) : 0;\n if (schema.innerType || isTuple) {\n if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part \"${lastPartDebug}\" must contain an index to the tuple element, e.g. \"${lastPartDebug}[0]\"`);\n if (value && idx >= value.length) {\n throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n }\n parent = value;\n value = value && value[idx];\n schema = isTuple ? schema.spec.types[idx] : schema.innerType;\n }\n\n // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n // in these cases the current part is the next schema and should be processed\n // in this iteration. For cases where the index signature is included this\n // check will fail and we'll handle the `child` part on the next iteration like normal\n if (!isArray) {\n if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema.type}\")`);\n parent = value;\n value = value && value[part];\n schema = schema.fields[part];\n }\n lastPart = part;\n lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n });\n return {\n schema,\n parent,\n parentPath: lastPart\n };\n}\nfunction reach(obj, path, value, context) {\n return getIn(obj, path, value, context).schema;\n}\n\nclass ReferenceSet extends Set {\n describe() {\n const description = [];\n for (const item of this.values()) {\n description.push(Reference.isRef(item) ? item.describe() : item);\n }\n return description;\n }\n resolveAll(resolve) {\n let result = [];\n for (const item of this.values()) {\n result.push(resolve(item));\n }\n return result;\n }\n clone() {\n return new ReferenceSet(this.values());\n }\n merge(newItems, removeItems) {\n const next = this.clone();\n newItems.forEach(value => next.add(value));\n removeItems.forEach(value => next.delete(value));\n return next;\n }\n}\n\n// tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js\nfunction clone(src, seen = new Map()) {\n if (isSchema(src) || !src || typeof src !== 'object') return src;\n if (seen.has(src)) return seen.get(src);\n let copy;\n if (src instanceof Date) {\n // Date\n copy = new Date(src.getTime());\n seen.set(src, copy);\n } else if (src instanceof RegExp) {\n // RegExp\n copy = new RegExp(src);\n seen.set(src, copy);\n } else if (Array.isArray(src)) {\n // Array\n copy = new Array(src.length);\n seen.set(src, copy);\n for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);\n } else if (src instanceof Map) {\n // Map\n copy = new Map();\n seen.set(src, copy);\n for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));\n } else if (src instanceof Set) {\n // Set\n copy = new Set();\n seen.set(src, copy);\n for (const v of src) copy.add(clone(v, seen));\n } else if (src instanceof Object) {\n // Object\n copy = {};\n seen.set(src, copy);\n for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);\n } else {\n throw Error(`Unable to clone ${src}`);\n }\n return copy;\n}\n\n/**\n * Copied from @standard-schema/spec to avoid having a dependency on it.\n * https://github.com/standard-schema/standard-schema/blob/main/packages/spec/src/index.ts\n */\n\nfunction createStandardPath(path) {\n if (!(path != null && path.length)) {\n return undefined;\n }\n\n // Array to store the final path segments\n const segments = [];\n // Buffer for building the current segment\n let currentSegment = '';\n // Track if we're inside square brackets (array/property access)\n let inBrackets = false;\n // Track if we're inside quotes (for property names with special chars)\n let inQuotes = false;\n for (let i = 0; i < path.length; i++) {\n const char = path[i];\n if (char === '[' && !inQuotes) {\n // When entering brackets, push any accumulated segment after splitting on dots\n if (currentSegment) {\n segments.push(...currentSegment.split('.').filter(Boolean));\n currentSegment = '';\n }\n inBrackets = true;\n continue;\n }\n if (char === ']' && !inQuotes) {\n if (currentSegment) {\n // Handle numeric indices (e.g. arr[0])\n if (/^\\d+$/.test(currentSegment)) {\n segments.push(currentSegment);\n } else {\n // Handle quoted property names (e.g. obj[\"foo.bar\"])\n segments.push(currentSegment.replace(/^\"|\"$/g, ''));\n }\n currentSegment = '';\n }\n inBrackets = false;\n continue;\n }\n if (char === '\"') {\n // Toggle quote state for handling quoted property names\n inQuotes = !inQuotes;\n continue;\n }\n if (char === '.' && !inBrackets && !inQuotes) {\n // On dots outside brackets/quotes, push current segment\n if (currentSegment) {\n segments.push(currentSegment);\n currentSegment = '';\n }\n continue;\n }\n currentSegment += char;\n }\n\n // Push any remaining segment after splitting on dots\n if (currentSegment) {\n segments.push(...currentSegment.split('.').filter(Boolean));\n }\n return segments;\n}\nfunction createStandardIssues(error, parentPath) {\n const path = parentPath ? `${parentPath}.${error.path}` : error.path;\n return error.errors.map(err => ({\n message: err,\n path: createStandardPath(path)\n }));\n}\nfunction issuesFromValidationError(error, parentPath) {\n var _error$inner;\n if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {\n return createStandardIssues(error, parentPath);\n }\n const path = parentPath ? `${parentPath}.${error.path}` : error.path;\n return error.inner.flatMap(err => issuesFromValidationError(err, path));\n}\n\n// If `CustomSchemaMeta` isn't extended with any keys, we'll fall back to a\n// loose Record definition allowing free form usage.\nclass Schema {\n constructor(options) {\n this.type = void 0;\n this.deps = [];\n this.tests = void 0;\n this.transforms = void 0;\n this.conditions = [];\n this._mutate = void 0;\n this.internalTests = {};\n this._whitelist = new ReferenceSet();\n this._blacklist = new ReferenceSet();\n this.exclusiveTests = Object.create(null);\n this._typeCheck = void 0;\n this.spec = void 0;\n this.tests = [];\n this.transforms = [];\n this.withMutation(() => {\n this.typeError(mixed.notType);\n });\n this.type = options.type;\n this._typeCheck = options.check;\n this.spec = Object.assign({\n strip: false,\n strict: false,\n abortEarly: true,\n recursive: true,\n disableStackTrace: false,\n nullable: false,\n optional: true,\n coerce: true\n }, options == null ? void 0 : options.spec);\n this.withMutation(s => {\n s.nonNullable();\n });\n }\n\n // TODO: remove\n get _type() {\n return this.type;\n }\n clone(spec) {\n if (this._mutate) {\n if (spec) Object.assign(this.spec, spec);\n return this;\n }\n\n // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n const next = Object.create(Object.getPrototypeOf(this));\n\n // @ts-expect-error this is readonly\n next.type = this.type;\n next._typeCheck = this._typeCheck;\n next._whitelist = this._whitelist.clone();\n next._blacklist = this._blacklist.clone();\n next.internalTests = Object.assign({}, this.internalTests);\n next.exclusiveTests = Object.assign({}, this.exclusiveTests);\n\n // @ts-expect-error this is readonly\n next.deps = [...this.deps];\n next.conditions = [...this.conditions];\n next.tests = [...this.tests];\n next.transforms = [...this.transforms];\n next.spec = clone(Object.assign({}, this.spec, spec));\n return next;\n }\n label(label) {\n let next = this.clone();\n next.spec.label = label;\n return next;\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n withMutation(fn) {\n let before = this._mutate;\n this._mutate = true;\n let result = fn(this);\n this._mutate = before;\n return result;\n }\n concat(schema) {\n if (!schema || schema === this) return this;\n if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n let base = this;\n let combined = schema.clone();\n const mergedSpec = Object.assign({}, base.spec, combined.spec);\n combined.spec = mergedSpec;\n combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);\n\n // manually merge the blacklist/whitelist (the other `schema` takes\n // precedence in case of conflicts)\n combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);\n\n // start with the current tests\n combined.tests = base.tests;\n combined.exclusiveTests = base.exclusiveTests;\n\n // manually add the new tests to ensure\n // the deduping logic is consistent\n combined.withMutation(next => {\n schema.tests.forEach(fn => {\n next.test(fn.OPTIONS);\n });\n });\n combined.transforms = [...base.transforms, ...combined.transforms];\n return combined;\n }\n isType(v) {\n if (v == null) {\n if (this.spec.nullable && v === null) return true;\n if (this.spec.optional && v === undefined) return true;\n return false;\n }\n return this._typeCheck(v);\n }\n resolve(options) {\n let schema = this;\n if (schema.conditions.length) {\n let conditions = schema.conditions;\n schema = schema.clone();\n schema.conditions = [];\n schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);\n schema = schema.resolve(options);\n }\n return schema;\n }\n resolveOptions(options) {\n var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;\n return Object.assign({}, options, {\n from: options.from || [],\n strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,\n abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,\n recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive,\n disableStackTrace: (_options$disableStack = options.disableStackTrace) != null ? _options$disableStack : this.spec.disableStackTrace\n });\n }\n\n /**\n * Run the configured transform pipeline over an input value.\n */\n\n cast(value, options = {}) {\n let resolvedSchema = this.resolve(Object.assign({}, options, {\n value\n // parent: options.parent,\n // context: options.context,\n }));\n\n let allowOptionality = options.assert === 'ignore-optionality';\n let result = resolvedSchema._cast(value, options);\n if (options.assert !== false && !resolvedSchema.isType(result)) {\n if (allowOptionality && isAbsent(result)) {\n return result;\n }\n let formattedValue = printValue(value);\n let formattedResult = printValue(result);\n throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema.type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n }\n return result;\n }\n _cast(rawValue, options) {\n let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);\n if (value === undefined) {\n value = this.getDefault(options);\n }\n return value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n path,\n originalValue = _value,\n strict = this.spec.strict\n } = options;\n let value = _value;\n if (!strict) {\n value = this._cast(value, Object.assign({\n assert: false\n }, options));\n }\n let initialTests = [];\n for (let test of Object.values(this.internalTests)) {\n if (test) initialTests.push(test);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: initialTests\n }, panic, initialErrors => {\n // even if we aren't ending early we can't proceed further if the types aren't correct\n if (initialErrors.length) {\n return next(initialErrors, value);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: this.tests\n }, panic, next);\n });\n }\n\n /**\n * Executes a set of validations, either schema, produced Tests or a nested\n * schema validate result.\n */\n runTests(runOptions, panic, next) {\n let fired = false;\n let {\n tests,\n value,\n originalValue,\n path,\n options\n } = runOptions;\n let panicOnce = arg => {\n if (fired) return;\n fired = true;\n panic(arg, value);\n };\n let nextOnce = arg => {\n if (fired) return;\n fired = true;\n next(arg, value);\n };\n let count = tests.length;\n let nestedErrors = [];\n if (!count) return nextOnce([]);\n let args = {\n value,\n originalValue,\n path,\n options,\n schema: this\n };\n for (let i = 0; i < tests.length; i++) {\n const test = tests[i];\n test(args, panicOnce, function finishTestRun(err) {\n if (err) {\n Array.isArray(err) ? nestedErrors.push(...err) : nestedErrors.push(err);\n }\n if (--count <= 0) {\n nextOnce(nestedErrors);\n }\n });\n }\n }\n asNestedTest({\n key,\n index,\n parent,\n parentPath,\n originalParent,\n options\n }) {\n const k = key != null ? key : index;\n if (k == null) {\n throw TypeError('Must include `key` or `index` for nested validations');\n }\n const isIndex = typeof k === 'number';\n let value = parent[k];\n const testOptions = Object.assign({}, options, {\n // Nested validations fields are always strict:\n // 1. parent isn't strict so the casting will also have cast inner values\n // 2. parent is strict in which case the nested values weren't cast either\n strict: true,\n parent,\n value,\n originalValue: originalParent[k],\n // FIXME: tests depend on `index` being passed around deeply,\n // we should not let the options.key/index bleed through\n key: undefined,\n // index: undefined,\n [isIndex ? 'index' : 'key']: k,\n path: isIndex || k.includes('.') ? `${parentPath || ''}[${isIndex ? k : `\"${k}\"`}]` : (parentPath ? `${parentPath}.` : '') + key\n });\n return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);\n }\n validate(value, options) {\n var _options$disableStack2;\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema.spec.disableStackTrace;\n return new Promise((resolve, reject) => schema._validate(value, options, (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n reject(error);\n }, (errors, validated) => {\n if (errors.length) reject(new ValidationError(errors, validated, undefined, undefined, disableStackTrace));else resolve(validated);\n }));\n }\n validateSync(value, options) {\n var _options$disableStack3;\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n let result;\n let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema.spec.disableStackTrace;\n schema._validate(value, Object.assign({}, options, {\n sync: true\n }), (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n throw error;\n }, (errors, validated) => {\n if (errors.length) throw new ValidationError(errors, value, undefined, undefined, disableStackTrace);\n result = validated;\n });\n return result;\n }\n isValid(value, options) {\n return this.validate(value, options).then(() => true, err => {\n if (ValidationError.isError(err)) return false;\n throw err;\n });\n }\n isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (ValidationError.isError(err)) return false;\n throw err;\n }\n }\n _getDefault(options) {\n let defaultValue = this.spec.default;\n if (defaultValue == null) {\n return defaultValue;\n }\n return typeof defaultValue === 'function' ? defaultValue.call(this, options) : clone(defaultValue);\n }\n getDefault(options\n // If schema is defaulted we know it's at least not undefined\n ) {\n let schema = this.resolve(options || {});\n return schema._getDefault(options);\n }\n default(def) {\n if (arguments.length === 0) {\n return this._getDefault();\n }\n let next = this.clone({\n default: def\n });\n return next;\n }\n strict(isStrict = true) {\n return this.clone({\n strict: isStrict\n });\n }\n nullability(nullable, message) {\n const next = this.clone({\n nullable\n });\n next.internalTests.nullable = createValidation({\n message,\n name: 'nullable',\n test(value) {\n return value === null ? this.schema.spec.nullable : true;\n }\n });\n return next;\n }\n optionality(optional, message) {\n const next = this.clone({\n optional\n });\n next.internalTests.optionality = createValidation({\n message,\n name: 'optionality',\n test(value) {\n return value === undefined ? this.schema.spec.optional : true;\n }\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n defined(message = mixed.defined) {\n return this.optionality(false, message);\n }\n nullable() {\n return this.nullability(true);\n }\n nonNullable(message = mixed.notNull) {\n return this.nullability(false, message);\n }\n required(message = mixed.required) {\n return this.clone().withMutation(next => next.nonNullable(message).defined(message));\n }\n notRequired() {\n return this.clone().withMutation(next => next.nullable().optional());\n }\n transform(fn) {\n let next = this.clone();\n next.transforms.push(fn);\n return next;\n }\n\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n\n test(...args) {\n let opts;\n if (args.length === 1) {\n if (typeof args[0] === 'function') {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n if (opts.message === undefined) opts.message = mixed.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n let next = this.clone();\n let validate = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n if (opts.exclusive) {\n if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(fn => {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n return true;\n });\n next.tests.push(validate);\n return next;\n }\n when(keys, options) {\n if (!Array.isArray(keys) && typeof keys !== 'string') {\n options = keys;\n keys = '.';\n }\n let next = this.clone();\n let deps = toArray(keys).map(key => new Reference(key));\n deps.forEach(dep => {\n // @ts-ignore readonly array\n if (dep.isSibling) next.deps.push(dep.key);\n });\n next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));\n return next;\n }\n typeError(message) {\n let next = this.clone();\n next.internalTests.typeError = createValidation({\n message,\n name: 'typeError',\n skipAbsent: true,\n test(value) {\n if (!this.schema._typeCheck(value)) return this.createError({\n params: {\n type: this.schema.type\n }\n });\n return true;\n }\n });\n return next;\n }\n oneOf(enums, message = mixed.oneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._whitelist.add(val);\n next._blacklist.delete(val);\n });\n next.internalTests.whiteList = createValidation({\n message,\n name: 'oneOf',\n skipAbsent: true,\n test(value) {\n let valids = this.schema._whitelist;\n let resolved = valids.resolveAll(this.resolve);\n return resolved.includes(value) ? true : this.createError({\n params: {\n values: Array.from(valids).join(', '),\n resolved\n }\n });\n }\n });\n return next;\n }\n notOneOf(enums, message = mixed.notOneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._blacklist.add(val);\n next._whitelist.delete(val);\n });\n next.internalTests.blacklist = createValidation({\n message,\n name: 'notOneOf',\n test(value) {\n let invalids = this.schema._blacklist;\n let resolved = invalids.resolveAll(this.resolve);\n if (resolved.includes(value)) return this.createError({\n params: {\n values: Array.from(invalids).join(', '),\n resolved\n }\n });\n return true;\n }\n });\n return next;\n }\n strip(strip = true) {\n let next = this.clone();\n next.spec.strip = strip;\n return next;\n }\n\n /**\n * Return a serialized description of the schema including validations, flags, types etc.\n *\n * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).\n */\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const {\n label,\n meta,\n optional,\n nullable\n } = next.spec;\n const description = {\n meta,\n label,\n optional,\n nullable,\n default: next.getDefault(options),\n type: next.type,\n oneOf: next._whitelist.describe(),\n notOneOf: next._blacklist.describe(),\n tests: next.tests.filter((n, idx, list) => list.findIndex(c => c.OPTIONS.name === n.OPTIONS.name) === idx).map(fn => {\n const params = fn.OPTIONS.params && options ? resolveParams(Object.assign({}, fn.OPTIONS.params), options) : fn.OPTIONS.params;\n return {\n name: fn.OPTIONS.name,\n params\n };\n })\n };\n return description;\n }\n get ['~standard']() {\n const schema = this;\n const standard = {\n version: 1,\n vendor: 'yup',\n async validate(value) {\n try {\n const result = await schema.validate(value, {\n abortEarly: false\n });\n return {\n value: result\n };\n } catch (err) {\n if (err instanceof ValidationError) {\n return {\n issues: issuesFromValidationError(err)\n };\n }\n throw err;\n }\n }\n };\n return standard;\n }\n}\n// @ts-expect-error\nSchema.prototype.__isYupSchema__ = true;\nfor (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At`] = function (path, value, options = {}) {\n const {\n parent,\n parentPath,\n schema\n } = getIn(this, path, value, options.context);\n return schema[method](parent && parent[parentPath], Object.assign({}, options, {\n parent,\n path\n }));\n};\nfor (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;\nfor (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;\n\nconst returnsTrue = () => true;\nfunction create$8(spec) {\n return new MixedSchema(spec);\n}\nclass MixedSchema extends Schema {\n constructor(spec) {\n super(typeof spec === 'function' ? {\n type: 'mixed',\n check: spec\n } : Object.assign({\n type: 'mixed',\n check: returnsTrue\n }, spec));\n }\n}\ncreate$8.prototype = MixedSchema.prototype;\n\nfunction create$7() {\n return new BooleanSchema();\n}\nclass BooleanSchema extends Schema {\n constructor() {\n super({\n type: 'boolean',\n check(v) {\n if (v instanceof Boolean) v = v.valueOf();\n return typeof v === 'boolean';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n if (this.spec.coerce && !this.isType(value)) {\n if (/^(true|1)$/i.test(String(value))) return true;\n if (/^(false|0)$/i.test(String(value))) return false;\n }\n return value;\n });\n });\n }\n isTrue(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'true'\n },\n test(value) {\n return isAbsent(value) || value === true;\n }\n });\n }\n isFalse(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'false'\n },\n test(value) {\n return isAbsent(value) || value === false;\n }\n });\n }\n default(def) {\n return super.default(def);\n }\n defined(msg) {\n return super.defined(msg);\n }\n optional() {\n return super.optional();\n }\n required(msg) {\n return super.required(msg);\n }\n notRequired() {\n return super.notRequired();\n }\n nullable() {\n return super.nullable();\n }\n nonNullable(msg) {\n return super.nonNullable(msg);\n }\n strip(v) {\n return super.strip(v);\n }\n}\ncreate$7.prototype = BooleanSchema.prototype;\n\n/**\n * This file is a modified version of the file from the following repository:\n * Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>\n * NON-CONFORMANT EDITION.\n * © 2011 Colin Snover <http://zetafleet.com>\n * Released under MIT license.\n */\n\n// prettier-ignore\n// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\nconst isoReg = /^(\\d{4}|[+-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,.](\\d{1,}))?)?(?:(Z)|([+-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nfunction parseIsoDate(date) {\n const struct = parseDateStruct(date);\n if (!struct) return Date.parse ? Date.parse(date) : Number.NaN;\n\n // timestamps without timezone identifiers should be considered local time\n if (struct.z === undefined && struct.plusMinus === undefined) {\n return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();\n }\n let totalMinutesOffset = 0;\n if (struct.z !== 'Z' && struct.plusMinus !== undefined) {\n totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;\n if (struct.plusMinus === '+') totalMinutesOffset = 0 - totalMinutesOffset;\n }\n return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);\n}\nfunction parseDateStruct(date) {\n var _regexResult$7$length, _regexResult$;\n const regexResult = isoReg.exec(date);\n if (!regexResult) return null;\n\n // use of toNumber() avoids NaN timestamps caused by “undefined”\n // values being passed to Date constructor\n return {\n year: toNumber(regexResult[1]),\n month: toNumber(regexResult[2], 1) - 1,\n day: toNumber(regexResult[3], 1),\n hour: toNumber(regexResult[4]),\n minute: toNumber(regexResult[5]),\n second: toNumber(regexResult[6]),\n millisecond: regexResult[7] ?\n // allow arbitrary sub-second precision beyond milliseconds\n toNumber(regexResult[7].substring(0, 3)) : 0,\n precision: (_regexResult$7$length = (_regexResult$ = regexResult[7]) == null ? void 0 : _regexResult$.length) != null ? _regexResult$7$length : undefined,\n z: regexResult[8] || undefined,\n plusMinus: regexResult[9] || undefined,\n hourOffset: toNumber(regexResult[10]),\n minuteOffset: toNumber(regexResult[11])\n };\n}\nfunction toNumber(str, defaultValue = 0) {\n return Number(str) || defaultValue;\n}\n\n// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\nlet rEmail =\n// eslint-disable-next-line\n/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\nlet rUrl =\n// eslint-disable-next-line\n/^((https?|ftp):)?\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1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A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n// eslint-disable-next-line\nlet rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nlet yearMonthDay = '^\\\\d{4}-\\\\d{2}-\\\\d{2}';\nlet hourMinuteSecond = '\\\\d{2}:\\\\d{2}:\\\\d{2}';\nlet zOrOffset = '(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)';\nlet rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\\\.\\\\d+)?${zOrOffset}$`);\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\nlet objStringTag = {}.toString();\nfunction create$6() {\n return new StringSchema();\n}\nclass StringSchema extends Schema {\n constructor() {\n super({\n type: 'string',\n check(value) {\n if (value instanceof String) value = value.valueOf();\n return typeof value === 'string';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n if (!this.spec.coerce || this.isType(value)) return value;\n\n // don't ever convert arrays\n if (Array.isArray(value)) return value;\n const strValue = value != null && value.toString ? value.toString() : value;\n\n // no one wants plain objects converted to [Object object]\n if (strValue === objStringTag) return value;\n return strValue;\n });\n });\n }\n required(message) {\n return super.required(message).withMutation(schema => schema.test({\n message: message || mixed.required,\n name: 'required',\n skipAbsent: true,\n test: value => !!value.length\n }));\n }\n notRequired() {\n return super.notRequired().withMutation(schema => {\n schema.tests = schema.tests.filter(t => t.OPTIONS.name !== 'required');\n return schema;\n });\n }\n length(length, message = string.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message = string.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message = string.max) {\n return this.test({\n name: 'max',\n exclusive: true,\n message,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n matches(regex, options) {\n let excludeEmptyString = false;\n let message;\n let name;\n if (options) {\n if (typeof options === 'object') {\n ({\n excludeEmptyString = false,\n message,\n name\n } = options);\n } else {\n message = options;\n }\n }\n return this.test({\n name: name || 'matches',\n message: message || string.matches,\n params: {\n regex\n },\n skipAbsent: true,\n test: value => value === '' && excludeEmptyString || value.search(regex) !== -1\n });\n }\n email(message = string.email) {\n return this.matches(rEmail, {\n name: 'email',\n message,\n excludeEmptyString: true\n });\n }\n url(message = string.url) {\n return this.matches(rUrl, {\n name: 'url',\n message,\n excludeEmptyString: true\n });\n }\n uuid(message = string.uuid) {\n return this.matches(rUUID, {\n name: 'uuid',\n message,\n excludeEmptyString: false\n });\n }\n datetime(options) {\n let message = '';\n let allowOffset;\n let precision;\n if (options) {\n if (typeof options === 'object') {\n ({\n message = '',\n allowOffset = false,\n precision = undefined\n } = options);\n } else {\n message = options;\n }\n }\n return this.matches(rIsoDateTime, {\n name: 'datetime',\n message: message || string.datetime,\n excludeEmptyString: true\n }).test({\n name: 'datetime_offset',\n message: message || string.datetime_offset,\n params: {\n allowOffset\n },\n skipAbsent: true,\n test: value => {\n if (!value || allowOffset) return true;\n const struct = parseDateStruct(value);\n if (!struct) return false;\n return !!struct.z;\n }\n }).test({\n name: 'datetime_precision',\n message: message || string.datetime_precision,\n params: {\n precision\n },\n skipAbsent: true,\n test: value => {\n if (!value || precision == undefined) return true;\n const struct = parseDateStruct(value);\n if (!struct) return false;\n return struct.precision === precision;\n }\n });\n }\n\n //-- transforms --\n ensure() {\n return this.default('').transform(val => val === null ? '' : val);\n }\n trim(message = string.trim) {\n return this.transform(val => val != null ? val.trim() : val).test({\n message,\n name: 'trim',\n test: isTrimmed\n });\n }\n lowercase(message = string.lowercase) {\n return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toLowerCase()\n });\n }\n uppercase(message = string.uppercase) {\n return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toUpperCase()\n });\n }\n}\ncreate$6.prototype = StringSchema.prototype;\n\n//\n// String Interfaces\n//\n\nlet isNaN$1 = value => value != +value;\nfunction create$5() {\n return new NumberSchema();\n}\nclass NumberSchema extends Schema {\n constructor() {\n super({\n type: 'number',\n check(value) {\n if (value instanceof Number) value = value.valueOf();\n return typeof value === 'number' && !isNaN$1(value);\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n if (!this.spec.coerce) return value;\n let parsed = value;\n if (typeof parsed === 'string') {\n parsed = parsed.replace(/\\s/g, '');\n if (parsed === '') return NaN;\n // don't use parseFloat to avoid positives on alpha-numeric strings\n parsed = +parsed;\n }\n\n // null -> NaN isn't useful; treat all nulls as null and let it fail on\n // nullability check vs TypeErrors\n if (this.isType(parsed) || parsed === null) return parsed;\n return parseFloat(parsed);\n });\n });\n }\n min(min, message = number.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(min);\n }\n });\n }\n max(max, message = number.max) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(max);\n }\n });\n }\n lessThan(less, message = number.lessThan) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n less\n },\n skipAbsent: true,\n test(value) {\n return value < this.resolve(less);\n }\n });\n }\n moreThan(more, message = number.moreThan) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n more\n },\n skipAbsent: true,\n test(value) {\n return value > this.resolve(more);\n }\n });\n }\n positive(msg = number.positive) {\n return this.moreThan(0, msg);\n }\n negative(msg = number.negative) {\n return this.lessThan(0, msg);\n }\n integer(message = number.integer) {\n return this.test({\n name: 'integer',\n message,\n skipAbsent: true,\n test: val => Number.isInteger(val)\n });\n }\n truncate() {\n return this.transform(value => !isAbsent(value) ? value | 0 : value);\n }\n round(method) {\n var _method;\n let avail = ['ceil', 'floor', 'round', 'trunc'];\n method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round';\n\n // this exists for symemtry with the new Math.trunc\n if (method === 'trunc') return this.truncate();\n if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n }\n}\ncreate$5.prototype = NumberSchema.prototype;\n\n//\n// Number Interfaces\n//\n\nlet invalidDate = new Date('');\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\nfunction create$4() {\n return new DateSchema();\n}\nclass DateSchema extends Schema {\n constructor() {\n super({\n type: 'date',\n check(v) {\n return isDate(v) && !isNaN(v.getTime());\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n // null -> InvalidDate isn't useful; treat all nulls as null and let it fail on\n // nullability check vs TypeErrors\n if (!this.spec.coerce || this.isType(value) || value === null) return value;\n value = parseIsoDate(value);\n\n // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;\n });\n });\n }\n prepareParam(ref, name) {\n let param;\n if (!Reference.isRef(ref)) {\n let cast = this.cast(ref);\n if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n param = cast;\n } else {\n param = ref;\n }\n return param;\n }\n min(min, message = date.min) {\n let limit = this.prepareParam(min, 'min');\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(limit);\n }\n });\n }\n max(max, message = date.max) {\n let limit = this.prepareParam(max, 'max');\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(limit);\n }\n });\n }\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate$4.prototype = DateSchema.prototype;\ncreate$4.INVALID_DATE = invalidDate;\n\n// @ts-expect-error\nfunction sortFields(fields, excludedEdges = []) {\n let edges = [];\n let nodes = new Set();\n let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n function addNode(depPath, key) {\n let node = split(depPath)[0];\n nodes.add(node);\n if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n }\n for (const key of Object.keys(fields)) {\n let value = fields[key];\n nodes.add(key);\n if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n }\n return toposort.array(Array.from(nodes), edges).reverse();\n}\n\nfunction findIndex(arr, err) {\n let idx = Infinity;\n arr.some((key, ii) => {\n var _err$path;\n if ((_err$path = err.path) != null && _err$path.includes(key)) {\n idx = ii;\n return true;\n }\n });\n return idx;\n}\nfunction sortByKeyOrder(keys) {\n return (a, b) => {\n return findIndex(keys, a) - findIndex(keys, b);\n };\n}\n\nconst parseJson = (value, _, schema) => {\n if (typeof value !== 'string') {\n return value;\n }\n let parsed = value;\n try {\n parsed = JSON.parse(value);\n } catch (err) {\n /* */\n }\n return schema.isType(parsed) ? parsed : value;\n};\n\n// @ts-ignore\nfunction deepPartial(schema) {\n if ('fields' in schema) {\n const partial = {};\n for (const [key, fieldSchema] of Object.entries(schema.fields)) {\n partial[key] = deepPartial(fieldSchema);\n }\n return schema.setFields(partial);\n }\n if (schema.type === 'array') {\n const nextArray = schema.optional();\n if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);\n return nextArray;\n }\n if (schema.type === 'tuple') {\n return schema.optional().clone({\n types: schema.spec.types.map(deepPartial)\n });\n }\n if ('optional' in schema) {\n return schema.optional();\n }\n return schema;\n}\nconst deepHas = (obj, p) => {\n const path = [...normalizePath(p)];\n if (path.length === 1) return path[0] in obj;\n let last = path.pop();\n let parent = getter(join(path), true)(obj);\n return !!(parent && last in parent);\n};\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\nfunction unknown(ctx, value) {\n let known = Object.keys(ctx.fields);\n return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\nconst defaultSort = sortByKeyOrder([]);\nfunction create$3(spec) {\n return new ObjectSchema(spec);\n}\nclass ObjectSchema extends Schema {\n constructor(spec) {\n super({\n type: 'object',\n check(value) {\n return isObject(value) || typeof value === 'function';\n }\n });\n this.fields = Object.create(null);\n this._sortErrors = defaultSort;\n this._nodes = [];\n this._excludedEdges = [];\n this.withMutation(() => {\n if (spec) {\n this.shape(spec);\n }\n });\n }\n _cast(_value, options = {}) {\n var _options$stripUnknown;\n let value = super._cast(_value, options);\n\n //should ignore nulls here\n if (value === undefined) return this.getDefault(options);\n if (!this._typeCheck(value)) return value;\n let fields = this.fields;\n let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n let props = [].concat(this._nodes, Object.keys(value).filter(v => !this._nodes.includes(v)));\n let intermediateValue = {}; // is filled during the transform below\n let innerOptions = Object.assign({}, options, {\n parent: intermediateValue,\n __validating: options.__validating || false\n });\n let isChanged = false;\n for (const prop of props) {\n let field = fields[prop];\n let exists = (prop in value);\n let inputValue = value[prop];\n if (field) {\n let fieldValue;\n\n // safe to mutate since this is fired in sequence\n innerOptions.path = (options.path ? `${options.path}.` : '') + prop;\n field = field.resolve({\n value: inputValue,\n context: options.context,\n parent: intermediateValue\n });\n let fieldSpec = field instanceof Schema ? field.spec : undefined;\n let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n if (fieldSpec != null && fieldSpec.strip) {\n isChanged = isChanged || prop in value;\n continue;\n }\n fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;\n if (fieldValue !== undefined) {\n intermediateValue[prop] = fieldValue;\n }\n } else if (exists && !strip) {\n intermediateValue[prop] = inputValue;\n }\n if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {\n isChanged = true;\n }\n }\n return isChanged ? intermediateValue : value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n from = [],\n originalValue = _value,\n recursive = this.spec.recursive\n } = options;\n options.from = [{\n schema: this,\n value: originalValue\n }, ...from];\n // this flag is needed for handling `strict` correctly in the context of\n // validation vs just casting. e.g strict() on a field is only used when validating\n options.__validating = true;\n options.originalValue = originalValue;\n super._validate(_value, options, panic, (objectErrors, value) => {\n if (!recursive || !isObject(value)) {\n next(objectErrors, value);\n return;\n }\n originalValue = originalValue || value;\n let tests = [];\n for (let key of this._nodes) {\n let field = this.fields[key];\n if (!field || Reference.isRef(field)) {\n continue;\n }\n tests.push(field.asNestedTest({\n options,\n key,\n parent: value,\n parentPath: options.path,\n originalParent: originalValue\n }));\n }\n this.runTests({\n tests,\n value,\n originalValue,\n options\n }, panic, fieldErrors => {\n next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);\n });\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n next.fields = Object.assign({}, this.fields);\n next._nodes = this._nodes;\n next._excludedEdges = this._excludedEdges;\n next._sortErrors = this._sortErrors;\n return next;\n }\n concat(schema) {\n let next = super.concat(schema);\n let nextFields = next.fields;\n for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n const target = nextFields[field];\n nextFields[field] = target === undefined ? schemaOrRef : target;\n }\n return next.withMutation(s =>\n // XXX: excludes here is wrong\n s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges]));\n }\n _getDefault(options) {\n if ('default' in this.spec) {\n return super._getDefault(options);\n }\n\n // if there is no default set invent one\n if (!this._nodes.length) {\n return undefined;\n }\n let dft = {};\n this._nodes.forEach(key => {\n var _innerOptions;\n const field = this.fields[key];\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n dft[key] = field && 'getDefault' in field ? field.getDefault(innerOptions) : undefined;\n });\n return dft;\n }\n setFields(shape, excludedEdges) {\n let next = this.clone();\n next.fields = shape;\n next._nodes = sortFields(shape, excludedEdges);\n next._sortErrors = sortByKeyOrder(Object.keys(shape));\n // XXX: this carries over edges which may not be what you want\n if (excludedEdges) next._excludedEdges = excludedEdges;\n return next;\n }\n shape(additions, excludes = []) {\n return this.clone().withMutation(next => {\n let edges = next._excludedEdges;\n if (excludes.length) {\n if (!Array.isArray(excludes[0])) excludes = [excludes];\n edges = [...next._excludedEdges, ...excludes];\n }\n\n // XXX: excludes here is wrong\n return next.setFields(Object.assign(next.fields, additions), edges);\n });\n }\n partial() {\n const partial = {};\n for (const [key, schema] of Object.entries(this.fields)) {\n partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;\n }\n return this.setFields(partial);\n }\n deepPartial() {\n const next = deepPartial(this);\n return next;\n }\n pick(keys) {\n const picked = {};\n for (const key of keys) {\n if (this.fields[key]) picked[key] = this.fields[key];\n }\n return this.setFields(picked, this._excludedEdges.filter(([a, b]) => keys.includes(a) && keys.includes(b)));\n }\n omit(keys) {\n const remaining = [];\n for (const key of Object.keys(this.fields)) {\n if (keys.includes(key)) continue;\n remaining.push(key);\n }\n return this.pick(remaining);\n }\n from(from, to, alias) {\n let fromGetter = getter(from, true);\n return this.transform(obj => {\n if (!obj) return obj;\n let newObj = obj;\n if (deepHas(obj, from)) {\n newObj = Object.assign({}, obj);\n if (!alias) delete newObj[from];\n newObj[to] = fromGetter(obj);\n }\n return newObj;\n });\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n\n /**\n * Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys\n */\n exact(message) {\n return this.test({\n name: 'exact',\n exclusive: true,\n message: message || object.exact,\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return unknownKeys.length === 0 || this.createError({\n params: {\n properties: unknownKeys.join(', ')\n }\n });\n }\n });\n }\n stripUnknown() {\n return this.clone({\n noUnknown: true\n });\n }\n noUnknown(noAllow = true, message = object.noUnknown) {\n if (typeof noAllow !== 'boolean') {\n message = noAllow;\n noAllow = true;\n }\n let next = this.test({\n name: 'noUnknown',\n exclusive: true,\n message: message,\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return !noAllow || unknownKeys.length === 0 || this.createError({\n params: {\n unknown: unknownKeys.join(', ')\n }\n });\n }\n });\n next.spec.noUnknown = noAllow;\n return next;\n }\n unknown(allow = true, message = object.noUnknown) {\n return this.noUnknown(!allow, message);\n }\n transformKeys(fn) {\n return this.transform(obj => {\n if (!obj) return obj;\n const result = {};\n for (const key of Object.keys(obj)) result[fn(key)] = obj[key];\n return result;\n });\n }\n camelCase() {\n return this.transformKeys(camelCase);\n }\n snakeCase() {\n return this.transformKeys(snakeCase);\n }\n constantCase() {\n return this.transformKeys(key => snakeCase(key).toUpperCase());\n }\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const base = super.describe(options);\n base.fields = {};\n for (const [key, value] of Object.entries(next.fields)) {\n var _innerOptions2;\n let innerOptions = options;\n if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n base.fields[key] = value.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$3.prototype = ObjectSchema.prototype;\n\nfunction create$2(type) {\n return new ArraySchema(type);\n}\nclass ArraySchema extends Schema {\n constructor(type) {\n super({\n type: 'array',\n spec: {\n types: type\n },\n check(v) {\n return Array.isArray(v);\n }\n });\n\n // `undefined` specifically means uninitialized, as opposed to \"no subtype\"\n this.innerType = void 0;\n this.innerType = type;\n }\n _cast(_value, _opts) {\n const value = super._cast(_value, _opts);\n\n // should ignore nulls here\n if (!this._typeCheck(value) || !this.innerType) {\n return value;\n }\n let isChanged = false;\n const castArray = value.map((v, idx) => {\n const castElement = this.innerType.cast(v, Object.assign({}, _opts, {\n path: `${_opts.path || ''}[${idx}]`,\n parent: value,\n originalValue: v,\n value: v,\n index: idx\n }));\n if (castElement !== v) {\n isChanged = true;\n }\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n var _options$recursive;\n // let sync = options.sync;\n // let path = options.path;\n let innerType = this.innerType;\n // let endEarly = options.abortEarly ?? this.spec.abortEarly;\n let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;\n options.originalValue != null ? options.originalValue : _value;\n super._validate(_value, options, panic, (arrayErrors, value) => {\n var _options$originalValu2;\n if (!recursive || !innerType || !this._typeCheck(value)) {\n next(arrayErrors, value);\n return;\n }\n\n // #950 Ensure that sparse array empty slots are validated\n let tests = new Array(value.length);\n for (let index = 0; index < value.length; index++) {\n var _options$originalValu;\n tests[index] = innerType.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(arrayErrors), value));\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n return next;\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n concat(schema) {\n let next = super.concat(schema);\n\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n if (schema.innerType)\n // @ts-expect-error readonly\n next.innerType = next.innerType ?\n // @ts-expect-error Lazy doesn't have concat and will break\n next.innerType.concat(schema.innerType) : schema.innerType;\n return next;\n }\n of(schema) {\n // FIXME: this should return a new instance of array without the default to be\n let next = this.clone();\n if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema));\n\n // @ts-expect-error readonly\n next.innerType = schema;\n next.spec = Object.assign({}, next.spec, {\n types: schema\n });\n return next;\n }\n length(length, message = array.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message) {\n message = message || array.min;\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n // FIXME(ts): Array<typeof T>\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message) {\n message = message || array.max;\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n ensure() {\n return this.default(() => []).transform((val, original) => {\n // We don't want to return `null` for nullable schema\n if (this._typeCheck(val)) return val;\n return original == null ? [] : [].concat(original);\n });\n }\n compact(rejector) {\n let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);\n return this.transform(values => values != null ? values.filter(reject) : values);\n }\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const base = super.describe(options);\n if (next.innerType) {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[0]\n });\n }\n base.innerType = next.innerType.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$2.prototype = ArraySchema.prototype;\n\n// @ts-ignore\nfunction create$1(schemas) {\n return new TupleSchema(schemas);\n}\nclass TupleSchema extends Schema {\n constructor(schemas) {\n super({\n type: 'tuple',\n spec: {\n types: schemas\n },\n check(v) {\n const types = this.spec.types;\n return Array.isArray(v) && v.length === types.length;\n }\n });\n this.withMutation(() => {\n this.typeError(tuple.notType);\n });\n }\n _cast(inputValue, options) {\n const {\n types\n } = this.spec;\n const value = super._cast(inputValue, options);\n if (!this._typeCheck(value)) {\n return value;\n }\n let isChanged = false;\n const castArray = types.map((type, idx) => {\n const castElement = type.cast(value[idx], Object.assign({}, options, {\n path: `${options.path || ''}[${idx}]`,\n parent: value,\n originalValue: value[idx],\n value: value[idx],\n index: idx\n }));\n if (castElement !== value[idx]) isChanged = true;\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n let itemTypes = this.spec.types;\n super._validate(_value, options, panic, (tupleErrors, value) => {\n var _options$originalValu2;\n // intentionally not respecting recursive\n if (!this._typeCheck(value)) {\n next(tupleErrors, value);\n return;\n }\n let tests = [];\n for (let [index, itemSchema] of itemTypes.entries()) {\n var _options$originalValu;\n tests[index] = itemSchema.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(tupleErrors), value));\n });\n }\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const base = super.describe(options);\n base.innerType = next.spec.types.map((schema, index) => {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[index]\n });\n }\n return schema.describe(innerOptions);\n });\n return base;\n }\n}\ncreate$1.prototype = TupleSchema.prototype;\n\nfunction create(builder) {\n return new Lazy(builder);\n}\nfunction catchValidationError(fn) {\n try {\n return fn();\n } catch (err) {\n if (ValidationError.isError(err)) return Promise.reject(err);\n throw err;\n }\n}\nclass Lazy {\n constructor(builder) {\n this.type = 'lazy';\n this.__isYupSchema__ = true;\n this.spec = void 0;\n this._resolve = (value, options = {}) => {\n let schema = this.builder(value, options);\n if (!isSchema(schema)) throw new TypeError('lazy() functions must return a valid schema');\n if (this.spec.optional) schema = schema.optional();\n return schema.resolve(options);\n };\n this.builder = builder;\n this.spec = {\n meta: undefined,\n optional: false\n };\n }\n clone(spec) {\n const next = new Lazy(this.builder);\n next.spec = Object.assign({}, this.spec, spec);\n return next;\n }\n optionality(optional) {\n const next = this.clone({\n optional\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n resolve(options) {\n return this._resolve(options.value, options);\n }\n cast(value, options) {\n return this._resolve(value, options).cast(value, options);\n }\n asNestedTest(config) {\n let {\n key,\n index,\n parent,\n options\n } = config;\n let value = parent[index != null ? index : key];\n return this._resolve(value, Object.assign({}, options, {\n value,\n parent\n })).asNestedTest(config);\n }\n validate(value, options) {\n return catchValidationError(() => this._resolve(value, options).validate(value, options));\n }\n validateSync(value, options) {\n return this._resolve(value, options).validateSync(value, options);\n }\n validateAt(path, value, options) {\n return catchValidationError(() => this._resolve(value, options).validateAt(path, value, options));\n }\n validateSyncAt(path, value, options) {\n return this._resolve(value, options).validateSyncAt(path, value, options);\n }\n isValid(value, options) {\n try {\n return this._resolve(value, options).isValid(value, options);\n } catch (err) {\n if (ValidationError.isError(err)) {\n return Promise.resolve(false);\n }\n throw err;\n }\n }\n isValidSync(value, options) {\n return this._resolve(value, options).isValidSync(value, options);\n }\n describe(options) {\n return options ? this.resolve(options).describe(options) : {\n type: 'lazy',\n meta: this.spec.meta,\n label: undefined\n };\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n get ['~standard']() {\n const schema = this;\n const standard = {\n version: 1,\n vendor: 'yup',\n async validate(value) {\n try {\n const result = await schema.validate(value, {\n abortEarly: false\n });\n return {\n value: result\n };\n } catch (err) {\n if (ValidationError.isError(err)) {\n return {\n issues: issuesFromValidationError(err)\n };\n }\n throw err;\n }\n }\n };\n return standard;\n }\n}\n\nfunction setLocale(custom) {\n Object.keys(custom).forEach(type => {\n // @ts-ignore\n Object.keys(custom[type]).forEach(method => {\n // @ts-ignore\n locale[type][method] = custom[type][method];\n });\n });\n}\n\nfunction addMethod(schemaType, name, fn) {\n if (!schemaType || !isSchema(schemaType.prototype)) throw new TypeError('You must provide a yup schema constructor function');\n if (typeof name !== 'string') throw new TypeError('A Method name must be provided');\n if (typeof fn !== 'function') throw new TypeError('Method function must be provided');\n schemaType.prototype[name] = fn;\n}\n\nexport { ArraySchema, BooleanSchema, DateSchema, Lazy as LazySchema, MixedSchema, NumberSchema, ObjectSchema, Schema, StringSchema, TupleSchema, ValidationError, addMethod, create$2 as array, create$7 as bool, create$7 as boolean, create$4 as date, locale as defaultLocale, getIn, isSchema, create as lazy, create$8 as mixed, create$5 as number, create$3 as object, printValue, reach, create$9 as ref, setLocale, create$6 as string, create$1 as tuple };\n","import {\n AdType,\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n EnumResourceType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { SocialMediaTypeSchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst schema = new MongooseSchema<AdType>(\n {\n active: { default: true, type: Boolean },\n adStyle: {\n default: EnumAdStyle.BLOOM,\n enum: Object.values(EnumAdStyle),\n required: true,\n type: String,\n },\n adType: {\n default: EnumAdType.SPONSORED,\n enum: Object.values(EnumAdType),\n required: true,\n type: String,\n },\n // TODO: similar to ViewSchema\n clicks: { default: 0, required: true, type: Number },\n clui: { required: false, type: String },\n end: { required: true, type: Date },\n // TODO: similar to ViewSchema\n impressions: { default: 0, required: true, type: Number },\n resourceCover: { required: true, type: String },\n resourceDescription: { required: true, type: String },\n resourceId: { required: true, type: String },\n resourceLogo: { required: false, 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 showOn: {\n default: EnumAdShowOn.FRONT_PAGE,\n enum: Object.values(EnumAdShowOn),\n required: true,\n type: String,\n },\n socialMedia: [SocialMediaTypeSchema],\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 AssociateType,\n Category,\n DateTimeType,\n EnumEventDateStatus,\n EnumResourceType,\n EnumUserLicence,\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\nconst 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 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 },\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\nconst ContactDetailsSchema = 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 locationsSchema = new MongooseSchema<LocationType>(\n {\n city: { required: true, type: String },\n coordinates: {\n required: true,\n type: [Number], // [longitude, latitude]\n },\n country: { required: true, type: String },\n fullAddress: { required: true, type: String },\n latitude: { required: true, type: Number },\n longitude: { required: true, type: Number },\n region: { required: true, type: String },\n type: {\n default: \"Point\",\n enum: [\"Point\"],\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 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: 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: [ResourceImageTypeSchema],\n logo: ResourceImageTypeSchema,\n name: { required: true, type: String },\n owner: {\n required: false,\n type: OwnerTypeSchema,\n },\n posterUsage: PosterUsageTypeSchema,\n promoCodes: { required: false, type: [String] },\n region: { required: true, type: String },\n socialMedia: [SocialMediaTypeSchema],\n termsAgreement: 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 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 electricity: {\n price: { required: false, type: Number },\n selected: { required: false, type: Boolean },\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 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 applicationDeadlineHours: { required: true, type: Number },\n dateTime: [dateTimeSchema],\n eventId: {\n ref: \"Event\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n packInTime: { required: true, type: Number },\n paymentDueHours: { required: true, type: Number },\n paymentInfo: [paymentInfoSchema],\n requirements: [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 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 SchemaChatMessageType = Omit<ChatMessageType, \"senderId\"> & {\n senderId: ObjectId;\n};\n\nexport type SchemaParticipantType = Omit<ParticipantType, \"userId\"> & {\n userId: ObjectId;\n};\n\nconst MessageSchema = new MongooseSchema<SchemaChatMessageType>(\n {\n content: { required: true, type: String },\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\nexport const ParticipantSchema = new MongooseSchema<SchemaParticipantType>(\n {\n active: { default: true, required: true, 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 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 },\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 GoogleAddressComponent,\n GoogleImportedMarket,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport {\n dateTimeSchema,\n locationsSchema,\n ResourceImageTypeSchema,\n} from \"./global\";\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<GoogleImportedMarket>(\n {\n accessibilityOptions: { required: false, type: Object },\n active: { default: false, required: true, type: Boolean },\n address: { required: true, type: String },\n addressComponents: { required: false, type: [addressComponentSchema] },\n allowsDogs: { required: false, type: Boolean },\n businessStatus: { required: false, type: String },\n claimed: { default: false, required: true, type: Boolean },\n cover: {\n required: false,\n type: ResourceImageTypeSchema,\n },\n dateTime: [dateTimeSchema],\n deletedAt: { default: null, required: false, type: Date },\n goodForChildren: { required: false, type: Boolean },\n goodForGroups: { required: false, type: Boolean },\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 liveMusic: { required: false, type: Boolean },\n location: {\n required: false, // optional because lat/lng may expire after 30 days\n type: locationsSchema,\n },\n name: { required: true, type: String },\n openingHours: { required: false, type: [String] },\n parkingOptions: { required: false, type: Object },\n paymentOptions: { required: false, type: Object },\n phone: { required: false, type: String },\n rating: { required: false, type: Number },\n region: { required: false, type: String },\n restroom: { required: false, type: Boolean },\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({ name: 1 });\nschema.index({ slug: 1 });\nschema.index({ address: 1 });\nschema.index({ \"location.lat\": 1, \"location.lng\": 1 });\n\nexport const GoogleImportedMarketModel =\n (mongoose.models\n .GoogleImportedMarket as mongoose.Model<GoogleImportedMarket>) ||\n mongoose.model<GoogleImportedMarket>(\"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 PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\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 = \"Other\",\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 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_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_VENDOR = \"created_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n EVENT = EnumResourceType.EVENT,\n VENDOR = EnumResourceType.VENDOR,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport enum EnumRegions {\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_WEEKEND = \"This_Weekend\",\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 { EnumOSPlatform } from \"@timardex/cluemart-shared/enums\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\ntype PushTokenType = {\n _id: string;\n createdAt: Date;\n platform: EnumOSPlatform;\n token: string;\n updatedAt: Date;\n userId: string;\n};\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: { required: true, type: mongoose.Schema.Types.ObjectId },\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\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 coordinates: {\n required: false,\n type: [Number],\n },\n type: {\n default: \"Point\",\n enum: [\"Point\"],\n required: false,\n type: String,\n },\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 EnumResourceType,\n OrganizedMarketCount,\n OrganizerMarketFrequency,\n TesterEvent,\n TesterType,\n TesterVendor,\n VendorSellingFrequency,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { CategorySchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst TesterVendorQuestionarySchema = new MongooseSchema(\n {\n appearInVideoIntroduction: {\n default: false,\n required: false,\n type: Boolean,\n },\n applyToAtLeastOneMarket: { default: true, required: true, type: Boolean },\n completeFeedbackQuestionnaire: {\n default: true,\n required: true,\n type: Boolean,\n },\n excitementAboutApp: { required: false, type: String },\n sendPhotoForSocialMedia: { default: false, required: false, type: Boolean },\n socialMediaFeatureReason: { required: false, type: String },\n testingPeriodConcerns: { required: false, type: String },\n tryVisitorFeatures: { default: true, required: true, type: Boolean },\n uploadStallProfileFirstWeek: {\n default: true,\n required: true,\n type: Boolean,\n },\n usefulnessExpectations: { required: false, type: String },\n },\n { _id: false },\n);\n\nconst TesterVendorSchema = new MongooseSchema<TesterVendor>(\n {\n categories: { required: true, type: [CategorySchema] },\n marketsAttended: {\n required: true,\n type: [\n {\n city: { required: true, type: String },\n name: { required: true, type: String },\n },\n ],\n },\n productsOrServices: { required: true, type: String },\n questionary: {\n required: true,\n type: TesterVendorQuestionarySchema,\n },\n sellingFrequency: {\n enum: Object.values(VendorSellingFrequency),\n required: true,\n type: String,\n },\n yearlySellingApprox: { required: true, type: Number },\n },\n { _id: false },\n);\n\nconst TesterEventQuestionarySchema = new MongooseSchema(\n {\n allowMarketingAppearance: {\n default: false,\n required: false,\n type: Boolean,\n },\n completeFinalQuestionnaire: {\n default: true,\n required: true,\n type: Boolean,\n },\n completeMarketProfileFirstWeek: {\n default: true,\n required: true,\n type: Boolean,\n },\n dailyCoordinationNeeds: { required: false, type: String },\n interestedInCharityInitiative: {\n default: false,\n required: false,\n type: Boolean,\n },\n inviteStallholders: { default: true, required: true, type: Boolean },\n manageApplicationsAndCommunication: {\n default: true,\n required: true,\n type: Boolean,\n },\n organizerExpectations: { required: false, type: String },\n spaceForClueMart: { default: false, required: false, type: Boolean },\n uploadStallList: { default: true, required: true, type: Boolean },\n },\n { _id: false },\n);\n\nconst TesterEventsSchema = new MongooseSchema<TesterEvent>(\n {\n markets: {\n required: true,\n type: [\n {\n averageStallCount: { required: true, type: Number },\n cityOrVenue: { required: true, type: String },\n frequency: {\n enum: Object.values(OrganizerMarketFrequency),\n required: true,\n type: String,\n },\n name: { required: true, type: String },\n },\n ],\n },\n organizedMarketCount: {\n enum: Object.values(OrganizedMarketCount),\n required: true,\n type: String,\n },\n questionary: {\n required: true,\n type: TesterEventQuestionarySchema,\n },\n },\n { _id: false },\n);\n\nconst TesterSchema = new MongooseSchema<TesterType>(\n {\n active: { default: false, required: true, type: Boolean },\n approved: { default: false, required: true, type: Boolean },\n businessName: { required: true, type: String },\n consents: {\n required: true,\n type: {\n betaTestConsent: { required: true, type: Boolean },\n privacyConsent: { required: true, type: Boolean },\n },\n },\n email: { required: true, type: String },\n event: { required: false, type: TesterEventsSchema },\n firstName: { required: true, type: String },\n lastName: { required: true, type: String },\n mobilePhone: { required: true, type: String },\n osType: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n region: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n vendor: { required: false, type: TesterVendorSchema },\n },\n {\n timestamps: true,\n },\n);\n\nexport const TesterModel =\n (mongoose.models.Tester as mongoose.Model<TesterType>) ||\n mongoose.model<TesterType>(\"Tester\", TesterSchema);\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 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\"\n> & {\n _id: ObjectId;\n events: ObjectId[];\n partner: 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 isTester: { default: false, required: true, type: Boolean },\n lastName: { required: true, type: String },\n licences: {\n required: false,\n type: [userLicenseSchema],\n },\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 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 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 VendorMenuType,\n VendorType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n baseResourceFields,\n CategorySchema,\n resourceRelationsSchema,\n SchemaOwnerType,\n} from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst MenuTypeSchema = new MongooseSchema<VendorMenuType>(\n {\n description: { required: false, type: String },\n name: { required: false, type: String },\n price: { required: false, type: Number },\n productGroups: { required: false, type: [String] },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst LocationsSchema = new MongooseSchema<VendorType[\"locations\"]>(\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 city: { required: false, type: String },\n coordinates: {\n required: false,\n type: [Number], // [longitude, latitude]\n },\n country: { required: false, type: String },\n fullAddress: { required: false, type: String },\n latitude: { required: false, type: Number },\n longitude: { required: false, type: Number },\n region: { required: false, type: String },\n type: { required: false, type: String }, // Mongoose GeoJSON type\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport type SchemaVendorType = Omit<\n VendorType,\n \"vendorInfoId\" | \"owner\" | \"adIds\"\n> & {\n adIds?: ObjectId[];\n owner: SchemaOwnerType;\n vendorInfoId: ObjectId;\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 categories: [CategorySchema],\n foodTruck: { required: true, type: Boolean },\n locations: [LocationsSchema],\n multiLocation: { required: true, type: Boolean },\n products: [MenuTypeSchema],\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\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 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: Number },\n min: { required: true, type: Number },\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: Number },\n width: { required: true, type: Number },\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 { 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 dateTime: [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 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: \"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: \"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 PostContentType,\n PostType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose, { Schema } from \"mongoose\";\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: true, required: true, type: Boolean },\n caption: { required: true, type: String },\n content: [contentSchema],\n postType: {\n enum: Object.values(EnumPostType),\n required: true,\n type: String,\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 appVersion: { default: \"1.0.1\", required: true, type: String },\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 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 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 },\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 { NotificationCount } from \"@timardex/cluemart-shared/types\";\nimport express from \"express\";\nimport mongoose from \"mongoose\";\n\nimport { SchemaChatType } from \"../mongoose/Chat\";\nimport { SchemaNotificationType } from \"../mongoose/Notification\";\n\nexport type ObjectId = mongoose.Schema.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: string;\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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,+CAAAA,UAAA;AAAA;AAWA,QAAI,qBAAqB,uBAAO,IAAI,4BAA4B;AAAhE,QACE,oBAAoB,uBAAO,IAAI,cAAc;AAD/C,QAEE,sBAAsB,uBAAO,IAAI,gBAAgB;AAFnD,QAGE,yBAAyB,uBAAO,IAAI,mBAAmB;AAHzD,QAIE,sBAAsB,uBAAO,IAAI,gBAAgB;AAJnD,QAKE,sBAAsB,uBAAO,IAAI,gBAAgB;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ACrE;AAEO,IAAM,aAA2B,kBAAkB,IAAI,CAAC,SAAS;EACtE,OAAO,IAAI;EACX,OAAO,IAAI;AACb,EAAE;ACyIF,IAAM,aAAa;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AAEO,IAAM,mBAAgC,WAAW,IAAI,CAAC,UAAU;EACrE,aAAa;IACX,OAAO;IACP,UAAU;EACZ;EACA,OAAO;EACP,OAAO;EACP,eAAe;AACjB,EAAE;AClPK,IAAM,aAAwB;EACnC,YAAY;EACZ,cAAc;EACd,MAAM;EACN,aAAa;AACf;AAEO,IAAM,uBAAoC;EAC/C;IACE,GAAG;IACH,MAAM;EACR;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;AACF;ACtBO,IAAM,cAA2B;EACtC;IACE,GAAG;EACL;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,iBAAiB;EACnB;AACF;AAEO,IAAM,iBAA8B;EACzC;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,GAAG;EACL;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,iBAAiB;EACnB;AACF;AAEO,IAAM,6BAA0C;EACrD;IACE,GAAG;IACH,YAAY;EACd;AACF;AAmBO,IAAM,kCAA+C;EAC1D;IACE,GAAG;IACH,UAAU;IACV,YAAY;EACd;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;AACF;AC1EO,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,aAC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O,EAAE;AAAA,EAC1C;AAEA,UAAQ;AAAA,IACN,uCAAkC,cAAc,aAAa,aAAa,cAAc,aAAa,YAAY,aAAa,aAAa,YAAY,aAAa,aAAa;AAAA,EACnL;AACF;;;AC9CA,qBAAoB;AACpB,IAAAC,oBAAqB;AAOd,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":["exports","object","array","exports","module","getter","object","array","exports","module","exports","module","split","normalizePath","getter","forEach","exports","module","join","camelCase","snakeCase","exports","module","toposort","visit","i","dateTimeSchema","express","mongoose","d","b","__assign","s","InvariantError","invariant","invariant","invariant","array","OperationTypeNode","DirectiveLocation","Kind","TokenKind","object","array","instanceOf","string","import_dayjs","import_customParseFormat","import_isSameOrAfter","value","result","schema","s","schema","date","toposort","import_react","import_react","import_react","import_react","EnumInviteStatus","EnumChatType","EnumPaymentMethod","EnumFoodFlavor","EnumResourceType","EnumEventType","EnumVendorType","EnumPartnerType","EnumOSPlatform","EnumRelationResource","EnumNotificationResourceType","EnumNotificationType","EnumRegions","EnumUserLicence","EnumUserRole","EnumSocialMedia","EnumEventDateStatus","EnumSubscriptionStatus","dayjs","customParseFormat","utc","timezone","isSameOrAfter","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","dayjs","isSameOrAfter","customParseFormat","schema","OrganizedMarketCount","VendorSellingFrequency","OrganizerMarketFrequency","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumPostType","EnumPostContentType","EnumActivity","import_mongoose","import_mongoose","import_mongoose","mongoose","dateTimeSchema","paymentInfoSchema","MongooseSchema","mongoose","MongooseSchema","mongoose","dateTimeSchema","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","import_mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","import_mongoose","MongooseSchema","mongoose","schema","EnumOSPlatform","import_mongoose","MongooseSchema","mongoose","schema","EnumOSPlatform","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","import_mongoose","MongooseSchema","mongoose","dateTimeSchema","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","import_mongoose","mongoose","import_mongoose","EnumPubSubEvents"]}
1
+ {"version":3,"sources":["../node_modules/react/cjs/react.production.js","../node_modules/react/cjs/react.development.js","../node_modules/react/index.js","../node_modules/property-expr/index.js","../node_modules/tiny-case/index.js","../node_modules/toposort/index.js","../src/index.ts","../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/utils/index.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/testers.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/tester.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/tester/hooksMutation.ts","../node_modules/@timardex/cluemart-shared/src/graphql/mutations/tester.ts","../node_modules/@timardex/cluemart-shared/src/graphql/hooks/tester/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/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/hooks/useLocationSearch.ts","../node_modules/@timardex/cluemart-shared/src/hooks/vendor/useVendorForm.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/global.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/event.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/vendor.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/user.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/auth.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/tester.ts","../node_modules/@timardex/cluemart-shared/src/types/tester.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/ad.ts","../node_modules/@timardex/cluemart-shared/src/types/ad.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/partner.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/post.ts","../node_modules/@timardex/cluemart-shared/src/types/post.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/appSettings.ts","../node_modules/@timardex/cluemart-shared/src/hooks/utils.ts","../node_modules/@timardex/cluemart-shared/src/hooks/vendor/useVendorInfoForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/event/useEventForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/event/useEventInfoForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useUserForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useLoginForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useRegisterForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useRequestPasswordResetForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useValidateVerificationTokenForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/auth/useResetPasswordForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useTesterForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useContactUsForm.ts","../node_modules/@timardex/cluemart-shared/src/yupSchema/contactUs.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useAdForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/partner/usePartnerForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/usePostForm.ts","../node_modules/@timardex/cluemart-shared/src/hooks/useAppSettingsForm.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/resourceActivities.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","../node_modules/yup/index.esm.js","../src/mongoose/Ad.ts","../src/mongoose/global.ts","../src/mongoose/Relation.ts","../src/mongoose/event/EventInfo.ts","../src/mongoose/Chat.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/Tester.ts","../src/mongoose/User.ts","../src/mongoose/VerificationToken.ts","../src/mongoose/vendor/Vendor.ts","../src/mongoose/vendor/VendorInfo.ts","../src/mongoose/event/Event.ts","../src/mongoose/Partner.ts","../src/mongoose/Post.ts","../src/mongoose/AppSetting.ts","../src/service/database.ts","../src/service/saveNotificationsInDb.ts","../src/service/sendPushNotifications.ts","../src/service/updateAdStatus.ts","../src/types/index.ts"],"sourcesContent":["/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.2.3\";\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ioInfo = payload._ioInfo;\n null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n null != _ioInfo && (_ioInfo.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 && (_ioInfo2.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n ioInfo.value = thenable;\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n };\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.2.3\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * Based on Kendo UI Core expression code <https://github.com/telerik/kendo-ui-core#license-information>\n */\n'use strict'\n\nfunction Cache(maxSize) {\n this._maxSize = maxSize\n this.clear()\n}\nCache.prototype.clear = function () {\n this._size = 0\n this._values = Object.create(null)\n}\nCache.prototype.get = function (key) {\n return this._values[key]\n}\nCache.prototype.set = function (key, value) {\n this._size >= this._maxSize && this.clear()\n if (!(key in this._values)) this._size++\n\n return (this._values[key] = value)\n}\n\nvar SPLIT_REGEX = /[^.^\\]^[]+|(?=\\[\\]|\\.\\.)/g,\n DIGIT_REGEX = /^\\d+$/,\n LEAD_DIGIT_REGEX = /^\\d/,\n SPEC_CHAR_REGEX = /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g,\n CLEAN_QUOTES_REGEX = /^\\s*(['\"]?)(.*?)(\\1)\\s*$/,\n MAX_CACHE_SIZE = 512\n\nvar pathCache = new Cache(MAX_CACHE_SIZE),\n setCache = new Cache(MAX_CACHE_SIZE),\n getCache = new Cache(MAX_CACHE_SIZE)\n\nvar config\n\nmodule.exports = {\n Cache: Cache,\n\n split: split,\n\n normalizePath: normalizePath,\n\n setter: function (path) {\n var parts = normalizePath(path)\n\n return (\n setCache.get(path) ||\n setCache.set(path, function setter(obj, value) {\n var index = 0\n var len = parts.length\n var data = obj\n\n while (index < len - 1) {\n var part = parts[index]\n if (\n part === '__proto__' ||\n part === 'constructor' ||\n part === 'prototype'\n ) {\n return obj\n }\n\n data = data[parts[index++]]\n }\n data[parts[index]] = value\n })\n )\n },\n\n getter: function (path, safe) {\n var parts = normalizePath(path)\n return (\n getCache.get(path) ||\n getCache.set(path, function getter(data) {\n var index = 0,\n len = parts.length\n while (index < len) {\n if (data != null || !safe) data = data[parts[index++]]\n else return\n }\n return data\n })\n )\n },\n\n join: function (segments) {\n return segments.reduce(function (path, part) {\n return (\n path +\n (isQuoted(part) || DIGIT_REGEX.test(part)\n ? '[' + part + ']'\n : (path ? '.' : '') + part)\n )\n }, '')\n },\n\n forEach: function (path, cb, thisArg) {\n forEach(Array.isArray(path) ? path : split(path), cb, thisArg)\n },\n}\n\nfunction normalizePath(path) {\n return (\n pathCache.get(path) ||\n pathCache.set(\n path,\n split(path).map(function (part) {\n return part.replace(CLEAN_QUOTES_REGEX, '$2')\n })\n )\n )\n}\n\nfunction split(path) {\n return path.match(SPLIT_REGEX) || ['']\n}\n\nfunction forEach(parts, iter, thisArg) {\n var len = parts.length,\n part,\n idx,\n isArray,\n isBracket\n\n for (idx = 0; idx < len; idx++) {\n part = parts[idx]\n\n if (part) {\n if (shouldBeQuoted(part)) {\n part = '\"' + part + '\"'\n }\n\n isBracket = isQuoted(part)\n isArray = !isBracket && /^\\d+$/.test(part)\n\n iter.call(thisArg, part, isBracket, isArray, idx, parts)\n }\n }\n}\n\nfunction isQuoted(str) {\n return (\n typeof str === 'string' && str && [\"'\", '\"'].indexOf(str.charAt(0)) !== -1\n )\n}\n\nfunction hasLeadingNumber(part) {\n return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX)\n}\n\nfunction hasSpecialChars(part) {\n return SPEC_CHAR_REGEX.test(part)\n}\n\nfunction shouldBeQuoted(part) {\n return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part))\n}\n","const reWords = /[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*/g\n\nconst words = (str) => str.match(reWords) || []\n\nconst upperFirst = (str) => str[0].toUpperCase() + str.slice(1)\n\nconst join = (str, d) => words(str).join(d).toLowerCase()\n\nconst camelCase = (str) =>\n words(str).reduce(\n (acc, next) =>\n `${acc}${\n !acc\n ? next.toLowerCase()\n : next[0].toUpperCase() + next.slice(1).toLowerCase()\n }`,\n '',\n )\n\nconst pascalCase = (str) => upperFirst(camelCase(str))\n\nconst snakeCase = (str) => join(str, '_')\n\nconst kebabCase = (str) => join(str, '-')\n\nconst sentenceCase = (str) => upperFirst(join(str, ' '))\n\nconst titleCase = (str) => words(str).map(upperFirst).join(' ')\n\nmodule.exports = {\n words,\n upperFirst,\n camelCase,\n pascalCase,\n snakeCase,\n kebabCase,\n sentenceCase,\n titleCase,\n}\n","\n/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nmodule.exports = function(edges) {\n return toposort(uniqueNodes(edges), edges)\n}\n\nmodule.exports.array = toposort\n\nfunction toposort(nodes, edges) {\n var cursor = nodes.length\n , sorted = new Array(cursor)\n , visited = {}\n , i = cursor\n // Better data structures make algorithm much faster.\n , outgoingEdges = makeOutgoingEdges(edges)\n , nodesHash = makeNodesHash(nodes)\n\n // check for unknown nodes\n edges.forEach(function(edge) {\n if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {\n throw new Error('Unknown node. There is an unknown node in the supplied edges.')\n }\n })\n\n while (i--) {\n if (!visited[i]) visit(nodes[i], i, new Set())\n }\n\n return sorted\n\n function visit(node, i, predecessors) {\n if(predecessors.has(node)) {\n var nodeRep\n try {\n nodeRep = \", node was:\" + JSON.stringify(node)\n } catch(e) {\n nodeRep = \"\"\n }\n throw new Error('Cyclic dependency' + nodeRep)\n }\n\n if (!nodesHash.has(node)) {\n throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: '+JSON.stringify(node))\n }\n\n if (visited[i]) return;\n visited[i] = true\n\n var outgoing = outgoingEdges.get(node) || new Set()\n outgoing = Array.from(outgoing)\n\n if (i = outgoing.length) {\n predecessors.add(node)\n do {\n var child = outgoing[--i]\n visit(child, nodesHash.get(child), predecessors)\n } while (i)\n predecessors.delete(node)\n }\n\n sorted[--cursor] = node\n }\n}\n\nfunction uniqueNodes(arr){\n var res = new Set()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n res.add(edge[0])\n res.add(edge[1])\n }\n return Array.from(res)\n}\n\nfunction makeOutgoingEdges(arr){\n var edges = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n if (!edges.has(edge[0])) edges.set(edge[0], new Set())\n if (!edges.has(edge[1])) edges.set(edge[1], new Set())\n edges.get(edge[0]).add(edge[1])\n }\n return edges\n}\n\nfunction makeNodesHash(arr){\n var res = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n res.set(arr[i], i)\n }\n return res\n}\n","export * from \"./mongoose\";\nexport * from \"./service\";\nexport * from \"./types\";\n","export enum EnumInviteStatus {\n ACCEPTED = \"Accepted\",\n COMPLETED = \"Completed\",\n EXPIRED = \"Expired\",\n NO_STATUS = \"No_Status\",\n PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\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 = \"Other\",\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 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_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_VENDOR = \"created_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n EVENT = EnumResourceType.EVENT,\n VENDOR = EnumResourceType.VENDOR,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport enum EnumRegions {\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_WEEKEND = \"This_Weekend\",\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 } 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 vendorMultiLocation: FormField = {\n helperText:\n \"Usefull when you are not only selling products on Events but also providing services at other locations.\",\n name: \"multiLocation\",\n placeholder: \"Multi location\",\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: \"Item Description\",\n isTextArea: true,\n name: \"description\",\n placeholder: \"Item Description\",\n },\n {\n helperText: \"Price\",\n keyboardType: \"decimal-pad\",\n name: \"price\",\n placeholder: \"Price\",\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 ],\n },\n {\n category: \"Natural\",\n items: [\n { abbreviation: \"ECO\", fullName: \"Eco-Friendly\" },\n { abbreviation: \"ORGANIC\", fullName: \"Organic Product\" },\n ],\n },\n {\n category: \"Market Character\",\n items: [\n { abbreviation: \"HM\", fullName: \"Handmade\" },\n { abbreviation: \"LOC\", fullName: \"Local Product\" },\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 ],\n },\n {\n category: \"Animal Related\",\n items: [\n { abbreviation: \"GF-PET\", fullName: \"Grain-Free (Pet)\" },\n { abbreviation: \"PF\", fullName: \"Pet-Friendly\" },\n ],\n },\n {\n category: \"Plant / Natural\",\n items: [\n { abbreviation: \"NPF\", fullName: \"Non-Pesticide / Chemical-Free\" },\n { abbreviation: \"PLN\", fullName: \"Plant-Based\" },\n ],\n },\n {\n category: \"Gift / Design\",\n items: [\n { abbreviation: \"ART\", fullName: \"Artisan\" },\n { abbreviation: \"LTD\", fullName: \"Limited Edition\" },\n ],\n },\n {\n category: \"Sustainability\",\n items: [{ abbreviation: \"ZWP\", fullName: \"Zero-Waste Product\" }],\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\nimport {\n EnumInviteStatus,\n EnumPaymentMethod,\n EnumRegions,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"../enums\";\nimport { OptionItem, Region, SocialMediaType } from \"../types/global\";\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 dayjs(date).tz(NZ_TZ).format();\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 = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(dateFormat);\n\n const formattedTime = dayjs(timestamp)\n .tz(\"Pacific/Auckland\")\n .format(timeFormat);\n\n return formatDate(formattedDate, \"date\");\n};\n\nexport const defaultRegion: Region = {\n latitude: -36.8624942, // Default: New Zealand\n latitudeDelta: 5.0,\n longitude: 174.7450494,\n longitudeDelta: 5.0,\n};\n\nconst isIsoDateString = (value: unknown): value is string => {\n return typeof value === \"string\" && !isNaN(Date.parse(value));\n};\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\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\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+ Event\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"Pro+ 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","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 \"Recyclable\",\n \"Reusable\",\n \"Single-use\",\n \"Glass\",\n \"Paper\",\n \"Plastic\",\n \"Wood\",\n \"Other\",\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,\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 { 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 electricity: {\n price: null,\n selected: false,\n },\n label: type,\n price: 0,\n stallCapacity: 0,\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 },\n {\n helperText: \"Enter password *\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\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 },\n {\n helperText: \"Enter last name *\",\n keyboardType: \"default\",\n name: \"lastName\",\n placeholder: \"Last Name\",\n },\n {\n ...emailField,\n },\n {\n helperText: \"Enter password *\",\n keyboardType: \"default\",\n name: \"password\",\n placeholder: \"Password\",\n secureTextEntry: true,\n },\n];\n\nexport const requestPasswordResetFields: FormField[] = [\n {\n ...emailField,\n helperText: \"Enter email address to reset your password *\",\n },\n];\n\nexport const resetPasswordFields: FormField[] = [\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\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 },\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 testersFields: FormField[] = [\n {\n helperText: \"Enter your business name *\",\n keyboardType: \"default\",\n name: \"businessName\",\n placeholder: \"Business Name *\",\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 ...emailField,\n helperText: \"Enter email address *\",\n },\n {\n helperText: \"Enter your mobile phone number *\",\n keyboardType: \"phone-pad\",\n name: \"mobilePhone\",\n placeholder: \"Mobile Phone Number *\",\n },\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 events 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_RESEND_TESTER_VERIFICATION_EMAIL_MUTATION,\n ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION,\n ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,\n ADMIN_UPDATE_TESTER_MUTATION,\n} from \"src/graphql/mutations/admin\";\nimport { GET_EVENT } from \"src/graphql/queries/event\";\nimport { GET_TESTER } from \"src/graphql/queries/tester\";\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 useAdminUpdateTester = () => {\n const [adminUpdateTester, { loading, error }] = useMutation<{\n adminUpdateTester: {\n _id: string;\n approved: boolean;\n };\n }>(ADMIN_UPDATE_TESTER_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: (mutationResult) => {\n // Extract testerId from the mutation response\n const adminUpdateTester = mutationResult?.data?.adminUpdateTester;\n const testerId = adminUpdateTester?._id;\n\n return [\n {\n query: GET_TESTER,\n variables: { _id: testerId },\n },\n ];\n },\n });\n return {\n adminUpdateTester,\n error,\n loading,\n };\n};\n\nexport const useAdminResendTesterVerificationEmail = () => {\n const [adminResendTesterVerificationEmail, { loading, error }] = useMutation(\n ADMIN_RESEND_TESTER_VERIFICATION_EMAIL_MUTATION,\n );\n\n return {\n adminResendTesterVerificationEmail,\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","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_UPDATE_TESTER_MUTATION = gql`\n mutation adminUpdateTester($input: AdminUpdateTesterInputType!) {\n adminUpdateTester(input: $input) {\n _id\n approved\n }\n }\n`;\n\nexport const ADMIN_RESEND_TESTER_VERIFICATION_EMAIL_MUTATION = gql`\n mutation adminResendTesterVerificationEmail($testerId: ID!) {\n adminResendTesterVerificationEmail(testerId: $testerId)\n }\n`;\n\nexport const ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = gql`\n mutation adminResendUserVerificationEmail($userId: ID!) {\n adminResendUserVerificationEmail(userId: $userId)\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n EVENT_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 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 ...EventDateTimeFields\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 socialMedia {\n ...SocialMediaFields\n }\n rainOrShine\n tags\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${EVENT_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_EVENTS_BY_REGION = gql`\n query getEventsByRegion($region: String!) {\n eventsByRegion(region: $region) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const SEARCH_EVENTS = gql`\n query searchEvents($search: String!, $region: String) {\n eventsSearch(search: $search, region: $region) {\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 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 }\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 EVENT_DATETIME_FIELDS_FRAGMENT = gql`\n fragment EventDateTimeFields on EventDateTimeType {\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 vendors\n }\n going {\n events {\n resourceId\n dateTime {\n ...EventDateTimeFields\n }\n }\n }\n interested {\n events {\n resourceId\n dateTime {\n ...EventDateTimeFields\n }\n }\n }\n present {\n events {\n resourceId\n dateTime {\n ...EventDateTimeFields\n }\n }\n }\n }\n ${EVENT_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 isTester\n lastName\n licences {\n ...LicenceFields\n }\n platform\n preferredRegion\n refreshToken\n role\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 electricity {\n price\n selected\n }\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_FIELDS_FRAGMENT = gql`\n fragment LocationFields on LocationType {\n city\n coordinates\n country\n fullAddress\n latitude\n longitude\n region\n type\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 ...EventDateTimeFields\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 ${EVENT_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 { CATEGORY_FIELDS_FRAGMENT } from \"./global\";\n\nconst TESTER_VENDOR_FIELDS_FRAGMENT = gql`\n fragment TesterVendorFields on TesterVendorType {\n categories {\n ...CategoryFields\n }\n productsOrServices\n marketsAttended {\n name\n city\n }\n sellingFrequency\n yearlySellingApprox\n questionary {\n uploadStallProfileFirstWeek\n applyToAtLeastOneMarket\n tryVisitorFeatures\n completeFeedbackQuestionnaire\n sendPhotoForSocialMedia\n appearInVideoIntroduction\n socialMediaFeatureReason\n excitementAboutApp\n usefulnessExpectations\n testingPeriodConcerns\n }\n }\n ${CATEGORY_FIELDS_FRAGMENT}\n`;\n\nconst TESTER_EVENT_FIELDS_FRAGMENT = gql`\n fragment TesterEventFields on TesterEventType {\n organizedMarketCount\n markets {\n name\n cityOrVenue\n frequency\n averageStallCount\n }\n questionary {\n allowMarketingAppearance\n completeFinalQuestionnaire\n dailyCoordinationNeeds\n interestedInCharityInitiative\n inviteStallholders\n manageApplicationsAndCommunication\n organizerExpectations\n completeMarketProfileFirstWeek\n spaceForClueMart\n uploadStallList\n }\n }\n`;\n\nexport const TESTER_FIELDS_FRAGMENT = gql`\n fragment TesterFields on TesterType {\n _id\n active\n approved\n businessName\n consents {\n betaTestConsent\n privacyConsent\n }\n createdAt\n email\n firstName\n lastName\n mobilePhone\n osType\n region\n resourceType\n updatedAt\n vendor {\n ...TesterVendorFields\n }\n event {\n ...TesterEventFields\n }\n }\n ${TESTER_VENDOR_FIELDS_FRAGMENT}\n ${TESTER_EVENT_FIELDS_FRAGMENT}\n`;\n\nexport const GET_TESTERS = gql`\n query getTesters {\n testers {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_TESTER = gql`\n query getTester($_id: ID!) {\n tester(_id: $_id) {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_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 EVENT_DATETIME_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const VENDOR_LOCATION_FIELDS_FRAGMENT = gql`\n fragment VendorLocationFields on VendorLocationType {\n city\n coordinates\n country\n fullAddress\n latitude\n longitude\n region\n type\n }\n`;\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\nexport const VENDOR_MENU_FIELDS_FRAGMENT = gql`\n fragment VendorMenuFields on VendorMenuType {\n description\n name\n price\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 contactDetails {\n ...ContactDetailsFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n description\n deletedAt\n foodTruck\n images {\n ...ResourceImageFields\n }\n locations {\n dateTime {\n ...VendorDateTimeFields\n }\n description\n location {\n ...VendorLocationFields\n }\n }\n logo {\n ...ResourceImageFields\n }\n multiLocation\n name\n owner {\n ...OwnerFields\n }\n products {\n ...VendorMenuFields\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 }\n ${CATEGORY_FIELDS_FRAGMENT}\n ${VENDOR_DATETIME_FIELDS_FRAGMENT}\n ${VENDOR_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_MENU_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 ...EventDateTimeFields\n }\n eventId\n location {\n ...LocationFields\n }\n }\n ${EVENT_DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n`;\n\nexport const UNREGISTERED_VENDOR = gql`\n fragment UnregisteredVendorFields on UnregisteredVendorType {\n _id\n categories {\n ...CategoryFields\n }\n createdAt\n deletedAt\n email\n invitations {\n ...UnregisteredVendorInvitationFields\n }\n name\n region\n updatedAt\n }\n ${CATEGORY_FIELDS_FRAGMENT}\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($region: String!) {\n vendorsByRegion(region: $region) {\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_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 {\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(REGISTER_MUTATION);\n return { error, loading, register };\n};\n\nexport const useLogin = () => {\n const [login, { loading, error }] = useMutation(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 REFRESH_TOKEN_MUTATION,\n );\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 { 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} from \"../../mutations/chat\";\nimport { CHAT, USER_CHATS } from \"../../queries/chat\";\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 REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: USER_CHATS }],\n },\n );\n\n return { error, loading, removeParticipantFromChat };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { CHAT_FIELDS_FRAGMENT } from \"../queries/chat\";\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 }\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 senderId\n updatedAt\n }\n`;\n\nexport const CHAT_PARTICIPANT = gql`\n fragment ChatParticipantFields on ChatParticipantType {\n active\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 chatName\n chatType\n createdAt\n deletedAt\n messages {\n ...ChatMessageFields\n }\n participants {\n ...ChatParticipantFields\n }\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","import { useQuery, useSubscription } from \"@apollo/client\";\n\nimport { GET_CHAT_MESSAGE } from \"src/graphql/subscriptions/chat\";\n\nimport { ChatType } from \"../../../types/chat\";\nimport { CHAT, USER_CHATS } 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,\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","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(UPDATE_EVENT_MUTATION, {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_USER_EVENTS }],\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 }, // Pass the eventId for refetching\n },\n {\n query: GET_EVENT,\n variables: { _id: eventId }, // Pass the eventId for refetching\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 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`;\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($region: String!) {\n partnersByRegion(region: $region) {\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 {\n GET_EVENT,\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<{ event: EventType }>(\n GET_EVENT,\n {\n fetchPolicy: \"network-only\",\n skip: !_id,\n variables: { _id },\n },\n );\n\n const event = data?.event;\n\n return { error, event, loading, refetch };\n};\n\nexport const useGetEventsByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventsByRegion: EventListItemType[];\n }>(GET_EVENTS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region,\n variables: { region },\n });\n\n const eventsByRegion = data?.eventsByRegion || [];\n\n return { error, eventsByRegion, loading, refetch };\n};\n\nexport const useSearchEvents = (search: string, region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n eventsSearch: EventListItemType[];\n }>(SEARCH_EVENTS, {\n fetchPolicy: \"network-only\",\n skip: search.length < 3,\n variables: { region, search },\n });\n\n const eventsSearch = data?.eventsSearch || [];\n\n return { error, eventsSearch, loading, refetch };\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,\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: {\n eventId: string;\n vendorId: string;\n lastUpdateBy: EnumResourceType;\n };\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 apiMessage\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 },\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 || !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,\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,\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 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 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","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","import { useQuery } from \"@apollo/client\";\n\nimport {\n UnregisteredVendorType,\n VendorInfoType,\n VendorType,\n} from \"../../../types/vendor\";\nimport {\n GET_UNREGISTERED_VENDOR,\n GET_UNREGISTERED_VENDORS,\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,\n variables: { _id },\n },\n );\n\n const vendor = data?.vendor;\n\n return { error, loading, refetch, vendor };\n};\n\nexport const useGetVendorsByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n vendorsByRegion: VendorType[];\n }>(GET_VENDORS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region,\n variables: { region },\n });\n\n const vendorsByRegion = data?.vendorsByRegion || [];\n\n return { error, loading, refetch, vendorsByRegion };\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,\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,\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 useGetUnregisteredVendor = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{\n unregisteredVendor: UnregisteredVendorType;\n }>(GET_UNREGISTERED_VENDOR, {\n fetchPolicy: \"network-only\",\n skip: !_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 CREATE_TESTER_MUTATION,\n DELETE_TESTER_MUTATION,\n UPDATE_TESTER_MUTATION,\n} from \"src/graphql/mutations/tester\";\nimport { GET_TESTERS } from \"src/graphql/queries/tester\";\n\nexport const useCreateTester = () => {\n const [createTester, { data, loading, error }] = useMutation(\n CREATE_TESTER_MUTATION,\n );\n\n return {\n createTester,\n data,\n error,\n loading,\n };\n};\n\nexport const useUpdateTester = () => {\n const [updateTester, { data, loading, error }] = useMutation(\n UPDATE_TESTER_MUTATION,\n );\n\n return {\n data,\n error,\n loading,\n updateTester,\n };\n};\n\nexport const useDeleteTester = () => {\n const [deleteTester, { loading, error }] = useMutation(\n DELETE_TESTER_MUTATION,\n {\n awaitRefetchQueries: true,\n refetchQueries: [{ query: GET_TESTERS }],\n },\n );\n\n return { deleteTester, error, loading };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { TESTER_FIELDS_FRAGMENT } from \"../queries/tester\";\n\nexport const CREATE_TESTER_MUTATION = gql`\n mutation createTester($input: TesterInputType!) {\n createTester(input: $input) {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_FRAGMENT}\n`;\n\nexport const UPDATE_TESTER_MUTATION = gql`\n mutation updateTester($_id: ID!, $input: TesterInputType!) {\n updateTester(_id: $_id, input: $input) {\n ...TesterFields\n }\n }\n ${TESTER_FIELDS_FRAGMENT}\n`;\n\nexport const DELETE_TESTER_MUTATION = gql`\n mutation deleteTester($_id: ID!) {\n deleteTester(_id: $_id)\n }\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport { GET_TESTER, GET_TESTERS } from \"src/graphql/queries/tester\";\nimport { TesterType } from \"src/types/tester\";\n\nexport const useGetTesters = () => {\n const { data, loading, error, refetch } = useQuery<{ testers: TesterType[] }>(\n GET_TESTERS,\n );\n\n const testers = data?.testers || [];\n return {\n error,\n loading,\n refetch,\n testers,\n };\n};\n\nexport const useGetTester = (_id: string) => {\n const { data, loading, error, refetch } = useQuery<{ tester: TesterType }>(\n GET_TESTER,\n {\n skip: !_id,\n variables: { _id },\n },\n );\n\n const tester = data?.tester;\n\n return { error, loading, refetch, tester };\n};\n","import { useMutation } from \"@apollo/client\";\n\nimport { GET_USER, GET_USER_ACTIVITIES } from \"src/graphql/queries/user\";\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 UPDATE_USER_MUTATION,\n} from \"../../mutations/user\";\n\nexport const useCreateUser = () => {\n const [createUser, { loading, error }] = useMutation(CREATE_USER_MUTATION);\n\n return { createUser, error, loading };\n};\n\nexport const useUpdateUser = () => {\n const [updateUser, { loading, error }] = useMutation<{\n updateUser: { _id: string };\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","import { gql } from \"@apollo/client\";\n\nimport { USER_FIELDS_FRAGMENT } 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","import { useQuery } from \"@apollo/client\";\n\nimport { EventListItemType, EventType, VendorType } from \"src/types\";\n\nimport { UserType } from \"../../../types/user\";\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_VENDORS,\n GET_USERS,\n} from \"../../queries/user\";\n\nexport const useGetUsers = () => {\n const { loading, error, data, refetch } = useQuery<{ users: UserType[] }>(\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: UserType }>(\n GET_USER,\n {\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 useGetUserActivities = () => {\n const { loading, error, data, refetch } = useQuery<{\n userActivities: {\n favourites: {\n events: EventListItemType[];\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 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","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\nimport { SOCIAL_MEDIA_FIELDS_FRAGMENT } from \"./global\";\n\nexport const AD_FIELDS_FRAGMENT = gql`\n fragment AdFields on AdType {\n _id\n active\n adStyle\n adType\n clicks\n createdAt\n end\n impressions\n resourceCover\n resourceDescription\n resourceId\n resourceLogo\n resourceName\n resourceRegion\n resourceType\n showOn\n socialMedia {\n ...SocialMediaFields\n }\n start\n status\n targetRegion\n updatedAt\n }\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\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,\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,\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\nconst RESOURCE_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment ResourceActivityFields on ResourceActivityType {\n resourceId\n resourceType\n activity {\n activityType\n location {\n type\n coordinates\n }\n dateStatus\n startDate\n startTime\n timestamp\n userAgent\n userId\n }\n }\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 $removedLicence: LicencesEnumType\n $selectedLicence: LicencesEnumType!\n $useStripe: Boolean\n ) {\n selectPackage(\n billingPeriod: $billingPeriod\n removedLicence: $removedLicence\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 { SubscriptionStatusData } from \"../../../types/user\";\nimport { GET_SUBSCRIPTION_STATUS } 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","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","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 {\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,\n variables: { _id },\n },\n );\n\n const partner = data?.partner;\n\n return { error, loading, partner, refetch };\n};\n\nexport const useGetPartnersByRegion = (region: string) => {\n const { loading, error, data, refetch } = useQuery<{\n partnersByRegion: PartnerType[];\n }>(GET_PARTNERS_BY_REGION, {\n fetchPolicy: \"no-cache\",\n skip: !region,\n variables: { region },\n });\n\n const partnersByRegion = data?.partnersByRegion || [];\n\n return { error, loading, partnersByRegion, refetch };\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,\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 { RESOURCE_IMAGE_FIELDS_FRAGMENT } from \"./global\";\n\nconst POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`\n fragment PostContentDataFields on PostContentData {\n cover {\n ...ResourceImageFields\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`;\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 createdAt\n deletedAt\n postType\n tags\n title\n updatedAt\n }\n ${POST_CONTENT_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 { 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\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 skip: !_id,\n variables: { _id },\n });\n\n return { error, loading, post: data?.post || null, refetch };\n};\n\nexport const useGetPostsByType = (postType: EnumPostType) => {\n const { data, loading, error, refetch } = useQuery<{\n postsByType: PostType[];\n }>(GET_POSTS_BY_TYPE, {\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} 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","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","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 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","/* eslint-disable camelcase */\nimport { LocationType } from \"../types/global\";\n\nexport interface PlacePrediction {\n place_id: string;\n description: string;\n}\n\ninterface PlaceDetails {\n addressComponents: {\n longText: string;\n shortText: string;\n types: string[];\n }[];\n formattedAddress: string;\n location: {\n latitude: number;\n longitude: number;\n };\n}\n\ninterface AutocompleteResponse {\n suggestions?: Array<{\n placePrediction?: {\n placeId?: string;\n text?: {\n text?: string;\n };\n };\n }>;\n}\n\ninterface UseLocation {\n getPredictions: (text: string) => Promise<PlacePrediction[] | undefined>;\n getPlaceDetails: (placeId: string) => Promise<LocationType | undefined>;\n}\n\n/** Handles API request errors */\nconst handleApiError = (error: unknown, message: string) => {\n console.error(message, error);\n};\n\n/**\n * Custom hook to manage location search functionality.\n *\n * @returns {UseLocation} - The functions to get predictions and place details.\n */\nexport const useLocationSearch = (googleApi: string): UseLocation => {\n const getPredictions = async (\n text: string,\n ): Promise<PlacePrediction[] | undefined> => {\n try {\n const response = await fetch(\n \"https://places.googleapis.com/v1/places:autocomplete\",\n {\n body: JSON.stringify({\n includedRegionCodes: [\"nz\"],\n input: text,\n languageCode: \"en\",\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-Goog-Api-Key\": googleApi,\n \"X-Goog-FieldMask\":\n \"suggestions.placePrediction.placeId,suggestions.placePrediction.text.text\",\n },\n method: \"POST\",\n },\n );\n\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n const data = (await response.json()) as AutocompleteResponse;\n const suggestions = data.suggestions ?? [];\n const predictions = suggestions\n .map((suggestion) => suggestion.placePrediction)\n .filter(Boolean)\n .map((prediction) => ({\n description: prediction?.text?.text || \"\",\n place_id: prediction?.placeId || \"\",\n }))\n .filter((prediction) => prediction.place_id && prediction.description);\n\n return predictions;\n } catch (error) {\n console.error(\"Error fetching predictions:\", error);\n handleApiError(error, \"Failed to fetch address predictions.\");\n }\n };\n\n const getPlaceDetails = async (\n placeId: string,\n ): Promise<LocationType | undefined> => {\n try {\n const response = await fetch(\n `https://places.googleapis.com/v1/places/${placeId}`,\n {\n headers: {\n \"X-Goog-Api-Key\": googleApi,\n \"X-Goog-FieldMask\": \"addressComponents,formattedAddress,location\",\n },\n },\n );\n\n if (!response.ok) {\n throw new Error(`HTTP error! Status: ${response.status}`);\n }\n\n const result = (await response.json()) as PlaceDetails;\n const { latitude, longitude } = result.location;\n const { addressComponents, formattedAddress } = result;\n\n const address = addressComponents.reduce((acc, item) => {\n if (item.types.includes(\"street_number\")) {\n return { ...acc, streetNumber: item.longText };\n }\n if (item.types.includes(\"route\")) {\n return { ...acc, streetName: item.longText };\n }\n if (item.types.includes(\"locality\")) {\n return { ...acc, city: item.longText };\n }\n if (item.types.includes(\"administrative_area_level_1\")) {\n return { ...acc, region: item.longText };\n }\n if (item.types.includes(\"country\")) {\n return { ...acc, country: item.longText };\n }\n return acc;\n }, {} as LocationType);\n\n const newLocation = {\n city: address.city ? address.city.toLowerCase() : \"\",\n coordinates: [longitude, latitude], // [longitude, latitude]\n country: address.country,\n fullAddress: formattedAddress,\n latitude,\n longitude,\n region: address.region ? address.region.replace(/ Region$/, \"\") : \"\", // Remove \" Region\" suffix\n type: \"Point\" as const, // Mongoose GeoJSON type\n };\n\n return newLocation;\n } catch (error) {\n handleApiError(error, \"Failed to fetch place details.\");\n }\n };\n\n return {\n getPlaceDetails,\n getPredictions,\n };\n};\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateVendorFormData, VendorFormData } from \"../../types/vendor\";\nimport { vendorSchema } from \"../../yupSchema\";\nimport {\n defaultVendorFormValues,\n mapBaseResourceTypeToFormData,\n} from \"../utils\";\n\n/**\n * Custom hook to manage the vendor form state and validation.\n *\n * @param {VendorFormData} data - The initial form data.\n * @returns {CreateVendorFormData} - The form methods and state.\n */\nexport function useVendorForm(data?: VendorFormData): CreateVendorFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<VendorFormData>({\n defaultValues: defaultVendorFormValues,\n resolver: yupResolver(vendorSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n ...mapBaseResourceTypeToFormData(data),\n availability: data.availability,\n categories: data.categories,\n foodTruck: data.foodTruck,\n locations: data.locations,\n multiLocation: data.multiLocation,\n products: data.products,\n vendorType: data.vendorType,\n });\n } else {\n reset(defaultVendorFormValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n associates,\n availability,\n categories,\n contactDetails,\n cover,\n coverUpload,\n foodTruck,\n description,\n images,\n imagesUpload,\n locations,\n logo,\n logoUpload,\n multiLocation,\n name,\n owner,\n products,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n vendorType,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n associates,\n availability,\n categories,\n contactDetails,\n cover,\n coverUpload,\n description,\n foodTruck,\n images,\n imagesUpload,\n locations,\n logo,\n logoUpload,\n multiLocation,\n name,\n owner,\n products,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n vendorType,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","/* eslint-disable sort-keys */\nimport dayjs from \"dayjs\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat.js\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter.js\";\nimport * as yup from \"yup\";\nimport { TestFunction } from \"yup\";\n\nimport {\n EnumEventDateStatus,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"src/enums\";\n\nimport { dateFormat, normalizeUrl, timeFormat } from \"../utils\";\n\ntype NoLeadingZerosOptions = {\n allowDecimal?: boolean;\n};\n\nexport const nzBankAccountRegex = /^\\d{2}-\\d{4}-\\d{7}-\\d{2}$/;\n\nexport const nzbnRegex = /^94\\d{11}$/;\n\nexport const normalizedUrlTransform = () =>\n yup\n .string()\n .trim()\n .transform((value) =>\n typeof value === \"string\" ? value.toLowerCase() : value,\n )\n .transform((value) =>\n typeof value === \"string\" ? normalizeUrl(value) : value,\n );\n\nexport const noLeadingZeros = (\n fieldName: string,\n options: NoLeadingZerosOptions = {},\n): TestFunction<number | undefined> => {\n return function (value, context) {\n const original = context.originalValue;\n\n // Only validate string input (what the user actually typed)\n if (typeof original !== \"string\") {\n return true;\n }\n\n // Allow empty (handled by required / min)\n if (original === \"\") {\n return true;\n }\n\n const regex = options.allowDecimal\n ? /^0\\d+(\\.\\d+)?$/ // \"03\", \"003\", \"01.5\"\n : /^0\\d+$/; // \"03\", \"003\"\n\n if (regex.test(original)) {\n return context.createError({\n message: `${fieldName} must not have leading zeros`,\n });\n }\n\n return true;\n };\n};\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(customParseFormat);\n\n// ✅ Reusable Required Email Schema\nexport const emailRequiredSchema = yup\n .string()\n .email(\"Invalid email address\")\n .required(\"Email is required\")\n .label(\"Email\")\n .transform((value) =>\n typeof value === \"string\" ? value.trim().toLowerCase() : value,\n );\n\nexport const emailOptionalSchema = yup\n .string()\n .nullable()\n .notRequired()\n .transform((value) =>\n typeof value === \"string\" ? value.trim().toLowerCase() : value,\n )\n .test(\n \"is-valid-email\",\n \"Invalid email address\",\n (value) => !value || yup.string().email().isValidSync(value),\n )\n .label(\"Email\");\n\n// Mobile: starts with 02, 9-11 digits\nexport const mobileRegex = /^02\\d{7,9}$/;\n// Landline: starts with 03, 04, 06, 07, 09 (but not 090), 7 digits after area code\nconst landlineRegex = /^(0(3|4|6|7|9)[0-9]{7})$/;\n\nexport const mobilePhoneSchema = yup\n .string()\n .label(\"Mobile Phone\")\n .nullable()\n .notRequired()\n .test(\n \"mobile-phone\",\n \"Mobile must start with 02 and be 9–11 digits\",\n (value) => !value || mobileRegex.test(value), // skip empty values\n );\n\nconst landlinePhoneSchema = yup\n .string()\n .label(\"Landline Phone\")\n .nullable()\n .notRequired()\n .test(\n \"landline-phone\",\n \"Landline must start with 03, 04, 06, 07, or 09 (not 090) and have 7 digits after area code\",\n (value) => !value || landlineRegex.test(value), // skip empty values\n );\n\nexport const contactDetailsSchema = yup\n .object({\n email: emailOptionalSchema,\n mobilePhone: mobilePhoneSchema,\n landlinePhone: landlinePhoneSchema,\n })\n .nullable()\n .default(undefined);\n\n// DATE AND TIME SCHEMA\nexport const endDateNotInPastTest = yup\n .string()\n .test(\"not-in-past\", \"End date cannot be in the past\", (value) => {\n const now = dayjs(); // Current date and time\n return value\n ? dayjs(value, dateFormat, true).isSameOrAfter(now, \"day\")\n : false;\n });\n\nexport const startDateNotInPastTest = yup\n .string()\n .test(\"not-in-past\", \"Start date cannot be in the past\", (value) => {\n const now = dayjs(); // Current date and time\n return value\n ? dayjs(value, dateFormat, true).isSameOrAfter(now, \"day\")\n : false;\n });\n\nexport const endDateAfterStartDateTest = yup\n .string()\n .test(\n \"end-after-start\",\n \"End date cannot be before start date\",\n function (value) {\n const { startDate } = this.parent;\n if (!startDate || !value) return false;\n return dayjs(value, dateFormat, true).isSameOrAfter(\n dayjs(startDate, dateFormat, true),\n \"day\",\n );\n },\n );\n\nexport const endTimeMustBeAfterStartTimeTest = yup\n .string()\n .test(\n \"valid-end-time\",\n \"End time must be after start time\",\n function (value) {\n const { startDate, endDate, startTime } = this.parent;\n if (!startDate || !endDate || !startTime || !value) return false;\n\n const startDateTime = dayjs(\n `${startDate} ${startTime}`,\n `${dateFormat} ${timeFormat}`,\n true,\n );\n const endDateTime = dayjs(\n `${endDate} ${value}`,\n `${dateFormat} ${timeFormat}`,\n true,\n );\n\n return endDateTime.isAfter(startDateTime);\n },\n );\n\nexport const startTimeCannotBeInPastTest = yup\n .string()\n .test(\n \"valid-start-time\",\n \"Start time cannot be in the past\",\n function (value) {\n const now = dayjs(); // Current date and time\n const { startDate } = this.parent;\n if (!startDate || !value) return false;\n const startDateTime = dayjs(\n `${startDate} ${value}`,\n `${dateFormat} ${timeFormat}`,\n true,\n );\n return startDateTime.isSameOrAfter(now);\n },\n );\n\nexport const dateTimeSchema = yup.object().shape({\n dateStatus: yup\n .mixed<EnumEventDateStatus>()\n .oneOf(Object.values(EnumEventDateStatus))\n .required(\"Date status is required\"),\n endDate: yup\n .string()\n .label(\"End Date\")\n .concat(endDateNotInPastTest)\n .concat(endDateAfterStartDateTest)\n .required(\"End date is required\"),\n endTime: yup\n .string()\n .label(\"End Time\")\n .concat(endTimeMustBeAfterStartTimeTest)\n .required(\"End time is required\"),\n startDate: yup\n .string()\n .label(\"Start Date\")\n .concat(startDateNotInPastTest)\n .required(\"Start date is required\"),\n startTime: yup\n .string()\n .label(\"Start Time\")\n .concat(startTimeCannotBeInPastTest)\n .required(\"Start time is required\"),\n});\n\nconst stallTypesSchema = yup.object({\n label: yup\n .string()\n .trim()\n .label(\"Stall Type\")\n .required(\"Stall type is required\"),\n price: yup\n .number()\n .label(\"Stall Price\")\n .min(0.1, \"Stall price must be at least 0.1\")\n .required(\"Stall price is required\")\n .test(\n \"no-leading-zeros\",\n \"\",\n noLeadingZeros(\"Stall price\", { allowDecimal: true }),\n ),\n stallCapacity: yup\n .number()\n .label(\"Stall Capacity\")\n .typeError(\"Stall capacity must be a number\")\n .min(1, \"Stall capacity must be at least 1\")\n .integer(\"Stall capacity must be a whole number\")\n .required(\"Stall capacity is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Stall capacity\")),\n electricity: yup\n .object({\n selected: yup\n .boolean()\n .nullable()\n .optional()\n .label(\"Electricity Available\"),\n price: yup\n .number()\n .transform((value, originalValue) =>\n originalValue === \"\" ? null : value,\n )\n .integer(\"Electricity price must be a whole number\")\n .test(\n \"no-leading-zeros\",\n \"\",\n noLeadingZeros(\"Electricity price\", { allowDecimal: true }),\n )\n .nullable()\n .optional(),\n })\n .nullable()\n .optional()\n .label(\"Electricity Information\"),\n});\n\nexport const dateTimeWithPriceSchema = dateTimeSchema.shape({\n stallTypes: yup\n .array()\n .of(stallTypesSchema)\n .min(1, \"At least one stall type is required\")\n .required(\"Stall types are required\"),\n});\n\nexport const locationSchema = yup.object().shape({\n city: yup.string().label(\"City\").required(\"City is required\"),\n coordinates: yup\n .array()\n .of(yup.number().required(\"Coordinates must be numbers\"))\n .length(\n 2,\n \"Coordinates must contain exactly two numbers (longitude, latitude)\",\n )\n .required(\"Coordinates are required\"),\n country: yup.string().label(\"Country\").required(\"Country is required\"),\n fullAddress: yup.string().label(\"Address\").required(\"Address is required\"),\n latitude: yup.number().label(\"Latitude\").required(\"Latitude is required\"),\n longitude: yup.number().label(\"Longitude\").required(\"Longitude is required\"),\n region: yup.string().label(\"Region\").required(\"Region is required\"),\n type: yup\n .string()\n .oneOf([\"Point\"], \"Type must be 'Point'\")\n .default(\"Point\")\n .required(\"Type is required\"),\n});\n\n// ✅ Reusable Password Schema\nexport const passwordSchema = yup\n .string()\n .trim()\n .label(\"Password\")\n .min(8, \"Password must be at least 8 characters long\")\n .required(\"Password is required\");\n\nexport const socialMediaSchema = yup.object({\n name: yup\n .mixed<EnumSocialMedia>()\n .oneOf(Object.values(EnumSocialMedia))\n .label(\"Social Media Name\")\n .optional(),\n link: yup.string().when(\"name\", {\n is: (name: EnumSocialMedia | undefined) => !!name, // If name has a value\n then: () =>\n normalizedUrlTransform()\n .required(\"Link is required when name is set\")\n .url(\"Link must be a valid URL\")\n .label(\"Social Media Link\"),\n otherwise: (schema) => schema.notRequired(),\n }),\n});\n\nexport const globalResourceSchema = yup.object().shape({\n active: yup.boolean().required(\"Active is required\"),\n cover: yup.object({\n source: yup.string().label(\"Cover\").required(\"Cover is required\"),\n title: yup.string().label(\"Cover Title\").required(\"Cover is required\"),\n }),\n contactDetails: contactDetailsSchema,\n description: yup\n .string()\n .label(\"Description\")\n .trim()\n .min(3)\n .required(\"Description is required\"),\n name: yup\n .string()\n .label(\"Name\")\n .trim()\n .min(3)\n .max(40)\n .required(\"Name is required\"),\n region: yup.string().label(\"Region\").required(\"Region is required\"),\n socialMedia: yup.array().of(socialMediaSchema).nullable().default(null),\n associates: yup\n .array()\n .of(\n yup.object().shape({\n email: emailRequiredSchema,\n resourceId: yup\n .string()\n .label(\"Resource ID\")\n .required(\"Resource ID is required\"),\n resourceType: yup\n .mixed<EnumResourceType>()\n .oneOf(Object.values(EnumResourceType))\n .label(\"Resource Type\")\n .required(\"Resource Type is required\"),\n licence: yup.object({\n expiryDate: yup.date().required(\"Expiry Date is required\"),\n issuedDate: yup.date().required(\"Issued Date is required\"),\n licenceType: yup\n .mixed<EnumUserLicence>()\n .oneOf(Object.values(EnumUserLicence))\n .label(\"Licence Type\")\n .required(\"Licence Type is required\"),\n }),\n }),\n )\n .nullable()\n .default(null),\n});\n\nexport const categorySchema = yup.array().of(\n yup.object().shape({\n id: yup.string().required(\"Category id is required\"),\n name: yup.string().required(\"Category name is required\"),\n subcategories: yup\n .array()\n .of(\n yup.object().shape({\n id: yup.string().defined(),\n items: yup\n .array()\n .of(\n yup.object().shape({\n id: yup.string().defined(),\n name: yup.string().defined(),\n }),\n )\n .nullable(),\n name: yup.string().defined(),\n }),\n )\n .min(1, \"At least one subcategory is required\")\n .required(\"Subcategories are required\"),\n }),\n);\n","/* eslint-disable sort-keys */\nimport * as yup from \"yup\";\n\nimport { EnumEventType, EnumPaymentMethod } from \"../enums\";\n\nimport {\n dateTimeSchema,\n dateTimeWithPriceSchema,\n globalResourceSchema,\n locationSchema,\n noLeadingZeros,\n normalizedUrlTransform,\n nzBankAccountRegex,\n nzbnRegex,\n} from \"./global\";\n\nexport const eventSchema = globalResourceSchema.shape({\n dateTime: yup\n .array()\n .of(dateTimeSchema)\n .min(1, \"At least one Event date required\")\n .max(50, \"You can only add up to 50 Event dates\") // <-- enforce max 50\n .required(\"DateTime is required\")\n .test(\n \"unique-start-date-time\",\n \"Start Date and Start Time must be unique\",\n function (value) {\n if (!value) return true;\n\n const seen = new Set<string>();\n for (const item of value) {\n // Only validate uniqueness when both fields exist\n if (!item.startDate || !item.startTime) continue;\n\n const key = `${item.startDate}_${item.startTime}`;\n\n if (seen.has(key)) {\n return false;\n }\n\n seen.add(key);\n }\n return true;\n },\n ),\n eventType: yup\n .mixed<EnumEventType>()\n .oneOf(Object.values(EnumEventType))\n .required(\"Please select an Event type\"),\n location: locationSchema,\n nzbn: yup\n .string()\n .required(\"NZBN is required\")\n .matches(nzbnRegex, \"NZBN must be 13 digits and start with 94\"),\n rainOrShine: yup\n .boolean()\n .label(\"Rain or Shine\")\n .required(\"Please specify if the event is rain or shine\"),\n tags: yup\n .array()\n .of(yup.string().defined())\n .min(1, \"Tags are required\")\n .required(\"Tags are required\"),\n});\n\nconst paymentInfoSchema = yup.object({\n paymentMethod: yup\n .mixed<EnumPaymentMethod>()\n .oneOf(Object.values(EnumPaymentMethod))\n .required(\"Please select a Payment method\"),\n\n accountHolderName: yup.string().when(\"paymentMethod\", {\n is: EnumPaymentMethod.BANK_TRANSFER,\n then: (schema) =>\n schema\n .required(\"Account holder name is required for bank transfer\")\n .trim(),\n otherwise: (schema) => schema.notRequired(),\n }),\n\n accountNumber: yup.string().when(\"paymentMethod\", {\n is: EnumPaymentMethod.BANK_TRANSFER,\n then: (schema) =>\n schema\n .required(\"Account number is required for bank transfer\")\n .matches(\n nzBankAccountRegex,\n \"Account number must be in format: XX-XXXX-XXXXXXX-XX\",\n )\n .trim(),\n otherwise: (schema) => schema.notRequired(),\n }),\n\n link: yup.string().when(\"paymentMethod\", {\n is: (val: EnumPaymentMethod) =>\n val === EnumPaymentMethod.PAYPAL || val === EnumPaymentMethod.STRIPE,\n then: () =>\n normalizedUrlTransform()\n .url(\"Link must be a valid URL\")\n .required(\"Link is required for PayPal/Stripe\"),\n otherwise: (schema) => schema.notRequired(),\n }),\n});\n\nexport const eventInfoSchema = yup.object().shape({\n applicationDeadlineHours: yup\n .number()\n .label(\"Application Deadline Hours\")\n .nullable()\n .transform((value, originalValue) => (originalValue === \"\" ? null : value))\n .typeError(\"Application deadline hours must be a number\")\n .min(1, \"Application deadline hours must be at least 1\")\n .required(\"Application deadline hours is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Application deadline hours\")),\n dateTime: yup\n .array()\n .of(dateTimeWithPriceSchema)\n .required(\"DateTime is required\"),\n eventId: yup.string().trim().required(\"Event ID is required\"),\n packInTime: yup\n .number()\n .label(\"Pack In Time\")\n .typeError(\"Pack in time must be a number\")\n .min(1, \"Pack in time must be at least 1\")\n .required(\"Pack in time is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Pack in time\")),\n paymentDueHours: yup\n .number()\n .label(\"Payment Due Hours\")\n .typeError(\"Payment due hours must be a number\")\n .min(1, \"Payment due hours must be at least 1\")\n .required(\"Payment due hours is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Payment due hours\"))\n .test(\n \"payment-before-deadline\",\n \"Payment due hours must be less than application deadline hours\",\n function (value) {\n const { applicationDeadlineHours } = this.parent;\n\n // Both are numbers (enforced by schema), so direct comparison is fine\n return value < applicationDeadlineHours;\n },\n ),\n paymentInfo: yup\n .array()\n .of(paymentInfoSchema)\n .min(1, \"At least one payment info is required\")\n .required(\"Payment info is required\"),\n});\n","import * as yup from \"yup\";\n\nimport { EnumFoodFlavor, EnumVendorType } from \"src/enums\";\n\nimport {\n categorySchema,\n dateTimeSchema,\n emailRequiredSchema,\n globalResourceSchema,\n locationSchema,\n} from \"./global\";\n\nconst vendroMenuSchema = yup.object().shape({\n description: yup.string().trim().max(100).optional().nullable(),\n price: yup\n .number()\n .transform((value, originalValue) => (originalValue === \"\" ? null : value))\n .min(0)\n .optional()\n .nullable(),\n title: yup.string().trim().max(50).optional().nullable(),\n});\n\nexport const vendorSchema = globalResourceSchema.shape({\n categories: categorySchema\n .min(1, \"Category list must contain at least one item\")\n .required(\"Categories are required\"),\n foodTruck: yup\n .boolean()\n .label(\"Food Truck\")\n .required(\"Please specify if the vendor is a food truck\"),\n multiLocation: yup.boolean().required(\"Multi location is required\"),\n products: yup.array().of(vendroMenuSchema).nullable().default(null),\n vendorType: yup\n .mixed<EnumVendorType>()\n .oneOf(Object.values(EnumVendorType))\n .required(\"Please select a Vendor type\"),\n});\n\nexport const unregisteredVendorSchema = yup.object().shape({\n categories: categorySchema\n .min(1, \"Category list must contain at least one item\")\n .required(\"Categories are required\"),\n email: emailRequiredSchema,\n invitations: yup\n .array()\n .of(\n yup.object({\n dateTime: yup\n .array()\n .of(dateTimeSchema)\n .required(\"DateTime is required\"),\n eventId: yup.string().required(\"Event ID is required\"),\n location: locationSchema,\n }),\n )\n .nullable()\n .default(null),\n name: yup\n .string()\n .label(\"Name\")\n .trim()\n .min(3)\n .max(40)\n .required(\"Name is required\"),\n region: yup.string().label(\"Region\").required(\"Region is required\"),\n});\n\nexport const vendorInfoSchema = yup.object().shape({\n product: yup.object().shape({\n foodFlavors: yup\n .array()\n .of(\n yup\n .mixed<EnumFoodFlavor>()\n .oneOf(Object.values(EnumFoodFlavor), \"Invalid flavor selected\")\n .required(\"Flavor is required\"),\n )\n .min(1, \"Food flavors list must contain at least one item\")\n .required(\"Food flavors are required\"),\n packaging: yup\n .array()\n .of(yup.string().defined())\n .min(1, \"Packaging list must contain at least one item\")\n .required(\"Packaging is required\"),\n priceRange: yup.object().shape({\n max: yup\n .number()\n .min(1)\n .required(\"Max price is required\")\n .test(\n \"is-greater\",\n \"Max price must be greater than or equal to Min price\",\n function (max) {\n const { min } = this.parent;\n return max >= min;\n },\n ),\n min: yup.number().min(1).required(\"Min price is required\"),\n }),\n producedIn: yup\n .array()\n .of(yup.string().defined())\n .min(1, \"Produced in list must contain at least one item\")\n .required(\"Produced in is required\"),\n }),\n requirements: yup\n .object()\n .shape({\n electricity: yup.object().shape({\n details: yup\n .string()\n .trim()\n .test(\n \"details-required\",\n \"Please add electricity details\",\n function (value) {\n return (\n !this.parent?.isRequired || (value?.trim().length ?? 0) > 0\n );\n },\n )\n .nullable(),\n isRequired: yup\n .boolean()\n .required(\"Electricity requirement is required\"),\n }),\n gazebo: yup.object().shape({\n details: yup\n .string()\n .trim()\n .test(\n \"details-required\",\n \"Please add gazebo details\",\n function (value) {\n return (\n !this.parent?.isRequired || (value?.trim().length ?? 0) > 0\n );\n },\n )\n .nullable(),\n isRequired: yup.boolean().required(\"Gazebo requirement is required\"),\n }),\n table: yup.object().shape({\n details: yup\n .string()\n .trim()\n .test(\n \"details-required\",\n \"Please add table details\",\n function (value) {\n return (\n !this.parent?.isRequired || (value?.trim().length ?? 0) > 0\n );\n },\n )\n .nullable(),\n isRequired: yup.boolean().required(\"Table requirement is required\"),\n }),\n })\n .optional(),\n stallInfo: yup.object().shape({\n size: yup.object().shape({\n depth: yup.number().min(1).required(\"Depth is required\"),\n width: yup.number().min(1).required(\"Width is required\"),\n }),\n }),\n vendorId: yup.string().trim().required(\"Vendor ID is required\"),\n});\n","/* eslint-disable sort-keys */\nimport * as yup from \"yup\";\n\nimport { EnumUserRole } from \"../enums\";\n\nimport { emailRequiredSchema } from \"./global\";\n\nexport const userSchema = yup.object().shape({\n active: yup.boolean().required(\"Active is required\"),\n email: emailRequiredSchema,\n firstName: yup\n .string()\n .label(\"First Name\")\n .required(\"First name is required\"),\n lastName: yup.string().label(\"Last Name\").required(\"Last name is required\"),\n isTester: yup.boolean().required(\"Tester status is required\"),\n password: yup\n .string()\n .nullable()\n .trim()\n .label(\"Password\")\n // simple rule: if user enters something → must be at least 8 chars\n .min(8, \"Password must be at least 8 characters long\")\n .notRequired(),\n preferredRegion: yup\n .string()\n .label(\"Preferred Region\")\n .required(\"Preferred region is required\"),\n confirmPassword: yup\n .string()\n .nullable()\n .trim()\n .label(\"Confirm Password\")\n .when(\"password\", {\n is: (val: string | null) => !!val, // only necessary if password typed\n then: (schema) =>\n schema\n .required(\"Confirm Password is required\")\n .oneOf([yup.ref(\"password\")], \"Passwords must match\"),\n otherwise: (schema) => schema.notRequired(),\n }),\n role: yup\n .mixed<EnumUserRole>()\n .oneOf(Object.values(EnumUserRole))\n .required(\"Role is required\"),\n});\n","import * as yup from \"yup\";\n\nimport { emailRequiredSchema, passwordSchema } from \"./global\";\n\nexport const loginSchema = yup.object().shape({\n email: emailRequiredSchema,\n password: passwordSchema,\n});\n\nexport const registerSchema = yup.object().shape({\n email: emailRequiredSchema,\n firstName: yup\n .string()\n .label(\"First Name\")\n .required(\"First Name is required\"),\n lastName: yup.string().label(\"Last Name\").required(\"Last Name is required\"),\n password: passwordSchema,\n preferredRegion: yup\n .string()\n .label(\"Preferred Region\")\n .required(\"Preferred Region is required\"),\n});\n\nexport const requestPasswordResetSchema = yup.object().shape({\n email: emailRequiredSchema,\n});\n\nexport const resetPasswordSchema = yup.object().shape({\n email: emailRequiredSchema,\n password: passwordSchema,\n // eslint-disable-next-line sort-keys\n confirmPassword: yup\n .string()\n .oneOf([yup.ref(\"password\")], \"Passwords must match\")\n .required(\"Confirm Password is required\"),\n});\n\nexport const validateVerificationTokenSchema = yup.object().shape({\n email: emailRequiredSchema,\n verificationToken: yup\n .string()\n .required(\"Verification code is required\")\n .matches(/^\\d{6}$/, \"Verification code must be exactly 6 digits\"),\n});\n","import * as yup from \"yup\";\n\nimport { EnumOSPlatform, EnumResourceType } from \"src/enums\";\nimport {\n OrganizedMarketCount,\n OrganizerMarketFrequency,\n TesterEvent,\n TesterVendor,\n VendorSellingFrequency,\n} from \"src/types/tester\";\n\nimport {\n categorySchema,\n emailRequiredSchema,\n mobileRegex,\n noLeadingZeros,\n} from \"./global\";\n\nconst testerVendorSchema = yup.object().shape({\n categories: categorySchema\n .min(1, \"Category list must contain at least one item\")\n .required(\"Categories are required\"),\n marketsAttended: yup\n .array()\n .of(\n yup.object().shape({\n city: yup.string().trim().required(\"City is required\"),\n name: yup.string().trim().required(\"Market name is required\"),\n }),\n )\n .min(1, \"At least one market must be provided\")\n .required(\"Markets attended are required\"),\n productsOrServices: yup\n .string()\n .trim()\n .required(\"Products or services description is required\"),\n questionary: yup\n .object()\n .shape({\n appearInVideoIntroduction: yup.boolean().optional(),\n applyToAtLeastOneMarket: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n completeFeedbackQuestionnaire: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n excitementAboutApp: yup.string().trim().optional(),\n sendPhotoForSocialMedia: yup.boolean().optional(),\n socialMediaFeatureReason: yup.string().trim().optional(),\n testingPeriodConcerns: yup.string().trim().optional(),\n tryVisitorFeatures: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n uploadStallProfileFirstWeek: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n usefulnessExpectations: yup.string().trim().optional(),\n })\n .required(\"Questionary is required\"),\n sellingFrequency: yup\n .mixed<VendorSellingFrequency>()\n .oneOf(\n Object.values(VendorSellingFrequency),\n \"Please select a valid selling frequency\",\n )\n .required(\"Required field\"),\n yearlySellingApprox: yup\n .number()\n .nonNullable()\n .transform((value, originalValue) =>\n originalValue === \"\" ? undefined : value,\n )\n .label(\"Yearly Selling Approx\")\n .min(1, \"Yearly selling approximate must be at least 1\")\n .integer(\"Yearly selling approximate must be a whole number\")\n .required(\"Yearly selling approximate is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Yearly selling approximate\")),\n});\n\nconst testerEventSchema = yup.object().shape({\n markets: yup\n .array()\n .of(\n yup.object().shape({\n averageStallCount: yup\n .number()\n .nonNullable()\n .transform((value, originalValue) =>\n originalValue === \"\" ? undefined : value,\n )\n .label(\"Average Stall Count\")\n .min(1, \"Average stall count must be at least 1\")\n .integer(\"Average stall count must be a whole number\")\n .required(\"Average stall count is required\")\n .test(\"no-leading-zeros\", \"\", noLeadingZeros(\"Average stall count\")),\n cityOrVenue: yup.string().trim().required(\"City or venue is required\"),\n frequency: yup\n .mixed<OrganizerMarketFrequency>()\n .oneOf(\n Object.values(OrganizerMarketFrequency),\n \"Please select a valid frequency\",\n )\n .required(\"Frequency is required\"),\n name: yup.string().trim().required(\"Market name is required\"),\n }),\n )\n .min(1, \"At least one market must be provided\")\n .required(\"Markets are required\"),\n organizedMarketCount: yup\n .mixed<OrganizedMarketCount>()\n .oneOf(\n Object.values(OrganizedMarketCount),\n \"Please select a valid market count\",\n )\n .required(\"Organized market count is required\"),\n\n questionary: yup\n .object()\n .shape({\n allowMarketingAppearance: yup.boolean().optional(),\n completeFinalQuestionnaire: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n completeMarketProfileFirstWeek: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n dailyCoordinationNeeds: yup.string().trim().optional(),\n interestedInCharityInitiative: yup.boolean().optional(),\n inviteStallholders: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n manageApplicationsAndCommunication: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n organizerExpectations: yup.string().trim().optional(),\n spaceForClueMart: yup.boolean().optional(),\n uploadStallList: yup\n .boolean()\n .required(\"This field is required\")\n .oneOf([true], \"This field is required\"),\n })\n .required(\"Questionary is required\"),\n});\n\nexport const testerSchema = yup.object().shape({\n businessName: yup.string().required(\"Business name is required\"),\n consents: yup.object().shape({\n betaTestConsent: yup\n .boolean()\n .oneOf([true], \"You must consent to beta testing\")\n .required(\"Beta test consent is required\"),\n privacyConsent: yup\n .boolean()\n .oneOf([true], \"You must accept the Privacy Policy\")\n .required(\"Privacy consent is required\"),\n }),\n email: emailRequiredSchema,\n event: yup.object().when(\"resourceType\", {\n is: (resourceType: EnumResourceType) =>\n resourceType === EnumResourceType.EVENT,\n otherwise: (schema) => schema.nullable().optional(),\n then: (schema) =>\n schema\n .required(\"Event information is required\")\n .shape(testerEventSchema.fields),\n }) as unknown as yup.Schema<TesterEvent | null | undefined>,\n firstName: yup.string().required(\"First name is required\"),\n lastName: yup.string().required(\"Last name is required\"),\n mobilePhone: yup\n .string()\n .label(\"Mobile Phone\")\n .required(\"Mobile phone is required\")\n .test(\n \"mobile-phone\",\n \"Mobile must start with 02 and be 9–11 digits\",\n (value) => !value || mobileRegex.test(value), // skip empty values\n ),\n osType: yup\n .mixed<EnumOSPlatform>()\n .oneOf(Object.values(EnumOSPlatform), \"Please select Android or iOS\")\n .required(\"OS Type is required\"),\n region: yup.string().required(\"Region is required\"),\n resourceType: yup\n .mixed<EnumResourceType>()\n .oneOf(\n Object.values(EnumResourceType),\n \"Please select Event or Stallholder\",\n )\n .required(\"Resource Type is required\"),\n vendor: yup.object().when(\"resourceType\", {\n is: (resourceType: EnumResourceType) =>\n resourceType === EnumResourceType.VENDOR,\n otherwise: (schema) => schema.nullable().optional(),\n then: (schema) =>\n schema\n .required(\"Vendor information is required\")\n .shape(testerVendorSchema.fields),\n }) as unknown as yup.Schema<TesterVendor | null | undefined>,\n});\n","import { EnumOSPlatform, EnumResourceType } from \"src/enums\";\n\nimport { Category, CreateFormData } from \"./global\";\n\nexport enum OrganizedMarketCount {\n ONE = \"One\",\n TWO_TO_THREE = \"Two_to_Three\",\n FOUR_TO_FIVE = \"Four_to_Five\",\n MORE_THAN_FIVE = \"More_than_Five\",\n}\n\nexport enum VendorSellingFrequency {\n TWICE_A_WEEK = \"Two_to_Three_times_a_week\",\n ONCE_A_WEEK = \"Once_a_week\",\n ONE_TO_TWO_TIMES_A_MONTH = \"One_to_Two_times_a_month\",\n LESS_OFTEN = \"Less_often\",\n}\n\nexport enum OrganizerMarketFrequency {\n WEEKLY = \"Weekly\",\n FORTNIGHTLY = \"Fortnightly\",\n MONTHLY = \"Monthly\",\n SEASONAL = \"Seasonal\",\n}\n\nexport type TesterVendor = {\n categories: Category[];\n marketsAttended: { name: string; city: string }[];\n productsOrServices: string;\n sellingFrequency: VendorSellingFrequency;\n yearlySellingApprox: number;\n questionary: {\n appearInVideoIntroduction?: boolean; // Q15 (Yes / No)\n applyToAtLeastOneMarket: boolean; // Q11\n completeFeedbackQuestionnaire: boolean; // Q13\n excitementAboutApp?: string; // Q17\n sendPhotoForSocialMedia?: boolean; // Q14 (Yes / No)\n socialMediaFeatureReason?: string; // Q16 (optional free text)\n testingPeriodConcerns?: string; // Q19 (optional)\n tryVisitorFeatures: boolean; // Q12\n uploadStallProfileFirstWeek: boolean; // Q10\n usefulnessExpectations?: string; // Q18\n };\n};\n\nexport type TesterEvent = {\n /** Organizer background */\n organizedMarketCount: OrganizedMarketCount;\n markets: {\n name: string;\n cityOrVenue: string;\n frequency: OrganizerMarketFrequency;\n averageStallCount: number;\n }[];\n questionary: {\n allowMarketingAppearance?: boolean;\n completeFinalQuestionnaire: boolean;\n interestedInCharityInitiative?: boolean;\n inviteStallholders: boolean;\n manageApplicationsAndCommunication: boolean;\n completeMarketProfileFirstWeek: boolean;\n spaceForClueMart?: boolean;\n uploadStallList: boolean;\n organizerExpectations?: string;\n dailyCoordinationNeeds?: string;\n };\n};\n\nexport interface TesterFormData {\n businessName: string;\n consents: {\n privacyConsent: boolean;\n betaTestConsent: boolean;\n };\n email: string;\n event?: TesterEvent | null;\n firstName: string;\n lastName: string;\n mobilePhone: string;\n osType: EnumOSPlatform;\n region: string;\n resourceType: EnumResourceType;\n vendor?: TesterVendor | null;\n}\n\nexport type CreateTesterFormData = CreateFormData<TesterFormData>;\n\nexport interface TesterType extends TesterFormData {\n _id: string;\n active: boolean;\n approved: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n}\n","/* eslint-disable sort-keys */\nimport * as yup from \"yup\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport {\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n} from \"src/types/ad\";\n\nimport { socialMediaSchema } from \"./global\";\n\nexport const adSchema = yup.object().shape({\n active: yup.boolean().required(\"Active status is required\"),\n adStyle: yup\n .mixed<EnumAdStyle>()\n .oneOf(Object.values(EnumAdStyle), \"Please select a valid ad style\")\n .required(\"Ad style is required\"),\n adType: yup\n .mixed<EnumAdType>()\n .oneOf(Object.values(EnumAdType), \"Please select a valid ad type\")\n .required(\"Ad type is required\"),\n clui: yup.string().nullable().notRequired(),\n end: yup\n .date()\n .required(\"End date is required\")\n .test(\"is-future-date\", \"End date must be in the future\", (value) => {\n if (!value) return false;\n const endDate = new Date(value);\n const now = new Date();\n return endDate > now;\n })\n .when(\"start\", {\n is: (val: string) => val && val.length > 0,\n then: (schema) =>\n schema.test(\n \"is-after-start\",\n \"End date must be after start date\",\n function (value) {\n const { start } = this.parent;\n if (!value || !start) return false;\n return new Date(value) > new Date(start);\n },\n ),\n }),\n resourceCover: yup\n .string()\n .url(\"Resource cover must be a valid URL\")\n .required(\"Resource cover is required\"),\n resourceDescription: yup\n .string()\n .required(\"Resource description is required\"),\n resourceId: yup.string().required(\"Resource ID is required\"),\n resourceLogo: yup\n .string()\n .url(\"Resource logo must be a valid URL\")\n .nullable()\n .notRequired(),\n resourceName: yup.string().required(\"Resource name is required\"),\n resourceRegion: yup.string().required(\"Resource region is required\"),\n resourceType: yup\n .mixed<EnumResourceType>()\n .oneOf(Object.values(EnumResourceType), \"Please select Event or Vendor\")\n .required(\"Resource Type is required\"),\n showOn: yup\n .mixed<EnumAdShowOn>()\n .oneOf(\n Object.values(EnumAdShowOn),\n \"Please select a valid display location\",\n )\n .required(\"Display location is required\"),\n socialMedia: yup.array().of(socialMediaSchema).nullable().optional(),\n status: yup\n .mixed<EnumAdStatus>()\n .oneOf(Object.values(EnumAdStatus))\n .required(\"Ad status is required\"),\n start: yup.date().when(\"status\", {\n is: (status: EnumAdStatus) => status !== EnumAdStatus.ACTIVE,\n then: () =>\n yup\n .date()\n .required(\"Start date is required\")\n .test(\"is-future-date\", \"Start date must be in the future\", (value) => {\n if (!value) return false;\n return value > new Date();\n }),\n otherwise: () => yup.date().nullable().notRequired(),\n }),\n targetRegion: yup.string().nullable().notRequired(),\n});\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } 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 interface AdFormData {\n active: boolean;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clui?: string | null;\n end: Date; // ISO date string\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n showOn: EnumAdShowOn;\n socialMedia?: SocialMediaType[] | null;\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion?: string | null;\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\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 * as yup from \"yup\";\n\nimport { EnumPartnerType } from \"src/enums\";\n\nimport { globalResourceSchema, locationSchema, nzbnRegex } from \"./global\";\n\nexport const partnerSchema = globalResourceSchema.shape({\n location: locationSchema,\n nzbn: yup\n .string()\n .required(\"NZBN is required\")\n .matches(nzbnRegex, \"NZBN must be 13 digits and start with 94\"),\n partnerType: yup\n .mixed<EnumPartnerType>()\n .oneOf(Object.values(EnumPartnerType))\n .required(\"Please select a Partner type\"),\n});\n","import * as yup from \"yup\";\n\nimport {\n EnumPostContentType,\n EnumPostType,\n PostContentData,\n} from \"src/types/post\";\n\n/* ------------------------------------------------------------------ */\n/* Post content block schema */\n/* ------------------------------------------------------------------ */\n\nexport const postContentSchema = yup.object().shape({\n contentData: yup.mixed<PostContentData>().optional().nullable(),\n contentOrder: yup.number().nullable(),\n contentType: yup\n .mixed<EnumPostContentType>()\n .oneOf(Object.values(EnumPostContentType))\n .nullable(),\n});\n\n/* ------------------------------------------------------------------ */\n/* Final post schema */\n/* ------------------------------------------------------------------ */\n\nexport const postSchema = yup.object().shape({\n active: yup.boolean().required(),\n caption: yup.string().required(),\n content: yup.array().of(postContentSchema).required(),\n postType: yup\n .mixed<EnumPostType>()\n .oneOf(Object.values(EnumPostType))\n .required(),\n\n tags: yup.array().of(yup.string().required()).nullable().optional(),\n title: yup.string().required(),\n});\n","import { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_POLL = \"daily_poll\",\n}\n\nexport enum EnumPostContentType {\n COVER = \"cover\",\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 PostContentCover = {\n cover: ResourceImageType;\n coverUpload?: PostFileInput | null;\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 PostContentData =\n | PostContentCover\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 postType: EnumPostType;\n tags?: string[] | null;\n title: string;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\" | \"coverUpload\">;\n};\n\nexport type PostType = Omit<PostFormData, \"content\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n updatedAt: Date | null;\n};\n","import * as yup from \"yup\";\n\nexport const appSettingsSchema = yup.object({\n appVersion: yup\n .string()\n .trim()\n .label(\"App Version\")\n .matches(\n /^\\d+\\.\\d+\\.\\d+$/,\n \"App Version must be in the format X.Y.Z (e.g. 1.12.50)\",\n )\n .required(\"App Version is required\"),\n});\n","import {\n EnumEventType,\n EnumFoodFlavor,\n EnumPartnerType,\n EnumVendorType,\n} from \"src/enums\";\n\nimport {\n BaseResourceTypeFormData,\n EventFormData,\n EventInfoFormData,\n LocationType,\n PartnerFormData,\n UnregisteredVendorFormData,\n VendorFormData,\n VendorInfoFormData,\n} from \"../types\";\n\nconst defaultLocation: LocationType = {\n city: \"\",\n coordinates: [0, 0], // [longitude, latitude]\n country: \"\",\n fullAddress: \"\",\n latitude: 0,\n longitude: 0,\n region: \"\",\n type: \"Point\", // Default type for GeoJSON\n};\n\nexport const globalDefaultValues: BaseResourceTypeFormData = {\n active: false,\n associates: null,\n contactDetails: {\n email: null,\n landlinePhone: null,\n mobilePhone: null,\n },\n cover: {\n source: \"\",\n title: \"\",\n },\n coverUpload: {\n source: \"\",\n title: \"\",\n },\n description: \"\",\n images: null,\n imagesUpload: null,\n logo: null,\n logoUpload: null,\n name: \"\",\n promoCodes: [],\n region: \"\",\n socialMedia: [],\n};\n\nexport const defaultPartnerFormValues: PartnerFormData = {\n ...globalDefaultValues,\n location: defaultLocation,\n nzbn: \"\",\n partnerType: EnumPartnerType.CHARITY_PARTNER,\n};\n\nexport const defaultEventFormValues: EventFormData = {\n ...globalDefaultValues,\n dateTime: [],\n eventType: EnumEventType.MARKET,\n location: defaultLocation,\n nzbn: \"\",\n provider: null,\n rainOrShine: false,\n tags: [],\n};\n\nexport const defaultEventInfoFormValues: EventInfoFormData = {\n applicationDeadlineHours: 24,\n dateTime: [],\n eventId: \"\",\n packInTime: 2, // e.g., 2 hours before event opens\n paymentDueHours: 12,\n paymentInfo: [],\n requirements: [],\n};\n\nexport const defaultVendorFormValues: VendorFormData = {\n ...globalDefaultValues,\n availability: {\n corporate: false,\n private: false,\n school: false,\n },\n categories: [],\n foodTruck: false,\n locations: null,\n multiLocation: false,\n products: null,\n vendorType: EnumVendorType.STALLHOLDER,\n};\n\nexport const defaultUnregisteredVendorFormValues: UnregisteredVendorFormData = {\n categories: [],\n email: \"\",\n invitations: null,\n name: \"\",\n region: \"\",\n};\n\nexport const defaultVendorInfoFormValues: VendorInfoFormData = {\n compliance: { foodBeverageLicense: false, liabilityInsurance: false },\n documents: null,\n documentsUpload: null,\n product: {\n foodFlavors: [] as EnumFoodFlavor[],\n packaging: [],\n priceRange: { max: 0, min: 0 },\n producedIn: [],\n },\n requirements: {\n electricity: { details: null, isRequired: false },\n gazebo: { details: null, isRequired: false },\n table: { details: null, isRequired: false },\n },\n stallInfo: {\n size: { depth: 0, width: 0 },\n },\n vendorId: \"\",\n};\n\nexport function mapBaseResourceTypeToFormData(\n data: BaseResourceTypeFormData,\n): BaseResourceTypeFormData {\n return {\n _id: data._id,\n active: data.active,\n associates: data.associates,\n contactDetails: data.contactDetails,\n cover: data.cover,\n coverUpload: data.coverUpload,\n description: data.description,\n images: data.images,\n imagesUpload: data.imagesUpload,\n logo: data.logo,\n logoUpload: data.logoUpload,\n name: data.name,\n owner: data.owner,\n promoCodes: data.promoCodes,\n region: data.region,\n socialMedia: data.socialMedia,\n termsAgreement: data.termsAgreement,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateVendorInfoFormData,\n VendorInfoFormData,\n} from \"../../types/vendor\";\nimport { vendorInfoSchema } from \"../../yupSchema\";\nimport { defaultVendorInfoFormValues } from \"../utils\";\n\nexport function useVendorInfoForm(\n data?: VendorInfoFormData,\n): CreateVendorInfoFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<VendorInfoFormData>({\n defaultValues: defaultVendorInfoFormValues,\n resolver: yupResolver(vendorInfoSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n _id: data._id,\n compliance: data.compliance,\n documents: data.documents,\n documentsUpload: data.documentsUpload,\n product: data.product,\n requirements: data.requirements,\n stallInfo: data.stallInfo,\n vendorId: data.vendorId,\n });\n } else {\n reset(defaultVendorInfoFormValues);\n }\n }, [data]);\n\n const {\n _id,\n compliance,\n documents,\n documentsUpload,\n product,\n requirements,\n stallInfo,\n vendorId,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n compliance,\n documents,\n documentsUpload,\n product,\n requirements,\n stallInfo,\n vendorId,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateEventFormData, EventFormData } from \"../../types/event\";\nimport { eventSchema } from \"../../yupSchema\";\nimport {\n defaultEventFormValues,\n mapBaseResourceTypeToFormData,\n} from \"../utils\";\n\n/**\n * Custom hook to manage the event form state and validation.\n *\n * @param {EventFormData} data - The initial form data.\n * @returns {CreateEventFormData} - The form methods and state.\n */\nexport function useEventForm(data?: EventFormData): CreateEventFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<EventFormData>({\n defaultValues: defaultEventFormValues,\n resolver: yupResolver(eventSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n ...mapBaseResourceTypeToFormData(data),\n dateTime: data.dateTime,\n eventType: data.eventType,\n location: data.location,\n nzbn: data.nzbn,\n provider: data.provider,\n rainOrShine: data.rainOrShine,\n tags: data.tags,\n });\n } else {\n reset(defaultEventFormValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n dateTime,\n description,\n eventType,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n promoCodes,\n provider,\n rainOrShine,\n region,\n socialMedia,\n tags,\n termsAgreement,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n dateTime,\n description,\n eventType,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n promoCodes,\n provider,\n rainOrShine,\n region,\n socialMedia,\n tags,\n termsAgreement,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateEventInfoFormData, EventInfoFormData } from \"../../types/event\";\nimport { eventInfoSchema } from \"../../yupSchema\";\nimport { defaultEventInfoFormValues } from \"../utils\";\n\n/**\n * Custom hook to manage the event form state and validation.\n *\n * @param {EventInfoFormData} data - The initial form data.\n * @returns {CreateEventInfoFormData} - The form methods and state.\n */\nexport function useEventInfoForm(\n data?: EventInfoFormData,\n): CreateEventInfoFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<EventInfoFormData>({\n defaultValues: defaultEventInfoFormValues,\n resolver: yupResolver(eventInfoSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n _id: data._id,\n applicationDeadlineHours: data.applicationDeadlineHours,\n dateTime: data.dateTime,\n eventId: data.eventId,\n packInTime: data.packInTime,\n paymentDueHours: data.paymentDueHours,\n paymentInfo: data.paymentInfo,\n requirements: data.requirements,\n });\n } else {\n reset(defaultEventInfoFormValues);\n }\n }, [data]);\n\n const {\n _id,\n applicationDeadlineHours,\n dateTime,\n eventId,\n packInTime,\n paymentDueHours,\n paymentInfo,\n requirements,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n applicationDeadlineHours,\n dateTime,\n eventId,\n packInTime,\n paymentDueHours,\n paymentInfo,\n requirements,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { Resolver, useForm } from \"react-hook-form\";\n\nimport { EnumUserRole } from \"../enums\";\nimport { CreateUserFormData, UserFormData } from \"../types/user\";\nimport { userSchema } from \"../yupSchema/user\";\n\nconst defaultValues: UserFormData = {\n active: false,\n avatar: null,\n avatarUpload: null,\n confirmPassword: \"\",\n email: \"\",\n firstName: \"\",\n isTester: false,\n lastName: \"\",\n password: null,\n preferredRegion: \"\",\n role: EnumUserRole.CUSTOMER,\n};\n\n/**\n * Custom hook to manage the user form state and validation.\n *\n * @param {UserFormData} data - The initial form data.\n * @returns {CreateUserFormData} - The form methods and state.\n */\nexport function useUserForm(data?: UserFormData): CreateUserFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<UserFormData>({\n defaultValues,\n resolver: yupResolver(userSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n _id: data._id,\n active: data.active,\n avatar: data.avatar,\n avatarUpload: data.avatarUpload,\n email: data.email,\n firstName: data.firstName,\n isTester: data.isTester,\n lastName: data.lastName,\n password: data.password,\n preferredRegion: data.preferredRegion,\n role: data.role,\n termsAgreement: data.termsAgreement,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n avatar,\n avatarUpload,\n email,\n firstName,\n isTester,\n lastName,\n password,\n preferredRegion,\n role,\n termsAgreement,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n avatar,\n avatarUpload,\n email,\n firstName,\n isTester,\n lastName,\n password,\n preferredRegion,\n role,\n termsAgreement,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateLoginFormData, LoginFormData } from \"../../types/auth\";\nimport { loginSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: LoginFormData = {\n email: \"\",\n password: \"\",\n};\n\n/**\n * Custom hook to manage the login form state and validation.\n *\n * @returns {CreateLoginFormData} - The form methods and state.\n */\nexport function useLoginForm(): CreateLoginFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<LoginFormData>({\n defaultValues,\n resolver: yupResolver(loginSchema),\n });\n\n const { email, password } = getValues();\n\n return {\n control,\n fields: {\n email,\n password,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreateRegisterFormData, RegisterFormData } from \"../../types/auth\";\nimport { registerSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: RegisterFormData = {\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n password: \"\",\n preferredRegion: \"\",\n};\n\n/**\n * Custom hook to manage the register form state and validation.\n *\n * @returns {CreateRegisterFormData} - The form methods and state.\n */\nexport function useRegisterForm(): CreateRegisterFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<RegisterFormData>({\n defaultValues,\n resolver: yupResolver(registerSchema),\n });\n\n const { email, firstName, lastName, password, preferredRegion } = getValues();\n\n return {\n control,\n fields: {\n email,\n firstName,\n lastName,\n password,\n preferredRegion,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateRequestPasswordResetFormData,\n RequestPasswordResetFormData,\n} from \"../../types/auth\";\nimport { requestPasswordResetSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: RequestPasswordResetFormData = {\n email: \"\",\n};\n\nexport function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<RequestPasswordResetFormData>({\n defaultValues,\n resolver: yupResolver(requestPasswordResetSchema),\n });\n\n const { email } = getValues();\n\n return {\n control,\n fields: {\n email,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateValidateVerificationTokenFormData,\n ValidateVerificationTokenFormData,\n} from \"../../types/auth\";\nimport { validateVerificationTokenSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: ValidateVerificationTokenFormData = {\n email: \"\",\n verificationToken: \"\",\n};\n\nexport function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<ValidateVerificationTokenFormData>({\n defaultValues,\n resolver: yupResolver(validateVerificationTokenSchema),\n });\n\n const { email, verificationToken } = getValues();\n\n return {\n control,\n fields: {\n email,\n verificationToken,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n CreateResetPasswordFormData,\n ResetPasswordFormData,\n} from \"../../types/auth\";\nimport { resetPasswordSchema } from \"../../yupSchema/auth\";\n\nconst defaultValues: ResetPasswordFormData = {\n confirmPassword: \"\",\n email: \"\",\n password: \"\",\n};\n\nexport function useResetPasswordForm(): CreateResetPasswordFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<ResetPasswordFormData>({\n defaultValues,\n resolver: yupResolver(resetPasswordSchema),\n });\n\n const { confirmPassword, email, password } = getValues();\n\n return {\n control,\n fields: {\n confirmPassword,\n email,\n password,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { EnumOSPlatform, EnumResourceType } from \"src/enums\";\nimport { CreateTesterFormData, TesterFormData } from \"src/types/tester\";\nimport { testerSchema } from \"src/yupSchema/tester\";\n\nconst defaultValues = {\n businessName: \"\",\n consents: {\n betaTestConsent: false,\n privacyConsent: false,\n },\n email: \"\",\n event: {},\n firstName: \"\",\n lastName: \"\",\n mobilePhone: \"\",\n osType: \"\" as EnumOSPlatform,\n region: \"\",\n resourceType: \"\" as EnumResourceType,\n vendor: {},\n};\n\nexport function useTesterForm(data?: TesterFormData): CreateTesterFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<TesterFormData>({\n defaultValues,\n resolver: yupResolver(testerSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n businessName: data.businessName,\n consents: data.consents,\n email: data.email,\n event: data.event,\n firstName: data.firstName,\n lastName: data.lastName,\n mobilePhone: data.mobilePhone,\n osType: data.osType,\n region: data.region,\n resourceType: data.resourceType,\n vendor: data.vendor,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const {\n businessName,\n consents,\n email,\n event,\n firstName,\n lastName,\n mobilePhone,\n osType,\n region,\n resourceType,\n vendor,\n } = getValues();\n\n return {\n control,\n fields: {\n businessName,\n consents,\n email,\n event,\n firstName,\n lastName,\n mobilePhone,\n osType,\n region,\n resourceType,\n vendor,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n ContactUsFormData,\n CreateContactUsFormData,\n} from \"src/types/contactUs\";\nimport { contactUsSchema } from \"src/yupSchema/contactUs\";\n\nconst defaultValues = {\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n message: \"\",\n};\n\nexport function useContactUsForm(\n data?: ContactUsFormData,\n): CreateContactUsFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<ContactUsFormData>({\n defaultValues,\n resolver: yupResolver(contactUsSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n email: data.email,\n firstName: data.firstName,\n lastName: data.lastName,\n message: data.message,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const { email, firstName, lastName, message } = getValues();\n\n return {\n control,\n fields: {\n email,\n firstName,\n lastName,\n message,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import * as yup from \"yup\";\n\nimport { emailRequiredSchema } from \"./global\";\n\nexport const contactUsSchema = yup.object().shape({\n email: emailRequiredSchema,\n firstName: yup\n .string()\n .label(\"First Name\")\n .required(\"First name is required\"),\n lastName: yup.string().label(\"Last Name\").required(\"Last name is required\"),\n message: yup.string().label(\"Message\").required(\"Message is required\"),\n});\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { Resolver, useForm } from \"react-hook-form\";\n\nimport { EnumResourceType } from \"src/enums\";\nimport {\n AdFormData,\n CreateAdFormData,\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n} from \"src/types/ad\";\nimport { adSchema } from \"src/yupSchema\";\n\nconst defaultValues: AdFormData = {\n active: true,\n adStyle: EnumAdStyle.BLOOM, // default to bloom\n adType: EnumAdType.SPONSORED, // default to sponsored\n clui: null,\n end: new Date(),\n resourceCover: \"\",\n resourceDescription: \"\",\n resourceId: \"\",\n resourceLogo: null,\n resourceName: \"\",\n resourceRegion: \"\",\n resourceType: \"\" as EnumResourceType.EVENT, // default to event\n showOn: EnumAdShowOn.FRONT_PAGE, // default to front page\n socialMedia: [],\n start: new Date(),\n status: EnumAdStatus.PAUSED, // default to paused\n targetRegion: null,\n};\n\nexport function useAdForm(data?: AdFormData): CreateAdFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<AdFormData>({\n defaultValues: defaultValues,\n resolver: yupResolver(adSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n active: data.active,\n adStyle: data.adStyle,\n adType: data.adType,\n clui: data.clui,\n end: data.end,\n resourceCover: data.resourceCover,\n resourceDescription: data.resourceDescription,\n resourceId: data.resourceId,\n resourceLogo: data.resourceLogo,\n resourceName: data.resourceName,\n resourceRegion: data.resourceRegion,\n resourceType: data.resourceType,\n socialMedia: data.socialMedia,\n start: data.start,\n status: data.status,\n targetRegion: data.targetRegion,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const {\n active,\n adStyle,\n adType,\n clui,\n end,\n resourceCover,\n resourceDescription,\n resourceId,\n resourceLogo,\n resourceName,\n resourceRegion,\n resourceType,\n showOn,\n socialMedia,\n start,\n status,\n targetRegion,\n } = getValues();\n\n return {\n control,\n fields: {\n active,\n adStyle,\n adType,\n clui,\n end,\n resourceCover,\n resourceDescription,\n resourceId,\n resourceLogo,\n resourceName,\n resourceRegion,\n resourceType,\n showOn,\n socialMedia,\n start,\n status,\n targetRegion,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreatePartnerFormData, PartnerFormData } from \"src/types/partner\";\nimport { partnerSchema } from \"src/yupSchema/partner\";\n\nimport {\n defaultPartnerFormValues,\n mapBaseResourceTypeToFormData,\n} from \"../utils\";\n\n/**\n * Custom hook to manage the partner form state and validation.\n *\n * @param {PartnerFormData} data - The initial form data.\n * @returns {CreatePartnerFormData} - The form methods and state.\n */\nexport function usePartnerForm(data?: PartnerFormData): CreatePartnerFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<PartnerFormData>({\n defaultValues: defaultPartnerFormValues,\n resolver: yupResolver(partnerSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n ...mapBaseResourceTypeToFormData(data),\n location: data.location,\n nzbn: data.nzbn,\n partnerType: data.partnerType,\n });\n } else {\n reset(defaultPartnerFormValues);\n }\n }, [data]);\n\n const {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n description,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n partnerType,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n } = getValues();\n\n return {\n control,\n fields: {\n _id,\n active,\n associates,\n contactDetails,\n cover,\n coverUpload,\n description,\n images,\n imagesUpload,\n location,\n logo,\n logoUpload,\n name,\n nzbn,\n owner,\n partnerType,\n promoCodes,\n region,\n socialMedia,\n termsAgreement,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { CreatePostFormData, EnumPostType, PostFormData } from \"src/types/post\";\nimport { postSchema } from \"src/yupSchema/post\";\n\nconst defaultValues: PostFormData = {\n active: true,\n caption: \"\",\n content: [],\n postType: EnumPostType.DAILY_MEETS,\n tags: [],\n title: \"\",\n};\n\nexport function usePostForm(data?: PostFormData): CreatePostFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<PostFormData>({\n defaultValues,\n resolver: yupResolver(postSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n active: data.active,\n caption: data.caption,\n content: data.content,\n postType: data.postType,\n tags: data.tags,\n title: data.title,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const { active, caption, content, postType, tags, title } = getValues();\n\n return {\n control,\n fields: {\n active,\n caption,\n content,\n postType,\n tags,\n title,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\n}\n","import { yupResolver } from \"@hookform/resolvers/yup\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport {\n AppSettingsFormData,\n CreateAppSettingsFormData,\n} from \"src/types/appSettings\";\nimport { appSettingsSchema } from \"src/yupSchema/appSettings\";\n\nconst defaultValues = {\n appVersion: \"\",\n};\n\nexport function useAppSettingsForm(\n data?: AppSettingsFormData,\n): CreateAppSettingsFormData {\n const {\n control,\n formState,\n getValues,\n handleSubmit,\n reset,\n setValue,\n watch,\n } = useForm<AppSettingsFormData>({\n defaultValues,\n resolver: yupResolver(appSettingsSchema),\n });\n\n React.useEffect(() => {\n if (data) {\n reset({\n appVersion: data.appVersion,\n });\n } else {\n reset(defaultValues);\n }\n }, [data]);\n\n const { appVersion } = getValues();\n\n return {\n control,\n fields: {\n appVersion,\n },\n formState,\n handleSubmit,\n reset,\n setValue,\n watch,\n };\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: \"#ff7a00\",\n quaternary: \"#3b7c67\",\n secondary: \"#371134\",\n tertiary: \"#191a75\",\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 EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\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: {\n type: \"Point\";\n coordinates: number[]; // [longitude, latitude]\n } | 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: string;\n activity: Omit<ResourceActivityEntry, \"timestamp\">;\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","export 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 */\nexport function isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","export 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","import { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\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","import { getLocation } from './location.mjs';\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\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 */\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","import { 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 /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\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 /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\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 get [Symbol.toStringTag]() {\n return 'GraphQLError';\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 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/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\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.\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","import { 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 */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\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 /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\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 get [Symbol.toStringTag]() {\n return 'Location';\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 /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\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 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 get [Symbol.toStringTag]() {\n return 'Token';\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/**\n * The list of all possible AST node types.\n */\n\n/**\n * @internal\n */\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: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\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/**\n * @internal\n */\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/** Name */\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","/**\n * The set of allowed directive location values.\n */\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 || (DirectiveLocation = {}));\n\nexport { DirectiveLocation };\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","/**\n * The set of allowed kind values for AST nodes.\n */\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['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 * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\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/**\n * @internal\n */\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","/**\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 * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","import { 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 /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\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 get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\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 */\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/**\n * @internal\n */\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\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\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\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\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\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\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\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\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\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\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\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\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\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","import { 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 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 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","import { 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/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\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 */\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 */\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 */\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 */\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\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\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\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\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\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\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\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\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\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\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\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\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\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\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\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\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\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\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 */\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 }\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\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\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\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\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\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\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\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 * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\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 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 repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\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 */\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 */\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\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\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\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\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\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\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\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\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\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\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\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\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\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 experimentalFragmentVariables,\n allowLegacyFragmentVariables: 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 { getter, forEach, split, normalizePath, join } from 'property-expr';\nimport { camelCase, snakeCase } from 'tiny-case';\nimport toposort from 'toposort';\n\nconst toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && 1 / val < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\nfunction printSimpleValue(val, quoteStrings = false) {\n if (val == null || val === true || val === false) return '' + val;\n const typeOf = typeof val;\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n const tag = toString.call(val).slice(8, -1);\n if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n if (tag === 'RegExp') return regExpToString.call(val);\n return null;\n}\nfunction printValue(value, quoteStrings) {\n let result = printSimpleValue(value, quoteStrings);\n if (result !== null) return result;\n return JSON.stringify(value, function (key, value) {\n let result = printSimpleValue(this[key], quoteStrings);\n if (result !== null) return result;\n return value;\n }, 2);\n}\n\nfunction toArray(value) {\n return value == null ? [] : [].concat(value);\n}\n\nlet _Symbol$toStringTag, _Symbol$hasInstance, _Symbol$toStringTag2;\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\n_Symbol$toStringTag = Symbol.toStringTag;\nclass ValidationErrorNoStack {\n constructor(errorOrErrors, value, field, type) {\n this.name = void 0;\n this.message = void 0;\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.params = void 0;\n this.errors = void 0;\n this.inner = void 0;\n this[_Symbol$toStringTag] = 'Error';\n this.name = 'ValidationError';\n this.value = value;\n this.path = field;\n this.type = type;\n this.errors = [];\n this.inner = [];\n toArray(errorOrErrors).forEach(err => {\n if (ValidationError.isError(err)) {\n this.errors.push(...err.errors);\n const innerErrors = err.inner.length ? err.inner : [err];\n this.inner.push(...innerErrors);\n } else {\n this.errors.push(err);\n }\n });\n this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n }\n}\n_Symbol$hasInstance = Symbol.hasInstance;\n_Symbol$toStringTag2 = Symbol.toStringTag;\nclass ValidationError extends Error {\n static formatError(message, params) {\n // Attempt to make the path more friendly for error message interpolation.\n const path = params.label || params.path || 'this';\n // Store the original path under `originalPath` so it isn't lost to custom\n // message functions; e.g., ones provided in `setLocale()` calls.\n params = Object.assign({}, params, {\n path,\n originalPath: params.path\n });\n if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n if (typeof message === 'function') return message(params);\n return message;\n }\n static isError(err) {\n return err && err.name === 'ValidationError';\n }\n constructor(errorOrErrors, value, field, type, disableStack) {\n const errorNoStack = new ValidationErrorNoStack(errorOrErrors, value, field, type);\n if (disableStack) {\n return errorNoStack;\n }\n super();\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.params = void 0;\n this.errors = [];\n this.inner = [];\n this[_Symbol$toStringTag2] = 'Error';\n this.name = errorNoStack.name;\n this.message = errorNoStack.message;\n this.type = errorNoStack.type;\n this.value = errorNoStack.value;\n this.path = errorNoStack.path;\n this.errors = errorNoStack.errors;\n this.inner = errorNoStack.inner;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ValidationError);\n }\n }\n static [_Symbol$hasInstance](inst) {\n return ValidationErrorNoStack[Symbol.hasInstance](inst) || super[Symbol.hasInstance](inst);\n }\n}\n\nlet mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n defined: '${path} must be defined',\n notNull: '${path} cannot be null',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: ({\n path,\n type,\n value,\n originalValue\n }) => {\n const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.';\n return type !== 'mixed' ? `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + castMsg : `${path} must match the configured type. ` + `The validated value was: \\`${printValue(value, true)}\\`` + castMsg;\n }\n};\nlet string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n uuid: '${path} must be a valid UUID',\n datetime: '${path} must be a valid ISO date-time',\n datetime_precision: '${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits',\n datetime_offset: '${path} must be a valid ISO date-time with UTC \"Z\" timezone',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nlet number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nlet date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nlet boolean = {\n isValue: '${path} field must be ${value}'\n};\nlet object = {\n noUnknown: '${path} field has unspecified keys: ${unknown}',\n exact: '${path} object contains unknown properties: ${properties}'\n};\nlet array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items',\n length: '${path} must have ${length} items'\n};\nlet tuple = {\n notType: params => {\n const {\n path,\n value,\n spec\n } = params;\n const typeLen = spec.types.length;\n if (Array.isArray(value)) {\n if (value.length < typeLen) return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n if (value.length > typeLen) return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n }\n return ValidationError.formatError(mixed.notType, params);\n }\n};\nvar locale = Object.assign(Object.create(null), {\n mixed,\n string,\n number,\n date,\n object,\n array,\n boolean,\n tuple\n});\n\nconst isSchema = obj => obj && obj.__isYupSchema__;\n\nclass Condition {\n static fromOptions(refs, config) {\n if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n let {\n is,\n then,\n otherwise\n } = config;\n let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n return new Condition(refs, (values, schema) => {\n var _branch;\n let branch = check(...values) ? then : otherwise;\n return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;\n });\n }\n constructor(refs, builder) {\n this.fn = void 0;\n this.refs = refs;\n this.refs = refs;\n this.fn = builder;\n }\n resolve(base, options) {\n let values = this.refs.map(ref =>\n // TODO: ? operator here?\n ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n let schema = this.fn(values, base, options);\n if (schema === undefined ||\n // @ts-ignore this can be base\n schema === base) {\n return base;\n }\n if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n return schema.resolve(options);\n }\n}\n\nconst prefixes = {\n context: '$',\n value: '.'\n};\nfunction create$9(key, options) {\n return new Reference(key, options);\n}\nclass Reference {\n constructor(key, options = {}) {\n this.key = void 0;\n this.isContext = void 0;\n this.isValue = void 0;\n this.isSibling = void 0;\n this.path = void 0;\n this.getter = void 0;\n this.map = void 0;\n if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n this.key = key.trim();\n if (key === '') throw new TypeError('ref must be a non-empty string');\n this.isContext = this.key[0] === prefixes.context;\n this.isValue = this.key[0] === prefixes.value;\n this.isSibling = !this.isContext && !this.isValue;\n let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n this.path = this.key.slice(prefix.length);\n this.getter = this.path && getter(this.path, true);\n this.map = options.map;\n }\n getValue(value, parent, context) {\n let result = this.isContext ? context : this.isValue ? value : parent;\n if (this.getter) result = this.getter(result || {});\n if (this.map) result = this.map(result);\n return result;\n }\n\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {Object=} options.context\n * @param {Object=} options.parent\n */\n cast(value, options) {\n return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n }\n resolve() {\n return this;\n }\n describe() {\n return {\n type: 'ref',\n key: this.key\n };\n }\n toString() {\n return `Ref(${this.key})`;\n }\n static isRef(value) {\n return value && value.__isYupRef;\n }\n}\n\n// @ts-ignore\nReference.prototype.__isYupRef = true;\n\nconst isAbsent = value => value == null;\n\nfunction createValidation(config) {\n function validate({\n value,\n path = '',\n options,\n originalValue,\n schema\n }, panic, next) {\n const {\n name,\n test,\n params,\n message,\n skipAbsent\n } = config;\n let {\n parent,\n context,\n abortEarly = schema.spec.abortEarly,\n disableStackTrace = schema.spec.disableStackTrace\n } = options;\n const resolveOptions = {\n value,\n parent,\n context\n };\n function createError(overrides = {}) {\n const nextParams = resolveParams(Object.assign({\n value,\n originalValue,\n label: schema.spec.label,\n path: overrides.path || path,\n spec: schema.spec,\n disableStackTrace: overrides.disableStackTrace || disableStackTrace\n }, params, overrides.params), resolveOptions);\n const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);\n error.params = nextParams;\n return error;\n }\n const invalid = abortEarly ? panic : next;\n let ctx = {\n path,\n parent,\n type: name,\n from: options.from,\n createError,\n resolve(item) {\n return resolveMaybeRef(item, resolveOptions);\n },\n options,\n originalValue,\n schema\n };\n const handleResult = validOrError => {\n if (ValidationError.isError(validOrError)) invalid(validOrError);else if (!validOrError) invalid(createError());else next(null);\n };\n const handleError = err => {\n if (ValidationError.isError(err)) invalid(err);else panic(err);\n };\n const shouldSkip = skipAbsent && isAbsent(value);\n if (shouldSkip) {\n return handleResult(true);\n }\n let result;\n try {\n var _result;\n result = test.call(ctx, value, ctx);\n if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {\n if (options.sync) {\n throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n }\n return Promise.resolve(result).then(handleResult, handleError);\n }\n } catch (err) {\n handleError(err);\n return;\n }\n handleResult(result);\n }\n validate.OPTIONS = config;\n return validate;\n}\n\n// Warning: mutates the input\nfunction resolveParams(params, options) {\n if (!params) return params;\n for (const key of Object.keys(params)) {\n params[key] = resolveMaybeRef(params[key], options);\n }\n return params;\n}\nfunction resolveMaybeRef(item, options) {\n return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;\n}\n\nfunction getIn(schema, path, value, context = value) {\n let parent, lastPart, lastPartDebug;\n\n // root path: ''\n if (!path) return {\n parent,\n parentPath: path,\n schema\n };\n forEach(path, (_part, isBracket, isArray) => {\n let part = isBracket ? _part.slice(1, _part.length - 1) : _part;\n schema = schema.resolve({\n context,\n parent,\n value\n });\n let isTuple = schema.type === 'tuple';\n let idx = isArray ? parseInt(part, 10) : 0;\n if (schema.innerType || isTuple) {\n if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part \"${lastPartDebug}\" must contain an index to the tuple element, e.g. \"${lastPartDebug}[0]\"`);\n if (value && idx >= value.length) {\n throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n }\n parent = value;\n value = value && value[idx];\n schema = isTuple ? schema.spec.types[idx] : schema.innerType;\n }\n\n // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n // in these cases the current part is the next schema and should be processed\n // in this iteration. For cases where the index signature is included this\n // check will fail and we'll handle the `child` part on the next iteration like normal\n if (!isArray) {\n if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema.type}\")`);\n parent = value;\n value = value && value[part];\n schema = schema.fields[part];\n }\n lastPart = part;\n lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n });\n return {\n schema,\n parent,\n parentPath: lastPart\n };\n}\nfunction reach(obj, path, value, context) {\n return getIn(obj, path, value, context).schema;\n}\n\nclass ReferenceSet extends Set {\n describe() {\n const description = [];\n for (const item of this.values()) {\n description.push(Reference.isRef(item) ? item.describe() : item);\n }\n return description;\n }\n resolveAll(resolve) {\n let result = [];\n for (const item of this.values()) {\n result.push(resolve(item));\n }\n return result;\n }\n clone() {\n return new ReferenceSet(this.values());\n }\n merge(newItems, removeItems) {\n const next = this.clone();\n newItems.forEach(value => next.add(value));\n removeItems.forEach(value => next.delete(value));\n return next;\n }\n}\n\n// tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js\nfunction clone(src, seen = new Map()) {\n if (isSchema(src) || !src || typeof src !== 'object') return src;\n if (seen.has(src)) return seen.get(src);\n let copy;\n if (src instanceof Date) {\n // Date\n copy = new Date(src.getTime());\n seen.set(src, copy);\n } else if (src instanceof RegExp) {\n // RegExp\n copy = new RegExp(src);\n seen.set(src, copy);\n } else if (Array.isArray(src)) {\n // Array\n copy = new Array(src.length);\n seen.set(src, copy);\n for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);\n } else if (src instanceof Map) {\n // Map\n copy = new Map();\n seen.set(src, copy);\n for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));\n } else if (src instanceof Set) {\n // Set\n copy = new Set();\n seen.set(src, copy);\n for (const v of src) copy.add(clone(v, seen));\n } else if (src instanceof Object) {\n // Object\n copy = {};\n seen.set(src, copy);\n for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);\n } else {\n throw Error(`Unable to clone ${src}`);\n }\n return copy;\n}\n\n/**\n * Copied from @standard-schema/spec to avoid having a dependency on it.\n * https://github.com/standard-schema/standard-schema/blob/main/packages/spec/src/index.ts\n */\n\nfunction createStandardPath(path) {\n if (!(path != null && path.length)) {\n return undefined;\n }\n\n // Array to store the final path segments\n const segments = [];\n // Buffer for building the current segment\n let currentSegment = '';\n // Track if we're inside square brackets (array/property access)\n let inBrackets = false;\n // Track if we're inside quotes (for property names with special chars)\n let inQuotes = false;\n for (let i = 0; i < path.length; i++) {\n const char = path[i];\n if (char === '[' && !inQuotes) {\n // When entering brackets, push any accumulated segment after splitting on dots\n if (currentSegment) {\n segments.push(...currentSegment.split('.').filter(Boolean));\n currentSegment = '';\n }\n inBrackets = true;\n continue;\n }\n if (char === ']' && !inQuotes) {\n if (currentSegment) {\n // Handle numeric indices (e.g. arr[0])\n if (/^\\d+$/.test(currentSegment)) {\n segments.push(currentSegment);\n } else {\n // Handle quoted property names (e.g. obj[\"foo.bar\"])\n segments.push(currentSegment.replace(/^\"|\"$/g, ''));\n }\n currentSegment = '';\n }\n inBrackets = false;\n continue;\n }\n if (char === '\"') {\n // Toggle quote state for handling quoted property names\n inQuotes = !inQuotes;\n continue;\n }\n if (char === '.' && !inBrackets && !inQuotes) {\n // On dots outside brackets/quotes, push current segment\n if (currentSegment) {\n segments.push(currentSegment);\n currentSegment = '';\n }\n continue;\n }\n currentSegment += char;\n }\n\n // Push any remaining segment after splitting on dots\n if (currentSegment) {\n segments.push(...currentSegment.split('.').filter(Boolean));\n }\n return segments;\n}\nfunction createStandardIssues(error, parentPath) {\n const path = parentPath ? `${parentPath}.${error.path}` : error.path;\n return error.errors.map(err => ({\n message: err,\n path: createStandardPath(path)\n }));\n}\nfunction issuesFromValidationError(error, parentPath) {\n var _error$inner;\n if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {\n return createStandardIssues(error, parentPath);\n }\n const path = parentPath ? `${parentPath}.${error.path}` : error.path;\n return error.inner.flatMap(err => issuesFromValidationError(err, path));\n}\n\n// If `CustomSchemaMeta` isn't extended with any keys, we'll fall back to a\n// loose Record definition allowing free form usage.\nclass Schema {\n constructor(options) {\n this.type = void 0;\n this.deps = [];\n this.tests = void 0;\n this.transforms = void 0;\n this.conditions = [];\n this._mutate = void 0;\n this.internalTests = {};\n this._whitelist = new ReferenceSet();\n this._blacklist = new ReferenceSet();\n this.exclusiveTests = Object.create(null);\n this._typeCheck = void 0;\n this.spec = void 0;\n this.tests = [];\n this.transforms = [];\n this.withMutation(() => {\n this.typeError(mixed.notType);\n });\n this.type = options.type;\n this._typeCheck = options.check;\n this.spec = Object.assign({\n strip: false,\n strict: false,\n abortEarly: true,\n recursive: true,\n disableStackTrace: false,\n nullable: false,\n optional: true,\n coerce: true\n }, options == null ? void 0 : options.spec);\n this.withMutation(s => {\n s.nonNullable();\n });\n }\n\n // TODO: remove\n get _type() {\n return this.type;\n }\n clone(spec) {\n if (this._mutate) {\n if (spec) Object.assign(this.spec, spec);\n return this;\n }\n\n // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n const next = Object.create(Object.getPrototypeOf(this));\n\n // @ts-expect-error this is readonly\n next.type = this.type;\n next._typeCheck = this._typeCheck;\n next._whitelist = this._whitelist.clone();\n next._blacklist = this._blacklist.clone();\n next.internalTests = Object.assign({}, this.internalTests);\n next.exclusiveTests = Object.assign({}, this.exclusiveTests);\n\n // @ts-expect-error this is readonly\n next.deps = [...this.deps];\n next.conditions = [...this.conditions];\n next.tests = [...this.tests];\n next.transforms = [...this.transforms];\n next.spec = clone(Object.assign({}, this.spec, spec));\n return next;\n }\n label(label) {\n let next = this.clone();\n next.spec.label = label;\n return next;\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n withMutation(fn) {\n let before = this._mutate;\n this._mutate = true;\n let result = fn(this);\n this._mutate = before;\n return result;\n }\n concat(schema) {\n if (!schema || schema === this) return this;\n if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n let base = this;\n let combined = schema.clone();\n const mergedSpec = Object.assign({}, base.spec, combined.spec);\n combined.spec = mergedSpec;\n combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);\n\n // manually merge the blacklist/whitelist (the other `schema` takes\n // precedence in case of conflicts)\n combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);\n\n // start with the current tests\n combined.tests = base.tests;\n combined.exclusiveTests = base.exclusiveTests;\n\n // manually add the new tests to ensure\n // the deduping logic is consistent\n combined.withMutation(next => {\n schema.tests.forEach(fn => {\n next.test(fn.OPTIONS);\n });\n });\n combined.transforms = [...base.transforms, ...combined.transforms];\n return combined;\n }\n isType(v) {\n if (v == null) {\n if (this.spec.nullable && v === null) return true;\n if (this.spec.optional && v === undefined) return true;\n return false;\n }\n return this._typeCheck(v);\n }\n resolve(options) {\n let schema = this;\n if (schema.conditions.length) {\n let conditions = schema.conditions;\n schema = schema.clone();\n schema.conditions = [];\n schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);\n schema = schema.resolve(options);\n }\n return schema;\n }\n resolveOptions(options) {\n var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;\n return Object.assign({}, options, {\n from: options.from || [],\n strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,\n abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,\n recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive,\n disableStackTrace: (_options$disableStack = options.disableStackTrace) != null ? _options$disableStack : this.spec.disableStackTrace\n });\n }\n\n /**\n * Run the configured transform pipeline over an input value.\n */\n\n cast(value, options = {}) {\n let resolvedSchema = this.resolve(Object.assign({}, options, {\n value\n // parent: options.parent,\n // context: options.context,\n }));\n\n let allowOptionality = options.assert === 'ignore-optionality';\n let result = resolvedSchema._cast(value, options);\n if (options.assert !== false && !resolvedSchema.isType(result)) {\n if (allowOptionality && isAbsent(result)) {\n return result;\n }\n let formattedValue = printValue(value);\n let formattedResult = printValue(result);\n throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema.type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n }\n return result;\n }\n _cast(rawValue, options) {\n let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);\n if (value === undefined) {\n value = this.getDefault(options);\n }\n return value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n path,\n originalValue = _value,\n strict = this.spec.strict\n } = options;\n let value = _value;\n if (!strict) {\n value = this._cast(value, Object.assign({\n assert: false\n }, options));\n }\n let initialTests = [];\n for (let test of Object.values(this.internalTests)) {\n if (test) initialTests.push(test);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: initialTests\n }, panic, initialErrors => {\n // even if we aren't ending early we can't proceed further if the types aren't correct\n if (initialErrors.length) {\n return next(initialErrors, value);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: this.tests\n }, panic, next);\n });\n }\n\n /**\n * Executes a set of validations, either schema, produced Tests or a nested\n * schema validate result.\n */\n runTests(runOptions, panic, next) {\n let fired = false;\n let {\n tests,\n value,\n originalValue,\n path,\n options\n } = runOptions;\n let panicOnce = arg => {\n if (fired) return;\n fired = true;\n panic(arg, value);\n };\n let nextOnce = arg => {\n if (fired) return;\n fired = true;\n next(arg, value);\n };\n let count = tests.length;\n let nestedErrors = [];\n if (!count) return nextOnce([]);\n let args = {\n value,\n originalValue,\n path,\n options,\n schema: this\n };\n for (let i = 0; i < tests.length; i++) {\n const test = tests[i];\n test(args, panicOnce, function finishTestRun(err) {\n if (err) {\n Array.isArray(err) ? nestedErrors.push(...err) : nestedErrors.push(err);\n }\n if (--count <= 0) {\n nextOnce(nestedErrors);\n }\n });\n }\n }\n asNestedTest({\n key,\n index,\n parent,\n parentPath,\n originalParent,\n options\n }) {\n const k = key != null ? key : index;\n if (k == null) {\n throw TypeError('Must include `key` or `index` for nested validations');\n }\n const isIndex = typeof k === 'number';\n let value = parent[k];\n const testOptions = Object.assign({}, options, {\n // Nested validations fields are always strict:\n // 1. parent isn't strict so the casting will also have cast inner values\n // 2. parent is strict in which case the nested values weren't cast either\n strict: true,\n parent,\n value,\n originalValue: originalParent[k],\n // FIXME: tests depend on `index` being passed around deeply,\n // we should not let the options.key/index bleed through\n key: undefined,\n // index: undefined,\n [isIndex ? 'index' : 'key']: k,\n path: isIndex || k.includes('.') ? `${parentPath || ''}[${isIndex ? k : `\"${k}\"`}]` : (parentPath ? `${parentPath}.` : '') + key\n });\n return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);\n }\n validate(value, options) {\n var _options$disableStack2;\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema.spec.disableStackTrace;\n return new Promise((resolve, reject) => schema._validate(value, options, (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n reject(error);\n }, (errors, validated) => {\n if (errors.length) reject(new ValidationError(errors, validated, undefined, undefined, disableStackTrace));else resolve(validated);\n }));\n }\n validateSync(value, options) {\n var _options$disableStack3;\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n let result;\n let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema.spec.disableStackTrace;\n schema._validate(value, Object.assign({}, options, {\n sync: true\n }), (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n throw error;\n }, (errors, validated) => {\n if (errors.length) throw new ValidationError(errors, value, undefined, undefined, disableStackTrace);\n result = validated;\n });\n return result;\n }\n isValid(value, options) {\n return this.validate(value, options).then(() => true, err => {\n if (ValidationError.isError(err)) return false;\n throw err;\n });\n }\n isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (ValidationError.isError(err)) return false;\n throw err;\n }\n }\n _getDefault(options) {\n let defaultValue = this.spec.default;\n if (defaultValue == null) {\n return defaultValue;\n }\n return typeof defaultValue === 'function' ? defaultValue.call(this, options) : clone(defaultValue);\n }\n getDefault(options\n // If schema is defaulted we know it's at least not undefined\n ) {\n let schema = this.resolve(options || {});\n return schema._getDefault(options);\n }\n default(def) {\n if (arguments.length === 0) {\n return this._getDefault();\n }\n let next = this.clone({\n default: def\n });\n return next;\n }\n strict(isStrict = true) {\n return this.clone({\n strict: isStrict\n });\n }\n nullability(nullable, message) {\n const next = this.clone({\n nullable\n });\n next.internalTests.nullable = createValidation({\n message,\n name: 'nullable',\n test(value) {\n return value === null ? this.schema.spec.nullable : true;\n }\n });\n return next;\n }\n optionality(optional, message) {\n const next = this.clone({\n optional\n });\n next.internalTests.optionality = createValidation({\n message,\n name: 'optionality',\n test(value) {\n return value === undefined ? this.schema.spec.optional : true;\n }\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n defined(message = mixed.defined) {\n return this.optionality(false, message);\n }\n nullable() {\n return this.nullability(true);\n }\n nonNullable(message = mixed.notNull) {\n return this.nullability(false, message);\n }\n required(message = mixed.required) {\n return this.clone().withMutation(next => next.nonNullable(message).defined(message));\n }\n notRequired() {\n return this.clone().withMutation(next => next.nullable().optional());\n }\n transform(fn) {\n let next = this.clone();\n next.transforms.push(fn);\n return next;\n }\n\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n\n test(...args) {\n let opts;\n if (args.length === 1) {\n if (typeof args[0] === 'function') {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n if (opts.message === undefined) opts.message = mixed.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n let next = this.clone();\n let validate = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n if (opts.exclusive) {\n if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(fn => {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n return true;\n });\n next.tests.push(validate);\n return next;\n }\n when(keys, options) {\n if (!Array.isArray(keys) && typeof keys !== 'string') {\n options = keys;\n keys = '.';\n }\n let next = this.clone();\n let deps = toArray(keys).map(key => new Reference(key));\n deps.forEach(dep => {\n // @ts-ignore readonly array\n if (dep.isSibling) next.deps.push(dep.key);\n });\n next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));\n return next;\n }\n typeError(message) {\n let next = this.clone();\n next.internalTests.typeError = createValidation({\n message,\n name: 'typeError',\n skipAbsent: true,\n test(value) {\n if (!this.schema._typeCheck(value)) return this.createError({\n params: {\n type: this.schema.type\n }\n });\n return true;\n }\n });\n return next;\n }\n oneOf(enums, message = mixed.oneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._whitelist.add(val);\n next._blacklist.delete(val);\n });\n next.internalTests.whiteList = createValidation({\n message,\n name: 'oneOf',\n skipAbsent: true,\n test(value) {\n let valids = this.schema._whitelist;\n let resolved = valids.resolveAll(this.resolve);\n return resolved.includes(value) ? true : this.createError({\n params: {\n values: Array.from(valids).join(', '),\n resolved\n }\n });\n }\n });\n return next;\n }\n notOneOf(enums, message = mixed.notOneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._blacklist.add(val);\n next._whitelist.delete(val);\n });\n next.internalTests.blacklist = createValidation({\n message,\n name: 'notOneOf',\n test(value) {\n let invalids = this.schema._blacklist;\n let resolved = invalids.resolveAll(this.resolve);\n if (resolved.includes(value)) return this.createError({\n params: {\n values: Array.from(invalids).join(', '),\n resolved\n }\n });\n return true;\n }\n });\n return next;\n }\n strip(strip = true) {\n let next = this.clone();\n next.spec.strip = strip;\n return next;\n }\n\n /**\n * Return a serialized description of the schema including validations, flags, types etc.\n *\n * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).\n */\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const {\n label,\n meta,\n optional,\n nullable\n } = next.spec;\n const description = {\n meta,\n label,\n optional,\n nullable,\n default: next.getDefault(options),\n type: next.type,\n oneOf: next._whitelist.describe(),\n notOneOf: next._blacklist.describe(),\n tests: next.tests.filter((n, idx, list) => list.findIndex(c => c.OPTIONS.name === n.OPTIONS.name) === idx).map(fn => {\n const params = fn.OPTIONS.params && options ? resolveParams(Object.assign({}, fn.OPTIONS.params), options) : fn.OPTIONS.params;\n return {\n name: fn.OPTIONS.name,\n params\n };\n })\n };\n return description;\n }\n get ['~standard']() {\n const schema = this;\n const standard = {\n version: 1,\n vendor: 'yup',\n async validate(value) {\n try {\n const result = await schema.validate(value, {\n abortEarly: false\n });\n return {\n value: result\n };\n } catch (err) {\n if (err instanceof ValidationError) {\n return {\n issues: issuesFromValidationError(err)\n };\n }\n throw err;\n }\n }\n };\n return standard;\n }\n}\n// @ts-expect-error\nSchema.prototype.__isYupSchema__ = true;\nfor (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At`] = function (path, value, options = {}) {\n const {\n parent,\n parentPath,\n schema\n } = getIn(this, path, value, options.context);\n return schema[method](parent && parent[parentPath], Object.assign({}, options, {\n parent,\n path\n }));\n};\nfor (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;\nfor (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;\n\nconst returnsTrue = () => true;\nfunction create$8(spec) {\n return new MixedSchema(spec);\n}\nclass MixedSchema extends Schema {\n constructor(spec) {\n super(typeof spec === 'function' ? {\n type: 'mixed',\n check: spec\n } : Object.assign({\n type: 'mixed',\n check: returnsTrue\n }, spec));\n }\n}\ncreate$8.prototype = MixedSchema.prototype;\n\nfunction create$7() {\n return new BooleanSchema();\n}\nclass BooleanSchema extends Schema {\n constructor() {\n super({\n type: 'boolean',\n check(v) {\n if (v instanceof Boolean) v = v.valueOf();\n return typeof v === 'boolean';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n if (this.spec.coerce && !this.isType(value)) {\n if (/^(true|1)$/i.test(String(value))) return true;\n if (/^(false|0)$/i.test(String(value))) return false;\n }\n return value;\n });\n });\n }\n isTrue(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'true'\n },\n test(value) {\n return isAbsent(value) || value === true;\n }\n });\n }\n isFalse(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'false'\n },\n test(value) {\n return isAbsent(value) || value === false;\n }\n });\n }\n default(def) {\n return super.default(def);\n }\n defined(msg) {\n return super.defined(msg);\n }\n optional() {\n return super.optional();\n }\n required(msg) {\n return super.required(msg);\n }\n notRequired() {\n return super.notRequired();\n }\n nullable() {\n return super.nullable();\n }\n nonNullable(msg) {\n return super.nonNullable(msg);\n }\n strip(v) {\n return super.strip(v);\n }\n}\ncreate$7.prototype = BooleanSchema.prototype;\n\n/**\n * This file is a modified version of the file from the following repository:\n * Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>\n * NON-CONFORMANT EDITION.\n * © 2011 Colin Snover <http://zetafleet.com>\n * Released under MIT license.\n */\n\n// prettier-ignore\n// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\nconst isoReg = /^(\\d{4}|[+-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,.](\\d{1,}))?)?(?:(Z)|([+-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nfunction parseIsoDate(date) {\n const struct = parseDateStruct(date);\n if (!struct) return Date.parse ? Date.parse(date) : Number.NaN;\n\n // timestamps without timezone identifiers should be considered local time\n if (struct.z === undefined && struct.plusMinus === undefined) {\n return new Date(struct.year, struct.month, struct.day, struct.hour, struct.minute, struct.second, struct.millisecond).valueOf();\n }\n let totalMinutesOffset = 0;\n if (struct.z !== 'Z' && struct.plusMinus !== undefined) {\n totalMinutesOffset = struct.hourOffset * 60 + struct.minuteOffset;\n if (struct.plusMinus === '+') totalMinutesOffset = 0 - totalMinutesOffset;\n }\n return Date.UTC(struct.year, struct.month, struct.day, struct.hour, struct.minute + totalMinutesOffset, struct.second, struct.millisecond);\n}\nfunction parseDateStruct(date) {\n var _regexResult$7$length, _regexResult$;\n const regexResult = isoReg.exec(date);\n if (!regexResult) return null;\n\n // use of toNumber() avoids NaN timestamps caused by “undefined”\n // values being passed to Date constructor\n return {\n year: toNumber(regexResult[1]),\n month: toNumber(regexResult[2], 1) - 1,\n day: toNumber(regexResult[3], 1),\n hour: toNumber(regexResult[4]),\n minute: toNumber(regexResult[5]),\n second: toNumber(regexResult[6]),\n millisecond: regexResult[7] ?\n // allow arbitrary sub-second precision beyond milliseconds\n toNumber(regexResult[7].substring(0, 3)) : 0,\n precision: (_regexResult$7$length = (_regexResult$ = regexResult[7]) == null ? void 0 : _regexResult$.length) != null ? _regexResult$7$length : undefined,\n z: regexResult[8] || undefined,\n plusMinus: regexResult[9] || undefined,\n hourOffset: toNumber(regexResult[10]),\n minuteOffset: toNumber(regexResult[11])\n };\n}\nfunction toNumber(str, defaultValue = 0) {\n return Number(str) || defaultValue;\n}\n\n// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\nlet rEmail =\n// eslint-disable-next-line\n/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\nlet rUrl =\n// eslint-disable-next-line\n/^((https?|ftp):)?\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n// eslint-disable-next-line\nlet rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nlet yearMonthDay = '^\\\\d{4}-\\\\d{2}-\\\\d{2}';\nlet hourMinuteSecond = '\\\\d{2}:\\\\d{2}:\\\\d{2}';\nlet zOrOffset = '(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)';\nlet rIsoDateTime = new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\\\.\\\\d+)?${zOrOffset}$`);\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\nlet objStringTag = {}.toString();\nfunction create$6() {\n return new StringSchema();\n}\nclass StringSchema extends Schema {\n constructor() {\n super({\n type: 'string',\n check(value) {\n if (value instanceof String) value = value.valueOf();\n return typeof value === 'string';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n if (!this.spec.coerce || this.isType(value)) return value;\n\n // don't ever convert arrays\n if (Array.isArray(value)) return value;\n const strValue = value != null && value.toString ? value.toString() : value;\n\n // no one wants plain objects converted to [Object object]\n if (strValue === objStringTag) return value;\n return strValue;\n });\n });\n }\n required(message) {\n return super.required(message).withMutation(schema => schema.test({\n message: message || mixed.required,\n name: 'required',\n skipAbsent: true,\n test: value => !!value.length\n }));\n }\n notRequired() {\n return super.notRequired().withMutation(schema => {\n schema.tests = schema.tests.filter(t => t.OPTIONS.name !== 'required');\n return schema;\n });\n }\n length(length, message = string.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message = string.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message = string.max) {\n return this.test({\n name: 'max',\n exclusive: true,\n message,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n matches(regex, options) {\n let excludeEmptyString = false;\n let message;\n let name;\n if (options) {\n if (typeof options === 'object') {\n ({\n excludeEmptyString = false,\n message,\n name\n } = options);\n } else {\n message = options;\n }\n }\n return this.test({\n name: name || 'matches',\n message: message || string.matches,\n params: {\n regex\n },\n skipAbsent: true,\n test: value => value === '' && excludeEmptyString || value.search(regex) !== -1\n });\n }\n email(message = string.email) {\n return this.matches(rEmail, {\n name: 'email',\n message,\n excludeEmptyString: true\n });\n }\n url(message = string.url) {\n return this.matches(rUrl, {\n name: 'url',\n message,\n excludeEmptyString: true\n });\n }\n uuid(message = string.uuid) {\n return this.matches(rUUID, {\n name: 'uuid',\n message,\n excludeEmptyString: false\n });\n }\n datetime(options) {\n let message = '';\n let allowOffset;\n let precision;\n if (options) {\n if (typeof options === 'object') {\n ({\n message = '',\n allowOffset = false,\n precision = undefined\n } = options);\n } else {\n message = options;\n }\n }\n return this.matches(rIsoDateTime, {\n name: 'datetime',\n message: message || string.datetime,\n excludeEmptyString: true\n }).test({\n name: 'datetime_offset',\n message: message || string.datetime_offset,\n params: {\n allowOffset\n },\n skipAbsent: true,\n test: value => {\n if (!value || allowOffset) return true;\n const struct = parseDateStruct(value);\n if (!struct) return false;\n return !!struct.z;\n }\n }).test({\n name: 'datetime_precision',\n message: message || string.datetime_precision,\n params: {\n precision\n },\n skipAbsent: true,\n test: value => {\n if (!value || precision == undefined) return true;\n const struct = parseDateStruct(value);\n if (!struct) return false;\n return struct.precision === precision;\n }\n });\n }\n\n //-- transforms --\n ensure() {\n return this.default('').transform(val => val === null ? '' : val);\n }\n trim(message = string.trim) {\n return this.transform(val => val != null ? val.trim() : val).test({\n message,\n name: 'trim',\n test: isTrimmed\n });\n }\n lowercase(message = string.lowercase) {\n return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toLowerCase()\n });\n }\n uppercase(message = string.uppercase) {\n return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toUpperCase()\n });\n }\n}\ncreate$6.prototype = StringSchema.prototype;\n\n//\n// String Interfaces\n//\n\nlet isNaN$1 = value => value != +value;\nfunction create$5() {\n return new NumberSchema();\n}\nclass NumberSchema extends Schema {\n constructor() {\n super({\n type: 'number',\n check(value) {\n if (value instanceof Number) value = value.valueOf();\n return typeof value === 'number' && !isNaN$1(value);\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n if (!this.spec.coerce) return value;\n let parsed = value;\n if (typeof parsed === 'string') {\n parsed = parsed.replace(/\\s/g, '');\n if (parsed === '') return NaN;\n // don't use parseFloat to avoid positives on alpha-numeric strings\n parsed = +parsed;\n }\n\n // null -> NaN isn't useful; treat all nulls as null and let it fail on\n // nullability check vs TypeErrors\n if (this.isType(parsed) || parsed === null) return parsed;\n return parseFloat(parsed);\n });\n });\n }\n min(min, message = number.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(min);\n }\n });\n }\n max(max, message = number.max) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(max);\n }\n });\n }\n lessThan(less, message = number.lessThan) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n less\n },\n skipAbsent: true,\n test(value) {\n return value < this.resolve(less);\n }\n });\n }\n moreThan(more, message = number.moreThan) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n more\n },\n skipAbsent: true,\n test(value) {\n return value > this.resolve(more);\n }\n });\n }\n positive(msg = number.positive) {\n return this.moreThan(0, msg);\n }\n negative(msg = number.negative) {\n return this.lessThan(0, msg);\n }\n integer(message = number.integer) {\n return this.test({\n name: 'integer',\n message,\n skipAbsent: true,\n test: val => Number.isInteger(val)\n });\n }\n truncate() {\n return this.transform(value => !isAbsent(value) ? value | 0 : value);\n }\n round(method) {\n var _method;\n let avail = ['ceil', 'floor', 'round', 'trunc'];\n method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round';\n\n // this exists for symemtry with the new Math.trunc\n if (method === 'trunc') return this.truncate();\n if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n }\n}\ncreate$5.prototype = NumberSchema.prototype;\n\n//\n// Number Interfaces\n//\n\nlet invalidDate = new Date('');\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\nfunction create$4() {\n return new DateSchema();\n}\nclass DateSchema extends Schema {\n constructor() {\n super({\n type: 'date',\n check(v) {\n return isDate(v) && !isNaN(v.getTime());\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw) => {\n // null -> InvalidDate isn't useful; treat all nulls as null and let it fail on\n // nullability check vs TypeErrors\n if (!this.spec.coerce || this.isType(value) || value === null) return value;\n value = parseIsoDate(value);\n\n // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;\n });\n });\n }\n prepareParam(ref, name) {\n let param;\n if (!Reference.isRef(ref)) {\n let cast = this.cast(ref);\n if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n param = cast;\n } else {\n param = ref;\n }\n return param;\n }\n min(min, message = date.min) {\n let limit = this.prepareParam(min, 'min');\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(limit);\n }\n });\n }\n max(max, message = date.max) {\n let limit = this.prepareParam(max, 'max');\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(limit);\n }\n });\n }\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate$4.prototype = DateSchema.prototype;\ncreate$4.INVALID_DATE = invalidDate;\n\n// @ts-expect-error\nfunction sortFields(fields, excludedEdges = []) {\n let edges = [];\n let nodes = new Set();\n let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n function addNode(depPath, key) {\n let node = split(depPath)[0];\n nodes.add(node);\n if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n }\n for (const key of Object.keys(fields)) {\n let value = fields[key];\n nodes.add(key);\n if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n }\n return toposort.array(Array.from(nodes), edges).reverse();\n}\n\nfunction findIndex(arr, err) {\n let idx = Infinity;\n arr.some((key, ii) => {\n var _err$path;\n if ((_err$path = err.path) != null && _err$path.includes(key)) {\n idx = ii;\n return true;\n }\n });\n return idx;\n}\nfunction sortByKeyOrder(keys) {\n return (a, b) => {\n return findIndex(keys, a) - findIndex(keys, b);\n };\n}\n\nconst parseJson = (value, _, schema) => {\n if (typeof value !== 'string') {\n return value;\n }\n let parsed = value;\n try {\n parsed = JSON.parse(value);\n } catch (err) {\n /* */\n }\n return schema.isType(parsed) ? parsed : value;\n};\n\n// @ts-ignore\nfunction deepPartial(schema) {\n if ('fields' in schema) {\n const partial = {};\n for (const [key, fieldSchema] of Object.entries(schema.fields)) {\n partial[key] = deepPartial(fieldSchema);\n }\n return schema.setFields(partial);\n }\n if (schema.type === 'array') {\n const nextArray = schema.optional();\n if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);\n return nextArray;\n }\n if (schema.type === 'tuple') {\n return schema.optional().clone({\n types: schema.spec.types.map(deepPartial)\n });\n }\n if ('optional' in schema) {\n return schema.optional();\n }\n return schema;\n}\nconst deepHas = (obj, p) => {\n const path = [...normalizePath(p)];\n if (path.length === 1) return path[0] in obj;\n let last = path.pop();\n let parent = getter(join(path), true)(obj);\n return !!(parent && last in parent);\n};\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\nfunction unknown(ctx, value) {\n let known = Object.keys(ctx.fields);\n return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\nconst defaultSort = sortByKeyOrder([]);\nfunction create$3(spec) {\n return new ObjectSchema(spec);\n}\nclass ObjectSchema extends Schema {\n constructor(spec) {\n super({\n type: 'object',\n check(value) {\n return isObject(value) || typeof value === 'function';\n }\n });\n this.fields = Object.create(null);\n this._sortErrors = defaultSort;\n this._nodes = [];\n this._excludedEdges = [];\n this.withMutation(() => {\n if (spec) {\n this.shape(spec);\n }\n });\n }\n _cast(_value, options = {}) {\n var _options$stripUnknown;\n let value = super._cast(_value, options);\n\n //should ignore nulls here\n if (value === undefined) return this.getDefault(options);\n if (!this._typeCheck(value)) return value;\n let fields = this.fields;\n let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n let props = [].concat(this._nodes, Object.keys(value).filter(v => !this._nodes.includes(v)));\n let intermediateValue = {}; // is filled during the transform below\n let innerOptions = Object.assign({}, options, {\n parent: intermediateValue,\n __validating: options.__validating || false\n });\n let isChanged = false;\n for (const prop of props) {\n let field = fields[prop];\n let exists = (prop in value);\n let inputValue = value[prop];\n if (field) {\n let fieldValue;\n\n // safe to mutate since this is fired in sequence\n innerOptions.path = (options.path ? `${options.path}.` : '') + prop;\n field = field.resolve({\n value: inputValue,\n context: options.context,\n parent: intermediateValue\n });\n let fieldSpec = field instanceof Schema ? field.spec : undefined;\n let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n if (fieldSpec != null && fieldSpec.strip) {\n isChanged = isChanged || prop in value;\n continue;\n }\n fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;\n if (fieldValue !== undefined) {\n intermediateValue[prop] = fieldValue;\n }\n } else if (exists && !strip) {\n intermediateValue[prop] = inputValue;\n }\n if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {\n isChanged = true;\n }\n }\n return isChanged ? intermediateValue : value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n from = [],\n originalValue = _value,\n recursive = this.spec.recursive\n } = options;\n options.from = [{\n schema: this,\n value: originalValue\n }, ...from];\n // this flag is needed for handling `strict` correctly in the context of\n // validation vs just casting. e.g strict() on a field is only used when validating\n options.__validating = true;\n options.originalValue = originalValue;\n super._validate(_value, options, panic, (objectErrors, value) => {\n if (!recursive || !isObject(value)) {\n next(objectErrors, value);\n return;\n }\n originalValue = originalValue || value;\n let tests = [];\n for (let key of this._nodes) {\n let field = this.fields[key];\n if (!field || Reference.isRef(field)) {\n continue;\n }\n tests.push(field.asNestedTest({\n options,\n key,\n parent: value,\n parentPath: options.path,\n originalParent: originalValue\n }));\n }\n this.runTests({\n tests,\n value,\n originalValue,\n options\n }, panic, fieldErrors => {\n next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);\n });\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n next.fields = Object.assign({}, this.fields);\n next._nodes = this._nodes;\n next._excludedEdges = this._excludedEdges;\n next._sortErrors = this._sortErrors;\n return next;\n }\n concat(schema) {\n let next = super.concat(schema);\n let nextFields = next.fields;\n for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n const target = nextFields[field];\n nextFields[field] = target === undefined ? schemaOrRef : target;\n }\n return next.withMutation(s =>\n // XXX: excludes here is wrong\n s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges]));\n }\n _getDefault(options) {\n if ('default' in this.spec) {\n return super._getDefault(options);\n }\n\n // if there is no default set invent one\n if (!this._nodes.length) {\n return undefined;\n }\n let dft = {};\n this._nodes.forEach(key => {\n var _innerOptions;\n const field = this.fields[key];\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n dft[key] = field && 'getDefault' in field ? field.getDefault(innerOptions) : undefined;\n });\n return dft;\n }\n setFields(shape, excludedEdges) {\n let next = this.clone();\n next.fields = shape;\n next._nodes = sortFields(shape, excludedEdges);\n next._sortErrors = sortByKeyOrder(Object.keys(shape));\n // XXX: this carries over edges which may not be what you want\n if (excludedEdges) next._excludedEdges = excludedEdges;\n return next;\n }\n shape(additions, excludes = []) {\n return this.clone().withMutation(next => {\n let edges = next._excludedEdges;\n if (excludes.length) {\n if (!Array.isArray(excludes[0])) excludes = [excludes];\n edges = [...next._excludedEdges, ...excludes];\n }\n\n // XXX: excludes here is wrong\n return next.setFields(Object.assign(next.fields, additions), edges);\n });\n }\n partial() {\n const partial = {};\n for (const [key, schema] of Object.entries(this.fields)) {\n partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;\n }\n return this.setFields(partial);\n }\n deepPartial() {\n const next = deepPartial(this);\n return next;\n }\n pick(keys) {\n const picked = {};\n for (const key of keys) {\n if (this.fields[key]) picked[key] = this.fields[key];\n }\n return this.setFields(picked, this._excludedEdges.filter(([a, b]) => keys.includes(a) && keys.includes(b)));\n }\n omit(keys) {\n const remaining = [];\n for (const key of Object.keys(this.fields)) {\n if (keys.includes(key)) continue;\n remaining.push(key);\n }\n return this.pick(remaining);\n }\n from(from, to, alias) {\n let fromGetter = getter(from, true);\n return this.transform(obj => {\n if (!obj) return obj;\n let newObj = obj;\n if (deepHas(obj, from)) {\n newObj = Object.assign({}, obj);\n if (!alias) delete newObj[from];\n newObj[to] = fromGetter(obj);\n }\n return newObj;\n });\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n\n /**\n * Similar to `noUnknown` but only validates that an object is the right shape without stripping the unknown keys\n */\n exact(message) {\n return this.test({\n name: 'exact',\n exclusive: true,\n message: message || object.exact,\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return unknownKeys.length === 0 || this.createError({\n params: {\n properties: unknownKeys.join(', ')\n }\n });\n }\n });\n }\n stripUnknown() {\n return this.clone({\n noUnknown: true\n });\n }\n noUnknown(noAllow = true, message = object.noUnknown) {\n if (typeof noAllow !== 'boolean') {\n message = noAllow;\n noAllow = true;\n }\n let next = this.test({\n name: 'noUnknown',\n exclusive: true,\n message: message,\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return !noAllow || unknownKeys.length === 0 || this.createError({\n params: {\n unknown: unknownKeys.join(', ')\n }\n });\n }\n });\n next.spec.noUnknown = noAllow;\n return next;\n }\n unknown(allow = true, message = object.noUnknown) {\n return this.noUnknown(!allow, message);\n }\n transformKeys(fn) {\n return this.transform(obj => {\n if (!obj) return obj;\n const result = {};\n for (const key of Object.keys(obj)) result[fn(key)] = obj[key];\n return result;\n });\n }\n camelCase() {\n return this.transformKeys(camelCase);\n }\n snakeCase() {\n return this.transformKeys(snakeCase);\n }\n constantCase() {\n return this.transformKeys(key => snakeCase(key).toUpperCase());\n }\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const base = super.describe(options);\n base.fields = {};\n for (const [key, value] of Object.entries(next.fields)) {\n var _innerOptions2;\n let innerOptions = options;\n if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n base.fields[key] = value.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$3.prototype = ObjectSchema.prototype;\n\nfunction create$2(type) {\n return new ArraySchema(type);\n}\nclass ArraySchema extends Schema {\n constructor(type) {\n super({\n type: 'array',\n spec: {\n types: type\n },\n check(v) {\n return Array.isArray(v);\n }\n });\n\n // `undefined` specifically means uninitialized, as opposed to \"no subtype\"\n this.innerType = void 0;\n this.innerType = type;\n }\n _cast(_value, _opts) {\n const value = super._cast(_value, _opts);\n\n // should ignore nulls here\n if (!this._typeCheck(value) || !this.innerType) {\n return value;\n }\n let isChanged = false;\n const castArray = value.map((v, idx) => {\n const castElement = this.innerType.cast(v, Object.assign({}, _opts, {\n path: `${_opts.path || ''}[${idx}]`,\n parent: value,\n originalValue: v,\n value: v,\n index: idx\n }));\n if (castElement !== v) {\n isChanged = true;\n }\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n var _options$recursive;\n // let sync = options.sync;\n // let path = options.path;\n let innerType = this.innerType;\n // let endEarly = options.abortEarly ?? this.spec.abortEarly;\n let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;\n options.originalValue != null ? options.originalValue : _value;\n super._validate(_value, options, panic, (arrayErrors, value) => {\n var _options$originalValu2;\n if (!recursive || !innerType || !this._typeCheck(value)) {\n next(arrayErrors, value);\n return;\n }\n\n // #950 Ensure that sparse array empty slots are validated\n let tests = new Array(value.length);\n for (let index = 0; index < value.length; index++) {\n var _options$originalValu;\n tests[index] = innerType.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(arrayErrors), value));\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n return next;\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n concat(schema) {\n let next = super.concat(schema);\n\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n if (schema.innerType)\n // @ts-expect-error readonly\n next.innerType = next.innerType ?\n // @ts-expect-error Lazy doesn't have concat and will break\n next.innerType.concat(schema.innerType) : schema.innerType;\n return next;\n }\n of(schema) {\n // FIXME: this should return a new instance of array without the default to be\n let next = this.clone();\n if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema));\n\n // @ts-expect-error readonly\n next.innerType = schema;\n next.spec = Object.assign({}, next.spec, {\n types: schema\n });\n return next;\n }\n length(length, message = array.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message) {\n message = message || array.min;\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n // FIXME(ts): Array<typeof T>\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message) {\n message = message || array.max;\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n ensure() {\n return this.default(() => []).transform((val, original) => {\n // We don't want to return `null` for nullable schema\n if (this._typeCheck(val)) return val;\n return original == null ? [] : [].concat(original);\n });\n }\n compact(rejector) {\n let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);\n return this.transform(values => values != null ? values.filter(reject) : values);\n }\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const base = super.describe(options);\n if (next.innerType) {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[0]\n });\n }\n base.innerType = next.innerType.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$2.prototype = ArraySchema.prototype;\n\n// @ts-ignore\nfunction create$1(schemas) {\n return new TupleSchema(schemas);\n}\nclass TupleSchema extends Schema {\n constructor(schemas) {\n super({\n type: 'tuple',\n spec: {\n types: schemas\n },\n check(v) {\n const types = this.spec.types;\n return Array.isArray(v) && v.length === types.length;\n }\n });\n this.withMutation(() => {\n this.typeError(tuple.notType);\n });\n }\n _cast(inputValue, options) {\n const {\n types\n } = this.spec;\n const value = super._cast(inputValue, options);\n if (!this._typeCheck(value)) {\n return value;\n }\n let isChanged = false;\n const castArray = types.map((type, idx) => {\n const castElement = type.cast(value[idx], Object.assign({}, options, {\n path: `${options.path || ''}[${idx}]`,\n parent: value,\n originalValue: value[idx],\n value: value[idx],\n index: idx\n }));\n if (castElement !== value[idx]) isChanged = true;\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n let itemTypes = this.spec.types;\n super._validate(_value, options, panic, (tupleErrors, value) => {\n var _options$originalValu2;\n // intentionally not respecting recursive\n if (!this._typeCheck(value)) {\n next(tupleErrors, value);\n return;\n }\n let tests = [];\n for (let [index, itemSchema] of itemTypes.entries()) {\n var _options$originalValu;\n tests[index] = itemSchema.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(tupleErrors), value));\n });\n }\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const base = super.describe(options);\n base.innerType = next.spec.types.map((schema, index) => {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[index]\n });\n }\n return schema.describe(innerOptions);\n });\n return base;\n }\n}\ncreate$1.prototype = TupleSchema.prototype;\n\nfunction create(builder) {\n return new Lazy(builder);\n}\nfunction catchValidationError(fn) {\n try {\n return fn();\n } catch (err) {\n if (ValidationError.isError(err)) return Promise.reject(err);\n throw err;\n }\n}\nclass Lazy {\n constructor(builder) {\n this.type = 'lazy';\n this.__isYupSchema__ = true;\n this.spec = void 0;\n this._resolve = (value, options = {}) => {\n let schema = this.builder(value, options);\n if (!isSchema(schema)) throw new TypeError('lazy() functions must return a valid schema');\n if (this.spec.optional) schema = schema.optional();\n return schema.resolve(options);\n };\n this.builder = builder;\n this.spec = {\n meta: undefined,\n optional: false\n };\n }\n clone(spec) {\n const next = new Lazy(this.builder);\n next.spec = Object.assign({}, this.spec, spec);\n return next;\n }\n optionality(optional) {\n const next = this.clone({\n optional\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n resolve(options) {\n return this._resolve(options.value, options);\n }\n cast(value, options) {\n return this._resolve(value, options).cast(value, options);\n }\n asNestedTest(config) {\n let {\n key,\n index,\n parent,\n options\n } = config;\n let value = parent[index != null ? index : key];\n return this._resolve(value, Object.assign({}, options, {\n value,\n parent\n })).asNestedTest(config);\n }\n validate(value, options) {\n return catchValidationError(() => this._resolve(value, options).validate(value, options));\n }\n validateSync(value, options) {\n return this._resolve(value, options).validateSync(value, options);\n }\n validateAt(path, value, options) {\n return catchValidationError(() => this._resolve(value, options).validateAt(path, value, options));\n }\n validateSyncAt(path, value, options) {\n return this._resolve(value, options).validateSyncAt(path, value, options);\n }\n isValid(value, options) {\n try {\n return this._resolve(value, options).isValid(value, options);\n } catch (err) {\n if (ValidationError.isError(err)) {\n return Promise.resolve(false);\n }\n throw err;\n }\n }\n isValidSync(value, options) {\n return this._resolve(value, options).isValidSync(value, options);\n }\n describe(options) {\n return options ? this.resolve(options).describe(options) : {\n type: 'lazy',\n meta: this.spec.meta,\n label: undefined\n };\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n get ['~standard']() {\n const schema = this;\n const standard = {\n version: 1,\n vendor: 'yup',\n async validate(value) {\n try {\n const result = await schema.validate(value, {\n abortEarly: false\n });\n return {\n value: result\n };\n } catch (err) {\n if (ValidationError.isError(err)) {\n return {\n issues: issuesFromValidationError(err)\n };\n }\n throw err;\n }\n }\n };\n return standard;\n }\n}\n\nfunction setLocale(custom) {\n Object.keys(custom).forEach(type => {\n // @ts-ignore\n Object.keys(custom[type]).forEach(method => {\n // @ts-ignore\n locale[type][method] = custom[type][method];\n });\n });\n}\n\nfunction addMethod(schemaType, name, fn) {\n if (!schemaType || !isSchema(schemaType.prototype)) throw new TypeError('You must provide a yup schema constructor function');\n if (typeof name !== 'string') throw new TypeError('A Method name must be provided');\n if (typeof fn !== 'function') throw new TypeError('Method function must be provided');\n schemaType.prototype[name] = fn;\n}\n\nexport { ArraySchema, BooleanSchema, DateSchema, Lazy as LazySchema, MixedSchema, NumberSchema, ObjectSchema, Schema, StringSchema, TupleSchema, ValidationError, addMethod, create$2 as array, create$7 as bool, create$7 as boolean, create$4 as date, locale as defaultLocale, getIn, isSchema, create as lazy, create$8 as mixed, create$5 as number, create$3 as object, printValue, reach, create$9 as ref, setLocale, create$6 as string, create$1 as tuple };\n","import {\n AdType,\n EnumAdShowOn,\n EnumAdStatus,\n EnumAdStyle,\n EnumAdType,\n EnumResourceType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { SocialMediaTypeSchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst schema = new MongooseSchema<AdType>(\n {\n active: { default: true, type: Boolean },\n adStyle: {\n default: EnumAdStyle.BLOOM,\n enum: Object.values(EnumAdStyle),\n required: true,\n type: String,\n },\n adType: {\n default: EnumAdType.SPONSORED,\n enum: Object.values(EnumAdType),\n required: true,\n type: String,\n },\n // TODO: similar to ViewSchema\n clicks: { default: 0, required: true, type: Number },\n clui: { required: false, type: String },\n end: { required: true, type: Date },\n // TODO: similar to ViewSchema\n impressions: { default: 0, required: true, type: Number },\n resourceCover: { required: true, type: String },\n resourceDescription: { required: true, type: String },\n resourceId: { required: true, type: String },\n resourceLogo: { required: false, 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 showOn: {\n default: EnumAdShowOn.FRONT_PAGE,\n enum: Object.values(EnumAdShowOn),\n required: true,\n type: String,\n },\n socialMedia: [SocialMediaTypeSchema],\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 AssociateType,\n Category,\n DateTimeType,\n EnumEventDateStatus,\n EnumResourceType,\n EnumUserLicence,\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\nconst 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 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 },\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\nconst ContactDetailsSchema = 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 locationsSchema = new MongooseSchema<LocationType>(\n {\n city: { required: true, type: String },\n coordinates: {\n required: true,\n type: [Number], // [longitude, latitude]\n },\n country: { required: true, type: String },\n fullAddress: { required: true, type: String },\n latitude: { required: true, type: Number },\n longitude: { required: true, type: Number },\n region: { required: true, type: String },\n type: {\n default: \"Point\",\n enum: [\"Point\"],\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 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: 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: [ResourceImageTypeSchema],\n logo: ResourceImageTypeSchema,\n name: { required: true, type: String },\n owner: {\n required: false,\n type: OwnerTypeSchema,\n },\n posterUsage: 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: [SocialMediaTypeSchema],\n termsAgreement: 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 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 electricity: {\n price: { required: false, type: Number },\n selected: { required: false, type: Boolean },\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 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 applicationDeadlineHours: { required: true, type: Number },\n dateTime: [dateTimeSchema],\n eventId: {\n ref: \"Event\",\n required: false,\n type: mongoose.Schema.Types.ObjectId,\n },\n packInTime: { required: true, type: Number },\n paymentDueHours: { required: true, type: Number },\n paymentInfo: [paymentInfoSchema],\n requirements: [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 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 SchemaChatMessageType = Omit<ChatMessageType, \"senderId\"> & {\n senderId: ObjectId;\n};\n\nexport type SchemaParticipantType = Omit<ParticipantType, \"userId\"> & {\n userId: ObjectId;\n};\n\nconst MessageSchema = new MongooseSchema<SchemaChatMessageType>(\n {\n content: { required: true, type: String },\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\nexport const ParticipantSchema = new MongooseSchema<SchemaParticipantType>(\n {\n active: { default: true, required: true, 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 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 },\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 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\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<GoogleImportedMarket>(\n {\n accessibilityOptions: { required: false, type: Object },\n active: { default: false, required: true, type: Boolean },\n address: { required: true, type: String },\n addressComponents: { required: false, type: [addressComponentSchema] },\n allowsDogs: { required: false, type: Boolean },\n businessStatus: { required: false, type: String },\n claimed: { default: false, required: true, type: Boolean },\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 eventType: {\n enum: Object.values(EnumEventType),\n required: true,\n type: String,\n },\n goodForChildren: { required: false, type: Boolean },\n goodForGroups: { required: false, type: Boolean },\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 liveMusic: { required: false, type: Boolean },\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 parkingOptions: { required: false, type: Object },\n paymentOptions: { required: false, type: Object },\n phone: { 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 restroom: { required: false, type: Boolean },\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({ name: 1 });\nschema.index({ slug: 1 });\nschema.index({ address: 1 });\nschema.index({ \"location.lat\": 1, \"location.lng\": 1 });\n\nexport const GoogleImportedMarketModel =\n (mongoose.models\n .GoogleImportedMarket as mongoose.Model<GoogleImportedMarket>) ||\n mongoose.model<GoogleImportedMarket>(\"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 PAID = \"Paid\",\n PENDING = \"Pending\",\n REJECTED = \"Rejected\",\n UNAVAILABLE = \"Unavailable\",\n WAITING = \"Waiting\",\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 = \"Other\",\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 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_VENDOR = \"added_as_associate_vendor\",\n APPROVED_EVENT = \"approved_event\",\n APPROVED_VENDOR = \"approved_vendor\",\n CREATED_EVENT = \"created_event\",\n CREATED_VENDOR = \"created_vendor\",\n EVENT_INVITE_VENDOR = EnumRelationResource.EVENT_INVITE_VENDOR,\n EVENT_STARTING_SOON = \"event_starting_soon\",\n NEW_CHAT_MESSAGE = \"new_chat_message\",\n SYSTEM_ALERT = \"system_alert\",\n VENDOR_APPLICATION_TO_EVENT = EnumRelationResource.VENDOR_APPLICATION_TO_EVENT,\n}\n\nexport enum EnumNotificationType {\n EVENT = EnumResourceType.EVENT,\n VENDOR = EnumResourceType.VENDOR,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport enum EnumRegions {\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_WEEKEND = \"This_Weekend\",\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 { EnumOSPlatform } from \"@timardex/cluemart-shared/enums\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nconst MongooseSchema = mongoose.Schema;\n\ntype PushTokenType = {\n _id: string;\n createdAt: Date;\n platform: EnumOSPlatform;\n token: string;\n updatedAt: Date;\n userId: string;\n};\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: { required: true, type: mongoose.Schema.Types.ObjectId },\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\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 coordinates: {\n required: false,\n type: [Number],\n },\n type: {\n default: \"Point\",\n enum: [\"Point\"],\n required: false,\n type: String,\n },\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 EnumResourceType,\n OrganizedMarketCount,\n OrganizerMarketFrequency,\n TesterEvent,\n TesterType,\n TesterVendor,\n VendorSellingFrequency,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { CategorySchema } from \"./global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst TesterVendorQuestionarySchema = new MongooseSchema(\n {\n appearInVideoIntroduction: {\n default: false,\n required: false,\n type: Boolean,\n },\n applyToAtLeastOneMarket: { default: true, required: true, type: Boolean },\n completeFeedbackQuestionnaire: {\n default: true,\n required: true,\n type: Boolean,\n },\n excitementAboutApp: { required: false, type: String },\n sendPhotoForSocialMedia: { default: false, required: false, type: Boolean },\n socialMediaFeatureReason: { required: false, type: String },\n testingPeriodConcerns: { required: false, type: String },\n tryVisitorFeatures: { default: true, required: true, type: Boolean },\n uploadStallProfileFirstWeek: {\n default: true,\n required: true,\n type: Boolean,\n },\n usefulnessExpectations: { required: false, type: String },\n },\n { _id: false },\n);\n\nconst TesterVendorSchema = new MongooseSchema<TesterVendor>(\n {\n categories: { required: true, type: [CategorySchema] },\n marketsAttended: {\n required: true,\n type: [\n {\n city: { required: true, type: String },\n name: { required: true, type: String },\n },\n ],\n },\n productsOrServices: { required: true, type: String },\n questionary: {\n required: true,\n type: TesterVendorQuestionarySchema,\n },\n sellingFrequency: {\n enum: Object.values(VendorSellingFrequency),\n required: true,\n type: String,\n },\n yearlySellingApprox: { required: true, type: Number },\n },\n { _id: false },\n);\n\nconst TesterEventQuestionarySchema = new MongooseSchema(\n {\n allowMarketingAppearance: {\n default: false,\n required: false,\n type: Boolean,\n },\n completeFinalQuestionnaire: {\n default: true,\n required: true,\n type: Boolean,\n },\n completeMarketProfileFirstWeek: {\n default: true,\n required: true,\n type: Boolean,\n },\n dailyCoordinationNeeds: { required: false, type: String },\n interestedInCharityInitiative: {\n default: false,\n required: false,\n type: Boolean,\n },\n inviteStallholders: { default: true, required: true, type: Boolean },\n manageApplicationsAndCommunication: {\n default: true,\n required: true,\n type: Boolean,\n },\n organizerExpectations: { required: false, type: String },\n spaceForClueMart: { default: false, required: false, type: Boolean },\n uploadStallList: { default: true, required: true, type: Boolean },\n },\n { _id: false },\n);\n\nconst TesterEventsSchema = new MongooseSchema<TesterEvent>(\n {\n markets: {\n required: true,\n type: [\n {\n averageStallCount: { required: true, type: Number },\n cityOrVenue: { required: true, type: String },\n frequency: {\n enum: Object.values(OrganizerMarketFrequency),\n required: true,\n type: String,\n },\n name: { required: true, type: String },\n },\n ],\n },\n organizedMarketCount: {\n enum: Object.values(OrganizedMarketCount),\n required: true,\n type: String,\n },\n questionary: {\n required: true,\n type: TesterEventQuestionarySchema,\n },\n },\n { _id: false },\n);\n\nconst TesterSchema = new MongooseSchema<TesterType>(\n {\n active: { default: false, required: true, type: Boolean },\n approved: { default: false, required: true, type: Boolean },\n businessName: { required: true, type: String },\n consents: {\n required: true,\n type: {\n betaTestConsent: { required: true, type: Boolean },\n privacyConsent: { required: true, type: Boolean },\n },\n },\n email: { required: true, type: String },\n event: { required: false, type: TesterEventsSchema },\n firstName: { required: true, type: String },\n lastName: { required: true, type: String },\n mobilePhone: { required: true, type: String },\n osType: {\n enum: Object.values(EnumOSPlatform),\n required: true,\n type: String,\n },\n region: { required: true, type: String },\n resourceType: {\n enum: Object.values(EnumResourceType),\n required: true,\n type: String,\n },\n vendor: { required: false, type: TesterVendorSchema },\n },\n {\n timestamps: true,\n },\n);\n\nexport const TesterModel =\n (mongoose.models.Tester as mongoose.Model<TesterType>) ||\n mongoose.model<TesterType>(\"Tester\", TesterSchema);\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 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\"\n> & {\n _id: ObjectId;\n events: ObjectId[];\n partner: 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 isTester: { default: false, required: true, type: Boolean },\n lastName: { required: true, type: String },\n licences: {\n required: false,\n type: [userLicenseSchema],\n },\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 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 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 VendorMenuType,\n VendorType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose from \"mongoose\";\n\nimport { ObjectId } from \"src/types\";\n\nimport {\n baseResourceFields,\n CategorySchema,\n resourceRelationsSchema,\n SchemaOwnerType,\n} from \"../global\";\n\nconst MongooseSchema = mongoose.Schema;\n\nconst MenuTypeSchema = new MongooseSchema<VendorMenuType>(\n {\n description: { required: false, type: String },\n name: { required: false, type: String },\n price: { required: false, type: Number },\n productGroups: { required: false, type: [String] },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nconst LocationsSchema = new MongooseSchema<VendorType[\"locations\"]>(\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 city: { required: false, type: String },\n coordinates: {\n required: false,\n type: [Number], // [longitude, latitude]\n },\n country: { required: false, type: String },\n fullAddress: { required: false, type: String },\n latitude: { required: false, type: Number },\n longitude: { required: false, type: Number },\n region: { required: false, type: String },\n type: { required: false, type: String }, // Mongoose GeoJSON type\n },\n },\n { _id: false }, // Prevents Mongoose from creating an additional _id field for subdocuments\n);\n\nexport type SchemaVendorType = Omit<\n VendorType,\n \"vendorInfoId\" | \"owner\" | \"adIds\"\n> & {\n adIds?: ObjectId[];\n owner: SchemaOwnerType;\n vendorInfoId: ObjectId;\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 categories: [CategorySchema],\n foodTruck: { required: true, type: Boolean },\n locations: [LocationsSchema],\n multiLocation: { required: true, type: Boolean },\n products: [MenuTypeSchema],\n relations: {\n default: [],\n required: false,\n type: [resourceRelationsSchema],\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 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: Number },\n min: { required: true, type: Number },\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: Number },\n width: { required: true, type: Number },\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 { 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: true, type: Boolean },\n dateTime: [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 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: \"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: \"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 PostContentType,\n PostType,\n} from \"@timardex/cluemart-shared\";\nimport mongoose, { Schema } from \"mongoose\";\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: true, required: true, type: Boolean },\n caption: { required: true, type: String },\n content: [contentSchema],\n postType: {\n enum: Object.values(EnumPostType),\n required: true,\n type: String,\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 appVersion: { default: \"1.0.1\", required: true, type: String },\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 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 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 },\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 { NotificationCount } from \"@timardex/cluemart-shared/types\";\nimport express from \"express\";\nimport mongoose from \"mongoose\";\n\nimport { SchemaChatType } from \"../mongoose/Chat\";\nimport { SchemaNotificationType } from \"../mongoose/Notification\";\n\nexport type ObjectId = mongoose.Schema.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: string;\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 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,+CAAAA,UAAA;AAAA;AAWA,QAAI,qBAAqB,uBAAO,IAAI,4BAA4B;AAAhE,QACE,oBAAoB,uBAAO,IAAI,cAAc;AAD/C,QAEE,sBAAsB,uBAAO,IAAI,gBAAgB;AAFnD,QAGE,yBAAyB,uBAAO,IAAI,mBAAmB;AAHzD,QAIE,sBAAsB,uBAAO,IAAI,gBAAgB;AAJnD,QAKE,sBAAsB,uBAAO,IAAI,gBAAgB;AALnD,QAME,qBAAqB,uBAAO,IAAI,eAAe;AANjD,QAOE,yBAAyB,uBAAO,IAAI,mBAAmB;AAPzD,QAQE,sBAAsB,uBAAO,IAAI,gBAAgB;AARnD,QASE,kBAAkB,uBAAO,IAAI,YAAY;AAT3C,QAUE,kBAAkB,uBAAO,IAAI,YAAY;AAV3C,QAWE,sBAAsB,uBAAO,IAAI,gBAAgB;AAXnD,QAYE,wBAAwB,OAAO;AACjC,aAAS,cAAc,eAAe;AACpC,UAAI,SAAS,iBAAiB,aAAa,OAAO,cAAe,QAAO;AACxE,sBACG,yBAAyB,cAAc,qBAAqB,KAC7D,cAAc,YAAY;AAC5B,aAAO,eAAe,OAAO,gBAAgB,gBAAgB;AAAA,IAC/D;AACA,QAAI,uBAAuB;AAAA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,MAAM;IACN,aAAa;EACf;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;AACF;ACtBO,IAAM,cAA2B;EACtC;IACE,GAAG;EACL;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,iBAAiB;EACnB;AACF;AAEO,IAAM,iBAA8B;EACzC;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;EACA;IACE,GAAG;EACL;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;IACb,iBAAiB;EACnB;AACF;AAEO,IAAM,6BAA0C;EACrD;IACE,GAAG;IACH,YAAY;EACd;AACF;AAmBO,IAAM,kCAA+C;EAC1D;IACE,GAAG;IACH,UAAU;IACV,YAAY;EACd;EACA;IACE,YAAY;IACZ,cAAc;IACd,MAAM;IACN,aAAa;EACf;AACF;AC1EO,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,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AE,OAAO,EAAE,KAAK,IAAI,GAAG,QAAQ,EAAE,KAAK,aAAa,OAAO,EAAE;AAAA,IAC5D,EAAE,MAAM,EAAE,QAAQ,aAAa,OAAO,EAAE;AAAA,EAC1C;AAEA,UAAQ;AAAA,IACN,uCAAkC,cAAc,aAAa,aAAa,cAAc,aAAa,YAAY,aAAa,aAAa,YAAY,aAAa,aAAa;AAAA,EACnL;AACF;;;AC9CA,qBAAoB;AACpB,IAAAC,oBAAqB;AAOd,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":["exports","object","array","exports","module","getter","object","array","exports","module","exports","module","split","normalizePath","getter","forEach","exports","module","join","camelCase","snakeCase","exports","module","toposort","visit","i","dateTimeSchema","express","mongoose","d","b","__assign","s","InvariantError","invariant","invariant","invariant","array","OperationTypeNode","DirectiveLocation","Kind","TokenKind","object","array","instanceOf","string","import_dayjs","import_customParseFormat","import_isSameOrAfter","value","result","schema","s","schema","date","toposort","import_react","import_react","import_react","import_react","EnumInviteStatus","EnumChatType","EnumPaymentMethod","EnumFoodFlavor","EnumResourceType","EnumEventType","EnumVendorType","EnumPartnerType","EnumOSPlatform","EnumRelationResource","EnumNotificationResourceType","EnumNotificationType","EnumRegions","EnumUserLicence","EnumUserRole","EnumSocialMedia","EnumEventDateStatus","EnumSubscriptionStatus","dayjs","customParseFormat","utc","timezone","isSameOrAfter","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","gql","dayjs","isSameOrAfter","customParseFormat","schema","OrganizedMarketCount","VendorSellingFrequency","OrganizerMarketFrequency","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumPostType","EnumPostContentType","EnumActivity","import_mongoose","import_mongoose","import_mongoose","mongoose","dateTimeSchema","paymentInfoSchema","MongooseSchema","mongoose","MongooseSchema","mongoose","dateTimeSchema","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","import_mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","import_mongoose","MongooseSchema","mongoose","schema","EnumOSPlatform","import_mongoose","MongooseSchema","mongoose","schema","EnumOSPlatform","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","import_mongoose","MongooseSchema","mongoose","dateTimeSchema","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","dateTimeSchema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","schema","import_mongoose","MongooseSchema","mongoose","import_mongoose","mongoose","import_mongoose","EnumPubSubEvents"]}