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OAAA,CAAGgF,GAAIA,EAAI9F,UAAWA,EAAWgH,KAAMA,EAAI,aAAcC,GAAeoR,GACnE3X,EACD,+CCZZ,MAEA,EAFwDiK,IAAA,IAAC,UAAE3K,GAAW2K,EAAA,OAAKhN,EAAAA,cAAA,OAAKqC,UAAW,GAAGA,mBAA6B,+CCC3H,MAIA,EAJ8D2K,IAAA,IAAC,UAAE3K,EAAS,QAAE0F,GAASiF,EAAA,OACjFhN,EAAAA,cAAA,OAAKqC,UAAW,GAAGA,sBAA+B0F,EAAc,+CCDpE,MAEA,EAF0CiF,IAAA,IAAC,UAAE3K,EAAS,KAAEU,GAAMiK,EAAA,OAAKhN,EAAAA,cAAA,QAAMqC,UAAWA,GAAYU,EAAY,kBCmBrG,IAAK2S,EASAzB,2BATZ,SAAYyB,GACRA,EAAAA,EAAA,eACAA,EAAAA,EAAA,oBACH,CAHD,CAAYA,IAAAA,EAAe,KAS3B,SAAYzB,GACRA,EAAA,UACAA,EAAA,eACH,CAHD,CAAYA,IAAAA,EAAU","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance-tile/account-customer-balance-tile.tsx?8281","webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance-tile/account-customer-balance-tile.view.tsx?95a8","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/sign-in.tsx?259c","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/sign-in.view.tsx?2b3e","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.tsx?2bef","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.view.tsx?c594","webpack://Msdyn365.Commerce.Online/./src/modules/back-top-footer/back-top-footer.tsx?f47e","webpack://Msdyn365.Commerce.Online/./src/modules/business-partner-promotion/components/terms-paragraph.tsx?1a9a","webpack://Msdyn365.Commerce.Online/./src/modules/business-partner-promotion/business-partner-promotion.tsx?df24","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/invoices-list.view.tsx?38e4","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/navigation-menu-utilities.tsx?091e","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/navigation-menu-root-disabled.tsx?1d9a","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/navigation-menu-root-enabled.tsx?c6ea","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/navigation-menu.view.tsx?fbed","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/order-confirmation.view.tsx?6e38","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/checkout-section-container.view.tsx?8c27","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/invoices-list.view.tsx?e526","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/navigation-menu-utilities.tsx?fc24","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/navigation-menu-root-disabled.tsx?6af5","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/navigation-menu-root-enabled.tsx?2139","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/navigation-menu.view.tsx?15d9","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/order-confirmation.view.tsx?4222","webpack://Msdyn365.Commerce.Online/./src/modules/business-partner-promotion/business-partner-promotion.view.tsx?1ff2","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/search-result-container.view.tsx?89df","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/content-block.view.tsx?0db4","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/footer-item.view.tsx?15be","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/navigation-menu-utilities.tsx?d092","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/navigation-menu-root-disabled.tsx?1d68","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/navigation-menu-root-enabled.tsx?d5b3","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/navigation-menu.view.tsx?5304","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/promocode.component.tsx?c06b","webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance-tile/components/account-customer-balance-tile-info.tsx?44e9","webpack://Msdyn365.Commerce.Online/./src/modules/account-customer-balance-tile/components/account-customer-balance-tile-links.tsx?95ac","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-button.tsx?8d59","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-description.tsx?54a5","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-error.tsx?a75a","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-input.tsx?d840","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-label.tsx?4560","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-link.tsx?2078","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-loading-icon.tsx?1d7f","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-loading-message.tsx?84ee","webpack://Msdyn365.Commerce.Online/./src/modules/sign-in/components/sign-in-text.tsx?76b9","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.data.ts?9815"],"sourcesContent":["/*!\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 { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { getTelemetryObject, Heading, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IAccountCustomerBalanceTileData } from './account-customer-balance-tile.data';\nimport { IAccountCustomerBalanceTileProps } from './account-customer-balance-tile.props.autogenerated';\nimport { CreditComponent, ErrorComponent } from './components/account-customer-balance-tile-info';\nimport LinksComponent from './components/account-customer-balance-tile-links';\n\nexport interface IAccountCustomerBalanceTileViewProps extends IAccountCustomerBalanceTileProps<IAccountCustomerBalanceTileData> {\n    AccountCustomerBalanceTile: IModuleProps;\n    className: string;\n    heading?: React.ReactNode;\n    content: React.ReactNode;\n    links: React.ReactNode;\n}\n\nexport interface IAccountCustomerBalanceTileViewState {\n    isDetailsLinkDisplayed: boolean;\n    content: React.ReactNode;\n}\n\n/**\n *\n * AccountCustomerBalanceTile component.\n * @extends {React.Component<IAccountCustomerBalanceTileProps<IAccountCustomerBalanceTileData>>}\n */\nclass AccountCustomerBalanceTile extends React.Component<\n    IAccountCustomerBalanceTileProps<IAccountCustomerBalanceTileData>,\n    IAccountCustomerBalanceTileViewState\n> {\n    @computed get hasError(): boolean {\n        return get(this.props, 'data.balance.status') !== 'SUCCESS';\n    }\n\n    private readonly telemetryContent: ITelemetryContent;\n\n    constructor(props: IAccountCustomerBalanceTileProps<IAccountCustomerBalanceTileData>) {\n        super(props);\n\n        this.telemetryContent = getTelemetryObject(\n            this.props.context.request.telemetryPageName!,\n            this.props.friendlyName,\n            this.props.telemetry\n        );\n\n        this.state = { ...this._initState() };\n\n        reaction(\n            () => this.hasError,\n            () => {\n                this.props.context.telemetry.error('Error retrieving customer account balance');\n                this.setState({\n                    content: <ErrorComponent value={this.props.resources.apiGenericErrorMessage} />\n                });\n            }\n        );\n    }\n\n    @computed get isCustomerAccountPaymentEnabled(): boolean {\n        const customerResult = get(this.props, 'data.customerInformation.result');\n\n        const allowOnAccountPayment = customerResult ? customerResult.AllowOnAccountPayment : false;\n        const isB2BSite = isChannelTypeB2B(this.props.context.request);\n        const enableCustomerAccountPayment = get(this.props, 'context.request.app.platform.enableCustomerAccountPayment');\n\n        return (\n            allowOnAccountPayment &&\n            (enableCustomerAccountPayment === 'all' ||\n                (enableCustomerAccountPayment === 'b2b' && isB2BSite) ||\n                (enableCustomerAccountPayment === 'b2c' && !isB2BSite))\n        );\n    }\n\n    public shouldComponentUpdate(\n        nextProps: IAccountCustomerBalanceTileProps<IAccountCustomerBalanceTileData>,\n        nextState: IAccountCustomerBalanceTileViewState\n    ): boolean {\n        if (this.state === nextState && this.props.data === nextProps.data) {\n            return false;\n        }\n        return true;\n    }\n\n    public render(): JSX.Element {\n        if (!this.isCustomerAccountPaymentEnabled) {\n            return <></>;\n        }\n\n        const { className, heading, links } = this.props.config;\n        const viewProps = {\n            ...this.props,\n            AccountCustomerBalanceTile: {\n                moduleProps: this.props,\n                className: classnames('ms-account-customer-balance-tile', className)\n            },\n            heading: heading && (\n                <Heading className='ms-account-customer-balance-tile__heading' headingTag={heading.tag} text={heading.text} />\n            ),\n            content: this.state.content,\n            links: this.state.isDetailsLinkDisplayed && (\n                <LinksComponent\n                    {...{\n                        links,\n                        onTextChange: (index: number) => (event: Msdyn365.ContentEditableEvent) => void 0,\n                        requestContext: this.props.context.request,\n                        telemetryContent: this.telemetryContent\n                    }}\n                />\n            )\n        };\n\n        return this.props.renderView(viewProps) as React.ReactElement;\n    }\n\n    private _initState(): IAccountCustomerBalanceTileViewState {\n        const account: CustomerBalances = get(this.props, 'data.balance.result');\n\n        let content: React.ReactNode;\n        let isDetailsLinkDisplayed = false;\n\n        if (this.hasError) {\n            this.props.telemetry.error('Error retrieving customer account balance');\n            content = <ErrorComponent error={this.props.resources.apiGenericErrorMessage} />;\n        } else if (\n            account.Balance === 0 &&\n            account.CreditLimit === 0 &&\n            account.InvoiceAccountBalance === 0 &&\n            account.InvoiceAccountCreditLimit === 0\n        ) {\n            // Non-established credit\n            content = <ErrorComponent error={this.props.resources.noCreditErrorMessage} />;\n        } else {\n            // Successfully retrieved balance\n            const { accountCreditVerbagePrefix, accountCreditVerbagePostfix } = this.props.resources;\n            const currencyCode = get(this.props, 'context.request.channel.Currency');\n            const formatCurrency = get(this.props, 'context.cultureFormatter.formatCurrency');\n            let customerCredit = 0;\n\n            if (account.InvoiceAccountCreditLimit === 0) {\n                customerCredit = account.CreditLimit - account.Balance;\n            } else {\n                customerCredit = account.InvoiceAccountCreditLimit - account.InvoiceAccountBalance;\n            }\n\n            const customerCreditFormatted = `${formatCurrency(customerCredit.toFixed(2), currencyCode)}`;\n\n            isDetailsLinkDisplayed = true;\n            content = (\n                <CreditComponent\n                    verbagePrefix={accountCreditVerbagePrefix}\n                    value={customerCreditFormatted}\n                    verbagePostfix={accountCreditVerbagePostfix}\n                    className='ms-account-customer-balance-tile__balance'\n                />\n            );\n        }\n\n        return { content, isDetailsLinkDisplayed };\n    }\n}\n\nexport default AccountCustomerBalanceTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountCustomerBalanceTileViewProps } from './account-customer-balance-tile';\n\nconst AccountCustomerBalanceTileView: React.FC<IAccountCustomerBalanceTileViewProps> = props => {\n    const { AccountCustomerBalanceTile, heading, content, links } = props;\n\n    return (\n        <Module {...AccountCustomerBalanceTile}>\n            {heading}\n            {content}\n            {links}\n        </Module>\n    );\n};\n\nexport default AccountCustomerBalanceTileView;\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 { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport SignInButtonComponent from './components/sign-in-button';\nimport SignInDescriptionComponent from './components/sign-in-description';\nimport SignInErrorComponent from './components/sign-in-error';\nimport SignInInputComponent from './components/sign-in-input';\nimport SignInLabelComponent from './components/sign-in-label';\nimport SignInLinkComponent from './components/sign-in-link';\nimport SignInLoadingIconComponent from './components/sign-in-loading-icon';\nimport SignInLoadingMessageComponent from './components/sign-in-loading-message';\nimport SignInTextComponent from './components/sign-in-text';\nimport { ISignInConfig, ISignInProps, ISignInResources } from './sign-in.props.autogenerated';\n\nexport interface ISignInViewState {\n    isShowLoading: boolean;\n}\n\nexport interface ISignInItem {\n    wrapper: INodeProps;\n    key: string;\n    label: React.ReactNode;\n    error: React.ReactNode;\n    input: React.ReactNode;\n}\n\nexport interface ISignInSocialItem {\n    key: string;\n    button: INodeProps;\n    image: React.ReactNode;\n    text: React.ReactNode;\n}\n\nexport interface ISignInB2BItem {\n    key: string;\n    button: INodeProps;\n    text: React.ReactNode;\n}\n\nexport interface ISignInSocialAccount {\n    socialAccounts: INodeProps;\n    items: ISignInSocialItem[];\n}\n\nexport interface ISignInB2BAccount {\n    socialAccounts: INodeProps;\n    items: ISignInB2BItem[];\n}\nexport interface ISignInLocalAccount {\n    localAccount: INodeProps;\n    items: ISignInItem[];\n    forgetPassword: React.ReactNode;\n    disclaimer: React.ReactNode;\n    error: React.ReactNode;\n    signInButton: React.ReactNode;\n}\n\nexport interface ISignInLoading {\n    modal: INodeProps;\n    modalBody: INodeProps;\n    icon: React.ReactNode;\n    message: React.ReactNode;\n}\n\nexport interface ISignInViewProps {\n    className: string;\n    viewState: ISignInViewState;\n    signIn: IModuleProps;\n    loading: ISignInLoading;\n    defaultAADConainer: INodeProps;\n    aadConainer: INodeProps;\n    signInSection: INodeProps;\n    signInSectionHeading: React.ReactNode;\n    signInLocalAccount: ISignInLocalAccount;\n    signInSocialAccount: ISignInSocialAccount;\n    signInB2BAccount: ISignInB2BAccount;\n    signUpSection: INodeProps;\n    signUpSectionHeading: React.ReactNode;\n    signUpDescription: React.ReactNode;\n    signUpLink: React.ReactNode;\n}\n\n/**\n * SignIn component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component<ISignInProps<ISignInData>>}\n */\n@observer\nclass SignIn extends React.Component<ISignInProps<ISignInConfig>> {\n    private readonly moduleClassName: string = 'ms-sign-in';\n\n    private readonly telemetryContent?: ITelemetryContent;\n\n    @observable private emailId: string;\n\n    @observable private emailRegex: string;\n\n    @observable private isInitialized: boolean;\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private initializationTimer: any;\n\n    constructor(props: ISignInProps<ISignInConfig>) {\n        super(props);\n        this.emailRegex = EmailRegex.defaultRegex.source;\n        this.isInitialized = false;\n        this.telemetryContent = getTelemetryObject(\n            this.props.context.request.telemetryPageName!,\n            this.props.friendlyName,\n            this.props.telemetry\n        );\n        this.emailId = 'logonIdentifier';\n    }\n\n    public componentDidMount(): void {\n        this._prePopulateData();\n        this._onInit();\n    }\n\n    // After successful AAD initialization, call initialize method provided by AAD to attach events.\n    public componentDidUpdate(): void {\n        // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n        if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n            // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n            window['$element']['initialize']();\n        }\n    }\n\n    public shouldComponentUpdate(nextProps: ISignInProps<ISignInConfig>, nextState: ISignInViewState): boolean {\n        if (this.state === nextState && this.props.data === nextProps.data) {\n            return false;\n        }\n        return true;\n    }\n\n    public render(): JSX.Element {\n        const config: ISignInConfig = this.props.config || {};\n        const resources: ISignInResources = this.props.resources || {};\n\n        const viewProps = {\n            ...this.props,\n            viewState: {\n                isShowLoading: !this.isInitialized\n            },\n            signIn: {\n                moduleProps: this.props,\n                className: classnames(this.moduleClassName, config.className)\n            },\n            loading: {\n                modal: {\n                    tag: Modal,\n                    isOpen: true\n                },\n                modalBody: {\n                    tag: ModalBody\n                },\n                icon: <SignInLoadingIconComponent className={this.moduleClassName} />,\n                message: <SignInLoadingMessageComponent className={this.moduleClassName} message={resources.loadingMessage} />\n            },\n            defaultAADConainer: {\n                id: 'api',\n                style: { display: 'none' }\n            },\n            aadConainer: {\n                id: this.isInitialized ? 'api' : null,\n                className: `${this.moduleClassName}__container`\n            },\n            signInSection: {\n                className: `${this.moduleClassName}__sign-in-section`\n            },\n            signInSectionHeading: (\n                <Msdyn365.Text\n                    className={`${this.moduleClassName}__sign-in-heading`}\n                    {...config.signInHeading}\n                    editProps={{ onEdit: this.handleSignInHeadingChange, requestContext: this.props.context.request }}\n                />\n            ),\n            signInLocalAccount: {\n                localAccount: {\n                    className: `${this.moduleClassName}__account-items localAccount`\n                },\n                items: [\n                    this._renderInput(\n                        this.emailId,\n                        'email',\n                        resources.emailAddressLabelText,\n                        resources.emailAddressAriaLabel,\n                        this.emailRegex\n                    ),\n                    this._renderInput('password', 'password', resources.passwordLabelText)\n                ],\n                forgetPassword: (\n                    <SignInLinkComponent\n                        id='forgotPassword'\n                        className={`${this.moduleClassName}__forget-password`}\n                        href='#'\n                        ariaLabel={resources.forgotPasswordButtonAriaLabel}\n                        text={resources.forgotPasswordButtonText}\n                        telemetryContent={this.telemetryContent}\n                    />\n                ),\n                disclaimer: config.signInDisclaimer && (\n                    <Msdyn365.RichTextComponent\n                        className={`${this.moduleClassName}__sign-in-disclaimer`}\n                        text={config.signInDisclaimer}\n                        editProps={{ onEdit: this.handleParagraphChange, requestContext: this.props.context.request }}\n                    />\n                ),\n                error: <SignInErrorComponent className={this.moduleClassName} />,\n                signInButton: (\n                    <SignInButtonComponent\n                        id='next'\n                        className={`${this.moduleClassName}__sign-in-button`}\n                        ariaLabel={resources.loginButtonAriaLabel}\n                        text={resources.loginButtonText}\n                        telemetryContent={this.telemetryContent}\n                    />\n                )\n            },\n            signInSocialAccount: {\n                socialAccounts: {\n                    className: `${this.moduleClassName}__social-accounts`\n                },\n                items: [\n                    this._renderSocialAccount(\n                        'FacebookExchange',\n                        resources.facebookButtonText,\n                        resources.facebookButtonAriaLabel,\n                        config.facebookIcon\n                    ),\n                    this._renderSocialAccount(\n                        'MicrosoftAccountExchange',\n                        resources.microsoftButtonText,\n                        resources.microsoftButtonAriaLabel,\n                        config.microsoftIcon\n                    )\n                ]\n            },\n            signInB2BAccount: {\n                socialAccounts: {\n                    className: `${this.moduleClassName}__b2b-social-accounts`\n                },\n                items: [\n                    this._renderB2BSocialAccount(\n                        'StoreManagerB2BSignin',\n                        resources.b2bButtonText,\n                        resources.b2bButtonAriaLabel,\n                        config.displayB2bAccountManagerSignin\n                    )\n                ]\n            },\n            signUpSection: {\n                className: `${this.moduleClassName}__sign-up-section`\n            },\n            signUpSectionHeading: (\n                <Msdyn365.Text\n                    className={`${this.moduleClassName}__sign-up-heading`}\n                    {...config.signUpHeading}\n                    editProps={{ onEdit: this.handleSignUpHeadingChange, requestContext: this.props.context.request }}\n                />\n            ),\n            signUpDescription: (\n                <SignInDescriptionComponent\n                    className={`${this.moduleClassName}__sign-up-description`}\n                    description={resources.signUpDescriptionText}\n                />\n            ),\n            signUpLink: (\n                <SignInLinkComponent\n                    id='createAccount'\n                    href='#'\n                    className={`${this.moduleClassName}__sign-up-link msc-btn`}\n                    ariaLabel={resources.signUpButtonAriaLabel}\n                    text={resources.signUpButtonText}\n                    telemetryContent={this.telemetryContent}\n                />\n            )\n        };\n\n        return this.props.renderView(viewProps) as React.ReactElement;\n    }\n\n    public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.signInDisclaimer = event.target.value);\n\n    public handleSignInHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n        (this.props.config.signInHeading.text = event.target.value);\n\n    public handleSignUpHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n        (this.props.config.signUpHeading.text = event.target.value);\n\n    private readonly _onInit = () => {\n        this._prePopulateData();\n        this._updateErrorMessage();\n\n        // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n        this.initializationTimer = setInterval(() => {\n            this._isInitializationSuccessful();\n        }, 100);\n        setTimeout(() => {\n            clearInterval(this.initializationTimer);\n        }, 10_000);\n    };\n\n    // After successful AAD initialization, remove waiting and preload any data, if needed.\n    private readonly _isInitializationSuccessful = () => {\n        // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n        if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n            clearInterval(this.initializationTimer);\n            this.isInitialized = true;\n        }\n    };\n\n    private readonly _prePopulateData = () => {\n        // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n        if (window && window['CONTENT'] && window['CONTENT']['email_pattern']) {\n            // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n            this.emailRegex = window['CONTENT']['email_pattern'];\n        }\n\n        // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n        if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n            // @ts-expect-error\n            this.emailId = (window.SA_FIELDS.AttributeFields || [])[0].ID || this.emailId;\n        }\n    };\n\n    private readonly _updateErrorMessage = () => {\n        const resources: ISignInResources = this.props.resources || {};\n\n        // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n        if (window && window['CONTENT']) {\n            const errorMessages = {\n                requiredField_email: resources.requriedEmailError,\n                requiredField_password: resources.requriedPasswordError,\n                invalid_email: resources.invalidEmailError,\n                invalid_password: resources.invalidPasswordError,\n                unknown_error: resources.unknownError\n            };\n\n            // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n            Object.assign(window['CONTENT'], errorMessages);\n        }\n    };\n\n    private _renderInput(id: string, type: string, labelText: string, ariaLabel?: string, pattern?: string): ISignInItem {\n        const className = `${this.moduleClassName}__account-item`;\n        return {\n            wrapper: {\n                className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n            },\n            key: id,\n            label: (\n                <SignInLabelComponent\n                    {...{\n                        id,\n                        forId: id,\n                        className,\n                        text: labelText\n                    }}\n                />\n            ),\n            error: (\n                <SignInErrorComponent\n                    {...{\n                        className: this.moduleClassName,\n                        type: 'item'\n                    }}\n                />\n            ),\n            input: (\n                <SignInInputComponent\n                    {...{\n                        id,\n                        type,\n                        pattern,\n                        className,\n                        ariaLabel\n                    }}\n                />\n            )\n        };\n    }\n\n    private _renderSocialAccount(id: string, text: string, ariaLabel: string, iconImage?: Msdyn365.IImageData): ISignInSocialItem {\n        return {\n            key: id,\n            button: {\n                id,\n                tag: 'button',\n                className: classnames(\n                    `${this.moduleClassName}__social-account`,\n                    `${this.moduleClassName}__social-account-${id}`,\n                    'accountButton',\n                    'msc-btn'\n                ),\n                'aria-label': ariaLabel\n            },\n            image: this._createImageMarkup(iconImage),\n            text: <SignInTextComponent className={`${this.moduleClassName}__social-account-text`} text={text} />\n        };\n    }\n\n    private _renderB2BSocialAccount(\n        id: string,\n        text: string,\n        ariaLabel: string,\n        _displayB2bAccountManagerSignin: boolean | undefined\n    ): ISignInB2BItem | null {\n        if (_displayB2bAccountManagerSignin) {\n            return {\n                key: id,\n                button: {\n                    id,\n                    tag: 'button',\n                    className: classnames(\n                        `${this.moduleClassName}__social-account`,\n                        `${this.moduleClassName}__social-account-${id}`,\n                        'accountButton',\n                        'msc-btn'\n                    ),\n                    'aria-label': ariaLabel\n                },\n                text: <SignInTextComponent className={`${this.moduleClassName}__social-account-text`} text={text} />\n            };\n        }\n        return null;\n    }\n\n    private _createImageMarkup(iconImage?: Msdyn365.IImageData): React.ReactNode | null {\n        if (iconImage) {\n            const imageProps = {\n                gridSettings: this.props.context.request.gridSettings || {},\n                imageSettings: iconImage && iconImage.imageSettings\n            };\n            const pictureClassName = `${this.moduleClassName}__social-account-picture`;\n            return (\n                <div className={pictureClassName}>\n                    <Msdyn365.Image\n                        className={`${pictureClassName}__image`}\n                        {...iconImage}\n                        {...imageProps}\n                        requestContext={this.props.context.request}\n                        editProps={{ key: iconImage || {}, requestContext: this.props.context.request }}\n                        shouldSkipToMainImage\n                    />\n                </div>\n            );\n        }\n        return null;\n    }\n}\n\nexport default SignIn;\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 {\n    ISignInItem,\n    ISignInLoading,\n    ISignInLocalAccount,\n    ISignInSocialAccount,\n    ISignInSocialItem,\n    ISignInB2BAccount,\n    ISignInB2BItem,\n    ISignInViewProps\n} from './sign-in';\n\nconst LocalAccount: React.FC<ISignInLocalAccount> = ({ localAccount, items, forgetPassword, disclaimer, error, signInButton }) => {\n    return (\n        <Node {...localAccount}>\n            {items &&\n                items.map((item: ISignInItem) => {\n                    return (\n                        <Node key={item.key} {...item.wrapper}>\n                            {item.label}\n                            {item.error}\n                            {item.input}\n                        </Node>\n                    );\n                })}\n            {forgetPassword}\n            {disclaimer}\n            {error}\n            {signInButton}\n        </Node>\n    );\n};\n\nconst SocialAccount: React.FC<ISignInSocialAccount> = ({ socialAccounts, items }) => {\n    return (\n        <Node {...socialAccounts}>\n            {items &&\n                items.map((item: ISignInSocialItem) => {\n                    return (\n                        <Node key={item.key} {...item.button}>\n                            {item.image}\n                            {item.text}\n                        </Node>\n                    );\n                })}\n        </Node>\n    );\n};\n\nconst B2BAccount: React.FC<ISignInB2BAccount> = ({ socialAccounts, items }) => {\n    return (\n        <Node {...socialAccounts}>\n            {items &&\n                items.map((item: ISignInB2BItem) => {\n                    return (\n                        item && (\n                            <Node key={item.key} {...item.button}>\n                                {item.text}\n                            </Node>\n                        )\n                    );\n                })}\n        </Node>\n    );\n};\n\nconst SignInLoading: React.FC<ISignInLoading> = ({ modal, modalBody, icon, message }) => {\n    return (\n        <Node {...modal}>\n            <Node {...modalBody}>\n                {icon}\n                {message}\n            </Node>\n        </Node>\n    );\n};\n\nconst SignInView: React.FC<ISignInViewProps> = props => {\n    const {\n        signIn,\n        viewState,\n        loading,\n        defaultAADConainer,\n        aadConainer,\n        signInSection,\n        signUpSection,\n        signInSectionHeading,\n        signInLocalAccount,\n        signInSocialAccount,\n        signUpSectionHeading,\n        signInB2BAccount,\n        signUpDescription,\n        signUpLink\n    } = props;\n\n    return (\n        <Module {...signIn}>\n            {viewState.isShowLoading && <Node {...defaultAADConainer} />}\n            {viewState.isShowLoading && <SignInLoading {...loading} />}\n            <Node {...aadConainer}>\n                <Node {...signInSection}>\n                    {signInSectionHeading}\n                    {LocalAccount(signInLocalAccount)}\n                    {SocialAccount(signInSocialAccount)}\n                    {B2BAccount(signInB2BAccount)}\n                </Node>\n                <Node {...signUpSection}>\n                    {signUpSectionHeading}\n                    {signUpDescription}\n                    {signUpLink}\n                </Node>\n            </Node>\n        </Module>\n    );\n};\n\nexport default SignInView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { IActionContext, IGridSettings, IImageSettings, isEmptyOrNullObject } from '@msdyn365-commerce/core';\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, observable } from 'mobx';\nimport * as React from 'react';\n\nimport { IMenuItemData, INavigationMenuData, MenuSource, MenuTypeIndexId } from './navigation-menu.data';\nimport { ICmsNavItemsData, INavigationMenuProps, ISubMenusData, navigationMenuSource } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuViewProps extends INavigationMenuProps<INavigationMenuData> {\n    className: string;\n    menuItemData: IMenuItemData[];\n    Navigation: IModuleProps;\n    MenuList: INodeProps;\n    ListItem: INodeProps;\n    Link: INodeProps;\n    Button: INodeProps;\n    Span: INodeProps;\n    ImageContainer: INodeProps;\n    MobileDescriptionContainer: INodeProps;\n    MobileBackButton: INodeProps;\n    MobileDescriptionLabel: INodeProps;\n    imageSettings: IImageSettings;\n    gridSettings: IGridSettings;\n    isMobileView: boolean;\n    DivContainer?: INodeProps;\n    ImageDivContainer?: INodeProps;\n    showCategoryImage?: boolean;\n    showPromotionalContent?: boolean;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface INavigationMenuState {\n    isMobile: boolean;\n}\n\n/**\n *\n * NavigationMenu component.\n * @extends {React.PureComponent<INavigationMenuProps<INavigationMenuData>>}\n */\nclass NavigationMenu extends React.PureComponent<INavigationMenuProps<INavigationMenuData>, INavigationMenuState> {\n    private static CMSItemIdInit: number = MenuTypeIndexId.Cms;\n\n    private static RSItemIdInit: number = MenuTypeIndexId.Retail;\n\n    private resizeThrottledEventHandler?: (event: Event) => void;\n\n    private menuItemList: IMenuItemData[];\n\n    private isRetail: boolean = true;\n\n    private isCMS: boolean = true;\n\n    @observable\n    private viewport: GridSize;\n\n    public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n        let nameTranslation: TextValueTranslation | undefined;\n        if (locale && nameTranslations && nameTranslations.length > 0) {\n            nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n        }\n\n        return nameTranslation && nameTranslation.Text;\n    }\n\n    constructor(props: INavigationMenuProps<INavigationMenuData>) {\n        super(props);\n        this._updateViewport = this._updateViewport.bind(this);\n        this.viewport =\n            props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n        this._setNavigationSource(this.props.config && this.props.config.navigationMenuSource);\n        this.state = { isMobile: this.isMobile };\n        this.menuItemList = [];\n    }\n\n    @computed get isMobile(): boolean {\n        return this.viewport === 'xs' || this.viewport === 'sm';\n    }\n\n    public componentDidMount(): void {\n        if (MsDyn365.isBrowser) {\n            this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\n        }\n        this._updateViewport();\n    }\n\n    public componentWillUnmount(): void {\n        if (MsDyn365.isBrowser) {\n            window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\n        }\n    }\n\n    public render(): JSX.Element | null {\n        this.menuItemList = this._mapData();\n        if (isEmptyOrNullObject(this.props.data)) {\n            this.props.telemetry.error('Navigatiomenu returned null');\n            return null;\n        }\n\n        const defaultImageSettings: IImageSettings = {\n            viewports: {\n                xs: { q: 'w=224&h=300&m=6', w: 0, h: 0 },\n                xl: { q: 'w=224&h=300&m=6', w: 0, h: 0 }\n            },\n            lazyload: true\n        };\n\n        const viewProps = {\n            ...this.props,\n            ...this.state,\n            imageSettings: defaultImageSettings,\n            gridSettings: this.props.context.request.gridSettings,\n            Navigation: {\n                moduleProps: this.props,\n                className: classnames('ms-nav', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\n                tag: 'nav',\n                role: this.isMobile ? 'listbox' : 'navigation'\n            },\n            MenuList: {\n                className: 'ms-nav__list',\n                tag: 'ul',\n                role: this.isMobile ? 'listbox' : 'menu'\n            },\n            ListItem: {\n                className: 'ms-nav__list__item',\n                role: 'presentation',\n                tag: 'li'\n            },\n            showCategoryImage: this.props.config.displayCategoryImage ?? false,\n            showPromotionalContent: this.props.config.displayPromotionalImage ?? false,\n            Link: {\n                tag: 'a',\n                className: 'ms-nav__list__item__link',\n                role: this.isMobile ? 'option' : 'menuitem'\n            },\n            DivContainer: {\n                tag: 'div',\n                className: 'ms-nav__feature'\n            },\n            ImageDivContainer: {\n                tag: 'div',\n                className: 'category-image',\n                role: 'tabpanel'\n            },\n            Button: {\n                className: 'ms-nav__list__item__button',\n                tag: 'button',\n                role: this.isMobile ? 'option' : 'menuitem',\n                onClick: this.props\n            },\n            ImageContainer: {\n                className: 'ms-nav__list__item__image'\n            },\n            Span: {\n                className: 'ms-nav__list__item__span',\n                tag: 'span'\n            },\n            MobileDescriptionContainer: {\n                className: 'ms-nav__list__mobile__container'\n            },\n            MobileBackButton: {\n                className: 'ms-nav__list__mobile__container__button',\n                tag: 'button',\n                'aria-label': this.props.resources.backButtonAriaLabel,\n                onClick: this.props\n            },\n            MobileDescriptionLabel: {\n                className: 'ms-nav__list__mobile__container__span',\n                tag: 'span'\n            },\n            isMobileView: this.state.isMobile,\n            menuItemData: this.menuItemList,\n            className: classnames('ms-nav', this.props.config.className)\n        };\n\n        return this.props.renderView(viewProps) as React.ReactElement;\n    }\n\n    private _mapData(): IMenuItemData[] {\n        const { data, config } = this.props;\n        const mergedData: IMenuItemData[] = [];\n        if (this.isRetail && data && data.categories && data.categories.result && data.categories.result.length > 0) {\n            data.categories.result.map((item: CategoryHierarchy, index) =>\n                mergedData.push(this._constructMenuItemData(item, undefined, true, index, true))\n            );\n        }\n\n        if (this.isCMS && config.cmsNavItems && config.cmsNavItems.length > 0) {\n            config.cmsNavItems.map((item: ICmsNavItemsData, idx: number) =>\n                mergedData.push(this._constructMenuItemData(undefined, item, false, idx + 1))\n            );\n        }\n        return this._constructTopMenuItemData(mergedData);\n    }\n\n    private _constructTopMenuItemData(mergedData: IMenuItemData[]): IMenuItemData[] {\n        const enableTopLevelMenu = this.props.config.enabletopMenu ?? false;\n        if (!enableTopLevelMenu) {\n            return mergedData;\n        }\n        const mergedRootMenuData: IMenuItemData[] = [];\n        const topMenu = {\n            id: 1,\n            linkText: this.props.config.rootMenuNavigation ?? '...',\n            linkURL: '#',\n            imageSource: undefined,\n            subMenu: mergedData\n        } as IMenuItemData;\n        mergedRootMenuData.push(topMenu);\n\n        return mergedRootMenuData;\n    }\n\n    private _constructMenuItemData(\n        retailItem?: CategoryHierarchy,\n        cmsItem?: ICmsNavItemsData,\n        isRetail?: boolean,\n        idx?: number,\n        addedAllMenu?: boolean\n    ): IMenuItemData {\n        const locale =\n            this.props.context && this.props.context.request && this.props.context.request.locale\n                ? this.props.context.request.locale\n                : 'en-us';\n        const { categoryPromotionalContent } = this.props.config;\n        const cmsItemText = (cmsItem && cmsItem.linkText) || '';\n        const { menuAriaLabel } = this.props.resources;\n\n        // Filter category promotional data based on category name\n        const promotionalData =\n            retailItem &&\n            categoryPromotionalContent?.filter(promoItem => promoItem.categoryName?.toLowerCase() === retailItem?.Name?.toLowerCase());\n\n        // First check if image is available from promotional data else read from retail server\n        let imageSource: string = 'empty';\n        if (ArrayExtensions.hasElements(retailItem?.Images) && retailItem!.Images[0].Uri) {\n            imageSource = retailItem!.Images[0].Uri;\n        }\n        if (isRetail) {\n            return {\n                id: NavigationMenu.RSItemIdInit++,\n                linkText: NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? '',\n                linkURL: retailItem?.Url,\n                imageSource,\n                subMenu: this._getNestedChildren(retailItem, imageSource, addedAllMenu),\n                promotionalContent: this.props.config.displayPromotionalImage && promotionalData,\n                menuSource: MenuSource.Retail,\n                ariaLabel: `${NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? ''} ${menuAriaLabel}`\n            } as IMenuItemData;\n        }\n        return {\n            id: NavigationMenu.CMSItemIdInit++,\n            linkText: cmsItemText,\n            linkURL: (cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl) || '',\n            imageDestinationURL: (cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl) || '',\n            imageSource: (cmsItem && cmsItem.image && cmsItem.image.src) || '',\n            subMenu: this._getCMSNestedChildren(cmsItem),\n            menuSource: MenuSource.Cms,\n            shouldOpenNewTab: cmsItem?.openInNewTab,\n            ariaLabel: `${cmsItemText} ${menuAriaLabel}`\n        } as IMenuItemData;\n    }\n\n    private _getNestedChildren(category?: CategoryHierarchy, imageSourceUrl?: string, addedAllMenu: boolean = false): IMenuItemData[] {\n        const nestedChildren: IMenuItemData[] = [];\n        if (!category || !category.Children || category.Children.length === 0) {\n            return [];\n        }\n        if (!this.props.config.enabletopMenu && addedAllMenu) {\n            nestedChildren.push({\n                linkText: this.props.resources.allCategoryMenuText,\n                imageSource: imageSourceUrl,\n                linkURL: getCategoryUrl(category, (this.props.context as unknown) as IActionContext, {})\n            });\n        }\n        category.Children.map((item: CategoryHierarchy, index) => {\n            nestedChildren.push(this._constructMenuItemData(item, undefined, true, index, false));\n        });\n        return nestedChildren;\n    }\n\n    private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\n        const nestedChildren: IMenuItemData[] = [];\n\n        if (!category || !category.subMenus || category.subMenus.length === 0) {\n            return [];\n        }\n\n        category.subMenus.map((item: ISubMenusData, idx: number) => {\n            nestedChildren.push(this._constructMenuItemData(undefined, item, false, idx));\n        });\n        return nestedChildren;\n    }\n\n    private readonly _setNavigationSource = (sourceType?: navigationMenuSource): void => {\n        switch (sourceType) {\n            case navigationMenuSource.retailServerOnly:\n                this.isRetail = true;\n                this.isCMS = false;\n                break;\n            case navigationMenuSource.cmsOnly:\n                this.isRetail = false;\n                this.isCMS = true;\n                break;\n            case navigationMenuSource.all:\n                this.isRetail = true;\n                this.isCMS = true;\n                break;\n            default:\n        }\n    };\n\n    private _updateViewport(): void {\n        this.viewport = this._getViewport();\n        this.setState({ isMobile: this.isMobile });\n    }\n\n    private _getViewport(): GridSize {\n        const { context } = this.props;\n\n        // Always render in mobile viewport on a mobile device\n        if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n            return 'xs';\n        }\n\n        if (MsDyn365.isBrowser && window.innerWidth) {\n            const gridSettings = context.request.gridSettings;\n            if (gridSettings) {\n                if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n                    return 'xs';\n                } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n                    return 'sm';\n                } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n                    return 'md';\n                } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n                    return 'lg';\n                }\n                return 'xl';\n            }\n        }\n\n        return 'xs';\n    }\n}\n\nexport default NavigationMenu;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    getPayloadObject,\n    getTelemetryAttributes,\n    getTelemetryObject,\n    IPayLoad,\n    ITelemetryContent,\n    Module,\n    Node,\n    onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { INavigationMenuViewProps } from './navigation-menu';\nimport { IMenuItemData } from './navigation-menu.data';\n\ninterface INavigationState {\n    parentMenu?: number;\n    activeMenu?: number;\n    categoryImage?: IImageData[] | null;\n    mobileViewLabelText?: string;\n    categoryImageAltText: string;\n}\n\n/**\n *\n * NavigationMenuView component.\n * @extends {React.PureComponent<INavigationMenuViewProps>}\n */\nexport class NavigationMenuView extends React.PureComponent<INavigationMenuViewProps, INavigationState> {\n    private static isBackTrack: boolean = false;\n\n    private currentLevel: number = 0;\n\n    private readonly menuNode: React.RefObject<HTMLUListElement>;\n\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\n\n    private readonly telemetryContent: ITelemetryContent;\n\n    private readonly payLoad: IPayLoad;\n\n    constructor(props: INavigationMenuViewProps) {\n        super(props);\n        this.menuNode = React.createRef();\n        this.menuItemRef = React.createRef();\n        this.state = { activeMenu: undefined, mobileViewLabelText: '', parentMenu: undefined, categoryImageAltText: '' };\n        this._closeSubmenu = this._closeSubmenu.bind(this);\n        this.telemetryContent = getTelemetryObject(\n            this.props.context.request.telemetryPageName!,\n            this.props.friendlyName,\n            this.props.telemetry\n        );\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n    }\n\n    public componentDidMount(): void {\n        if (MsDyn365.isBrowser) {\n            document.body.addEventListener('mousedown', this._handleClickOutside);\n            document.body.addEventListener('focusout', this._handleFocusOutside);\n        }\n    }\n\n    public componentDidUpdate(): void {\n        if (this.menuItemRef.current?.children[0] && this.props.isMobileView) {\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\n        }\n    }\n\n    public componentWillUnmount(): void {\n        if (MsDyn365.isBrowser) {\n            document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n            document.body.removeEventListener('focusout', this._handleFocusOutside, false);\n        }\n    }\n\n    public render(): JSX.Element | null {\n        const { isMobileView, MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props;\n\n        this.currentLevel = 1;\n        return (\n            <Module\n                {...Navigation}\n                className={classnames(Navigation.className, isMobileView && this.state.activeMenu !== undefined ? 'child' : 'parent')}\n            >\n                <Node {...MenuList} ref={this.menuNode} tabIndex='-1'>\n                    {isMobileView && this.state.activeMenu !== undefined && (\n                        <Node {...MobileDescriptionContainer}>\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\n                            <Node {...MobileDescriptionLabel}>{this.state.mobileViewLabelText}</Node>\n                        </Node>\n                    )}\n                    {this._renderDisplay()}\n                </Node>\n            </Module>\n        );\n    }\n\n    private _renderDisplay(): JSX.Element[] {\n        const { ListItem, menuItemData, isMobileView } = this.props;\n        const { activeMenu } = this.state;\n        const menuItemList: JSX.Element[] = [];\n\n        if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\n            let menuItem: IMenuItemData = {};\n            for (const menuItemDatum of menuItemData) {\n                if (menuItemDatum && menuItemDatum.id === activeMenu) {\n                    menuItem = menuItemDatum;\n                    !NavigationMenuView.isBackTrack\n                        ? this.setState({ parentMenu: undefined })\n                        : this.setState({ parentMenu: undefined, mobileViewLabelText: menuItemDatum.linkText });\n                    break;\n                }\n                menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\n                if (menuItem && menuItem.id === activeMenu) {\n                    break;\n                }\n            }\n\n            menuItem &&\n                menuItemList.push(\n                    <Node key={menuItem.id} {...ListItem}>\n                        {' '}\n                        {this._createMenuItemList(menuItem)}{' '}\n                    </Node>\n                );\n        } else {\n            menuItemData.forEach((item: IMenuItemData, index: number) => {\n                menuItemList.push(\n                    <Node\n                        key={index}\n                        {...ListItem}\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\n                    >\n                        {this._createMenuItemList(item)}\n                    </Node>\n                );\n            });\n        }\n\n        return menuItemList;\n    }\n\n    private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n        const subMenus = item && item.subMenu;\n        if (subMenus && subMenus.length > 0) {\n            for (let i = 0; i <= subMenus.length - 1; i++) {\n                if (subMenus[i].id === this.state.activeMenu) {\n                    !NavigationMenuView.isBackTrack\n                        ? this.setState({ parentMenu: item?.id })\n                        : this.setState({ parentMenu: item && item.id, mobileViewLabelText: subMenus[i].linkText });\n                    return subMenus[i];\n                }\n                const found = this._getFromSubMenu(subMenus[i]);\n                if (found) {\n                    return found;\n                }\n            }\n        }\n        this.props.context.telemetry.error('Submenu content is empty, module wont render.');\n        return null;\n    }\n\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n        if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\n            if (this.props.isMobileView && this.state.activeMenu !== undefined) {\n                return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\n            }\n            return (\n                <>\n                    {this._renderButtonMenuItem(menuItemData)}\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false)}\n                </>\n            );\n        } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\n            return this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true);\n        } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\n            return this._renderSpanMenuItem(menuItemData, menuItemData.id, true);\n        }\n        this.props.context.telemetry.error('Navigation menu content is empty, module wont render.');\n        return null;\n    }\n\n    private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\n        const { isMobileView, ListItem } = this.props;\n        const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\n        const multiLevelSupportedMenu = this.props.config.menuLevelSupport || 3;\n\n        // Const isParentMenu:boolean= false;\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\n            this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n            return null;\n        }\n\n        if (!subMenus || subMenus.length === 0) {\n            this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n            return null;\n        }\n\n        let levelClassName: string = '';\n        const menuOptions =\n            subMenus &&\n            subMenus.map((option: IMenuItemData, idx: number) => {\n                const hasOptions = option.subMenu && option.subMenu.length > 0;\n                let menuItem: JSX.Element | null;\n                if (hasOptions && isMobileView) {\n                    menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\n                } else {\n                    menuItem = option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option);\n                }\n\n                let subMenu;\n                const haveSubmenu = hasOptions && enableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1;\n                if (haveSubmenu) {\n                    this.currentLevel++;\n                    levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n                    subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\n                }\n                return (\n                    <Node\n                        {...ListItem}\n                        key={option.id}\n                        className={classnames(ListItem.className, haveSubmenu && 'havesubmenu')}\n                        ref={this._shouldAddFocusMenuRef(idx, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\n                    >\n                        {menuItem}\n                        {subMenu}\n                    </Node>\n                );\n            });\n        return this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu);\n    }\n\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n        const { Button } = this.props;\n        return (\n            <Node\n                key={index}\n                {...Button}\n                onClick={this._handleDropdownToggle(option, activeMenu)}\n                onFocus={this._closeSubmenu}\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\n                data-parent={activeMenu}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderLinkMenuItem(\n        option: IMenuItemData,\n        index?: number,\n        hoverEffect: boolean = true,\n        isParent: boolean = false\n    ): JSX.Element | null {\n        const { Link } = this.props;\n        const linkText = option.linkText ? option.linkText : '';\n        const imagesource = option.imageSource ? option.imageSource : '';\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        return (\n            <Node\n                {...Link}\n                key={index}\n                onFocus={isParent && this._closeSubmenu}\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\n                onMouseOver={hoverEffect && this._updateCategoryImage(imagesource, option)}\n                href={option.linkURL}\n                {...attributes}\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n        const { Link } = this.props;\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        if (linkText && linkUrl) {\n            return (\n                <Node {...Link} href={linkUrl} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\n                    {linkText}\n                </Node>\n            );\n        }\n        return null;\n    }\n\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\n        const { Span } = this.props;\n        return (\n            <Node key={index} {...Span} onFocus={isParent && this._closeSubmenu}>\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\n        const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent, isMobileView } = this.props;\n        const categoryImageDisplay =\n            !isMobileView &&\n            (showCategoryImage || showPromotionalContent) &&\n            !ArrayExtensions.hasElements(this.state.categoryImage) &&\n            !submenu;\n        const promotionalContentDisplay =\n            !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\n        const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n        this.currentLevel = 1;\n        return (\n            <Node {...DivContainer} className={DivContainerClass}>\n                <Node\n                    {...MenuList}\n                    className={classnames(\n                        MenuList.className,\n                        level,\n                        categoryImageDisplay && 'havecateImage',\n                        categoryImageDisplay &&\n                            this.props.config.menuLevelSupport &&\n                            this.props.config.menuLevelSupport > 2 &&\n                            'navmenu-multi-level'\n                    )}\n                >\n                    {menuOptions}\n                </Node>\n                {categoryImageDisplay &&\n                    this.state.categoryImage &&\n                    this.state.categoryImage.map(item => (\n                        <Node {...ImageDivContainer} key={item.src} className={ImageDivContainer!.className}>\n                            {this.state.categoryImage && this._getCategoryImage(item)}\n                            {promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n                        </Node>\n                    ))}\n            </Node>\n        );\n    }\n\n    private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\n        const linkText = option && option.linkText ? option.linkText : '';\n        const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\n\n        // Read category and promotional image in one array\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\n            option.promotionalContent.map(item => {\n                if (item && item.image) {\n                    const imageSrc = item.image.src;\n                    const promotionalItemImageSettings = item.image.imageSettings;\n                    promotionalImage.push({\n                        src: imageSrc,\n                        altText: item.text,\n                        imageSettings: promotionalItemImageSettings,\n                        additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n                    });\n                }\n            });\n        }\n        this.setState({\n            categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\n            categoryImageAltText: linkText\n        });\n    };\n\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n        if (!this.props.isMobileView) {\n            this.setState({\n                activeMenu: this.state.activeMenu && this.state.activeMenu === data.id! ? undefined : data.id!,\n                parentMenu: parentId\n            });\n            if (this.props.showCategoryImage) {\n                this._updateCategoryImage(data.imageSource!, data)();\n            }\n        } else {\n            NavigationMenuView.isBackTrack = false;\n            this.setState({\n                activeMenu: data.id,\n                mobileViewLabelText: data.linkText!,\n                parentMenu: parentId\n            });\n        }\n    };\n\n    private readonly _handleGoBack = () => () => {\n        NavigationMenuView.isBackTrack = true;\n        this.setState({ activeMenu: this.state.parentMenu });\n    };\n\n    /**\n     * Method to handle click outside of menu.\n     * @param event -HTML event.\n     */\n    private readonly _handleClickOutside = (event: MouseEvent) => {\n        if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n            this.setState({\n                activeMenu: undefined,\n                mobileViewLabelText: '',\n                categoryImage: null\n            });\n        }\n    };\n\n    /**\n     * Method to handle click outside of menu.\n     * @param event -HTML event.\n     */\n    private readonly _handleFocusOutside = (event: FocusEvent) => {\n        if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\n            this._closeSubmenu();\n        }\n    };\n\n    /**\n     * Checks to assign a ref for focus.\n     * @param index -Sub menu list index.\n     * @param mobileViewLabelText -Parent user clicked Sub menu list.\n     * @param optionLinkText -Sub menu list.\n     * @returns Ref.\n     */\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n        if (!NavigationMenuView.isBackTrack && index === 0) {\n            return true;\n        }\n        if (!optionLinkText || !mobileViewLabelText) {\n            return false;\n        }\n        return mobileViewLabelText === optionLinkText;\n    };\n\n    private _closeSubmenu(): void {\n        if (!this.props.isMobileView) {\n            this.setState({ activeMenu: undefined, categoryImage: null, mobileViewLabelText: '' });\n        }\n    }\n\n    private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\n        if (!categoryImage || !categoryImage.src) {\n            return null;\n        }\n\n        const categoryImageUrl = generateImageUrl(`${categoryImage.src}`, this.props.context.actionContext.requestContext.apiSettings);\n        const defaultImageSettings: IImageSettings = {\n            viewports: {\n                xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n                sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n                md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n                lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\n            },\n            lazyload: true\n        };\n        if (categoryImageUrl !== undefined) {\n            return (\n                <Image\n                    requestContext={this.props.context.actionContext.requestContext}\n                    className='ms-nav-image__item'\n                    {...categoryImage}\n                    gridSettings={this.props.context.request.gridSettings!}\n                    imageSettings={categoryImage.imageSettings ?? this.props.config.categoryImageSettings ?? defaultImageSettings}\n                    loadFailureBehavior='hide'\n                    role='tabpanel'\n                    id='categoryImageTag__categoryImage'\n                    altText={categoryImage.altText}\n                />\n            );\n        }\n        return null;\n    };\n}\n\nexport default NavigationMenuView;\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 { BackToTop, getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBackTopFooterProps } from './back-top-footer.props.autogenerated';\n\n/**\n *\n * BackTopFooter component.\n * @extends {React.PureComponent<IBackTopFooterProps<{}>>}\n */\nclass BackTopFooter extends React.PureComponent<IBackTopFooterProps<{}>> {\n    private readonly editProps: Msdyn365.ITextEditProps = {\n        requestContext: this.props.context.request,\n        onEdit: (event: Msdyn365.ContentEditableEvent) => (this.props.config.backtoTopText = event.target.value)\n    };\n\n    private readonly telemetryContent?: ITelemetryContent;\n\n    constructor(props: IBackTopFooterProps<{}>) {\n        super(props);\n        this.telemetryContent = getTelemetryObject(\n            this.props.context.request.telemetryPageName!,\n            this.props.friendlyName,\n            this.props.telemetry\n        );\n    }\n\n    public render(): JSX.Element | null {\n        if (!this.props.config.destination) {\n            this.props.telemetry.error('BackToTop.destination has not been provided, module wont render.');\n            return null;\n        }\n\n        return (\n            <BackToTop\n                href={this.props.config.destination}\n                title={this.props.config.title}\n                aria-label={this.props.config.ariaLabel}\n                className='ms-back-to-top'\n                editProps={this.editProps}\n                text={this.props.config.backtoTopText}\n                telemetryContent={this.telemetryContent}\n            />\n        );\n    }\n}\n\nexport default BackTopFooter;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IBusinessPartnerPromotionTermsParagraphProp {\n    description: string;\n    className: string;\n    title?: string;\n    titleClassName?: string;\n}\n\nexport const BusinessPartnerPromotionTermsParagraph: React.FC<IBusinessPartnerPromotionTermsParagraphProp> = ({\n    title,\n    description,\n    className,\n    titleClassName\n}) => {\n    return (\n        <li className={className}>\n            {title && <p className={titleClassName}>{title}</p>}\n            <p>{description}</p>\n        </li>\n    );\n};\n\nexport default BusinessPartnerPromotionTermsParagraph;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { Button, Alert, IModuleProps, Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport { promoteToSellerAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { BusinessPartnerUser } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Text } from '@msdyn365-commerce/core';\nimport { IBusinessPartnerPromotionData } from './business-partner-promotion.data';\nimport { IBusinessPartnerPromotionProps } from './business-partner-promotion.props.autogenerated';\nimport { BusinessPartnerPromotionTermsParagraph } from './components';\n\nexport interface IBusinessPartnerPromotionViewProps extends IBusinessPartnerPromotionProps<IBusinessPartnerPromotionData> {\n    businessPartnerPromotionProps: IModuleProps;\n    heading: React.ReactNode;\n    notificationMessage?: React.ReactNode;\n    sellerDescriptions: React.ReactNode[];\n    termsOfServiceCheckbox: React.ReactNode;\n    termsOfServiceModal: React.ReactNode;\n    submitButton: React.ReactNode;\n}\n\nexport interface IBusinessPartnerPromotionState {\n    showTermsOfService: boolean;\n    showSubmitButton: boolean;\n    termsOfServiceChecked: boolean;\n    termsOfServiceModalOpened: boolean;\n    errorMessage?: string;\n    notificationMessage?: string;\n}\n\n/**\n * The class name root for the module.\n */\nexport const moduleClassName: string = 'ms-business-partner-promotion';\n\n/**\n *\n * BusinessPartnerPromotion component\n * @extends {React.PureComponent<IBusinessPartnerPromotionProps<IBusinessPartnerPromotionData>>}\n */\nclass BusinessPartnerPromotion extends React.Component<\n    IBusinessPartnerPromotionProps<IBusinessPartnerPromotionData>,\n    IBusinessPartnerPromotionState\n> {\n    constructor(props: IBusinessPartnerPromotionProps<IBusinessPartnerPromotionData>) {\n        super(props);\n        this.state = {\n            showTermsOfService: true,\n            showSubmitButton: true,\n            termsOfServiceChecked: false,\n            termsOfServiceModalOpened: false,\n            errorMessage: undefined,\n            notificationMessage: undefined\n        };\n    }\n\n    public render(): JSX.Element | null {\n        const {\n            showSubmitButton,\n            showTermsOfService,\n            termsOfServiceChecked,\n            termsOfServiceModalOpened,\n            errorMessage,\n            notificationMessage\n        } = this.state;\n        const { resources, data, config } = this.props;\n        const { heading, termsOfService } = config;\n        const { authorizationErrorMessage } = resources;\n        const { b2bUserInformation } = data;\n        const canSubmit = this.isAdminUser(b2bUserInformation.result);\n        let error: string | undefined = errorMessage;\n\n        // do not show error message when the API is still in loading.\n        if (!canSubmit && b2bUserInformation.status !== 'LOADING') {\n            error = authorizationErrorMessage;\n        }\n        const btnEnabled = canSubmit && termsOfServiceChecked;\n\n        const viewProps: IBusinessPartnerPromotionViewProps = {\n            ...this.props,\n            businessPartnerPromotionProps: {\n                moduleProps: this.props,\n                className: classnames(moduleClassName, moduleClassName)\n            },\n            heading: <Text className={`${moduleClassName}__heading`} {...heading} />,\n            notificationMessage: this.renderNotificationBar(error, notificationMessage),\n            sellerDescriptions: this.renderSellerDescriptions(),\n            termsOfServiceCheckbox: showTermsOfService && (\n                <div className={`${moduleClassName}__agreement`}>\n                    <input\n                        className={`${moduleClassName}__agreement-checkbox`}\n                        type='checkbox'\n                        aria-label={resources.termsOfServiceLinkText}\n                        onChange={this.onCheckBoxChange}\n                    />\n                    <span className={`${moduleClassName}__agreement-text`}>{resources.termsOfServiceAgreementText}</span>\n                    <a className={`${moduleClassName}__agreement-link`} role='button' onClick={this.onToggleTermOfServiceModal}>\n                        {resources.termsOfServiceLinkText}\n                    </a>\n                </div>\n            ),\n            termsOfServiceModal: (\n                <Modal\n                    className={`${moduleClassName}__modal`}\n                    isOpen={termsOfServiceModalOpened}\n                    horizontalPosition='center'\n                    verticalPosition='center'\n                    autoFocus\n                    fade={false}\n                    toggle={this.onToggleTermOfServiceModal}\n                    aria-label={resources.termsOfServiceLinkText}\n                >\n                    <ModalHeader toggle={this.onToggleTermOfServiceModal}>{resources.termsOfServiceModalHeading}</ModalHeader>\n                    <ModalBody>\n                        <MsDyn365.RichTextComponent text={termsOfService} />\n                    </ModalBody>\n                </Modal>\n            ),\n            submitButton: showSubmitButton && (\n                <div className={`${moduleClassName}__submit-container`}>\n                    <Button\n                        onClick={this.onSubmit}\n                        className={`${moduleClassName}__submit-container-button`}\n                        role='button'\n                        aria-label={resources.submitRequestLabel}\n                        title={resources.submitRequestLabel}\n                        disabled={!btnEnabled}\n                        aria-disabled={!btnEnabled}\n                    >\n                        {resources.submitRequestLabel}\n                    </Button>\n                </div>\n            )\n        };\n\n        return this.props.renderView(viewProps);\n    }\n\n    private renderNotificationBar(errorMessage: string | undefined, notificationMessage: string | undefined): React.ReactNode {\n        let notificationBar: React.ReactNode = null;\n        if (errorMessage) {\n            notificationBar = <Alert color='danger'>{errorMessage}</Alert>;\n        } else if (notificationMessage) {\n            notificationBar = <Alert color='success'>{notificationMessage}</Alert>;\n        }\n        return notificationBar;\n    }\n\n    private renderSellerDescriptions(): React.ReactNode[] {\n        const { config } = this.props;\n        const results: React.ReactNode[] = [];\n        const sellerDescriptions = config.sellerDescriptions;\n\n        if (!sellerDescriptions) {\n            return results;\n        }\n\n        return sellerDescriptions.map((description, idx1) => {\n            return (\n                <div key={idx1} className={`${moduleClassName}__desc-container`}>\n                    <Text className={`${moduleClassName}__desc-heading`} text={description.heading} />\n                    <ul>\n                        {description.bulletPoints?.map((bulletPoint, idx2) => {\n                            return (\n                                <BusinessPartnerPromotionTermsParagraph\n                                    key={idx2}\n                                    className={`${moduleClassName}__desc-paragraph`}\n                                    titleClassName={`${moduleClassName}__desc-title`}\n                                    title={bulletPoint.label}\n                                    description={bulletPoint.text}\n                                />\n                            );\n                        })}\n                    </ul>\n                </div>\n            );\n        });\n    }\n\n    private isAdminUser(user: BusinessPartnerUser | undefined): boolean {\n        return (\n            !ObjectExtensions.isNullOrUndefined(user) && !StringExtensions.isNullOrEmpty(user.BusinessPartnerId) && user.IsAdmin === true\n        );\n    }\n\n    private readonly onCheckBoxChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n        this.setState({\n            termsOfServiceChecked: event.target.checked\n        });\n    };\n\n    private readonly onToggleTermOfServiceModal = () => {\n        this.setState({\n            termsOfServiceModalOpened: !this.state.termsOfServiceModalOpened\n        });\n    };\n\n    private readonly onSubmit = async (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n        const { context, data, resources } = this.props;\n        const { errorMessageText, promoteToSellerSubmitSuccessMessage } = resources;\n        const businessPartnerId = data.b2bUserInformation.result?.BusinessPartnerId ?? '';\n\n        try {\n            await promoteToSellerAsync({ callerContext: context.actionContext }, businessPartnerId);\n            this.setState({\n                showSubmitButton: false,\n                showTermsOfService: false,\n                errorMessage: undefined,\n                notificationMessage: promoteToSellerSubmitSuccessMessage\n            });\n        } catch {\n            this.setState({\n                showTermsOfService: true,\n                showSubmitButton: true,\n                errorMessage: errorMessageText,\n                notificationMessage: undefined\n            });\n        }\n    };\n}\n\nexport default BusinessPartnerPromotion;\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\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport MsDyn365 from \"@msdyn365-commerce/core\";\r\nimport { IInvoicesListViewProps } from '@msdyn365-commerce-modules/invoice/src/modules/invoices-list/./invoices-list';\r\n\r\nexport const InvoiceListView: React.FC<IInvoicesListViewProps> = props => {\r\n    const { header, filter, content, invoiceRequestModal, pagination } = props;\r\n    if (MsDyn365.isBrowser) {\r\n        const linksElements = document.querySelectorAll('a.msc-invoices-list__container__content__table__row__open-invoice');\r\n        console.log(linksElements);\r\n        linksElements.forEach(l => l.setAttribute('href', '#'));\r\n    }\r\n    return (\r\n        <Module {...props.moduleProps}>\r\n            {header}\r\n            {invoiceRequestModal}\r\n            {filter}\r\n            {content}\r\n            {pagination}\r\n        </Module>\r\n    );\r\n};\r\n\r\nexport default InvoiceListView;\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\n\r\n/**\r\n * INavigationMenuViewRootProps.\r\n */\r\nexport interface INavigationMenuViewRootProps {\r\n    navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\r\n}\r\n\r\n/**\r\n * Represent navigation menu state interface.\r\n */\r\nexport interface INavigationState {\r\n    parentMenu?: number;\r\n    activeMenu?: number;\r\n    categoryImage?: Msdyn365.IImageData[] | null;\r\n    mobileViewLabelText?: string;\r\n    isDrawerOpen: boolean;\r\n    desktopCategoryId: number;\r\n    isOnlyMobile: boolean;\r\n    isNavOpen: boolean;\r\n}\r\n\r\n/**\r\n * NavMenuConstants enum.\r\n */\r\nexport enum NavMenuConstants {\r\n    zero = 0,\r\n    one = 1,\r\n    two = 2,\r\n    three = 3,\r\n    four = 4,\r\n    escapeKey = 27,\r\n    rootMenu = 1\r\n}\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n * Get category image.\r\n * @param props - Navigation menu props.\r\n * @param categoryImage - Category Image.\r\n * @param alttext - AltText String.\r\n * @returns Returns Node.\r\n */\r\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\r\n\r\n    const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\r\n    const defaultImageSettings: Msdyn365.IImageSettings = {\r\n        viewports: {\r\n            xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n            sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n            md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\r\n            lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\r\n        },\r\n        lazyload: true\r\n    };\r\n    if (categoryImageUrl !== undefined) {\r\n        const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\r\n        return (\r\n            <Msdyn365.Image\r\n                requestContext={props.navProps.context.actionContext.requestContext}\r\n                className='ms-nav-image__item'\r\n                {...imageData}\r\n                gridSettings={props.navProps.context.request.gridSettings!}\r\n                imageSettings={props.navProps.config.categoryImageSettings ?? defaultImageSettings}\r\n                loadFailureBehavior='hide'\r\n                role='tabpanel'\r\n                altText={alttext}\r\n            />\r\n        );\r\n    }\r\n    return null;\r\n};\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n    addThrottledEvent,\r\n    Button,\r\n    Collapse, Drawer,\r\n    getPayloadObject,\r\n    getTelemetryAttributes,\r\n    getTelemetryObject,\r\n    IPayLoad,\r\n    isMobile,\r\n    ITelemetryContent,\r\n    Module,\r\n    Node,\r\n    onTelemetryClick,\r\n    VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootDisabled component.\r\n * @extends {React.PureComponent<INavigationMenuViewProps>}\r\n */\r\nexport class NavigationMenuRootDisabled extends React.PureComponent<INavigationMenuViewRootProps, INavigationState> {\r\n    private static isBackTrack: boolean = false;\r\n\r\n    private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n    private currentLevel: number = NavMenuConstants.zero;\r\n\r\n    private readonly menuNode: React.RefObject<HTMLElement>;\r\n\r\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\r\n\r\n    private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n    private readonly telemetryContent: ITelemetryContent;\r\n\r\n    private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n    private readonly payLoad: IPayLoad;\r\n\r\n    private readonly attributes?: Msdyn365.IDictionary<string>;\r\n\r\n    private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n    public constructor(props: INavigationMenuViewRootProps) {\r\n        super(props);\r\n        this.menuNode = React.createRef();\r\n        this.menuItemRef = React.createRef();\r\n        const { menuItemData } = this.props.navProps;\r\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n            const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n            const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n            this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n            // Read category and promotional image in one array\r\n            if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n                menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n                    const imageSource = item.image.src;\r\n                    this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n                    return null;\r\n                });\r\n            }\r\n        }\r\n        this.state = {\r\n            activeMenu: 1,\r\n            mobileViewLabelText: '',\r\n            parentMenu: undefined,\r\n            isDrawerOpen: false,\r\n            desktopCategoryId: -1,\r\n            isOnlyMobile: this.isOnlyMobile,\r\n            categoryImage: this.promotionalImage,\r\n            isNavOpen: false\r\n        };\r\n        this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\r\n            this.props.navProps.friendlyName,\r\n            this.props.navProps.telemetry);\r\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n        this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n    }\r\n\r\n    @computed public get isOnlyMobile(): boolean {\r\n        return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\r\n    }\r\n\r\n    public componentDidMount(): void {\r\n        this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n        document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n        this._customUpdateViewport();\r\n        document.body.addEventListener('mousedown', this._handleClickOutside);\r\n    }\r\n\r\n    public componentDidUpdate(): void {\r\n        if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n        }\r\n    }\r\n\r\n    public componentWillUnmount(): void {\r\n        window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n        document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n    }\r\n\r\n    public render(): JSX.Element | null {\r\n        this.currentLevel = 1;\r\n        const navbarKey = 'header-nav-mobile';\r\n        return (\r\n            <Node className='nav-menu-container' ref={this.menuNode}>\r\n                {\r\n                    this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\r\n                        <Button\r\n                            className='ms-header__nav-icon'\r\n                            onClick={this._toggleNavBar}\r\n                            aria-controls={navbarKey}\r\n                            title={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            aria-label={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            {...this.attributes}\r\n                        />\r\n                        {this._renderCollapseMenu()}\r\n                    </>)\r\n                }\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Function to handle nav bar toggle.\r\n     */\r\n    private readonly _toggleNavBar = (): void => {\r\n        this.setState(previousState => ({\r\n            activeMenu: 1,\r\n            isNavOpen: !previousState.isNavOpen\r\n        }));\r\n    };\r\n\r\n    private _renderCollapseMenu(): JSX.Element | null {\r\n        return (\r\n            <Collapse className='ms-header__collapsible-hamburger' isOpen={this.state.isNavOpen} >\r\n                {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n            </Collapse>\r\n        );\r\n    }\r\n\r\n    private _renderMobileMenu(): JSX.Element {\r\n        const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n        this.currentLevel = 1;\r\n        return (\r\n            <Module\r\n                {...Navigation}\r\n                className={classnames(Navigation.className, this.state.isOnlyMobile && this.state.activeMenu !== undefined ? 'child' : 'parent')}>\r\n                <Node {...MenuList} tabIndex='-1'>\r\n                    {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\r\n                        <Node {...MobileDescriptionContainer}>\r\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\r\n                            <Node {...MobileDescriptionLabel}>\r\n                                {this.state.mobileViewLabelText}\r\n                            </Node>\r\n                        </Node>}\r\n                    {this._renderDisplay()}\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDesktopMenu(): JSX.Element {\r\n        const { MenuList, Navigation } = this.props.navProps;\r\n\r\n        return (\r\n            <Module {...Navigation} className={classnames(Navigation.className, 'ms-nav__disable-top-menu')}>\r\n                <Node {...MenuList} tabIndex='-1'>\r\n                    {this._renderDisplay()}\r\n                    <div className='ms-nav-close-button'>\r\n                        <button className='btn nav-menu-close' aria-label='Close' onClick={this._closeNavMenu} />\r\n                    </div>\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n        if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n            return (\r\n                this._renderLinkMenuItem(item)\r\n            );\r\n        } else if (!item.linkURL) {\r\n            return (\r\n                this._renderSpanMenuItem(item)\r\n            );\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _renderDisplay(): JSX.Element[] {\r\n        const { ListItem } = this.props.navProps;\r\n        const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\r\n        const { activeMenu } = this.state;\r\n        const menuItemList: JSX.Element[] = [];\r\n\r\n        if (ArrayExtensions.hasElements(menuItemData)) {\r\n            menuItemData[0].id = 1;\r\n        }\r\n\r\n        if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n            const menuItem = this._getFromSubMenu(undefined, menuItemData);\r\n\r\n            if (menuItem) {\r\n                menuItemList.push(\r\n                    <Node key={menuItem.id} {...ListItem}>\r\n                        {' '}\r\n                        {this._createMenuItemList(menuItem)}\r\n                        {' '}\r\n                    </Node>\r\n                );\r\n            }\r\n        } else {\r\n\r\n            for (const [index, item] of menuItemData.entries()) {\r\n                menuItemList.push(\r\n                    <Node\r\n                        key={item.id}\r\n                        {...ListItem}\r\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\r\n                    >\r\n                        {this._createMenuItemList(item)}\r\n                    </Node>\r\n                );\r\n            }\r\n\r\n        }\r\n\r\n        return menuItemList;\r\n    }\r\n\r\n    private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\r\n        if (!menu) {\r\n            return null;\r\n        }\r\n\r\n        for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\r\n            const item: IMenuItemData = menu[Number(index)];\r\n\r\n            if (item.id === this.state.activeMenu) {\r\n                if (!NavigationMenuRootDisabled.isBackTrack) {\r\n                    this.setState({ parentMenu: parentMenuId });\r\n                } else {\r\n                    this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\r\n                }\r\n                return item;\r\n            }\r\n            const found = this._getFromSubMenu(item.id, item.subMenu);\r\n            if (found) {\r\n                return found;\r\n            }\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n        if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n            if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n                return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\r\n            }\r\n\r\n            return (\r\n                <>\r\n                    {this._renderButtonMenuItem(menuItemData)}\r\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n                </>\r\n            );\r\n\r\n        } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n            return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\r\n        } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\r\n            return (this._renderSpanMenuItem(menuItemData));\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n\r\n        let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n        if (activeMenu === NavMenuConstants.rootMenu) {\r\n            subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n        }\r\n\r\n        const { ListItem } = this.props.navProps;\r\n        const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n            this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n            this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        let levelClassName: string = '';\r\n        const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n            const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\r\n            let menuItem: JSX.Element | null;\r\n            if (hasOptions && this.state.isOnlyMobile) {\r\n                menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n            } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n                menuItem = this.getMenuItem(option, index);\r\n            } else {\r\n                menuItem = null;\r\n            }\r\n            let subMenu;\r\n            const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\r\n\r\n            if (hasOptions && !this.state.isOnlyMobile) {\r\n\r\n                if (this.currentLevel >= NavMenuConstants.two) {\r\n                    levelClassName = 'level-3';\r\n                    subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n                } else if (this.currentLevel <= this.supportedLevel) {\r\n                    this.currentLevel++;\r\n                    levelClassName = `level-${this.currentLevel.toString()}`;\r\n                    subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n                }\r\n            }\r\n\r\n            if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n                this.currentLevel++;\r\n                levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n                subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n            }\r\n            const imagesource = option.imageSource ? option.imageSource : '';\r\n            return (\r\n                <Node\r\n                    {...ListItem}\r\n                    key={option.id}\r\n                    onMouseOver={this.currentLevel === NavMenuConstants.one && this._updateCategoryImage(imagesource, option)}\r\n                    className={classnames(ListItem.className, isHavingSubmenu && 'havesubmenu')}\r\n                    ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\r\n                >\r\n                    { menuItem}\r\n                    { subMenu}\r\n                </Node>\r\n            );\r\n        });\r\n        return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\r\n    }\r\n\r\n    private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n        let menuItem: JSX.Element | null;\r\n        if (this.currentLevel === NavMenuConstants.one) {\r\n            menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\r\n        } else {\r\n            menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\r\n        }\r\n        return menuItem;\r\n    }\r\n\r\n    private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n        return (\r\n            <Drawer\r\n                collapseProps={\r\n                    {\r\n                        timeout: 0,\r\n                        isOpen: this.state.isDrawerOpen && this.state.desktopCategoryId === menuItem.id\r\n                    }\r\n                }\r\n                key={menuItem.id}\r\n                className={classnames('ms-nav__drawer_desktop', levelClassName)}\r\n                openGlyph='ms-nav__drawer-open'\r\n                closeGlyph='ms-nav__drawer-close'\r\n                glyphPlacement='start'\r\n                toggleButtonText={menuItem.linkText ?? ''}\r\n                onToggle={this._bindDesktopCategoryClick(menuItem.id!)}\r\n            >\r\n                <div>\r\n                    {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n                        return this._renderDrawerLink(menuSubItem);\r\n                    })}\r\n                </div>\r\n            </Drawer>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle desktop category click.\r\n     * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n     * @returns Returns void.\r\n     */\r\n    private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n        if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n            this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n        } else {\r\n            this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n        }\r\n    };\r\n\r\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n        return (\r\n            <Node\r\n                key={index}\r\n                {...this.props.navProps.Button}\r\n                onClick={this._handleDropdownToggle(option, activeMenu)}\r\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                data-parent={activeMenu}\r\n            >\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link} key={index}\r\n                href={option.linkURL}\r\n                {...attributes}\r\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\r\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const imagesource = option.imageSource ? option.imageSource : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link} key={index} onMouseOver={isHoverEffect && this._updateCategoryImage(imagesource, option)}\r\n                href={option.linkURL} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        if (linkText && linkUrl) {\r\n            return (\r\n                <Node\r\n                    {...Link} href={linkUrl} {...attributes}\r\n                    onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                    { linkText}\r\n                </Node>\r\n            );\r\n        }\r\n        return null;\r\n\r\n    }\r\n\r\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Span } = this.props.navProps;\r\n        return (\r\n            <Node key={index} {...Span}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n        const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n        const isCategoryImageDisplay =\r\n            !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\r\n        const isPromotionalContentDisplay =\r\n            !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n        const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n        this.currentLevel = NavMenuConstants.one;\r\n        const menuLevelSupportClassName = isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\r\n            this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\r\n\r\n        const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n        const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n        return (\r\n            <Node {...DivContainer} className={divContainerClass}>\r\n                <Node {...MenuList} className={classnames(MenuList.className, level, isCategoryImageDisplay && 'havecateImage', menuLevelSupportClassName)}>\r\n                    {menuOptions}\r\n                </Node>\r\n                <div className='category-image-container' key={imagesContainerKey}>\r\n                    {\r\n                        isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\r\n                            <Node {...ImageDivContainer} className={ImageDivContainer!.className} key={item.src}>\r\n                                { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n                                { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n                            </Node>))\r\n                    }\r\n                </div>\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle Category image update.\r\n     * @param categoryImageSource - Image source.\r\n     * @param option - Menu Item data.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n        // Read category and promotional image in one array\r\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n            for (const item of option.promotionalContent) {\r\n                const imageSource = item.image.src;\r\n                promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n            }\r\n        }\r\n        this.setState({\r\n            categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Handle dropdown toggle.\r\n     * @param data - Menu Item data.\r\n     * @param parentId - Number.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                parentMenu: parentId\r\n            });\r\n            if (this.props.navProps.showCategoryImage) {\r\n                this._updateCategoryImage(data.imageSource!, data)();\r\n            }\r\n        } else {\r\n            NavigationMenuRootDisabled.isBackTrack = false;\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                mobileViewLabelText: data.linkText!,\r\n                parentMenu: parentId\r\n            });\r\n        }\r\n\r\n    };\r\n\r\n    /**\r\n     * Handle back navigation for menu items for mobile view.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleGoBack = () => () => {\r\n        NavigationMenuRootDisabled.isBackTrack = true;\r\n        this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on click on body.\r\n     * @param event - MouseEvent.\r\n     */\r\n    private readonly _handleClickOutside = (event: MouseEvent) => {\r\n        if (this.menuNode.current &&\r\n            !this.menuNode.current.contains(event.target as Node)) {\r\n            if (!this.state.isOnlyMobile) {\r\n                this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n            } else {\r\n                this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Checks to assign a ref for focus.\r\n     * @param index -Sub menu list index.\r\n     * @param mobileViewLabelText -Mobile view label text.\r\n     * @param optionLinkText -Sub menu item link text.\r\n     * @returns Boolean.\r\n     */\r\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n        const firstIndex: number = 0;\r\n        if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\r\n            return true;\r\n        }\r\n        if (!optionLinkText || !mobileViewLabelText) {\r\n            return false;\r\n        }\r\n        return mobileViewLabelText === optionLinkText;\r\n    };\r\n\r\n    /**\r\n     * Function to handle nav menu close.\r\n     */\r\n    private readonly _closeNavMenu = (): void => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n        } else {\r\n            this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on esc key.\r\n     * @param event - Event.\r\n     */\r\n    private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n        if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n            this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Custom update viewport.\r\n     */\r\n    private readonly _customUpdateViewport = (): void => {\r\n        this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n    };\r\n}\r\n\r\nexport default NavigationMenuRootDisabled;\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n    addThrottledEvent,\r\n    Button,\r\n    Collapse, Drawer,\r\n    getPayloadObject,\r\n    getTelemetryAttributes,\r\n    getTelemetryObject,\r\n    IPayLoad,\r\n    isMobile,\r\n    ITelemetryContent,\r\n    Module,\r\n    Node,\r\n    onTelemetryClick,\r\n    VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootEnabled component.\r\n * @extends {React.PureComponent<IINavigationMenuViewProps>}\r\n */\r\nexport class NavigationMenuRootEnabled extends React.PureComponent<INavigationMenuViewRootProps, INavigationState> {\r\n    private static isBackTrack: boolean = false;\r\n\r\n    private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n    private currentLevel: number = NavMenuConstants.zero;\r\n\r\n    private readonly menuNode: React.RefObject<HTMLElement>;\r\n\r\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\r\n\r\n    private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n    private readonly telemetryContent: ITelemetryContent;\r\n\r\n    private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n    private menuItemData: IMenuItemData[] = [];\r\n\r\n    private readonly payLoad: IPayLoad;\r\n\r\n    private readonly attributes?: Msdyn365.IDictionary<string>;\r\n\r\n    private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n    public constructor(props: INavigationMenuViewRootProps) {\r\n        super(props);\r\n        this.menuNode = React.createRef();\r\n        this.menuItemRef = React.createRef();\r\n        const { menuItemData } = this.props.navProps;\r\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n            const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n            const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n            this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n            // Read category and promotional image in one array\r\n            if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n                menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n                    const imageSource = item.image.src;\r\n                    this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n                    return null;\r\n                });\r\n            }\r\n        }\r\n        this.state = {\r\n            activeMenu: NavMenuConstants.rootMenu,\r\n            mobileViewLabelText: '',\r\n            parentMenu: undefined,\r\n            isDrawerOpen: false,\r\n            desktopCategoryId: -1,\r\n            isOnlyMobile: this.isOnlyMobile,\r\n            categoryImage: this.promotionalImage,\r\n            isNavOpen: false\r\n        };\r\n\r\n        this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\r\n            this.props.navProps.friendlyName,\r\n            this.props.navProps.telemetry);\r\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n        this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n    }\r\n\r\n    @computed public get isOnlyMobile(): boolean {\r\n        return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\r\n    }\r\n\r\n    public componentDidMount(): void {\r\n        this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n        document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n        this._customUpdateViewport();\r\n        document.body.addEventListener('mousedown', this._handleClickOutside);\r\n        this._addShopAllLink();\r\n    }\r\n\r\n    public componentDidUpdate(): void {\r\n        if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n        }\r\n    }\r\n\r\n    public componentWillUnmount(): void {\r\n        window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n        document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n    }\r\n\r\n    public render(): JSX.Element | null {\r\n        this.currentLevel = NavMenuConstants.one;\r\n        const navbarKey = 'header-nav-mobile';\r\n        return (\r\n            <Node className='nav-menu-container' ref={this.menuNode}>\r\n                {\r\n                    this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\r\n                        <Button\r\n                            className='ms-header__nav-icon'\r\n                            onClick={this._toggleNavBar}\r\n                            aria-controls={navbarKey}\r\n                            title={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            aria-label={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            {...this.attributes}\r\n\r\n                        >{this.props.navProps.config.rootMenuNavigation}</Button>\r\n                        {this._renderCollapseMenu()}\r\n                    </>)\r\n                }\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Function to handle nav bar toggle.\r\n     */\r\n    private readonly _toggleNavBar = (): void => {\r\n        this.setState(previousState => ({\r\n            activeMenu: NavMenuConstants.rootMenu,\r\n            isNavOpen: !previousState.isNavOpen\r\n        }));\r\n    };\r\n\r\n    private _renderCollapseMenu(): JSX.Element | null {\r\n        return (\r\n            <Collapse className='ms-header__collapsible-hamburger' isOpen={this.state.isNavOpen} >\r\n                {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n            </Collapse>\r\n        );\r\n    }\r\n\r\n    private _renderMobileMenu(): JSX.Element {\r\n        const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n        this.currentLevel = NavMenuConstants.one;\r\n        return (\r\n            <Module\r\n                {...Navigation}\r\n                className={classnames(Navigation.className, this.state.isOnlyMobile && this.state.activeMenu !== undefined ? 'child' : 'parent')}>\r\n                <Node {...this.props.navProps.MenuList} tabIndex='-1'>\r\n                    {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\r\n                        <Node {...MobileDescriptionContainer}>\r\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\r\n                            <Node {...MobileDescriptionLabel}>\r\n                                {this.state.mobileViewLabelText}\r\n                            </Node>\r\n                        </Node>}\r\n                    {this._renderDisplay()}\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDesktopMenu(): JSX.Element {\r\n        const { Navigation } = this.props.navProps;\r\n        return (\r\n            <Module {...Navigation} className={classnames(Navigation.className)}>\r\n                <Node {...this.props.navProps.MenuList} tabIndex='-1'>\r\n                    {this._renderDisplay()}\r\n                    <div className='ms-nav-close-button'>\r\n                        <button className='btn nav-menu-close' aria-label='Close' onClick={this._closeNavMenu} />\r\n                    </div>\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n        if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n            return (\r\n                this._renderLinkMenuItem(item)\r\n            );\r\n        } else if (!item.linkURL) {\r\n            return (\r\n                this._renderSpanMenuItem(item)\r\n            );\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _renderDisplay(): JSX.Element[] {\r\n        const { ListItem } = this.props.navProps;\r\n        let menuItemData: IMenuItemData[] = [];\r\n        if (this.state.isOnlyMobile) {\r\n            menuItemData = this.menuItemData;\r\n        } else {\r\n            menuItemData = this.props.navProps.menuItemData;\r\n        }\r\n        const { activeMenu } = this.state;\r\n        const menuItemList: JSX.Element[] = [];\r\n        let cmsMenuData: IMenuItemData[] | undefined = [];\r\n        let retailMenuItemData: IMenuItemData[] | undefined = [];\r\n        const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\r\n\r\n        for (const item of retailMenuData) {\r\n            retailMenuItemData = item.subMenu!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n            item.subMenu = retailMenuItemData;\r\n        }\r\n\r\n        for (const item of menuItemData) {\r\n            cmsMenuData = item.subMenu!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail));\r\n        }\r\n\r\n        if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n            let menuItem: IMenuItemData | null = {};\r\n            for (const menuItemDatum of menuItemData) {\r\n                if (menuItemDatum.id === activeMenu) {\r\n                    menuItem = menuItemDatum;\r\n                    if (!NavigationMenuRootEnabled.isBackTrack) {\r\n                        this.setState({\r\n                            parentMenu: undefined\r\n                        });\r\n                    } else {\r\n                        this.setState({\r\n                            parentMenu: undefined,\r\n                            mobileViewLabelText: menuItemDatum.linkText\r\n                        });\r\n                    }\r\n                    break;\r\n                }\r\n                menuItem = this._getFromSubMenu(menuItemDatum);\r\n                if (menuItem && menuItem.id === activeMenu) {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (menuItem) {\r\n                menuItemList.push(\r\n                    <Node key={menuItem.id} {...ListItem}>\r\n                        {' '}\r\n                        {this._createMenuItemList(menuItem)}\r\n                        {' '}\r\n                    </Node>\r\n                );\r\n            }\r\n\r\n        } else {\r\n            for (const [index, item] of retailMenuData.entries()) {\r\n                menuItemList.push(\r\n                    <Node\r\n                        key={item.id}\r\n                        {...ListItem}\r\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\r\n                    >\r\n                        {this._createMenuItemList(item)}\r\n                    </Node>\r\n                );\r\n            }\r\n\r\n            for (const [index, item] of cmsMenuData.entries()) {\r\n                menuItemList.push(\r\n                    <Node\r\n                        key={item.id}\r\n                        {...ListItem}\r\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\r\n                    >\r\n                        {this._createMenuItemList(item)}\r\n                    </Node>\r\n                );\r\n            }\r\n        }\r\n\r\n        return menuItemList;\r\n    }\r\n\r\n    private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n        const subMenus = item?.subMenu;\r\n        if (subMenus && ArrayExtensions.hasElements(subMenus)) {\r\n            for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\r\n                const subMenu: IMenuItemData = subMenus[Number(index)];\r\n                let parentMenuId = item?.id;\r\n\r\n                if (subMenu.id === this.state.activeMenu) {\r\n                    if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\r\n                        parentMenuId = undefined;\r\n                    }\r\n\r\n                    if (!NavigationMenuRootEnabled.isBackTrack) {\r\n                        this.setState({ parentMenu: parentMenuId });\r\n                    } else {\r\n                        this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\r\n                    }\r\n                    return subMenu;\r\n                }\r\n                const found = this._getFromSubMenu(subMenu);\r\n                if (found) {\r\n                    return found;\r\n                }\r\n            }\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n        if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n            if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n                return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\r\n            }\r\n            return (\r\n                <>\r\n                    {this._renderButtonMenuItem(menuItemData)}\r\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n                </>\r\n            );\r\n\r\n        } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n            return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\r\n        } else if (!menuItemData.linkURL) {\r\n            return (this._renderSpanMenuItem(menuItemData));\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n\r\n        let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n        if (activeMenu === NavMenuConstants.rootMenu) {\r\n            subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n        }\r\n\r\n        const { ListItem } = this.props.navProps;\r\n        const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n            this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n            this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        let levelClassName: string = '';\r\n        const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n            const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\r\n            let menuItem: JSX.Element | null;\r\n            if (hasOptions && this.state.isOnlyMobile) {\r\n                menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n            } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n                menuItem = this.getMenuItem(option, index);\r\n            } else {\r\n                menuItem = null;\r\n            }\r\n            let subMenu;\r\n            const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\r\n\r\n            if (hasOptions && !this.state.isOnlyMobile) {\r\n                if (this.currentLevel >= NavMenuConstants.two) {\r\n                    levelClassName = 'level-3';\r\n                    subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n                } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\r\n                    this.currentLevel++;\r\n                    levelClassName = `level-${this.currentLevel.toString()}`;\r\n                    subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n                }\r\n            }\r\n            if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n                this.currentLevel++;\r\n                levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n                subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n            }\r\n            const imagesource = option.imageSource ? option.imageSource : '';\r\n            return (\r\n                <Node\r\n                    {...ListItem}\r\n                    key={option.id}\r\n                    onMouseOver={this.currentLevel === NavMenuConstants.one && this._updateCategoryImage(imagesource, option)}\r\n                    className={classnames(ListItem.className, isHavingSubmenu && 'havesubmenu')}\r\n                    ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\r\n                >\r\n                    { menuItem}\r\n                    { subMenu}\r\n                </Node>\r\n            );\r\n        });\r\n        return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\r\n    }\r\n\r\n    private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n        let menuItem: JSX.Element | null;\r\n        if (this.currentLevel === NavMenuConstants.one) {\r\n            menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\r\n        } else {\r\n            menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\r\n        }\r\n        return menuItem;\r\n    }\r\n\r\n    private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n        return (\r\n            <Drawer\r\n                collapseProps={\r\n                    {\r\n                        timeout: 0,\r\n                        isOpen: this.state.isDrawerOpen && this.state.desktopCategoryId === menuItem.id\r\n                    }\r\n                }\r\n                key={menuItem.id}\r\n                className={classnames('ms-nav__drawer_desktop', levelClassName)}\r\n                openGlyph='ms-nav__drawer-open'\r\n                closeGlyph='ms-nav__drawer-close'\r\n                glyphPlacement='start'\r\n                toggleButtonText={menuItem.linkText ?? ''}\r\n                onToggle={this._bindDesktopCategoryClick(menuItem.id!)}\r\n            >\r\n                <div>\r\n                    {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n                        return this._renderDrawerLink(menuSubItem);\r\n                    })}\r\n                </div>\r\n            </Drawer>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle desktop category click.\r\n     * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n     * @returns Returns void.\r\n     */\r\n    private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n        if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n            this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n        } else {\r\n            this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n        }\r\n    };\r\n\r\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n        return (\r\n            <Node\r\n                key={index}\r\n                {...this.props.navProps.Button}\r\n                onClick={this._handleDropdownToggle(option, activeMenu)}\r\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                data-parent={activeMenu}\r\n            >\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link} key={index}\r\n                href={option.linkURL}\r\n                {...attributes}\r\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\r\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const imagesource = option.imageSource ? option.imageSource : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link} key={index} onMouseOver={isHoverEffect && this._updateCategoryImage(imagesource, option)}\r\n                href={option.linkURL} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        if (linkText && linkUrl) {\r\n            return (\r\n                <Node\r\n                    {...Link} href={linkUrl} {...attributes}\r\n                    onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                    { linkText}\r\n                </Node>\r\n            );\r\n        }\r\n        return null;\r\n\r\n    }\r\n\r\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Span } = this.props.navProps;\r\n        return (\r\n            <Node key={index} {...Span}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n        const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n        const isCategoryImageDisplay =\r\n            !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\r\n        const isPromotionalContentDisplay =\r\n            !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n        const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n        this.currentLevel = NavMenuConstants.one;\r\n        const menuLevelSupportClassName =\r\n            isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\r\n            this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\r\n\r\n        const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n        const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n        return (\r\n            <Node {...DivContainer} className={divContainerClass}>\r\n                <Node\r\n                    {...this.props.navProps.MenuList}\r\n                    className={classnames(this.props.navProps.MenuList.className, level, isCategoryImageDisplay && 'havecateImage', menuLevelSupportClassName)}>\r\n                    {menuOptions}\r\n                </Node>\r\n                <div className='category-image-container' key={imagesContainerKey}>\r\n                    {\r\n                        isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\r\n                            <Node {...ImageDivContainer} className={ImageDivContainer!.className} key={item.src}>\r\n                                { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n                                { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n                            </Node>))\r\n                    }\r\n                </div>\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle Category image update.\r\n     * @param categoryImageSource - Image source.\r\n     * @param option - Menu Item data.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n        // Read category and promotional image in one array\r\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n            for (const item of option.promotionalContent) {\r\n                const imageSource = item.image.src;\r\n                promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n            }\r\n        }\r\n        this.setState({\r\n            categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Handle dropdown toggle.\r\n     * @param data - Menu Item data.\r\n     * @param parentId - Number.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                parentMenu: parentId\r\n            });\r\n            if (this.props.navProps.showCategoryImage) {\r\n                this._updateCategoryImage(data.imageSource!, data)();\r\n            }\r\n        } else {\r\n            NavigationMenuRootEnabled.isBackTrack = false;\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                mobileViewLabelText: data.linkText!,\r\n                parentMenu: parentId\r\n            });\r\n        }\r\n\r\n    };\r\n\r\n    /**\r\n     * Handle back navigation for menu items for mobile view.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleGoBack = () => () => {\r\n        NavigationMenuRootEnabled.isBackTrack = true;\r\n        this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on click on body.\r\n     * @param event - MouseEvent.\r\n     */\r\n    private readonly _handleClickOutside = (event: MouseEvent) => {\r\n        if (this.menuNode.current &&\r\n            !this.menuNode.current.contains(event.target as Node)) {\r\n            if (!this.state.isOnlyMobile) {\r\n                this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n            } else {\r\n                this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Add shop all link for Mobile submenu.\r\n     */\r\n    private readonly _addShopAllLink = (): void => {\r\n        const { menuItemData } = this.props.navProps;\r\n        this.menuItemData = menuItemData;\r\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n            this.menuItemData[0].subMenu?.map(item => {\r\n                const shopAllObject = {};\r\n                Object.assign(shopAllObject, { imageSource: item.imageSource });\r\n                Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\r\n                Object.assign(shopAllObject, { linkURL: item.linkURL });\r\n                if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\r\n                    item.subMenu.unshift(shopAllObject);\r\n                }\r\n                return item;\r\n            });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Checks to assign a ref for focus.\r\n     * @param index -Sub menu list index.\r\n     * @param mobileViewLabelText -Mobile view label text.\r\n     * @param optionLinkText -Sub menu item link text.\r\n     * @returns Boolean.\r\n     */\r\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n        const firstIndex: number = 0;\r\n        if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\r\n            return true;\r\n        }\r\n        if (!optionLinkText || !mobileViewLabelText) {\r\n            return false;\r\n        }\r\n        return mobileViewLabelText === optionLinkText;\r\n    };\r\n\r\n    /**\r\n     * Function to handle nav menu close.\r\n     */\r\n    private readonly _closeNavMenu = (): void => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n        } else {\r\n            this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on esc key.\r\n     * @param event - Event.\r\n     */\r\n    private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n        if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n            this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Custom update viewport.\r\n     */\r\n    private readonly _customUpdateViewport = (): void => {\r\n        this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n    };\r\n\r\n}\r\n\r\nexport default NavigationMenuRootEnabled;\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\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\r\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\r\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\r\n\r\n/**\r\n * Render the Navigation menu.\r\n * @param props - The navigation menu view props.\r\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\r\n */\r\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\r\n\r\n    if (props.config.enabletopMenu) {\r\n        return <NavigationMenuRootEnabled navProps={props} />;\r\n    }\r\n\r\n    return <NavigationMenuRootDisabled navProps={props} />;\r\n\r\n};\r\n\r\nexport default navigationMenuView;\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\nimport { IModuleProps, INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nimport {\r\n    IHelp,\r\n    IOrderSummary,\r\n    IPaymentMethods\r\n} from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common';\r\nimport {\r\n    IGroup,\r\n    IGroupDelivery,\r\n    IGroups\r\n} from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common/get-groups';\r\n// import { IOrderInformation } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common/get-order-information';\r\nimport { ISalesLine } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common/get-sales-line';\r\nimport { IOrderConfirmationData } from '@msdyn365-commerce-modules/order-management';\r\nimport { SalesOrder } from '@msdyn365-commerce/retail-proxy';\r\nimport { IOrderConfirmationProps } from '../definition-extensions/order-confirmation.ext.props.autogenerated';\r\nimport _ from 'lodash';\r\n\r\nexport interface IOrderConfirmationViewProps extends IOrderConfirmationProps<IOrderConfirmationData> {\r\n    moduleProps: IModuleProps;\r\n    salesOrder?: SalesOrder;\r\n    footerProps?: INodeProps;\r\n    alert?: React.ReactNode;\r\n    loading?: React.ReactNode;\r\n    heading: React.ReactNode;\r\n    backToShoppingLink?: React.ReactNode;\r\n    orderInfomation?: IOrderInformation;\r\n    salesLines?: ISalesLine[];\r\n    groups?: IGroups;\r\n    orderSummary?: IOrderSummary;\r\n    payment?: IPaymentMethods;\r\n    help?: IHelp;\r\n    IChargeLinesBreakdownData?: IChargeLinesBreakdownData;\r\n}\r\n\r\nexport interface IOrderInformation {\r\n    orderInformationProps: INodeProps;\r\n    channelName: React.ReactNode;\r\n    channelAddress: React.ReactNode;\r\n    placedBy?: React.ReactNode;\r\n    salesId: React.ReactNode;\r\n    receiptId: React.ReactNode;\r\n    receiptEmail: React.ReactNode;\r\n    createdDate: React.ReactNode;\r\n    count: React.ReactNode;\r\n    amount: React.ReactNode;\r\n    channelReferenceId: React.ReactNode;\r\n    note?: React.ReactNode;\r\n    props: IOrderConfirmationViewProps;\r\n}\r\n\r\ninterface IPaymentMethodsExt extends IPaymentMethods {\r\n    totalOnAccount?: string;\r\n}\r\n\r\nexport interface IChargeLinesBreakdownData {\r\n    chargeLineLabel?: string;\r\n    chargeCode?: string;\r\n}\r\n\r\nexport const OrderConfirmationOrderInfomation: React.FC<IOrderInformation> = ({\r\n    orderInformationProps,\r\n    // receiptEmail,\r\n    createdDate,\r\n    channelReferenceId,\r\n    props\r\n}) => {\r\n    return (\r\n        <Node {...orderInformationProps}>\r\n            {createdDate}\r\n            {channelReferenceId}\r\n            {renderEmailMessage(props)}\r\n        </Node>\r\n    );\r\n};\r\n\r\nexport const renderEmailMessage = (props: IOrderConfirmationViewProps) => {\r\n    const {\r\n        resources: { receiptMessageWithEmail, receiptMessageNoEmail },\r\n        data: { orderHydration }\r\n    } = props;\r\n    const email = orderHydration.result?.salesOrder.ReceiptEmail;\r\n    let emailMessage = receiptMessageNoEmail;\r\n    if (email) {\r\n        emailMessage = receiptMessageWithEmail.replace('{email}', email);\r\n    }\r\n\r\n    // const email = _.get(receiptEmail as object, 'props.children[1].props.children');\r\n    // const messageParts = receiptMessage.split('{email}');\r\n    return (\r\n        <span>\r\n            <Msdyn365.RichTextComponent className='ms-order-confirmation__order-information-receipt-email' text={emailMessage} />\r\n            {/* {messageParts[0]} */}\r\n            {/* <span>{email}</span> */}\r\n            {/* {messageParts[1]} */}\r\n        </span>\r\n    );\r\n};\r\n\r\nexport const OrderConfirmationSalesLine: React.FC<ISalesLine> = ({ salesLineProps, salesLine, buyAgainButton }) => (\r\n    <Node {...salesLineProps}>{salesLine}</Node>\r\n);\r\n\r\nexport const OrderConfirmationGroupDelivery: React.FC<IGroupDelivery> = ({\r\n    deliveryProps,\r\n    heading,\r\n    // count,\r\n    // processing,\r\n    address,\r\n    // trackingInfo,\r\n    pickupDateTimeslot\r\n}) => (\r\n    <Node {...deliveryProps}>\r\n        {heading}\r\n        {address}\r\n        {pickupDateTimeslot}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationGroup: React.FC<IGroup> = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\r\n    <Node {...groupProps}>\r\n        {delivery && <OrderConfirmationGroupDelivery {...delivery} />}\r\n        {delivery && delivery.shippingItemsToYou}\r\n        {salesLines && (\r\n            <Node {...salesLinesProps}>\r\n                {salesLines.map((salesLine: ISalesLine) => (\r\n                    <OrderConfirmationSalesLine key={salesLine.data.salesLine.LineId} {...salesLine} />\r\n                ))}\r\n            </Node>\r\n        )}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationGroups: React.FC<IGroups> = ({ groupsProps, groups }) => (\r\n    <Node {...groupsProps}>\r\n        {groups.map((group: IGroup, index: number) => (\r\n            <OrderConfirmationGroup key={index} {...group} />\r\n        ))}\r\n    </Node>\r\n);\r\n\r\nexport const otherChargesLines = (props: IOrderConfirmationViewProps) => {\r\n    const [chargeLines, setChargeLines] = React.useState<React.ReactNode[]>([]);\r\n    const [loading, setLoading] = React.useState(true);\r\n\r\n    React.useEffect(() => {\r\n        const fetchOtherChargesLines = async () => {\r\n            const chargeCodes: IChargeLinesBreakdownData[] = props.context.app.config.chargeLinesBreakdown;\r\n\r\n            let lines = props.data.orderHydration.result?.salesOrder.ChargeLines;\r\n            let linesNode: React.ReactNode[] = [];\r\n            let otherChargeTotal = props.data.orderHydration.result?.salesOrder.ChargeAmount || 0;\r\n            let currencyFormatter = props.context.cultureFormatter.formatCurrency;\r\n\r\n            chargeCodes?.map(c => {\r\n                const node = lines\r\n                    ?.filter(line => line.ChargeCode === c.chargeCode)\r\n                    .map(r => {\r\n                        otherChargeTotal -= r.CalculatedAmount || 0;\r\n                        return renderLineChargeNode(c.chargeLineLabel || '', currencyFormatter(r.CalculatedAmount?.toString() ?? ''));\r\n                    });\r\n                linesNode.push(node);\r\n            });\r\n\r\n            if (otherChargeTotal >= 0.01) {\r\n                const otherChargesNode = renderLineChargeNode(\r\n                    props.resources.otherChargeLabel,\r\n                    currencyFormatter(otherChargeTotal.toString() ?? '')\r\n                );\r\n                linesNode.push(otherChargesNode);\r\n            }\r\n\r\n            setChargeLines(linesNode);\r\n            setLoading(false);\r\n        };\r\n\r\n        fetchOtherChargesLines();\r\n    }, [props.context.actionContext, props.config.chargeLinesBreakdown, props.context.cultureFormatter]);\r\n\r\n    if (loading) {\r\n        return <div>Loading...</div>;\r\n    }\r\n\r\n    return <>{chargeLines}</>;\r\n};\r\n\r\nexport const renderLineChargeNode = (chargeName: string, chargeAmount: string): React.ReactNode => {\r\n    return (\r\n        <p className='ms-order-confirmation__order-summary-line-shipping'>\r\n            <span className='ms-order-confirmation__order-summary-label'>{chargeName}</span>\r\n            <span className='msc-price ms-order-confirmation__order-summary-price'>\r\n                <span className='msc-price__actual'>{chargeAmount}</span>\r\n            </span>\r\n        </p>\r\n    );\r\n};\r\n\r\nexport const renderTaxLine = (props: IOrderConfirmationViewProps): React.ReactNode => {\r\n    const taxAmount = props.data.orderHydration.result?.salesOrder.TaxAmount;\r\n    let currencyFormatter = props.context.cultureFormatter.formatCurrency;\r\n    return renderLineChargeNode(props.resources.taxLabel, currencyFormatter(taxAmount!.toString() ?? ''));\r\n};\r\n\r\nexport const OrderConfirmationOrderSummary: React.FC<IOrderConfirmationViewProps> = props => {\r\n    const orderSummary = props.orderSummary;\r\n\r\n    return (\r\n        <Node {...orderSummary!.orderSummaryProps}>\r\n            {orderSummary?.heading}\r\n            {orderSummary?.subtotal}\r\n            {props.config.displayShippingline && orderSummary?.shipping}\r\n            {otherChargesLines(props)}\r\n            {props.config.displayTaxNote ? (\r\n                <p className='ms-order-confirmation__order-summary-line-shipping'>{props.resources.taxAmountNote}</p>\r\n            ) : (\r\n                renderTaxLine(props)\r\n            )}\r\n\r\n            {orderSummary?.totalAmount}\r\n            {orderSummary?.earnedPoints}\r\n        </Node>\r\n    );\r\n};\r\n\r\nexport const OrderConfirmationPayment: React.FC<IPaymentMethodsExt> = ({ paymentMethodsProps, title, methods, totalOnAccount }) => (\r\n    <Node {...paymentMethodsProps}>\r\n        {title}\r\n        {totalOnAccount ? <p>On Account: {totalOnAccount}</p> : null}\r\n        {methods}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationHelp: React.FC<IHelp> = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\r\n    <Node {...helpProps}>\r\n        {needHelpLabel}\r\n        {helpLineNumberLabel}\r\n        {contactNumber}\r\n    </Node>\r\n);\r\n\r\nconst OrderConfirmationView: React.FC<IOrderConfirmationViewProps> = props => {\r\n    const {\r\n        moduleProps,\r\n        heading,\r\n        backToShoppingLink,\r\n        alert,\r\n        loading,\r\n        orderInfomation,\r\n        orderSummary,\r\n        payment,\r\n        help,\r\n        groups,\r\n        context: {\r\n            cultureFormatter: { formatCurrency }\r\n        }\r\n    } = props;\r\n\r\n    const tenderLines = props.data.orderHydration.result?.salesOrder?.TenderLines;\r\n    let totalOnAccount = 0;\r\n    if (tenderLines) {\r\n        totalOnAccount = tenderLines.map(tl => tl.AmountInCompanyCurrency || 0).reduce((num, total) => num + total, 0);\r\n    }\r\n    console.log(totalOnAccount);\r\n\r\n    return (\r\n        <Module {...moduleProps}>\r\n            {heading}\r\n            {alert}\r\n            {loading}\r\n            {orderInfomation && <OrderConfirmationOrderInfomation {...orderInfomation} props={props} />}\r\n            {backToShoppingLink}\r\n            {groups && <OrderConfirmationGroups {...groups} />}\r\n            {payment && (\r\n                <OrderConfirmationPayment {...payment} totalOnAccount={totalOnAccount > 0 ? formatCurrency(totalOnAccount) : undefined} />\r\n            )}\r\n            {orderSummary && <OrderConfirmationOrderSummary {...props} />}\r\n            {help && <OrderConfirmationHelp {...help} />}\r\n        </Module>\r\n    );\r\n};\r\n\r\nexport default OrderConfirmationView;\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutSectionContainerItem, ICheckoutSectionContainerViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-section-container/./checkout-section-container';\r\n\r\nconst ItemComponent: React.FC<ICheckoutSectionContainerItem> = ({ loading, itemProps, item }) => (\r\n  <>\r\n    {loading}\r\n    <Node {...itemProps}>\r\n      {item}\r\n    </Node>\r\n  </>\r\n);\r\n\r\nconst CheckoutSectionContainerView: React.FC<ICheckoutSectionContainerViewProps> = ({ checkoutPlainContainerProps, items }) => {\r\n  return(\r\n    <Module {...checkoutPlainContainerProps}>\r\n      {items.map(item => {\r\n        // remove the hidden classname that is given in the checkout-section-container\r\n        item.itemProps = { ...item.itemProps,\r\n          className: 'ms-checkout-section-container__item'\r\n        }\r\n        return <ItemComponent key={item.id} {...item} />\r\n      })}\r\n    </Module>\r\n  )\r\n};\r\n\r\nexport default CheckoutSectionContainerView;\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\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n// import MsDyn365 from \"@msdyn365-commerce/core\";\r\nimport { IInvoicesListViewProps } from '@msdyn365-commerce-modules/invoice/src/modules/invoices-list/./invoices-list';\r\n\r\nexport const InvoiceListView: React.FC<IInvoicesListViewProps> = props => {\r\n    const { header, filter, content, invoiceRequestModal, pagination } = props;\r\n    // if (MsDyn365.isBrowser) {\r\n        // const linksElements = document.querySelectorAll('a.msc-invoices-list__container__content__table__row__open-invoice');\r\n        // console.log(linksElements);\r\n        // linksElements.forEach(l => l.setAttribute('href', '#'));\r\n    // }\r\n    return (\r\n        <Module {...props.moduleProps}>\r\n            {header}\r\n            {invoiceRequestModal}\r\n            {filter}\r\n            {content}\r\n            {pagination}\r\n        </Module>\r\n    );\r\n};\r\n\r\nexport default InvoiceListView;\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\n\r\n/**\r\n * INavigationMenuViewRootProps.\r\n */\r\nexport interface INavigationMenuViewRootProps {\r\n    navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\r\n}\r\n\r\n/**\r\n * Represent navigation menu state interface.\r\n */\r\nexport interface INavigationState {\r\n    parentMenu?: number;\r\n    activeMenu?: number;\r\n    categoryImage?: Msdyn365.IImageData[] | null;\r\n    mobileViewLabelText?: string;\r\n    isDrawerOpen: boolean;\r\n    desktopCategoryId: number;\r\n    isOnlyMobile: boolean;\r\n    isNavOpen: boolean;\r\n}\r\n\r\n/**\r\n * NavMenuConstants enum.\r\n */\r\nexport enum NavMenuConstants {\r\n    zero = 0,\r\n    one = 1,\r\n    two = 2,\r\n    three = 3,\r\n    four = 4,\r\n    escapeKey = 27,\r\n    rootMenu = 1\r\n}\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n * Get category image.\r\n * @param props - Navigation menu props.\r\n * @param categoryImage - Category Image.\r\n * @param alttext - AltText String.\r\n * @returns Returns Node.\r\n */\r\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\r\n\r\n    const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\r\n    const defaultImageSettings: Msdyn365.IImageSettings = {\r\n        viewports: {\r\n            xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n            sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n            md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\r\n            lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\r\n        },\r\n        lazyload: true\r\n    };\r\n    if (categoryImageUrl !== undefined) {\r\n        const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\r\n        return (\r\n            <Msdyn365.Image\r\n                requestContext={props.navProps.context.actionContext.requestContext}\r\n                className='ms-nav-image__item'\r\n                {...imageData}\r\n                gridSettings={props.navProps.context.request.gridSettings!}\r\n                imageSettings={props.navProps.config.categoryImageSettings ?? defaultImageSettings}\r\n                loadFailureBehavior='hide'\r\n                role='tabpanel'\r\n                altText={alttext}\r\n            />\r\n        );\r\n    }\r\n    return null;\r\n};\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n    addThrottledEvent,\r\n    Button,\r\n    Collapse, Drawer,\r\n    getPayloadObject,\r\n    getTelemetryAttributes,\r\n    getTelemetryObject,\r\n    IPayLoad,\r\n    isMobile,\r\n    ITelemetryContent,\r\n    Module,\r\n    Node,\r\n    onTelemetryClick,\r\n    VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootDisabled component.\r\n * @extends {React.PureComponent<INavigationMenuViewProps>}\r\n */\r\nexport class NavigationMenuRootDisabled extends React.PureComponent<INavigationMenuViewRootProps, INavigationState> {\r\n    private static isBackTrack: boolean = false;\r\n\r\n    private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n    private currentLevel: number = NavMenuConstants.zero;\r\n\r\n    private readonly menuNode: React.RefObject<HTMLElement>;\r\n\r\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\r\n\r\n    private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n    private readonly telemetryContent: ITelemetryContent;\r\n\r\n    private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n    private readonly payLoad: IPayLoad;\r\n\r\n    private readonly attributes?: Msdyn365.IDictionary<string>;\r\n\r\n    private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n    public constructor(props: INavigationMenuViewRootProps) {\r\n        super(props);\r\n        this.menuNode = React.createRef();\r\n        this.menuItemRef = React.createRef();\r\n        const { menuItemData } = this.props.navProps;\r\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n            const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n            const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n            this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n            // Read category and promotional image in one array\r\n            if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n                menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n                    const imageSource = item.image.src;\r\n                    this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n                    return null;\r\n                });\r\n            }\r\n        }\r\n        this.state = {\r\n            activeMenu: 1,\r\n            mobileViewLabelText: '',\r\n            parentMenu: undefined,\r\n            isDrawerOpen: false,\r\n            desktopCategoryId: -1,\r\n            isOnlyMobile: this.isOnlyMobile,\r\n            categoryImage: this.promotionalImage,\r\n            isNavOpen: false\r\n        };\r\n        this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\r\n            this.props.navProps.friendlyName,\r\n            this.props.navProps.telemetry);\r\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n        this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n    }\r\n\r\n    @computed public get isOnlyMobile(): boolean {\r\n        return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\r\n    }\r\n\r\n    public componentDidMount(): void {\r\n        this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n        document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n        this._customUpdateViewport();\r\n        document.body.addEventListener('mousedown', this._handleClickOutside);\r\n    }\r\n\r\n    public componentDidUpdate(): void {\r\n        if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n        }\r\n    }\r\n\r\n    public componentWillUnmount(): void {\r\n        window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n        document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n    }\r\n\r\n    public render(): JSX.Element | null {\r\n        this.currentLevel = 1;\r\n        const navbarKey = 'header-nav-mobile';\r\n        return (\r\n            <Node className='nav-menu-container' ref={this.menuNode}>\r\n                {\r\n                    this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\r\n                        <Button\r\n                            className='ms-header__nav-icon'\r\n                            onClick={this._toggleNavBar}\r\n                            aria-controls={navbarKey}\r\n                            title={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            aria-label={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            {...this.attributes}\r\n                        />\r\n                        {this._renderCollapseMenu()}\r\n                    </>)\r\n                }\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Function to handle nav bar toggle.\r\n     */\r\n    private readonly _toggleNavBar = (): void => {\r\n        this.setState(previousState => ({\r\n            activeMenu: 1,\r\n            isNavOpen: !previousState.isNavOpen\r\n        }));\r\n    };\r\n\r\n    private _renderCollapseMenu(): JSX.Element | null {\r\n        return (\r\n            <Collapse className='ms-header__collapsible-hamburger' isOpen={this.state.isNavOpen} >\r\n                {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n            </Collapse>\r\n        );\r\n    }\r\n\r\n    private _renderMobileMenu(): JSX.Element {\r\n        const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n        this.currentLevel = 1;\r\n        return (\r\n            <Module\r\n                {...Navigation}\r\n                className={classnames(Navigation.className, this.state.isOnlyMobile && this.state.activeMenu !== undefined ? 'child' : 'parent')}>\r\n                <Node {...MenuList} tabIndex='-1'>\r\n                    {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\r\n                        <Node {...MobileDescriptionContainer}>\r\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\r\n                            <Node {...MobileDescriptionLabel}>\r\n                                {this.state.mobileViewLabelText}\r\n                            </Node>\r\n                        </Node>}\r\n                    {this._renderDisplay()}\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDesktopMenu(): JSX.Element {\r\n        const { MenuList, Navigation } = this.props.navProps;\r\n\r\n        return (\r\n            <Module {...Navigation} className={classnames(Navigation.className, 'ms-nav__disable-top-menu')}>\r\n                <Node {...MenuList} tabIndex='-1'>\r\n                    {this._renderDisplay()}\r\n                    <div className='ms-nav-close-button'>\r\n                        <button className='btn nav-menu-close' aria-label='Close' onClick={this._closeNavMenu} />\r\n                    </div>\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n        if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n            return (\r\n                this._renderLinkMenuItem(item)\r\n            );\r\n        } else if (!item.linkURL) {\r\n            return (\r\n                this._renderSpanMenuItem(item)\r\n            );\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _renderDisplay(): JSX.Element[] {\r\n        const { ListItem } = this.props.navProps;\r\n        const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\r\n        const { activeMenu } = this.state;\r\n        const menuItemList: JSX.Element[] = [];\r\n\r\n        if (ArrayExtensions.hasElements(menuItemData)) {\r\n            menuItemData[0].id = 1;\r\n        }\r\n\r\n        if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n            const menuItem = this._getFromSubMenu(undefined, menuItemData);\r\n\r\n            if (menuItem) {\r\n                menuItemList.push(\r\n                    <Node key={menuItem.id} {...ListItem}>\r\n                        {' '}\r\n                        {this._createMenuItemList(menuItem)}\r\n                        {' '}\r\n                    </Node>\r\n                );\r\n            }\r\n        } else {\r\n\r\n            for (const [index, item] of menuItemData.entries()) {\r\n                menuItemList.push(\r\n                    <Node\r\n                        key={item.id}\r\n                        {...ListItem}\r\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\r\n                    >\r\n                        {this._createMenuItemList(item)}\r\n                    </Node>\r\n                );\r\n            }\r\n\r\n        }\r\n\r\n        return menuItemList;\r\n    }\r\n\r\n    private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\r\n        if (!menu) {\r\n            return null;\r\n        }\r\n\r\n        for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\r\n            const item: IMenuItemData = menu[Number(index)];\r\n\r\n            if (item.id === this.state.activeMenu) {\r\n                if (!NavigationMenuRootDisabled.isBackTrack) {\r\n                    this.setState({ parentMenu: parentMenuId });\r\n                } else {\r\n                    this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\r\n                }\r\n                return item;\r\n            }\r\n            const found = this._getFromSubMenu(item.id, item.subMenu);\r\n            if (found) {\r\n                return found;\r\n            }\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n        if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n            if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n                return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\r\n            }\r\n\r\n            return (\r\n                <>\r\n                    {this._renderButtonMenuItem(menuItemData)}\r\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n                </>\r\n            );\r\n\r\n        } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n            return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\r\n        } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\r\n            return (this._renderSpanMenuItem(menuItemData));\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n\r\n        let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n        if (activeMenu === NavMenuConstants.rootMenu) {\r\n            subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n        }\r\n\r\n        const { ListItem } = this.props.navProps;\r\n        const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n            this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n            this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        let levelClassName: string = '';\r\n        const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n            const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\r\n            let menuItem: JSX.Element | null;\r\n            if (hasOptions && this.state.isOnlyMobile) {\r\n                menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n            } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n                menuItem = this.getMenuItem(option, index);\r\n            } else {\r\n                menuItem = null;\r\n            }\r\n            let subMenu;\r\n            const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\r\n\r\n            if (hasOptions && !this.state.isOnlyMobile) {\r\n\r\n                if (this.currentLevel >= NavMenuConstants.two) {\r\n                    levelClassName = 'level-3';\r\n                    subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n                } else if (this.currentLevel <= this.supportedLevel) {\r\n                    this.currentLevel++;\r\n                    levelClassName = `level-${this.currentLevel.toString()}`;\r\n                    subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n                }\r\n            }\r\n\r\n            if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n                this.currentLevel++;\r\n                levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n                subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n            }\r\n            const imagesource = option.imageSource ? option.imageSource : '';\r\n            return (\r\n                <Node\r\n                    {...ListItem}\r\n                    key={option.id}\r\n                    onMouseOver={this.currentLevel === NavMenuConstants.one && this._updateCategoryImage(imagesource, option)}\r\n                    className={classnames(ListItem.className, isHavingSubmenu && 'havesubmenu')}\r\n                    ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\r\n                >\r\n                    { menuItem}\r\n                    { subMenu}\r\n                </Node>\r\n            );\r\n        });\r\n        return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\r\n    }\r\n\r\n    private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n        let menuItem: JSX.Element | null;\r\n        if (this.currentLevel === NavMenuConstants.one) {\r\n            menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\r\n        } else {\r\n            menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\r\n        }\r\n        return menuItem;\r\n    }\r\n\r\n    private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n        return (\r\n            <Drawer\r\n                collapseProps={\r\n                    {\r\n                        timeout: 0,\r\n                        isOpen: this.state.isDrawerOpen && this.state.desktopCategoryId === menuItem.id\r\n                    }\r\n                }\r\n                key={menuItem.id}\r\n                className={classnames('ms-nav__drawer_desktop', levelClassName)}\r\n                openGlyph='ms-nav__drawer-open'\r\n                closeGlyph='ms-nav__drawer-close'\r\n                glyphPlacement='start'\r\n                toggleButtonText={menuItem.linkText ?? ''}\r\n                onToggle={this._bindDesktopCategoryClick(menuItem.id!)}\r\n            >\r\n                <div>\r\n                    {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n                        return this._renderDrawerLink(menuSubItem);\r\n                    })}\r\n                </div>\r\n            </Drawer>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle desktop category click.\r\n     * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n     * @returns Returns void.\r\n     */\r\n    private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n        if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n            this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n        } else {\r\n            this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n        }\r\n    };\r\n\r\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n        return (\r\n            <Node\r\n                key={index}\r\n                {...this.props.navProps.Button}\r\n                onClick={this._handleDropdownToggle(option, activeMenu)}\r\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                data-parent={activeMenu}\r\n            >\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link} key={index}\r\n                href={option.linkURL}\r\n                {...attributes}\r\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\r\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const imagesource = option.imageSource ? option.imageSource : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link} key={index} onMouseOver={isHoverEffect && this._updateCategoryImage(imagesource, option)}\r\n                href={option.linkURL} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        if (linkText && linkUrl) {\r\n            return (\r\n                <Node\r\n                    {...Link} href={linkUrl} {...attributes}\r\n                    onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                    { linkText}\r\n                </Node>\r\n            );\r\n        }\r\n        return null;\r\n\r\n    }\r\n\r\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Span } = this.props.navProps;\r\n        return (\r\n            <Node key={index} {...Span}>\r\n                { option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n        const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n        const isCategoryImageDisplay =\r\n            !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\r\n        const isPromotionalContentDisplay =\r\n            !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n        const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n        this.currentLevel = NavMenuConstants.one;\r\n        const menuLevelSupportClassName = isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\r\n            this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\r\n\r\n        const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n        const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n        return (\r\n            <Node {...DivContainer} className={divContainerClass}>\r\n                <Node {...MenuList} className={classnames(MenuList.className, level, isCategoryImageDisplay && 'havecateImage', menuLevelSupportClassName)}>\r\n                    {menuOptions}\r\n                </Node>\r\n                <div className='category-image-container' key={imagesContainerKey}>\r\n                    {\r\n                        isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\r\n                            <Node {...ImageDivContainer} className={ImageDivContainer!.className} key={item.src}>\r\n                                { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n                                { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n                            </Node>))\r\n                    }\r\n                </div>\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle Category image update.\r\n     * @param categoryImageSource - Image source.\r\n     * @param option - Menu Item data.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n        // Read category and promotional image in one array\r\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n            for (const item of option.promotionalContent) {\r\n                const imageSource = item.image.src;\r\n                promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n            }\r\n        }\r\n        this.setState({\r\n            categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Handle dropdown toggle.\r\n     * @param data - Menu Item data.\r\n     * @param parentId - Number.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                parentMenu: parentId\r\n            });\r\n            if (this.props.navProps.showCategoryImage) {\r\n                this._updateCategoryImage(data.imageSource!, data)();\r\n            }\r\n        } else {\r\n            NavigationMenuRootDisabled.isBackTrack = false;\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                mobileViewLabelText: data.linkText!,\r\n                parentMenu: parentId\r\n            });\r\n        }\r\n\r\n    };\r\n\r\n    /**\r\n     * Handle back navigation for menu items for mobile view.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleGoBack = () => () => {\r\n        NavigationMenuRootDisabled.isBackTrack = true;\r\n        this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on click on body.\r\n     * @param event - MouseEvent.\r\n     */\r\n    private readonly _handleClickOutside = (event: MouseEvent) => {\r\n        if (this.menuNode.current &&\r\n            !this.menuNode.current.contains(event.target as Node)) {\r\n            if (!this.state.isOnlyMobile) {\r\n                this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n            } else {\r\n                this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Checks to assign a ref for focus.\r\n     * @param index -Sub menu list index.\r\n     * @param mobileViewLabelText -Mobile view label text.\r\n     * @param optionLinkText -Sub menu item link text.\r\n     * @returns Boolean.\r\n     */\r\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n        const firstIndex: number = 0;\r\n        if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\r\n            return true;\r\n        }\r\n        if (!optionLinkText || !mobileViewLabelText) {\r\n            return false;\r\n        }\r\n        return mobileViewLabelText === optionLinkText;\r\n    };\r\n\r\n    /**\r\n     * Function to handle nav menu close.\r\n     */\r\n    private readonly _closeNavMenu = (): void => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n        } else {\r\n            this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on esc key.\r\n     * @param event - Event.\r\n     */\r\n    private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n        if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n            this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Custom update viewport.\r\n     */\r\n    private readonly _customUpdateViewport = (): void => {\r\n        this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n    };\r\n}\r\n\r\nexport default NavigationMenuRootDisabled;\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n    addThrottledEvent,\r\n    Button,\r\n    Collapse,\r\n    Drawer,\r\n    getPayloadObject,\r\n    getTelemetryAttributes,\r\n    getTelemetryObject,\r\n    IPayLoad,\r\n    isMobile,\r\n    ITelemetryContent,\r\n    Module,\r\n    Node,\r\n    onTelemetryClick,\r\n    VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootEnabled component.\r\n * @extends {React.PureComponent<IINavigationMenuViewProps>}\r\n */\r\nexport class NavigationMenuRootEnabled extends React.PureComponent<INavigationMenuViewRootProps, INavigationState> {\r\n    private static isBackTrack: boolean = false;\r\n\r\n    private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n    private currentLevel: number = NavMenuConstants.zero;\r\n\r\n    private readonly menuNode: React.RefObject<HTMLElement>;\r\n\r\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\r\n\r\n    private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n    private readonly telemetryContent: ITelemetryContent;\r\n\r\n    private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n    private menuItemData: IMenuItemData[] = [];\r\n\r\n    private readonly payLoad: IPayLoad;\r\n\r\n    private readonly attributes?: Msdyn365.IDictionary<string>;\r\n\r\n    private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n    public constructor(props: INavigationMenuViewRootProps) {\r\n        super(props);\r\n        this.menuNode = React.createRef();\r\n        this.menuItemRef = React.createRef();\r\n        const { menuItemData } = this.props.navProps;\r\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n            const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n            const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n            this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n            // Read category and promotional image in one array\r\n            if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n                menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n                    const imageSource = item.image.src;\r\n                    this.promotionalImage.push({\r\n                        src: imageSource,\r\n                        altText: item.text,\r\n                        additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n                    });\r\n                    return null;\r\n                });\r\n            }\r\n        }\r\n        this.state = {\r\n            activeMenu: NavMenuConstants.rootMenu,\r\n            mobileViewLabelText: '',\r\n            parentMenu: undefined,\r\n            isDrawerOpen: false,\r\n            desktopCategoryId: -1,\r\n            isOnlyMobile: this.isOnlyMobile,\r\n            categoryImage: this.promotionalImage,\r\n            isNavOpen: false\r\n        };\r\n\r\n        this.telemetryContent = getTelemetryObject(\r\n            this.props.navProps.context.request.telemetryPageName!,\r\n            this.props.navProps.friendlyName,\r\n            this.props.navProps.telemetry\r\n        );\r\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n        this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n    }\r\n\r\n    @computed public get isOnlyMobile(): boolean {\r\n        return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\r\n    }\r\n\r\n    public componentDidMount(): void {\r\n        this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n        document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n        this._customUpdateViewport();\r\n        document.body.addEventListener('mousedown', this._handleClickOutside);\r\n        this._addShopAllLink();\r\n    }\r\n\r\n    public componentDidUpdate(): void {\r\n        if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n        }\r\n    }\r\n\r\n    public componentWillUnmount(): void {\r\n        window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n        document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n    }\r\n\r\n    public render(): JSX.Element | null {\r\n        this.currentLevel = NavMenuConstants.one;\r\n        const navbarKey = 'header-nav-mobile';\r\n        return (\r\n            <Node className='nav-menu-container' ref={this.menuNode}>\r\n                {this.state.isOnlyMobile ? (\r\n                    this._renderMobileMenu()\r\n                ) : (\r\n                    <>\r\n                        <Button\r\n                            className='ms-header__nav-icon'\r\n                            onClick={this._toggleNavBar}\r\n                            aria-controls={navbarKey}\r\n                            title={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            aria-label={this.props.navProps.resources.hamburgerAriaLabel}\r\n                            {...this.attributes}\r\n                        >\r\n                            {this.props.navProps.config.rootMenuNavigation}\r\n                        </Button>\r\n                        {this._renderCollapseMenu()}\r\n                    </>\r\n                )}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Function to handle nav bar toggle.\r\n     */\r\n    private readonly _toggleNavBar = (): void => {\r\n        this.setState(previousState => ({\r\n            activeMenu: NavMenuConstants.rootMenu,\r\n            isNavOpen: !previousState.isNavOpen\r\n        }));\r\n    };\r\n\r\n    private _renderCollapseMenu(): JSX.Element | null {\r\n        return (\r\n            <Collapse className='ms-header__collapsible-hamburger' isOpen={this.state.isNavOpen}>\r\n                {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n            </Collapse>\r\n        );\r\n    }\r\n\r\n    private _renderMobileMenu(): JSX.Element {\r\n        const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n        this.currentLevel = NavMenuConstants.one;\r\n        return (\r\n            <Module\r\n                {...Navigation}\r\n                className={classnames(\r\n                    Navigation.className,\r\n                    this.state.isOnlyMobile && this.state.activeMenu !== undefined ? 'child' : 'parent'\r\n                )}\r\n            >\r\n                <Node {...this.props.navProps.MenuList} tabIndex='-1'>\r\n                    {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\r\n                        <Node {...MobileDescriptionContainer}>\r\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\r\n                            <Node {...MobileDescriptionLabel}>{this.state.mobileViewLabelText}</Node>\r\n                        </Node>\r\n                    )}\r\n                    {this._renderDisplay()}\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDesktopMenu(): JSX.Element {\r\n        const { Navigation } = this.props.navProps;\r\n        return (\r\n            <Module {...Navigation} className={classnames(Navigation.className)}>\r\n                <Node {...this.props.navProps.MenuList} tabIndex='-1'>\r\n                    {this._renderDisplay()}\r\n                    <div className='ms-nav-close-button'>\r\n                        <button className='btn nav-menu-close' aria-label='Close' onClick={this._closeNavMenu} />\r\n                    </div>\r\n                </Node>\r\n            </Module>\r\n        );\r\n    }\r\n\r\n    private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n        if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n            return this._renderLinkMenuItem(item);\r\n        } else if (!item.linkURL) {\r\n            return this._renderSpanMenuItem(item);\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _renderDisplay(): JSX.Element[] {\r\n        const { ListItem } = this.props.navProps;\r\n        let menuItemData: IMenuItemData[] = [];\r\n        if (this.state.isOnlyMobile) {\r\n            menuItemData = this.menuItemData;\r\n        } else {\r\n            menuItemData = this.props.navProps.menuItemData;\r\n        }\r\n        const { activeMenu } = this.state;\r\n        const menuItemList: JSX.Element[] = [];\r\n        let cmsMenuData: IMenuItemData[] | undefined = [];\r\n        let retailMenuItemData: IMenuItemData[] | undefined = [];\r\n        const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\r\n\r\n        for (const item of retailMenuData) {\r\n            retailMenuItemData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n            item.subMenu = retailMenuItemData;\r\n        }\r\n\r\n        for (const item of menuItemData) {\r\n            cmsMenuData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail);\r\n        }\r\n\r\n        if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n            let menuItem: IMenuItemData | null = {};\r\n            for (const menuItemDatum of menuItemData) {\r\n                if (menuItemDatum.id === activeMenu) {\r\n                    menuItem = menuItemDatum;\r\n                    if (!NavigationMenuRootEnabled.isBackTrack) {\r\n                        this.setState({\r\n                            parentMenu: undefined\r\n                        });\r\n                    } else {\r\n                        this.setState({\r\n                            parentMenu: undefined,\r\n                            mobileViewLabelText: menuItemDatum.linkText\r\n                        });\r\n                    }\r\n                    break;\r\n                }\r\n                menuItem = this._getFromSubMenu(menuItemDatum);\r\n                if (menuItem && menuItem.id === activeMenu) {\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (menuItem) {\r\n                menuItemList.push(\r\n                    <Node key={menuItem.id} {...ListItem}>\r\n                        {' '}\r\n                        {this._createMenuItemList(menuItem)}{' '}\r\n                    </Node>\r\n                );\r\n            }\r\n        } else {\r\n            for (const [index, item] of retailMenuData.entries()) {\r\n                menuItemList.push(\r\n                    <Node\r\n                        key={item.id}\r\n                        {...ListItem}\r\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\r\n                    >\r\n                        {this._createMenuItemList(item)}\r\n                    </Node>\r\n                );\r\n            }\r\n\r\n            for (const [index, item] of cmsMenuData.entries()) {\r\n                menuItemList.push(\r\n                    <Node\r\n                        key={item.id}\r\n                        {...ListItem}\r\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\r\n                    >\r\n                        {this._createMenuItemList(item)}\r\n                    </Node>\r\n                );\r\n            }\r\n        }\r\n\r\n        return menuItemList;\r\n    }\r\n\r\n    private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n        const subMenus = item?.subMenu;\r\n        if (subMenus && ArrayExtensions.hasElements(subMenus)) {\r\n            for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\r\n                const subMenu: IMenuItemData = subMenus[Number(index)];\r\n                let parentMenuId = item?.id;\r\n\r\n                if (subMenu.id === this.state.activeMenu) {\r\n                    if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\r\n                        parentMenuId = undefined;\r\n                    }\r\n\r\n                    if (!NavigationMenuRootEnabled.isBackTrack) {\r\n                        this.setState({ parentMenu: parentMenuId });\r\n                    } else {\r\n                        this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\r\n                    }\r\n                    return subMenu;\r\n                }\r\n                const found = this._getFromSubMenu(subMenu);\r\n                if (found) {\r\n                    return found;\r\n                }\r\n            }\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n        if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n            if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n                return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\r\n            }\r\n            return (\r\n                <>\r\n                    {this._renderButtonMenuItem(menuItemData)}\r\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n                </>\r\n            );\r\n        } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n            return this._renderLinkMenuItem(menuItemData, menuItemData.id);\r\n        } else if (!menuItemData.linkURL) {\r\n            return this._renderSpanMenuItem(menuItemData);\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n        let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n        if (activeMenu === NavMenuConstants.rootMenu) {\r\n            subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n        }\r\n\r\n        const { ListItem } = this.props.navProps;\r\n        const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n            this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n            this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n            return null;\r\n        }\r\n\r\n        let levelClassName: string = '';\r\n        const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n            const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\r\n            let menuItem: JSX.Element | null;\r\n            if (hasOptions && this.state.isOnlyMobile) {\r\n                menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n            } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n                menuItem = this.getMenuItem(option, index);\r\n            } else {\r\n                menuItem = null;\r\n            }\r\n            let subMenu;\r\n            const isHavingSubmenu =\r\n                hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\r\n\r\n            if (hasOptions && !this.state.isOnlyMobile) {\r\n                if (this.currentLevel >= NavMenuConstants.two) {\r\n                    levelClassName = 'level-3';\r\n                    subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n                } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\r\n                    this.currentLevel++;\r\n                    levelClassName = `level-${this.currentLevel.toString()}`;\r\n                    subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n                }\r\n            }\r\n            if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n                this.currentLevel++;\r\n                levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n                subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n            }\r\n            const imagesource = option.imageSource ? option.imageSource : '';\r\n            return (\r\n                <Node\r\n                    {...ListItem}\r\n                    key={option.id}\r\n                    onMouseOver={this.currentLevel === NavMenuConstants.one && this._updateCategoryImage(imagesource, option)}\r\n                    className={classnames(ListItem.className, isHavingSubmenu && 'havesubmenu')}\r\n                    ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\r\n                >\r\n                    {menuItem}\r\n                    {subMenu}\r\n                </Node>\r\n            );\r\n        });\r\n        return this._renderMenu(levelClassName, menuOptions, isSubMenu);\r\n    }\r\n\r\n    private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n        let menuItem: JSX.Element | null;\r\n        if (this.currentLevel === NavMenuConstants.one) {\r\n            menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\r\n        } else {\r\n            menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\r\n        }\r\n        return menuItem;\r\n    }\r\n\r\n    private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n        return (\r\n            <Drawer\r\n                collapseProps={{\r\n                    timeout: 0,\r\n                    isOpen: this.state.isDrawerOpen && this.state.desktopCategoryId === menuItem.id\r\n                }}\r\n                key={menuItem.id}\r\n                className={classnames('ms-nav__drawer_desktop', levelClassName)}\r\n                openGlyph='ms-nav__drawer-open'\r\n                closeGlyph='ms-nav__drawer-close'\r\n                glyphPlacement='start'\r\n                toggleButtonText={menuItem.linkText ?? ''}\r\n                onToggle={this._bindDesktopCategoryClick(menuItem.id!)}\r\n            >\r\n                <div>\r\n                    {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n                        return this._renderDrawerLink(menuSubItem);\r\n                    })}\r\n                </div>\r\n            </Drawer>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle desktop category click.\r\n     * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n     * @returns Returns void.\r\n     */\r\n    private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n        if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n            this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n        } else {\r\n            this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n        }\r\n    };\r\n\r\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n        return this.state.isOnlyMobile ? (\r\n            <Node\r\n                key={index}\r\n                {...this.props.navProps.Button}\r\n                onClick={this._handleDropdownToggle(option, activeMenu)}\r\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\r\n                data-parent={activeMenu}\r\n            >\r\n                {option.linkText}\r\n            </Node>\r\n        ) : (\r\n            <></>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link}\r\n                key={index}\r\n                href={option.linkURL}\r\n                {...attributes}\r\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\r\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\r\n            >\r\n                {option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const imagesource = option.imageSource ? option.imageSource : '';\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        return (\r\n            <Node\r\n                {...Link}\r\n                key={index}\r\n                onMouseOver={isHoverEffect && this._updateCategoryImage(imagesource, option)}\r\n                href={option.linkURL}\r\n                {...attributes}\r\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\r\n            >\r\n                {option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n        const { Link } = this.props.navProps;\r\n        this.payLoad.contentAction.etext = linkText;\r\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n        if (linkText && linkUrl) {\r\n            return (\r\n                <Node {...Link} href={linkUrl} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\r\n                    {linkText}\r\n                </Node>\r\n            );\r\n        }\r\n        return null;\r\n    }\r\n\r\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n        const { Span } = this.props.navProps;\r\n        return (\r\n            <Node key={index} {...Span}>\r\n                {option.linkText}\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n        const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n        const isCategoryImageDisplay =\r\n            !this.state.isOnlyMobile &&\r\n            showCategoryImage &&\r\n            this.state.categoryImage !== null &&\r\n            this.state.categoryImage !== undefined &&\r\n            !isSubmenu;\r\n        const isPromotionalContentDisplay =\r\n            !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n        const divContainerClass =\r\n            this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n        this.currentLevel = NavMenuConstants.one;\r\n        const menuLevelSupportClassName =\r\n            isCategoryImageDisplay &&\r\n            this.props.navProps.config.menuLevelSupport &&\r\n            this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\r\n            'navmenu-multi-level';\r\n\r\n        const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n        const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n        return (\r\n            <Node {...DivContainer} className={divContainerClass}>\r\n                <Node\r\n                    {...this.props.navProps.MenuList}\r\n                    className={classnames(\r\n                        this.props.navProps.MenuList.className,\r\n                        level,\r\n                        isCategoryImageDisplay && 'havecateImage',\r\n                        menuLevelSupportClassName\r\n                    )}\r\n                >\r\n                    {menuOptions}\r\n                </Node>\r\n                <div className='category-image-container' key={imagesContainerKey}>\r\n                    {isCategoryImageDisplay &&\r\n                        ArrayExtensions.hasElements(categoryImages) &&\r\n                        categoryImages.map(item => (\r\n                            <Node {...ImageDivContainer} className={ImageDivContainer!.className} key={item.src}>\r\n                                {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n                                {isPromotionalContentDisplay &&\r\n                                    this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n                            </Node>\r\n                        ))}\r\n                </div>\r\n            </Node>\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Handle Category image update.\r\n     * @param categoryImageSource - Image source.\r\n     * @param option - Menu Item data.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n        const linkText = option.linkText ? option.linkText : '';\r\n        const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n        // Read category and promotional image in one array\r\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n            for (const item of option.promotionalContent) {\r\n                const imageSource = item.image.src;\r\n                promotionalImage.push({\r\n                    src: imageSource,\r\n                    altText: item.text,\r\n                    additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n                });\r\n            }\r\n        }\r\n        this.setState({\r\n            categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Handle dropdown toggle.\r\n     * @param data - Menu Item data.\r\n     * @param parentId - Number.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                parentMenu: parentId\r\n            });\r\n            if (this.props.navProps.showCategoryImage) {\r\n                this._updateCategoryImage(data.imageSource!, data)();\r\n            }\r\n        } else {\r\n            NavigationMenuRootEnabled.isBackTrack = false;\r\n            this.setState({\r\n                activeMenu: data.id,\r\n                mobileViewLabelText: data.linkText!,\r\n                parentMenu: parentId\r\n            });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Handle back navigation for menu items for mobile view.\r\n     * @returns Returns empty.\r\n     */\r\n    private readonly _handleGoBack = () => () => {\r\n        NavigationMenuRootEnabled.isBackTrack = true;\r\n        this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on click on body.\r\n     * @param event - MouseEvent.\r\n     */\r\n    private readonly _handleClickOutside = (event: MouseEvent) => {\r\n        if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\r\n            if (!this.state.isOnlyMobile) {\r\n                this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n            } else {\r\n                this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Add shop all link for Mobile submenu.\r\n     */\r\n    private readonly _addShopAllLink = (): void => {\r\n        const { menuItemData } = this.props.navProps;\r\n        this.menuItemData = menuItemData;\r\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n            this.menuItemData[0].subMenu?.map(item => {\r\n                const shopAllObject = {};\r\n                Object.assign(shopAllObject, { imageSource: item.imageSource });\r\n                Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\r\n                Object.assign(shopAllObject, { linkURL: item.linkURL });\r\n                if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\r\n                    item.subMenu.unshift(shopAllObject);\r\n                }\r\n                return item;\r\n            });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Checks to assign a ref for focus.\r\n     * @param index -Sub menu list index.\r\n     * @param mobileViewLabelText -Mobile view label text.\r\n     * @param optionLinkText -Sub menu item link text.\r\n     * @returns Boolean.\r\n     */\r\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n        const firstIndex: number = 0;\r\n        if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\r\n            return true;\r\n        }\r\n        if (!optionLinkText || !mobileViewLabelText) {\r\n            return false;\r\n        }\r\n        return mobileViewLabelText === optionLinkText;\r\n    };\r\n\r\n    /**\r\n     * Function to handle nav menu close.\r\n     */\r\n    private readonly _closeNavMenu = (): void => {\r\n        if (!this.state.isOnlyMobile) {\r\n            this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n        } else {\r\n            this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Function to close the nav menu on esc key.\r\n     * @param event - Event.\r\n     */\r\n    private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n        if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n            this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Custom update viewport.\r\n     */\r\n    private readonly _customUpdateViewport = (): void => {\r\n        this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n    };\r\n}\r\n\r\nexport default NavigationMenuRootEnabled;\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\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\r\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\r\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\r\n\r\n/**\r\n * Render the Navigation menu.\r\n * @param props - The navigation menu view props.\r\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\r\n */\r\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\r\n\r\n    if (props.config.enabletopMenu) {\r\n        return <NavigationMenuRootEnabled navProps={props} />;\r\n    }\r\n\r\n    return <NavigationMenuRootDisabled navProps={props} />;\r\n\r\n};\r\n\r\nexport default navigationMenuView;\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\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IHelp, IOrderSummary, IPaymentMethods } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common';\r\nimport { IGroup, IGroupDelivery, IGroups } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common/get-groups';\r\nimport { IOrderInformation } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common/get-order-information';\r\nimport { ISalesLine } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/../../common/get-sales-line';\r\nimport { IOrderConfirmationViewProps } from '@msdyn365-commerce-modules/order-management/src/modules/order-confirmation/./order-confirmation';\r\nimport { SalesOrder } from \"@msdyn365-commerce/retail-proxy\";\r\n\r\ninterface IPaymentMethodsExt extends IPaymentMethods {\r\n    totalOnAccount?: string;\r\n}\r\n\r\n\r\nexport const OrderConfirmationOrderInfomation: React.FC<IOrderInformation> = ({\r\n    orderInformationProps\r\n    // receiptEmail,\r\n    // createdDate\r\n    // channelReferenceId\r\n}) => (\r\n    <Node {...orderInformationProps}>\r\n        {/* {createdDate} */}\r\n        {/* {channelReferenceId} */}\r\n        {/* {receiptEmail} */}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationSalesLine: React.FC<ISalesLine> = ({ salesLineProps, salesLine, buyAgainButton }) => (\r\n    <Node {...salesLineProps}>\r\n        {salesLine}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationGroupDelivery: React.FC<IGroupDelivery> = ({ deliveryProps, heading, count, processing, address, trackingInfo, pickupDateTimeslot }) => (\r\n    <Node {...deliveryProps}>\r\n        {heading}\r\n        {address}\r\n        {pickupDateTimeslot}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationGroup: React.FC<IGroup> = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\r\n    <Node {...groupProps}>\r\n        {delivery && <OrderConfirmationGroupDelivery {...delivery} />}\r\n        {delivery && delivery.shippingItemsToYou}\r\n        {salesLines && (\r\n            <Node {...salesLinesProps}>\r\n                {salesLines.map((salesLine: ISalesLine) => (\r\n                    <OrderConfirmationSalesLine key={salesLine.data.salesLine.LineId} {...salesLine} />\r\n                ))}\r\n            </Node>\r\n        )}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationGroups: React.FC<IGroups> = ({ groupsProps, groups }) => (\r\n    <Node {...groupsProps}>\r\n        {groups.map((group: IGroup, index: number) => (\r\n            <OrderConfirmationGroup key={index} {...group} />\r\n        ))}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationOrderSummary: React.FC<IOrderSummary> = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\r\n    <Node {...orderSummaryProps}>\r\n        {heading}\r\n        {subtotal}\r\n        {shipping}\r\n        {tax}\r\n        {totalAmount}\r\n        {earnedPoints}\r\n    </Node>\r\n);\r\n\r\nexport const OrderConfirmationPayment: React.FC<IPaymentMethodsExt> = ({ paymentMethodsProps, title, methods, totalOnAccount }) => <Node {...paymentMethodsProps}>\r\n    {title}\r\n    {totalOnAccount ? <p>On Account: {totalOnAccount}</p> : null}\r\n    {methods}\r\n</Node>;\r\n\r\nexport const OrderConfirmationHelp: React.FC<IHelp> = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\r\n    <Node {...helpProps}>\r\n        {needHelpLabel}\r\n        {helpLineNumberLabel}\r\n        {contactNumber}\r\n    </Node>\r\n);\r\n\r\nconst _renderOrderTable = (salesOrder: SalesOrder) => {\r\n\r\n  return (\r\n    <table>\r\n      <thead>\r\n      <tr>\r\n        <th>Item Id</th>\r\n        <th>Description</th>\r\n        <th>Price</th>\r\n        <th>Quantity</th>\r\n        <th>Total</th>\r\n      </tr>\r\n      </thead>\r\n      <tbody>\r\n      {salesOrder.SalesLines?.map(so => (\r\n        <tr>\r\n          <td>{so.ItemId}</td>\r\n          <td>{so.Description}</td>\r\n          <td>{so.Price}</td>\r\n          <td>{so.Quantity}</td>\r\n          <td>{so.TotalAmount}</td>\r\n        </tr>\r\n      ))}\r\n      </tbody>\r\n    </table>\r\n  )\r\n}\r\n\r\n\r\nconst OrderConfirmationView: React.FC<IOrderConfirmationViewProps> = (props) => {\r\n    const {\r\n        moduleProps,\r\n          heading,\r\n          backToShoppingLink,\r\n          alert,\r\n          loading,\r\n          orderInfomation,\r\n          orderSummary,\r\n          payment,\r\n          help,\r\n          groups,\r\n          data: { orderHydration },\r\n      context: { cultureFormatter: { formatCurrency }}\r\n    } = props;\r\n    const tenderLines = props.data.orderHydration.result?.salesOrder.TenderLines;\r\n    let totalOnAccount = 0;\r\n    if (tenderLines) {\r\n        totalOnAccount = tenderLines.map(tl => tl.AmountInCompanyCurrency || 0).reduce((num, total) => num + total, 0);\r\n    }\r\n\r\n\r\n    return (\r\n        <Module {...moduleProps}>\r\n            {heading}\r\n            {alert}\r\n            {loading}\r\n            {orderInfomation && <OrderConfirmationOrderInfomation {...orderInfomation} />}\r\n          {orderHydration?.result?.salesOrder && _renderOrderTable(orderHydration?.result?.salesOrder)}\r\n            {backToShoppingLink}\r\n            {groups && <OrderConfirmationGroups {...groups} />}\r\n            {payment && <OrderConfirmationPayment\r\n              {...payment}\r\n              totalOnAccount={totalOnAccount > 0 ? formatCurrency(totalOnAccount) : undefined}\r\n            />}\r\n            {orderSummary && <OrderConfirmationOrderSummary {...orderSummary} />}\r\n            {help && <OrderConfirmationHelp {...help} />}\r\n        </Module>\r\n    );\r\n};\r\n\r\nexport default OrderConfirmationView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBusinessPartnerPromotionViewProps } from './business-partner-promotion';\n\n/**\n * View layout of business partner promotion module.\n * @param props - React props of the component.\n * @returns Functional component.\n */\nconst businessPartnersView: React.FC<IBusinessPartnerPromotionViewProps> = props => {\n    const {\n        businessPartnerPromotionProps,\n        heading,\n        notificationMessage,\n        sellerDescriptions,\n        termsOfServiceCheckbox,\n        termsOfServiceModal,\n        submitButton\n    } = props;\n    return (\n        <Module {...businessPartnerPromotionProps}>\n            {heading}\n            {notificationMessage}\n            {sellerDescriptions}\n            {termsOfServiceCheckbox}\n            {termsOfServiceModal}\n            {submitButton}\n        </Module>\n    );\n};\n\nexport default businessPartnersView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    ICategoryHierarchyViewProps,\n    IRefineMenuViewProps,\n    ISearchResultContainerViewProps,\n    ISearchResultModalViewProps,\n    ISortByViewProps,\n    ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n    const {\n        SearchResultContainer,\n        products,\n        pagination,\n        ProductsContainer,\n        ProductSectionContainer,\n        choiceSummary,\n        isMobile,\n        modalToggle,\n        searchResultModal,\n        TitleViewProps,\n        refineMenu,\n        categoryHierarchy,\n        sortByOptions,\n        CategoryNavContainer,\n        RefineAndProductSectionContainer,\n        errorMessage,\n        FeatureSearchContainer,\n        similarLookProduct\n    } = props;\n    const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n    if (isMobile) {\n        return (\n            <Module {...SearchResultContainer}>\n                {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n                {renderTitle(TitleViewProps)}\n                {choiceSummary}\n                {modalToggle}\n                {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n                <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n                <Node {...ProductsContainer}>\n                    {errorMessage}\n                    {products}\n                </Node>\n                {pagination}\n            </Module>\n        );\n    }\n    return (\n        <Module {...SearchResultContainer}>\n            {categoryHierarchy && <Node {...CategoryNavContainer}>{renderCategoryHierarchy(categoryHierarchy)}</Node>}\n            <Node {...RefineAndProductSectionContainer}>\n                {refineMenu && renderRefiner(refineMenu)}\n                <Node {...ProductSectionContainer}>\n                    <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n                    <div className='ms-search-result-wrapper-title-choice-summary'>\n                        {TitleViewProps && renderTitle(TitleViewProps)}\n                        {choiceSummary}\n                    </div>\n                    <div className='ms-search-result-wrapper-sort-by-category'>\n                        {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n                    </div>\n                    <Node {...ProductsContainer}>\n                        {errorMessage}\n                        {products}\n                    </Node>\n                    {pagination}\n                </Node>\n            </Node>\n        </Module>\n    );\n};\n\nconst createSearchResultModal = (\n    modalProps: ISearchResultModalViewProps,\n    refineMenu: IRefineMenuViewProps,\n    sortByDropDown: ISortByViewProps,\n    isRecoSearchPage?: string\n): JSX.Element => {\n    return React.cloneElement(\n        modalProps.modal,\n        {},\n        modalProps.modalHeader,\n        createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n        modalProps.modalFooter\n    );\n};\n\nconst createModalBody = (\n    props: ISearchResultModalViewProps,\n    refineMenu: IRefineMenuViewProps,\n    sortByDropDown: ISortByViewProps,\n    isRecoSearchPage?: string\n): JSX.Element | null => {\n    if (sortByDropDown) {\n        return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n    }\n    return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n    const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n    if (refiners) {\n        return (\n            <Node {...RefinerSectionContainer}>\n                <Node {...RefineMenuContainer}>\n                    {refiners.map((submenu, index) => (\n                        <React.Fragment key={index}>{submenu}</React.Fragment>\n                    ))}\n                </Node>\n            </Node>\n        );\n    }\n    return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n    const { SortingContainer, sortByDropDown } = props;\n    if (sortByDropDown && !isRecoSearchPage) {\n        return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n    }\n    return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n    const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n    if (categoryHierarchyList) {\n        return (\n            <Node {...CategoryHierarchyContainer}>\n                {categoryHierarchyList.map((category, index) => (\n                    <React.Fragment key={index}>\n                        {category}\n                        {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n                    </React.Fragment>\n                ))}\n            </Node>\n        );\n    }\n\n    return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n    const { title, TitleContainer } = props;\n    if (title) {\n        return (\n            <Node {...TitleContainer}>\n                <h2>\n                    {title.titlePrefix}\n                    {title.titleText}({title.titleCount})\n                </h2>\n            </Node>\n        );\n    }\n    return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    IContentBlockAdditionalContentItemViewProps,\n    IContentBlockAdditionalContentViewProps,\n    IContentBlockViewProps\n} from '@msdyn365-commerce-modules/content-block';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IContentBlockAdditionalContentViewProps) => {\n    return (\n        <Node {...additionalContent.additionalContentNode}>\n            {additionalContent.additionalContentItems?.map((item: IContentBlockAdditionalContentItemViewProps) => {\n                return (\n                    <>\n                        {item.heading}\n                        <Node {...item.additionalContentItemContainer}>\n                            {item.text}\n                            <Node {...item.additionalContentItemLinks}>{item.links}</Node>\n                        </Node>\n                    </>\n                );\n            })}\n        </Node>\n    );\n};\n\n/**\n * Render View.\n * @param props - The view props.\n * @returns -The JSX Element.\n */\nconst contentBlockView: React.FC<IContentBlockViewProps> = props => {\n    const {\n        contentBlockContainer,\n        imageContainer,\n        detailsContainer,\n        title,\n        text,\n        links,\n        image,\n        contentBlockAnchorTag,\n        imageLink,\n        imageAriaLabel,\n        additionalContent\n    } = props;\n\n    // @ts-expect-error HTML element need to be clear on run time.\n    const hasImage: boolean = image.props.src;\n    const imageClass: string = hasImage ? `${detailsContainer.className} withImage` : `${detailsContainer.className} withoutImage`;\n\n    if (imageLink) {\n        return (\n            <Module {...contentBlockContainer}>\n                <Node\n                    {...contentBlockAnchorTag}\n                    href={imageLink}\n                    className={contentBlockAnchorTag ? contentBlockAnchorTag.className : ''}\n                    aria-label={imageAriaLabel}\n                >\n                    <Node {...imageContainer}>{image}</Node>\n                </Node>\n                <Node {...detailsContainer}>\n                    {title}\n                    {text}\n                    {links}\n                    {additionalContent && renderAdditionalContent(additionalContent)}\n                </Node>\n            </Module>\n        );\n    }\n    return (\n        <Module {...contentBlockContainer}>\n            <Node {...imageContainer}>{image}</Node>\n            <Node className={imageClass}>\n                {title}\n                {text}\n                {links}\n                {additionalContent && renderAdditionalContent(additionalContent)}\n            </Node>\n        </Module>\n    );\n};\n\nexport default contentBlockView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IFooterViewProps } from '@msdyn365-commerce-modules/footer';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n *\n * FooterItemView component.\n * @extends {React.PureComponent<IFooterViewProps>}\n */\nexport class FooterItemView extends React.PureComponent<IFooterViewProps> {\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 { FooterItem } = this.props;\n        return <Module {...FooterItem}>{this._renderElement(this.props)}</Module>;\n    }\n\n    private _renderElement(props: IFooterViewProps): React.ReactNode | null {\n        // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n        const { heading, HeadingContainer, Link, linkText, image, text, EditableLink } = props;\n        if (heading) {\n            return (\n                <Node {...HeadingContainer}>\n                    {' '}\n                    <Node tag='i' className='ms-footer__heading__title-icon' aria-hidden='true' />\n                    {heading}{' '}\n                </Node>\n            );\n        } else if (Link && image) {\n            return (\n                <Node {...Link}>\n                    {linkText}\n                    {image}\n                </Node>\n            );\n        } else if (Link) {\n            return EditableLink;\n        }\n        return (\n            <>\n                {text}\n                {image}\n            </>\n        );\n    }\n}\n\nexport default FooterItemView;\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 { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\n\n/**\n * INavigationMenuViewRootProps.\n */\nexport interface INavigationMenuViewRootProps {\n    navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\n}\n\n/**\n * Represent navigation menu state interface.\n */\nexport interface INavigationState {\n    parentMenu?: number;\n    activeMenu?: number;\n    categoryImage?: Msdyn365.IImageData[] | null;\n    mobileViewLabelText?: string;\n    drawerKeyValue: Msdyn365.IDictionary<boolean>;\n    isOnlyMobile: boolean;\n    isNavOpen: boolean;\n}\n\n/**\n * NavMenuConstants enum.\n */\nexport enum NavMenuConstants {\n    zero = 0,\n    one = 1,\n    two = 2,\n    three = 3,\n    four = 4,\n    escapeKey = 27,\n    rootMenu = 1\n}\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Get category image.\n * @param props - Navigation menu props.\n * @param categoryImage - Category Image.\n * @param alttext - AltText String.\n * @returns Returns Node.\n */\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\n    const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\n    const defaultImageSettings: Msdyn365.IImageSettings = {\n        viewports: {\n            xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\n            sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\n            md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\n            lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\n        },\n        lazyload: true\n    };\n    if (categoryImageUrl !== undefined) {\n        const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\n        return (\n            <Msdyn365.Image\n                requestContext={props.navProps.context.actionContext.requestContext}\n                className='ms-nav-image__item'\n                {...imageData}\n                gridSettings={props.navProps.context.request.gridSettings!}\n                imageSettings={props.navProps.config.categoryImageSettings ?? defaultImageSettings}\n                loadFailureBehavior='hide'\n                role='tabpanel'\n                altText={alttext}\n            />\n        );\n    }\n    return null;\n};\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 { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    addThrottledEvent,\n    Button,\n    Collapse,\n    Drawer,\n    getPayloadObject,\n    getTelemetryAttributes,\n    getTelemetryObject,\n    ICollapseProps,\n    IPayLoad,\n    isMobile,\n    ITelemetryContent,\n    Module,\n    Node,\n    onTelemetryClick,\n    VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\n\n/**\n *\n * NavigationMenuRootDisabled component.\n * @extends {React.PureComponent<INavigationMenuViewProps>}\n */\nexport class NavigationMenuRootDisabled extends React.PureComponent<INavigationMenuViewRootProps, INavigationState> {\n    private static isBackTrack: boolean = false;\n\n    private readonly supportedLevel: number = NavMenuConstants.four;\n\n    private currentLevel: number = NavMenuConstants.zero;\n\n    private readonly menuNode: React.RefObject<HTMLElement>;\n\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\n\n    private readonly escapeKey: number = NavMenuConstants.escapeKey;\n\n    private readonly telemetryContent: ITelemetryContent;\n\n    private readonly promotionalImage: Msdyn365.IImageData[] = [];\n\n    private readonly payLoad: IPayLoad;\n\n    private readonly attributes?: Msdyn365.IDictionary<string>;\n\n    private customResizeThrottledEventHandler?: (event: Event) => void;\n\n    public constructor(props: INavigationMenuViewRootProps) {\n        super(props);\n        this.menuNode = React.createRef();\n        this.menuItemRef = React.createRef();\n        const { menuItemData } = this.props.navProps;\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n            const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\n            const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\n            this.promotionalImage = [{ src: imagesource, altText: linkText }];\n\n            // Read category and promotional image in one array\n            if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\n                menuItemData[0].subMenu[0].promotionalContent.map(item => {\n                    const imageSource = item.image.src;\n                    this.promotionalImage.push({\n                        src: imageSource,\n                        altText: item.text,\n                        additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n                    });\n                    return null;\n                });\n            }\n        }\n\n        this.state = {\n            activeMenu: 1,\n            mobileViewLabelText: '',\n            parentMenu: undefined,\n            drawerKeyValue: {},\n            isOnlyMobile: this.isOnlyMobile,\n            categoryImage: this.promotionalImage,\n            isNavOpen: false\n        };\n        this.telemetryContent = getTelemetryObject(\n            this.props.navProps.context.request.telemetryPageName!,\n            this.props.navProps.friendlyName,\n            this.props.navProps.telemetry\n        );\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n        this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n    }\n\n    @computed public get isOnlyMobile(): boolean {\n        return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\n    }\n\n    public componentDidMount(): void {\n        this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\n        document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n        this._customUpdateViewport();\n        document.body.addEventListener('mousedown', this._handleClickOutside);\n    }\n\n    public componentDidUpdate(): void {\n        if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\n        }\n    }\n\n    public componentWillUnmount(): void {\n        window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\n        document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n    }\n\n    public render(): JSX.Element | null {\n        this.currentLevel = 1;\n        const navbarKey = 'header-nav-mobile';\n        return (\n            <Node className='nav-menu-container' ref={this.menuNode}>\n                {this.state.isOnlyMobile ? (\n                    this._renderMobileMenu()\n                ) : (\n                    <>\n                        <Button\n                            className='ms-header__nav-icon'\n                            onClick={this._toggleNavBar}\n                            aria-controls={navbarKey}\n                            title={this.props.navProps.resources.hamburgerAriaLabel}\n                            aria-label={this.props.navProps.resources.hamburgerAriaLabel}\n                            {...this.attributes}\n                        />\n                        {this._renderCollapseMenu()}\n                    </>\n                )}\n            </Node>\n        );\n    }\n\n    /**\n     * Function to handle nav bar toggle.\n     */\n    private readonly _toggleNavBar = (): void => {\n        this.setState(previousState => ({\n            activeMenu: 1,\n            isNavOpen: !previousState.isNavOpen\n        }));\n    };\n\n    private _renderCollapseMenu(): JSX.Element | null {\n        return (\n            <Collapse className='ms-header__collapsible-hamburger' isOpen={this.state.isNavOpen}>\n                {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\n            </Collapse>\n        );\n    }\n\n    private _renderMobileMenu(): JSX.Element {\n        const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\n\n        this.currentLevel = 1;\n        return (\n            <Module\n                {...Navigation}\n                className={classnames(\n                    Navigation.className,\n                    this.state.isOnlyMobile && this.state.activeMenu !== undefined ? 'child' : 'parent'\n                )}\n            >\n                <Node {...MenuList} tabIndex='-1'>\n                    {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\n                        <Node {...MobileDescriptionContainer}>\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\n                            <Node {...MobileDescriptionLabel}>{this.state.mobileViewLabelText}</Node>\n                        </Node>\n                    )}\n                    {this._renderDisplay()}\n                </Node>\n            </Module>\n        );\n    }\n\n    private _renderDesktopMenu(): JSX.Element {\n        const { MenuList, Navigation } = this.props.navProps;\n\n        return (\n            <Module {...Navigation} className={classnames(Navigation.className, 'ms-nav__disable-top-menu')}>\n                <Node {...MenuList} tabIndex='-1'>\n                    {this._renderDisplay()}\n                    <div className='ms-nav-close-button'>\n                        <button className='btn nav-menu-close' aria-label='Close' onClick={this._closeNavMenu} />\n                    </div>\n                </Node>\n            </Module>\n        );\n    }\n\n    private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\n        if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\n            return this._renderLinkMenuItem(item);\n        } else if (!item.linkURL) {\n            return this._renderSpanMenuItem(item);\n        }\n        return null;\n    }\n\n    private _renderDisplay(): JSX.Element[] {\n        const { ListItem } = this.props.navProps;\n        const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\n        const { activeMenu } = this.state;\n        const menuItemList: JSX.Element[] = [];\n\n        if (ArrayExtensions.hasElements(menuItemData)) {\n            menuItemData[0].id = 1;\n        }\n\n        if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\n            const menuItem = this._getFromSubMenu(undefined, menuItemData);\n\n            if (menuItem) {\n                menuItemList.push(\n                    <Node key={menuItem.id} {...ListItem}>\n                        {` `}\n                        {this._createMenuItemList(menuItem)} {` `}\n                    </Node>\n                );\n            }\n        } else {\n            for (const [index, item] of menuItemData.entries()) {\n                menuItemList.push(\n                    <Node\n                        key={item.id}\n                        {...ListItem}\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\n                    >\n                        {this._createMenuItemList(item)}\n                    </Node>\n                );\n            }\n        }\n\n        return menuItemList;\n    }\n\n    private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\n        if (!menu) {\n            return null;\n        }\n\n        for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\n            const item: IMenuItemData = menu[Number(index)];\n\n            if (item.id === this.state.activeMenu) {\n                if (!NavigationMenuRootDisabled.isBackTrack) {\n                    this.setState({ parentMenu: parentMenuId });\n                } else {\n                    this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\n                }\n                return item;\n            }\n            const found = this._getFromSubMenu(item.id, item.subMenu);\n            if (found) {\n                return found;\n            }\n        }\n        return null;\n    }\n\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n        if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\n            if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\n                return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\n            }\n\n            return (\n                <>\n                    {this._renderButtonMenuItem(menuItemData)}\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n                </>\n            );\n        } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\n            return this._renderLinkMenuItem(menuItemData, menuItemData.id);\n        } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\n            return this._renderSpanMenuItem(menuItemData);\n        }\n\n        return null;\n    }\n\n    private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\n        let subMenus: IMenuItemData[] | undefined = subMenuArray;\n        if (activeMenu === NavMenuConstants.rootMenu) {\n            subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\n        }\n\n        const { ListItem } = this.props.navProps;\n        const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\n            this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n            return null;\n        }\n\n        if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\n            this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n            return null;\n        }\n\n        let levelClassName: string = '';\n        const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\n            const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\n            let menuItem: JSX.Element | null;\n            if (hasOptions && this.state.isOnlyMobile) {\n                menuItem = this._renderButtonMenuItem(option, activeMenu, index);\n            } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\n                menuItem = this.getMenuItem(option, index);\n            } else {\n                menuItem = null;\n            }\n            let subMenu;\n            const isHavingSubmenu =\n                hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\n\n            if (hasOptions && !this.state.isOnlyMobile) {\n                if (this.currentLevel >= NavMenuConstants.two) {\n                    subMenu = this._renderSubMenuDrawer(option);\n                } else if (this.currentLevel <= this.supportedLevel) {\n                    this.currentLevel++;\n                    levelClassName = `level-${this.currentLevel.toString()}`;\n                    subMenu = this._renderSubMenu(option.subMenu, undefined, true);\n                }\n            }\n\n            if (isHavingSubmenu && this.state.isOnlyMobile) {\n                this.currentLevel++;\n                levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n                subMenu = this._renderSubMenu(option.subMenu, option.id, true);\n            }\n            const imagesource = option.imageSource ? option.imageSource : '';\n            return (\n                <Node\n                    {...ListItem}\n                    key={option.id}\n                    onMouseOver={this.currentLevel === NavMenuConstants.one && this._updateCategoryImage(imagesource, option)}\n                    className={classnames(ListItem.className, isHavingSubmenu && 'havesubmenu')}\n                    ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\n                >\n                    {menuItem}\n                    {subMenu}\n                </Node>\n            );\n        });\n        return this._renderMenu(levelClassName, menuOptions, isSubMenu);\n    }\n\n    private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\n        let menuItem: JSX.Element | null;\n        if (this.currentLevel === NavMenuConstants.one) {\n            menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\n        } else {\n            menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\n        }\n        return menuItem;\n    }\n\n    private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\n        const levelClassName = `level-${this.currentLevel.toString()}`;\n        const toggleButtonText = menuItem.linkText;\n        const keyValue = this.state.drawerKeyValue;\n        const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n        const keys = keyValue;\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n        let isDrawerOpen = false;\n        if (keys[menuItem.id!]) {\n            isDrawerOpen = true;\n        }\n        const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\n\n        return (\n            <Drawer\n                collapseProps={colProps}\n                key={menuItem.id}\n                className={classnames('ms-nav__drawer_desktop', levelClassName)}\n                openGlyph='ms-nav__drawer-open'\n                closeGlyph='ms-nav__drawer-close'\n                glyphPlacement='start'\n                toggleButtonText={buttonText}\n                onToggle={this._bindDesktopCategoryClick(menuItem.id, isDrawerOpen)}\n            >\n                <div>\n                    {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\n                        if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n                            this.currentLevel++;\n                            if (this.currentLevel < multiLevelSupportedMenu) {\n                                return this._renderSubMenuDrawer(menuSubItem);\n                            }\n                        }\n                        return this._renderDrawerLink(menuSubItem);\n                    })}\n                </div>\n            </Drawer>\n        );\n    }\n\n    /**\n     * Method to handle escape key event.\n     * @param menuId -Number.\n     * @param isDrawerOpen -Boolean.\n     * @returns Void.\n     */\n    private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\n        const { drawerKeyValue } = this.state;\n        const newPair = { [menuId!]: !isDrawerOpen };\n        this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n    };\n\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n        return (\n            <Node\n                key={index}\n                {...this.props.navProps.Button}\n                onClick={this._handleDropdownToggle(option, activeMenu)}\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\n                data-parent={activeMenu}\n                aria-label={this.state.isOnlyMobile ? option.ariaLabel : undefined}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n        const { Link } = this.props.navProps;\n        const linkText = option.linkText ? option.linkText : '';\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        return (\n            <Node\n                {...Link}\n                key={index}\n                href={option.linkURL}\n                {...attributes}\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\n        const { Link } = this.props.navProps;\n        const linkText = option.linkText ? option.linkText : '';\n        const imagesource = option.imageSource ? option.imageSource : '';\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        return (\n            <Node\n                {...Link}\n                key={index}\n                onMouseOver={isHoverEffect && this._updateCategoryImage(imagesource, option)}\n                href={option.linkURL}\n                {...attributes}\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n        const { Link } = this.props.navProps;\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        if (linkText && linkUrl) {\n            return (\n                <Node {...Link} href={linkUrl} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\n                    {linkText}\n                </Node>\n            );\n        }\n        return null;\n    }\n\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n        const { Span } = this.props.navProps;\n        return (\n            <Node key={index} {...Span}>\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\n        const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\n        const isCategoryImageDisplay =\n            !this.state.isOnlyMobile &&\n            showCategoryImage &&\n            this.state.categoryImage !== null &&\n            this.state.categoryImage !== undefined &&\n            !isSubmenu;\n        const isPromotionalContentDisplay =\n            !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\n        const divContainerClass =\n            this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n        this.currentLevel = NavMenuConstants.one;\n        const menuLevelSupportClassName =\n            isCategoryImageDisplay &&\n            this.props.navProps.config.menuLevelSupport &&\n            this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\n            'navmenu-multi-level';\n\n        const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\n        const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\n        return (\n            <Node {...DivContainer} className={divContainerClass}>\n                <Node\n                    {...MenuList}\n                    className={classnames(MenuList.className, level, isCategoryImageDisplay && 'havecateImage', menuLevelSupportClassName)}\n                >\n                    {menuOptions}\n                </Node>\n                <div className='category-image-container' key={imagesContainerKey}>\n                    {isCategoryImageDisplay &&\n                        ArrayExtensions.hasElements(categoryImages) &&\n                        categoryImages.map(item => (\n                            <Node {...ImageDivContainer} className={ImageDivContainer!.className} key={item.src}>\n                                {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\n                                {isPromotionalContentDisplay &&\n                                    this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n                            </Node>\n                        ))}\n                </div>\n            </Node>\n        );\n    }\n\n    /**\n     * Handle Category image update.\n     * @param categoryImageSource - Image source.\n     * @param option - Menu Item data.\n     * @returns Returns empty.\n     */\n    private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\n        const linkText = option.linkText ? option.linkText : '';\n        const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\n\n        // Read category and promotional image in one array\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\n            for (const item of option.promotionalContent) {\n                const imageSource = item.image.src;\n                promotionalImage.push({\n                    src: imageSource,\n                    altText: item.text,\n                    additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n                });\n            }\n        }\n        this.setState({\n            categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\n        });\n    };\n\n    /**\n     * Handle dropdown toggle.\n     * @param data - Menu Item data.\n     * @param parentId - Number.\n     * @returns Returns empty.\n     */\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n        if (!this.state.isOnlyMobile) {\n            this.setState({\n                activeMenu: data.id,\n                parentMenu: parentId\n            });\n            if (this.props.navProps.showCategoryImage) {\n                this._updateCategoryImage(data.imageSource!, data)();\n            }\n        } else {\n            NavigationMenuRootDisabled.isBackTrack = false;\n            this.setState({\n                activeMenu: data.id,\n                mobileViewLabelText: data.linkText!,\n                parentMenu: parentId\n            });\n        }\n    };\n\n    /**\n     * Handle back navigation for menu items for mobile view.\n     * @returns Returns empty.\n     */\n    private readonly _handleGoBack = () => () => {\n        NavigationMenuRootDisabled.isBackTrack = true;\n        this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\n    };\n\n    /**\n     * Function to close the nav menu on click on body.\n     * @param event - MouseEvent.\n     */\n    private readonly _handleClickOutside = (event: MouseEvent) => {\n        if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n            if (!this.state.isOnlyMobile) {\n                this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n            } else {\n                this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n            }\n        }\n    };\n\n    /**\n     * Checks to assign a ref for focus.\n     * @param index -Sub menu list index.\n     * @param mobileViewLabelText -Mobile view label text.\n     * @param optionLinkText -Sub menu item link text.\n     * @returns Boolean.\n     */\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n        const firstIndex: number = 0;\n        if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\n            return true;\n        }\n        if (!optionLinkText || !mobileViewLabelText) {\n            return false;\n        }\n        return mobileViewLabelText === optionLinkText;\n    };\n\n    /**\n     * Function to handle nav menu close.\n     */\n    private readonly _closeNavMenu = (): void => {\n        if (!this.state.isOnlyMobile) {\n            this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n        } else {\n            this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n        }\n        (this.menuNode.current?.children[0] as HTMLElement).focus();\n    };\n\n    /**\n     * Function to close the nav menu on esc key.\n     * @param event - Event.\n     */\n    private readonly _escFunction = (event: React.KeyboardEvent) => {\n        if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\n            this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n            (this.menuNode.current?.children[0] as HTMLElement).focus();\n        }\n    };\n\n    /**\n     * Custom update viewport.\n     */\n    private readonly _customUpdateViewport = (): void => {\n        this.setState({ isOnlyMobile: this.isOnlyMobile });\n    };\n}\n\nexport default NavigationMenuRootDisabled;\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 { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    addThrottledEvent,\n    Button,\n    Collapse,\n    Drawer,\n    getPayloadObject,\n    getTelemetryAttributes,\n    getTelemetryObject,\n    ICollapseProps,\n    IPayLoad,\n    isMobile,\n    ITelemetryContent,\n    Module,\n    Node,\n    onTelemetryClick,\n    VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\n\n/**\n *\n * NavigationMenuRootEnabled component.\n * @extends {React.PureComponent<IINavigationMenuViewProps>}\n */\nexport class NavigationMenuRootEnabled extends React.PureComponent<INavigationMenuViewRootProps, INavigationState> {\n    private static isBackTrack: boolean = false;\n\n    private readonly supportedLevel: number = NavMenuConstants.four;\n\n    private currentLevel: number = NavMenuConstants.zero;\n\n    private readonly menuNode: React.RefObject<HTMLElement>;\n\n    private readonly menuItemRef: React.RefObject<HTMLElement>;\n\n    private readonly escapeKey: number = NavMenuConstants.escapeKey;\n\n    private readonly telemetryContent: ITelemetryContent;\n\n    private readonly promotionalImage: Msdyn365.IImageData[] = [];\n\n    private menuItemData: IMenuItemData[] = [];\n\n    private readonly payLoad: IPayLoad;\n\n    private readonly attributes?: Msdyn365.IDictionary<string>;\n\n    private customResizeThrottledEventHandler?: (event: Event) => void;\n\n    public constructor(props: INavigationMenuViewRootProps) {\n        super(props);\n        this.menuNode = React.createRef();\n        this.menuItemRef = React.createRef();\n        const { menuItemData } = this.props.navProps;\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n            const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\n            const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\n            this.promotionalImage = [{ src: imagesource, altText: linkText }];\n\n            // Read category and promotional image in one array\n            if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\n                menuItemData[0].subMenu[0].promotionalContent.map(item => {\n                    const imageSource = item.image.src;\n                    this.promotionalImage.push({\n                        src: imageSource,\n                        altText: item.text,\n                        additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n                    });\n                    return null;\n                });\n            }\n        }\n        this.state = {\n            activeMenu: NavMenuConstants.rootMenu,\n            mobileViewLabelText: '',\n            parentMenu: undefined,\n            drawerKeyValue: {},\n            isOnlyMobile: this.isOnlyMobile,\n            categoryImage: this.promotionalImage,\n            isNavOpen: false\n        };\n\n        this.telemetryContent = getTelemetryObject(\n            this.props.navProps.context.request.telemetryPageName!,\n            this.props.navProps.friendlyName,\n            this.props.navProps.telemetry\n        );\n        this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n        this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n    }\n\n    @computed public get isOnlyMobile(): boolean {\n        return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\n    }\n\n    public componentDidMount(): void {\n        this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\n        document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n        this._customUpdateViewport();\n        document.body.addEventListener('mousedown', this._handleClickOutside);\n        this._addShopAllLink();\n    }\n\n    public componentDidUpdate(): void {\n        if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\n            (this.menuItemRef.current.children[0] as HTMLElement).focus();\n        }\n    }\n\n    public componentWillUnmount(): void {\n        window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\n        document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n    }\n\n    public render(): JSX.Element | null {\n        this.currentLevel = NavMenuConstants.one;\n        const navbarKey = 'header-nav-mobile';\n        return (\n            <Node className='nav-menu-container' ref={this.menuNode}>\n                {this.state.isOnlyMobile ? (\n                    this._renderMobileMenu()\n                ) : (\n                    <>\n                        <Button\n                            className='ms-header__nav-icon'\n                            onClick={this._toggleNavBar}\n                            aria-controls={navbarKey}\n                            title={this.props.navProps.resources.hamburgerAriaLabel}\n                            aria-label={this.props.navProps.resources.hamburgerAriaLabel}\n                            {...this.attributes}\n                        />\n                        {this._renderCollapseMenu()}\n                    </>\n                )}\n            </Node>\n        );\n    }\n\n    /**\n     * Function to handle nav bar toggle.\n     */\n    private readonly _toggleNavBar = (): void => {\n        this.setState(previousState => ({\n            activeMenu: NavMenuConstants.rootMenu,\n            isNavOpen: !previousState.isNavOpen\n        }));\n    };\n\n    private _renderCollapseMenu(): JSX.Element | null {\n        return (\n            <Collapse className='ms-header__collapsible-hamburger' isOpen={this.state.isNavOpen}>\n                {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\n            </Collapse>\n        );\n    }\n\n    private _renderMobileMenu(): JSX.Element {\n        const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\n\n        this.currentLevel = NavMenuConstants.one;\n        return (\n            <Module\n                {...Navigation}\n                className={classnames(\n                    Navigation.className,\n                    this.state.isOnlyMobile && this.state.activeMenu !== undefined ? 'child' : 'parent'\n                )}\n            >\n                <Node {...this.props.navProps.MenuList} tabIndex='-1'>\n                    {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\n                        <Node {...MobileDescriptionContainer}>\n                            <Node {...MobileBackButton} onClick={this._handleGoBack()} />\n                            <Node {...MobileDescriptionLabel}>{this.state.mobileViewLabelText}</Node>\n                        </Node>\n                    )}\n                    {this._renderDisplay()}\n                </Node>\n            </Module>\n        );\n    }\n\n    private _renderDesktopMenu(): JSX.Element {\n        const { Navigation } = this.props.navProps;\n        return (\n            <Module {...Navigation} className={classnames(Navigation.className)}>\n                <Node {...this.props.navProps.MenuList} tabIndex='-1'>\n                    {this._renderDisplay()}\n                    <div className='ms-nav-close-button'>\n                        <button className='btn nav-menu-close' aria-label='Close' onClick={this._closeNavMenu} />\n                    </div>\n                </Node>\n            </Module>\n        );\n    }\n\n    private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\n        if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\n            return this._renderLinkMenuItem(item);\n        } else if (!item.linkURL) {\n            return this._renderSpanMenuItem(item);\n        }\n        return null;\n    }\n\n    private _renderDisplay(): JSX.Element[] {\n        const { ListItem } = this.props.navProps;\n        let menuItemData: IMenuItemData[] = [];\n        if (this.state.isOnlyMobile) {\n            menuItemData = this.menuItemData;\n        } else {\n            menuItemData = this.props.navProps.menuItemData;\n        }\n        const { activeMenu } = this.state;\n        const menuItemList: JSX.Element[] = [];\n        let cmsMenuData: IMenuItemData[] | undefined = [];\n        let retailMenuItemData: IMenuItemData[] | undefined = [];\n        const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\n\n        for (const item of retailMenuData) {\n            retailMenuItemData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\n            item.subMenu = retailMenuItemData;\n        }\n\n        for (const item of menuItemData) {\n            cmsMenuData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail);\n        }\n\n        if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\n            let menuItem: IMenuItemData | null = {};\n            for (const menuItemDatum of menuItemData) {\n                if (menuItemDatum.id === activeMenu) {\n                    menuItem = menuItemDatum;\n                    if (!NavigationMenuRootEnabled.isBackTrack) {\n                        this.setState({\n                            parentMenu: undefined\n                        });\n                    } else {\n                        this.setState({\n                            parentMenu: undefined,\n                            mobileViewLabelText: menuItemDatum.linkText\n                        });\n                    }\n                    break;\n                }\n                menuItem = this._getFromSubMenu(menuItemDatum);\n                if (menuItem && menuItem.id === activeMenu) {\n                    break;\n                }\n            }\n\n            if (menuItem) {\n                menuItemList.push(\n                    <Node key={menuItem.id} {...ListItem}>\n                        {` `}\n                        {this._createMenuItemList(menuItem)} {` `}\n                    </Node>\n                );\n            }\n        } else {\n            for (const [index, item] of retailMenuData.entries()) {\n                menuItemList.push(\n                    <Node\n                        key={item.id}\n                        {...ListItem}\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\n                    >\n                        {this._createMenuItemList(item)}\n                    </Node>\n                );\n            }\n\n            for (const [index, item] of cmsMenuData.entries()) {\n                menuItemList.push(\n                    <Node\n                        key={item.id}\n                        {...ListItem}\n                        ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, item.linkText) ? this.menuItemRef : null}\n                    >\n                        {this._createMenuItemList(item)}\n                    </Node>\n                );\n            }\n        }\n\n        return menuItemList;\n    }\n\n    private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n        const subMenus = item?.subMenu;\n        if (subMenus && ArrayExtensions.hasElements(subMenus)) {\n            for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\n                const subMenu: IMenuItemData = subMenus[Number(index)];\n                let parentMenuId = item?.id;\n\n                if (subMenu.id === this.state.activeMenu) {\n                    if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\n                        parentMenuId = undefined;\n                    }\n\n                    if (!NavigationMenuRootEnabled.isBackTrack) {\n                        this.setState({ parentMenu: parentMenuId });\n                    } else {\n                        this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\n                    }\n                    return subMenu;\n                }\n                const found = this._getFromSubMenu(subMenu);\n                if (found) {\n                    return found;\n                }\n            }\n        }\n        return null;\n    }\n\n    private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n        if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\n            if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\n                return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\n            }\n            return (\n                <>\n                    {this._renderButtonMenuItem(menuItemData)}\n                    {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n                </>\n            );\n        } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\n            return this._renderLinkMenuItem(menuItemData, menuItemData.id);\n        } else if (!menuItemData.linkURL) {\n            return this._renderSpanMenuItem(menuItemData);\n        }\n\n        return null;\n    }\n\n    private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\n        let subMenus: IMenuItemData[] | undefined = subMenuArray;\n        if (activeMenu === NavMenuConstants.rootMenu) {\n            subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\n        }\n\n        const { ListItem } = this.props.navProps;\n        const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n        if (activeMenu && this.state.activeMenu !== activeMenu) {\n            this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n            return null;\n        }\n\n        if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\n            this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n            return null;\n        }\n\n        let levelClassName: string = '';\n        const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\n            const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\n            let menuItem: JSX.Element | null;\n            if (hasOptions && this.state.isOnlyMobile) {\n                menuItem = this._renderButtonMenuItem(option, activeMenu, index);\n            } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\n                menuItem = this.getMenuItem(option, index);\n            } else {\n                menuItem = null;\n            }\n            let subMenu;\n            const isHavingSubmenu =\n                hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\n\n            if (hasOptions && !this.state.isOnlyMobile) {\n                if (this.currentLevel >= NavMenuConstants.two) {\n                    subMenu = this._renderSubMenuDrawer(option);\n                } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\n                    this.currentLevel++;\n                    levelClassName = `level-${this.currentLevel.toString()}`;\n                    subMenu = this._renderSubMenu(option.subMenu, undefined, true);\n                }\n            }\n            if (isHavingSubmenu && this.state.isOnlyMobile) {\n                this.currentLevel++;\n                levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n                subMenu = this._renderSubMenu(option.subMenu, option.id, true);\n            }\n            const imagesource = option.imageSource ? option.imageSource : '';\n            return (\n                <Node\n                    {...ListItem}\n                    key={option.id}\n                    onMouseOver={this.currentLevel === NavMenuConstants.one && this._updateCategoryImage(imagesource, option)}\n                    className={classnames(ListItem.className, isHavingSubmenu && 'havesubmenu')}\n                    ref={this._shouldAddFocusMenuRef(index, this.state.mobileViewLabelText, option.linkText) ? this.menuItemRef : null}\n                >\n                    {menuItem}\n                    {subMenu}\n                </Node>\n            );\n        });\n        return this._renderMenu(levelClassName, menuOptions, isSubMenu);\n    }\n\n    private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\n        let menuItem: JSX.Element | null;\n        if (this.currentLevel === NavMenuConstants.one) {\n            menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\n        } else {\n            menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\n        }\n        return menuItem;\n    }\n\n    private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\n        const levelClassName = `level-${this.currentLevel.toString()}`;\n        const toggleButtonText = menuItem.linkText;\n        const keyValue = this.state.drawerKeyValue;\n        const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n        const keys = keyValue;\n        const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n        let isDrawerOpen = false;\n        if (keys[menuItem.id!]) {\n            isDrawerOpen = true;\n        }\n        const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\n        return (\n            <Drawer\n                collapseProps={colProps}\n                key={menuItem.id}\n                className={classnames('ms-nav__drawer_desktop', levelClassName)}\n                openGlyph='ms-nav__drawer-open'\n                closeGlyph='ms-nav__drawer-close'\n                glyphPlacement='start'\n                toggleButtonText={buttonText}\n                onToggle={this._bindDesktopCategoryClick(menuItem.id, isDrawerOpen)}\n            >\n                <div>\n                    {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\n                        if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n                            this.currentLevel++;\n                            if (this.currentLevel < multiLevelSupportedMenu) {\n                                return this._renderSubMenuDrawer(menuSubItem);\n                            }\n                        }\n                        return this._renderDrawerLink(menuSubItem);\n                    })}\n                </div>\n            </Drawer>\n        );\n    }\n\n    /**\n     * Method to handle escape key event.\n     * @param menuId -Number.\n     * @param isDrawerOpen -Boolean.\n     * @returns Void.\n     */\n    private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\n        const { drawerKeyValue } = this.state;\n        const newPair = { [menuId!]: !isDrawerOpen };\n        this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n    };\n\n    private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n        return (\n            <Node\n                key={index}\n                {...this.props.navProps.Button}\n                onClick={this._handleDropdownToggle(option, activeMenu)}\n                aria-haspopup={!(this.state.activeMenu && this.state.activeMenu === option.id)}\n                aria-expanded={!!(this.state.activeMenu && this.state.activeMenu === option.id)}\n                data-parent={activeMenu}\n                aria-label={this.state.isOnlyMobile ? option.ariaLabel : undefined}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n        const { Link } = this.props.navProps;\n        const linkText = option.linkText ? option.linkText : '';\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        return (\n            <Node\n                {...Link}\n                key={index}\n                href={option.linkURL}\n                {...attributes}\n                target={option.shouldOpenNewTab ? '_blank' : undefined}\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\n        const { Link } = this.props.navProps;\n        const linkText = option.linkText ? option.linkText : '';\n        const imagesource = option.imageSource ? option.imageSource : '';\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        return (\n            <Node\n                {...Link}\n                key={index}\n                onMouseOver={isHoverEffect && this._updateCategoryImage(imagesource, option)}\n                href={option.linkURL}\n                {...attributes}\n                onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}\n            >\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n        const { Link } = this.props.navProps;\n        this.payLoad.contentAction.etext = linkText;\n        const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n        if (linkText && linkUrl) {\n            return (\n                <Node {...Link} href={linkUrl} {...attributes} onClick={onTelemetryClick(this.telemetryContent, this.payLoad, linkText)}>\n                    {linkText}\n                </Node>\n            );\n        }\n        return null;\n    }\n\n    private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n        const { Span } = this.props.navProps;\n        return (\n            <Node key={index} {...Span}>\n                {option.linkText}\n            </Node>\n        );\n    }\n\n    private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\n        const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\n        const isCategoryImageDisplay =\n            !this.state.isOnlyMobile &&\n            showCategoryImage &&\n            this.state.categoryImage !== null &&\n            this.state.categoryImage !== undefined &&\n            !isSubmenu;\n        const isPromotionalContentDisplay =\n            !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\n        const divContainerClass =\n            this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n        this.currentLevel = NavMenuConstants.one;\n        const menuLevelSupportClassName =\n            isCategoryImageDisplay &&\n            this.props.navProps.config.menuLevelSupport &&\n            this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\n            'navmenu-multi-level';\n\n        const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\n        const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\n        return (\n            <Node {...DivContainer} className={divContainerClass}>\n                <Node\n                    {...this.props.navProps.MenuList}\n                    className={classnames(\n                        this.props.navProps.MenuList.className,\n                        level,\n                        isCategoryImageDisplay && 'havecateImage',\n                        menuLevelSupportClassName\n                    )}\n                >\n                    {menuOptions}\n                </Node>\n                <div className='category-image-container' key={imagesContainerKey}>\n                    {isCategoryImageDisplay &&\n                        ArrayExtensions.hasElements(categoryImages) &&\n                        categoryImages.map(item => (\n                            <Node {...ImageDivContainer} className={ImageDivContainer!.className} key={item.src}>\n                                {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\n                                {isPromotionalContentDisplay &&\n                                    this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n                            </Node>\n                        ))}\n                </div>\n            </Node>\n        );\n    }\n\n    /**\n     * Handle Category image update.\n     * @param categoryImageSource - Image source.\n     * @param option - Menu Item data.\n     * @returns Returns empty.\n     */\n    private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\n        const linkText = option.linkText ? option.linkText : '';\n        const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\n\n        // Read category and promotional image in one array\n        if (ArrayExtensions.hasElements(option.promotionalContent)) {\n            for (const item of option.promotionalContent) {\n                const imageSource = item.image.src;\n                promotionalImage.push({\n                    src: imageSource,\n                    altText: item.text,\n                    additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n                });\n            }\n        }\n        this.setState({\n            categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\n        });\n    };\n\n    /**\n     * Handle dropdown toggle.\n     * @param data - Menu Item data.\n     * @param parentId - Number.\n     * @returns Returns empty.\n     */\n    private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n        if (!this.state.isOnlyMobile) {\n            this.setState({\n                activeMenu: data.id,\n                parentMenu: parentId\n            });\n            if (this.props.navProps.showCategoryImage) {\n                this._updateCategoryImage(data.imageSource!, data)();\n            }\n        } else {\n            NavigationMenuRootEnabled.isBackTrack = false;\n            this.setState({\n                activeMenu: data.id,\n                mobileViewLabelText: data.linkText!,\n                parentMenu: parentId\n            });\n        }\n    };\n\n    /**\n     * Handle back navigation for menu items for mobile view.\n     * @returns Returns empty.\n     */\n    private readonly _handleGoBack = () => () => {\n        NavigationMenuRootEnabled.isBackTrack = true;\n        this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\n    };\n\n    /**\n     * Function to close the nav menu on click on body.\n     * @param event - MouseEvent.\n     */\n    private readonly _handleClickOutside = (event: MouseEvent) => {\n        if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n            if (!this.state.isOnlyMobile) {\n                this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n            } else {\n                this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n            }\n        }\n    };\n\n    /**\n     * Add shop all link for Mobile submenu.\n     */\n    private readonly _addShopAllLink = (): void => {\n        const { menuItemData } = this.props.navProps;\n        this.menuItemData = menuItemData;\n        if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n            this.menuItemData[0].subMenu?.map(item => {\n                const shopAllObject = {};\n                Object.assign(shopAllObject, { imageSource: item.imageSource });\n                Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\n                Object.assign(shopAllObject, { linkURL: item.linkURL });\n                if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\n                    item.subMenu.unshift(shopAllObject);\n                }\n                return item;\n            });\n        }\n    };\n\n    /**\n     * Checks to assign a ref for focus.\n     * @param index -Sub menu list index.\n     * @param mobileViewLabelText -Mobile view label text.\n     * @param optionLinkText -Sub menu item link text.\n     * @returns Boolean.\n     */\n    private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n        const firstIndex: number = 0;\n        if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\n            return true;\n        }\n        if (!optionLinkText || !mobileViewLabelText) {\n            return false;\n        }\n        return mobileViewLabelText === optionLinkText;\n    };\n\n    /**\n     * Function to handle nav menu close.\n     */\n    private readonly _closeNavMenu = (): void => {\n        if (!this.state.isOnlyMobile) {\n            this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n        } else {\n            this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n        }\n    };\n\n    /**\n     * Function to close the nav menu on esc key.\n     * @param event - Event.\n     */\n    private readonly _escFunction = (event: React.KeyboardEvent) => {\n        if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\n            this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n        }\n    };\n\n    /**\n     * Custom update viewport.\n     */\n    private readonly _customUpdateViewport = (): void => {\n        this.setState({ isOnlyMobile: this.isOnlyMobile });\n    };\n}\n\nexport default NavigationMenuRootEnabled;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport * as React from 'react';\n\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\n\n/**\n * Render the Navigation menu.\n * @param props - The navigation menu view props.\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\n */\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\n    if (props.config.enabletopMenu) {\n        return <NavigationMenuRootEnabled navProps={props} />;\n    }\n\n    return <NavigationMenuRootDisabled navProps={props} />;\n};\n\nexport default navigationMenuView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Coupon } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n    Button,\n    format,\n    getPayloadObject,\n    getTelemetryAttributes,\n    IPayLoad,\n    ITelemetryContent,\n    TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * IPromoCodeProps: Interface for promo code component.\n */\nexport interface IPromoCodeProps extends IComponentProps<{}> {\n    cart: ICartState | undefined;\n    promoCodeHeadingText: string;\n    appliedPromoCodeHeadingText: string;\n    removePromoAriaLabelFormat: string;\n    promoPlaceholderText: string;\n    promoCodeApplyButtonText: string;\n    collapseTimeOut: number;\n    removePromoText: string;\n    invalidPromoCodeErrorText: string;\n    failedToAddPromoCodeErrorText: string;\n    duplicatePromoCodeErrorText: string;\n    failedToRemovePromoCodeErrorText: string;\n\n    /**\n     * The telemetry content.\n     */\n    telemetryContent?: ITelemetryContent;\n    promoCodeApplyCallback?(): void;\n}\n\n/**\n * IPromoCodeProps: Interface for promo code component.\n */\nexport interface IPromoCodeComponent extends IComponent<IPromoCodeProps> {}\n\n/**\n * IPromoCodeProps: Interface for promo code state.\n */\ninterface IPromoCodeState {\n    promoCodeInputValue: string;\n    error: string;\n    canApply: boolean;\n}\n\n/**\n *\n * The PromoCode component renders the promocode section.\n * @extends {React.PureComponent<IRefineSubmenuProps>}\n */\nclass PromoCode extends React.PureComponent<IPromoCodeProps, IPromoCodeState> {\n    private readonly payLoad: IPayLoad;\n\n    public constructor(props: IPromoCodeProps) {\n        super(props);\n        this.payLoad = getPayloadObject('click', this.props.telemetryContent!, TelemetryConstant.ApplyPromoCode);\n        this.state = {\n            promoCodeInputValue: '',\n            error: '',\n            canApply: false\n        };\n    }\n\n    public render(): JSX.Element {\n        return (\n            <div>\n                <div className='msc-promo-code-heading'>{this.props.promoCodeHeadingText}</div>\n                {this._renderForm(this.props.promoPlaceholderText, this.props.promoCodeApplyButtonText, this.props.cart)}\n                <p className={this.state.error ? 'msc-alert-danger' : ''} aria-live='assertive'>\n                    {this.state.error}\n                </p>\n                {this._renderAppliedPromoCode(this.props)}\n            </div>\n        );\n    }\n\n    /**\n     * On input change method.\n     * @param event - Change event.\n     */\n    private readonly _onInputChangeHandler = (event: React.ChangeEvent<HTMLInputElement>) => {\n        const error = event.target.value === '' ? '' : this.state.error;\n        this.setState({\n            promoCodeInputValue: event.target.value.trim(),\n            error,\n            canApply: !!event.target.value\n        });\n    };\n\n    /**\n     * Apply promo code method.\n     * @param cartState - Cart state interface.\n     */\n    private readonly _applyPromotion = (cartState: ICartState | undefined) => {\n        if (!cartState) {\n            return;\n        }\n        const appliedPromo = this.state.promoCodeInputValue;\n\n        cartState\n            .addPromoCode({ promoCode: appliedPromo })\n            .then(result => {\n                if (result.status === 'SUCCESS') {\n                    // Show success text\n                    this.setState({ promoCodeInputValue: '', error: '', canApply: false });\n                } else if (result.substatus === 'ALREADYADDED') {\n                    this.setState({ error: this.props.duplicatePromoCodeErrorText });\n                } else {\n                    this.setState({ error: this.props.invalidPromoCodeErrorText });\n                }\n            })\n            .catch(() => {\n                this.setState({ error: this.props.failedToAddPromoCodeErrorText });\n            });\n    };\n\n    /**\n     * On submit action.\n     * @param cartState - Cart state.\n     * @returns Apply promotion.\n     */\n    private readonly _onSubmitHandler = (cartState: ICartState | undefined) => (event: React.FormEvent<HTMLFormElement>) => {\n        event.preventDefault();\n        this._applyPromotion(cartState);\n    };\n\n    /**\n     * On apply promotion.\n     * @param cartState - Cart state.\n     * @returns Apply promotion.\n     */\n    private readonly applyPromotionHandler = (cartState: ICartState | undefined) => () => {\n        this._applyPromotion(cartState);\n    };\n\n    /**\n     * Renders promo code form.\n     * @param promoPlaceholderText - Promo code input box placeholder string.\n     * @param promoCodeApplyButtonText - Promo code button text string.\n     * @param cartState - Cart state interface.\n     * @returns Promo code form.\n     */\n    private readonly _renderForm = (promoPlaceholderText: string, promoCodeApplyButtonText: string, cartState: ICartState | undefined) => {\n        const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n        return (\n            <form onSubmit={this._onSubmitHandler(cartState)} className='msc-promo-code__form-container'>\n                <div className='msc-promo-code__group'>\n                    <input\n                        className='msc-promo-code__input-box'\n                        onChange={this._onInputChangeHandler}\n                        value={this.state.promoCodeInputValue}\n                        placeholder={promoPlaceholderText}\n                    />\n                    <Button\n                        title={promoCodeApplyButtonText}\n                        className='msc-promo-code__apply-btn btn'\n                        onClick={this.applyPromotionHandler(cartState)}\n                        disabled={!this.state.canApply}\n                        {...attributes}\n                    />\n                </div>\n            </form>\n        );\n    };\n\n    /**\n     * Remove promo code method.\n     * @param cartState - Cart state interface.\n     * @param event - Mouse event.\n     */\n    private readonly _removePromotion = (cartState: ICartState | undefined, event: React.MouseEvent) => {\n        if (!cartState) {\n            return;\n        }\n        const code = event.currentTarget.getAttribute('data-value') ?? '';\n        cartState\n            .removePromoCodes({\n                promoCodes: [code]\n            })\n            .then(result => {\n                if (result.status === 'SUCCESS') {\n                    this.setState({ error: '' });\n                }\n            })\n            .catch(() => {\n                this.setState({ error: this.props.failedToRemovePromoCodeErrorText });\n            });\n    };\n\n    /**\n     * Renders applied promo code form.\n     * @param props - Promo code component props.\n     * @returns Applied promo code.\n     */\n    private readonly _renderAppliedPromoCode = (props: IPromoCodeProps) => {\n        if (!props.cart || !props.cart.cart.Coupons || !ArrayExtensions.hasElements(props.cart.cart.Coupons)) {\n            return;\n        }\n\n        /**\n         * On remove promotion action.\n         * @param event - Mouse event.\n         */\n        const removePromotionHandler = (event: React.MouseEvent<HTMLElement>) => {\n            this._removePromotion(props.cart, event);\n        };\n\n        return (\n            <>\n                {props.cart.cart.Coupons.map((coupon: Coupon) => {\n                    const ariaLabel = props.removePromoAriaLabelFormat\n                        ? format(props.removePromoAriaLabelFormat, props.removePromoText, coupon.Code)\n                        : '';\n\n                    return (\n                        <div key={coupon.Code} className='msc-promo-code__line-container'>\n                            <div className='msc-promo-code__line-value'>\n                                {'Code '}\n                                <span className='msc-promo-code__line-value-code'>{coupon.Code}</span>\n                                {'Applied '}\n                            </div>\n                            <Button\n                                title={props.removePromoText}\n                                className='msc-promo-code__line__btn-remove'\n                                onClick={removePromotionHandler}\n                                data-value={coupon.Code}\n                                aria-label={ariaLabel}\n                            />\n                        </div>\n                    );\n                })}\n            </>\n        );\n    };\n}\n\nexport default PromoCode;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountCustomerBalanceTileInfo {\n    label?: string;\n    value?: string;\n    verbagePrefix?: string;\n    verbagePostfix?: string;\n    className?: string;\n    error?: string;\n}\n\nexport const ErrorComponent: React.FC<IAccountCustomerBalanceTileInfo> = ({ error }) => (\n    <span className='ms-account-customer-balance-tile__error'>{error}</span>\n);\n\nexport const CreditComponent: React.FC<IAccountCustomerBalanceTileInfo> = ({ verbagePrefix, verbagePostfix, value, className }) => {\n    return (\n        <div className={className}>\n            {verbagePrefix}\n            <span className='ms-account-customer-balance-tile__value'>{value}</span>\n            {verbagePostfix}\n        </div>\n    );\n};\n\nexport const InfoComponent: React.FC<IAccountCustomerBalanceTileInfo> = ({ label, value, className }) => (\n    <div className={className}>\n        <span className='ms-account-customer-balance-tile__label'>{label}</span>\n        <span className='ms-account-customer-balance-tile__value'>{value}</span>\n    </div>\n);\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 } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface ILinksData {\n    linkText?: string;\n    linkUrl: Msdyn365.ILinkData;\n    ariaLabel?: string;\n    openInNewTab?: boolean;\n}\n\nexport interface IAccountCustomerBalanceTileLinks {\n    links: ILinksData[];\n    requestContext: Msdyn365.IRequestContext;\n\n    /**\n     * The telemetry content\n     */\n    telemetryContent?: ITelemetryContent;\n    onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountCustomerBalanceTileLinks: React.FC<IAccountCustomerBalanceTileLinks> = ({\n    links,\n    telemetryContent,\n    onTextChange,\n    requestContext\n}) => {\n    if (links.length === 0) {\n        return null;\n    }\n    const editableLinks = _mapEditableLinks(links, telemetryContent);\n    return (\n        <div className='ms-account-customer-balance-tile__links'>\n            {editableLinks && editableLinks.length > 0 ? (\n                <Msdyn365.Links links={editableLinks} editProps={{ onTextChange, requestContext }} />\n            ) : null}\n        </div>\n    );\n};\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n    if (!linkdata || linkdata.length === 0) {\n        return null;\n    }\n    const editableLinks: Msdyn365.ILinksData[] = [];\n    const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n    linkdata.forEach((link, index) => {\n        payLoad.contentAction.etext = link.linkText;\n        const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n        const editableLink: Msdyn365.ILinksData = {\n            ariaLabel: link.ariaLabel,\n            className: 'ms-account-customer-balance-tile__link',\n            linkText: link.linkText,\n            linkUrl: link.linkUrl.destinationUrl,\n            openInNewTab: link.openInNewTab,\n            role: 'link',\n            additionalProperties: attributes\n        };\n        editableLinks.push(editableLink);\n    });\n\n    return editableLinks;\n};\n\nexport default AccountCustomerBalanceTileLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInButton {\n    id?: string;\n    className: string;\n    text: string;\n    ariaLabel: string;\n    disabled?: boolean;\n    telemetryContent?: ITelemetryContent;\n    onClick?(event: React.MouseEvent<HTMLElement>): void;\n}\n\nconst SignInButton: React.FC<ISignInButton> = ({ id, className, text, ariaLabel, telemetryContent, disabled, onClick }) => {\n    const payLoad = getPayloadObject('click', telemetryContent!, text);\n    const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n    return (\n        <Button id={id} className={className} aria-label={ariaLabel} disabled={disabled} onClick={onClick} {...attributes}>\n            {text}\n        </Button>\n    );\n};\n\nexport default SignInButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInDescription {\n    className: string;\n    description: string;\n}\n\nconst SignInDescription: React.FC<ISignInDescription> = ({ className, description }) => <p className={className}>{description}</p>;\n\nexport default SignInDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface ISignInErrorProps {\n    id?: string;\n    className: string;\n    type?: string;\n    message?: string;\n}\n\nconst SignInError: React.FC<ISignInErrorProps> = ({ id, className, type = 'page', message }) => {\n    const errorClassName = `${className}__${type}-error`;\n\n    return (\n        <div id={id} className={classnames(errorClassName, 'error', `${type}Level`)} role='alert' aria-live='assertive' aria-hidden='true'>\n            <p className={`${errorClassName}-text`}>{message}</p>\n        </div>\n    );\n};\n\nexport default SignInError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInInputProps {\n    id?: string;\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    type: any;\n    value?: string;\n    pattern?: string;\n    className: string;\n    maxLength?: string;\n    ariaLabel?: string;\n    onChange?(event: React.ChangeEvent<HTMLInputElement>): void;\n}\n\nexport interface ISignInInput {\n    key: string;\n    AddressItem: INodeProps;\n    label: React.ReactNode;\n    alert: React.ReactNode;\n    input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n    if (maxLength) {\n        const parsedMaxLength = Number.parseInt(maxLength, 10);\n        if (!isNaN(parsedMaxLength)) {\n            return parsedMaxLength;\n        }\n    }\n\n    return undefined;\n};\n\nconst SignInInput: React.FC<ISignInInputProps> = ({ id, type, value, pattern, className, maxLength, ariaLabel, onChange }) => (\n    <input\n        id={id}\n        type={type}\n        value={value}\n        className={`${className}-input ${className}-${id}`}\n        pattern={pattern !== '' ? pattern : undefined}\n        aria-required='true'\n        maxLength={GetMaxLength(maxLength)}\n        onChange={onChange}\n        aria-label={ariaLabel}\n    />\n);\n\nexport default SignInInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInLabel {\n    id: string;\n    forId: string;\n    className: string;\n    text: string;\n}\n\nconst SignInLabel: React.FC<ISignInLabel> = ({ id, forId, className, text }) => (\n    <label id={`${id}_label`} className={`${className}-label`} htmlFor={forId}>\n        {text}\n    </label>\n);\n\nexport default SignInLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInLink {\n    id?: string;\n    className: string;\n    href: string;\n    ariaLabel: string;\n    text: string;\n    telemetryContent?: ITelemetryContent;\n}\n\nconst SignInLink: React.FC<ISignInLink> = ({ id, className, href, telemetryContent, ariaLabel, text }) => {\n    const payLoad = getPayloadObject('click', telemetryContent!, text);\n    const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n    return (\n        <a id={id} className={className} href={href} aria-label={ariaLabel} {...attributes}>\n            {text}\n        </a>\n    );\n};\n\nexport default SignInLink;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInLoadingIcon {\n    className: string;\n}\n\nconst SignInLoadingIcon: React.FC<ISignInLoadingIcon> = ({ className }) => <div className={`${className}__loading-icon`} />;\n\nexport default SignInLoadingIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInLoadingMessage {\n    className: string;\n    message: string;\n}\n\nconst SignInLoadingMessage: React.FC<ISignInLoadingMessage> = ({ className, message }) => (\n    <div className={`${className}__loading-message`}>{message}</div>\n);\n\nexport default SignInLoadingMessage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInText {\n    className: string;\n    text: string;\n}\n\nconst SignInText: React.FC<ISignInText> = ({ className, text }) => <span className={className}>{text}</span>;\n\nexport default SignInText;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { AsyncResult } from '@msdyn365-commerce/retail-proxy';\n\nimport { ICategoryPromotionalContentData } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuData {\n    categories: AsyncResult<CategoryHierarchy[]>;\n}\n\nexport interface IMenuItemData {\n    id?: number;\n    linkText?: string;\n    linkURL?: string;\n    imageSource?: string;\n    imageDestinationURL?: string;\n    subMenu?: IMenuItemData[];\n    promotionalContent?: ICategoryPromotionalContentData[];\n    menuSource?: string;\n    shouldOpenNewTab?: boolean;\n    ariaLabel?: string;\n}\n\n/**\n *\n * Menu type index id.\n */\nexport enum MenuTypeIndexId {\n    Cms = 1000,\n    Retail = 5000\n}\n\n/**\n *\n * Menu type source.\n */\nexport enum MenuSource {\n    Cms = 'Cms',\n    Retail = 'Retail'\n}\n"],"names":["AccountCustomerBalanceTile","React","constructor","props","super","this","telemetryContent","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","state","_objectSpread","_initState","reaction","hasError","error","setState","content","ErrorComponent","value","resources","apiGenericErrorMessage","get","isCustomerAccountPaymentEnabled","customerResult","allowOnAccountPayment","AllowOnAccountPayment","isB2BSite","isChannelTypeB2B","enableCustomerAccountPayment","shouldComponentUpdate","nextProps","nextState","data","render","className","heading","links","config","viewProps","moduleProps","classnames","Heading","headingTag","tag","text","isDetailsLinkDisplayed","LinksComponent","Object","assign","onTextChange","index","event","requestContext","renderView","account","Balance","CreditLimit","InvoiceAccountBalance","InvoiceAccountCreditLimit","noCreditErrorMessage","accountCreditVerbagePrefix","accountCreditVerbagePostfix","currencyCode","formatCurrency","customerCredit","customerCreditFormatted","toFixed","CreditComponent","verbagePrefix","verbagePostfix","__decorate","computed","Module","SignIn","moduleClassName","handleParagraphChange","signInDisclaimer","target","handleSignInHeadingChange","signInHeading","handleSignUpHeadingChange","signUpHeading","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","window","isInitialized","emailRegex","emailId","SA_FIELDS","AttributeFields","ID","errorMessages","requiredField_email","requriedEmailError","requiredField_password","requriedPasswordError","invalid_email","invalidEmailError","invalid_password","invalidPasswordError","unknown_error","unknownError","EmailRegex","defaultRegex","source","componentDidMount","componentDidUpdate","viewState","isShowLoading","signIn","loading","modal","Modal","isOpen","modalBody","ModalBody","icon","SignInLoadingIconComponent","message","SignInLoadingMessageComponent","loadingMessage","defaultAADConainer","id","style","display","aadConainer","signInSection","signInSectionHeading","Msdyn365","editProps","onEdit","signInLocalAccount","localAccount","items","_renderInput","emailAddressLabelText","emailAddressAriaLabel","passwordLabelText","forgetPassword","SignInLinkComponent","href","ariaLabel","forgotPasswordButtonAriaLabel","forgotPasswordButtonText","disclaimer","SignInErrorComponent","signInButton","SignInButtonComponent","loginButtonAriaLabel","loginButtonText","signInSocialAccount","socialAccounts","_renderSocialAccount","facebookButtonText","facebookButtonAriaLabel","facebookIcon","microsoftButtonText","microsoftButtonAriaLabel","microsoftIcon","signInB2BAccount","_renderB2BSocialAccount","b2bButtonText","b2bButtonAriaLabel","displayB2bAccountManagerSignin","signUpSection","signUpSectionHeading","signUpDescription","SignInDescriptionComponent","description","signUpDescriptionText","signUpLink","signUpButtonAriaLabel","signUpButtonText","type","labelText","pattern","wrapper","key","label","SignInLabelComponent","forId","input","SignInInputComponent","iconImage","button","image","_createImageMarkup","SignInTextComponent","_displayB2bAccountManagerSignin","imageProps","gridSettings","imageSettings","pictureClassName","shouldSkipToMainImage","observable","observer","SignInLoading","_ref4","Node","_ref","map","item","LocalAccount","_ref2","SocialAccount","_ref3","B2BAccount","NavigationMenu","isRetail","isCMS","_setNavigationSource","sourceType","_updateViewport","bind","viewport","device","Type","navigationMenuSource","isMobile","menuItemList","static","locale","nameTranslations","nameTranslation","length","find","Language","toLowerCase","Text","MsDyn365","isBrowser","resizeThrottledEventHandler","addThrottledEvent","componentWillUnmount","removeEventListener","_this$props$config$di","_this$props$config$di2","_mapData","isEmptyOrNullObject","viewports","xs","q","w","h","xl","lazyload","Navigation","role","MenuList","ListItem","showCategoryImage","displayCategoryImage","showPromotionalContent","displayPromotionalImage","Link","DivContainer","ImageDivContainer","Button","onClick","ImageContainer","Span","MobileDescriptionContainer","MobileBackButton","backButtonAriaLabel","MobileDescriptionLabel","isMobileView","menuItemData","mergedData","categories","result","push","_constructMenuItemData","undefined","cmsNavItems","idx","_constructTopMenuItemData","_this$props$config$en","_this$props$config$ro","enabletopMenu","mergedRootMenuData","topMenu","linkText","rootMenuNavigation","linkURL","imageSource","subMenu","retailItem","cmsItem","addedAllMenu","categoryPromotionalContent","cmsItemText","menuAriaLabel","promotionalData","filter","promoItem","_promoItem$categoryNa","_retailItem$Name","categoryName","Name","_NavigationMenu$getFr","_NavigationMenu$getFr2","ArrayExtensions","hasElements","Images","Uri","RSItemIdInit","getFriendlyName","NameTranslations","Url","_getNestedChildren","promotionalContent","menuSource","MenuSource","Retail","CMSItemIdInit","linkUrl","destinationUrl","imageDestinationURL","imageLink","src","_getCMSNestedChildren","Cms","shouldOpenNewTab","openInNewTab","category","imageSourceUrl","arguments","nestedChildren","Children","allCategoryMenuText","getCategoryUrl","subMenus","_getViewport","innerWidth","sm","md","lg","MenuTypeIndexId","NavigationMenuView","currentLevel","_updateCategoryImage","categoryImageSrc","option","promotionalImage","altText","imageSrc","promotionalItemImageSettings","additionalProperties","categoryImage","categoryImageAltText","_handleDropdownToggle","parentId","isBackTrack","activeMenu","mobileViewLabelText","parentMenu","_handleGoBack","_handleClickOutside","menuNode","current","contains","_handleFocusOutside","relatedTarget","_closeSubmenu","_shouldAddFocusMenuRef","optionLinkText","_getCategoryImage","defaultImageSettings","_categoryImage$imageS","generateImageUrl","actionContext","apiSettings","Image","categoryImageSettings","loadFailureBehavior","menuItemRef","payLoad","getPayloadObject","document","body","addEventListener","_this$menuItemRef$cur","children","focus","ref","tabIndex","_renderDisplay","menuItem","menuItemDatum","_getFromSubMenu","_createMenuItemList","forEach","i","found","_renderSubMenu","_renderButtonMenuItem","_renderLinkMenuItem","_renderSpanMenuItem","IsSubMenu","enableMultiSupportMenu","enableMultilevelMenu","multiLevelSupportedMenu","menuLevelSupport","levelClassName","menuOptions","hasOptions","haveSubmenu","Math","round","toString","_renderMenu","onFocus","hoverEffect","isParent","imagesource","contentAction","etext","attributes","getTelemetryAttributes","onMouseOver","onTelemetryClick","_renderPromotionalLink","level","currentItem","submenu","categoryImageDisplay","promotionalContentDisplay","DivContainerClass","_item$additionalPrope","BackTopFooter","backtoTopText","destination","BackToTop","title","BusinessPartnerPromotionTermsParagraph","titleClassName","BusinessPartnerPromotion","onCheckBoxChange","termsOfServiceChecked","checked","onToggleTermOfServiceModal","termsOfServiceModalOpened","onSubmit","async","_data$b2bUserInformat","_data$b2bUserInformat2","errorMessageText","promoteToSellerSubmitSuccessMessage","businessPartnerId","b2bUserInformation","BusinessPartnerId","promoteToSellerAsync","callerContext","showSubmitButton","showTermsOfService","errorMessage","notificationMessage","_unused","termsOfService","authorizationErrorMessage","canSubmit","isAdminUser","status","btnEnabled","businessPartnerPromotionProps","renderNotificationBar","sellerDescriptions","renderSellerDescriptions","termsOfServiceCheckbox","termsOfServiceLinkText","onChange","termsOfServiceAgreementText","termsOfServiceModal","horizontalPosition","verticalPosition","autoFocus","fade","toggle","ModalHeader","termsOfServiceModalHeading","submitButton","submitRequestLabel","disabled","notificationBar","Alert","color","results","idx1","_description$bulletPo","bulletPoints","bulletPoint","idx2","user","ObjectExtensions","isNullOrUndefined","StringExtensions","isNullOrEmpty","IsAdmin","InvoiceListView","header","invoiceRequestModal","pagination","linksElements","querySelectorAll","console","log","l","setAttribute","NavMenuConstants","getCategoryImage","alttext","categoryImageUrl","navProps","_props$navProps$confi","imageData","NavigationMenuRootDisabled","supportedLevel","four","zero","escapeKey","_toggleNavBar","previousState","isNavOpen","_bindDesktopCategoryClick","desktopCategoryId","isDrawerOpen","categoryImageSource","isOnlyMobile","_closeNavMenu","_escFunction","keyCode","_customUpdateViewport","variant","VariantType","Browser","customResizeThrottledEventHandler","_renderMobileMenu","hamburgerAriaLabel","_renderCollapseMenu","Collapse","_renderDesktopMenu","_renderDrawerLink","isNullOrWhitespace","entries","parentMenuId","menu","one","Number","subMenuArray","isSubMenu","_this$props$navProps$","_this$props$navProps$2","rootMenu","subMenuItem","isEnableMultiSupportMenu","three","getMenuItem","isHavingSubmenu","two","_renderSubMenuDrawer","_renderLinkMenuItemLevelOne","_menuItem$linkText","Drawer","collapseProps","timeout","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","menuSubItem","isHoverEffect","isSubmenu","_this$state$categoryI","isCategoryImageDisplay","isPromotionalContentDisplay","divContainerClass","menuLevelSupportClassName","categoryImages","imagesContainerKey","join","_item$src","NavigationMenuRootEnabled","_addShopAllLink","_this$menuItemData$0$","shopAllObject","unshift","cmsMenuData","retailMenuItemData","retailMenuData","JSON","parse","stringify","OrderConfirmationOrderInfomation","orderInformationProps","createdDate","channelReferenceId","renderEmailMessage","_orderHydration$resul","receiptMessageWithEmail","receiptMessageNoEmail","orderHydration","email","salesOrder","ReceiptEmail","emailMessage","replace","OrderConfirmationSalesLine","salesLineProps","salesLine","buyAgainButton","OrderConfirmationGroupDelivery","deliveryProps","address","pickupDateTimeslot","OrderConfirmationGroup","groupProps","delivery","salesLinesProps","salesLines","shippingItemsToYou","LineId","OrderConfirmationGroups","_ref5","groupsProps","groups","group","otherChargesLines","chargeLines","setChargeLines","setLoading","_props$data$orderHydr","_props$data$orderHydr2","chargeCodes","app","chargeLinesBreakdown","lines","ChargeLines","linesNode","otherChargeTotal","ChargeAmount","currencyFormatter","cultureFormatter","c","node","line","ChargeCode","chargeCode","r","_r$CalculatedAmount$t","_r$CalculatedAmount","CalculatedAmount","renderLineChargeNode","chargeLineLabel","_otherChargeTotal$toS","otherChargesNode","otherChargeLabel","fetchOtherChargesLines","chargeName","chargeAmount","renderTaxLine","_props$data$orderHydr3","_taxAmount$toString","taxAmount","TaxAmount","taxLabel","OrderConfirmationOrderSummary","orderSummary","orderSummaryProps","subtotal","displayShippingline","shipping","displayTaxNote","taxAmountNote","totalAmount","earnedPoints","OrderConfirmationPayment","_ref6","paymentMethodsProps","methods","totalOnAccount","OrderConfirmationHelp","_ref7","helpProps","needHelpLabel","helpLineNumberLabel","contactNumber","_props$data$orderHydr4","backToShoppingLink","alert","orderInfomation","payment","help","tenderLines","TenderLines","tl","AmountInCompanyCurrency","reduce","num","total","ItemComponent","itemProps","checkoutPlainContainerProps","count","processing","trackingInfo","tax","_ref8","_orderHydration$resul2","_salesOrder$SalesLine","SalesLines","so","ItemId","Description","Price","Quantity","TotalAmount","createSearchResultModal","modalProps","refineMenu","sortByDropDown","isRecoSearchPage","modalHeader","createModalBody","modalFooter","renderSort","renderRefiner","refiners","RefineMenuContainer","RefinerSectionContainer","SortingContainer","renderCategoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryHierarchySeparator","renderTitle","TitleContainer","titlePrefix","titleText","titleCount","_props$context$action","SearchResultContainer","products","ProductsContainer","ProductSectionContainer","choiceSummary","modalToggle","searchResultModal","TitleViewProps","categoryHierarchy","sortByOptions","CategoryNavContainer","RefineAndProductSectionContainer","FeatureSearchContainer","similarLookProduct","query","recommendation","renderAdditionalContent","additionalContent","_additionalContent$ad","additionalContentNode","additionalContentItems","additionalContentItemContainer","additionalContentItemLinks","contentBlockContainer","imageContainer","detailsContainer","contentBlockAnchorTag","imageAriaLabel","imageClass","FooterItemView","FooterItem","_renderElement","HeadingContainer","EditableLink","menuId","drawerKeyValue","newPair","_this$menuNode$curren","_this$menuNode$curren2","_this$props$navProps$3","buttonText","keys","colProps","PromoCode","_onInputChangeHandler","promoCodeInputValue","trim","canApply","_applyPromotion","cartState","appliedPromo","addPromoCode","promoCode","then","substatus","duplicatePromoCodeErrorText","invalidPromoCodeErrorText","catch","failedToAddPromoCodeErrorText","_onSubmitHandler","preventDefault","applyPromotionHandler","_renderForm","promoPlaceholderText","promoCodeApplyButtonText","placeholder","_removePromotion","_event$currentTarget$","code","currentTarget","getAttribute","removePromoCodes","promoCodes","failedToRemovePromoCodeErrorText","_renderAppliedPromoCode","cart","Coupons","removePromotionHandler","coupon","removePromoAriaLabelFormat","format","removePromoText","Code","TelemetryConstant","ApplyPromoCode","promoCodeHeadingText","_mapEditableLinks","linkdata","editableLinks","link","editableLink","errorClassName","GetMaxLength","maxLength","parsedMaxLength","parseInt","isNaN","htmlFor"],"sourceRoot":""}