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EAAAC,IAAA,EAACC,MAAAA,CAAIC,UAAU,oCACb,GAAAH,EAAAI,GAAA,EAAC4H,IAAKA,CACJC,IAAI,uBACJC,IAAI,mBACJ1G,MAAO,GACPC,OAAQ,KAEV,GAAAzB,EAAAI,GAAA,EAACwH,IAAAA,CACCtH,QA7gBQ,KAClBiH,GAEFgC,OAAOC,QAAQ,CAACC,IAAI,CAAG,sBAGvBC,UAAUC,SAAS,CAChBC,SAAS,CAAC,mBACVC,IAAI,CAAC,KACJC,EAAAA,EAAKA,CAACC,OAAO,CAAC,SAChB,GACCC,KAAK,CAAC,IACLhL,QAAQD,KAAK,CAAC,mBAAoBkL,EACpC,EAEN,EA+fgB9J,UAAU,iDACX,gCAUjB","sources":["webpack://_N_E/./api/productPage.ts","webpack://_N_E/./api/availabilityShortage.ts","webpack://_N_E/./utils/getProductAvailabilites.ts","webpack://_N_E/./utils/removeDublicateTimeSlots.js","webpack://_N_E/./shared-components/CurrencySwitcher/CurrencySwitcherToggle.tsx","webpack://_N_E/./shared-components/CurrencySwitcher/CurrencySwitcherDropdown.tsx","webpack://_N_E/./components/CalendarAndPax/DateAndPax.tsx","webpack://_N_E/./node_modules/react-calendar/dist/Calendar.css","webpack://_N_E/"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { ATTRACTION_PAGE_INTERFACE } from './attraction';\nimport {\n ATTRACTION_INTERFACE,\n CARDMEDIAINTERFACE,\n PRODUCTINTERFACE\n} from './commonInterfaces';\n\nconst FETCH_PRODUCT_PRIVATE = gql`\n query FETCH_PRODUCT_PRIVATE($slug: JSON!, $Id: String) {\n product: products(where: { slug: $slug }) {\n id: boat_id\n name\n slug\n metaDescription: meta_description\n canonical\n pageTitle: title\n type\n trustBar: trust_bar\n shortDescription: short_description\n longDescription: long_description\n cardMessage: card_message\n trustBar: trust_bar\n tourIncludes: tour_includes\n importantInfo: important_info\n duration\n price\n FAQ\n carousel: carousel_media {\n id\n name\n alt: alternativeText\n url\n fragment: caption\n type: provider_metadata\n }\n cities {\n id\n name\n slug\n }\n reviews {\n id\n rating\n }\n attractions {\n id\n name\n slug\n cardSnippet: snippet\n cardMedia: card_media {\n id\n name\n alt: alternativeText\n url\n fragment: caption\n type: provider_metadata\n }\n cardMediaAlt: media_library {\n id\n name\n alt: alternativeText\n url\n fragment: caption\n type: provider_metadata\n }\n city {\n id\n name\n slug\n }\n }\n relatedProducts: related_products {\n id: boat_id\n name\n slug\n duration\n price\n cardSnippet: snippet\n cardMessage: card_message\n cardMedia: card_media {\n id\n name\n alt: alternativeText\n url\n fragment: caption\n type: provider_metadata\n }\n carousel: carousel_media {\n id\n name\n alt: alternativeText\n url\n fragment: caption\n type: provider_metadata\n }\n reviews {\n id\n rating\n }\n }\n cardMedia: card_media {\n url\n }\n private\n }\n reviews(where: { product: { slug: $slug } }) {\n id\n review\n title\n traveller\n rating\n date\n source\n created_at\n }\n rezdy: boatnew_products(where: { slug: { _eq: $Id } }) {\n id\n rezdy {\n rezdyId: rezdy_id\n }\n booking_cutoff\n }\n }\n`;\n\nconst FETCH_PRODUCT_CAROUSAL = gql`\n query FETCH_PRODUCT_PRIVATE($slug: JSON!, $Id: String) {\n product: products(where: { slug: $slug }) {\n id: boat_id\n name\n slug\n metaDescription: meta_description\n canonical\n pageTitle: title\n type\n trustBar: trust_bar\n shortDescription: short_description\n longDescription: long_description\n cardMessage: card_message\n trustBar: trust_bar\n tourIncludes: tour_includes\n importantInfo: important_info\n duration\n price\n FAQ\n carousel: carousel_media {\n id\n name\n alt: alternativeText\n url\n fragment: caption\n type: provider_metadata\n }\n }\n }\n`;\n\nconst FETCH_PRODUCT_DETAILS = gql`\n query FETCH_PRODUCT_DETAILS($slug: JSON!) {\n productDetails(where: { slug: $slug }) {\n rezdyId\n adult\n child\n infant\n options {\n id\n start_time\n }\n }\n }\n`;\n\nconst FETCH_PRODUCT_URL = gql`\n query FETCH_PRODUCT_URL($id: JSON!) {\n product: products(where: { boat_id: $id }) {\n cardMedia: card_media {\n url\n }\n }\n }\n`;\n\nconst FETCH_PRODUCT_BOAT = gql`\n query FETCH_PRODUCT_BOAT($id: String!) {\n product: boatnew_products_by_pk(id: $id) {\n id\n quantityMin: quantity_min\n quantityMax: quantity_max\n cancelCutOff: cancel_cutoff\n citiesProducts: cities_products {\n city {\n timeZone: time_zone\n gmb_link\n }\n }\n }\n }\n`;\ninterface FETCH_PRODUCT_INTERFACE {\n product: [\n {\n id: string;\n name: string;\n slug: string;\n metaDescription: string;\n canonical: string;\n pageTitle: string;\n type: string;\n trustBar: string;\n shortDescription: string;\n longDescription: string;\n cardMessage: string;\n tourIncludes: [string];\n importantInfo: [string];\n duration: number;\n price: number;\n FAQ: [string];\n carousel: [CARDMEDIAINTERFACE];\n cities: [\n {\n id: string;\n name: string;\n slug: string;\n }\n ];\n attractions: [ATTRACTION_INTERFACE];\n relatedProducts: [PRODUCTINTERFACE];\n cardMedia: {\n url: string;\n };\n private: string;\n }\n ];\n}\ninterface FETCH_PRODUCT_DETAILS_INTERFACE {\n productDetails: [\n {\n rezdyId: string;\n adult: number;\n child: number;\n infant: number;\n options: {\n id: string;\n start_time: string;\n };\n }\n ];\n}\ninterface FETCH_PRODUCT_URL_INTERFACE {\n product: {\n cardMedia: [CARDMEDIAINTERFACE];\n };\n}\ninterface FETCH_PRODUCT_BOAT_INTERFACE {\n product: {\n id: string;\n quantityMin: number;\n quantityMax: number;\n cancelCutOff: number;\n citiesProducts: [\n {\n city: {\n timeZone: string;\n gmb_link: {\n city: string;\n };\n };\n }\n ];\n };\n}\nexport {\n FETCH_PRODUCT_PRIVATE,\n FETCH_PRODUCT_DETAILS,\n FETCH_PRODUCT_URL,\n FETCH_PRODUCT_BOAT,\n FETCH_PRODUCT_CAROUSAL\n};\nexport type {\n FETCH_PRODUCT_INTERFACE,\n FETCH_PRODUCT_DETAILS_INTERFACE,\n FETCH_PRODUCT_URL_INTERFACE,\n FETCH_PRODUCT_BOAT_INTERFACE\n};\n","import { gql } from '@apollo/client';\n\nconst INSERT_AVAILABILITY_NOTIFICATION = gql`\n mutation INSERT_NOTIFICATION(\n $id: Int!\n $seats_remaining: Int!\n $slot: String\n $date: String\n $tour: String\n $total_seats: Int!\n $managerEmail: String\n $city: String\n ) {\n insert_boatnew_availability_shortage(\n objects: {\n id: $id\n seats_remaining: $seats_remaining\n slot_time: $slot\n date: $date\n tour: $tour\n total_seats: $total_seats\n managerEmail: $managerEmail\n city: $city\n }\n ) {\n returning {\n id\n }\n }\n }\n`;\nexport const AVAILABILITY_NOTIFICATION_STATUS = gql`\n query AVAILABILITY_NOTIFICATION_STATUS($id: Int!) {\n boatnew_availability_shortage(where: { id: { _eq: $id } }) {\n id\n }\n }\n`;\n\nexport const BOATNEW_PRODUCTS_WITH_CITIES = gql`\n query BOATNEW_PRODUCTS_WITH_CITIES {\n boatnew_products {\n cities_products {\n city {\n ops_manager {\n email\n first_name\n }\n name\n }\n }\n }\n }\n`;\n\nexport default INSERT_AVAILABILITY_NOTIFICATION;\n","import axios from 'axios';\nimport { PASSENGERINFO } from '../components/Checkout';\nimport dayjs from 'dayjs';\nimport client from '../apollo-client';\n\nimport INSERT_AVAILABILITY_NOTIFICATION, {\n AVAILABILITY_NOTIFICATION_STATUS,\n BOATNEW_PRODUCTS_WITH_CITIES\n} from '../api/availabilityShortage';\ntype axiosReturn = {\n data: [\n {\n id: number;\n startTime: string;\n endTime: string;\n allDay: boolean;\n seats: number;\n seatsAvailable: 150;\n prices: PASSENGERINFO[];\n }\n ];\n};\ninterface PRODUCTAVAILABILITY {\n id: number;\n startTime: string;\n endTime: string;\n allDay: boolean;\n seats: number;\n seatsAvailable: number;\n prices: PASSENGERINFO[];\n}\ntype FetchProductInterface = {\n rezdyId: string;\n startDate: any;\n privateTour?: boolean;\n tourName: string;\n cityName: string;\n slug?: string;\n};\n\nexport const fetchProductAvailabilities = async ({\n rezdyId,\n startDate,\n privateTour,\n tourName,\n cityName,\n slug\n}: FetchProductInterface) => {\n const {\n data: { data: productAvailabities }\n } = await axios.post(\n `${process.env.NEXT_PUBLIC_AVAILABILITY_URI}/availability`,\n {\n code: rezdyId,\n startDate: dayjs(startDate).startOf('month').format('YYYY-MM-DD'),\n endDate: dayjs(startDate)\n .startOf('month')\n .add(2, 'month')\n .format('YYYY-MM-DD')\n },\n {\n headers: {\n 'Content-Type': 'application/json'\n }\n }\n );\n if (!productAvailabities) {\n const {\n data: { data: productAvailabities }\n } = await axios.get(\n `${process.env.NEXT_PUBLIC_AVAILABILITY_URI}/firstAvailability/${rezdyId}`\n );\n return productAvailabities;\n }\n\n if (privateTour) {\n const data = cleanPrivateAvailability(productAvailabities, slug);\n }\n\n tourName !== undefined &&\n notifyShortage(productAvailabities, tourName, cityName);\n return productAvailabities;\n};\nexport const updateProductAvailabitoes = async ({\n rezdyId,\n startDate,\n privateTour,\n tourName,\n cityName,\n slug\n}: FetchProductInterface) => {\n const {\n data: { data: productAvailabities }\n } = await axios.post(\n `${process.env.NEXT_PUBLIC_AVAILABILITY_URI}/availability`,\n {\n code: rezdyId,\n startDate: dayjs(startDate).startOf('month').format('YYYY-MM-DD'),\n endDate: dayjs(startDate)\n .startOf('month')\n .add(1, 'month')\n .format('YYYY-MM-DD')\n },\n {\n headers: {\n 'Content-Type': 'application/json'\n }\n }\n );\n\n if (privateTour) {\n return cleanPrivateAvailability(productAvailabities, slug);\n }\n notifyShortage(productAvailabities, tourName, cityName);\n\n return productAvailabities;\n};\n\ninterface ProductAvailabities {\n seatsAvailable: number;\n prices: [\n {\n label: string;\n price: number;\n }\n ];\n}\n\nconst cleanPrivateAvailability = (\n productAvailabities: PRODUCTAVAILABILITY[],\n slug?: string\n) => {\n const cleanLessThen7 = productAvailabities.filter(\n availability =>\n availability.seatsAvailable >= 7 || slug === 'private-tour-of-chicago'\n );\n const adjustedPrices = cleanLessThen7.map(availability => {\n const priceOptionsLimit = availability.seatsAvailable;\n return {\n ...availability,\n prices: availability.prices.slice(0, priceOptionsLimit)\n };\n });\n return adjustedPrices;\n};\nconst notifyShortage = async (\n productAvailabilities: PRODUCTAVAILABILITY[],\n tourName: string,\n cityName: string\n) => {\n const shortage = productAvailabilities.filter(\n availability => availability.seatsAvailable <= 1\n );\n if (shortage.length > 0) {\n const { data } = await client.query({\n query: BOATNEW_PRODUCTS_WITH_CITIES\n });\n const managersEmails = Array.from(\n new Set(\n data.boatnew_products\n .flatMap((product: any) => product?.cities_products)\n .filter(\n (cityProduct: any) =>\n cityProduct?.city?.name?.trim().toLowerCase() ===\n cityName?.trim().toLowerCase()\n )\n .map((cityProduct: any) => cityProduct.city.ops_manager?.email)\n .filter((email: any) => email)\n )\n );\n for (const shortageItem of shortage) {\n const { id, seatsAvailable, seats } = shortageItem;\n\n try {\n const alreadyNotified = await client.query({\n query: AVAILABILITY_NOTIFICATION_STATUS,\n variables: { id }\n });\n if (alreadyNotified.data.boatnew_availability_shortage.length === 0) {\n await client.mutate({\n mutation: INSERT_AVAILABILITY_NOTIFICATION,\n variables: {\n id,\n seats_remaining: seatsAvailable,\n total_seats: seats,\n slot: `${dayjs(shortageItem.startTime).format('hh:mm A')}-${dayjs(\n shortageItem.endTime\n ).format('hh:mm A')} `,\n date: dayjs(shortageItem.startTime).format('YYYY-MM-DD'),\n tour: tourName,\n managerEmail: managersEmails[0],\n city: cityName\n }\n });\n }\n } catch (error) {\n console.error('Error inserting notification:', error);\n }\n }\n }\n};\n","function removeDuplicates(arr) {\n const uniqueIds = {};\n return arr.filter(obj => {\n if (!uniqueIds[obj.id]) {\n uniqueIds[obj.id] = true;\n return true;\n }\n return false;\n });\n}\nexport default removeDuplicates;\n","import { useState, useContext, useEffect } from 'react';\nimport { PaxContext } from '../../utils/context/checkoutContext';\n\nexport const CurrencySwitcherToggle = () => {\n const { currency, updateCurrency }: any = useContext(PaxContext);\n\n // Get currency and updateCurrency from context\n const [selectedCurrency, setSelectedCurrency] = useState(currency); // Set the initial state based on context\n\n useEffect(() => {\n setSelectedCurrency(currency);\n }, [currency]);\n\n const handleCurrencyChange = (newCurrency: string) => {\n setSelectedCurrency(newCurrency); // Update the local state\n updateCurrency(newCurrency); // Update the context\n };\n\n return (\n
\n handleCurrencyChange('USD')}\n className={`${\n selectedCurrency === 'USD'\n ? 'bg-primary text-white text-[12px] sm:text-[15px] font-bold'\n : 'bg-white text-black text-[13px] sm:text-[16px] font-semibold'\n } text-[13px] sm:text-[15px] w-[50%] h-full flex items-center justify-center rounded-full transition-all duration-300 ease-in-out`}\n >\n USD\n \n\n handleCurrencyChange('CAD')}\n className={`${\n selectedCurrency === 'CAD'\n ? 'bg-primary text-white text-[12px] sm:text-[15px] font-bold'\n : 'bg-white text-black text-[13px] sm:text-[16px] font-semibold'\n } w-[50%] h-full flex items-center justify-center rounded-full transition-all duration-300 ease-in-out`}\n >\n CAD\n \n
\n );\n};\n","import { useState, useRef, useContext, useEffect } from 'react';\nimport { PaxContext } from '../../utils/context/checkoutContext';\n\nexport const CurrencySwitcher = () => {\n const [isOpen, setIsOpen] = useState(false);\n // Get currency and updateCurrency from PaxContext\n const { currency, updateCurrency }: any = useContext(PaxContext);\n\n const dropdownRef = useRef(null);\n\n const toggleDropdown = () => {\n setIsOpen(!isOpen);\n };\n\n // Close dropdown when clicking outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n dropdownRef.current &&\n !(dropdownRef.current as any).contains(event.target)\n ) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, []);\n\n const selectCurrency = (newCurrency: string) => {\n updateCurrency(newCurrency);\n setIsOpen(false);\n };\n\n const DollarIcon = () => (\n \n \n \n );\n\n return (\n
\n
\n \n {/* Display the current currency */}\n \n {currency}\n \n \n
\n
\n\n {isOpen && (\n \n
\n selectCurrency('USD')}\n className={`px-4 py-2 text-sm flex justify-center w-full font-medium hover:text-primary focus:outline-none items-center cursor-pointer gap-2 group`}\n >\n \n USD\n \n \n \n selectCurrency('CAD')}\n className={`px-4 py-2 text-sm flex justify-center w-full font-medium hover:text-primary focus:outline-none items-center cursor-pointer gap-2 group`}\n >\n \n CAD\n \n \n \n
\n \n )}\n \n );\n};\n","import React, { useContext, useEffect, useState } from 'react';\n\nimport Calendar from 'react-calendar';\nimport styled from 'styled-components';\nimport dayjs from 'dayjs';\nimport Image from 'next/image';\nimport 'react-calendar/dist/Calendar.css';\nimport {\n fetchProductAvailabilities,\n updateProductAvailabitoes\n} from '../../utils/getProductAvailabilites';\nimport { getFormattedTime } from '../../utils/getFormattedTime';\nimport { useRouter } from 'next/router';\nimport { PaxContext } from '../../utils/context/checkoutContext';\nimport { useQuery } from '@apollo/client';\nimport {\n FETCH_PRODUCT_BOAT,\n FETCH_PRODUCT_BOAT_INTERFACE\n} from '../../api/productPage';\nimport removeDublicates from '../../utils/removeDublicateTimeSlots';\nimport { useMediaQuery } from '../../hooks/mediaQuery';\nimport { toast } from 'react-toastify';\nimport { CurrencySwitcherToggle } from '../../shared-components/CurrencySwitcher/CurrencySwitcherToggle';\nimport { CurrencySwitcher } from '../../shared-components/CurrencySwitcher/CurrencySwitcherDropdown';\ntype PASSENGERINFO = {\n count: number;\n label: string;\n title: string;\n price: string;\n};\ntype PRIVATEINFO = {\n label: string;\n price: string;\n};\nexport type AVAILABILITY = {\n id: number;\n startTime: string;\n endTime: string;\n allDay: boolean;\n seats: number;\n seatsAvailable: 150 | number;\n prices: PASSENGERINFO[] | PRIVATEINFO[];\n};\ntype axiosReturn = {\n data: [\n {\n id: number;\n startTime: string;\n endTime: string;\n allDay: boolean;\n seats: number;\n seatsAvailable: 150;\n prices: PASSENGERINFO[];\n }\n ];\n};\nexport type PASSENGERPAX = {\n adults: PASSENGERINFO;\n children?: PASSENGERINFO;\n infants?: PASSENGERINFO;\n seats: number;\n};\ninterface StyledProps {\n modal: boolean;\n}\nconst StyledCelendar = styled(Calendar)`\n position: absolute;\n z-index: 100;\n width: 100%;\n\n @media (max-width: 945px) {\n max-width: 100%;\n }\n .react-calendar__month-view__days {\n min-height: 300px;\n height: ${props => (props.modal ? '295px' : '265px')};\n width: 100%;\n @media (max-width: 1800px) {\n height: 295px;\n }\n @media (max-width: 945px) {\n height: ${props => (props.modal ? '285px' : '200px')};\n }\n }\n\n .react-calendar__navigation__prev2-button {\n display: none;\n }\n .react-calendar__navigation {\n margin-bottom: 0;\n height: 35px;\n }\n .react-calendar__tile {\n padding: 6px 6.6667px;\n }\n .react-calendar__navigation__label {\n pointer-events: none;\n }\n .react-calendar__navigation__next2-button {\n display: none;\n }\n`;\ninterface DayContainerProps {\n active: boolean;\n}\nconst DayContainer = styled.div`\n color: ${props => (props.active ? 'white' : 'black')};\n .react-calendar__month-view__days__day {\n background: gray;\n }\n .price {\n color: ${props => (props.active ? 'white' : '#6b7280')};\n font-size: 10px;\n @media (min-width: 1280px) {\n font-size: 12px;\n }\n }\n\n display: flex;\n flex-direction: column;\n`;\nconst TimeOptions = styled.div`\n display: flex;\n max-width: 48%;\n min-width: 48%;\n padding: 8px;\n justify-content: space-between;\n`;\nconst PAXSELECTOR = styled.div`\n background: #ffffff;\n border-radius: 0px 15px 0px 0px;\n padding: 10px 47px;\n`;\nconst RedRoundCheckbox = styled.div`\n position: relative;\n label {\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 50%;\n cursor: pointer;\n height: 20px;\n left: 0;\n position: absolute;\n top: 0;\n width: 20px;\n margin-top: 2px;\n }\n label:after {\n border: 2px solid #fff;\n border-top: none;\n border-right: none;\n content: '';\n height: 6px;\n left: 3px;\n opacity: 0;\n position: absolute;\n top: 5px;\n transform: rotate(-45deg);\n width: 12px;\n }\n input[type='checkbox'] {\n visibility: hidden;\n }\n\n input[type='checkbox']:checked + label {\n background-color: black;\n border-color: black;\n }\n\n input[type='checkbox']:checked + label:after {\n opacity: 1;\n }\n`;\ninterface DATEANDPAXPROPS {\n rezdyId: string;\n updateTourContext: () => void;\n mobile: boolean;\n privateTour: boolean;\n tourId: string;\n adult: number | null;\n child: number | null;\n infant: number | null;\n city?: string | undefined;\n name: string;\n modal?: boolean;\n detailsLoading?: boolean;\n slug?: string;\n bestReview?: {\n id: string;\n title: string;\n review: string;\n traveller: string;\n rating: number;\n source: string;\n date: string;\n created_at: string;\n };\n}\n\nconst DateAndPax = ({\n bestReview,\n rezdyId,\n updateTourContext,\n mobile,\n privateTour,\n tourId,\n adult,\n child,\n infant,\n city,\n slug,\n name,\n modal,\n detailsLoading\n}: DATEANDPAXPROPS) => {\n const [mobileCalendar, setMobileCalendar] = useState(false);\n const router = useRouter();\n //@ts-expect-error\n const { updatePax, updateUser, updateBestReview, currency } =\n useContext(PaxContext);\n const { data } = useQuery(FETCH_PRODUCT_BOAT, {\n variables: {\n id: tourId\n }\n });\n const isSmallScreen = useMediaQuery(639);\n const [loading, setLoading] = useState(true);\n /* const { data, loading: dataLoading } = useQuery(\n FETCH_PRODUCT_BOAT,\n {\n variables: {\n id: tourId\n }\n }\n ); */\n const [reloading, setReloading] = useState(false);\n const [noAvailability, setNoAvailability] = useState(false);\n const [productAvailabities, setProductAvailabilites] = useState<\n AVAILABILITY[]\n >([\n {\n id: 1,\n startTime: '2023-04-12',\n endTime: '2023-04-12',\n allDay: false,\n seats: 10,\n seatsAvailable: 150,\n prices: [\n {\n count: 4,\n label: 'Adults',\n title: 'children',\n price: `${adult}`\n }\n ]\n }\n ]);\n const [selectedDate, setSelectedDate] = useState(\n dayjs(productAvailabities[0].startTime).format('YYYY-MM-DD')\n );\n\n const [isOpen, setIsOpen] = useState(false);\n\n const [availabilityArray, setAvailabilityArray] = useState(() =>\n productAvailabities.map(item => dayjs(item.startTime).format('YYYY-MM-DD'))\n );\n\n const [selectedAvailaibility, setSelectedAvailability] = useState<\n AVAILABILITY[]\n >(() =>\n productAvailabities.filter(\n date => dayjs(date.startTime).format('YYYY-MM-DD') === selectedDate\n )\n );\n\n const [selectedTimeSlot, setSelectedTimeSlot] = useState({\n ...selectedAvailaibility[0],\n prices: [\n //@ts-ignore\n selectedAvailaibility[0].prices.sort((a, b) =>\n a.label.localeCompare(b.label)\n )\n ]\n });\n\n const [passengerPax, setPassengerPax] = useState(() => {\n return {\n adults: {\n count: privateTour ? 1 : selectedTimeSlot.seatsAvailable >= 2 ? 2 : 1,\n label: selectedTimeSlot.prices[0].label,\n price: `${privateTour ? selectedTimeSlot.prices[0].price : adult}`,\n title: selectedTimeSlot.prices[0].label\n },\n children:\n selectedTimeSlot.prices[1]?.price !== null\n ? {\n count: 0,\n label: selectedTimeSlot.prices[1]?.label,\n price: `${child}`,\n title: selectedTimeSlot.prices[1]?.label\n }\n : undefined,\n infants: selectedTimeSlot.prices[2]\n ? {\n count: 0,\n label: selectedTimeSlot.prices[2].label,\n price: `${infant}`,\n title: selectedTimeSlot.prices[2].label\n }\n : undefined,\n seats: selectedTimeSlot.seats\n };\n });\n const [totalPrice, setTotalPrice] = useState(() =>\n Number(passengerPax?.adults.price)\n );\n const [seatsFull, setSeatsFull] = useState(false);\n useEffect(() => {\n const getDate = async () => {\n const availability = await fetchProductAvailabilities({\n rezdyId,\n privateTour,\n startDate: dayjs().format('YYYY-MM-DD'),\n tourName: name,\n cityName: city ?? '',\n slug\n });\n if (\n !availability ||\n (availability.length > 0 && availability[0].prices.length === 0)\n ) {\n setNoAvailability(true);\n setLoading(false);\n return;\n }\n if (availability) {\n setLoading(false);\n }\n setNoAvailability(false);\n\n const availableDate = availability.find(a => a.seatsAvailable > 2);\n if (availableDate && !privateTour) {\n setSelectedDate(dayjs(availableDate.startTime).format('YYYY-MM-DD'));\n } else {\n setSelectedDate(dayjs(availability[0].startTime).format('YYYY-MM-DD'));\n }\n //@ts-ignore\n setProductAvailabilites(availability);\n setAvailabilityArray(() => {\n return availability.map(item =>\n dayjs(item.startTime).format('YYYY-MM-DD')\n );\n });\n };\n getDate();\n }, [rezdyId]);\n const updateAvailabity = async (startTime: Date | null) => {\n //Check if we already loaded the availability\n const exist = productAvailabities.some(\n a =>\n dayjs(a.startTime).format('YYYY-MM-DD') ===\n dayjs(startTime).add(1, 'days').format('YYYY-MM-DD')\n );\n if (exist) return;\n setReloading(true);\n const availability = await updateProductAvailabitoes({\n rezdyId,\n startDate: startTime,\n privateTour: privateTour,\n tourName: name,\n cityName: city ?? '',\n slug\n });\n\n if (!availability) {\n setReloading(false);\n return;\n }\n if (availability) {\n setReloading(false);\n }\n const uniques = removeDublicates([...productAvailabities, ...availability]);\n setProductAvailabilites(uniques);\n };\n useEffect(() => {\n setAvailabilityArray(() => {\n return productAvailabities.map(item =>\n dayjs(item.startTime).format('YYYY-MM-DD')\n );\n });\n }, [productAvailabities]);\n\n useEffect(() => {\n setSelectedAvailability(() =>\n productAvailabities.filter(\n date => dayjs(date.startTime).format('YYYY-MM-DD') === selectedDate\n )\n );\n }, [selectedDate, productAvailabities]);\n\n useEffect(() => {\n const availableSlot = selectedAvailaibility.find(\n slot => slot.seatsAvailable > 2\n );\n\n if (availableSlot && !privateTour) {\n setSelectedTimeSlot({\n ...availableSlot,\n prices: availableSlot?.prices?.sort((a: any, b: any) =>\n a.label.localeCompare(b.label)\n )\n });\n } else {\n setSelectedTimeSlot({\n ...selectedAvailaibility[0],\n prices:\n //@ts-ignore\n selectedAvailaibility[0].prices.sort((a: any, b: any) =>\n a.label.localeCompare(b.label)\n )\n });\n }\n }, [selectedAvailaibility]);\n\n useEffect(() => {\n const adults =\n passengerPax.adults.count * Number(passengerPax.adults.price);\n const children = passengerPax.children\n ? passengerPax.children.count * Number(passengerPax.children.price)\n : 0;\n const infants = passengerPax.infants\n ? passengerPax.infants.count * Number(passengerPax.infants.price)\n : 0;\n\n if (privateTour) {\n setTotalPrice(Number(passengerPax.adults.price));\n return;\n }\n setTotalPrice(() => Number(adults + children + infants));\n }, [passengerPax]);\n\n useEffect(() => {\n const childrens = passengerPax.children?.count || 0;\n\n const infants = passengerPax.infants?.count || 0;\n\n const totalPax = passengerPax.adults.count + childrens + infants;\n if (data && privateTour && totalPax >= data?.product?.quantityMax) {\n setSeatsFull(true);\n return;\n }\n\n if (totalPax >= passengerPax?.seats) {\n setSeatsFull(true);\n return;\n }\n setSeatsFull(false);\n }, [passengerPax]);\n useEffect(() => {\n selectedTimeSlot &&\n setPassengerPax({\n adults: {\n count: privateTour ? 1 : selectedTimeSlot.seatsAvailable > 1 ? 2 : 1,\n label: selectedTimeSlot.prices[0].label,\n price: `${privateTour ? selectedTimeSlot.prices[0].price : adult}`,\n title: selectedTimeSlot.prices[0].label\n },\n children:\n selectedTimeSlot.prices[1]?.label === 'Child'\n ? {\n count: 0,\n label: 'Child',\n price: `${child === null ? 0 : child}`,\n title: selectedTimeSlot.prices[1].label\n }\n : selectedTimeSlot.prices[1]?.label === 'Infant'\n ? {\n count: 0,\n label: 'Child',\n price: `${child === null ? 0 : child}`,\n title: selectedTimeSlot.prices[2].label\n }\n : undefined,\n infants:\n selectedTimeSlot.prices[2]?.label === 'Infant'\n ? {\n count: 0,\n label: 'Infant',\n price: `${infant === null ? 0 : infant}`,\n title: selectedTimeSlot.prices[2].label\n }\n : selectedTimeSlot.prices[2]?.label === 'Child'\n ? {\n count: 0,\n label: 'Infant',\n price: `${infant === null ? 0 : infant}`,\n title: selectedTimeSlot.prices[1].label\n }\n : undefined,\n seats: selectedTimeSlot.seatsAvailable\n });\n }, [selectedTimeSlot, productAvailabities, currency, adult]);\n\n const priceCheck = (date: Date): string => {\n const price = productAvailabities.filter(\n item =>\n dayjs(item.startTime).format('YYYY-MM-DD') ===\n dayjs(date).format('YYYY-MM-DD')\n )[0]?.prices;\n\n if (price) {\n const relevantPrice = privateTour\n ? price.find(item => item.price)\n : { price: passengerPax.adults.price };\n\n const newPrice = Number(relevantPrice?.price);\n if (newPrice) {\n return `$${newPrice}`;\n }\n }\n\n return '';\n };\n\n const proceedToCheckout = () => {\n updatePax({\n ...passengerPax,\n totalPrice,\n selectedTimeSlot,\n link: data?.product?.citiesProducts[0]?.city?.gmb_link?.city?.split(\n '/review'\n )[0]\n });\n updateUser({});\n updateBestReview(bestReview);\n updateTourContext();\n router.push('/checkout');\n };\n\n const isMobile = useMediaQuery(500);\n\n const handleCallClick = () => {\n if (isMobile) {\n // Mobile behavior: initiate a call\n window.location.href = 'tel:+1-888-961-6584';\n } else {\n // Web behavior: copy to clipboard and show toast\n navigator.clipboard\n .writeText('+1-888-961-6584')\n .then(() => {\n toast.success('Copied');\n })\n .catch((err: Error) => {\n console.error('Failed to copy: ', err);\n });\n }\n };\n\n return (\n \n {loading || detailsLoading ? (\n
\n
\n \n \n \n \n Loading...\n
\n \n Loading tour availabilities.\n \n
\n ) : noAvailability ? (\n
\n

Coming Soon

\n
\n ) : (\n
\n

\n

\n From $\n \n {Number(passengerPax.adults.price).toFixed(2)}\n  \n {currency}\n \n
\n {!privateTour &&\n (isSmallScreen ? (\n \n ) : (\n \n ))}{' '}\n

\n {\n e.stopPropagation();\n setMobileCalendar(!mobileCalendar);\n }}\n className=\"border rounded border-gray-300 w-full px-4 py-2 gap-2 flex relative items-center hover:cursor-pointer\"\n >\n \"calendar\"\n {selectedDate}\n \n \n
\n \n
\n {removeDublicates(selectedAvailaibility).map((item: any) => (\n \n \n \n {\n setSelectedTimeSlot({\n ...item,\n //@ts-ignore\n prices: item.prices.sort((a, b) =>\n a.label.localeCompare(b.label)\n )\n });\n }}\n htmlFor=\"checkbox\"\n >\n \n\n \n {dayjs(item.startTime).format(' h:mm a')}\n \n \n ))}\n
\n {reloading && (\n \n
\n \n \n \n \n
\n \n )}\n {mobileCalendar && (\n
\n (\n \n

\n {priceCheck(date)}\n

\n \n )}\n minDate={new Date()}\n showNeighboringMonth={false}\n onClickDay={value => {\n setSelectedDate(dayjs(value).format('YYYY-MM-DD'));\n setMobileCalendar(false);\n }}\n onActiveStartDateChange={({ action, activeStartDate }) => {\n if (action === 'next') updateAvailabity(activeStartDate);\n }}\n tileDisabled={({ activeStartDate, date, view }) => {\n if (\n availabilityArray\n .slice(0, availabilityArray.length - 1)\n .includes(dayjs(date).format('YYYY-MM-DD'))\n ) {\n return false;\n }\n return true;\n }}\n value={dayjs(selectedDate).toDate()}\n /* onClickMonth={(value, event) =>\n } */\n />\n
\n )}\n
\n {seatsFull && !privateTour && (\n

\n {' '}\n Maximum limit of seats reached{' '}\n

\n )}\n
\n setIsOpen(!isOpen)}\n className=\"flex justify-between cursor-pointer bg-white pb-2 border border-gray-300 rounded-md py-2 pl-2 items-center align-middle text-black\"\n >\n \n {Object.values(passengerPax).map(item => {\n // @ts-ignore\n return item?.count > 0\n ? //@ts-ignore\n `${item.label} ${privateTour ? '' : `${item.count}X`} `\n : '';\n })}\n \n \n \n \n
\n\n \n {!privateTour ? (\n <>\n {' '}\n
\n
\n
\n \n {passengerPax.adults.label}\n \n \n {passengerPax.adults.label === 'Quantity'\n ? '(All ages)'\n : '(Ages 13+)'}\n \n
\n
\n
\n \n ${passengerPax.adults.price}\n \n
\n
\n
\n\n
\n
\n {\n if (passengerPax.adults.count <= 1) return;\n setPassengerPax({\n ...passengerPax,\n adults: {\n ...passengerPax.adults,\n count: passengerPax.adults.count - 1\n }\n });\n }}\n className=\"col-span-1 rounded-full w-8 h-8 bg-white border-2 text-black\"\n >\n -\n \n
\n
\n \n {passengerPax.adults.count}\n \n
{' '}\n
\n {\n if (!seatsFull)\n setPassengerPax({\n ...passengerPax,\n adults: {\n ...passengerPax.adults,\n count: passengerPax.adults.count + 1\n }\n });\n }}\n className=\"col-span-1 rounded-full w-8 h-8 bg-white border-2 text-black\"\n >\n +\n \n
\n
\n
\n {passengerPax.children &&\n Number(passengerPax.children.price) !== 0 && (\n
\n
\n
\n \n {passengerPax.children.label}\n \n \n {passengerPax.children.label === 'Child' &&\n '(Ages 5-12)'}\n {passengerPax.children.label === 'Infant' &&\n '(Ages 0-5)'}\n \n
\n
\n
\n \n ${passengerPax.children.price}\n \n
\n
\n
\n\n
\n
\n {\n if (\n passengerPax.children &&\n passengerPax.children.count > 0\n ) {\n setPassengerPax({\n ...passengerPax,\n children: {\n ...passengerPax.children,\n count: passengerPax.children.count - 1\n }\n });\n }\n }}\n className=\"col-span-1 rounded-full w-8 h-8 bg-white border-2 text-black\"\n >\n -\n \n
\n
\n \n {passengerPax.children.count}\n \n
{' '}\n {\n if (passengerPax.children) {\n if (!seatsFull)\n setPassengerPax({\n ...passengerPax,\n children: {\n ...passengerPax.children,\n count: passengerPax.children.count + 1\n }\n });\n }\n }}\n className=\"flex justify-center items-center \"\n >\n \n
\n
\n
\n )}\n {passengerPax.infants &&\n Number(passengerPax.infants.price) !== 0 && (\n
\n
\n
\n \n {passengerPax.infants.label}\n \n \n {passengerPax.infants.label === 'Child' &&\n '(Ages 5-12)'}\n {passengerPax.infants.label === 'Infant' &&\n '(Ages 0-5)'}\n \n
\n
\n
\n \n ${passengerPax.infants.price}\n \n
\n
\n
\n\n
\n
\n {\n if (\n passengerPax.infants &&\n passengerPax.infants.count > 0\n ) {\n setPassengerPax({\n ...passengerPax,\n infants: {\n ...passengerPax.infants,\n count: passengerPax.infants.count - 1\n }\n });\n }\n }}\n className=\"col-span-1 rounded-full w-8 h-8 bg-white border-2 text-black\"\n >\n -\n \n
\n
\n \n {passengerPax.infants.count}\n \n
{' '}\n
\n {\n if (!seatsFull)\n if (passengerPax.infants) {\n setPassengerPax({\n ...passengerPax,\n infants: {\n ...passengerPax.infants,\n count: passengerPax.infants.count + 1\n }\n });\n }\n }}\n className=\"col-span-1 rounded-full w-8 h-8 bg-white border-2 text-black\"\n >\n +\n \n
\n
\n
\n )}\n \n ) : (\n
\n {selectedTimeSlot.prices.map(item => {\n if (item.label !== undefined) {\n return (\n {\n setPassengerPax({\n ...passengerPax,\n adults: {\n count: Number(item.label[0]),\n label: item.label,\n price: item.price,\n title: item.label\n }\n });\n setIsOpen(false);\n }}\n >\n {item.label} :{' '}\n \n ${Number(item.price).toFixed(2)}\n \n

\n );\n }\n })}\n
\n )}\n \n \n

