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MH,EAAUI,UAAQ,OAAGN,EAAKO,MAAM,IAIvD,OAFiB,IAAIJ,IAAIE,EAAaH,EAAUD,QAAxCO,IAGV,C,+CCRad,EAAWrJ,eAAH,GAAuE,MAArD,EAANoD,OAAmB,EAAXD,YAAwB,EAAXiH,YACpD,GAAc,QAAd,EAAIC,OAAOC,WAAG,OAAV,EAAYC,aAAc,CAC5B,IAAMC,QAAiBH,OAAOC,IAAIC,aAAalB,WAE/C,GAAImB,EACF,OAAO,IAAIC,EAAAA,GAAgBD,EAASE,MAExC,CAqCA,MAAM,IAAInC,MAAM,kCAClB,C","sources":["webpack://orisubscriptionwizard/./src/shared/containers/ErrorBoundary.tsx","webpack://orisubscriptionwizard/./src/shared/containers/I18nContainer.tsx","webpack://orisubscriptionwizard/./src/subscription-box/hooks/useSubscriptionLogic.ts","webpack://orisubscriptionwizard/./src/subscription-box/hooks/useOpenEvent.ts","webpack://orisubscriptionwizard/./src/subscription-box/hooks/useSaveEvent.ts","webpack://orisubscriptionwizard/./src/subscription-box/hooks/useErrorEvent.ts","webpack://orisubscriptionwizard/./src/shared/containers/WizardContainer.tsx","webpack://orisubscriptionwizard/./src/shared/containers/SubscriptionTypesContainer.tsx","webpack://orisubscriptionwizard/./src/App.tsx","webpack://orisubscriptionwizard/./src/AppRender.tsx","webpack://orisubscriptionwizard/./src/shared/utils/isNullOrUndefinedOrEmpty.ts","webpack://orisubscriptionwizard/./src/shared/components/WizardLoader.tsx","webpack://orisubscriptionwizard/./src/shared/containers/StateContainer.tsx","webpack://orisubscriptionwizard/./src/shared/contexts/configurationContext.ts","webpack://orisubscriptionwizard/./src/shared/contexts/state-context.ts","webpack://orisubscriptionwizard/./src/shared/contexts/types-context.ts","webpack://orisubscriptionwizard/./src/shared/contexts/wizard-context.ts","webpack://orisubscriptionwizard/./src/shared/utils/wrap-action-with-dispatch.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useReducerState/actions.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useReducerState/middleware/useBackStep.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useReducerState/middleware/useCustomerValidation.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useReducerState/reducer.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useReducerState/index.ts","webpack://orisubscriptionwizard/./src/shared/utils/useMiddleware.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useReducerState/buildSetters.ts","webpack://orisubscriptionwizard/./src/shared/hooks/usePackageSelectionLogic.ts","webpack://orisubscriptionwizard/./src/shared/hooks/useLocalizations.ts","webpack://orisubscriptionwizard/./src/shared/types/EWizardCustomerType.ts","webpack://orisubscriptionwizard/./src/shared/types/EWizardType.ts","webpack://orisubscriptionwizard/./src/shared/types/ECustomerTypeSelection.ts","webpack://orisubscriptionwizard/./src/shared/types/ECardTypes.ts","webpack://orisubscriptionwizard/./src/shared/types/EProfileElementStatus.ts","webpack://orisubscriptionwizard/./src/shared/models/ApiError.ts","webpack://orisubscriptionwizard/./src/shared/utils/fetcher.ts","webpack://orisubscriptionwizard/./src/shared/utils/getSafeUrl.ts","webpack://orisubscriptionwizard/./src/shared/utils/getToken.ts"],"sourcesContent":["import { Component } from 'react';\n\ninterface ErrorBoundaryProps {\n children: JSX.Element;\n}\n\ninterface ErrorBoundaryState {\n error?: Error;\n}\n\nexport class ErrorBoundary extends Component {\n override readonly state: ErrorBoundaryState = {};\n\n static getDerivedStateFromError(error: Error) {\n return { error };\n }\n\n override render() {\n const { error } = this.state;\n\n if (error) {\n return (\n
\n

