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webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/AvailableSets/messages.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/AvailableSets/styled.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/AvailableSets/tracking.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/AvailableSets/AvailableSetsList.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/AvailableSets/AvailableSets.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/AvailableSets/utils.ts","webpack://nushopweb/./packages/client/src/helpers/googleTagManager/useGetTrackMasterAddToCartFail.ts","webpack://nushopweb/./packages/client/src/containers/WishList/components/WishlistPager/tracking.ts","webpack://nushopweb/./packages/client/src/containers/WishList/constants.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/queries/getProductsImages.graphql"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport const messages = defineMessages({\n discoverGiftSets: {\n id: 'pd.availableSets.discoverGiftSets',\n defaultMessage: 'Objevte dárkové sady s tímto produktem.',\n },\n discoverTravelSets: {\n id: 'pd.availableSets.discoverTravelSets',\n defaultMessage: 'Objevte cestovní sady s tímto produktem.',\n },\n discoverEconomySets: {\n id: 'pd.availableSets.discoverEconomySets',\n defaultMessage: 'Objevte výhodná balení s tímto produktem.',\n },\n discoverGiftSetsAndTravelSets: {\n id: 'pd.availableSets.discoverGiftSetsAndTravelSets',\n defaultMessage: 'Objevte dárkové a cestovní sady s tímto produktem.',\n },\n discoverGiftSetsAndEconomySets: {\n id: 'pd.availableSets.discoverGiftSetsAndEconomySets',\n defaultMessage: 'Objevte dárkové sady a výhodná balení s tímto produktem.',\n },\n discoverTravelSetsAndEconomySets: {\n id: 'pd.availableSets.discoverTravelSetsAndEconomySets',\n defaultMessage: 'Objevte cestovní sady a výhodná balení s tímto produktem.',\n },\n discoverSets: {\n id: 'pd.availableSets.discoverSets',\n defaultMessage: 'Objevte sety s tímto produktem. ',\n },\n setsWithThisProduct: {\n id: 'pd.availableSets.setsWithThisProduct',\n defaultMessage: 'Sady s tímto produktem',\n },\n});\n","import styled, { css } from 'styled-components';\n\nimport {\n ProductSliderPlaceholder,\n breakpoints,\n theme,\n} from '@notino/react-styleguide';\n\nexport const DiscoverSetsText = styled.div`\n flex: 1;\n`;\n\nexport const Title = styled.div`\n ${theme.typography.labelLarge}\n text-align: center;\n @media (min-width: ${breakpoints.md}) {\n ${theme.typography.titleLarge}\n }\n`;\n\nexport const SliderWrapper = styled.div<{ centerSlider: boolean }>`\n margin: 1.25rem 0 0.25rem;\n\n [data-testid='phone-slider'] {\n padding: 0 1.25rem 2rem;\n\n ${({ centerSlider }) =>\n centerSlider &&\n css`\n justify-content: center;\n `}\n }\n\n @media (min-width: ${breakpoints.md}) {\n margin: 2.25rem 0 2rem;\n\n ${({ centerSlider }) =>\n centerSlider &&\n css`\n [data-testid='desktop-slider'] > div {\n justify-content: center;\n }\n `}\n }\n`;\n\nexport const StyledLoadingPlaceholder = styled(ProductSliderPlaceholder)<{\n center: boolean;\n}>`\n margin: 1.25rem 0 2.25rem;\n\n @media (min-width: ${breakpoints.md}) {\n margin: 2.25rem 0 2rem;\n }\n\n ${({ center }) =>\n center &&\n css`\n justify-content: center;\n `}\n`;\n","import { GetProductsByIdBatchedQuery } from 'packages/shared/definitions/types';\n\nimport { dispatchTrackingEvent } from '@context/tracking/utils';\nimport { ProductEventWither } from '@helpers/googleTagManager';\n\nexport const GTM_LIST_LABEL = 'gift_sets';\n\ninterface TrackElementClickArgs {\n timing: number;\n name: string;\n type: string;\n action: string;\n interaction?: string;\n}\n\nexport const trackElementClick = ({\n action,\n name,\n timing,\n type,\n interaction = 'click',\n}: TrackElementClickArgs) => {\n dispatchTrackingEvent({\n event: 'element_click',\n _clear: true,\n element: {\n timing,\n interaction,\n name,\n type,\n action,\n },\n });\n};\n\nexport const trackAvailableSets = (\n products: GetProductsByIdBatchedQuery['vpProductByIds'],\n productIds: string[],\n interaction: 'scroll' | 'click'\n) => {\n const transformedProducts = products.map((product) =>\n ProductEventWither()\n .withVpProduct(product)\n .withDiscountPrices(product.attributes)\n .withAdditionalData({\n list_position:\n productIds.findIndex((id) => id === String(product.catalogId)) + 1,\n })\n .build()\n );\n\n dispatchTrackingEvent({\n event: 'view_item_list',\n _clear: true,\n product_lists: {\n list_name: GTM_LIST_LABEL,\n interaction,\n sorting_type: 'automatic',\n products: transformedProducts,\n },\n });\n};\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { useBreakpointValue } from '@notino/react-styleguide';\nimport {\n GetCatalogProductViewQuery,\n ProductIdType,\n} from '@notino/shared/definitions/types';\n\nimport { ProductSlider } from '@components/ProductSlider';\nimport { useGetProductItemProps } from '@components/Universals/ProductItem/useGetProductItemProps';\nimport {\n useTrackToCartAsync,\n useTrackToCartFailedAsync,\n} from '@containers/WishList/components/WishlistPager/tracking';\nimport { useTrackingContext } from '@context/tracking/TrackingContext';\n\nimport { useProductsByIdsBatched } from '../../ProductsSection/useProductsByIdsBatched';\n\nimport { messages } from './messages';\nimport { SliderWrapper, StyledLoadingPlaceholder, Title } from './styled';\nimport {\n GTM_LIST_LABEL,\n trackAvailableSets,\n trackElementClick,\n} from './tracking';\n\nconst ITEMS_PER_SLIDE = 3;\n\ntype Props = {\n sets: GetCatalogProductViewQuery['productDetailByCatalogMasterId']['features']['availableSets']['sets'];\n};\n\nexport const AvailableSetsList = ({ sets }: Props) => {\n const isDesktop = useBreakpointValue({ md: true });\n const { getTimeFromInit } = useTrackingContext();\n const isAlreadyTracked = React.useRef(false);\n const mobileSliderRef = React.useRef();\n\n const catalogIds = sets.map((set) => `${set.catalogId}`);\n\n const { data, loading } = useProductsByIdsBatched(catalogIds, {\n idType: ProductIdType.Catalog,\n });\n\n const trackAddToCartFailedAsync = useTrackToCartFailedAsync(\n catalogIds,\n GTM_LIST_LABEL,\n true\n );\n const trackAddToCardAsync = useTrackToCartAsync(\n catalogIds,\n GTM_LIST_LABEL,\n true\n );\n\n const getProductItemProps = useGetProductItemProps({\n noPriceIfUnavailable: true,\n useMasterUrl: true,\n inSectionOfType: 'slider',\n wishlistActionLocation: 'list',\n onProductAddFailed: trackAddToCartFailedAsync,\n showBuyButton: true,\n showAddToCartModal: false,\n GTMEventLabel: GTM_LIST_LABEL,\n sendGTM: true,\n onProductAdded: trackAddToCardAsync,\n });\n\n React.useEffect(() => {\n if (!data || isAlreadyTracked.current) {\n return;\n }\n\n trackAvailableSets(\n data.vpProductByIds,\n catalogIds,\n isDesktop ? 'click' : 'scroll'\n );\n isAlreadyTracked.current = true;\n }, [data, isDesktop, isAlreadyTracked, catalogIds]);\n\n const placeholderCount = Math.min(sets.length, ITEMS_PER_SLIDE);\n const centerPlaceholder = placeholderCount < ITEMS_PER_SLIDE;\n\n const products =\n data?.vpProductByIds\n .map((product, index) =>\n getProductItemProps({\n product,\n position: index + 1,\n })\n )\n .filter(Boolean) ?? [];\n\n const onNewItemShow = React.useCallback(() => {\n if (isDesktop) {\n return;\n }\n\n if (mobileSliderRef?.current?.scrollLeft === 0) {\n return;\n }\n\n trackElementClick({\n timing: getTimeFromInit(),\n interaction: 'swipe',\n name: 'gift_sets_slide',\n type: 'gift_sets',\n action: 'gift_sets_slide',\n });\n }, [getTimeFromInit, isDesktop]);\n\n const onSlideChange = () => {\n trackElementClick({\n timing: getTimeFromInit(),\n interaction: 'click',\n name: 'gift_sets_slide',\n type: 'gift_sets',\n action: 'gift_sets_slide',\n });\n };\n\n return (\n
\n {isDesktop && (\n \n <FormattedMessage {...messages.setsWithThisProduct} />\n \n )}\n\n {!data || loading ? (\n \n ) : (\n \n \n }\n />\n \n )}\n
\n );\n};\n","import * as React from 'react';\nimport { useInView } from 'react-intersection-observer';\nimport { FormattedMessage, useIntl } from 'react-intl';\n\nimport { useQuery } from '@apollo/client';\n\nimport {\n ModalContext,\n ModalModel,\n useBreakpointValue,\n} from '@notino/react-styleguide';\nimport {\n GetProductImagesQuery,\n GetProductImagesQueryVariables,\n ProductIdType,\n} from '@notino/shared/definitions/types';\n\nimport { useDrawer } from '@components/BottomSheet/DrawerProvider';\nimport { trackDrawerClose } from '@components/BottomSheet/tracking';\nimport { useTrackingContext } from '@context/tracking/TrackingContext';\n\nimport { PopupBox } from '../../../../../components/PopupBox';\nimport { useProductDetailContext } from '../../../ProductDetailContext';\nimport getProductImagesQuery from '../queries/getProductsImages.graphql';\n\nimport { AvailableSetsList } from './AvailableSetsList';\nimport { messages } from './messages';\nimport { DiscoverSetsText } from './styled';\nimport { trackElementClick } from './tracking';\nimport { getDiscoverSetsMessage } from './utils';\n\nconst AvailableSets = () => {\n const { inView, ref } = useInView({ triggerOnce: true });\n const isDesktop = useBreakpointValue({ md: true });\n const { toggleModal, hideModal } = ModalContext.useModalContext();\n const { toggleDrawer } = useDrawer();\n const { getTimeFromInit } = useTrackingContext();\n const { formatMessage } = useIntl();\n const {\n product: {\n features: { availableSets: productAvailableSets },\n },\n currentVariant: {\n features: { availableSets: variantAvailableSets },\n },\n } = useProductDetailContext();\n\n const sets = productAvailableSets?.sets ?? variantAvailableSets?.sets ?? [];\n\n const { data, loading } = useQuery<\n GetProductImagesQuery,\n GetProductImagesQueryVariables\n >(getProductImagesQuery, {\n skip: sets.length === 0,\n variables: {\n catalogIds: [String(sets[0]?.catalogId)],\n idType: ProductIdType.Catalog,\n },\n ssr: false,\n });\n\n if (sets.length === 0) {\n return null;\n }\n\n const openAvailableSets = () => {\n trackElementClick({\n timing: getTimeFromInit(),\n action: 'gif_sets_open',\n type: 'gift_sets',\n name: 'gift_sets_open',\n interaction: 'click',\n });\n\n if (isDesktop) {\n toggleModal(, {\n size: ModalModel.Sizes.large,\n onClose: () => {\n trackElementClick({\n timing: getTimeFromInit(),\n name: 'gift_sets_close',\n type: 'gift_sets',\n action: 'gift_sets_close',\n });\n hideModal();\n },\n });\n return;\n }\n toggleDrawer(, {\n onDismiss: (closeType) =>\n trackDrawerClose({\n closeType,\n timing: getTimeFromInit(),\n name: 'gift_sets_close',\n type: 'gift_sets',\n action: 'gift_sets_close',\n }),\n header: formatMessage(messages.setsWithThisProduct),\n ...(sets.length >= 3 && { ignoreBodySwipe: true }),\n });\n };\n\n const imageUrl = inView && !loading && data?.vpProductByIds[0]?.imageUrl;\n\n return (\n \n \n ({sets.length})\n \n \n );\n};\n\nexport default AvailableSets;\n","import {\n GetCatalogProductViewQuery,\n ProductAvailableSetType,\n} from '@notino/shared/definitions/types';\n\nimport { messages } from './messages';\n\nexport const getDiscoverSetsMessage = (\n sets: GetCatalogProductViewQuery['productDetailByCatalogMasterId']['features']['availableSets']['sets']\n) => {\n let containsUnknown = false;\n let containsGiftSet = false;\n let containsTravelSet = false;\n let containsEconomySet = false;\n\n sets.forEach((set) => {\n if (set.type === ProductAvailableSetType.Unknown) {\n containsUnknown = true;\n }\n if (set.type === ProductAvailableSetType.GiftSet) {\n containsGiftSet = true;\n }\n if (set.type === ProductAvailableSetType.TravelSet) {\n containsTravelSet = true;\n }\n if (set.type === ProductAvailableSetType.EconomyPack) {\n containsEconomySet = true;\n }\n });\n\n if (containsUnknown) {\n return messages.discoverSets;\n }\n if (containsGiftSet && containsTravelSet && containsEconomySet) {\n return messages.discoverSets;\n }\n\n if (containsGiftSet && containsEconomySet) {\n return messages.discoverGiftSetsAndEconomySets;\n }\n if (containsTravelSet && containsEconomySet) {\n return messages.discoverTravelSetsAndEconomySets;\n }\n if (containsGiftSet && containsTravelSet) {\n return messages.discoverGiftSetsAndTravelSets;\n }\n\n if (containsGiftSet) {\n return messages.discoverGiftSets;\n }\n if (containsEconomySet) {\n return messages.discoverEconomySets;\n }\n if (containsTravelSet) {\n return messages.discoverTravelSets;\n }\n\n return messages.discoverSets;\n};\n","import * as React from 'react';\n\nimport { useApolloClient } from '@apollo/client';\nimport { snakeCase } from 'lodash';\n\nimport {\n GetMasterProductInfoQuery,\n GetMasterProductInfoQueryVariables,\n} from '@notino/shared/definitions/types';\nimport { CartType } from '@notino/web-tracking';\n\nimport { dispatchTrackingEvent } from '@context/tracking/utils';\nimport getMasterProductInfoQuery from '@queries/masterProductInfo.graphql';\n\nimport { ProductEventWither } from './prepareProductInfo';\nimport { IVariantAddToCart } from './prepareProductInfo/model';\n\nexport const useGetTrackMasterAddToCartFail = (listName?: string) => {\n const client = useApolloClient();\n\n return React.useCallback(\n async (\n product: IVariantAddToCart,\n catalogMasterId: string,\n position: number,\n errorMessage: string\n ) => {\n const { data } = await client.query<\n GetMasterProductInfoQuery,\n GetMasterProductInfoQueryVariables\n >({\n query: getMasterProductInfoQuery,\n variables: { catalogMasterId },\n });\n\n const masterProduct = data.productDetailByCatalogMasterId;\n\n if (data) {\n dispatchTrackingEvent({\n event: 'add_to_cart_failed',\n add: {\n products: [\n ProductEventWither()\n .withPartialProduct({\n ...masterProduct,\n brand: masterProduct.brand,\n __typename: 'CatalogProduct',\n })\n .withVpProduct(product)\n .withAdditionalData({\n cart_type: snakeCase(CartType.cart),\n quantity: 1,\n list_position: position,\n ...(listName && { list_name: listName }),\n })\n .build(),\n ],\n },\n error: { status: errorMessage || '' },\n _clear: true,\n });\n }\n },\n [client, listName]\n );\n};\n","import {\n GetProductsByIdBatchedQuery,\n GetItemDataByIdQuery,\n} from '@notino/shared/definitions/types';\nimport { Interaction } from '@notino/web-tracking/dist/types/package/ga4/events/constants';\n\nimport {\n GTM_WISHLIST_LIST_NAME,\n GTM_WISHLIST_PAGE_TYPE,\n} from '@containers/WishList/constants';\nimport { dispatchTrackingEvent } from '@context/tracking/utils';\nimport {\n useGetMasterAddToCart,\n ProductEventWither,\n} from '@helpers/googleTagManager';\nimport { useGetTrackMasterAddToCartFail } from '@helpers/googleTagManager/useGetTrackMasterAddToCartFail';\n\nexport const trackWishlistProductListImpression = (\n products: GetProductsByIdBatchedQuery['vpProductByIds'],\n productIds: (string | number)[],\n interaction: Interaction\n) => {\n const transformedProducts = products.map((product) =>\n ProductEventWither()\n .withVpProduct(product)\n .withDiscountPrices(product.attributes, {\n shouldSendOnlyDiscountPrice: true,\n })\n .withAdditionalData({\n list_position:\n productIds.findIndex((id) => String(id) === product.id) + 1,\n })\n .build()\n );\n\n dispatchTrackingEvent({\n event: 'view_item_list',\n _clear: true,\n product_lists: {\n list_name: GTM_WISHLIST_LIST_NAME,\n interaction,\n sorting_type: 'automatic',\n products: transformedProducts,\n },\n });\n};\n\nexport const trackWishlistPageView = () => {\n dispatchTrackingEvent({\n event: 'page_view',\n page: {\n title: 'Wishlist',\n path: window.location.pathname,\n unified_name: 'wishlist',\n type: GTM_WISHLIST_PAGE_TYPE,\n subpage: undefined,\n },\n _clear: true,\n });\n};\n\n// TODO: `useTrackToCartAsync` and `useTrackToCartFailedAsync` temporarily use the `shouldUseCatalogId` parameter\n// to handle product identifiers, as Wishlist does not yet support `catalogId`.\n\n// The `shouldUseCatalogId` flag indicates which identifier to use: if `true`, it uses `catalogId`;\n// otherwise, it defaults to the existing `id`. This flag will be removed once Wishlist fully supports `catalogId`\n\nexport const useTrackToCartAsync = (\n productIds: (string | number)[],\n listName: string,\n shouldUseCatalogId?: boolean\n) => {\n const trackAddToCart = useGetMasterAddToCart(listName);\n return async (product: GetItemDataByIdQuery['vpProductById']) => {\n await trackAddToCart(\n product,\n product.catalogMasterId.toString(),\n productIds.findIndex(\n (id) =>\n String(id) ===\n String(product[shouldUseCatalogId ? 'catalogId' : 'id'])\n ) + 1\n );\n };\n};\n\nexport const useTrackToCartFailedAsync = (\n productIds: (string | number)[],\n listName: string,\n shouldUseCatalogId?: boolean\n) => {\n const track = useGetTrackMasterAddToCartFail(listName);\n return async (\n errorMessage: string,\n product: GetItemDataByIdQuery['vpProductById']\n ) => {\n await track(\n product,\n product.catalogMasterId.toString(),\n productIds.findIndex(\n (id) =>\n String(id) ===\n String(product[shouldUseCatalogId ? 'catalogId' : 'id'])\n ) + 1,\n errorMessage\n );\n };\n};\n","export const GTM_WISHLIST_LIST_NAME = 'wishlist';\nexport const GTM_WISHLIST_PAGE_TYPE = 'wishlist';\nexport const WISHLIST_PAGE_SIZE = 8;\n","\n var doc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"getProductImages\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"catalogIds\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},\"directives\":[]},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"idType\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ProductIdType\"}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"vpProductByIds\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"ids\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"catalogIds\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"idType\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"idType\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"imageUrl\"},\"arguments\":[],\"directives\":[]}]}}]}}],\"loc\":{\"start\":0,\"end\":154}};\n doc.loc.source = {\"body\":\"query getProductImages($catalogIds: [String!]!, $idType: ProductIdType) {\\n vpProductByIds(ids: $catalogIds, idType: $idType) {\\n id\\n imageUrl\\n }\\n}\\n\",\"name\":\"GraphQL request\",\"locationOffset\":{\"line\":1,\"column\":1}};\n \n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n \n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"getProductImages\"] = oneQuery(doc, \"getProductImages\");\n \n\ndoc.documentId = \"f6146abab7bd37229806f1f9c7821175a1994689806a90b4925d80cf480ff54a\""],"names":["messages","defineMessages","discoverGiftSets","id","discoverTravelSets","discoverEconomySets","discoverGiftSetsAndTravelSets","discoverGiftSetsAndEconomySets","discoverTravelSetsAndEconomySets","discoverSets","setsWithThisProduct","DiscoverSetsText","styled","componentId","Title","theme","breakpoints","SliderWrapper","_ref","centerSlider","css","_ref2","StyledLoadingPlaceholder","ProductSliderPlaceholder","withConfig","_ref3","center","GTM_LIST_LABEL","trackElementClick","action","name","timing","type","interaction","dispatchTrackingEvent","event","_clear","element","AvailableSetsList","sets","isDesktop","useBreakpointValue","md","getTimeFromInit","useTrackingContext","isAlreadyTracked","React","mobileSliderRef","catalogIds","map","set","catalogId","data","loading","useProductsByIdsBatched","idType","ProductIdType","trackAddToCartFailedAsync","useTrackToCartFailedAsync","trackAddToCardAsync","useTrackToCartAsync","getProductItemProps","useGetProductItemProps","noPriceIfUnavailable","useMasterUrl","inSectionOfType","wishlistActionLocation","onProductAddFailed","showBuyButton","showAddToCartModal","GTMEventLabel","sendGTM","onProductAdded","current","trackAvailableSets","products","productIds","transformedProducts","product","ProductEventWither","withVpProduct","withDiscountPrices","attributes","withAdditionalData","list_position","findIndex","String","build","product_lists","list_name","sorting_type","vpProductByIds","placeholderCount","Math","min","length","centerPlaceholder","index","position","filter","Boolean","onNewItemShow","scrollLeft","FormattedMessage","rows","ProductSlider","mobileScrollContainerRef","itemsPerSlide","onItemShow","inViewThreshold","onSlideChange","fallback","AvailableSets","inView","ref","useInView","triggerOnce","toggleModal","hideModal","ModalContext","toggleDrawer","useDrawer","formatMessage","useIntl","features","availableSets","productAvailableSets","currentVariant","variantAvailableSets","useProductDetailContext","useQuery","getProductImagesQuery","skip","variables","ssr","imageUrl","PopupBox","dataTestId","cdnImageUrl","onClick","openAvailableSets","size","ModalModel","onClose","onDismiss","closeType","trackDrawerClose","header","ignoreBodySwipe","containsUnknown","containsGiftSet","containsTravelSet","containsEconomySet","forEach","ProductAvailableSetType","getDiscoverSetsMessage","trackWishlistProductListImpression","shouldSendOnlyDiscountPrice","GTM_WISHLIST_LIST_NAME","trackWishlistPageView","page","title","path","window","location","pathname","unified_name","GTM_WISHLIST_PAGE_TYPE","subpage","undefined","listName","shouldUseCatalogId","trackAddToCart","useGetMasterAddToCart","async","catalogMasterId","toString","track","client","useApolloClient","errorMessage","query","getMasterProductInfoQuery","masterProduct","productDetailByCatalogMasterId","add","withPartialProduct","brand","__typename","cart_type","_snakeCase","CartType","quantity","error","status","useGetTrackMasterAddToCartFail","WISHLIST_PAGE_SIZE","doc","collectFragmentReferences","node","refs","kind","value","selectionSet","selections","selection","variableDefinitions","def","definitions","loc","source","definitionRefs","findOperation","i","Set","module","exports","operationName","newDoc","hasOwnProperty","opRefs","allRefs","newRefs","refName","prevRefs","has","childRef","op","push","oneQuery","documentId"],"sourceRoot":""}