{"version":3,"file":"static/chunks/4421-b5346e4f410b8768.js","mappings":"oLASgBA,qCAAAA,aAT8B,OASvC,SAASA,EACdC,CAAmB,CACnBC,CAAmB,EAEnB,IAAMC,EAAWC,CAAAA,EAAAA,EAAAA,MAAAA,EAA4B,MACvCC,EAAWD,CAAAA,EAAAA,EAAAA,MAAAA,EAA4B,MAS7C,MAAOE,CAAAA,EAAAA,EAAAA,WAAAA,EACL,IACE,GAAgB,OAAZC,EAAkB,CACpB,IAAMC,EAAaL,EAASI,OAAO,CAC/BC,IACFL,EAASI,MADK,CACE,CAAG,KACnBC,KAEF,IAAMC,EAAaJ,EAASE,OAAO,CAC/BE,IACFJ,EAASE,MADK,CACE,CAAG,KACnBE,IAEJ,MACMR,CADC,GAEHE,EADQ,OACQ,CAAGO,EAAST,EAAMM,EAAAA,EAEhCL,IACFG,EADQ,OACQ,CAAGK,EAASR,EAAMK,EAAAA,CAGxC,EACA,CAACN,EAAMC,EAAK,CAEhB,CAEA,SAASQ,EACPT,CAAgC,CAChCM,CAAiB,EAEjB,GAAoB,YAAhB,OAAON,EAST,OADAA,EAAKM,OAAO,CAAGA,EACR,KACLN,EAAKM,OAAO,CAAG,IACjB,CAX8B,EAC9B,IAAMI,EAAUV,EAAKM,SACrB,YAAI,OAAOI,EACFA,EAEA,IAAMV,EAAK,KAEtB,CAMF,MANS,iSCrDT,gBAA0C,GAAa,CACvD,iBACA,UACA,CACA,cACA,oBACA,iDACA,wDACA,CACA,cACA,kBACA,KACA,SAAgB,QAAqB,EACrC,CAAK,CACL,CACA,uBAEA,OADA,WAAuB,QAAqB,GAC5C,4BACA,CACA,iBACA,mBACA,KACA,MACA,WAAqB,oBACrB,CACA,CAAK,CACL,CACA,qBACA,mBACA,KACA,MACA,WAAqB,qBACrB,CACA,CAAK,CACL,CACA,kBACA,UAAY,GAAQ,EACpB,0BACA,YAAY,6CAAoD,EAChE,oCACA,mBACA,mBACA,oBACA,oBAcA,MAbA,CACA,KACA,iCACA,yCACA,YA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H,OAAAA,CAAKnB,UAAU,+BAAuBoI,EAAMC,GAAY,kBAAoBA,EAASC,QAAQ,CAACzB,IAAI,KAd9F,YAAiC,OAArBwB,EAASC,QAAQ,CAACzO,EAAE,SAqB/C,WAACkG,MAAAA,CAAIC,UAAU,4BACZf,GACC,UAACiB,SAAAA,CACCF,UAAU,wHAEVwI,eAAa,SACbrI,QAAS,KACP,GAAIgI,EAAW,CACb,IAAMe,EAAiBf,EAAUvL,IAAI,CAAC,GAAOoE,EAAEmI,QAAQ,EACnDD,EACFA,EAAeE,UAAU,EADP,EAGlBnE,aAAaoE,UAAU,CAAC,qBACxBC,OAAOC,QAAQ,CAACC,MAAM,GAE1B,CACF,WACD,sBAIH,UAACtJ,SAAAA,CACCsI,eAAa,qBACbrI,QAASyE,EACT5E,UAAU,qGAEX,kBAxEc,IA+EzB","sources":["webpack://_N_E/../client/use-merged-ref.ts","webpack://_N_E/./node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js","webpack://_N_E/../useInfiniteQuery.ts","webpack://_N_E/./app/hooks/queries/useEventQueries.ts","webpack://_N_E/./app/@cart/cartComponent.tsx","webpack://_N_E/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://_N_E/./app/components/base/Card.tsx","webpack://_N_E/./app/@cart/loading.tsx","webpack://_N_E/./node_modules/use-sync-external-store/shim/with-selector.js","webpack://_N_E/./app/utils/cn.ts","webpack://_N_E/./node_modules/use-sync-external-store/shim/index.js","webpack://_N_E/./app/components/cart/CartButton.tsx","webpack://_N_E/./app/utils/ticketDiscounts.ts","webpack://_N_E/./app/components/RequireWallet.tsx","webpack://_N_E/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","webpack://_N_E/./app/hooks/queries/useCartQueries.ts","webpack://_N_E/./node_modules/zustand/esm/vanilla.mjs","webpack://_N_E/./node_modules/zustand/esm/index.mjs","webpack://_N_E/./app/components/Account.tsx","webpack://_N_E/./app/components/ConnectWallet.tsx"],"sourcesContent":["import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef(\n refA: Ref,\n refB: Ref\n): Ref {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (e.g. via ``),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef(\n refA: NonNullable>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","// src/infiniteQueryObserver.ts\nimport { QueryObserver } from \"./queryObserver.js\";\nimport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n} from \"./infiniteQueryBehavior.js\";\nvar InfiniteQueryObserver = class extends QueryObserver {\n constructor(client, options) {\n super(client, options);\n }\n bindMethods() {\n super.bindMethods();\n this.fetchNextPage = this.fetchNextPage.bind(this);\n this.fetchPreviousPage = this.fetchPreviousPage.bind(this);\n }\n setOptions(options) {\n super.setOptions({\n ...options,\n behavior: infiniteQueryBehavior()\n });\n }\n getOptimisticResult(options) {\n options.behavior = infiniteQueryBehavior();\n return super.getOptimisticResult(options);\n }\n fetchNextPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"forward\" }\n }\n });\n }\n fetchPreviousPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"backward\" }\n }\n });\n }\n createResult(query, options) {\n const { state } = query;\n const parentResult = super.createResult(query, options);\n const { isFetching, isRefetching, isError, isRefetchError } = parentResult;\n const fetchDirection = state.fetchMeta?.fetchMore?.direction;\n const isFetchNextPageError = isError && fetchDirection === \"forward\";\n const isFetchingNextPage = isFetching && fetchDirection === \"forward\";\n const isFetchPreviousPageError = isError && fetchDirection === \"backward\";\n const isFetchingPreviousPage = isFetching && fetchDirection === \"backward\";\n const result = {\n ...parentResult,\n fetchNextPage: this.fetchNextPage,\n fetchPreviousPage: this.fetchPreviousPage,\n hasNextPage: hasNextPage(options, state.data),\n hasPreviousPage: hasPreviousPage(options, state.data),\n isFetchNextPageError,\n isFetchingNextPage,\n isFetchPreviousPageError,\n isFetchingPreviousPage,\n isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,\n isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage\n };\n return result;\n }\n};\nexport {\n InfiniteQueryObserver\n};\n//# sourceMappingURL=infiniteQueryObserver.js.map","'use client'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): DefinedUseInfiniteQueryResult\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult\n\nexport function useInfiniteQuery(\n options: UseInfiniteQueryOptions,\n queryClient?: QueryClient,\n) {\n return useBaseQuery(\n options,\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n )\n}\n","import { useInfiniteQuery, useQuery, useQueryClient } from '@tanstack/react-query'\nimport { usePathname } from 'next/navigation'\nimport { useCallback, useEffect, useState } from 'react'\nimport { EVENTSMODEL, GENRESEENUM } from '../../types/graphql/API'\nexport interface EventFilters {\n category?: GENRESEENUM\n page?: number\n search?: string\n}\n\nexport interface EventsResponse {\n _embedded: {\n events: EVENTSMODEL[]\n }\n _links: {\n self: { href: string }\n first: { href: string }\n last: { href: string }\n next: { href: string }\n prev: { href: string }\n }\n page: {\n totalElements: number\n number: number\n size: number\n totalPages: number\n }\n}\n\nexport const eventKeys = {\n all: ['events'] as const,\n lists: () => [...eventKeys.all, 'list'] as const,\n list: (filters: EventFilters) => [...eventKeys.lists(), filters] as const,\n active: () => [...eventKeys.all, 'active'] as const,\n detail: (id: string) => [...eventKeys.all, 'detail', id] as const,\n}\n\nasync function fetchEvents(filters: EventFilters): Promise {\n const params = new URLSearchParams()\n if (filters.category) params.set('category', filters.category)\n if (filters.page) params.set('page', filters.page.toString())\n const url = new URL(`/api/getevents?${params.toString()}`, process.env.NEXT_PUBLIC_BASE_URL)\n const response = await fetch(url)\n if (!response.ok) {\n throw new Error('Failed to fetch events')\n }\n return response.json()\n}\n\nasync function fetchEvent(id: string): Promise {\n if (!id) return null\n console.log('Fetching event with ID:', id)\n const url = new URL(`/api/getEvent?id=${id}`, process.env.NEXT_PUBLIC_BASE_URL)\n\n try {\n const response = await fetch(url)\n if (!response.ok) return null\n\n const data = await response.json()\n return data.item || null\n } catch (error) {\n console.error('Error fetching event:', error)\n return null\n }\n}\n\nexport function useEventsInfiniteQuery(filters: Omit) {\n return useInfiniteQuery({\n queryKey: eventKeys.list(filters),\n queryFn: ({ pageParam = 0 }) => fetchEvents({ ...filters, page: pageParam }),\n initialPageParam: 0,\n getNextPageParam: (lastPage) => {\n if (lastPage.page.number < lastPage.page.totalPages - 1) {\n return lastPage.page.number + 1\n }\n return undefined\n },\n select: (data) => ({\n pages: data.pages,\n pageParams: data.pageParams,\n events: data.pages.flatMap((page) => page._embedded.events),\n total: data.pages[0]?.page.totalElements || 0,\n }),\n })\n}\n\nexport function useEventQuery(id: string) {\n const queryClient = useQueryClient()\n console.log('useEventQuery called with ID:', id)\n\n return useQuery({\n queryKey: eventKeys.detail(id),\n queryFn: async () => {\n console.log('Query function executing for ID:', id)\n if (!id) return null\n return fetchEvent(id)\n },\n initialData: () => {\n // Try to find the event in the infinite query cache first\n const infiniteData = queryClient.getQueryData<{\n pages: EventsResponse[]\n }>(eventKeys.lists())\n\n if (infiniteData) {\n const event = infiniteData.pages.flatMap((page) => page._embedded.events).find((event) => event.id === id)\n\n if (event) {\n console.log('Found event in cache:', event)\n return event\n }\n }\n return undefined // Let it fetch if not in cache\n },\n enabled: !!id,\n refetchOnMount: true, // Always refetch on mount to ensure fresh data\n staleTime: 0, // Consider data immediately stale to trigger refetch\n })\n}\n\n// Hook to manage active event state\nexport function useActiveEvent(id?: string) {\n const queryClient = useQueryClient()\n const { data: event } = useEventQuery(id)\n\n // Pre-fetch related data when an event becomes active\n const preFetchEventData = async (eventId: string) => {\n const event = await fetchEvent(eventId)\n queryClient.setQueryData(eventKeys.detail(eventId), event)\n\n // Pre-fetch related data like tickets, contract info, etc.\n // This will be implemented when we add those queries\n }\n\n return {\n event,\n preFetchEventData,\n }\n}\n\nexport function useEventDetails() {\n const pathname = usePathname()\n const [correctPath, setCorrectPath] = useState(false)\n const [currentTab, setCurrentTab] = useState()\n const [category, setCategory] = useState()\n const [id, setId] = useState('')\n const [parent, setParent] = useState()\n\n const calculateDetails = useCallback(() => {\n console.log('eventTabList ', pathname)\n const splitPathName = pathname.split('/')\n setCorrectPath(splitPathName.length == 5)\n setCurrentTab(splitPathName[splitPathName.length - 1])\n setCategory(splitPathName[2])\n setId(splitPathName[3] || '')\n setParent(splitPathName[1])\n }, [pathname])\n\n useEffect(() => {\n calculateDetails()\n }, [pathname])\n\n return { correctPath, currentTab, category, id, parent }\n}\n","'use client'\n\nimport { useWallet } from '@txnlab/use-wallet'\nimport { useSearchParams } from 'next/navigation'\nimport { useSnackbar } from 'notistack'\nimport { FiChevronDown, FiChevronUp, FiMinus, FiPlus, FiTrash2, FiUsers } from 'react-icons/fi'\n\nimport Card from '../components/base/Card'\nimport { useCartStore } from '../components/cart/CartButton'\nimport RequireWallet from '../components/RequireWallet'\nimport { useCartMutations, useCartQuery } from '../hooks/queries/useCartQueries'\nimport { useEventDetails, useEventQuery } from '../hooks/queries/useEventQueries'\nimport { calculateTicketDiscount, formatPrice } from '../utils/ticketDiscounts'\n\nexport default function CartComponent() {\n const searchParams = useSearchParams()\n const { id } = useEventDetails()\n console.log({ id })\n const { data: event } = useEventQuery(id)\n const { data: cart } = useCartQuery()\n const { updateQuantity, removeFromCart, clearCart, purchaseCart, isPurchasing } = useCartMutations(event)\n const isOpen = useCartStore((state) => state.isOpen)\n const toggle = useCartStore((state) => state.toggle)\n const { enqueueSnackbar } = useSnackbar()\n const { activeAddress } = useWallet()\n console.log({ cart })\n const handleQuantityChange = (section: string, currentQty: number, delta: number) => {\n const newQty = currentQty + delta\n if (newQty >= 0) {\n if (newQty === 0) {\n removeFromCart(section)\n } else {\n updateQuantity({ section, quantity: newQty })\n }\n }\n }\n\n const handleCheckout = async () => {\n if (!cart?.items.length) return\n\n try {\n await purchaseCart(cart.items)\n enqueueSnackbar('Tickets purchased successfully!', { variant: 'success' })\n } catch (err) {\n enqueueSnackbar(err instanceof Error ? err.message : 'Failed to process transaction', { variant: 'error' })\n }\n }\n\n return (\n
\n \n
\n
\n
\n

Your Cart

\n \n
\n\n \n {!cart?.items.length ? (\n \n
\n
\n
\n \n \n \n
\n
\n

Your cart is empty

\n

Add tickets to get started

\n
\n
\n
\n
\n ) : (\n <>\n {cart.items.map((item) => {\n const priceInfo = calculateTicketDiscount(\n Number(item.originalPrice || item.price),\n item.quantity,\n item.ticketMap?.ticketRange,\n )\n const displayPrice = Number(item.price)\n return (\n
\n
\n

{item.section}

\n

{item.details}

\n
\n\n
\n handleQuantityChange(item.section, item.quantity, -1)}\n className=\"p-1.5 rounded-full hover:bg-white/10\"\n >\n \n \n\n {item.quantity}\n\n handleQuantityChange(item.section, item.quantity, 1)}\n className=\"p-1.5 rounded-full hover:bg-white/10\"\n >\n \n \n
\n\n
\n
\n {priceInfo.discountedPrice ? (\n <>\n {formatPrice(priceInfo.originalPrice)}\n {formatPrice(displayPrice)}\n \n ) : (\n {formatPrice(displayPrice)}\n )}\n per ticket\n
\n\n removeFromCart(item.section)}\n className=\"text-gray-400 hover:text-red-500 transition-colors\"\n >\n \n \n
\n\n {item.ticketMap?.ticketRange?.priceRange?.discounts && (\n
\n
\n \n {priceInfo.discountText}\n
\n\n {priceInfo.isGroupDiscount && (\n
Save {formatPrice(priceInfo.savings)}
\n )}\n
\n )}\n
\n )\n })}\n\n
\n
\n
\n Subtotal\n {formatPrice(cart.total)}\n
\n
\n Service Fee\n {formatPrice(cart.total * 0.1)}\n
\n
\n Total\n {formatPrice(cart.total * 1.1)}\n
\n
\n\n \n
\n \n {isPurchasing ? (\n <>\n \n \n \n \n Processing...\n \n ) : (\n <>\n Checkout\n \n ({cart.items.length} {cart.items.length === 1 ? 'item' : 'items'})\n \n \n )}\n \n\n clearCart()}\n className=\"w-full py-2 px-4 text-sm text-gray-400 hover:text-white transition-colors flex items-center justify-center gap-2\"\n >\n \n Clear cart\n \n
\n
\n
\n \n )}\n
\n
\n
\n \n \n )\n}\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use client'\n\nimport { cn } from '../../utils/cn'\n\ninterface CardProps extends React.HTMLAttributes {\n children: React.ReactNode\n isSelected?: boolean\n isInteractive?: boolean\n}\n\nexport function Card({ children, className, isSelected = false, isInteractive = true, ...props }: CardProps) {\n return (\n \n {children}\n \n )\n}\n\nexport default Card\n","export default function LoadingCart() {\n return (\n
\n
\n
\n {[1, 2].map((i) => (\n
\n
\n
\n
\n
\n
\n
\n ))}\n
\n
\n
\n )\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\n/**\n * Merge multiple class names with Tailwind CSS classes\n * @param inputs Class names to merge\n * @returns Merged class names\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","'use client'\n\nimport { FiShoppingCart } from 'react-icons/fi'\nimport { create } from 'zustand'\nimport { useCartQuery } from '../../hooks/queries/useCartQueries'\n\ninterface CartStore {\n isOpen: boolean\n toggle: () => void\n}\n\nexport const useCartStore = create((set) => ({\n isOpen: false,\n toggle: () => set((state) => ({ isOpen: !state.isOpen })),\n}))\n\nexport default function CartButton() {\n const { data: cart } = useCartQuery()\n const toggle = useCartStore((state) => state.toggle)\n\n return (\n \n
\n \n {cart?.items.length ? (\n \n {cart.items.length}\n \n ) : null}\n
\n \n )\n}\n","import { TICKETRANGE } from '../types/graphql/API'\n\nexport interface DiscountInfo {\n originalPrice: number\n discountedPrice: number | null\n savings: number\n isGroupDiscount: boolean\n discountText: string | null\n remainingForDiscount: number\n totalPrice: number // Total price after applying discount\n pricePerTicket: number // Price per ticket after applying discount\n quantity: number\n}\n\nexport function calculateTicketDiscount(basePrice: number, quantity: number, ticketRange?: TICKETRANGE): DiscountInfo {\n const result: DiscountInfo = {\n originalPrice: basePrice,\n discountedPrice: null,\n savings: 0,\n isGroupDiscount: false,\n discountText: null,\n remainingForDiscount: 0,\n totalPrice: 0,\n pricePerTicket: basePrice,\n quantity: quantity,\n }\n\n const { percentage } = ticketRange?.priceRange?.discounts || { percentage: 0 }\n const { maxTicket } = ticketRange?.priceRange || { maxTicket: 1 }\n const isGroupSize = percentage > 0 && quantity === maxTicket\n\n if (!isGroupSize) {\n // Calculate total and per ticket prices\n if (quantity > 0) {\n const totalOriginal = basePrice * quantity\n if (result.discountedPrice) {\n result.totalPrice = result.discountedPrice * quantity\n result.pricePerTicket = result.discountedPrice\n } else {\n result.totalPrice = totalOriginal\n result.pricePerTicket = basePrice\n }\n } else {\n result.totalPrice = 0\n result.pricePerTicket = basePrice\n }\n }\n\n // Calculate remaining tickets needed for discount\n result.remainingForDiscount = isGroupSize ? 0 : maxTicket - quantity\n\n // Set discount text\n if (isGroupSize) {\n result.discountText = `${percentage}% group discount applied`\n } else if (quantity > 0) {\n result.discountText = `Add ${result.remainingForDiscount} more ${\n result.remainingForDiscount === 1 ? 'ticket' : 'tickets'\n } for ${percentage}% off`\n } else {\n result.discountText = `${percentage}% off for groups of ${maxTicket}`\n }\n\n // Calculate prices if group discount applies\n if (isGroupSize) {\n const totalOriginal = basePrice * quantity\n const discountMultiplier = 1 - percentage / 100\n const totalDiscounted = totalOriginal * discountMultiplier\n\n result.discountedPrice = totalDiscounted / quantity // Per ticket price\n result.savings = totalOriginal - totalDiscounted\n result.totalPrice = totalDiscounted\n result.isGroupDiscount = true\n }\n\n return result\n}\n\nexport function formatPrice(price: number): string {\n return `Ⱥ ${price.toFixed(2)}`\n}\n","'use client'\n\nimport { useWallet } from '@txnlab/use-wallet'\nimport { ReactNode, useState } from 'react'\nimport ConnectWallet from './ConnectWallet'\n\ninterface RequireWalletProps {\n children: ReactNode\n message?: string\n}\n\nexport default function RequireWallet({ children, message = 'Please connect your wallet to continue' }: RequireWalletProps) {\n const { activeAddress } = useWallet()\n const [showWalletModal, setShowWalletModal] = useState(false)\n\n if (!activeAddress) {\n return (\n
\n

{message}

\n setShowWalletModal(true)}\n className=\"px-6 py-2 bg-[#9D5AF2] hover:bg-[#8A4AE0] rounded-xl font-medium text-white transition-colors\"\n >\n Connect Wallet\n \n setShowWalletModal(false)} />\n
\n )\n }\n\n return <>{children}\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useWallet } from '@txnlab/use-wallet'\nimport { createTicketContractService } from '../../services/ticketContract'\nimport { EVENTSMODEL } from '../../types/graphql/API'\n\nexport const cartKeys = {\n all: ['cart'] as const,\n items: () => [...cartKeys.all, 'items'] as const,\n event: (eventId: string) => [...cartKeys.all, 'event', eventId] as const,\n}\n\n// Local storage functions\nconst CART_STORAGE_KEY = 'soti_cart'\n\nasync function getStoredCart(): Promise {\n if (typeof window === 'undefined') return { items: [], total: 0, isCheckingOut: false }\n const stored = localStorage.getItem(CART_STORAGE_KEY)\n return stored ? JSON.parse(stored) : { items: [], total: 0, isCheckingOut: false }\n}\n\nasync function setStoredCart(cart: CartState): Promise {\n if (typeof window === 'undefined') return cart\n localStorage.setItem(CART_STORAGE_KEY, JSON.stringify(cart))\n return cart\n}\n\n// Cart Query Hook\nexport function useCartQuery() {\n return useQuery({\n queryKey: cartKeys.items(),\n queryFn: getStoredCart,\n staleTime: Infinity, // Cart data is managed through mutations\n })\n}\n\n// Cart Mutation Hooks\nexport function useCartMutations(event?: EVENTSMODEL) {\n const queryClient = useQueryClient()\n const { activeAddress, signer } = useWallet()\n\n // Add to Cart\n const addToCart = useMutation({\n mutationFn: async (item: Omit): Promise => {\n const cart = await getStoredCart()\n const existingItemIndex = cart.items.findIndex((i) => i.section === item.section)\n\n if (existingItemIndex >= 0) {\n cart.items[existingItemIndex].quantity += item.quantity\n } else {\n cart.items.push({ ...item, eventId: event?.id || '', boxId: item.box?.id || 0 })\n }\n\n // Calculate total\n cart.total = cart.items.reduce((sum, item) => {\n return sum + Number(item.price) * item.quantity\n }, 0)\n\n return setStoredCart(cart)\n },\n onSuccess: (newCart) => {\n queryClient.setQueryData(cartKeys.items(), newCart)\n },\n })\n\n // Update Quantity\n const updateQuantity = useMutation({\n mutationFn: async ({ section, quantity }: { section: string; quantity: number }): Promise => {\n const cart = await getStoredCart()\n const itemIndex = cart.items.findIndex((i) => i.section === section)\n\n if (itemIndex >= 0) {\n if (quantity === 0) {\n cart.items.splice(itemIndex, 1)\n } else {\n cart.items[itemIndex].quantity = quantity\n }\n }\n\n // Calculate total\n cart.total = cart.items.reduce((sum, item) => {\n return sum + Number(item.price) * item.quantity\n }, 0)\n\n return setStoredCart(cart)\n },\n onSuccess: (newCart) => {\n queryClient.setQueryData(cartKeys.items(), newCart)\n },\n })\n\n // Remove from Cart\n const removeFromCart = useMutation({\n mutationFn: async (section: string): Promise => {\n const cart = await getStoredCart()\n cart.items = cart.items.filter((i) => i.section !== section)\n cart.total = cart.items.reduce((sum, item) => {\n return sum + Number(item.price) * item.quantity\n }, 0)\n return setStoredCart(cart)\n },\n onSuccess: (newCart) => {\n queryClient.setQueryData(cartKeys.items(), newCart)\n },\n })\n\n // Clear Cart\n const clearCart = useMutation({\n mutationFn: async (): Promise => {\n const emptyCart = { items: [], total: 0, isCheckingOut: false }\n return setStoredCart(emptyCart)\n },\n onSuccess: (newCart) => {\n queryClient.setQueryData(cartKeys.items(), newCart)\n },\n })\n\n // Purchase Cart Items\n const purchaseCart = useMutation({\n mutationFn: async (items: CartItem[]) => {\n if (!event?.name || !event.contract?.appId || !activeAddress) {\n throw new Error('Missing required data for purchase')\n }\n\n const ticketService = createTicketContractService(event.name, event.contract.appId, activeAddress, signer)\n\n const result = await ticketService.purchaseTickets(items)\n if (!result?.success) {\n throw new Error('Purchase failed')\n }\n\n return result\n },\n onSuccess: () => {\n // Clear cart after successful purchase\n clearCart.mutate()\n\n // Invalidate relevant queries\n queryClient.invalidateQueries({ queryKey: ['tickets'] })\n queryClient.invalidateQueries({ queryKey: ['events'] })\n },\n })\n\n return {\n addToCart: addToCart.mutate,\n updateQuantity: updateQuantity.mutate,\n removeFromCart: removeFromCart.mutate,\n clearCart: clearCart.mutate,\n purchaseCart: purchaseCart.mutate,\n isPurchasing: purchaseCart.isPending,\n purchaseError: purchaseCart.error,\n }\n}\n","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const destroy = () => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.\"\n );\n }\n listeners.clear();\n };\n const api = { setState, getState, getInitialState, subscribe, destroy };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;\nvar vanilla = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'.\"\n );\n }\n return createStore(createState);\n};\n\nexport { createStore, vanilla as default };\n","import { createStore } from 'zustand/vanilla';\nexport * from 'zustand/vanilla';\nimport ReactExports from 'react';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector.js';\n\nconst { useDebugValue } = ReactExports;\nconst { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;\nlet didWarnAboutEqualityFn = false;\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity, equalityFn) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && equalityFn && !didWarnAboutEqualityFn) {\n console.warn(\n \"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937\"\n );\n didWarnAboutEqualityFn = true;\n }\n const slice = useSyncExternalStoreWithSelector(\n api.subscribe,\n api.getState,\n api.getServerState || api.getInitialState,\n selector,\n equalityFn\n );\n useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && typeof createState !== \"function\") {\n console.warn(\n \"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.\"\n );\n }\n const api = typeof createState === \"function\" ? createStore(createState) : createState;\n const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = (createState) => createState ? createImpl(createState) : createImpl;\nvar react = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`.\"\n );\n }\n return create(createState);\n};\n\nexport { create, react as default, useStore };\n","import { useWallet } from '@txnlab/use-wallet'\n\nconst ellipseAddress = (address: string | undefined) => {\n if (!address) return ''\n return `${address.slice(0, 4)}...${address.slice(-4)}`\n}\n\nconst Account = () => {\n const { activeAddress } = useWallet()\n\n const networkName = process.env.NEXT_PUBLIC_ALGOD_NETWORK || 'testnet'\n // const dappFlowNetworkName = networkName.toLowerCase()\n\n return (\n
\n
\n \n
Address
\n {ellipseAddress(activeAddress)}\n \n
\n
Network
\n
{networkName}
\n
\n
\n
\n )\n}\n\nexport default Account\n","import { Provider, useWallet } from '@txnlab/use-wallet'\nimport Image from 'next/image'\nimport Account from './Account'\n\ninterface ConnectWalletInterface {\n openModal: boolean\n closeModal: () => void\n}\n\nconst ConnectWallet = ({ openModal, closeModal }: ConnectWalletInterface) => {\n const { providers, activeAddress } = useWallet()\n\n const isKmd = (provider: Provider) => provider.metadata.name.toLowerCase() === 'kmd'\n\n if (!openModal) return null\n\n return (\n
\n
\n
\n

Select Wallet

\n \n
\n\n
\n {activeAddress && (\n <>\n \n
\n \n )}\n\n {!activeAddress && (\n
\n {providers?.map((provider) => (\n provider.connect()}\n className=\"flex items-center gap-3 w-full rounded-xl border border-gray-700 bg-[#12132D] p-4 \n hover:border-[#9D5AF2] hover:bg-[#1A1B3D] transition-all duration-200\"\n >\n {!isKmd(provider) && (\n \n )}\n {isKmd(provider) ? 'LocalNet Wallet' : provider.metadata.name}\n \n ))}\n
\n )}\n
\n\n
\n {activeAddress && (\n {\n if (providers) {\n const activeProvider = providers.find((p) => p.isActive)\n if (activeProvider) {\n activeProvider.disconnect()\n } else {\n localStorage.removeItem('txnlab-use-wallet')\n window.location.reload()\n }\n }\n }}\n >\n Disconnect Wallet\n \n )}\n \n Close\n \n
\n
\n
\n )\n}\n\nexport default ConnectWallet\n"],"names":["useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","eventKeys","all","lists","list","filters","active","detail","id","fetchEvents","params","URLSearchParams","category","set","page","toString","url","URL","process","response","fetch","ok","json","fetchEvent","console","log","data","item","error","useEventsInfiniteQuery","queryKey","useInfiniteQuery","queryFn","pageParam","initialPageParam","getNextPageParam","lastPage","number","totalPages","select","pages","pageParams","events","flatMap","_embedded","total","totalElements","useEventQuery","queryClient","useQueryClient","useQuery","initialData","infiniteData","getQueryData","event","find","enabled","refetchOnMount","staleTime","useEventDetails","pathname","usePathname","correctPath","setCorrectPath","useState","currentTab","setCurrentTab","setCategory","setId","parent","setParent","calculateDetails","splitPathName","split","length","useEffect","CartComponent","useSearchParams","cart","useCartQuery","updateQuantity","removeFromCart","clearCart","purchaseCart","isPurchasing","useCartMutations","isOpen","useCartStore","state","toggle","enqueueSnackbar","useSnackbar","activeAddress","useWallet","handleQuantityChange","section","currentQty","delta","newQty","quantity","handleCheckout","items","variant","err","Error","message","div","className","h2","button","onClick","FiChevronDown","FiChevronUp","map","priceInfo","calculateTicketDiscount","Number","originalPrice","price","ticketMap","ticketRange","displayPrice","h3","p","details","FiMinus","span","FiPlus","discountedPrice","formatPrice","FiTrash2","priceRange","discounts","FiUsers","discountText","isGroupDiscount","savings","RequireWallet","disabled","svg","viewBox","circle","cx","cy","r","stroke","strokeWidth","fill","path","d","Card","strokeLinecap","strokeLinejoin","children","isSelected","isInteractive","props","cn","LoadingCart","i","inputs","twMerge","clsx","create","CartButton","aria-label","FiShoppingCart","basePrice","result","remainingForDiscount","totalPrice","pricePerTicket","percentage","maxTicket","isGroupSize","totalOriginal","totalDiscounted","discountMultiplier","toFixed","showWalletModal","setShowWalletModal","ConnectWallet","openModal","closeModal","cartKeys","eventId","getStoredCart","stored","localStorage","getItem","CART_STORAGE_KEY","JSON","parse","isCheckingOut","setStoredCart","setItem","stringify","Infinity","signer","addToCart","useMutation","mutationFn","existingItemIndex","findIndex","push","boxId","box","reduce","sum","onSuccess","setQueryData","newCart","itemIndex","splice","filter","emptyCart","name","contract","appId","ticketService","createTicketContractService","purchaseTickets","success","mutate","invalidateQueries","isPending","purchaseError","ellipseAddress","address","slice","Account","networkName","env","NEXT_PUBLIC_ALGOD_NETWORK","a","target","rel","href","providers","isKmd","provider","metadata","toLowerCase","data-test-id","connect","Image","alt","src","icon","width","height","style","objectFit","activeProvider","isActive","disconnect","removeItem","window","location","reload"],"sourceRoot":"","ignoreList":[1,5,8,10,14,16,17]}