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KO,qBAAqBP,KAAKlB,MAAM+C,cAE1CjD,EAAAA,cAACe,EAAAA,KAAIC,OAAAC,OAAA,GAAKoB,GACNrC,EAAAA,cAACe,EAAAA,KAAIC,OAAAC,OAAA,GAAKqB,GACLlB,KAAKlB,MAAMgD,iBACX9B,KAAKO,qBAAqBP,KAAKlB,MAAMwC,SACtC1C,EAAAA,cAACe,EAAAA,KAAIC,OAAAC,OAAA,GAAKsB,KACLnB,KAAKlB,MAAMS,cAAeS,KAAKlB,MAAMS,aAAaO,KAAIC,GAAQA,IAC9DC,KAAKlB,MAAM+C,YACX7B,KAAKlB,MAAMiD,mBACX/B,KAAKlB,MAAMQ,WACXU,KAAKlB,MAAMO,iBA6ChCoC,oBAAiB,IAAAuX,EACrB,MAAM,OAAEhX,EAAM,QAAE/B,EAAO,SAAEgC,GAAajC,KAAKlB,MAC3C,OACIF,EAAAA,cAACsD,EAAAA,KAAItC,OAAAC,OAAA,GACG,CACAE,KAAMiC,EAAOG,SACbC,MAA6B,QAAxB4W,EAAEhX,EAAOK,uBAAe,IAAA2W,EAAAA,EAAI,GACjCtZ,UAAW,yBACX4C,aAAcrC,EAAQC,QAAQoC,aAC9BC,eAAgBtC,EAAQC,QACxB+B,SAAAA,MA8EpB,iBCvNAgX,EAAOC,QAAUta,cCAjBqa,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/lobas-adventureworks/views/header.view.tsx?9936","webpack://Msdyn365.Commerce.Online/./src/themes/lobas/views/header.view.tsx?453a","webpack://Msdyn365.Commerce.Online/./lib/header/module-registration.js?4d67","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/header.view.tsx?6d84","webpack://Msdyn365.Commerce.Online/./src/modules/header/utilities/mock-utilities.ts?d017","webpack://Msdyn365.Commerce.Online/./src/modules/header/components/header-preferred-store.tsx?ee9c","webpack://Msdyn365.Commerce.Online/./src/modules/header/components/logo.tsx?f27e","webpack://Msdyn365.Commerce.Online/./src/modules/header/components/nav-icon.tsx?2475","webpack://Msdyn365.Commerce.Online/./src/modules/header/header.tsx?e91a","webpack://Msdyn365.Commerce.Online/./src/modules/header/header.view.tsx?cf0f","webpack://Msdyn365.Commerce.Online/../../src/get-employee.ts?b8bb","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/header.view.tsx?9bd3","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Module, Node, getTelemetryAttributes, getPayloadObject, TelemetryConstant, Button, onTelemetryClick, getTelemetryObject } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n//import { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { IHeaderProps, IHeaderResources } from '../definition-extensions/header.ext.props.autogenerated';\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n *\r\n * HeaderView component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class HeaderView extends React.PureComponent> {\r\n private readonly menuNode: React.RefObject;\r\n\r\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\r\n\r\n super(props);\r\n this.menuNode = React.createRef();\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider, MobileMenuContainer, MobileMenuBodyContainer, MobileMenuLinksContainer\r\n } = this.props;\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n {this._renderReactFragment(this.props.menuBar)}\r\n
\r\n
\r\n {this.props.navIcon}\r\n
\r\n {this.props.logo}\r\n {this._renderMobileLogo()}\r\n {this._renderReactFragment(this.props.search)}\r\n {this.props.preferredStore}\r\n {this._renderAccountBlock(this.props, false)}\r\n \r\n {this.props.cartIcon}\r\n {this._renderReactFragment(this.props.siteOptions)}\r\n \r\n \r\n \r\n { this.props.MobileMenuHeader }\r\n {this._renderReactFragment(this.props.menuBar)}\r\n \r\n { this.props.accountLinks ? this.props.accountLinks.map(link => link) : false }\r\n { this.props.siteOptions }\r\n { this.props.wishListIconMobile }\r\n { this.props.signInLink }\r\n { this.props.signOutLink }\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderMobileLogo(): JSX.Element | null {\r\n const { config, context, typeName } = this.props;\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to render account block.\r\n * @param props - IHeaderViewProps.\r\n * @param isRenderForMobile - Boolean.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderAccountBlock = (props: IHeaderViewProps, isRenderForMobile: boolean): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const { AccountInfoDropdownParentContainer, AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signOutLink,\r\n signInLink,\r\n accountLinks\r\n } = props;\r\n\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, isRenderForMobile ? 'account-mobile' : 'account-desktop');\r\n if (AccountInfoDropdownPopoverConentContainer) {\r\n return (\r\n \r\n {accountInfoDropdownButton}\r\n \r\n { accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false }\r\n {signOutLink}\r\n \r\n \r\n );\r\n } else if (this.props.context.request.user.emailAddress) {\r\n return (\r\n \r\n {this._getSignOutButton(this.props.context.request.user, this.props.resources)}\r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Function to render react fragment.\r\n * @param items - React nodes.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\r\n return (\r\n <>\r\n {ArrayExtensions.hasElements(items) ? items.map((slot: React.ReactNode) => {\r\n return (<>\r\n {slot}\r\n );\r\n }) : null}\r\n \r\n );\r\n };\r\n \r\n /**\r\n * Renders the sign out button.\r\n * @param customer - Customer object.\r\n * @param user - Request context user.\r\n * @param resources - Resources.\r\n * @returns React Node.\r\n */\r\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources):\r\n React.ReactNode | undefined {\r\n const telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\r\n const payLoad = getPayloadObject('click', telemetryContent, TelemetryConstant.SignOut);\r\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\r\n\r\n return user?.emailAddress && (\r\n \r\n \r\n {resources.signOutLinkText}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default HeaderView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { AsyncResult } from '@msdyn365-commerce/core';\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\r\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nconst headerView: React.FC = props => {\r\n const {\r\n HeaderTag,\r\n HeaderContainer,\r\n HeaderTopBarContainer,\r\n Divider\r\n } = props;\r\n return (\r\n \r\n \r\n \r\n {props.navIcon}\r\n {props.logo}\r\n {_renderReactFragment(props.search)}\r\n {props.preferredStore}\r\n {_renderAccountBlock(props, false)}\r\n {props.wishListIconDesktop}\r\n \r\n {props.cartIcon}\r\n {_renderReactFragment(props.siteOptions)}\r\n \r\n {_renderCollapseMenu(props)}\r\n \r\n {_renderReactFragment(props.menuBar)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\r\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\r\n return (\r\n \r\n \r\n {_renderReactFragment(props.search)}\r\n {_renderMobileAccountBlock(props, true)}\r\n { props.wishListIconMobile }\r\n {props.siteOptions}\r\n \r\n \r\n {_renderReactFragment(props.menuBar)}\r\n \r\n );\r\n}\r\n\r\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\r\n const customer = accountInformation && accountInformation.result;\r\n return (\r\n <>\r\n {customer ? customer.FirstName || customer.Name : ''}\r\n \r\n );\r\n};\r\n\r\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\r\n const {\r\n AccountInfoDropdownParentContainer,\r\n signOutLink,\r\n signInLink,\r\n data,\r\n accountLinks } = props;\r\n\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames('ms-header__drawer', AccountInfoDropdownParentContainer.className, renderForMobile ? 'account-mobile' : 'account-desktop');\r\n\r\n if (accountLinks) {\r\n return (\r\n \r\n
\r\n { accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false }\r\n {signOutLink}\r\n
\r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\r\n const {\r\n AccountInfoDropdownParentContainer,\r\n AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signOutLink,\r\n signInLink,\r\n accountLinks\r\n } = props;\r\n\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, renderForMobile ? 'account-mobile' : 'account-desktop');\r\n if (AccountInfoDropdownPopoverConentContainer) {\r\n return (\r\n \r\n {accountInfoDropdownButton}\r\n \r\n { accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false }\r\n {signOutLink}\r\n \r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\r\n return (\r\n <>\r\n {items && items.length > 0 ? items.map((slot: React.ReactNode, index: number) => {\r\n return (\r\n {slot}\r\n );\r\n }) : null}\r\n \r\n );\r\n}\r\n\r\nexport default headerView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header'),\n $type: 'containerModule',\n da: [{name:'accountInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action', runOn: 1},{name:'employee', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'header',\n p: 'header',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/header/dist/lib/modules/header'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|lobas-adventureworks|views|header'] = {\n c: () => require('partner/themes/lobas-adventureworks/views/header.view.tsx'),\n cn: '__local__-__local__-header'\n };\nviewDictionary['__local__|__local__|themes|lobas|views|header'] = {\n c: () => require('partner/themes/lobas/views/header.view.tsx'),\n cn: '__local__-__local__-header'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|header'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/header.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-header'\n };\nviewDictionary['@msdyn365-commerce-modules|header|modules|header|header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header.view.js'),\n cn: '@msdyn365-commerce-modules-header-header'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|header'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/header.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-header'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { buildHydratedMockActionContext, buildMockRequest, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, Customer, Employee } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderConfig, IHeaderResources } from '../header.props.autogenerated';\n\nconst mockRequest: IRequestContext = buildMockRequest();\nmockRequest.gridSettings = {\n xs: { w: 767, h: 0 },\n sm: { w: 991, h: 0 },\n md: { w: 1199, h: 0 },\n lg: { w: 1599, h: 0 },\n xl: { w: 1600, h: 0 }\n};\nmockRequest.user.isAuthenticated = true;\nmockRequest.user.signInUrl = '/signin';\nmockRequest.user.signOutUrl = '/signout';\nmockRequest.user.signUpUrl = '/signup';\n\nconst mockAnonRequest = buildMockRequest();\nmockAnonRequest.user.isAuthenticated = false;\nmockAnonRequest.user.signInUrl = '/signin';\nmockAnonRequest.user.signOutUrl = '/signout';\nmockAnonRequest.user.signUpUrl = '/signup';\n\nconst mockSigninErrorRequest = buildMockRequest();\nmockSigninErrorRequest.user.isAuthenticated = false;\nmockSigninErrorRequest.user.retailServerErrorCode = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\nmockSigninErrorRequest.user.signInUrl = '/signin';\nmockSigninErrorRequest.user.signOutUrl = '/signout';\nmockSigninErrorRequest.user.signUpUrl = '/signup';\n\nconst mockActionContext = buildHydratedMockActionContext();\n\n/**\n * Method to mock auth context.\n */\n// @ts-expect-error\nexport const mockAuthContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// @ts-expect-error\nexport const mockAnonContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockAnonRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Due to partial mock.\n// @ts-expect-error\nexport const mockSigninContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockSigninErrorRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\nexport const mockHeaderConfig: IHeaderConfig = {\n logoLink: {\n linkUrl: {\n destinationUrl: 'https://ppe.fabrikam.com/fe'\n },\n ariaLabel: 'fabrikam'\n },\n logoImage: {\n src: 'https://img-prod-cms-mr-microsoft-com.akamaized.net/cms/api/fabrikam/imageFileData/MA1G3L'\n }\n};\n\nexport const mockResources: IHeaderResources = {\n mobileHamburgerAriaLabel: 'Mobile view hamburger aria label',\n wishlistTooltipText: 'My wishlist',\n cartLabel: 'Shopping bag, ({0}) items',\n cartQtyLabel: '({0})',\n signInLinkText: 'Sign In',\n signInLinkAriaText: 'Sign In',\n signOutLinkText: 'Sign Out',\n signOutLinkAriaText: 'Sign Out',\n shoppingAsText: 'Shopping as {0}',\n switchCustomerLinkText: 'Switch customer',\n switchCustomerLinkAriaText: 'Switch customer',\n headerPreferredStoreText: 'Select store',\n headerPreferredStoreAriaLabel: 'select preferred store',\n signUpCustomerNotFoundTitle: 'Error message if cutsomer not found',\n signUpMultipleCustomerFoundTitle: 'Multiple customer found error msg',\n closeNotificationLabel: 'Close',\n wishlistCountLabel: '({0})',\n headerAriaLabel: 'Header'\n};\n\nexport const getMockData = (totalItemsInCart: number = 0, accountNumber: string = '2', firstName: string = ''): IHeaderData => {\n return {\n cart: >{\n status: 'SUCCESS',\n result: {\n totalItemsInCart\n }\n },\n employee: >{\n status: 'SUCCESS',\n result: {\n Name: 'Worker'\n }\n },\n accountInformation: >{\n status: 'SUCCESS',\n result: {\n AccountNumber: accountNumber,\n FirstName: firstName\n }\n },\n storeSelectorStateManager: >{\n status: 'SUCCESS',\n result: {}\n }\n };\n};\n\nexport const getMockErrorData = (): IHeaderData => {\n return {\n cart: >{\n status: 'FAILED',\n result: undefined\n },\n employee: >{\n status: 'FAILED',\n result: undefined\n },\n accountInformation: >{\n status: 'FAILED',\n result: undefined\n },\n storeSelectorStateManager: >{\n status: 'FAILED',\n result: undefined\n }\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderProps } from '../header.props.autogenerated';\n\n/**\n * The header preferred store component.\n */\n@observer\nexport class HeaderPreferredStore extends React.PureComponent> {\n private readonly modalCloseButtonRef: React.RefObject = React.createRef();\n\n /**\n * Handle click on the store selector.\n * @returns : Promise void.\n */\n public handleClick = () => {\n return this._findPreferredStoreOnClick(this.props);\n };\n\n public render(): JSX.Element | undefined {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n slots,\n resources\n } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- slots can be undefined.\n if (ArrayExtensions.hasElements(slots?.storeSelector)) {\n const storeName =\n storeSelectorStateManager?.preferredStore && storeSelectorStateManager.preferredStore.StoreName\n ? storeSelectorStateManager.preferredStore.StoreName\n : resources.headerPreferredStoreText;\n\n return (\n
\n \n {storeName}\n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferredStoreOnClick(props: IHeaderProps): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n modules\n } = props;\n if (!storeSelectorStateManager) {\n return;\n }\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && ArrayExtensions.hasElements(modules.storeSelector)) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n await storeSelectorStateManager\n .openDialog({\n id: storeSelectorId,\n showMapViewLink: true,\n parentElementRef: this.modalCloseButtonRef,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to set preferred store');\n }\n });\n }\n}\n\nexport default HeaderPreferredStore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILogoProps {\n image: Msdyn365.IImageData;\n gridSettings?: Msdyn365.IGridSettings;\n link?: ILinkData;\n className?: string;\n telemetryContent?: ITelemetryContent;\n requestContext: Msdyn365.IRequestContext;\n typeName?: string;\n}\n\nexport interface ILinkData {\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n linkText?: string;\n}\n\n/**\n *\n * Logo component.\n * @extends {React.PureComponent}\n */\nexport class Logo extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: ILogoProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return
{this._renderLogo(this.props)}
;\n }\n\n private _renderLogo(config: ILogoProps): JSX.Element {\n if (config.link && config.link.linkUrl.destinationUrl) {\n return (\n \n {this._renderImage(config)}\n \n );\n }\n return this._renderImage(config);\n }\n\n private _renderImage(config: ILogoProps): JSX.Element {\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=132&h=28&m=6', w: 0, h: 0 },\n lg: { q: 'w=160&h=48&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n}\n\nexport default Logo;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderResources } from '../header.props.autogenerated';\n\nexport interface INavIconProps {\n resources: IHeaderResources;\n isExpanded: boolean;\n targetId: string;\n telemetryContent?: ITelemetryContent;\n toggleNavBar(): void;\n}\n\n/**\n *\n * NavIcon component.\n * @extends {React.PureComponent}\n */\n\n@observer\nexport class NavIcon extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: INavIconProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n KeyCodes,\n Modal,\n ModalBody,\n ModalHeader,\n onTelemetryClick,\n Popover,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\nimport { IHeaderData } from './header.data';\nimport { IHeaderProps, IHeaderResources, IMyAccountLinksData } from './header.props.autogenerated';\n\nexport interface IHeaderState {\n mobileMenuCollapsed: boolean;\n signinPopoverOpen: boolean;\n hasSigninerror?: boolean;\n}\n\nexport interface IHeaderViewProps extends IHeaderProps, IHeaderState {\n logo: React.ReactNode;\n wishListIconDesktop: React.ReactNode;\n wishListIconMobile: React.ReactNode;\n cartIcon: React.ReactNode;\n navIcon: React.ReactNode;\n className: string;\n menuBar: React.ReactNode[];\n search: React.ReactNode[];\n siteOptions: React.ReactNode[];\n HeaderTag: IModuleProps;\n HeaderContainer: INodeProps;\n MobileMenuContainer: INodeProps;\n MobileMenuHeader: React.ReactNode;\n MobileMenuBodyContainer: INodeProps;\n MobileMenuLinksContainer: INodeProps;\n HeaderTopBarContainer: INodeProps;\n Divider: INodeProps;\n\n AccountInfoDropdownParentContainer?: INodeProps;\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\n accountInfoDropdownButton?: React.ReactNode;\n\n signOutLink?: React.ReactNode;\n signInLink?: React.ReactNode;\n switchCustomerLink?: React.ReactNode;\n isOBORequest?: boolean;\n accountLinks?: React.ReactNode[];\n preferredStore?: React.ReactNode;\n}\n\n/**\n *\n * Header component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Header extends React.PureComponent, IHeaderState> {\n private readonly popOverRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private cart: ICartState | undefined;\n\n /**\n * The signed-in user name displayed in the header bar\n */\n @computed public get displayName(): Readonly {\n return MsDyn365.isOboRequest(this.props.context.request) ? this.workerName : this.customerName;\n }\n\n /**\n * OBO scenario. The name of worker who shops on behalf of customer.\n */\n @computed public get workerName(): Readonly {\n const worker = this.props.data.employee?.result;\n return worker?.Name;\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n if (MsDyn365.isOboRequest(this.props.context.request)) {\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\n return customer ? customer.Name : undefined;\n } else {\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n }\n\n public constructor(props: IHeaderProps) {\n super(props);\n this.popOverRef = React.createRef();\n this._toggleNavbar = this._toggleNavbar.bind(this);\n this._togglePopover = this._togglePopover.bind(this);\n this._keydown = this._keydown.bind(this);\n this.state = {\n mobileMenuCollapsed: true,\n signinPopoverOpen: false,\n hasSigninerror: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('keydown', this._keydown);\n }\n reaction(\n () => this.props.data.cart.result,\n () => {\n this.cart = this.props.data.cart.result;\n }\n );\n\n const {\n context: {\n request: { user }\n },\n resources: { signUpCustomerNotFoundTitle, signUpMultipleCustomerFoundTitle, closeNotificationLabel }\n } = this.props;\n\n const signinNotificationError = this._getSigninNotification(user, signUpMultipleCustomerFoundTitle, signUpCustomerNotFoundTitle);\n if (signinNotificationError !== undefined && this.state.hasSigninerror === false) {\n // For signup show simple error notification.\n NotificationsManager.instance().addNotification(new ErrorNotification(signinNotificationError, closeNotificationLabel));\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('keydown', this._keydown, false);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n data: { accountInformation, wishlists },\n context: {\n request: { user }\n },\n context,\n resources: { cartLabel, cartQtyLabel }\n } = this.props;\n const { logoLink, logoImage, shouldShowWishlistCount } = this.props.config;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- app config is generic\n const disableTooltip = this.props.context.app.config.disableTooltip || false;\n const headerToggleClass = this.state.mobileMenuCollapsed ? '' : 'ms-header-open';\n const headerClassName = classnames('ms-header', this.props.config.className, headerToggleClass);\n const navbarKey = 'header-nav-mobile';\n const customer = accountInformation && accountInformation.result;\n const cartIconSlot = this._getSlot('cartIcon');\n const menuBarSlot = this._getSlot('menuBar');\n const searchSlot = this._getSlot('search');\n let wishlistCount = 0;\n const siteOptionsSlot = this._getSlot('siteOptions');\n const preferredStoreSlot = this._getSlot('storeSelector');\n if (wishlists !== undefined) {\n if (\n !wishlists.result ||\n !ArrayExtensions.hasElements(wishlists.result) ||\n !wishlists.result[0].CommerceListLines ||\n !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)\n ) {\n wishlistCount = 0;\n } else {\n wishlistCount = wishlists.result[0].CommerceListLines.length;\n }\n }\n const viewProps: IHeaderViewProps = {\n ...(this.props as IHeaderProps),\n ...this.state,\n logo: (\n \n ),\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: ArrayExtensions.hasElements(cartIconSlot) ? (\n cartIconSlot[0]\n ) : (\n \n ),\n navIcon: (\n \n ),\n menuBar: ArrayExtensions.hasElements(menuBarSlot) ? menuBarSlot : [],\n search: ArrayExtensions.hasElements(searchSlot) ? searchSlot : [],\n siteOptions: ArrayExtensions.hasElements(siteOptionsSlot) ? siteOptionsSlot : [],\n className: headerClassName,\n HeaderTag: {\n moduleProps: this.props,\n className: classnames(headerClassName),\n 'aria-label': this.props.resources.headerAriaLabel,\n tag: 'header'\n },\n HeaderContainer: {\n className: classnames('ms-header__container')\n },\n HeaderTopBarContainer: {\n className: classnames('ms-header__topbar')\n },\n Divider: {\n className: classnames('ms-header__divider')\n },\n MobileMenuContainer: {\n tag: Modal,\n id: navbarKey,\n className: 'ms-header__mobile-hamburger',\n isOpen: !this.state.mobileMenuCollapsed,\n wrapClassName: 'ms-header__modal',\n toggle: this._toggleNavbar\n },\n MobileMenuHeader: ,\n MobileMenuBodyContainer: {\n tag: ModalBody,\n className: 'ms-header__mobile-hamburger-menu-body'\n },\n MobileMenuLinksContainer: {\n className: 'ms-header__mobile-hamburger-menu-links'\n },\n AccountInfoDropdownParentContainer: {\n className: 'ms-header__account-info'\n },\n AccountInfoDropdownPopoverConentContainer: this.displayName\n ? {\n tag: Popover,\n id: 'myprofilePopover',\n className: 'ms-header__account-info-content',\n placement: 'bottom',\n isOpen: this.state.signinPopoverOpen,\n target: this.popOverRef,\n toggle: this._togglePopover\n }\n : undefined,\n signInLink: this._getSigninButton(user, this.props.resources),\n signOutLink: this._getSignOutButton(user, this.props.resources),\n isOBORequest: MsDyn365.isOboRequest(this.props.context.request),\n switchCustomerLink: this._getSwitchCustomerButton(user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(user, this.props.resources),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) && \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - Link Index.\n * @returns : Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\n if (this.props.config.myAccountLinks?.[linkIndex]) {\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Get the slot.\n * @param slotName - Name of the slot.\n * @returns The slot.\n */\n private _getSlot(slotName: string): React.ReactNode[] | null {\n const { slots } = this.props;\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\n }\n\n /**\n * Renders the sign in button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSigninButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n !this.displayName && (\n \n \n {resources.signInLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n \n {resources.signOutLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSwitchCustomerButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SwitchCustomer);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const isOBOAccountSelected =\n MsDyn365.isOboRequest(this.props.context.request) && this.props.context.request.cookies.getAccountSelectionCookie();\n return (\n this.displayName &&\n isOBOAccountSelected && (\n this.props.context.request.cookies.removeAccountSelectionCookie()}\n {...attributes}\n >\n
\n
{format(resources.shoppingAsText, this.customerName)}
\n
{resources.switchCustomerLinkText}
\n
\n \n )\n );\n }\n\n private getBusinessPartnerSelectionUrl(): string | undefined {\n const route = MsDyn365.getUrlSync('businessPartnerSelection', this.props.context.actionContext);\n if (!route || !MsDyn365.msdyn365Commerce.isBrowser) {\n return undefined;\n }\n\n // MsDyn365.getUrlSync persists some params in the route and remove other params.\n // Among the persisted params, we need to remove catalogid.\n const persistedParamToRemove = ['catalogid'];\n const url = new URL(route, window.location.href);\n persistedParamToRemove.forEach(param => url.searchParams.delete(param));\n return url.href;\n }\n\n private _getSigninNotification(\n user: MsDyn365.IRequestContextUser | undefined,\n signUpMultipleCustomerFoundTitle: string,\n signUpCustomerNotFoundTitle: string\n ): string | undefined {\n const { signUpCustomerNotFound, signUpMultipleCustomerFound } = this.props.config;\n const notFoundError = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\n const multipleAccountError = 'Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountsFoundWithSameEmailAddress';\n\n if (user?.retailServerErrorCode === notFoundError) {\n return signUpCustomerNotFound !== undefined ? signUpCustomerNotFound : signUpCustomerNotFoundTitle;\n } else if (user?.retailServerErrorCode === multipleAccountError) {\n return signUpMultipleCustomerFound !== undefined ? signUpMultipleCustomerFound : signUpMultipleCustomerFoundTitle;\n }\n return undefined;\n }\n\n private _getAccountInfoDropdownButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n
\n
{this.displayName}
\n {MsDyn365.isOboRequest(this.props.context.request) && this.customerName && (\n
{format(resources.shoppingAsText, this.customerName)}
\n )}\n
\n \n )\n );\n }\n\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\n const { myAccountLinks } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n if (!customer || !this.displayName || !myAccountLinks || !ArrayExtensions.hasElements(myAccountLinks)) {\n return undefined;\n }\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\n payLoad.contentAction.etext = cta.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: cta.ariaLabel,\n className: 'ms-signin-info__account-link-button',\n linkText: cta.linkText,\n linkUrl: cta.linkUrl.destinationUrl,\n openInNewTab: cta.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n\n return (\n \n );\n });\n }\n\n private _toggleNavbar(): void {\n this.setState({\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\n });\n }\n\n private _togglePopover(): void {\n this.setState({\n signinPopoverOpen: !this.state.signinPopoverOpen\n });\n }\n\n private _keydown(event: KeyboardEvent): void {\n if (event.keyCode === KeyCodes.Escape) {\n this.setState({ mobileMenuCollapsed: true });\n }\n }\n}\n\nexport default Header;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n \n \n {props.MobileMenuHeader}\n {_renderReactFragment(props.menuBar)}\n \n {props.accountLinks ? props.accountLinks.map(link => link) : false}\n {props.siteOptions}\n {props.wishListIconMobile}\n {props.signInLink}\n {props.signOutLink}\n \n \n \n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map(link => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return {signInLink};\n }\n }\n props.context.telemetry.error('Header content is empty, module wont render.');\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, isOboRequest } from '@msdyn365-commerce/core';\nimport { Employee } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Input class for the GetEmployeeInput data action.\n */\nexport class GetEmployeeInput implements IActionInput {\n /**\n * Get Cache Key.\n * @returns - Cache key string.\n */\n public getCacheKey = (): string => 'Employee';\n\n /**\n * Get Cache type Name.\n * @returns - Cache name string.\n */\n public getCacheObjectType = (): string => 'Employee';\n\n /**\n * Get Cache type.\n * @returns - CacheType enum.\n */\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CreateInput method for the getEmployee.\n * @returns - Input for data action.\n */\nexport const createGetEmployeeInput = (): IActionInput => {\n return new GetEmployeeInput();\n};\n\n/**\n * The action method for the getEmployee data action.\n * @param input -- The action input.\n * @param ctx -- The action context.\n * @returns -- Employee.\n */\nexport async function getEmployeeAction(input: GetEmployeeInput, ctx: IActionContext): Promise {\n // For now, we just need the name information of employee. When we need more information, we will invoke EmployeeDataActions.readAsync retail proxy API.\n if (isOboRequest(ctx.requestContext)) {\n const user = ctx.requestContext.user;\n return {\n StaffId: '',\n Name: user?.firstName || user?.name\n };\n }\n return;\n}\n\n/**\n * The getEmployee data action.\n * Gets the employee.\n * @returns Employee.\n */\nexport const getEmployeeActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-employee',\n action: getEmployeeAction as IAction,\n input: createGetEmployeeInput\n});\n\nexport default getEmployeeActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n *\n * HeaderView component.\n * @extends {React.PureComponent}\n */\nexport class HeaderView extends React.PureComponent> {\n private readonly menuNode: React.RefObject;\n\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\n super(props);\n this.menuNode = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this.props.config.useStickyHeader) {\n // Set header update methods to trigger on scroll\n if (MsDyn365.isBrowser) {\n window.addEventListener('scroll', () => {\n this._configureStickyHeader();\n });\n }\n this._configureStickyHeader();\n }\n }\n\n public render(): JSX.Element | null {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n Divider,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer\n } = this.props;\n\n return (\n \n \n \n
\n {this._renderReactFragment(this.props.menuBar)}\n
\n
{this.props.navIcon}
\n {this.props.logo}\n {this._renderMobileLogo()}\n {this._renderReactFragment(this.props.search)}\n {this.props.preferredStore}\n {this._renderAccountBlock(this.props)}\n \n {this.props.cartIcon}\n {this._renderReactFragment(this.props.siteOptions)}\n \n \n \n {this.props.MobileMenuHeader}\n {this._renderReactFragment(this.props.menuBar)}\n \n {this.props.accountLinks ? this.props.accountLinks.map(link => link) : false}\n {this.props.siteOptions}\n {this.props.wishListIconMobile}\n {this.props.signInLink}\n {this.props.signOutLink}\n \n \n \n
\n
\n );\n }\n\n /**\n * Function to update header.\n */\n private readonly _configureStickyHeader = (): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\n\n // Triggers opacity change of header\n const headerElement = document.querySelector('header .default-container');\n if (headerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\n headerElement.classList.add('lock-opaque');\n headerElement.classList.add('fixed');\n } else {\n headerElement.classList.remove('lock-opaque');\n headerElement.classList.remove('fixed');\n }\n }\n\n // Update sticky header position and opacity\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\n\n if (stickyHeader && headerLogo) {\n // Fix center sticky header\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\n stickyHeader.classList.add('fixed');\n } else {\n stickyHeader.classList.remove('fixed');\n }\n }\n };\n\n private _renderMobileLogo(): JSX.Element | null {\n const { config, context, typeName } = this.props;\n return (\n \n );\n }\n\n /**\n * Function to render account block.\n * @param props - IHeaderViewProps.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signInLink\n } = props;\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n {this._renderAccountDropdownLinks(props)}\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n };\n\n private readonly _renderAccountDropdownLinks = (props: IHeaderViewProps): JSX.Element | null => {\n const { isOBORequest, switchCustomerLink, accountLinks, signOutLink } = props;\n if (isOBORequest) {\n return (\n <>\n {switchCustomerLink}\n {signOutLink}\n {accountLinks ? : false}\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n \n );\n } else {\n return (\n <>\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n );\n }\n };\n\n /**\n * Function to render react fragment.\n * @param items - React nodes.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {ArrayExtensions.hasElements(items)\n ? items.map((slot: React.ReactNode) => {\n return <>{slot};\n })\n : null}\n \n );\n };\n}\n\nexport default HeaderView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["HeaderView","React","constructor","props","super","_renderAccountBlock","isRenderForMobile","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","accountClassName","classnames","className","Node","Object","assign","map","link","this","context","request","user","emailAddress","_getSignOutButton","resources","_renderReactFragment","items","ArrayExtensions","slot","menuNode","render","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","MobileMenuContainer","MobileMenuBodyContainer","MobileMenuLinksContainer","Module","ref","menuBar","navIcon","logo","_renderMobileLogo","search","preferredStore","cartIcon","siteOptions","MobileMenuHeader","wishListIconMobile","config","typeName","Logo","logoLink","image","mobileLogoImage","gridSettings","requestContext","_user$signOutUrl","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","telemetry","payLoad","getPayloadObject","TelemetryConstant","attributes","getTelemetryAttributes","Button","title","signOutLinkText","href","signOutUrl","signOutLinkAriaText","onClick","onTelemetryClick","renderCustomerName","accountInformation","customer","result","FirstName","Name","length","index","key","renderForMobile","wishListIconDesktop","mobileMenuCollapsed","Collapse","isOpen","data","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","_renderCollapseMenu","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","undefined","_unused","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","MsDyn365","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","actionContext","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","app","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","point","coordinates","body","appendChild","_document","StringExtensions","getElementById","url","lang","market","reject","_document2","_document3","_document3$body","type","async","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","error","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","mockRequest","buildMockRequest","xs","w","h","sm","lg","xl","isAuthenticated","signInUrl","signUpUrl","mockAnonRequest","mockSigninErrorRequest","retailServerErrorCode","buildHydratedMockActionContext","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","storeSelectorStateManager","slots","storeSelector","headerPreferredStoreText","color","headerPreferredStoreAriaLabel","storeSelectorId","keys","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","catch","message","debug","observer","_renderLogo","linkUrl","destinationUrl","ariaLabel","target","openInNewTab","rel","_renderImage","Msdyn365","imageSettings","viewports","q","lazyload","loadFailureBehavior","editProps","moduleType","imagePropertyName","shouldSkipToMainImage","NavIcon","toggleNavBar","mobileHamburgerAriaLabel","isExpanded","targetId","Header","handleLinkTextChange","linkIndex","event","_this$props$config$my","myAccountLinks","linkText","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","state","signinPopoverOpen","hasSigninerror","workerName","customerName","_this$props$data$empl","worker","employee","_this$props$data$acco","componentDidMount","reaction","cart","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","addNotification","ErrorNotification","componentWillUnmount","removeEventListener","wishlists","cartLabel","cartQtyLabel","logoImage","shouldShowWishlistCount","disableTooltip","headerToggleClass","headerClassName","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","CommerceListLines","viewProps","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","CartIconComponent","moduleProps","headerAriaLabel","tag","Modal","wrapClassName","toggle","ModalHeader","ModalBody","displayName","Popover","placement","_getSigninButton","isOBORequest","switchCustomerLink","_getSwitchCustomerButton","_getAccountInfoDropdownButton","_getAccountLinks","renderView","slotName","signInLinkText","signInLinkAriaText","isOBOAccountSelected","cookies","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","getBusinessPartnerSelectionUrl","role","removeAccountSelectionCookie","format","shoppingAsText","route","URL","location","forEach","param","searchParams","delete","signUpCustomerNotFound","signUpMultipleCustomerFound","innerRef","cta","contentAction","etext","editableLink","additionalProperties","onTextChange","setState","keyCode","KeyCodes","_renderDesktopAccountBlock","GetEmployeeInput","getCacheKey","getCacheObjectType","dataCacheType","createGetEmployeeInput","getEmployeeAction","ctx","isOboRequest","StaffId","firstName","getEmployeeActionDataAction","_configureStickyHeader","headerAlertsContainer","querySelector","bannerHeights","offsetHeight","headerElement","documentElement","scrollTop","classList","add","stickyHeader","headerLogo","navStickyPos","_renderAccountDropdownLinks","useStickyHeader","_config$mobileLogoIma","module","exports","ReactDOM"],"sourceRoot":""}