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PD,EAAQhC,KAAO,GAAG,CACvB,IAAIkC,EAAWF,EACfA,EAAU,IAAIR,IAEdU,EAASrB,SAAQ,SAASoB,GACnBF,EAAQI,IAAIF,KACfF,EAAQvB,IAAIyB,IACIb,EAAea,IAAY,IAAIT,KACrCX,SAAQ,SAASuB,GACzBJ,EAAQxB,IAAI4B,UAapB,OAPAL,EAAQlB,SAAQ,SAASoB,GACvB,IAAII,EAAKhB,EAAclB,EAAK8B,GACxBI,GACFT,EAAOX,YAAYqB,KAAKD,MAIrBT,EAKgCW,CAASpC,EAAK,oBAG3DA,EAAIqC,WAAa","sources":["webpack://nushopweb/./packages/client/src/components/ClientRedirect/index.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/messages.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/styled.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/components/ShowOtherVariants.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/components/Unavailable.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/AccessoriesContent.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/Accessories.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/queries/getProductsImages.graphql"],"sourcesContent":["import * as React from 'react';\nimport { Link } from 'react-router-dom';\n\nimport { ReactFCC } from '@notino/react-styleguide';\nimport { masterUrl } from '@notino/shared/client-utils';\n\nimport { useModifyCacheAndChangePathname } from './useHandleClientRedirect';\n\nexport interface IClientRedirectProps {\n product: {\n url: string;\n id: string | number;\n masterId: string | number;\n catalogMasterId: string | number;\n };\n useMasterUrl: boolean;\n}\n\nexport const ClientRedirect: ReactFCC = ({\n children,\n useMasterUrl,\n product,\n}) => {\n const modifyCacheAndChangePathname = useModifyCacheAndChangePathname();\n\n const handleOnClick = () => {\n modifyCacheAndChangePathname(product);\n };\n\n return (\n \n {children}\n \n );\n};\n","import { defineMessages } from 'react-intl';\n\nexport const accessoriesMessages = defineMessages({\n accessoriesPopupBoxText: {\n id: 'pd.accessories.popupBox',\n defaultMessage:\n 'Tento produkt má příslušentví, které se vám bude hodit ({count})',\n },\n accessoriesContentTitle: {\n id: 'pd.accessories.content.title',\n defaultMessage: 'Příslušenství pro {productName} ({count})',\n },\n accessoriesShowOtherVariants: {\n id: 'pd.accessories.show.other.variants',\n defaultMessage: 'Zobrazit varianty',\n },\n});\n","import styled, { css } from 'styled-components';\n\nimport {\n breakpoints,\n ProductSliderPlaceholder,\n theme,\n} from '@notino/react-styleguide';\n\nexport const Title = styled.div`\n ${theme.typography.titleLarge}\n text-align: center;\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\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 UnavailableWrapper = styled.p`\n ${theme.typography.labelSmall};\n color: ${theme.color.text.highlight};\n margin-top: 1rem;\n`;\n\nexport const OtherVariantsWrapper = styled.div`\n display: block;\n color: ${theme.color.text.primary};\n ${theme.typography.labelRegular};\n margin-top: 1.5rem;\n`;\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport {\n ClientRedirect,\n IClientRedirectProps,\n} from '@components/ClientRedirect';\n\nimport { accessoriesMessages } from '../messages';\nimport { OtherVariantsWrapper } from '../styled';\n\ninterface ShowOtherVariantsLinkProps {\n product: IClientRedirectProps['product'];\n}\n\nexport const ShowOtherVariantsLink: React.FC = ({\n product,\n}) => {\n return (\n \n \n \n \n \n );\n};\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { messages } from '../../Variants/VariantsTile/messages';\nimport { UnavailableWrapper } from '../styled';\n\nexport const Unavailable = () => {\n return (\n \n \n \n );\n};\n","import * as React from 'react';\n\nimport {\n GetCatalogProductViewQuery,\n ProductIdType,\n StockAvailability,\n} from '@notino/shared/definitions/types';\n\nimport { ProductSlider } from '@components/ProductSlider';\nimport { useGetProductItemProps } from '@components/Universals/ProductItem/useGetProductItemProps';\n\nimport { useProductsByIdsBatched } from '../../ProductsSection/useProductsByIdsBatched';\n\nimport { ShowOtherVariantsLink } from './components/ShowOtherVariants';\nimport { Unavailable } from './components/Unavailable';\nimport { SliderWrapper, StyledLoadingPlaceholder } from './styled';\n\nconst ITEMS_PER_SLIDE = 3;\n\ntype AccessoriesContentProps = {\n accessories: GetCatalogProductViewQuery['productDetailByCatalogMasterId']['features']['accessories'];\n};\n\nexport const AccessoriesContent: React.FC = ({\n accessories,\n}) => {\n const catalogIds = accessories.products.map(\n (product) => `${product.catalogId}`\n );\n\n const { data, loading } = useProductsByIdsBatched(catalogIds, {\n idType: ProductIdType.Catalog,\n });\n\n const placeholderCount = Math.min(\n accessories.products.length,\n ITEMS_PER_SLIDE\n );\n const centerPlaceholder = placeholderCount < ITEMS_PER_SLIDE;\n\n const getProductItemProps = useGetProductItemProps({\n noPriceIfUnavailable: false,\n useMasterUrl: true,\n inSectionOfType: 'slider',\n wishlistActionLocation: 'list',\n showBuyButton: true,\n showAddToCartModal: false,\n });\n\n const products =\n data?.vpProductByIds\n .map((product, index) => {\n const isOutOfStock =\n product.stockAvailability.code.toLocaleLowerCase() ===\n StockAvailability.OutOfStock.toLocaleLowerCase();\n\n const hasOtherVariants = product.attributes?.HasOtherVariants;\n\n const unavailable = isOutOfStock && ;\n\n const otherVariants = hasOtherVariants && (\n \n );\n\n const appendComponent = unavailable || otherVariants;\n\n return getProductItemProps({\n product,\n position: index + 1,\n appendComponent,\n shouldHideItemBuyButton: hasOtherVariants,\n });\n })\n .filter(Boolean) ?? [];\n\n return (\n
\n {!data || loading ? (\n \n ) : (\n \n \n }\n />\n \n )}\n
\n );\n};\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { useQuery } from '@apollo/client';\n\nimport { ModalContext, ModalModel } 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 { isDesktop } from '@utils/helpers';\n\nimport { PopupBox } from '../../../../../components/PopupBox';\nimport { useProductDetailContext } from '../../../ProductDetailContext';\nimport getProductImagesQuery from '../queries/getProductsImages.graphql';\n\nimport { AccessoriesContent } from './AccessoriesContent';\nimport { accessoriesMessages } from './messages';\nimport { Title } from './styled';\n\nconst Accessories = () => {\n const {\n product: {\n collection,\n brand: { name },\n features: { accessories },\n },\n } = useProductDetailContext();\n\n const { data, loading } = useQuery<\n GetProductImagesQuery,\n GetProductImagesQueryVariables\n >(getProductImagesQuery, {\n variables: {\n catalogIds: [String(accessories.products[0].catalogId)],\n idType: ProductIdType.Catalog,\n },\n ssr: false,\n });\n\n const { toggleModal } = ModalContext.useModalContext();\n const { toggleDrawer } = useDrawer();\n\n const accessoryCount = accessories.products.length;\n\n const openModalOrDrawer = () => {\n const productName = `${name} ${collection}`;\n const header = (\n \n <FormattedMessage\n {...accessoriesMessages.accessoriesContentTitle}\n values={{ productName, count: accessoryCount }}\n />\n \n );\n\n if (isDesktop()) {\n toggleModal(, {\n header,\n size: ModalModel.Sizes.large,\n });\n return;\n }\n\n toggleDrawer(, {\n header,\n ...(accessoryCount >= 3 && { ignoreBodySwipe: true }),\n });\n };\n\n const imageUrl = !loading && data?.vpProductByIds?.[0]?.imageUrl;\n\n return (\n \n \n \n );\n};\n\nexport default Accessories;\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":["ClientRedirect","_ref","children","useMasterUrl","product","modifyCacheAndChangePathname","useModifyCacheAndChangePathname","React","Link","to","masterUrl","url","onClick","handleOnClick","accessoriesMessages","defineMessages","accessoriesPopupBoxText","id","accessoriesContentTitle","accessoriesShowOtherVariants","Title","styled","componentId","theme","StyledLoadingPlaceholder","ProductSliderPlaceholder","withConfig","breakpoints","center","css","SliderWrapper","_ref2","centerSlider","_ref3","UnavailableWrapper","OtherVariantsWrapper","ShowOtherVariantsLink","FormattedMessage","Unavailable","messages","AccessoriesContent","accessories","catalogIds","products","map","catalogId","data","loading","useProductsByIdsBatched","idType","ProductIdType","placeholderCount","Math","min","length","centerPlaceholder","getProductItemProps","useGetProductItemProps","noPriceIfUnavailable","inSectionOfType","wishlistActionLocation","showBuyButton","showAddToCartModal","vpProductByIds","index","isOutOfStock","stockAvailability","code","toLocaleLowerCase","StockAvailability","hasOtherVariants","attributes","HasOtherVariants","position","appendComponent","shouldHideItemBuyButton","filter","Boolean","rows","ProductSlider","itemsPerSlide","inViewThreshold","fallback","Accessories","collection","brand","name","features","useProductDetailContext","useQuery","getProductImagesQuery","variables","String","ssr","toggleModal","ModalContext","toggleDrawer","useDrawer","accessoryCount","imageUrl","PopupBox","dataTestId","cdnImageUrl","openModalOrDrawer","productName","header","_extends","values","count","isDesktop","size","ModalModel","ignoreBodySwipe","doc","collectFragmentReferences","node","refs","kind","add","value","type","selectionSet","selections","forEach","selection","variableDefinitions","def","definitions","loc","source","definitionRefs","findOperation","i","element","Set","module","exports","operationName","newDoc","hasOwnProperty","opRefs","allRefs","newRefs","refName","prevRefs","has","childRef","op","push","oneQuery","documentId"],"sourceRoot":""}