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,QAASzqD,EAAAA,EAAOyqD,SAEpB,GACC,KACH,MAAO,IAAMC,aAAanqC,EAAQ,GACjC,KAEHtR,EAAAA,EAAAA,YAAU,KACRm6C,IAAYuB,eAAe,CAAEC,aAAa,EAAOrqC,QAAS,OAC1DsqC,EAAAA,EAAAA,IAAqBzB,IAAY7qB,EAAAA,EAAAA,IAAcusB,EAAAA,IAAiB,GAC/D,IAEH,MAAMrkD,GAASskD,EAAAA,EAAAA,KACbC,EAAAA,EAAAA,IAAYC,IACZC,EAAAA,EAAAA,OAGF,OACEvtD,EAAAA,cAACwtD,EAAAA,GAAc,CAACC,kBAAmBjB,IACjCxsD,EAAAA,cAACW,EAAAA,EAAa,KACZX,EAAAA,cAAC0tD,EAAAA,GAAkB,CAACC,WAAYlC,IAC9BzrD,EAAAA,cAACC,EAAAA,EAAa,CAAChB,MAAOA,GACpBe,EAAAA,cAAC4tD,EAAAA,GAAuB,KACtB5tD,EAAAA,cAACE,EAAAA,EAAW,MACZF,EAAAA,cAAC6tD,EAAAA,EAAc,CAAC/kD,OAAQA,GACtB9I,EAAAA,cAAC0C,EAAc,KACb1C,EAAAA,cAAC8tD,EAAAA,GAAmB,CAACC,cAAcC,EAAAA,EAAAA,OACjChuD,EAAAA,cAACiuD,EAAAA,EAAkB,KACjBjuD,EAAAA,cAAC6wB,EAAAA,EAAI,CAAClO,GAAIiqC,GACR5sD,EAAAA,cAACkuD,EAAAA,cAAa,KACZluD,EAAAA,cAACmuD,GAAS,gBAWf,KExJrBzsD,EAAAA,EAAAA,QAAO1B,EAAAA,cAAC2sD,GAAG,MAAKL,SAASC,cAAc,S,6FCGvC6B,IAAAA,U","sources":["webpack://shopify_zero/./app/javascript/consumer-app/components/ErrorBoundary.js","webpack://shopify_zero/./app/javascript/consumer-app/data/apolloCacheConfig.js","webpack://shopify_zero/./app/javascript/consumer-app/contexts/StripeProvider.js","webpack://shopify_zero/./app/javascript/consumer-app/components/type-form/TypeForm.js","webpack://shopify_zero/./app/javascript/consumer-app/components/type-form/index.js","webpack://shopify_zero/./app/javascript/consumer-app/data/shopNowExpiration.js","webpack://shopify_zero/./app/javascript/consumer-app/data/cancelShopNow.js","webpack://shopify_zero/./app/javascript/consumer-app/data/returnMethods.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseMethod/MethodCard.js","webpack://shopify_zero/./app/javascript/consumer-app/components/icons/return_in_store.js","webpack://shopify_zero/./app/javascript/consumer-app/components/icons/dropoff.js","webpack://shopify_zero/./app/javascript/consumer-app/components/icons/use_my_own.js","webpack://shopify_zero/./app/javascript/consumer-app/data/returnLocations.js","webpack://shopify_zero/./app/javascript/consumer-app/data/consumerPreferences.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseMethod/ChooseMethod.js","webpack://shopify_zero/./app/javascript/consumer-app/components/DropoffLocationLogo.js","webpack://shopify_zero/./app/javascript/shared/components/MaptilerMap.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseMethodSubstep/LocationCard.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseMethodSubstep/ZipForm.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseMethodSubstep/ChooseLocation.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseMethodSubstep/ChooseMethodSubstep.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ConfirmMailingAddress/ContactInformationForm.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ConfirmMailingAddress/MailingAddress.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ConfirmMailingAddress/ConfirmMailingAddress.js","webpack://shopify_zero/./app/javascript/consumer-app/data/calculateRefund.js","webpack://shopify_zero/./app/javascript/consumer-app/data/uploadPictures.js","webpack://shopify_zero/./app/javascript/consumer-app/data/submitReturn.js","webpack://shopify_zero/./app/javascript/consumer-app/components/Strikethrough.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Confirmation/ConfirmationCheckIcon.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Confirmation/ConfirmationBasic.js","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/InstructionsList/StepListStyles.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/InstructionsList/StepList.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/Icon/IconStyles.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/Icon/GooglePlay.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/Icon/AppStore.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/InstructionsList/Step.tsx","webpack://shopify_zero/./app/javascript/consumer-app/Confirmation/Steps.tsx","webpack://shopify_zero/./app/javascript/consumer-app/Confirmation/tokens.ts","webpack://shopify_zero/./app/javascript/consumer-app/Confirmation/ConfirmationStyles.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/Preferences/PreferencesStatusStyles.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/Preferences/PreferencesStatus.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/utils/validateString.ts","webpack://shopify_zero/./app/javascript/consumer-app/Confirmation/raw.tsx","webpack://shopify_zero/./app/javascript/consumer-app/Confirmation/index.tsx","webpack://shopify_zero/./app/javascript/consumer-app/steps/Confirmation/Confirmation.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseShopNow/ChooseShopNow.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseReturnCreditMethod/CreditMethodCard.js","webpack://shopify_zero/./app/javascript/consumer-app/components/icons/shop_now.js","webpack://shopify_zero/./app/javascript/shared/components/icons/GiftCard.js","webpack://shopify_zero/./app/javascript/consumer-app/components/icons/shop_later.js","webpack://shopify_zero/./app/javascript/shared/components/icons/Refund.js","webpack://shopify_zero/./app/javascript/consumer-app/components/icons/refund.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/ChooseReturnCreditMethod/ChooseReturnCreditMethod.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/Details.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/Item.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/Refund.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/CheckoutForm.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/Submit.js","webpack://shopify_zero/./app/javascript/consumer-app/data/preApproval.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/useNthFees.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/useNthRefund.js","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/Items.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/transformers/string.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/ReviewSummaryRawStyles.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/Total.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/ReshopOptIn/ReshopOptInStyles.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/ReshopOptIn/ReshopOptIn.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/ShopNowItems.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/ReviewSummaryRaw.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/transformers/pudoMethod.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/index.tsx","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/utils/rootElmHelpers.ts","webpack://shopify_zero/./app/javascript/consumer-app/ReviewSummary/components/ClaimAttestation/useClaimAttestation.ts","webpack://shopify_zero/./app/javascript/consumer-app/steps/Review/Review.js","webpack://shopify_zero/./app/javascript/consumer-app/steps/Stepper.js","webpack://shopify_zero/./app/javascript/consumer-app/components/ReturnOrder.js","webpack://shopify_zero/./app/javascript/consumer-app/checkout/styles.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/util/transformToNth.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/hooks/useTransformToNth.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/ReturnCartCostPanel.tsx","webpack://shopify_zero/./app/javascript/gql/__generated__/schema.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/hooks/useAddress.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/BillingAddress.tsx","webpack://shopify_zero/./app/javascript/consumer-app/checkout/hooks/usePayment.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/hooks/useSubmit.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/hooks/useDiscountCode.ts","webpack://shopify_zero/./app/javascript/consumer-app/checkout/DiscountCode.tsx","webpack://shopify_zero/./app/javascript/consumer-app/hooks/useCheckoutLocalStorageData.tsx","webpack://shopify_zero/./app/javascript/consumer-app/checkout/Checkout.tsx","webpack://shopify_zero/./app/javascript/consumer-app/checkout/hooks/usePreferences.ts","webpack://shopify_zero/./app/javascript/consumer-app/components/Checkout.js","webpack://shopify_zero/./app/javascript/consumer-app/checkoutConfirmation/CheckoutConfirmation.tsx","webpack://shopify_zero/./app/javascript/consumer-app/components/AppRouter.js","webpack://shopify_zero/./app/javascript/consumer-app/components/App.js","webpack://shopify_zero/./app/javascript/consumer-app/index.js","webpack://shopify_zero/./app/javascript/packs/consumer.js","webpack://shopify_zero/./app/javascript/packs/polyfill.js"],"sourcesContent":["import React, { useState, useMemo } from \"react\";\n\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport Container from \"@material-ui/core/Container\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { makeStyles, ThemeProvider } from \"@material-ui/styles\";\n\nimport useTheme from \"../theme/mui\";\nimport errorNotifier from \"../../shared/modules/error-notifier\";\nimport { config } from \"../config\";\nimport { getConfig } from \"../../shared/modules/config\";\n\nconst useStyles = makeStyles(\n (theme) => ({\n container: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n flexDirection: \"column\",\n paddingTop: \"9.375em\",\n paddingBottom: \"9.375em\",\n },\n message: {\n marginBottom: \"2em\",\n },\n }),\n { name: \"N0ErrorBoundaryContent\" },\n);\n\nfunction ErrorBoundaryContent() {\n const theme = useTheme(getConfig(\"branding\"));\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n Sorry, something unexpected occurred and we’re looking into\n it. Please try again later.\n \n \n \n \n \n );\n}\n\nclass ErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(\"ErrorBoundary caught:\", error, errorInfo);\n errorNotifier.critical(error, { caughtByErrorBoundary: true });\n }\n\n render() {\n if (this.state.hasError) {\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n","import { defaultDataIdFromObject } from \"@apollo/client/cache\";\n\nexport default {\n dataIdFromObject: (obj) => {\n switch (obj.__typename) {\n case \"ReturnMethod\":\n return [obj.id, obj.carrierService, obj.carrierId].join(\"|\");\n default:\n return defaultDataIdFromObject(obj);\n }\n },\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\n// Importing loadStripe without side effects\n// Stripe.js will not be loaded until `loadStripe` is called\n// https://github.com/stripe/stripe-js#importing-loadstripe-without-side-effects\nimport { loadStripe } from \"@stripe/stripe-js/pure\";\nimport { Elements, useElements, useStripe } from \"@stripe/react-stripe-js\";\n\nimport { config } from \"../config\";\nimport { featureFlaggedHook } from \"../../shared/modules/hooks\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\n\nconst stripePromise = config.isStripeEnabled\n ? loadStripe(config.stripePubKey, { stripeAccount: config.stripeAccount })\n : null;\n\nconst StripeProvider = ({ stripe, children }) => {\n return {children};\n};\n\nStripeProvider.propTypes = {\n stripe: PropTypes.object, // stripe promise object\n children: PropTypes.node.isRequired,\n};\n\nStripeProvider.defaultProps = {\n stripe: stripePromise,\n};\n\nexport default StripeProvider;\n\nexport const useStripeComponents = featureFlaggedHook(\n config.isStripeEnabled,\n {},\n)(() => {\n const stripe = useStripe();\n const elements = useElements();\n\n return memoObjectByKeyValues({\n stripe,\n elements,\n });\n});\n","import React, { useCallback, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport TypeFormSection from \"./TypeFormSection\";\nimport {\n // getWindowFramePosition,\n scrollToPosition,\n} from \"../../../shared/modules/frame\";\nimport { getBranding } from \"../../../shared/modules/config\";\nimport { useTypeForm } from \"../../contexts/typeForm\";\nimport { useDebounceCallback } from \"../../../shared/modules/hooks\";\n\nfunction TypeForm({ activeIndex, children }) {\n const actions = useTypeForm();\n const scrollToActive = useDebounceCallback(actions.scrollToActiveNow, 350);\n\n const handleRenderNext = useCallback(\n function handleRenderNext(activeSection, activeIndex, firstRender) {\n actions.setActiveSection(activeSection);\n\n // Disable autoscroll on the first step.\n if (firstRender && activeIndex !== 0 && activeIndex !== 1) {\n scrollToActive();\n }\n },\n [actions],\n );\n\n return React.Children.map(children, (child, index) => {\n if (index <= activeIndex) {\n return (\n \n {child}\n \n );\n }\n return null;\n });\n}\nTypeForm.propTypes = {\n activeIndex: PropTypes.number,\n children: PropTypes.node,\n};\nTypeForm.defaultProps = {\n activeIndex: 0,\n};\nexport default TypeForm;\n","import TypeForm from \"./TypeForm\";\nexport default TypeForm;\n","import { useCallback, useMemo, useState } from \"react\";\nimport { useApolloClient, gql } from \"@apollo/client\";\n\nfunction buildCheckoutQuery(checkoutCode, cancel = false) {\n // prettier-ignore\n return gql`\n query checkShopNowExpiration {\n checkShopNowExpiration(code: \"${checkoutCode}\", cancel: ${cancel}) {\n expired\n formattedAmount\n }\n }\n`;\n}\n\nexport function useShopNowExpiration() {\n const [called, setCalled] = useState(false);\n const [calledCancel, setCalledCancel] = useState(false);\n const [data, setData] = useState();\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(false);\n const client = useApolloClient();\n\n const state = useMemo(() => {\n return {\n called,\n calledCancel,\n error,\n loading,\n data,\n };\n }, [called, calledCancel, data, error, loading]);\n\n const checkShopNow = useCallback(\n function checkShopNow(checkoutCode, cancel) {\n async function checkShopNowAsync(checkoutCode, cancel) {\n if (!checkoutCode) return;\n\n try {\n setCalled(true);\n setLoading(true);\n if (cancel) {\n setCalledCancel(true);\n }\n\n const { error, data } = await client.query({\n query: buildCheckoutQuery(checkoutCode, cancel),\n fetchPolicy: \"network-only\",\n });\n\n if (error) {\n setError(error);\n } else {\n setData(data);\n setError(null);\n }\n } catch (err) {\n setError(err);\n } finally {\n setLoading(false);\n setCalled(false);\n setCalledCancel(false);\n }\n }\n\n checkShopNowAsync(checkoutCode, cancel);\n },\n [client],\n );\n\n return useMemo(() => ({ checkShopNow, state }), [checkShopNow, state]);\n}\n","import { useCallback, useMemo, useState } from \"react\";\nimport { useApolloClient, gql } from \"@apollo/client\";\n\nimport { cancelShopNowCheckout } from \"../../shared/modules/frame\";\n\nfunction buildCheckoutQuery(checkoutCode) {\n // prettier-ignore\n return gql`\n query checkShopNowExpiration {\n checkShopNowExpiration(code: \"${checkoutCode}\", cancel: true) {\n expired\n formattedAmount\n }\n }\n`;\n}\n\nexport function useCancelShopNow() {\n const [called, setCalled] = useState(false);\n const [calledCancel, setCalledCancel] = useState(false);\n const [data, setData] = useState();\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(false);\n const client = useApolloClient();\n\n const state = useMemo(() => {\n return {\n called,\n calledCancel,\n error,\n loading,\n data,\n };\n }, [called, calledCancel, data, error, loading]);\n\n const cancelShopNow = useCallback(\n function cancelShopNow(checkoutCode, cancel) {\n async function cancelShopNowAsync(checkoutCode, cancel) {\n try {\n setCalled(true);\n setLoading(true);\n if (cancel) {\n setCalledCancel(true);\n }\n\n const { error, data } = await client.query({\n query: buildCheckoutQuery(checkoutCode, cancel),\n fetchPolicy: \"network-only\",\n });\n\n if (error) {\n setError(error);\n } else {\n setData(data);\n setError(null);\n cancelShopNowCheckout();\n }\n } catch (err) {\n setError(err);\n } finally {\n setLoading(false);\n setCalled(false);\n setCalledCancel(false);\n }\n }\n\n cancelShopNowAsync(checkoutCode, cancel);\n },\n [client],\n );\n\n return useMemo(() => ({ cancelShopNow, state }), [cancelShopNow, state]);\n}\n","import { useMemo } from \"react\";\nimport { useQuery, gql } from \"@apollo/client\";\nimport { getAddressError } from \"../../shared/modules/decodeError\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\n\nexport const QUERY = gql`\n query getReturnMethods(\n $draftReturnUuid: String\n $returnItems: [ReturnCalculationInput!]!\n $exchangeItems: [ExchangeItemInput!]!\n $orderNumber: String!\n $email: String!\n $locale: String\n $fromAddress: FromAddressInput\n $csid: String\n ) {\n returnMethods(\n draftReturnUuid: $draftReturnUuid\n returnItems: $returnItems\n exchangeItems: $exchangeItems\n orderNumber: $orderNumber\n email: $email\n locale: $locale\n fromAddress: $fromAddress\n csid: $csid\n ) {\n id\n carrierName\n carrierService\n carrierId\n displayName\n displayDescription\n displayPrice\n returnMethodDisplayPrice\n price\n shouldDisplayLocations\n keepItemIds\n qr\n feeBreakdown {\n fee\n feeType\n currency\n description\n displayWithReturnMethod\n formattedFee\n }\n maxLabelRequests\n consolidationRadius\n }\n }\n`;\n\nexport function useReturnMethods(variables) {\n variables.returnItems = variables.returnItems.map((ri) => ({\n ...ri,\n pictures: [],\n }));\n variables.exchangeItems = variables.exchangeItems.map((ri) => ({\n ...ri,\n returnItem: { ...ri.returnItem, pictures: [] },\n }));\n const saved = useQuery(QUERY, { variables });\n const addressError = getAddressError(saved.error);\n\n const queryStatus = memoObjectByKeyValues({\n loading: saved.loading,\n error: saved.error,\n });\n const { returnMethods } = saved.data || {};\n\n return useMemo(\n () => ({\n queryStatus,\n returnMethods: returnMethods || [],\n addressError,\n refetch: saved.refetch,\n }),\n [queryStatus, returnMethods],\n );\n}\n","import React from \"react\";\nimport clsx from \"clsx\";\n\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { alpha } from \"@material-ui/core/styles\";\n\nimport { config } from \"../../config\";\nimport { makeRootStyles } from \"../../theme/styles\";\n\nconst BORDER_WIDTH_SELECTED = 3;\nconst BORDER_WIDTH_UNSELECTED = 1;\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"stretch\",\n justifyContent: \"center\",\n height: \"100%\",\n cursor: \"pointer\",\n backgroundColor: theme.palette.common.white,\n border: `${BORDER_WIDTH_UNSELECTED}px solid #ccc`,\n [theme.breakpoints.ie11()]: { height: theme.spacing(32) },\n [theme.breakpoints.edge()]: { height: theme.spacing(32) },\n },\n itemSelected: {\n border: `3px solid ${theme.palette.primary.main}`,\n backgroundColor: theme.palette.common.white,\n },\n details: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n flexWrap: \"nowrap\",\n padding: theme.spacing(3) - BORDER_WIDTH_UNSELECTED,\n },\n detailsSelected: {\n backgroundColor: alpha(theme.palette.primary.main, 0.05),\n padding: theme.spacing(3) - BORDER_WIDTH_SELECTED,\n },\n iconContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n [theme.breakpoints.up(\"sm\")]: {\n marginBottom: theme.spacing(1),\n },\n },\n icon: {\n width: theme.spacing(12),\n textAlign: \"center\",\n [theme.breakpoints.up(\"sm\")]: {\n width: \"auto\",\n maxWidth: theme.spacing(24),\n paddingRight: 0,\n },\n },\n description: {\n textAlign: \"center\",\n },\n title: {\n marginBottom: theme.spacing(1),\n },\n qr: {\n marginBottom: theme.spacing(1),\n },\n price: {\n marginBottom: theme.spacing(1),\n },\n subtitle: {\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(1),\n },\n }),\n { name: \"N0MethodCard\" },\n);\n\n// @deprecated the new UI (`nth_ui`) uses `PudoRaw` instead\nfunction MethodCard({ icon, selected, title, subtitle, onClick, price, qr }) {\n const classes = useStyles();\n\n return (\n \n \n \n
{icon}
\n
\n \n \n {qr && (\n \n )}\n {!config.hideReturnMethodPrice && (\n \n )}\n \n \n \n \n );\n}\n\nexport default MethodCard;\n","import * as React from \"react\";\n\nfunction SvgComponent(props) {\n return (\n \n \n \n \n \n \n );\n}\n\nexport default SvgComponent;\n","import * as React from \"react\";\n\nfunction SvgComponent(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgComponent;\n","import * as React from \"react\";\n\nfunction SvgComponent(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgComponent;\n","import { useCallback, useMemo, useState } from \"react\";\nimport { useApolloClient, gql } from \"@apollo/client\";\nimport { getHandledErrorMessage } from \"../../shared/modules/decodeError\";\nimport { config } from \"../config\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\n\nexport const GET_RETURN_LOCATIONS = gql`\n query GetReturnLocations(\n $countryCode: String!\n $zipcode: String!\n $carrier: String!\n $qr: String\n $locale: String\n $consolidationRadius: Int\n ) {\n returnLocations(\n countryCode: $countryCode\n zipcode: $zipcode\n carrier: $carrier\n qr: $qr\n locale: $locale\n consolidationRadius: $consolidationRadius\n ) {\n id\n storeAddress {\n address1\n address2\n city\n phone\n state\n zip\n }\n storeName\n storeName2\n logoUrl\n latitude\n longitude\n }\n }\n`;\n\nexport function useReturnLocations() {\n const [called, setCalled] = useState(false);\n const [data, setData] = useState([]);\n const [error, setError] = useState(null);\n const [loading, setLoading] = useState(false);\n const client = useApolloClient();\n\n const state = useMemo(\n () => ({\n called: called,\n data: data,\n error: error,\n loading: loading,\n }),\n [called, data, error, loading],\n );\n\n const getLocations = useCallback(\n function getLocations({\n countryCode,\n provinceCode,\n zipcode,\n carrier = \"in_store\",\n qr = \"\",\n consolidationRadius = null,\n }) {\n async function getLocationsAsync() {\n const skip = !countryCode || !zipcode || !carrier;\n if (skip) return;\n\n setCalled(true);\n setLoading(true);\n\n // SHOPZ-2595: For `ups` Puerto Rico is treated as a country\n const country =\n carrier === \"ups\" && countryCode === \"US\" && provinceCode === \"PR\"\n ? \"PR\"\n : countryCode;\n\n try {\n const { data } = await client.query({\n query: GET_RETURN_LOCATIONS,\n variables: {\n countryCode: country,\n zipcode,\n carrier,\n qr,\n consolidationRadius,\n },\n });\n\n setData(data.returnLocations);\n setError(null);\n } catch (err) {\n setData([]);\n setError(\n getHandledErrorMessage(\n err,\n config.translations.general_loading_error,\n ),\n );\n } finally {\n setLoading(false);\n }\n }\n\n getLocationsAsync();\n },\n [client],\n );\n\n const reset = useCallback(() => {\n setData([]);\n setError(null);\n setCalled(false);\n setLoading(false);\n }, []);\n\n const actions = memoObjectByKeyValues({\n getLocations,\n reset,\n });\n\n return useMemo(() => ({ actions, state }), [actions, state]);\n}\n","import { useMemo, useCallback } from \"react\";\nimport { gql, useQuery, useMutation } from \"@apollo/client\";\nimport { GraphQLError } from \"graphql\";\nimport {\n featureFlaggedHook,\n useRequestStatus,\n} from \"../../shared/modules/hooks\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\nimport {\n BOXLESS_METHOD,\n METHOD_IN_STORE,\n METHOD_KEEP_THE_ITEM,\n METHOD_SHIP_ON_YOUR_OWN,\n METHOD_XPO,\n PRINTERLESS_METHOD,\n} from \"../../retailer-app/constants/returns\";\nimport { DODDLE } from \"../../retailer-app/constants/carriers\";\nimport { config } from \"../config\";\n\nexport const GET_USER_PREFERENCES = gql`\n query GetUserPreferences($email: String!) {\n userPreferences(email: $email) {\n carriers\n locations\n returnMethods\n profile {\n profileId\n }\n }\n }\n`;\n\nexport const SET_USER_PREFERENCES = gql`\n mutation setUserPreferences(\n $orderId: String!\n $email: String!\n $userPreferences: UserPreferencesInput!\n ) {\n setUserPreferences(\n orderId: $orderId\n email: $email\n userPreferences: $userPreferences\n )\n }\n`;\n\nexport const useConsumerPreferences = featureFlaggedHook(\n config.isUserPreferencesEnabled,\n {\n queryStatus: {},\n updateStatus: {},\n },\n)((email) => {\n const saved = useQuery(GET_USER_PREFERENCES, {\n variables: { email },\n skip: !email,\n });\n const [update, updateState] = useMutation(SET_USER_PREFERENCES);\n const queryStatus = useRequestStatus(saved);\n const updateStatus = useRequestStatus(updateState);\n\n const consumerPreferences = saved.data?.userPreferences;\n\n const preferencesStatus = useMemo(() => {\n if (!email) return undefined;\n\n const status =\n queryStatus.error || updateStatus.error\n ? \"error\"\n : queryStatus.loading || updateStatus.loading\n ? \"loading\"\n : updateStatus.called\n ? \"success\"\n : \"idle\";\n const profileStatus =\n status === \"success\"\n ? \"pending\"\n : consumerPreferences?.returnMethods?.length > 0 &&\n consumerPreferences?.profile?.profileId\n ? \"active\"\n : undefined;\n const profileLink = config.userPreferencesEndpoint;\n return { status, profileStatus, profileLink };\n }, [email, consumerPreferences, queryStatus, updateStatus]);\n\n const updateConsumerPreferences = useCallback(\n (orderId, email, userPreferences) =>\n update({\n variables: { orderId, email, userPreferences },\n update: (cache, result) => {\n const apiResult = result.data.setUserPreferences;\n\n if (\n apiResult === \"PREF_UPDATED\" ||\n apiResult === \"PREF_UNVERIFIED_NO_UPDATE\"\n ) {\n let data = cache.readQuery({\n query: GET_USER_PREFERENCES,\n variables: { email },\n });\n data = { ...data, userPreferences };\n\n cache.writeQuery({\n query: GET_USER_PREFERENCES,\n variables: { email },\n data,\n });\n } else {\n throw new GraphQLError(\"Unable to set user preferences\", {\n extensions: {\n code: apiResult ?? \"PREF_ERROR\",\n },\n });\n }\n },\n }),\n [update],\n );\n\n return memoObjectByKeyValues({\n consumerPreferences,\n preferencesStatus,\n queryStatus,\n updateStatus,\n updateConsumerPreferences,\n });\n});\n\nexport const toReturnMethodPreference = (method) => {\n if (\n method.qr === BOXLESS_METHOD ||\n (method.id === DODDLE && method.qr === PRINTERLESS_METHOD)\n )\n return \"boxless\";\n if (method.qr === PRINTERLESS_METHOD) return \"printerless_mail\";\n if (method.id === METHOD_IN_STORE) return \"store\";\n if (method.id === METHOD_XPO) return \"home_pickup\";\n if (method.id === METHOD_SHIP_ON_YOUR_OWN) return \"mail\";\n if (![METHOD_KEEP_THE_ITEM, METHOD_IN_STORE].includes(method.id))\n return \"concierge\";\n return null;\n};\n\nexport const isPreferredMethod = (method, preferences) => {\n if (!preferences) return false;\n\n const type = toReturnMethodPreference(method);\n return preferences.returnMethods?.includes?.(type) ?? false;\n};\n","import React, { useEffect, useState, useMemo, useCallback } from \"react\";\nimport { find } from \"lodash/fp\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\n\nimport {\n METHOD_IN_STORE,\n METHOD_SHIP_ON_YOUR_OWN,\n METHOD_KEEP_THE_ITEM,\n BOXLESS_METHOD,\n PRINTERLESS_METHOD,\n METHOD_XPO,\n} from \"../../../retailer-app/constants/returns\";\nimport ErrorSnackbar from \"../../components/ErrorSnackbar\";\nimport Spinner from \"../../../shared/components/Spinner\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport {\n useReturnStepsActions,\n CONFIRM_MAILING_ADDRESS_STEP,\n CHOOSE_METHOD_SUBSTEP,\n useReturnStepsState,\n CHOOSE_METHOD_STEP,\n useReturnStepIsActive,\n useRegisterStepStatus,\n} from \"../../contexts/returnSteps\";\nimport { config } from \"../../config\";\nimport { useReturnMethods } from \"../../data/returnMethods\";\nimport MethodCard from \"./MethodCard\";\nimport { buildItemsByType } from \"../../modules/items\";\nimport locale from \"../../../shared/modules/lang\";\nimport { getTranslation } from \"../../../shared/modules/config\";\nimport InStoreIcon from \"../../components/icons/return_in_store\";\nimport DropOffIcon from \"../../components/icons/dropoff\";\nimport MailInIcon from \"../../components/icons/use_my_own\";\nimport MailingAddressForm from \"../ConfirmMailingAddress/MailingAddressForm\";\nimport {\n normalizeAddressKeys,\n mergeAddress,\n patchZipCode,\n} from \"../../modules/address\";\nimport {\n getHandledErrorMessage,\n getIneligibleItemsReturnedError,\n getIneligibleReturnMethodError,\n} from \"../../../shared/modules/decodeError\";\nimport { PudoRaw } from \"@narvar/nth-kit-returns-headless\";\nimport { useReturnLocations } from \"../../data/returnLocations\";\nimport { useTypeForm } from \"../../contexts/typeForm\";\nimport { useNthReturnsActions } from \"../../contexts/nthContext\";\nimport {\n isPreferredMethod,\n toReturnMethodPreference,\n useConsumerPreferences,\n} from \"../../data/consumerPreferences\";\nimport titan from \"../../../shared/modules/titan\";\nimport useConsumerSettings from \"../../hooks/useConsumerSettings\";\nimport useClaims from \"../../hooks/useClaims\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n title: {\n marginBottom: theme.spacing(3),\n },\n carrierLogo: {\n transform: \"scale(1.5)\",\n minWidth: \"100px\",\n },\n errorItemsContainer: {\n padding: theme.spacing(1),\n },\n errorItemsList: {\n listStyleType: \"circle\",\n listStylePosition: \"inside\",\n },\n submitContainer: {\n marginTop: theme.spacing(4),\n },\n chooseButton: {\n marginTop: theme.spacing(1),\n },\n }),\n { name: \"N0ChooseMethod\" },\n);\n\nconst computeMethodId = (method) => `${method?.id}|${method?.carrierService}`;\n\nconst ChooseMethod = ({ orderFetchData, draftReturnUuid }) => {\n const classes = useStyles();\n\n const state = useReturnStepsState();\n const actions = useReturnStepsActions();\n const useNewDesign = config.isNthUi;\n const nthReturnsActions = useNthReturnsActions();\n\n const { order, returnReasonsById = {} } = orderFetchData;\n const { itemsById } = order;\n\n const { exchangeItems, returnItems } = useMemo(\n () => buildItemsByType(state.items, itemsById, returnReasonsById),\n [itemsById, returnReasonsById, state.items],\n );\n\n const returnMethodsPayload = {\n draftReturnUuid,\n returnItems,\n exchangeItems,\n orderNumber: state.orderNumber,\n email: state.email,\n locale,\n csid: state.csid,\n };\n const { queryStatus, returnMethods, addressError, refetch } =\n useReturnMethods(returnMethodsPayload);\n\n const [errorMessage, setErrorMessage] = useState(null);\n const [errorItems, setErrorItems] = useState([]);\n const returnMethodsFiltered = useMemo(\n () => returnMethods.filter((method) => method.id !== METHOD_KEEP_THE_ITEM),\n [returnMethods],\n );\n\n const keepTheItemMethod = find({ id: METHOD_KEEP_THE_ITEM }, returnMethods);\n const allItemsAreKeepTheItem = useMemo(() => {\n if (!keepTheItemMethod) {\n return false;\n }\n\n const allReturnItemsAreKept = !returnItems.find(\n (ri) => keepTheItemMethod.keepItemIds.indexOf(ri.lineItemId) === -1,\n );\n const allExchangeItemsAreKept = !exchangeItems.find(\n (ei) =>\n keepTheItemMethod.keepItemIds.indexOf(ei.returnItem.lineItemId) === -1,\n );\n return allReturnItemsAreKept && allExchangeItemsAreKept;\n }, [keepTheItemMethod, returnItems]);\n\n const { hasClaimItems: isClaim } = useClaims();\n const isSkipStep = allItemsAreKeepTheItem;\n\n const isValidSelected = useMemo(() => {\n const method = state.selectedReturnMethod;\n if (!method?.id) return false;\n return returnMethods.some(\n (d) => computeMethodId(d) === computeMethodId(method),\n );\n }, [state.selectedReturnMethod, returnMethods]);\n\n const {\n consumerPreferences,\n preferencesStatus,\n queryStatus: consumerPreferencesStatus,\n } = useConsumerPreferences(state.guestReturn ? \"\" : state.email);\n\n const isActiveStep = useReturnStepIsActive(CHOOSE_METHOD_STEP);\n const loading = queryStatus.loading || consumerPreferencesStatus.loading;\n const showNextBtn = !loading && !errorMessage && isActiveStep;\n\n useEffect(() => {\n if (returnMethods.length > 0) {\n setErrorMessage(null);\n }\n\n // Redirect to Review Step\n // If all items in order are \"Keep the Item\" or the\n // return is a claim, send user directly to Review Step\n if (isSkipStep) {\n const defaultClaimMethod = { id: \"keep_the_item\" }; // claims are always \"keep the item\"\n const method = isClaim ? defaultClaimMethod : keepTheItemMethod;\n actions.setReturnMethod(method);\n actions.goToStep(CONFIRM_MAILING_ADDRESS_STEP);\n\n // set a placeholder return cart for the new nth ui\n nthReturnsActions.setReturnCart?.({\n id: \"\",\n retailerMoniker: \"\",\n orderId: \"\",\n createdDate: \"\",\n expirationDate: \"\",\n lastUpdatedDate: \"\",\n pudoOption: {},\n });\n }\n }, [actions, isSkipStep, isClaim, returnMethods.length]);\n\n useEffect(() => {\n if (keepTheItemMethod) {\n actions.setKeepItemIds(keepTheItemMethod.keepItemIds);\n }\n }, [actions, keepTheItemMethod]);\n\n // auto select the preferred method or the first method when methods loaded\n useEffect(() => {\n const method = state.selectedReturnMethod;\n if (\n !isSkipStep &&\n !method?.id &&\n returnMethodsFiltered.length > 0 &&\n !consumerPreferencesStatus.loading\n ) {\n const preferredMethod =\n returnMethodsFiltered.find((m) =>\n isPreferredMethod(m, consumerPreferences),\n ) ?? returnMethodsFiltered[0];\n actions.setReturnMethod(preferredMethod);\n }\n }, [\n isSkipStep,\n state.selectedReturnMethod,\n returnMethodsFiltered,\n consumerPreferencesStatus,\n ]);\n\n // General error handling for queryStatus\n useEffect(() => {\n const errorMessage = getHandledErrorMessage(\n queryStatus.error,\n config.translations.general_loading_error,\n );\n setErrorMessage(errorMessage);\n }, [queryStatus]);\n\n // rule engine throw errors based on return methods (eg. 2 different return\n // items need to ship to different location)\n useEffect(() => {\n const error = getIneligibleReturnMethodError(queryStatus.error);\n if (error) {\n setErrorMessage(getTranslation(\"choose_method_no_intersection\"));\n }\n }, [queryStatus]);\n\n // rule engine throw errors based on return items properties (eg. total value,\n // total items quantity)\n useEffect(() => {\n if (errorMessage) return;\n\n const error = getIneligibleItemsReturnedError(queryStatus.error);\n if (error) {\n const extensions = error.extensions;\n const errorItems = Object.keys(extensions.data).map((lineItemId) => {\n const ineligibleReasons = extensions.data[lineItemId];\n if (ineligibleReasons.length) {\n const itemName = itemsById[lineItemId].name;\n return `${itemName} - ${ineligibleReasons.join(\", \")}\\n`;\n }\n return \"\";\n });\n\n setErrorMessage(error.message);\n setErrorItems(errorItems);\n }\n }, [queryStatus, errorMessage]);\n\n const createChooseMethodHandler = (method) => () => {\n if (computeMethodId(method) === computeMethodId(state.selectedReturnMethod))\n return;\n actions.setReturnMethod(method);\n };\n\n const handleNextStep = useCallback(() => {\n if (state.selectedReturnMethod.shouldDisplayLocations) {\n actions.goToStep(CHOOSE_METHOD_SUBSTEP);\n } else {\n actions.goToStep(CONFIRM_MAILING_ADDRESS_STEP);\n }\n }, [state.selectedReturnMethod]);\n\n const methodIcons = (carrier) => {\n switch (carrier) {\n case METHOD_IN_STORE:\n return ;\n case METHOD_SHIP_ON_YOUR_OWN:\n return ;\n default:\n return ;\n }\n };\n\n const getMethodCardStrings = (method) => {\n const subText = method.displayDescription;\n if (method.qr === BOXLESS_METHOD) {\n return {\n qrText: config.translations.choose_method_substep_boxless_subtitle,\n subText: config.translations.choose_method_substep_boxless_description,\n };\n } else if (method.qr === PRINTERLESS_METHOD) {\n return {\n qrText: config.translations.choose_method_substep_printerless_subtitle,\n subText,\n };\n } else {\n return {\n qrText: false,\n subText,\n };\n }\n };\n\n const handleAddressFix = ({ fromAddress }) => {\n setErrorMessage(null);\n actions.setCorrectedAddress(fromAddress);\n refetch({\n ...returnMethodsPayload,\n fromAddress,\n });\n };\n\n /***************************************************************************************************************\n * New design with `nth` components\n ***************************************************************************************************************/\n const typeForm = useTypeForm();\n const [selectedCategory, setSelectedCategory] = useState();\n const initialAddress = patchZipCode(\n mergeAddress(\n normalizeAddressKeys(order, \"billing\"),\n normalizeAddressKeys(order, \"from\"),\n state.fromAddress,\n ),\n );\n const { countryCode, provinceCode } = initialAddress;\n const [zipCode, setZipCode] = useState(initialAddress.zip);\n const {\n state: { data: locations, ...locationStatus },\n actions: { getLocations, reset: resetLocations },\n } = useReturnLocations();\n const [showSwitchCategory, setShowSwitchCategory] = useState(false);\n const { localeFull, includeCurrency } = useConsumerSettings();\n\n const selectedMethod = find(\n {\n id: selectedCategory?.pudoProvider?.moniker,\n carrierService: selectedCategory?.serviceType,\n },\n returnMethods,\n );\n\n const getCarrierForLocationSearch = (selectedMethod) =>\n selectedMethod?.id === METHOD_IN_STORE\n ? \"in_store\"\n : selectedMethod?.id === \"ups\" &&\n selectedMethod?.carrierService === \"UPS Mail Innovations\" // UPS Mail Innovations uses USPS drop-off locations for fulfillment.\n ? \"usps_returns\"\n : selectedMethod?.id;\n\n useEffect(() => {\n if (selectedMethod?.id && selectedMethod?.shouldDisplayLocations) {\n getLocations({\n countryCode,\n provinceCode,\n zipcode: zipCode,\n carrier: getCarrierForLocationSearch(selectedMethod),\n qr: selectedMethod.qr,\n locale,\n consolidationRadius: selectedMethod.consolidationRadius,\n });\n }\n }, [selectedMethod, zipCode]);\n\n const pudoOptions = useMemo(\n () =>\n returnMethodsFiltered.map((method) => {\n const isPickup = method.id === METHOD_XPO;\n const ret = {\n pudoActionType: isPickup ? \"PICK_UP\" : \"DROP_OFF\",\n pudoActionTypeDetails: method.qr ? \"PRINTERLESS\" : \"LABEL\",\n pudoProvider: {\n moniker: method.id,\n type:\n method.id === METHOD_IN_STORE\n ? \"STORE\"\n : method.id === METHOD_SHIP_ON_YOUR_OWN\n ? \"SELF\"\n : isPickup\n ? \"COURIER\"\n : \"CARRIER\",\n iconUrl: null,\n carrierId: method.carrierId,\n },\n serviceType: method.carrierService,\n title: method.displayName,\n description: method.displayDescription,\n fees: config.hideReturnMethodPrice\n ? []\n : [\n // nth supports \"LABEL_FEE\" and \"SERVICE_FEE\", to avoid bugs, we\n // sum all fess, and only pass one fee to nth component\n {\n type: null,\n amount: {\n value: method.feeBreakdown\n ?.filter((fee) => fee.displayWithReturnMethod)\n ?.reduce((p, c) => p + c.fee, 0),\n currency: method.feeBreakdown?.[0]?.currency ?? null,\n },\n },\n ],\n pickup: null,\n dropOff: null,\n preferred: isPreferredMethod(method, consumerPreferences),\n _raw: method,\n };\n return ret;\n }),\n [returnMethodsFiltered, consumerPreferences],\n );\n\n const pudoLocations = useMemo(\n () =>\n selectedMethod?.shouldDisplayLocations\n ? locations.map((location) => {\n const isInStore = selectedMethod.id === METHOD_IN_STORE;\n let logo = location.logoUrl;\n if (\n !logo &&\n isInStore &&\n config.logoImg &&\n !/no-image/.test(config.logoImg)\n ) {\n // remove the image tag\n logo = config.logoImg.replace(\n /^$/,\n \"$1\",\n );\n }\n const ret = {\n ...location,\n storeId: location.id,\n displayName: location.storeName,\n locationType: location.storeName2,\n logoUrls: logo ? [logo] : null,\n openingHours: [],\n brand: null,\n companyName: null,\n distance: null,\n phoneNumber: location.storeAddress.phone,\n address: {\n ...location.storeAddress,\n regionCode: location.storeAddress.state,\n postalCode: location.storeAddress.zip,\n countryCode,\n },\n };\n return ret;\n })\n : [],\n [countryCode, selectedMethod, locations],\n );\n\n // auto select method when methods loaded\n useEffect(() => {\n if (!isSkipStep && !selectedCategory && pudoOptions.length === 1) {\n setSelectedCategory(pudoOptions[0]);\n }\n }, [isSkipStep, selectedCategory, pudoOptions]);\n\n const [preferencesLoaded, setPreferencesLoaded] = useState(false);\n useEffect(() => {\n if (\n !isSkipStep &&\n !selectedCategory &&\n pudoOptions.length > 1 &&\n !consumerPreferencesStatus.loading &&\n !preferencesLoaded\n ) {\n const preferred = pudoOptions.find((d) => d.preferred);\n if (preferred) {\n setSelectedCategory(preferred);\n setPreferencesLoaded(true);\n setShowSwitchCategory(true);\n\n if (consumerPreferences?.profile?.profileId) {\n titan.identify(consumerPreferences.profile.profileId);\n }\n\n titan.track(\"products_list_viewed\", {\n props: {\n list_id: \"pudo_options\",\n products: pudoOptions.map((opt) => ({\n product_id: toReturnMethodPreference(opt._raw),\n variant: opt.preferred ? \"PREFERRED\" : null,\n })),\n },\n });\n }\n }\n }, [\n isSkipStep,\n selectedCategory,\n pudoOptions,\n consumerPreferencesStatus,\n preferencesLoaded,\n ]);\n\n // When category was selected and locations were loaded, if there is no\n // selectedDropOff or it has an incorrect value, auto-select the first\n // location in the list\n useEffect(() => {\n if (\n isActiveStep &&\n !selectedCategory?.skippedDropOffLocation &&\n pudoLocations?.length > 0 &&\n !find(\n { id: selectedCategory.selectedDropOff?.selectedLocation?.id },\n pudoLocations,\n )\n ) {\n setSelectedCategory({\n ...selectedCategory,\n selectedDropOff: { selectedLocation: { id: pudoLocations[0].id } },\n });\n }\n }, [isActiveStep, selectedCategory, pudoLocations]);\n\n useRegisterStepStatus(CHOOSE_METHOD_STEP, { skipped: isSkipStep });\n if (isSkipStep) return null;\n\n if (addressError) {\n return (\n \n \n {config.translations.mailing_address_section_title}\n \n \n \n );\n }\n\n if (useNewDesign) {\n const error = errorMessage ? (\n <>\n \n {errorItems && errorItems.length > 0 && (\n
\n
    \n {errorItems.map((item, i) => {\n return (\n
  • \n \n
  • \n );\n })}\n
\n
\n )}\n \n ) : null;\n\n return (\n \n \n Hi
}\n error={error}\n loading={loading}\n loadingLocations={locationStatus.loading}\n pudoOptions={pudoOptions}\n selectedCategory={selectedCategory}\n postalCode={zipCode}\n postalCodeError={locationStatus.error}\n // // sortedBy={}\n // // sortedByOptions={}\n showSkipLocation={\n selectedCategory?.pudoProvider?.moniker !== METHOD_IN_STORE\n }\n showSwitchCategory={showSwitchCategory}\n locations={pudoLocations}\n // returnAddress={args.customer?.shippingAddress} // customer / pickup address\n preferencesStatus={preferencesStatus}\n multiLabelsEnabled={selectedMethod?.maxLabelRequests > 1}\n labelsCount={state.requestedLabelCount}\n labelsMax={selectedMethod?.maxLabelRequests}\n onChange={(event) => {\n if (\n event.value?.selectedCategory ||\n event.subComponent === \"category\"\n ) {\n const skippedDropOffLocation =\n event.subComponent === \"location\" &&\n !event.value?.selectedCategory?.selectedDropOff;\n setSelectedCategory(\n event.value?.selectedCategory\n ? {\n skippedDropOffLocation,\n ...event.value?.selectedCategory,\n }\n : undefined,\n );\n }\n if (event.value?.postalCode) {\n setZipCode(event.value.postalCode);\n }\n if (event.value?.labelsCount !== undefined) {\n actions.setRequestedLabelCount(event.value.labelsCount);\n }\n actions.setReturnMethod(state.selectedReturnMethod); // reset step, clean up the UI when user clicking from a later step back to method selection\n\n // selecting new return method, then focus back location / pickup form\n if (event.subComponent === \"category\") {\n setShowSwitchCategory(false);\n typeForm.scrollToActive();\n }\n }}\n onBack={() => {\n if (selectedCategory && pudoOptions.length > 1) {\n setSelectedCategory(undefined);\n resetLocations();\n } else {\n actions.goBack();\n }\n typeForm.scrollToActive();\n }}\n onSubmit={(e) => {\n if (selectedMethod) {\n const pudoOption = e.value.selectedCategory;\n setSelectedCategory(pudoOption);\n nthReturnsActions.setSelectedPudoOption(pudoOption);\n\n const selectedLocation = find(\n {\n id: pudoOption?.selectedDropOff?.selectedLocation?.id,\n },\n locations,\n );\n const dropOffLocation = pudoLocations.find(\n (loc) => loc.id === selectedLocation?.id,\n );\n\n const returnCart = {\n id: \"\",\n retailerMoniker: \"\",\n orderId: \"\",\n createdDate: \"\",\n expirationDate: \"\",\n lastUpdatedDate: \"\",\n // customer?: Maybe;\n // items?: Maybe>;\n pudoOption: pudoOption\n ? {\n ...pudoOption,\n selectedDropOff: dropOffLocation\n ? { dropOffLocation }\n : null,\n }\n : null,\n // refundOption?: Maybe;\n };\n nthReturnsActions.setReturnCart(returnCart);\n\n actions.setReturnMethod(selectedMethod);\n actions.setStoreLocation(\n selectedLocation\n ? {\n ...selectedLocation,\n carrier: getCarrierForLocationSearch(selectedMethod),\n }\n : {},\n );\n actions.goToStep(CONFIRM_MAILING_ADDRESS_STEP);\n }\n }}\n />\n \n \n );\n }\n\n return (\n \n \n \n {config.translations.choose_method_title}\n \n {!addressError && errorMessage && (\n \n \n }\n />\n {errorItems && errorItems.length > 0 && (\n
\n
    \n {errorItems.map((item, i) => {\n return (\n
  • \n \n
  • \n );\n })}\n
\n
\n )}\n
\n )}\n {loading ? (\n \n \n \n \n \n ) : (\n !errorMessage && (\n \n {returnMethodsFiltered.map((method) => {\n const { qrText, subText } = getMethodCardStrings(method);\n\n return (\n \n \n \n );\n })}\n \n )\n )}\n
\n {showNextBtn && (\n \n \n \n {config.translations.choose_method_next_button_label}\n \n \n \n )}\n \n );\n};\nexport default ChooseMethod;\n","import React from \"react\";\nimport get from \"lodash/get\";\n\nimport Typography from \"@material-ui/core/Typography\";\n\nimport { makeRootStyles } from \"../theme/styles\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n textLogo: {\n textTransform: \"uppercase\",\n letterSpacing: \"0.1rem\",\n },\n carrierLogo: {\n height: 50,\n },\n }),\n { name: \"N0ShopLogo\" },\n);\n\nconst DropoffLocationLogo = ({ name, carrier, url = null }) => {\n const classes = useStyles();\n\n const logoImg = get(window, \"nvo_config.logo_img\", \"\");\n\n // With concierge we get a URL for the logo of the drop-off location\n if (url) return ;\n\n // OK for rendering string, this comes directly from Shopify's liquid template\n if (logoImg && !logoImg.includes(\"no-image\") && carrier == \"in_store\")\n return
;\n\n return (\n \n {name}\n \n );\n};\n\nexport default DropoffLocationLogo;\n","import React, { useState, useMemo, useEffect, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { pick, isNumber } from \"lodash\";\n\nimport { Map, Marker, NavigationControl } from \"maplibre-gl\";\nimport \"maplibre-gl/dist/maplibre-gl.css\";\nimport { maptilerKey } from \"../modules/config\";\n\nimport { makeStyles, useTheme } from \"@material-ui/core/styles\";\nimport clsx from \"clsx\";\nimport errorNotifier from \"../modules/error-notifier\";\n\nconst MAPTILER_KEY = maptilerKey;\nconst MAPTILER_MAP_ID = \"10d44f10-b441-483a-bb86-5850e28f98b1\";\nconst MAPTILER_URL = `https://api.maptiler.com/maps/${MAPTILER_MAP_ID}/?key=${MAPTILER_KEY}#1.37/0/0`;\nconst MAPTILER_STYLE = `https://api.maptiler.com/maps/${MAPTILER_MAP_ID}/style.json?key=${MAPTILER_KEY}`;\n\nexport const useStyles = makeStyles(\n (theme) => ({\n root: {\n width: \"100%\",\n height: \"100%\",\n },\n map: {\n width: \"100%\",\n height: \"100%\",\n },\n error: {\n padding: theme.spacing(2),\n },\n }),\n { name: \"N0MaplibreMap\" },\n);\n\n/**\n * maplibre-gl coordinate object\n * @typedef {Object} Coordinate\n * @property {number} lng longitude\n * @property {number} lat latitude\n */\n/**\n * map object or numbers to maplibre-gl coordinate object\n * @param {number|Coordinate|Object} arg1 coordinate object or longitude\n * @param {number} [arg1.longitude] longitude\n * @param {number} [arg1.latitude] latitude\n * @param {number} [arg2] latitude\n * @returns {Coordinate}\n */\nconst mapCoor = (arg1, arg2) => {\n if (isNumber(arg1) && isNumber(arg2)) {\n return { lng: arg1, lat: arg2 };\n }\n if (isNumber(arg1?.longitude) && isNumber(arg1?.latitude)) {\n return { lng: arg1.longitude, lat: arg1.latitude };\n }\n if (isNumber(arg1?.lng) && isNumber(arg1?.lat)) {\n return pick(arg1, [\"lng\", \"lat\"]);\n }\n return null;\n};\n\nexport async function fetchCoordinatesFromAddress(address) {\n const { address1, address2, city, state, zip } = address;\n // const street = `${address1} ${address2}`;\n const street = `${address1}`; // address2 may lead to incorrect locations\n const queryString = encodeURIComponent(`${street} ${city} ${state} ${zip}`);\n const url = `https://api.maptiler.com/geocoding/${queryString}.json?key=${MAPTILER_KEY}`;\n const response = await fetch(url, { method: \"GET\" });\n let { features } = await response.json();\n features = features.map((d) => ({\n ...d,\n ...mapCoor(...d.center),\n }));\n return features;\n}\n\nfunction MaptilerMap(props) {\n let {\n address,\n latitude,\n longitude,\n start,\n markersColor,\n disableDefaultMarker,\n markers,\n className = \"\",\n ...otherProps\n } = props;\n const theme = useTheme();\n const classes = useStyles();\n const [id] = useState(new Date().getTime());\n const EL_ID = `mapblire-${id}`;\n const mapEl = useRef(null);\n const [mapObj, setMapObj] = useState(null);\n const startWithCoor = start && mapCoor(start);\n const startWithAddress = start && !startWithCoor;\n const [_start, setStart] = useState(startWithCoor);\n const [_center, setCenter] = useState(\n start ? null : mapCoor(longitude, latitude),\n );\n const [mapInitFailed, setMapInitFailed] = useState(false);\n\n const _markers = useMemo(() => {\n let ret = disableDefaultMarker || !_center ? [] : [_center];\n ret = ret.concat(markers);\n return ret;\n }, [disableDefaultMarker, _center, markers]);\n\n const createMarkers = (map, markers) =>\n markers.map((marker) =>\n new Marker({\n color: marker.color || markersColor || theme.palette.secondary.main,\n scale: 0.8,\n })\n .setLngLat([marker.lng, marker.lat])\n .addTo(map),\n );\n\n const mapInit = (center, markers) => {\n const { lng = 0, lat = 0 } = center;\n\n try {\n const map = new Map({\n container: EL_ID, // container id\n style: MAPTILER_STYLE, // style URL\n center: [lng, lat], // starting position [lng, lat]\n zoom: 15, // starting zoom\n });\n const nav = new NavigationControl({ showCompass: false });\n map.addControl(nav);\n setMapInitFailed(false);\n return { map, nav, markers: createMarkers(map, markers) };\n } catch (err) {\n errorNotifier.warn(err);\n setMapInitFailed(true);\n return null;\n }\n };\n\n // cleanup function\n useEffect(() => () => mapObj?.map?.remove(), [mapObj?.map]);\n\n useEffect(() => {\n // Initialize the map\n if (!mapObj) {\n if (_start) {\n setMapObj(mapInit(_start, _markers));\n } else if (_center) {\n setMapObj(mapInit(_center, _markers));\n }\n return;\n }\n\n // Update location\n if (_center) {\n mapObj.map.flyTo({\n center: [_center.lng, _center.lat],\n });\n }\n }, [_start, _center]);\n\n useEffect(() => {\n if (start && !_start) return; // loading starting location\n\n let center = mapCoor(longitude, latitude);\n if (center) {\n setCenter(center);\n } else if (address) {\n // query the coordinate from address object\n (async () => {\n const res = await fetchCoordinatesFromAddress(address);\n if (res && res[0]) {\n setCenter(mapCoor(res[0]));\n }\n })();\n }\n }, [start, _start, address, latitude, longitude]);\n\n useEffect(() => {\n // query the coordinate from address object\n if (startWithAddress && start) {\n (async () => {\n const res = await fetchCoordinatesFromAddress(start);\n if (res && res[0]) {\n setStart(mapCoor(res[0]));\n }\n })();\n }\n }, [startWithAddress, start]);\n\n useEffect(() => {\n if (mapObj) {\n // redraw all markers\n mapObj.markers.forEach((marker) => marker.remove());\n\n const newMapObj = {\n ...mapObj,\n markers: createMarkers(mapObj.map, _markers),\n };\n setMapObj(newMapObj);\n }\n }, [_markers]);\n\n return (\n
\n
\n {mapInitFailed && (\n
\n Cannot render the map, please enable hardware acceleration / WebGL\n in browser settings.\n
\n )}\n
\n
\n );\n}\n\nconst Coordinate = PropTypes.shape({\n lng: PropTypes.number.isRequired,\n lat: PropTypes.number.isRequired,\n});\nconst Address = PropTypes.shape({\n address1: PropTypes.string,\n address2: PropTypes.string,\n city: PropTypes.string,\n state: PropTypes.string,\n zip: PropTypes.string,\n});\nMaptilerMap.propTypes = {\n address: Address,\n longitude: PropTypes.number,\n latitude: PropTypes.number,\n start: PropTypes.oneOfType([Address, Coordinate]), // starting location of map initial animation\n disableDefaultMarker: PropTypes.bool,\n markersColor: PropTypes.string,\n markers: PropTypes.arrayOf(\n PropTypes.shape({\n lng: PropTypes.number.isRequired,\n lat: PropTypes.number.isRequired,\n color: PropTypes.string,\n }),\n ),\n};\n\nMaptilerMap.defaultProps = {\n markers: [],\n};\n\nexport default MaptilerMap;\n","import React, { useState, useEffect, useRef } from \"react\";\nimport PlusIcon from \"@material-ui/icons/Add\";\nimport Button from \"@material-ui/core/Button\";\nimport Collapse from \"@material-ui/core/Collapse\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { alpha } from \"@material-ui/core/styles\";\n\nimport get from \"lodash/get\";\nimport DropoffLocationLogo from \"../../components/DropoffLocationLogo\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport Map from \"../../../shared/components/MaptilerMap\";\nimport clsx from \"clsx\";\nimport { config } from \"../../config\";\n\nconst TRANSITION_TIMEOUT = 250;\nconst BORDER_WIDTH_SELECTED = 3;\nconst BORDER_WIDTH_UNSELECTED = 1;\n\nconst useStyles = makeRootStyles(\n (theme) => {\n const borderSelected = `3px solid ${theme.palette.primary.main}`;\n const borderUnselected = `${BORDER_WIDTH_UNSELECTED}px solid #ccc`;\n const paddingSelected = theme.spacing(3) - BORDER_WIDTH_SELECTED;\n const paddingUnselected = theme.spacing(3) - BORDER_WIDTH_UNSELECTED;\n\n return {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n \"& + $root\": {\n marginTop: theme.spacing(2),\n },\n backgroundColor: theme.palette.common.white,\n },\n itemSelected: {\n \"& $details\": {\n border: borderSelected,\n padding: paddingSelected,\n },\n \"& $mapContainer\": {\n marginLeft: -paddingSelected,\n marginRight: -paddingSelected,\n marginBottom: -(paddingSelected + BORDER_WIDTH_SELECTED),\n },\n \"& $descriptionWithMap\": {\n marginRight: -paddingSelected,\n },\n },\n details: {\n display: \"flex\",\n flexDirection: \"column\",\n flexGrow: 1,\n // backgroundColor: theme.palette.common.white,\n border: borderUnselected,\n padding: paddingUnselected,\n boxSizing: \"border-box\",\n },\n detailsSelected: {\n backgroundColor: alpha(theme.palette.primary.main, 0.05),\n },\n logoContainer: {\n textAlign: \"center\",\n marginRight: theme.spacing(2),\n overflowWrap: \"break-word\",\n maxWidth: \"35%\",\n [theme.breakpoints.down(\"xs\")]: {\n maxWidth: \"none\",\n },\n },\n headline: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"normal\",\n display: \"-webkit-box\",\n lineClamp: 4,\n boxOrient: \"vertical\",\n [theme.breakpoints.down(\"xs\")]: {\n width: \"100%\",\n },\n },\n description: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n height: theme.spacing(8),\n flexWrap: \"nowrap\",\n [theme.breakpoints.down(\"xs\")]: {\n height: \"auto\",\n flexWrap: \"wrap\",\n },\n },\n locationName: {\n paddingRight: 5,\n minWidth: 95,\n [theme.breakpoints.down(\"xs\")]: {\n minWidth: \"auto\",\n },\n },\n locationNameTitle: {},\n locationNameSubtitle: {},\n descriptionWithMap: {\n marginRight: -paddingUnselected,\n position: \"relative\",\n paddingRight: theme.spacing(6),\n },\n actionContainer: {\n position: \"absolute\",\n right: 0,\n },\n plusIcon: {\n transition: `transform ${TRANSITION_TIMEOUT}ms ease`,\n transform: \"rotate(0deg)\",\n },\n closeIcon: {\n transform: \"rotate(135deg)\",\n },\n mapContainer: {\n margin: `${theme.spacing(\n 3,\n )}px ${-paddingUnselected}px ${-paddingUnselected}px`,\n },\n map: {\n display: \"flex\",\n height: theme.spacing(19),\n },\n chooseButton: {\n marginTop: theme.spacing(3),\n },\n chooseButtonMap: {\n marginTop: 0,\n borderRadius: 0,\n },\n };\n },\n { name: \"N0LocationCard\" },\n);\n\nfunction LocationCard({\n address,\n longitude,\n latitude,\n logoUrl,\n disableMap,\n onChoose,\n onClick,\n selected,\n subtitle,\n title,\n name,\n carrier,\n}) {\n const classes = useStyles();\n const selectedRef = useRef(selected);\n const [mapVisible, showMap] = useState(selected);\n\n const handleChoose = () => {\n if (!disableMap) showMap(false);\n onChoose();\n };\n\n const handleToggleMap = () => showMap((visible) => !visible);\n\n useEffect(() => {\n if (selected === selectedRef.current) return;\n selectedRef.current = selected;\n showMap(selected);\n }, [selected]);\n\n // when doing in store returns, fall back to the shop name\n const shopName = get(window, \"nvo_config.shop_name\", \"\");\n const displayName = name ? name : shopName;\n return (\n \n \n \n
\n
\n \n
\n
\n
\n \n {displayName}\n \n \n {subtitle}\n \n
\n
\n {title}\n \n {`${[address.city, address.state]\n .filter((d) => d)\n .join(\", \")} ${address.zip ?? \"\"}`}\n \n
\n {!disableMap && (\n
\n \n \n \n
\n )}\n \n \n \n \n {config.translations.choose_method_substep_choose_location_button}\n \n \n \n
\n \n
\n \n
\n \n \n {\n config.translations\n .choose_method_substep_choose_location_button\n }\n \n \n \n
\n \n \n );\n}\n\nexport default LocationCard;\n","import React, { useState } from \"react\";\nimport Button from \"@material-ui/core/Button\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Link from \"@material-ui/core/Link\";\nimport OutlinedInput from \"@material-ui/core/OutlinedInput\";\nimport clsx from \"clsx\";\nimport isObject from \"lodash/isObject\";\n\nimport { Autocomplete } from \"../../../shared/components/form\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { config } from \"../../config\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n container: {\n paddingBottom: theme.spacing(2),\n },\n input: {\n padding: theme.spacing(1),\n backgroundColor: theme.palette.common.white,\n },\n subtitle: {\n height: theme.spacing(3),\n },\n formElement: {\n textAlign: \"center\",\n },\n formTextContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n countryRoot: {\n [theme.breakpoints.up(\"sm\")]: {\n minWidth: 200,\n },\n },\n countryInputEndAdornment: {\n marginTop: -10,\n marginRight: -12,\n },\n countryInput: {\n \"&:first-child\": {\n padding: 0,\n },\n },\n countryInputRoot: {\n backgroundColor: theme.palette.common.white,\n '&[class*=\"MuiOutlinedInput-root\"]': {\n padding: theme.spacing(1),\n paddingRight: theme.spacing(5),\n },\n },\n }),\n { name: \"N0ZipForm\" },\n);\n\nconst ZipForm = ({\n error,\n initialCountryCode,\n initialZip,\n isOpen,\n onSearch,\n toggleForm,\n}) => {\n const classes = useStyles();\n\n const [zipcode, updateZipcode] = useState(initialZip);\n const [countryCode, updateCountryCode] = useState(initialCountryCode);\n const countryName = config.countryNamesByCode[countryCode];\n\n const handleSubmit = (event) => {\n event.preventDefault();\n onSearch({ zipcode, countryCode });\n };\n\n if (isOpen || error) {\n return (\n \n \n
\n \n {\n config.translations\n .choose_method_substep_in_store_form_find_stores_near\n }\n \n
\n
\n \n {\n if (isObject(countryCode)) return countryCode.country;\n return countryCode;\n }}\n onChange={(country) =>\n console.debug(country) || updateCountryCode(country.country_code)\n }\n options={config.countryCodes}\n placeholder={config.translations.mailing_address_form_country}\n value={countryName}\n />\n \n \n updateZipcode(value)}\n placeholder={config.translations.zip_code}\n value={zipcode}\n />\n \n \n \n {config.translations.search}\n \n \n {error ? (\n \n {error}\n \n ) : (\n \n \n {config.translations.cancel}\n \n \n )}\n \n );\n }\n\n return (\n \n \n \n {`${config.translations.choose_method_substep_in_store_locations_near} `}\n {`${zipcode}, ${countryName}`}\n \n \n \n );\n};\n\nexport default ZipForm;\n","import React, { useState, useEffect, useMemo } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\nimport { useTheme } from \"@material-ui/core/styles\";\nimport clsx from \"clsx\";\n\nimport LocationCard from \"./LocationCard\";\nimport Map from \"../../../shared/components/MaptilerMap\";\nimport ZipForm from \"./ZipForm\";\n\nimport Spinner from \"../../../shared/components/Spinner\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport {\n useReturnStepsActions,\n useReturnStepsState,\n CONFIRM_MAILING_ADDRESS_STEP,\n} from \"../../contexts/returnSteps\";\nimport { config } from \"../../config\";\nimport { useReturnLocations } from \"../../data/returnLocations\";\nimport compact from \"lodash/compact\";\nimport Link from \"@material-ui/core/Link\";\nimport locale from \"../../../shared/modules/lang\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n skipContainer: {\n marginTop: theme.spacing(2),\n height: theme.spacing(3),\n textAlign: \"center\",\n },\n skipLink: {},\n title: {\n marginBottom: theme.spacing(2),\n },\n mapDescription: {\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n },\n mapDescriptionContent: {\n width: \"100%\",\n textAlign: \"center\",\n },\n mapDescriptionTitle: {\n marginBottom: theme.spacing(1),\n },\n mapContainer: {\n border: \"1px solid #ccc\",\n background: theme.palette.common.white,\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n minHeight: theme.spacing(37),\n justifyContent: \"space-between\",\n [theme.breakpoints.ie11()]: { height: theme.spacing(40) },\n [theme.breakpoints.edge()]: { height: theme.spacing(40) },\n },\n mapContainerElement: {\n // maxHeight: 300,\n },\n }),\n { name: \"N0ChooseLocation\" },\n);\n\nfunction ChooseLocation({\n countryCode,\n zipcode,\n carrier,\n allowProceedWithoutLocation,\n qr,\n}) {\n const classes = useStyles();\n const { locationId } = useReturnStepsState();\n const actions = useReturnStepsActions();\n const {\n state: { data: locations, error, loading },\n actions: { getLocations },\n } = useReturnLocations();\n const [zipFormOpen, toggleZipForm] = useState(false);\n const theme = useTheme();\n const isMdUp = useMediaQuery(theme.breakpoints.up(\"md\"));\n\n const [localLocationId, setLocalLocation] = useState(locationId);\n const selectedLocation = useMemo(() => {\n const location =\n localLocationId && locations.find((l) => l.id === localLocationId);\n return location || locations[0];\n }, [localLocationId, locations]);\n\n const pageSize = 5;\n const [currentPage, setCurrentPage] = useState(0);\n const filteredLocations = useMemo(\n () =>\n locations.slice(\n currentPage * pageSize,\n currentPage * pageSize + pageSize,\n ),\n [locations, currentPage, pageSize],\n );\n\n const handleStoreSearch = (args) => {\n getLocations({ ...args, carrier: carrier, qr: qr, locale });\n toggleZipForm(false);\n };\n\n const handleToggleForm = () => toggleZipForm((current) => !current);\n\n const createClickLocationHandler = (location) => () => {\n setLocalLocation(location.id);\n };\n\n const createSelectLocationHandler = (location) => () => {\n setLocalLocation(location.id);\n actions.setStoreLocation({ ...location, carrier });\n actions.goToStep(CONFIRM_MAILING_ADDRESS_STEP);\n };\n\n const handleOnMount = () =>\n getLocations({ countryCode, zipcode, carrier, qr: qr });\n\n useEffect(handleOnMount, [carrier]);\n\n const handleSkip = () => {\n actions.goToStep(CONFIRM_MAILING_ADDRESS_STEP);\n };\n\n return (\n \n \n \n {carrier == \"in_store\"\n ? config.translations.choose_method_substep_in_store_title\n : config.translations.choose_method_substep_concierge_title}\n \n \n {error}\n \n )\n }\n loading={loading}\n onSearch={handleStoreSearch}\n toggleForm={handleToggleForm}\n />\n {filteredLocations.length > 0 ? (\n \n \n {filteredLocations.map((location) => (\n \n ))}\n \n {isMdUp && (\n \n
\n \n
\n \n {selectedLocation.storeName}\n \n \n {compact([\n selectedLocation.storeAddress.address1,\n selectedLocation.storeAddress.address2,\n ]).join(\", \")}\n \n \n {selectedLocation.storeAddress.city},{\" \"}\n {selectedLocation.storeAddress.state}{\" \"}\n {selectedLocation.storeAddress.zip}\n \n \n {selectedLocation.storeAddress.phone}\n \n
\n
\n
\n )}\n
\n ) : (\n loading && \n )}\n\n {allowProceedWithoutLocation && (\n
\n \n {config.translations.choose_method_substep_concierge_skip}\n \n
\n )}\n
\n
\n );\n}\n\nexport default ChooseLocation;\n","import React from \"react\";\nimport get from \"lodash/get\";\n\nimport {\n CHOOSE_METHOD_SUBSTEP,\n useRegisterStepStatus,\n useReturnStepsActions,\n useReturnStepsState,\n} from \"../../contexts/returnSteps\";\n\nimport {\n METHOD_IN_STORE,\n METHOD_KEEP_THE_ITEM,\n} from \"../../../retailer-app/constants/returns\";\n\nimport ChooseLocation from \"./ChooseLocation\";\nimport { config } from \"../../config\";\nimport {\n normalizeAddressKeys,\n mergeAddress,\n patchZipCode,\n} from \"../../modules/address\";\n\nfunction ChooseMethodSubstep({ orderFetchData }) {\n const state = useReturnStepsState();\n const actions = useReturnStepsActions();\n const { order } = orderFetchData;\n const returnMethodId = get(state, \"selectedReturnMethod.id\");\n const returnMethodService = get(state, \"selectedReturnMethod.carrierService\");\n const qr = get(state, \"selectedReturnMethod.qr\");\n // not all carriers support concierge. in store always displays locations\n const shouldDisplayLocations = get(\n state,\n \"selectedReturnMethod.shouldDisplayLocations\",\n );\n\n const initialAddress = patchZipCode(\n mergeAddress(\n normalizeAddressKeys(order, \"billing\"),\n normalizeAddressKeys(order, \"from\"),\n state.fromAddress,\n ),\n );\n const initialCountryCode = initialAddress.countryCode;\n const initialZip = initialAddress.zip;\n\n const useNewDesign = config.isNthUi;\n const isSkipStep =\n useNewDesign || // location selection is handled in choose method step\n returnMethodId === METHOD_KEEP_THE_ITEM ||\n !shouldDisplayLocations;\n\n useRegisterStepStatus(CHOOSE_METHOD_SUBSTEP, { skipped: isSkipStep });\n if (isSkipStep) return null;\n\n if (returnMethodId === METHOD_IN_STORE) {\n return (\n \n );\n }\n\n if (shouldDisplayLocations) {\n // UPS Mail Innovations uses USPS drop-off locations for fulfillment.\n const carrier =\n returnMethodId === \"ups\" && returnMethodService === \"UPS Mail Innovations\"\n ? \"usps_returns\"\n : returnMethodId;\n\n return (\n \n );\n }\n\n return null;\n}\n\nexport default ChooseMethodSubstep;\n","import React, { useState, useMemo, useCallback, useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { isEmpty, noop, pick, set } from \"lodash/fp\";\n\nimport { config } from \"../../config\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { assertAnyFieldBy, trimObject } from \"../../../shared/modules/object\";\nimport { controlGridSize } from \"../../../shared/modules/mui-utils\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n input: {\n backgroundColor: theme.palette.common.white,\n },\n submit: {\n marginTop: theme.spacing(1),\n },\n }),\n { name: \"ContactInformationForm\" },\n);\n\nfunction ContactInformationForm({\n size,\n contact: initialContact,\n onChange,\n onSubmit,\n}) {\n const classes = useStyles();\n const [draft, setDraft] = useState(initialContact || {});\n\n const validate = useCallback((contact) => {\n const data = trimObject(contact);\n const requiredFields = [\"email\", \"phone\"];\n if (assertAnyFieldBy(isEmpty, pick(requiredFields, data))) return false;\n return true;\n }, []);\n\n const isValid = useMemo(() => validate(draft), [draft]);\n\n useEffect(() => {\n onChange({ contact: draft, isValid });\n }, [draft]);\n\n const handleChange = useCallback((event) => {\n const key = event.target.name;\n const value = event.target.value;\n setDraft(set(key, value));\n }, []);\n\n const handleSubmit = useCallback(\n (event) => {\n event.preventDefault();\n if (isValid) {\n onSubmit({ contact: draft, isValid });\n }\n },\n [onSubmit, draft],\n );\n\n return (\n
\n \n \n \n \n \n \n \n \n
\n );\n}\n\nContactInformationForm.propTypes = {\n size: PropTypes.oneOf([\"large\", \"medium\", \"small\"]),\n contact: PropTypes.shape({\n phone: PropTypes.string,\n email: PropTypes.string,\n }),\n onChange: PropTypes.func,\n onSubmit: PropTypes.func,\n};\n\nContactInformationForm.defaultProps = {\n size: \"medium\",\n onChange: noop,\n onSubmit: noop,\n};\n\nexport default ContactInformationForm;\n","import React, { useMemo, useState, useCallback } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { useTheme } from \"@material-ui/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Link from \"@material-ui/core/Link\";\nimport Box from \"@material-ui/core/Box\";\nimport Button from \"@material-ui/core/Button\";\nimport TextField from \"@material-ui/core/TextField\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\n\nimport MailingAddressForm from \"./MailingAddressForm\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { config } from \"../../config\";\n\nimport {\n getStepIndex,\n useReturnStepsActions,\n useReturnStepsState,\n CONFIRM_MAILING_ADDRESS_STEP,\n CHOOSE_SHOP_NOW_STEP,\n} from \"../../contexts/returnSteps\";\nimport { getTranslation } from \"../../../shared/modules/config\";\nimport ContactInformationForm from \"./ContactInformationForm\";\nimport { useTypeForm } from \"../../contexts/typeForm\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(6),\n },\n title: {\n marginBottom: theme.spacing(3),\n },\n subtitle: {\n marginBottom: theme.spacing(1),\n },\n address: {},\n editButton: {\n cursor: \"pointer\",\n marginLeft: theme.spacing(1),\n color: theme.palette.primary.main,\n },\n input: {\n backgroundColor: theme.palette.common.white,\n },\n backButton: {\n marginTop: theme.spacing(1),\n },\n }),\n { name: \"N0MailingAddress\" },\n);\n\n// @TODO hook for retrieving billing address\n// const EXAMPLE_ADDRESS = {\n// firstName: \"John\",\n// lastName: \"Smith\",\n// address1: \"24 Market Building\",\n// address2: \"The Piazza\",\n// city: \"London\",\n// province: \"\",\n// countryCode: \"GB\",\n// zip: \"WC2E 8RD\",\n// };\n\nfunction MailingAddress({ type, address, contact, notes }) {\n const theme = useTheme();\n const isMdUp = useMediaQuery(theme.breakpoints.up(\"md\"));\n const classes = useStyles();\n const actions = useReturnStepsActions();\n const state = useReturnStepsState();\n const typeForm = useTypeForm();\n\n const isHomePickup = type === \"homePickup\";\n const isGuestReturn = type === \"guestReturn\";\n const requireContactInfo = isHomePickup;\n\n const [isFormOpen, toggleForm] = useState(isGuestReturn);\n const [isAddressValid, setIsAddressValid] = useState(!isGuestReturn);\n const [isContactValid, setIsContactValid] = useState(!isHomePickup);\n const isValid = isAddressValid && isContactValid;\n const useNewDesign = config.isNthUi;\n const showNextBtn =\n state.currentStepIndex === getStepIndex(CONFIRM_MAILING_ADDRESS_STEP);\n const showBackBtn = showNextBtn && useNewDesign;\n const showNav = showNextBtn || showBackBtn;\n\n const {\n firstName,\n lastName,\n address1,\n address2,\n city,\n province,\n zip,\n countryCode,\n } = address; // saved address in context state\n\n const showTwoColumns = requireContactInfo && !isFormOpen && isMdUp && false; // TODO: re-enable two columns layout when we have better address and contact info form\n const title = isHomePickup\n ? getTranslation(\"home_pickup_mailing_address_title\")\n : state.items.some((i) => i.exchange)\n ? getTranslation(\"gift_exchange_mailing_address_title\")\n : getTranslation(\"gift_exchange_mailing_address_title_returns\");\n\n const excludeFields = useMemo(() => [\"phone\", \"submit\"], undefined);\n\n const contactSubtitle =\n config.translations.home_pickup_contact_information_subtitle;\n const addressSubtitle = isHomePickup\n ? config.translations.home_pickup_mailing_address_subtitle\n : config.translations.gift_exchange_mailing_address_your_address;\n const editAddressButtonLabel =\n config.translations.gift_exchange_mailing_address_change;\n const notesLabel =\n config.translations.home_pickup_contact_information_form_notes;\n const submitButtonLabel = getTranslation(\n \"gift_exchange_mailing_address_next_button_label\",\n );\n const backButtonLabel = getTranslation(\"back\");\n\n const handleAddressFormToggle = useCallback(() => {\n toggleForm(true);\n actions.goToStep(CONFIRM_MAILING_ADDRESS_STEP);\n }, []);\n\n const handleAddressChange = useCallback(\n ({ fromAddress, isValid }) => {\n setIsAddressValid(isValid);\n actions.setConfirmedMailingAddress({ ...address, ...fromAddress });\n },\n [address],\n );\n\n const handleContactChange = useCallback(\n ({ contact, isValid }) => {\n const { phone, ...others } = contact;\n setIsContactValid(isValid);\n actions.setConfirmedMailingAddress({\n ...address,\n phone,\n });\n },\n [address, contact],\n );\n\n const handleNotesChange = useCallback(\n (event) => {\n const key = event.target.name;\n const value = event.target.value;\n actions.setConfirmedMailingAddress({\n ...address,\n homePickupInstructions: value,\n });\n },\n [address],\n );\n\n const handleNext = useCallback(() => {\n toggleForm(false);\n actions.goToStep(CHOOSE_SHOP_NOW_STEP);\n }, []);\n\n const handleBack = useCallback(() => {\n toggleForm(false);\n actions.goBack();\n typeForm.scrollToActive();\n }, []);\n\n return (\n \n \n \n \n {requireContactInfo && (\n \n \n {contactSubtitle}\n \n \n \n \n {\n config.translations\n .home_pickup_contact_information_form_pii_helper_text\n }\n \n \n )}\n \n \n {addressSubtitle}\n \n {isFormOpen ? (\n \n ) : (\n \n \n {firstName} {lastName}\n \n {address1}\n {address2 && {address2}}\n {city}\n {`${province || \"\"} ${zip}`}\n\n \n {editAddressButtonLabel}\n \n \n )}\n \n \n \n {showNav && (\n \n {showNextBtn && (\n \n {submitButtonLabel}\n \n )}\n {showBackBtn && (\n \n {backButtonLabel}\n \n )}\n \n )}\n \n );\n}\n\nMailingAddress.propTypes = {\n type: PropTypes.oneOf([\"guestReturn\", \"homePickup\"]).isRequired,\n address: PropTypes.object,\n contact: PropTypes.object,\n notes: PropTypes.string,\n};\n\nMailingAddress.defaultProps = {\n type: \"guestReturn\",\n};\n\nexport default MailingAddress;\n","import React, { useEffect, useMemo } from \"react\";\n\nimport {\n useReturnStepsState,\n useReturnStepsActions,\n CHOOSE_SHOP_NOW_STEP,\n getStepIndex,\n CONFIRM_MAILING_ADDRESS_STEP,\n useRegisterStepStatus,\n} from \"../../contexts/returnSteps\";\n\nimport MailingAddress from \"./MailingAddress\";\nimport { mergeAddress } from \"../../modules/address\";\nimport { METHOD_XPO } from \"../../../retailer-app/constants/returns\";\n\nfunction ConfirmMailingAddress({ orderFetchData }) {\n const state = useReturnStepsState();\n const actions = useReturnStepsActions();\n\n const isGuestReturn = state.guestReturn;\n const isHomePickup = state.selectedReturnMethod.id === METHOD_XPO;\n const isSkipStep = !isGuestReturn && !isHomePickup;\n const type = isHomePickup ? \"homePickup\" : isGuestReturn ? \"guestReturn\" : \"\"; // it is possible that it was both home pickup and guess return\n\n useEffect(() => {\n if (\n isSkipStep &&\n state.currentStepIndex < getStepIndex(CHOOSE_SHOP_NOW_STEP)\n ) {\n actions.goToStep(CHOOSE_SHOP_NOW_STEP);\n }\n }, [\n state.guestReturn,\n state.items,\n state.selectedReturnMethod,\n state.locationId,\n state.currentStepIndex,\n ]);\n\n const defaultAddress = useMemo(\n () =>\n isGuestReturn\n ? {\n countryCode: orderFetchData.order.fromCountryCode,\n province: orderFetchData.order.fromProvince,\n provinceCode: orderFetchData.order.fromProvinceCode,\n }\n : {\n firstName: orderFetchData.order.fromFirstName,\n lastName: orderFetchData.order.fromLastName,\n address1: orderFetchData.order.fromAddress1,\n address2: orderFetchData.order.fromAddress2,\n city: orderFetchData.order.fromCity,\n zip: orderFetchData.order.fromZip,\n province: orderFetchData.order.fromProvince,\n provinceCode: orderFetchData.order.fromProvinceCode,\n countryCode: orderFetchData.order.fromCountryCode,\n },\n [orderFetchData, isHomePickup],\n );\n\n const contact = useMemo(\n () => ({\n email: state.decodedGuestEmail,\n phone: state.fromAddress.phone,\n }),\n [state.decodedGuestEmail, state.fromAddress.phone],\n );\n\n useRegisterStepStatus(CONFIRM_MAILING_ADDRESS_STEP, { skipped: isSkipStep });\n if (isSkipStep) {\n return null;\n }\n\n return (\n \n );\n}\nexport default ConfirmMailingAddress;\n","import { useMemo } from \"react\";\nimport { useQuery, gql } from \"@apollo/client\";\nimport { getAddressError } from \"../../shared/modules/decodeError\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\n\nconst QUERY = gql`\n query calculateRefund(\n $carrierServiceName: String\n $draftReturnUuid: String\n $returnItems: [ReturnCalculationInput!]!\n $exchangeItems: [ExchangeItemInput!]!\n $shopifyOrderId: String!\n $presentmentCurrency: String!\n $shippingPrice: Float\n $shippingMethod: String\n $orderNumber: String!\n $email: String!\n $locale: String\n $chosenRefundMethod: String\n $fromAddress: FromAddressInput\n $csid: String\n $source: String\n ) {\n calculateRefund(\n carrierServiceName: $carrierServiceName\n draftReturnUuid: $draftReturnUuid\n returnItems: $returnItems\n exchangeItems: $exchangeItems\n shopifyOrderId: $shopifyOrderId\n presentmentCurrency: $presentmentCurrency\n shippingPrice: $shippingPrice\n shippingMethod: $shippingMethod\n orderNumber: $orderNumber\n email: $email\n locale: $locale\n chosenRefundMethod: $chosenRefundMethod\n fromAddress: $fromAddress\n csid: $csid\n source: $source\n ) {\n currency\n subtotalRefund\n subtotalRefundCents\n totalRefund\n totalRefundCents\n totalTax\n totalTaxDisplayAmt\n taxesIncluded\n priorRefundsDisplayAmt\n refundLineItems {\n discountedPrice\n lineItemId\n locationId\n price\n quantity\n restockType\n subtotal\n totalCartDiscountAmount\n totalTax\n }\n originalShippingRefundedDisplayAmt\n refundMethodsAvailable {\n refundMethod\n refundMethodDescription\n refundCents\n refundFormatted\n }\n chosenRefundMethod\n paymentClientSecret\n customerPmtId\n preChargeFeeAmountCents\n returnMethodDisplayPrice\n exchangeShippingFeeDisplayPrice\n exchangeShippingFeeDisplayName\n feeBreakdown {\n description\n feeType\n formattedFee\n }\n shopNowAvailable\n\n originalPaymentTotalRefund\n originalPaymentTotalRefundCents\n shopNowTotalRefund\n shopNowTotalRefundCents\n giftCardTotalRefund\n giftCardTotalRefundCents\n }\n }\n`;\n\nexport function useCalculateRefund(variables, options = {}) {\n const saved = useQuery(QUERY, {\n variables,\n skip: options.skip,\n });\n const addressError = getAddressError(saved.error);\n\n const queryStatus = {\n loading: saved.loading,\n error: saved.error,\n addressError,\n };\n\n const refund = useMemo(\n () => saved?.data?.calculateRefund ?? {},\n [saved.data],\n );\n\n return memoObjectByKeyValues({\n queryStatus,\n refund,\n refetch: saved.refetch,\n });\n}\n","import { useMemo, useCallback, useState } from \"react\";\nimport { useMutation, gql } from \"@apollo/client\";\nimport get from \"lodash/get\";\nimport {\n calculateChecksum,\n directUpload,\n getFileMetadata,\n} from \"../../shared/modules/fileUpload\";\nimport { useRequestStatus } from \"../../shared/modules/hooks\";\nimport { useMergeRequestStatus } from \"../../shared/modules/object\";\n\nconst CREATE_DIRECT_UPLOAD = gql`\n mutation createDirectUpload($input: CreateDirectUploadInput!) {\n createDirectUpload(input: $input) {\n url\n headers\n blobId\n signedBlobId\n }\n }\n`;\nexport function useUploadPictures(variables) {\n const [mutate, mutated] = useMutation(CREATE_DIRECT_UPLOAD);\n const data = useMemo(\n () => get(mutated, \"data.createDirectUpload\"),\n [mutated],\n );\n const statusMutated = useRequestStatus(mutated);\n const [statusRequest, setDirectUploadStatus] = useState({\n called: false,\n error: false,\n loading: false,\n });\n const status = useMergeRequestStatus(statusRequest, statusMutated);\n\n const createDirectUpload = useCallback(\n (input) => mutate({ variables: { input } }),\n [mutate],\n );\n\n const direct = useCallback(async (data, file) => {\n try {\n setDirectUploadStatus((c) => ({ ...c, called: true, loading: true }));\n\n await directUpload(\n data.createDirectUpload.url,\n { ...JSON.parse(data.createDirectUpload.headers) },\n file,\n );\n\n setDirectUploadStatus((c) => ({ ...c, error: false, loading: false }));\n } catch (err) {\n setDirectUploadStatus((c) => ({ ...c, error: true }));\n throw err; // throw the error so that we can stop the following mutation sequence\n }\n }, []);\n\n const uploadImage = useCallback(\n async (file) => {\n const checksum = await calculateChecksum(file);\n const metadata = await getFileMetadata(file);\n\n const { data } = await createDirectUpload({\n filename: file.name,\n byteSize: metadata.byte_size,\n checksum,\n contentType: metadata.content_type,\n });\n\n await direct(data, file);\n\n return data?.createDirectUpload;\n },\n [createDirectUpload, direct],\n );\n\n return useMemo(\n () => ({\n data,\n status,\n uploadImage,\n }),\n [data, status, uploadImage],\n );\n}\n","import { useState, useMemo, useCallback } from \"react\";\nimport { useMutation, gql } from \"@apollo/client\";\nimport get from \"lodash/get\";\n\nimport { config } from \"../config\";\nimport { useUploadPictures } from \"./uploadPictures\";\nimport { getHandledErrorMessage } from \"../../shared/modules/decodeError\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\n\nconst SUBMIT_RETURN = gql`\n mutation submitReturn(\n $fromAddress: FromAddressInput\n $orderNumber: String!\n $draftReturnUuid: String\n $email: String!\n $returnItems: [ReturnCalculationInput!]!\n $exchangeItems: [ExchangeItemInput!]!\n $shopifyOrderId: String!\n $presentmentCurrency: String!\n $shippingPrice: Float\n $shippingMethod: String!\n $carrierServiceName: String\n $locationId: String\n $location: DropoffLocationInput\n $locale: String\n $selectedRefundMethod: String\n $paymentMethodId: String\n $customerPmtId: String\n $shopNow: Boolean\n $csid: String\n $homePickupInstructions: String\n $preApprovalReturnUuid: String\n $preApprovalId: String\n $requestedLabelCount: Int\n $reshopOptions: ReshopOptionsInput\n ) {\n submitReturn(\n locale: $locale\n returnItems: $returnItems\n draftReturnUuid: $draftReturnUuid\n exchangeItems: $exchangeItems\n shopifyOrderId: $shopifyOrderId\n presentmentCurrency: $presentmentCurrency\n shippingPrice: $shippingPrice\n orderNumber: $orderNumber\n email: $email\n shippingMethod: $shippingMethod\n carrierServiceName: $carrierServiceName\n locationId: $locationId\n location: $location\n selectedRefundMethod: $selectedRefundMethod\n paymentMethodId: $paymentMethodId\n customerPmtId: $customerPmtId\n fromAddress: $fromAddress\n shopNow: $shopNow\n csid: $csid\n homePickupInstructions: $homePickupInstructions\n preApprovalReturnUuid: $preApprovalReturnUuid\n preApprovalId: $preApprovalId\n requestedLabelCount: $requestedLabelCount\n reshopOptions: $reshopOptions\n )\n }\n`;\n\nexport const useSubmitReturn = () => {\n const directUpload = useUploadPictures();\n\n const [mutate, mutated] = useMutation(SUBMIT_RETURN);\n const [picturesUploading, setPicturesUploading] = useState(false);\n\n const getBlobIdForPic = async (file) => {\n const res = await directUpload.uploadImage(file);\n return res.signedBlobId;\n };\n\n const submitReturn = useCallback(\n async (variables) => {\n try {\n setPicturesUploading(true);\n variables.returnItems = await Promise.all(\n variables.returnItems.map(async (ri) => {\n return {\n ...ri,\n pictures:\n ri.pictures && get(ri, \"pictures.length\")\n ? await Promise.all(\n ri.pictures.map(\n async (pic) => await getBlobIdForPic(pic),\n ),\n )\n : undefined,\n };\n }),\n );\n\n variables.exchangeItems = await Promise.all(\n variables.exchangeItems.map(async (ri) => {\n return {\n ...ri,\n returnItem: {\n ...ri.returnItem,\n pictures:\n ri.returnItem.pictures &&\n get(ri, \"returnItem.pictures.length\")\n ? await Promise.all(\n ri.returnItem.pictures.map(\n async (pic) => await getBlobIdForPic(pic),\n ),\n )\n : undefined,\n },\n };\n }),\n );\n\n setPicturesUploading(false);\n return mutate({ variables });\n } catch (err) {\n setPicturesUploading(false);\n }\n },\n [mutate],\n );\n\n const submitStatus = useMemo(() => {\n let errorMessage = getHandledErrorMessage(\n mutated.error,\n config.translations.return_review_submit_error,\n );\n if (directUpload.status.error) {\n errorMessage = config.translations.return_review_submit_error;\n }\n\n const loading = mutated.loading || picturesUploading;\n\n return {\n loading,\n error: loading ? null : errorMessage,\n data: get(mutated, \"data.submitReturn\", null),\n errorDetail: loading ? null : mutated.error,\n };\n }, [\n mutated.loading,\n mutated.data,\n mutated.error,\n picturesUploading,\n directUpload.status,\n ]);\n\n return memoObjectByKeyValues({\n submitReturn,\n submitStatus,\n submitStatusReset: mutated.reset,\n });\n};\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { makeRootStyles } from \"../theme/styles\";\nimport Typography from \"@material-ui/core/Typography\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n strikethrough: {\n position: \"relative\",\n\n \"&::before\": {\n position: \"absolute\",\n content: '\"\"',\n left: 0,\n top: \"45%\",\n right: 0,\n borderTop: \"2px solid\",\n borderColor: \"inherit\",\n \"-webkit-transform\": \"skewY(-10deg)\",\n \"-moz-transform\": \"skewY(-10deg)\",\n transform: \"skewY(-10deg)\",\n },\n },\n }),\n { name: \"N0Strikethrough\" },\n);\n\nfunction Strikethrough({ component, children, ...props }) {\n const classes = useStyles();\n const Component = component;\n\n return (\n \n {children}\n \n );\n}\n\nStrikethrough.propTypes = {\n children: PropTypes.node,\n component: PropTypes.elementType,\n};\n\nStrikethrough.defaultProps = {\n color: \"default\",\n component: Typography,\n};\n\nexport default Strikethrough;\n","import React from \"react\";\n\nfunction ConfirmationCheckIcon({ color, className }) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default ConfirmationCheckIcon;\n","import React from \"react\";\nimport Fade from \"@material-ui/core/Fade\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Link from \"@material-ui/core/Link\";\nimport clsx from \"clsx\";\nimport ConfirmationCheckIcon from \"./ConfirmationCheckIcon\";\nimport { useTheme } from \"@material-ui/styles\";\nimport { redirectToShop, openLabel } from \"../../../shared/modules/frame\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport StyledMarkup from \"../../ReviewSummary/components/StyledMarkup\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(12),\n display: \"flex\",\n alignItems: \"center\",\n },\n checkIcon: {\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n fontSize: \"5rem\",\n },\n gutterBottom: {\n marginBottom: theme.spacing(4),\n [theme.breakpoints.up(\"md\")]: {\n marginBottom: theme.spacing(2),\n },\n },\n labelButton: {\n marginBottom: theme.spacing(2),\n },\n }),\n { name: \"N0ConfirmationBasic\" },\n);\n\nfunction ConfirmationBasic({\n renderInAppLabel,\n show,\n submitResult,\n supplementaryText,\n printLabelText,\n renderSupplementaryText,\n title,\n subtitle,\n buttonTitle,\n}) {\n const theme = useTheme();\n const classes = useStyles();\n\n return (\n \n
\n \n \n
\n \n
\n \n {title}\n \n \n \n \n {renderSupplementaryText && (\n \n {supplementaryText}\n \n )}\n
\n {renderInAppLabel && (\n \n openLabel(submitResult)}\n target=\"_blank\"\n underline=\"none\">\n \n {printLabelText}\n \n \n \n \n {buttonTitle}\n \n \n \n )}\n {!renderInAppLabel && (\n \n \n {buttonTitle}\n \n \n )}\n
\n
\n
\n );\n}\n\nexport default ConfirmationBasic;\n","import { makeRootStyles } from \"../../../theme/styles\";\n\nconst useStyles = makeRootStyles(\n {\n orderedList: {\n paddingInlineStart: \"4rem\",\n margin: 0,\n display: \"flex\",\n gap: \"2rem\",\n flexDirection: \"column\",\n },\n orderedListItem: {\n counterIncrement: \"list-item\",\n display: \"flex\",\n \"&::before\": {\n content: \"counter(list-item)\",\n lineHeight: 1,\n minWidth: \"2.5rem\",\n width: \"2.5rem\",\n height: \"2.5rem\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n margin: \"0 1.5rem 0 -4rem\",\n padding: \"0.625rem\",\n borderRadius: \"1.625rem\",\n boxSizing: \"border-box\",\n textAlign: \"center\",\n fontWeight: \"bold\",\n border: \"0.1875rem solid\",\n },\n \"&::marker\": {\n content: \"''\",\n },\n },\n stepSpan: {\n display: \"block\",\n margin: \"0.5rem 0 0\",\n },\n linkContainer: {\n marginTop: \"1rem\",\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \"16px\",\n },\n },\n { name: \"StepList\" },\n);\n\nexport { useStyles };\n","import React, { FC } from \"react\";\nimport { useStyles } from \"./StepListStyles\";\n\nconst StepList: FC = (props) => {\n const { children } = props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n return
    {children}
;\n};\n\nexport default StepList;\n","import { makeRootStyles } from \"../../../theme/styles\";\n\nconst useStyles = makeRootStyles(\n {\n imageWrapper: {\n \"& > img\": {\n display: \"block\",\n border: 0,\n margin: 0,\n padding: 0,\n lineHeight: 0,\n },\n },\n },\n { name: \"N0Icon\" },\n);\n\nexport { useStyles };\n","import React, { FC, HTMLProps } from \"react\";\nimport { useStyles } from \"./IconStyles\";\n\nconst GooglePlay: FC> = ({ alt, ...props }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n return (\n \n \n \n );\n};\n\nexport default GooglePlay;\n","import React, { FC, HTMLProps } from \"react\";\nimport { useStyles } from \"./IconStyles\";\n\nconst AppStore: FC> = ({ ...props }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n return (\n \n \n \n );\n};\n\nexport default AppStore;\n","import { useTheme, withThemeProvider } from \"@narvar/nth-hook-theme\";\nimport React, { FC } from \"react\";\nimport { useStyles } from \"./StepListStyles\";\nimport { StepProps } from \"./types\";\nimport { TextLink, StyledMarkup } from \"..\";\nimport GooglePlay from \"../Icon/GooglePlay\";\nimport AppStore from \"../Icon/AppStore\";\n\nconst Step: FC = ({ title, details, children, links = [] }) => {\n const {\n bodytextDefaultNone,\n iconsPrimaryNone,\n linksNoneDefault,\n linksNoneHover,\n } = useTheme();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n return (\n \n \n \n \n \n {details && {details}}\n {links.length > 0 && (\n
\n {links.map((link, i) => {\n let content = link.text;\n if (link.image) {\n const alt =\n typeof link.text === \"string\" ? link.text : undefined;\n if (link.image === \"app_store\")\n content = ;\n else if (link.image === \"google_play\") {\n content = ;\n } else {\n content = {alt};\n }\n }\n return (\n \n {content}\n \n );\n })}\n
\n )}\n {children}\n \n \n );\n};\n\nexport default withThemeProvider(Step, {\n themeTokens: [\n \"bodytextDefaultNone\",\n \"iconsPrimaryNone\",\n \"linksNoneDefault\",\n \"linksNoneHover\",\n \"buttonsPrimaryDefault\",\n \"buttonsPrimaryHover\",\n ],\n});\n","import React, { FC } from \"react\";\nimport StepList from \"../ReviewSummary/components/InstructionsList/StepList\";\nimport { StepsProps } from \"./types\";\nimport Step from \"../ReviewSummary/components/InstructionsList/Step\";\n\nconst Steps: FC = ({ steps }) => {\n return (\n \n {steps.map((step, i) => (\n \n ))}\n \n );\n};\n\nexport default Steps;\n","import { RetailerThemeStyles } from \"@narvar/nth-hook-theme\";\n\nexport const themeTokens: (keyof RetailerThemeStyles)[] = [\n \"linksNoneDefault\",\n \"linksNoneHover\",\n \"buttonsPrimaryDefault\",\n \"buttonsPrimaryHover\",\n \"bodytextDefaultNone\",\n];\n","import { makeRootStyles } from \"../theme/styles\";\n\nconst useStyles = makeRootStyles(\n {\n confirmationHeader: {\n textAlign: \"left\",\n },\n btnContainer: {\n margin: \"1.5rem 0\",\n },\n imgContainer: {\n width: \"50%\",\n maxWidth: \"200px\",\n },\n alternateEmailForm: {\n maxWidth: \"400px\",\n margin: \"15px 0\",\n display: \"flex\",\n gap: \"20px\",\n },\n },\n { name: \"Confirmation\" },\n);\n\nexport { useStyles };\n","import { makeRootStyles } from \"../../../theme/styles\";\n\nconst useStyles = makeRootStyles(\n {\n preferencesStatusWrapper: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n marginBottom: \"2rem\",\n gap: \"4px\",\n },\n preferencesStatusDescription: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n },\n preferencesStatusLink: {\n fontWeight: 700,\n textDecoration: \"none\",\n },\n },\n { name: \"PreferencesStatus\" },\n);\n\nexport { useStyles };\n","import React, { FC } from \"react\";\nimport { PreferencesStatus as PreferencesStatusRenderProps } from \"./types\";\nimport { useTheme, withThemeProvider } from \"@narvar/nth-hook-theme\";\nimport { useStyles } from \"./PreferencesStatusStyles\";\nimport Icon from \"../Icon\";\nimport { Language, TextLink, Spinner } from \"..\";\n\nconst PreferencesStatus: FC = ({\n status,\n profileStatus,\n profileLink,\n}) => {\n const {\n linksNoneDefault,\n linksNoneHover,\n documentbodyNoneNone,\n bodytextDefaultNone,\n } = useTheme();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n const emphasize = status !== \"idle\";\n const linkStyles = emphasize\n ? { fontWeight: 700, textDecorationLine: \"none\" }\n : {};\n const iconStyles =\n status === \"error\"\n ? {}\n : {\n fill:\n bodytextDefaultNone?.color ?? documentbodyNoneNone?.color ?? \"#000\",\n };\n\n return (\n \n {status === \"loading\" ? (\n \n ) : (\n <>\n \n \n \n \n\n {profileLink && (\n \n \n \n \n \n )}\n \n )}\n \n );\n};\n\nexport default withThemeProvider(PreferencesStatus, {\n themeTokens: [\n \"linksNoneDefault\",\n \"linksNoneHover\",\n \"documentbodyNoneNone\",\n \"bodytextDefaultNone\",\n ],\n});\n","export const EMAIL_ADDRESS_PATTERN =\n \"(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\\\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\\\])\";\n\ntype ValidatePatternProps = (\n inputValue: string,\n patternString: string,\n) => boolean;\n\nexport const validatePattern: ValidatePatternProps = (\n inputValue,\n patternString,\n) => {\n if (!patternString) return true;\n const validationPattern = new RegExp(patternString);\n return Boolean(inputValue.match(validationPattern));\n};\n","import React, { FC, useEffect, useState } from \"react\";\nimport { SemibigHeader } from \"@narvar/nth-bit-header\";\nimport Paragraph from \"@narvar/nth-bit-paragraph\";\nimport TextInput, { SupportedInputType } from \"@narvar/nth-block-text-input\";\nimport { useSettings, withSettingsProvider } from \"@narvar/nth-hook-settings\";\nimport { useTheme, withThemeProvider } from \"@narvar/nth-hook-theme\";\nimport Panel from \"@narvar/nth-block-panel\";\nimport PanelHeader from \"@narvar/nth-bit-panel-header\";\nimport Button from \"@narvar/nth-block-button\";\nimport Divider from \"@narvar/nth-bit-divider\";\nimport Steps from \"./Steps\";\nimport {\n ErrorBanner,\n Language,\n LocationCard,\n ItemCardSkeleton,\n LineItemSkeleton,\n ItemCard,\n Spinner,\n TextLink,\n} from \"../ReviewSummary/components\";\n\nimport { ConfirmationRawProps } from \"./types\";\nimport { themeTokens } from \"./tokens\";\nimport { useStyles } from \"./ConfirmationStyles\";\nimport PreferencesStatus from \"../ReviewSummary/components/Preferences/PreferencesStatus\";\nimport { EMAIL_ADDRESS_PATTERN, validatePattern } from \"../ReviewSummary/utils\";\nimport { useLanguage } from \"@narvar/nth-kit-returns-headless\";\nimport { generateTokensFromObject } from \"@narvar/nth-kit-returns-headless/dist/src/hooks/language/useLanguage\";\nimport { getItemAttrs } from \"../ReviewSummary/utils/itemSelectorHelper\";\n\nconst ConfirmationRawC: FC = ({\n error,\n loading,\n shipment,\n type,\n providerMoniker,\n email,\n location,\n alternateEmailToggle = false,\n noInstructions,\n onSubmit,\n newEmailStatus,\n preferencesStatus,\n isHipaaCompliant,\n returnSteps = [],\n locale,\n includeCurrency,\n}) => {\n const { itemDisplay } = useSettings();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n const [showAlternateEmailForm, setAlternateEmailForm] = useState(false);\n const [emailAddress, setUpdatedEmail] = useState(\"\");\n const [validationError, setValidationError] = useState(false);\n const { items, returnLabels } = shipment || {};\n const mappedUrls: { qrCodeUrl?: string; printLabelUrl?: string } =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n returnLabels?.reduce((acc: any, { labelType, labelUrl }: any) => {\n if (labelType === \"QR_CODE\") {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return {\n ...acc,\n qrCodeUrl: labelUrl,\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return {\n ...acc,\n printLabelUrl: labelUrl,\n };\n }, {}) || {};\n const { qrCodeUrl, printLabelUrl } = mappedUrls;\n\n const { value: provider } = useLanguage({\n langKey: `returnsMoniker${providerMoniker ?? \"\"}DisplayName`,\n asString: true,\n });\n const { rawValue: skuLabel } = useLanguage({\n langKey: \"returnsItemListItemInfoskuLabel\",\n });\n const { rawValue: qtyLabel } = useLanguage({\n langKey: \"returnsItemListItemInfoqtyLabel\",\n });\n const { rawValue: colorLabel } = useLanguage({\n langKey: \"returnsItemListItemInfocolorLabel\",\n });\n const { rawValue: sizeLabel } = useLanguage({\n langKey: \"returnsItemListItemInfosizeLabel\",\n });\n const { rawValue: reasonLabel } = useLanguage({\n langKey: \"returnsItemListItemInforeasonLabel\",\n });\n const { rawValue: placeholder } = useLanguage({\n langKey: \"returnsConfirmationActionsPanelEmailInputPlaceholder\",\n });\n\n const {\n linksNoneDefault,\n linksNoneHover,\n buttonsPrimaryDefault,\n buttonsPrimaryHover,\n bodytextDefaultNone,\n } = useTheme();\n\n useEffect(() => {\n if (newEmailStatus?.status === \"success\") {\n setAlternateEmailForm(false);\n setUpdatedEmail(\"\");\n }\n }, [newEmailStatus?.status]);\n\n if (loading) {\n return (\n
\n \n \n \n \n \n \n \n \n \n
\n );\n }\n\n if (error) {\n return (\n
\n \n \n \n
\n );\n }\n\n const toggleAlternateEmailForm = () => {\n setAlternateEmailForm(!showAlternateEmailForm);\n };\n\n const submitAlternateEmailForm = () => {\n const validEmail = validatePattern(\n emailAddress ?? \"\",\n EMAIL_ADDRESS_PATTERN,\n );\n if (validEmail) {\n setValidationError(false);\n onSubmit?.({\n event: \"submit\",\n area: \"returnConfirmation\",\n subComponent: \"emailSubmittedReturnDetails\",\n value: { emailAddress },\n });\n } else {\n setValidationError(true);\n }\n };\n\n const langKeySuffix = isHipaaCompliant ? \"Hipaa\" : \"\";\n\n return (\n
\n {preferencesStatus && }\n \n \n \n }>\n
\n \n \n \n {!qrCodeUrl && printLabelUrl && !isHipaaCompliant && (\n
\n \n \n \n
\n )}\n \n \n \n {alternateEmailToggle && !isHipaaCompliant && (\n
\n \n \n \n {showAlternateEmailForm && (\n <>\n
\n {\n setUpdatedEmail(e.target.value);\n }}\n placeholder={placeholder}\n type={SupportedInputType.email}\n />\n \n {newEmailStatus?.status === \"loading\" ? (\n \n ) : (\n \n )}\n \n
\n
\n {validationError && (\n \n )}\n \n
\n \n )}\n
\n )}\n {qrCodeUrl && !isHipaaCompliant && (\n
\n \"\"\n
\n )}\n
\n \n {location && (\n \n \n \n }>\n \n \n )}\n {!noInstructions && (\n \n \n \n }>\n
\n \n
\n \n )}\n \n \n \n }>\n {// eslint-disable-next-line @typescript-eslint/no-explicit-any\n items?.map((item: any) => (\n \n ))}\n \n {qrCodeUrl && printLabelUrl && (\n \n \n \n \n \n \n \n \n \n \n \n )}\n
\n );\n};\n\nexport const ConfirmationRaw = withSettingsProvider(\n withThemeProvider(ConfirmationRawC, {\n themeTokens,\n }),\n {\n settingsRequested: `\n itemDisplay {\n additionalItemAttributeConfig {\n attribute\n value {\n concatKey\n concatPosition\n label\n transform\n }\n }\n itemAttributeConfig\n }\n `,\n },\n);\n","import React, { FC, useMemo } from \"react\";\nimport { ConfirmationRaw } from \"./raw\";\nimport { ConfirmationProps } from \"./types\";\n\nimport { StepProps } from \"../ReviewSummary/components/InstructionsList/types\";\nimport useCurrencyConfig from \"../ReviewSummary/hooks/useCurrencyConfig\";\nimport {\n useLanguage,\n useReturnsConfig,\n} from \"@narvar/nth-kit-returns-headless\";\nimport { generateTokensFromObject } from \"@narvar/nth-kit-returns-headless/dist/src/hooks/language/useLanguage\";\n\nexport const Confirmation: FC = (props) => {\n const { isHipaaCompliant } = useReturnsConfig();\n const { locale, includeCurrency } = useCurrencyConfig();\n const langKeySuffix = isHipaaCompliant ? \"Hipaa\" : \"\";\n\n const {\n providerMoniker = \"\",\n refundMethod = \"\",\n location,\n type = \"\",\n } = props;\n\n const { value: provider } = useLanguage({\n langKey: `returnsMoniker${providerMoniker}DisplayName`,\n asString: true,\n });\n\n const replacementTokens = generateTokensFromObject({\n provider,\n location: location?.displayName,\n });\n const { value: Step1Title } = useLanguage({\n langKey: `returnsConfirmation${type}Step1Title`,\n asString: true,\n replacementTokens,\n });\n const { value: Step1Details } = useLanguage({\n langKey: `returnsConfirmation${type}Step1Details`,\n asString: true,\n replacementTokens,\n });\n const { value: Step2Title } = useLanguage({\n langKey: `returnsConfirmation${type}Step2Title${langKeySuffix}`,\n asString: true,\n replacementTokens,\n });\n const { value: Step2Details } = useLanguage({\n langKey: `returnsConfirmation${type}Step2Details`,\n asString: true,\n replacementTokens,\n });\n const { value: Step3Title } = useLanguage({\n langKey: `returnsConfirmation${type}Step3Title`,\n asString: true,\n replacementTokens,\n });\n const { value: Step3Details } = useLanguage({\n langKey: `returnsConfirmation${type}Step3Details`,\n asString: true,\n replacementTokens,\n });\n const { rawValue: providerLinkUrl } = useLanguage({\n langKey: `returnsMoniker${providerMoniker}LinkUrl`,\n asString: true,\n });\n const { value: providerLinkText } = useLanguage({\n langKey: `returnsMoniker${providerMoniker}LinkText`,\n asString: true,\n replacementTokens,\n });\n const refundStepTitle = useLanguage({\n langKey: `returnsConfirmation${refundMethod}StepTitle`,\n }).value;\n const refundStepDetails = useLanguage({\n langKey: `returnsConfirmation${refundMethod}StepDetails`,\n }).value;\n const refundStepAppStoreLink = useLanguage({\n langKey: `returnsConfirmation${refundMethod}StepAppStoreLink`,\n }).value;\n const refundStepAppStoreLinkText = useLanguage({\n langKey: `returnsConfirmation${refundMethod}StepAppStoreLinkText`,\n }).value;\n const refundStepGooglePlayLink = useLanguage({\n langKey: `returnsConfirmation${refundMethod}StepGooglePlayLink`,\n }).value;\n const refundStepGooglePlayLinkText = useLanguage({\n langKey: `returnsConfirmation${refundMethod}StepGooglePlayLinkText`,\n }).value;\n\n const steps: StepProps[] = useMemo(() => {\n const link =\n providerLinkText && providerLinkUrl\n ? { text: providerLinkText, url: providerLinkUrl }\n : undefined;\n const step2Link = type === \"printerless_mail\" && link ? [link] : [];\n const step3Link =\n (type === \"mail\" || type === \"concierge\") && link ? [link] : [];\n\n let ret: StepProps[] = [];\n if (refundMethod === \"reshop\") {\n ret = [\n ...ret,\n {\n title: refundStepTitle,\n details: refundStepDetails,\n links: [\n {\n text: refundStepAppStoreLinkText,\n url: refundStepAppStoreLink ?? \"\",\n image: \"app_store\",\n },\n {\n text: refundStepGooglePlayLinkText,\n url: refundStepGooglePlayLink ?? \"\",\n image: \"google_play\",\n },\n ],\n },\n ];\n }\n ret = [\n ...ret,\n { title: Step1Title, details: Step1Details },\n { title: Step2Title, details: Step2Details, links: step2Link },\n ];\n if (Step3Title) {\n ret = [\n ...ret,\n { title: Step3Title, details: Step3Details, links: step3Link },\n ];\n }\n return ret;\n }, [\n type,\n refundMethod,\n refundStepTitle,\n refundStepDetails,\n refundStepAppStoreLinkText,\n refundStepAppStoreLink,\n refundStepGooglePlayLinkText,\n refundStepGooglePlayLink,\n providerLinkText,\n providerLinkUrl,\n Step1Title,\n Step1Details,\n Step2Title,\n Step2Details,\n Step3Title,\n Step3Details,\n ]);\n\n return (\n \n );\n};\n\nexport { ConfirmationRaw };\n","import React, { useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport Fade from \"@material-ui/core/Fade\";\nimport Grid from \"@material-ui/core/Grid\";\n\nimport {\n BOXLESS_METHOD,\n METHOD_IN_STORE,\n METHOD_KEEP_THE_ITEM,\n METHOD_SHIP_ON_YOUR_OWN,\n METHOD_XPO,\n PRINTERLESS_METHOD,\n} from \"../../../retailer-app/constants/returns\";\nimport { BOXLESS_ONLY_CARRIERS } from \"../../../retailer-app/constants/carriers\";\nimport { useReturnStepsState } from \"../../contexts/returnSteps\";\nimport { makeRootStyles } from \"../../theme/styles\";\n\nimport { config } from \"../../config\";\nimport { useNthReturnsActions } from \"../../contexts/nthContext\";\nimport {\n toReturnMethodPreference,\n useConsumerPreferences,\n} from \"../../data/consumerPreferences\";\nimport titan from \"../../../shared/modules/titan\";\nimport useCustomer from \"../../hooks/useCustomer\";\nimport ConfirmationBasic from \"./ConfirmationBasic\";\nimport { interpolate } from \"../../../shared/modules/template\";\nimport { getTranslation } from \"../../../shared/modules/config\";\nimport useClaims from \"../../hooks/useClaims\";\nimport { Confirmation as ConfirmationPage } from \"../../Confirmation\";\n\nconst {\n translations: {\n return_confirmation_title_keep_item,\n return_confirmation_title,\n return_confirmation_subtitle_keep_item,\n return_confirmation_subtitle_keep_item_no_refund,\n return_confirmation_subtitle,\n return_confirmation_subtitle_label_retry_enqueued,\n },\n} = config;\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(12),\n display: \"flex\",\n alignItems: \"center\",\n },\n }),\n { name: \"N0Confirmation\" },\n);\n\nexport const getConfirmationType = (state) => {\n const method = state.selectedReturnMethod.id;\n const qr = state.selectedReturnMethod.qr;\n\n if (method === METHOD_IN_STORE) return \"store\";\n if (method === METHOD_SHIP_ON_YOUR_OWN) return \"ship_on_your_own\";\n if (method === METHOD_XPO) return \"home_pickup\";\n if (method === METHOD_KEEP_THE_ITEM) return \"keep_the_item\";\n if (\n qr === BOXLESS_METHOD ||\n (BOXLESS_ONLY_CARRIERS.includes(method) && qr === PRINTERLESS_METHOD)\n )\n return \"boxless\";\n if (qr === PRINTERLESS_METHOD) return \"printerless\";\n return \"mail\";\n};\n\nexport const getShipmentItemsForConfirmation = (\n selectedItems,\n submitResult,\n renderInAppLabel,\n) => {\n return {\n items: selectedItems.map((item) => ({\n ...item,\n reason: {},\n })),\n returnLabels: renderInAppLabel\n ? [\n {\n labelType: \"SHIPPING_LABEL\", // PACKING_SLIP, SHIPPING_LABEL, PACKING_SLIP_AND_SHIPPING_LABEL, QR_CODE\n mimeType: \"application/pdf\",\n labelUrl: submitResult,\n },\n ]\n : [],\n };\n};\n\nexport const shouldRenderInAppLabel = (config, state) => {\n return config.isInAppLabelEnabled && state.submitResult !== \"ok\";\n};\n\nfunction Confirmation({ orderFetchData }) {\n const [show, setShow] = useState(false);\n const classes = useStyles();\n const state = useReturnStepsState();\n const {\n selectedReturnMethod,\n refundTotal,\n submitReturnResultCode,\n savePreferences,\n } = state;\n const { email: displayEmail } = useCustomer();\n const { hasClaimItems: isClaim, insuranceProvider } = useClaims();\n\n useEffect(() => {\n setTimeout(() => setShow(true), 400);\n }, []);\n\n const title =\n selectedReturnMethod.id === METHOD_KEEP_THE_ITEM\n ? return_confirmation_title_keep_item\n : return_confirmation_title;\n\n const subtitle = (() => {\n if (submitReturnResultCode === \"label_retry_enqueued\") {\n return return_confirmation_subtitle_label_retry_enqueued.replace(\n \"%{email}\",\n displayEmail,\n );\n } else if (selectedReturnMethod.id === METHOD_KEEP_THE_ITEM) {\n if (refundTotal === 0) {\n return return_confirmation_subtitle_keep_item_no_refund.replace(\n \"%{email}\",\n displayEmail,\n );\n } else {\n return return_confirmation_subtitle_keep_item.replace(\n \"%{email}\",\n displayEmail,\n );\n }\n } else {\n return return_confirmation_subtitle.replace(\"%{email}\", displayEmail);\n }\n })();\n\n const supplementaryText =\n config.translations.return_confirmation_supplementary;\n const renderSupplementaryText =\n supplementaryText && supplementaryText != \"\" && supplementaryText != \" \";\n\n const returnMethod = get(state, \"selectedReturnMethod.id\");\n\n const renderInAppLabel = shouldRenderInAppLabel(config, state);\n const printLabelText = (() => {\n if (returnMethod == METHOD_SHIP_ON_YOUR_OWN) {\n return config.translations.return_confirmation_print_packing_slip;\n }\n return config.translations.return_confirmation_print_label;\n })();\n\n /***************************************************************************************************************\n * New design with `nth` components\n ***************************************************************************************************************/\n const useNewDesign = config.isNthUi;\n const nthReturnsActions = useNthReturnsActions();\n\n const { preferencesStatus, updateConsumerPreferences } =\n useConsumerPreferences(state.guestReturn ? \"\" : state.email);\n\n useEffect(() => {\n const type = toReturnMethodPreference(selectedReturnMethod);\n if (savePreferences && type) {\n const orderId = orderFetchData.order?.shopifyOrderId?.split(\"/\").pop();\n updateConsumerPreferences(orderId, displayEmail, {\n returnMethods: [type],\n carriers: [],\n locations: [],\n });\n }\n }, [savePreferences]);\n\n const preferencesSubmitted = preferencesStatus?.status === \"success\";\n useEffect(() => {\n if (preferencesSubmitted) {\n titan.track(\"promotion_clicked\", {\n props: { promotion_id: \"user_preferences\" },\n });\n }\n }, [preferencesSubmitted]);\n\n if (isClaim) {\n const t = (key) =>\n getTranslation(insuranceProvider ? key : `${key}_no_insurance`);\n const title = interpolate(t(\"claims_confirmation_title\"), {\n insurance_provider: insuranceProvider,\n });\n const subtitle = interpolate(t(\"claims_confirmation_subtitle\"), {\n email: displayEmail,\n });\n return (\n \n );\n }\n\n if (useNewDesign) {\n // nth type with default translation: store, mail, printerless_mail, concierge\n const type = getConfirmationType(state);\n console.debug(\"method\", state.selectedReturnMethod);\n console.debug(\"type\", type);\n return (\n \n
\n \n \n \n \n \n
\n
\n );\n }\n\n return (\n \n );\n}\n\nexport default Confirmation;\n","import React, { useEffect, useMemo, useCallback } from \"react\";\nimport clsx from \"clsx\";\nimport Box from \"@material-ui/core/Box\";\nimport Button from \"@material-ui/core/Button\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { isEmpty, minBy, omit, some, unset } from \"lodash/fp\";\n\nimport { config } from \"../../config\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { palette } from \"../../../shared/theme/create-theme\";\nimport locale from \"../../../shared/modules/lang\";\n\nimport {\n useReturnStepsActions,\n useReturnStepsState,\n getStepIndex,\n CHOOSE_RETURN_CREDIT_METHOD_STEP,\n CHOOSE_SHOP_NOW_STEP,\n useRegisterStepStatus,\n} from \"../../contexts/returnSteps\";\nimport { useCalculateRefund } from \"../../data/calculateRefund\";\nimport { buildItemsByType } from \"../../modules/items\";\nimport { interpolate } from \"../../../shared/modules/template\";\nimport Spinner from \"../../../shared/components/Spinner\";\nimport { useSubmitReturn } from \"../../data/submitReturn\";\nimport { isValidHttpUrl } from \"../../../shared/modules/string\";\nimport { redirectToCheckout } from \"../../../shared/modules/frame\";\nimport MailingAddressForm from \"../ConfirmMailingAddress/MailingAddressForm\";\nimport { mergeAddress } from \"../../modules/address\";\nimport { ignoreEmpty, omitDeep } from \"../../../shared/modules/object\";\nimport ErrorSnackbar from \"../../components/ErrorSnackbar\";\nimport Strikethrough from \"../../components/Strikethrough\";\nimport {\n getAddressError,\n getHandledErrorMessage,\n} from \"../../../shared/modules/decodeError\";\nimport { calculateReturnMetrics, useEmitMetrics } from \"../../data/emitMetric\";\nimport {\n convertFromDatadogMetrics,\n countingEvent,\n SUBMIT_RETURN_SUCCESS_EVENT,\n useAbTesting,\n} from \"../../data/abTesting\";\nimport {\n METHOD_KEEP_THE_ITEM,\n RETURN_CREDIT_METHOD_SHOPNOW,\n} from \"../../../retailer-app/constants/returns\";\nimport {\n getConfirmationType,\n getShipmentItemsForConfirmation,\n shouldRenderInAppLabel,\n} from \"../Confirmation/Confirmation\";\nimport { useNthReturnsActions } from \"../../contexts/nthContext\";\nimport { toReturnMethodPreference } from \"../../data/consumerPreferences\";\nimport useClaims from \"../../hooks/useClaims\";\nimport errorNotifier from \"../../../shared/modules/error-notifier\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n title: {},\n description: {},\n refundAmount: {},\n refundAmountOriginal: {},\n text: {\n marginBottom: theme.spacing(2.5),\n },\n incentiveText: {\n color: palette.red,\n },\n notes: {\n marginBottom: theme.spacing(4),\n color: \"#999999\",\n },\n incentiveContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: theme.spacing(1),\n },\n chooseButton: {},\n skipButton: {},\n }),\n { name: \"N0ChooseShopNow\" },\n);\n\nconst ChooseShopNow = ({ orderFetchData, draftReturnUuid }) => {\n const classes = useStyles();\n const state = useReturnStepsState();\n const actions = useReturnStepsActions();\n const { emitMetrics } = useEmitMetrics();\n const abTesting = useAbTesting();\n\n const submittingRedirect = state.shopNowSession?.redirectingToShop;\n\n const { order, returnReasonsById = {} } = orderFetchData;\n const { itemsById } = order;\n const { hasClaimItems } = useClaims();\n\n const { exchangeItems, returnItems } = useMemo(\n () => buildItemsByType(state.items, itemsById, returnReasonsById),\n [itemsById, returnReasonsById, state.items],\n );\n\n const nthReturnsActions = useNthReturnsActions();\n const selectedReturnMethod = state.selectedReturnMethod;\n const calculateParams = useMemo(\n () => ({\n carrierServiceName: selectedReturnMethod.carrierService,\n draftReturnUuid,\n exchangeItems: exchangeItems.map(unset(\"returnItem.pictures\")),\n returnItems: returnItems.map(unset(\"pictures\")),\n shopifyOrderId: order.shopifyOrderId,\n presentmentCurrency: order.presentmentCurrency,\n shippingPrice: selectedReturnMethod.price,\n shippingMethod: selectedReturnMethod.id,\n orderNumber: state.orderNumber,\n email: state.email,\n locale,\n fromAddress: ignoreEmpty(state.fromAddress),\n csid: state.csid,\n chosenRefundMethod:\n config.isShopNowEnabled && !hasClaimItems ? \"shop_now\" : null,\n }),\n [\n hasClaimItems,\n exchangeItems,\n returnItems,\n order,\n selectedReturnMethod,\n state.orderNumber,\n state.email,\n locale,\n state.fromAddress,\n state.csid,\n ],\n );\n const { refund, queryStatus } = useCalculateRefund(calculateParams);\n\n // calculate refund would run again in review, hide the spinner for that\n const loading = isEmpty(refund) && queryStatus.loading;\n const queryErrorMessage = getHandledErrorMessage(\n queryStatus.error,\n config.translations.general_loading_error,\n );\n\n // Compare the shop now exchange credit to other available refund method\n // which would refund the least. Show as incentive if shop now credit is\n // more.\n const nonShopNowMethods = refund?.refundMethodsAvailable?.filter(\n (v) => v.refundMethod !== RETURN_CREDIT_METHOD_SHOPNOW,\n );\n const renderInAppLabel = shouldRenderInAppLabel(config, state);\n\n const baselineMethod = minBy(\"refundCents\", nonShopNowMethods);\n const refundAmount = baselineMethod?.refundFormatted;\n const refundAmountCents = baselineMethod?.refundCents;\n const incentive = \"\";\n const shopNowRefundMethod = refund?.refundMethodsAvailable?.find(\n (v) => v.refundMethod === RETURN_CREDIT_METHOD_SHOPNOW,\n );\n const creditAmount = shopNowRefundMethod?.refundFormatted;\n const creditAmountCents = shopNowRefundMethod?.refundCents;\n const showIncentive =\n Math.abs(refundAmountCents + 10) < Math.abs(creditAmountCents);\n\n const allowRefundToOriginalPayment = (\n refund?.refundMethodsAvailable || []\n ).some((v) => v.refundMethod === \"original_payment\");\n const skipShopNow =\n !config.isShopNowEnabled ||\n hasClaimItems ||\n queryErrorMessage || // skip shop now step to avoid broken flow, because it might be disabled by the rule engine\n refund?.shopNowAvailable === false ||\n refund?.totalRefundCents <= 0 ||\n (refund?.refundMethodsAvailable && !shopNowRefundMethod);\n\n const handleRefund = useCallback(() => {\n actions.goToStep(CHOOSE_RETURN_CREDIT_METHOD_STEP);\n }, []);\n\n useEffect(() => {\n if (\n skipShopNow &&\n state.currentStepIndex < getStepIndex(CHOOSE_RETURN_CREDIT_METHOD_STEP)\n ) {\n handleRefund();\n }\n }, [skipShopNow]);\n\n // shopnow chosen refund method when there is remaining credit\n const selectedRefundMethod = allowRefundToOriginalPayment\n ? \"original_payment\"\n : \"gift_card\";\n\n const { submitReturn, submitStatus, submitStatusReset } = useSubmitReturn();\n const checkoutUrl = submitStatus.data;\n const hasRedirectUrl = isValidHttpUrl(checkoutUrl);\n const submitting = submitStatus.loading || hasRedirectUrl;\n const submitErrorMessage = submitStatus.error;\n\n useEffect(() => {\n if (submittingRedirect && selectedRefundMethod && !submitting) {\n console.debug(\"submit return for shop now\");\n\n let submitParams = omit([\"chosenRefundMethod\"], calculateParams);\n submitParams = {\n ...submitParams,\n draftReturnUuid,\n shopNow: true,\n location: omitDeep([\"__typename\"], state.location),\n locationId: state.locationId,\n fromAddress: isEmpty(state.fromAddress) ? undefined : state.fromAddress,\n selectedRefundMethod,\n exchangeItems,\n returnItems,\n homePickupInstructions: state.homePickupInstructions,\n requestedLabelCount: state.requestedLabelCount,\n };\n\n submitReturn(submitParams)\n .then((r) => {\n console.debug(\"submit return success\");\n const metrics = calculateReturnMetrics(\n order,\n \"shop_now\",\n state.items,\n state.lineItemIntension,\n false,\n );\n emitMetrics(metrics);\n if (config.isNthUi) {\n const abTestResult = convertFromDatadogMetrics(metrics);\n abTesting.trackResult(abTestResult);\n abTesting.trackResult(countingEvent(SUBMIT_RETURN_SUCCESS_EVENT));\n }\n })\n .catch((err) => {\n console.error(err);\n actions.setShopNowRedirect(false);\n });\n }\n }, [submittingRedirect, selectedRefundMethod]);\n\n useEffect(() => {\n if (hasRedirectUrl) {\n window.localStorage.setItem(\"nv_shop_now_checkout\", checkoutUrl);\n console.debug(\"redirect to shopify storefront:\", checkoutUrl);\n redirectToCheckout(checkoutUrl);\n }\n }, [hasRedirectUrl, checkoutUrl]);\n\n // when user go to next step, clear the error message\n useEffect(submitStatusReset, [state.currentStepIndex]);\n\n const handleShopNow = () => {\n try {\n const shopDomain = config.shopDomain;\n if (shopDomain === \"adornjewelry.myshopify.com\") {\n errorNotifier.critical(\"Adorn Jewelry\", {\n details: \"HandleShopNow called\",\n object: state,\n });\n }\n const confirmationPageState = {\n type: getConfirmationType(state),\n refundMethod: state.selectedReturnCreditMethod.id,\n noInstructions: state.selectedReturnMethod.id === METHOD_KEEP_THE_ITEM,\n selectedRefundMethodType: toReturnMethodPreference(\n state.selectedReturnMethod,\n ),\n email: state.guestReturn ? state.decodedGuestEmail : state.email,\n guestReturn: state.guestReturn,\n shipment: getShipmentItemsForConfirmation(\n nthReturnsActions.selectedItems,\n state.submitResult,\n renderInAppLabel,\n ),\n providerMoniker:\n nthReturnsActions.selectedPudoOption?.pudoProvider?.moniker,\n location:\n nthReturnsActions.returnCart?.pudoOption?.selectedDropOff\n ?.dropOffLocation,\n savePreferences: state.savePreferences,\n orderId: order.shopifyOrderId?.split(\"/\").pop(),\n };\n window.localStorage.setItem(\n \"nv_shop_now_v2_confirmation\",\n JSON.stringify(confirmationPageState),\n );\n if (shopDomain === \"adornjewelry.myshopify.com\") {\n errorNotifier.critical(\"Adorn Jewelry\", {\n details: \"Local storage set\",\n object: window.localStorage.getItem(\"nv_shop_now_v2_confirmation\"),\n state: confirmationPageState,\n });\n }\n } catch (e) {\n errorNotifier.critical(\"There was an error setting local storage data.\", {\n details: e,\n object: state,\n });\n }\n actions.setShopNowRedirect(true);\n };\n\n // isStoreCredit on an item means the user already opted for Shop Now, so\n // they do not need to be presented with the decision again here.\n const isAutoRedirect = useMemo(\n () => !loading && !skipShopNow && some(\"isStoreCredit\", state.items),\n [loading, skipShopNow, state.items],\n );\n useEffect(() => {\n if (isAutoRedirect) {\n handleShopNow();\n }\n }, [isAutoRedirect]);\n\n const handleAddressFix = useCallback(({ fromAddress }) => {\n submitStatusReset();\n actions.setCorrectedAddress(fromAddress);\n }, []);\n\n useRegisterStepStatus(CHOOSE_SHOP_NOW_STEP, { skipped: skipShopNow });\n if (skipShopNow) {\n return null;\n }\n\n const addressError =\n queryStatus.addressError ?? getAddressError(submitStatus.errorDetail);\n\n if (addressError) {\n return (\n \n \n {config.translations.mailing_address_section_title}\n \n \n \n );\n }\n\n if (loading) {\n return ;\n }\n return (\n
\n \n \n \n {config.translations.shopnow_opt_in_title}\n \n \n {queryErrorMessage ? (\n \n \n }\n />\n \n ) : (\n <>\n \n {showIncentive ? (\n <>\n \n {config.translations.shopnow_opt_in_description}\n {incentive &&\n interpolate(\n config.translations\n .shopnow_opt_in_incentive_description,\n { amount: incentive },\n )}\n \n \n \n {refundAmount}\n \n \n {creditAmount}\n \n \n \n ) : (\n <>\n \n {refundAmount}\n \n \n )}\n \n {shopNowRefundMethod?.refundMethodDescription}\n \n \n \n \n {interpolate(config.translations.shopnow_opt_in_yes, {\n amount: creditAmount,\n })}\n \n \n {interpolate(config.translations.shopnow_opt_in_no, {\n amount: refundAmount,\n })}\n \n \n {submitErrorMessage && (\n \n \n }\n />\n \n )}\n \n )}\n \n {submitting && }\n
\n );\n};\n\nexport default ChooseShopNow;\n","import React from \"react\";\nimport clsx from \"clsx\";\n\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { alpha } from \"@material-ui/core/styles\";\n\nimport { palette } from \"../../../shared/theme/create-theme\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { config } from \"../../config\";\nimport { interpolate } from \"../../../shared/modules/template\";\nimport Strikethrough from \"../../components/Strikethrough\";\n\nconst BORDER_WIDTH_SELECTED = 3;\nconst BORDER_WIDTH_UNSELECTED = 1;\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"stretch\",\n justifyContent: \"center\",\n height: \"100%\",\n cursor: \"pointer\",\n backgroundColor: theme.palette.common.white,\n border: `${BORDER_WIDTH_UNSELECTED}px solid #ccc`,\n [theme.breakpoints.ie11()]: { height: theme.spacing(32) },\n [theme.breakpoints.edge()]: { height: theme.spacing(32) },\n },\n itemSelected: {\n border: `3px solid ${theme.palette.primary.main}`,\n backgroundColor: theme.palette.common.white,\n },\n details: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n flexWrap: \"nowrap\",\n padding: theme.spacing(3) - BORDER_WIDTH_UNSELECTED,\n },\n detailsSelected: {\n backgroundColor: alpha(theme.palette.primary.main, 0.05),\n padding: theme.spacing(3) - BORDER_WIDTH_SELECTED,\n },\n iconContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n [theme.breakpoints.up(\"sm\")]: {\n marginBottom: theme.spacing(1),\n },\n },\n icon: {\n width: theme.spacing(12),\n textAlign: \"center\",\n [theme.breakpoints.up(\"sm\")]: {\n width: \"auto\",\n maxWidth: theme.spacing(24),\n paddingRight: 0,\n },\n },\n description: {\n textAlign: \"center\",\n },\n title: {},\n subtitle: {\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(1),\n },\n strikethrough: {\n marginRight: theme.spacing(1),\n },\n incentiveContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n incentiveAmount: {\n color: palette.red,\n },\n }),\n { name: \"N0CreditOptionCard\" },\n);\n\nfunction CreditOptionCard({\n icon,\n selected,\n title,\n subtitle,\n onClick,\n strikethrough,\n oldPrice,\n newPrice,\n}) {\n const classes = useStyles();\n return (\n \n \n \n
{icon}
\n
\n \n \n {title}\n \n {newPrice && (\n
\n {strikethrough && oldPrice && (\n \n {oldPrice}\n \n )}\n \n {newPrice}\n \n
\n )}\n \n {subtitle}\n \n
\n \n \n );\n}\n\nexport default CreditOptionCard;\n","import ShopNow from \"../../../shared/components/icons/StoreCredit\";\n\nexport default ShopNow;\n","import React from \"react\";\n\nfunction GiftCard(props) {\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default GiftCard;\n","import ShopLater from \"../../../shared/components/icons/GiftCard\";\n\nexport default ShopLater;\n","import React from \"react\";\n\nfunction Refund(props) {\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default Refund;\n","import Refund from \"../../../shared/components/icons/Refund\";\n\nexport default Refund;\n","import React, { useEffect, useMemo, useCallback } from \"react\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport Button from \"@material-ui/core/Button\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\n\nimport {\n get,\n find,\n isEmpty,\n unset,\n set,\n compose,\n merge,\n map,\n uniq,\n} from \"lodash/fp\";\n\nimport { RefundMethods } from \"@narvar/nth-kit-returns-headless\";\n\nimport {\n REFUND_METHOD_ORIGINAL_PAYMENT,\n REFUND_METHOD_GIFT_CARD,\n RETURN_CREDIT_METHOD_SHOPNOW,\n RETURN_CREDIT_METHOD_GIFT_CARD,\n RETURN_CREDIT_METHOD_REFUND,\n RETURN_CREDIT_METHOD_REPLACEMENT,\n RETURN_CREDIT_METHOD_RESHOP,\n} from \"../../../retailer-app/constants/returns\";\nimport {\n useReturnStepIsActive,\n useReturnStepsActions,\n useReturnStepsState,\n getStepIndex,\n CHOOSE_RETURN_CREDIT_METHOD_STEP,\n REVIEW_STEP,\n useRegisterStepStatus,\n} from \"../../contexts/returnSteps\";\nimport CreditMethodCard from \"./CreditMethodCard\";\nimport { buildItemsByType, useInventoryCheck } from \"../../modules/items\";\nimport locale from \"../../../shared/modules/lang\";\nimport { config } from \"../../config\";\nimport ShopNowIcon from \"../../components/icons/shop_now\";\nimport ShopLaterIcon from \"../../components/icons/shop_later\";\nimport RefundIcon from \"../../components/icons/refund\";\nimport { useCalculateRefund } from \"../../data/calculateRefund\";\nimport Spinner from \"../../../shared/components/Spinner\";\nimport { interpolate } from \"../../../shared/modules/template\";\nimport { ignoreEmpty, renameKeys } from \"../../../shared/modules/object\";\nimport MailingAddressForm from \"../ConfirmMailingAddress/MailingAddressForm\";\nimport { mergeAddress } from \"../../modules/address\";\nimport ErrorSnackbar from \"../../components/ErrorSnackbar\";\nimport { getHandledErrorMessage } from \"../../../shared/modules/decodeError\";\nimport { useTypeForm } from \"../../contexts/typeForm\";\nimport { useNthReturnsActions } from \"../../contexts/nthContext\";\nimport useClaims from \"../../hooks/useClaims\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n title: {\n marginBottom: theme.spacing(3),\n },\n chooseButton: {\n marginTop: theme.spacing(1),\n },\n }),\n { name: \"N0ChooseReturnCreditMethod\" },\n);\n\nconst ChooseReturnCreditMethod = ({ orderFetchData, draftReturnUuid }) => {\n const classes = useStyles();\n\n const state = useReturnStepsState();\n const actions = useReturnStepsActions();\n const { hasClaimItems, transformClaimItemsToExchangeItems } = useClaims();\n const useNewDesign = config.isNthUi;\n const isClaimReplacementEnabled = config.isExchangesEnabled && hasClaimItems;\n\n const { order, returnReasonsById = {} } = orderFetchData;\n const { itemsById } = order;\n const claimReplacementItems = useMemo(\n () =>\n isClaimReplacementEnabled\n ? compose(\n map((id) => itemsById[id]),\n uniq,\n map(get(\"id\")),\n )(state.items)\n : [],\n [isClaimReplacementEnabled, itemsById, state.items],\n );\n const { allItemsAvailableForSale, status: inventoryCheckStatus } =\n useInventoryCheck({\n items: claimReplacementItems,\n });\n\n const { exchangeItems, returnItems } = useMemo(\n () => buildItemsByType(state.items, itemsById, returnReasonsById),\n [itemsById, returnReasonsById, state.items],\n );\n\n const selectedReturnMethod = state.selectedReturnMethod;\n\n const calculateRefundPayload = {\n carrierServiceName: selectedReturnMethod.carrierService,\n draftReturnUuid,\n exchangeItems: exchangeItems.map(unset(\"returnItem.pictures\")),\n returnItems: returnItems.map(unset(\"pictures\")),\n shopifyOrderId: order.shopifyOrderId,\n presentmentCurrency: order.presentmentCurrency,\n shippingPrice: selectedReturnMethod.price,\n shippingMethod: selectedReturnMethod.id,\n orderNumber: state.orderNumber,\n email: state.email,\n locale,\n fromAddress: ignoreEmpty(state.fromAddress),\n csid: state.csid,\n chosenRefundMethod: null,\n };\n const { refund, queryStatus } = useCalculateRefund(calculateRefundPayload);\n const claimReplacementOutOfStock = !allItemsAvailableForSale;\n const claimReplacementPayload = transformClaimItemsToExchangeItems(\n calculateRefundPayload,\n );\n const { refund: replacementRefund, queryStatus: replacementQueryStatus } =\n useCalculateRefund(claimReplacementPayload, {\n skip:\n !isClaimReplacementEnabled ||\n inventoryCheckStatus.loading ||\n claimReplacementOutOfStock,\n });\n\n // calculate refund would run again in review, hide the spinner for that\n const loading =\n (isEmpty(refund) && queryStatus.loading) ||\n (isEmpty(replacementRefund) && replacementQueryStatus.loading) ||\n inventoryCheckStatus.loading;\n const loaded =\n !isEmpty(refund) &&\n (!isClaimReplacementEnabled || !isEmpty(replacementRefund));\n const { addressError } = queryStatus;\n const errorMessage = getHandledErrorMessage(\n queryStatus.error,\n config.translations.general_loading_error,\n );\n const replacementMethod = replacementRefund?.refundMethodsAvailable?.find(\n (method) => method.refundMethod === replacementRefund.chosenRefundMethod,\n );\n\n const creditMethods = useMemo(() => {\n if (loading) return [];\n if (!refund?.refundMethodsAvailable?.length) return [];\n if (\n isClaimReplacementEnabled &&\n !claimReplacementOutOfStock &&\n !replacementRefund?.refundMethodsAvailable?.length\n )\n return [];\n\n const originalPayment = refund.refundMethodsAvailable.find(\n (v) => v.refundMethod === RETURN_CREDIT_METHOD_REFUND,\n );\n\n const translateMethodTitle = (methodId) => {\n switch (methodId) {\n case RETURN_CREDIT_METHOD_RESHOP:\n return config.translations.choose_refund_method_reshop;\n case RETURN_CREDIT_METHOD_REPLACEMENT:\n return config.translations.claims_resolution_option_replacement_title;\n case RETURN_CREDIT_METHOD_REFUND:\n return config.translations.choose_refund_method_original_payment;\n default:\n return interpolate(\n config.translations.choose_refund_method_gift_card,\n { shop_name: config.shopName },\n );\n }\n };\n\n const translateMethod = (method) => {\n const title = translateMethodTitle(method.id);\n let description = method.description;\n if (method.id === RETURN_CREDIT_METHOD_REPLACEMENT) {\n description = claimReplacementOutOfStock\n ? config.translations\n .claims_resolution_option_replacement_description_out_of_stock\n : config.translations\n .claims_resolution_option_replacement_description;\n }\n return {\n ...method,\n title,\n description,\n };\n };\n\n const setDisabled = (method) => {\n let disabled = false;\n if (method.id === RETURN_CREDIT_METHOD_REPLACEMENT) {\n disabled = claimReplacementOutOfStock;\n }\n return {\n ...method,\n disabled,\n };\n };\n\n const toCreditMethodCardData = (method) =>\n compose(\n setDisabled,\n translateMethod,\n merge({\n strikethrough:\n Math.abs(originalPayment?.refundCents + 10) <\n Math.abs(method.refundCents),\n oldPriceCents: originalPayment?.refundCents,\n oldPrice: originalPayment?.refundFormatted,\n }),\n renameKeys({\n refundMethod: \"id\",\n refundMethodDescription: \"description\",\n refundFormatted: \"newPrice\",\n refundCents: \"newPriceCents\",\n }),\n )(method);\n\n const ret = refund.refundMethodsAvailable\n .filter(\n (v) => v.refundMethod !== RETURN_CREDIT_METHOD_SHOPNOW, // shop now opt-in is handled by other step\n )\n .filter((v) => v.refundCents > 0) // if consumer owes any amount, no need to show refund methods\n .map(toCreditMethodCardData)\n .sort((a, b) => {\n const toNumber = (method) => {\n if (method.id === RETURN_CREDIT_METHOD_REFUND) {\n return refund.refundMethodsAvailable.length + 2; // original method places in the last\n }\n if (method.id === RETURN_CREDIT_METHOD_GIFT_CARD) {\n return refund.refundMethodsAvailable.length + 1; // shopify gift card places in the second last\n }\n if (method.id === refund.chosenRefundMethod) {\n return -1; // backend chosen default method places in the first\n }\n return 0; // keep the order\n };\n return toNumber(a) - toNumber(b);\n });\n\n if (isClaimReplacementEnabled) {\n ret.unshift(\n toCreditMethodCardData({\n ...replacementMethod,\n originalRefundMethod:\n replacementMethod?.refundMethod ?? REFUND_METHOD_ORIGINAL_PAYMENT,\n refundMethod: RETURN_CREDIT_METHOD_REPLACEMENT,\n }),\n );\n }\n return ret;\n }, [\n loading,\n refund,\n isClaimReplacementEnabled,\n claimReplacementOutOfStock,\n replacementRefund,\n replacementMethod,\n ]);\n\n useEffect(() => {\n if (creditMethods.length > 0) {\n actions.setAvailableReturnCreditMethods(creditMethods);\n }\n }, [creditMethods]);\n\n // TODO: conditionally render the amount: do this checking? isRefundAutomationEnabled && !isTotalNegative && !isTotal0\n\n // account for uneven exchange and return where no credit is refunded.\n const skipReturnCreditMethod = loaded && creditMethods.length === 0;\n\n const autoChoose =\n loaded &&\n creditMethods.length === 1 &&\n creditMethods[0].id === RETURN_CREDIT_METHOD_REFUND;\n\n const isValidSelected = useMemo(() => {\n const method = state.selectedReturnCreditMethod;\n if (!method) return false;\n return creditMethods.some((d) => d.id === method.id);\n }, [state.selectedReturnCreditMethod, creditMethods]);\n\n const isActiveStep = useReturnStepIsActive(CHOOSE_RETURN_CREDIT_METHOD_STEP);\n const showNextBtn = !loading && !errorMessage && isActiveStep;\n\n useEffect(() => {\n if (\n skipReturnCreditMethod &&\n state.currentStepIndex < getStepIndex(REVIEW_STEP)\n ) {\n actions.goToStep(REVIEW_STEP);\n }\n }, [skipReturnCreditMethod, state.currentStepIndex]);\n\n const createSelectionHandler = useCallback(\n (method) => () => {\n if (get(\"id\", method) === get(\"selectedReturnCreditMethod.id\", state))\n return;\n actions.setReturnCreditMethod(method);\n },\n [state],\n );\n\n const handleAddressFix = useCallback(({ fromAddress }) => {\n actions.setCorrectedAddress(fromAddress);\n }, []);\n\n const handleNextStep = useCallback(() => {\n actions.goToStep(REVIEW_STEP);\n }, []);\n\n useEffect(() => {\n if (\n !skipReturnCreditMethod &&\n refund.chosenRefundMethod &&\n creditMethods.length > 0\n ) {\n const methodId =\n state.selectedReturnCreditMethod.id ?? refund.chosenRefundMethod;\n let method = find({ id: methodId }, creditMethods);\n if (\n !method &&\n refund.chosenRefundMethod === RETURN_CREDIT_METHOD_SHOPNOW\n ) {\n method =\n find({ id: REFUND_METHOD_ORIGINAL_PAYMENT }, creditMethods) ||\n find({ id: REFUND_METHOD_GIFT_CARD }, creditMethods);\n }\n\n if (method && state.selectedReturnCreditMethod.id !== method.id) {\n actions.setReturnCreditMethod(method);\n }\n\n if (autoChoose) {\n actions.goToStep(REVIEW_STEP);\n }\n }\n }, [\n skipReturnCreditMethod,\n autoChoose,\n state.selectedReturnCreditMethod,\n refund.chosenRefundMethod,\n creditMethods,\n ]);\n\n const methodIcons = (carrier) => {\n switch (carrier) {\n case RETURN_CREDIT_METHOD_SHOPNOW:\n return ;\n case RETURN_CREDIT_METHOD_GIFT_CARD:\n return ;\n case RETURN_CREDIT_METHOD_REFUND:\n return ;\n default:\n return ;\n }\n };\n\n /***************************************************************************************************************\n * New design with `nth` components\n ***************************************************************************************************************/\n const typeForm = useTypeForm();\n const nthReturnActions = useNthReturnsActions();\n const getNthType = (method) =>\n method.id === RETURN_CREDIT_METHOD_REPLACEMENT\n ? method.originalRefundMethod.toUpperCase()\n : method.id.toUpperCase();\n const refundMethodOptions = useMemo(\n () =>\n creditMethods.map((method) => {\n const currency = order.presentmentCurrency;\n const refundAmount = { value: method.newPriceCents, currency };\n let incentive = refundAmount?.value - method.oldPriceCents;\n incentive = incentive > 0 ? { value: incentive, currency } : undefined;\n const ret = {\n ...method,\n type: getNthType(method),\n name: method.title,\n refund: refundAmount,\n incentive,\n };\n return ret;\n }),\n [refund, creditMethods],\n );\n const selectedRefundMethod = useMemo(\n () =>\n find({ id: state.selectedReturnCreditMethod?.id }, refundMethodOptions),\n [refundMethodOptions, state.selectedReturnCreditMethod?.id],\n );\n\n useEffect(() => {\n nthReturnActions?.setReturnCart?.(\n set(\"refundMethod\", selectedRefundMethod),\n );\n }, [selectedRefundMethod]);\n\n const isSkipStep = skipReturnCreditMethod || autoChoose;\n useRegisterStepStatus(CHOOSE_RETURN_CREDIT_METHOD_STEP, {\n skipped: isSkipStep,\n });\n if (isSkipStep) return null;\n\n if (addressError) {\n return (\n \n \n {config.translations.mailing_address_section_title}\n \n \n \n );\n }\n\n if (useNewDesign) {\n return (\n {\n if (event.value?.selectedRefundMethod) {\n const method = find(\n { id: event.value?.selectedRefundMethod?.id },\n refundMethodOptions,\n );\n if (method && method.id !== state.selectedReturnCreditMethod?.id) {\n actions.setReturnCreditMethod({\n ...method,\n type: method.type.toLowerCase(),\n });\n }\n }\n }}\n onBack={() => {\n actions.goBack();\n typeForm.scrollToActive();\n }}\n onSubmit={handleNextStep}\n />\n );\n }\n\n if (loading) {\n return ;\n }\n\n return (\n \n \n \n {config.translations.choose_refund_method_title}\n \n {errorMessage ? (\n \n }\n />\n ) : (\n \n {creditMethods.map((method) => (\n \n \n \n ))}\n \n )}\n \n {showNextBtn && (\n \n \n \n {config.translations.choose_refund_method_next_button_label}\n \n \n \n )}\n \n );\n};\nexport default ChooseReturnCreditMethod;\n","import React from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { config } from \"../../config\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { getBorderUnselected } from \"../ChooseItems/utils\";\nimport { omit } from \"lodash/fp\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n marginBottom: theme.spacing(2),\n },\n detailHeading: {\n marginBottom: theme.spacing(1),\n },\n detailHeadingValue: {\n ...omit([\"fontFamily\"], theme.typography.h2),\n },\n grid: {\n [theme.breakpoints.up(\"md\")]: {\n borderRight: getBorderUnselected(theme),\n\n \"&:last-child\": {\n borderRightWidth: 0,\n },\n },\n },\n }),\n { name: \"N0ReviewDetails\" },\n);\n\nconst DetailHeading = ({ children }) => {\n const classes = useStyles();\n return (\n \n {children}\n \n );\n};\n\nconst DetailHeadingValue = ({ children }) => {\n const classes = useStyles();\n return (\n \n {children}\n \n );\n};\n\nfunction Details({\n refundTotal,\n returnItemCount,\n receiveItemCount,\n returnMethodDisplayName,\n isCharge,\n isPreCharge,\n}) {\n const classes = useStyles();\n const hasReturnMethod = !!returnMethodDisplayName;\n\n const title = (() => {\n if (isPreCharge) {\n return \"Refund Total (pre charged)\";\n }\n\n if (isCharge) {\n return config.translations.return_review_charge_total;\n } else {\n return config.translations.return_review_estimated_refund + \"*\";\n }\n })();\n\n return (\n \n \n {title}\n {refundTotal}\n \n \n \n {config.translations.return_review_returning}\n \n {returnItemCount}\n \n {receiveItemCount > 0 && (\n \n \n {config.translations.return_review_receiving}\n \n {receiveItemCount}\n \n )}\n {hasReturnMethod && (\n \n \n {config.translations.return_review_return_method}\n \n {returnMethodDisplayName}\n \n )}\n \n );\n}\nexport default Details;\n","import React from \"react\";\nimport Image from \"material-ui-image\";\nimport ImageIcon from \"@material-ui/icons/Image\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { useTheme } from \"@material-ui/styles\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\nimport startCase from \"lodash/startCase\";\nimport map from \"lodash/map\";\nimport PropTypes from \"prop-types\";\n\nimport { config } from \"../../config\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport { omit } from \"lodash/fp\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n flexWrap: \"nowrap\",\n },\n thumb: {\n width: theme.spacing(14),\n height: theme.spacing(14),\n color: \"#ccc\",\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n },\n description: {\n flexGrow: 1,\n },\n name: {},\n variantOption: {},\n quantity: {},\n returnReason: {\n ...omit([\"fontFamily\"], theme.typography.h4),\n },\n price: {},\n disclaimerText: {\n marginTop: theme.spacing(1),\n },\n commentContainer: {\n marginTop: theme.spacing(0.5),\n },\n comment: {\n fontStyle: \"italic\",\n },\n }),\n { name: \"N0ReviewItem\" },\n);\n\nconst Item = ({\n details,\n keepTheItem,\n state,\n returnReasonTitle,\n isOriginal,\n}) => {\n const classes = useStyles();\n const theme = useTheme();\n const isSmUp = useMediaQuery(theme.breakpoints.up(\"sm\"));\n const isExchange = state.type === \"exchange\";\n\n const displayPrice = isOriginal\n ? details.displayPrice\n : state.exchange.priceFormatted;\n\n const productTitle = isOriginal\n ? details.productTitle\n : state.exchange.productTitle;\n const name = isOriginal ? details.name : state.exchange.name;\n\n const variantInfo = isOriginal\n ? details.variantInfo\n : isExchange\n ? state.exchange.variantInfo\n : details.variantInfo;\n\n const productImageUrl = isOriginal\n ? details.productImageUrl\n : state.exchange.productImageUrl;\n\n console.debug(\"isOriginal\", isOriginal, \"isExchange\", isExchange);\n console.debug(\"productTitle\", productTitle, \"name\", name);\n console.debug(\"details\", details);\n console.debug(\"state\", state);\n\n const itemVariantInfo = map(variantInfo, (variantInfo, i) => {\n return (\n \n {startCase(variantInfo.name)}: {variantInfo.value}\n \n );\n });\n\n return (\n \n \n {productImageUrl ? (\n \n ) : (\n \n )}\n \n \n \n {isSmUp && (\n \n {itemVariantInfo}\n \n {`${config.translations.return_review_item_quantity}: `}\n {state.quantity}\n \n \n )}\n \n {returnReasonTitle}\n \n {keepTheItem && isOriginal && (\n \n {config.translations.return_review_keep_item_disclaimer}\n \n )}\n {!!state.comment && isOriginal && (\n \n \n {`${config.translations.return_review_comments_title}: `}\n {state.comment}\n \n \n )}\n \n {isSmUp && (\n \n \n {displayPrice}\n \n \n )}\n \n );\n};\n\nItem.propTypes = {\n details: PropTypes.any,\n keepTheItem: PropTypes.any,\n state: PropTypes.any,\n isOriginal: PropTypes.bool,\n returnReasonTitle: PropTypes.string,\n};\nItem.defaultProps = {\n returnReasonTitle: \"\",\n isOriginal: true,\n};\n\nexport default Item;\n","import React from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\n\nimport { config } from \"../../config\";\nimport { makeRootStyles } from \"../../theme/styles\";\n\nconst { shouldHideNarvarSeamlessExchangeValue } = config;\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n lineItem: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n borderTop: \"1px solid #c5c5c5\",\n },\n returnMethod: {},\n refundMethod: {},\n total: {\n \"& .MuiTypograph-root\": {\n fontWeight: \"bold\",\n },\n },\n captionText: {\n marginTop: theme.spacing(2),\n color: \"#A0A0A0\",\n },\n }),\n { name: \"N0ReviewRefund\" },\n);\n\nconst Refund = ({\n taxesIncluded,\n totalDisplayPrice,\n totalRefundCents,\n totalDisplayTax,\n priorRefundsDisplayAmt,\n subtotalDisplayPrice,\n purchaseShippingDisplayPrice,\n returnMethodDisplayName,\n exchangeShippingFeeDisplayPrice,\n exchangeShippingFeeDisplayName,\n isCharge,\n isPreCharge,\n feeBreakdown,\n refundMethod,\n}) => {\n const classes = useStyles();\n\n function translatedFee(fee) {\n if (config.translations[fee]) return config.translations[fee];\n if (fee === \"Shipping Fee\")\n return config.translations.return_review_shipping_fee;\n return fee;\n }\n\n const title = (() => {\n if (isPreCharge) {\n return \"Refund Total (pre charged)\";\n }\n\n if (isCharge) {\n return config.translations.return_review_charge_total;\n } else {\n return config.translations.return_review_estimated_refund + \"*\";\n }\n })();\n\n return (\n \n {!config.onlyShowEstimatedRefund && (\n <>\n \n \n {config.translations.return_review_subtotal}\n \n \n {shouldHideNarvarSeamlessExchangeValue && totalRefundCents == 0\n ? \"-\"\n : subtotalDisplayPrice}\n \n \n \n
\n \n {taxesIncluded\n ? config.translations.return_review_taxes_included\n : config.translations.return_review_total_tax}\n \n
\n {totalDisplayTax}\n \n {priorRefundsDisplayAmt && (\n \n
\n \n {config.translations.return_review_prior_refunds}\n \n
\n {priorRefundsDisplayAmt}\n \n )}\n {purchaseShippingDisplayPrice && (\n \n \n {config.translations.return_review_original_purchase_shipping}\n \n \n {purchaseShippingDisplayPrice}\n \n \n )}\n \n \n {config.translations.return_review_return_method}:{\" \"}\n {returnMethodDisplayName}\n \n \n {feeBreakdown &&\n feeBreakdown\n .filter(\n (i) =>\n !shouldHideNarvarSeamlessExchangeValue ||\n (i.description != \"NARVAR_SEAMLESS_EXCHANGE_VALUE\" &&\n i.description != \"NARVAR_SEAMLESS_EXCHANGE_VALUE_TAX\"),\n )\n .map((fee, i) => {\n return (\n \n \n {translatedFee(fee.description)}\n \n {fee.formattedFee}\n \n );\n })}\n {exchangeShippingFeeDisplayName && (\n \n \n {exchangeShippingFeeDisplayName}\n \n \n {isCharge &&\n parseFloat(exchangeShippingFeeDisplayPrice.substring(1)) !=\n 0 &&\n \"-\"}\n {exchangeShippingFeeDisplayPrice}\n \n \n )}\n \n )}\n \n {title}\n {totalDisplayPrice}\n \n \n {refundMethod}\n \n \n *{config.translations.return_review_disclaimer}\n \n \n );\n};\n\nexport default Refund;\n","import React, { useState, useMemo, useEffect } from \"react\";\nimport { CardElement } from \"@stripe/react-stripe-js\";\nimport get from \"lodash/get\";\n\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\n\nimport { makeRootStyles } from \"../../theme/styles\";\nimport Spinner from \"../../../shared/components/Spinner\";\nimport { config } from \"../../config\";\nimport { useTheme } from \"@material-ui/styles\";\nimport { useStripeComponents } from \"../../contexts/StripeProvider\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n stripeElement: {\n padding: \"10px 20px\",\n backgroundColor: \"white\",\n transition: \"box-shadow 150ms ease\",\n marginBottom: theme.spacing(2),\n width: \"100%\",\n border: \"1px solid #e8e8fb\",\n pointerEvents: (props) => (props.disabled ? \"none\" : \"auto\"),\n },\n form: {\n width: \"100%\",\n },\n submitContainer: {\n marginTop: theme.spacing(4),\n width: \"100%\",\n borderRadius: 4,\n border: \"1px solid #e8e8fb\",\n padding: theme.spacing(4),\n },\n buttonContainer: {\n width: \"100%\",\n },\n submitButton: {\n marginBottom: theme.spacing(2),\n width: \"100%\",\n },\n paymentText: {\n marginBottom: theme.spacing(2),\n },\n errorText: {\n color: theme.palette.error.main,\n },\n }),\n { name: \"N0StripeCheckoutForm\" },\n);\n\nexport const confirmCardPayment = async ({ stripe, elements, secret }) => {\n if (!stripe || !elements) return;\n\n return stripe\n .confirmCardPayment(secret, {\n payment_method: {\n card: elements.getElement(CardElement),\n billing_details: {\n // name: \"Jenny Rosen\",\n },\n },\n setup_future_usage: \"off_session\",\n })\n .then((result) => {\n if (result.error) {\n throw result.error;\n } else {\n if (result.paymentIntent.status === \"requires_capture\") {\n return { paymentId: result.paymentIntent.id };\n }\n }\n });\n};\n\nfunction CheckoutForm({\n secret,\n onSuccess,\n hideSubmit,\n submitLoading,\n backendPaymentFailureError = null,\n}) {\n const theme = useTheme();\n const { stripe, elements } = useStripeComponents();\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState(backendPaymentFailureError);\n const classes = useStyles({ disabled: submitLoading || loading });\n\n const cardElementOptions = useMemo(\n () => ({\n style: {\n base: {\n fontFamily: theme.typography.body1.fontFamily,\n fontSize: `${theme.typography.body1.fontSize}px`,\n color: theme.palette.text.primary,\n fontSmoothing: \"antialiased\",\n \"::placeholder\": {\n color: theme.palette.text.hint,\n },\n },\n invalid: {\n color: \"#fa755a\",\n iconColor: \"#fa755a\",\n },\n },\n }),\n [theme],\n );\n\n useEffect(\n () => setError(backendPaymentFailureError),\n [backendPaymentFailureError],\n );\n\n const handleChange = ({ error }) => {\n console.error(\"handleChange error\", error);\n setError(get(error, \"message\"));\n };\n\n const handleSubmit = (event) => {\n event.preventDefault();\n\n if (!stripe || !elements) return;\n\n setLoading(true);\n setError();\n\n confirmCardPayment({ stripe, elements, secret })\n .then((result) => {\n setLoading(false);\n onSuccess(result);\n // Show a success message to your customer\n // There's a risk of the customer closing the window before callback\n // execution. Set up a webhook or plugin to listen for the\n // payment_intent.succeeded event that handles any business critical\n // post-payment actions.\n })\n .catch((error) => {\n setLoading(false);\n setError(error.message);\n });\n };\n\n return (\n
\n \n \n {config.translations.return_review_payment_title}\n \n \n\n {!hideSubmit && (\n \n \n {config.translations.return_review_submit_return}\n \n \n )}\n {!hideSubmit && (submitLoading || loading) && (\n \n \n \n )}\n {error && (\n \n \n {error}\n \n \n )}\n \n \n );\n}\n\nexport default CheckoutForm;\n","import Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { config } from \"../../config\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Spinner from \"../../../shared/components/Spinner\";\nimport React from \"react\";\nimport ErrorSnackbar from \"../../components/ErrorSnackbar\";\nimport { makeRootStyles } from \"../../theme/styles\";\nimport MailingAddressForm from \"../ConfirmMailingAddress/MailingAddressForm\";\nimport { getTranslation } from \"../../../shared/modules/config\";\nimport { mergeAddress } from \"../../modules/address\";\nimport { getAddressError } from \"../../../shared/modules/decodeError\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n submitContainer: {\n marginTop: theme.spacing(4),\n },\n submitButton: {\n marginBottom: theme.spacing(2),\n },\n }),\n { name: \"N0ReviewSubmitButton\" },\n);\n\nconst SubmitButton = ({\n showContactRetailer,\n isCharge,\n handleSubmit,\n paymentIdPresent,\n loading,\n}) => {\n const classes = useStyles();\n const onClick = () => handleSubmit();\n const customerOwesMoneyAndShouldContactRetailer =\n showContactRetailer && isCharge && !paymentIdPresent;\n return (\n \n \n {config.translations.return_review_submit_return}\n \n {customerOwesMoneyAndShouldContactRetailer && (\n \n {config.translations.return_review_error_contact_retailer}\n \n )}\n \n );\n};\n\nexport const Submit = ({\n submitStatus,\n state,\n errorMessage,\n isErrorSnackbarVisible,\n isCharge,\n showContactRetailer,\n paymentIdPresent,\n handleSubmit,\n loading,\n}) => {\n const classes = useStyles();\n const addressError = getAddressError(submitStatus?.errorDetail);\n\n return (\n \n {isErrorSnackbarVisible && (\n \n \n \n )}\n {addressError && (\n handleSubmit({ fromAddress })}\n disable={addressError.disableFields}\n submitLabel={getTranslation(\"bad_mailing_address_submit\")}\n validateZip={true}\n />\n )}\n {!state.submitted && !addressError && (\n <>\n \n {loading && (\n \n \n \n )}\n \n )}\n \n );\n};\n","import { useQuery, gql } from \"@apollo/client\";\nimport {\n featureFlaggedHook,\n useRequestStatus,\n} from \"../../shared/modules/hooks\";\nimport { memoObjectByKeyValues } from \"../../shared/modules/object\";\nimport { RETURN_CREDIT_METHOD_RESHOP } from \"../../retailer-app/constants/returns\";\nimport { pick } from \"lodash/fp\";\nimport { config } from \"../config\";\n\nconst QUERY = gql`\n query preApproval($preApprovalInput: PreApprovalInput!) {\n preApproval(preApprovalInput: $preApprovalInput) {\n result {\n preApprovalId\n }\n userErrors {\n code\n message\n }\n }\n }\n`;\n\nexport const usePreApproval = featureFlaggedHook(\n config.isReshopEarlyHardApproval,\n { status: {} },\n)((input) => {\n const requirePreApproval =\n input?.chosenRefundMethod === RETURN_CREDIT_METHOD_RESHOP &&\n !!input?.preApprovalReturnUuid &&\n input?.refundCalculated?.cents > 0;\n const saved = useQuery(QUERY, {\n variables: {\n preApprovalInput: pick(\n [\n \"email\",\n \"exchangeItems\",\n \"orderNumber\",\n \"preApprovalReturnUuid\",\n \"refundCalculated\",\n \"reshopOptions\",\n \"returnItems\",\n ],\n input,\n ),\n },\n skip: !requirePreApproval,\n });\n const status = useRequestStatus(saved, \"preApproval.userErrors\");\n const state = saved?.data?.preApproval?.result;\n\n return memoObjectByKeyValues({\n state,\n status,\n });\n});\n","import { isEmpty } from \"lodash\";\nimport { useMemo } from \"react\";\nimport { config } from \"../../config\";\n\nconst useNthFees = (refund, isCharge) =>\n useMemo(() => {\n if (!isEmpty(refund)) {\n const ret = [];\n\n ret.push({\n title: refund.taxesIncluded\n ? config.translations.return_review_taxes_included\n : config.translations.return_review_total_tax,\n type: \"TAX\",\n displayAmount: refund.totalTaxDisplayAmt,\n });\n\n if (refund.priorRefundsDisplayAmt) {\n ret.push({\n title: config.translations.return_review_prior_refunds,\n type: \"OTHERS\",\n displayAmount: refund.priorRefundsDisplayAmt,\n });\n }\n\n if (refund.originalShippingRefundedDisplayAmt) {\n ret.push({\n title: config.translations.return_review_original_purchase_shipping,\n type: \"OTHERS\",\n displayAmount: refund.originalShippingRefundedDisplayAmt,\n });\n }\n\n (refund.feeBreakdown ?? [])\n .filter(\n (i) =>\n !config.shouldHideNarvarSeamlessExchangeValue ||\n (i.description != \"NARVAR_SEAMLESS_EXCHANGE_VALUE\" &&\n i.description != \"NARVAR_SEAMLESS_EXCHANGE_VALUE_TAX\"),\n )\n .forEach((fee) => {\n ret.push({\n title: fee.description,\n type: \"LABEL_FEE\",\n displayAmount: fee.formattedFee,\n });\n });\n\n if (refund.exchangeShippingFeeDisplayName) {\n const sign =\n isCharge &&\n parseFloat(refund.exchangeShippingFeeDisplayPrice.substring(1)) !== 0\n ? \"-\"\n : \"\";\n ret.push({\n title: refund.exchangeShippingFeeDisplayName,\n type: \"OTHERS\",\n displayAmount: sign + refund.exchangeShippingFeeDisplayPrice,\n });\n }\n\n return ret;\n }\n }, [refund, isCharge]);\n\nexport default useNthFees;\n","import { isEmpty } from \"lodash\";\nimport { useMemo } from \"react\";\nimport { config } from \"../../config\";\n\nconst useNthRefund = (refund, isCharge, refundMethod) =>\n useMemo(() => {\n if (!isEmpty(refund)) {\n const currency = refund.currency;\n const total = refund.totalRefundCents;\n const subtotal =\n config.shouldHideNarvarSeamlessExchangeValue && total == 0\n ? 0\n : refund.subtotalRefundCents;\n const ret = {\n displayAllFees: true,\n total: { value: total, currency },\n subtotal: { value: subtotal, currency },\n refundMethod: refundMethod,\n };\n return ret;\n }\n }, [refund, isCharge, refundMethod]);\n\nexport default useNthRefund;\n","import React, { FC } from \"react\";\nimport { ItemDisplay } from \"@narvar/nth-hook-loma\";\nimport {\n ExtendedOrderItem,\n ExtendedReturnItemInput,\n Maybe,\n useLanguage,\n} from \"@narvar/nth-kit-returns-headless\";\nimport { ItemCard } from \"./components\";\nimport { getItemAttrs, getItemProps } from \"./utils/itemSelectorHelper\";\n\ninterface Props {\n orderItems: ExtendedOrderItem[];\n selectedItems?: ExtendedReturnItemInput[];\n itemDisplay?: Maybe;\n locale?: string;\n includeCurrency?: boolean;\n}\n\nexport const Items: FC = ({\n itemDisplay,\n orderItems,\n selectedItems,\n locale,\n includeCurrency,\n}) => {\n const { rawValue: skuLabel } = useLanguage({\n langKey: \"returnsItemListItemInfoskuLabel\",\n });\n const { rawValue: qtyLabel } = useLanguage({\n langKey: \"returnsItemListItemInfoqtyLabel\",\n });\n const { rawValue: colorLabel } = useLanguage({\n langKey: \"returnsItemListItemInfocolorLabel\",\n });\n const { rawValue: sizeLabel } = useLanguage({\n langKey: \"returnsItemListItemInfosizeLabel\",\n });\n const { rawValue: reasonLabel } = useLanguage({\n langKey: \"returnsItemListItemInforeasonLabel\",\n });\n\n return (\n <>\n {selectedItems?.map((item) => {\n const orderItem = orderItems.find(\n (orderItem) =>\n orderItem.sku === item.sku && orderItem.itemId === item.itemId,\n ) as ExtendedOrderItem;\n const selectedReason = orderItem?.availableReasons?.find(\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n (reason: any) => reason.id === item.reason.id,\n );\n return (\n \n );\n })}\n \n );\n};\n","export const pascalCase = (input = \"\") =>\n input\n .split(/[^a-zA-Z0-9]/)\n .map((s) => s.toLowerCase())\n .map((s) => (s[0] ?? \"\").toUpperCase() + s.substring(1))\n .join(\"\");\n\nexport const camelCase = (input = \"\") => {\n const s = pascalCase(input);\n return (s[0] ?? \"\").toLowerCase() + s.substring(1);\n};\n\nexport const kebabCase = (input = \"\") => {\n const s = pascalCase(input);\n return s.replace(/[A-Z]/g, (d) => \"-\" + d.toLowerCase()).substring(1);\n};\n\nexport const snakeCase = (input = \"\") => {\n const s = pascalCase(input);\n return s.replace(/[A-Z]/g, (d) => \"_\" + d.toLowerCase()).substring(1);\n};\n","import { makeRootStyles } from \"../theme/styles\";\n\nconst useStyles = makeRootStyles(\n () => ({\n reviewSummaryContainer: {\n padding: \"2rem 1.5rem\",\n },\n headerContainer: {\n textAlign: \"center\",\n },\n main: {\n margin: \"2rem 0\",\n },\n itemWrapper: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n unorderedList: {\n margin: 0,\n padding: 0,\n listStyleType: \"none\",\n },\n disclaimerText: {\n fontSize: \"12px\",\n lineHeight: \"16px\",\n color: \"#999\",\n margin: \"0.5rem auto\",\n },\n conditionalSections: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"1.5rem\",\n },\n addEmailToReturn: {\n background: \"#ececec\",\n borderRadius: \"10px\",\n padding: \"1rem\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"1rem\",\n },\n paragraph: {\n margin: 0,\n },\n savePreferences: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n margin: \"2rem auto 0\",\n maxWidth: \"640px\",\n \"& > label + span\": {\n marginTop: \"1.5rem\",\n },\n },\n preferencesEmail: {\n backgroundColor: \"#fff\",\n maxWidth: \"300px\",\n marginTop: \"0.5rem\",\n },\n }),\n { name: \"N0ReviewSummaryRaw\" },\n);\n\nexport { useStyles };\n","import React, { FC } from \"react\";\nimport Divider from \"@narvar/nth-bit-divider\";\nimport { ExtendedFee, RefundSummary } from \"./types\";\nimport { camelCase } from \"./transformers/string\";\nimport { useStyles } from \"./ReviewSummaryRawStyles\";\nimport {\n CurrencyAmount,\n ExtendedReturnItemInput,\n} from \"@narvar/nth-kit-returns-headless\";\nimport { Language } from \"./components\";\nimport { Currency } from \"./transformers/Currency\";\n\ninterface Props {\n items?: ExtendedReturnItemInput[];\n fees?: ExtendedFee[] | null;\n refund?: RefundSummary;\n locale?: string;\n includeCurrency?: boolean;\n}\n\nexport const Total: FC = (props) => {\n const { items, fees, refund, locale, includeCurrency } = props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n const subtotal: CurrencyAmount =\n refund?.subtotal ??\n // fallback to sum all returning line item values\n (items ?? []).reduce(\n (ret, item) => {\n const itemPrice = item.price?.value ?? 0;\n const exchangePrice = item.exchangeTo?.price?.value ?? 0;\n ret.value += (itemPrice - exchangePrice) * item.quantity;\n return ret;\n },\n { value: 0, currency: items?.[0]?.price?.currency ?? \"USD\" },\n );\n\n const defaultLabelFee: ExtendedFee = {\n type: \"LABEL_FEE\",\n amount: {\n value: 0,\n currency: fees?.[0]?.amount?.currency ?? \"USD\",\n },\n };\n const labelFee: ExtendedFee =\n fees?.find((f) => f.type === \"LABEL_FEE\") ?? defaultLabelFee;\n\n const displayFees: ExtendedFee[] =\n refund?.displayAllFees && fees && fees.length > 0 ? fees : [labelFee];\n\n const total: CurrencyAmount =\n refund?.total ??\n // fallback to subtotal - fees\n displayFees.reduce(\n (ret, fee) => ({\n ...ret,\n value: ret.value - fee.amount.value,\n }),\n subtotal,\n );\n\n return (\n
    \n {!refund?.hideSubtotal && (\n
  • \n
    \n \n \n \n \n
    \n \n
  • \n )}\n {displayFees.map((fee, i) => (\n
  • \n
    \n \n {fee.title ?? (\n \n )}\n \n {fee.displayAmount ?? (\n \n )}\n
    \n \n
  • \n ))}\n
  • \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n {props.refund?.refundMethod && (\n <>\n
    \n \n
    \n
    \n \n
    \n \n )}\n
  • \n
\n );\n};\n","import { makeRootStyles } from \"../../theme/styles\";\n\nconst useStyles = makeRootStyles(\n {\n wrapper: {\n marginTop: \"2rem\",\n display: \"flex\",\n flexDirection: \"column\",\n alignSelf: \"stretch\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n padding: \"1.5rem\",\n backgroundColor: \"#f7f7f7\",\n border: \"1px solid #cccccc\",\n gap: \"1rem\",\n },\n formField: {\n width: \"100%\",\n maxWidth: \"312px\",\n textAlign: \"left\",\n },\n disclaimer: {\n fontStyle: \"italic\",\n color: \"#999999\",\n },\n errorMessage: {\n paddingTop: \"0.5rem\",\n },\n },\n { name: \"N0ReshopOptIn\" },\n);\n\nexport { useStyles };\n","import { MediumHeader } from \"@narvar/nth-bit-header\";\nimport Checkbox from \"@narvar/nth-block-checkbox\";\nimport { useTheme, withThemeProvider } from \"@narvar/nth-hook-theme\";\nimport TextInput, { SupportedInputType } from \"@narvar/nth-block-text-input\";\nimport React, { ChangeEvent, FC } from \"react\";\n\nimport { ReshopOptionsProps } from \"./types\";\nimport { useStyles } from \"./ReshopOptInStyles\";\nimport { Language } from \"../components\";\nimport { useLanguage } from \"@narvar/nth-kit-returns-headless\";\n\nconst ReshopOptIn: FC = ({ value, error, onChange }) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n const {\n panelcontainerNoneNone,\n captiontextErrorNone,\n captiontextDefaultNone,\n } = useTheme();\n\n const { subscribe = false, phone = \"\" } = value ?? {};\n const phoneLabel = useLanguage({\n langKey: \"returnsReviewReshopPhoneInputLabel\",\n }).value;\n\n const handleSubscribeChange = (event: ChangeEvent) => {\n onChange?.({\n subscribe: event.target.checked,\n phone,\n });\n };\n const handlePhoneChange = (event: ChangeEvent) => {\n onChange?.({\n subscribe,\n phone: event.target.value,\n });\n };\n\n return (\n \n \n \n \n\n \n \n \n \n \n {subscribe && (\n
\n \n {error && (\n
\n {error}\n
\n )}\n
\n )}\n
\n \n
\n \n );\n};\n\nexport default withThemeProvider(ReshopOptIn, {\n themeTokens: [\n \"panelcontainerNoneNone\",\n \"captiontextErrorNone\",\n \"captiontextDefaultNone\",\n ],\n});\n","import React, { FC } from \"react\";\nimport { ItemDisplay } from \"@narvar/nth-hook-loma\";\nimport { getItemAttrs, getItemProps } from \"./utils/itemSelectorHelper\";\nimport { ItemCard } from \"./components\";\nimport {\n ExtendedOrderItem,\n Maybe,\n useLanguage,\n} from \"@narvar/nth-kit-returns-headless\";\n\ninterface Props {\n shopNowItems: ExtendedOrderItem[];\n itemDisplay?: Maybe;\n locale?: string;\n includeCurrency?: boolean;\n}\n\nexport const ShopNowItems: FC = ({\n itemDisplay,\n shopNowItems,\n locale,\n includeCurrency,\n}) => {\n const { rawValue: skuLabel } = useLanguage({\n langKey: \"returnsItemListItemInfoskuLabel\",\n });\n const { rawValue: qtyLabel } = useLanguage({\n langKey: \"returnsItemListItemInfoqtyLabel\",\n });\n const { rawValue: colorLabel } = useLanguage({\n langKey: \"returnsItemListItemInfocolorLabel\",\n });\n const { rawValue: sizeLabel } = useLanguage({\n langKey: \"returnsItemListItemInfosizeLabel\",\n });\n\n return (\n <>\n {shopNowItems.map((item) => {\n return (\n \n );\n })}\n \n );\n};\n","import React, { ChangeEvent, FC, useState } from \"react\";\nimport { MediumHeader, SemibigHeader } from \"@narvar/nth-bit-header\";\nimport Paragraph from \"@narvar/nth-bit-paragraph\";\nimport Divider from \"@narvar/nth-bit-divider\";\nimport TextInput, { SupportedInputType } from \"@narvar/nth-block-text-input\";\nimport { useSettings, withSettingsProvider } from \"@narvar/nth-hook-settings\";\nimport { useTheme, withThemeProvider } from \"@narvar/nth-hook-theme\";\nimport { withTranslationsProvider } from \"@narvar/nth-hook-translations\";\nimport { Items } from \"./Items\";\nimport { Total } from \"./Total\";\nimport {\n ErrorBanner,\n Language,\n LocationCard,\n Spinner,\n StickyFooter,\n Footer,\n ItemCardSkeleton,\n LineItemSkeleton,\n Backdrop,\n} from \"./components\";\nimport { ReviewSummaryRawProps } from \"./types\";\nimport Checkbox from \"@narvar/nth-block-checkbox\";\nimport { EMAIL_ADDRESS_PATTERN, validatePattern } from \"./utils\";\nimport ReshopOptIn from \"./ReshopOptIn/ReshopOptIn\";\nimport { ReshopOptions } from \"./ReshopOptIn/types\";\nimport { ShopNowItems } from \"./ShopNowItems\";\nimport { useStyles } from \"./ReviewSummaryRawStyles\";\nimport {\n FooterButtonType,\n ReturnPayload,\n StickyFooterOnShowEvent,\n useReturnsConfig,\n useLanguage,\n} from \"@narvar/nth-kit-returns-headless\";\n// import ClaimAttestation from \"./components/ClaimAttestation/ClaimAttestation\";\n\nconst HIPAA_CSR_ROLES = [\"csrHipaa\", \"csrAdminHipaa\"];\n\nexport const checkIfEmailFieldIsValid = (\n email = \"\",\n options?: {\n canAddCustomerEmail?: boolean;\n canUpdateCustomerEmailHipaa?: boolean;\n hasAssociatedEmail?: boolean;\n },\n) => {\n const {\n canAddCustomerEmail,\n canUpdateCustomerEmailHipaa,\n hasAssociatedEmail,\n } = options || {};\n const isValidEmail = validatePattern(email, EMAIL_ADDRESS_PATTERN);\n\n if (!canAddCustomerEmail && !canUpdateCustomerEmailHipaa) {\n // The check for email state validity is true if the user can't update the email in any way, therefore there is no email field to validate.\n return true;\n }\n\n if (canAddCustomerEmail && isValidEmail && !canUpdateCustomerEmailHipaa) {\n // The shopify user canAddCustomerEmail, and the entered email is valid\n return true;\n }\n\n if (\n canUpdateCustomerEmailHipaa &&\n !hasAssociatedEmail &&\n isValidEmail &&\n !canAddCustomerEmail\n ) {\n // The HIPAA user canUpdateCustomerEmailHipaa, the order DOES NOT have an email to begin with, and the entered email is valid.\n return true;\n }\n\n if (\n canUpdateCustomerEmailHipaa &&\n hasAssociatedEmail &&\n (isValidEmail || email === \"\")\n ) {\n // The HIPAA user canUpdateCustomerEmailHipaa, the order has an email to begin with, and the newly entered email is valid OR the email field is empty.\n return true;\n }\n\n return false;\n};\n\nconst ReviewSummaryContent: FC = ({\n canAddCustomerEmail,\n canUpdateCustomerEmailHipaa,\n locale,\n includeCurrency,\n orderItems,\n selectedItems,\n shopNowItems,\n dropOffLocation,\n fees,\n refund,\n error,\n hasAssociatedEmail,\n loading,\n mailTo,\n renderAddOn,\n addOnsPostCartSummary,\n onEmailChange,\n policyChecked,\n policyLabel,\n onPolicyChange,\n type,\n preferencesStatus,\n savePreferences,\n onSavePreferencesChange,\n reshopOptions,\n onReshopOptionsChange,\n}) => {\n const { itemDisplay } = useSettings();\n const { bodytextDefaultNone } = useTheme();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n const returnsReviewAddEmailInputLabel = useLanguage({\n langKey: \"returnsReviewAddEmailInputLabel\",\n asString: true,\n }).value;\n\n if (loading) {\n return (\n
\n \n \n \n \n \n \n \n \n \n
\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasExchange = selectedItems.some((item: any) => item.exchangeTo);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasReturn = selectedItems.some((item: any) => !item.exchangeTo);\n\n const handlePolicyChange = (event: ChangeEvent) => {\n onPolicyChange?.(Boolean(event.target.checked));\n };\n\n const handleInputChange = (event: ChangeEvent) => {\n onEmailChange?.(event.target.value);\n };\n const handleSavePreferencesChange = (\n event: ChangeEvent,\n ) => {\n onSavePreferencesChange?.(Boolean(event.target.checked));\n };\n\n return (\n
\n
\n {error && (\n
\n \n {React.isValidElement(error) ? (\n error\n ) : (\n \n )}\n \n
\n )}\n \n \n \n \n \n \n
\n
\n \n \n \n \n \n {shopNowItems?.length && (\n <>\n \n \n \n \n \n \n )}\n\n {React.isValidElement(addOnsPostCartSummary)\n ? addOnsPostCartSummary\n : typeof addOnsPostCartSummary === \"function\"\n ? addOnsPostCartSummary()\n : null}\n\n \n \n
\n {dropOffLocation && (\n
\n \n \n \n \n \n
\n )}\n
\n {canUpdateCustomerEmailHipaa && (\n
\n \n \n \n

\n \n

\n \n
\n )}\n {React.isValidElement(renderAddOn)\n ? renderAddOn\n : typeof renderAddOn === \"function\"\n ? renderAddOn()\n : null}\n {policyLabel && (\n \n {policyLabel}\n \n )}\n {/* TODO: confirm with design, do we need to show the claim attestation? */}\n {/* {hasClaim && (\n \n )} */}\n {preferencesStatus && !preferencesStatus.profileStatus && (\n
\n \n \n \n {canAddCustomerEmail && (\n <>\n \n \n \n )}\n
\n )}\n {reshopOptions && (\n \n )}\n
\n
\n );\n};\n\nconst ReviewSummaryRawC = ({\n locale,\n includeCurrency,\n orderItems,\n selectedItems,\n shopNowItems,\n hasClaim,\n shopName,\n isCertified,\n onChangeCertified,\n signature,\n onChangeSignature,\n fees,\n refund,\n dropOffLocation,\n hasAssociatedEmail,\n error,\n loading,\n disabled,\n allowRetry,\n submitting,\n returnCart,\n mailTo,\n onBack,\n onSubmit,\n renderAddOn,\n addOnsPostCartSummary,\n policyChecked,\n policyLabel,\n preferencesStatus,\n savePreferences,\n onChange,\n progressiveStep,\n activeStep,\n userRole,\n reshopOptions,\n}: ReviewSummaryRawProps) => {\n const { isHipaaCompliant } = useReturnsConfig();\n const { bodytextDefaultNone } = useTheme();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n // Shopify customers without an associated email and who can save preferences.\n const canAddCustomerEmail =\n !isHipaaCompliant && !hasAssociatedEmail && savePreferences;\n\n // Using isHipaaCompliant below is repetitive, but is an extra safety check.\n // Hipaa CSRs can update email\n const canUpdateCustomerEmailHipaa =\n isHipaaCompliant && HIPAA_CSR_ROLES.includes(userRole ?? \"\");\n\n const backLabel = useLanguage({\n langKey: \"returnsActionsBack\",\n asString: true,\n }).value;\n const submitLabel = useLanguage({\n langKey: \"returnsActionsSubmit\",\n asString: true,\n }).value;\n const [errorPosition, setErrorPosition] = useState<\"inline\" | \"footer\">(\n \"inline\",\n );\n\n const handleFooterEvent = (event: ReturnPayload) => {\n if (event.value === \"back\") {\n onBack?.({\n value: {},\n area: \"returnReview\",\n event: \"back\",\n });\n }\n if (event.value === \"submit\") {\n onSubmit?.({\n value: {},\n area: \"returnReview\",\n event: \"submit\",\n });\n }\n };\n\n const handlePolicyChange = (event: boolean) => {\n onChange?.({\n area: \"returnReview\",\n event: \"change\",\n value: { policyChecked: event },\n subComponent: \"policyCheckbox\",\n });\n };\n\n const handleEmailChange = (event: string) => {\n onChange?.({\n area: \"returnReview\",\n event: \"change\",\n value: { mailTo: event },\n subComponent: \"mailToInput\",\n });\n };\n\n const handleSavePreferencesChange = (event: boolean) => {\n onChange?.({\n area: \"returnReview\",\n event: \"change\",\n value: { savePreferences: event },\n subComponent: \"savePreferences\",\n });\n };\n\n const handleReshopOptionsChange = (event: ReshopOptions) => {\n onChange?.({\n area: \"returnReview\",\n event: \"change\",\n value: { reshopOptions: event },\n subComponent: \"reshopOptions\",\n });\n };\n\n const handleOnFooterShow = (event: StickyFooterOnShowEvent) => {\n setErrorPosition(\n event.inView && event.display === \"inline\" ? \"footer\" : \"inline\",\n );\n };\n\n const isEmailFieldStateValid = checkIfEmailFieldIsValid(mailTo, {\n canAddCustomerEmail,\n canUpdateCustomerEmailHipaa,\n hasAssociatedEmail,\n });\n\n const submitEnabled = [\n isEmailFieldStateValid,\n policyLabel ? policyChecked : true,\n !loading,\n !submitting,\n !error || allowRetry,\n !disabled,\n ].every(Boolean);\n\n return (\n <>\n \n \n \n {!loading && !submitting && returnCart?.pudoOption && (\n \n \n \n {React.isValidElement(error) ? (\n error\n ) : (\n \n )}\n \n \n )\n }\n />\n \n )}\n {submitting && (\n \n \n \n \n \n \n )}\n \n );\n};\n\nexport const ReviewSummaryRaw = withSettingsProvider(\n withTranslationsProvider(\n withThemeProvider(ReviewSummaryRawC, {\n themeTokens: [\n \"bodytextDefaultNone\",\n \"panelcontainerNoneNone\",\n \"panelcontainerNoneActive\",\n \"panelcontainerNoneHover\",\n ],\n }),\n { translationKeys: [\"returnsActionsBack\", \"returnsActionsSubmit\"] },\n ),\n {\n settingsRequested: `\n itemDisplay {\n additionalItemAttributeConfig {\n attribute\n value {\n concatKey\n concatPosition\n label\n transform\n }\n }\n itemAttributeConfig\n }\n `,\n },\n);\n","import {\n PudoOption,\n PudoOptionInput,\n SelectedPudoOption,\n} from \"@narvar/nth-kit-returns-headless\";\n\nexport const getPudoMethodName = (\n pudoOption?: PudoOption | SelectedPudoOption | PudoOptionInput | null,\n) => {\n if (!pudoOption) return \"\";\n\n const { pudoActionType, pudoActionTypeDetails, pudoProvider } = pudoOption;\n if (pudoActionType === \"DROP_OFF\") {\n if (pudoActionTypeDetails === \"LABEL\") {\n if (pudoProvider?.type === \"CARRIER\") return \"mail\";\n if (pudoProvider?.type === \"CONCIERGE\") return \"concierge\";\n if (pudoProvider?.type === \"STORE\") return \"store\";\n return \"self\";\n }\n if (pudoActionTypeDetails === \"PRINTERLESS\") return \"printerless_mail\";\n if (pudoActionTypeDetails === \"BOXLESS\") return \"boxless\";\n } else if (pudoActionType === \"PICK_UP\") {\n if (pudoProvider?.type === \"COURIER\") return \"pickup\";\n }\n return \"\";\n};\n\nexport const generatePudoId = (\n pudoOption?: PudoOption | SelectedPudoOption | PudoOptionInput | null,\n) => {\n if (!pudoOption) return \"\";\n const { pudoActionType, pudoActionTypeDetails, pudoProvider, serviceType } =\n pudoOption;\n return [\n pudoActionType,\n pudoActionTypeDetails,\n pudoProvider?.type,\n pudoProvider?.moniker,\n serviceType,\n pudoProvider?.carrierId,\n ].join(\"-\");\n};\n","import React, { FC, useEffect, useRef, useState } from \"react\";\nimport { useMutation } from \"react-query\";\nimport { ReviewSummaryPayload, ReviewSummaryProps } from \"./types\";\nimport { ReviewSummaryRaw } from \"./ReviewSummaryRaw\";\nimport { getPudoMethodName } from \"./transformers/pudoMethod\";\nimport useCurrencyConfig from \"./hooks/useCurrencyConfig\";\nimport { useSettings, withSettingsProvider } from \"@narvar/nth-hook-settings\";\nimport {\n useHipaaSubmitReturnCartMutation,\n useSubmitReturnCartMutation,\n CommonEvent,\n useReturns,\n useReturnsConfig,\n useLanguage,\n} from \"@narvar/nth-kit-returns-headless\";\nimport { setPudoOption } from \"./utils/rootElmHelpers\";\n\nconst ReviewSummaryC: FC = ({\n onSubmit,\n onBack,\n progressiveStep,\n activeStep,\n allowRetry,\n}) => {\n const [policyChecked, setPolicyChecked] = useState(false);\n const [mailTo, setMailTo] = useState(\"\");\n\n const {\n orderData,\n selectedItems,\n selectedPudoOption,\n client,\n setReturnCart,\n returnCart,\n userRole,\n } = useReturns();\n const { locale } = useCurrencyConfig();\n\n const { isHipaaCompliant } = useReturnsConfig();\n\n const { value: policyLabelText } = useLanguage({\n langKey: \"returnsReviewPolicyCheckbox\",\n });\n\n const { reviewPolicy } = useSettings();\n\n const { enableReviewPolicy, reviewPolicyText } = reviewPolicy || {};\n\n const policyLabel: string = reviewPolicyText || policyLabelText || \"\";\n\n const {\n mutate: setPudoOptionMutation,\n isLoading: loading,\n error: loadingError,\n } = useMutation({\n mutationFn: async () => {\n const data = await setPudoOption({\n client,\n isHipaaCompliant,\n selectedPudoOption,\n returnCart,\n });\n setReturnCart(data.setPudoOption);\n },\n });\n const setPudoOptionMutationRef = useRef(setPudoOptionMutation);\n\n useEffect(() => {\n setPudoOptionMutationRef.current();\n }, []);\n\n const submitReturnCardMutationEffect = isHipaaCompliant\n ? useHipaaSubmitReturnCartMutation\n : useSubmitReturnCartMutation;\n\n const [\n submitReturnCartMutation,\n { error: submitError, loading: submitting },\n ] = submitReturnCardMutationEffect({\n client,\n variables: {\n returnCartId: returnCart?.id || \"\",\n mailTo,\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onError: (err: any) => {\n if (err) console.log(err);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onCompleted: ({ submitReturnCart: submittedReturn }: any) => {\n onSubmit?.({\n value: {\n submittedReturn,\n },\n area: \"returnReview\",\n event: \"submit\",\n });\n },\n });\n\n const handleBack = () => {\n onBack?.({\n value: {},\n area: \"returnReview\",\n event: \"back\",\n });\n };\n\n const handleSubmit = () => {\n void submitReturnCartMutation();\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const handleChange: CommonEvent = (event: any) => {\n if (event.subComponent === \"policyCheckbox\") {\n setPolicyChecked(event?.value?.policyChecked || false);\n }\n if (event.subComponent === \"mailToInput\") {\n setMailTo(event?.value?.mailTo || \"\");\n }\n };\n\n const policy: {\n policyLabel: string;\n policyChecked: boolean;\n } | null =\n policyLabel && enableReviewPolicy\n ? {\n policyLabel,\n policyChecked,\n }\n : null;\n\n return (\n \n );\n};\n\nconst ReviewSummary = withSettingsProvider(ReviewSummaryC, {\n settingsRequested: `\n reviewPolicy {\n reviewPolicyText\n enableReviewPolicy\n }\n `,\n});\n\nexport { ReviewSummary, ReviewSummaryRaw };\n","import { ApolloClient, NormalizedCacheObject } from \"@apollo/client\";\nimport { PudoDisplay } from \"@narvar/nth-hook-loma\";\nimport {\n PudoOption,\n PudoOptionInput,\n ReturnCart,\n SetPudoOptionMutation,\n SetPudoOptionMutationVariables,\n SetPudoOptionDocument,\n HipaaSetPudoOptionMutation,\n HipaaSetPudoOptionMutationVariables,\n HipaaSetPudoOptionDocument,\n} from \"@narvar/nth-kit-returns-headless\";\n\nimport { generatePudoId } from \"../transformers/pudoMethod\";\nimport { ExtendedPudoOption } from \"@narvar/nth-kit-returns-headless\";\n\nexport const isDisabled = (\n selectedCategory?: PudoOptionInput | null,\n pudoReference?: PudoOption,\n isCategoryConfirmed?: boolean,\n multiLabelsEnabled?: boolean,\n labelsCount?: number,\n): boolean => {\n const hasLocations =\n pudoReference?.dropOff?.sortedLocations?.locationsList &&\n pudoReference?.dropOff?.sortedLocations?.locationsList.length > 0;\n const hasPickup = pudoReference?.pickup;\n\n const noCategorySelected = !selectedCategory;\n const hasLocationsAndNoLocationSelected =\n hasLocations &&\n !selectedCategory?.selectedDropOff?.selectedLocation &&\n !isCategoryConfirmed;\n const hasPickupAndNoTimeSlotSelected =\n hasPickup && !selectedCategory?.selectedPickup?.selectedTimeSlot;\n const noLabelCount =\n isCategoryConfirmed && multiLabelsEnabled && !labelsCount;\n\n return [\n noCategorySelected,\n hasLocationsAndNoLocationSelected,\n hasPickupAndNoTimeSlotSelected,\n noLabelCount,\n ].some(Boolean);\n};\n\nexport const setPudoOption = async ({\n client,\n isHipaaCompliant = false,\n selectedPudoOption,\n returnCart,\n}: {\n client?: ApolloClient;\n isHipaaCompliant?: boolean;\n returnCart?: ReturnCart;\n selectedPudoOption?: PudoOptionInput;\n}) => {\n if (!client) throw new Error(\"Client not initialized\");\n if (!returnCart?.id || !selectedPudoOption)\n throw new Error(\"Unable to set PUDO option: Missing required parameters\");\n\n let mutation;\n\n if (isHipaaCompliant) {\n mutation = await client.mutate<\n HipaaSetPudoOptionMutation,\n HipaaSetPudoOptionMutationVariables\n >({\n mutation: HipaaSetPudoOptionDocument,\n variables: {\n returnCartId: returnCart.id,\n pudoOption: selectedPudoOption,\n },\n });\n } else {\n mutation = await client.mutate<\n SetPudoOptionMutation,\n SetPudoOptionMutationVariables\n >({\n mutation: SetPudoOptionDocument,\n variables: {\n returnCartId: returnCart.id,\n pudoOption: selectedPudoOption,\n },\n });\n }\n\n const { data } = mutation;\n if (!data)\n throw new Error(\"An error has occurred while setting the PUDO option\");\n return data;\n};\n\n// Returns a sorted array of pudoOptions that have been augmented with a sort key.\nexport const sortPudoOptions = (\n pudoOptions?: ExtendedPudoOption[],\n sortOrder?: PudoDisplay[\"pudoOptionSort\"],\n) => {\n if (!pudoOptions || !Array.isArray(sortOrder) || sortOrder.length === 0) {\n return pudoOptions;\n }\n\n return pudoOptions\n .map((option) => {\n const id = generatePudoId(option);\n\n const sort = sortOrder.indexOf(id) >= 0 ? sortOrder.indexOf(id) : 100;\n\n return {\n ...option,\n sort,\n };\n })\n .sort((a, b) => a.sort - b.sort);\n};\n","import { useState } from \"react\";\n\nexport interface ClaimAttestationProps {\n isCertified: boolean;\n onChangeCertified: (value: boolean) => void;\n signature: string;\n onChangeSignature: (value: string) => void;\n}\n\nconst useClaimAttestation = (): ClaimAttestationProps => {\n const [isCertified, onChangeCertified] = useState(false);\n const [signature, onChangeSignature] = useState(\"\");\n\n return {\n isCertified,\n onChangeCertified,\n signature,\n onChangeSignature,\n };\n};\n\nexport default useClaimAttestation;\n","import React, { useState, useEffect, useMemo, useCallback } from \"react\";\nimport { get, sumBy, isEmpty, merge, isPlainObject, includes } from \"lodash\";\nimport { isNil, last, unset } from \"lodash/fp\";\n\nimport { makeRootStyles } from \"../../theme/styles\";\nimport {\n METHOD_KEEP_THE_ITEM,\n RETURN_CREDIT_METHOD_REFUND,\n RETURN_CREDIT_METHOD_REPLACEMENT,\n RETURN_CREDIT_METHOD_RESHOP,\n} from \"../../../retailer-app/constants/returns\";\nimport Spinner from \"../../../shared/components/Spinner\";\nimport { config } from \"../../config\";\nimport {\n CONFIRMATION_STEP,\n REVIEW_STEP,\n useReturnStepIsActive,\n useReturnStepsActions,\n useReturnStepsState,\n} from \"../../contexts/returnSteps\";\nimport { useSubmitReturn } from \"../../data/submitReturn\";\nimport { useCalculateRefund } from \"../../data/calculateRefund\";\nimport { createCarouselItemKey, buildItemsByType } from \"../../modules/items\";\nimport locale from \"../../../shared/modules/lang\";\nimport { redirectToCheckout } from \"../../../shared/modules/frame\";\nimport MailingAddressForm from \"../ConfirmMailingAddress/MailingAddressForm\";\nimport Details from \"./Details\";\nimport Item from \"./Item\";\nimport Refund from \"./Refund\";\nimport CheckoutForm, { confirmCardPayment } from \"./CheckoutForm\";\nimport { Submit } from \"./Submit\";\nimport { isValidHttpUrl } from \"../../../shared/modules/string\";\nimport { mergeAddress } from \"../../modules/address\";\nimport {\n ignoreEmpty,\n omitDeep,\n useMergeRequestStatus,\n} from \"../../../shared/modules/object\";\nimport { isLocalStorageEnabled } from \"../../../shared/modules/localStorage\";\nimport {\n getAddressError,\n getPaymentNewClientSecret,\n getReshopError,\n} from \"../../../shared/modules/decodeError\";\nimport { calculateReturnMetrics, useEmitMetrics } from \"../../data/emitMetric\";\nimport {\n convertFromDatadogMetrics,\n countingEvent,\n SAVE_PREFERENCES_CHECKED_EVENT,\n SUBMIT_RETURN_SUCCESS_EVENT,\n useAbTesting,\n} from \"../../data/abTesting\";\nimport { useTypeForm } from \"../../contexts/typeForm\";\nimport { useNthReturnsActions } from \"../../contexts/nthContext\";\nimport { useStripeComponents } from \"../../contexts/StripeProvider\";\nimport { getTranslation } from \"../../../shared/modules/config\";\nimport ErrorSnackbar from \"../../components/ErrorSnackbar\";\nimport errorNotifier from \"../../../shared/modules/error-notifier\";\nimport {\n isPreferredMethod,\n toReturnMethodPreference,\n useConsumerPreferences,\n} from \"../../data/consumerPreferences\";\nimport titan from \"../../../shared/modules/titan\";\nimport useConsumerSettings from \"../../hooks/useConsumerSettings\";\nimport { usePreApproval } from \"../../data/preApproval\";\nimport { useUuid } from \"../../../shared/modules/localId\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport useNthFees from \"./useNthFees\";\nimport useNthRefund from \"./useNthRefund\";\nimport { ReviewSummaryRaw } from \"../../ReviewSummary\";\nimport useClaims from \"../../hooks/useClaims\";\nimport useClaimAttestation from \"../../ReviewSummary/components/ClaimAttestation/useClaimAttestation\";\nconst { isStripeEnabled, isRefundAutomationEnabled, isPaymentFlowEnabled } =\n config;\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n marginTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n title: {\n marginBottom: theme.spacing(2),\n },\n submitContainer: {\n marginTop: theme.spacing(4),\n },\n submitButton: {\n marginBottom: theme.spacing(2),\n },\n loadingContainer: {\n marginBottom: theme.spacing(8),\n },\n returnItemsSectionHeader: {\n backgroundColor: theme.palette.action.selected,\n padding: theme.spacing(1),\n },\n errorText: {\n color: theme.palette.error.main,\n },\n }),\n { name: \"N0Review\" },\n);\n\nconst Review = ({ orderFetchData, draftReturnUuid }) => {\n const classes = useStyles();\n const actions = useReturnStepsActions();\n const state = useReturnStepsState();\n const { submitReturn, submitStatus } = useSubmitReturn();\n const { emitMetrics } = useEmitMetrics();\n const abTesting = useAbTesting();\n const claimAttestationProps = useClaimAttestation();\n const { isCertified, signature } = claimAttestationProps;\n const {\n hasClaimItems,\n isClaimReplacement,\n decorateClaimsSubmitPayload,\n transformClaimSelectedItemsForNth,\n } = useClaims();\n\n const { order, returnReasonsById = {} } = orderFetchData;\n const { itemsById } = order;\n\n const { exchangeItems, returnItems } = useMemo(\n () =>\n decorateClaimsSubmitPayload(\n buildItemsByType(state.items, itemsById, returnReasonsById),\n ),\n [itemsById, returnReasonsById, state.items, decorateClaimsSubmitPayload],\n );\n\n const [isErrorSnackbarVisible, setErrorSnackbarVisibility] = useState(false);\n const [capturingPayment, setCapturingPayment] = useState(false);\n const [errorMessage, setErrorMessage] = useState(\n config.translations.return_review_submit_error,\n );\n const [paymentError, setPaymentError] = useState();\n const [succeededPaymentIntentId, setSucceededPaymentIntentId] = useState();\n const selectedReturnMethod = state.selectedReturnMethod;\n const keepTheItemMethod = selectedReturnMethod.id === METHOD_KEEP_THE_ITEM;\n const chosenRefundMethod = isClaimReplacement\n ? state.selectedReturnCreditMethod.originalRefundMethod\n : state?.selectedReturnCreditMethod?.id;\n\n const calculateRefundPayload = {\n exchangeItems: exchangeItems.map(unset(\"returnItem.pictures\")),\n returnItems: returnItems.map(unset(\"pictures\")),\n shopifyOrderId: order.shopifyOrderId,\n draftReturnUuid,\n presentmentCurrency: order.presentmentCurrency,\n shippingPrice: selectedReturnMethod.price,\n shippingMethod: selectedReturnMethod.id,\n carrierServiceName: selectedReturnMethod.carrierService,\n orderNumber: state.orderNumber,\n email: state.email,\n locale,\n chosenRefundMethod,\n fromAddress: ignoreEmpty(state.fromAddress),\n csid: state.csid,\n source: \"review\",\n };\n const {\n refund,\n queryStatus: reviewStatus,\n refetch,\n } = useCalculateRefund(calculateRefundPayload);\n\n const uuid = useUuid();\n const preApprovalReturnUuid =\n config.isReshopEarlyHardApproval &&\n (chosenRefundMethod || refund.chosenRefundMethod) ===\n RETURN_CREDIT_METHOD_RESHOP\n ? uuid\n : undefined;\n const preApprovalHook = usePreApproval({\n ...calculateRefundPayload,\n preApprovalReturnUuid,\n refundCalculated: {\n currency: order.presentmentCurrency,\n cents: state?.selectedReturnCreditMethod?.newPriceCents,\n },\n });\n\n const queryStatus = useMergeRequestStatus(\n reviewStatus,\n preApprovalHook.status,\n );\n\n useEffect(() => {\n if (!queryStatus.loading && preApprovalHook.status.error) {\n setErrorMessage(preApprovalHook.status.error.message);\n setErrorSnackbarVisibility(true);\n\n const available = state.availableReturnCreditMethods.filter(\n (v) => v.id !== chosenRefundMethod,\n );\n const fallback =\n available.find((v) => v.id === RETURN_CREDIT_METHOD_REFUND) ??\n last(available);\n actions.setFallbackReturnCreditMethod(fallback);\n }\n }, [queryStatus.loading, preApprovalHook.status.error]);\n\n const refundMethods = refund.refundMethodsAvailable;\n\n // In case a of failure during backend processing of payment, the backend issues a new payment intent\n // to allow the consumer to restart the process.\n const [\n currentPaymentIntentClientSecret,\n setCurrentPaymentIntentClientSecret,\n ] = useState();\n useEffect(() => {\n setCurrentPaymentIntentClientSecret(refund.paymentClientSecret);\n }, [refund]);\n const setNewPaymentClientSecretFromError = (status) => {\n const newClientSecret = getPaymentNewClientSecret(status?.errorDetail);\n if (newClientSecret) {\n setCurrentPaymentIntentClientSecret(newClientSecret);\n setSucceededPaymentIntentId(null);\n }\n };\n\n const loadingOrCheckoutRedirect =\n submitStatus.loading ||\n (isPaymentFlowEnabled &&\n submitStatus.data &&\n isValidHttpUrl(submitStatus.data));\n\n useEffect(() => {\n if (submitStatus.error) {\n setNewPaymentClientSecretFromError(submitStatus);\n const isReshopError = !!getReshopError(submitStatus.errorDetail);\n setErrorMessage(\n isReshopError\n ? config.translations.return_review_submit_error_reshop\n : get(\n submitStatus,\n \"error\",\n config.translations.return_review_submit_error,\n ),\n );\n return setErrorSnackbarVisibility(true);\n } else {\n setErrorMessage();\n setErrorSnackbarVisibility(false);\n }\n if (submitStatus.loading) return;\n if (!submitStatus.data) return;\n\n if (isPaymentFlowEnabled) {\n const checkoutUrl = submitStatus.data;\n if (isValidHttpUrl(checkoutUrl)) {\n if (isLocalStorageEnabled) {\n console.warn(\n \"nv_shop_now_checkout\",\n window.localStorage.getItem(\"nv_shop_now_checkout\"),\n );\n if (!window.localStorage.getItem(\"nv_shop_now_checkout\")) {\n console.warn(\"setting\", checkoutUrl);\n window.localStorage.setItem(\"nv_shop_now_checkout\", checkoutUrl);\n console.warn(\n \"set\",\n window.localStorage.getItem(\"nv_shop_now_checkout\"),\n );\n }\n }\n return redirectToCheckout(checkoutUrl);\n }\n }\n\n actions.setSubmitSuccess({\n submitResult: submitStatus.data,\n refundTotal: refund.totalRefundCents,\n });\n actions.goToStep(CONFIRMATION_STEP);\n }, [actions, submitStatus]);\n\n const ItemsToReceive = ({ state, exchangeItems = [] }) => {\n return (\n \n {state.items && state.items.length && exchangeItems.length > 0 && (\n \n {config.translations.return_review_receiving_items}\n \n )}\n {state.items\n .filter(\n (item) =>\n item.returnReason &&\n returnReasonsById[item.returnReason] &&\n item.type === \"exchange\",\n )\n .map((item) => {\n const details = itemsById[item.id];\n\n const keepTheItem =\n !keepTheItemMethod && state.keepItemIds.includes(item.id);\n\n return (\n \n );\n })}\n \n );\n };\n\n const ItemsForReturn = ({ state, exchangeItems = [] }) => {\n return (\n \n {state.items && state.items.length && (\n \n {config.translations.return_review_returning_items}\n \n )}\n {state.items\n .filter(\n (item) => item.returnReason && returnReasonsById[item.returnReason],\n )\n .map((item) => {\n const details = itemsById[item.id];\n const keepTheItem =\n !keepTheItemMethod && state.keepItemIds.includes(item.id);\n\n // nested::todo frontend should send untranslated reason ids\n const returnReason = returnReasonsById[item.returnReason];\n const childReturnReasonId = get(\n item,\n \"childReturnReason.returnReason\",\n );\n const childReturnReason = returnReasonsById[childReturnReasonId];\n const fullReturnReason = childReturnReason\n ? `${returnReason.reasonTitle}, ${returnReasonsById[childReturnReasonId].reasonTitle}`\n : returnReason.reasonTitle;\n\n return (\n \n );\n })}\n \n );\n };\n\n const fromAddress = ignoreEmpty(state.fromAddress);\n const submitProps = (overrides) =>\n decorateClaimsSubmitPayload(\n merge(\n {\n locale,\n exchangeItems,\n returnItems,\n orderNumber: state.orderNumber,\n email: state.email,\n location: omitDeep([\"__typename\"], state.location),\n locationId: state.locationId,\n shopifyOrderId: order.shopifyOrderId,\n presentmentCurrency: order.presentmentCurrency,\n shippingPrice: selectedReturnMethod.price,\n shippingMethod: selectedReturnMethod.id,\n carrierServiceName: selectedReturnMethod.carrierService,\n selectedRefundMethod: isRefundAutomationEnabled\n ? chosenRefundMethod || refund.chosenRefundMethod\n : undefined,\n customerPmtId:\n isStripeEnabled && isCharge ? refund.customerPmtId : undefined,\n paymentMethodId: undefined,\n fromAddress,\n csid: state.csid,\n homePickupInstructions: state.homePickupInstructions,\n preApprovalReturnUuid,\n preApprovalId: preApprovalHook.state?.preApprovalId,\n requestedLabelCount: state.requestedLabelCount,\n reshopOptions: showReshopSmsUpdates ? state.reshopOptions : undefined,\n },\n overrides,\n ),\n );\n\n const handleSubmit = (overrides) => {\n if (overrides?.paymentId) setSucceededPaymentIntentId(overrides.paymentId);\n setErrorSnackbarVisibility(false);\n const paymentMethodId =\n isStripeEnabled && isCharge\n ? { paymentMethodId: overrides?.paymentId || succeededPaymentIntentId }\n : {};\n\n const locallyCorrectedFromAddress = ignoreEmpty(overrides?.fromAddress);\n if (locallyCorrectedFromAddress) {\n actions.setCorrectedAddress(locallyCorrectedFromAddress);\n }\n\n const globallyCorrectedFromAddress = ignoreEmpty(state?.fromAddress);\n\n // Enable navigation prompt: \"Are you sure you want to navigate away from this page?\"\n window.onbeforeunload = () => {\n return true;\n };\n\n const validResultCodes = [\n \"ok\", // either a label was generated (98% of returns) or no label was needed\n \"label_retry_enqueued\", // a carrier outage was detected, and a LabelJob has been enqueued\n ];\n\n const verifyAndSetResultCode = function (r) {\n if (!isPlainObject(r)) {\n throw \"Invalid response body from SubmitReturn: expected a plain object\";\n }\n const resultCode = get(r, \"data.submitReturn\");\n if (includes(validResultCodes, resultCode)) {\n actions.setSubmitReturnResultCode(resultCode);\n } else if (resultCode.startsWith(\"http\")) {\n // It is a payment-flow or shop-now URL.\n actions.setSubmitReturnResultCode(null);\n } else {\n throw \"Invalid result code: \" + resultCode;\n }\n };\n\n const variables = submitProps({\n ...paymentMethodId,\n draftReturnUuid,\n fromAddress: locallyCorrectedFromAddress || globallyCorrectedFromAddress,\n });\n submitReturn(variables)\n .then((r) => {\n const metrics = calculateReturnMetrics(\n order,\n variables.selectedRefundMethod,\n state.items,\n state.lineItemIntension,\n refundMethods?.length === 1 &&\n variables.selectedRefundMethod === \"original_payment\",\n );\n emitMetrics(metrics);\n if (config.isNthUi) {\n // success event should submit first, so other revenue metrics can use\n // this as a denominator in growthbook\n abTesting.trackResult(countingEvent(SUBMIT_RETURN_SUCCESS_EVENT));\n const abTestResult = convertFromDatadogMetrics(metrics);\n abTesting.trackResult(abTestResult);\n }\n\n if (config.isUserPreferencesEnabled) {\n abTesting.trackResult(\n countingEvent(\n SAVE_PREFERENCES_CHECKED_EVENT,\n state.savePreferences ? 1 : 0,\n ),\n );\n\n if (preferencesStatus?.profileStatus === \"active\") {\n const method = state.selectedReturnMethod;\n titan.track(\"product_added\", {\n props: {\n list_id: \"pudo_options\",\n product_id: toReturnMethodPreference(method),\n variant: isPreferredMethod(method, consumerPreferences)\n ? \"PREFERRED\"\n : null,\n },\n });\n }\n }\n\n verifyAndSetResultCode(r);\n })\n .finally(() => (window.onbeforeunload = null));\n };\n\n const isTotalNegative = refund.totalRefundCents < 0;\n const paymentIdPresent = !!succeededPaymentIntentId;\n\n const isPreCharge = !!refund.preChargeFeeAmountCents;\n const isCharge =\n (isStripeEnabled || isPaymentFlowEnabled) &&\n (isTotalNegative || isPreCharge);\n const renderCheckout =\n isStripeEnabled && isCharge && !succeededPaymentIntentId;\n\n const checkoutPaymentBroken = useMemo(() => {\n if (!isTotalNegative) return false;\n\n if (isStripeEnabled) {\n return !currentPaymentIntentClientSecret;\n }\n\n return !isPaymentFlowEnabled;\n }, [\n isTotalNegative,\n isStripeEnabled,\n currentPaymentIntentClientSecret,\n isPaymentFlowEnabled,\n ]);\n\n const totalRefundPositive = isTotalNegative\n ? refund.totalRefund.replace(\"-\", \"\")\n : refund.totalRefund;\n\n const titleTranslation = (() => {\n if (returnItems.length && exchangeItems.length) {\n return config.translations.return_review_title_return_and_exchange;\n }\n if (!returnItems.length && exchangeItems.length) {\n return config.translations.return_review_title_exchange;\n }\n return config.translations.return_review_title;\n })();\n\n const Loading = () => (\n \n \n \n \n \n );\n\n const returnItemCount = sumBy(state.items, \"quantity\"); // all return and exchange items count as returning\n const receiveItemCount = sumBy(exchangeItems, \"returnItem.quantity\");\n\n const OrderDetails = () => (\n <>\n \n
\n \n \n \n \n {config.translations.return_review_keep_item_disclaimer}\n \n \n ) : (\n selectedReturnMethod.displayName\n )\n }\n returnMethodDisplayPrice={refund.returnMethodDisplayPrice}\n exchangeShippingFeeDisplayPrice={\n refund.exchangeShippingFeeDisplayPrice\n }\n exchangeShippingFeeDisplayName={refund.exchangeShippingFeeDisplayName}\n isCharge={isCharge}\n isPreCharge={isPreCharge}\n feeBreakdown={refund.feeBreakdown}\n refundMethod={state.selectedReturnCreditMethod.description}\n />\n {renderCheckout && !state.submitted && (\n \n )}\n {!renderCheckout && (\n \n )}\n
\n \n );\n\n const handleCalculateRefundAddressFix = ({ fromAddress }) => {\n actions.setCorrectedAddress(fromAddress);\n refetch({\n ...calculateRefundPayload,\n fromAddress,\n });\n };\n\n /***************************************************************************************************************\n * New design with `nth` components\n ***************************************************************************************************************/\n const useNewDesign = config.isNthUi;\n const typeForm = useTypeForm();\n const activeStep = useReturnStepIsActive(REVIEW_STEP);\n const nthReturnsActions = useNthReturnsActions();\n const { localeFull, includeCurrency } = useConsumerSettings();\n const { stripe, elements: stripeElement } = useStripeComponents();\n const { preferencesStatus, consumerPreferences } = useConsumerPreferences(\n state.guestReturn ? \"\" : state.email,\n );\n\n const nthFees = useNthFees(refund, isCharge);\n\n const nthRefund = useNthRefund(\n refund,\n isCharge,\n nthReturnsActions.returnCart?.refundMethod,\n );\n const handleReviewSummaryChange = (event) => {\n // we won't have email / policy onChange event\n\n // update save preferences\n if (!isNil(event.value?.savePreferences)) {\n actions.setSavePreferences(event.value.savePreferences);\n }\n\n if (!isNil(event.value?.reshopOptions)) {\n setReshopOptionsError(); // clear error message\n actions.setReshopOptions({\n smsUpdates: event.value.reshopOptions.subscribe,\n customerPhone: event.value.reshopOptions.phone,\n });\n }\n };\n useEffect(() => {\n if (config.isUserPreferencesEnabled && !preferencesStatus?.profileStatus) {\n titan.track(\"promotion_viewed\", {\n props: { promotion_id: \"user_preferences\" },\n });\n }\n }, [preferencesStatus?.profileStatus]);\n\n const [reshopOptionsError, setReshopOptionsError] = useState();\n const showReshopSmsUpdates =\n config.isReshopSmsUpdates &&\n state?.selectedReturnCreditMethod?.id === RETURN_CREDIT_METHOD_RESHOP;\n const reshopOptions = useMemo(\n () =>\n showReshopSmsUpdates\n ? {\n subscribe: !!state.reshopOptions.smsUpdates,\n phone: state.reshopOptions.customerPhone ?? \"\",\n error: reshopOptionsError,\n }\n : undefined,\n [showReshopSmsUpdates, state.reshopOptions, reshopOptionsError],\n );\n\n const selectedItems = useMemo(\n () =>\n transformClaimSelectedItemsForNth(nthReturnsActions.selectedItems ?? []),\n [nthReturnsActions.selectedItems],\n );\n\n const submittingAddressError = getAddressError(submitStatus?.errorDetail);\n useEffect(() => {\n if (\n useNewDesign &&\n isErrorSnackbarVisible &&\n errorMessage &&\n !submittingAddressError\n ) {\n typeForm.scrollToActive();\n }\n }, [isErrorSnackbarVisible, errorMessage]);\n const [isNewAddressValid, setIsNewAddressValid] = useState(false);\n const [newAddressDraft, setNewAddressDraft] = useState({});\n\n // calculateRefund could return an `address` error and the frontend\n // will allow the user to provide an address and execute calculateRefund\n // again via `refetch`.\n const addressError = reviewStatus.addressError;\n if (addressError) {\n return (\n \n \n {config.translations.mailing_address_section_title}\n \n \n \n );\n }\n\n if (useNewDesign) {\n if (state.submitted) return null;\n\n const secret = currentPaymentIntentClientSecret;\n const submitting = capturingPayment || loadingOrCheckoutRedirect;\n const hasAddressError = submittingAddressError;\n const hasOtherError =\n isErrorSnackbarVisible && errorMessage && !hasAddressError;\n const stripeAddOn = renderCheckout && !state.submitted && (\n \n );\n\n const errorAddOn = checkoutPaymentBroken && (\n \n \n {getTranslation(\"return_review_payment_invalid_configuration\")}\n \n \n );\n\n const addressCorrectionAddOn = hasAddressError && (\n <>\n \n {\n const { fromAddress, isValid } = event;\n setIsNewAddressValid(isValid);\n setNewAddressDraft(fromAddress);\n }}\n onSubmit={({ fromAddress }) => {\n errorNotifier.warn(\n \"Submit button of should be hidden, but we received onSubmit event\",\n { fromAddress },\n );\n }}\n disable={submittingAddressError.disableFields}\n submitLabel={getTranslation(\"bad_mailing_address_submit\")}\n validateZip={true}\n exclude={[\"phone\", \"submit\"]}\n />\n \n );\n const reminderText =\n exchangeItems.length > 0\n ? getTranslation(\"return_review_reminder_text_exchange\")\n : getTranslation(\"return_review_reminder_text_return\");\n const reminderAddOn = reminderText && (\n {reminderText}\n );\n const validateReshopOptions = () => {\n if (state.reshopOptions.smsUpdates) {\n const phone = state.reshopOptions.customerPhone;\n if (!phone) {\n setReshopOptionsError(\n getTranslation(\n \"return_review_reshop_options_error_customer_phone_required\",\n ),\n );\n return false;\n }\n if (!/^\\d{10}$/.test(phone)) {\n setReshopOptionsError(\n getTranslation(\n \"return_review_reshop_options_error_invalid_customer_phone\",\n ),\n );\n return false;\n }\n }\n setReshopOptionsError();\n return true;\n };\n\n const capturePayment = () => {\n setPaymentError();\n setCapturingPayment(true);\n return confirmCardPayment({ stripe, elements: stripeElement, secret })\n .catch((error) => {\n setPaymentError(error.message ?? error);\n throw new Error(\n getTranslation(\"return_review_payment_processing_error\"),\n );\n })\n .finally(() => {\n setCapturingPayment(false);\n });\n };\n\n const newOnSubmitHandler = async () => {\n try {\n setErrorMessage();\n setErrorSnackbarVisibility(false);\n if (!validateReshopOptions()) return;\n\n if (renderCheckout) {\n const paymentResult = await capturePayment();\n await handleSubmit({\n fromAddress: newAddressDraft,\n ...paymentResult,\n });\n } else {\n await handleSubmit({ fromAddress: newAddressDraft });\n }\n } catch (error) {\n setErrorSnackbarVisibility(true);\n setErrorMessage(error.message ?? error);\n }\n };\n\n // TODO: Add this is adding claims attestation\n // const isClaimsError = hasClaimItems ? !isCertified || !signature : false;\n const isClaimsError = false;\n\n return (\n \n \n {errorMessage} : null}\n loading={queryStatus.loading}\n submitting={submitting}\n disabled={\n submitting ||\n isClaimsError ||\n checkoutPaymentBroken ||\n (hasAddressError && !isNewAddressValid)\n }\n allowRetry\n orderItems={nthReturnsActions.orderData?.items ?? []}\n selectedItems={selectedItems}\n dropOffLocation={\n nthReturnsActions.returnCart?.pudoOption?.selectedDropOff\n ?.dropOffLocation\n }\n fees={nthFees}\n refund={nthRefund}\n returnCart={nthReturnsActions.returnCart}\n hasAssociatedEmail // in order lookup, email address is required, so yes\n savePreferences={\n config.isUserPreferencesEnabled && state.savePreferences\n }\n preferencesStatus={preferencesStatus}\n reshopOptions={reshopOptions}\n hasClaim={hasClaimItems}\n onChange={handleReviewSummaryChange}\n renderAddOn={\n <>\n {stripeAddOn}\n {errorAddOn}\n {addressCorrectionAddOn}\n {reminderAddOn}\n \n }\n onBack={() => {\n actions.goBack();\n typeForm.scrollToActive();\n }}\n onSubmit={newOnSubmitHandler}\n />\n \n \n );\n }\n\n return (\n
\n \n \n \n {titleTranslation}\n \n \n \n {queryStatus.loading ? : }\n
\n );\n};\nexport default Review;\n","import React, { useMemo, useEffect, useState } from \"react\";\nimport { v4 } from \"uuid\";\nimport TypeForm from \"../components/type-form\";\nimport TypeFormSection from \"../components/type-form/TypeFormSection\";\nimport {\n useReturnStepsState,\n getStepIndex,\n ORDER_LOOKUP_STEP,\n useOrderFetchData,\n REVIEW_STEP,\n} from \"../contexts/returnSteps\";\nimport { useShopNowExpiration } from \"../data/shopNowExpiration\";\nimport { useCancelShopNow } from \"../data/cancelShopNow\";\n\nimport OrderLookup from \"./OrderLookup/OrderLookup\";\nimport ChooseItems from \"./ChooseItems/ChooseItems\";\nimport ChooseMethod from \"./ChooseMethod/ChooseMethod\";\nimport ChooseMethodSubstep from \"./ChooseMethodSubstep/ChooseMethodSubstep\";\nimport ConfirmMailingAddress from \"./ConfirmMailingAddress/ConfirmMailingAddress\";\nimport ChooseShopNow from \"./ChooseShopNow/ChooseShopNow\";\nimport ChooseReturnCreditMethod from \"./ChooseReturnCreditMethod/ChooseReturnCreditMethod\";\nimport Review from \"./Review/Review\";\nimport Confirmation from \"./Confirmation/Confirmation\";\nimport TypeFormProvider from \"../contexts/typeForm\";\n\nfunction StepVisibilityWrapper({ children, hasReachedReviewPage }) {\n return (\n
\n {children}\n
\n );\n}\n\nfunction Stepper() {\n const { state, actions } = useOrderFetchData();\n const { state: shopNowState, checkShopNow } = useShopNowExpiration();\n const { state: cancelShopNowState, cancelShopNow } = useCancelShopNow();\n const [draftReturnUuid, setDraftReturnUuid] = useState();\n const stepsState = useReturnStepsState();\n\n useEffect(() => {\n if (draftReturnUuid) return;\n setDraftReturnUuid(() => v4());\n }, []);\n\n const hasReachedReviewPage =\n stepsState.currentStepIndex >= getStepIndex(REVIEW_STEP);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\nexport default Stepper;\n","import React from \"react\";\n\nimport Stepper from \"../steps/Stepper\";\n\nfunction ReturnOrder() {\n return ;\n}\nexport default ReturnOrder;\n","import { Theme } from \"@material-ui/core\";\nimport { makeRootStyles } from \"../theme/styles\";\n\nconst useStyles = makeRootStyles(\n (theme: Theme) => ({\n root: {\n marginTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n },\n loadingContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: 12,\n },\n discountContainer: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n },\n discountInputField: {\n flex: 1,\n maxWidth: \"300px\",\n },\n discountChip: {\n backgroundColor: \"#f3f3f3\",\n padding: \"5px 10px\",\n borderRadius: \"2px\",\n fontSize: \"14px\",\n maxWidth: \"300px\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n },\n discountApplyButton: {\n textTransform: \"none\",\n },\n cartSummaryItemWrapper: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n textBold: {\n fontWeight: \"bold\",\n },\n textGreen: {\n color: theme.palette.success.dark,\n },\n errorText: {\n color: theme.palette.error.main,\n },\n }),\n { name: \"N0Confirm\" },\n);\n\nexport { useStyles };\n","import {\n ExtendedFee,\n ExtendedReturnItemInput,\n RefundMethodOption,\n RefundSummary,\n CurrencyAmount,\n OrderItem,\n} from \"@narvar/nth-kit-returns-headless\";\nimport { config } from \"../../config\";\nimport {\n Amount,\n CartSummary,\n Discount,\n FeeBreakdown,\n LineItem,\n Refund,\n ReturnLineItem,\n} from \"../../../gql/__generated__/schema\";\n\nexport function transformNthCurrency(currency: Amount): CurrencyAmount {\n return {\n currency: currency.currencyCode,\n value: currency.amount,\n };\n}\n\nexport function transformRefund(\n refund: Refund,\n cartSummary: CartSummary,\n shopNowCartSummary: CartSummary,\n): RefundSummary {\n const paymentRequired = (cartSummary?.total?.amount || 0) > 0;\n let refundMethod: RefundMethodOption | undefined = paymentRequired\n ? undefined\n : {\n id: refund.refundMethod,\n type: \"ORIGINAL_PAYMENT\",\n name: refund.refundMethodDisplay,\n description: refund.refundMethodDescription,\n refund: transformNthCurrency(refund.value),\n };\n\n // Adding -ve sign to reflect the refund amount which is expected in nth\n const total = transformNthCurrency({\n ...cartSummary.total,\n amount: -1 * cartSummary.total.amount,\n });\n const subtotal = transformNthCurrency(shopNowCartSummary.subtotal);\n\n return {\n displayAllFees: true,\n hideSubtotal: true,\n total,\n subtotal,\n refundMethod,\n };\n}\n\nexport function transformDiscounts(discounts: Discount[]): ExtendedFee[] {\n return discounts.map((discount) => ({\n //TODO: Add translations\n title:\n discount.targetType === \"SHIPPING_LINE\"\n ? \"Shipping Discount\"\n : \"Order Discount\",\n type: \"SERVICE_FEE\",\n displayAmount: discount.discountAmount.formattedValue,\n amount: {\n value: discount.discountAmount.amount,\n currency: discount.discountAmount.currencyCode,\n },\n }));\n}\n\nexport function transformCredit(credit: Amount): ExtendedFee {\n return {\n title: \"Credits Applied\",\n type: \"LABEL_FEE\",\n displayAmount: credit.formattedValue,\n amount: {\n value: credit.amount,\n currency: credit.currencyCode,\n },\n };\n}\n\nexport function transformFee(fee: FeeBreakdown): ExtendedFee {\n return {\n title: fee.description,\n type: \"LABEL_FEE\",\n displayAmount: fee.formattedValue,\n amount: {\n value: fee.amount,\n currency: fee.currencyCode,\n },\n };\n}\n\nexport function createFee(title: string, fee: Amount): ExtendedFee {\n return {\n title,\n type: \"LABEL_FEE\",\n displayAmount: fee.formattedValue,\n amount: {\n value: fee.amount,\n currency: fee.currencyCode,\n },\n };\n}\n\nexport function transformFees(fees: FeeBreakdown[]): ExtendedFee[] {\n return fees\n .filter(\n (i) =>\n !config.shouldHideNarvarSeamlessExchangeValue ||\n (i.description != \"NARVAR_SEAMLESS_EXCHANGE_VALUE\" &&\n i.description != \"NARVAR_SEAMLESS_EXCHANGE_VALUE_TAX\"),\n )\n .map((fee) => transformFee(fee));\n}\n\nexport function transformOrderItem(item: ReturnLineItem): OrderItem {\n const availableReasons = [\n {\n id: item.returnReason.id,\n name: item.returnReason.name,\n },\n ];\n\n return {\n imageUrl: item.imageUrl,\n itemId: item.id,\n name: item.name ?? \"\",\n availableReturnActions: [],\n price: {\n value: item.price.amount,\n currency: item.price.currencyCode,\n },\n orderedQuantity: item.quantity,\n quantity: item.quantity,\n remainingQuantity: item.quantity,\n eligibilities: {},\n availableReasons,\n };\n}\n\nexport function transformShopNowItem(item: LineItem): OrderItem {\n return {\n imageUrl: item.imageUrl,\n itemId: item.id,\n name: item.name ?? \"\",\n availableReturnActions: [],\n price: {\n value: item.cost.amountPerQuantity.amount,\n currency: item.cost.amountPerQuantity.currencyCode,\n },\n discountedPrice: {\n value: item.cost.discountedAmountPerQuantity.amount,\n currency: item.cost.discountedAmountPerQuantity.currencyCode,\n },\n orderedQuantity: item.quantity,\n quantity: item.quantity,\n remainingQuantity: item.quantity,\n eligibilities: {},\n };\n}\n\nexport function transformOrderItems(items: ReturnLineItem[]): OrderItem[] {\n return items.map(transformOrderItem);\n}\n\nexport function transformShopNowItems(items: LineItem[]): OrderItem[] {\n return items.map(transformShopNowItem);\n}\n\nexport function transformSelectedItem(\n item: ReturnLineItem,\n): ExtendedReturnItemInput {\n return {\n ...transformOrderItem(item),\n reason: {\n id: item.returnReason.id,\n },\n };\n}\n\nexport function transformSelectedItems(\n items: ReturnLineItem[],\n): ExtendedReturnItemInput[] {\n return items.map(transformSelectedItem);\n}\n","import { useMemo } from \"react\";\nimport {\n ExtendedFee,\n ReviewSummaryRenderProps,\n} from \"@narvar/nth-kit-returns-headless\";\nimport {\n createFee,\n transformDiscounts,\n transformFees,\n transformOrderItems,\n transformRefund,\n transformSelectedItems,\n transformShopNowItems,\n} from \"../util/transformToNth\";\nimport {\n Cart,\n ReturnCart,\n ShopNowV2CheckoutQuery,\n} from \"../../../gql/__generated__/schema\";\n\nexport const prepareReturnCartCostFees = (returnCartSummary: ReturnCart) => {\n const returnSubtotal = createFee(\n \"Return Subtotal\",\n returnCartSummary.cartSummary.subtotal,\n );\n const returnTax = createFee(\"Return Tax\", returnCartSummary.cartSummary.tax);\n const returnFees = transformFees(returnCartSummary.feeBreakdown);\n\n return [returnSubtotal, returnTax, ...returnFees];\n};\n\nconst prepareFees = (shopNowCartSummary: Cart): ExtendedFee[] => {\n const cartSubtotal = createFee(\n \"Cart Items\",\n shopNowCartSummary.cartSummary.subtotal,\n );\n const cartTax = createFee(\"Cart Tax\", shopNowCartSummary.cartSummary.tax);\n const cartFees = transformFees(shopNowCartSummary.feeBreakdown);\n\n const discounts = transformDiscounts(\n shopNowCartSummary.cartSummary.discounts ?? [],\n );\n const cartTotal = createFee(\n \"Cart Total\",\n shopNowCartSummary.cartSummary.total,\n );\n\n return [cartSubtotal, cartTax, ...discounts, ...cartFees, cartTotal];\n};\n\ntype TransformToNthProps = Pick<\n ReviewSummaryRenderProps,\n | \"refund\"\n | \"fees\"\n | \"orderItems\"\n | \"selectedItems\"\n | \"shopNowItems\"\n | \"returnCart\"\n>;\n\nconst useTransformToNth = (\n checkoutData: ShopNowV2CheckoutQuery[\"shopNowV2Checkout\"][\"data\"] | null,\n): TransformToNthProps =>\n useMemo(() => {\n if (!checkoutData)\n return {\n fees: [],\n refund: undefined,\n orderItems: [],\n selectedItems: [],\n shopNowItems: [],\n returnCart: undefined,\n };\n const { refund, overallCartSummary, shopNowCart, returnCart } =\n checkoutData;\n\n const nthFees = overallCartSummary ? prepareFees(shopNowCart) : [];\n\n const nthRefund =\n refund && overallCartSummary\n ? transformRefund(refund, overallCartSummary, shopNowCart.cartSummary)\n : undefined;\n\n return {\n fees: nthFees,\n refund: nthRefund,\n orderItems: transformOrderItems(returnCart.lineItems),\n selectedItems: transformSelectedItems(returnCart.lineItems),\n shopNowItems: transformShopNowItems(shopNowCart.lineItems),\n\n //TODO: Remove hardcoded values post integration with API to enable submit button\n returnCart: {\n createdDate: \"\",\n expirationDate: \"\",\n lastUpdatedDate: \"\",\n orderId: \"1\",\n id: \"1\",\n retailerMoniker: \"a\",\n pudoOption: {\n pudoActionType: \"DROP_OFF\",\n pudoActionTypeDetails: \"BOXLESS\",\n },\n },\n };\n }, [checkoutData]);\n\nexport default useTransformToNth;\n","import React, { FC, useMemo, useState } from \"react\";\nimport { clsx } from \"clsx\";\nimport Panel from \"@narvar/nth-block-panel\";\nimport PanelHeader from \"@narvar/nth-bit-panel-header\";\nimport Icon from \"@narvar/nth-bit-icon-button\";\nimport { useStyles } from \"./styles\";\nimport { ReturnCart } from \"app/javascript/gql/__generated__/schema\";\nimport { prepareReturnCartCostFees } from \"./hooks/useTransformToNth\";\nimport useConsumerSettings from \"../hooks/useConsumerSettings\";\nimport { Currency, ExtendedFee } from \"@narvar/nth-kit-returns-headless\";\n\ninterface CostItemProps {\n label: string;\n fee: ExtendedFee;\n isStrong?: boolean;\n isGreen?: boolean;\n}\n\nexport const CostItem: FC = ({\n label,\n fee,\n isStrong = false,\n isGreen = false,\n}) => {\n const { localeFull, includeCurrency } = useConsumerSettings();\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n const styles: any = useStyles();\n\n const classes = clsx({\n [styles.cartSummaryItemWrapper]: true,\n [styles.textBold]: isStrong,\n [styles.textGreen]: isGreen,\n });\n return (\n
\n {label}\n \n \n \n
\n );\n};\n\ninterface ReturnCostPanelHeaderProps {\n returnCartSummary?: ReturnCart;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nconst ReturnCostPanelHeader: FC = ({\n returnCartSummary,\n open,\n setOpen,\n}) => {\n const { localeFull, includeCurrency } = useConsumerSettings();\n return (\n \n \n \n \n \n \n \n \n
\n Return Credits\n
\n \n setOpen(!open)}>\n \n {open ? : }\n \n \n
\n
\n
\n );\n};\n\ninterface ReturnCartCostPanelProps {\n returnCartSummary?: ReturnCart;\n}\n\nconst ReturnCartCostPanel: FC = ({\n returnCartSummary,\n}) => {\n const [open, setOpen] = useState(false);\n const fees = useMemo(() => {\n if (!returnCartSummary) {\n return null;\n }\n return prepareReturnCartCostFees(returnCartSummary);\n }, [returnCartSummary]);\n\n return (\n \n }\n collapsible\n open={open}>\n
    \n {fees?.map((fee, index) => (\n
  • \n \n
  • \n ))}\n
\n \n );\n};\n\nexport default ReturnCartCostPanel;\n","import { gql } from \"@apollo/client\";\nimport * as Apollo from \"@apollo/client\";\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = {\n [K in keyof T]: T[K];\n};\nexport type MakeOptional = Omit & {\n [SubKey in K]?: Maybe;\n};\nexport type MakeMaybe = Omit & {\n [SubKey in K]: Maybe;\n};\nconst defaultOptions = {} as const;\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n ISO8601DateTime: any;\n};\n\nexport type Address = {\n __typename?: \"Address\";\n address1: Scalars[\"String\"];\n address2?: Maybe;\n city: Scalars[\"String\"];\n company?: Maybe;\n country: Scalars[\"String\"];\n countryCodeV2: Scalars[\"String\"];\n firstName: Scalars[\"String\"];\n lastName: Scalars[\"String\"];\n latitude?: Maybe;\n longitude?: Maybe;\n name: Scalars[\"String\"];\n phone?: Maybe;\n province?: Maybe;\n provinceCode?: Maybe;\n zipcode?: Maybe;\n};\n\nexport type Amount = {\n __typename?: \"Amount\";\n amount: Scalars[\"Int\"];\n currencyCode: Scalars[\"String\"];\n formattedValue: Scalars[\"String\"];\n};\n\nexport type Cart = {\n __typename?: \"Cart\";\n billingAddress: Address;\n cartSummary: CartSummary;\n feeBreakdown: Array;\n lineItems: Array;\n shippingAddress: Address;\n totalQuantity: Scalars[\"Int\"];\n};\n\nexport type CartSummary = {\n __typename?: \"CartSummary\";\n discountCodes?: Maybe>;\n discounts?: Maybe>;\n shopNowCredit?: Maybe;\n subtotal: Amount;\n tax: Amount;\n total: Amount;\n};\n\nexport type ChangeRefundMethod = {\n __typename?: \"ChangeRefundMethod\";\n success: Scalars[\"Boolean\"];\n};\n\nexport type Checkout = {\n __typename?: \"Checkout\";\n feeBreakdown: Array;\n overallCartSummary: CartSummary;\n payment?: Maybe;\n refund: Refund;\n returnCart: ReturnCart;\n shopNowCart: Cart;\n};\n\nexport type CheckoutComplete = {\n __typename?: \"CheckoutComplete\";\n message: Scalars[\"String\"];\n};\n\nexport type CheckoutCompleteInput = {\n /** Shopify cart token */\n cartToken: Scalars[\"String\"];\n /** Current shop now session encrypted code */\n code: Scalars[\"String\"];\n /** Payment parameters */\n payment?: InputMaybe;\n};\n\nexport type CheckoutCompleteResult = {\n __typename?: \"CheckoutCompleteResult\";\n data?: Maybe;\n errors: Array;\n};\n\nexport type CheckoutResult = {\n __typename?: \"CheckoutResult\";\n data?: Maybe;\n errors: Array;\n};\n\nexport type ConsumerProfile = {\n __typename?: \"ConsumerProfile\";\n profileId: Scalars[\"String\"];\n};\n\nexport type CreateDirectUploadInput = {\n /** File size (bytes) */\n byteSize: Scalars[\"Int\"];\n /** MD5 file checksum as base64 */\n checksum: Scalars[\"String\"];\n /** File content type */\n contentType: Scalars[\"String\"];\n /** Original file name */\n filename: Scalars[\"String\"];\n};\n\nexport type Credit = {\n __typename?: \"Credit\";\n total: Amount;\n used: Amount;\n};\n\nexport type CustomerMutation = {\n __typename?: \"CustomerMutation\";\n applyDiscountCode: DiscountCodeResult;\n cancelReturn: Scalars[\"String\"];\n changeRefundMethod: ChangeRefundMethod;\n createDirectUpload: DirectUpload;\n emitMetrics: Scalars[\"Boolean\"];\n /** Set user preferences for returns, e.g. preferred return method */\n setUserPreferences: Scalars[\"String\"];\n shopNowAbort: ShopNowAbort;\n shopNowV2Checkout: CheckoutCompleteResult;\n submitReturn: Scalars[\"String\"];\n};\n\nexport type CustomerMutationApplyDiscountCodeArgs = {\n cartToken: Scalars[\"String\"];\n code: Scalars[\"String\"];\n couponCodes: Array;\n};\n\nexport type CustomerMutationCancelReturnArgs = {\n email?: InputMaybe;\n orderNumber?: InputMaybe;\n returnId?: InputMaybe;\n shopId?: InputMaybe;\n};\n\nexport type CustomerMutationChangeRefundMethodArgs = {\n note?: InputMaybe;\n refundMethod: Scalars[\"String\"];\n returnHashid: Scalars[\"String\"];\n};\n\nexport type CustomerMutationCreateDirectUploadArgs = {\n input: CreateDirectUploadInput;\n};\n\nexport type CustomerMutationEmitMetricsArgs = {\n metricEmissions: Array;\n};\n\nexport type CustomerMutationSetUserPreferencesArgs = {\n email: Scalars[\"String\"];\n orderId: Scalars[\"String\"];\n userPreferences: UserPreferencesInput;\n};\n\nexport type CustomerMutationShopNowAbortArgs = {\n refundMethod: Scalars[\"String\"];\n returnId: Scalars[\"String\"];\n};\n\nexport type CustomerMutationShopNowV2CheckoutArgs = {\n checkout: CheckoutCompleteInput;\n};\n\nexport type CustomerMutationSubmitReturnArgs = {\n api?: InputMaybe;\n carrierServiceName?: InputMaybe;\n csid?: InputMaybe;\n customerPmtId?: InputMaybe;\n draftReturnUuid?: InputMaybe;\n email: Scalars[\"String\"];\n exchangeItems: Array;\n fromAddress?: InputMaybe;\n homePickupInstructions?: InputMaybe;\n locale?: InputMaybe;\n location?: InputMaybe;\n locationId?: InputMaybe;\n orderNumber: Scalars[\"String\"];\n paymentMethodId?: InputMaybe;\n preApprovalId?: InputMaybe;\n preApprovalReturnUuid?: InputMaybe;\n presentmentCurrency: Scalars[\"String\"];\n requestedLabelCount?: InputMaybe;\n reshopOptions?: InputMaybe;\n returnItems: Array;\n selectedRefundMethod?: InputMaybe;\n shippingMethod: Scalars[\"String\"];\n shippingPrice?: InputMaybe;\n shopNow?: InputMaybe;\n shopifyOrderId: Scalars[\"String\"];\n};\n\nexport type CustomerQuery = {\n __typename?: \"CustomerQuery\";\n /** Calculates outcomes for various refund methods: original payment, gift card, shop now, etc. Usually the calculated outcome is treated as an estimate, and the actual calculation happens in SubmitReturn. However, the outcomes are persisted, and in the case of shop now abort (SHOPZ-2715), the persisted outcome will be applied. */\n calculateRefund: RefundEstimate;\n checkShopNowExpiration?: Maybe;\n /** Returns the configured branding */\n configuredBranding: ShopBranding;\n evenExchangeProduct?: Maybe;\n /** Returns all available rule definitions for given rule type */\n getReturnRuleConditionDefinitions: Array;\n /** return all states of a country */\n listStatesOfCountryCode: Array;\n order?: Maybe;\n /** The first use case will be Reshop's \"hard\" pre-approval (SHOPZ-2531) but we expect there will be other types of pre-approval in the future. */\n preApproval: PreApproval;\n /** Returns History Info */\n returnHistory: Array;\n /** Returns the configured Return Locations for the shop */\n returnLocations: Array;\n /** Returns the configured Return Methods for the shop */\n returnMethods: Array;\n /** Returns the configured Return Reasons for the shop */\n returnReasons: Array;\n shopNowSession?: Maybe;\n shopNowV2Checkout: CheckoutResult;\n /** Returns Tracking Info for a given return ID */\n trackingInfo: TrackingInfo;\n translations: Array;\n /** The returns-related user preferences for the given user. See /doc/features/consumer_preferences/overview.md */\n userPreferences: UserPreferences;\n};\n\nexport type CustomerQueryCalculateRefundArgs = {\n carrierServiceName?: InputMaybe;\n chosenRefundMethod?: InputMaybe;\n csid?: InputMaybe;\n draftReturnUuid?: InputMaybe;\n email: Scalars[\"String\"];\n exchangeItems: Array;\n fromAddress?: InputMaybe;\n locale?: InputMaybe;\n orderNumber: Scalars[\"String\"];\n presentmentCurrency: Scalars[\"String\"];\n returnItems: Array;\n shippingMethod?: InputMaybe;\n shippingPrice?: InputMaybe;\n shopId?: InputMaybe;\n shopifyOrderId: Scalars[\"String\"];\n};\n\nexport type CustomerQueryCheckShopNowExpirationArgs = {\n cancel?: InputMaybe;\n code: Scalars[\"String\"];\n};\n\nexport type CustomerQueryEvenExchangeProductArgs = {\n compareAtPrice?: InputMaybe;\n countryCode?: InputMaybe;\n currency?: InputMaybe;\n locale?: InputMaybe;\n price: Scalars[\"Float\"];\n productId: Scalars[\"String\"];\n query: Scalars[\"String\"];\n showProduct?: InputMaybe;\n variantId?: InputMaybe;\n};\n\nexport type CustomerQueryGetReturnRuleConditionDefinitionsArgs = {\n ruleType: Rule;\n};\n\nexport type CustomerQueryListStatesOfCountryCodeArgs = {\n countryCode: Scalars[\"String\"];\n locale?: InputMaybe;\n};\n\nexport type CustomerQueryOrderArgs = {\n csid?: InputMaybe;\n email: Scalars[\"String\"];\n giftCode?: InputMaybe;\n guestReturn?: InputMaybe;\n locale?: InputMaybe;\n orderNumber: Scalars[\"String\"];\n zipcode?: InputMaybe;\n};\n\nexport type CustomerQueryPreApprovalArgs = {\n preApprovalInput: PreApprovalInput;\n};\n\nexport type CustomerQueryReturnHistoryArgs = {\n email: Scalars[\"String\"];\n orderNumber: Scalars[\"String\"];\n};\n\nexport type CustomerQueryReturnLocationsArgs = {\n carrier: Scalars[\"String\"];\n consolidationRadius?: InputMaybe;\n countryCode: Scalars[\"String\"];\n locale?: InputMaybe;\n qr?: InputMaybe;\n zipcode: Scalars[\"String\"];\n};\n\nexport type CustomerQueryReturnMethodsArgs = {\n csid?: InputMaybe;\n draftReturnUuid?: InputMaybe;\n email: Scalars[\"String\"];\n exchangeItems: Array;\n fromAddress?: InputMaybe;\n locale?: InputMaybe;\n orderNumber: Scalars[\"String\"];\n presentmentCurrency?: InputMaybe;\n returnItems: Array;\n shopId?: InputMaybe;\n shopifyOrderId?: InputMaybe;\n};\n\nexport type CustomerQueryReturnReasonsArgs = {\n limit?: InputMaybe;\n locale?: InputMaybe;\n offset?: InputMaybe;\n};\n\nexport type CustomerQueryShopNowSessionArgs = {\n code: Scalars[\"String\"];\n};\n\nexport type CustomerQueryShopNowV2CheckoutArgs = {\n cartToken: Scalars[\"String\"];\n code: Scalars[\"String\"];\n};\n\nexport type CustomerQueryTrackingInfoArgs = {\n returnId: Scalars[\"String\"];\n trackingNumber: Scalars[\"String\"];\n};\n\nexport type CustomerQueryTranslationsArgs = {\n categories: Array;\n locale?: InputMaybe;\n};\n\nexport type CustomerQueryUserPreferencesArgs = {\n email: Scalars[\"String\"];\n};\n\n/** Represents direct upload credentials */\nexport type DirectUpload = {\n __typename?: \"DirectUpload\";\n /** Created blob record ID */\n blobId: Scalars[\"ID\"];\n /** HTTP request headers (JSON-encoded) */\n headers: Scalars[\"String\"];\n /** Created blob record signed ID */\n signedBlobId: Scalars[\"ID\"];\n /** Upload URL */\n url: Scalars[\"String\"];\n};\n\nexport type Discount = {\n __typename?: \"Discount\";\n discountAmount: Amount;\n targetType: Scalars[\"String\"];\n};\n\nexport type DiscountCodeResult = {\n __typename?: \"DiscountCodeResult\";\n data?: Maybe;\n errors: Array;\n};\n\nexport type DisplayStateTransition = {\n __typename?: \"DisplayStateTransition\";\n byUser?: Maybe;\n description?: Maybe;\n rmaEnabled?: Maybe;\n status?: Maybe;\n timelineItemType: Scalars[\"String\"];\n timestamp?: Maybe;\n};\n\n/** Dropoff Location. See doc/features/locations/drop_off_locations.md */\nexport type DropoffLocationInput = {\n id?: InputMaybe;\n latitude?: InputMaybe;\n logoUrl?: InputMaybe;\n longitude?: InputMaybe;\n storeAddress?: InputMaybe;\n storeName?: InputMaybe;\n storeName2?: InputMaybe;\n};\n\n/** Exchange Item Input Type */\nexport type ExchangeItemInput = {\n newProductId: Scalars[\"String\"];\n newProductImage?: InputMaybe;\n newProductName?: InputMaybe;\n newProductPriceAmount?: InputMaybe;\n newProductPriceCurrency?: InputMaybe;\n newProductSku?: InputMaybe;\n newProductVariantId: Scalars[\"String\"];\n newProductVariantInfo: Array;\n returnItem: ReturnCalculationInput;\n};\n\nexport type ExchangeItemVariantInfo = {\n name: Scalars[\"String\"];\n value: Scalars[\"String\"];\n};\n\nexport type Fee = {\n __typename?: \"Fee\";\n /** Three-letter code, ISO-4217. Example: \"BHD\" */\n currency: Scalars[\"String\"];\n /** Examples: \"Return Fee\", \"Frais de retour par défaut\" */\n description?: Maybe;\n displayWithReturnMethod?: Maybe;\n /** Currency subunit. Example: 123.0 means $1.23 */\n fee: Scalars[\"Float\"];\n /** The type of fee this represents: \"shipping\", \"handling\", or \"return\" */\n feeType?: Maybe;\n formattedFee?: Maybe;\n formattedFeeWithCurrency?: Maybe;\n /** See \"tax_code\" in doc/features/shop_automation/refund/fees.md */\n taxCode?: Maybe;\n};\n\nexport type FeeBreakdown = {\n __typename?: \"FeeBreakdown\";\n amount: Scalars[\"Float\"];\n currencyCode: Scalars[\"String\"];\n description: Scalars[\"String\"];\n displayWithReturnMethod: Scalars[\"Boolean\"];\n formattedValue: Scalars[\"String\"];\n shopNowClawback: Scalars[\"Boolean\"];\n taxCode?: Maybe;\n};\n\n/** Return Method input */\nexport type FromAddressInput = {\n address1: Scalars[\"String\"];\n address2?: InputMaybe;\n city: Scalars[\"String\"];\n company?: InputMaybe;\n country?: InputMaybe;\n countryCode?: InputMaybe;\n countryCodeV2: Scalars[\"String\"];\n firstName: Scalars[\"String\"];\n lastName: Scalars[\"String\"];\n name?: InputMaybe;\n phone?: InputMaybe;\n province?: InputMaybe;\n provinceCode?: InputMaybe;\n zip: Scalars[\"String\"];\n};\n\n/** Generic Address */\nexport type GenericAddressInput = {\n address1: Scalars[\"String\"];\n address2?: InputMaybe;\n city: Scalars[\"String\"];\n company?: InputMaybe;\n country?: InputMaybe;\n countryCode?: InputMaybe;\n countryCodeV2?: InputMaybe;\n firstName?: InputMaybe;\n lastName?: InputMaybe;\n name?: InputMaybe;\n phone?: InputMaybe;\n province?: InputMaybe;\n provinceCode?: InputMaybe;\n state?: InputMaybe;\n zip: Scalars[\"String\"];\n};\n\nexport type LineItem = {\n __typename?: \"LineItem\";\n cost: LineItemCost;\n discounts: Array;\n id?: Maybe;\n imageUrl?: Maybe;\n name: Scalars[\"String\"];\n price: Amount;\n productId: Scalars[\"String\"];\n quantity: Scalars[\"Int\"];\n title: Scalars[\"String\"];\n variantId: Scalars[\"String\"];\n};\n\nexport type LineItemCost = {\n __typename?: \"LineItemCost\";\n amountPerQuantity: Amount;\n discountedAmountPerQuantity: Amount;\n subtotal: Amount;\n total: Amount;\n};\n\nexport type MetricEmissionInput = {\n /**\n * Must use ISO-4217 3-Alpha. If a code is given, value will be converted\n * to USD (whole dollars), and “_usd” will be appended to the final metric\n * name.\n *\n */\n currencyCode?: InputMaybe;\n /**\n * Must match /^[_a-z]+$/. Given a suffix \"foo\", the final\n * metric name will be \"narvar.zero.shopify.frontend.foo\".\n *\n */\n metricNameSuffix: Scalars[\"String\"];\n /**\n * For now, must be \"count\". In the future, other metric types may be\n * supported.\n *\n */\n metricType: Scalars[\"String\"];\n /**\n * Fractional monetary values, eg. cents, are not supported. Round off to\n * the nearest whole currency unit, e.g. dollar.\n *\n */\n value: Scalars[\"Int\"];\n};\n\n/** A monetary value */\nexport type Money = {\n __typename?: \"Money\";\n /** Value in smallest currency unit, e.g. JPY */\n cents: Scalars[\"Int\"];\n /** 3-character currency code */\n currency: Scalars[\"String\"];\n /** Value in dollars */\n dollars: Scalars[\"Float\"];\n /** Display string of the value */\n formattedAmount: Scalars[\"String\"];\n};\n\n/** A monetary value */\nexport type MoneyInput = {\n /** Value in smallest currency unit, e.g. JPY */\n cents: Scalars[\"Int\"];\n /** 3-character currency code */\n currency: Scalars[\"String\"];\n};\n\nexport type Payment = {\n __typename?: \"Payment\";\n customerPmtId: Scalars[\"String\"];\n paymentClientSecret: Scalars[\"String\"];\n paymentGateway: Scalars[\"String\"];\n paymentGatewayDisplay: Scalars[\"String\"];\n value: Amount;\n};\n\nexport type PaymentInput = {\n /** Payment gateway i.e stripe */\n gateway: Scalars[\"String\"];\n /** Payment intent id */\n paymentIntentId: Scalars[\"String\"];\n};\n\nexport type PreApproval = {\n __typename?: \"PreApproval\";\n result?: Maybe;\n userErrors: Array;\n};\n\nexport type PreApprovalInput = {\n email: Scalars[\"String\"];\n exchangeItems: Array;\n orderNumber: Scalars[\"String\"];\n /** A UUID identifying the nascent Return. For Reshop, this is used as the external_id. Prior to SHOPZ-2531, we used the RMA number as the external_id. Now we must use a UUID, because the RMA number has not yet been generated. */\n preApprovalReturnUuid: Scalars[\"String\"];\n /** The value, from calculateRefund, of the refund method selected by the consumer */\n refundCalculated: MoneyInput;\n reshopOptions?: InputMaybe;\n returnItems: Array;\n};\n\nexport type PreApprovalResult = {\n __typename?: \"PreApprovalResult\";\n /** The ID provided by the relevant pre-approval feature, e.g. Reshop */\n preApprovalId: Scalars[\"String\"];\n};\n\nexport type ProductVariantOptions = {\n __typename?: \"ProductVariantOptions\";\n name: Scalars[\"String\"];\n position: Scalars[\"Int\"];\n values: Array;\n};\n\nexport type Refund = {\n __typename?: \"Refund\";\n refundMethod: Scalars[\"String\"];\n refundMethodDescription: Scalars[\"String\"];\n refundMethodDisplay: Scalars[\"String\"];\n value: Amount;\n};\n\nexport type RefundEstimate = {\n __typename?: \"RefundEstimate\";\n chosenRefundMethod?: Maybe;\n connectedStripeAccount?: Maybe;\n currency: Scalars[\"String\"];\n customerPmtId?: Maybe;\n exchangeShippingFeeDisplayName?: Maybe;\n exchangeShippingFeeDisplayPrice?: Maybe;\n feeBreakdown: Array;\n giftCardTotalRefund?: Maybe;\n giftCardTotalRefundCents?: Maybe;\n originalPaymentTotalRefund?: Maybe;\n originalPaymentTotalRefundCents?: Maybe;\n originalShippingRefunded?: Maybe;\n originalShippingRefundedDisplayAmt?: Maybe;\n paymentClientSecret?: Maybe;\n preChargeFeeAmountCents?: Maybe;\n priorRefundsDisplayAmt?: Maybe;\n refundLineItems: Array;\n refundMethodsAvailable?: Maybe>;\n returnMethodDisplayPrice?: Maybe;\n shippingCost: Scalars[\"String\"];\n shopNowAvailable?: Maybe;\n shopNowTotalRefund?: Maybe;\n shopNowTotalRefundCents?: Maybe;\n subtotalRefund: Scalars[\"String\"];\n subtotalRefundCents: Scalars[\"Float\"];\n taxesIncluded: Scalars[\"Boolean\"];\n totalRefund: Scalars[\"String\"];\n totalRefundCents: Scalars[\"Float\"];\n totalTax: Scalars[\"String\"];\n totalTaxDisplayAmt: Scalars[\"String\"];\n transactions: Array;\n};\n\nexport type RefundLineItem = {\n __typename?: \"RefundLineItem\";\n discountedPrice: Scalars[\"String\"];\n lineItemId: Scalars[\"String\"];\n locationId?: Maybe;\n price: Scalars[\"String\"];\n quantity: Scalars[\"Int\"];\n refundTotalPrice: Scalars[\"String\"];\n restockType: Scalars[\"String\"];\n subtotal: Scalars[\"String\"];\n totalCartDiscountAmount: Scalars[\"String\"];\n totalTax: Scalars[\"String\"];\n};\n\nexport type RefundMethod = {\n __typename?: \"RefundMethod\";\n refundCents?: Maybe;\n refundFormatted?: Maybe;\n refundMethod: Scalars[\"String\"];\n refundMethodDescription: Scalars[\"String\"];\n /**\n * gift_card or reshop. The frontend will use this information to visually distinguish a Reshop Refund Method from the normal gift-card Refund Method.\n * @deprecated As of SHOPZ-2516, use refund_method instead\n */\n refundMethodGiftCardType?: Maybe;\n};\n\nexport type RefundTransaction = {\n __typename?: \"RefundTransaction\";\n amount: Scalars[\"String\"];\n currency: Scalars[\"String\"];\n gateway: Scalars[\"String\"];\n maximumRefundable: Scalars[\"String\"];\n parentId: Scalars[\"String\"];\n};\n\nexport type Region = {\n __typename?: \"Region\";\n region: Scalars[\"String\"];\n regionCode: Scalars[\"String\"];\n};\n\n/** Reshop Options input */\nexport type ReshopOptionsInput = {\n customerPhone?: InputMaybe;\n smsUpdates: Scalars[\"Boolean\"];\n};\n\nexport type Return = {\n __typename?: \"Return\";\n amountFromPriorRefunds?: Maybe;\n availableStatuses?: Maybe>;\n cancellable?: Maybe;\n carrierTrackingNumber?: Maybe;\n currentStatus: Scalars[\"String\"];\n customerEmail?: Maybe;\n customerName?: Maybe;\n customerPhone?: Maybe;\n displayError?: Maybe;\n displayStateTransitions?: Maybe>;\n errorMessage?: Maybe;\n exchangeDraftOrderId?: Maybe;\n exchangeOrderId?: Maybe;\n /** Frontend-safe subset of the shop flags at the time the return was created */\n featureFlags?: Maybe>;\n feeBreakdown?: Maybe>;\n guestReturn?: Maybe;\n id: Scalars[\"String\"];\n isCsInitiated?: Maybe;\n isNarvarExchangeCreditOrder?: Maybe;\n isShopNowReturn?: Maybe;\n lastModified: Scalars[\"ISO8601DateTime\"];\n notes?: Maybe;\n orderDate: Scalars[\"ISO8601DateTime\"];\n orderId?: Maybe;\n originalShippingRefundedValue: Scalars[\"String\"];\n paymentCaptured?: Maybe;\n paymentRequired?: Maybe;\n preChargeFeeAmount?: Maybe;\n previousVersions?: Maybe>;\n qrCodeUrl?: Maybe;\n refundAmountCurrency?: Maybe;\n refundAutomationState?: Maybe;\n refundMethod?: Maybe;\n refundSubtotalDisplayValue: Scalars[\"String\"];\n refundTotalDisplayValue: Scalars[\"String\"];\n reshopRefundId?: Maybe;\n returnDate?: Maybe;\n returnItems: Array;\n /** URL of PDF containing the PSSLs from each ReturnShipment, concatenated. Null for non-carrier returns, like return_in_store, and keep_the_item. */\n returnLabel?: Maybe;\n returnMethod?: Maybe;\n returnMethodCarrierService?: Maybe;\n returnShipments: Array;\n returnStatusUpdatedAt?: Maybe;\n rmaNumber?: Maybe;\n shippingFeesDisplayValue: Scalars[\"String\"];\n shopifyOrderId: Scalars[\"String\"];\n taxDisplayValue: Scalars[\"String\"];\n};\n\n/** Return Method input */\nexport type ReturnCalculationInput = {\n childReturnReason?: InputMaybe;\n childReturnReasonId?: InputMaybe;\n comment?: InputMaybe;\n lineItemId: Scalars[\"String\"];\n pictures?: InputMaybe>;\n quantity: Scalars[\"Int\"];\n returnReason: Scalars[\"String\"];\n returnReasonId: Scalars[\"String\"];\n};\n\nexport type ReturnCart = {\n __typename?: \"ReturnCart\";\n cartSummary: CartSummary;\n feeBreakdown: Array;\n lineItems: Array;\n};\n\nexport type ReturnDashboardDisplayError = {\n __typename?: \"ReturnDashboardDisplayError\";\n message?: Maybe;\n timestamp?: Maybe;\n};\n\nexport type ReturnItem = {\n __typename?: \"ReturnItem\";\n childReturnReasonCode?: Maybe;\n comment?: Maybe;\n customerPictures?: Maybe>;\n displayTotalIncludingTaxAndDuties?: Maybe;\n id: Scalars[\"String\"];\n isExchange?: Maybe;\n itemId?: Maybe;\n itemName?: Maybe;\n itemReturnStatus: Array;\n newProductImage?: Maybe;\n newProductName?: Maybe;\n newProductSku?: Maybe;\n productId?: Maybe;\n productImageUrl?: Maybe;\n purchasePrice?: Maybe;\n quantity?: Maybe;\n refundPrice?: Maybe;\n returnReason?: Maybe;\n returnReasonCode?: Maybe;\n sku?: Maybe;\n variantId?: Maybe;\n};\n\nexport type ReturnItemStatus = {\n __typename?: \"ReturnItemStatus\";\n qty?: Maybe;\n status?: Maybe;\n updatedAt?: Maybe;\n};\n\nexport type ReturnItemVersion = {\n __typename?: \"ReturnItemVersion\";\n /** The time of version-record creation. */\n createdAt: Scalars[\"ISO8601DateTime\"];\n id: Scalars[\"String\"];\n /** The attributes of the ReturnItem at the time of version-record creation */\n item: ReturnItemVersionItem;\n};\n\n/** The attributes of the ReturnItem at the time of version-record creation */\nexport type ReturnItemVersionItem = {\n __typename?: \"ReturnItemVersionItem\";\n childReturnReason?: Maybe;\n childReturnReasonCode?: Maybe;\n comment?: Maybe;\n isExchange?: Maybe;\n keepItem?: Maybe;\n name?: Maybe;\n newProductId?: Maybe;\n newProductName?: Maybe;\n newProductSku?: Maybe;\n newProductVariantId?: Maybe;\n originalReturnReason?: Maybe;\n productType?: Maybe;\n quantity?: Maybe;\n refundLineItemSubtotal?: Maybe;\n refundLineItemTotalCartDiscountAmount?: Maybe;\n refundLineItemTotalTax?: Maybe;\n returnReason?: Maybe;\n returnReasonCode?: Maybe;\n shopifyItemId?: Maybe;\n shopifyVariantId?: Maybe;\n sku?: Maybe;\n unitDiscountPresentmentAmount?: Maybe;\n unitDiscountShopAmount?: Maybe;\n unitDiscountedPresentmentAmount?: Maybe;\n unitDiscountedShopAmount?: Maybe;\n unitFinalPresentmentAmount?: Maybe;\n unitFinalShopAmount?: Maybe;\n unitOriginalPresentmentAmount?: Maybe;\n unitOriginalShopAmount?: Maybe;\n unitPrice?: Maybe;\n unitTaxAndDutyRefundPresentmentAmount?: Maybe;\n unitTaxAndDutyRefundShopAmount?: Maybe;\n};\n\nexport type ReturnLineItem = {\n __typename?: \"ReturnLineItem\";\n id: Scalars[\"String\"];\n imageUrl?: Maybe;\n name: Scalars[\"String\"];\n price: Amount;\n productId: Scalars[\"String\"];\n quantity: Scalars[\"Int\"];\n returnReason: ReturnReasonHash;\n title: Scalars[\"String\"];\n variantId: Scalars[\"String\"];\n};\n\nexport type ReturnLocation = {\n __typename?: \"ReturnLocation\";\n acceptInStoreReturns: Scalars[\"Boolean\"];\n acceptMailInReturns: Scalars[\"Boolean\"];\n id: Scalars[\"String\"];\n latitude?: Maybe;\n logoUrl?: Maybe;\n longitude?: Maybe;\n shopifyLocationId?: Maybe;\n storeAddress?: Maybe;\n storeDistance?: Maybe;\n storeName?: Maybe;\n storeName2?: Maybe;\n};\n\nexport type ReturnLocationAddress = {\n __typename?: \"ReturnLocationAddress\";\n address1?: Maybe;\n address2?: Maybe;\n city?: Maybe;\n latitude?: Maybe;\n longitude?: Maybe;\n phone?: Maybe;\n state?: Maybe;\n zip?: Maybe;\n};\n\nexport type ReturnMethod = {\n __typename?: \"ReturnMethod\";\n carrierId?: Maybe;\n /** The name of a carrier (e.g. \"USPS\" for \"usps_returns\"). Nullable when doing return in store. */\n carrierName?: Maybe;\n /** The name of a carrier's service type ex. 'UPS Mail Innovations'. Nullable when doing return in store. */\n carrierService?: Maybe;\n /** The radius in miles for consolidation. Will be used in GetReturnLocations query to get all return location within this radius. */\n consolidationRadius?: Maybe;\n displayDescription: Scalars[\"String\"];\n /** The display name of the return method e.g. \"Drop Off at the Post Office\", \"Return in Store\", \"Use My Own Carrier\". */\n displayName: Scalars[\"String\"];\n displayPrice?: Maybe;\n feeBreakdown: Array;\n id: Scalars[\"ID\"];\n keepAllItems: Scalars[\"Boolean\"];\n keepItemIds?: Maybe>;\n /** Max labels the consumer is allowed to request. See multi_label_consumer_request feature flag. Value is nil when this shop setting does not apply to this return method, for example Ship on Your Own. */\n maxLabelRequests?: Maybe;\n price: Scalars[\"Float\"];\n qr?: Maybe;\n returnMethodDisplayPrice?: Maybe;\n shouldDisplayLocations: Scalars[\"Boolean\"];\n};\n\nexport type ReturnReason = {\n __typename?: \"ReturnReason\";\n csOnly: Scalars[\"Boolean\"];\n enableCustomerPictures?: Maybe;\n id: Scalars[\"String\"];\n isCommentMandatory: Scalars[\"Boolean\"];\n isCommon: Scalars[\"Boolean\"];\n isValid: Scalars[\"Boolean\"];\n maxDaysSinceCreation?: Maybe;\n maxDaysSinceDelivery?: Maybe;\n maxDaysSinceFulfilment?: Maybe;\n minDaysSinceCreation?: Maybe;\n minDaysSinceDelivery?: Maybe;\n minDaysSinceFulfilment?: Maybe;\n parentId?: Maybe;\n priority?: Maybe;\n /** Reason only shown for matching products */\n productFilters: Array;\n /** @deprecated Use product_filters instead */\n productTags?: Maybe>;\n promptQuestion?: Maybe;\n randomize?: Maybe;\n reasonTitle: Scalars[\"String\"];\n requireCustomerPictures?: Maybe;\n shopId: Scalars[\"Int\"];\n shopifyReturnReason?: Maybe;\n translatedReason?: Maybe;\n};\n\nexport type ReturnReasonHash = {\n __typename?: \"ReturnReasonHash\";\n id: Scalars[\"String\"];\n name: Scalars[\"String\"];\n};\n\nexport type ReturnRefundAutomationState = {\n __typename?: \"ReturnRefundAutomationState\";\n closeReturnOnShopifyOrderFailedAt?: Maybe;\n closeReturnOnShopifyOrderSucceededAt?: Maybe;\n closeReturnOnShopifyOrderTiming?: Maybe;\n markAsPaidFailedAt?: Maybe;\n markAsPaidSucceededAt?: Maybe;\n markAsPaidTiming?: Maybe;\n outOfStockRefundAt?: Maybe;\n refundFailedAt?: Maybe;\n refundSucceededAt?: Maybe;\n refundTiming?: Maybe;\n reserveInventoryFailedAt?: Maybe;\n reserveInventorySucceededAt?: Maybe;\n reserveInventoryTiming?: Maybe;\n restockFailedAt?: Maybe;\n restockSucceededAt?: Maybe;\n restockTiming?: Maybe;\n shopifyReturnApiFfEnabled?: Maybe;\n shouldRefundWhenOutOfStock: Scalars[\"Boolean\"];\n};\n\nexport type ReturnRuleConditionDefinition = {\n __typename?: \"ReturnRuleConditionDefinition\";\n attribute: Scalars[\"String\"];\n attributeDisplayText: Scalars[\"String\"];\n autocomplete?: Maybe;\n prequalifier: Scalars[\"String\"];\n prequalifierDisplayText: Scalars[\"String\"];\n valueType: RuleValue;\n};\n\nexport type ReturnShipment = {\n __typename?: \"ReturnShipment\";\n /** Hashed ID. e.g. 123ABC456 */\n id: Scalars[\"String\"];\n /** e.g. a, b, c. Used on PSSLs. */\n letter: Scalars[\"String\"];\n /** e.g. fedex, cycleon, or keep_the_item */\n returnMethodId: Scalars[\"String\"];\n /** e.g. usps_returns, cycleon. Null for non-carrier return methods, e.g. ship_on_your_own */\n returnTrackingCompany?: Maybe;\n /** Tracking link */\n returnTrackingLink?: Maybe;\n /** Carrier tracking number. Null for non-carrier return methods, e.g. ship_on_your_own */\n returnTrackingNumber?: Maybe;\n /** Recorded only by shipment strategies that are fulfillment-based, like OneShipmentPerFulfillment. For now, intended only for troubleshooting purposes, but we might use it in the future on the Return Details page, if we decide to display ReturnShipment details there. */\n shopifyFulfillmentId?: Maybe;\n /** e.g. initiated, on_its_way_to_retailer */\n status: Scalars[\"String\"];\n};\n\nexport type ReturnVersion = {\n __typename?: \"ReturnVersion\";\n /** The time of version-record creation. */\n createdAt: Scalars[\"ISO8601DateTime\"];\n id: Scalars[\"String\"];\n /** The attributes of the return at the time of version-record creation */\n return: ReturnVersionReturn;\n returnId: Scalars[\"String\"];\n /** Present when the RMA Edit was performed by a person (not an automation) and RBAC is enabled */\n shopifyUserId?: Maybe;\n};\n\n/** The attributes of the return at the time of version-record creation */\nexport type ReturnVersionReturn = {\n __typename?: \"ReturnVersionReturn\";\n carrier?: Maybe;\n createdAt?: Maybe;\n customerEmail?: Maybe;\n customerLocale?: Maybe;\n exchangeDraftOrderId?: Maybe;\n exchangeOrderId?: Maybe;\n exchangeShippingFee?: Maybe;\n feeBreakdown?: Maybe>;\n feesApplied?: Maybe;\n firstScanDate?: Maybe;\n guestReturn?: Maybe;\n isShopNowReturn?: Maybe;\n issuedRefundId?: Maybe;\n items: Array;\n merchantCommentText?: Maybe;\n merchantRma?: Maybe;\n originalShippingRefundAmount?: Maybe;\n paymentMethodId?: Maybe;\n priorRefundsAmount?: Maybe;\n receiptDate?: Maybe;\n refundAmount?: Maybe;\n refundMethod?: Maybe;\n returnStatus?: Maybe;\n rmaNumber?: Maybe;\n shopifyOrderId?: Maybe;\n warehouseReceiptDate?: Maybe;\n};\n\nexport enum Rule {\n RefundMethod = \"REFUND_METHOD\",\n ReturnCost = \"RETURN_COST\",\n ReturnEligibility = \"RETURN_ELIGIBILITY\",\n ReturnItemOverage = \"RETURN_ITEM_OVERAGE\",\n ReturnMethod = \"RETURN_METHOD\",\n}\n\nexport enum RuleValue {\n Boolean = \"BOOLEAN\",\n Datetime = \"DATETIME\",\n Float = \"FLOAT\",\n Integer = \"INTEGER\",\n LessThanInteger = \"LESS_THAN_INTEGER\",\n List = \"LIST\",\n Region = \"REGION\",\n String = \"STRING\",\n ValueOverLimit = \"VALUE_OVER_LIMIT\",\n ValueOverLimitDays = \"VALUE_OVER_LIMIT_DAYS\",\n ValueOverLimitOrders = \"VALUE_OVER_LIMIT_ORDERS\",\n ValueOverLimitReturns = \"VALUE_OVER_LIMIT_RETURNS\",\n ValueOverLimitSpend = \"VALUE_OVER_LIMIT_SPEND\",\n}\n\nexport type SearchItem = {\n __typename?: \"SearchItem\";\n descriptionHtml: Scalars[\"String\"];\n id: Scalars[\"String\"];\n name: Scalars[\"String\"];\n options?: Maybe>;\n productImageAltTxt?: Maybe;\n productImageUrl?: Maybe;\n variantInfo?: Maybe>;\n};\n\nexport type ShopBranding = {\n __typename?: \"ShopBranding\";\n backgroundImage?: Maybe;\n backgroundImageUrl?: Maybe;\n baseBodyTextSize?: Maybe;\n bodyBackground?: Maybe;\n bodyText?: Maybe;\n borderRadius?: Maybe;\n brandPrimary?: Maybe;\n brandSecondary?: Maybe;\n customCss?: Maybe;\n errorColor?: Maybe;\n errorTextColor?: Maybe;\n fixedAppBar?: Maybe;\n fontName?: Maybe;\n fontUrl?: Maybe;\n id: Scalars[\"ID\"];\n isLinkAllCaps?: Maybe;\n isLinkUnderlined?: Maybe;\n logoImage?: Maybe;\n mailFromName?: Maybe;\n marketingImage?: Maybe;\n primaryFont?: Maybe;\n rootMarginBottom?: Maybe;\n rootMarginTop?: Maybe;\n secondaryFont?: Maybe;\n stepDelimiterPosition?: Maybe;\n};\n\nexport type ShopItem = {\n __typename?: \"ShopItem\";\n compareAtPriceAmount?: Maybe;\n displayCompareAtPrice?: Maybe;\n displayPrice: Scalars[\"String\"];\n displayPriceTotal: Scalars[\"String\"];\n eligibilityCriteria?: Maybe>;\n hideDisplayPrice: Scalars[\"Boolean\"];\n id: Scalars[\"String\"];\n isExchangesEnabled: Scalars[\"Boolean\"];\n name: Scalars[\"String\"];\n orderedQuantity: Scalars[\"Int\"];\n priceAmount?: Maybe;\n productId: Scalars[\"String\"];\n productImageAltTxt?: Maybe;\n productImageUrl?: Maybe;\n productTitle: Scalars[\"String\"];\n removedQuantity: Scalars[\"Int\"];\n returnableQuantity: Scalars[\"Int\"];\n sku: Scalars[\"String\"];\n variantId?: Maybe;\n variantInfo?: Maybe>;\n};\n\nexport type ShopItemGrouping = {\n __typename?: \"ShopItemGrouping\";\n behaviors: Array;\n displayName: Scalars[\"String\"];\n lineItemIds: Array;\n slug: Scalars[\"String\"];\n};\n\nexport type ShopItemReturnRule = {\n __typename?: \"ShopItemReturnRule\";\n eligible: Scalars[\"Boolean\"];\n ineligibleReason?: Maybe>;\n ineligibleReasonForExchange?: Maybe;\n ineligibleReasonForReturn?: Maybe;\n returnReason: Scalars[\"String\"];\n};\n\nexport type ShopItemVariantInfo = {\n __typename?: \"ShopItemVariantInfo\";\n name: Scalars[\"String\"];\n value: Scalars[\"String\"];\n};\n\nexport type ShopNowAbort = {\n __typename?: \"ShopNowAbort\";\n /** success, error */\n abortStatus: Scalars[\"String\"];\n errors: Array;\n /** e.g. £1.23 */\n totalRefundFormatted?: Maybe;\n};\n\nexport type ShopNowAbortOption = {\n __typename?: \"ShopNowAbortOption\";\n refundAmount: Money;\n /** e.g. original_payment, gift_card */\n type: Scalars[\"String\"];\n};\n\nexport type ShopNowExpiration = {\n __typename?: \"ShopNowExpiration\";\n expired?: Maybe;\n formattedAmount?: Maybe;\n};\n\nexport type ShopNowSession = {\n __typename?: \"ShopNowSession\";\n abortOptions?: Maybe>;\n expired: Scalars[\"Boolean\"];\n expiresAt: Scalars[\"Int\"];\n returnStatus?: Maybe;\n shopNowAbortEnabled?: Maybe;\n shopNowCheckoutOrderSummaryEnabled?: Maybe;\n shopNowCredit?: Maybe;\n};\n\nexport type ShopOrder = {\n __typename?: \"ShopOrder\";\n billingCountryCode?: Maybe;\n billingProvince?: Maybe;\n billingProvinceCode?: Maybe;\n billingZip?: Maybe;\n eligible: Scalars[\"Boolean\"];\n fromAddress1?: Maybe;\n fromAddress2?: Maybe;\n fromCity?: Maybe;\n fromCountryCode?: Maybe;\n fromFirstName?: Maybe;\n fromLastName?: Maybe;\n fromProvince?: Maybe;\n fromProvinceCode?: Maybe;\n fromZip?: Maybe;\n guestLoginEmail: Scalars[\"String\"];\n ineligibleDisplayText?: Maybe;\n items: Array;\n orderLineItemGroupings: Array;\n orderNumber: Scalars[\"String\"];\n presentmentCurrency: Scalars[\"String\"];\n presentmentCurrencyEstimatedUsdConversionRate?: Maybe;\n presentmentCurrencySubunitToUnit: Scalars[\"Int\"];\n shopId: Scalars[\"String\"];\n shopifyOrderId: Scalars[\"String\"];\n};\n\nexport type TrackingEvent = {\n __typename?: \"TrackingEvent\";\n event?: Maybe;\n eventCity?: Maybe;\n eventCode?: Maybe;\n eventCountryCode?: Maybe;\n eventDate?: Maybe;\n eventState?: Maybe;\n eventZip?: Maybe;\n};\n\nexport type TrackingInfo = {\n __typename?: \"TrackingInfo\";\n carrierId?: Maybe;\n carrierName?: Maybe;\n estimatedDeliveryDateBegin?: Maybe;\n estimatedDeliveryDateEnd?: Maybe;\n id: Scalars[\"String\"];\n locale?: Maybe;\n narvarStatus?: Maybe;\n status?: Maybe;\n trackDetails?: Maybe>;\n trackingNumber?: Maybe;\n trackingUrl?: Maybe;\n};\n\nexport type Translation = {\n __typename?: \"Translation\";\n category?: Maybe;\n key: Scalars[\"String\"];\n locale?: Maybe;\n prelude?: Maybe;\n suggestion?: Maybe;\n value?: Maybe;\n};\n\n/** A user-readable error */\nexport type UserError = {\n __typename?: \"UserError\";\n /** Unique error identifier */\n code: Scalars[\"String\"];\n /** A description of the error */\n message: Scalars[\"String\"];\n};\n\nexport type UserPreferences = {\n __typename?: \"UserPreferences\";\n carriers: Array;\n locations: Array;\n profile?: Maybe;\n returnMethods: Array;\n};\n\n/** Structured Data for Returns User Preferences Input */\nexport type UserPreferencesInput = {\n carriers: Array;\n locations: Array;\n returnMethods: Array;\n};\n\nexport type VariantInfo = {\n __typename?: \"VariantInfo\";\n availabilityStatus?: Maybe;\n availableForSale?: Maybe;\n displayName: Scalars[\"String\"];\n imageAlt?: Maybe;\n imageSrc?: Maybe;\n inventoryQuantity?: Maybe;\n option0?: Maybe;\n option1?: Maybe;\n option2?: Maybe;\n option3?: Maybe;\n priceAmount?: Maybe;\n priceCurrency?: Maybe;\n priceFormatted?: Maybe;\n productId?: Maybe;\n sku?: Maybe;\n variantId?: Maybe;\n};\n\nexport type AddressFragment = {\n __typename?: \"Address\";\n address1: string;\n address2?: string | null;\n city: string;\n company?: string | null;\n country: string;\n countryCodeV2: string;\n firstName: string;\n lastName: string;\n latitude?: string | null;\n longitude?: string | null;\n name: string;\n phone?: string | null;\n province?: string | null;\n provinceCode?: string | null;\n zipcode?: string | null;\n};\n\nexport type FeeBreakdownFragment = {\n __typename?: \"FeeBreakdown\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n description: string;\n displayWithReturnMethod: boolean;\n shopNowClawback: boolean;\n taxCode?: string | null;\n};\n\nexport type AmountFragment = {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n};\n\nexport type ReturnLineItemFragment = {\n __typename?: \"ReturnLineItem\";\n id: string;\n imageUrl?: string | null;\n name: string;\n productId: string;\n quantity: number;\n title: string;\n variantId: string;\n price: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n returnReason: { __typename?: \"ReturnReasonHash\"; id: string; name: string };\n};\n\nexport type DiscountFragment = {\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n};\n\nexport type LineItemFragment = {\n __typename?: \"LineItem\";\n id?: string | null;\n name: string;\n imageUrl?: string | null;\n productId: string;\n quantity: number;\n title: string;\n variantId: string;\n cost: {\n __typename?: \"LineItemCost\";\n amountPerQuantity: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n discountedAmountPerQuantity: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n };\n discounts: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }>;\n price: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n};\n\nexport type PaymentFragment = {\n __typename?: \"Payment\";\n customerPmtId: string;\n paymentClientSecret: string;\n paymentGateway: string;\n paymentGatewayDisplay: string;\n value: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n};\n\nexport type CartSummaryFragment = {\n __typename?: \"CartSummary\";\n discountCodes?: Array | null;\n discounts?: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }> | null;\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n tax: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n shopNowCredit?: {\n __typename?: \"Credit\";\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n used: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n};\n\nexport type ReturnCartFragment = {\n __typename?: \"ReturnCart\";\n cartSummary: {\n __typename?: \"CartSummary\";\n discountCodes?: Array | null;\n discounts?: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }> | null;\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n tax: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n shopNowCredit?: {\n __typename?: \"Credit\";\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n used: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n };\n feeBreakdown: Array<{\n __typename?: \"FeeBreakdown\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n description: string;\n displayWithReturnMethod: boolean;\n shopNowClawback: boolean;\n taxCode?: string | null;\n }>;\n lineItems: Array<{\n __typename?: \"ReturnLineItem\";\n id: string;\n imageUrl?: string | null;\n name: string;\n productId: string;\n quantity: number;\n title: string;\n variantId: string;\n price: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n returnReason: { __typename?: \"ReturnReasonHash\"; id: string; name: string };\n }>;\n};\n\nexport type CartFragment = {\n __typename?: \"Cart\";\n totalQuantity: number;\n billingAddress: {\n __typename?: \"Address\";\n address1: string;\n address2?: string | null;\n city: string;\n company?: string | null;\n country: string;\n countryCodeV2: string;\n firstName: string;\n lastName: string;\n latitude?: string | null;\n longitude?: string | null;\n name: string;\n phone?: string | null;\n province?: string | null;\n provinceCode?: string | null;\n zipcode?: string | null;\n };\n cartSummary: {\n __typename?: \"CartSummary\";\n discountCodes?: Array | null;\n discounts?: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }> | null;\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n tax: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n shopNowCredit?: {\n __typename?: \"Credit\";\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n used: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n };\n shippingAddress: {\n __typename?: \"Address\";\n address1: string;\n address2?: string | null;\n city: string;\n company?: string | null;\n country: string;\n countryCodeV2: string;\n firstName: string;\n lastName: string;\n latitude?: string | null;\n longitude?: string | null;\n name: string;\n phone?: string | null;\n province?: string | null;\n provinceCode?: string | null;\n zipcode?: string | null;\n };\n feeBreakdown: Array<{\n __typename?: \"FeeBreakdown\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n description: string;\n displayWithReturnMethod: boolean;\n shopNowClawback: boolean;\n taxCode?: string | null;\n }>;\n lineItems: Array<{\n __typename?: \"LineItem\";\n id?: string | null;\n name: string;\n imageUrl?: string | null;\n productId: string;\n quantity: number;\n title: string;\n variantId: string;\n cost: {\n __typename?: \"LineItemCost\";\n amountPerQuantity: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n discountedAmountPerQuantity: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n };\n discounts: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }>;\n price: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }>;\n};\n\nexport type RefundFragment = {\n __typename?: \"Refund\";\n refundMethod: string;\n refundMethodDescription: string;\n refundMethodDisplay: string;\n value: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n};\n\nexport type ShopNowV2CheckoutQueryVariables = Exact<{\n cartToken: Scalars[\"String\"];\n code: Scalars[\"String\"];\n}>;\n\nexport type ShopNowV2CheckoutQuery = {\n __typename?: \"CustomerQuery\";\n shopNowV2Checkout: {\n __typename?: \"CheckoutResult\";\n data?: {\n __typename?: \"Checkout\";\n feeBreakdown: Array<{\n __typename?: \"FeeBreakdown\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n description: string;\n displayWithReturnMethod: boolean;\n shopNowClawback: boolean;\n taxCode?: string | null;\n }>;\n overallCartSummary: {\n __typename?: \"CartSummary\";\n discountCodes?: Array | null;\n discounts?: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }> | null;\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n tax: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n shopNowCredit?: {\n __typename?: \"Credit\";\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n used: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n };\n payment?: {\n __typename?: \"Payment\";\n customerPmtId: string;\n paymentClientSecret: string;\n paymentGateway: string;\n paymentGatewayDisplay: string;\n value: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n refund: {\n __typename?: \"Refund\";\n refundMethod: string;\n refundMethodDescription: string;\n refundMethodDisplay: string;\n value: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n };\n returnCart: {\n __typename?: \"ReturnCart\";\n cartSummary: {\n __typename?: \"CartSummary\";\n discountCodes?: Array | null;\n discounts?: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }> | null;\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n tax: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n shopNowCredit?: {\n __typename?: \"Credit\";\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n used: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n };\n feeBreakdown: Array<{\n __typename?: \"FeeBreakdown\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n description: string;\n displayWithReturnMethod: boolean;\n shopNowClawback: boolean;\n taxCode?: string | null;\n }>;\n lineItems: Array<{\n __typename?: \"ReturnLineItem\";\n id: string;\n imageUrl?: string | null;\n name: string;\n productId: string;\n quantity: number;\n title: string;\n variantId: string;\n price: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n returnReason: {\n __typename?: \"ReturnReasonHash\";\n id: string;\n name: string;\n };\n }>;\n };\n shopNowCart: {\n __typename?: \"Cart\";\n totalQuantity: number;\n billingAddress: {\n __typename?: \"Address\";\n address1: string;\n address2?: string | null;\n city: string;\n company?: string | null;\n country: string;\n countryCodeV2: string;\n firstName: string;\n lastName: string;\n latitude?: string | null;\n longitude?: string | null;\n name: string;\n phone?: string | null;\n province?: string | null;\n provinceCode?: string | null;\n zipcode?: string | null;\n };\n cartSummary: {\n __typename?: \"CartSummary\";\n discountCodes?: Array | null;\n discounts?: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }> | null;\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n tax: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n shopNowCredit?: {\n __typename?: \"Credit\";\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n used: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n } | null;\n };\n shippingAddress: {\n __typename?: \"Address\";\n address1: string;\n address2?: string | null;\n city: string;\n company?: string | null;\n country: string;\n countryCodeV2: string;\n firstName: string;\n lastName: string;\n latitude?: string | null;\n longitude?: string | null;\n name: string;\n phone?: string | null;\n province?: string | null;\n provinceCode?: string | null;\n zipcode?: string | null;\n };\n feeBreakdown: Array<{\n __typename?: \"FeeBreakdown\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n description: string;\n displayWithReturnMethod: boolean;\n shopNowClawback: boolean;\n taxCode?: string | null;\n }>;\n lineItems: Array<{\n __typename?: \"LineItem\";\n id?: string | null;\n name: string;\n imageUrl?: string | null;\n productId: string;\n quantity: number;\n title: string;\n variantId: string;\n cost: {\n __typename?: \"LineItemCost\";\n amountPerQuantity: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n discountedAmountPerQuantity: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n subtotal: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n total: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n };\n discounts: Array<{\n __typename?: \"Discount\";\n targetType: string;\n discountAmount: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }>;\n price: {\n __typename?: \"Amount\";\n amount: number;\n currencyCode: string;\n formattedValue: string;\n };\n }>;\n };\n } | null;\n errors: Array<{ __typename?: \"UserError\"; code: string; message: string }>;\n };\n};\n\nexport type SubmitShopNowV2CheckoutMutationVariables = Exact<{\n checkout: CheckoutCompleteInput;\n}>;\n\nexport type SubmitShopNowV2CheckoutMutation = {\n __typename?: \"CustomerMutation\";\n shopNowV2Checkout: {\n __typename?: \"CheckoutCompleteResult\";\n data?: { __typename?: \"CheckoutComplete\"; message: string } | null;\n errors: Array<{ __typename?: \"UserError\"; code: string; message: string }>;\n };\n};\n\nexport type ApplyDiscountCodeMutationVariables = Exact<{\n cartToken: Scalars[\"String\"];\n code: Scalars[\"String\"];\n couponCodes: Array | Scalars[\"String\"];\n}>;\n\nexport type ApplyDiscountCodeMutation = {\n __typename?: \"CustomerMutation\";\n applyDiscountCode: {\n __typename?: \"DiscountCodeResult\";\n data?: string | null;\n errors: Array<{ __typename?: \"UserError\"; code: string; message: string }>;\n };\n};\n\nexport const AmountFragmentDoc = gql`\n fragment Amount on Amount {\n amount\n currencyCode\n formattedValue\n }\n`;\nexport const PaymentFragmentDoc = gql`\n fragment Payment on Payment {\n customerPmtId\n paymentClientSecret\n paymentGateway\n paymentGatewayDisplay\n value {\n ...Amount\n }\n }\n ${AmountFragmentDoc}\n`;\nexport const DiscountFragmentDoc = gql`\n fragment Discount on Discount {\n discountAmount {\n ...Amount\n }\n targetType\n }\n ${AmountFragmentDoc}\n`;\nexport const CartSummaryFragmentDoc = gql`\n fragment CartSummary on CartSummary {\n discountCodes\n discounts {\n ...Discount\n }\n subtotal {\n ...Amount\n }\n tax {\n ...Amount\n }\n total {\n ...Amount\n }\n shopNowCredit {\n total {\n ...Amount\n }\n used {\n ...Amount\n }\n }\n }\n ${DiscountFragmentDoc}\n ${AmountFragmentDoc}\n`;\nexport const FeeBreakdownFragmentDoc = gql`\n fragment FeeBreakdown on FeeBreakdown {\n amount\n currencyCode\n formattedValue\n description\n displayWithReturnMethod\n shopNowClawback\n taxCode\n }\n`;\nexport const ReturnLineItemFragmentDoc = gql`\n fragment ReturnLineItem on ReturnLineItem {\n id\n imageUrl\n name\n price {\n ...Amount\n }\n productId\n quantity\n returnReason {\n id\n name\n }\n title\n variantId\n }\n ${AmountFragmentDoc}\n`;\nexport const ReturnCartFragmentDoc = gql`\n fragment ReturnCart on ReturnCart {\n cartSummary {\n ...CartSummary\n }\n feeBreakdown {\n ...FeeBreakdown\n }\n lineItems {\n ...ReturnLineItem\n }\n }\n ${CartSummaryFragmentDoc}\n ${FeeBreakdownFragmentDoc}\n ${ReturnLineItemFragmentDoc}\n`;\nexport const AddressFragmentDoc = gql`\n fragment Address on Address {\n address1\n address2\n city\n company\n country\n countryCodeV2\n firstName\n lastName\n latitude\n longitude\n name\n phone\n province\n provinceCode\n zipcode\n }\n`;\nexport const LineItemFragmentDoc = gql`\n fragment LineItem on LineItem {\n cost {\n amountPerQuantity {\n ...Amount\n }\n discountedAmountPerQuantity {\n ...Amount\n }\n subtotal {\n ...Amount\n }\n total {\n ...Amount\n }\n }\n discounts {\n ...Discount\n }\n id\n name\n imageUrl\n price {\n ...Amount\n }\n productId\n quantity\n title\n variantId\n }\n ${AmountFragmentDoc}\n ${DiscountFragmentDoc}\n`;\nexport const CartFragmentDoc = gql`\n fragment Cart on Cart {\n billingAddress {\n ...Address\n }\n cartSummary {\n ...CartSummary\n }\n shippingAddress {\n ...Address\n }\n totalQuantity\n feeBreakdown {\n ...FeeBreakdown\n }\n lineItems {\n ...LineItem\n }\n }\n ${AddressFragmentDoc}\n ${CartSummaryFragmentDoc}\n ${FeeBreakdownFragmentDoc}\n ${LineItemFragmentDoc}\n`;\nexport const RefundFragmentDoc = gql`\n fragment Refund on Refund {\n refundMethod\n refundMethodDescription\n refundMethodDisplay\n value {\n ...Amount\n }\n }\n ${AmountFragmentDoc}\n`;\nexport const ShopNowV2CheckoutDocument = gql`\n query shopNowV2Checkout($cartToken: String!, $code: String!) {\n shopNowV2Checkout(cartToken: $cartToken, code: $code) {\n data {\n feeBreakdown {\n ...FeeBreakdown\n }\n overallCartSummary {\n ...CartSummary\n }\n payment {\n ...Payment\n }\n refund {\n ...Refund\n }\n returnCart {\n ...ReturnCart\n }\n shopNowCart {\n ...Cart\n }\n }\n errors {\n code\n message\n }\n }\n }\n ${FeeBreakdownFragmentDoc}\n ${CartSummaryFragmentDoc}\n ${PaymentFragmentDoc}\n ${RefundFragmentDoc}\n ${ReturnCartFragmentDoc}\n ${CartFragmentDoc}\n`;\n\n/**\n * __useShopNowV2CheckoutQuery__\n *\n * To run a query within a React component, call `useShopNowV2CheckoutQuery` and pass it any options that fit your needs.\n * When your component renders, `useShopNowV2CheckoutQuery` returns an object from Apollo Client that contains loading, error, and data properties\n * you can use to render your UI.\n *\n * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;\n *\n * @example\n * const { data, loading, error } = useShopNowV2CheckoutQuery({\n * variables: {\n * cartToken: // value for 'cartToken'\n * code: // value for 'code'\n * },\n * });\n */\nexport function useShopNowV2CheckoutQuery(\n baseOptions: Apollo.QueryHookOptions<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n > &\n (\n | { variables: ShopNowV2CheckoutQueryVariables; skip?: boolean }\n | { skip: boolean }\n ),\n) {\n const options = { ...defaultOptions, ...baseOptions };\n return Apollo.useQuery<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n >(ShopNowV2CheckoutDocument, options);\n}\nexport function useShopNowV2CheckoutLazyQuery(\n baseOptions?: Apollo.LazyQueryHookOptions<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n >,\n) {\n const options = { ...defaultOptions, ...baseOptions };\n return Apollo.useLazyQuery<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n >(ShopNowV2CheckoutDocument, options);\n}\nexport function useShopNowV2CheckoutSuspenseQuery(\n baseOptions?:\n | Apollo.SkipToken\n | Apollo.SuspenseQueryHookOptions<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n >,\n) {\n const options =\n baseOptions === Apollo.skipToken\n ? baseOptions\n : { ...defaultOptions, ...baseOptions };\n return Apollo.useSuspenseQuery<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n >(ShopNowV2CheckoutDocument, options);\n}\nexport type ShopNowV2CheckoutQueryHookResult = ReturnType<\n typeof useShopNowV2CheckoutQuery\n>;\nexport type ShopNowV2CheckoutLazyQueryHookResult = ReturnType<\n typeof useShopNowV2CheckoutLazyQuery\n>;\nexport type ShopNowV2CheckoutSuspenseQueryHookResult = ReturnType<\n typeof useShopNowV2CheckoutSuspenseQuery\n>;\nexport type ShopNowV2CheckoutQueryResult = Apollo.QueryResult<\n ShopNowV2CheckoutQuery,\n ShopNowV2CheckoutQueryVariables\n>;\nexport const SubmitShopNowV2CheckoutDocument = gql`\n mutation submitShopNowV2Checkout($checkout: CheckoutCompleteInput!) {\n shopNowV2Checkout(checkout: $checkout) {\n data {\n message\n }\n errors {\n code\n message\n }\n }\n }\n`;\nexport type SubmitShopNowV2CheckoutMutationFn = Apollo.MutationFunction<\n SubmitShopNowV2CheckoutMutation,\n SubmitShopNowV2CheckoutMutationVariables\n>;\n\n/**\n * __useSubmitShopNowV2CheckoutMutation__\n *\n * To run a mutation, you first call `useSubmitShopNowV2CheckoutMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useSubmitShopNowV2CheckoutMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [submitShopNowV2CheckoutMutation, { data, loading, error }] = useSubmitShopNowV2CheckoutMutation({\n * variables: {\n * checkout: // value for 'checkout'\n * },\n * });\n */\nexport function useSubmitShopNowV2CheckoutMutation(\n baseOptions?: Apollo.MutationHookOptions<\n SubmitShopNowV2CheckoutMutation,\n SubmitShopNowV2CheckoutMutationVariables\n >,\n) {\n const options = { ...defaultOptions, ...baseOptions };\n return Apollo.useMutation<\n SubmitShopNowV2CheckoutMutation,\n SubmitShopNowV2CheckoutMutationVariables\n >(SubmitShopNowV2CheckoutDocument, options);\n}\nexport type SubmitShopNowV2CheckoutMutationHookResult = ReturnType<\n typeof useSubmitShopNowV2CheckoutMutation\n>;\nexport type SubmitShopNowV2CheckoutMutationResult =\n Apollo.MutationResult;\nexport type SubmitShopNowV2CheckoutMutationOptions = Apollo.BaseMutationOptions<\n SubmitShopNowV2CheckoutMutation,\n SubmitShopNowV2CheckoutMutationVariables\n>;\nexport const ApplyDiscountCodeDocument = gql`\n mutation applyDiscountCode(\n $cartToken: String!\n $code: String!\n $couponCodes: [String!]!\n ) {\n applyDiscountCode(\n cartToken: $cartToken\n code: $code\n couponCodes: $couponCodes\n ) {\n data\n errors {\n code\n message\n }\n }\n }\n`;\nexport type ApplyDiscountCodeMutationFn = Apollo.MutationFunction<\n ApplyDiscountCodeMutation,\n ApplyDiscountCodeMutationVariables\n>;\n\n/**\n * __useApplyDiscountCodeMutation__\n *\n * To run a mutation, you first call `useApplyDiscountCodeMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useApplyDiscountCodeMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [applyDiscountCodeMutation, { data, loading, error }] = useApplyDiscountCodeMutation({\n * variables: {\n * cartToken: // value for 'cartToken'\n * code: // value for 'code'\n * couponCodes: // value for 'couponCodes'\n * },\n * });\n */\nexport function useApplyDiscountCodeMutation(\n baseOptions?: Apollo.MutationHookOptions<\n ApplyDiscountCodeMutation,\n ApplyDiscountCodeMutationVariables\n >,\n) {\n const options = { ...defaultOptions, ...baseOptions };\n return Apollo.useMutation<\n ApplyDiscountCodeMutation,\n ApplyDiscountCodeMutationVariables\n >(ApplyDiscountCodeDocument, options);\n}\nexport type ApplyDiscountCodeMutationHookResult = ReturnType<\n typeof useApplyDiscountCodeMutation\n>;\nexport type ApplyDiscountCodeMutationResult =\n Apollo.MutationResult;\nexport type ApplyDiscountCodeMutationOptions = Apollo.BaseMutationOptions<\n ApplyDiscountCodeMutation,\n ApplyDiscountCodeMutationVariables\n>;\n","import { useMemo, useState } from \"react\";\nimport { ADDRESS_DEFAULT, mergeAddress } from \"../../modules/address\";\n\nexport interface Address {\n firstName: string;\n lastName: string;\n address1: string;\n address2: string;\n city: string;\n zip: string;\n province: string;\n provinceCode: string;\n country: string;\n countryCode: string;\n countryCodeV2: string;\n}\n\nexport interface AddressEvent {\n fromAddress: Address;\n isValid: boolean;\n}\n\nconst useAddress = () => {\n const [isNewAddressValid, setIsNewAddressValid] = useState(false);\n const [newAddressDraft, setNewAddressDraft] = useState(ADDRESS_DEFAULT);\n\n const address = useMemo(\n () =>\n mergeAddress(\n // TODO: Add the missing address which ran into error\n // state.fromAddress,\n // submittingAddressError.address,\n newAddressDraft,\n ),\n [newAddressDraft],\n );\n\n const onChangeAddress = (event: AddressEvent) => {\n const { fromAddress, isValid } = event;\n setIsNewAddressValid(isValid);\n setNewAddressDraft(fromAddress);\n };\n\n return {\n onChangeAddress,\n isNewAddressValid,\n newAddressDraft,\n address,\n };\n};\n\nexport default useAddress;\n","import React from \"react\";\nimport ErrorSnackbar from \"../components/ErrorSnackbar\";\nimport MailingAddressForm from \"../steps/ConfirmMailingAddress/MailingAddressForm\";\nimport errorNotifier from \"../../shared/modules/error-notifier\";\nimport { getTranslation } from \"../../shared/modules/config\";\nimport { Address, AddressEvent } from \"./hooks/useAddress\";\n\ninterface AddressProps {\n onChange: (event: AddressEvent) => void;\n errorMessage?: string;\n address: Address;\n}\n\nconst BillingAddress = ({ onChange, address, errorMessage }: AddressProps) => {\n if (!errorMessage) return null;\n return (\n <>\n \n {\n errorNotifier.warn(\n \"Submit button of should be hidden, but we received onSubmit event\",\n { fromAddress },\n );\n }}\n disable={null}\n submitLabel={getTranslation(\"bad_mailing_address_submit\")}\n validateZip\n exclude={[\"phone\", \"submit\"]}\n />\n \n );\n};\n\nexport default BillingAddress;\n","import { useState } from \"react\";\nimport { useStripeComponents } from \"../../contexts/StripeProvider\";\nimport { confirmCardPayment } from \"../../steps/Review/CheckoutForm\";\nimport { Address } from \"./useAddress\";\n\ninterface PaymentProps {\n secret: string;\n newAddressDraft: Address;\n}\n\ninterface CardPaymentResult {\n paymentId: string;\n}\n\nexport type SubmitPaymentCheckoutFn = () => Promise;\n\nconst usePayment = ({ secret }: PaymentProps) => {\n const [capturingPayment, setCapturingPayment] = useState(false);\n const { stripe, elements: stripeElement } = useStripeComponents();\n const [paymentError, setPaymentError] = useState();\n const [succeededPaymentIntentId, setSucceededPaymentIntentId] = useState(\"\");\n\n const makePayment: SubmitPaymentCheckoutFn = () => {\n setCapturingPayment(true);\n setPaymentError(\"\");\n setSucceededPaymentIntentId(\"\");\n\n return confirmCardPayment({\n stripe,\n elements: stripeElement,\n secret,\n })\n .then((result: CardPaymentResult) => {\n setCapturingPayment(false);\n setSucceededPaymentIntentId(result.paymentId);\n return result;\n })\n .catch((error: Error) => {\n setCapturingPayment(false);\n setPaymentError(error.message ?? error);\n throw error;\n });\n };\n\n return {\n capturingPayment,\n succeededPaymentIntentId,\n makePayment,\n paymentError,\n };\n};\n\nexport default usePayment;\n","import { useNavigate } from \"react-router-dom\";\nimport {\n PaymentInput,\n useSubmitShopNowV2CheckoutMutation,\n} from \"../../../gql/__generated__/schema\";\nimport { CONFIRMATION_ROUTE } from \"../../components/AppRouter\";\nimport { SubmitPaymentCheckoutFn } from \"./usePayment\";\n\ninterface SubmitProps {\n paymentRequired: boolean;\n makePayment: SubmitPaymentCheckoutFn;\n paymentClientSecret: string;\n code: string;\n cartToken: string;\n updateConsumerPreferences: () => Promise;\n}\n\nconst useSubmit = ({\n paymentRequired,\n makePayment,\n code,\n cartToken,\n updateConsumerPreferences,\n}: SubmitProps) => {\n const navigate = useNavigate();\n const [\n submitCheckoutAPI,\n { data: submitData, loading: loadingSubmitCheckout },\n ] = useSubmitShopNowV2CheckoutMutation();\n\n const submitCheckoutComplete = async (payment?: PaymentInput) =>\n submitCheckoutAPI({\n variables: {\n checkout: {\n code,\n cartToken,\n payment,\n },\n },\n });\n\n const onSubmitHandler = async () => {\n try {\n if (paymentRequired) {\n const result = await makePayment();\n await submitCheckoutComplete({\n gateway: \"stripe\",\n paymentIntentId: result.paymentId,\n });\n } else {\n await submitCheckoutComplete();\n }\n\n await updateConsumerPreferences();\n navigate(CONFIRMATION_ROUTE);\n } catch (error) {\n console.error(error);\n }\n };\n return {\n onSubmitHandler,\n submitData,\n loadingSubmitCheckout,\n };\n};\n\nexport default useSubmit;\n","import { useEffect, useState } from \"react\";\nimport { useApplyDiscountCodeMutation } from \"../../../gql/__generated__/schema\";\n\ninterface DiscountCodeProps {\n code: string;\n token: string;\n discountCodeSaved?: string | null;\n onSuccess: () => Promise;\n}\n\nexport const useDiscountCode = ({\n code,\n token,\n discountCodeSaved,\n onSuccess,\n}: DiscountCodeProps) => {\n const [discountCode, setDiscountCode] = useState(discountCodeSaved);\n const [discountLoading, setDiscountLoading] = useState(false);\n\n useEffect(() => {\n setDiscountCode(discountCodeSaved);\n }, [discountCodeSaved]);\n\n const [\n submitDiscountApi,\n { data: discountSubmitData, error: discountApiError },\n ] = useApplyDiscountCodeMutation();\n\n const applyDiscount = (newDiscountCode: string) => {\n setDiscountCode(newDiscountCode);\n setDiscountLoading(true);\n\n if (!newDiscountCode)\n return Promise.reject(new Error(\"No discount code provided\"));\n\n return submitDiscountApi({\n variables: {\n cartToken: token,\n code,\n couponCodes: [newDiscountCode],\n },\n })\n .then(async () => {\n await onSuccess();\n setDiscountLoading(false);\n })\n .catch(() => {\n setDiscountLoading(false);\n });\n };\n\n const removeDiscount = () => {\n setDiscountLoading(true);\n\n return submitDiscountApi({\n variables: {\n cartToken: token,\n code,\n couponCodes: [],\n },\n })\n .then(async () => {\n await onSuccess();\n setDiscountLoading(false);\n setDiscountCode(null);\n })\n .catch(() => {\n setDiscountLoading(false);\n });\n };\n\n const discountError =\n discountApiError?.message ??\n discountSubmitData?.applyDiscountCode.errors[0]?.message;\n\n return {\n discountCode,\n applyDiscount,\n removeDiscount,\n submitDiscountApi,\n discountSubmitData,\n discountLoading,\n discountError,\n };\n};\n","import Button from \"@material-ui/core/Button\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Chip from \"@material-ui/core/Chip\";\nimport React, { FC, useState } from \"react\";\nimport { useStyles } from \"./styles\";\nimport { config } from \"../config\";\nimport Spinner from \"../../shared/components/Spinner\";\n\ninterface DiscountCodeProps {\n discountCode?: string | null;\n onApply: (code: string) => Promise;\n onRemove: () => Promise;\n discountLoading?: boolean;\n}\n\nconst DiscountCode: FC = ({\n discountCode,\n onApply,\n onRemove,\n discountLoading,\n}) => {\n const [inputValue, setInputValue] = useState(\"\");\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n const classes: any = useStyles();\n\n const onClickApply = () => {\n onApply(inputValue)\n .then(() => setInputValue(\"\"))\n .catch(console.error);\n };\n\n const onClickRemove = () => {\n onRemove().catch(console.error);\n };\n\n return (\n
\n {discountCode ? (\n \n ) : (\n <>\n setInputValue(e.target.value)}\n //TODO: Add translations\n placeholder=\"Discount code\"\n variant=\"outlined\"\n size=\"small\"\n className={classes.discountInputField}\n />\n \n \n {/* TODO: Add translations */}\n {config.translations.checkout_discount_apply ?? \"Apply\"}\n \n \n \n )}\n {discountLoading && }\n
\n );\n};\n\nexport default DiscountCode;\n","import { useEffect, useState } from \"react\";\nimport { z } from \"zod\";\nimport errorNotifier from \"../../shared/modules/error-notifier\";\n\nconst optionalNullableString = () => z.string().optional().nullable();\n\nconst addressSchema = () =>\n z\n .object({\n address1: optionalNullableString(),\n address2: optionalNullableString(),\n city: optionalNullableString(),\n phone: optionalNullableString(),\n state: optionalNullableString(),\n zip: optionalNullableString(),\n regionCode: optionalNullableString(),\n postalCode: optionalNullableString(),\n countryCode: optionalNullableString(),\n })\n .optional();\n\nconst locationSchema = () =>\n z\n .object({\n id: z.string(),\n storeName: optionalNullableString(),\n latitude: z.number().optional(),\n longitude: z.number().optional(),\n storeId: optionalNullableString(),\n displayName: optionalNullableString(),\n locationType: optionalNullableString(),\n logoUrls: z.array(z.string()).optional().nullable(),\n openingHours: z.array(z.unknown()).optional().nullable(),\n phoneNumber: optionalNullableString(),\n address: addressSchema(),\n })\n .optional();\n\nconst priceSchema = () =>\n z\n .object({\n value: z.number().optional(),\n currency: optionalNullableString(),\n })\n .optional();\n\nconst itemSchema = () =>\n z\n .object({\n name: optionalNullableString(),\n price: priceSchema(),\n quantity: z.number(),\n reason: z.object({}).passthrough(),\n customerComments: optionalNullableString(),\n imageUrl: z.string().url().optional().nullable(),\n sku: z.string().optional().nullable(),\n })\n .optional();\n\nconst returnLabelSchema = () =>\n z\n .object({\n labelType: z.string(),\n mimeType: z.string(),\n labelUrl: z.string().url().nullable().optional(),\n })\n .optional();\n\nconst shipmentSchema = () =>\n z\n .object({\n items: z.array(itemSchema()).optional(),\n returnLabels: z.array(returnLabelSchema()).optional(),\n })\n .optional();\n\nexport const confirmationStorageSchema = z.object({\n type: z.string(),\n refundMethod: z.string().optional(),\n noInstructions: z.boolean().optional(),\n email: z.string().email().optional(),\n guestReturn: z.boolean().optional(),\n shipment: shipmentSchema(),\n providerMoniker: z.string().optional(),\n location: locationSchema(),\n savePreferences: z.boolean().optional(),\n orderId: z.string().optional(),\n selectedRefundMethodType: z.string().optional(),\n});\n\nexport type ConfirmationStorage = z.infer;\n\nconst useCheckoutLocalStorageData = () => {\n const [confirmationData, setConfirmationData] =\n useState();\n\n const [error, setError] = useState(null);\n useEffect(() => {\n try {\n const state = JSON.parse(\n window.localStorage.getItem(\"nv_shop_now_v2_confirmation\") ?? \"{}\",\n );\n //TODO: Remove local storage after parsing\n const data = confirmationStorageSchema.parse(state);\n setConfirmationData(data);\n } catch (e) {\n console.error(e);\n setError(\"There was an error processing your request.\");\n errorNotifier.critical(\"There was an error parsing local storage data.\", {\n details: e,\n object: window.localStorage.getItem(\"nv_shop_now_v2_confirmation\"),\n });\n }\n }, []);\n\n return {\n confirmationData,\n errorParsingLocalStorage: error,\n };\n};\n\nexport default useCheckoutLocalStorageData;\n","import React, { useCallback, useEffect } from \"react\";\nimport { useSearchParams } from \"react-router-dom\";\nimport isNil from \"lodash/isNil\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {\n CommonEvent,\n ReviewSummaryPayload,\n} from \"@narvar/nth-kit-returns-headless\";\nimport ReturnCartCostPanel from \"./ReturnCartCostPanel\";\nimport { useStyles } from \"./styles\";\nimport useTransformToNth from \"./hooks/useTransformToNth\";\nimport { useShopNowV2CheckoutQuery } from \"../../gql/__generated__/schema\";\nimport useConsumerSettings from \"../hooks/useConsumerSettings\";\nimport CheckoutForm from \"../steps/Review/CheckoutForm\";\nimport { ADDRESS_DEFAULT, mergeAddress } from \"../modules/address\";\nimport useAddress from \"./hooks/useAddress\";\nimport BillingAddress from \"./BillingAddress\";\nimport usePayment from \"./hooks/usePayment\";\nimport useSubmit from \"./hooks/useSubmit\";\nimport { useDiscountCode } from \"./hooks/useDiscountCode\";\nimport { redirectToShop } from \"../../shared/modules/frame\";\nimport DiscountCode from \"./DiscountCode\";\nimport { config } from \"../config\";\nimport { usePreferences } from \"./hooks/usePreferences\";\nimport { ReviewSummaryRaw } from \"../ReviewSummary\";\nimport { getTranslation } from \"../../shared/modules/config\";\n\nconst Checkout = () => {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n const classes: any = useStyles();\n\n const [searchParams] = useSearchParams();\n const code = searchParams.get(\"c\") ?? \"\";\n const token = searchParams.get(\"t\") ?? \"\";\n const { localeFull, includeCurrency } = useConsumerSettings();\n const { onChangeAddress, newAddressDraft } = useAddress();\n\n const {\n data: checkoutResponse,\n loading: loadingCheckoutData,\n refetch: refetchCheckoutData,\n } = useShopNowV2CheckoutQuery({\n variables: {\n cartToken: token,\n code: code,\n },\n });\n\n const checkoutData = checkoutResponse?.shopNowV2Checkout.data;\n const paymentClientSecret = checkoutData?.payment?.paymentClientSecret ?? \"\";\n const paymentRequired =\n (checkoutData?.overallCartSummary?.total?.amount || 0) > 0;\n const discountCodeSaved = checkoutData?.overallCartSummary.discountCodes?.[0];\n\n const onSuccessDiscountCodeApply = useCallback(async () => {\n await refetchCheckoutData();\n }, [refetchCheckoutData]);\n\n const {\n discountCode,\n applyDiscount,\n removeDiscount,\n discountError,\n discountLoading,\n } = useDiscountCode({\n code,\n token,\n discountCodeSaved,\n onSuccess: onSuccessDiscountCodeApply,\n });\n\n const {\n preferencesStatus,\n savePreferences,\n setSavePreferences,\n updateConsumerPreferences,\n } = usePreferences();\n\n const { paymentError, makePayment, capturingPayment } = usePayment({\n secret: paymentClientSecret,\n newAddressDraft,\n });\n\n const reviewSummaryProps = useTransformToNth(checkoutData);\n\n const { loadingSubmitCheckout, onSubmitHandler, submitData } = useSubmit({\n paymentClientSecret,\n paymentRequired,\n makePayment,\n code,\n updateConsumerPreferences,\n cartToken: token,\n });\n\n const checkoutErrorCode = checkoutResponse?.shopNowV2Checkout.errors[0]?.code;\n\n useEffect(() => {\n if (checkoutErrorCode === \"Z501\") {\n redirectToShop();\n }\n }, [checkoutErrorCode]);\n\n const errorMessage =\n submitData?.shopNowV2Checkout.errors[0]?.message ??\n checkoutResponse?.shopNowV2Checkout.errors[0]?.message ??\n discountError;\n\n const handleReviewSummaryChange: CommonEvent = (\n event,\n ) => {\n if (!isNil(event.value?.savePreferences)) {\n setSavePreferences(event.value.savePreferences);\n }\n };\n\n const isPaymentConfigurationError =\n paymentRequired && !config.isStripeEnabled;\n\n return (\n \n \n \n }\n renderAddOn={\n <>\n \n {paymentRequired && (\n \n )}\n {isPaymentConfigurationError && (\n \n {getTranslation(\n \"shop_now_checkout_payment_invalid_configuration\",\n )}\n \n )}\n \n \n }\n onBack={redirectToShop}\n onSubmit={onSubmitHandler}\n />\n {errorMessage ? (\n \n {errorMessage}\n \n ) : null}\n \n \n );\n};\n\nexport default Checkout;\n","import { useState, useCallback } from \"react\";\nimport { useConsumerPreferences } from \"../../data/consumerPreferences\";\nimport useCheckoutLocalStorageData from \"../../hooks/useCheckoutLocalStorageData\";\n\nexport const usePreferences = () => {\n const { confirmationData } = useCheckoutLocalStorageData();\n const {\n preferencesStatus,\n updateConsumerPreferences: updateConsumerPreferencesApi,\n } = useConsumerPreferences(\n confirmationData?.guestReturn ? \"\" : confirmationData?.email,\n );\n\n const [savePreferences, setSavePreferences] = useState(\n confirmationData?.savePreferences,\n );\n\n const updateConsumerPreferences = useCallback(() => {\n if (savePreferences && confirmationData?.type) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return updateConsumerPreferencesApi(\n confirmationData.orderId,\n confirmationData.email,\n {\n returnMethods: [confirmationData.type],\n carriers: [],\n locations: [],\n },\n ).catch(() => {\n console.error(\"Error updating consumer preferences\");\n });\n }\n return Promise.resolve();\n }, [confirmationData, savePreferences, updateConsumerPreferencesApi]);\n\n return {\n preferencesStatus,\n savePreferences,\n setSavePreferences,\n updateConsumerPreferences,\n };\n};\n","import React from \"react\";\n\nimport CheckoutApp from \"../checkout/Checkout\";\n\nconst Checkout = () => {\n return ;\n};\n\nexport default Checkout;\n","import React, { useEffect } from \"react\";\nimport { Theme } from \"@material-ui/core\";\nimport Fade from \"@material-ui/core/Fade\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { makeRootStyles } from \"../theme/styles\";\nimport { useConsumerPreferences } from \"../data/consumerPreferences\";\nimport useCheckoutLocalStorageData from \"../hooks/useCheckoutLocalStorageData\";\nimport { cancelShopNowCheckout } from \"../../shared/modules/frame\";\nimport { Confirmation as ConfirmationPage } from \"../Confirmation\";\n\nconst useStyles = makeRootStyles(\n (theme: Theme) => ({\n root: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(12),\n display: \"flex\",\n alignItems: \"center\",\n },\n checkIcon: {\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n fontSize: \"5rem\",\n },\n title: {},\n subtitle: {},\n supplementaryText: {},\n gutterBottom: {\n marginBottom: theme.spacing(4),\n [theme.breakpoints.up(\"md\")]: {\n marginBottom: theme.spacing(2),\n },\n },\n labelButton: {\n marginBottom: theme.spacing(2),\n },\n continueShoppingButton: {},\n }),\n { name: \"N0Confirmation\" },\n);\n\nconst CheckoutConfirmation = () => {\n const { confirmationData, errorParsingLocalStorage } =\n useCheckoutLocalStorageData();\n\n const {\n guestReturn,\n email,\n savePreferences,\n selectedRefundMethodType,\n orderId,\n type,\n refundMethod,\n noInstructions,\n shipment,\n providerMoniker,\n location,\n } = confirmationData || {};\n\n const { preferencesStatus, updateConsumerPreferences } =\n useConsumerPreferences(guestReturn ? \"\" : email);\n\n useEffect(() => {\n if (savePreferences && selectedRefundMethodType) {\n updateConsumerPreferences(orderId, email, {\n returnMethods: [selectedRefundMethodType],\n carriers: [],\n locations: [],\n });\n }\n }, [savePreferences]);\n\n useEffect(() => {\n // This is added to remove shop now checkout banner on confirmation page\n cancelShopNowCheckout();\n }, []);\n\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n const classes: any = useStyles();\n return (\n \n
\n \n \n {errorParsingLocalStorage ? (\n
\n Sorry, there was an error while loading. Please try again!\n
\n ) : null}\n {confirmationData ? (\n \n ) : null}\n
\n
\n
\n
\n );\n};\n\nexport default CheckoutConfirmation;\n","import React from \"react\";\nimport { Route, Routes } from \"react-router-dom\";\nimport Container from \"@material-ui/core/Container\";\nimport clsx from \"clsx\";\n\nimport {\n adminStyleConfig,\n getBranding,\n isAdvanced,\n} from \"../../shared/modules/config\";\nimport { makeRootStyles } from \"../theme/styles\";\nimport { config } from \"../config\";\nimport ReturnOrder from \"./ReturnOrder\";\nimport Checkout from \"./Checkout\";\nimport CheckoutConfirmation from \"../checkoutConfirmation/CheckoutConfirmation\";\n\nexport const BASE_URL = \"/app_proxy\";\n\nexport const CHECKOUT_ROUTE = BASE_URL + \"/checkout_app\";\nexport const CONFIRMATION_ROUTE = CHECKOUT_ROUTE + \"/confirmation\";\n\nconst useStyles = makeRootStyles(\n (theme) => ({\n root: {\n paddingTop: getBranding(\"root_margin_top\"),\n paddingBottom: getBranding(\"root_margin_bottom\"),\n },\n container: {\n overflow: \"hidden\",\n },\n }),\n { name: \"N0App\" },\n);\n\nfunction AppRouter() {\n const classes = useStyles();\n\n return (\n
\n \n {isAdvanced && }\n \n } />\n } />\n } />\n \n \n
\n );\n}\n\nexport default AppRouter;\n","import React, { useEffect, useState } from \"react\";\nimport Fade from \"@material-ui/core/Fade\";\nimport { ApolloProvider } from \"@apollo/client\";\nimport { ThemeProvider, StylesProvider } from \"@material-ui/styles\";\nimport ResizeObserver from \"resize-observer-polyfill\";\nimport { GrowthBookProvider } from \"@growthbook/growthbook-react\";\nimport { isNil } from \"lodash/fp\";\n\nimport { config } from \"../config\";\nimport ReturnStepsProvider, {\n buildInitialState,\n} from \"../contexts/returnSteps\";\n\nimport {\n createClientWithoutToken,\n createCache,\n getGraphQLPath,\n} from \"../../shared/modules/apollo\";\nimport { setWindowFrameBoxSize } from \"../../shared/modules/frame\";\nimport useTheme from \"../theme/mui\";\nimport CssBaseline from \"./CssBaseline\";\nimport { withBackdropContainerProvider } from \"../contexts/backdropContainer\";\nimport ErrorBoundary from \"./ErrorBoundary\";\nimport errorNotifier from \"../../shared/modules/error-notifier\";\nimport { createClassNameGenerator } from \"../../shared/theme/styles\";\nimport { getConfig } from \"../../shared/modules/config\";\n\nimport apolloCacheConfig from \"../data/apolloCacheConfig\";\nimport { NthContextProvider } from \"../contexts/nthContext\";\nimport FrameDimensionsProvider from \"../contexts/frameDimensions\";\nimport { initGrowthBook } from \"../../shared/modules/growthBook\";\nimport noflake from \"../../shared/modules/noflake\";\nimport titan from \"../../shared/modules/titan\";\nimport StripeProvider from \"../contexts/StripeProvider\";\nimport {\n abTestingTrackResult,\n countingEvent,\n EXPERIMENT_VIEW_EVENT,\n PAGE_VIEW_EVENT,\n} from \"../data/abTesting\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport AppRouter from \"./AppRouter\";\n\nerrorNotifier.init();\nerrorNotifier.setUser({ id: config.shid });\n\nconst hasAnyAbTestingFeatures = false;\nconst growthBook = hasAnyAbTestingFeatures\n ? initGrowthBook({\n enableDevMode: config.environment === \"development\",\n attributes: {\n shopDomain: config.shopDomain,\n retailer: config.shopDomain,\n },\n\n // Experimentation (A/B Testing), only execute once when an experiment\n // start. It won't execute when it is an enforcement rule.\n trackingCallback: (experiment, result) => {\n abTestingTrackResult(\n growthBook,\n countingEvent(EXPERIMENT_VIEW_EVENT),\n experiment.key,\n );\n errorNotifier.setFeatures({ [experiment.key]: result.value });\n },\n // Feature Usage Callback, may execute multiple times\n onFeatureUsage: (featureKey, result) => {\n if (!isNil(result.value)) {\n errorNotifier.setFeatures({ [featureKey]: result.value });\n }\n },\n })\n : null;\n\n// Setup global config of noflake\nnoflake.endpoint =\n config.environment === \"production\"\n ? \"https://titanprod.narvar.com/v2/noflake\"\n : config.environment === \"staging\"\n ? \"https://titanlite-235686439465.us-central1.run.app/v2/noflake\"\n : \"\";\nnoflake.defaults = {\n request_page: \"shopz/consumer_app\",\n shop_domain: config.shopDomain,\n};\n\n// Setup global config of titan\ntitan.endpoint =\n config.environment === \"production\"\n ? \"https://titanprod.narvar.com/\"\n : config.environment === \"staging\"\n ? \"https://titanlite.narvar.com\"\n : \"\";\ntitan.retailerMoniker = config.shopDomain;\n\nconst observer = new ResizeObserver((entries) => {\n const body = entries[0];\n console.debug(\"setWindowFrameBoxSize\", body.contentRect.height);\n setWindowFrameBoxSize(body.contentRect.height);\n});\nobserver.observe(document.querySelector(\"body\"));\n\nconst classNameGenerator = createClassNameGenerator();\n\nconst App = () => {\n const theme = useTheme(getConfig(\"branding\"));\n const [inited, setInited] = useState(false);\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n // app fade in\n setInited(true);\n\n // update rollbar tracking info (shopUrl is an async iframe message from parent document)\n if (config.shopUrl) {\n errorNotifier.setUser({\n id: config.shid,\n shopUrl: config.shopUrl,\n });\n }\n }, 500);\n return () => clearTimeout(timeout);\n }, []);\n\n useEffect(() => {\n growthBook?.loadFeatures?.({ autoRefresh: false, timeout: 2000 });\n abTestingTrackResult(growthBook, countingEvent(PAGE_VIEW_EVENT));\n }, []);\n\n const client = createClientWithoutToken(\n createCache(apolloCacheConfig),\n getGraphQLPath(),\n );\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default withBackdropContainerProvider(App);\n","import App from \"./components/App\";\nexport default App;\n","import \"./polyfill\";\nimport React from \"react\";\nimport { render } from \"react-dom\";\n\nimport App from \"../consumer-app\";\n\nrender(, document.querySelector(\"#root\"));\n","import \"core-js/features/array/flat\"; // requires core-js 3\nimport \"polyfill-array-includes\";\nimport \"es6-shim\";\n\nimport smoothscroll from \"smoothscroll-polyfill\";\nimport \"srcdoc-polyfill\";\nimport \"url-search-params-polyfill\";\nimport \"unfetch/polyfill\";\n\nsmoothscroll.polyfill();\n"],"names":["useStyles","makeStyles","theme","container","display","justifyContent","alignItems","flexDirection","paddingTop","paddingBottom","message","marginBottom","name","ErrorBoundaryContent","useTheme","getConfig","classes","React","ThemeProvider","CssBaseline","Container","Grid","className","xs","item","Typography","align","variant","ErrorBoundary","constructor","props","super","this","state","hasError","getDerivedStateFromError","error","componentDidCatch","errorInfo","console","errorNotifier","critical","caughtByErrorBoundary","render","children","dataIdFromObject","obj","__typename","id","carrierService","carrierId","join","defaultDataIdFromObject","stripePromise","config","isStripeEnabled","loadStripe","stripePubKey","stripeAccount","StripeProvider","stripe","Elements","defaultProps","useStripeComponents","featureFlaggedHook","useStripe","elements","useElements","memoObjectByKeyValues","TypeForm","activeIndex","actions","useTypeForm","scrollToActive","useDebounceCallback","scrollToActiveNow","handleRenderNext","useCallback","activeSection","firstRender","setActiveSection","map","child","index","TypeFormSection","isNext","onRenderNext","buildCheckoutQuery","checkoutCode","cancel","gql","QUERY","makeRootStyles","root","height","cursor","backgroundColor","palette","common","white","border","breakpoints","ie11","spacing","edge","itemSelected","primary","main","details","flexWrap","padding","detailsSelected","alpha","iconContainer","up","icon","width","textAlign","maxWidth","paddingRight","description","title","qr","price","subtitle","marginTop","selected","onClick","clsx","sm","md","gutterBottom","dangerouslySetInnerHTML","__html","hideReturnMethodPrice","color","component","_extends","fill","xmlns","fillRule","clipRule","d","style","maskType","maskUnits","x","y","mask","GET_RETURN_LOCATIONS","useReturnLocations","called","setCalled","useState","data","setData","setError","loading","setLoading","client","useApolloClient","useMemo","getLocations","countryCode","provinceCode","zipcode","carrier","consolidationRadius","async","country","query","variables","returnLocations","err","getHandledErrorMessage","translations","general_loading_error","getLocationsAsync","reset","GET_USER_PREFERENCES","SET_USER_PREFERENCES","useConsumerPreferences","isUserPreferencesEnabled","queryStatus","updateStatus","email","saved","useQuery","skip","update","updateState","useMutation","useRequestStatus","consumerPreferences","userPreferences","preferencesStatus","status","profileStatus","returnMethods","length","profile","profileId","undefined","profileLink","userPreferencesEndpoint","updateConsumerPreferences","orderId","cache","result","apiResult","setUserPreferences","GraphQLError","extensions","code","readQuery","writeQuery","toReturnMethodPreference","method","BOXLESS_METHOD","DODDLE","PRINTERLESS_METHOD","METHOD_IN_STORE","METHOD_XPO","METHOD_SHIP_ON_YOUR_OWN","METHOD_KEEP_THE_ITEM","includes","isPreferredMethod","preferences","type","carrierLogo","transform","minWidth","errorItemsContainer","errorItemsList","listStyleType","listStylePosition","submitContainer","chooseButton","computeMethodId","ChooseMethod","orderFetchData","draftReturnUuid","useReturnStepsState","useReturnStepsActions","useNewDesign","isNthUi","nthReturnsActions","useNthReturnsActions","order","returnReasonsById","itemsById","exchangeItems","returnItems","buildItemsByType","items","returnMethodsPayload","orderNumber","locale","csid","addressError","refetch","ri","pictures","returnItem","getAddressError","useReturnMethods","errorMessage","setErrorMessage","errorItems","setErrorItems","returnMethodsFiltered","filter","keepTheItemMethod","_find","allItemsAreKeepTheItem","allReturnItemsAreKept","find","keepItemIds","indexOf","lineItemId","allExchangeItemsAreKept","ei","hasClaimItems","isClaim","useClaims","isSkipStep","isValidSelected","selectedReturnMethod","some","consumerPreferencesStatus","guestReturn","isActiveStep","useReturnStepIsActive","CHOOSE_METHOD_STEP","showNextBtn","useEffect","setReturnMethod","goToStep","CONFIRM_MAILING_ADDRESS_STEP","setReturnCart","retailerMoniker","createdDate","expirationDate","lastUpdatedDate","pudoOption","setKeepItemIds","preferredMethod","m","getIneligibleReturnMethodError","getTranslation","getIneligibleItemsReturnedError","Object","keys","ineligibleReasons","createChooseMethodHandler","handleNextStep","shouldDisplayLocations","CHOOSE_METHOD_SUBSTEP","methodIcons","InStoreIcon","MailInIcon","DropOffIcon","handleAddressFix","fromAddress","setCorrectedAddress","typeForm","selectedCategory","setSelectedCategory","initialAddress","patchZipCode","mergeAddress","normalizeAddressKeys","zipCode","setZipCode","zip","locations","locationStatus","resetLocations","showSwitchCategory","setShowSwitchCategory","localeFull","includeCurrency","useConsumerSettings","selectedMethod","pudoProvider","moniker","serviceType","getCarrierForLocationSearch","pudoOptions","isPickup","pudoActionType","pudoActionTypeDetails","iconUrl","displayName","displayDescription","fees","amount","value","feeBreakdown","fee","displayWithReturnMethod","reduce","p","c","currency","pickup","dropOff","preferred","_raw","pudoLocations","location","isInStore","logo","logoUrl","logoImg","test","replace","storeId","storeName","locationType","storeName2","logoUrls","openingHours","brand","companyName","distance","phoneNumber","storeAddress","phone","address","regionCode","postalCode","preferencesLoaded","setPreferencesLoaded","titan","identify","track","list_id","products","opt","product_id","skippedDropOffLocation","selectedDropOff","selectedLocation","useRegisterStepStatus","skipped","mailing_address_section_title","MailingAddressForm","onSubmit","disable","disableFields","validateZip","i","key","PudoRaw","progressiveStep","activeStep","loadingLocations","postalCodeError","showSkipLocation","multiLabelsEnabled","maxLabelRequests","labelsCount","requestedLabelCount","labelsMax","onChange","event","subComponent","setRequestedLabelCount","onBack","goBack","e","setSelectedPudoOption","dropOffLocation","loc","returnCart","setStoreLocation","choose_method_title","ErrorSnackbar","whiteSpace","Spinner","qrText","subText","choose_method_substep_boxless_subtitle","choose_method_substep_boxless_description","choose_method_substep_printerless_subtitle","getMethodCardStrings","MethodCard","returnMethodDisplayPrice","Button","disabled","size","fullWidth","choose_method_next_button_label","textLogo","textTransform","letterSpacing","DropoffLocationLogo","url","get","window","src","MAPTILER_KEY","maptilerKey","MAPTILER_MAP_ID","MAPTILER_STYLE","mapCoor","arg1","arg2","_isNumber","lng","lat","longitude","latitude","_pick","fetchCoordinatesFromAddress","address1","address2","city","encodeURIComponent","response","fetch","features","json","center","MaptilerMap","start","markersColor","disableDefaultMarker","markers","otherProps","Date","getTime","EL_ID","mapEl","useRef","mapObj","setMapObj","startWithCoor","startWithAddress","_start","setStart","_center","setCenter","mapInitFailed","setMapInitFailed","_markers","ret","concat","createMarkers","marker","Marker","secondary","scale","setLngLat","addTo","mapInit","Map","zoom","nav","NavigationControl","showCompass","addControl","warn","remove","flyTo","res","forEach","newMapObj","ref","borderSelected","paddingSelected","paddingUnselected","marginLeft","marginRight","flexGrow","boxSizing","logoContainer","overflowWrap","down","headline","overflow","textOverflow","lineClamp","boxOrient","locationName","locationNameTitle","locationNameSubtitle","descriptionWithMap","position","actionContainer","right","plusIcon","transition","closeIcon","mapContainer","margin","chooseButtonMap","borderRadius","disableMap","onChoose","selectedRef","mapVisible","showMap","handleChoose","current","shopName","IconButton","handleToggleMap","visible","PlusIcon","Collapse","in","timeout","mountOnEnter","chooseButtonNoMap","choose_method_substep_choose_location_button","input","formElement","formTextContainer","countryRoot","countryInputEndAdornment","countryInput","countryInputRoot","ZipForm","initialCountryCode","initialZip","isOpen","onSearch","toggleForm","updateZipcode","updateCountryCode","countryName","countryNamesByCode","handleSubmit","preventDefault","choose_method_substep_in_store_form_find_stores_near","Autocomplete","autoHighlight","disableClearable","endAdornment","inputRoot","getOptionLabel","isObject","debug","country_code","options","countryCodes","placeholder","mailing_address_form_country","OutlinedInput","autoFocus","autoComplete","inputProps","target","zip_code","search","choose_method_substep_in_store_locations_near","Link","skipContainer","skipLink","mapDescription","mapDescriptionContent","mapDescriptionTitle","background","minHeight","mapContainerElement","allowProceedWithoutLocation","locationId","zipFormOpen","toggleZipForm","isMdUp","useMediaQuery","localLocationId","setLocalLocation","l","currentPage","setCurrentPage","filteredLocations","slice","createClickLocationHandler","createSelectLocationHandler","handleOnMount","choose_method_substep_in_store_title","choose_method_substep_concierge_title","args","handleToggleForm","lg","LocationCard","compact","handleSkip","choose_method_substep_concierge_skip","returnMethodId","returnMethodService","ChooseLocation","submit","ContactInformationForm","contact","initialContact","draft","setDraft","validate","trimObject","assertAnyFieldBy","isValid","handleChange","_set","controlGridSize","TextField","label","mailing_address_form_email","mailing_address_form_phone","_noop","editButton","backButton","MailingAddress","notes","isHomePickup","isGuestReturn","requireContactInfo","isFormOpen","isAddressValid","setIsAddressValid","isContactValid","setIsContactValid","currentStepIndex","getStepIndex","showBackBtn","showNav","firstName","lastName","province","exchange","excludeFields","contactSubtitle","home_pickup_contact_information_subtitle","addressSubtitle","home_pickup_mailing_address_subtitle","gift_exchange_mailing_address_your_address","editAddressButtonLabel","gift_exchange_mailing_address_change","notesLabel","home_pickup_contact_information_form_notes","submitButtonLabel","backButtonLabel","handleAddressFormToggle","handleAddressChange","setConfirmedMailingAddress","handleContactChange","others","handleNotesChange","homePickupInstructions","handleNext","CHOOSE_SHOP_NOW_STEP","handleBack","multiline","rows","home_pickup_contact_information_form_pii_helper_text","exclude","submitLabel","Box","defaultAddress","fromCountryCode","fromProvince","fromProvinceCode","fromFirstName","fromLastName","fromAddress1","fromAddress2","fromCity","fromZip","decodedGuestEmail","useCalculateRefund","refund","calculateRefund","CREATE_DIRECT_UPLOAD","SUBMIT_RETURN","useSubmitReturn","directUpload","mutate","mutated","statusMutated","statusRequest","setDirectUploadStatus","useMergeRequestStatus","createDirectUpload","direct","file","JSON","parse","headers","uploadImage","checksum","calculateChecksum","metadata","getFileMetadata","filename","byteSize","byte_size","contentType","content_type","useUploadPictures","picturesUploading","setPicturesUploading","getBlobIdForPic","signedBlobId","submitReturn","Promise","all","pic","submitStatus","return_review_submit_error","errorDetail","submitStatusReset","strikethrough","content","left","top","borderTop","borderColor","Strikethrough","Component","viewBox","version","xlink","stroke","strokeWidth","href","checkIcon","fontSize","labelButton","renderInAppLabel","show","submitResult","supplementaryText","printLabelText","renderSupplementaryText","buttonTitle","Fade","ConfirmationCheckIcon","StyledMarkup","openLabel","underline","redirectToShop","orderedList","paddingInlineStart","gap","orderedListItem","counterIncrement","lineHeight","fontWeight","stepSpan","linkContainer","styles","imageWrapper","GooglePlay","alt","AppStore","withThemeProvider","Step","links","bodytextDefaultNone","iconsPrimaryNone","linksNoneDefault","linksNoneHover","fontFamily","link","text","image","TextLink","linkStyle","sDefault","sHover","themeTokens","Steps","steps","StepList","step","confirmationHeader","btnContainer","imgContainer","alternateEmailForm","preferencesStatusWrapper","preferencesStatusDescription","preferencesStatusLink","textDecoration","PreferencesStatus","documentbodyNoneNone","emphasize","linkStyles","textDecorationLine","iconStyles","Icon","Language","langKey","EMAIL_ADDRESS_PATTERN","validatePattern","inputValue","patternString","validationPattern","RegExp","Boolean","match","ConfirmationRaw","withSettingsProvider","ConfirmationRawC","shipment","providerMoniker","alternateEmailToggle","noInstructions","newEmailStatus","isHipaaCompliant","returnSteps","itemDisplay","useSettings","showAlternateEmailForm","setAlternateEmailForm","emailAddress","setUpdatedEmail","validationError","setValidationError","returnLabels","mappedUrls","acc","labelType","labelUrl","qrCodeUrl","printLabelUrl","provider","useLanguage","asString","rawValue","skuLabel","qtyLabel","colorLabel","sizeLabel","reasonLabel","buttonsPrimaryDefault","buttonsPrimaryHover","ItemCardSkeleton","LineItemSkeleton","Divider","ErrorBanner","langKeySuffix","Panel","header","PanelHeader","SemibigHeader","replacementTokens","generateTokensFromObject","Paragraph","toggleAlternateEmailForm","TextInput","SupportedInputType","submitAlternateEmailForm","area","active","transparent","ItemCard","thumbnail","imageUrl","sku","itemId","attributes","getItemAttrs","labels","additionalInfo","reason","hasShippingProtection","settingsRequested","Confirmation","useReturnsConfig","useCurrencyConfig","refundMethod","Step1Title","Step1Details","Step2Title","Step2Details","Step3Title","Step3Details","providerLinkUrl","providerLinkText","refundStepTitle","refundStepDetails","refundStepAppStoreLink","refundStepAppStoreLinkText","refundStepGooglePlayLink","refundStepGooglePlayLinkText","step2Link","step3Link","return_confirmation_title_keep_item","return_confirmation_title","return_confirmation_subtitle_keep_item","return_confirmation_subtitle_keep_item_no_refund","return_confirmation_subtitle","return_confirmation_subtitle_label_retry_enqueued","getConfirmationType","BOXLESS_ONLY_CARRIERS","getShipmentItemsForConfirmation","selectedItems","mimeType","shouldRenderInAppLabel","isInAppLabelEnabled","setShow","refundTotal","submitReturnResultCode","savePreferences","displayEmail","useCustomer","insuranceProvider","setTimeout","return_confirmation_supplementary","returnMethod","return_confirmation_print_packing_slip","return_confirmation_print_label","shopifyOrderId","split","pop","carriers","preferencesSubmitted","promotion_id","t","interpolate","insurance_provider","ConfirmationBasic","return_confirmation_continue_shopping","ConfirmationPage","selectedReturnCreditMethod","selectedPudoOption","refundAmount","refundAmountOriginal","incentiveText","red","incentiveContainer","skipButton","ChooseShopNow","emitMetrics","useEmitMetrics","abTesting","useAbTesting","submittingRedirect","shopNowSession","redirectingToShop","calculateParams","carrierServiceName","_unset","presentmentCurrency","shippingPrice","shippingMethod","ignoreEmpty","chosenRefundMethod","isShopNowEnabled","_isEmpty","queryErrorMessage","nonShopNowMethods","refundMethodsAvailable","v","RETURN_CREDIT_METHOD_SHOPNOW","baselineMethod","_minBy","refundFormatted","refundAmountCents","refundCents","shopNowRefundMethod","creditAmount","creditAmountCents","showIncentive","Math","abs","allowRefundToOriginalPayment","skipShopNow","shopNowAvailable","totalRefundCents","handleRefund","CHOOSE_RETURN_CREDIT_METHOD_STEP","selectedRefundMethod","checkoutUrl","hasRedirectUrl","isValidHttpUrl","submitting","submitErrorMessage","submitParams","_omit","shopNow","omitDeep","then","r","metrics","calculateReturnMetrics","lineItemIntension","abTestResult","convertFromDatadogMetrics","trackResult","countingEvent","SUBMIT_RETURN_SUCCESS_EVENT","catch","setShopNowRedirect","localStorage","setItem","redirectToCheckout","handleShopNow","shopDomain","object","confirmationPageState","selectedRefundMethodType","stringify","getItem","isAutoRedirect","_some","shopnow_opt_in_title","shopnow_opt_in_description","refundMethodDescription","shopnow_opt_in_yes","shopnow_opt_in_no","incentiveAmount","oldPrice","newPrice","strokeLinecap","strokeLinejoin","ChooseReturnCreditMethod","transformClaimItemsToExchangeItems","isClaimReplacementEnabled","isExchangesEnabled","claimReplacementItems","_compose","_map","_uniq","_get","allItemsAvailableForSale","inventoryCheckStatus","useInventoryCheck","calculateRefundPayload","claimReplacementOutOfStock","claimReplacementPayload","replacementRefund","replacementQueryStatus","loaded","replacementMethod","creditMethods","originalPayment","RETURN_CREDIT_METHOD_REFUND","translateMethod","methodId","RETURN_CREDIT_METHOD_RESHOP","choose_refund_method_reshop","RETURN_CREDIT_METHOD_REPLACEMENT","claims_resolution_option_replacement_title","choose_refund_method_original_payment","choose_refund_method_gift_card","shop_name","translateMethodTitle","claims_resolution_option_replacement_description_out_of_stock","claims_resolution_option_replacement_description","setDisabled","toCreditMethodCardData","_merge","oldPriceCents","renameKeys","sort","a","b","toNumber","RETURN_CREDIT_METHOD_GIFT_CARD","unshift","originalRefundMethod","REFUND_METHOD_ORIGINAL_PAYMENT","setAvailableReturnCreditMethods","skipReturnCreditMethod","autoChoose","REVIEW_STEP","createSelectionHandler","setReturnCreditMethod","REFUND_METHOD_GIFT_CARD","ShopNowIcon","ShopLaterIcon","RefundIcon","nthReturnActions","getNthType","toUpperCase","refundMethodOptions","newPriceCents","incentive","RefundMethods","showRefundAmounts","refundOptions","toLowerCase","choose_refund_method_title","CreditMethodCard","choose_refund_method_next_button_label","detailHeading","detailHeadingValue","typography","h2","grid","borderRight","getBorderUnselected","borderRightWidth","DetailHeading","DetailHeadingValue","returnItemCount","receiveItemCount","returnMethodDisplayName","isCharge","isPreCharge","hasReturnMethod","return_review_charge_total","return_review_estimated_refund","return_review_returning","return_review_receiving","return_review_return_method","thumb","variantOption","quantity","returnReason","h4","disclaimerText","commentContainer","comment","fontStyle","Item","keepTheItem","returnReasonTitle","isOriginal","isSmUp","isExchange","displayPrice","priceFormatted","productTitle","variantInfo","productImageUrl","itemVariantInfo","startCase","Image","productImageAltTxt","disableSpinner","imageStyle","objectFit","ImageIcon","return_review_item_quantity","return_review_keep_item_disclaimer","return_review_comments_title","shouldHideNarvarSeamlessExchangeValue","lineItem","total","captionText","Refund","taxesIncluded","totalDisplayPrice","totalDisplayTax","priorRefundsDisplayAmt","subtotalDisplayPrice","purchaseShippingDisplayPrice","exchangeShippingFeeDisplayPrice","exchangeShippingFeeDisplayName","onlyShowEstimatedRefund","return_review_subtotal","return_review_taxes_included","return_review_total_tax","return_review_prior_refunds","return_review_original_purchase_shipping","return_review_shipping_fee","translatedFee","formattedFee","parseFloat","substring","return_review_disclaimer","stripeElement","pointerEvents","form","buttonContainer","submitButton","paymentText","errorText","confirmCardPayment","secret","payment_method","card","getElement","CardElement","billing_details","setup_future_usage","paymentIntent","paymentId","onSuccess","hideSubmit","submitLoading","backendPaymentFailureError","cardElementOptions","base","body1","fontSmoothing","hint","invalid","iconColor","direction","return_review_payment_title","return_review_submit_return","SubmitButton","showContactRetailer","paymentIdPresent","customerOwesMoneyAndShouldContactRetailer","return_review_error_contact_retailer","Submit","isErrorSnackbarVisible","submitted","usePreApproval","isReshopEarlyHardApproval","requirePreApproval","preApprovalReturnUuid","refundCalculated","cents","preApprovalInput","preApproval","useNthFees","push","displayAmount","totalTaxDisplayAmt","originalShippingRefundedDisplayAmt","sign","useNthRefund","displayAllFees","subtotal","subtotalRefundCents","Items","orderItems","orderItem","selectedReason","availableReasons","getItemProps","exchangeTo","remainingQuantity","selectedQuantity","pascalCase","s","camelCase","reviewSummaryContainer","headerContainer","itemWrapper","unorderedList","conditionalSections","addEmailToReturn","paragraph","preferencesEmail","Total","itemPrice","exchangePrice","defaultLabelFee","labelFee","f","displayFees","hideSubtotal","Currency","token","wrapper","alignSelf","formField","disclaimer","ReshopOptIn","panelcontainerNoneNone","captiontextErrorNone","captiontextDefaultNone","subscribe","phoneLabel","borderWidth","MediumHeader","Checkbox","checked","labelBoxCellStyle","tel","animateLabel","containerOverridesStyle","ShopNowItems","shopNowItems","HIPAA_CSR_ROLES","ReviewSummaryContent","canAddCustomerEmail","canUpdateCustomerEmailHipaa","hasAssociatedEmail","mailTo","renderAddOn","addOnsPostCartSummary","onEmailChange","policyChecked","policyLabel","onPolicyChange","onSavePreferencesChange","reshopOptions","onReshopOptionsChange","returnsReviewAddEmailInputLabel","hasExchange","hasReturn","handleInputChange","ReviewSummaryRaw","withTranslationsProvider","ReviewSummaryRawC","hasClaim","isCertified","onChangeCertified","signature","onChangeSignature","allowRetry","userRole","backLabel","errorPosition","setErrorPosition","isEmailFieldStateValid","checkIfEmailFieldIsValid","isValidEmail","submitEnabled","every","StickyFooter","onShow","inView","Footer","onEvent","buttons","leftButton","outline","rightButton","below","Backdrop","translationKeys","getPudoMethodName","ReviewSummaryC","setPolicyChecked","setMailTo","orderData","useReturns","policyLabelText","reviewPolicy","enableReviewPolicy","reviewPolicyText","setPudoOptionMutation","isLoading","loadingError","mutationFn","Error","mutation","HipaaSetPudoOptionDocument","returnCartId","SetPudoOptionDocument","setPudoOption","setPudoOptionMutationRef","submitReturnCardMutationEffect","useHipaaSubmitReturnCartMutation","useSubmitReturnCartMutation","submitReturnCartMutation","submitError","onError","log","onCompleted","submitReturnCart","submittedReturn","policy","useClaimAttestation","isRefundAutomationEnabled","isPaymentFlowEnabled","loadingContainer","returnItemsSectionHeader","action","Review","claimAttestationProps","isClaimReplacement","decorateClaimsSubmitPayload","transformClaimSelectedItemsForNth","setErrorSnackbarVisibility","capturingPayment","setCapturingPayment","paymentError","setPaymentError","succeededPaymentIntentId","setSucceededPaymentIntentId","source","reviewStatus","uuid","useUuid","preApprovalHook","available","availableReturnCreditMethods","fallback","_last","setFallbackReturnCreditMethod","refundMethods","currentPaymentIntentClientSecret","setCurrentPaymentIntentClientSecret","paymentClientSecret","loadingOrCheckoutRedirect","newClientSecret","getPaymentNewClientSecret","setNewPaymentClientSecretFromError","isReshopError","getReshopError","return_review_submit_error_reshop","isLocalStorageEnabled","setSubmitSuccess","CONFIRMATION_STEP","ItemsToReceive","return_review_receiving_items","createCarouselItemKey","ItemsForReturn","return_review_returning_items","childReturnReasonId","fullReturnReason","reasonTitle","overrides","paymentMethodId","locallyCorrectedFromAddress","globallyCorrectedFromAddress","onbeforeunload","validResultCodes","customerPmtId","preApprovalId","showReshopSmsUpdates","submitProps","SAVE_PREFERENCES_CHECKED_EVENT","_isPlainObject","resultCode","_includes","setSubmitReturnResultCode","startsWith","verifyAndSetResultCode","finally","isTotalNegative","preChargeFeeAmountCents","renderCheckout","checkoutPaymentBroken","totalRefundPositive","totalRefund","titleTranslation","return_review_title_return_and_exchange","return_review_title_exchange","return_review_title","Loading","_sumBy","OrderDetails","Details","subtotalRefund","CheckoutForm","handleCalculateRefundAddressFix","nthFees","nthRefund","handleReviewSummaryChange","_isNil","setSavePreferences","setReshopOptionsError","setReshopOptions","smsUpdates","customerPhone","reshopOptionsError","isReshopSmsUpdates","submittingAddressError","isNewAddressValid","setIsNewAddressValid","newAddressDraft","setNewAddressDraft","hasAddressError","hasOtherError","stripeAddOn","errorAddOn","addressCorrectionAddOn","reminderText","reminderAddOn","validateReshopOptions","capturePayment","newOnSubmitHandler","paymentResult","isClaimsError","StepVisibilityWrapper","hasReachedReviewPage","useOrderFetchData","shopNowState","checkShopNow","calledCancel","setCalledCancel","fetchPolicy","checkShopNowAsync","useShopNowExpiration","cancelShopNowState","cancelShopNow","cancelShopNowCheckout","cancelShopNowAsync","useCancelShopNow","setDraftReturnUuid","stepsState","v4","TypeFormProvider","OrderLookup","onOrderFetch","getOrderData","orderFetchError","orderFetchLoading","shopNowData","shopNowError","shopNowLoading","shopNowCancelData","shopNowCancelError","shopNowCancelLoading","ChooseItems","ChooseMethodSubstep","ConfirmMailingAddress","Stepper","discountContainer","discountInputField","flex","discountChip","discountApplyButton","cartSummaryItemWrapper","textBold","textGreen","success","dark","transformNthCurrency","currencyCode","createFee","formattedValue","transformFees","transformFee","transformOrderItem","availableReturnActions","orderedQuantity","eligibilities","transformShopNowItem","cost","amountPerQuantity","discountedPrice","discountedAmountPerQuantity","transformOrderItems","transformShopNowItems","transformSelectedItem","transformSelectedItems","checkoutData","overallCartSummary","shopNowCart","shopNowCartSummary","cartSubtotal","cartSummary","cartTax","tax","cartFees","discounts","discount","targetType","discountAmount","prepareFees","refundMethodDisplay","transformRefund","lineItems","CostItem","isStrong","isGreen","ReturnCostPanelHeader","returnCartSummary","open","setOpen","hover","ReturnCartCostPanel","prepareReturnCartCostFees","collapsible","defaultOptions","AmountFragmentDoc","PaymentFragmentDoc","DiscountFragmentDoc","CartSummaryFragmentDoc","FeeBreakdownFragmentDoc","ReturnLineItemFragmentDoc","ReturnCartFragmentDoc","AddressFragmentDoc","LineItemFragmentDoc","CartFragmentDoc","RefundFragmentDoc","ShopNowV2CheckoutDocument","SubmitShopNowV2CheckoutDocument","ApplyDiscountCodeDocument","useAddress","ADDRESS_DEFAULT","onChangeAddress","BillingAddress","usePayment","makePayment","useSubmit","paymentRequired","cartToken","navigate","useNavigate","submitCheckoutAPI","submitData","loadingSubmitCheckout","baseOptions","Apollo","useSubmitShopNowV2CheckoutMutation","submitCheckoutComplete","checkout","payment","onSubmitHandler","gateway","paymentIntentId","CONFIRMATION_ROUTE","useDiscountCode","discountCodeSaved","discountCode","setDiscountCode","discountLoading","setDiscountLoading","submitDiscountApi","discountSubmitData","discountApiError","useApplyDiscountCodeMutation","discountError","applyDiscountCode","errors","applyDiscount","newDiscountCode","couponCodes","reject","removeDiscount","DiscountCode","onApply","onRemove","setInputValue","Chip","onDelete","onClickRemove","onClickApply","trim","checkout_discount_apply","disablePadding","optionalNullableString","z","string","optional","nullable","confirmationStorageSchema","boolean","array","number","passthrough","customerComments","unknown","useCheckoutLocalStorageData","confirmationData","setConfirmationData","errorParsingLocalStorage","Checkout","searchParams","useSearchParams","checkoutResponse","loadingCheckoutData","refetchCheckoutData","useShopNowV2CheckoutQuery","shopNowV2Checkout","discountCodes","onSuccessDiscountCodeApply","usePreferences","updateConsumerPreferencesApi","resolve","reviewSummaryProps","useTransformToNth","checkoutErrorCode","isPaymentConfigurationError","isNil","CheckoutApp","continueShoppingButton","CheckoutConfirmation","CHECKOUT_ROUTE","BASE_URL","getBranding","baseClassName","fixed","isAdvanced","adminStyleConfig","Routes","Route","path","element","ReturnOrder","init","setUser","shid","growthBook","noflake","endpoint","environment","defaults","request_page","shop_domain","ResizeObserver","entries","body","contentRect","setWindowFrameBoxSize","observe","document","querySelector","classNameGenerator","createClassNameGenerator","withBackdropContainerProvider","App","inited","setInited","shopUrl","clearTimeout","loadFeatures","autoRefresh","abTestingTrackResult","PAGE_VIEW_EVENT","createClientWithoutToken","createCache","apolloCacheConfig","getGraphQLPath","StylesProvider","generateClassName","GrowthBookProvider","growthbook","FrameDimensionsProvider","ApolloProvider","ReturnStepsProvider","initialState","buildInitialState","NthContextProvider","BrowserRouter","AppRouter","smoothscroll"],"sourceRoot":""}