Ooops... error found :(

\n
{error.message}
\n
\n );\n }\n\n const { children } = this.props;\n\n return children;\n }\n}\n","import type { FC } from 'react';\nimport { IntlProvider } from 'react-intl';\n\nimport { useConfiguration } from '~/shared/contexts/configurationContext';\nimport { useLocalizations } from '~/shared/hooks/useLocalizations';\n\nexport const I18nContainer: FC = ({ children }) => {\n const { currentLanguage } = useConfiguration();\n const { data: localization } = useLocalizations();\n\n const messages = localization?.translations[currentLanguage] ?? {};\n\n if (!localization) {\n return null;\n }\n\n return (\n \n {children}\n \n );\n};\n","import { useErrorEvent } from './useErrorEvent';\nimport { useOpenEvent } from './useOpenEvent';\nimport { useSaveEvent } from './useSaveEvent';\n\nexport function useSubscriptionLogic() {\n const openLogic = useOpenEvent();\n const saveLogic = useSaveEvent();\n const errorLogic = useErrorEvent();\n\n return { ...openLogic, ...saveLogic, ...errorLogic } as const;\n}\n","import type { EventData } from '@ori-events/open-subscription-wizard';\nimport openSubscriptionEvent from '@ori-events/open-subscription-wizard';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { EWizardCustomerType } from '~/shared/types/EWizardCustomerType';\nimport type { WizardContext } from '~/shared/types/WizardContext';\n\nexport function useOpenEvent() {\n const [open, setOpen] = useState(false);\n const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);\n const [key, setKey] = useState(0);\n const [customerType, setCustomerType] = useState(null);\n\n const [wizardType, setWizardType] = useState(null);\n const [productCode, setProductCode] = useState();\n\n const handleOpenEvent = useCallback(\n ({\n detail: {\n customerType: initialCustomerType = EWizardCustomerType.All,\n productCode: code,\n type: initialWizardType,\n },\n }: CustomEvent) => {\n setCustomerType(EWizardCustomerType[initialCustomerType]);\n setWizardType(initialWizardType);\n setProductCode(code);\n setOpen(true);\n setKey((current) => current + 1);\n },\n [],\n );\n\n const handleOpenFeedback = () => {\n setIsFeedbackOpen(true);\n };\n\n const handleCloseFeedback = () => {\n setIsFeedbackOpen(false);\n };\n\n useEffect(() => {\n openSubscriptionEvent.listen(handleOpenEvent);\n\n return () => {\n openSubscriptionEvent.clean(handleOpenEvent);\n };\n }, [handleOpenEvent, customerType]);\n\n const handleClose = useCallback(() => {\n setOpen(false);\n }, []);\n\n return {\n open,\n customerType,\n wizardType,\n productCode,\n key,\n handleClose,\n handleCloseFeedback,\n handleOpenFeedback,\n isFeedbackOpen,\n } as const;\n}\n","import subscriptionSaved from '@ori-events/subscription-saved';\nimport { useCallback } from 'react';\n\nexport function useSaveEvent() {\n const handleSave = useCallback((...data: Parameters) => {\n subscriptionSaved.dispatch(...data);\n }, []);\n\n return { handleSave } as const;\n}\n","import errorEvent from '@ori-events/subscription-error';\nimport { useCallback } from 'react';\n\nexport function useErrorEvent() {\n const handleError = useCallback((...data: Parameters) => {\n errorEvent.dispatch(...data);\n }, []);\n\n return { handleError } as const;\n}\n","import type { FC } from 'react';\n\nimport { WizardProvider } from '../contexts';\nimport { useSubscriptionLogic } from '~/subscription-box/hooks/useSubscriptionLogic';\n\nexport const WizardContainer: FC = ({ children }) => {\n const {\n open,\n customerType,\n wizardType,\n productCode,\n handleClose,\n handleCloseFeedback,\n handleOpenFeedback,\n isFeedbackOpen,\n key,\n handleSave,\n handleError,\n } = useSubscriptionLogic();\n\n return (\n \n {children}\n \n );\n};\n","import type { FC } from 'react';\nimport { lazy, Suspense, useContext } from 'react';\n\nimport { wizardContext } from '../contexts';\nimport { EWizardType } from '../types/EWizardType';\nimport type { SubscriptionTypesContainerProps } from '../types/SubscriptionTypesContainerProps';\nimport { WizardLoader } from '~/shared/components/WizardLoader';\n\nconst SubscriptionContainer = lazy(async () =>\n import(\n /* webpackChunkName: \"SubscriptionContainer\", webpackPrefetch: true */ './SubscriptionContainer'\n ).then((module) => ({\n default: module.SubscriptionContainer,\n })),\n);\n\nconst AutoshipContainer = lazy(async () =>\n import(\n /* webpackChunkName: \"AutoshipContainer\", webpackPrefetch: true */ './AutoshipContainer'\n ).then((module) => ({\n default: module.AutoshipContainer,\n })),\n);\n\nexport const SubscriptionTypesContainer: FC = () => {\n const { wizardType, productCode, id } = useContext(wizardContext);\n\n if (!wizardType) {\n return null;\n }\n\n return wizardType === EWizardType.Subscription ? (\n }>\n \n \n ) : (\n }>\n \n \n );\n};\n","import { ThemeProvider } from '@ori-ui/mui';\nimport { TestIdProvider } from '@ori/testid-generator';\nimport type { VFC } from 'react';\nimport { SWRConfig } from 'swr';\n\nimport { projectName } from './shared/constants/projectName';\nimport { I18nContainer, SubscriptionTypesContainer, WizardContainer } from './shared/containers';\nimport { ErrorBoundary } from './shared/containers/ErrorBoundary';\nimport { ConfigurationProvider } from './shared/contexts/configurationContext';\nimport type { AppConfiguration } from './shared/models/AppConfiguration';\nimport { fetcher } from '~/shared/utils/fetcher';\n\ninterface AppProps {\n readonly configuration: AppConfiguration;\n}\n\nexport const App: VFC = ({ configuration }) => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n","import { OidcUrlHelper } from '@ori/auth';\nimport ReactDOM from 'react-dom';\n\nimport { App } from './App';\nimport type { AppConfiguration } from './shared/models/AppConfiguration';\nimport { isNullOrUndefinedOrEmpty } from './shared/utils/isNullOrUndefinedOrEmpty';\n\nexport const render = (rootElement: HTMLElement): void => {\n // extract token from URL; only on dev machine, not needed elsewhere\n if (__DEV__) {\n const searchParams = new URLSearchParams(window.location.hash.split('?')[1]);\n\n if (searchParams.has('state')) {\n const oidcUrlHelper = new OidcUrlHelper();\n\n oidcUrlHelper.storeTokenFromParams(searchParams);\n }\n }\n\n if (!rootElement.dataset.config) {\n throw new TypeError('Missing configuration data attribute!');\n }\n\n const configuration = JSON.parse(rootElement.dataset.config) as AppConfiguration;\n let requiredConfigurationKeys: Array> = [\n 'currentLanguage',\n 'tenant',\n 'customerId',\n 'identityUrl',\n ];\n\n if (!__DEV__) {\n requiredConfigurationKeys = [...requiredConfigurationKeys, 'globalApiUrl', 'staticApiUrl'];\n }\n\n for (const key of requiredConfigurationKeys) {\n if (isNullOrUndefinedOrEmpty(configuration[key])) {\n throw new TypeError(`Missing configuration key ${key} or has no value set!`);\n }\n }\n\n ReactDOM.render(, rootElement);\n};\n","export const isNullOrUndefinedOrEmpty = (value: unknown) =>\n value === null || value === '' || typeof value === 'undefined';\n","import { Dialog } from '@ori-ui/components';\nimport { CircularProgress, useMediaQuery, useTheme } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\n\nexport const WizardLoader: FC = () => {\n const { getTestIdProps } = useTestId();\n const { breakpoints } = useTheme();\n const isMobile = useMediaQuery(breakpoints.down('md'));\n\n return (\n \n \n \n );\n};\n","import type { FC } from 'react';\n\nimport { StateProvider } from '../contexts';\nimport { useReducerState } from '../hooks';\n\nexport const StateContainer: FC = ({ children }) => {\n const state = useReducerState({ currentStep: 0 });\n\n return {children};\n};\n","import { useContext, createContext } from 'react';\n\nimport type { AppConfiguration } from '../models/AppConfiguration';\n\nexport const configurationContext = createContext({\n identityUrl: '',\n tenant: '',\n globalApiUrl: '',\n staticApiUrl: '',\n graphqlUrl: '',\n kpiApiUrl: '',\n localApiUrl: '',\n onBehalfCustomerId: '',\n uriTemplate: '',\n placement: '',\n currentLanguage: '',\n customerId: 0,\n utcOffset: '',\n});\n\nexport const ConfigurationProvider = configurationContext.Provider;\n\nexport const useConfiguration = () => useContext(configurationContext);\n","import { createContext } from 'react';\n\nimport type { useReducerState } from '../hooks/useReducerState';\n\nexport const stateContext = createContext>(\n {} as ReturnType,\n);\n\nexport const StateProvider = stateContext.Provider;\n","import type { ApiModels } from '@ori/global-api-client';\nimport { createContext } from 'react';\n\ninterface TypesContext {\n types:\n | ApiModels.GlobalCustomersAutoshipTypeDto[]\n | ApiModels.GlobalCustomersSubscriptionTypeDto[];\n isLoading: boolean;\n}\n\nexport const typesContext = createContext({} as TypesContext);\n\nexport const TypesProvider = typesContext.Provider;\n","import { createContext } from 'react';\n\nimport type { WizardContext } from '../types';\n\nexport const wizardContext = createContext({} as WizardContext);\n\nexport const WizardProvider = wizardContext.Provider;\n","import type { Dispatch } from 'react';\n\nexport function wrapActionWithDispatch(\n dispatch: Dispatch,\n action: (...args: Args) => R,\n) {\n return (...args: Args) => dispatch(action(...args));\n}\n","import type { ApiModels } from '@ori/global-api-client';\nimport type { ChangeEvent } from 'react';\n\nimport type { ECustomerTypeSelection, Package } from '../../types';\nimport type { Frequency } from '../../types/Frequency';\n\nexport function setCurrentStep(step: number) {\n return { type: 'setCurrentStep', step } as const;\n}\n\nexport function setPackage(packageItem?: Package) {\n return { type: 'setPackage', packageItem } as const;\n}\n\nexport function setCustomerType(customerType: ECustomerTypeSelection) {\n return { type: 'setCustomerType', customerType } as const;\n}\n\nexport function setExistingCustomer(\n existingCustomer: Nullable,\n) {\n return { type: 'setExistingCustomer', existingCustomer } as const;\n}\n\nexport function setFrequency(item?: Nullable) {\n return { type: 'setFrequency', item } as const;\n}\n\nexport function setCustomerName({\n currentTarget: { value: firstName },\n}: ChangeEvent) {\n return { type: 'setCustomerName', firstName } as const;\n}\n\nexport function setCustomerSurname({\n currentTarget: { value: surname },\n}: ChangeEvent) {\n return { type: 'setCustomerSurname', surname } as const;\n}\n\nexport function goToSummary() {\n return { type: 'goToSummary' } as const;\n}\n\nexport function stepBack() {\n return { type: 'stepBack' } as const;\n}\n\nexport function setTermsAndConditions({\n currentTarget: { checked: termsAndConditionsAccepted },\n}: ChangeEvent) {\n return { type: 'setTermsAndConditions', termsAndConditionsAccepted } as const;\n}\n","import type { Dispatch } from 'react';\n\nimport type { ContextState } from '../../../types';\n\nexport function useBackStep([prevState, dispatch]: [ContextState, Dispatch]): [\n ContextState,\n Dispatch,\n] {\n return [\n {\n ...prevState,\n isBackEnabled: prevState.currentStep !== 0,\n },\n dispatch,\n ];\n}\n","import type { Dispatch } from 'react';\n\nimport type { ContextState } from '../../../types';\nimport { ECustomerTypeSelection } from '../../../types';\n\nexport function useCustomerValidation([prevState, dispatch]: [ContextState, Dispatch]): [\n ContextState,\n Dispatch,\n] {\n const { newCustomer, existingCustomer, selectedCustomerType } = prevState;\n let isCustomerSelectionValid = Boolean(selectedCustomerType);\n if (selectedCustomerType === ECustomerTypeSelection.ExistingCustomer) {\n isCustomerSelectionValid = Boolean(\n (existingCustomer || (newCustomer?.firstName && newCustomer.surname)) &&\n !(existingCustomer && (newCustomer?.firstName || newCustomer?.surname)),\n );\n }\n\n return [\n {\n ...prevState,\n isCustomerSelectionValid,\n },\n dispatch,\n ];\n}\n","import type { ContextState } from '../../types';\nimport type { ActionType } from './types';\n\nexport function reducer(prevState: ContextState, action: ActionType): ContextState {\n const { currentStep } = prevState;\n switch (action.type) {\n case 'setTermsAndConditions': {\n const { termsAndConditionsAccepted } = action;\n\n return {\n ...prevState,\n termsAndConditionsAccepted,\n };\n }\n case 'stepBack': {\n return {\n ...prevState,\n currentStep: currentStep - 1,\n };\n }\n case 'goToSummary': {\n return {\n ...prevState,\n currentStep: currentStep + 1,\n };\n }\n case 'setCurrentStep': {\n return {\n ...prevState,\n currentStep: action.step,\n };\n }\n\n case 'setFrequency': {\n return {\n ...prevState,\n selectedFrequency: action.item,\n };\n }\n\n case 'setExistingCustomer': {\n return {\n ...prevState,\n newCustomer: undefined,\n existingCustomer: action.existingCustomer,\n };\n }\n case 'setPackage': {\n return {\n ...prevState,\n selectedPackage: action.packageItem,\n currentStep: currentStep + 1,\n };\n }\n case 'setCustomerType': {\n return {\n ...prevState,\n selectedCustomerType: action.customerType,\n existingCustomer: null,\n newCustomer: undefined,\n };\n }\n case 'setCustomerName': {\n const { newCustomer } = prevState;\n\n return {\n ...prevState,\n existingCustomer: null,\n newCustomer: {\n ...newCustomer,\n firstName: action.firstName,\n },\n };\n }\n case 'setCustomerSurname': {\n const { newCustomer } = prevState;\n\n return {\n ...prevState,\n existingCustomer: null,\n newCustomer: {\n ...newCustomer,\n surname: action.surname,\n },\n };\n }\n default:\n return prevState;\n }\n}\n","import { useContext, useEffect, useReducer, useRef } from 'react';\n\nimport { wizardContext } from '../../contexts/wizard-context';\nimport type { ContextState } from '../../types';\nimport { ECustomerTypeSelection, EWizardCustomerType } from '../../types';\nimport { useMiddleware } from '../../utils';\nimport { buildSetters } from './buildSetters';\nimport { useBackStep, useCustomerValidation } from './middleware';\nimport { reducer } from './reducer';\n\nexport function useReducerState({\n currentStep = 1,\n isBackEnabled = false,\n ...rest\n}: Partial) {\n const [state, dispatch] = useMiddleware(\n useBackStep,\n useCustomerValidation,\n )(\n useReducer(reducer, {\n currentStep,\n isBackEnabled,\n termsAndConditionsAccepted: false,\n ...rest,\n }),\n );\n const { customerType } = useContext(wizardContext);\n const { current: actions } = useRef(buildSetters(dispatch));\n\n useEffect(() => {\n if (customerType === EWizardCustomerType.OnlyForOtherCustomers) {\n actions.setCustomerType(ECustomerTypeSelection.ExistingCustomer);\n } else {\n actions.setCustomerType(ECustomerTypeSelection.Myself);\n }\n }, [customerType, actions]);\n\n return { ...state, ...actions } as const;\n}\n","import type { MiddlewareType } from '../types';\n\nexport function useMiddleware(\n ...middleware: Array>\n) {\n return middleware.reduce((current, acc) => (args: [State, Dispatch]) => current(acc(args)));\n}\n","import type { Dispatch } from 'react';\n\nimport { wrapActionWithDispatch } from '../../utils';\nimport {\n goToSummary,\n setCurrentStep,\n setCustomerName,\n setCustomerSurname,\n setCustomerType,\n setExistingCustomer,\n setFrequency,\n setPackage,\n setTermsAndConditions,\n stepBack,\n} from './actions';\nimport type { ActionType } from './types';\n\nexport function buildSetters(dispatch: Dispatch) {\n return {\n setCurrentStep: wrapActionWithDispatch(dispatch, setCurrentStep),\n setPackage: wrapActionWithDispatch(dispatch, setPackage),\n setCustomerType: wrapActionWithDispatch(dispatch, setCustomerType),\n setExistingCustomer: wrapActionWithDispatch(dispatch, setExistingCustomer),\n setCustomerName: wrapActionWithDispatch(dispatch, setCustomerName),\n setCustomerSurname: wrapActionWithDispatch(dispatch, setCustomerSurname),\n stepBack: wrapActionWithDispatch(dispatch, stepBack),\n setFrequency: wrapActionWithDispatch(dispatch, setFrequency),\n goToSummary: wrapActionWithDispatch(dispatch, goToSummary),\n setTermsAndConditions: wrapActionWithDispatch(dispatch, setTermsAndConditions),\n } as const;\n}\n","import { useContext, useEffect, useState } from 'react';\n\nimport { typesContext } from '../contexts';\nimport type { Package } from '~/shared/types';\n\nexport const usePackageSelectionLogic = (filter: number) => {\n const { types, isLoading } = useContext(typesContext);\n const [packages, setPackages] = useState([]);\n\n const categories = types.filter((type) => type.isSubscriptionEnabled);\n\n // logic for sorting and merging the packages\n\n useEffect(() => {\n const filteredPackages = types.map((type) => {\n if ((type.typeId === filter || !filter) && type.isSubscriptionEnabled) {\n return type.packages;\n }\n\n return [];\n });\n const flatPackages = filteredPackages.flat();\n setPackages(flatPackages);\n }, [filter, types]);\n\n return { packages, categories, isLoading };\n};\n","import type { ApiModels } from '@ori/static-api-client';\nimport useSWR from 'swr';\n\nimport { useConfiguration } from '../contexts/configurationContext';\nimport type { ApiError } from '../models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\n\nexport function useLocalizations() {\n const { tenant, staticApiUrl, currentLanguage } = useConfiguration();\n\n const url = getSafeUrl(\n `/tenants/${tenant}/applications/subscriptionWizard/localization`,\n staticApiUrl,\n );\n const options: FetcherOptions = {\n tenant,\n headers: { 'Accept-Language': currentLanguage },\n };\n\n return useSWR([url, options]);\n}\n","export enum EWizardCustomerType {\n All = 'All',\n OnlyForMe = 'OnlyForMe',\n OnlyForOtherCustomers = 'OnlyForOtherCustomers',\n}\n","export enum EWizardType {\n Autoship = 'Autoship',\n Subscription = 'Subscription',\n}\n","export enum ECustomerTypeSelection {\n Myself = 'Myself',\n ExistingCustomer = 'ExistingCustomer',\n NewCustomer = 'NewCustomer',\n}\n","export enum ECardTypes {\n Visa = 'Visa',\n MasterCard = 'MasterCard',\n Maestro = 'Maestro',\n Other = 'Other',\n}\n","export enum EProfileElementStatus {\n Disabled = 'Disabled',\n Optional = 'Optional',\n Mandatory = 'Mandatory',\n Readonly = 'Readonly',\n AddOnly = 'AddOnly',\n}\n","import type { AxiosError } from 'axios';\n\nexport class ApiError extends Error {\n data: AxiosError;\n\n constructor(message: string, data: AxiosError) {\n super(message);\n this.name = 'ApiError';\n this.data = data;\n }\n}\n","import type { AxiosError, AxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\nimport applyCaseMiddleware from 'axios-case-converter';\n\nimport { getToken } from './getToken';\nimport { ApiError } from '~/shared/models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\n\nexport const client = applyCaseMiddleware(axios.create(), {\n // preserve keys in translations that represent locales, e.g. en-GB, ka-GE\n preservedKeys: (input) => /^[A-Za-z]{2}-[A-Za-z]{2}$/.test(input),\n caseFunctions: {\n // overrides built-in snake function to keep the keys of outcoming data in camelCase\n snake: (input) => input.replace(/[^\\dA-Za-z]+(.)/g, (_, char: string) => char.toUpperCase()),\n },\n});\n\n/**\n * Fetcher function for SWR hook.\n *\n * Use it only for `GET` request.\n * @param {string} url - endpoint URL\n * @param {FetcherOptions} options - options passed to axios\n */\nexport async function fetcher(url: string, options: FetcherOptions): Promise {\n const { identityUrl, tenant, ...config } = options;\n const token = await getToken({\n tenant,\n identityUrl,\n });\n const headers: AxiosRequestHeaders = {\n ...config.headers,\n Authorization: token.toString(),\n 'x-tenant-context': tenant,\n };\n\n const { data } = await client\n .get(url, {\n ...config,\n headers,\n })\n .then((response) => response)\n .catch((error: AxiosError) => {\n throw new ApiError(error.message, error);\n });\n\n return data;\n}\n","/**\n * Utility function which wraps javascript URL object. It preserves entire url (including pathname) of origin¨\n */\nexport const getSafeUrl = (path: string, origin: string) => {\n if (!origin) {\n return path;\n }\n\n const originUrl = new URL(origin.endsWith('/') ? origin : `${origin}/`);\n\n // Get pathname from origin as prefix and get path without leading slash\n const newPathname = `${originUrl.pathname}${path.slice(1)}`;\n\n const { href } = new URL(newPathname, originUrl.origin);\n\n return href;\n};\n","import { OidcAccessToken, OidcClient, OidcTokenStorage } from '@ori/auth';\n\nexport interface TokenConfiguration {\n readonly tenant: string;\n readonly identityUrl?: string;\n readonly forceReload?: boolean;\n}\n\nexport const getToken = async ({ tenant, identityUrl, forceReload }: TokenConfiguration) => {\n if (window.ori?.tokenService) {\n const oriToken = await window.ori.tokenService.getToken();\n\n if (oriToken) {\n return new OidcAccessToken(oriToken.Token);\n }\n }\n\n // only on dev machine, not needed elsewhere\n if (__DEV__) {\n const oidcTokenStorage = new OidcTokenStorage();\n let token;\n\n try {\n token = oidcTokenStorage.getAccessToken();\n } catch {\n throw new Error('Can not obtain token');\n }\n\n if (token && !forceReload) {\n return token;\n }\n if (identityUrl) {\n const clientId = 'ImplicitTest-V2';\n\n const oidcClient = new OidcClient(\n {\n callbackUrl: '#',\n redirectUrl: window.location.href,\n },\n {\n clientId,\n identityUrl,\n\n acrValues: `tenant:${tenant}`,\n scope: 'openid profile user_identification',\n },\n );\n\n oidcClient.doLogin();\n }\n }\n\n throw new Error('Unsupported token configuration');\n};\n"],"names":["ErrorBoundary","error","this","state","message","props","children","Component","I18nContainer","currentLanguage","useConfiguration","localization","useLocalizations","data","messages","translations","locale","useSubscriptionLogic","open","setOpen","isFeedbackOpen","setIsFeedbackOpen","key","setKey","customerType","setCustomerType","wizardType","setWizardType","productCode","setProductCode","handleOpenEvent","handleSave","handleError","openLogic","useState","useCallback","detail","initialCustomerType","EWizardCustomerType","code","initialWizardType","type","current","useEffect","openSubscriptionEvent","handleClose","handleCloseFeedback","handleOpenFeedback","saveLogic","subscriptionSaved","errorLogic","errorEvent","WizardContainer","value","onClose","onError","onSave","id","SubscriptionContainer","lazy","async","then","module","default","AutoshipContainer","SubscriptionTypesContainer","useContext","wizardContext","EWizardType","Suspense","fallback","WizardLoader","product","App","configuration","ThemeProvider","enableCacheProvider","cacheKey","projectName","TestIdProvider","team","project","fetcher","revalidateOnFocus","render","rootElement","dataset","config","TypeError","JSON","parse","requiredConfigurationKeys","ReactDOM","getTestIdProps","useTestId","breakpoints","useTheme","isMobile","useMediaQuery","down","hideCloseButton","sx","top","display","alignItems","justifyContent","StateContainer","useReducerState","currentStep","configurationContext","createContext","identityUrl","tenant","globalApiUrl","staticApiUrl","graphqlUrl","kpiApiUrl","localApiUrl","onBehalfCustomerId","uriTemplate","placement","customerId","utcOffset","ConfigurationProvider","Provider","stateContext","StateProvider","typesContext","TypesProvider","WizardProvider","wrapActionWithDispatch","dispatch","action","setCurrentStep","step","setPackage","packageItem","setExistingCustomer","existingCustomer","setFrequency","item","setCustomerName","firstName","currentTarget","setCustomerSurname","surname","goToSummary","stepBack","setTermsAndConditions","termsAndConditionsAccepted","checked","useBackStep","prevState","isBackEnabled","useCustomerValidation","newCustomer","selectedCustomerType","isCustomerSelectionValid","Boolean","ECustomerTypeSelection","reducer","selectedFrequency","undefined","selectedPackage","rest","middleware","reduce","acc","args","useMiddleware","useReducer","useRef","buildSetters","actions","usePackageSelectionLogic","filter","types","isLoading","packages","setPackages","categories","isSubscriptionEnabled","flatPackages","map","typeId","flat","url","getSafeUrl","options","headers","useSWR","ECardTypes","EProfileElementStatus","ApiError","name","Error","client","applyCaseMiddleware","axios","preservedKeys","input","test","caseFunctions","snake","replace","_","char","toUpperCase","token","getToken","Authorization","toString","get","response","catch","path","origin","originUrl","URL","endsWith","newPathname","pathname","slice","href","forceReload","window","ori","tokenService","oriToken","OidcAccessToken","Token"],"sourceRoot":""}