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A,EAAc,CACbE,KAAMC,EAAAA,EAAKC,SACXH,QAAS5L,GAASwF,UAElB1F,EAAAA,EAAAA,KAAC0L,EAAAA,EAA6B,CAACC,UAAWC,GAAAA,EAAsBlG,UAC9D1F,EAAAA,EAAAA,KAACiN,GAAsB,CAACsD,MAAOmqB,EAAch1B,UAC3C1F,EAAAA,EAAAA,KAACyL,EAAAA,EAAa,CAAA/F,UACZ1F,EAAAA,EAAAA,KAAC2gC,GAAK,CAACC,gBAAiBA,kBCnB3BqB,GAA4CvH,IACnB,CAClCA,kB,4BCLG,MAAMwH,GAAiBA,KAC5B,MAAMxH,GAAgByH,EAAAA,GAAAA,MAEtB,OACEniC,EAAAA,EAAAA,KAAC+hC,GAAc,IACTE,GAAS,CAAEv1B,sBAAsB,KAASguB,IAC9CkG,gBAAiBC,GAAAA,GACjB,EAIN,K","sources":["webpack://oricheckoutclientapp/../../../src/components/FormattedMessage.tsx","webpack://oricheckoutclientapp/../../src/constants-generated.ts","webpack://oricheckoutclientapp/../../src/logger.ts","webpack://oricheckoutclientapp/../../../src/types/CheckoutOfferHintsContextProps.ts","webpack://oricheckoutclientapp/../../../src/contexts/checkoutOfferHintsContext.ts","webpack://oricheckoutclientapp/../../../src/constants/BadgeColors.ts","webpack://oricheckoutclientapp/../../../src/components/ColoredBadge.tsx","webpack://oricheckoutclientapp/../../../src/components/BackorderItem.tsx","webpack://oricheckoutclientapp/../../../src/components/Loading.tsx","webpack://oricheckoutclientapp/../../../src/components/CustomerOrderItem.tsx","webpack://oricheckoutclientapp/../../../src/components/ProgressBar.tsx","webpack://oricheckoutclientapp/../../../src/components/MerchandizingItem.tsx","webpack://oricheckoutclientapp/../../../src/components/MerchandisingBlock.tsx","webpack://oricheckoutclientapp/../../../src/components/Merchandising.tsx","webpack://oricheckoutclientapp/../../../src/components/App.tsx","webpack://oricheckoutclientapp/../../../src/types/CheckoutBasketConfig.ts","webpack://oricheckoutclientapp/../../../src/contexts/checkoutBasketContext.ts","webpack://oricheckoutclientapp/../../../src/constants/defaultBasketContext.ts","webpack://oricheckoutclientapp/../../../src/constants/productsStep.ts","webpack://oricheckoutclientapp/../../../src/hooks/useTranslations.ts","webpack://oricheckoutclientapp/../../../src/contexts/basketContext.tsx","webpack://oricheckoutclientapp/../../../src/types/FeedbackNotificationType.ts","webpack://oricheckoutclientapp/../../../src/models/TranslationKey.ts","webpack://oricheckoutclientapp/../../../src/hooks/useFeedbackNotification.ts","webpack://oricheckoutclientapp/../../../../src/components/AddVoucher/styles.ts","webpack://oricheckoutclientapp/../../../src/utils/addVoucher.ts","webpack://oricheckoutclientapp/../../../../src/components/AddVoucher/AddVoucherForm.tsx","webpack://oricheckoutclientapp/../../../../src/components/AddVoucher/useVoucherForm.ts","webpack://oricheckoutclientapp/../../../src/utils/splitPromoCode.ts","webpack://oricheckoutclientapp/../../../../src/components/AddVoucher/AddVoucherFormWrapper.tsx","webpack://oricheckoutclientapp/../../../../src/components/shared/Loading.tsx","webpack://oricheckoutclientapp/../../../src/components/OfferHints.tsx","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/ProgressBar.tsx","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/MerchandisingItem.tsx","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/CheckboxToggler.tsx","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/VoucherInfo.tsx","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/ReferralVoucher.tsx","webpack://oricheckoutclientapp/../../../src/utils/removeVoucher.ts","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/RewardShopBanner.tsx","webpack://oricheckoutclientapp/../../../../src/components/BannerSection/BannersSection.tsx","webpack://oricheckoutclientapp/../../../../src/components/ClearBasket/ClearBasketPopUp.tsx","webpack://oricheckoutclientapp/../../../../src/components/ClearBasket/ClearBasket.tsx","webpack://oricheckoutclientapp/../../../src/components/RecommendationsBar.tsx","webpack://oricheckoutclientapp/../../../src/utils/mapShoppingBagItem.ts","webpack://oricheckoutclientapp/../../../src/utils/showErrorNotification.ts","webpack://oricheckoutclientapp/../../../src/utils/updateBasketItem.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useBackorderDelayCancel.ts","webpack://oricheckoutclientapp/../../../src/utils/cancelBackorderDemand.ts","webpack://oricheckoutclientapp/../../../src/utils/updateCustomerOrderItem.ts","webpack://oricheckoutclientapp/../../../src/utils/deleteOfferItem.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useRemoveHandler.ts","webpack://oricheckoutclientapp/../../../src/utils/removeBasketItem.ts","webpack://oricheckoutclientapp/../../../src/utils/deleteShippingOfferItem.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useSubscriptionHandlers.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useSectionItem.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useDialog.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useButtons.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/useControlledQuantityPicker.ts","webpack://oricheckoutclientapp/../../../../src/components/SectionItem/SectionItem.tsx","webpack://oricheckoutclientapp/../../../src/components/SectionAddedFree.tsx","webpack://oricheckoutclientapp/../../../src/components/SectionAddedPaid.tsx","webpack://oricheckoutclientapp/../../../src/components/SectionConsumerOrders.tsx","webpack://oricheckoutclientapp/../../../src/types/ClientAppConfig.ts","webpack://oricheckoutclientapp/../../../src/contexts/CheckoutQuickOrderFormProvider.ts","webpack://oricheckoutclientapp/../../../src/hooks/useQuickOrderForm.ts","webpack://oricheckoutclientapp/../../../src/api/useProductSearchQuery.ts","webpack://oricheckoutclientapp/../../../../src/components/icons/AddToBasket.tsx","webpack://oricheckoutclientapp/../../../src/components/AddButton.tsx","webpack://oricheckoutclientapp/../../../src/hooks/useBreakpointIndex.ts","webpack://oricheckoutclientapp/../../../src/components/QuantityPicker.tsx","webpack://oricheckoutclientapp/../../../src/components/ProductShade.tsx","webpack://oricheckoutclientapp/../../../src/components/QuickOrderFormResultRow.tsx","webpack://oricheckoutclientapp/../../../src/components/QuickOrderFormResults.tsx","webpack://oricheckoutclientapp/../../../src/components/QuickOrderForm.tsx","webpack://oricheckoutclientapp/../../../src/components/EmptySection.tsx","webpack://oricheckoutclientapp/../../../src/components/SectionMain.tsx","webpack://oricheckoutclientapp/../../../src/components/SectionShippingOffer.tsx","webpack://oricheckoutclientapp/../../../src/utils/cancelSubscription.ts","webpack://oricheckoutclientapp/../../../../src/components/SubscriptionsSection/ToggleIcon.ts","webpack://oricheckoutclientapp/../../../../src/components/SubscriptionsSection/SubscriptionPackage.tsx","webpack://oricheckoutclientapp/../../../src/utils/delaySubscription.ts","webpack://oricheckoutclientapp/../../../../src/components/SubscriptionsSection/SubscriptionUserHeader.tsx","webpack://oricheckoutclientapp/../../../../src/components/SubscriptionsSection/CustomerSubscriptions.tsx","webpack://oricheckoutclientapp/../../../../src/components/SubscriptionsSection/SubscriptionFooter.tsx","webpack://oricheckoutclientapp/../../../../src/components/SubscriptionsSection/SubscriptionsSection.tsx","webpack://oricheckoutclientapp/../../../src/api/useSubscriptionsReplacementQuery.ts","webpack://oricheckoutclientapp/../../../src/components/Step1.tsx","webpack://oricheckoutclientapp/../../../src/utils/handleAutomaticSubscription.ts","webpack://oricheckoutclientapp/../../src/CheckoutBasket.tsx","webpack://oricheckoutclientapp/../../../src/utils/getProps.ts","webpack://oricheckoutclientapp/../../../src/components/BasketStep.tsx"],"sourcesContent":["/* istanbul ignore file */\n\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\nimport { FormattedMessage as NotTypedFormattedMessage, type FormattedMessageProps } from '@ori/i18n';\n\nimport type { DefaultTranslations } from '../constants/defaultTranslations';\n\n/**\n * Renders a formatted internationalized message using the provided translation data.\n *\n * @returns The FormattedMessage typed with keys within the specified namespace.\n */\nexport const FormattedMessage = (props: FormattedMessageProps) => (\n {...props} />\n);\n","/* istanbul ignore file */\n//\n// DO NOT EDIT!\n// This file was autogenerated by Eddie.\n// Changes may cause incorrect behavior and will be lost when the file is regenerated.\n//\n// Run `npx eddie update workspace` to regenerate.\n//\n\nexport const APP_NAME = 'checkout-merchandising';\nexport const PACKAGE_NAME = '@ori/checkout-merchandising';\nexport const TEAM_NAME = 'Checkout';\n\nexport const EMOTION_CACHE_KEY = `${APP_NAME}-emotion-cache-key`;\n\nexport const APP_ROOT_ELEMENT_ID = `${APP_NAME}-root`;\n","import { getDebugLogger } from '@ori/checkout-utils';\nimport { Logger } from '@ori/logger';\n\nimport { APP_NAME, PACKAGE_NAME, TEAM_NAME } from './constants';\n\nexport const mainLogger = new Logger(PACKAGE_NAME, { teamName: TEAM_NAME });\n\nexport const logDebug = getDebugLogger(APP_NAME);\n","import type { Dispatch, SetStateAction } from 'react';\n\nexport interface CheckoutOfferHintsContextProps {\n isDoubleCurrency: boolean;\n offersCount: number;\n setIsOfferHintsModalOpen: Dispatch>;\n setNotAvailableOfferIds: Dispatch>;\n toggleConfirmationModal: (isOpen: boolean) => void;\n}\n\nconst noop = () => {\n // empty implementation intended\n};\n\nexport const DEFAULT_CHECKOUT_OFFER_HINTS_CONTEXT = {\n isDoubleCurrency: false,\n offersCount: 0,\n setIsOfferHintsModalOpen: noop,\n setNotAvailableOfferIds: noop,\n toggleConfirmationModal: noop,\n};\n","import { createContext, useContext } from 'react';\n\nimport { type CheckoutOfferHintsContextProps, DEFAULT_CHECKOUT_OFFER_HINTS_CONTEXT } from '../types';\n\nexport const checkoutOfferHintsContext = createContext(\n DEFAULT_CHECKOUT_OFFER_HINTS_CONTEXT,\n);\n\nexport const CheckoutOfferHintsProvider = checkoutOfferHintsContext.Provider;\n\nexport const useCheckoutOfferHints = () => useContext(checkoutOfferHintsContext);\n","import { theme } from '@ori-ui/mui';\n\nexport const BadgeColors = {\n General: theme.palette.grey[300],\n EndConsumerOrders: theme.palette.info.main,\n BackOrders: theme.palette.grey[300],\n Campaign: theme.palette.secondary.light,\n WelcomeProgram: theme.palette.secondary.light,\n Offer: theme.palette.offer.main,\n};\n","import { styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\ninterface ColoredBadgeProps {\n itemTheme?: string;\n}\n\nconst Badge = styled('div')<{ ownerState: { itemTheme?: string } }>(({ theme, ownerState }) => ({\n flexShrink: 0,\n width: theme.spacing(2),\n marginRight: theme.spacing(3),\n borderRadius: theme.spacing(2, 0, 0, 2),\n fontSize: '2rem',\n fontWeight: 'bold',\n color: theme.palette.text.primary,\n backgroundColor: ownerState.itemTheme,\n [theme.breakpoints.up('md')]: {\n marginRight: theme.spacing(4),\n },\n}));\n\nexport const ColoredBadge: FC = (props) => ;\n","import { Box, SHADOW_LEVEL3, styled, Tooltip } from '@ori-ui/mui';\nimport { type FC, useMemo } from 'react';\n\nimport { ColoredBadge } from './ColoredBadge';\n\nexport interface BackorderItemProps {\n color: string;\n text: string;\n title: string;\n toolTip: string | null;\n}\n\nconst LightTooltip = styled(Tooltip)(({ theme }) => ({\n fontSize: theme.typography.body1.fontSize,\n}));\n\nconst TooltipLine = styled(Box)(({ theme }) => ({\n margin: '4px 0',\n color: theme.palette.text.primary,\n}));\n\nconst BlockLink = styled('div')(({ theme }) => ({\n display: 'flex',\n marginBottom: theme.spacing(3),\n borderRadius: theme.spacing(2),\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.background.paper,\n boxShadow: SHADOW_LEVEL3,\n}));\n\nconst MerchContentWrapper = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n padding: theme.spacing(3, 0),\n [theme.breakpoints.up('md')]: {\n padding: theme.spacing(4, 0),\n },\n}));\n\nconst MerchHeader = styled('div')(({ theme }) => ({\n fontSize: theme.typography.body1.fontSize,\n fontWeight: 'bold',\n color: theme.palette.text.primary,\n\n [theme.breakpoints.up('md')]: {\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst MerchContent = styled('div')(({ theme }) => ({\n position: 'relative',\n display: 'inline-block',\n paddingRight: theme.spacing(3),\n fontSize: theme.typography.caption.fontSize,\n fontWeight: 'normal',\n color: theme.palette.text.primary,\n [theme.breakpoints.up('md')]: {\n paddingRight: theme.spacing(6),\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nexport const BackorderItem: FC = ({ color, text, title, toolTip, ...htmlDivProps }) => {\n const tooltipContent = useMemo(\n () => toolTip?.split('
').map((line) => line !== '' && {line}) ?? '',\n [toolTip],\n );\n\n return (\n \n \n \n \n
\n {title}\n \n
\n \n
\n
\n );\n};\n","import { alpha, CircularProgress, styled } from '@ori-ui/mui';\nimport { memo } from 'react';\n\nconst Root = styled('div')(({ theme }) => ({\n alignItems: 'center',\n background: alpha(theme.palette.common.white, 0.5),\n bottom: 0,\n display: 'flex',\n justifyContent: 'center',\n left: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n zIndex: 999,\n}));\n\nexport const Loading = memo(() => (\n \n \n \n));\n","import type { PendingEndConsumerOrder } from '@ori-events/basket-updated';\nimport { ArrowRightThin } from '@ori-ui/icons';\nimport { SHADOW_LEVEL3, styled } from '@ori-ui/mui';\nimport { lazy, Suspense } from 'react';\nimport type { FC, MouseEvent } from 'react';\n\nimport type { TestIdProp } from '../types';\nimport { ColoredBadge } from './ColoredBadge';\nimport { Loading } from './Loading';\n\ninterface CustomerOrderItemProps extends TestIdProp {\n color: string;\n handleCloseModal: (e: MouseEvent) => void;\n handleOpenModal: (e: MouseEvent) => void;\n ordersAmount?: number;\n ordersPageLink: string;\n pendingOrders?: Array;\n shouldShowModal: boolean;\n text: string;\n title: string;\n}\n\nconst BlockLink = styled('div')(({ theme }) => ({\n display: 'flex',\n marginBottom: theme.spacing(3),\n borderRadius: theme.spacing(2),\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.background.paper,\n boxShadow: SHADOW_LEVEL3,\n cursor: 'pointer',\n}));\n\nconst MerchContentWrapper = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n padding: theme.spacing(3, 0),\n [theme.breakpoints.up('md')]: {\n padding: theme.spacing(4, 0),\n },\n}));\n\nconst MerchHeader = styled('div')(({ theme }) => ({\n fontSize: theme.typography.body1.fontSize,\n fontWeight: 'bold',\n color: theme.palette.text.primary,\n\n [theme.breakpoints.up('md')]: {\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst MerchContent = styled('div')(({ theme }) => ({\n position: 'relative',\n display: 'inline-block',\n paddingRight: theme.spacing(3),\n fontSize: theme.typography.caption.fontSize,\n fontWeight: 'normal',\n color: theme.palette.text.primary,\n [theme.breakpoints.up('md')]: {\n paddingRight: theme.spacing(6),\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nconst ArrowIcon = styled(ArrowRightThin)(({ theme }) => ({\n alignSelf: 'center',\n marginRight: 8,\n fontSize: '2.6rem',\n [theme.breakpoints.up('md')]: {\n marginRight: 23,\n },\n}));\n\nconst CustomerOrdersModal = lazy(\n async () => import(/* webpackChunkName: \"customer-orders-modal\" */ './CustomerOrdersModal'),\n);\n\nexport const CustomerOrderItem: FC = ({\n 'data-testid': testId,\n color,\n text,\n title,\n handleOpenModal,\n handleCloseModal,\n shouldShowModal,\n ordersAmount,\n pendingOrders,\n ordersPageLink,\n}) => (\n \n \n \n {title}\n {text}\n \n \n {shouldShowModal ? (\n }>\n \n \n ) : null}\n \n);\n","import type { ProgressBarItems } from '@ori-events/basket-updated';\nimport { styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\ninterface ProgressBarProps {\n progress: ProgressBarItems;\n color: string;\n}\n\nconst ProgressBarWrapper = styled('div')<{ ownerState: { barColor?: string; barLength: string } }>(\n ({ theme, ownerState }) => ({\n position: 'relative',\n height: theme.spacing(1),\n marginTop: theme.spacing(3),\n marginRight: theme.spacing(3),\n borderRadius: theme.spacing(1),\n backgroundColor: theme.palette.grey[100],\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n background: ownerState.barColor,\n top: 0,\n bottom: 0,\n left: 0,\n width: ownerState.barLength,\n borderRadius: theme.spacing(1),\n },\n [theme.breakpoints.up('md')]: {\n marginRight: theme.spacing(6),\n },\n }),\n);\n\nconst ProgressValue = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(1),\n marginRight: theme.spacing(3),\n marginLeft: 'auto',\n fontSize: theme.typography.caption.fontSize,\n [theme.breakpoints.up('md')]: {\n marginRight: theme.spacing(6),\n },\n}));\n\nconst ProgressAmount = styled('span')({\n fontWeight: 'bold',\n});\n\nexport const ProgressBar: FC = ({ progress, color }) => {\n const { target, amount, unit } = progress;\n const length = `${Math.round((amount * 100) / target)}%`;\n const ownerState = { barColor: color, barLength: length };\n\n return (\n <>\n \n \n {amount} / \n {target} {unit ? {unit} : null}\n \n \n );\n};\n","import type { ProgressBarItems } from '@ori-events/basket-updated';\nimport { styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\nimport type { TestIdProp } from '../types';\nimport { ColoredBadge } from './ColoredBadge';\nimport { ProgressBar } from './ProgressBar';\n\ninterface MerchandizingItemProps extends TestIdProp {\n color: string;\n progress?: ProgressBarItems;\n text: string;\n title: string;\n}\n\nconst Block = styled('div')(({ theme }) => ({\n display: 'flex',\n marginBottom: theme.spacing(3),\n borderRadius: theme.spacing(2),\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.background.paper,\n}));\n\nconst MerchContentWrapper = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n padding: theme.spacing(3, 0),\n [theme.breakpoints.up('md')]: {\n padding: theme.spacing(4, 0),\n },\n}));\n\nconst MerchHeader = styled('div')(({ theme }) => ({\n fontSize: theme.typography.body1.fontSize,\n fontWeight: 'bold',\n color: theme.palette.text.primary,\n\n [theme.breakpoints.up('md')]: {\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst MerchContent = styled('div')(({ theme }) => ({\n position: 'relative',\n display: 'inline-block',\n paddingRight: theme.spacing(3),\n fontSize: theme.typography.caption.fontSize,\n fontWeight: 'normal',\n color: theme.palette.text.primary,\n [theme.breakpoints.up('md')]: {\n paddingRight: theme.spacing(6),\n fontSize: theme.typography.body1.fontSize,\n },\n}));\n\nexport const MerchandizingItem: FC = ({\n 'data-testid': testId,\n color,\n text,\n title,\n progress,\n}) => (\n \n \n \n {title}\n {text}\n {progress ? (\n \n ) : null}\n \n \n);\n","import type { PendingEndConsumerOrder, ProgressBarItems } from '@ori-events/basket-updated';\nimport type { FC, MouseEvent } from 'react';\nimport { useCallback, useState } from 'react';\n\nimport { BadgeColors } from '../constants';\nimport type { TestIdProp } from '../types';\nimport { BackorderItem } from './BackorderItem';\nimport { CustomerOrderItem } from './CustomerOrderItem';\nimport { MerchandizingItem } from './MerchandizingItem';\n\ninterface MerchandisingItemProps extends TestIdProp {\n hintCategory: keyof typeof BadgeColors;\n title: string;\n progress?: ProgressBarItems;\n ordersAmount?: number;\n pendingOrders?: Array;\n ordersPageLink: string;\n toolTip: string;\n text: string;\n}\n\nexport const MerchandisingBlock: FC = ({\n 'data-testid': testId,\n text,\n toolTip,\n hintCategory,\n title,\n progress,\n ordersAmount,\n pendingOrders,\n ordersPageLink,\n}) => {\n const isCustomerOrderItem = hintCategory === 'EndConsumerOrders';\n const isBackorderItem = hintCategory === 'BackOrders';\n const color = BadgeColors[hintCategory];\n const commonProps = {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- x\n 'data-testid': testId,\n color,\n text,\n title,\n };\n const [shouldShowModal, setShouldShowModal] = useState(false);\n\n const handleOpenModal = useCallback(() => {\n setShouldShowModal(true);\n }, [setShouldShowModal]);\n\n const handleCloseModal = useCallback(\n (e: MouseEvent) => {\n e.stopPropagation();\n setShouldShowModal(false);\n },\n [setShouldShowModal],\n );\n\n if (isCustomerOrderItem) {\n return (\n \n );\n } else if (isBackorderItem) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n","import type { PendingEndConsumerOrder, ProgressBarItems, ShoppingMessage } from '@ori-events/basket-updated';\nimport { styled } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\n\nimport type { BadgeColors } from '../constants';\nimport { FormattedMessage } from './FormattedMessage';\nimport { MerchandisingBlock } from './MerchandisingBlock';\n\ninterface MerchandisingProps {\n messages: ShoppingMessage[];\n ordersAmount?: number;\n ordersPageLink: string;\n pendingOrders?: Array;\n}\n\nconst Wrapper = styled('div')(({ theme }) => ({\n maxWidth: 984,\n padding: theme.spacing(2, 3, 3, 3),\n backgroundColor: theme.palette.grey[100],\n\n [theme.breakpoints.up('md')]: {\n padding: theme.spacing(0),\n },\n}));\n\nconst WrapperHeading = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(2),\n fontSize: '2rem',\n fontWeight: 'bold',\n color: theme.palette.text.primary,\n}));\n\nexport const Merchandising: FC = ({ messages, ordersAmount, pendingOrders, ordersPageLink }) => {\n const { getTestId } = useTestId();\n\n return (\n \n \n \n \n {messages.map((messageItem, index) => (\n \n ))}\n \n );\n};\n","import type { UnitDataCollection, UnitDataCollectionEndConsumerPendingOrder } from '@ori-events/basket-updated';\nimport { ThemeProvider } from '@ori-ui/mui';\nimport { TranslationsNamespaceProvider } from '@ori/i18n';\nimport { ErrorBoundary, LoggerProvider } from '@ori/logger';\nimport { useShoppingContext } from '@ori/shopping-context';\nimport { Team, TestIdProvider } from '@ori/testid-generator';\nimport { type FC, useMemo } from 'react';\n\nimport { APP_NAME, translationsNamespace } from '../constants';\nimport { mainLogger } from '../logger';\nimport { Merchandising } from './Merchandising';\n\nconst WELCOME_PROGRAM_CATEGORY = 'WelcomeProgram';\nconst ADVICE_HINT_TYPE = 'Advice';\n\ninterface AppProps {\n ordersPageLink: string;\n}\n\nexport const App: FC = ({ ordersPageLink }) => {\n const { shoppingContext } = useShoppingContext();\n const pendingOrdersAmount = useMemo(\n () =>\n shoppingContext?.unitDataCollection\n .filter((x: UnitDataCollection) => x.unitName === 'EndConsumerPendingOrders')\n .map((x: UnitDataCollection) => (x as UnitDataCollectionEndConsumerPendingOrder).notApprovedPendingOrders)[0] ??\n [],\n [shoppingContext],\n );\n\n const messages = (shoppingContext?.shoppingMessages ?? []).filter(\n (x) => x.hintType !== ADVICE_HINT_TYPE || x.hintCategory !== WELCOME_PROGRAM_CATEGORY,\n );\n\n return (\n \n \n \n \n \n {messages.length > 0 && (\n \n )}\n \n \n \n \n \n );\n};\n\nexport default App;\n","import { NOT_LOGGED_IN_USER_ID } from '@ori/auth';\nimport type { PickClientAppDataConfigProps } from '@ori/client-app-config';\n\n// This can be extended by specific types for your Online properties\nexport type CheckoutBasketConfig = PickClientAppDataConfigProps<'customerId'> & {\n customerOrdersLink?: string;\n defaultQty: number;\n isBackorderExplicit: boolean | undefined;\n isDoubleCurrency: boolean;\n isQofVisible: boolean;\n isSimplifiedCheckout?: boolean;\n localApiUrl?: string;\n manageSubscriptionLink?: string;\n maxValue: number;\n minValue: number;\n periodId: number;\n rewardsShopLink?: string;\n};\n\nexport const DEFAULT_CONFIG = {\n customerId: NOT_LOGGED_IN_USER_ID,\n customerOrdersLink: '/mypages/order/customer-orders',\n defaultQty: 1,\n isBackorderExplicit: false,\n isDoubleCurrency: false,\n isQofVisible: false,\n isSimplifiedCheckout: false,\n manageSubscriptionLink: '/mypages/order/manage-subscriptions',\n maxValue: 99,\n minValue: 1,\n periodId: 0,\n rewardsShopLink: '/oriflame-rewards',\n};\n","import { createContext, useContext } from 'react';\n\nimport { type CheckoutBasketConfig, DEFAULT_CONFIG } from '../types';\n\nexport const checkoutBasketContext = createContext(DEFAULT_CONFIG);\n\nexport const CheckoutBasketProvider = checkoutBasketContext.Provider;\n\nexport const useCheckoutBasket = () => useContext(checkoutBasketContext);\n","import { basketItemDefaultTranslations } from '@ori/basket-item';\n\nimport type { BasketContext } from '../types';\n\nexport const defaultBasketContext: BasketContext = {\n addedFree: [],\n addedPaid: [],\n atpClusterId: undefined,\n backorderItems: [],\n basketItemTranslations: basketItemDefaultTranslations,\n basketItemTranslationsNamespace: '',\n basketOffers: [],\n consumerOrders: undefined,\n distinctOffers: [],\n isAnonymous: true,\n isConsultant: false,\n isDiscounted: false,\n isEmptyBasket: true,\n message: undefined,\n shippingOffer: undefined,\n shoppingBag: undefined,\n shoppingBagItems: [],\n shoppingBagItemsValid: [],\n shoppingMessages: [],\n showBannerSection: false,\n showBpGlobally: false,\n subscriptions: [],\n vipLoyalty: null,\n vouchers: [],\n setIsLoadingAdditionalData: () => {},\n};\n","export const ADVICE_HINT_TYPE = 'Advice';\nexport const WELCOME_PROGRAM_CATEGORY = 'WelcomeProgram';\nexport const PENDING_EC_ORDERS = 'EndConsumerPendingOrders';\nexport const SHIPPING_OFFER = 'ShippingOffer';\nexport const VOUCHERS = 'Vouchers';\n","/* istanbul ignore file */\n\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\nimport { useTranslationsFromNamespace, type UseTranslationsFromNamespaceResult } from '@ori/i18n';\n\nimport type { DefaultTranslations } from '../constants/defaultTranslations';\n\n/**\n * A hook for accessing translations within a specific namespace along with a formatting function.\n *\n * @returns The translations within the specified namespace and a formatting function.\n */\nexport const useTranslations: () => UseTranslationsFromNamespaceResult = () =>\n useTranslationsFromNamespace();\n","import type {\n ShoppingBagItem,\n UnitDataCollectionEndConsumerPendingOrder,\n UnitDataCollectionVouchers,\n} from '@ori-events/basket-updated';\nimport { basketItemDefaultTranslations, type BasketItemTranslations } from '@ori/basket-item';\nimport { useShoppingContext } from '@ori/shopping-context';\nimport type { FC, PropsWithChildren } from 'react';\nimport { createContext, useContext, useMemo } from 'react';\n\nimport {\n defaultBasketContext,\n ADVICE_HINT_TYPE,\n WELCOME_PROGRAM_CATEGORY,\n PENDING_EC_ORDERS,\n SHIPPING_OFFER,\n VOUCHERS,\n translationsNamespace,\n} from '../constants';\nimport { useTranslations } from '../hooks';\nimport { logDebug } from '../logger';\nimport { type BasketContextProps, type BasketContext, type AddedItems } from '../types';\n\nexport const basketContext = createContext(defaultBasketContext);\n\nexport const BasketContextProvider: FC> = ({\n setIsLoadingAdditionalData,\n children,\n}) => {\n const { shoppingContext } = useShoppingContext();\n const { translations } = useTranslations();\n const basketItemTranslations: BasketItemTranslations = useMemo(\n () => ({\n ...basketItemDefaultTranslations,\n ...translations,\n }),\n [translations],\n );\n const basketItemTranslationsNamespace = translationsNamespace;\n const {\n atpClusterId,\n isAnonymous = false,\n isConsultant = false,\n shoppingMessages = [],\n showBp: showBpGlobally = false,\n unitDataCollection = [],\n shoppingBag,\n } = shoppingContext ?? {};\n\n logDebug('shoppingContext: ', shoppingContext);\n\n const {\n addedItems = [],\n backorderItems = [],\n basketOffers = [],\n isDiscounted = false,\n offers: rawOffers = [],\n reservedItems = [],\n shoppingBagItems = [],\n subscriptions = [],\n vipLoyalty,\n } = shoppingContext?.shoppingBag ?? {};\n\n const offers = useMemo(() => rawOffers.filter((x) => x.offerType !== SHIPPING_OFFER), [rawOffers]);\n const distinctOffers = useMemo(\n () =>\n offers.filter(\n (offer, index) => index === offers.findIndex((innerOffer) => innerOffer.choiceId === offer.choiceId),\n ),\n [offers],\n );\n const shoppingBagItemsValid = useMemo(() => shoppingBagItems.filter((x) => x.itemType !== 'U'), [shoppingBagItems]);\n\n // empty basket\n const isEmptyBasket = shoppingBagItemsValid.length === 0 && backorderItems.length === 0 && offers.length === 0;\n\n // Added sections (free, paid and reserved)\n const added: AddedItems = useMemo(() => {\n const free: ShoppingBagItem[] = [];\n const paid: ShoppingBagItem[] = [];\n addedItems.forEach((item) => {\n if (item.isFree) {\n free.push(item);\n } else {\n paid.push(item);\n }\n });\n paid.push(...reservedItems);\n\n return { free, paid };\n }, [addedItems, reservedItems]);\n\n const addedFree = useMemo(() => added.free, [added.free]);\n const addedPaid = useMemo(() => [...added.paid, ...reservedItems], [added.paid, reservedItems]);\n\n // shipping offers\n const shippingOffer = useMemo(() => rawOffers.find((x) => x.offerType === SHIPPING_OFFER), [rawOffers]);\n\n // end consumer orders\n const consumerOrders = useMemo(\n () =>\n unitDataCollection.find((x): x is UnitDataCollectionEndConsumerPendingOrder => x.unitName === PENDING_EC_ORDERS),\n [unitDataCollection],\n );\n\n // stuff for banner area\n const vouchers = useMemo(\n () => unitDataCollection.filter((x): x is UnitDataCollectionVouchers => x.unitName === VOUCHERS),\n [unitDataCollection],\n );\n const message = useMemo(\n () => shoppingMessages.find((x) => x.hintType === ADVICE_HINT_TYPE && x.hintCategory === WELCOME_PROGRAM_CATEGORY),\n [shoppingMessages],\n );\n\n const showBannerSection = Boolean(vipLoyalty) || basketOffers.length > 0 || Boolean(message) || vouchers.length > 0;\n\n const value = useMemo(\n () => ({\n addedFree,\n addedPaid,\n atpClusterId,\n backorderItems,\n basketItemTranslations,\n basketItemTranslationsNamespace,\n basketOffers,\n consumerOrders,\n distinctOffers,\n isAnonymous,\n isConsultant,\n isDiscounted,\n isEmptyBasket,\n message,\n shoppingBag,\n shoppingBagItems,\n shoppingBagItemsValid,\n shippingOffer,\n shoppingMessages,\n showBannerSection,\n showBpGlobally,\n subscriptions,\n vipLoyalty,\n vouchers,\n setIsLoadingAdditionalData,\n }),\n [\n addedFree,\n addedPaid,\n atpClusterId,\n backorderItems,\n basketItemTranslations,\n basketItemTranslationsNamespace,\n basketOffers,\n consumerOrders,\n distinctOffers,\n isAnonymous,\n isConsultant,\n isDiscounted,\n isEmptyBasket,\n message,\n shippingOffer,\n shoppingBag,\n shoppingBagItems,\n shoppingBagItemsValid,\n shoppingMessages,\n showBannerSection,\n showBpGlobally,\n subscriptions,\n vipLoyalty,\n vouchers,\n setIsLoadingAdditionalData,\n ],\n );\n\n logDebug('basketContext: ', value);\n\n return {children};\n};\n\nexport const useBasketContext = () => useContext(basketContext);\n","export enum FeedbackNotificationType {\n Reserve = 'reserve',\n Replacement = 'replacement',\n Subscription = 'subscription',\n}\n","/* istanbul ignore file */\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\n\nexport enum TranslationKey {\n activate = 'activate',\n add = 'add',\n added = 'added',\n addedToYourOrderAtACost = 'addedToYourOrderAtACost',\n addedToYourOrderWithout = 'addedToYourOrderWithout',\n bpCount = 'bpCount',\n bvCount = 'bvCount',\n cataloguePrice = 'cataloguePrice',\n checkoutOffers = 'checkoutOffers',\n clearBasket = 'clearBasket',\n closeList = 'closeList',\n closeSetComponents = 'closeSetComponents',\n continueShopping = 'continueShopping',\n customerOrders = 'customerOrders',\n cycle = 'cycle',\n delete = 'delete',\n doYouWantToClearYourBasket = 'doYouWantToClearYourBasket',\n earn = 'earn',\n emptyBag = 'emptyBag',\n expiringInFewDays = 'expiringInFewDays',\n favorites = 'favorites',\n favourite = 'favourite',\n goToRewardsShop = 'goToRewardsShop',\n itemsAddedByOriflameWillBeKept = 'itemsAddedByOriflameWillBeKept',\n lookingPrettyEmptyInYourBag = 'lookingPrettyEmptyInYourBag',\n manageSubscriptions = 'manageSubscriptions',\n more = 'more',\n myBag = 'myBag',\n newEdition = 'newEdition',\n newEditionAvailable = 'newEditionAvailable',\n no = 'no',\n none = 'none',\n notify = 'notify',\n notifyMe = 'notifyMe',\n openList = 'openList',\n originalProduct = 'originalProduct',\n popular = 'popular',\n postpone = 'postpone',\n price = 'price',\n promotionCode = 'promotionCode',\n qty = 'qty',\n quantity = 'quantity',\n recentlyViewed = 'recentlyViewed',\n regularPrice = 'regularPrice',\n related = 'related',\n replace = 'replace',\n replaced = 'replaced',\n reserve = 'reserve',\n reserved = 'reserved',\n samples = 'samples',\n shippingOffer = 'shippingOffer',\n showSetComponents = 'showSetComponents',\n step = 'step',\n subscribe = 'subscribe',\n subscribed = 'subscribed',\n subscriptions = 'subscriptions',\n superdeal = 'superdeal',\n total = 'total',\n unitPrice = 'unitPrice',\n unreserve = 'unreserve',\n voucherCodeIsRequired = 'voucherCodeIsRequired',\n voucherCodeIsTooLong = 'voucherCodeIsTooLong',\n whatsInside = 'whatsInside',\n yes = 'yes',\n youSave = 'youSave',\n youStillHave0pointsLeft = 'youStillHave0pointsLeft',\n}\n","import { Check, Replace, Delay, Subscription } from '@ori-ui/icons';\nimport { useState, useCallback } from 'react';\n\nimport { type FeedbackNotificationSettings, FeedbackNotificationType, TranslationKey } from '../types';\n\nexport const useFeedbackNotification = () => {\n const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);\n const [feedbackNotificationSettings, setFeedbackNotificationSettings] = useState({\n icon: Check,\n });\n\n const handleFeedbackOpen = useCallback(\n (notificationType: FeedbackNotificationType) => {\n switch (notificationType) {\n case FeedbackNotificationType.Replacement:\n setFeedbackNotificationSettings({\n icon: Replace,\n messageKey: TranslationKey.replaced,\n });\n break;\n case FeedbackNotificationType.Reserve:\n setFeedbackNotificationSettings({\n icon: Delay,\n messageKey: TranslationKey.reserved,\n });\n break;\n case FeedbackNotificationType.Subscription:\n setFeedbackNotificationSettings({\n icon: Subscription,\n messageKey: TranslationKey.subscribed,\n });\n break;\n default:\n setFeedbackNotificationSettings({ icon: Check });\n }\n\n setIsFeedbackOpen(true);\n },\n [setIsFeedbackOpen, setFeedbackNotificationSettings],\n );\n\n const handleClose = useCallback(() => {\n setIsFeedbackOpen(false);\n }, []);\n\n return {\n feedbackNotificationSettings,\n handleClose,\n handleFeedbackOpen,\n isFeedbackOpen,\n };\n};\n","import { PriorityHigh } from '@ori-ui/icons';\nimport { styled, Typography } from '@ori-ui/mui';\n\nexport const VoucherForm = styled('form')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper,\n width: '100%',\n minWidth: 113,\n padding: theme.spacing(4, 3),\n\n [theme.breakpoints.up('sm')]: {\n width: 'auto',\n minWidth: 413,\n padding: theme.spacing(4, 6, 6, 6),\n borderRadius: theme.spacing(2),\n },\n}));\n\nexport const VoucherLabel = styled(Typography)(({ theme }) => ({\n whiteSpace: 'nowrap',\n color: theme.palette.text.primary,\n marginBottom: theme.spacing(2),\n}));\n\nexport const CellInput = styled('div')(() => ({\n display: 'flex',\n}));\n\nexport const InputWrapper = styled('div')(() => ({\n position: 'relative',\n width: '100%',\n}));\n\nexport const ErrorWrapper = styled('div')(() => ({\n position: 'absolute',\n right: '0',\n top: '0',\n transform: 'translate(0, 10px)',\n}));\n\nexport const ExclamationMark = styled(PriorityHigh)(({ theme }) => ({\n fontSize: '1.5rem',\n color: theme.palette.error.main,\n border: '1px solid',\n borderRadius: '50%',\n borderColor: theme.palette.error.main,\n backgroundColor: theme.palette.error.contrastText,\n\n '&:hover': {\n color: theme.palette.error.contrastText,\n backgroundColor: theme.palette.error.main,\n },\n}));\n\nexport const CellButton = styled('div')(({ theme }) => ({\n alignSelf: 'flex-end',\n margin: theme.spacing(0, 0, 0, 4),\n}));\n","import * as AddVoucherEvent from '@ori-events/add-voucher';\nimport * as AddVoucherFailedEvent from '@ori-events/add-voucher-failed';\nimport * as BasketUpdatedEvent from '@ori-events/basket-updated';\n\nexport const addVoucher = async (voucherCode: string) =>\n new Promise((resolve, reject) => {\n function handleResolve(event: BasketUpdatedEvent.Event) {\n window.removeEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n window.removeEventListener(AddVoucherFailedEvent.Name, handleReject as EventListener);\n resolve(event.detail);\n }\n\n function handleReject(event: AddVoucherFailedEvent.Event) {\n window.removeEventListener(AddVoucherFailedEvent.Name, handleReject as EventListener);\n window.removeEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n reject(event.detail.localizedMessage);\n }\n\n window.addEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n window.addEventListener(AddVoucherFailedEvent.Name, handleReject as EventListener);\n\n const eventToTrigger = new CustomEvent(AddVoucherEvent.Name, {\n detail: { voucherCode },\n });\n\n window.dispatchEvent(eventToTrigger);\n });\n","/* eslint-disable react/jsx-no-bind -- x */\nimport { FeedbackNotification } from '@ori-ui/components';\nimport { Check } from '@ori-ui/icons';\nimport type { InputProps } from '@ori-ui/mui';\nimport { Button, TextField, Tooltip, Typography } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport { useFormContext, useFormState } from 'react-hook-form';\n\nimport { useBasketContext, useCheckoutBasket } from '../../contexts';\nimport { useTranslations } from '../../hooks';\nimport { BasketCardForm } from '../styled';\nimport type { AddVoucherFormProps } from './AddVoucherFormWrapper';\nimport { VoucherLabel, CellInput, InputWrapper, ErrorWrapper, ExclamationMark, CellButton } from './styles';\nimport { useVoucherForm } from './useVoucherForm';\n\nexport const AddVoucherForm = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { isSimplifiedCheckout } = useCheckoutBasket();\n const { shoppingBag } = useBasketContext();\n const {\n error,\n handleAddToBasket,\n handleClick,\n handleClose,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n isTooltipOpen,\n resetError,\n } = useVoucherForm();\n const testId = getTestId('promo-code');\n const { handleSubmit, register } = useFormContext();\n const { errors } = useFormState();\n const { onChange, ...voucherCodeRegister } = register('voucherCode');\n const helperText = errors.voucherCode?.message?.toString() ?? error;\n\n if (isSimplifiedCheckout ?? !shoppingBag) {\n return null;\n }\n\n return (\n \n \n {formatMessage('promotionCode')}\n \n \n \n \n }\n onChange={(e) => {\n void onChange(e);\n resetError();\n }}\n />\n }\n onClose={handleClose}\n >\n {formatMessage('added')}\n \n \n {error ? (\n \n \n \n ) : null}\n \n \n \n \n \n {formatMessage('activate')}\n \n \n \n \n \n );\n};\n","import * as RequestClearShoppingCache from '@ori-events/request-clear-shopping-cache';\nimport * as RequestShoppingContextEvent from '@ori-events/request-shopping-context';\nimport { NOT_LOGGED_IN_USER_ID } from '@ori/auth';\nimport { setReferralInfo } from '@ori/checkout-utils';\nimport { useEnvironment } from '@ori/environment';\nimport type { AxiosError } from '@ori/global-api-client-react';\nimport {\n GlobalShoppingReferralDtoReferralType,\n createShoppingSessionReferral,\n useApiClient,\n} from '@ori/global-api-client-react';\nimport { useLogger } from '@ori/logger';\nimport { useSessionId } from '@ori/shopping-context';\nimport {\n getTenantApplicationsShareAndEarnPersonalCodeCustomer,\n useApiClient as useStaticApiClient,\n} from '@ori/static-api-client-react';\nimport { useState, useCallback } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\nimport { useCheckoutBasket } from '../../contexts';\nimport { addVoucher, splitPromoCode } from '../../utils';\nimport type { AddVoucherFormProps } from './AddVoucherFormWrapper';\n\ninterface UseVoucherForm {\n error: string | undefined;\n handleAddToBasket: (formValues: AddVoucherFormProps) => Promise;\n handleClick: () => void;\n handleClose: () => void;\n handleMouseEnter: () => void;\n handleMouseLeave: () => void;\n isOpen: boolean;\n isTooltipOpen: boolean;\n resetError: () => void;\n}\n\nexport interface ReferralApiErrorData {\n Message: string;\n}\n\nexport function useVoucherForm(): UseVoucherForm {\n const { tenant } = useEnvironment();\n const { customerId } = useCheckoutBasket();\n const sessionId = useSessionId();\n const [error, setError] = useState();\n const [isOpen, setIsOpen] = useState(false);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const apiClient = useApiClient();\n const staticApiClient = useStaticApiClient();\n const logger = useLogger('useVoucherForm');\n const { setValue } = useFormContext();\n\n const handleClose = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const resetError = useCallback((): void => {\n setError('');\n }, []);\n\n const addVoucherCode = useCallback(\n async (voucherCode: string) => {\n try {\n await addVoucher(voucherCode);\n setIsOpen(true);\n setError('');\n setValue('voucherCode', '');\n\n return true;\n } catch (actionError: unknown) {\n if (actionError instanceof Error) {\n logger.error(actionError);\n setIsOpen(true);\n } else {\n setError((actionError as Error).toString());\n }\n\n return false;\n }\n },\n [logger, setValue],\n );\n\n const handleAddToBasket = async (formValues: AddVoucherFormProps) => {\n const { referral, voucher } = splitPromoCode(formValues.voucherCode);\n\n if (customerId !== NOT_LOGGED_IN_USER_ID) {\n await addVoucherCode(voucher ?? formValues.voucherCode);\n\n return;\n }\n\n try {\n const referralResponse = await getTenantApplicationsShareAndEarnPersonalCodeCustomer(\n staticApiClient,\n tenant,\n referral,\n );\n\n try {\n await createShoppingSessionReferral(apiClient, sessionId, {\n customerId: referralResponse.data.customerId,\n referralType: GlobalShoppingReferralDtoReferralType.Pbs,\n });\n setReferralInfo(tenant, referral);\n\n if (voucher) {\n await addVoucher(voucher);\n }\n\n setIsOpen(true);\n setError('');\n setValue('voucherCode', '');\n const clearCache = new CustomEvent(RequestClearShoppingCache.Name);\n window.dispatchEvent(clearCache);\n // setTimeout is set so the shopping context is requested after caches are cleared\n setTimeout(() => {\n const eventToTrigger = new CustomEvent(RequestShoppingContextEvent.Name);\n window.dispatchEvent(eventToTrigger);\n });\n } catch (postReferralError: unknown) {\n const apiError = postReferralError as AxiosError;\n if (apiError.response?.data.Message) {\n setError(apiError.response.data.Message);\n }\n\n if (postReferralError instanceof Error) {\n logger.error(postReferralError);\n } else if (postReferralError !== '') {\n setError((postReferralError as Error).toString());\n }\n }\n } catch (referralError) {\n const isReferralVoucherAdded = await addVoucherCode(referral);\n\n if (isReferralVoucherAdded && voucher) {\n await addVoucherCode(voucher);\n }\n }\n };\n\n const handleMouseEnter = () => {\n setIsTooltipOpen(true);\n };\n\n const handleMouseLeave = () => {\n setIsTooltipOpen(false);\n };\n\n const handleClick = () => {\n setIsTooltipOpen((prevState) => !prevState);\n };\n\n return {\n error,\n handleAddToBasket,\n handleClick,\n handleClose,\n handleMouseEnter,\n handleMouseLeave,\n isOpen,\n isTooltipOpen,\n resetError,\n };\n}\n","export type VoucherCodes = {\n referral: string;\n voucher?: string;\n};\n\nexport const splitPromoCode = (promoCode: string): VoucherCodes => {\n const parts = promoCode.split('-');\n\n if (parts.length === 3 && parts[0]?.length === 2) {\n return {\n referral: `${parts[0]}-${parts[1]}`,\n voucher: parts[2],\n };\n }\n\n return {\n referral: promoCode,\n voucher: undefined,\n };\n};\n","import { zodResolver } from '@hookform/resolvers/zod';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { z } from 'zod';\n\nimport { useBasketContext, useCheckoutBasket } from '../../contexts';\nimport { useTranslations } from '../../hooks';\nimport { AddVoucherForm } from './AddVoucherForm';\n\nexport interface AddVoucherFormProps {\n voucherCode: string;\n}\n\n// TODO: Reduce number of components\nexport const AddVoucherFormWrapper = () => {\n const { isSimplifiedCheckout } = useCheckoutBasket();\n const { shoppingBag } = useBasketContext();\n const { formatMessage } = useTranslations();\n\n // TODO: Refactor to not be depend on formatMessage\n const voucherValidationSchema = z.object({\n voucherCode: z\n .string()\n .min(1, formatMessage('voucherCodeIsRequired'))\n .max(50, formatMessage('voucherCodeIsTooLong')),\n });\n\n const form = useForm({\n mode: 'onChange',\n defaultValues: { voucherCode: '' },\n resolver: zodResolver(voucherValidationSchema),\n });\n\n if (isSimplifiedCheckout ?? !shoppingBag) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n","import { alpha, CircularProgress, styled } from '@ori-ui/mui';\nimport { memo } from 'react';\n\nconst Root = styled('div')(({ theme }) => ({\n alignItems: 'center',\n background: alpha(theme.palette.common.white, 0.5),\n bottom: 0,\n display: 'flex',\n justifyContent: 'center',\n left: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n zIndex: 999,\n}));\n\nexport const Loading = memo(() => (\n \n \n \n));\n","import type { BasketOffer } from '@ori-events/basket-updated';\nimport { Typography } from '@ori-ui/mui';\nimport { ActionBanner } from '@ori/checkout-ui';\nimport useTestId from '@ori/testid-generator';\nimport { Suspense, lazy, useCallback } from 'react';\nimport type { FC } from 'react';\n\nimport { useCheckoutOfferHints } from '../contexts';\nimport { logDebug } from '../logger';\nimport { FormattedMessage } from './FormattedMessage';\nimport { Loading } from './shared';\n\ninterface OfferHintsProps {\n isOfferHintsModalOpen: boolean;\n offers: BasketOffer[];\n}\n\nconst OfferHintsModal = lazy(async () => import(/* webpackChunkName: \"offer-hints-modal\" */ './Modal'));\n\nexport const OfferHints: FC = ({ offers, isOfferHintsModalOpen }) => {\n const { getTestId } = useTestId();\n const { setIsOfferHintsModalOpen } = useCheckoutOfferHints();\n const closeModalHandler = useCallback(() => setIsOfferHintsModalOpen(false), [setIsOfferHintsModalOpen]);\n const openModalHandler = useCallback(() => setIsOfferHintsModalOpen(true), [setIsOfferHintsModalOpen]);\n const isAnyOfferPresent = offers.length > 0;\n\n logDebug(`>>> rendering ${offers.length} offer hints`);\n\n return (\n <>\n {isAnyOfferPresent ? (\n \n \n \n ({offers.length})\n \n \n \n ) : null}\n {isAnyOfferPresent && isOfferHintsModalOpen ? (\n }>\n \n \n ) : null}\n \n );\n};\n","import type { ProgressBarItems } from '@ori-events/basket-updated';\nimport { styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\ninterface ProgressBarProps {\n color: string;\n progress: ProgressBarItems;\n}\n\nconst Bar = styled('div')<{\n ownerState: {\n barColor: string;\n barLength: string;\n };\n}>(({ ownerState: { barColor, barLength }, theme }) => ({\n backgroundColor: theme.palette.grey[100],\n borderRadius: '1%/40%',\n height: theme.spacing(1),\n marginTop: theme.spacing(3),\n position: 'relative',\n\n '&:after': {\n background: barColor,\n borderRadius: '1%/40%',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n top: 0,\n width: barLength,\n },\n}));\n\nconst Value = styled('div')(({ theme }) => ({\n color: theme.palette.text.primary,\n fontSize: theme.typography.caption.fontSize,\n marginLeft: 'auto',\n marginRight: theme.spacing(3),\n marginTop: theme.spacing(1),\n\n [theme.breakpoints.up(920)]: {\n marginRight: theme.spacing(6),\n },\n}));\n\nconst Amount = styled('span')(() => ({\n fontWeight: 'bold',\n}));\n\nexport const ProgressBar: FC = ({ progress, color }) => {\n const { target, amount, unit } = progress;\n const length = target === 0 ? '0%' : `${Math.round((amount * 100) / target)}%`;\n const ownerState = { barColor: color, barLength: length };\n\n return (\n <>\n \n \n {amount} / {target} {unit} \n \n \n );\n};\n","import type { ProgressBarItems } from '@ori-events/basket-updated';\nimport { styled, Typography, useTheme } from '@ori-ui/mui';\nimport { InfoBanner } from '@ori/checkout-ui';\nimport type { FC } from 'react';\n\nimport type { TestIdProp } from '../../types';\nimport { ProgressBar } from './ProgressBar';\n\nconst ContentWrapper = styled('div')(() => ({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n}));\n\nconst Header = styled(Typography)(({ theme }) => ({\n [theme.breakpoints.up(920)]: {\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst Content = styled(Typography)(({ theme }) => ({\n display: 'inline-block',\n position: 'relative',\n\n [theme.breakpoints.up(920)]: {\n fontSize: theme.typography.body1.fontSize,\n paddingRight: theme.spacing(6),\n },\n}));\n\nexport interface MerchandizingItemProps extends TestIdProp {\n progress?: ProgressBarItems;\n text: string;\n title: string;\n}\n\nexport const MerchandizingItem: FC = ({ 'data-testid': testId, progress, text, title }) => {\n const theme = useTheme();\n\n return (\n \n \n \n {title}\n \n {text}\n {progress ? (\n \n ) : null}\n \n \n );\n};\n","import { Switch } from '@ori-ui/mui';\nimport { useCallback } from 'react';\nimport type { FC } from 'react';\n\ninterface CheckboxTogglerProps {\n isChecked: boolean;\n toggleVoucher: () => void;\n}\n\nexport const CheckboxToggler: FC = ({ toggleVoucher, isChecked }) => {\n const handleClick = useCallback(() => {\n toggleVoucher();\n }, [toggleVoucher]);\n\n return (\n \n );\n};\n","import { styled, Typography } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\ninterface VoucherText {\n discountDescription: string;\n pendingDiscountDescription: string;\n}\n\nconst Root = styled('div')(() => ({\n display: 'block',\n}));\n\nexport const VoucherInfo: FC = ({ discountDescription, pendingDiscountDescription }) => (\n \n {discountDescription}\n {pendingDiscountDescription}\n \n);\n","import type { UnitDataCollectionVouchers } from '@ori-events/basket-updated';\nimport { styled } from '@ori-ui/mui';\nimport { InfoBanner } from '@ori/checkout-ui';\nimport { useCallback } from 'react';\nimport type { FC } from 'react';\n\nimport { mainLogger } from '../../logger';\nimport type { TestIdProp } from '../../types';\nimport { addVoucher, removeVoucher } from '../../utils';\nimport { CheckboxToggler } from './CheckboxToggler';\nimport { VoucherInfo } from './VoucherInfo';\n\ninterface ReferralVoucherProps extends TestIdProp {\n voucherUnit: UnitDataCollectionVouchers;\n}\n\nconst ContentWrapper = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n}));\n\nexport const ReferralVoucher: FC = ({ 'data-testid': testId, voucherUnit }) => {\n const { isApplied, voucherCode } = voucherUnit;\n\n const toggleVoucher = useCallback(async () => {\n if (isApplied) {\n try {\n await removeVoucher(voucherCode);\n } catch (error: unknown) {\n if (error instanceof Error) {\n mainLogger.error(error);\n }\n }\n } else {\n try {\n await addVoucher(voucherCode);\n } catch (error: unknown) {\n if (error instanceof Error) {\n mainLogger.error(error);\n }\n }\n }\n }, [isApplied, voucherCode]);\n\n const handleToggleVoucher = useCallback(async () => {\n await toggleVoucher();\n }, [toggleVoucher]);\n\n return (\n \n \n \n \n \n \n );\n};\n","import * as BasketUpdatedEvent from '@ori-events/basket-updated';\nimport * as RemoveVoucherEvent from '@ori-events/remove-voucher';\nimport * as RemoveVoucherFailedEvent from '@ori-events/remove-voucher-failed';\n\nexport const removeVoucher = async (voucherCode: string) =>\n new Promise((resolve, reject) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n window.removeEventListener(RemoveVoucherFailedEvent.Name, handleReject as EventListener);\n resolve();\n }\n\n function handleReject(event: RemoveVoucherFailedEvent.Event) {\n window.removeEventListener(RemoveVoucherFailedEvent.Name, handleReject as EventListener);\n window.removeEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n reject(event.detail.localizedMessage);\n }\n\n window.addEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n window.addEventListener(RemoveVoucherFailedEvent.Name, handleReject as EventListener);\n\n const eventToTrigger = new CustomEvent(RemoveVoucherEvent.Name, {\n detail: { voucherCode },\n });\n\n window.dispatchEvent(eventToTrigger);\n });\n","import type { ShoppingBagVipLoyalty } from '@ori-events/basket-updated';\nimport { Typography } from '@ori-ui/mui';\nimport { ActionBanner } from '@ori/checkout-ui';\nimport type { FC } from 'react';\n\nimport { useCheckoutBasket } from '../../contexts';\nimport { useTranslations } from '../../hooks';\nimport type { TestIdProp } from '../../types';\n\ninterface RewardShopBannerProps extends TestIdProp {\n rewardShopBanner: ShoppingBagVipLoyalty;\n}\n\nexport const RewardShopBanner: FC = ({\n 'data-testid': testId,\n rewardShopBanner: { daysToExpire, expiringPoints, isExpiring, remainingPoints },\n}) => {\n const { rewardsShopLink } = useCheckoutBasket();\n const { formatMessage } = useTranslations();\n\n // button with data-testid={`${testId}-link`} is removed\n // link is now on entire element\n\n return (\n \n \n \n {formatMessage('youStillHave0pointsLeft', {\n 0: remainingPoints,\n })}\n \n
\n {isExpiring ? (\n <>\n \n {formatMessage('expiringInFewDays', {\n 0: expiringPoints,\n 1: daysToExpire,\n })}\n \n   \n \n ) : null}\n {formatMessage('goToRewardsShop')}\n
\n \n );\n};\n","import { styled } from '@ori-ui/mui';\nimport { App as OfferHints } from '@ori/checkout-offer-hints';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\n\nimport { useBasketContext, useCheckoutBasket } from '../../contexts';\nimport { MerchandizingItem } from './MerchandisingItem';\nimport { ReferralVoucher } from './ReferralVoucher';\nimport { RewardShopBanner } from './RewardShopBanner';\n\nconst BannerWrapper = styled('div')(({ theme }) => ({\n display: 'grid',\n gridTemplateColumns: '100%',\n justifyContent: 'stretch',\n gap: 10,\n padding: theme.spacing(0, 3),\n '@media (min-width: 768px)': {\n padding: 0,\n },\n}));\n\nexport const BannersSection: FC = () => {\n const { getTestId } = useTestId();\n const { basketOffers, message, showBannerSection, vipLoyalty, vouchers } = useBasketContext();\n const { isDoubleCurrency } = useCheckoutBasket();\n\n if (!showBannerSection) {\n return null;\n }\n\n return (\n \n {vipLoyalty ? (\n \n ) : null}\n {basketOffers.length > 0 ? : null}\n {vouchers.map((unit) => (\n \n ))}\n {message ? (\n \n ) : null}\n \n );\n};\n","import * as ClearBasketEvent from '@ori-events/clear-basket';\nimport { FeedbackDialog } from '@ori-ui/components';\nimport { Button, Typography } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\nimport React, { useCallback } from 'react';\n\nimport { useTranslations } from '../../hooks';\n\ntype ClearBasketPopUpProps = {\n visible: boolean;\n setVisible: (val: boolean) => void;\n};\n\nexport const ClearBasketPopUp: FC = ({ visible, setVisible }) => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n\n const onClose = useCallback(() => setVisible(false), [setVisible]);\n const onConfirm = useCallback(() => {\n const clearBasketEvent = new CustomEvent(ClearBasketEvent.Name);\n window.dispatchEvent(clearBasketEvent);\n onClose();\n }, [onClose]);\n\n return (\n \n {formatMessage('yes')}\n ,\n \n {formatMessage('no')}\n ,\n ]}\n severity=\"info\"\n onClose={onClose}\n >\n \n {formatMessage('itemsAddedByOriflameWillBeKept')}\n \n \n );\n};\n","import { Button, styled } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\nimport { useCallback, useState } from 'react';\n\nimport { useTranslations } from '../../hooks';\nimport { ClearBasketPopUp } from './ClearBasketPopUp';\n\nconst Root = styled('div')(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: theme.spacing(3),\n justifyContent: 'center',\n padding: theme.spacing(3, 0),\n}));\n\nexport const ClearBasket: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const [isClearBasketPopupVisible, setIsClearBasketPopupVisible] = useState(false);\n\n const openClearBasketPopup = useCallback(() => {\n setIsClearBasketPopupVisible(true);\n }, []);\n\n return (\n <>\n \n \n \n {formatMessage('clearBasket')}\n \n \n \n );\n};\n","import { Skeleton, Tab, Tabs } from '@ori-ui/mui';\nimport { Placement } from '@ori/analytics-data';\nimport { NOT_LOGGED_IN_USER_ID } from '@ori/auth';\nimport { getRetryErrorSwrOptions } from '@ori/checkout-utils';\nimport { useServiceUrls } from '@ori/configuration-manager';\nimport { useEnvironment } from '@ori/environment';\nimport { useTranslationsWithNamespaces } from '@ori/i18n';\nimport { useUserSegmentationData } from '@ori/presentation-http';\nimport { mapProductBoxesFromStaticApi, useHideRating } from '@ori/product-box';\nimport { ProductBoxCarousel } from '@ori/product-box-carousel';\nimport { useShoppingContext } from '@ori/shopping-context';\nimport {\n useGetTenantProductRelations,\n StaticProductsRelationRelationType,\n type StaticProductsRelation,\n useGetTenantApplicationsProductBox,\n} from '@ori/static-api-client-react';\nimport useTestId from '@ori/testid-generator';\nimport { useCallback, useEffect, useMemo, useState, type FC } from 'react';\nimport { useInView } from 'react-cool-inview';\nimport { z } from 'zod';\n\nimport { useTranslations } from '../hooks';\nimport { BasketCard } from './styled';\n\nconst RECENTLY_VIEWED_PRODUCTS_LOCAL_STORAGE_KEY = 'PDP-recently-viewed-products';\nconst relationTypes = [\n StaticProductsRelationRelationType.Related,\n StaticProductsRelationRelationType.Samples,\n StaticProductsRelationRelationType.RecentlyViewed,\n];\n\nconst placementsFromType: Partial> = {\n [StaticProductsRelationRelationType.Related]: Placement.RelatedProducts,\n [StaticProductsRelationRelationType.Samples]: Placement.Samples,\n [StaticProductsRelationRelationType.RecentlyViewed]: Placement.RecentProducts,\n};\n\nconst translationsFromRelationType = {\n [StaticProductsRelationRelationType.Related]: 'related',\n [StaticProductsRelationRelationType.Samples]: 'samples',\n [StaticProductsRelationRelationType.RecentlyViewed]: 'recentlyViewed',\n [StaticProductsRelationRelationType.Favourite]: 'favourite',\n [StaticProductsRelationRelationType.Popular]: 'popular',\n [StaticProductsRelationRelationType.Undefined]: 'none',\n} as const satisfies Record;\n\nconst getRecentlyViewedProductsCodes = () => {\n try {\n const data = localStorage.getItem(RECENTLY_VIEWED_PRODUCTS_LOCAL_STORAGE_KEY);\n\n return z\n .array(z.string())\n .parse(JSON.parse(data ?? ''))\n .slice(0, 10);\n } catch {\n return [];\n }\n};\n\nexport const RecommendationsBar: FC = () => {\n const { getTestId } = useTestId();\n\n const { language } = useTranslationsWithNamespaces();\n const { formatMessage } = useTranslations();\n\n const {\n atpClusterId,\n customerTypeId,\n visitorSegment,\n loading: loadingSegmentationParameters,\n } = useUserSegmentationData();\n const { tenant } = useEnvironment();\n const { staticApiUrl } = useServiceUrls(['staticApi']);\n const hideRating = useHideRating({ staticApiUrl, tenant });\n\n const { shoppingContext, isLoading: loadingShoppingContext } = useShoppingContext();\n\n const { inView, observe } = useInView({ rootMargin: '100px' });\n\n const productCode =\n shoppingContext?.lastAddedItem?.itemCode ?? shoppingContext?.shoppingBag.shoppingBagItems[0]?.itemCode ?? '';\n\n const recommendations = useGetTenantProductRelations(\n tenant,\n productCode,\n {\n lang: language,\n atpClusterId: atpClusterId ?? undefined,\n relationTypes,\n },\n {\n swr: {\n enabled: !!inView && !loadingSegmentationParameters,\n // fix type in utils\n ...(getRetryErrorSwrOptions() as object),\n },\n },\n );\n\n const recommendationsData = useMemo(() => {\n if (productCode && !recommendations.data) {\n return [];\n }\n\n return relationTypes\n .map((relationType) =>\n relationType === StaticProductsRelationRelationType.RecentlyViewed\n ? { relationType, productCodes: getRecentlyViewedProductsCodes() }\n : recommendations.data?.relations.find((relation) => relation.relationType === relationType),\n )\n .filter(\n (recommendation): recommendation is StaticProductsRelation =>\n recommendation !== undefined && recommendation.productCodes.length > 0,\n );\n }, [recommendations.data, productCode]);\n\n const [activeTab, setActiveTab] = useState();\n\n // Select first available tab after data changes if it is empty/invalid\n useEffect(() => {\n setActiveTab((oldActiveTab) => {\n const tab = recommendationsData.find((d) => d.relationType === oldActiveTab);\n if (tab !== undefined && tab.productCodes.length > 0) {\n return oldActiveTab;\n }\n\n return recommendationsData.find((r) => r.productCodes.length)?.relationType;\n });\n }, [recommendationsData]);\n\n const currentTab = recommendationsData.find((d) => d.relationType === activeTab);\n const productCodes = currentTab?.productCodes ?? [];\n\n const products = useGetTenantApplicationsProductBox(\n tenant,\n {\n lang: language,\n atpClusterId: atpClusterId ?? undefined,\n customerTypeId: customerTypeId ?? undefined,\n visitorSegment: visitorSegment ?? undefined,\n productCodes,\n },\n {\n swr: {\n // fix type in utils\n ...(getRetryErrorSwrOptions() as object),\n revalidateIfStale: false,\n enabled: productCodes.length > 0,\n },\n },\n );\n const productsData = useMemo(\n () => mapProductBoxesFromStaticApi(products.data?.data?.products ?? []),\n [products.data],\n );\n\n const onTabChange = useCallback(\n (_: unknown, value: StaticProductsRelationRelationType): void => setActiveTab(value),\n [],\n );\n\n if (loadingShoppingContext || loadingSegmentationParameters || recommendations.isValidating) {\n return (\n \n );\n }\n\n if (!recommendationsData.length) {\n return
;\n }\n\n return (\n \n {!!activeTab && (\n \n {recommendationsData.map((v) => (\n \n ))}\n \n )}\n {!!currentTab && (\n \n )}\n \n );\n};\n","import type { ShoppingBagItem } from '@ori-events/basket-updated';\nimport type { BasketItemProps, BasketItemTranslations, ShadeProps } from '@ori/basket-item';\nimport { isNullableStringAGreaterThanB, stringEmptyToUndefined } from '@ori/checkout-utils';\nimport { isNonNullable } from '@ori/ts-utils';\n\nexport interface ItemMapperProps {\n isBundleItem?: boolean;\n isOfferItem?: boolean;\n isSubscription?: boolean;\n testId: string;\n}\n\ninterface CommonProps extends ItemMapperProps {\n initialQuantity: number;\n isBrandPartner?: boolean;\n isDiscounted?: boolean;\n isWithoutSummary?: boolean;\n showBpGlobally: boolean;\n basketItemTranslations: Partial;\n basketItemTranslationsNamespace: string;\n}\n\ninterface MapShoppingBagItemProps {\n item: ShoppingBagItem;\n commonProps: CommonProps;\n}\n\nfunction determineIfIsOfferItem(item: ShoppingBagItem, commonProps: CommonProps, flagLabelClass: string): boolean {\n // special case for subscriptions shown in subscription section. They do not have highlighted price (PBI1204387)\n if (item.itemType === 'A') {\n return false;\n }\n // special case for back order items. They do not have highlighted price (PBI1204333)\n if (item.itemType === 'O') {\n return false;\n }\n\n return (\n Boolean(commonProps.isOfferItem) ||\n isNullableStringAGreaterThanB(item.basicCataloguePrice, item.price) ||\n flagLabelClass.includes('offer') ||\n Boolean(commonProps.isDiscounted)\n );\n}\n\nexport function mapShoppingBagItem(props: MapShoppingBagItemProps): BasketItemProps {\n const { item, commonProps } = props;\n const flag = isNonNullable(item.productFlag)\n ? {\n label: item.productFlag.label,\n labelClass: item.productFlag.labelClass,\n tooltip: item.productFlag.tooltip,\n }\n : undefined;\n const flagLabelClass = flag?.labelClass ?? 'no';\n const theItemIsOfferItem: boolean = determineIfIsOfferItem(item, commonProps, flagLabelClass);\n\n const shade: ShadeProps | null | undefined =\n stringEmptyToUndefined(item.colorHexCode) === undefined && stringEmptyToUndefined(item.colorImageSrc) === undefined\n ? undefined\n : {\n hexColors: item.colorHexCode?.split(',').filter((hexCode) => Boolean(hexCode)) ?? undefined,\n imageUrl: item.colorImageSrc ?? undefined,\n shadeName: stringEmptyToUndefined(item.itemColor),\n };\n\n // resetting catalogue price and basic catalogue price to undefined if itemType is back order (PBI1204333)\n const basicCataloguePrice = item.itemType === 'O' ? undefined : item.basicCataloguePrice;\n const cataloguePrice = item.itemType === 'O' ? undefined : item.price;\n\n return {\n basicCataloguePrice: stringEmptyToUndefined(basicCataloguePrice),\n bp: item.bp,\n brand: stringEmptyToUndefined(item.itemBrand),\n bundleItems: undefined,\n buttons: undefined,\n bv: item.bv ?? undefined,\n cataloguePrice: stringEmptyToUndefined(cataloguePrice),\n code: item.itemCode,\n flags: flag === undefined ? undefined : [flag],\n image: stringEmptyToUndefined(item.itemImageSrc),\n isAvailable: item.isAvailable,\n isOfferColor: theItemIsOfferItem,\n isSmall: false,\n lineNumber: item.lineNumber,\n maxQuantity: item.maxQuantity,\n minQuantity: item.canBeDeleted ? (item.canBeReduced ? 0 : commonProps.initialQuantity) : 1,\n name: item.itemDescription,\n points: stringEmptyToUndefined(item.points),\n priceName: commonProps.isBrandPartner ? 'cataloguePrice' : 'regularPrice',\n quantity: item.quantity,\n quantityPickerDisabled:\n Boolean(commonProps.isBundleItem) ||\n Boolean(commonProps.isSubscription) ||\n !item.isAvailable ||\n Boolean(commonProps.isOfferItem) ||\n !item.canBeModified,\n shade,\n showBp: commonProps.showBpGlobally,\n testId: commonProps.testId,\n totalPrice: item.totalPrice,\n translations: commonProps.basketItemTranslations,\n translationsNamespace: commonProps.basketItemTranslationsNamespace,\n type: item.itemType,\n unitPrice: stringEmptyToUndefined(item.unitPrice),\n url: stringEmptyToUndefined(item.itemDetailPath),\n };\n}\n","import { type Data, Name, type TranslationKey, translationKeys } from '@ori-events/show-error-notification';\n\nexport { translationKeys };\nexport type { TranslationKey };\n\nexport const errorNotificationTimeOut = 3000;\n\nexport const showErrorNotification = (message?: TranslationKey) =>\n window.dispatchEvent(\n new CustomEvent(Name, {\n detail: {\n message: message ?? translationKeys.genericError,\n notificationOptions: { delay: errorNotificationTimeOut },\n },\n }),\n );\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as UpdateBasketItem from '@ori-events/update-basket-item';\nimport * as UpdateBasketItemFailed from '@ori-events/update-basket-item-failed';\nimport type { Placement, UpdateBasketItemAnalyticsData } from '@ori/analytics-data';\n\ninterface UpdateBasketItemData extends UpdateBasketItem.Data, UpdateBasketItemAnalyticsData {}\n\ninterface UpdateBasketItemOptions {\n itemCode: string;\n lineNumber: number;\n placement: Placement;\n previousQuantity: number;\n quantity: number;\n}\n\nexport const updateBasketItem = async ({\n itemCode,\n lineNumber,\n placement,\n previousQuantity,\n quantity,\n}: UpdateBasketItemOptions) =>\n new Promise((resolve, reject) => {\n const listener = ((event: BasketUpdated.Event | UpdateBasketItemFailed.Event) => {\n window.removeEventListener(BasketUpdated.Name, listener);\n window.removeEventListener(UpdateBasketItemFailed.Name, listener);\n\n const { detail } = event;\n if (UpdateBasketItemFailed.isUpdateBasketItemErrorResponse(detail)) {\n reject(new Error(`update-basket-item error: ${detail.message}`));\n } else {\n resolve();\n }\n }) as EventListener;\n\n window.addEventListener(BasketUpdated.Name, listener);\n window.addEventListener(UpdateBasketItemFailed.Name, listener);\n\n const eventToTrigger = new CustomEvent(UpdateBasketItem.Name, {\n detail: {\n lineNumber,\n quantity,\n previousQuantity,\n newQuantity: quantity,\n itemCode,\n placement,\n },\n });\n window.dispatchEvent(eventToTrigger);\n });\n","import type { Placement } from '@ori/analytics-data';\nimport { useLogger } from '@ori/logger';\nimport { useCallback } from 'react';\n\nimport { useBasketContext } from '../../contexts';\nimport { FeedbackNotificationType } from '../../types';\nimport { cancelBackorderDemand, showErrorNotification, updateBasketItem } from '../../utils';\n\ninterface UseBackorderProps {\n itemCode: string;\n lineNumber: number;\n placement: Placement;\n quantity: number;\n requestedQuantity: number;\n handleFeedbackOpen: ((messageType: FeedbackNotificationType) => void) | undefined;\n}\n\nexport const useBackorderDelayCancel = (props: UseBackorderProps) => {\n const logger = useLogger('useBackorderDelayCancel');\n const { setIsLoadingAdditionalData } = useBasketContext();\n const { itemCode, lineNumber, placement, requestedQuantity, handleFeedbackOpen } = props;\n\n // unreserve\n const handleCancelBackorderDemand = useCallback(async () => {\n try {\n await cancelBackorderDemand(lineNumber);\n } catch (error) {\n showErrorNotification();\n if (error instanceof Error) {\n logger.error(error);\n } else {\n const newError: Error = new Error('handleCancelBackorderDemand Error', { cause: error });\n logger.error(newError);\n }\n }\n }, [lineNumber, logger]);\n\n const onCancelBackorderDemand = useCallback(async () => {\n await handleCancelBackorderDemand();\n }, [handleCancelBackorderDemand]);\n\n // delayBackorder\n const handleDelayBackorder = useCallback(async () => {\n try {\n setIsLoadingAdditionalData(true);\n await updateBasketItem({\n itemCode,\n lineNumber,\n placement,\n previousQuantity: requestedQuantity,\n quantity: 0,\n });\n } catch (error) {\n showErrorNotification();\n if (error instanceof Error) {\n logger.error(error);\n } else {\n const newError: Error = new Error('handleDelayBackorder Error', { cause: error });\n logger.error(newError);\n }\n } finally {\n setIsLoadingAdditionalData(false);\n }\n if (handleFeedbackOpen) {\n handleFeedbackOpen(FeedbackNotificationType.Reserve);\n }\n }, [handleFeedbackOpen, itemCode, lineNumber, logger, placement, requestedQuantity, setIsLoadingAdditionalData]);\n\n const onDelayBackorder = useCallback(async () => {\n await handleDelayBackorder();\n }, [handleDelayBackorder]);\n\n return {\n onCancelBackorderDemand,\n onDelayBackorder,\n };\n};\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as CancelBackorderDemand from '@ori-events/cancel-backorder-demand';\n\nexport const cancelBackorderDemand = async (lineNumber: number) =>\n new Promise((resolve) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdated.Name, handleResolve as EventListener);\n resolve();\n }\n window.addEventListener(BasketUpdated.Name, handleResolve as EventListener);\n\n const event = new CustomEvent(CancelBackorderDemand.Name, {\n detail: {\n lineNumber,\n },\n });\n window.dispatchEvent(event);\n });\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as UpdateCustomerOrderItemEvent from '@ori-events/update-customer-order-item';\n\ninterface UpdateCustomerOrderItemParams {\n endConsumerOrderId: number;\n itemCode: string;\n requestedQuantity: number;\n}\n\nexport const updateCustomerOrderItem = async ({\n endConsumerOrderId,\n itemCode,\n requestedQuantity,\n}: UpdateCustomerOrderItemParams) =>\n new Promise((resolve) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdated.Name, handleResolve as EventListener);\n resolve();\n }\n window.addEventListener(BasketUpdated.Name, handleResolve as EventListener);\n\n const event = new CustomEvent(UpdateCustomerOrderItemEvent.Name, {\n detail: {\n endConsumerOrderId,\n itemCode,\n requestedQuantity,\n },\n });\n window.dispatchEvent(event);\n });\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as DeleteOfferItem from '@ori-events/delete-offer-item';\nimport * as DeleteOfferItemFailed from '@ori-events/delete-offer-item-failed';\nimport type { Placement, PositionData } from '@ori/analytics-data';\n\ninterface DeleteOfferItemData extends DeleteOfferItem.Data, PositionData {}\n\ninterface DeleteOfferItemParams {\n choiceId: number;\n itemCode: string;\n placement: Placement;\n}\n\nexport const deleteOfferItem = async ({ choiceId, itemCode, placement }: DeleteOfferItemParams) =>\n new Promise((resolve, reject) => {\n const listener = ((event: BasketUpdated.Event | DeleteOfferItemFailed.Event) => {\n window.removeEventListener(BasketUpdated.Name, listener);\n window.removeEventListener(DeleteOfferItemFailed.Name, listener);\n\n const { detail } = event;\n if (DeleteOfferItemFailed.isDeleteOfferItemErrorResponse(detail)) {\n reject(new Error(`delete-offer-item error: ${detail.message}`));\n } else {\n resolve();\n }\n }) as EventListener;\n\n window.addEventListener(BasketUpdated.Name, listener);\n window.addEventListener(DeleteOfferItemFailed.Name, listener);\n\n const event = new CustomEvent(DeleteOfferItem.Name, {\n detail: {\n itemCode,\n choiceId,\n placement,\n },\n });\n window.dispatchEvent(event);\n });\n","import { Placement } from '@ori/analytics-data';\nimport { useLogger } from '@ori/logger';\nimport { useCallback } from 'react';\n\nimport { useBasketContext } from '../../contexts';\nimport {\n deleteOfferItem,\n deleteShippingOfferItem,\n removeBasketItem,\n showErrorNotification,\n updateCustomerOrderItem,\n} from '../../utils';\n\ninterface RemoveProps {\n endConsumerOrderId?: number;\n isShippingOfferItem?: boolean;\n itemCode: string;\n lineNumber: number;\n offerChoiceId?: number;\n outOfStock: boolean;\n placement: Placement;\n requestedQuantity: number;\n handleChangedLineNumber?: (lineNumber: number | null) => void;\n setChangedLineNumber: (lineNumber: number | null) => void;\n}\n\nexport const useRemoveHandler = (removeProps: RemoveProps) => {\n const { setIsLoadingAdditionalData } = useBasketContext();\n const logger = useLogger('useRemoveHandler');\n const {\n endConsumerOrderId,\n isShippingOfferItem,\n itemCode,\n lineNumber,\n offerChoiceId,\n outOfStock,\n placement,\n requestedQuantity,\n handleChangedLineNumber,\n setChangedLineNumber,\n } = removeProps;\n\n const removeMainItemHandler = useCallback(async () => {\n setChangedLineNumber(null);\n const previousQuantity = requestedQuantity;\n if (handleChangedLineNumber) {\n handleChangedLineNumber(null);\n }\n try {\n setIsLoadingAdditionalData(true);\n await removeBasketItem({ itemCode, lineNumber, outOfStock, placement, previousQuantity });\n } catch (error) {\n showErrorNotification();\n logger.error(error as Error);\n } finally {\n setIsLoadingAdditionalData(false);\n }\n }, [\n handleChangedLineNumber,\n itemCode,\n lineNumber,\n logger,\n outOfStock,\n placement,\n requestedQuantity,\n setChangedLineNumber,\n setIsLoadingAdditionalData,\n ]);\n\n const removeOfferItemHandler = useCallback(async () => {\n setChangedLineNumber(null);\n try {\n setIsLoadingAdditionalData(true);\n if (isShippingOfferItem) {\n await deleteShippingOfferItem({ placement: Placement.Offers });\n } else {\n await deleteOfferItem({\n itemCode,\n choiceId: offerChoiceId as number,\n placement: Placement.Offers,\n });\n }\n } catch (error) {\n showErrorNotification();\n logger.error(error as Error);\n } finally {\n setIsLoadingAdditionalData(false);\n }\n }, [isShippingOfferItem, itemCode, logger, offerChoiceId, setChangedLineNumber, setIsLoadingAdditionalData]);\n\n const removeConsumerItemHandler = useCallback(async () => {\n setChangedLineNumber(null);\n try {\n setIsLoadingAdditionalData(true);\n await updateCustomerOrderItem({\n endConsumerOrderId: endConsumerOrderId as number,\n itemCode,\n requestedQuantity: 0,\n });\n } catch (error) {\n showErrorNotification();\n logger.error(error as Error);\n } finally {\n setIsLoadingAdditionalData(false);\n }\n }, [endConsumerOrderId, itemCode, logger, setChangedLineNumber, setIsLoadingAdditionalData]);\n\n const removeItemHandler = useCallback(async () => {\n if (typeof offerChoiceId === 'number') {\n return removeOfferItemHandler();\n } else if (typeof endConsumerOrderId === 'number') {\n return removeConsumerItemHandler();\n }\n\n return removeMainItemHandler();\n }, [endConsumerOrderId, offerChoiceId, removeConsumerItemHandler, removeMainItemHandler, removeOfferItemHandler]);\n\n return {\n removeItemHandler,\n removeConsumerItemHandler,\n removeMainItemHandler,\n removeOfferItemHandler,\n };\n};\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as RemoveBasketItem from '@ori-events/remove-basket-item';\nimport * as RemoveBasketItemFailed from '@ori-events/remove-basket-item-failed';\nimport type { RemoveBasketItemAnalyticsData } from '@ori/analytics-data';\n\nexport type RemoveBasketItemData = RemoveBasketItem.Data & RemoveBasketItemAnalyticsData;\n\nexport const removeBasketItem = async (detail: RemoveBasketItemData) =>\n new Promise((resolve, reject) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdated.Name, handleResolve as EventListener);\n window.removeEventListener(RemoveBasketItemFailed.Name, handleReject as EventListener);\n resolve();\n }\n\n function handleReject(event: RemoveBasketItemFailed.Event) {\n window.removeEventListener(RemoveBasketItemFailed.Name, handleReject as EventListener);\n window.removeEventListener(BasketUpdated.Name, handleResolve as EventListener);\n reject(event.detail.localizedMessage);\n }\n\n window.addEventListener(BasketUpdated.Name, handleResolve as EventListener);\n window.addEventListener(RemoveBasketItemFailed.Name, handleReject as EventListener);\n\n const event = new CustomEvent(RemoveBasketItem.Name, { detail });\n window.dispatchEvent(event);\n });\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as RemoveShippingOfferItem from '@ori-events/remove-shipping-offer-item';\nimport * as RemoveShippingOfferItemFailed from '@ori-events/remove-shipping-offer-item-failed';\nimport type { PositionData } from '@ori/analytics-data';\n\nexport const deleteShippingOfferItem = async ({ placement }: PositionData) =>\n new Promise((resolve, reject) => {\n const listener = ((event: BasketUpdated.Event | RemoveShippingOfferItemFailed.Event) => {\n window.removeEventListener(BasketUpdated.Name, listener);\n window.removeEventListener(RemoveShippingOfferItemFailed.Name, listener);\n\n const { detail } = event;\n if (RemoveShippingOfferItemFailed.isRemoveShippingOfferItemErrorResponse(detail)) {\n reject(new Error(`remove-shipping-offer-item error: ${detail.message}`));\n } else {\n resolve();\n }\n }) as EventListener;\n\n window.addEventListener(BasketUpdated.Name, listener);\n window.addEventListener(RemoveShippingOfferItemFailed.Name, listener);\n\n const event = new CustomEvent(RemoveShippingOfferItem.Name, {\n detail: {\n placement,\n },\n });\n window.dispatchEvent(event);\n });\n","import type { Placement } from '@ori/analytics-data';\nimport { showErrorNotification } from '@ori/checkout-utils';\nimport { useLogger } from '@ori/logger';\nimport { useCallback, useState } from 'react';\n\nimport { useBasketContext } from '../../contexts';\nimport { updateBasketItem } from '../../utils/updateBasketItem';\n\ninterface SubscriptionHandlersOptions {\n itemCode: string;\n lineNumber: number;\n placement: Placement;\n quantity: number;\n requestedQuantity: number;\n}\n\nexport const useSubscriptionHandlers = (subscriptionHandlersOptions: SubscriptionHandlersOptions) => {\n const logger = useLogger('useSubscriptionHandlers');\n const { setIsLoadingAdditionalData } = useBasketContext();\n const { itemCode, lineNumber, placement, quantity, requestedQuantity } = subscriptionHandlersOptions;\n\n const [subscriptionLineNumber, setSubscriptionLineNumber] = useState(0);\n\n const onSubscribeClick = useCallback(() => {\n const showSubscriptionWizard = new CustomEvent('open-subscription-wizard', {\n detail: {\n type: 'Subscription',\n customerType: 'All',\n productCode: itemCode,\n },\n });\n\n setSubscriptionLineNumber(lineNumber);\n window.dispatchEvent(showSubscriptionWizard);\n\n return subscriptionLineNumber;\n }, [itemCode, lineNumber, subscriptionLineNumber]);\n\n const onSubscriptionSaved = useCallback(async () => {\n try {\n setIsLoadingAdditionalData(true);\n if (subscriptionLineNumber !== 0) {\n await updateBasketItem({\n itemCode,\n lineNumber: subscriptionLineNumber,\n placement,\n previousQuantity: requestedQuantity,\n quantity: quantity - 1,\n });\n }\n } catch (error) {\n showErrorNotification();\n logger.error(error as Error);\n } finally {\n setIsLoadingAdditionalData(false);\n }\n }, [setIsLoadingAdditionalData, subscriptionLineNumber, itemCode, placement, requestedQuantity, quantity, logger]);\n\n return {\n onSubscribeClick,\n onSubscriptionSaved,\n subscriptionLineNumber,\n };\n};\n","import type { ShoppingBagItem } from '@ori-events/basket-updated';\nimport * as BasketUpdated from '@ori-events/basket-updated';\nimport { Name as OpenBackInStockDialog } from '@ori-events/open-back-in-stock-notification-dialog';\nimport * as SubscriptionSaved from '@ori-events/subscription-saved';\nimport type { Placement } from '@ori/analytics-data';\nimport type { BasketItemProps } from '@ori/basket-item';\nimport type { StaticSubscriptionsSubscriptionReplacementDto } from '@ori/static-api-client-react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { useBasketContext, useCheckoutBasket } from '../../contexts';\nimport { logDebug } from '../../logger';\nimport { FeedbackNotificationType } from '../../types';\nimport { type ItemMapperProps, mapShoppingBagItem } from '../../utils';\nimport { useBackorderDelayCancel } from './useBackorderDelayCancel';\nimport { useButtons } from './useButtons';\nimport { useControlledQuantityPicker } from './useControlledQuantityPicker';\nimport { useDialog } from './useDialog';\nimport { useRemoveHandler } from './useRemoveHandler';\nimport { useSubscriptionHandlers } from './useSubscriptionHandlers';\n\nexport interface ItemActionProps {\n combineChoiceId?: number;\n endConsumerOrderId?: number;\n isShippingOfferItem?: boolean;\n offerChoiceId?: number;\n placement: Placement;\n subscriptionId?: number;\n subscriptionItemInfo?: StaticSubscriptionsSubscriptionReplacementDto[];\n handleChangedLineNumber?: (lineNumber: number | null) => void;\n handleFeedbackOpen?: (messageType: FeedbackNotificationType) => void;\n}\n\ninterface SectionItemHookProps {\n item: ShoppingBagItem;\n mapperProps: ItemMapperProps;\n actionsProps: ItemActionProps;\n}\n\nexport const useSectionItem = (props: SectionItemHookProps) => {\n const { item, mapperProps, actionsProps } = props;\n const {\n atpClusterId,\n basketItemTranslations,\n basketItemTranslationsNamespace,\n isConsultant,\n isDiscounted,\n showBpGlobally,\n } = useBasketContext();\n const { isBackorderExplicit, isSimplifiedCheckout } = useCheckoutBasket();\n const [initialQuantity, setInitialQuantity] = useState(-1);\n const {\n backorderDemandStatus,\n canBeDeleted,\n canBeNotified,\n canBeReduced,\n canDelayBackorder,\n droppingId,\n isBackorderAllowed,\n isSubscriptionReplacementAllowed,\n itemCode,\n itemDescription,\n lineNumber,\n maxQuantity,\n quantity,\n showOnSite,\n replacement,\n requestedQuantity,\n subscription,\n } = item;\n const {\n combineChoiceId,\n endConsumerOrderId,\n isShippingOfferItem,\n offerChoiceId,\n placement,\n subscriptionId,\n subscriptionItemInfo,\n handleChangedLineNumber,\n handleFeedbackOpen,\n } = actionsProps;\n const { onSubscribeClick, onSubscriptionSaved } = useSubscriptionHandlers({\n itemCode,\n lineNumber,\n placement,\n quantity,\n requestedQuantity,\n });\n const [changedLineNumber, setChangedLineNumber] = useState(null);\n\n logDebug(`${lineNumber}-${itemCode} -> useSectionItem`);\n\n // stuff that trigger dialog ... replace and reserve\n const { canBeReplaced, addBackorderDemand, showReplacementDialog } = useDialog({\n atpClusterId,\n droppingId,\n isSubscriptionReplacementAllowed,\n itemCode,\n lineNumber,\n quantity,\n replacement,\n subscriptionId,\n subscriptionItemInfo,\n handleChangedLineNumber,\n setChangedLineNumber,\n });\n\n const checkItemChange = useCallback(\n (data: BasketUpdated.Event) => {\n if (changedLineNumber !== null) {\n data.detail.shoppingBag.shoppingBagItems.forEach((x: ShoppingBagItem) => {\n if (x.lineNumber === changedLineNumber && x.backorderDemandStatus === 2) {\n if (handleFeedbackOpen) {\n handleFeedbackOpen(FeedbackNotificationType.Reserve);\n }\n setChangedLineNumber(null);\n }\n });\n }\n },\n [changedLineNumber, handleFeedbackOpen, setChangedLineNumber],\n );\n\n const handleItemChange = useCallback(\n (data: BasketUpdated.Event) => {\n checkItemChange(data);\n },\n [checkItemChange],\n ) as EventListener;\n\n // delete button\n const { removeItemHandler } = useRemoveHandler({\n endConsumerOrderId,\n isShippingOfferItem,\n itemCode,\n lineNumber,\n offerChoiceId,\n outOfStock: requestedQuantity > quantity,\n placement,\n requestedQuantity,\n handleChangedLineNumber,\n setChangedLineNumber,\n });\n\n // notify me\n const showNotificationDialog = useCallback(() => {\n const event = new CustomEvent(OpenBackInStockDialog, {\n detail: {\n code: itemCode,\n },\n });\n window.dispatchEvent(event);\n }, [itemCode]);\n\n // backorder delay and cancel\n const { onCancelBackorderDemand, onDelayBackorder } = useBackorderDelayCancel({\n itemCode,\n lineNumber,\n placement,\n quantity,\n requestedQuantity,\n handleFeedbackOpen,\n });\n\n // buttons\n const buttons = useButtons({\n addBackorderDemand,\n backorderDemandStatus,\n canBeDeleted,\n canBeNotified,\n canBeReplaced,\n canDelayBackorder,\n combineChoiceId,\n isBackorderAllowed,\n isBackorderExplicit,\n isSubscription: mapperProps.isSubscription ?? false,\n itemDescription,\n onCancelBackorderDemand,\n onDelayBackorder,\n onSubscribeClick,\n removeItemHandler,\n replacement,\n showOnSite,\n showNotificationDialog,\n showReplacementDialog,\n subscription,\n });\n\n // quantity stuff\n const { onQuantityChange } = useControlledQuantityPicker({\n canBeDeleted,\n canBeReduced,\n endConsumerOrderId,\n initialQuantity,\n itemCode,\n lineNumber,\n maxQuantity,\n quantity,\n placement,\n removeItemHandler,\n });\n\n useEffect(() => {\n if (isBackorderAllowed && changedLineNumber !== null) {\n window.addEventListener(BasketUpdated.Name, handleItemChange);\n } else {\n window.removeEventListener(BasketUpdated.Name, handleItemChange);\n }\n\n return () => {\n window.removeEventListener(BasketUpdated.Name, handleItemChange);\n };\n }, [changedLineNumber, handleItemChange, isBackorderAllowed]);\n\n useEffect(() => {\n const subscriptionSavedHandler = (async () => {\n await onSubscriptionSaved();\n }) as EventListener;\n window.addEventListener(SubscriptionSaved.eventName, subscriptionSavedHandler);\n\n return () => window.removeEventListener(SubscriptionSaved.eventName, subscriptionSavedHandler);\n }, [onSubscriptionSaved]);\n\n useEffect(() => {\n setInitialQuantity((prev) => (prev === -1 ? quantity : prev));\n }, [quantity]);\n\n // map item to basket item\n const basketItem: BasketItemProps = useMemo(() => {\n const data = mapShoppingBagItem({\n item,\n commonProps: {\n ...mapperProps,\n isBrandPartner: isConsultant,\n isDiscounted,\n isWithoutSummary: !isSimplifiedCheckout,\n showBpGlobally,\n basketItemTranslations,\n basketItemTranslationsNamespace,\n initialQuantity,\n },\n });\n const { bundles } = item;\n const itemBundle = bundles ?? [];\n if (!mapperProps.isBundleItem && itemBundle.length > 0) {\n data.bundleItems = itemBundle.map((bundleItem) =>\n mapShoppingBagItem({\n item: bundleItem,\n commonProps: {\n ...mapperProps,\n isBundleItem: true,\n showBpGlobally,\n basketItemTranslations,\n basketItemTranslationsNamespace,\n initialQuantity: 1,\n },\n }),\n );\n }\n data.buttons = buttons;\n data.onQuantityChange = onQuantityChange;\n\n return data;\n }, [\n basketItemTranslations,\n basketItemTranslationsNamespace,\n buttons,\n initialQuantity,\n isConsultant,\n isDiscounted,\n isSimplifiedCheckout,\n item,\n mapperProps,\n onQuantityChange,\n showBpGlobally,\n ]);\n\n return {\n basketItem,\n };\n};\n","import type { Replacement, ReplacementItem } from '@ori-events/basket-updated';\nimport { DialogMode, Name as OpenProductInfoDialog } from '@ori-events/open-product-info-dialog';\nimport type { StaticSubscriptionsSubscriptionReplacementDto } from '@ori/static-api-client-react';\nimport { isNonNullable } from '@ori/ts-utils';\nimport { useCallback, useMemo, useRef } from 'react';\n\ninterface ReplaceSubscription {\n droppingId: number | undefined;\n subscriptionId: number | undefined;\n}\n\ninterface ReplacementItemsCode {\n itemCode: string;\n}\n\ninterface UseDialogProps {\n atpClusterId: number | undefined;\n droppingId: number;\n isSubscriptionReplacementAllowed: boolean;\n itemCode: string;\n lineNumber: number;\n quantity: number;\n replacement: Replacement | null;\n subscriptionId: number | undefined;\n subscriptionItemInfo: StaticSubscriptionsSubscriptionReplacementDto[] | undefined;\n handleChangedLineNumber: ((lineNumber: number | null) => void) | undefined;\n setChangedLineNumber: (lineNumber: number | null) => void;\n}\n\nexport const useDialog = (props: UseDialogProps) => {\n const {\n atpClusterId,\n droppingId,\n isSubscriptionReplacementAllowed,\n itemCode,\n lineNumber,\n quantity,\n replacement,\n subscriptionId,\n subscriptionItemInfo,\n handleChangedLineNumber,\n setChangedLineNumber,\n } = props;\n const isFlavorReplacementAvailable = useRef(false);\n\n const replacementOffers: ReplacementItem[] | undefined = useMemo(\n () => (isNonNullable(replacement) ? replacement.offers : undefined),\n [replacement],\n );\n\n const replacementItems: ReplacementItemsCode[] = useMemo(() => {\n const replacementItemsTemp: ReplacementItemsCode[] = [];\n if (replacementOffers) {\n replacementOffers.forEach((x: ReplacementItem, i: number) => {\n replacementItemsTemp[i] = {\n itemCode: x.itemCode,\n };\n });\n } else if (subscriptionItemInfo && isSubscriptionReplacementAllowed) {\n isFlavorReplacementAvailable.current = true;\n subscriptionItemInfo\n .filter(({ productCode }) => productCode === itemCode)\n .forEach(({ replacements }) =>\n replacements.forEach(({ productCode }) => replacementItemsTemp.push({ itemCode: String(productCode) })),\n );\n }\n\n return replacementItemsTemp;\n }, [isSubscriptionReplacementAllowed, itemCode, replacementOffers, subscriptionItemInfo]);\n\n const replaceSubscription: ReplaceSubscription | undefined = useMemo(() => {\n if (isFlavorReplacementAvailable.current && Boolean(droppingId) && Boolean(subscriptionId)) {\n return {\n droppingId,\n subscriptionId,\n };\n }\n\n return undefined;\n }, [droppingId, subscriptionId]);\n\n const canBeReplaced = useMemo(() => replacementItems.length > 0, [replacementItems]);\n\n const replacementProductCodes = useMemo(\n () => replacementItems.map((replacementItem) => replacementItem.itemCode),\n [replacementItems],\n );\n\n const showProductInfoDialog = useCallback(\n (productCodes: string[], originalItemCode?: string) => {\n const dialogEventDetail = {\n atpClusterId,\n dialogMode: DialogMode.StandardBuy,\n lineNumber,\n originalQuantity: quantity,\n originalItemCode,\n productCodes,\n // Subscription replacement (droppingId and subscriptionId) mode in PID, based on those 2 props\n replaceSubscription,\n };\n\n const customEvent = new CustomEvent(OpenProductInfoDialog, {\n detail: dialogEventDetail,\n });\n\n window.dispatchEvent(customEvent);\n },\n [atpClusterId, lineNumber, quantity, replaceSubscription],\n );\n\n const onDialogChange = useCallback(\n (updatedItemLineNumber: number | null) => {\n setChangedLineNumber(updatedItemLineNumber);\n if (handleChangedLineNumber) {\n handleChangedLineNumber(updatedItemLineNumber);\n }\n },\n [handleChangedLineNumber, setChangedLineNumber],\n );\n\n // replace\n const showReplacementDialog = useCallback(() => {\n showProductInfoDialog(replacementProductCodes, itemCode);\n onDialogChange(lineNumber);\n }, [itemCode, lineNumber, onDialogChange, replacementProductCodes, showProductInfoDialog]);\n\n // reserve\n const addBackorderDemand = useCallback(() => {\n showProductInfoDialog([itemCode]);\n onDialogChange(lineNumber);\n }, [itemCode, lineNumber, onDialogChange, showProductInfoDialog]);\n\n return {\n canBeReplaced,\n addBackorderDemand,\n showReplacementDialog,\n };\n};\n","import type { Replacement } from '@ori-events/basket-updated';\nimport type { Buttons } from '@ori/basket-item';\nimport { isNonNullable } from '@ori/ts-utils';\nimport { useMemo } from 'react';\n\nimport { useBasketContext } from '../../contexts';\nimport { useTranslations } from '../../hooks';\n\n// import { logDebug } from '../../logger';\n\ninterface UseButtonsProps {\n addBackorderDemand: () => void;\n backorderDemandStatus: number;\n canBeDeleted: boolean;\n canBeNotified: boolean;\n canBeReplaced: boolean;\n canDelayBackorder: boolean;\n combineChoiceId: number | undefined;\n isBackorderAllowed: boolean;\n isBackorderExplicit: boolean | undefined;\n isSubscription: boolean;\n itemDescription: string;\n onCancelBackorderDemand: () => Promise;\n onDelayBackorder: () => Promise;\n onSubscribeClick: () => number;\n removeItemHandler: () => Promise;\n replacement: Replacement | null;\n showOnSite: boolean;\n showNotificationDialog: () => void;\n showReplacementDialog: () => void;\n subscription: unknown;\n}\n\nexport const useButtons = (props: UseButtonsProps) => {\n const { formatMessage } = useTranslations();\n const { isAnonymous } = useBasketContext();\n const {\n addBackorderDemand,\n backorderDemandStatus,\n canBeDeleted,\n canBeNotified,\n canBeReplaced,\n canDelayBackorder,\n combineChoiceId,\n isBackorderAllowed,\n isBackorderExplicit,\n isSubscription,\n itemDescription,\n onCancelBackorderDemand,\n onDelayBackorder,\n onSubscribeClick,\n removeItemHandler,\n showOnSite,\n showNotificationDialog,\n showReplacementDialog,\n subscription,\n } = props;\n\n const canBeSubscribedTo = isNonNullable(subscription);\n const isCombineChoice = typeof combineChoiceId === 'number';\n const isBackorderActive = backorderDemandStatus === 2;\n const canBeReducedNoCombineChoice = canBeDeleted && !isCombineChoice;\n\n // logDebug(\n // `🔸Buttons deciding factors:\n // \\r\\n - canBeSubscribedTo: ${canBeSubscribedTo}\n // \\r\\n - canBeNotified: ${canBeNotified}\n // \\r\\n - isBackorderAllowed: ${isBackorderAllowed}\n // \\r\\n - isBackorderExplicit: ${isBackorderExplicit}\n // \\r\\n - isCombineChoice: ${isCombineChoice}\n // \\r\\n - isBackorderActive: ${isBackorderActive}\n // \\r\\n - canBeReducedNoCombineChoice: ${canBeReducedNoCombineChoice}\n // \\r\\n - canBeReplaced: ${canBeReplaced}\n // \\r\\n - isSubscription: ${isSubscription}\n // `,\n // );\n\n const buttons: Buttons = useMemo(() => {\n const buttonBuilder: Buttons = {} as Buttons;\n if (canBeReducedNoCombineChoice) {\n buttonBuilder.remove = {\n text: formatMessage('delete'),\n title: `${formatMessage('delete')} ${itemDescription}`,\n visible: true,\n onClick: removeItemHandler,\n };\n }\n // favorites is always visible for logged in users and for products that have ShowOnSite flag set to true\n if (!isAnonymous && showOnSite) {\n buttonBuilder.favorites = {\n text: formatMessage('favorites'),\n title: `${formatMessage('favorites')} ${itemDescription}`,\n visible: true,\n };\n }\n if (canBeNotified) {\n buttonBuilder.notifyMe = {\n text: formatMessage('notifyMe'),\n title: `${formatMessage('notifyMe')} ${itemDescription}`,\n visible: true,\n onClick: showNotificationDialog,\n };\n }\n if (canBeReplaced) {\n buttonBuilder.replace = {\n text: formatMessage('replace'),\n title: `${formatMessage('replace')} ${itemDescription}`,\n visible: true,\n onClick: showReplacementDialog,\n };\n }\n\n // This part will show button without action and with reserved text shown on subscriptions\n if (isSubscription && isBackorderAllowed) {\n buttonBuilder.reserve = {\n text: formatMessage('reserved'),\n title: `${itemDescription} - ${formatMessage('reserved')}`,\n visible: true,\n disabled: true,\n };\n }\n // regular reserve button\n if (isBackorderAllowed && !isBackorderActive && Boolean(isBackorderExplicit) && !isSubscription) {\n buttonBuilder.reserve = {\n text: formatMessage('reserve'),\n title: `${formatMessage('reserve')} ${itemDescription}`,\n visible: true,\n onClick: addBackorderDemand,\n };\n }\n // automated reserved indicator\n if (isBackorderAllowed && !isBackorderExplicit && !isSubscription) {\n buttonBuilder.reserve = {\n text: formatMessage('reserved'),\n title: `${itemDescription} - ${formatMessage('reserved')}`,\n visible: true,\n disabled: true,\n };\n }\n\n if (isBackorderActive && Boolean(isBackorderExplicit)) {\n buttonBuilder.unreserve = {\n text: formatMessage('unreserve'),\n title: `${formatMessage('unreserve')} ${itemDescription}`,\n visible: true,\n onClick: onCancelBackorderDemand,\n };\n }\n if (!isBackorderActive && canDelayBackorder) {\n buttonBuilder.delayBackorder = {\n text: formatMessage('postpone'),\n title: `${formatMessage('postpone')} ${itemDescription}`,\n visible: true,\n onClick: onDelayBackorder,\n };\n }\n if (canBeSubscribedTo) {\n buttonBuilder.subscribe = {\n text: formatMessage('subscribe'),\n title: `${formatMessage('subscribe')} ${itemDescription}`,\n visible: true,\n onClick: onSubscribeClick,\n };\n }\n\n return buttonBuilder;\n }, [\n addBackorderDemand,\n canBeNotified,\n canBeReducedNoCombineChoice,\n canBeReplaced,\n canBeSubscribedTo,\n canDelayBackorder,\n formatMessage,\n isAnonymous,\n isBackorderActive,\n isBackorderAllowed,\n isBackorderExplicit,\n isSubscription,\n itemDescription,\n onCancelBackorderDemand,\n onDelayBackorder,\n onSubscribeClick,\n removeItemHandler,\n showOnSite,\n showNotificationDialog,\n showReplacementDialog,\n ]);\n\n return buttons;\n};\n","import type { QuantityPickerChangeSource, QuantityPickerValue } from '@ori-ui/components';\nimport type { Placement } from '@ori/analytics-data';\nimport { useLogger } from '@ori/logger';\nimport { useCallback, useMemo } from 'react';\n\nimport { useBasketContext } from '../../contexts';\nimport { logDebug } from '../../logger';\nimport { showErrorNotification, updateBasketItem, updateCustomerOrderItem } from '../../utils';\n\nexport interface ControlledQuantityPickerProps {\n canBeDeleted: boolean;\n canBeReduced: boolean;\n endConsumerOrderId?: number;\n initialQuantity: number;\n itemCode: string;\n lineNumber: number;\n maxQuantity: number;\n placement: Placement;\n quantity: number;\n removeItemHandler: () => Promise;\n}\n\ninterface HandleQuantityChangeOptions {\n itemCode: string;\n lineNumber: number;\n previousQuantity: number;\n quantity: number;\n}\n\nexport const useControlledQuantityPicker = ({\n canBeDeleted,\n canBeReduced,\n endConsumerOrderId,\n initialQuantity,\n itemCode,\n lineNumber,\n maxQuantity,\n quantity,\n placement,\n removeItemHandler,\n}: ControlledQuantityPickerProps) => {\n const { setIsLoadingAdditionalData } = useBasketContext();\n const logger = useLogger('useControlledQuantityPicker');\n const minQuantity = useMemo(\n () => (canBeDeleted ? (canBeReduced ? 0 : initialQuantity) : 1),\n [canBeDeleted, canBeReduced, initialQuantity],\n );\n\n /**\n * This handler is called when the quantity is changed for items in consumer order.\n */\n const updateCustomerOrderItemHandler = useCallback(\n async (updatedQuantity: number) => {\n logDebug(`updateCustomerOrderItemHandler triggered with value ${updatedQuantity}.`);\n if (typeof endConsumerOrderId === 'number' && itemCode) {\n try {\n setIsLoadingAdditionalData(true);\n await updateCustomerOrderItem({\n endConsumerOrderId,\n itemCode,\n requestedQuantity: updatedQuantity,\n });\n } catch (error) {\n showErrorNotification();\n if (error instanceof Error) {\n logger.error(error);\n } else {\n const newError: Error = new Error('updateCustomerOrderItemHandler Error', { cause: error });\n logger.error(newError);\n }\n } finally {\n setIsLoadingAdditionalData(false);\n }\n }\n },\n [endConsumerOrderId, itemCode, logger, setIsLoadingAdditionalData],\n );\n\n /**\n * This handler is called when the quantity is changed for all item except items in consumer order.\n */\n const updateQuantityHandler = useCallback(\n async ({\n itemCode: code,\n lineNumber: line,\n quantity: currentQuantity,\n previousQuantity,\n }: HandleQuantityChangeOptions) => {\n logDebug(\n `updateQuantityHandler triggered for ${code} in line ${line} with quantity ${currentQuantity} and previous quantity was ${previousQuantity}.`,\n );\n try {\n setIsLoadingAdditionalData(true);\n await updateBasketItem({\n itemCode: code,\n lineNumber: line,\n placement,\n previousQuantity,\n quantity: currentQuantity,\n });\n } catch (error) {\n showErrorNotification();\n if (error instanceof Error) {\n logger.error(error);\n } else {\n const newError: Error = new Error('updateQuantityHandler Error', { cause: error });\n logger.error(newError);\n }\n } finally {\n setIsLoadingAdditionalData(false);\n }\n },\n [logger, placement, setIsLoadingAdditionalData],\n );\n\n /**\n * This handler is called when the quantity is changed.\n */\n const quantityChangeHandler = useCallback(\n async (inputValue: QuantityPickerValue) => {\n logDebug(\n `quantityChangeHandler triggered for ${itemCode} in line ${lineNumber} with input value ${inputValue} and quantity is ${quantity}.`,\n );\n // we do all checks one more time even this is done in the component\n // do not trigger anything if the input value is not a number and equal or greater than 0\n if (typeof inputValue !== 'number' || (typeof inputValue === 'number' && inputValue < 0)) {\n return;\n }\n let currentValue = inputValue;\n // remove item if the quantity is 0\n if (currentValue === 0) {\n void removeItemHandler();\n\n return;\n }\n // check min value\n if (currentValue < minQuantity) {\n currentValue = minQuantity;\n logDebug(`Current value was limited to min quantity ${minQuantity}.`);\n }\n // check max value\n if (currentValue > maxQuantity) {\n currentValue = maxQuantity;\n logDebug(`Current value was limited to min quantity ${minQuantity}.`);\n }\n // there was no change in quantity\n if (currentValue === quantity) {\n return;\n }\n\n if (typeof endConsumerOrderId === 'number') {\n await updateCustomerOrderItemHandler(currentValue);\n } else {\n await updateQuantityHandler({\n itemCode,\n lineNumber,\n quantity: currentValue,\n previousQuantity: initialQuantity,\n });\n }\n },\n [\n endConsumerOrderId,\n initialQuantity,\n itemCode,\n lineNumber,\n maxQuantity,\n minQuantity,\n quantity,\n removeItemHandler,\n updateCustomerOrderItemHandler,\n updateQuantityHandler,\n ],\n );\n\n /**\n * This is the callback that is passed to the QuantityPicker component.\n */\n const onQuantityChange = useCallback(\n (inputValue: QuantityPickerValue, id: string, source: QuantityPickerChangeSource) => {\n logDebug(`QuantityPicker.changeQuantity() -> inputValue: ${inputValue}, id: ${id}, source: ${source}`);\n quantityChangeHandler(inputValue).catch((error) => {\n if (error instanceof Error) {\n logger.error(error);\n } else {\n const newError: Error = new Error('onQuantityChange Error', { cause: error });\n logger.error(newError);\n }\n showErrorNotification();\n });\n },\n [quantityChangeHandler, logger],\n );\n\n return {\n onQuantityChange,\n quantityChangeHandler,\n updateCustomerOrderItemHandler,\n updateQuantityHandler,\n };\n};\n","import type { ShoppingBagItem } from '@ori-events/basket-updated';\nimport { BasketItem } from '@ori/basket-item';\nimport type { FC } from 'react';\n\nimport type { ItemMapperProps } from '../../utils';\nimport { type ItemActionProps, useSectionItem } from './useSectionItem';\n\ninterface SectionItemProps {\n item: ShoppingBagItem;\n mapperProps: ItemMapperProps;\n actionsProps: ItemActionProps;\n}\n\nexport const SectionItem: FC = ({ item, mapperProps, actionsProps }) => {\n const { basketItem } = useSectionItem({ item, mapperProps, actionsProps });\n\n return ;\n};\n","import { Placement } from '@ori/analytics-data';\nimport { BasketSection } from '@ori/basket-item';\nimport useTestId from '@ori/testid-generator';\nimport { useMemo, type FC } from 'react';\n\nimport { MAX_WIDTH } from '../constants';\nimport { useBasketContext, useCheckoutBasket } from '../contexts';\nimport { useTranslations } from '../hooks';\nimport { SectionItem } from './SectionItem';\n\nexport const SectionAddedFree: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { addedFree } = useBasketContext();\n const { isSimplifiedCheckout } = useCheckoutBasket();\n\n const sectionTestId = getTestId('added-products');\n const baseMapperProps = useMemo(\n () => ({\n isBundleItem: false,\n isSubscription: false,\n isOfferItem: false,\n testId: sectionTestId,\n }),\n [sectionTestId],\n );\n const actionsProps = useMemo(() => ({ placement: Placement.AddedFree }), []);\n\n if (addedFree.length < 1) {\n return null;\n }\n\n return (\n \n {addedFree.map((item) => (\n \n ))}\n \n );\n};\n","import { Placement } from '@ori/analytics-data';\nimport { BasketSection } from '@ori/basket-item';\nimport useTestId from '@ori/testid-generator';\nimport { useMemo, type FC } from 'react';\n\nimport { MAX_WIDTH } from '../constants';\nimport { useBasketContext, useCheckoutBasket } from '../contexts';\nimport { useTranslations } from '../hooks';\nimport { SectionItem } from './SectionItem';\n\nexport const SectionAddedPaid: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { addedPaid } = useBasketContext();\n const { isSimplifiedCheckout } = useCheckoutBasket();\n\n const sectionTestId = getTestId('added-products');\n const baseMapperProps = useMemo(\n () => ({\n isBundleItem: false,\n isSubscription: false,\n isOfferItem: false,\n testId: sectionTestId,\n }),\n [sectionTestId],\n );\n const actionsProps = useMemo(() => ({ placement: Placement.AddedWithCost }), []);\n\n if (addedPaid.length < 1) {\n return null;\n }\n\n return (\n \n {addedPaid.map((item) => (\n \n ))}\n \n );\n};\n","import { Placement } from '@ori/analytics-data';\nimport { BasketSection, SubSectionHeader } from '@ori/basket-item';\nimport useTestId from '@ori/testid-generator';\nimport { Fragment, useMemo, type FC } from 'react';\n\nimport { MAX_WIDTH } from '../constants';\nimport { useBasketContext, useCheckoutBasket } from '../contexts';\nimport { useTranslations } from '../hooks';\nimport { SectionItem } from './SectionItem';\n\nexport const SectionConsumerOrders: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { consumerOrders } = useBasketContext();\n const { isSimplifiedCheckout } = useCheckoutBasket();\n\n const sectionTestId = getTestId('customer-orders');\n const baseMapperProps = useMemo(\n () => ({\n isBundleItem: false,\n isSubscription: false,\n isOfferItem: false,\n testId: sectionTestId,\n }),\n [sectionTestId],\n );\n const actionsProps = useMemo(() => ({ placement: Placement.CustomerOrders }), []);\n\n const endConsumerOrders = useMemo(() => consumerOrders?.approvedPendingOrders ?? [], [consumerOrders]);\n\n if (typeof consumerOrders === 'undefined' || endConsumerOrders.length === 0) {\n return null;\n }\n\n return (\n \n {endConsumerOrders.map((order) => (\n \n {order.endConsumerName}\n {order.items.map((item) => (\n \n ))}\n \n ))}\n \n );\n};\n","import { NOT_LOGGED_IN_USER_ID } from '@ori/auth';\nimport type { PickClientAppDataConfigProps } from '@ori/client-app-config';\n\n// This can be extended by specific types for your Online properties\nexport type ClientAppConfig = PickClientAppDataConfigProps<'customerId'> & {\n defaultQty: number;\n maxValue: number;\n minValue: number;\n periodId: number;\n};\n\nexport const DEFAULT_CONFIG = {\n customerId: NOT_LOGGED_IN_USER_ID,\n defaultQty: 1,\n maxValue: 99,\n minValue: 1,\n periodId: 0,\n};\n","import { createContext, useContext } from 'react';\n\nimport { type ClientAppConfig, DEFAULT_CONFIG } from '../types';\n\nexport const checkoutQuickOrderFormContext = createContext(DEFAULT_CONFIG);\n\nexport const CheckoutQuickOrderFormProvider = checkoutQuickOrderFormContext.Provider;\n\nexport const useCheckoutQuickOrderForm = () => useContext(checkoutQuickOrderFormContext);\n","import * as AddToBasket from '@ori-events/add-to-basket';\nimport * as AddToBasketFailed from '@ori-events/add-to-basket-failed';\nimport * as BasketUpdated from '@ori-events/basket-updated';\nimport * as LoyaltyDialogResult from '@ori-events/loyalty-dialog-result';\nimport { type AddToBasketAnalyticsData, Placement } from '@ori/analytics-data';\nimport { showErrorNotification } from '@ori/checkout-utils';\nimport type { GlobalApplicationsShoppingBagProductSearchDto } from '@ori/global-api-client-react';\nimport { useLanguage } from '@ori/i18n';\nimport type { ControllerStateAndHelpers, DownshiftState, StateChangeOptions } from 'downshift';\nimport Downshift from 'downshift';\nimport debounce from 'lodash.debounce';\nimport { useCallback, useRef, useState } from 'react';\nimport type { FocusEvent, FocusEventHandler, KeyboardEvent } from 'react';\n\nimport { useProductSearchQuery } from '../api';\nimport { useCheckoutQuickOrderForm } from '../contexts';\nimport { logDebug, logInfo, mainLogger } from '../logger';\nimport type { ResultItem } from '../types';\n\nconst DEBOUNCE_TIMEOUT = 350;\nconst INVALID_PRODUCT_CODE_CHARACTERS = ['E', 'e', '.', '+', '-'];\nconst USER_CANCEL_MESSAGE = 'User closed the loyalty dialog.';\n\ninterface AddToBasketData extends AddToBasket.Data, AddToBasketAnalyticsData {}\n\ntype ClearSelection = (cb?: () => void) => void;\n\ninterface AddToBasketProps {\n clearSelection: ClearSelection;\n itemCode: string;\n name: string;\n price: number;\n quantity: string;\n}\n\nconst hookName = 'useQuickOrderForm';\n\nconst addToBasket = async ({ itemCode, name, quantity, price }: Omit) =>\n new Promise((resolve, reject) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdated.Name, handleResolve);\n window.removeEventListener(AddToBasketFailed.Name, handleReject as EventListener);\n window.removeEventListener(LoyaltyDialogResult.Name, handleLoyaltyDialogSelection as EventListener);\n logInfo(`${hookName}: addToBasket action success.`);\n resolve();\n }\n\n function handleReject(e: AddToBasketFailed.Event) {\n window.removeEventListener(AddToBasketFailed.Name, handleReject as EventListener);\n window.removeEventListener(BasketUpdated.Name, handleResolve);\n window.removeEventListener(LoyaltyDialogResult.Name, handleLoyaltyDialogSelection as EventListener);\n reject(e.detail.localizedMessage);\n }\n\n function handleLoyaltyDialogSelection(e: LoyaltyDialogResult.Event) {\n window.removeEventListener(LoyaltyDialogResult.Name, handleLoyaltyDialogSelection as EventListener);\n const { result } = e.detail;\n\n if (LoyaltyDialogResult.isLoyaltyCloseResult(result)) {\n reject(new Error(USER_CANCEL_MESSAGE));\n } else {\n resolve();\n }\n }\n\n window.addEventListener(LoyaltyDialogResult.Name, handleLoyaltyDialogSelection as EventListener);\n window.addEventListener(BasketUpdated.Name, handleResolve as EventListener);\n window.addEventListener(AddToBasketFailed.Name, handleReject as EventListener);\n\n const [itemName] = name.split(' - ');\n\n const event = new CustomEvent(AddToBasket.Name, {\n detail: {\n itemCode,\n quantity: Number.parseInt(quantity, 10),\n localName: itemName ?? '',\n globalName: '',\n placement: Placement.QuickOrderForm,\n price,\n },\n });\n logDebug(`${hookName}: addToBasket action called. Triggering event:`, event);\n window.dispatchEvent(event);\n });\n\nexport const useQuickOrderForm = () => {\n const { language } = useLanguage();\n const { maxValue, minValue, defaultQty } = useCheckoutQuickOrderForm();\n const [value, setValue] = useState('');\n const [quantity, setQuantity] = useState(String(defaultQty));\n const [isFocused, setIsFocused] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState('');\n let results: GlobalApplicationsShoppingBagProductSearchDto[] = [];\n let price = 0;\n let isWhispererLoading = false;\n let whispererError = '';\n\n const { foundProducts, isProductSearchLoading, productSearchQueryError } = useProductSearchQuery(value);\n\n if (productSearchQueryError instanceof Error) {\n whispererError = productSearchQueryError.message;\n }\n\n if (value) {\n isWhispererLoading = isProductSearchLoading && !whispererError;\n }\n\n if (foundProducts.length > 0) {\n results = foundProducts;\n price = foundProducts[0]?.price ?? 0;\n }\n\n const onStateChange = debounce(({ inputValue }: StateChangeOptions) => {\n if (typeof inputValue === 'string') {\n setValue(inputValue);\n }\n }, DEBOUNCE_TIMEOUT);\n\n const input = useRef(null);\n\n const isFormFocused = ({ currentTarget, relatedTarget, type }: FocusEvent) => {\n const formElement = input.current?.parentElement?.parentElement;\n const element = type === 'blur' ? relatedTarget : currentTarget;\n\n return Boolean(formElement?.contains(element as Node));\n };\n\n const normalizeQuantityValue = useCallback(() => {\n if (!Number.parseInt(quantity, 10) || quantity === '') {\n setQuantity(String(defaultQty));\n }\n }, [quantity, defaultQty]);\n\n const handleFocus = useCallback((event): void => {\n const hasFocus = isFormFocused(event);\n logDebug('handleFocus - hasFocus:', hasFocus, '\\n\\t', event);\n setIsFocused(hasFocus);\n }, []);\n\n const handleQuantityBlur = useCallback(\n (event) => {\n normalizeQuantityValue();\n const hasFocus = isFormFocused(event);\n logDebug('handleQuantityBlur - hasFocus:', hasFocus, '\\n\\t', event);\n setIsFocused(hasFocus);\n },\n [normalizeQuantityValue],\n );\n\n const setFocus = useCallback((): void => {\n input.current?.focus();\n setIsFocused(true);\n }, []);\n\n const handleAddToBasket = useCallback(\n async ({ clearSelection, itemCode, name, price: newPrice, quantity: newQuantity }: AddToBasketProps) => {\n setIsLoading(true);\n\n try {\n await addToBasket({\n itemCode,\n name,\n quantity: newQuantity,\n price: newPrice,\n });\n clearSelection(() => {\n setValue('');\n setQuantity('1');\n });\n } catch (currentError: unknown) {\n if (currentError instanceof Error) {\n if (currentError.message !== USER_CANCEL_MESSAGE) {\n showErrorNotification();\n logDebug('error notification event should be triggered');\n mainLogger.error(currentError, { action: 'handleAddToBasket' });\n }\n } else {\n logDebug('error is not instance of error');\n const newError = new Error(String(currentError));\n setError(String(currentError));\n mainLogger.error(newError, { action: 'handleAddToBasket' });\n }\n }\n\n setIsLoading(false);\n setFocus();\n },\n [setFocus],\n );\n\n const handleButtonClick = useCallback(\n (clearSelection: ClearSelection) => {\n normalizeQuantityValue();\n void handleAddToBasket({\n clearSelection,\n itemCode: value,\n name: '',\n quantity: quantity || String(defaultQty),\n price,\n });\n },\n [normalizeQuantityValue, handleAddToBasket, value, quantity, defaultQty, price],\n );\n\n const resetError = useCallback((): void => {\n setError('');\n }, []);\n\n const handleKeyDown = useCallback((event: KeyboardEvent) => {\n const { key: pressedKey } = event;\n if (INVALID_PRODUCT_CODE_CHARACTERS.some((invalidCharacter) => pressedKey === invalidCharacter)) {\n event.preventDefault();\n }\n }, []);\n\n const handleChange = useCallback(\n (item: ResultItem | null, { clearSelection }: ControllerStateAndHelpers) => {\n logDebug(`${hookName}: handleChange called. Item:`, item);\n if (typeof item?.value !== 'undefined') {\n const { value: itemValue, name, price: newPrice } = item;\n const itemCode = String(itemValue);\n void handleAddToBasket({ itemCode, name, quantity, clearSelection, price: newPrice });\n }\n },\n [handleAddToBasket, quantity],\n );\n\n const stateReducer = useCallback(\n (state: DownshiftState, changes: StateChangeOptions) => {\n logDebug(`${hookName}: stateReducer called. State:`, state, 'changes:', changes);\n let parsedValue: number | string | null | undefined;\n switch (changes.type) {\n case Downshift.stateChangeTypes.blurInput:\n case Downshift.stateChangeTypes.mouseUp:\n case Downshift.stateChangeTypes.touchEnd:\n return {\n ...changes,\n inputValue: state.inputValue,\n };\n\n case Downshift.stateChangeTypes.changeInput:\n parsedValue = Number.parseInt(changes.inputValue ?? '', 10);\n resetError();\n\n return {\n ...changes,\n inputValue: parsedValue || changes.inputValue === '' ? parsedValue.toString() || '' : state.inputValue,\n };\n\n default:\n return changes;\n }\n },\n [resetError],\n );\n\n const itemToString = useCallback((item: ResultItem | null): string => (item ? item.value.toString() : ''), []);\n\n return {\n defaultQty,\n error,\n handleButtonClick,\n handleChange,\n handleFocus,\n handleKeyDown,\n handleQuantityBlur,\n input,\n isFocused,\n isLoading,\n isWhispererLoading,\n itemToString,\n language,\n maxValue,\n minValue,\n onStateChange,\n quantity,\n results,\n setFocus,\n setQuantity,\n stateReducer,\n value,\n whispererError,\n };\n};\n","import { NOT_LOGGED_IN_USER_ID } from '@ori/auth';\nimport { errorHandlingSwrOptions } from '@ori/checkout-utils';\nimport type { GetApplicationsShoppingBagProductsParams } from '@ori/global-api-client-react';\nimport { useGetApplicationsShoppingBagProducts } from '@ori/global-api-client-react';\nimport { useShoppingContext } from '@ori/shopping-context';\n\nimport { useCheckoutQuickOrderForm } from '../contexts';\nimport { logDebug } from '../logger';\n\nexport function useProductSearchQuery(hint: string) {\n const { shoppingContext: { customerId = NOT_LOGGED_IN_USER_ID } = {} } = useShoppingContext();\n const { periodId } = useCheckoutQuickOrderForm();\n const params: GetApplicationsShoppingBagProductsParams = { customerId, hint, periodId };\n\n logDebug('useProductSearchQuery() hook called, params:', params);\n\n const swrOptions = {\n enabled: Boolean(hint),\n onSuccess: () => {\n logDebug('useProductSearchQuery() hook finished successfully');\n },\n ...errorHandlingSwrOptions,\n };\n\n const {\n data: { collection: foundProducts = [] } = {},\n isValidating: isProductSearchLoading,\n error: productSearchQueryError,\n } = useGetApplicationsShoppingBagProducts(params, undefined, { swr: swrOptions });\n\n return { foundProducts, isProductSearchLoading, productSearchQueryError };\n}\n","import type { SvgIcon } from '@ori-ui/mui';\nimport { createSvgIcon } from '@ori-ui/mui';\n\nexport const AddToBasket: typeof SvgIcon = createSvgIcon(\n \n \n \n \n \n \n ,\n 'AddToBasket',\n);\n\nexport default AddToBasket;\n","import { IconButton } from '@ori-ui/components';\nimport { Button, styled } from '@ori-ui/mui';\nimport { type FC, type FocusEventHandler, type MouseEventHandler } from 'react';\n\nimport { useBreakpointIndex } from '../hooks';\nimport { logDebug } from '../logger';\nimport { FormattedMessage } from './FormattedMessage';\nimport { AddToBasket } from './icons';\n\ninterface AddButtonProps {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- x\n 'data-testid': string;\n hasValue: boolean;\n isFocused: boolean;\n onBlur: FocusEventHandler;\n onClick: MouseEventHandler;\n onFocus: FocusEventHandler;\n}\n\nconst zIndex = 2;\n\nconst StyledIconButton = styled(IconButton)({\n position: 'absolute',\n right: 6,\n zIndex,\n});\n\nconst StyledButton = styled(Button)({\n marginLeft: 20,\n maxWidth: 130,\n width: '100%',\n zIndex,\n});\n\nexport const AddButton: FC = ({ hasValue, isFocused, ...props }) => {\n const breakpointIndex = useBreakpointIndex();\n const isIconButtonDisplayed = breakpointIndex === 0 && (hasValue || isFocused);\n const isAddButtonDisplayed = breakpointIndex > 0;\n\n logDebug('Rendering AddButton ...', { hasValue, isFocused, isIconButtonDisplayed, isAddButtonDisplayed });\n\n if (isIconButtonDisplayed) {\n return (\n \n \n \n );\n }\n\n if (isAddButtonDisplayed) {\n return (\n \n \n \n );\n }\n\n return null;\n};\n","import { useMediaQuery, useTheme } from '@ori-ui/mui';\n\n/**\n * @returns Zero-based breakpoint index as one of the following:\n * 0 - Small \"mobile\" screen based on the predefined 'sm' breakpoint.\n * 1 - Larger \"desktop\" screens.\n */\nexport const useBreakpointIndex = () => {\n const theme = useTheme();\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'), { noSsr: true });\n\n return isSmallScreen ? 0 : 1;\n};\n","import { styled, Typography } from '@ori-ui/mui';\nimport type { ChangeEvent as ReactChangeEvent, Dispatch, FC, FocusEventHandler, SetStateAction } from 'react';\nimport { useCallback, useRef } from 'react';\n\ninterface QuantityPickerProps {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- x\n 'data-testid': string;\n maxQty: number;\n minQty: number;\n onBlur: FocusEventHandler;\n onFocus: FocusEventHandler;\n quantityLabel: string;\n setQuantity: Dispatch>;\n tabIndex: number;\n value: string;\n}\n\nconst Root = styled('div')(({ theme }) => ({\n position: 'relative',\n zIndex: 2,\n marginLeft: '2px',\n\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n}));\n\nconst Input = styled('input')(({ theme }) => ({\n width: '35px',\n height: '40px',\n paddingLeft: '50px',\n border: `2px solid ${theme.palette.grey[100]}`,\n borderRadius: '0 23px 23px 0',\n background: theme.palette.grey[100],\n color: theme.palette.text.primary,\n MozAppearance: 'textfield',\n\n '&::-webkit-outer-spin-button': {\n WebkitAppearance: 'none',\n margin: 0,\n },\n '&::-webkit-inner-spin-button': {\n WebkitAppearance: 'none',\n margin: 0,\n },\n\n '&:focus': {\n outline: 'none',\n },\n}));\n\nconst Label = styled(Typography)({\n position: 'absolute',\n top: '50%',\n left: '10px',\n maxWidth: '40px',\n transform: 'translateY(-50%)',\n});\n\nexport const QuantityPicker: FC = ({\n 'data-testid': testId,\n maxQty,\n minQty,\n onBlur,\n quantityLabel,\n setQuantity,\n tabIndex,\n value,\n}) => {\n const input = useRef(null);\n\n const handleLabelClick = useCallback((): void => input.current?.focus(), []);\n\n const handleQuantityChange = useCallback(\n (event: ReactChangeEvent) => {\n const { value: inputValue } = event.target;\n const numericValue = Number.parseInt(inputValue, 10);\n if (numericValue > maxQty) {\n setQuantity(String(maxQty));\n } else if (numericValue < minQty) {\n setQuantity('1');\n } else {\n setQuantity(inputValue);\n }\n },\n [maxQty, minQty, setQuantity],\n );\n\n return (\n \n \n \n {quantityLabel}\n \n \n );\n};\n","import { styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\ninterface ProductShadeProps {\n colorHexCode: string | null;\n colorImageSrc: string | null;\n}\n\nconst shadeStyles = {\n borderRadius: '50%',\n height: 20,\n marginLeft: 'auto',\n minWidth: 20,\n} as const;\n\nconst ColorShade = styled('span')<{ ownerState: { background: string } }>(({ ownerState: { background } }) => ({\n ...shadeStyles,\n background,\n}));\n\nconst ColorImage = styled('img')(shadeStyles);\n\nconst getLinearGradient = (colors: string[]) =>\n `linear-gradient(to right, ${colors[0]}, ${colors[0]} 50%, ${colors[1]} 50%)`;\n\nexport const ProductShade: FC = ({ colorHexCode, colorImageSrc }) => {\n const colorHexCodes = colorHexCode?.split(',').filter((hexCode) => Boolean(hexCode));\n\n if (colorHexCodes && colorHexCodes.length > 0) {\n let ownerState;\n\n if (colorHexCodes.length > 1) {\n ownerState = { background: getLinearGradient(colorHexCodes) };\n\n return ;\n }\n\n ownerState = { background: colorHexCodes[0] as string };\n\n return ;\n }\n\n if (colorImageSrc) {\n return (\n \n );\n }\n\n return null;\n};\n","/* eslint-disable @typescript-eslint/naming-convention -- x */\nimport { styled } from '@ori-ui/mui';\nimport type { GlobalApplicationsShoppingBagProductSearchDto } from '@ori/global-api-client-react';\nimport type { FC } from 'react';\n\nimport { ProductShade } from './ProductShade';\n\ninterface QuickOrderFormResultRowProps {\n 'data-testid': string;\n inputValue: string;\n isHighlighted: boolean;\n item: GlobalApplicationsShoppingBagProductSearchDto;\n key: string;\n}\n\nconst Root = styled('span')<{ ownerState: { isHighlighted: boolean } }>(({ ownerState: { isHighlighted }, theme }) => ({\n alignItems: 'center',\n color: theme.palette.grey[900],\n cursor: 'pointer',\n display: 'flex',\n fontWeight: isHighlighted ? 'bold' : 'normal',\n padding: theme.spacing(2, 0),\n}));\n\nconst Description = styled('span')(({ theme }) => ({\n flexGrow: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n width: 'calc(100% - 105px)',\n\n [theme.breakpoints.up('sm')]: {\n width: 'calc(100% - 155px)',\n },\n}));\n\nconst ShadeName = styled('span')(({ theme }) => ({\n color: theme.palette.grey.A400,\n flexGrow: 1,\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(2),\n overflow: 'hidden',\n textAlign: 'left',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n width: 70,\n\n [theme.breakpoints.up('sm')]: {\n width: 120,\n },\n}));\n\nexport const QuickOrderFormResultRow: FC = ({\n inputValue,\n isHighlighted,\n item,\n ...props\n}) => {\n const regex = `^(${inputValue})`;\n const highlightedText = (item.description ?? '').replace(new RegExp(regex), '$1');\n const ownerState = { isHighlighted };\n const { color: colorName, colorHexCode, colorSrc: colorImageSrc } = item;\n\n return (\n \n \n {colorName ? {colorName} : null}\n \n \n );\n};\n","import { SHADOW_LEVEL2, styled } from '@ori-ui/mui';\nimport type { GlobalApplicationsShoppingBagProductSearchDto } from '@ori/global-api-client-react';\nimport type {\n GetItemPropsOptions,\n GetItemPropsReturnValue,\n GetMenuPropsOptions,\n GetMenuPropsReturnValue,\n GetPropsCommonOptions,\n Overwrite,\n} from 'downshift';\nimport type { FC } from 'react';\n\nimport type { ResultItem } from '../types';\nimport { FormattedMessage } from './FormattedMessage';\nimport { QuickOrderFormResultRow } from './QuickOrderFormResultRow';\n\ninterface QuickOrderFormResultsProps {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- x\n 'data-testid': string;\n getItemProps: (\n options: GetItemPropsOptions & Options,\n ) => Omit, 'index' | 'item'>;\n getMenuProps: (\n options?: (GetMenuPropsOptions & Options) | undefined,\n otherOptions?: GetPropsCommonOptions | undefined,\n ) => Overwrite;\n highlightedIndex: number | null;\n inputValue: string;\n isLoading: boolean;\n results: GlobalApplicationsShoppingBagProductSearchDto[];\n}\n\nconst Root = styled('ul')(({ theme }) => ({\n background: theme.palette.background.paper,\n border: `2px solid ${theme.palette.grey[100]}`,\n borderRadius: theme.shape.borderRadius,\n boxShadow: SHADOW_LEVEL2,\n boxSizing: 'border-box',\n left: 0,\n listStyleType: 'none',\n margin: 0,\n maxHeight: 228,\n overflowX: 'hidden',\n overflowY: 'auto',\n padding: theme.spacing(6, 5, 2),\n position: 'absolute',\n top: 0,\n transform: 'translateY(18px)',\n width: 'calc(100% - 151px)' /* width of button + button margin + padding + border */,\n zIndex: 1,\n\n '&::-webkit-scrollbar': {\n display: 'none',\n },\n\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n padding: theme.spacing(5, 3, 2),\n },\n}));\n\nconst EmptyListItem = styled('li')(({ theme }) => ({\n color: theme.palette.grey[900],\n display: 'flex',\n fontSize: theme.typography.body1.fontSize,\n padding: theme.spacing(2, 0),\n}));\n\nexport const QuickOrderFormResults: FC> = ({\n 'data-testid': testId,\n getMenuProps,\n getItemProps,\n highlightedIndex,\n inputValue,\n isLoading,\n results,\n}) => (\n \n {isLoading ? (\n \n \n \n ) : null}\n {!isLoading && !results.length && (\n \n \n \n )}\n {!isLoading &&\n results.length > 0 &&\n results.map((item, index) => (\n \n ))}\n \n);\n","/* eslint-disable react/jsx-no-bind -- x */\nimport { ErrorCircle, Search } from '@ori-ui/icons';\nimport { CircularProgress, styled, Tooltip } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport Downshift from 'downshift';\nimport type { FC } from 'react';\n\nimport { useQuickOrderForm, useTranslations } from '../hooks';\nimport { logDebug } from '../logger';\nimport { AddButton } from './AddButton';\nimport { QuantityPicker } from './QuantityPicker';\nimport { QuickOrderFormResults } from './QuickOrderFormResults';\n\nconst iconStyles = {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n zIndex: 2,\n} as const;\n\nconst webkitAppearanceStyles = {\n margin: 0,\n WebkitAppearance: 'none',\n} as const;\n\nconst Root = styled('div')(({ theme }) => ({\n margin: '0 auto',\n padding: theme.spacing(6),\n\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(4, 3),\n },\n}));\n\nconst Form = styled('form')(() => ({\n alignItems: 'center',\n display: 'flex',\n position: 'relative',\n}));\n\nconst AutoComplete = styled('div')(({ theme }) => ({\n border: `2px solid ${theme.palette.grey[100]}`,\n borderRadius: '23px 0 0 23px',\n flexGrow: 1,\n overflow: 'hidden',\n position: 'relative',\n zIndex: 2,\n\n [theme.breakpoints.down('sm')]: {\n background: theme.palette.grey[100],\n border: `2px solid ${theme.palette.grey[100]}`,\n borderRadius: 23,\n flexGrow: 1,\n height: 36,\n },\n}));\n\nconst Input = styled('input')(({ theme }) => ({\n background: theme.palette.grey[100],\n border: 0,\n color: theme.palette.grey[900],\n fontSize: '1.6rem',\n height: 40,\n paddingLeft: theme.spacing(10),\n width: 'calc(100% - 50px)',\n\n '&::placeholder': {\n color: theme.palette.grey.A700,\n },\n\n '&:focus': {\n outline: 'none',\n },\n\n '&::-webkit-outer-spin-button': webkitAppearanceStyles,\n '&::-webkit-inner-spin-button': webkitAppearanceStyles,\n MozAppearance: 'textfield',\n\n [theme.breakpoints.down('sm')]: {\n height: 34,\n paddingLeft: 42,\n width: 'calc(100% - 42px)',\n },\n}));\n\nconst SearchIcon = styled('span')(({ theme }) => ({\n ...iconStyles,\n color: theme.palette.text.primary,\n fontSize: '2.4rem',\n left: theme.spacing(2),\n}));\n\nconst ErrorIcon = styled('span')(({ theme }) => ({\n ...iconStyles,\n color: theme.palette.error.dark,\n fontSize: '3.2rem',\n right: theme.spacing(1),\n\n [theme.breakpoints.down('sm')]: {\n position: 'absolute',\n right: 50,\n },\n}));\n\nconst LoadingIcon = styled(CircularProgress)(({ theme }) => ({\n height: '32px !important',\n margin: '0 59px',\n width: '32px !important',\n zIndex: 2,\n\n '& svg': {\n color: theme.palette.text.primary,\n opacity: 0.1,\n },\n\n [theme.breakpoints.down('sm')]: {\n height: '24px !important',\n margin: 0,\n position: 'absolute',\n right: theme.spacing(2),\n width: '24px !important',\n },\n}));\n\nexport const QuickOrderForm: FC = () => {\n const {\n error,\n handleButtonClick,\n handleChange,\n handleFocus,\n handleKeyDown,\n handleQuantityBlur,\n input,\n isFocused,\n isLoading,\n isWhispererLoading,\n itemToString,\n maxValue,\n minValue,\n onStateChange,\n quantity,\n results,\n setFocus,\n setQuantity,\n stateReducer,\n value,\n whispererError,\n } = useQuickOrderForm();\n\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n\n logDebug('isLoading', isLoading);\n\n return (\n \n \n {({ clearSelection, getInputProps, getItemProps, getMenuProps, getRootProps, highlightedIndex, isOpen }) => (\n \n \n \n \n \n \n {(Boolean(error) || Boolean(whispererError)) && (\n \n \n \n \n \n )}\n \n \n {isLoading || isWhispererLoading ? (\n \n ) : (\n handleButtonClick(clearSelection)}\n onFocus={handleFocus}\n />\n )}\n
    \n {isOpen && value !== '' ? (\n \n ) : null}\n \n )}\n \n \n );\n};\n","import { styled, Typography } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\n\nimport { useBasketContext } from '../contexts';\nimport { useTranslations } from '../hooks';\n\nconst Root = styled('div')(({ theme }) => ({\n minHeight: 213,\n position: 'relative',\n width: '100%',\n\n [theme.breakpoints.up('sm')]: {\n minHeight: 281,\n },\n}));\n\nconst Content = styled('div')(() => ({\n alignContent: 'center',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n left: 0,\n position: 'absolute',\n textAlign: 'center',\n top: '50%',\n transform: 'translateY(-50%)',\n width: '100%',\n}));\n\nexport const EmptySection: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { isEmptyBasket } = useBasketContext();\n\n if (!isEmptyBasket) {\n return null;\n }\n\n return (\n \n \n \n {formatMessage('emptyBag')}\n \n \n - {formatMessage('lookingPrettyEmptyInYourBag')} -\n \n \n \n );\n};\n","import type { ShoppingBagItem } from '@ori-events/basket-updated';\nimport { Placement } from '@ori/analytics-data';\nimport { BasketSection } from '@ori/basket-item';\nimport { App as QuickOrderForm } from '@ori/checkout-quick-order-form';\nimport useTestId from '@ori/testid-generator';\nimport { useCallback, useMemo, useState, type FC } from 'react';\n\nimport { MAX_WIDTH } from '../constants';\nimport { useBasketContext, useCheckoutBasket } from '../contexts';\nimport { useFeedbackNotification } from '../hooks';\nimport { FeedbackNotificationType } from '../types';\nimport { EmptySection } from './EmptySection';\nimport { SectionItem } from './SectionItem';\n\nexport const SectionMain: FC = () => {\n const { getTestId } = useTestId();\n const configuration = useCheckoutBasket();\n const { isQofVisible, isSimplifiedCheckout } = configuration;\n const { shoppingBagItemsValid, shoppingBagItems, distinctOffers, backorderItems, isEmptyBasket } = useBasketContext();\n const { handleFeedbackOpen } = useFeedbackNotification();\n\n const [replacedItemCode, setReplacedItemCode] = useState('');\n\n if (replacedItemCode !== '' && shoppingBagItems.length > 0) {\n const isItemPresentCheck = (element: ShoppingBagItem) => element.itemCode === replacedItemCode;\n const isItemPresent = shoppingBagItems.some(isItemPresentCheck);\n if (!isItemPresent && shoppingBagItems.length > 0 && shoppingBagItems[0]?.originalProduct) {\n handleFeedbackOpen(FeedbackNotificationType.Replacement);\n setReplacedItemCode('');\n }\n }\n\n const handleChangedLineNumber = useCallback(\n (lineNumber: number | null) => {\n if (lineNumber !== null && shoppingBagItems.length > 0) {\n const resultItem = shoppingBagItems.find((item) => item.lineNumber === lineNumber);\n if (resultItem) {\n setReplacedItemCode(resultItem.itemCode);\n }\n } else {\n setReplacedItemCode('');\n }\n },\n [shoppingBagItems],\n );\n\n const baseMapperProps = useMemo(\n () => ({\n isBundleItem: false,\n isSubscription: false,\n isOfferItem: false,\n }),\n [],\n );\n\n // items and backorders\n const mainSectionTestId = getTestId('products');\n const mainMapperProps = useMemo(\n () => ({ ...baseMapperProps, testId: mainSectionTestId }),\n [baseMapperProps, mainSectionTestId],\n );\n const backorderMapperProps = useMemo(\n () => ({ ...baseMapperProps, testId: `${mainSectionTestId}-back-order` }),\n [baseMapperProps, mainSectionTestId],\n );\n const actionsProps = useMemo(\n () => ({ placement: Placement.MainBasket, handleFeedbackOpen, handleChangedLineNumber }),\n [handleChangedLineNumber, handleFeedbackOpen],\n );\n\n // offers\n const offersTestId = getTestId('offers');\n const offersMapperProps = useMemo(\n () => ({ ...baseMapperProps, isOfferItem: true, testId: offersTestId }),\n [baseMapperProps, offersTestId],\n );\n const offersActionsProps = useMemo(() => ({ placement: Placement.Offers }), []);\n\n if (isEmptyBasket) {\n return (\n <>\n {isQofVisible ? : null}\n \n \n );\n }\n\n return (\n <>\n {isQofVisible ? : null}\n \n {shoppingBagItemsValid.map((item) => (\n \n ))}\n {distinctOffers.map(({ choiceId, combineChoiceId, items, offerType, title }) =>\n items.map((item) => (\n \n )),\n )}\n {backorderItems.map((item) => (\n \n ))}\n \n \n );\n};\n","import { Placement } from '@ori/analytics-data';\nimport { BasketSection } from '@ori/basket-item';\nimport useTestId from '@ori/testid-generator';\nimport { useMemo, type FC } from 'react';\n\nimport { MAX_WIDTH } from '../constants';\nimport { useBasketContext, useCheckoutBasket } from '../contexts';\nimport { useTranslations } from '../hooks';\nimport { SectionItem } from './SectionItem';\n\nexport const SectionShippingOffer: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { shippingOffer } = useBasketContext();\n const { isSimplifiedCheckout } = useCheckoutBasket();\n\n const sectionTestId = getTestId('delivery');\n const baseMapperProps = useMemo(\n () => ({\n isBundleItem: false,\n isSubscription: false,\n isOfferItem: true,\n testId: sectionTestId,\n }),\n [sectionTestId],\n );\n const actionsProps = useMemo(() => ({ isShippingOfferItem: true, placement: Placement.Offers }), []);\n\n if (!shippingOffer || shippingOffer.items.length < 1) {\n return null;\n }\n\n return (\n \n {shippingOffer.items.map((item) => (\n \n ))}\n \n );\n};\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as CancelSubscription from '@ori-events/cancel-subscription';\n\nexport const cancelSubscription = async (consumerId: number, subscriptionId: number, packageId: number) =>\n new Promise((resolve) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdated.Name, handleResolve as EventListener);\n resolve();\n }\n window.addEventListener(BasketUpdated.Name, handleResolve as EventListener);\n\n const event = new CustomEvent(CancelSubscription.Name, {\n detail: {\n consumerId,\n subscriptionId,\n packageId,\n },\n });\n window.dispatchEvent(event);\n });\n","import { IconButton } from '@ori-ui/components';\nimport { styled } from '@ori-ui/mui';\n\nexport const ToggleIcon = styled(IconButton)<{\n ownerState: {\n isOpen: boolean;\n };\n}>(({ ownerState: { isOpen } }) => ({\n cursor: 'pointer',\n fontSize: '3.2rem',\n padding: 0,\n position: 'relative',\n transition: 'transform 300ms',\n transform: `rotate(${isOpen ? 180 : 0}deg)`,\n}));\n","import type { ShoppingBagItem } from '@ori-events/basket-updated';\nimport { IconButton } from '@ori-ui/components';\nimport { ArrowDownThin, Delay, Clear } from '@ori-ui/icons';\nimport { SHADOW_LEVEL1, styled, Typography } from '@ori-ui/mui';\nimport type { Placement } from '@ori/analytics-data';\nimport { BasketSection } from '@ori/basket-item';\nimport type { StaticSubscriptionsSubscriptionReplacementDto } from '@ori/static-api-client-react';\nimport { useCallback, useMemo, useState } from 'react';\nimport type { FC } from 'react';\n\nimport { BODY2_FONT_SIZE, MAX_WIDTH } from '../../constants';\nimport { useCheckoutBasket } from '../../contexts';\nimport { useTranslations } from '../../hooks';\nimport { mainLogger } from '../../logger';\nimport type { TestIdProp } from '../../types';\nimport { cancelSubscription, delaySubscription, showErrorNotification } from '../../utils';\nimport { SectionItem } from '../SectionItem';\nimport { ToggleIcon } from './ToggleIcon';\n\ninterface ShoppingBagSubscriptionsPackagesProps extends TestIdProp {\n customerId: number;\n cycle: number;\n isDelayAllowed: boolean;\n isExpanded: boolean;\n items: ShoppingBagItem[];\n packageId: number;\n packageName: string;\n placement: Placement;\n step: number;\n subscriptionId: number;\n subscriptionItemInfo?: StaticSubscriptionsSubscriptionReplacementDto[];\n totalBp: string;\n totalPrice: string;\n totalPriceOriginal: string;\n totalQuantity: number;\n}\n\nconst Root = styled('div')(() => ({\n position: 'relative',\n}));\n\nconst PackageWrapper = styled('div')(({ theme }) => ({\n backgroundColor: theme.palette.background.paper,\n border: '1px solid',\n borderRadius: theme.shape.largeComponentRadius,\n borderColor: theme.palette.grey[200],\n margin: theme.spacing(4, 0),\n overflow: 'hidden',\n position: 'relative',\n\n [theme.breakpoints.up('sm')]: {\n margin: theme.spacing(6, 0),\n },\n}));\n\nconst PackageHeader = styled('div')<{\n ownerState: {\n isOpen: boolean;\n };\n}>(({ ownerState: { isOpen }, theme }) => ({\n borderBottom: isOpen ? `2px solid ${theme.palette.grey[100]}` : 0,\n margin: theme.spacing(0, 3),\n padding: theme.spacing(4, 0),\n position: 'relative',\n textAlign: 'center',\n\n [theme.breakpoints.up('sm')]: {\n margin: theme.spacing(0, 6),\n },\n}));\n\nconst PackageTitleWrapper = styled('div')<{\n ownerState: {\n isOpen: boolean;\n };\n}>(({ ownerState: { isOpen } }) => ({\n cursor: 'default',\n position: 'relative',\n whiteSpace: 'nowrap',\n\n '&:hover': {\n cursor: isOpen ? 'default' : 'pointer',\n },\n}));\n\nconst PackageTitle = styled(Typography)<{\n ownerState: {\n isPostponeIconVisible: boolean;\n };\n}>(({ ownerState: { isPostponeIconVisible }, theme }) => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n marginBottom: theme.spacing(1),\n maxWidth: isPostponeIconVisible ? 'calc(100% - 50px)' : '100%',\n minHeight: 24,\n color: theme.palette.grey[900],\n\n [theme.breakpoints.up('md')]: {\n marginBottom: theme.spacing(2),\n },\n}));\n\nconst TitleExpandButton = styled(ToggleIcon)(({ theme }) => ({\n marginLeft: theme.spacing(1),\n}));\n\nconst HeaderDetail = styled('span')(({ theme }) => ({\n margin: theme.spacing(0, 1),\n}));\n\nconst PostponeButton = styled(IconButton)(({ theme }) => ({\n marginLeft: theme.spacing(1),\n position: 'absolute',\n right: theme.spacing(0),\n top: theme.spacing(2),\n\n '&:hover': {\n background: theme.palette.background.paper,\n },\n}));\n\nconst PackageFooter = styled('div')<{\n ownerState: {\n isOpen: boolean;\n };\n}>(({ ownerState: { isOpen }, theme }) => ({\n borderTop: `2px solid ${theme.palette.grey[100]}`,\n color: theme.palette.text.secondary,\n cursor: 'default',\n display: 'flex',\n flexDirection: 'row',\n fontSize: '1.3rem',\n fontWeight: 'bold',\n padding: theme.spacing(2, 0),\n margin: theme.spacing(0, 3),\n\n '&:hover': {\n cursor: isOpen ? 'default' : 'pointer',\n },\n\n [theme.breakpoints.up('sm')]: {\n margin: theme.spacing(0, 6),\n },\n}));\n\nconst TotalValues = styled('div')(() => ({\n display: 'flex',\n justifyContent: 'flex-end',\n width: '100%',\n}));\n\nconst TotalBp = styled('span')(({ theme }) => ({\n fontWeight: 'normal',\n marginRight: theme.spacing(7),\n right: theme.spacing(20),\n}));\n\nconst PriceWrapper = styled('div')(() => ({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-end',\n}));\n\nconst HighlightPrice = styled('div')(({ theme }) => ({\n color: theme.palette.offer.main,\n fontSize: BODY2_FONT_SIZE,\n fontWeight: 'bold',\n}));\n\nconst TotalPriceOriginal = styled('span')(({ theme }) => ({\n color: theme.palette.text.disabled,\n fontSize: theme.typography.caption.fontSize,\n fontWeight: 'normal',\n textAlign: 'right',\n textDecoration: 'line-through',\n}));\n\nconst CancelSubscriptionButton = styled(IconButton)(({ theme }) => ({\n background: theme.palette.primary.contrastText,\n border: 'none',\n boxShadow: SHADOW_LEVEL1,\n height: 35,\n padding: theme.spacing(1),\n position: 'absolute',\n top: theme.spacing(-3),\n width: 35,\n\n '&:active': {\n background: theme.palette.grey[200],\n },\n\n '&:hover': {\n background: theme.palette.primary.contrastText,\n },\n\n [theme.breakpoints.up('md')]: {\n left: theme.spacing(3),\n },\n}));\n\nexport const SubscriptionPackageComponent: FC = ({\n 'data-testid': testId,\n customerId,\n cycle,\n isDelayAllowed,\n isExpanded,\n items,\n packageId,\n packageName,\n placement,\n step,\n subscriptionId,\n subscriptionItemInfo,\n totalBp,\n totalPrice,\n totalPriceOriginal,\n}) => {\n const [isOpen, setIsOpen] = useState(isExpanded);\n const { isSimplifiedCheckout } = useCheckoutBasket();\n\n const handleOpen = useCallback(() => {\n setIsOpen(true);\n }, [setIsOpen]);\n\n const ownerState = { isOpen };\n\n const handleDelaySubscription = useCallback(async () => {\n try {\n await delaySubscription({\n subscriptionId,\n step,\n cycle,\n });\n } catch (error) {\n showErrorNotification('genericError');\n mainLogger.error(error as Error);\n }\n }, [subscriptionId, step, cycle]);\n\n const onDelaySubscriptionClick = useCallback(async () => {\n await handleDelaySubscription();\n }, [handleDelaySubscription]);\n\n const handleCancelSubscription = useCallback(async () => {\n try {\n await cancelSubscription(customerId, subscriptionId, packageId);\n } catch (error) {\n showErrorNotification('genericError');\n mainLogger.error(error as Error);\n }\n }, [customerId, subscriptionId, packageId]);\n\n const onCancelSubscriptionClick = useCallback(async () => {\n await handleCancelSubscription();\n }, [handleCancelSubscription]);\n\n const { formatMessage } = useTranslations();\n\n const isPostponeIconVisible = isDelayAllowed && isOpen && Boolean(subscriptionId);\n\n const mapperProps = useMemo(\n () => ({\n isBundleItem: false,\n isSubscription: true,\n isOfferItem: false,\n testId,\n }),\n [testId],\n );\n const actionsProps = useMemo(\n () => ({ placement, subscriptionId, subscriptionItemInfo }),\n [placement, subscriptionId, subscriptionItemInfo],\n );\n\n return (\n \n \n \n \n \n {packageName}{' '}\n {!isOpen && (\n \n \n \n )}\n \n \n {cycle ? (\n \n {formatMessage('cycle')}: {cycle}\n \n ) : null}\n \n {formatMessage('step')}: {step}\n \n \n \n\n {isPostponeIconVisible ? (\n \n \n \n ) : null}\n \n
    \n {isOpen ? (\n \n {items.map((item) => (\n \n ))}\n \n ) : null}\n
    \n \n {formatMessage('total')}:\n \n \n {formatMessage('bpCount', {\n 0: totalBp,\n })}\n \n \n {totalPrice === totalPriceOriginal ? (\n
    {totalPrice}
    \n ) : (\n <>\n {totalPrice}\n {totalPriceOriginal}\n \n )}\n
    \n
    \n \n
    \n {subscriptionId === 0 && (\n \n \n \n )}\n
    \n );\n};\n","import * as BasketUpdatedEvent from '@ori-events/basket-updated';\nimport * as DelaySubscriptionEvent from '@ori-events/delay-subscription';\nimport * as DelaySubscriptionFailedEvent from '@ori-events/delay-subscription-failed';\n\ninterface DelaySubscriptionParams {\n subscriptionId: number;\n step: number;\n cycle: number;\n}\n\nexport const delaySubscription = async ({ subscriptionId, step, cycle }: DelaySubscriptionParams) =>\n new Promise((resolve, reject) => {\n function handleResolve() {\n window.removeEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n window.removeEventListener(DelaySubscriptionFailedEvent.Name, handleReject as EventListener);\n resolve();\n }\n\n function handleReject(event: DelaySubscriptionFailedEvent.Event) {\n window.removeEventListener(DelaySubscriptionFailedEvent.Name, handleReject as EventListener);\n window.removeEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n reject(event.detail.localizedMessage);\n }\n\n window.addEventListener(BasketUpdatedEvent.Name, handleResolve as EventListener);\n window.addEventListener(DelaySubscriptionFailedEvent.Name, handleReject as EventListener);\n\n const eventToTrigger = new CustomEvent(DelaySubscriptionEvent.Name, {\n detail: { subscriptionId, step, cycle },\n });\n\n window.dispatchEvent(eventToTrigger);\n });\n","import { ArrowDownThin } from '@ori-ui/icons';\nimport { styled, theme, Typography } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\nimport { useTranslations } from '../../hooks';\nimport { ToggleIcon } from './ToggleIcon';\n\ninterface SubscriptionUserHeaderProps {\n customerName: string;\n handleToggle: () => void;\n isExpanded: boolean;\n packageAmount: number;\n}\n\nconst Root = styled('div')({\n alignItems: 'center',\n borderBottom: `2px solid ${theme.palette.grey[100]}`,\n cursor: 'pointer',\n display: 'flex',\n height: 20,\n padding: theme.spacing(3, 3, 2),\n position: 'relative',\n\n [theme.breakpoints.up('sm')]: {\n padding: theme.spacing(3, 6, 2),\n },\n});\n\nconst Icon = styled(ToggleIcon)({\n marginLeft: theme.spacing(1),\n position: 'absolute',\n right: theme.spacing(3),\n\n [theme.breakpoints.up('md')]: {\n position: 'static',\n },\n});\n\nexport const SubscriptionUserHeader: FC = ({\n customerName,\n handleToggle,\n isExpanded,\n packageAmount,\n}) => {\n const { formatMessage } = useTranslations();\n\n return (\n \n {customerName}\n \n ({packageAmount})\n \n \n \n \n \n );\n};\n","import type { ShoppingBagSubscriptions } from '@ori-events/basket-updated';\nimport type { Placement } from '@ori/analytics-data';\nimport type { StaticSubscriptionsSubscriptionReplacementDto } from '@ori/static-api-client-react';\nimport { useCallback, useState } from 'react';\nimport type { FC } from 'react';\n\nimport type { TestIdProp } from '../../types';\nimport { SubscriptionPackageComponent } from './SubscriptionPackage';\nimport { SubscriptionUserHeader } from './SubscriptionUserHeader';\n\ninterface CustomerSubscriptionsProps extends TestIdProp {\n isExpanded: boolean;\n placement: Placement;\n subscription: ShoppingBagSubscriptions;\n subscriptionItemInfo?: StaticSubscriptionsSubscriptionReplacementDto[];\n}\n\nexport const CustomerSubscriptions: FC = ({\n 'data-testid': testId,\n isExpanded,\n placement,\n subscription,\n subscriptionItemInfo,\n}) => {\n const { customerId, customerName, packages } = subscription;\n const sortedPackages = [...packages].sort(\n (a, b) => a.packageId - b.packageId || a.subscriptionId - b.subscriptionId || a.cycle - b.cycle || a.step - b.step,\n );\n const [isOpened, setIsOpened] = useState(isExpanded);\n\n const handleToggle = useCallback(() => {\n setIsOpened((prevState) => !prevState);\n }, []);\n\n return (\n \n \n {isOpened\n ? sortedPackages.map((packageItem) => {\n const { cycle, packageId, step, subscriptionId } = packageItem;\n const key = `${step}-${subscriptionId}-${packageId}-${cycle}`;\n\n return (\n \n );\n })\n : null}\n
\n );\n};\n","import { Link, styled, Typography } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\nimport { useCheckoutBasket } from '../../contexts';\nimport { useTranslations } from '../../hooks';\n\nconst Root = styled('div')(({ theme }) => ({\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(2, 0, 4, 0),\n textAlign: 'center',\n textDecoration: 'underline',\n\n [theme.breakpoints.up('sm')]: {\n borderRadius: theme.spacing(0, 0, 2, 2),\n },\n}));\n\nexport const SubscriptionFooter: FC = () => {\n const { manageSubscriptionLink } = useCheckoutBasket();\n const { formatMessage } = useTranslations();\n\n return (\n \n \n {formatMessage('manageSubscriptions')}\n \n \n );\n};\n","import type { ShoppingBagSubscriptions } from '@ori-events/basket-updated';\nimport { Placement } from '@ori/analytics-data';\nimport { BasketSection } from '@ori/basket-item';\nimport useTestId from '@ori/testid-generator';\nimport { useMemo, type FC } from 'react';\n\nimport { useSubscriptionsReplacementQuery } from '../../api';\nimport { MAX_WIDTH } from '../../constants';\nimport { useBasketContext, useCheckoutBasket } from '../../contexts';\nimport { useTranslations } from '../../hooks';\nimport { CustomerSubscriptions } from './CustomerSubscriptions';\nimport { SubscriptionFooter } from './SubscriptionFooter';\n\nconst EXPANDED_PACKAGE_AMOUNT = 10;\n\nexport const SubscriptionsSection: FC = () => {\n const { getTestId } = useTestId();\n const { formatMessage } = useTranslations();\n const { subscriptions } = useBasketContext();\n const { isSimplifiedCheckout } = useCheckoutBasket();\n const testId = getTestId('subscriptions');\n const subscriptionItemCodes: string[] = useMemo(() => {\n const subscriptionItemCodesTemp: string[] = [];\n\n if (subscriptions.length > 0) {\n for (const subscription of subscriptions) {\n for (const subscriptionPackage of subscription.packages) {\n for (const subscriptionPackageItem of subscriptionPackage.items) {\n if (!subscriptionItemCodesTemp.includes(subscriptionPackageItem.itemCode)) {\n subscriptionItemCodesTemp.push(subscriptionPackageItem.itemCode);\n }\n }\n }\n }\n }\n\n return subscriptionItemCodesTemp;\n }, [subscriptions]);\n const { subscriptionItemInfo, isSubscriptionsReplacementsLoading } =\n useSubscriptionsReplacementQuery(subscriptionItemCodes);\n const amountOfPackages = subscriptions.reduce((acc, curr) => acc + curr.packages.length, 0);\n const isExpanded = Boolean(amountOfPackages && amountOfPackages <= EXPANDED_PACKAGE_AMOUNT);\n\n if (subscriptions.length < 1) {\n return null;\n }\n\n if (isSubscriptionsReplacementsLoading) {\n return null;\n }\n\n return (\n \n {subscriptions.map((subscription: ShoppingBagSubscriptions) => (\n \n ))}\n \n \n );\n};\n","import { errorHandlingSwrOptions } from '@ori/checkout-utils';\nimport { useEnvironment } from '@ori/environment';\nimport { useGetTenantSubscriptionReplacements } from '@ori/static-api-client-react';\n\nimport { logDebug } from '../logger';\n\nexport function useSubscriptionsReplacementQuery(subscriptionsItemCodes: string[]) {\n const { tenant } = useEnvironment();\n const params = { itemCodes: subscriptionsItemCodes };\n\n // logDebug('useSubscriptionsReplacementQuery() hook called, params:', params);\n\n const swrOptions = {\n ...errorHandlingSwrOptions,\n onSuccess: () => {\n logDebug('useSubscriptionsReplacementQuery() hook finished successfully');\n },\n };\n\n const {\n data: { productReplacementCollection: subscriptionItemInfo = [] } = {},\n error: subscriptionQueryError,\n isValidating: isSubscriptionsReplacementsLoading,\n } = useGetTenantSubscriptionReplacements(tenant, params, { swr: swrOptions });\n\n return { subscriptionQueryError, subscriptionItemInfo, isSubscriptionsReplacementsLoading };\n}\n","import * as BasketUpdated from '@ori-events/basket-updated';\nimport * as ShoppingContextLoaded from '@ori-events/shopping-context-loaded';\nimport { FeedbackNotification } from '@ori-ui/components';\nimport { Typography } from '@ori-ui/mui';\nimport { App as Merchandising } from '@ori/checkout-merchandising';\nimport { useWindowEvent } from '@ori/checkout-utils';\nimport { useShoppingContext } from '@ori/shopping-context';\nimport useTestId from '@ori/testid-generator';\nimport { isNonNullable } from '@ori/ts-utils';\nimport { type FC, useCallback, useState } from 'react';\n\nimport { BasketContextProvider, useCheckoutBasket } from '../contexts';\nimport { useFeedbackNotification, useTranslations } from '../hooks';\nimport { logDebug } from '../logger';\nimport { handleAutomaticSubscription } from '../utils';\nimport { AddVoucherFormWrapper } from './AddVoucher';\nimport { BannersSection } from './BannerSection/BannersSection';\nimport { ClearBasket } from './ClearBasket';\nimport { RecommendationsBar } from './RecommendationsBar';\nimport { SectionAddedFree } from './SectionAddedFree';\nimport { SectionAddedPaid } from './SectionAddedPaid';\nimport { SectionConsumerOrders } from './SectionConsumerOrders';\nimport { SectionMain } from './SectionMain';\nimport { SectionShippingOffer } from './SectionShippingOffer';\nimport { BasketStepSkeleton } from './Skeletons/BasketStepSkeleton';\nimport { SubscriptionsSection } from './SubscriptionsSection';\nimport { BasketCard, Step1Root, SummaryWrapper } from './styled';\n\ntype Props = { checkoutSummary?: FC };\n\nexport const Step1: FC = ({ checkoutSummary: CheckoutSummary }) => {\n const { getTestId } = useTestId();\n const { customerOrdersLink = '' } = useCheckoutBasket();\n const { formatMessage } = useTranslations();\n\n const { isLoaded: isContextLoaded, isLoading: isLoadingContext } = useShoppingContext();\n // Loading state of additional data outside the main hook in @ori/shopping-context.\n // Used for side effects like displaying the loading overlay etc.\n const [isLoadingAdditionalData, setIsLoadingAdditionalData] = useState(false);\n const isLoading = isLoadingAdditionalData || isLoadingContext;\n\n const { feedbackNotificationSettings, handleClose, handleFeedbackOpen, isFeedbackOpen } = useFeedbackNotification();\n const { icon: FeedbackNotificationIcon, messageKey } = feedbackNotificationSettings;\n\n const basketUpdatedHandler = useCallback(\n (event: BasketUpdated.Event) => {\n handleAutomaticSubscription(event.detail.notifications, handleFeedbackOpen);\n },\n [handleFeedbackOpen],\n ) as EventListener;\n\n useWindowEvent(BasketUpdated.Name, basketUpdatedHandler);\n useWindowEvent(ShoppingContextLoaded.Name, basketUpdatedHandler);\n\n logDebug('Rendering Step1.tsx ...', { isContextLoaded, isLoading, isLoadingAdditionalData, isLoadingContext });\n\n if (!isContextLoaded) {\n return ;\n }\n\n return (\n \n \n {isLoading ? (\n \n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n )}\n\n \n\n {!!CheckoutSummary && (\n \n \n \n )}\n\n \n\n \n\n {isNonNullable(messageKey) && (\n }\n open={isFeedbackOpen}\n onClose={handleClose}\n >\n {formatMessage(messageKey)}\n \n )}\n \n \n );\n};\n","import type { ShoppingNotification } from '@ori-events/basket-updated';\n\nimport { AUTOMATIC_SUBSCRIPTION_NOTIFICATION_ID, SUBSCRIPTION_NOTIFICATION_APPEARANCE } from '../constants';\nimport { FeedbackNotificationType } from '../types';\n\nexport const handleAutomaticSubscription = (\n notifications: ShoppingNotification[],\n handleFeedbackOpen: (notificationType: FeedbackNotificationType) => void,\n) => {\n const subscriptionNotification = notifications.find(\n ({ id, notificationAppearance }) =>\n id === AUTOMATIC_SUBSCRIPTION_NOTIFICATION_ID && notificationAppearance === SUBSCRIPTION_NOTIFICATION_APPEARANCE,\n );\n\n if (subscriptionNotification) {\n handleFeedbackOpen(FeedbackNotificationType.Subscription);\n }\n};\n","import { ThemeProvider } from '@ori-ui/mui';\nimport { TranslationsNamespaceProvider } from '@ori/i18n';\nimport { ErrorBoundary, LoggerProvider } from '@ori/logger';\nimport { Team, TestIdProvider } from '@ori/testid-generator';\nimport { type FC, StrictMode } from 'react';\n\nimport { Step1 } from './components';\nimport { APP_NAME, translationsNamespace } from './constants';\nimport { CheckoutBasketProvider } from './contexts';\nimport { mainLogger } from './logger';\nimport { type CheckoutBasketConfig } from './types';\n\nexport interface CheckoutBasketProps {\n configuration: CheckoutBasketConfig;\n checkoutSummary?: FC;\n}\n\nexport const CheckoutBasket: FC = ({ configuration, checkoutSummary }) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n","import type { CheckoutBasketProps } from '../CheckoutBasket';\nimport type { CheckoutBasketConfig } from '../types';\n\n/**\n * Gets properties for the basket step component in the simplified checkout context.\n * Not used in the older separated basket step SPA context.\n * @param configuration Original parsed config from the simplified checkout SPA root element.\n * @returns Basket step component properties.\n */\nexport const getProps = (configuration: T) => {\n const result: CheckoutBasketProps = {\n configuration,\n };\n\n return result;\n};\n","import { getProps, CheckoutBasket } from '@ori/checkout-basket';\nimport { type FC } from 'react';\n\nimport { useCheckout } from '../contexts';\nimport { CheckoutSummary } from './CheckoutSummary';\n\nexport const BasketStep: FC = () => {\n const configuration = useCheckout();\n\n return (\n \n );\n};\n\nexport default BasketStep;\n"],"names":["FormattedMessage","props","_jsx","NotTypedFormattedMessage","APP_NAME","PACKAGE_NAME","TEAM_NAME","mainLogger","Logger","teamName","getDebugLogger","noop","DEFAULT_CHECKOUT_OFFER_HINTS_CONTEXT","isDoubleCurrency","offersCount","setIsOfferHintsModalOpen","setNotAvailableOfferIds","toggleConfirmationModal","checkoutOfferHintsContext","createContext","CheckoutOfferHintsProvider","Provider","useCheckoutOfferHints","useContext","logDebug","logWarning","getWarningLogger","BadgeColors","General","theme","palette","grey","EndConsumerOrders","info","main","BackOrders","Campaign","secondary","light","WelcomeProgram","Offer","offer","Badge","styled","ownerState","flexShrink","width","spacing","marginRight","borderRadius","fontSize","fontWeight","color","text","primary","backgroundColor","itemTheme","breakpoints","up","ColoredBadge","LightTooltip","Tooltip","typography","body1","TooltipLine","Box","margin","BlockLink","display","marginBottom","background","paper","boxShadow","SHADOW_LEVEL3","MerchContentWrapper","flexDirection","flexGrow","padding","MerchHeader","MerchContent","position","paddingRight","caption","BackorderItem","title","toolTip","htmlDivProps","tooltipContent","useMemo","split","map","line","children","_jsxs","enterTouchDelay","leaveTouchDelay","placement","dangerouslySetInnerHTML","__html","Root","alignItems","alpha","common","white","bottom","justifyContent","left","right","top","zIndex","Loading","memo","CircularProgress","cursor","ArrowIcon","ArrowRightThin","alignSelf","CustomerOrdersModal","lazy","async","CustomerOrderItem","testId","handleOpenModal","handleCloseModal","shouldShowModal","ordersAmount","pendingOrders","ordersPageLink","onClick","Suspense","fallback","isOpen","onClose","ProgressBarWrapper","height","marginTop","content","barColor","barLength","ProgressValue","marginLeft","ProgressAmount","ProgressBar","progress","target","amount","unit","Math","round","_Fragment","Block","MerchandizingItem","MerchandisingBlock","hintCategory","isCustomerOrderItem","isBackorderItem","commonProps","setShouldShowModal","useState","useCallback","e","stopPropagation","Wrapper","maxWidth","WrapperHeading","Merchandising","messages","getTestId","useTestId","id","messageItem","index","App","shoppingContext","useShoppingContext","pendingOrdersAmount","unitDataCollection","filter","x","unitName","notApprovedPendingOrders","shoppingMessages","hintType","LoggerProvider","logger","ErrorBoundary","areaName","ThemeProvider","TranslationsNamespaceProvider","namespace","translationsNamespace","TestIdProvider","project","team","Team","Checkout","length","DEFAULT_CONFIG","customerId","NOT_LOGGED_IN_USER_ID","customerOrdersLink","defaultQty","isBackorderExplicit","isQofVisible","isSimplifiedCheckout","manageSubscriptionLink","maxValue","minValue","periodId","rewardsShopLink","checkoutBasketContext","CheckoutBasketProvider","useCheckoutBasket","defaultBasketContext","addedFree","addedPaid","atpClusterId","undefined","backorderItems","basketItemTranslations","basketItemDefaultTranslations","basketItemTranslationsNamespace","basketOffers","consumerOrders","distinctOffers","isAnonymous","isConsultant","isDiscounted","isEmptyBasket","message","shippingOffer","shoppingBag","shoppingBagItems","shoppingBagItemsValid","showBannerSection","showBpGlobally","subscriptions","vipLoyalty","vouchers","setIsLoadingAdditionalData","SHIPPING_OFFER","useTranslations","useTranslationsFromNamespace","basketContext","BasketContextProvider","translations","showBp","addedItems","offers","rawOffers","reservedItems","offerType","findIndex","innerOffer","choiceId","itemType","added","free","paid","forEach","item","isFree","push","find","Boolean","value","useBasketContext","FeedbackNotificationType","TranslationKey","useFeedbackNotification","isFeedbackOpen","setIsFeedbackOpen","feedbackNotificationSettings","setFeedbackNotificationSettings","icon","Check","handleFeedbackOpen","notificationType","Replacement","Replace","messageKey","replaced","Reserve","Delay","reserved","Subscription","subscribed","handleClose","minWidth","VoucherLabel","Typography","whiteSpace","CellInput","InputWrapper","ErrorWrapper","transform","ExclamationMark","PriorityHigh","error","border","borderColor","contrastText","CellButton","addVoucher","Promise","resolve","reject","handleResolve","event","window","removeEventListener","BasketUpdatedEvent","AddVoucherFailedEvent","handleReject","detail","localizedMessage","addEventListener","eventToTrigger","CustomEvent","AddVoucherEvent","voucherCode","dispatchEvent","AddVoucherForm","formatMessage","handleAddToBasket","handleClick","handleMouseEnter","handleMouseLeave","isTooltipOpen","resetError","tenant","useEnvironment","sessionId","useSessionId","setError","setIsOpen","setIsTooltipOpen","apiClient","useApiClient","staticApiClient","useStaticApiClient","useLogger","setValue","useFormContext","addVoucherCode","actionError","Error","toString","referral","voucher","promoCode","parts","splitPromoCode","formValues","referralResponse","getTenantApplicationsShareAndEarnPersonalCodeCustomer","createShoppingSessionReferral","data","referralType","GlobalShoppingReferralDtoReferralType","Pbs","setReferralInfo","clearCache","RequestClearShoppingCache","setTimeout","RequestShoppingContextEvent","postReferralError","apiError","response","Message","referralError","prevState","useVoucherForm","handleSubmit","register","errors","useFormState","onChange","voucherCodeRegister","helperText","BasketCardForm","onSubmit","variant","overflow","TextField","fullWidth","type","InputProps","inputProps","FeedbackNotification","open","onMouseEnter","onMouseLeave","Button","disabled","size","noWrap","AddVoucherFormWrapper","voucherValidationSchema","z","object","string","min","max","form","useForm","mode","defaultValues","resolver","zodResolver","FormProvider","OfferHintsModal","OfferHints","isOfferHintsModalOpen","closeModalHandler","openModalHandler","isAnyOfferPresent","ActionBanner","isConfirmationOpen","setIsConfirmationOpen","notAvailableOfferIds","includes","offerId","anchorPosition","useRef","useEffect","current","innerWidth","innerHeight","disableScrollLock","timeoutMs","Bar","Value","Amount","ContentWrapper","Header","Content","useTheme","InfoBanner","iconName","success","CheckboxToggler","toggleVoucher","isChecked","Switch","checked","VoucherInfo","discountDescription","pendingDiscountDescription","ReferralVoucher","voucherUnit","isApplied","RemoveVoucherFailedEvent","RemoveVoucherEvent","removeVoucher","handleToggleVoucher","RewardShopBanner","rewardShopBanner","daysToExpire","expiringPoints","isExpiring","remainingPoints","href","BannerWrapper","gridTemplateColumns","gap","BannersSection","ClearBasketPopUp","visible","setVisible","onConfirm","clearBasketEvent","ClearBasketEvent","FeedbackDialog","hideCloseButton","header","actions","component","severity","flexWrap","ClearBasket","isClearBasketPopupVisible","setIsClearBasketPopupVisible","openClearBasketPopup","relationTypes","StaticProductsRelationRelationType","Related","Samples","RecentlyViewed","placementsFromType","Placement","RelatedProducts","RecentProducts","translationsFromRelationType","Favourite","Popular","Undefined","getRecentlyViewedProductsCodes","localStorage","getItem","array","parse","JSON","slice","RecommendationsBar","language","useTranslationsWithNamespaces","customerTypeId","visitorSegment","loading","loadingSegmentationParameters","useUserSegmentationData","staticApiUrl","useServiceUrls","hideRating","useHideRating","isLoading","loadingShoppingContext","inView","observe","useInView","rootMargin","productCode","lastAddedItem","itemCode","recommendations","useGetTenantProductRelations","lang","swr","enabled","getRetryErrorSwrOptions","recommendationsData","relationType","productCodes","relations","relation","recommendation","activeTab","setActiveTab","oldActiveTab","tab","d","r","currentTab","products","useGetTenantApplicationsProductBox","revalidateIfStale","productsData","mapProductBoxesFromStaticApi","onTabChange","_","isValidating","Skeleton","ref","BasketCard","Tabs","allowScrollButtonsMobile","scrollButtons","centered","sx","v","Tab","disableRipple","label","ProductBoxCarousel","analyticsPlacement","withTranslationsProvider","mapShoppingBagItem","flag","isNonNullable","productFlag","labelClass","tooltip","theItemIsOfferItem","flagLabelClass","isOfferItem","isNullableStringAGreaterThanB","basicCataloguePrice","price","determineIfIsOfferItem","shade","stringEmptyToUndefined","colorHexCode","colorImageSrc","hexColors","hexCode","imageUrl","shadeName","itemColor","cataloguePrice","bp","brand","itemBrand","bundleItems","buttons","bv","code","flags","image","itemImageSrc","isAvailable","isOfferColor","isSmall","lineNumber","maxQuantity","minQuantity","canBeDeleted","canBeReduced","initialQuantity","name","itemDescription","points","priceName","isBrandPartner","quantity","quantityPickerDisabled","isBundleItem","isSubscription","canBeModified","totalPrice","unitPrice","url","itemDetailPath","showErrorNotification","Name","translationKeys","genericError","notificationOptions","delay","updateBasketItem","previousQuantity","listener","BasketUpdated","UpdateBasketItemFailed","UpdateBasketItem","newQuantity","useBackorderDelayCancel","requestedQuantity","handleCancelBackorderDemand","CancelBackorderDemand","cancelBackorderDemand","newError","cause","onCancelBackorderDemand","handleDelayBackorder","onDelayBackorder","updateCustomerOrderItem","endConsumerOrderId","UpdateCustomerOrderItemEvent","useRemoveHandler","removeProps","isShippingOfferItem","offerChoiceId","outOfStock","handleChangedLineNumber","setChangedLineNumber","removeMainItemHandler","RemoveBasketItemFailed","RemoveBasketItem","removeBasketItem","removeOfferItemHandler","RemoveShippingOfferItemFailed","RemoveShippingOfferItem","deleteShippingOfferItem","Offers","DeleteOfferItemFailed","DeleteOfferItem","deleteOfferItem","removeConsumerItemHandler","removeItemHandler","useSectionItem","mapperProps","actionsProps","setInitialQuantity","backorderDemandStatus","canBeNotified","canDelayBackorder","droppingId","isBackorderAllowed","isSubscriptionReplacementAllowed","showOnSite","replacement","subscription","combineChoiceId","subscriptionId","subscriptionItemInfo","onSubscribeClick","onSubscriptionSaved","subscriptionHandlersOptions","subscriptionLineNumber","setSubscriptionLineNumber","showSubscriptionWizard","customerType","useSubscriptionHandlers","changedLineNumber","canBeReplaced","addBackorderDemand","showReplacementDialog","isFlavorReplacementAvailable","replacementOffers","replacementItems","replacementItemsTemp","i","replacements","String","replaceSubscription","replacementProductCodes","replacementItem","showProductInfoDialog","originalItemCode","dialogEventDetail","dialogMode","DialogMode","StandardBuy","originalQuantity","customEvent","OpenProductInfoDialog","onDialogChange","updatedItemLineNumber","useDialog","checkItemChange","handleItemChange","showNotificationDialog","OpenBackInStockDialog","canBeSubscribedTo","isBackorderActive","canBeReducedNoCombineChoice","buttonBuilder","remove","favorites","notifyMe","replace","reserve","unreserve","delayBackorder","subscribe","useButtons","onQuantityChange","useControlledQuantityPicker","updateCustomerOrderItemHandler","updatedQuantity","updateQuantityHandler","currentQuantity","quantityChangeHandler","inputValue","currentValue","source","catch","subscriptionSavedHandler","SubscriptionSaved","prev","basketItem","isWithoutSummary","bundles","itemBundle","bundleItem","SectionItem","BasketItem","SectionAddedFree","sectionTestId","baseMapperProps","AddedFree","BasketSection","overrideMdMaxWidth","MAX_WIDTH","SectionAddedPaid","AddedWithCost","SectionConsumerOrders","CustomerOrders","endConsumerOrders","approvedPendingOrders","order","Fragment","SubSectionHeader","endConsumerName","items","checkoutQuickOrderFormContext","CheckoutQuickOrderFormProvider","useCheckoutQuickOrderForm","logInfo","getInfoLogger","INVALID_PRODUCT_CODE_CHARACTERS","USER_CANCEL_MESSAGE","hookName","useQuickOrderForm","useLanguage","setQuantity","isFocused","setIsFocused","setIsLoading","results","isWhispererLoading","whispererError","foundProducts","isProductSearchLoading","productSearchQueryError","hint","params","swrOptions","onSuccess","errorHandlingSwrOptions","collection","useGetApplicationsShoppingBagProducts","useProductSearchQuery","onStateChange","debounce","input","isFormFocused","currentTarget","relatedTarget","formElement","parentElement","element","contains","normalizeQuantityValue","Number","parseInt","handleFocus","hasFocus","handleQuantityBlur","setFocus","focus","clearSelection","newPrice","AddToBasketFailed","LoyaltyDialogResult","handleLoyaltyDialogSelection","result","itemName","AddToBasket","localName","globalName","QuickOrderForm","addToBasket","currentError","action","handleButtonClick","handleKeyDown","key","pressedKey","some","invalidCharacter","preventDefault","handleChange","itemValue","stateReducer","state","changes","parsedValue","Downshift","stateChangeTypes","blurInput","mouseUp","touchEnd","changeInput","itemToString","createSvgIcon","fill","fillRule","StyledIconButton","IconButton","StyledButton","AddButton","hasValue","breakpointIndex","useBreakpointIndex","useMediaQuery","down","noSsr","isIconButtonDisplayed","isAddButtonDisplayed","Input","paddingLeft","MozAppearance","WebkitAppearance","outline","Label","QuantityPicker","maxQty","minQty","onBlur","quantityLabel","tabIndex","handleLabelClick","handleQuantityChange","numericValue","autoComplete","shadeStyles","ColorShade","ColorImage","ProductShade","colorHexCodes","colors","src","alt","isHighlighted","Description","textOverflow","ShadeName","A400","textAlign","QuickOrderFormResultRow","regex","highlightedText","description","RegExp","colorName","colorSrc","shape","SHADOW_LEVEL2","boxSizing","listStyleType","maxHeight","overflowX","overflowY","EmptyListItem","QuickOrderFormResults","getMenuProps","getItemProps","highlightedIndex","iconStyles","webkitAppearanceStyles","Form","AutoComplete","A700","SearchIcon","ErrorIcon","dark","LoadingIcon","opacity","getInputProps","getRootProps","Search","as","pattern","placeholder","onFocus","onKeyDown","ErrorCircle","thickness","configuration","minHeight","alignContent","EmptySection","gutterBottom","SectionMain","replacedItemCode","setReplacedItemCode","isItemPresentCheck","originalProduct","resultItem","mainSectionTestId","mainMapperProps","backorderMapperProps","MainBasket","offersTestId","offersMapperProps","offersActionsProps","SectionShippingOffer","ToggleIcon","transition","PackageWrapper","largeComponentRadius","PackageHeader","borderBottom","PackageTitleWrapper","PackageTitle","isPostponeIconVisible","TitleExpandButton","HeaderDetail","PostponeButton","PackageFooter","borderTop","TotalValues","TotalBp","PriceWrapper","HighlightPrice","BODY2_FONT_SIZE","TotalPriceOriginal","textDecoration","CancelSubscriptionButton","SHADOW_LEVEL1","SubscriptionPackageComponent","cycle","isDelayAllowed","isExpanded","packageId","packageName","step","totalBp","totalPriceOriginal","handleOpen","handleDelaySubscription","DelaySubscriptionFailedEvent","DelaySubscriptionEvent","delaySubscription","onDelaySubscriptionClick","handleCancelSubscription","consumerId","CancelSubscription","cancelSubscription","onCancelSubscriptionClick","ArrowDownThin","Clear","Icon","SubscriptionUserHeader","customerName","handleToggle","packageAmount","CustomerSubscriptions","packages","sortedPackages","sort","a","b","isOpened","setIsOpened","packageItem","SubscriptionFooter","Link","SubscriptionsSection","subscriptionItemCodes","subscriptionItemCodesTemp","subscriptionPackage","subscriptionPackageItem","isSubscriptionsReplacementsLoading","subscriptionsItemCodes","itemCodes","productReplacementCollection","subscriptionQueryError","useGetTenantSubscriptionReplacements","useSubscriptionsReplacementQuery","amountOfPackages","reduce","acc","curr","Subscriptions","Step1","checkoutSummary","CheckoutSummary","isLoaded","isContextLoaded","isLoadingContext","isLoadingAdditionalData","FeedbackNotificationIcon","basketUpdatedHandler","handleAutomaticSubscription","notifications","notificationAppearance","AUTOMATIC_SUBSCRIPTION_NOTIFICATION_ID","SUBSCRIPTION_NOTIFICATION_APPEARANCE","useWindowEvent","ShoppingContextLoaded","Step1Root","BasketStepSkeleton","noPadding","SummaryWrapper","CheckoutBasket","StrictMode","getProps","BasketStep","useCheckout"],"sourceRoot":""}