Prices shown in USD

\n \n\n {/*
\n
\n

Total price

\n

\n {' '}\n ${totalPrice.toFixed(2)}{' '}\n

\n
\n
*/}\n proceedToCheckout()}\n >\n Book now $\n {privateTour ? passengerPax.adults.price : totalPrice.toFixed(2)}\n \n
\n
\n

\n Lowest price guarantee\n

\n
\n\n
\n

\n Free Cancellation Up to 24hrs in advance{' '}\n

\n
\n <>\n
\n

\n Call To Book\n

\n
\n
\n \n \n 1-888-961-6584\n

\n
\n \n
\n \n )}\n \n );\n};\n\nexport default DateAndPax;\n","// extracted by mini-css-extract-plugin"],"names":["gql","FETCH_PRODUCT_CAROUSAL","FETCH_PRODUCT_URL","FETCH_PRODUCT_BOAT","INSERT_AVAILABILITY_NOTIFICATION","AVAILABILITY_NOTIFICATION_STATUS","BOATNEW_PRODUCTS_WITH_CITIES","fetchProductAvailabilities","param","rezdyId","startDate","privateTour","tourName","cityName","slug","data","productAvailabities","axios","post","concat","process","code","dayjs","startOf","format","endDate","add","headers","get","cleanPrivateAvailability","undefined","notifyShortage","updateProductAvailabitoes","cleanLessThen7","filter","availability","seatsAvailable","adjustedPrices","map","priceOptionsLimit","prices","slice","productAvailabilities","shortage","length","client","query","managersEmails","Array","from","Set","boatnew_products","flatMap","product","cities_products","cityProduct","city","name","trim","toLowerCase","ops_manager","email","shortageItem","id","seats","alreadyNotified","variables","boatnew_availability_shortage","mutate","mutation","seats_remaining","total_seats","slot","startTime","endTime","date","tour","managerEmail","error","console","removeDublicateTimeSlots","arr","uniqueIds","obj","CurrencySwitcherToggle","currency","updateCurrency","useContext","PaxContext","selectedCurrency","setSelectedCurrency","useState","useEffect","handleCurrencyChange","newCurrency","jsx_runtime","jsxs","div","className","jsx","button","onClick","CurrencySwitcher","isOpen","setIsOpen","dropdownRef","useRef","handleClickOutside","current","contains","event","target","document","addEventListener","removeEventListener","selectCurrency","DollarIcon","svg","xmlns","width","height","viewBox","fill","path","d","strokeLinecap","strokeLinejoin","span","ref","StyledCelendar","styled","Calendar","props","modal","DayContainer","withConfig","active","TimeOptions","RedRoundCheckbox","CalendarAndPax_DateAndPax","bestReview","updateTourContext","mobile","tourId","adult","child","infant","detailsLoading","mobileCalendar","setMobileCalendar","router","useRouter","updatePax","updateUser","updateBestReview","useQuery","isSmallScreen","useMediaQuery","loading","setLoading","reloading","setReloading","noAvailability","setNoAvailability","setProductAvailabilites","allDay","count","label","title","price","selectedDate","setSelectedDate","availabilityArray","setAvailabilityArray","item","selectedAvailaibility","setSelectedAvailability","selectedTimeSlot","setSelectedTimeSlot","sort","a","b","localeCompare","passengerPax","setPassengerPax","adults","children","infants","totalPrice","setTotalPrice","Number","seatsFull","setSeatsFull","getDate","availableDate","find","updateAvailabity","exist","some","uniques","removeDublicates","availableSlot","childrens","totalPax","quantityMax","priceCheck","relevantPrice","newPrice","proceedToCheckout","link","citiesProducts","gmb_link","split","push","isMobile","style","zIndex","role","aria-hidden","p","toFixed","e","stopPropagation","Image","src","alt","input","type","checked","htmlFor","tileContent","activeStartDate","view","minDate","Date","showNeighboringMonth","onClickDay","value","onActiveStartDateChange","action","tileDisabled","includes","toDate","Object","values","Fragment","window","location","href","navigator","clipboard","writeText","then","toast","success","catch","err"],"sourceRoot":""}