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A,MAAMS,EAAyBC,OAAOC,KAAKH,GAAOxB,QAC7C4B,IAASF,OAAOC,KAAKX,GAAQa,SAASD,KAGrCV,GAAO,OAAKM,EAAOC,GACzB,MAAO,CAAET,SAAQE,OAAM,C","sources":["webpack:///./src/microApps/base/components/CommonLayout/CommonLayout.hooks.ts","webpack:///./src/microApps/common/api/clients/directKimProxyAxiosClient.ts","webpack:///./src/microApps/common/api/finance/consentErrorInterceptor.ts","webpack:///./src/microApps/common/api/finance/kimProxyApi.ts","webpack:///./src/microApps/common/flow/kimProxyFlow.ts","webpack:///./src/microApps/common/tracking/ga4/emailSubscription/ga4EmailSubscriptionEvents.ts","webpack:///./src/microApps/member/consts.ts","webpack:///./src/microApps/member/hooks/useKimCustomerDataQuery.ts","webpack:///./src/microApps/member/member.utils.ts","webpack:///./src/microApps/member/memberQueries.ts","webpack:///./src/microApps/myCoop/consentSubscriptions/hooks/useConsentQuery.ts","webpack:///./src/microApps/myCoop/consentSubscriptions/hooks/useSubscribeMutation.ts","webpack:///./src/microApps/myCoop/myCoopQueries.ts","webpack:///./src/utility/consts.ts","webpack:///../../packages/components/src/Checkbox/Checkbox.tsx","webpack:///../../packages/components/src/Checkbox/Checkbox.module.scss","webpack:///../../packages/components/src/TextField/TextField.module.scss","webpack:///../../packages/components/src/TextField/TextField.tsx","webpack:///../../packages/components/src/TextInput/TextInput.tsx","webpack:///../../packages/utils/src/splitCustomObjectFromIntersection.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\n\nimport { appConfig } from '../../../../appConfig';\nimport { useAppDispatch, useAppSelector } from '../../../common/hooks/useThunkDispatch';\nimport { storeSelectors } from '../../../common/selectors/storeSelectors';\nimport { cartThunks } from '../../../common/thunks/cartThunks';\nimport { personalizationTracking } from '../../../common/tracking/contextAware/personalizationEvents';\nimport { ga4UserTracking } from '../../../common/tracking/ga4/user';\n\nexport const useInitialCartFetch = () => {\n    const dispatch = useAppDispatch();\n    const hasActiveStoreSelection = useAppSelector(storeSelectors.hasActiveStoreSelection);\n    useEffect(() => {\n        if (\n            hasActiveStoreSelection ||\n            (appConfig.coopUserSettings.isOrdererMunicipal &&\n                !appConfig.coopUserSettings.isShoppingForMunicipal)\n        ) {\n            dispatch(cartThunks.getCart());\n        }\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, [dispatch]);\n};\n\nconst REDIRECT_REASON_QUERY_KEY = 'redirectReason';\nexport const useRedirectReasonHandler = () => {\n    const { search, pathname } = useLocation();\n    const navigate = useNavigate();\n\n    useEffect(() => {\n        const queryString = new URLSearchParams(search);\n        const redirectReason = queryString.get(REDIRECT_REASON_QUERY_KEY);\n        let removeRedirectReasonQuery = true;\n        if (!redirectReason) return;\n\n        switch (redirectReason) {\n            case 'accountRemoved': {\n                ga4UserTracking.accountRemoved();\n                break;\n            }\n            case 'loginSuccess': {\n                ga4UserTracking.login(\n                    appConfig.coopUserSettings.isAuthenticatedWithBankId ? 'bankid' : 'email',\n                    'done',\n                );\n                personalizationTracking.trackUserLogin();\n                break;\n            }\n            case 'signup': {\n                removeRedirectReasonQuery = false;\n                ga4UserTracking.signup(\n                    appConfig.coopUserSettings.isMedmeraCustomer ? 'membership' : 'account',\n                    appConfig.coopUserSettings.isCompany ? 'business' : 'private',\n                    appConfig.coopUserSettings.isAuthenticatedWithBankId ? 'bankid' : 'email',\n                );\n                break;\n            }\n            case 'loginAndConnectMembership': {\n                ga4UserTracking.connectMembership('success', 'login');\n                break;\n            }\n\n            default: {\n                // eslint-disable-next-line no-console\n                console.error('Unknown redirect reason: ', redirectReason);\n                return;\n            }\n        }\n\n        if (removeRedirectReasonQuery) {\n            queryString.delete(REDIRECT_REASON_QUERY_KEY);\n        }\n\n        navigate(\n            {\n                pathname,\n                search: queryString.toString(),\n            },\n            { replace: true },\n        );\n    }, [navigate, search, pathname]);\n};\n","import type { AxiosInstance } from 'axios';\n\nimport { appConfig } from '../../../../appConfig';\nimport axiosClientFactory from './clientFactory';\nimport type { CustomErrorInterceptor } from './localApiAxiosErrorInterceptors';\n\nconst getDirectKimProxyAxiosClient = <TApiError = unknown>(\n    accessToken?: string,\n    neoId?: string,\n    errorInterceptors?: CustomErrorInterceptor<TApiError>[],\n): AxiosInstance => {\n    const directKimProxyAxiosClient = axiosClientFactory.createDirectApiClient(\n        {\n            baseURL: appConfig.coopSettings.serviceAccess.kimProxyApiUrl,\n            headers: {\n                Accept: 'application/json',\n                'Ocp-Apim-Trace': 'true',\n                'Ocp-Apim-Subscription-Key':\n                    appConfig.coopSettings.serviceAccess.kimProxyApiSubscriptionKey,\n                Authorization: neoId ? `adobe ${btoa(neoId)}` : `Bearer ${accessToken}`,\n            },\n            params: {\n                'api-version': appConfig.coopSettings.serviceAccess.kimProxyApiVersion,\n            },\n        },\n        errorInterceptors,\n    );\n\n    return directKimProxyAxiosClient;\n};\n\nexport default getDirectKimProxyAxiosClient;\n","import { createDefaultException } from '../../exceptions/exceptionUtils';\nimport type { CustomErrorInterceptor } from '../clients/localApiAxiosErrorInterceptors';\n\ntype ConsentApiException = {\n    code: '404' | '401';\n    details: string;\n    status: number;\n    title: string;\n    message: string;\n};\n\nconst consentErrorInterceptor: CustomErrorInterceptor<ConsentApiException> = (error) => {\n    const exception = createDefaultException(\n        error.response.data.message,\n        error.response.status.toString(),\n    );\n    return exception;\n};\n\nexport default consentErrorInterceptor;\n","import type { Consent } from '../../models/kimProxy/consentData';\nimport type { CustomerData, CustomerDataMinimized } from '../../models/kimProxy/customerData';\nimport getDirectKimProxyAxiosClient from '../clients/directKimProxyAxiosClient';\nimport consentErrorInterceptor from './consentErrorInterceptor';\n\nexport const kimProxyDirectApi = {\n    getCustomerData: async (token: string): Promise<CustomerDataMinimized> => {\n        const kimCustomerDataUrl = '/customer/data/me/';\n\n        const response =\n            await getDirectKimProxyAxiosClient(token).get<CustomerDataMinimized>(\n                kimCustomerDataUrl,\n            );\n\n        const resp = response.data;\n        return resp;\n    },\n    getCustomerDataFull: async (token: string): Promise<CustomerData> => {\n        const kimCustomerDataUrl = '/customer/data/me/';\n\n        const response =\n            await getDirectKimProxyAxiosClient(token).get<CustomerData>(kimCustomerDataUrl);\n\n        const resp = response.data;\n        return resp;\n    },\n    deleteCustomerDataCache: async (token: string) => {\n        const kimCustomerDataClearCacheUrl = '/customer/data/me/cache';\n\n        await getDirectKimProxyAxiosClient(token).delete<boolean>(kimCustomerDataClearCacheUrl);\n    },\n    changeEmail: async (token: string, email: string) => {\n        const kimCustomerEmailUrl = '/customer/change-email';\n        await getDirectKimProxyAxiosClient(token).post(kimCustomerEmailUrl, {\n            email,\n        });\n    },\n    getConsents: async (token?: string, neoId?: string): Promise<Consent[]> => {\n        const response = await getDirectKimProxyAxiosClient(token, neoId, [\n            consentErrorInterceptor,\n        ]).get<Consent[]>('/consent');\n\n        const resp = response.data;\n        return resp;\n    },\n    subscribeConsents: async (serviceIds: string[], token?: string, neoId?: string) => {\n        const response = await getDirectKimProxyAxiosClient(token, neoId).put('/consent/selected', {\n            identifiers: serviceIds,\n        });\n\n        const resp = response.data;\n        return resp;\n    },\n    unsubscribeConsent: async (serviceId: string, token?: string, neoId?: string) => {\n        const response = await getDirectKimProxyAxiosClient(token, neoId).delete('/consent', {\n            data: {\n                id: serviceId,\n            },\n        });\n\n        const resp = response.data;\n        return resp;\n    },\n};\n","import { appConfig } from '../../../appConfig';\nimport { getAuthToken } from '../api/auth/getAuthToken';\nimport { kimProxyDirectApi } from '../api/finance/kimProxyApi';\n\nconst kimProxyFlow = {\n    getCustomerData: async () => {\n        const identity = await getAuthToken();\n        const details = await kimProxyDirectApi.getCustomerData(identity.token);\n        return details;\n    },\n    getCustomerDataWithAppToken: async (appAuthToken: string) => {\n        const details = await kimProxyDirectApi.getCustomerData(appAuthToken);\n        return details;\n    },\n    getCustomerDataFull: async () => {\n        const identity = await getAuthToken();\n        const details = await kimProxyDirectApi.getCustomerDataFull(identity.token);\n        return details;\n    },\n    deleteCustomerDataCache: async () => {\n        const identity = await getAuthToken();\n        await kimProxyDirectApi.deleteCustomerDataCache(identity.token);\n    },\n    changeEmail: async (email: string) => {\n        const identity = await getAuthToken();\n        await kimProxyDirectApi.changeEmail(identity.token, email);\n        return true;\n    },\n    getConsents: async (neoId?: string) => {\n        const { isAuthenticated } = appConfig.coopUserSettings;\n        let token;\n        if (isAuthenticated) {\n            const spaToken = await getAuthToken();\n            token = spaToken?.token;\n        }\n\n        return getConsentWithErrorHandling(token, neoId);\n    },\n    getConsentsWithAppToken: async (appToken: string) => {\n        return getConsentWithErrorHandling(appToken);\n    },\n    subscribeConsents: async (services: string[], neoId?: string) => {\n        const { isAuthenticated } = appConfig.coopUserSettings;\n        let token;\n        if (isAuthenticated) {\n            const spaToken = await getAuthToken();\n            token = spaToken?.token;\n        }\n\n        const response = kimProxyDirectApi.subscribeConsents(services, token, neoId);\n        return response;\n    },\n    subscribeConsentsWithAppToken: async (services: string[], appToken: string) => {\n        const response = kimProxyDirectApi.subscribeConsents(services, appToken);\n        return response;\n    },\n    unsubscribeConsent: async (service: string, neoId?: string) => {\n        const { isAuthenticated } = appConfig.coopUserSettings;\n        let token;\n        if (isAuthenticated) {\n            const spaToken = await getAuthToken();\n            token = spaToken?.token;\n        }\n\n        const response = kimProxyDirectApi.unsubscribeConsent(service, token, neoId);\n        return response;\n    },\n};\n\nconst getConsentWithErrorHandling = async (token?: string, neoId?: string) => {\n    try {\n        const details = await kimProxyDirectApi.getConsents(token, neoId);\n        return details;\n    } catch (error) {\n        const err = error as { code?: string };\n        if (err.code && err.code === '404') {\n            // If there is no user found, return empty array\n            return [];\n        }\n\n        throw error;\n    }\n};\n\nexport default kimProxyFlow;\n","import { failSilently } from '../../utils/failSilently';\nimport { sendGA4Event } from '../shared/sendGa4Event';\n\nconst emailSubscriptionInteraction = (clickText: string) => {\n    const event: EmailSubscriptionInteractionEvent = {\n        event: 'interaction',\n        type: 'missa inga erbjudanden pop-up',\n        click_text: clickText,\n    };\n    sendGA4Event(event);\n};\n\nexport default {\n    close: {\n        sendEmailSubscriptionInteraction: failSilently(() => emailSubscriptionInteraction('Stäng')),\n    },\n    confirm: {\n        sendEmailSubscriptionInteraction: failSilently(() =>\n            emailSubscriptionInteraction('Godkänn'),\n        ),\n    },\n    skip: {\n        sendEmailSubscriptionInteraction: failSilently(() =>\n            emailSubscriptionInteraction('Hoppa över'),\n        ),\n    },\n};\n","export const MEMBER_CONSENT_QUERY = 'memberConsent';\nexport const MEMBER_CONSENT_NEWSLETTERS_EMAIL = [\n    'coop_offers',\n    'xtra_offers',\n    'member_association',\n    'membership_program',\n];\n\nexport const MEMBER_CONSENT_NEWSLETTERS_SMS = 'sms';\nexport const MEMBER_CONSENT_NEWSLETTER_STORE = 'coop_offers';\n\n// Remove later when Bloomreach is in use\nexport const ADOBE_MEMBER_CONSENT_NEWSLETTERS_EMAIL = [\n    'cooOnline',\n    'cooDRDigital',\n    'cooPartnermail',\n    'cooNewsletter',\n];\n","import { useQuery } from '@tanstack/react-query';\n\nimport kimProxyFlow from '../../common/flow/kimProxyFlow';\nimport { kimCustomerDataQueryKeys } from '../memberQueries';\n\nexport const useKimCustomerDataQuery = (enabled: boolean) => {\n    const query = useQuery({\n        queryKey: kimCustomerDataQueryKeys.defaultDataSet(),\n        queryFn: async () => {\n            return kimProxyFlow.getCustomerData();\n        },\n        enabled,\n    });\n\n    return query;\n};\n","import type { CustomerDataMinimized } from '../common/models/kimProxy/customerData';\n\nconst kimPhoneNumber = (customerData?: CustomerDataMinimized) => {\n    const phoneNumber =\n        customerData?.addresses?.find((x) => x.typeOfAddress === 'TEL_MOB')?.address || null;\n\n    return phoneNumber;\n};\n\nconst kimPhoneNumberVerified = (customerData?: CustomerDataMinimized) => {\n    const phoneNumberVerified =\n        customerData?.addresses?.find((x) => x.typeOfAddress === 'TEL_MOB')?.addressVerified ||\n        false;\n\n    return phoneNumberVerified;\n};\n\nexport default {\n    kimPhoneNumber,\n    kimPhoneNumberVerified,\n};\n","export const autoVoucherStatusQueryKey = ['autoVoucherStatus'];\nexport const kimCustomerDataQueryKeys = {\n    all: ['kimCustomerData'],\n    defaultDataSet: () => [...kimCustomerDataQueryKeys.all],\n    fullDatSet: () => [...kimCustomerDataQueryKeys.all, 'kimCustomerDataFull'],\n    byEmail: (email: string) => [...kimCustomerDataQueryKeys.all, 'kimCustomerEmail', email],\n    byApp: (params: { appToken?: string }) => [...kimCustomerDataQueryKeys.all, 'app', params],\n};\n","import { useQuery } from '@tanstack/react-query';\n\nimport { appConfig } from '../../../../appConfig';\nimport kimProxyFlow from '../../../common/flow/kimProxyFlow';\nimport { consentSubscriptionsKeys } from '../../myCoopQueries';\n\nconst useConsentQuery = (enabled: boolean, neoId?: string) => {\n    const mmid = appConfig.coopUserSettings.profile?.medmeraId?.toString();\n    const email = appConfig.coopUserSettings.profile?.email?.toString();\n\n    let queryKeyName: string[] = [];\n    if (neoId) queryKeyName = consentSubscriptionsKeys.consentSubscriptionsByNeoId(neoId);\n    else if (mmid) queryKeyName = consentSubscriptionsKeys.consentSubscriptionsByMmId(mmid);\n    else if (email) queryKeyName = consentSubscriptionsKeys.consentSubscriptionsByEmail(email);\n\n    const query = useQuery({\n        queryKey: queryKeyName,\n        queryFn: () => kimProxyFlow.getConsents(neoId),\n        retry: 0,\n        enabled: enabled && queryKeyName.length > 0 && !!queryKeyName,\n    });\n\n    return query;\n};\n\nexport default useConsentQuery;\n","import { useMutation } from '@tanstack/react-query';\n\nimport kimProxyFlow from '../../../common/flow/kimProxyFlow';\n\nexport const useSubscribeMutation = (onSubscribeSuccess?: () => void) => {\n    const subscribeMutation = useMutation({\n        mutationFn: (consent: string[]) => {\n            return kimProxyFlow.subscribeConsents(consent);\n        },\n        onSuccess: () => {\n            if (onSubscribeSuccess) {\n                onSubscribeSuccess();\n            }\n        },\n    });\n\n    return subscribeMutation;\n};\n","export const savedCartQueryKeys = {\n    all: ['savedCarts'],\n    byPaging: (page: number, pageSize: number) => [...savedCartQueryKeys.all, page, pageSize],\n};\n\nexport const subscriptionsQueryKeys = {\n    all: ['subscriptions'],\n    byId: (id: string) => [...subscriptionsQueryKeys.all, id],\n    timeslots: (subId: string) => [...subscriptionsQueryKeys.all, 'subscriptionTimeslots', subId],\n    klarnaSnippet: ['subscriptionsKlarnaSnippet'],\n};\n\nexport const orderReclamationsQueryKey = ['orderReclamations'];\nexport const deliveryAddressQueryKey = ['deliveryAddress'];\nexport const connectedCardsQueryKey = ['connectedCards'];\n\nexport const lastOrdersQueryKeys = {\n    all: ['lastOrders'],\n    byId: (id: string | undefined) => [...lastOrdersQueryKeys.all, id],\n};\n\nexport const myCoopProfileMenuKeys = {\n    all: ['myCoopProfileMenu'],\n    settingsPage: ['myCoopSettingsPage'],\n};\n\nexport const myCoopHouseholdKeys = {\n    householdMembers: ['householdMembers'],\n};\n\nexport const associationNamesQueryKey = ['associationNames'];\n\nexport const householdMemberQueryKeys = {\n    addHouseholdMember: (personalNumber: string) => ['addHouseholdMember', personalNumber],\n};\n\n// Poänguttag - Pointitem purchases\nexport const pointItemWithdrawalHistoryKeys = {\n    all: ['pointItemWithdrawalHistory'],\n    byDate: (from: Date, to: Date, page: number, size: number) => [\n        ...pointItemWithdrawalHistoryKeys.all,\n        from,\n        to,\n        page,\n        size,\n    ],\n};\n\n// Poänghistorik - point history\nexport const pointHistoryKeys = {\n    all: ['pointHistory'],\n    byDate: (from: Date, page: number, size: number) => [...pointHistoryKeys.all, from, page, size],\n};\n\n// Köphistorik - Money purchase history\nexport const purchaseHistoryKeys = {\n    all: ['purchaseHistory'],\n    byDate: (from: Date, page: number, size: number) => [\n        ...purchaseHistoryKeys.all,\n        from,\n        page,\n        size,\n    ],\n};\n\nexport const consentSubscriptionsKeys = {\n    all: ['consentSubscriptions'],\n    consentSubscriptionsByNeoId: (neoId: string) => [...consentSubscriptionsKeys.all, neoId],\n    consentSubscriptionsByAppViewToken: (AppViewToken: string) => [\n        ...consentSubscriptionsKeys.all,\n        AppViewToken,\n    ],\n    consentSubscriptionsByMmId: (mmId: string) => [...consentSubscriptionsKeys.all, mmId],\n    consentSubscriptionsByEmail: (email: string) => [...consentSubscriptionsKeys.all, email],\n};\n\n// Remove later when bloomreach is in place\nexport const adobeConsentSubscriptionsKeys = {\n    all: ['adobeConsentSubscriptions'],\n    consentSubscriptionsByNeoId: (neoId: string) => [\n        ...adobeConsentSubscriptionsKeys.all,\n        `neo:${neoId}`,\n    ],\n    consentSubscriptionsByMmId: (mmId: string) => [...adobeConsentSubscriptionsKeys.all, mmId],\n    consentSubscriptionsByEmail: (email: string) => [...adobeConsentSubscriptionsKeys.all, email],\n};\n\nexport const consentSubscribeToggleKeys = {\n    consentSubscribeByNeoId: (neoId: string) => ['consentSubscribeNeo', neoId],\n    consentSubscribeByMmId: (mmId: string) => ['consentSubscribe', mmId],\n    consentUnsubscribeByNeoId: (neoId: string) => ['consentUnsubscribeNeo', neoId],\n    consentUnsubscribeByMmId: (mmId: string) => ['consentUnsubscribe', mmId],\n};\n","export const IDS_REDIRECTREASON_QUERY = 'redirectReason';\nexport const IDS_REDIRECTREASON_QUERYVALUE_SIGNUP = 'signup';\nexport const IDS_RETURNURL_QUERY = 'returnUrl';\n","'use client';\n\nimport { CheckmarkIcon } from '@coop/icons';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport classNames from 'classnames';\nimport type * as React from 'react';\nimport { VisuallyHidden } from 'react-aria';\n\nimport { Icon } from '../Icon';\nimport styles from './Checkbox.module.scss';\n\ninterface StyledCheckboxProps extends CheckboxPrimitive.CheckboxProps {\n    label: React.ReactNode;\n    labelVisuallyHidden?: boolean; // hide for render, but still announce when using screen reader\n    disabled?: boolean;\n    validationMsg?: string;\n    theme?: 'shadowed' | 'default';\n    indicatorVerticalPosition?: 'top' | 'center';\n}\n\nconst StyledCheckbox = ({\n    label,\n    validationMsg,\n    className,\n    disabled = false,\n    labelVisuallyHidden = false,\n    theme = 'default',\n    indicatorVerticalPosition: labeVerticalPosition = 'center',\n    ...props\n}: StyledCheckboxProps) => {\n    const classes = classNames(\n        styles.Checkbox,\n        className,\n        theme === 'shadowed' && styles['Checkbox-shadowed'],\n        disabled && styles['is-disabled'],\n        validationMsg && styles['is-invalid'],\n    );\n\n    return (\n        <div className={classes}>\n            <CheckboxPrimitive.Root\n                // eslint-disable-next-line react/jsx-props-no-spreading\n                {...props}\n                className={classNames(\n                    styles.CheckboxButton,\n                    labeVerticalPosition === 'center' && styles['CheckboxButton--center'],\n                    labeVerticalPosition === 'top' && styles['CheckboxButton--top'],\n                )}\n                disabled={disabled}\n            >\n                {theme === 'shadowed' && <div className={classNames(styles.IndicatorShadow)} />}\n                <CheckboxPrimitive.Indicator className={styles.Indicator}>\n                    <Icon icon={CheckmarkIcon} aria-hidden />\n                </CheckboxPrimitive.Indicator>\n            </CheckboxPrimitive.Root>\n            <label htmlFor={props.id} className={classNames(styles.Label)}>\n                {labelVisuallyHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n                {validationMsg && <span className={styles.ValidationMessage}>{validationMsg}</span>}\n            </label>\n        </div>\n    );\n};\n\nexport default StyledCheckbox;\n","// extracted by mini-css-extract-plugin\nexport default {\"Checkbox\":\"Y02YGszF\",\"is-disabled\":\"Q92zu7lA\",\"is-invalid\":\"pTNKREns\",\"CheckboxButton\":\"WTmRJxlo\",\"CheckboxButton--center\":\"ChXSMKxP\",\"CheckboxButton--top\":\"oWSBitfJ\",\"Indicator\":\"Kvm8CmPU\",\"Label\":\"xlvlfBnS\",\"ValidationMessage\":\"k4rpKaRx\",\"Checkbox-shadowed\":\"OgUQu9R2\",\"IndicatorShadow\":\"YbZlQr1_\"};","// extracted by mini-css-extract-plugin\nexport default {\"Container\":\"mzNAH6Pz\",\"TopContainer\":\"jU8P02pG\",\"BottomContainer\":\"dxPSebVp\",\"InputContainer\":\"KhcWGy_U\",\"Input\":\"FB9Zekja\",\"TextArea\":\"DJjSRY6R\",\"PostfixSlot\":\"YyrA4WeF\",\"PrefixSlot\":\"_XIGwGkW\",\"HelperText\":\"z4f00Lmh\",\"Label\":\"FvaO26Ls\",\"ValidationText\":\"zssnVrz1\"};","/* eslint-disable react/jsx-props-no-spreading */\nimport classNames from 'classnames';\nimport React from 'react';\nimport type { TextAreaProps, TextFieldProps } from 'react-aria-components';\nimport {\n    FieldError as AriaFieldError,\n    Input as AriaInput,\n    Label as AriaLabel,\n    Text as AriaText,\n    TextArea as AriaTextArea,\n    TextField as AriaTextField,\n} from 'react-aria-components';\n\nimport styles from './TextField.module.scss';\n\nconst TextFieldRoot = (props: TextFieldProps) => (\n    <AriaTextField\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        {...props}\n        className={classNames(props.className, styles.Container)}\n    >\n        {props.children}\n    </AriaTextField>\n);\n\nconst TextFieldTopContainer = (props: { children: React.ReactNode }) => (\n    <div className={styles.TopContainer}>{props.children}</div>\n);\n\nconst TextFieldInputContainer = (props: { children: React.ReactNode }) => (\n    <div className={styles.InputContainer}>{props.children}</div>\n);\n\nconst TextFieldBottomContainer = (props: { children: React.ReactNode }) => (\n    <div className={styles.BottomContainer}>{props.children}</div>\n);\n\nconst TextFieldLabel = (props: {\n    label?: string;\n    isRequired?: boolean;\n    necessityIndicator?: 'label' | 'none';\n}) => {\n    let indicator = props.necessityIndicator;\n    if (!props.label) {\n        return null;\n    }\n\n    // This case is for backwards compatibility. If the field is required, but the indicator is not set, we default to 'label'.\n    // This essentially replaces old * indicator with (obligatoriskt) text if the indicator is not yet set.\n    // This is to avoid breaking changes in the UI after new TextInput is deployed.\n    if (props.isRequired && indicator === undefined) {\n        indicator = 'label';\n    }\n\n    if (!indicator || indicator === 'none') {\n        return <AriaLabel className={styles.Label}>{props.label}</AriaLabel>;\n    }\n\n    return (\n        <AriaLabel className={classNames(styles.Label)}>\n            {props.label}\n            {props.isRequired ? (\n                // Required is dealt with aria-required in the input. tehre is no ARIA for optional fields, so they must be part of the label, available for screenreaders.\n                <span aria-hidden> (obligatoriskt)</span>\n            ) : (\n                <span> (frivilligt)</span>\n            )}\n        </AriaLabel>\n    );\n};\n\nconst TextFieldHelperText = (props: { helperText?: string; disabledReason?: React.ReactNode }) =>\n    (props.helperText || props.disabledReason) && (\n        <AriaText slot=\"description\" className={styles.HelperText}>\n            {[props.helperText, props.disabledReason].filter(Boolean).join('. ')}\n        </AriaText>\n    );\n\nconst TextFieldValidationError = (props: { validationText?: string }) =>\n    props.validationText && (\n        <AriaFieldError className={styles.ValidationText}>{props.validationText}</AriaFieldError>\n    );\n\nconst TextFieldPostfix = (props: { children: React.ReactNode }) =>\n    props.children && <div className={styles.PostfixSlot}>{props.children}</div>;\n\nconst TextFieldPrefix = (props: { children: React.ReactNode }) =>\n    props.children && <div className={styles.PrefixSlot}>{props.children}</div>;\n\nconst TextFieldInput = React.forwardRef<HTMLInputElement, {}>((_props, ref) => (\n    <AriaInput\n        ref={ref}\n        className={({ isInvalid }) => classNames(styles.Input, isInvalid && styles['is-invalid'])}\n    />\n));\n\nconst TextFieldTextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>((props, ref) => (\n    <AriaTextArea\n        ref={ref}\n        {...props}\n        className={({ isInvalid }) =>\n            classNames(props.className, styles.TextArea, isInvalid && styles['is-invalid'])\n        }\n    />\n));\n\nconst TextField = {\n    Root: TextFieldRoot,\n    TopContainer: TextFieldTopContainer,\n    InputContainer: TextFieldInputContainer,\n    BottomContainer: TextFieldBottomContainer,\n    Label: TextFieldLabel,\n    HelperText: TextFieldHelperText,\n    ValidationError: TextFieldValidationError,\n    Prefix: TextFieldPrefix,\n    Postfix: TextFieldPostfix,\n    Input: TextFieldInput,\n    TextArea: TextFieldTextArea,\n};\n\nexport default TextField;\n","/* eslint-disable jsx-a11y/label-has-associated-control */\n/* eslint-disable react/jsx-props-no-spreading */\nimport { splitCustomObjectFromIntersection } from '@coop/utils';\nimport * as React from 'react';\nimport type { TextFieldProps } from 'react-aria-components';\n\nimport { TextField } from '../TextField';\n\ninterface TextInputCustomProps {\n    label?: string;\n    helperText?: string;\n    validationText?: string;\n    disabledReason?: React.ReactNode;\n    postfixSlot?: React.ReactNode;\n    /**\n     * In certain cases it is needed to hide the indicator that a field is required or optional.\n     * It might depend on the context of the form and how many required fields there is versus optional ones.\n     * If most fields in a form are required - show indicator for optional ones.\n     * If most fields in a form are optional - show indicator for required ones.\n     * By default the label indicator is shown.\n     * @default \"label\"\n     */\n    necessityIndicator?: 'label' | 'none';\n}\n\n// Override React Aria's TextFieldProps to add comments for some props\ninterface TextFieldOverridenProps {\n    /**\n     * @deprecated Use helperText instead with a correct UX copy. Placeholder will be removed from TextInput for A11Y reasons.\n     * */\n    placeholder?: string;\n\n    /** Makes a field required for A11Y purposes. It does not add a visual cue when necessityIndicator is set to 'none'. */\n    isRequired?: boolean;\n\n    /** Use disabledReason instead. It will make the field read only (focusable) and provide the text why its disabled in the help text label.  */\n    isDisabled?: never;\n}\n\nconst TextInput = React.forwardRef<\n    HTMLInputElement,\n    TextInputCustomProps & TextFieldProps & TextFieldOverridenProps\n>((props, ref) => {\n    const { custom: customProps, rest: textInputProps } = splitCustomObjectFromIntersection<\n        TextInputCustomProps,\n        TextFieldProps\n    >(props, {\n        label: props.label,\n        helperText: props.helperText,\n        validationText: props.validationText,\n        disabledReason: props.disabledReason,\n        postfixSlot: props.postfixSlot,\n        necessityIndicator: props.necessityIndicator,\n    });\n\n    return (\n        <TextField.Root\n            {...textInputProps}\n            isReadOnly={!!customProps.disabledReason}\n            // We mostly use the inputs with React Hook Form, so the validation behavior must be set to aria\n            validationBehavior={textInputProps.validationBehavior ?? 'aria'}\n        >\n            <TextField.TopContainer>\n                <TextField.Label\n                    label={customProps.label}\n                    isRequired={textInputProps.isRequired}\n                    necessityIndicator={props.necessityIndicator}\n                />\n                <TextField.HelperText\n                    helperText={customProps.helperText}\n                    disabledReason={customProps.disabledReason}\n                />\n            </TextField.TopContainer>\n\n            <TextField.InputContainer>\n                <TextField.Input ref={ref} />\n                {props.postfixSlot && <TextField.Postfix>{props.postfixSlot}</TextField.Postfix>}\n            </TextField.InputContainer>\n\n            {customProps.validationText && (\n                <TextField.BottomContainer>\n                    <TextField.ValidationError validationText={customProps.validationText} />\n                </TextField.BottomContainer>\n            )}\n        </TextField.Root>\n    );\n});\n\nexport default TextInput;\n","import { pick } from 'lodash-es';\n\ntype AllOptionalKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T];\ntype AllNonOptionalKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T];\n\ntype OptionalToMaybeUndefined<T> = { [K in AllOptionalKeys<T>]: T[K] | undefined } & {\n    [K in AllNonOptionalKeys<T>]: T[K];\n};\n\nexport const splitCustomObjectFromIntersection = <TCustom extends {}, TResult extends {}>(\n    whole: TCustom & TResult,\n    custom: OptionalToMaybeUndefined<TCustom>,\n) => {\n    const keysNotFromCustomProps = Object.keys(whole).filter(\n        (key) => !Object.keys(custom).includes(key),\n    );\n\n    const rest = pick(whole, keysNotFromCustomProps) as TResult;\n    return { custom, rest };\n};\n"],"names":["useInitialCartFetch","dispatch","hasActiveStoreSelection","useEffect","coopUserSettings","isOrdererMunicipal","isShoppingForMunicipal","getCart","REDIRECT_REASON_QUERY_KEY","useRedirectReasonHandler","search","pathname","navigate","queryString","URLSearchParams","redirectReason","get","removeRedirectReasonQuery","accountRemoved","login","isAuthenticatedWithBankId","trackUserLogin","signup","isMedmeraCustomer","isCompany","connectMembership","console","error","delete","toString","replace","accessToken","neoId","errorInterceptors","createDirectApiClient","baseURL","appConfig","coopSettings","serviceAccess","kimProxyApiUrl","headers","Accept","kimProxyApiSubscriptionKey","Authorization","btoa","params","kimProxyApiVersion","response","data","message","status","kimProxyDirectApi","token","serviceIds","put","identifiers","kimProxyFlow","getCustomerData","identity","getAuthToken","getCustomerDataWithAppToken","appAuthToken","getCustomerDataFull","deleteCustomerDataCache","changeEmail","email","post","getConsents","isAuthenticated","spaToken","getConsentWithErrorHandling","getConsentsWithAppToken","appToken","subscribeConsents","services","subscribeConsentsWithAppToken","unsubscribeConsent","service","serviceId","id","err","code","emailSubscriptionInteraction","clickText","event","type","click_text","close","sendEmailSubscriptionInteraction","confirm","skip","MEMBER_CONSENT_QUERY","MEMBER_CONSENT_NEWSLETTERS_EMAIL","MEMBER_CONSENT_NEWSLETTERS_SMS","MEMBER_CONSENT_NEWSLETTER_STORE","ADOBE_MEMBER_CONSENT_NEWSLETTERS_EMAIL","useKimCustomerDataQuery","enabled","queryKey","defaultDataSet","queryFn","kimPhoneNumber","customerData","addresses","find","x","typeOfAddress","address","kimPhoneNumberVerified","addressVerified","autoVoucherStatusQueryKey","kimCustomerDataQueryKeys","all","fullDatSet","byEmail","byApp","mmid","profile","medmeraId","queryKeyName","consentSubscriptionsByNeoId","consentSubscriptionsByMmId","consentSubscriptionsByEmail","retry","length","useSubscribeMutation","onSubscribeSuccess","mutationFn","consent","onSuccess","savedCartQueryKeys","byPaging","page","pageSize","subscriptionsQueryKeys","byId","timeslots","subId","klarnaSnippet","orderReclamationsQueryKey","deliveryAddressQueryKey","connectedCardsQueryKey","lastOrdersQueryKeys","myCoopProfileMenuKeys","settingsPage","myCoopHouseholdKeys","householdMembers","associationNamesQueryKey","householdMemberQueryKeys","addHouseholdMember","personalNumber","pointItemWithdrawalHistoryKeys","byDate","from","to","size","pointHistoryKeys","purchaseHistoryKeys","consentSubscriptionsKeys","consentSubscriptionsByAppViewToken","AppViewToken","mmId","adobeConsentSubscriptionsKeys","IDS_REDIRECTREASON_QUERY","IDS_REDIRECTREASON_QUERYVALUE_SIGNUP","IDS_RETURNURL_QUERY","label","validationMsg","className","disabled","labelVisuallyHidden","theme","indicatorVerticalPosition","labeVerticalPosition","props","classes","Icon","icon","htmlFor","VisuallyHidden","Root","A","Container","children","TopContainer","InputContainer","BottomContainer","Label","indicator","necessityIndicator","isRequired","undefined","HelperText","helperText","disabledReason","slot","filter","Boolean","join","ValidationError","validationText","ValidationText","Prefix","PrefixSlot","Postfix","PostfixSlot","Input","_props","ref","isInvalid","TextArea","TextInput","custom","customProps","rest","textInputProps","postfixSlot","isReadOnly","validationBehavior","splitCustomObjectFromIntersection","whole","keysNotFromCustomProps","Object","keys","key","includes"],"sourceRoot":""}