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C,MAAMkE,cAE1C3E,EAAAA,cAAC0C,EAAAA,KAAI,iBAAK2R,GACNrU,EAAAA,cAAC0C,EAAAA,KAAI,iBAAKiS,GACLvW,KAAKqC,MAAMgU,iBACXrW,KAAK+B,qBAAqB/B,KAAKqC,MAAM0D,SACtCnE,EAAAA,cAAC0C,EAAAA,KAAI,iBAAKqB,KACL3F,KAAKqC,MAAM4C,cAAejF,KAAKqC,MAAM4C,aAAahD,KAAImD,GAAQA,IAC9DpF,KAAKqC,MAAMkE,YACXvG,KAAKqC,MAAMwL,mBACX7N,KAAKqC,MAAM2C,WACXhF,KAAKqC,MAAM0C,iBA6ChCiW,oBAAiB,MACrB,MAAM,OAAE9X,EAAM,QAAE9B,EAAO,SAAEmQ,GAAavR,KAAKqC,MAC3C,OACIT,EAAAA,cAAC6N,EAAAA,GAAI,iBACG,CACArK,KAAMlC,EAAOsR,SACb9D,MAA6B,QAAxB,EAAExN,EAAO+X,uBAAe,QAAI,GACjC3a,UAAW,yBACXqQ,aAAcvP,EAAQC,QAAQsP,aAC9B7F,eAAgB1J,EAAQC,QACxBkQ,SAAAA,MA8EpB,iBCvNA2J,EAAOC,QAAUvZ,cCAjBsZ,EAAOC,QAAUC","sources":["webpack://msdyn365.commerce.online/./src/actions/FlintFoxSourceCodeEntities.g.ts?16f0","webpack://msdyn365.commerce.online/./src/actions/FlintFoxSourceCodeAction.g.ts?fd3f","webpack://msdyn365.commerce.online/./src/themes/peruvian/views/header.view.tsx?a3c3","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/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/modules/header/utilities/mock-utilities.ts?d017","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":["/* eslint-disable security/detect-object-injection */\r\n\r\n // tslint:disable\r\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n import * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g'; \r\n \r\n export interface IFlintfoxSourceCodeStatus {\r\n Result?: string;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n \r\n /**\r\n * FlintfoxSourceCodeStatus entity class.\r\n */\r\n export class FlintfoxSourceCodeStatusExtensionClass implements IFlintfoxSourceCodeStatus {\r\n \r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Result: string;\r\n \r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n \r\n // Navigation properties names\r\n \r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Result = odataObject.Result;\r\n \r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i])\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n \r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n \r\n }\r\n }\r\n\r\n ","\r\n/*!\r\n* Copyright (c) Microsoft Corporation.\r\n* All rights reserved. See LICENSE in the project root for license information.\r\n* THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n* TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n*/\r\n// tslint:disable\r\nimport { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './FlintFoxSourceCodeEntities.g';\r\n\r\n\r\nfunction getSourceIdStatusQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function getSourceIdStatusInput(\r\n sourceId:\r\n string\r\n): IDataServiceRequest {\r\n const query = getSourceIdStatusQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'GetSourceIdStatus',\r\n true,\r\n DataServiceEntities.FlintfoxSourceCodeStatusExtensionClass\r\n ,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IFlintfoxSourceCodeStatus' },\r\n {\r\n SourceId: sourceId\r\n }\r\n );\r\n}\r\n\r\nexport function getSourceIdStatusAsync(\r\n context: IContext, sourceId:\r\n string\r\n): AsyncResult {\r\n const request = getSourceIdStatusInput(sourceId);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\r\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { AsyncResult } from '@msdyn365-commerce/core';\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\r\n\r\nimport { getSourceIdStatusAsync } from './../../../actions/FlintFoxSourceCodeAction.g'\r\n\r\nimport Cookies from 'universal-cookie';\r\nimport { IFlintfoxSourceCodeStatus } from '../../../actions/FlintFoxSourceCodeEntities.g';\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\r\n // ITS Customization - Embedded src code\r\n const [urlCode, setUrlCode] = React.useState('');\r\n const urlQuery = props.context.request.query;\r\n const cookies = new Cookies();\r\n const cookieExpireDay = props.context.app.config.embeddedSourceCodeExpiryDuration;\r\n const cookieExpiryDate = new Date(Date.now() + cookieExpireDay * 24 * 60 * 60 * 1000);\r\n \r\n const getSourceCodeResponse = React.useCallback(async () => {\r\n try {\r\n return await getSourceIdStatusAsync(\r\n { callerContext: props.context.actionContext },\r\n urlCode\r\n ).catch(err => {\r\n console.log(err);\r\n })\r\n }\r\n catch (error) {\r\n console.log(error);\r\n }\r\n }, [urlCode]);\r\n\r\n React.useEffect(() => {\r\n if (urlQuery && urlQuery?.code !== undefined) {\r\n setUrlCode(urlQuery?.code);\r\n }\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if(urlCode && urlCode !== '') {\r\n getSourceCodeResponse().then((response: (void | IFlintfoxSourceCodeStatus)) => {\r\n if (cookies && urlCode && response && response.Result === 'Success') {\r\n cookies.set('sourceCode', urlCode, { path: '/', expires: cookieExpiryDate });\r\n }\r\n })\r\n }\r\n }, [urlCode])\r\n\r\n // ITS Customization - Embedded src code end\r\n return (\r\n \r\n \r\n \r\n {/* peruvian customization begins */}\r\n
\r\n
\r\n
\r\n {props.preferredStore}\r\n \r\n \r\n \r\n {_renderAccountBlock(props, false)}\r\n \r\n
\r\n {props.config.companyPhone}\r\n
\r\n
\r\n
\r\n
\r\n \r\n {props.navIcon}\r\n {_renderReactFragment(props.search)}\r\n \r\n
\r\n {props.logo}\r\n
\r\n
\r\n {props.cartIcon}\r\n
\r\n
\r\n
\r\n {/* peruvian customization ends */}\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 & IHeaderProps<{}>): JSX.Element | null {\r\n const { MobileMenuLinksContainer, mobileMenuCollapsed } = props;\r\n return (\r\n \r\n {_renderReactFragment(props.menuBar)}\r\n \r\n {props.preferredStore}\r\n \r\n {_renderMobileAccountBlock(props, true)}\r\n {props.siteOptions}\r\n
\r\n {props.config.companyPhone}\r\n
\r\n
\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 <>{customer ? customer.FirstName || customer.Name : ''}\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\r\n ? items.map((slot: React.ReactNode, index: number) => {\r\n return {slot};\r\n })\r\n : null}\r\n \r\n );\r\n}\r\n\r\nexport default headerView;","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:'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-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|peruvian|views|header'] = {\n c: () => require('partner/themes/peruvian/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 { 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 const user = this.props.context.request.user;\n return user?.isOBORequest ? 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 user = this.props.context.request.user;\n return user?.firstName || user?.name;\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n return customer ? customer.FirstName || customer.Name : undefined;\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: user?.isOBORequest,\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 = user?.isOBORequest && this.props.context.request.cookies.getAccountSelectionCookie();\n return (\n this.displayName &&\n isOBOAccountSelected && (\n this.props.context.request.cookies.removeAccountSelectionCookie(),\n additionalProperties: attributes\n }}\n />\n )\n );\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 {user?.isOBORequest && this.customerName &&
{format(resources.shoppingAsText, this.customerName)}
}\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 { buildHydratedMockActionContext, buildMockRequest, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, Customer } 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 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 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 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":["FlintfoxSourceCodeStatusExtensionClass","constructor","odataObject","this","Result","ExtensionProperties","undefined","i","length","className","substr","lastIndexOf","concat","EntityClasses","getSourceIdStatusInput","sourceId","DataServiceQuery","createDataServiceRequestForOperation","DataServiceEntities","bypassCache","returnEntity","SourceId","getSourceIdStatusAsync","context","request","callActionOrExecute","callerContext","renderCustomerName","accountInformation","customer","result","React","FirstName","Name","_renderReactFragment","items","map","slot","index","key","props","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","urlCode","setUrlCode","urlQuery","query","cookies","Cookies","cookieExpireDay","app","config","embeddedSourceCodeExpiryDuration","cookieExpiryDate","Date","now","getSourceCodeResponse","async","actionContext","catch","err","console","log","error","code","then","response","set","path","expires","Module","Node","preferredStore","href","orderStatusLink","orderStatusLabel","renderForMobile","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","accountClassName","classnames","link","_renderAccountBlock","companyPhone","navIcon","search","logo","cartIcon","MobileMenuLinksContainer","mobileMenuCollapsed","Collapse","isOpen","menuBar","data","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","siteOptions","_renderCollapseMenu","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","MsDyn365","isBrowser","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","requestContext","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","resources","point","coordinates","body","appendChild","StringExtensions","isNullOrEmpty","getElementById","url","lang","market","reject","type","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","wishListIconDesktop","wishListIconMobile","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","render","storeSelectorStateManager","slots","ArrayExtensions","hasElements","storeSelector","headerPreferredStoreText","color","headerPreferredStoreAriaLabel","onClick","ref","storeSelectorId","Object","keys","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","telemetry","message","debug","observer","Logo","super","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","attributes","getTelemetryAttributes","_renderLogo","linkUrl","destinationUrl","ariaLabel","target","openInNewTab","rel","_renderImage","Msdyn365","image","gridSettings","imageSettings","viewports","xs","q","w","h","lg","lazyload","loadFailureBehavior","editProps","moduleType","typeName","imagePropertyName","shouldSkipToMainImage","NavIcon","Button","toggleNavBar","title","mobileHamburgerAriaLabel","isExpanded","targetId","Header","handleLinkTextChange","linkIndex","event","myAccountLinks","linkText","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","state","signinPopoverOpen","hasSigninerror","getTelemetryObject","telemetryPageName","friendlyName","user","isOBORequest","workerName","customerName","firstName","componentDidMount","reaction","cart","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","instance","addNotification","ErrorNotification","componentWillUnmount","removeEventListener","wishlists","cartLabel","cartQtyLabel","logoLink","logoImage","shouldShowWishlistCount","disableTooltip","headerToggleClass","headerClassName","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","CommerceListLines","viewProps","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","CartIconComponent","moduleProps","headerAriaLabel","tag","MobileMenuContainer","Modal","wrapClassName","toggle","MobileMenuHeader","ModalHeader","MobileMenuBodyContainer","ModalBody","displayName","Popover","placement","_getSigninButton","_getSignOutButton","switchCustomerLink","_getSwitchCustomerButton","_getAccountInfoDropdownButton","_getAccountLinks","renderView","slotName","SignIn","signInLinkText","signInUrl","signInLinkAriaText","onTelemetryClick","SignOut","signOutLinkText","signOutUrl","signOutLinkAriaText","SwitchCustomer","isOBOAccountSelected","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","role","removeAccountSelectionCookie","additionalProperties","signUpCustomerNotFound","signUpMultipleCustomerFound","retailServerErrorCode","MyProfile","innerRef","format","shoppingAsText","cta","contentAction","etext","editableLink","onTextChange","setState","keyCode","KeyCodes","Escape","_renderDesktopAccountBlock","mockRequest","buildMockRequest","sm","xl","isAuthenticated","signUpUrl","mockAnonRequest","mockSigninErrorRequest","buildHydratedMockActionContext","HeaderView","_configureStickyHeader","headerAlertsContainer","querySelector","bannerHeights","offsetHeight","headerElement","documentElement","scrollTop","classList","add","stickyHeader","headerLogo","navStickyPos","_renderAccountDropdownLinks","menuNode","useStickyHeader","_renderMobileLogo","mobileLogoImage","module","exports","ReactDOM"],"sourceRoot":""}