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ASC,YAAa1O,EAAM,CAAC4R,GAA2BlF,GAS9D+8B,cAAczpC,EAAcyN,GAC/BxO,KAAKmrB,WAAW,gBAAiB,CAAE3c,IAAAA,IAOhCk8B,gBAAgBngB,GACnBvqB,KAAKmrB,WAAW,eAAgBZ,GAS5BipB,eAAeN,EAAyBnnC,EAAiB4/B,GAC7DuH,EAAcnnC,GACd4/B,EAAK3nC,SAAQwqC,IACT0E,EAAc1E,QC7KnB,MAEMiF,EAAgC,sBAQhCC,EAAiC,4CACjCC,EAAkC,iCAClCC,EAAgC,yDAChCC,EAA2B,kCAC3BC,EAA6B,qCAC7BC,EAAiC,iDAEjCC,EAA8B,2EAC9BC,EAA8B,yBAC9BC,EAA8B,4EAK9BC,EAAiC,4DAKjCC,EAA2B,4DAC3BC,EAA4B,2FAG5BC,GAAgC,mDAChCC,GAA8C,8CAC9CC,GAAwB,4CACxBC,GAA4B,2CAC5BxlB,GAAwC,gCAGxCC,GAA6BA,CAACwlB,EAAsBC,IACtD,2BAA2BA,QAAsBD,6BCvC/CE,GAAgC,6CCFhCC,GAA8B","sources":["webpack://suedwolle/../../src/msdyn365-commerce.ts?2d5d","webpack://suedwolle/../../../src/contract/IExperimentation.ts?751c","webpack://suedwolle/../../../../src/interfaces/data-types/IImageData.ts?0fd3","webpack://suedwolle/../../../../src/components/head-injector/IHtmlHeadModel.ts?bb60","webpack://suedwolle/../../../../src/components/head-injector/html-head-utils.ts?362e","webpack://suedwolle/../../../../src/components/head-injector/html-head-include.tsx?2239","webpack://suedwolle/../../../../src/components/place-holder-for-preview/place-holder-for-preview.tsx?df71","webpack://suedwolle/../../../../src/components/image/image-types/empty-placeholder-image.tsx?3377","webpack://suedwolle/../../../../src/components/image/image-types/loading-placeholder-image.tsx?f6c2","webpack://suedwolle/../../../src/utilities/helper.ts?c2ab","webpack://suedwolle/../../../../src/utilities/editable-fields/edit-errors.ts?8864","webpack://suedwolle/../../../../src/utilities/editable-fields/utils.ts?5834","webpack://suedwolle/../../../../src/utilities/editable-fields/image-field.tsx?1727","webpack://suedwolle/../../../../src/utilities/editable-fields/text-field.tsx?cc2c","webpack://suedwolle/../../../../src/utilities/editable-fields/link-field.tsx?8c76","webpack://suedwolle/../../../../src/utilities/editable-fields/video-field.tsx?e3a4","webpack://suedwolle/../../../../src/utilities/editable-fields/editable-field.tsx?7a9c","webpack://suedwolle/../../../../src/components/image/source-builder.ts?cbb3","webpack://suedwolle/../../../../src/components/image/image-helper.ts?b6f4","webpack://suedwolle/../../../../src/components/image/image-types/native-image.tsx?29f8","webpack://suedwolle/../../../../src/components/image/image-types/thumbnail-image.tsx?2fd7","webpack://suedwolle/../../../../src/components/image/image-types/main-image.tsx?a3c5","webpack://suedwolle/../../../../src/components/image/image.tsx?4433","webpack://suedwolle/../../../src/models/core-context.ts?d3c5","webpack://suedwolle/../../../src/models/with-context.tsx?ac06","webpack://suedwolle/../../../src/utilities/http-service.ts?6fa5","webpack://suedwolle/../../../src/utilities/culture-info-formatter.ts?d7ca","webpack://suedwolle/../../../src/utilities/parameterize.ts?b37e","webpack://suedwolle/../../../src/utilities/version-utils.ts?2da5","webpack://suedwolle/../../../src/utilities/page-type-url-builder.ts?cbea","webpack://suedwolle/../../../src/utilities/get-richtext-html.tsx?b842","webpack://suedwolle/../../../src/utilities/text.tsx?cf48","webpack://suedwolle/../../../src/utilities/video.tsx?63b9","webpack://suedwolle/../../../src/utilities/link.tsx?3a7a","webpack://suedwolle/../../../src/utilities/links.tsx?88b9","webpack://suedwolle/../../../src/utilities/request-hook.ts?2aa0","webpack://suedwolle/../../../src/utilities/performance-analyzer-retriever.ts?0020","webpack://suedwolle/../../../src/mock/mock-helper.ts?c878","webpack://suedwolle/../../../../src/utilities/drag-and-drop/drag-and-drop-utils.ts?30bc","webpack://suedwolle/../../../../src/utilities/drag-and-drop/drag-and-drop-image.ts?9e77","webpack://suedwolle/../../../../src/utilities/drag-and-drop/drag-and-drop-placehoder.ts?e323","webpack://suedwolle/../../../../src/utilities/drag-and-drop/drag-and-drop-events.ts?0d12","webpack://suedwolle/../../../../src/utilities/drag-and-drop/drag-and-drop-authoring.ts?e550","webpack://suedwolle/../../src/index.ts?0e3e","webpack://suedwolle/../../../src/attribute-renderers/commerce-insights-attribute-renderer.ts?5c87","webpack://suedwolle/../../../src/attribute-renderers/exp-attribute-renderer.ts?e5ad","webpack://suedwolle/../../../../src/interfaces/events/TelemetryEvent.ts?3ff3","webpack://suedwolle/../../../src/interfaces/ITelemetry.ts?2d8f","webpack://suedwolle/../../../src/interfaces/ITelemetryCommon.ts?7e00","webpack://suedwolle/../../../src/event-loggers/commerce-insights-logger.ts?2559","webpack://suedwolle/../../../src/events/client-render.ts?7f03","webpack://suedwolle/../../../src/events/http-service.ts?0d69","webpack://suedwolle/../../../src/events/web-vitals.ts?20b0","webpack://suedwolle/../../../src/helpers/common.ts?627b","webpack://suedwolle/../../../src/telemetry/telemetry-base.ts?5b2a","webpack://suedwolle/../../../src/telemetry/internal-telemetry.ts?bc2b","webpack://suedwolle/../../../src/telemetry/static-telemetry.ts?5995","webpack://suedwolle/../../../src/loggers/logging-helper.ts?d958","webpack://suedwolle/../../../src/telemetry/telemetry.ts?920f","webpack://suedwolle/../../../src/privacy/dynamics-privacy-helper.ts?4c7c","webpack://suedwolle/../../../src/loggers/app-insights-helper.ts?cafe","webpack://suedwolle/../../../src/loggers/client-app-insights-js-logger.ts?67fa","webpack://suedwolle/../../../src/loggers/generic-console-logger.ts?d348","webpack://suedwolle/../../../src/strings/exceptions.ts?c950","webpack://suedwolle/../../../src/strings/messages.ts?2613","webpack://suedwolle/../../../src/strings/client-render.ts?6638"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable react/display-name */\nimport { ICache } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\nimport { ICommerceApiSettings, IExperimentationConnector, IGeoLocationConnector, ISegmentationConnectors } from './contract';\nimport {\n    IComponent,\n    IComponentProps,\n    IDictionary,\n    IFeatureVersions,\n    ILocalCredentials,\n    IMergedAppSettings,\n    IMSDyn365Window,\n    IPartnerImageSettings,\n    IPartnerThemeSettings,\n    IPlatformSettings,\n    IResourceManager,\n    ISecretManager,\n    IThemeModule,\n    IThemeRegistration,\n    ISiteCssUrl\n} from './interfaces';\n\ndeclare let window: IMSDyn365Window;\n\n/**\n * App level const available to module/action developer\n */\nexport class MSDyn365Commerce {\n    private _cartCookie: string = '_msdyn365___cart_';\n    private _checkoutCartCookie: string = '_msdyn365___checkout_cart_';\n    private _accountSelectionCookie: string = '_msdyn365___can_';\n    private _checkoutCartKeyPrefix: string = 'checkout';\n    private _buildVersion: string = '00-0000';\n    private _env: string = 'development';\n    private _commerceApiSetting: ICommerceApiSettings = <ICommerceApiSettings>{};\n    private _themeRegistration: IThemeRegistration = { themes: {}, styles: {} };\n    private _resourceManager: IResourceManager | undefined;\n    private _imageSettings: IPartnerImageSettings = { imageSettings: {}, gridSettings: {} };\n    private _themeSettings: IDictionary<IPartnerThemeSettings> = {};\n    private _themeModules: IThemeModule[] = [];\n    private _connectorCache: ICache | undefined;\n    private _secretManager: ISecretManager | undefined;\n    private _experimentationConnector: IExperimentationConnector | undefined;\n    private _geoLookupConnector: IGeoLocationConnector | undefined;\n    private _platformSettings: IPlatformSettings | undefined;\n    private _segmentationConnectors: ISegmentationConnectors | undefined;\n    private _initialLoadCompleted: boolean = false;\n    private _localCredentials: ILocalCredentials | undefined;\n    private _renderResultsCache: ICache | undefined;\n    private _environmentVariable: IDictionary<string> = {};\n    private _siteCssUrl: ISiteCssUrl | undefined;\n    private _isClientHydrate: boolean = false;\n    private _appSettings: IMergedAppSettings = {\n        app: { config: {}, routes: {} },\n        msdyn365: { config: {}, routes: {}, contentSecurityPolicy: {} }\n    };\n    private _featureNames: string[] = [];\n\n    private _versionDependentFeatureInfo: IFeatureVersions = {};\n    private _moduleCssStaticPaths: Set<string> = new Set();\n\n    public getEnvironmentVariable = (environmentName: string) => {\n        let defaultValue = '';\n        switch (environmentName) {\n            case 'SUBMISSIONID':\n                defaultValue = '00000-00000-00000-00000-00000';\n                break;\n            default:\n        }\n        return this._environmentVariable[environmentName] || defaultValue;\n    };\n\n    public setClientHydrate = (isClientHydrate: boolean) => {\n        this._isClientHydrate = isClientHydrate;\n    };\n\n    public getAllEnvironmentVariable = () => {\n        return this._environmentVariable;\n    };\n\n    public setEnvironmentVariable = () => {\n        this._environmentVariable['SUBMISSIONID'] = process.env.SUBMISSIONID || '';\n    };\n\n    public setInitialLoadCompleted = (initialLoadCompleted: boolean) => {\n        this._initialLoadCompleted = initialLoadCompleted;\n    };\n    public setThemeRegistration = (themeRegistration: IThemeRegistration) => {\n        this._themeRegistration = themeRegistration;\n    };\n\n    /**\n     * Sets list of theme module objects\n     */\n    public setThemeModules = (themeModules: IThemeModule[]) => {\n        this._themeModules = themeModules;\n    };\n\n    /**\n     * Sets list of theme module objects\n     */\n    public createComponent = <T extends IComponent<IComponentProps>>(name: string, componentObj: T): React.FC<IComponentProps> => (\n        props: IComponentProps\n    ) => {\n        if (!(componentObj && componentObj.component)) {\n            throw new Error(`Component ${name} missing`);\n        }\n\n        const Element = componentObj.component;\n        return React.createElement(Element, props);\n    };\n\n    /**\n     * Creates a component override\n     */\n    public createComponentOverride = <T extends IComponent<IComponentProps>>(name: string, componentObj: T): React.FC<IComponentProps> => (\n        props: IComponentProps\n    ) => {\n        if (!(componentObj && componentObj.component)) {\n            throw new Error(`Component ${name} missing`);\n        }\n\n        const Element = componentObj.component;\n        return React.createElement(Element, props);\n    };\n\n    get isClientHydrate() {\n        return this._isClientHydrate;\n    }\n\n    get siteCssUrl(): ISiteCssUrl | undefined {\n        return this._siteCssUrl;\n    }\n\n    /**\n     * Check if its in postInitialLoading status\n     */\n\n    get initialLoadCompleted(): boolean {\n        return this._initialLoadCompleted;\n    }\n\n    // DO NOT DELETE - keeping this method for backwards\n    // compatibility reasons. After modules code tranisitions to using cartCookieName\n    // we will delete this getter\n    get CartCookie(): string {\n        return this._cartCookie;\n    }\n\n    get cartCookieName(): string {\n        return this._cartCookie;\n    }\n\n    /**\n     * Get checkout cart cookie\n     */\n    get checkoutCartCookie(): string {\n        return this._checkoutCartCookie;\n    }\n\n    /**\n     * Get account selection cookie\n     */\n    get accountSelectionCookie(): string {\n        return this._accountSelectionCookie;\n    }\n\n    /**\n     * Get checkout cart cookie\n     */\n    get checkoutCartKeyPrefix(): string {\n        return this._checkoutCartKeyPrefix;\n    }\n\n    get themes(): IThemeRegistration {\n        return this._themeRegistration;\n    }\n\n    /**\n     * Gets theme modules with full layouts and segment objects\n     */\n    get themeModules(): IThemeModule[] {\n        return this._themeModules;\n    }\n    /**\n     * Gets the current build version\n     */\n    get buildVersion(): string {\n        return this._buildVersion;\n    }\n\n    /**\n     * Gets the current runtime environment\n     */\n    get env(): string {\n        return this._env;\n    }\n\n    /**\n     * Gets the commerce related API settings\n     */\n    get apiSettings(): ICommerceApiSettings {\n        return this._commerceApiSetting;\n    }\n\n    /**\n     * Gets the commerce related image settings\n     */\n    get imageSettings(): IPartnerImageSettings {\n        return this._imageSettings;\n    }\n\n    /**\n     * Gets the commerce related theme settings\n     */\n    get themeSettings(): IDictionary<IPartnerThemeSettings> {\n        return this._themeSettings;\n    }\n\n    /**\n     * Gets the commerce related APP settings\n     */\n    get appSettings(): IMergedAppSettings {\n        return this._appSettings;\n    }\n\n    /**\n     * Gets the commerce related APP settings\n     */\n    get featureNames(): string[] {\n        return this._featureNames;\n    }\n\n    /**\n     * Gets the experimentation connector object that contains the registered provider, listener and connector name\n     * Returns undefined if an experimentation connector has not been registered\n     */\n    get experimentationConnector(): IExperimentationConnector | undefined {\n        return this._experimentationConnector;\n    }\n\n    /**\n     * Gets the all segmentation connectors that contains the registered provider and connector name\n     * Returns undefined if a segmentation connector has not been registered\n     */\n    get segmentationConnectors(): ISegmentationConnectors | undefined {\n        return this._segmentationConnectors;\n    }\n\n    /**\n     * Gets the geoLookup connector object that contains the registered provider and connector name\n     * Returns undefined if a geo lookup connector has not been registered\n     */\n    get geoLookupConnector(): IGeoLocationConnector | undefined {\n        return this._geoLookupConnector;\n    }\n\n    /**\n     * Gets the experimentation app cache\n     */\n    get connectorCache(): ICache | undefined {\n        return this._connectorCache;\n    }\n\n    /**\n     * Gets secret manager object\n     */\n    get secretManager(): ISecretManager | undefined {\n        return this._secretManager;\n    }\n\n    /**\n     * Gets local credential details\n     */\n    get localCredentials(): ILocalCredentials | undefined {\n        return this._localCredentials;\n    }\n\n    /**\n     * Gets the platformSettings\n     */\n\n    get platformSettings(): IPlatformSettings | undefined {\n        return this._platformSettings;\n    }\n\n    /**\n     * Returns a boolean value indicating whether or not the current operating environment is browser or server\n     */\n    get isBrowser(): boolean {\n        return typeof window !== 'undefined';\n    }\n\n    /**\n     * Gets the resource manager instance\n     */\n    get resourceManager(): IResourceManager | undefined {\n        if (!this.isBrowser) {\n            return this._resourceManager;\n        }\n\n        return undefined;\n    }\n\n    /**\n     * Gets the page render result cache\n     */\n    get renderResultCache(): ICache | undefined {\n        return this._renderResultsCache;\n    }\n\n    /**\n     * Gets the version dependent feature info\n     */\n    get getVersionDependentFeatureInfo(): IFeatureVersions {\n        return this._versionDependentFeatureInfo;\n    }\n\n    /**\n     * Gets chunks paths of all moduleCSS styles\n     */\n    get allModuleCssStaticPaths(): Set<String> {\n        return this._moduleCssStaticPaths;\n    }\n}\n\nconst msdyn365Commerce = new MSDyn365Commerce();\nexport default msdyn365Commerce;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IDictionary, IExpLogger, TelemetryEvent, TelemetryEventContent } from '@msdyn365-commerce/telemetry-internal';\nimport { ISecretManager } from '../interfaces';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * State of an experiment\n */\n\nexport const EXPERIMENTATION_CACHE_TYPE = 'EXPERIMENTATION';\nexport const EXPERIMENTATION_DATAFILE_CACHE_TYPE = 'EXPERIMENTATIONDATAFILE';\n\nexport enum State {\n    Draft = 'Draft',\n    Active = 'Active',\n    Running = 'Running',\n    Paused = 'Paused',\n    Archived = 'Archived'\n}\n\nexport enum RefreshType {\n    DataFile = 'DataFile',\n    Experiments = 'Experiments'\n}\n\n/**\n * refresh options.\n * @param refreshFunction the call back function that refresh will trigger.\n * @param parameters the parameters for the refresh function. If no parameters need, pass an empty array.\n */\nexport interface IExperimentRefreshOptions {\n    refreshType: RefreshType;\n    parameters: any[];\n}\n\nexport interface IActiveExperiments {\n    userId: string;\n    activeExperiments: IVariants[];\n    moduleIdToExperimentIdMap?: IDictionary<string>;\n}\n\n/**\n * Variations on each experiment\n */\nexport interface IVariations {\n    // friendly name of a variation\n    // required\n    friendlyName: string;\n\n    // unique id or key for the variation\n    // required\n    id: string;\n\n    // variation status\n    // required. Can be defaulted to active\n    status: State;\n\n    // variation weight\n    // Optional\n    weight?: string;\n}\n\n/**\n * Experiments\n */\nexport interface IExperiments {\n    // Friendly name\n    // Required\n    friendlyName: string;\n\n    // unique id or key of the experiment\n    // required\n    id: string;\n\n    // variation status\n    // required\n    status: State;\n\n    // array of variations\n    // required\n    variations: IVariations[];\n\n    // Created Date\n    createdDate?: string;\n\n    // Last modified date\n    lastModifiedDate?: string;\n\n    // Last modified by\n    lastModifiedBy?: string;\n\n    // Description\n    description?: string;\n\n    // Type\n    type?: string;\n\n    // Link url\n    link?: string;\n\n    resultLink?: string;\n}\n\n/**\n * Experiment results to display connector name and experiments[] related to the connector\n */\nexport interface IExperimentsResult {\n    name?: string;\n    experiments?: IExperiments[];\n}\n\n/**\n * Experiments\n */\n\nexport interface IVariants {\n    // Unique Id or key of the variant\n    // Required\n    variantId: string;\n\n    // unique id or key of the experiment\n    // required\n    experimentId: string;\n\n    // unique id of the module that this experiment is associated with\n    moduleId?: string;\n}\n\nexport interface IExperimentationProvider {\n    /**\n     * Allows the experimentation connector to do any startup related tasks\n     * using the config provided by the partner.\n     *\n     * This method is only called once during server startup.\n     * @param config The config provided by the partner in connector settings.\n     * @param secretManager Class used to retrieve secrets stored in retail server key vault\n     */\n    initialize(config: any, secretManager?: ISecretManager): Promise<boolean>;\n\n    /**\n     * Returns the configuration that should be passed to the experimentation connector\n     * when it is initialized client-side\n     */\n    getConfigForClientSideInit(): Promise<any>;\n\n    /**\n     * Initailizes the experimentation provider on the browser (client-side) so that\n     * it may activate experiments for a user.\n     *\n     * @param config The config that is required to initialize the experimentation connector\n     * client-side. The result of getConfigForClientSideInit() is passed into this method\n     */\n    initializeClientSide(config: any): boolean;\n\n    /**\n     * Returns a list of all the experiments currently configured whether active or not.\n     * This list will be cached and periodically refreshed.\n     * @param retailServerBaseUrl The retail server base URL.\n     * @param connectorName The optimizely conector name.\n     * @param page Optional argument that specifies the page to return.\n     * @param items Optional argument that specifies the maximum number of objects to return per request.\n     */\n    getExperiments(retailServerBaseUrl: string, connectorName: string, page?: string, items?: string): Promise<IExperimentsResult>;\n\n    /**\n     * Returns a list of experiments and variants a user will be a part of based\n     * off the userId. Optional attributes can provide the connector with additional criteria\n     * to determine which experiments a user should be a part of.\n     *\n     * @param userId userId unique to a user if signed in or unique to a session if user is anonymous.\n     * userId will be generated from hash if user is signed-in to deterministically generate sanatized userIds.\n     * @param attributes Optional user related attributes\n     */\n    getVariantsForUser(userId: string, attributes?: { [index: string]: string }): IVariants[];\n\n    /**\n     * Activates experiment(s) a user is currently being served. This call will be made\n     * client-side after the connector has been initialized client-side\n     *\n     * @param userId userId unique to a user if signed in or unique to a session if user is anonymous.\n     * userId will be generated from hash if user is signed-in to deterministically generate sanatized userIds.\n     * @param experiments The experiments the user is participating in.\n     * @param attributes Optional user related attributes\n     */\n    activateExperiment(userId: string, experiments: IVariants[], attributes?: { [index: string]: string }): boolean;\n}\n\nexport interface IExperimentationListener {\n    /**\n     * Initailizes the experimentation listener on the browser (client-side) so that\n     * it may keep track of any conversion events related to the current experiements.\n     *\n     * @param config The config that is required to initialize the experimentation connector\n     * client-side. The result of getConfigForClientSideInit() is passed into this method\n     * @param userId The current user being served the experiment and tracked.\n     */\n    initializeClientSide(config: any, userId: string): boolean;\n\n    /**\n     * Tracks a successful user conversion event.\n     *\n     * @param eventType The event type that occured\n     * @param payload Any additional tags or data related to the conversion event\n     */\n    trackEvent(eventType: TelemetryEvent, payload: TelemetryEventContent): void;\n}\n\nexport interface IExperimentationConnector {\n    name: string;\n    provider: IExperimentationProvider;\n    listener?: IExpLogger;\n    connectorDomains: string[];\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IEditProps } from '../../utilities';\nimport { IDictionary } from '../types';\nimport { IImageSettings } from './IImageSettings';\n\nexport enum ImageFetchPriority {\n    High = 'high',\n    Low = 'low',\n    Auto = 'auto'\n}\n\nexport interface IImageData {\n    /* property to be edited, used to make image editable in site builder */\n    editProps?: IEditProps;\n\n    /* Image url */\n    src?: string;\n\n    /* Fallback Image url */\n    fallBackSrc?: string;\n\n    /* Alt text for image */\n    altText?: string;\n\n    /* Image caption */\n    caption?: string;\n\n    /* Image tittle */\n    title?: string;\n\n    /* Image width */\n    width?: number;\n\n    /* Image height */\n    height?: number;\n\n    /* Image Settings */\n    imageSettings?: IImageSettings;\n    /* dictionary with additional misc.  properties*/\n    additionalProperties?: IDictionary<string>;\n\n    /* URL */\n    href?: string;\n\n    /* External Provider */\n    externalProvider?: string;\n\n    /* Defines the hint given to browser on how it should prioritize the fetch of the image relative to other image.  */\n    fetchPriority?: ImageFetchPriority;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGeneric } from '../../interfaces';\n\nexport interface IHtmlHead {\n    tags: HtmlHeadElement[];\n    nonScriptTags: HtmlHeadElement[];\n    scriptTags: {\n        headStart: HtmlHeadElement[];\n        headEnd: HtmlHeadElement[];\n        bodyStart: HtmlHeadElement[];\n        bodyEnd: HtmlHeadElement[];\n    };\n    hasFavIcon: boolean;\n}\n\nexport interface IHtmlHeadProps {\n    children: React.ReactChild[];\n}\n\nexport type HtmlHeadElement = React.ReactElement<IGeneric<unknown>>;\n\nexport const NON_SCRIPT_TAGS = 'non-script-tags';\nexport const DATA_LOAD_POINT = 'data-load-point';\nexport const HEAD_START_LOAD_POINT = 'headStart';\nexport const HEAD_END_LOAD_POINT = 'headEnd';\nexport const BODY_START_LOAD_POINT = 'bodyStart';\nexport const BODY_END_LOAD_POINT = 'bodyEnd';\nexport const HEAD_ELEMENT_IDENTIFIER_ATTR = 'data-ms-head';\nexport const META_CONTENT_APPEND_ATTR = 'data-append-content';\nexport const DATA_ACTION_ATTR = 'data-ms-action';\nexport const METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp', 'property', 'description', 'keywords'];\nexport const FAVICON_REL: string[] = ['shortcut icon', 'icon', 'apple-touch-icon-precomposed', 'mask-icon', 'apple-touch-icon'];\nexport const COMPONENT_TYPES = [NON_SCRIPT_TAGS, HEAD_START_LOAD_POINT, HEAD_END_LOAD_POINT, BODY_START_LOAD_POINT, BODY_END_LOAD_POINT];\nexport const ALLOWED_DUPLICATES = new Set([\n    'article:tag',\n    'og:description',\n    'og:image',\n    'og:image:alt',\n    'og:image:width',\n    'og:image:height',\n    'og:image:type',\n    'og:image:secure_url',\n    'og:image:url',\n    'description'\n]);\n\nexport const TAG_NAMES = {\n    TITLE: 'title',\n    BASE: 'base',\n    META: 'meta',\n    SCRIPT: 'script',\n    LINK: 'link'\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IGeneric } from '../../interfaces';\nimport {\n    BODY_START_LOAD_POINT,\n    DATA_LOAD_POINT,\n    HEAD_ELEMENT_IDENTIFIER_ATTR,\n    HEAD_START_LOAD_POINT,\n    HtmlHeadElement,\n    IHtmlHead\n} from './IHtmlHeadModel';\nconst DOMAttributeNames: IGeneric<unknown> = {\n    acceptCharset: 'accept-charset',\n    className: 'class',\n    htmlFor: 'for',\n    httpEquiv: 'http-equiv'\n};\n\n/**\n * update title of the page\n * @function updateTitle\n * @param {HtmlHeadElement} title - final derived title component\n */\nconst updateTitle = (titleComponent: HtmlHeadElement): void => {\n    let title: string = '';\n    if (titleComponent) {\n        const { children } = titleComponent.props;\n        title = typeof children === 'string' ? children : '';\n    }\n\n    const initialData = window && (<any>window).___initialData___;\n    switch (titleComponent && titleComponent.props['data-ms-action']) {\n        case 'format':\n            if (initialData && initialData.pageRoot) {\n                const titleTemplate = initialData.pageRoot.titleTemplate;\n                title = titleTemplate.replace(/\\{0\\}/, title);\n            }\n\n            break;\n        case 'append':\n            title = document.title !== title ? `${document.title} ${title}` : title;\n            break;\n        case 'override':\n        default:\n    }\n\n    if (document.title !== title) {\n        document.title = title;\n    }\n};\n\n/**\n * update head tag on change, on client side\n * @function reactElementToDOM\n * @param {HtmlHeadElement} element - final react element that needs to be added to DOM\n * @return {HTMLElement} - html dom element\n */\nconst reactElementToDOM = (element: HtmlHeadElement): HTMLElement => {\n    const tagType = typeof element.type === 'string' ? element.type : '';\n    const el = document.createElement(tagType);\n    Object.keys(element.props).forEach((property: string) => {\n        if (property !== 'children' && property !== 'dangerouslySetInnerHTML') {\n            const attr = DOMAttributeNames[property] || property.toLowerCase();\n            el.setAttribute(attr, element.props[property]);\n        }\n    });\n\n    const { children, dangerouslySetInnerHTML } = element.props;\n    if (el && dangerouslySetInnerHTML) {\n        el.innerHTML = dangerouslySetInnerHTML.__html || '';\n    } else if (el && children) {\n        el.textContent = typeof children === 'string' ? children : children.join('');\n    }\n\n    return el;\n};\n\n/**\n * Filters a script based on the filterFromBody parameter\n * If filterFromBody is true, only those scripts that have head load points will\n * return true. Otherwise, only scripts with body load points will return true.\n *\n * @param filterBody Set to true to filter out scripts in body. False to filter out scripts in the head\n * @param t The script node\n */\nconst filterScripts = (filterBody: boolean, t: Node): boolean => {\n    const el = <Element>t;\n    if (el.tagName === 'SCRIPT') {\n        const attrVal = el.getAttribute(DATA_LOAD_POINT);\n        if (attrVal === 'bodyStart' || attrVal === 'bodyEnd' || attrVal === null) {\n            return filterBody ? false : true;\n        }\n    }\n    return filterBody ? true : false;\n};\n\n/**\n * Adds an HTML node to a particular slot\n *\n * @param slot The parent Element to which the HTML node should be added\n * @param loadPointToLookFor The load point type to look for to determine if the node should be prepended to append to the parent node\n * @param t The HTML node to add\n */\nconst addElementToHtmlSlot = (slot: HTMLElement, loadPointToLookFor: string, t: Node) => {\n    const loadPoint = (<Element>t).getAttribute(DATA_LOAD_POINT);\n    if (loadPoint && loadPoint === loadPointToLookFor) {\n        slot.prepend(t);\n    } else {\n        slot.appendChild(t);\n    }\n};\n\n/**\n * update head tag on change, on client side\n * @function doUpdateHead\n * @param {HtmlHead} head - final list of merged tags\n * @return {HtmlHead} - final list of merged tags\n */\nconst updateElements = (tagType: string, components: HtmlHeadElement[]): void => {\n    const headEl = document.getElementsByTagName('head')[0];\n    const bodyEl = document.getElementsByTagName('body')[0];\n    let oldTags: HTMLElement[] = Array.prototype.slice.call(headEl.querySelectorAll(`${tagType}.${HEAD_ELEMENT_IDENTIFIER_ATTR}`));\n    // sepcial condition for scripts: read script tags from body tag as well\n    if (tagType === 'script') {\n        const bodyScriptTags = Array.prototype.slice.call(bodyEl.querySelectorAll(`script.${HEAD_ELEMENT_IDENTIFIER_ATTR}`));\n        oldTags = oldTags.concat(bodyScriptTags);\n    }\n    const newTags = components.map(reactElementToDOM).filter((newTag: HTMLElement) => {\n        const len = oldTags.length;\n        for (let i = 0; i < len; i++) {\n            const oldTag = oldTags[i];\n            oldTag.removeAttribute('data-reactroot');\n            if (oldTag.isEqualNode(newTag)) {\n                oldTags.splice(i, 1);\n                return false;\n            } else if (\n                oldTag.nodeName === 'SCRIPT' &&\n                (oldTag.innerHTML === newTag.innerHTML || oldTag.getAttribute('src') === newTag.getAttribute('src'))\n            ) {\n                oldTags.splice(i, 1);\n                return false;\n            }\n        }\n        return true;\n    });\n    // Remove all the old tags and add new tags in the correct places\n    oldTags.forEach((t: Node) => t.parentNode && t.parentNode.removeChild(t));\n    // First, filter out all the script tags that are in the body and then reinsert\n    // the new tags in the head in their appropriate locations based on the load-point (if applicable)\n    newTags\n        .filter((t: Node) => {\n            return filterScripts(true, t);\n        })\n        .forEach((t: Node) => {\n            addElementToHtmlSlot(headEl, HEAD_START_LOAD_POINT, t);\n        });\n    // If any script tags were defined in the body, add these script tags back into the body\n    // based on their load-points\n    newTags\n        .filter((t: Node) => {\n            return filterScripts(false, t);\n        })\n        .forEach((t: Node) => {\n            addElementToHtmlSlot(bodyEl, BODY_START_LOAD_POINT, t);\n        });\n};\n\n/**\n * update head tag on change, on client side\n * @function doUpdateHead\n * @param {HtmlHead} head - final list of merged tags\n */\nconst doUpdateHead = (head: IHtmlHead): void => {\n    const tags: IGeneric<unknown> = {};\n    head.tags.forEach((h: HtmlHeadElement) => {\n        const headType = h.type.toString();\n        const components = tags[headType] || [];\n        components.push(h);\n        tags[headType] = components;\n    });\n\n    const titleTag = tags.title;\n    updateTitle(titleTag && titleTag.length > 0 ? titleTag[0] : null);\n\n    const types = ['meta', 'link', 'style', 'script'];\n    types.forEach((tagType: string) => {\n        updateElements(tagType, tags[tagType] || []);\n    });\n};\n\n/**\n * update head on change, on client side\n * @function updateHead\n * @param {HtmlHead} head - final list of merged tags\n */\nexport const updateHead = (head: IHtmlHead): void => {\n    doUpdateHead(head);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { isEqual } from 'lodash';\nimport React, { Component } from 'react';\nimport withSideEffect from 'react-side-effect';\nimport { IDictionary, IGeneric } from '../../interfaces';\nimport { updateHead } from './html-head-utils';\nimport {\n    ALLOWED_DUPLICATES,\n    BODY_END_LOAD_POINT,\n    BODY_START_LOAD_POINT,\n    COMPONENT_TYPES,\n    DATA_LOAD_POINT,\n    FAVICON_REL,\n    HEAD_ELEMENT_IDENTIFIER_ATTR,\n    HEAD_END_LOAD_POINT,\n    HEAD_START_LOAD_POINT,\n    HtmlHeadElement,\n    IHtmlHead,\n    IHtmlHeadProps,\n    META_CONTENT_APPEND_ATTR,\n    METATYPES,\n    NON_SCRIPT_TAGS,\n    TAG_NAMES\n} from './IHtmlHeadModel';\n\nimport msdyn365Commerce from '../../msdyn365-commerce';\n\n/**\n * reduces props of various HtmlHeadInclude instances and deduces a final state value\n *\n * @function reduceComponents\n * @access public\n * @param {IHtmlHeadProps[]} props - props list of all the HtmlHeadInclude instances\n * @return {HtmlHead} - final list of merged tags\n */\nfunction reduceComponents(props: IHtmlHeadProps[]): IHtmlHead {\n    const reducedComponents = props\n        .map((component: IHtmlHeadProps) => {\n            return component.children;\n        })\n        .reduce((a: React.ReactChild[], b: React.ReactChild[]) => {\n            if (b instanceof React.createElement || Array.isArray(b)) {\n                return a.concat(React.Children.toArray(b));\n            }\n\n            return a.concat(b);\n        }, [])\n        .reverse()\n        .filter(Boolean)\n        .filter(unique())\n        .reverse();\n\n    const mergedComponents: HtmlHeadElement[] = [];\n    reducedComponents.forEach((child: React.ReactChild, index: number): void => {\n        const childElement = child as HtmlHeadElement;\n\n        // Append content for conflicting meta tags with same 'name' property\n        if (childElement.type === TAG_NAMES.META) {\n            for (let i = 0; i < mergedComponents.length; ++i) {\n                if (\n                    mergedComponents[i].props.name === childElement.props.name &&\n                    (mergedComponents[i].props[META_CONTENT_APPEND_ATTR] || childElement.props[META_CONTENT_APPEND_ATTR])\n                ) {\n                    mergedComponents[i] = React.cloneElement(mergedComponents[i], {\n                        content: `${mergedComponents[i].props.content}, ${childElement.props.content}`\n                    });\n\n                    return;\n                }\n            }\n        }\n\n        const className =\n            (childElement.props && childElement.props.className ? `${childElement.props.className} ` : '') + HEAD_ELEMENT_IDENTIFIER_ATTR;\n        const key = childElement.key || index;\n\n        mergedComponents.push(React.cloneElement(childElement, { key, className }));\n    });\n    // Initialize dictionary to map all merged components into their respective slots\n    const componentMap: IDictionary<HtmlHeadElement[]> = {};\n    for (let i = 0; i < COMPONENT_TYPES.length; i++) {\n        componentMap[COMPONENT_TYPES[i]] = [];\n    }\n    let hasFavIcon: boolean = false;\n    // Loop through the merged components and map the component to its appropriate slot\n    mergedComponents.forEach((comp: HtmlHeadElement) => {\n        if (comp.type === 'script') {\n            switch (comp.props[DATA_LOAD_POINT]) {\n                case HEAD_START_LOAD_POINT:\n                    componentMap[HEAD_START_LOAD_POINT].push(comp);\n                    break;\n                case HEAD_END_LOAD_POINT:\n                    componentMap[HEAD_END_LOAD_POINT].push(comp);\n                    break;\n                case BODY_START_LOAD_POINT:\n                    componentMap[BODY_START_LOAD_POINT].push(comp);\n                    break;\n                default:\n                    componentMap[BODY_END_LOAD_POINT].push(comp);\n            }\n        } else if (comp.type !== 'script') {\n            if (FAVICON_REL.indexOf(comp.props.rel) !== -1) {\n                hasFavIcon = true;\n            }\n            componentMap[NON_SCRIPT_TAGS].push(comp);\n        }\n    });\n\n    return {\n        tags: mergedComponents,\n        nonScriptTags: componentMap[NON_SCRIPT_TAGS],\n        scriptTags: {\n            headStart: componentMap[HEAD_START_LOAD_POINT],\n            headEnd: componentMap[HEAD_END_LOAD_POINT],\n            bodyStart: componentMap[BODY_START_LOAD_POINT],\n            bodyEnd: componentMap[BODY_END_LOAD_POINT]\n        },\n        hasFavIcon: hasFavIcon\n    };\n}\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>,\n except we explicit allow it in ALLOWED_DUPLICATES array\n*/\nexport function unique(): (h: React.ReactChild) => boolean {\n    const keys = new Set();\n    const tags = new Set();\n    const metaTypes = new Set();\n    const metaCategories: IGeneric<unknown> = {};\n\n    return (tagComponent: React.ReactChild) => {\n        const tagElement = tagComponent as HtmlHeadElement;\n\n        if (tagElement instanceof React.createElement && tagElement.key) {\n            if (keys.has(tagElement.key)) {\n                return false;\n            }\n\n            keys.add(tagElement.key);\n        }\n\n        switch (tagElement.type) {\n            case TAG_NAMES.TITLE:\n            case TAG_NAMES.BASE:\n                if (tags.has(tagElement.type)) {\n                    return false;\n                }\n\n                tags.add(tagElement.type);\n                break;\n            case TAG_NAMES.META:\n                for (let i = 0; i < METATYPES.length; i++) {\n                    const metaType = METATYPES[i];\n                    if (tagElement.props[metaType]) {\n                        if (metaType === 'charSet') {\n                            if (metaTypes.has(metaType)) {\n                                return false;\n                            }\n\n                            metaTypes.add(metaType);\n                        } else {\n                            const category = tagElement.props[metaType];\n                            const categories = metaCategories[metaType] || new Set();\n                            if (categories.has(category) && !ALLOWED_DUPLICATES.has(category)) {\n                                return false;\n                            }\n\n                            categories.add(category);\n                            metaCategories[metaType] = categories;\n                        }\n                    }\n                }\n\n                break;\n            case TAG_NAMES.LINK:\n                tags.add(tagElement.type);\n                break;\n            default:\n        }\n\n        return true;\n    };\n}\n\n/**\n * maps state on server\n * @function mapOnServer\n * @param {HtmlHead} head - final list of merged tags\n * @return {HtmlHead} - final list of merged tags\n */\nfunction mapOnServer(head: IHtmlHead): IHtmlHead {\n    return head;\n}\n\n/**\n * state change handler\n * @function onStateChange\n * @param {HtmlHead} head - final list of merged tags\n */\nfunction onStateChange(head: IHtmlHead): void {\n    updateHead(head);\n}\n\n/**\n * <HtmlHeadInclude>\n *     <title></title>\n *     <meta name='description' content='Home page'>\n *     <meta property='og:type, content='article>\n *     <script src='http://include.com/pathtojs.js  type='text/javascript' />\n * </HtmlHeadInclude>\n *\n * HigherOrder Component to wrap HtmlHeadInclude instance and pass it to another higher order component withSideEffect\n * that tracks changes on various instances of HtmlHeadInclude and arrives at a final merged list of props that can be\n * used to update head tags\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst withHtmlHeadInclude = (WrappedComponent: any) =>\n    class WrapperComponent extends Component {\n        static set canUseDOM(canUseDOM: boolean) {\n            WrappedComponent.canUseDOM = canUseDOM;\n        }\n\n        public static peek = () => {\n            return WrappedComponent.peek();\n        };\n\n        public static rewind = () => {\n            let mappedState = WrappedComponent.rewind();\n            if (!mappedState) {\n                // provide fallback if mappedState is undefined\n                mappedState = mapOnServer({\n                    tags: [],\n                    nonScriptTags: [],\n                    scriptTags: {\n                        headStart: [],\n                        headEnd: [],\n                        bodyStart: [],\n                        bodyEnd: []\n                    },\n                    hasFavIcon: false\n                });\n            }\n\n            return mappedState;\n        };\n\n        public shouldComponentUpdate(nextProps: IGeneric<unknown>): boolean {\n            return !isEqual(this.props, nextProps);\n        }\n\n        public render(): JSX.Element | null {\n            if (msdyn365Commerce.isBrowser) {\n                return <React.Fragment />;\n            }\n\n            return <WrappedComponent {...this.props} />;\n        }\n    };\n\nconst htmlHeadIncludeWithSideEffect = withSideEffect(reduceComponents, onStateChange, mapOnServer);\nexport const HtmlHeadInclude = withHtmlHeadInclude(htmlHeadIncludeWithSideEffect(() => null));\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { IModule, IModuleConfig } from '../../contract';\n\nexport interface IPlaceHolderForContainerPreviewConfig extends IModuleConfig {\n    slotId?: string;\n    parent?: string;\n    parentType?: string;\n}\n\nexport interface IPlaceHolderForContainerPreviewResources {\n    clickToConfigure: string;\n}\n\nexport interface IPlaceHolderForContainerPreviewProps<T> extends IModule<T> {\n    resources: IPlaceHolderForContainerPreviewResources;\n    config: IPlaceHolderForContainerPreviewConfig;\n}\n\ninterface IPlaceholderForContainerPreviewPropsExtended extends IPlaceHolderForContainerPreviewProps<{}> {\n    id: string;\n    error: Error;\n    message?: string;\n}\n\nconst PlaceholderForContainerPreview = (props: IPlaceholderForContainerPreviewPropsExtended): JSX.Element => {\n    const ref = useRef<HTMLDivElement>(null);\n    useEffect(() => {\n        if (ref.current) {\n            const { id, error, message, typeName } = props;\n            const comment = {\n                id,\n                error: error && error.toString(),\n                message,\n                typeName,\n                slotId: props.slotId,\n                parentId: props.parentId\n            };\n            ref.current.innerHTML = `<!-- ${JSON.stringify(comment, null, 4)} -->`;\n        }\n    }, []);\n    return useMemo(() => {\n        return (\n            <div\n                className='card-body'\n                style={{ color: '#fff', backgroundColor: '#6c757d', textAlign: 'center' }}\n                role='button'\n                data-ft='setting-icon'\n                id={props.id}\n                {...props.renderModuleAttributes(props)}\n            >\n                <div ref={ref} style={{ display: 'none' }} />\n                <p className='card-text'>\n                    <i className='ms-Icon ms-Icon--EditCreate' />\n                    {props.resources.clickToConfigure}\n                </p>\n            </div>\n        );\n    }, [props]);\n};\n\nexport const PlaceholderForContainerPreviewComponent = PlaceholderForContainerPreview;\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\n/**\n * Configuration for the empty placeholder image.\n */\nexport interface IEmptyPlaceholderImageProps {\n    /**\n     * The html class name to use for the html element. Will be used along with the default classes.\n     */\n    className?: string;\n}\n\n/**\n * React component responsible for rendering an empty placeholder image\n * which should be used to be displayed when main image is unaccessible or broken.\n *\n * The element is an empty div element by default. Use css styles for the class in order to specify the image for the component.\n */\nexport class EmptyPlaceholderImage extends React.PureComponent<IEmptyPlaceholderImageProps> {\n    /**\n     * The default class for empty image component.\n     */\n    private static _emptyImageClassName: string = 'msc-empty_image';\n\n    /**\n     * Initializes instance with the given props.\n     * @param {IEmptyPlaceholderImageProps} props - Configuration for the empty placeholder image.\n     */\n    public constructor(props: IEmptyPlaceholderImageProps) {\n        super(props);\n    }\n\n    /**\n     * Renders empty placeholder image.\n     *\n     * The element is an empty div element by default. Use css styles for the class in order to specify the image for the component.\n     */\n    public render(): React.ReactNode {\n        return <div className={classnames(EmptyPlaceholderImage._emptyImageClassName, this.props.className)} />;\n    }\n}\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\n/**\n * Configuration for the loading placeholder image.\n */\nexport interface ILoadingPlaceholderImageProps {\n    /**\n     * The html class name to use for the html element. Will be used along with the default classes.\n     */\n    className?: string;\n}\n\n/**\n * React component responsible for rendering a loading placeholder image\n * which should be used to be displayed when main image is downloading on the client and is not yet ready to be displayed.\n *\n * The element is an empty div element by default. Use css styles for the class in order to specify the image for the component.\n */\nexport class LoadingPlaceholderImage extends React.PureComponent<ILoadingPlaceholderImageProps> {\n    /**\n     * The default class for loading image component.\n     */\n    private static _loadingImageClassName: string = 'msc-loading_image';\n\n    /**\n     * Initializes instance with the given props.\n     * @param {ILoadingPlaceholderImageProps} props - Configuration for the loading placeholder image.\n     */\n    public constructor(props: ILoadingPlaceholderImageProps) {\n        super(props);\n    }\n\n    /**\n     * Renders loading placeholder image.\n     *\n     * The element is an empty div element by default. Use css styles for the class in order to specify the image for the component.\n     */\n    public render(): React.ReactNode {\n        return <div className={classnames(LoadingPlaceholderImage._loadingImageClassName, this.props.className)} />;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInternalTelemetry, InternalTelemetryLogOptions, ITelemetry, LogLevel } from '@msdyn365-commerce/telemetry-internal';\nimport { getCurrency } from 'locale-currency';\nimport { IRequestContext } from '../interfaces';\nimport msdyn365Commerce from '../msdyn365-commerce';\n\nexport interface IContentEditableInitEvent {\n    type: string;\n}\n\n// Helper function for parsing/normalizing json, exported\nexport const parsePayload = (content: string) => {\n    try {\n        return content.constructor === String ? JSON.parse(content) : content;\n    } catch (error) {\n        throw new Error(`JSON Parsing fails for content -- ${content}`);\n    }\n};\n\nexport const isEmptyOrNullObject = (obj: object | undefined | null): boolean => {\n    return !obj || Object.keys(obj).length <= 0;\n};\n\nexport const returnEmptyPromise = (): Promise<{}> => {\n    return new Promise((resolve: (value?: {} | PromiseLike<{}> | undefined) => void) => resolve());\n};\n\nconst UNSAFE_CHARS_REGEXP = /[<>\\/\\u2028\\u2029]/g;\nconst ESCAPED_CHARS: { [unsafechar: string]: string } = {\n    '<': '\\\\u003C',\n    '>': '\\\\u003E',\n    '/': '\\\\u002F',\n    '\\u2028': '\\\\u2028',\n    '\\u2029': '\\\\u2029'\n};\nconst escapeUnsafeChars = (unsafeChar: string): string => {\n    return ESCAPED_CHARS[unsafeChar];\n};\n\nexport const sanitizeForXss = (str: string): string => {\n    return str.replace(UNSAFE_CHARS_REGEXP, escapeUnsafeChars);\n};\n\nexport const removeInstanceCache = (_key: string, value: { instance: string }): undefined | unknown => {\n    if (value && value.instance === 'instance') {\n        return undefined;\n    }\n    return value;\n};\n\nexport const isAuthoringEditEnabled = (context: IRequestContext | undefined): boolean => {\n    if (context) {\n        if (context.features && context.features.authoring_inline_edit && context.params && !!context.params.isEditor) {\n            return true;\n        }\n    }\n\n    return false;\n};\n\n/**\n * Tries to parse a string value into an number and reurns this value. If the string is undefined\n * or if the string does not represent a valid number, undefined is returned\n *\n * @param value The string representing the number to be parsed\n */\nexport const tryParseInt = (value: string | undefined): number | undefined => {\n    if (value) {\n        const parsedValue = parseInt(value, 10);\n        return isNaN(parsedValue) ? undefined : parsedValue;\n    }\n    return undefined;\n};\n\n/**\n * Name of internal component fragment, must be all lower case\n */\nexport const SDK_FRAGMENT_NAME = 'platform.saferendermodule';\n\n/**\n * Regex constant for capturing the internal fragment name with data-reactroot that is occasionally emitted\n */\nexport const SDK_FRAGMENT_NAME_REGEX = /<[/]?platform\\.saferendermodule( data-reactroot=[\"].*[\"])?>/gi;\n\n/**\n * Hepler function to build a URL to get the asset\n * @param assetPath the path to the asset\n */\nexport const getAsset = (assetPath: string, context: IRequestContext) => {\n    let assetUrl: string = '';\n    if (context.url.staticCdnUrl) {\n        assetUrl += context.url.staticCdnUrl;\n    }\n    if (assetPath.length > 0 && assetPath.charAt(0) === '/') {\n        assetPath = assetPath.substr(1);\n    }\n    const submissionId = msdyn365Commerce.getEnvironmentVariable('SUBMISSIONID');\n    if (!submissionId || submissionId === 'undefined') {\n        return `${assetUrl}${`${assetPath}`.replace(/\\/+/g, '/')}`;\n    } else {\n        return `${assetUrl}${`${submissionId}/${assetPath}`.replace(/\\/+/g, '/')}`;\n    }\n};\n\nexport const CurrencyCodeIdentifier = 'cc';\nexport const getCurrencyCodeFromContext = (requestContext: IRequestContext) => {\n    return (\n        (requestContext && requestContext.query && requestContext.query[CurrencyCodeIdentifier]) ||\n        (requestContext.cookies && requestContext.cookies.get<string>(CurrencyCodeIdentifier).value) ||\n        (requestContext.channel && requestContext.channel.Currency) ||\n        getCurrency(requestContext.locale)\n    );\n};\n\nexport const isNonceEnabled = (requestContext: IRequestContext) => {\n    const contentSecurityPolicy = requestContext.app && requestContext.app.contentSecurityPolicy;\n    const nonceToken = contentSecurityPolicy && contentSecurityPolicy.nonceToken;\n    return contentSecurityPolicy && !contentSecurityPolicy.disableContentSecurityPolicy && contentSecurityPolicy.enableNonce && nonceToken;\n};\n\nexport const verboseLogger = (\n    context: IRequestContext,\n    telemetry: IInternalTelemetry | ITelemetry,\n    messageTemplate: string,\n    logOptions?: InternalTelemetryLogOptions | undefined,\n    logLevel: LogLevel = LogLevel.Information\n) => {\n    if (context && context.features && !!context.features.enable_verbose_logs) {\n        telemetry.log(logLevel, messageTemplate, logOptions);\n    }\n};\n\nexport const isVerboseLogEnabled = (context: IRequestContext): boolean => {\n    return context && context.features && !!context.features.enable_verbose_logs;\n};\n\nexport const checkVersionForFeature = (feature: string): boolean => {\n    if (msdyn365Commerce.getVersionDependentFeatureInfo && msdyn365Commerce.getVersionDependentFeatureInfo[feature]) {\n        return msdyn365Commerce.getVersionDependentFeatureInfo[feature];\n    }\n    return false;\n};\n\nexport const skipConsoleWarn = () => {\n    const originalConsole = { ...console };\n    let showDebug = true;\n    if (process.env.NODE_ENV !== 'development') {\n        showDebug = false;\n    }\n    console.warn = (message: string) => {\n        if (showDebug) {\n            originalConsole.warn(message);\n        }\n    };\n};\n\nexport const skipConsoleInfo = () => {\n    const originalConsole = { ...console };\n    let showDebug = true;\n    if (process.env.NODE_ENV !== 'development') {\n        showDebug = false;\n    }\n    // eslint-disable-next-line no-console\n    console.info = (message: string) => {\n        if (showDebug) {\n            originalConsole.info(message);\n        }\n    };\n};\n\n/**\n * Returns true if the given string matches an URL pattern\n *\n * @param source The string to check against\n */\nexport const isAbsoluteUrl = (source: string): boolean => {\n    return /^(http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/.test(source);\n};\n\n// isOBORequest representing whether current user is on behalf of or not\nexport const isOboRequest = (requestContext: IRequestContext): boolean => {\n    const { user } = requestContext;\n    return user.isOBORequest || false;\n};\n\n// get customer account number\nexport const getCustomerAccountNumber = (requestContext: IRequestContext): object => {\n    const accountSelectionCookie = requestContext?.cookies?.getAccountSelectionCookie();\n    const isOBORequest = isOboRequest(requestContext);\n    if (!isEmptyOrWhitespace(accountSelectionCookie) && isOBORequest) {\n        const accountSelectionCookieValue = accountSelectionCookie;\n        const accountSelectionCustomerIdParts: string[] = accountSelectionCookieValue.split(':');\n        return { can: accountSelectionCustomerIdParts[1], isObo: true };\n    }\n    return { can: undefined, isObo: false };\n};\n\n// get customer account number for both B2B and B2C.\nexport const getCustomerAccountNumberForAllChannelType = (requestContext: IRequestContext): string | undefined => {\n    if (isChannelTypeB2B(requestContext)) {\n        const customerAccountNumber = getCustomerAccountNumber(requestContext) as { can: string; isObo: boolean };\n        return customerAccountNumber.isObo ? customerAccountNumber.can : requestContext.user.customerAccountNumber;\n    }\n    return requestContext.user.customerAccountNumber;\n};\n\n/**\n * Verifies whether the string is empty or whitespace, but not null.\n *\n * @param {string} string The string.\n * @return {boolean} True if the string is empty or whitespace, false otherwise.\n */\nconst isEmptyOrWhitespace = (str: string): boolean => {\n    if (str && typeof str !== 'string') {\n        // Tracer.Error(\"StringExtensions.isEmptyOrWhitespace() has received input parameter not of type string.\");\n    }\n    if (str) {\n        // Make sure type string\n        str = str.toString();\n\n        return typeof str.trim === 'function' && (str.trim() || '').length === 0;\n    }\n    return false;\n};\n\n/**\n * Verifies whether the current channel is of type b2b.\n *\n * @param requestContext Current request context.\n * @return {boolean} True if the channel type is b2b.\n */\nexport const isChannelTypeB2B = (requestContext: IRequestContext): boolean => {\n    return requestContext.apiSettings?.channelCustomerType?.toLowerCase() === 'b2b';\n};\n\n/**\n * Verifies whether the current context is of b2b.\n *\n * @param requestContext Current request context.\n * @return {boolean} True if either its oboRequest or user type is b2b.\n */\nexport const isUserTypeB2B = (requestContext: IRequestContext): boolean => {\n    return requestContext.user?.isB2b || false || requestContext.user?.isOBORequest || false;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Error class for wysiwyg inline edits\n */\nexport class EditError extends Error {\n    public static readonly Name: string = 'EditError';\n\n    public error?: unknown;\n\n    public required?: boolean;\n\n    /**\n     * Edit Errors\n     * @param error Original Error\n     */\n    constructor(error: string | Error, name?: string, required?: boolean) {\n        super();\n        this.name = name || PROPERTY_DISABLED;\n        if (error instanceof Error) {\n            this.message = error.message;\n            this.error = error;\n        }\n\n        this.required = required;\n\n        // As of Typescript 2.1 if we extend the Error object the prototype must be set explicitly\n        // See: https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n        Object.setPrototypeOf(this, EditError.prototype);\n    }\n}\n\nexport const PROPERTY_DISABLED = '_MSDYN365_PROPERTY_DISABLED_';\n\nexport const PROPERTY_INIT = '_MSDYN365_PROPERTY_INIT_';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IRequestContext } from '../../interfaces';\nimport { isAuthoringEditEnabled } from '../helper';\n\nconst EDITABLE_FIELD_CLASS = 'ms-editable-field';\n\nexport const getEditableFieldClassName = (disabled?: boolean, className?: string, requestContext?: IRequestContext) => {\n    if (!!disabled) {\n        return isAuthoringEditEnabled(requestContext) ? `${EDITABLE_FIELD_CLASS} ${className || ''}` : className;\n    } else {\n        return isAuthoringEditEnabled(requestContext) ? `${EDITABLE_FIELD_CLASS} enabled ${className || ''}` : className;\n    }\n};\n\nexport const isEditorialMode = (requestContext?: IRequestContext) => {\n    if (!requestContext) {\n        return false;\n    }\n    return !!requestContext.params && requestContext.params.isEditor;\n};\n\nexport const isDefaultPlaceholderFeatureOn = (requestContext?: IRequestContext) => {\n    if (!requestContext) {\n        return false;\n    }\n    return requestContext.features && requestContext.features.enableDefaultPlaceholder;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { useEffect } from 'react';\nimport { placeholderImageUrl } from '../../components/image';\nimport { IAny, IGeneric } from '../../interfaces';\nimport { IEditableFieldProps } from './editable-field';\nimport { getEditableFieldClassName, isEditorialMode } from './utils';\n\nexport const ImageField = (props: IEditableFieldProps<IGeneric<IAny>>) => {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const [svgRenderer, setSvgRenderer] = React.useState<(svgProps: any) => JSX.Element>();\n    const onKeyPress = (event: React.KeyboardEvent<HTMLImageElement>) => {\n        // 'enter' key\n        if (event.charCode === 13 && props.onChange) {\n            event.preventDefault();\n            props.onChange(event);\n        }\n    };\n\n    const editableProps = props.disabled\n        ? {}\n        : {\n              onKeyPress: onKeyPress,\n              onDoubleClick: props.onChange,\n              onMouseOver: props.onMouseOver,\n              onFocus: props.onFocus,\n              onBlur: props.onBlur,\n              onMouseOut: props.onMouseOut,\n              tabIndex: 0\n          };\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const fieldProps: any = {\n        ...props.fieldProps,\n        editProps: undefined\n    };\n\n    // If the image source is the placeholder image, set it's height to 1px\n    if (\n        props.fieldProps.src === placeholderImageUrl &&\n        (!props.fieldProps['data-src'] || props.fieldProps['data-src'] === placeholderImageUrl)\n    ) {\n        fieldProps.height = '1px';\n    }\n\n    useEffect(() => {\n        // if we are in editorial mode(WYSIWYG), dynamically load svg chunk and render placeholder SVG for empty images\n        if (fieldProps.placeholderConfig && props.requestContext && isEditorialMode(props.requestContext)) {\n            void import('../svg-loader').then(svg => {\n                let SvgComponent: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n                switch (fieldProps.placeholderConfig?.name) {\n                    case svg.DEFAULT_PLACEHOLDER:\n                        SvgComponent = svg.default.largePicturePlaceholder;\n                        break;\n                    // TODO:Add more case when we get full assets of placeholder SVGs\n                    case svg.LARGE_IMAGE_PLACEHOLDER:\n                        SvgComponent = svg.default.largePicturePlaceholder;\n                        break;\n                    case svg.SMALL_IMAGE_PLACEHOLDER:\n                        SvgComponent = svg.default.smallPicturePlaceholder;\n                        break;\n                    case svg.TEST_PLACEHOLDER:\n                        SvgComponent = svg.default.testPlaceholder;\n                        break;\n                    default:\n                        SvgComponent = svg.default.largePicturePlaceholder;\n                }\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                setSvgRenderer(() => (svgProps: React.SVGAttributes<SVGElement>) => {\n                    return <SvgComponent {...svgProps} />;\n                });\n            });\n        }\n    }, [fieldProps.placeholderConfig]);\n\n    if (fieldProps.placeholderConfig && props.requestContext && isEditorialMode(props.requestContext)) {\n        const divStyle = {\n            display: 'flex',\n            backgroundColor: '#F2F2F2',\n            alignItems: 'center',\n            width: (fieldProps.placeholderConfig.svgConfig && fieldProps.placeholderConfig.svgConfig.width) || '100%',\n            height: (fieldProps.placeholderConfig.svgConfig && fieldProps.placeholderConfig.svgConfig.height) || '100%'\n        };\n        const svgStyle = {\n            margin: '0 auto',\n            display: 'block'\n        };\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const svgPropety: React.SVGAttributes<SVGElement> = {\n            style: svgStyle\n        };\n        return (\n            <div\n                style={divStyle}\n                {...editableProps}\n                className={getEditableFieldClassName(props.disabled, props.fieldProps.className, props.requestContext)}\n            >\n                {svgRenderer && svgRenderer(svgPropety)}\n            </div>\n        );\n    }\n    if (fieldProps.imageFallbackOptimize) {\n        return (\n            <div>\n                <img\n                    {...fieldProps}\n                    {...editableProps}\n                    className={`${getEditableFieldClassName(\n                        props.disabled,\n                        props.fieldProps.className,\n                        props.requestContext\n                    )} msc-img_fallback_optimize`}\n                    {...(props.fieldProps.additionalProperties || {})}\n                />\n            </div>\n        );\n    } else {\n        return (\n            <img\n                {...fieldProps}\n                {...editableProps}\n                className={getEditableFieldClassName(props.disabled, props.fieldProps.className, props.requestContext)}\n                {...(props.fieldProps.additionalProperties || {})}\n            />\n        );\n    }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { Component } from 'react';\nimport ContentEditable, { ContentEditableEvent } from 'react-contenteditable';\nimport { FieldType, IEditableFieldProps, IText } from './editable-field';\nimport { getEditableFieldClassName } from './utils';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet domPurify: any;\n/**\n * Component class for text field\n */\nexport class TextField extends Component<IEditableFieldProps<IText>, { displayHtml: string }> {\n    private isEmpty: boolean;\n    constructor(props: { isFocused: boolean } & IEditableFieldProps<IText>) {\n        super(props);\n        this.state = {\n            displayHtml: props.fieldProps.text\n        };\n        if (this.props.requestContext?.params?.isEditor) {\n            // Separating dompurify into a new separate chunk to only download and load when needed in editor mode\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            import(/* webpackChunkName: \"msdyn365-dompurify-chunk\" */ 'dompurify').then(dp => {\n                if (dp && dp.default) {\n                    domPurify = dp.default;\n                }\n            });\n        }\n\n        this._onChange = this._onChange.bind(this);\n        this._onBlur = this._onBlur.bind(this);\n        this._onFocus = this._onFocus.bind(this);\n        this.isEmpty = false;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/naming-convention\n    public UNSAFE_componentWillReceiveProps(nextProps: IEditableFieldProps<IText>): void {\n        if (this.props.fieldProps.text !== nextProps.fieldProps.text) {\n            this.isEmpty = this._isTextEmpty(nextProps.fieldProps.text);\n\n            // hook to handle props changes - when a field is changed between edit enabled/disabled states\n            // eslint-disable-next-line react/no-direct-mutation-state\n            this.state = {\n                displayHtml: this._getDisplayText(nextProps.fieldProps.text)\n            };\n        }\n    }\n\n    public render(): JSX.Element | null {\n        if (!!this.props.disabled) {\n            return this.props.fieldProps.text ? (\n                <ContentEditable\n                    html={this.state.displayHtml}\n                    tagName={this.props.fieldProps.tag}\n                    disabled={true}\n                    onChange={this._onChange}\n                    className={getEditableFieldClassName(true, this.props.fieldProps.className, this.props.requestContext)}\n                />\n            ) : null;\n        }\n\n        return (\n            <ContentEditable\n                html={this.state.displayHtml}\n                tagName={this.props.fieldProps.tag}\n                disabled={false}\n                onChange={this._onChange || this._onChange}\n                onFocus={this.props.onFocus || this._onFocus}\n                onBlur={this.props.onBlur || this._onBlur}\n                onMouseOver={this.props.onMouseOver}\n                onMouseOut={this.props.onMouseOut}\n                className={getEditableFieldClassName(false, this.props.fieldProps.className, this.props.requestContext)}\n                {...(this.props.fieldProps.additionalProperties || {})}\n            />\n        );\n    }\n\n    private _onChange(event: ContentEditableEvent): void {\n        if (this.props.onChange) {\n            const displayValue =\n                this.props.type === FieldType.Text || this.props.type === FieldType.Link\n                    ? event.currentTarget.innerText\n                    : event.target.value;\n            this.isEmpty = this._isTextEmpty(displayValue);\n            this.setState({\n                displayHtml: !this.isEmpty ? displayValue : ''\n            });\n            event.target.value = displayValue;\n            this.props.onChange(event);\n        }\n    }\n    private _onFocus(event: React.FocusEvent<HTMLDivElement>): void {\n        const displayText = this._getDisplayText(this.props.fieldProps.text);\n        if (this.isEmpty && !!this.props.fieldProps.required && displayText === 'Click to Edit') {\n            this.setState({\n                displayHtml: ' '\n            });\n        }\n    }\n\n    private _onBlur(event: React.FocusEvent<HTMLDivElement>): void {\n        if (this.isEmpty && !!this.props.fieldProps.required) {\n            this.setState({\n                displayHtml: this._getDisplayText(this.props.fieldProps.text)\n            });\n        }\n    }\n\n    private _getDisplayText(text: string): string {\n        return !!this.props.fieldProps.required && this.isEmpty ? this.props.placeholderText || 'Click to Edit' : text;\n    }\n\n    private _isTextEmpty(text: string): boolean {\n        if (domPurify) {\n            const sanitizedText = domPurify\n                .sanitize(text, {\n                    ALLOWED_TAGS: []\n                })\n                .replace(/\\n/, '');\n\n            return sanitizedText === '';\n        }\n        return false;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { IEditableFieldProps, ILink } from './editable-field';\nimport { TextField } from './text-field';\n\nexport const LinkField = (props: IEditableFieldProps<ILink>) => {\n    const onClick = (event: React.SyntheticEvent) => {\n        if (!props.disabled) {\n            event.preventDefault();\n        }\n        if (props.fieldProps.onClick) {\n            props.fieldProps.onClick(event);\n        }\n    };\n    return (\n        // eslint-disable-next-line react/jsx-no-target-blank\n        <a\n            key={props.fieldProps.key}\n            className={props.fieldProps.className}\n            role={props.fieldProps.role}\n            title={props.fieldProps.title || props.fieldProps.text}\n            href={props.fieldProps.href}\n            aria-label={props.fieldProps.ariaLabel}\n            target={props.fieldProps.openInNewTab ? '_blank' : undefined}\n            onClick={onClick}\n            {...(props.fieldProps.additionalProperties || {})}\n        >\n            <TextField\n                {...props}\n                fieldProps={{\n                    text: props.fieldProps.text || '',\n                    tag: props.fieldProps.linkTag,\n                    className: props.fieldProps.innerClassName\n                }}\n            />\n        </a>\n    );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { IAny, IGeneric, IVideoData } from '../../interfaces';\nimport { IEditableFieldProps } from './editable-field';\nimport { getEditableFieldClassName } from './utils';\n\nexport const VideoField = (props: IEditableFieldProps<IGeneric<IAny> & { children?: JSX.Element }>) => {\n    const onKeyPress = (event: React.KeyboardEvent<HTMLImageElement>) => {\n        // 'enter' key\n        if (event.charCode === 13 && props.onChange) {\n            event.preventDefault();\n            props.onChange(event);\n        }\n    };\n    const editableProps = props.disabled\n        ? {}\n        : {\n              onKeyPress: onKeyPress,\n              onDoubleClick: props.onChange,\n              onMouseOver: props.onMouseOver,\n              onFocus: props.onFocus,\n              onBlur: props.onBlur,\n              onMouseOut: props.onMouseOut,\n              tabIndex: 0\n          };\n\n    const key = (props.editPropKey as IVideoData)?.id;\n\n    return (\n        <div\n            key={key}\n            {...editableProps}\n            role={props.fieldProps.role || 'presentation'}\n            className={getEditableFieldClassName(props.disabled, props.fieldProps.className, props.requestContext)}\n        >\n            {props.fieldProps.children}\n        </div>\n    );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { ContentEditableEvent } from 'react-contenteditable';\nimport { IDictionary, IRequestContext } from '../../interfaces';\nimport { isAuthoringEditEnabled } from '../helper';\nimport { EditError, PROPERTY_DISABLED, PROPERTY_INIT } from './edit-errors';\nimport { ImageField } from './image-field';\nimport { LinkField } from './link-field';\nimport { TextField } from './text-field';\nimport { VideoField } from './video-field';\n\nconst CLIENT_DATA_UPDATE_EVENT = '_msdyn365_client_data_update';\n\nexport const WYSIWYG_INIT = '__MSDYN365_WYSIWYG_INIT__';\n\nexport interface IText {\n    tag?: string;\n    text: string;\n    required?: boolean;\n    className?: string;\n    additionalProperties?: IDictionary<string>;\n}\n\nexport interface ILink {\n    title: string;\n    text: string;\n    key: string;\n    openInNewTab: boolean;\n    className?: string;\n    innerClassName?: string;\n    href?: string;\n    role?: string;\n    ariaLabel: string;\n    additionalProperties?: IDictionary<string>;\n    linkTag?: string;\n    onClick?(ev: React.SyntheticEvent): void;\n}\n\nexport interface ITextEditProps {\n    requestContext: IRequestContext;\n    placeholderText?: string;\n    onEdit(event: ContentEditableEvent): void;\n}\n\nexport interface IEditProps {\n    key: object;\n    requestContext: IRequestContext;\n    imagePropertyName?: string;\n    moduleType?: string;\n    layout?: string;\n    moduleId?: string;\n}\n\nexport interface IEditableFieldProps<T> {\n    editPropKey?: object;\n    requestContext?: IRequestContext;\n    placeholderText?: string;\n    disabled?: boolean;\n    fieldProps: T;\n    type?: FieldType;\n    children?: JSX.Element;\n    onChange?(event: React.SyntheticEvent): void;\n    onMouseOver?(event: React.SyntheticEvent): void;\n    onMouseOut?(event: React.SyntheticEvent): void;\n    onFocus?(event: React.SyntheticEvent): void;\n    onBlur?(event: React.SyntheticEvent): void;\n}\n\ninterface IEditableFieldState {\n    isDisabled: boolean;\n}\n\nexport enum FieldType {\n    Text,\n    RichText,\n    Image,\n    Video,\n    Link\n}\n\n/**\n * Editable field component, containing all the logic for inline editable properties in editorial preview\n * Current support: text, image\n */\nexport class EditableField extends React.Component<IEditableFieldProps<any>, IEditableFieldState> {\n    private _isRequired: boolean;\n    public constructor(props: IEditableFieldProps<any>) {\n        super(props);\n        this._onChangeHandler = this._onChangeHandler.bind(this);\n        this._isRequired = false;\n\n        let isDisabled: boolean = props.disabled || true;\n        if (this.props.fieldProps.placeholderConfig) {\n            isDisabled = false;\n        }\n        this.state = {\n            isDisabled: isDisabled\n        };\n    }\n\n    public componentDidMount(): void {\n        this._checkDisabledStatus();\n    }\n\n    // eslint-disable-next-line @typescript-eslint/naming-convention\n    public UNSAFE_componentWillReceiveProps(nextProps: IEditableFieldProps<any>): void {\n        // hook to handle props changes - when a field is changed between edit enabled/disabled states\n        this._checkDisabledStatus();\n    }\n\n    public render(): JSX.Element | null {\n        const props = this.props;\n        const enabled = !this.state.isDisabled;\n        // For integration test, to verify 'Click to Edit' functionality\n        const testCafeFlag = props.requestContext?.query?.testCafe || false;\n\n        switch (props.type) {\n            case FieldType.Text:\n            case FieldType.RichText:\n                props.fieldProps.required = this._isRequired || testCafeFlag;\n                return <TextField disabled={!!!enabled} {...props} onChange={this._onChangeHandler} />;\n            case FieldType.Image:\n                return <ImageField disabled={!!!enabled} {...props} onChange={this._onChangeHandler} />;\n            case FieldType.Video:\n                const videoProps: IEditableFieldProps<any> = {\n                    ...this.props,\n                    disabled: !!!enabled,\n                    onChange: this._onChangeHandler\n                };\n                return videoProps.fieldProps.children ? <VideoField {...videoProps} /> : null;\n            case FieldType.Link:\n                return <LinkField type={FieldType.Link} {...props} disabled={!!!enabled} onChange={this._onChangeHandler} />;\n            default:\n                return null;\n        }\n    }\n    private _fireClientDataUpdateEventForImagePlaceholder = (placeholderConfig?: any) => {\n        if (!placeholderConfig.imagePropertyName || !placeholderConfig.moduleId) {\n            return;\n        }\n\n        const disabledProperties: string[] = (window as any)._msdyn365.authoringHelper.getDisabledProperties(placeholderConfig.moduleId);\n        if ((disabledProperties || []).length > 0) {\n            if (disabledProperties.length === 1 && disabledProperties[0] === '*') {\n                return;\n            }\n            const fullPath: string = placeholderConfig.imagePropertyName as string;\n            if (disabledProperties.filter(p => fullPath === p || fullPath.startsWith(`${p}.`)).length > 0) {\n                return;\n            }\n        }\n\n        document.dispatchEvent(\n            new CustomEvent(CLIENT_DATA_UPDATE_EVENT, {\n                detail: { moduleId: placeholderConfig.moduleId, property: [placeholderConfig.imagePropertyName] }\n            })\n        );\n    };\n    private _onChangeHandler(event: React.SyntheticEvent | { target: { value: string } }): void {\n        try {\n            const target: any = event?.target;\n            const value: any = target?.value;\n            if (this.props?.fieldProps?.placeholderConfig && value !== WYSIWYG_INIT) {\n                this._fireClientDataUpdateEventForImagePlaceholder(this.props.fieldProps.placeholderConfig);\n                return;\n            }\n\n            if (this.props.onChange) {\n                const eventObj: any = event;\n                this.props.onChange(eventObj);\n            }\n\n            if (this.props.editPropKey) {\n                const binding: any = this.props.editPropKey;\n                const eventTarget: any = event.target;\n                binding.$type = eventTarget.value;\n            }\n        } catch (e) {\n            // if property is disabled, disable editing\n            if (e instanceof EditError) {\n                if (e.name === PROPERTY_DISABLED) {\n                    this._updateStatus(true);\n                } else if (e.name === PROPERTY_INIT) {\n                    this._updateStatus(false);\n                    this._isRequired = !!e.required;\n                }\n            }\n        }\n    }\n\n    private _checkDisabledStatus(): void {\n        if (isAuthoringEditEnabled(this.props.requestContext)) {\n            this._onChangeHandler({ target: { value: WYSIWYG_INIT } });\n        }\n    }\n\n    private _updateStatus(status: boolean): void {\n        if (status !== this.state.isDisabled) {\n            this.setState({\n                isDisabled: status\n            });\n        }\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICommerceApiSettings } from '../../contract/ICommerceApiSettings';\nimport { IGridSettings } from '../../contract/IGridSettings';\nimport { IAny, IGeneric } from '../../interfaces';\nimport { IImageData } from '../../interfaces/data-types/IImageData';\nimport { IImageDimension, IImageSettings } from '../../interfaces/data-types/IImageSettings';\nimport { Viewport } from './image-types/native-image';\n\nconst CROP_FOCAL_REGION = 'cropfocalregion';\n\nconst enum externalProviderName {\n    sitecore = 'sitecore'\n}\n\nexport const getLargestGridSettingViewportName = (gridSettings: IGridSettings): Viewport => {\n    return (\n        (gridSettings &&\n            ((gridSettings.xl && 'xl') ||\n                (gridSettings.lg && 'lg') ||\n                (gridSettings.md && 'md') ||\n                (gridSettings.sm && 'sm') ||\n                (gridSettings.xs && 'xs'))) ||\n        'xl'\n    );\n};\n\nconst formatMediaQuery = (max?: number, min?: number) =>\n    `${min ? `(min-width:${min}px)${max ? ' and ' : ''}` : ''}${max ? `(max-width:${max}px)` : ''}`;\n\nconst getMedia = (\n    gridSettings: IGridSettings,\n    imageSettings: IImageSettings,\n    viewport: Viewport,\n    largestGridSettingViewportName: Viewport\n) => {\n    const { max, min } = getMinMaxWidth(gridSettings, imageSettings, viewport, largestGridSettingViewportName);\n    return formatMediaQuery(max, min);\n};\n\nexport const getMinMaxWidth = (\n    gridSettings: IGridSettings,\n    imageSettings: IImageSettings,\n    viewport: Viewport,\n    largestGridSettingViewportName: Viewport\n): { max?: number; min?: number } => {\n    const gridSetting = gridSettings[viewport];\n    const max: number | undefined = gridSetting && gridSetting.w;\n    if (!max) {\n        return {};\n    }\n    // find first setting smaller than max\n    const min = [\n        imageSettings.viewports.xl && gridSettings.xl && gridSettings.xl.w,\n        imageSettings.viewports.lg && gridSettings.lg && gridSettings.lg.w,\n        imageSettings.viewports.md && gridSettings.md && gridSettings.md.w,\n        imageSettings.viewports.sm && gridSettings.sm && gridSettings.sm.w,\n        imageSettings.viewports.xs && gridSettings.xs && gridSettings.xs.w\n    ]\n        .filter(Boolean)\n        .find(setting => setting && setting < max);\n    return { max: viewport !== largestGridSettingViewportName ? max : undefined, min: min ? min + 1 : min };\n};\n\nexport const getImageResizeUrl = (\n    imageSrc: string | undefined,\n    vpSetting: IImageDimension | undefined,\n    inputImageSettings?: IImageSettings | undefined,\n    skipWidthAndHeightSettings?: boolean,\n    externalProvider?: string,\n    apiSettings?: ICommerceApiSettings\n): string => {\n    if (!imageSrc) {\n        return '';\n    }\n    if (imageSrc.startsWith('svg.')) {\n        return imageSrc;\n    }\n\n    try {\n        let queryString;\n\n        if (isSitecoreCmsProviderUrl(externalProvider, apiSettings, imageSrc)) {\n            imageSrc = santizeSitecoreImageUrl(apiSettings, imageSrc);\n            if (vpSetting && vpSetting.qe) {\n                queryString = vpSetting.qe;\n            } else {\n                queryString = '';\n            }\n        } else {\n            if (vpSetting && vpSetting.q) {\n                queryString = vpSetting.q;\n            } else {\n                queryString = 'm=6';\n\n                if (vpSetting && vpSetting.w && vpSetting.h) {\n                    queryString = `${queryString}&w=${vpSetting.w}&h=${vpSetting.h}`;\n                }\n\n                if (inputImageSettings && inputImageSettings.quality) {\n                    queryString = `${queryString}&q=${inputImageSettings.quality}`;\n                }\n            }\n\n            if (inputImageSettings && queryString && queryString.length > 0) {\n                queryString = updateImageResizerQueryString(queryString, inputImageSettings);\n            }\n        }\n\n        const srcUrl = new URL(imageSrc);\n        if (srcUrl.search) {\n            srcUrl.search += `&${queryString}`;\n        } else {\n            srcUrl.search += queryString;\n        }\n\n        if (skipWidthAndHeightSettings) {\n            const params = srcUrl.searchParams;\n            // remove w and h parameters from query string so the image is not adjusted with white background\n            if (params.has('w')) {\n                params.delete('w');\n            }\n            if (params.has('h')) {\n                params.delete('h');\n            }\n        }\n        return srcUrl.href;\n    } catch (e) {\n        return imageSrc;\n    }\n};\n\nexport const getSourceData = (\n    src: string | undefined,\n    gridSetting: IGridSettings,\n    image: IImageData,\n    imageSettings: IImageSettings,\n    viewport: Viewport,\n    largestGridSettingViewportName: Viewport,\n    imageAttributes: IGeneric<IAny>\n) => {\n    if (!image || !src || !imageSettings || !imageSettings.viewports || !imageSettings.viewports[viewport]) {\n        return;\n    }\n\n    const media = getMedia(gridSetting, imageSettings, viewport, largestGridSettingViewportName);\n    if (!media) {\n        return;\n    }\n\n    const srcSet = getImageResizeUrl(\n        src,\n        imageSettings.viewports[viewport],\n        imageSettings,\n        undefined,\n        imageAttributes?.externalProvider,\n        imageAttributes?.requestContext?.apiSettings\n    );\n    if (!srcSet) {\n        return;\n    }\n    return {\n        media,\n        srcSet\n    };\n};\n\n/**\n * This function reads the mode and background color values from ImageSettings and replaces the Image resizer query string\n * @param queryString ImageResizer query string\n * @param inputImageSettings Image Settings\n * @returns Updated ImageResizer query string with mode and background color\n */\nconst updateImageResizerQueryString = (queryString: string, inputImageSettings: IImageSettings): string => {\n    const parsedQueryString = new URLSearchParams(queryString);\n    if (inputImageSettings.mode) {\n        parsedQueryString.set('m', inputImageSettings.mode.toString());\n    }\n\n    if (inputImageSettings.backgroundColor) {\n        // Reading background color from site builder\n        parsedQueryString.set('b', inputImageSettings.backgroundColor);\n\n        // Converting image to jpg format, as background color in padding will only work if the image type is of format jpg,\n        if (!parsedQueryString.has('f') || parsedQueryString.get('f') !== 'jpg') {\n            parsedQueryString.set('f', 'jpg');\n        }\n    }\n\n    if (inputImageSettings && inputImageSettings.cropFocalRegion) {\n        parsedQueryString.set(CROP_FOCAL_REGION, 'true');\n    }\n    return parsedQueryString.toString();\n};\n\n/**\n * Function that checks if the product or category image url are from an external cms provider\n * @param externalProvider external provider string\n * @param apiSettings apiSettings\n * @returns Boolean\n */\nconst isSitecoreCmsProviderUrl = (\n    externalProvider: string | undefined,\n    apiSettings: ICommerceApiSettings | undefined,\n    imageSrc: string\n) => {\n    const siteCoreBaseUrl = apiSettings?.externalCmsBaseUrls && apiSettings?.externalCmsBaseUrls[externalProviderName.sitecore];\n    if (\n        (externalProvider && externalProvider === externalProviderName.sitecore) ||\n        (siteCoreBaseUrl && imageSrc.includes(siteCoreBaseUrl))\n    ) {\n        return true;\n    } else {\n        return false;\n    }\n};\n\nconst santizeSitecoreImageUrl = (apiSettings: ICommerceApiSettings | undefined, imageSrc: string) => {\n    const siteCoreBaseUrl = apiSettings?.externalCmsBaseUrls && apiSettings?.externalCmsBaseUrls[externalProviderName.sitecore];\n    let baseImageUrl = apiSettings?.baseImageUrl;\n    if (siteCoreBaseUrl && imageSrc.includes(siteCoreBaseUrl) && siteCoreBaseUrl === baseImageUrl) {\n        const imageUrl = decodeURIComponent(imageSrc.replace(baseImageUrl, ''));\n        // Santize products image url to format sitecore accepts.\n        const imageName = imageUrl.replace(/[^a-zA-Z\\/\\d_.\\?=]/g, '!');\n        baseImageUrl = validateBaseImageUrl(baseImageUrl, imageName);\n        return baseImageUrl.concat(imageName);\n    }\n    return imageSrc;\n};\n\n/**\n * Function SSK uses to identify and construct sitecore image url\n * @param apiSettings apisettings\n * @param imageSrc imagesrc\n * @returns imageurl\n */\nexport const generateImageUrl = (apiSettings: ICommerceApiSettings, imageSrc: string | undefined) => {\n    if (imageSrc) {\n        if (imageSrc.startsWith('http')) {\n            return imageSrc;\n        }\n        const baseImageUrl = validateBaseImageUrl(apiSettings.baseImageUrl, imageSrc);\n        const imageUrl = baseImageUrl.concat(imageSrc);\n        if (isSitecoreCmsProviderUrl(undefined, apiSettings, imageUrl)) {\n            return santizeSitecoreImageUrl(apiSettings, imageUrl);\n        } else {\n            return baseImageUrl.concat(encodeURIComponent(imageSrc));\n        }\n    }\n    return undefined;\n};\n\n/**\n * Function to generate product image url for Omni scenarios.\n * @param apiSettings apisettings\n * @param imageSrc imageSrc\n * @returns imageurl\n */\nexport const generateImageUrlForOmniChanel = (apiSettings: ICommerceApiSettings, imageSrc: string | undefined) => {\n    if (imageSrc) {\n        if (imageSrc.startsWith('http')) {\n            return imageSrc;\n        }\n        if (!apiSettings.imageResizerEndPoint) {\n            return undefined;\n        }\n        const baseImageUrl = validateBaseImageUrl(apiSettings.imageResizerEndPoint, imageSrc);\n\n        const imageUrl = baseImageUrl.concat(imageSrc);\n        if (isSitecoreCmsProviderUrl(undefined, apiSettings, imageUrl)) {\n            return santizeSitecoreImageUrl(apiSettings, imageUrl);\n        } else {\n            return baseImageUrl.concat(encodeURIComponent(imageSrc));\n        }\n    }\n    return undefined;\n};\n\nexport const validateBaseImageUrl = (baseImageUrl: string, imageSrc: string) => {\n    if (!baseImageUrl.endsWith('/') && !imageSrc.startsWith('/')) {\n        return baseImageUrl.concat('/');\n    }\n    return baseImageUrl;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { cloneDeep as _cloneDeep, get as _get } from 'lodash';\nimport { IPartnerThemeSettings, IViewPort } from '../../interfaces';\n\n/**\n * Constructs the viewport information for an image using the current module and theme settings\n * Also constructs the query string for the image resizer\n *\n * @param moduleId The id of the module\n * @param moduleConfig The config object for the module\n * @param pathToField The path to the image the field\n * @param quality The image quality selected\n * @param themeSettings The current theme settings\n * @param focalRegion The image focal region settings\n * @param cropRegions The image crop region per layout/viewport settings\n * @param format The image format\n */\nexport const constructViewportInformationForImage = (\n    moduleName: string | undefined,\n    moduleLayout: string | undefined,\n    propertyName: string | undefined,\n    themeSettings: IPartnerThemeSettings | undefined\n): unknown => {\n    if (!moduleName) {\n        return null;\n    }\n    const imageSettings = {\n        viewports: {\n            xs: {\n                width: 800,\n                height: 600\n            },\n            sm: {\n                width: 1200,\n                height: 900\n            },\n            md: {\n                width: 1600,\n                height: 900\n            },\n            lg: {\n                width: 1600,\n                height: 700\n            },\n            xl: {\n                width: 1600,\n                height: 700\n            }\n        }\n    };\n\n    // Drill down into the theme settings object for the current module, current module layout and image property name\n    if (themeSettings && themeSettings.modules && moduleLayout && propertyName) {\n        const themeSettingsForModule = themeSettings.modules[moduleName];\n        if (themeSettingsForModule) {\n            const themeSettingsForLayout = themeSettingsForModule.properties[moduleLayout];\n            if (themeSettingsForLayout) {\n                const imageViewportProperties = _get(themeSettingsForLayout.properties, [propertyName], { properties: imageSettings })\n                    .properties;\n                // Clone the image viewport properties from theme settings\n                // so that the proxy traps do not affect the global themesettings\n                imageSettings.viewports = _cloneDeep(imageViewportProperties);\n            }\n        }\n    }\n    // resolve .h and .w propety from .height and .width of viewports.\n    // need to keep those ts-ignore because both .w and .width could be passed to viewPort.\n    Object.keys(imageSettings.viewports).forEach((key2: string) => {\n        const key = <keyof IViewPort>key2;\n        if (imageSettings.viewports[key].height) {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            (<any>imageSettings.viewports[key]).h = (<any>imageSettings.viewports[key]).h || imageSettings.viewports[key].height;\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            delete (<any>imageSettings.viewports[key]).height;\n        }\n        if (imageSettings.viewports[key].width) {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            (<any>imageSettings.viewports[key]).w = (<any>imageSettings.viewports[key]).w || imageSettings.viewports[key].width;\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            delete (<any>imageSettings.viewports[key]).height;\n        }\n    });\n    return imageSettings.viewports;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars, react/no-find-dom-node */\nimport { IDictionary } from '@msdyn365-commerce/retail-proxy';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { IGridSettings, IImagePlaceholderConfig, IImageSettings } from '../../..';\nimport { IAny, IGeneric, IImageData, IImageDimension, IPartnerThemeSettings, IViewPort } from '../../../interfaces';\nimport { EditableField, FieldType } from '../../../utilities/editable-fields/editable-field';\nimport { isDefaultPlaceholderFeatureOn, isEditorialMode } from '../../../utilities/editable-fields/utils';\nimport { getImageResizeUrl, getLargestGridSettingViewportName, getSourceData } from '../source-builder';\nimport { constructViewportInformationForImage } from '../image-helper';\nimport { isAbsoluteUrl } from '../../../utilities/helper';\n\nexport const placeholderImageUrl = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAIBTAA7';\n\nexport type Viewport = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\nexport type PictureLoadFailureBehavior = 'default' | 'hide' | 'empty';\nconst svgPreviewImage = 'svg.';\n// query string parameter\nconst fileName = 'fileName';\n// pathname\nconst searchPath = 'search';\n\nexport interface INativeImageState {\n    loadFailed: boolean;\n    src: string;\n    loaded?: boolean;\n}\n\nexport interface INativeImageProps extends IImageData {\n    gridSettings: IGridSettings;\n    imageSettings?: IImageSettings;\n    pictureAttributes?: {\n        className?: string;\n        [attribute: string]: string | undefined;\n    };\n    className?: string;\n    loadFailureBehavior?: PictureLoadFailureBehavior;\n    parentTagToRemove?: string;\n    shouldHideOnFailure?: boolean;\n    onWillRender?: (state: INativeImageState) => void;\n    imageFallbackOptimize?: boolean;\n    bypassHideOnFailure?: boolean;\n    quality?: number;\n    [attribute: string]: unknown;\n    preserveImageSpace?: boolean;\n}\n\nexport const shouldUseDefaultSVGPlaceholder = (props: INativeImageProps) => {\n    const requestContext = props.editProps && props.editProps.requestContext;\n    // if default image placeholder feature is diabled, we dont use SVG placeholder.\n    return isEditorialMode(requestContext) && isDefaultPlaceholderFeatureOn(requestContext);\n};\n\n/**\n * Image\n */\nexport class NativeImage extends React.PureComponent<INativeImageProps, INativeImageState> {\n    private shouldHideOnFailure: boolean;\n\n    constructor(props: INativeImageProps) {\n        super(props);\n\n        this.shouldHideOnFailure = this.props.shouldHideOnFailure ?? false;\n\n        this.state = {\n            loaded: false,\n            loadFailed: false,\n            src: this.getSrcImage(props) || ''\n        };\n        // if we are in editorial mode(WYSIWYG), dynamically load svg chunk and render placeholder SVG for empty images\n        if (isEditorialMode(props.editProps?.requestContext)) {\n            void import('../../../utilities/svg-loader').then(svg => {\n                let stateSrc = this.getSrcImage(props);\n                if (!props.src && shouldUseDefaultSVGPlaceholder(props)) {\n                    stateSrc = `${svgPreviewImage}${svg.DEFAULT_PLACEHOLDER}`;\n                }\n                this.setState(prevState => ({ ...prevState, src: stateSrc || '' }));\n            });\n        }\n    }\n\n    public componentDidUpdate(prevProps: INativeImageProps): void {\n        if (this.props.src !== prevProps.src || this.props.fallBackSrc !== prevProps.fallBackSrc) {\n            this.setState({ loadFailed: false, src: this.props.src || '' });\n        }\n    }\n    public componentDidMount(): void {\n        // onError will sometimes fire before the react events get hooked up. So we\n        // cannot rely on it for determining when image load fails. Instead we also have\n        // to find the img that the Image component uses> If its complete, but naturalWidth\n        // is zero that means load failed\n        const node = ReactDOM.findDOMNode(this) as HTMLElement;\n\n        if (node && node.querySelector) {\n            const child = node.querySelector('img');\n            if (child && child.complete && child.naturalWidth === 0) {\n                if ((this.props.fallBackSrc && this.props.fallBackSrc === this.state.src) || !this.props.fallBackSrc) {\n                    this.setState({ loadFailed: true });\n                } else {\n                    this.setState({ src: this.props.fallBackSrc ? this.props.fallBackSrc : this.props.src || '' });\n                }\n                return;\n            }\n            if (child && child.complete && child.naturalWidth > 1) {\n                this.setState({ loaded: true });\n            }\n        }\n    }\n\n    public render(): JSX.Element | null {\n        if (this.props.onWillRender) {\n            this.props.onWillRender(this.state);\n        }\n\n        const { loadFailureBehavior, pictureAttributes = {}, gridSettings, fallBackSrc, ...imageAttributes } = this.props;\n        if (this.state.loadFailed || !this.state.src) {\n            if (loadFailureBehavior === 'hide') {\n                return null;\n            } else if (loadFailureBehavior === 'empty') {\n                return <div className={classnames('msc-empty_image', imageAttributes.className)} />;\n            }\n        }\n        const loaded = this.state.loaded;\n        const imageSettings = this.props.imageSettings || imageAttributes.imageSettings;\n        const largestGridSettingViewportName = getLargestGridSettingViewportName(gridSettings);\n\n        // Lazyload by default if nothing is specified\n        const lazyLoad = !imageSettings || !imageSettings.disableLazyLoad;\n\n        // render placeholder if its using SVG placeholder image\n        if (this.isUsingSVGPlaceholder(this.state.src, this.props)) {\n            return this.defaultImage(largestGridSettingViewportName, imageAttributes, lazyLoad, imageSettings);\n        }\n\n        const sourceTags: (JSX.Element | undefined)[] =\n            imageSettings && imageSettings.viewports\n                ? Object.keys(imageSettings.viewports)\n                      .map(vp =>\n                          this.getSourceTag(vp as Viewport, imageSettings, largestGridSettingViewportName, lazyLoad, imageAttributes)\n                      )\n                      .filter(Boolean) || []\n                : [];\n\n        sourceTags.push(\n            this.defaultImage(largestGridSettingViewportName, imageAttributes, lazyLoad, imageSettings, loaded, loadFailureBehavior)\n        );\n        return <picture {...pictureAttributes}>{sourceTags}</picture>;\n    }\n\n    // eslint-disable-next-line\n    private getSVGConfig = (attributes: IDictionary<any>, largestViewport?: IImageDimension) => {\n        // when add module from tools, the viewPort contains height/width instead of h/w.\n        const SVGHeight = (largestViewport && largestViewport.h) || attributes.height;\n        const SVGWidth = (largestViewport && largestViewport.w) || attributes.width;\n        return {\n            ...(SVGHeight && { height: SVGHeight }),\n            ...(SVGWidth && { width: SVGWidth }),\n            ...(this.getPlaceholderAspectRatio(this.state.src) && {\n                preserveAspectRatio: this.getPlaceholderAspectRatio(this.state.src)\n            })\n        };\n    };\n\n    // eslint-disable-next-line\n    private getSrcImage = (props: INativeImageProps) => {\n        let stateSrc: string | undefined = '';\n        // if no src indicated and we are rendering in site builder context.\n        if (props.src && props.fallBackSrc && isAbsoluteUrl(props.src)) {\n            const urlSrc = new URL(props.src);\n            const urlFallBack = new URL(props.fallBackSrc);\n            const paramsSrc = new URLSearchParams(urlSrc.search);\n            const paramsFallBack = new URLSearchParams(urlFallBack.search);\n            // when both src and fallBackSrc has fileName parameter\n            if (props.src.includes(searchPath) && paramsFallBack.has(fileName) && paramsSrc.has(fileName)) {\n                // append fileName parameter value for fallBack URL to  src URL\n                stateSrc = `${props.src}&fallback=${this.convertToMultipleExtensions(paramsFallBack.get(fileName)!)}`;\n            } else {\n                stateSrc = props.src;\n            }\n        } else {\n            stateSrc = props.src;\n        }\n        return stateSrc;\n    };\n\n    /**\n     * Converts a given string representing a file path with an extension to multiple formats.\n     * @param inputString The input string representing the file path with extension.\n     * @returns A string containing comma-separated paths for each supported format.\n     */\n    private convertToMultipleExtensions = (inputString: string): string => {\n        const formats = ['jpg', 'png', 'webp'];\n\n        const baseParts = inputString.split('.', 1);\n        if (baseParts.length > 0) {\n            const [basePath] = baseParts;\n\n            return formats.map(ext => `${basePath}.${ext}`).join(',');\n        }\n        return inputString;\n    };\n\n    // eslint-disable-next-line complexity\n    private defaultImage = (\n        largestGridSettingViewportName: Viewport,\n        imageAttributes: IGeneric<IAny>,\n        lazyLoad: boolean,\n        inputImageSettings?: IImageSettings,\n        loaded?: boolean,\n        loadFailureBehavior?: string\n    ) => {\n        const {\n            src,\n            className,\n            image,\n            imageSettings,\n            binaryHash,\n            altText,\n            quality,\n            focalRegion,\n            cropRegions,\n            description,\n            fileName,\n            fileSize,\n            imageStyle,\n            isLocalizable,\n            isDecorativeImage,\n            orientation,\n            _links,\n            ...attributes\n        } = imageAttributes;\n\n        const cssClassName = this.props.className || '';\n        const filteredClassName = lazyLoad ? (cssClassName ? `${cssClassName} lazyload` : 'lazyload') : cssClassName;\n        let viewports = inputImageSettings && inputImageSettings.viewports;\n\n        // if in editor mode and default image is enabled. we add viewport when there is no viewPort.\n        if (\n            (!viewports || Object.keys(viewports).length === 0) &&\n            this.isUsingSVGPlaceholder(this.state.src, this.props) &&\n            this.props.editProps &&\n            process.env.CURRENT_ENVIRONMENT === 'web' &&\n            window\n        ) {\n            const editProps = this.props.editProps;\n            const imagePropertyName = editProps.imagePropertyName ? editProps.imagePropertyName : undefined;\n            const themeSettings: IPartnerThemeSettings | undefined =\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                (window as any)._msdyn365.authoringHelper && (window as any)._msdyn365.authoringHelper.themeSettings;\n            viewports = constructViewportInformationForImage(\n                editProps.moduleType,\n                editProps.layout,\n                imagePropertyName,\n                themeSettings\n            ) as IViewPort;\n        }\n\n        const largestViewport = viewports && viewports[largestGridSettingViewportName];\n\n        // we fall back to width and height property when no viewPort found.\n        if (largestViewport && Object.keys(largestViewport).length) {\n            delete attributes.width;\n            delete attributes.height;\n        }\n        let placeholderConfig: IImagePlaceholderConfig | undefined;\n\n        if (this.isUsingSVGPlaceholder(this.state.src, this.props) && this.props.editProps) {\n            placeholderConfig = {\n                name: this.getPlaceholderName(this.state.src)\n            };\n            const SVGConfig = this.getSVGConfig(attributes, largestViewport);\n            placeholderConfig.svgConfig = SVGConfig;\n            placeholderConfig.imagePropertyName = this.props.editProps.imagePropertyName;\n            placeholderConfig.moduleId = this.props.editProps.moduleId;\n        }\n\n        const urlSrc = getImageResizeUrl(\n            this.state.src,\n            largestViewport,\n            inputImageSettings,\n            undefined,\n            imageAttributes?.externalProvider,\n            imageAttributes?.requestContext?.apiSettings || imageAttributes?.editProps?.requestContext?.apiSettings\n        );\n\n        const shouldBeVisibleIfFallbackNotSpecified =\n            this.shouldHideOnFailure || (this.props.fallBackSrc && !this.props.bypassHideOnFailure);\n        attributes.imageFallbackOptimize = this.props.imageFallbackOptimize && this.props.imageSettings?.disableLazyLoad;\n        const shouldBeVisible = loaded || this.state.loadFailed || !shouldBeVisibleIfFallbackNotSpecified;\n        const hiddenStyle = shouldBeVisible ? {} : { visibility: 'hidden' };\n        const parentTagToRemove = this.props.parentTagToRemove;\n\n        return (\n            <EditableField\n                type={FieldType.Image}\n                editPropKey={this.props.editProps && this.props.editProps.key}\n                requestContext={this.props.editProps && this.props.editProps.requestContext}\n                fieldProps={{\n                    ...(hiddenStyle && { style: hiddenStyle }),\n                    ...(this.props.fallBackSrc && { fallbacksrc: this.props.fallBackSrc }),\n                    alt: this.props.altText,\n                    ...(lazyLoad ? { src: placeholderImageUrl, 'data-src': urlSrc } : { src: urlSrc }),\n                    ...attributes,\n                    key: 'default-image',\n                    className: filteredClassName,\n                    onError: this.imageFailed,\n                    onLoad: this.imageLoaded,\n                    additionalProperties: this.props.additionalProperties,\n                    ...(placeholderConfig && { placeholderConfig: placeholderConfig }),\n                    ...(loadFailureBehavior && { loadFailureBehavior: loadFailureBehavior }),\n                    ...(parentTagToRemove && { parentTagToRemove: parentTagToRemove })\n                }}\n            />\n        );\n    };\n\n    private imageFailed = (...args: unknown[]) => {\n        if ((this.props.fallBackSrc && this.props.fallBackSrc === this.state.src) || !this.props.fallBackSrc) {\n            this.setState({ loadFailed: true });\n        } else {\n            this.setState({ src: this.props.fallBackSrc ? this.props.fallBackSrc : this.props.src || '' });\n        }\n        if (typeof this.props.onError === 'function') {\n            this.props.onError(...args);\n        }\n    };\n\n    private imageLoaded = (...args: unknown[]) => {\n        const shouldBeVisibleIfFallbackNotSpecified = !this.shouldHideOnFailure && !this.props.fallBackSrc;\n        if (shouldBeVisibleIfFallbackNotSpecified) {\n            return;\n        }\n\n        const node = ReactDOM.findDOMNode(this) as HTMLElement;\n        if (node && node.querySelector) {\n            const child = node.querySelector('img');\n            if (child && child.complete && child.naturalWidth > 1) {\n                this.setState({ loaded: true });\n            }\n        }\n    };\n\n    private getSourceTag = (\n        viewport: Viewport,\n        imageSettings: IImageSettings,\n        largestGridSettingViewportName: Viewport,\n        lazyLoad: boolean,\n        imageAttributes: IGeneric<IAny>\n    ) => {\n        const srcData = getSourceData(\n            this.state.src,\n            this.props.gridSettings,\n            this.props,\n            imageSettings,\n            viewport,\n            largestGridSettingViewportName,\n            imageAttributes\n        );\n        const imageSetting = imageSettings.viewports[viewport];\n        const style = {\n            height: imageSetting?.h,\n            width: imageSetting?.w\n        };\n        if (!srcData) {\n            return;\n        }\n        return (\n            <source\n                key={viewport}\n                {...(lazyLoad ? { 'data-srcset': srcData.srcSet } : { srcSet: srcData.srcSet })}\n                {...(srcData.media ? { media: srcData.media } : {})}\n                {...(this.props.preserveImageSpace && style)}\n            />\n        );\n    };\n\n    private isUsingSVGPlaceholder = (src: string, props: INativeImageProps) => {\n        if (!src) {\n            return false;\n        }\n        return src.startsWith(svgPreviewImage) && shouldUseDefaultSVGPlaceholder(props);\n    };\n    private getPlaceholderName = (src: string) => {\n        const configs = src.split('.');\n        if (configs.length >= 2) {\n            return configs[1];\n        }\n        return '';\n    };\n\n    private getPlaceholderAspectRatio = (src: string) => {\n        const configs = src.split('.');\n        if (configs.length >= 3) {\n            return configs[2];\n        }\n        return '';\n    };\n}\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 { IImageDimension } from '../../../interfaces';\nimport { INativeImageProps, INativeImageState, NativeImage } from './native-image';\n\n/**\n * Configuration for the thumbnail image.\n * All image configuration should be passes for the main original image. The component will compress the given image.\n */\nexport interface IThumbnailImageProps extends INativeImageProps {\n    /**\n     * The quality to use for the thumbnail.\n     * If not specified, the default value will be used.\n     *\n     * Calculated empirically:\n     * - lower values might result in loosing color information of the image;\n     * - larger values will result in increasing image disk space size which will slow down thumbnail downloading.\n     */\n    thumbnailQuality?: number;\n\n    /**\n     * Specifies how much the size of the main image should decrease in order to get a thumbnail.\n     * If not specified, the default value will be used.\n     *\n     * The real compressing factor might be different based on the minimum size dimension value.\n     *\n     * Calculated empirically:\n     * - lower values might result in loosing details information of the image making the image unrecognizable comparing to the main image;\n     * - larger values will result in increasing image disk space size which will slow down thumbnail downloading.\n     */\n    sizeCompressingFactor?: number;\n\n    /**\n     * Specifies minimum width/height in pixels to use for the thumbnail in case size compressing will produce too small image.\n     * If not specified, the default value will be used.\n     *\n     * Calculated empirically:\n     * - lower values might result in loosing details information of the image making the image unrecognizable comparing to the main image;\n     * - larger values will result in increasing image disk space size which will slow down thumbnail downloading.\n     */\n    minimumSizeDimensionValue?: number;\n}\n\n/**\n * State of the thumbnail image.\n */\nexport interface IThumbnailImageState extends INativeImageState {}\n\n/**\n * React component responsible for a thumbnail of the main image.\n * Thumbnail is a compressed low-resolution copy of main image with low quality.\n */\nexport class ThumbnailImage extends React.PureComponent<IThumbnailImageProps, INativeImageState> {\n    /**\n     * The default class for thumbnail image component.\n     */\n    private static _thumbnailClassName: string = 'msc-thumbnail_image';\n\n    /**\n     * The default quality to use for the thumbnail.\n     * Calculated empirically:\n     * - lower values might result in loosing color information of the image;\n     * - larger values will result in increasing image disk space size which will slow down thumbnail downloading.\n     */\n    private static _defaultThumbnailQuality: number = 10;\n\n    /**\n     * Specifies how much the size of the main image should decrease in order to get a thumbnail.\n     * Calculated empirically:\n     * - lower values might result in loosing details information of the image making the image unrecognizable comparing to the main image;\n     * - larger values will result in increasing image disk space size which will slow down thumbnail downloading.\n     */\n    private static _defaultSizeCompressingFactor: number = 0.25;\n\n    /**\n     * Specifies minimum width/height in pixels to use for the thumbnail in case size compressing will produce too small image.\n     * Calculated empirically:\n     * - lower values might result in loosing details information of the image making the image unrecognizable comparing to the main image;\n     * - larger values will result in increasing image disk space size which will slow down thumbnail downloading.\n     */\n    private static _defaultMinimumSizeDimensionValue: number = 50;\n\n    /**\n     * Configuration for the thumbnail image.\n     * The configuration includes overrides for the size and quality of the main image configuration which is stored in regular props.\n     */\n    private _thumbnailProps: IThumbnailImageProps;\n\n    /**\n     * Retrieves compressed image dimensions from the original image size.\n     * @param {{ width: number; height: number }} size - The main image size dimensions.\n     * @param {number} sizeCompressingFactor - Specifies how much the size of the main image should decrease in order to get a thumbnail.\n     * @param {number} minimumSizeDimensionValue - Specifies minimum width/height in pixels to use for the thumbnail in case size compressing will produce too small image.\n     * @returns {{ width: number; height: number }} - The new image size dimensions to use for the thumbnail.\n     */\n    private static _getCompressedSize(\n        size: { width: number; height: number },\n        sizeCompressingFactor: number,\n        minimumSizeDimensionValue: number\n    ): { width: number; height: number } {\n        let width = size.width;\n        let height = size.height;\n\n        // Get the lowest dimension.\n        const minSize = Math.min(width, height);\n        // Calculate compressed size.\n        const newSize = Math.floor(minSize * sizeCompressingFactor);\n        // Get minimum compressed size in case calculated size was too small.\n        const minNewSize = Math.max(newSize, minimumSizeDimensionValue);\n        // In case the original image was smaller than the new calculated size, then use the original size without compressing.\n        const defaultSize = Math.min(minNewSize, minSize);\n\n        width = width || defaultSize;\n        height = height || defaultSize;\n\n        // If minimum of the size dimensions is bigger than the calculated compressed size, we need to update the dimensions to use compressed values.\n        if (width <= height && width > defaultSize) {\n            height = Math.floor((height * defaultSize) / width); // Calculate the larger dimension saving the image proportions.\n            width = defaultSize; // Assign the compressed minimum dimension value as width is less than height.\n        } else if (width > height && height > defaultSize) {\n            width = Math.floor((width * defaultSize) / height);\n            height = defaultSize;\n        }\n\n        return { width, height };\n    }\n\n    /**\n     * Generates a copy of image dimension with the updated information about suppressing to use for the thumbnail.\n     * @param {IImageDimension | undefined} imageDimension - The image dimension from the main image.\n     * @param {number} thumbnailQuality - The default quality to use for the thumbnail.\n     * @param {number} sizeCompressingFactor - Specifies how much the size of the main image should decrease in order to get a thumbnail.\n     * @param {number} minimumSizeDimensionValue - Specifies minimum width/height in pixels to use for the thumbnail in case size compressing will produce too small image.\n     * @returns {IImageDimension} - The new image dimension for the thumbnail.\n     */\n    private static _updateImageDimension(\n        imageDimension: IImageDimension | undefined,\n        thumbnailQuality: number,\n        sizeCompressingFactor: number,\n        minimumSizeDimensionValue: number\n    ): IImageDimension {\n        const newImageDimension = imageDimension ? { ...imageDimension } : { w: 0, h: 0 };\n\n        // Query parameters for the image might include quality, width, height parameters. Those should be updated.\n        newImageDimension.q = newImageDimension.q ?? '';\n        const parameters = newImageDimension.q.split('&');\n        const originalWidth = ThumbnailImage._extractParameterValue(parameters, 'w', newImageDimension.w);\n        const originalHeight = ThumbnailImage._extractParameterValue(parameters, 'h', newImageDimension.h);\n        const { width, height } = this._getCompressedSize(\n            { width: originalWidth, height: originalHeight },\n            sizeCompressingFactor,\n            minimumSizeDimensionValue\n        );\n\n        newImageDimension.q = [\n            ...parameters.filter(\n                part => !part.startsWith('q=') && !part.startsWith('w=') && !part.startsWith('h=') && !part.startsWith('f=')\n            ),\n            `q=${thumbnailQuality}`,\n            `w=${width}`,\n            `h=${height}`,\n            'f=jpg' // jpg provides better compression.\n        ].join('&');\n        newImageDimension.h = height;\n        newImageDimension.w = width;\n\n        return newImageDimension;\n    }\n\n    /**\n     * Retrieves value from the list of parameters and converts it to a number.\n     * @param {string[]} parameters List of parameters in format name=value.\n     * @param {string} parameterName The name of parameter to look for.\n     * @param {number} defaultValue The default value to use in case the parameter was not found in the list or is not a number.\n     * @returns {number} The value for the paramter.\n     */\n    private static _extractParameterValue(parameters: string[], parameterName: string, defaultValue: number): number {\n        const currentWidthParameter = parameters.find(part => part.startsWith(`${parameterName}=`)) || `${parameterName}=${defaultValue}`;\n        try {\n            return Number.parseInt(currentWidthParameter.split(`${parameterName}=`)[1], 10);\n        } catch {\n            return defaultValue;\n        }\n    }\n\n    /**\n     * Initializes component with the main image props and generates props for the thumbnail.\n     * @param {IThumbnailImageProps} props - Configuration of the component.\n     */\n    public constructor(props: IThumbnailImageProps) {\n        super(props);\n\n        this._thumbnailProps = { ...props };\n\n        if (props.imageSettings) {\n            const thumbnailQuality = props.thumbnailQuality ?? ThumbnailImage._defaultThumbnailQuality;\n            const sizeCompressingFactor = props.sizeCompressingFactor ?? ThumbnailImage._defaultSizeCompressingFactor;\n            const minimumSizeDimensionValue = props.minimumSizeDimensionValue ?? ThumbnailImage._defaultMinimumSizeDimensionValue;\n\n            this._thumbnailProps.imageSettings = { ...props.imageSettings };\n            this._thumbnailProps.imageSettings.viewports = { ...props.imageSettings.viewports };\n\n            this._thumbnailProps.imageSettings.quality = ThumbnailImage._defaultThumbnailQuality;\n            this._thumbnailProps.imageSettings.viewports.lg = ThumbnailImage._updateImageDimension(\n                this._thumbnailProps.imageSettings.viewports.lg,\n                thumbnailQuality,\n                sizeCompressingFactor,\n                minimumSizeDimensionValue\n            );\n            this._thumbnailProps.imageSettings.viewports.md = ThumbnailImage._updateImageDimension(\n                this._thumbnailProps.imageSettings.viewports.md,\n                thumbnailQuality,\n                sizeCompressingFactor,\n                minimumSizeDimensionValue\n            );\n            this._thumbnailProps.imageSettings.viewports.sm = ThumbnailImage._updateImageDimension(\n                this._thumbnailProps.imageSettings.viewports.sm,\n                thumbnailQuality,\n                sizeCompressingFactor,\n                minimumSizeDimensionValue\n            );\n            this._thumbnailProps.imageSettings.viewports.xl = ThumbnailImage._updateImageDimension(\n                this._thumbnailProps.imageSettings.viewports.xl,\n                thumbnailQuality,\n                sizeCompressingFactor,\n                minimumSizeDimensionValue\n            );\n            this._thumbnailProps.imageSettings.viewports.xs = ThumbnailImage._updateImageDimension(\n                this._thumbnailProps.imageSettings.viewports.xs,\n                thumbnailQuality,\n                sizeCompressingFactor,\n                minimumSizeDimensionValue\n            )!;\n        }\n\n        this._thumbnailProps.quality = ThumbnailImage._defaultThumbnailQuality;\n    }\n\n    /**\n     * Renders the thumbnail.\n     */\n    public render(): React.ReactNode {\n        return <NativeImage {...this._thumbnailProps} className={classnames(ThumbnailImage._thumbnailClassName, this.props.className)} />;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport ReactDOMServer from 'react-dom/server';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { INativeImageProps, INativeImageState, NativeImage } from './native-image';\nimport msdyn365Commerce from '../../..';\n\n/**\n * Configuration for the main image.\n */\nexport interface IMainImageProps extends INativeImageProps {}\n\n/**\n * State of the main image.\n */\nexport interface IMainImageState extends INativeImageState {}\n\n/**\n * React component responsible for rendering main image.\n * It should be used to display the original image.\n */\nexport class MainImage extends React.PureComponent<IMainImageProps, INativeImageState> {\n    /**\n     * The default class for main image component.\n     */\n    private static _mainImageClassName: string = 'msc-main_image';\n\n    /**\n     * Initializes instance with the given props.\n     * @param {IMainImageProps} props - Configuration for the main placeholder image.\n     */\n    public constructor(props: IMainImageProps) {\n        super(props);\n    }\n\n    public renderOptimizedImageWithEvent() {\n        if (msdyn365Commerce.isBrowser && msdyn365Commerce.isClientHydrate) {\n            return (\n                <span\n                    // eslint-disable-next-line react/no-danger\n                    dangerouslySetInnerHTML={{\n                        __html: ''\n                    }}\n                />\n            );\n        }\n        // client render case after hydrate\n        if (msdyn365Commerce.isBrowser) {\n            return (\n                <span>\n                    <NativeImage\n                        {...this.props}\n                        src={this.props.src}\n                        className={classnames(MainImage._mainImageClassName, this.props.className)}\n                    />\n                </span>\n            );\n        }\n        // server render case\n        return this.renderPureHtmlOptimizedImage();\n    }\n\n    public renderPureHtmlOptimizedImage() {\n        // server render case\n        const pictureHtml = ReactDOMServer.renderToString(\n            <NativeImage {...this.props} src={this.props.src} className={classnames(MainImage._mainImageClassName, this.props.className)} />\n        );\n        /* eslint-disable react/no-danger */\n        return <span dangerouslySetInnerHTML={{ __html: pictureHtml }}></span>;\n    }\n\n    /**\n     * Renders main image.\n     */\n    public render(): React.ReactNode {\n        if (this.props.imageFallbackOptimize && this.props.imageSettings?.disableLazyLoad) {\n            // To avoid dom-mismatch, flicker issues skip component hydration in the initial page render when image is rendered on server already. Allow renders only after hydrate.\n            if (msdyn365Commerce.platformSettings?.enableImageOptimizeEvents) {\n                return this.renderOptimizedImageWithEvent();\n            }\n            return this.renderPureHtmlOptimizedImage();\n        } else {\n            return (\n                <NativeImage\n                    {...this.props}\n                    src={this.props.src}\n                    className={classnames(MainImage._mainImageClassName, this.props.className)}\n                />\n            );\n        }\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { IRequestContext } from '../../interfaces';\nimport { isEditorialMode } from '../../utilities/editable-fields/utils';\n\nimport {\n    MainImage,\n    EmptyPlaceholderImage,\n    LoadingPlaceholderImage,\n    INativeImageProps,\n    ThumbnailImage,\n    IMainImageState,\n    IThumbnailImageState\n} from './image-types';\n\n/**\n * Represents state of the image\n */\nexport interface IImageState {\n    /**\n     * Defines if loading placeholder should be hidden.\n     */\n    isLoadingPlaceholderHidden: boolean;\n\n    /**\n     * Defines if thumbnail image downloading was finished.\n     * True if image is either ready to be displayed to the user or the image is broken and failed to be downloaded.\n     */\n    isThumbnailLoadingFinished: boolean;\n    /**\n     * Defines if thumbnail image failed to be downloaded.\n     * True if the image is broken or unaccessible.\n     */\n    isThumbnailLoadingFailed: boolean;\n    /**\n     * Defines if thumbnail should be hidden.\n     */\n    isThumbnailHidden: boolean;\n\n    /**\n     * Defines if main image downloading was finished.\n     * True if image is either ready to be displayed to the user or the image is broken and failed to be downloaded.\n     */\n    isMainImageLoadingFinished: boolean;\n    /**\n     * Defines if thumbnail image failed to be downloaded.\n     * True if the image is broken or unaccessible.\n     */\n    isMainImageLoadingFailed: boolean;\n\n    /**\n     * The source of the original main image (does not guarantee the image exists).\n     */\n    src: string;\n}\n\n/**\n * Configuration for the image component.\n */\nexport interface IImageProps extends INativeImageProps {\n    /**\n     * Defines if thumbnail should be used as intermediate image while the main image is loading.\n     * The setting will be applied only to the given image.\n     *\n     * In case the global app configuration specified the thumbnails should be turned off,\n     * this configuration will be ignored and thumbnail will not be shown even if it was passed as true.\n     * True by default.\n     */\n    shouldUseThumbnails?: boolean;\n\n    /**\n     * Defines if native image logic should be used.\n     * False by default.\n     */\n    shouldSkipToMainImage?: boolean;\n\n    /**\n     * Request context. Used to retrieve app settings.\n     */\n    requestContext?: IRequestContext;\n}\n\n/**\n * React component responsible for rendering the image and defining the default behavior for the image.\n * 1. A loading placeholder image is used to be displayed while the main image is loading.\n * 2. In case thumbnails should be used, the loading placeholder will be replaced with the thumbnail once the thumbnail is loaded while the main image is still loading.\n * 3. Once the main image is loaded, it will be displayed over the loading placeholder and thumbnails.\n * In case the thumbnail fails to load, the main image will not be downloaded and an empty placeholder image will be displayed.\n * In case the main image fails to load, an empty placeholder image will be displayed.\n */\nexport class Image extends React.Component<IImageProps, IImageState> {\n    /**\n     * The default class for image component container.\n     */\n    private static _className: string = 'msc-image-container';\n\n    /**\n     * The default class for each specific image (placeholders, thumbnails, original images).\n     */\n    private static _imageClassName: string = 'msc_image';\n\n    /**\n     * The class to use to mark the loading state of a specific sub-image.\n     * This defines that the given sub-image is not yet ready to be displayed to the user and should be hidden.\n     */\n    private static _loadingStateClassName: string = 'loading';\n\n    /**\n     * The class to use to mark the hidden state of a specific sub-image.\n     * This defines that the given sub-image is not used and should not be displayed to the user.\n     */\n    private static _hiddenStateClassName: string = 'hidden';\n\n    /**\n     * The delay to hide loading placeholder image while the already downloaded thumbnail/main image is rendering on the page.\n     * Used to prevent lags due to the behavior of a browser.\n     */\n    private static _defaultLoadingPlaceholderHidingDelay: number = 300;\n\n    /**\n     * The delay to hide the thumbnail image while the already downloaded main image is rendering on the page.\n     * Used to prevent lags due to the behavior of a browser.\n     */\n    private static _defaultThumbnailHidingDelay: number = 3000;\n\n    /**\n     * The timer to hide loading placeholder. Initialized once thumbnail/main image is downloaded.\n     */\n    private _hideLoadingPlaceholderTimeout?: NodeJS.Timeout;\n    /**\n     * The timer to hide thumbnail. Initialized once main image is downloaded.\n     */\n    private _hideThumbnailTimeout?: NodeJS.Timeout;\n\n    /**\n     * Setting which specifies if thumbnails approach should be used.\n     */\n    private _shouldUseThumbnails: boolean;\n\n    /**\n     * Defines if native image logic should be used.\n     */\n    private _shouldSkipToMainImage: boolean;\n\n    /**\n     * Initializes component with the given props.\n     * @param {IImageProps} props - Configuration for the image component.\n     */\n    public constructor(props: IImageProps) {\n        super(props);\n\n        const localShouldUseThumbnailsSetting = props.shouldUseThumbnails ?? true;\n        const globalShouldUseThumbnailsSetting = props.requestContext?.app?.config?.shouldUseThumbnails ?? true;\n        this._shouldUseThumbnails = localShouldUseThumbnailsSetting && globalShouldUseThumbnailsSetting;\n\n        const localShouldSkipToMainImage =\n            isEditorialMode(props.editProps?.requestContext) ||\n            props.imageSettings?.disableLazyLoad ||\n            (props.shouldSkipToMainImage ?? false);\n\n        const globalShouldUseNewImageComponent = props.requestContext?.app?.config?.shouldUseNewImageComponent ?? false;\n        this._shouldSkipToMainImage =\n            !globalShouldUseNewImageComponent ||\n            localShouldSkipToMainImage ||\n            !!this.props.requestContext?.features?.disable_image_componentv2;\n\n        this.state = this.getInitialState();\n\n        this.onMainImageUpdate = this.onMainImageUpdate.bind(this);\n        this.onThumbnailImageUpdate = this.onThumbnailImageUpdate.bind(this);\n    }\n\n    /**\n     * Creates a new default image state.\n     */\n    public getInitialState(): IImageState {\n        return {\n            src: this.props.src || '',\n\n            isLoadingPlaceholderHidden: false,\n\n            isThumbnailLoadingFinished: false,\n            isThumbnailLoadingFailed: false,\n            isThumbnailHidden: false,\n\n            isMainImageLoadingFinished: false,\n            isMainImageLoadingFailed: false\n        };\n    }\n\n    /**\n     * In case component was updated and was given new props, the component's state should be reset.\n     * @param {IImageProps} prevProps - Previous props that were used in this component.\n     */\n    public componentDidUpdate(prevProps: IImageProps): void {\n        if (this.props.src !== prevProps.src || this.props.fallBackSrc !== prevProps.fallBackSrc) {\n            this.setState(this.getInitialState());\n\n            if (this._hideThumbnailTimeout) {\n                clearTimeout(this._hideThumbnailTimeout);\n            }\n\n            if (this._hideLoadingPlaceholderTimeout) {\n                clearTimeout(this._hideLoadingPlaceholderTimeout);\n            }\n        }\n    }\n\n    /**\n     * Listens to main image updates to know when the main image is loaded or failed to be loaded.\n     * @param {IMainImageState} state - The state of the main image.\n     */\n    public onMainImageUpdate(state: IMainImageState): void {\n        this.setState({\n            isMainImageLoadingFinished: state.loaded || state.loadFailed,\n            isMainImageLoadingFailed: state.loadFailed\n        });\n\n        if (!this.state.isThumbnailHidden && state.loaded) {\n            this._setThumbnailHideTimeout();\n        }\n\n        if (!this.state.isLoadingPlaceholderHidden && state.loaded) {\n            this._setLoadingPlaceholderHideTimeout();\n        }\n    }\n\n    /**\n     * Listens to thumbnail image updates to know when the thumbnail image is loaded or failed to be loaded.\n     * @param {IThumbnailImageState} state - The state of the thumbnail image.\n     */\n    public onThumbnailImageUpdate(state: IThumbnailImageState): void {\n        this.setState({\n            isThumbnailLoadingFinished: state.loaded || state.loadFailed,\n            isThumbnailLoadingFailed: state.loadFailed\n        });\n        if (!this.state.isLoadingPlaceholderHidden && state.loaded) {\n            this._setLoadingPlaceholderHideTimeout();\n        }\n    }\n\n    /**\n     * Renders image component in a container.\n     */\n    public render(): React.ReactNode {\n        if (this._shouldSkipToMainImage) {\n            return this._renderMainImage(false, true);\n        }\n\n        if (!this.state.src) {\n            return null;\n        }\n\n        return (\n            <div className={Image._className} key={this.state.src}>\n                {this._getImageContent()}\n            </div>\n        );\n    }\n\n    /**\n     * Renders image content based on the configuration.\n     */\n    private _getImageContent(): JSX.Element {\n        if (this._shouldUseThumbnails) {\n            return this._getImageContentWithThumbnail();\n        }\n        return this._getImageContentWithoutThumbnail();\n    }\n\n    /**\n     * Retrieves image content for the case when thumbnails approach should be used.\n     */\n    private _getImageContentWithThumbnail(): JSX.Element {\n        // If thumbnail image failed to be loaded, main image is most likely to fail too, so empty placeholder is displayed.\n        if (this.state.isThumbnailLoadingFailed || this.state.isMainImageLoadingFailed) {\n            return this._renderEmptyPlaceholderImage();\n        }\n\n        if (this.state.isMainImageLoadingFinished) {\n            return (\n                <>\n                    {this._renderLoadingPlaceholderImage(this.state.isLoadingPlaceholderHidden)}\n                    {this._renderThumbnailImage(false, this.state.isThumbnailHidden)}\n                    {this._renderMainImage()}\n                </>\n            );\n        }\n\n        if (this.state.isThumbnailLoadingFinished) {\n            return (\n                <>\n                    {this._renderLoadingPlaceholderImage(this.state.isLoadingPlaceholderHidden)}\n                    {this._renderThumbnailImage()}\n                    {this._renderMainImage(true)}\n                </>\n            );\n        }\n\n        return (\n            <>\n                {this._renderLoadingPlaceholderImage()}\n                {this._renderThumbnailImage(true)}\n            </>\n        );\n    }\n\n    /**\n     * Retrieves image content for the case when thumbnails approach should NOT be used, and thumbnails should be skipped.\n     */\n    private _getImageContentWithoutThumbnail(): JSX.Element {\n        if (this.state.isMainImageLoadingFailed) {\n            return this._renderEmptyPlaceholderImage();\n        }\n\n        if (this.state.isMainImageLoadingFinished) {\n            return (\n                <>\n                    {this._renderLoadingPlaceholderImage(this.state.isLoadingPlaceholderHidden)}\n                    {this._renderMainImage()}\n                </>\n            );\n        }\n\n        return (\n            <>\n                {this._renderLoadingPlaceholderImage()}\n                {this._renderMainImage(true)}\n            </>\n        );\n    }\n\n    /**\n     * Initializes a timer to hide loading placeholder.\n     */\n    private _setLoadingPlaceholderHideTimeout(): void {\n        if (this._hideLoadingPlaceholderTimeout) {\n            clearTimeout(this._hideLoadingPlaceholderTimeout);\n        }\n        this._hideLoadingPlaceholderTimeout = setTimeout(\n            () => this.setState({ isLoadingPlaceholderHidden: true }),\n            Image._defaultLoadingPlaceholderHidingDelay\n        );\n    }\n\n    /**\n     * Initializes a timer to hide thumbnail.\n     */\n    private _setThumbnailHideTimeout(): void {\n        if (this._hideThumbnailTimeout) {\n            clearTimeout(this._hideThumbnailTimeout);\n        }\n        this._hideThumbnailTimeout = setTimeout(() => this.setState({ isThumbnailHidden: true }), Image._defaultThumbnailHidingDelay);\n    }\n\n    /**\n     * Renders empty placeholder.\n     */\n    private _renderEmptyPlaceholderImage(): JSX.Element {\n        return <EmptyPlaceholderImage className={classnames(Image._imageClassName, this.props.className)} />;\n    }\n\n    /**\n     * Renders loading placeholder.\n     * @param {boolean} isHidden - Specifies if the component should be hidden on the page. False by default.\n     */\n    private _renderLoadingPlaceholderImage(isHidden: boolean = false): JSX.Element {\n        return (\n            <LoadingPlaceholderImage\n                className={classnames(Image._imageClassName, isHidden ? Image._hiddenStateClassName : '', this.props.className)}\n            />\n        );\n    }\n\n    /**\n     * Renders thumbnail.\n     * @param {boolean} isLoading - Specifies if the component is not ready to be displayed and in progress of downloading. False by default.\n     * @param {boolean} isHidden - Specifies if the component should be hidden on the page. False by default.\n     */\n    private _renderThumbnailImage(isLoading: boolean = false, isHidden: boolean = false): JSX.Element {\n        return (\n            <ThumbnailImage\n                {...this.props}\n                src={this.state.src}\n                key={this.state.src}\n                className={classnames(\n                    Image._imageClassName,\n                    isLoading ? Image._loadingStateClassName : '',\n                    isHidden ? Image._hiddenStateClassName : '',\n                    this.props.className\n                )}\n                shouldHideOnFailure={true}\n                onWillRender={this.onThumbnailImageUpdate}\n            />\n        );\n    }\n\n    /**\n     * Renders main image.\n     * @param {boolean} isLoading - Specifies if the component is not ready to be displayed and in progress of downloading. False by default.\n     * @param {boolean} isSkipping - Specifies if the new image component should not be used.\n     */\n    private _renderMainImage(isLoading: boolean = false, isSkipping: boolean = false): JSX.Element {\n        return (\n            <MainImage\n                {...this.props}\n                src={this.state.src}\n                key={this.state.src}\n                className={classnames(Image._imageClassName, isLoading ? Image._loadingStateClassName : '', this.props.className)}\n                shouldHideOnFailure={!isSkipping}\n                onWillRender={this.onMainImageUpdate}\n            >\n                {this.props.children}\n            </MainImage>\n        );\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInternalTelemetry, ITelemetry } from '@msdyn365-commerce/telemetry-internal';\nimport * as React from 'react';\nimport { IActionContext, ICoreContext, ICultureInfoFormatter, IRequestContext } from '../interfaces';\n\nexport const CoreContext = React.createContext<ICoreContext>({\n    actionContext: <IActionContext>{},\n    request: <IRequestContext>{},\n    telemetry: <ITelemetry>{},\n    // @ts-ignore - internalTelemetry is not exposed on the definitions, expected\n    internalTelemetry: <IInternalTelemetry>{},\n    cultureFormatter: <ICultureInfoFormatter>{},\n    app: {}\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/naming-convention */\nimport React from 'react';\nimport { ICoreContext } from '../interfaces';\nimport { CoreContext } from '../models';\n\n/**\n * HOC that injects all the content of the generic context into the component\n * @param Component The component that the context will be injected into\n */\nexport function WithContext(Component: any): (props: any) => JSX.Element {\n    return function ComponentWithContext(props: any): JSX.Element {\n        return (\n            <CoreContext.Consumer>\n                {(value: ICoreContext) => (\n                    <Component\n                        {...props}\n                        context={value}\n                        telemetry={value.telemetry.setTelemetryModuleContext({ moduleId: props.id, moduleType: props.typeName })()}\n                        // @ts-ignore -- we don't actually have this prop defined on the interface\n                        internalTelemetry={value.internalTelemetry.setTelemetryModuleContext({\n                            moduleId: props.id,\n                            moduleType: props.typeName\n                        })()}\n                        app={value.app}\n                    />\n                )}\n            </CoreContext.Consumer>\n        );\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    EVENT_HTTP_SERVICE_START,\n    EVENT_HTTP_SERVICE_STOP,\n    IEventHttpServiceStopProperties,\n    InternalTelemetry,\n    StaticTelemetry\n} from '@msdyn365-commerce/telemetry-internal';\nimport axios, { AxiosRequestConfig } from 'axios';\nimport { HTTPMethod, IHTTPError, IHTTPRequestOptions, IHTTPResponse, IODataResponse, IRequestContext } from '../interfaces';\nimport msdyn365Commerce from '../msdyn365-commerce';\n\n// Default timeout is 10 seconds\nconst defaultTimeout = 10000;\n\n/**\n * Sets retail server specific headers needed for auth\n * @param requestConfig The current configuration settings of the request\n * @param apiSettings The retail server API configuration settings\n */\nconst setRetailServerRequestHeaders = (requestConfig: AxiosRequestConfig) => {\n    if (!requestConfig.headers) {\n        requestConfig.headers = {};\n    }\n\n    requestConfig.headers['from-keystone'] = 'true';\n    requestConfig.headers.oun = requestConfig.headers.oun || msdyn365Commerce.apiSettings.oun || '';\n    requestConfig.headers.Accept = requestConfig.headers.Accept || 'application/json;odata=nometadata';\n    requestConfig.headers.ContentType = requestConfig.headers.ContentType || 'application/json;odata=verbose';\n\n    return requestConfig;\n};\n\n/**\n * Parses an OData Response and returns just the return type of the call without the extra OData Metadata\n */\nconst parseODataResponse = <T>(response?: IODataResponse<T>): T => {\n    if (response && response.value && response['@odata.context']) {\n        return response.value;\n    } else {\n        return <T>(<unknown>response);\n    }\n};\n\n/**\n * Creates a basic Axios Request Config that is shared across commerce and standard HTTP calls\n * @param requestUrl The url of the request\n * @param httpMethod The HTTP method of the request\n * @param body The body content of the request\n * @param options The options associated with the request\n */\nconst createDefaultRequest = (\n    requestUrl: string,\n    httpMethod?: HTTPMethod,\n    body?: unknown,\n    options?: IHTTPRequestOptions\n): AxiosRequestConfig => {\n    return {\n        method: httpMethod || 'get',\n        url: requestUrl,\n        data: body,\n        timeout: options ? options.timeout || defaultTimeout : defaultTimeout,\n        headers: options ? options.headers || {} : {}\n    };\n};\n\n/**\n * Send an retail server request\n * @param requestUrl The url of the request\n * @param httpMethod The HTTP method of the request\n * @param body The body content of the request\n * @param options The options associated with the request\n */\nexport const sendCommerceRequest = async <T>(\n    requestUrl: string,\n    httpMethod?: HTTPMethod,\n    body?: unknown,\n    options?: IHTTPRequestOptions\n): Promise<IHTTPResponse<T>> => {\n    let request = createDefaultRequest(requestUrl, httpMethod, body, options);\n    const requestId = InternalTelemetry.generateGuid();\n\n    // Add pre-call telemetry here\n    StaticTelemetry.trackEvent(EVENT_HTTP_SERVICE_START, { id: requestId });\n\n    // Add the retail server request headers\n    // Ideally these will be pulled via our zone implementation so they can be completely hidden from the end user\n    request = setRetailServerRequestHeaders(request);\n\n    // Send the request\n    return axios\n        .request(request)\n        .then((response: IHTTPResponse<IODataResponse<T>>) => {\n            // Add any post-call telemetry here\n            StaticTelemetry.trackEvent<IEventHttpServiceStopProperties, {}>(EVENT_HTTP_SERVICE_STOP, {\n                statusCode: `${response.status}`,\n                success: 'true',\n                id: requestId\n            });\n\n            // Parse OData and return response\n            return {\n                ...response,\n                data: parseODataResponse(response.data)\n            };\n        })\n        .catch((error: IHTTPError) => {\n            // Add error handling telemetry and response here\n            StaticTelemetry.trackEvent<IEventHttpServiceStopProperties, {}>(EVENT_HTTP_SERVICE_STOP, {\n                statusCode: `${error.code}`,\n                success: 'false',\n                id: requestId\n            });\n\n            // Return either passed error response or empty response to user\n            return error.response || <IHTTPResponse>{};\n        });\n};\n\n/**\n * Send an external HTTP request\n * @param requestUrl The url of the request\n * @param httpMethod The HTTP method of the request\n * @param body The body content of the request\n * @param options The options associated with the request\n */\nexport const sendRequest = async <T>(\n    requestUrl: string,\n    httpMethod?: HTTPMethod,\n    body?: unknown,\n    options?: IHTTPRequestOptions\n): Promise<IHTTPResponse<T>> => {\n    const request = createDefaultRequest(requestUrl, httpMethod, body, options);\n    const requestId = InternalTelemetry.generateGuid();\n\n    // Add pre-call telemetry here\n    StaticTelemetry.trackEvent(EVENT_HTTP_SERVICE_START, { id: requestId });\n\n    // Send the request\n    return _sendRequest(requestUrl, httpMethod, body, options, request, requestId);\n};\n\n/**\n * Commerce API request util method\n * @param requestContext request context object available in module props\n * @param dataActionId id of the data action that needs to be run on server side\n * @param httpMethod http method object - default is GET\n * @param body request body in case of POST\n * @param options http request options\n */\nexport const commerceApiRequest = async <T>(\n    requestContext: IRequestContext,\n    dataActionId: string,\n    httpMethod?: HTTPMethod,\n    body?: unknown,\n    options?: IHTTPRequestOptions\n): Promise<IHTTPResponse<T>> => {\n    const requestId = requestContext.operationId;\n    options = {\n        headers: {\n            'Content-Type': 'application/json',\n            'Request-Id': requestContext.operationId\n        },\n        ...options\n    };\n    const requestUrl =\n        `${process.env.NODE_ENV === 'development' ? '/_msdyn365/' : `${requestContext.sitePath}/_msdyn365/`}` + `api?id=${dataActionId}`;\n    const request = createDefaultRequest(requestUrl, httpMethod || 'get', body, options);\n\n    return _sendRequest(requestUrl, httpMethod, body, options, request, requestId);\n};\n\n/**\n * Commerce video api request util method\n * @param requestContext request context object available in module props\n * @param identities list of video identities\n * @param eCommerceOverrideChannelId override ecommerce channelId that can be used for cross-channel scenarios. If not passed, will fallback to eCommerceChannelId from requestContext\n */\nexport const commerceVideoMetadataRequest = async <T>(\n    requestContext: IRequestContext,\n    identities: string[],\n    eCommerceOverrideChannelId?: string\n): Promise<IHTTPResponse<T>> => {\n    if (!identities || identities.length === 0) {\n        throw new Error('Invalid input: atleast one identity should be specified');\n    }\n\n    if (!requestContext.operationId) {\n        throw new Error('Missing operation id');\n    }\n\n    if (!(requestContext.apiSettings && requestContext.apiSettings.eCommerceChannelId) && !eCommerceOverrideChannelId) {\n        throw new Error('Missing ecommerce channel id and no override channelId provided');\n    }\n\n    const requestId = requestContext.operationId;\n    const options: IHTTPRequestOptions = {\n        headers: {\n            'Content-Type': 'application/json',\n            'Request-Id': requestContext.operationId,\n            eCommerceChannelId: eCommerceOverrideChannelId || requestContext.apiSettings.eCommerceChannelId,\n            videoIdentities: identities.join(','),\n            locale: requestContext.locale\n        }\n    };\n\n    const domainName = requestContext.url.requestUrl.origin;\n    const requestPath = '/_msdyn365/api/videofiledata';\n    const requestUrl = process.env.NODE_ENV === 'development' || !domainName ? requestPath : `${domainName}${requestPath}`;\n\n    const request = createDefaultRequest(requestUrl, 'post', {}, options);\n\n    return _sendRequest(requestUrl, 'post', {}, options, request, requestId);\n};\n\nconst _sendRequest = async <T>(\n    requestUrl: string,\n    httpMethod?: HTTPMethod,\n    body?: unknown,\n    options?: IHTTPRequestOptions,\n    requestConfig?: AxiosRequestConfig,\n    operationId?: string\n): Promise<IHTTPResponse<T>> => {\n    const request = requestConfig || createDefaultRequest(requestUrl, httpMethod, body, options);\n    const requestId = operationId || InternalTelemetry.generateGuid();\n\n    // Add pre-call telemetry here\n    StaticTelemetry.trackEvent(EVENT_HTTP_SERVICE_START, { id: requestId });\n\n    // Send the request\n    return axios\n        .request(request)\n        .then((response: IHTTPResponse<T>) => {\n            // Add any post-call telemetry here\n            StaticTelemetry.trackEvent<IEventHttpServiceStopProperties, {}>(EVENT_HTTP_SERVICE_STOP, {\n                statusCode: `${response.status}`,\n                success: 'true',\n                id: requestId\n            });\n\n            // Return response\n            return response;\n        })\n        .catch((error: IHTTPError) => {\n            StaticTelemetry.trackEvent<IEventHttpServiceStopProperties, {}>(EVENT_HTTP_SERVICE_STOP, {\n                statusCode: `${error.code}`,\n                success: 'false',\n                id: requestId\n            });\n\n            // Return either passed error response or empty response to user\n            return error.response || <IHTTPResponse>{};\n        });\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EXCEPTION_INVALID_ARGUMENT, NAME_CULTURE_INFO_FORMATTER_EXCEPTION } from '@msdyn365-commerce/telemetry-internal';\nimport memoizeFormatConstructor from 'intl-format-cache';\nimport areIntlLocalesSupported from 'intl-locales-supported';\nimport { IDictionary } from '@msdyn365-commerce/retail-proxy';\nimport { ICultureInfoFormatter, IDateFormatOptions, INumberFormatOptions, ITimeFormatOptions } from '../interfaces';\n\nconst numericIdentifier = 'numeric';\n\n/**\n * CultureInfoFormatter provides functions that support the localized formatting\n * of currencies, numbers, dates and times.\n */\nexport class CultureInfoFormatter implements ICultureInfoFormatter {\n    private locale: string;\n    private numberFormatter: Intl.NumberFormat | undefined;\n    private dateFormatter: Intl.DateTimeFormat | undefined;\n    private timeFormatter: Intl.DateTimeFormat | undefined;\n    private currencyFormatter: Intl.NumberFormat | undefined;\n    private numFormatterConstructor: any;\n    private dateFormatterConstructor: any;\n    private currencyCode: string;\n    // Adding a cultureInfoTestFlag to inject intl on client side for culture-intl-formatter test, since now the Intl is injected through script tage in base-page.tsx\n    private queryString: IDictionary<string> | undefined;\n\n    private static _validateInput(validation: boolean, methodName: string, argName: string): void {\n        if (validation) {\n            throw new Error(`${NAME_CULTURE_INFO_FORMATTER_EXCEPTION}: ${EXCEPTION_INVALID_ARGUMENT(methodName, argName)}`);\n        }\n    }\n\n    /**\n     * Constructs a new instance of this formatter using the given locale.\n     * Default value for locale is 'en-US'\n     *\n     * @param locale A string containing a BCP-47 locale tag e.g. 'en', 'en-us', 'fr-fr'. Default value of 'en-US'\n     * For more information see https://tools.ietf.org/html/bcp47\n     */\n    constructor(locale: string, currencyCode: string, queryString?: IDictionary<string>) {\n        CultureInfoFormatter._validateInput(!locale, 'CultureInfoFormatter', 'locale');\n        CultureInfoFormatter._validateInput(!currencyCode, 'CultureInfoFormatter', 'currencyCode');\n\n        this.locale = locale;\n        this.currencyCode = currencyCode;\n        this.queryString = queryString;\n        // If we are running server side or the browser does not support the locale, use the polyfill for Intl\n\n        const loadIntlPollyfillQsp = this.queryString && this.queryString.load_intl_polyfills;\n        function loadIntlPollyfills(IntlPolyfill?: any) {\n            // @ts-ignore- IntlPolyfill are loaded through script tag\n            Intl.NumberFormat = IntlPolyfill.NumberFormat;\n            // @ts-ignore- IntlPolyfill are loaded through script tag\n            Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat;\n        }\n\n        if (process.env.CURRENT_ENVIRONMENT === 'node') {\n            // eslint-disable-next-line\n            const IntlPolyfill = require('intl');\n            loadIntlPollyfills(IntlPolyfill);\n        } else {\n            if (!areIntlLocalesSupported(this.locale) || loadIntlPollyfillQsp) {\n                if (process.env.JEST_WORKER_ID !== undefined) {\n                    // @ts-ignore - IntlPolyfill var is defined only while executing culture-intl-formatter test\n                    // eslint-disable-next-line\n                    const IntlPolyfill = require('intl');\n                    loadIntlPollyfills(IntlPolyfill);\n                } else {\n                    // @ts-ignore - IntlPolyfill is loaded through script tag\n                    loadIntlPollyfills(IntlPolyfill);\n                }\n            }\n        }\n        // Create cached number, date and time formatter for basic formatting\n        this.numFormatterConstructor = memoizeFormatConstructor(Intl.NumberFormat);\n        this.dateFormatterConstructor = memoizeFormatConstructor(Intl.DateTimeFormat);\n    }\n\n    /**\n     * Returns a localized currency formatted version of a price.\n     *\n     * @param price Either a string or number representing the price that will be localized and formatted\n     * @param currencyCode Optional argument. The three letter currency code that will be used for formatting the currency.\n     * If the currency code is not provided the locale will be used to determine the best fit currency code.\n     */\n    public formatCurrency: (price: string | number, currencyCode?: string) => string = (\n        price: string | number,\n        currencyCode?: string\n    ): string => {\n        CultureInfoFormatter._validateInput(price === undefined, 'formatCurrency', 'price');\n        price = price || 0;\n\n        try {\n            if (!this.currencyFormatter) {\n                this.currencyFormatter = <Intl.NumberFormat>this.numFormatterConstructor(this.locale, {\n                    style: 'currency',\n                    currency: currencyCode || this.currencyCode\n                });\n            }\n            return !currencyCode\n                ? this.currencyFormatter.format(+price)\n                : this.formatNumber(+price, { style: 'currency', currency: currencyCode });\n        } catch (e) {\n            console.error('error in creating number formatter', e);\n            // return the same unformatted value\n            return price.toString();\n        }\n    };\n\n    /**\n     * Returns a localized formatted version of a number\n     *\n     * @param value The number that will be localized and formatted\n     * @param options An optional argument that controls the formatting.\n     */\n    public formatNumber = (value: number, options?: INumberFormatOptions): string => {\n        CultureInfoFormatter._validateInput(value === undefined, 'formatNumber', 'value');\n        value = value || 0;\n\n        try {\n            if (!this.numberFormatter) {\n                this.numberFormatter = <Intl.NumberFormat>this.numFormatterConstructor(this.locale);\n            }\n            // If no options are given to us, we can use the basic cached formatter\n            return options !== undefined\n                ? this.numFormatterConstructor(this.locale, options).format(value)\n                : this.numberFormatter.format(value);\n        } catch (e) {\n            console.error('error creating number formatter', e);\n            // return the same unformatted value\n            return value.toString();\n        }\n    };\n\n    /**\n     * Returns a localized formatted version of a date\n     *\n     * @param date Date object or valid date string representing the date that will be localized and formatted\n     * @param options An optional argument that controls the formatting.\n     */\n    public formatDate = (date: Date | string, options?: IDateFormatOptions): string => {\n        CultureInfoFormatter._validateInput(!date, 'formatDate', 'date');\n\n        try {\n            if (!this.dateFormatter) {\n                this.dateFormatter = <Intl.DateTimeFormat>this.dateFormatterConstructor(this.locale);\n            }\n\n            // Convert to date object if valid date string is passed instead\n            if (typeof date === 'string') {\n                date = new Date(date);\n            }\n\n            // If no options are given to us, we can use the basic cached formatter\n            return options !== undefined\n                ? this.dateFormatterConstructor(this.locale, options).format(date)\n                : this.dateFormatter.format(date);\n        } catch (e) {\n            console.error('error creating date formatter', e);\n            // return the same unformatted value\n            return date.toString();\n        }\n    };\n\n    /**\n     * Returns a localized formatted version of a time\n     *\n     * @param time Date object or valid date string representing the time that will be localized and formatted\n     * @param options An optional argument that controls the formatting\n     */\n    public formatTime = (time: Date | string, options?: ITimeFormatOptions): string => {\n        CultureInfoFormatter._validateInput(!time, 'formatTime', 'time');\n\n        try {\n            if (!this.timeFormatter) {\n                this.timeFormatter = <Intl.DateTimeFormat>(\n                    this.dateFormatterConstructor(this.locale, { hour: numericIdentifier, minute: numericIdentifier })\n                );\n            }\n\n            // Convert to date object if valid date string is passed instead\n            if (typeof time === 'string') {\n                time = new Date(time);\n            }\n\n            // If no options are given to us, we can use the basic cached formatter\n            if (options !== undefined) {\n                options.hour = 'numeric';\n                options.minute = 'numeric';\n                return this.dateFormatterConstructor(this.locale, options).format(time);\n            }\n            return this.timeFormatter.format(time);\n        } catch (e) {\n            console.error('error creating date formatter', e);\n            // return the same unformatted value\n            return time.toString();\n        }\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport msdyn365Commerce from '../msdyn365-commerce';\n\nexport interface IParameterizeFeatureFlags {\n    enableUrlLocalization?: Boolean;\n    enableUrlEncoding?: Boolean;\n}\n\n/**\n * Converts a string into a url safe parameter. THIS IS A LOSSY OPERATION.\n * e.g. 'My special string' => 'my-special-string'\n * @param name string to convert into url parameter\n * @param sep segment seperator. Defaults to '-'\n * @param parameterizeFeatureFlags feature switch if we should enable locale info to be saved to the encoded url.\n * @package neutralizedName neutralizedName input\n */\nexport function parameterize(\n    name: string = '',\n    sep: string = '-',\n    parameterizeFeatureFlags: IParameterizeFeatureFlags = {},\n    neutralizedName?: string\n): string {\n    // if neutralizedName flag enabled, we use neutralizedName to construct string\n    const candidateName =\n        (msdyn365Commerce.platformSettings && msdyn365Commerce.platformSettings.enableUrlLocalization) ||\n        parameterizeFeatureFlags.enableUrlLocalization\n            ? name\n            : neutralizedName || name;\n\n    /*\n    1\t‘ ‘ (space)\t-> (single dash)\n    3\tAny character disallowed in URLs -> URL-encode\n    5\t‘ & ‘ (space ampersand space) -> (single dash)\n    6\t‘ - ‘ (space dash space) -> (single dash)\n    7\t‘  ‘ (2+ spaces) -> (single dash)\n    10\t[A-Z] (capital letters) -> [a-z] (lower-case)\n    12\tAny non-ASCII character outside of the set of disallowed  characters -> URL-encode\n    */\n    if (\n        parameterizeFeatureFlags.enableUrlEncoding ||\n        (msdyn365Commerce.platformSettings && msdyn365Commerce.platformSettings.enableUrlEncoding)\n    ) {\n        // replace url reserved characters with dash, and remove front and end dash;\n        // &*!() reserved characters that can not be encoded by encodeURIComponent()\n        return encodeURIComponent(\n            candidateName\n                .toLowerCase()\n                .replace(/[\\s&*!()']+/g, '-')\n                .trim()\n                .replace(/\\-+/g, '-')\n                .replace(/^\\-+|\\-+$/g, '')\n                .replace(/[\\+]+/g, '-')\n        );\n    }\n    return candidateName\n        .toLowerCase()\n        .replace(/[^a-z0-9\\-_]+/g, ' ')\n        .trim()\n        .replace(/\\s+/g, sep);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nconst versionComparer = (versionToCheck: string, versionToCompareAgainst: string) => {\n    const value = Math.sign(versionToCheck.localeCompare(versionToCompareAgainst, undefined, { numeric: true, sensitivity: 'base' }));\n    return value;\n};\n\nexport const versionGt = (versionToCheck: string, versionToCompareAgainst: string) => {\n    const result = versionComparer(versionToCheck, versionToCompareAgainst);\n    return result === 1 ? true : false;\n};\n\nexport const versionLt = (versionToCheck: string, versionToCompareAgainst: string) => {\n    const result = versionComparer(versionToCheck, versionToCompareAgainst);\n    return result === -1 ? true : false;\n};\n\nexport const versionGte = (versionToCheck: string, versionToCompareAgainst: string) => {\n    const result = versionComparer(versionToCheck, versionToCompareAgainst);\n    return result === 1 || result === 0 ? true : false;\n};\n\nexport const versionLte = (versionToCheck: string, versionToCompareAgainst: string) => {\n    const result = versionComparer(versionToCheck, versionToCompareAgainst);\n    return result === -1 || result === 0 ? true : false;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { IActionContext, IAny, IDictionary, IRequestContext } from '../interfaces';\nimport { ICategoryPath, ICategoryUrl } from '../interfaces/ICategoryPathInterfaces';\nimport { isUserTypeB2B } from './helper';\nimport { IParameterizeFeatureFlags, parameterize } from './parameterize';\nimport { versionGte } from './version-utils';\n\nexport const enum PageType {\n    Product = 'product',\n    Category = 'category',\n    List = 'list',\n    Cart = 'cart',\n    Checkout = 'checkout',\n    Account = 'account',\n    OrderHistory = 'order-history',\n    OrderLookup = 'order-lookup',\n    Wishlist = 'wishlist',\n    GiftcardBalance = 'giftcard-balance',\n    FindStores = 'find-stores'\n}\n\nenum PreviewRequestState {\n    /// <summary>\n    /// Returns published document if available. Only one document version can be published at any point in time, so version query string parameter is not supported if published document is requested.\n    /// </summary>\n    Published = 'published',\n\n    /// <summary>\n    /// Returns document draft if it exists. Similarly to published state, if CheckedOut document is requested, version query string parameter should not be specified.\n    /// </summary>\n    CheckedOut = 'checkedout',\n\n    /// <summary>\n    /// Returns checked in document. This is default state for Query Preview. Most CMS documents may have multiple checked in versions, and by default the most recent one will be served.\n    /// </summary>\n    CheckedIn = 'checkedin',\n\n    /// <summary>\n    /// If the user is authenticated with AAD and has checked out the document, CMS returns this draft, otherwise latest checked in version will be served.\n    /// </summary>\n    InProgress = 'inprogress',\n\n    /// <summary>\n    /// The querystring value \"true\", which fallback to \"checkedin\" state.\n    /// </summary>\n    True = 'true',\n\n    /// <summary>\n    /// The querystring value \"1\", which fallback to \"checkedin\" state.\n    /// </summary>\n    One = '1'\n}\n\nexport const rcsuVersionCacheKey = 'MSDyn365Commerce_RCSUVERSION_Key';\nexport const rcsuVersionTypeName = 'MSDyn365Commerce_RCSUVERSION';\n\n// Query params that must be appened to any URL generated when in preview mode\nconst PASSTHROUGH_QUERY_PARAMS = ['locale', 'market', 'sitepath', 'hostoverride', 'preview', 'domain', 'catalogid'];\n\ntype segment = { Name: string; RecordId: string | number };\ntype categoryContext = { categories?: { Name: string; RecordId: string | number; NeutralizedName?: string }[] };\ntype categorySlugContext = { category?: { Slug: string; RecordId: string | number } };\ntype productContext = { product?: { Name: string; RecordId: string | number; NeutralizedName?: string } };\ntype listContext = { list?: { Name: string; NeutralizedName?: string } };\n\ntype pageTypeContext = categoryContext & productContext & listContext & productContext & { [property: string]: IAny };\ntype routeBuilder = (context?: pageTypeContext, ctx?: IActionContext) => string;\ntype IRouteDiconary = IDictionary<routeBuilder>;\n\nconst categorySegment = (context?: categoryContext & categorySlugContext, ctx?: IActionContext) => {\n    if (!context) {\n        return '';\n    }\n    if (context.categories) {\n        const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlagsWithRequestContext(\n            ctx && ctx.requestContext\n        );\n        return context.categories\n            .map(record => `/${parameterize(record.Name, undefined, parameterizeFeatureFlags, record.NeutralizedName)}`)\n            .join('');\n    } else if (context.category) {\n        return context.category.Slug;\n    }\n    return '';\n};\nconst categoryMoniker = (context?: categoryContext & categorySlugContext) => {\n    if (context) {\n        if (context.categories) {\n            return `/${context.categories[context.categories.length - 1].RecordId}.c`;\n        }\n        if (context.category) {\n            return `/${context.category.RecordId}.c`;\n        }\n    }\n    return '';\n};\n\nconst productMoniker = (context?: productContext, ctx?: IActionContext) => {\n    if (context) {\n        if (context.product && context.product.Name !== '') {\n            const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlagsWithRequestContext(\n                ctx && ctx.requestContext\n            );\n            return `/${parameterize(context.product.Name, undefined, parameterizeFeatureFlags, context.product.NeutralizedName)}/${\n                context.product.RecordId\n            }.p`;\n        } else if (context.product) {\n            return `/${context.product.RecordId}.p`;\n        }\n    }\n    return '';\n};\n\nconst listMoniker = (context?: listContext, ctx?: IActionContext) => {\n    const parameterizeFeatureFlags: IParameterizeFeatureFlags = getParameterizeFeatureFlagsWithRequestContext(ctx && ctx.requestContext);\n    return context && context.list\n        ? `/${parameterize(context.list.Name, undefined, parameterizeFeatureFlags, context.list.NeutralizedName)}.l`\n        : '';\n};\n\nconst platformRoutes: IRouteDiconary = {\n    category: (context, ctx?) => `${categorySegment(context, ctx)}${categoryMoniker(context)}`,\n    product: (context, ctx?) => `${categorySegment(context, ctx)}${productMoniker(context, ctx)}`,\n    list: listMoniker\n};\n\n/**\n * Forces strings to have a leading slash and no trailing slash\n */\nconst ensureSlashConsistency = (name: string) => {\n    if (name[0] !== '/') {\n        name = `/${name}`;\n    }\n    if (name[name.length - 1] === '/') {\n        name = name.slice(0, -1);\n    }\n    return name;\n};\n\n/**\n * Correctly appends site path if required in the context\n * @param route Current route\n * @param ctx Action Context\n */\nconst populateSitePath = (route: string[], ctx: IActionContext): string[] => {\n    const sitePath = ctx && ctx.requestContext && ctx.requestContext.sitePath;\n    sitePath && route.unshift(sitePath);\n    return route;\n};\n\nconst overrideDomain = (domain: string, hostName?: string): string | undefined => {\n    if (!hostName) {\n        return domain;\n    }\n    if (domain !== hostName) {\n        return domain;\n    } else {\n        return undefined;\n    }\n};\n\n/**\n * Appends any query params that should be appended if preview mode is set to true\n * and returns the final result\n *\n * @param route The partially constructed destination url\n * @param queryParams The list of query params in the initial request\n */\nexport const appendQueryParams = (\n    route: string | undefined,\n    queryParams?: IDictionary<string>,\n    hostName?: string,\n    skipCatalogId?: boolean\n): string => {\n    if (route && queryParams && (queryParams.preview || queryParams.domain || queryParams.catalogid)) {\n        const query = Object.keys(queryParams)\n            .map(key => {\n                if (PASSTHROUGH_QUERY_PARAMS.indexOf(key) !== -1) {\n                    const value = queryParams[key];\n                    if (key.toLowerCase() === 'catalogid' && skipCatalogId) {\n                        return '';\n                    }\n\n                    if (\n                        key.toLowerCase() === 'preview' &&\n                        !Object.values(PreviewRequestState).includes(value.toLowerCase() as PreviewRequestState)\n                    ) {\n                        return '';\n                    }\n\n                    if (key === 'domain') {\n                        // only add domain parameter if domain is different with hostName\n                        const newDomain = overrideDomain(value, hostName);\n                        return !!newDomain ? `${key}=${newDomain}` : '';\n                    } else {\n                        return `${key}=${value}`;\n                    }\n                } else {\n                    return '';\n                }\n            })\n            .filter(Boolean)\n            .join('&');\n\n        return query.length ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${query}` : route;\n    }\n\n    return route || '';\n};\n\nconst appendQueryString = (route: string | undefined, context: IActionContext, catalogId?: string) => {\n    const query = { ...(context && context.requestContext && context.requestContext.query) } || {};\n    // override the catalogid in query when we passed the catalogId\n    if (context.requestContext?.user?.isB2b && catalogId) {\n        query['catalogid'] = catalogId;\n    }\n    if (\n        context.requestContext?.user?.isB2b &&\n        ((query['catalogid'] && query['catalogid'] !== '0') ||\n            (context.requestContext?.user?.catalogId && context.requestContext.user.catalogId !== '0'))\n    ) {\n        query['catalogid'] = query['catalogid'] || context.requestContext?.user?.catalogId || '';\n    } else {\n        delete query['catalogid'];\n    }\n    return appendQueryParams(route, query, context?.requestContext?.url?.requestUrl?.hostname);\n};\n\nfunction getRoutePath(\n    route: string | routeBuilder | undefined,\n    ctx: IActionContext,\n    routeContext: pageTypeContext,\n    catalogId?: string\n): string {\n    let returnUrl = '';\n    if (route) {\n        if (typeof route === 'function') {\n            route = route(routeContext, ctx);\n        }\n        returnUrl = populateSitePath([route], ctx)\n            .map(ensureSlashConsistency)\n            .join('');\n    }\n\n    return appendQueryString(returnUrl, ctx, catalogId);\n}\n\n/**\n * Gets the corresponding route for the given page type\n * @param pageType the type of page that needs to be routed to.\n * @param ctx current action context.\n */\nexport const getUrlSync = (\n    pageType: PageType | string,\n    ctx: IActionContext,\n    routeContext: pageTypeContext = {},\n    catalogid?: string\n): string | undefined => {\n    let route: string | routeBuilder | undefined;\n    if (platformRoutes[pageType]) {\n        return getRoutePath(platformRoutes[pageType], ctx, routeContext, catalogid);\n    }\n\n    const requestContext: IRequestContext = ctx && ctx.requestContext;\n    if (requestContext) {\n        route = requestContext.query && requestContext.query[pageType];\n        if (route) {\n            return getRoutePath(route, ctx, routeContext, catalogid);\n        }\n\n        const appRoutes = requestContext.app && requestContext.app.routes;\n        if (appRoutes) {\n            const pageRouteFromAppSettings = appRoutes[pageType];\n            if (pageRouteFromAppSettings && typeof pageRouteFromAppSettings === 'object') {\n                return appendQueryString(pageRouteFromAppSettings.destinationUrl, ctx, catalogid);\n            } else if (pageRouteFromAppSettings && typeof pageRouteFromAppSettings === 'string') {\n                return getRoutePath(pageRouteFromAppSettings, ctx, routeContext, catalogid);\n            }\n        }\n    }\n\n    return getRoutePath(pageType, ctx, routeContext, catalogid);\n};\n\nexport const isMinRcsuVersionForCatalogId = (rcsuVersion: string | undefined) => {\n    if (rcsuVersion && typeof rcsuVersion === 'string' && versionGte(rcsuVersion, '9.35.22007.2')) {\n        return true;\n    }\n    return false;\n};\n\n// Used by SSK code\nexport const getCatalogId = (requestContext: IRequestContext): number => {\n    let catalogid: number = 0;\n    if (isUserTypeB2B(requestContext)) {\n        const catalogidstr = requestContext.query?.catalogid || requestContext.user?.catalogId || '0';\n        catalogid = Number(catalogidstr) || 0;\n    }\n    return catalogid;\n};\n\n// Used by SDK, to maintain backwards compatibility with Retail proxy\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getCatalogIdForSdk = (requestContext: IRequestContext, fallbackCatalogId: any): any => {\n    let catalogid = 0;\n    if (isUserTypeB2B(requestContext)) {\n        const isCompatibleRcsuVersionForCatalogId = isMinRcsuVersionForCatalogId(requestContext?.rcsuVersion);\n        if (isCompatibleRcsuVersionForCatalogId) {\n            catalogid = getCatalogId(requestContext);\n        } else {\n            catalogid = fallbackCatalogId;\n        }\n    }\n    return catalogid;\n};\n\nexport const getCategoriesUrlSync = (categoriesPath: ICategoryPath, ctx: IActionContext): ICategoryUrl[] | undefined => {\n    const categoriesPathUrls: ICategoryUrl[] = [];\n    const tempSegments: segment[] = [];\n    if (categoriesPath && categoriesPath.Segments) {\n        categoriesPath.Segments.map(seg => {\n            tempSegments.push({\n                Name: seg.CategoryName || '',\n                RecordId: seg.CategoryId || ''\n            });\n            const context = {\n                categories: tempSegments\n            };\n            categoriesPathUrls.push({\n                Name: seg.CategoryName,\n                Url: getUrlSync(PageType.Category, ctx, context) || ''\n            });\n        });\n    }\n\n    return categoriesPathUrls;\n};\n\n/**\n * Gets localized friendlyName from category NameTranslations object based on the locale\n * @param locale Locale from current requestContext\n * @param nameTranslations LocalizedNames for a given category.\n */\nexport const 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/**\n * Return ParameterizedFeatureFlags based on requestContext\n * @param ctx Action Context\n */\nexport const getParameterizeFeatureFlags = (ctx?: IActionContext): IParameterizeFeatureFlags => {\n    return {\n        enableUrlEncoding: (ctx && ctx.requestContext.features && ctx.requestContext.features.enableUrlEncoding) || false,\n        enableUrlLocalization: (ctx && ctx.requestContext.features && ctx.requestContext.features.enableUrlLocalization) || false\n    };\n};\n\n/**\n * Return ParameterizedFeatureFlags based on requestContext\n * @param ctx Request Context\n */\nexport const getParameterizeFeatureFlagsWithRequestContext = (ctx?: IRequestContext): IParameterizeFeatureFlags => {\n    return {\n        enableUrlEncoding: (ctx && ctx.features && ctx.features.enableUrlEncoding) || false,\n        enableUrlLocalization: (ctx && ctx.features && ctx.features.enableUrlLocalization) || false\n    };\n};\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';\nimport { ContentEditableEvent } from 'react-contenteditable';\nimport { RichText } from '../interfaces/data-types';\nimport { EditableField, FieldType, ITextEditProps } from './editable-fields/editable-field';\n\nexport interface IRichText {\n    text?: RichText;\n    className?: string;\n    editProps?: ITextEditProps;\n}\n\nexport function getRichTextHtml(text?: RichText): { __html: string } | undefined {\n    return text ? { __html: text as string } : undefined;\n}\n\n/**\n * Rich text interactive component\n */\nexport class RichTextComponent extends React.Component<IRichText> {\n    constructor(props: IRichText) {\n        super(props);\n        this.state = { html: props.text };\n    }\n\n    public render = (): JSX.Element => {\n        return (\n            <EditableField\n                onChange={this.props.editProps ? this.props.editProps.onEdit : this.onEdit} // handle innerHTML change\n                requestContext={this.props.editProps && this.props.editProps.requestContext}\n                fieldProps={{\n                    text: this.props.text as string,\n                    className: this.props.className\n                }}\n                type={FieldType.RichText}\n            />\n        );\n    };\n\n    private onEdit = (event: ContentEditableEvent) => null;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { ContentEditableEvent } from 'react-contenteditable';\nimport { EditableField, FieldType, ITextEditProps } from './editable-fields/editable-field';\n\nexport { ContentEditableEvent };\n\nexport interface ITextProps {\n    tag?: string;\n    text?: string;\n    className?: string;\n    editProps?: ITextEditProps;\n}\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport class Text extends React.Component<ITextProps> {\n    constructor(props: ITextProps) {\n        super(props);\n        this.state = { html: props.text };\n    }\n\n    public render = (): JSX.Element => {\n        return (\n            <EditableField\n                onChange={this.props.editProps ? this.props.editProps.onEdit : this.onEdit} // handle innerHTML change\n                requestContext={this.props.editProps?.requestContext}\n                fieldProps={{\n                    text: this.props.text,\n                    tag: this.props.tag,\n                    className: this.props.className\n                }}\n                type={FieldType.Text}\n            />\n        );\n    };\n\n    private onEdit = (event: ContentEditableEvent) => null;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { ContentEditableEvent } from 'react-contenteditable';\nimport { EditableField, FieldType, IEditProps } from './editable-fields/editable-field';\n\nexport { ContentEditableEvent };\n\nexport interface IVideoProps {\n    className?: string;\n    children: JSX.Element;\n    editProps?: IEditProps;\n    role?: string;\n}\n\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport class Video extends React.Component<IVideoProps> {\n    constructor(props: IVideoProps) {\n        super(props);\n    }\n\n    public render = (): JSX.Element => {\n        return (\n            <EditableField\n                editPropKey={this.props.editProps && this.props.editProps.key}\n                requestContext={this.props.editProps && this.props.editProps.requestContext}\n                fieldProps={{\n                    className: this.props.className,\n                    children: this.props.children,\n                    role: this.props.role\n                }}\n                type={FieldType.Video}\n            />\n        );\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { ContentEditableEvent } from 'react-contenteditable';\nimport { IRequestContext } from '../interfaces';\nimport { EditableField, FieldType } from './editable-fields/editable-field';\nimport { ILinksData } from './links';\n\nexport interface ILinkItemEditProps {\n    requestContext: IRequestContext;\n\n    onTextChange?(event: ContentEditableEvent): void;\n}\n\nexport interface ILinkItemProps {\n    link: ILinksData;\n    editProps?: ILinkItemEditProps;\n}\n\n/**\n * Component class for action links\n */\nexport class Link extends React.Component<ILinkItemProps> {\n    constructor(props: ILinkItemProps) {\n        super(props);\n    }\n\n    public render = (): JSX.Element | null => {\n        if (this.props.link) {\n            return (\n                <EditableField\n                    requestContext={this.props.editProps?.requestContext}\n                    type={FieldType.Link}\n                    onChange={\n                        this.props.editProps?.onTextChange ? this.props.editProps.onTextChange : (event: ContentEditableEvent) => null\n                    }\n                    fieldProps={{\n                        title: this.props.link.linkText,\n                        text: this.props.link.linkText,\n                        key: this.props.link.key || this.props.link.linkUrl,\n                        openInNewTab: this.props.link.openInNewTab,\n                        className: this.props.link.className,\n                        href: this.props.link.linkUrl,\n                        role: this.props.link.role || 'button',\n                        ariaLabel: this.props.link.ariaLabel,\n                        onClick: this.props.link.onClick,\n                        additionalProperties: this.props.link.additionalProperties,\n                        linkTag: this.props.link.linkTag,\n                        innerClassName: this.props.link.innerClassName\n                    }}\n                />\n            );\n        }\n        return null;\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { ContentEditableEvent } from 'react-contenteditable';\nimport { IDictionary, IRequestContext } from '../interfaces';\nimport { EditableField, FieldType } from './editable-fields/editable-field';\n\nexport interface ILinksData {\n    linkText?: string;\n    ariaLabel?: string;\n    openInNewTab?: boolean;\n    linkUrl?: string;\n    className?: string;\n    key?: string;\n    role?: string;\n    additionalProperties?: IDictionary<string>;\n    innerClassName?: string;\n    linkTag?: string;\n    onClick?(ev: React.SyntheticEvent): void;\n}\n\nexport interface ILinkEditProps {\n    requestContext: IRequestContext;\n\n    onTextChange?(index: number): (event: ContentEditableEvent) => void;\n}\n\nexport interface ILinkProps {\n    links: ILinksData[];\n    editProps?: ILinkEditProps;\n}\n\n/**\n * Component class for action links\n */\nexport class Links extends React.Component<ILinkProps> {\n    constructor(props: ILinkProps) {\n        super(props);\n    }\n\n    public render = (): JSX.Element | null => {\n        if (this.props.links && this.props.links.length > 0) {\n            return (\n                <>\n                    {this.props.links.map((l, i) => (\n                        // eslint-disable-next-line react/jsx-key\n                        <EditableField\n                            requestContext={this.props.editProps?.requestContext}\n                            type={FieldType.Link}\n                            onChange={\n                                this.props.editProps?.onTextChange\n                                    ? this.props.editProps.onTextChange(i)\n                                    : (event: ContentEditableEvent) => null\n                            }\n                            fieldProps={{\n                                title: l.linkText,\n                                text: l.linkText,\n                                key: l.key || l.linkUrl,\n                                openInNewTab: l.openInNewTab,\n                                className: l.className || (i === 0 ? 'msc-cta__primary' : 'msc-cta__secondary'),\n                                href: l.linkUrl,\n                                role: l.role || 'button',\n                                ariaLabel: l.ariaLabel,\n                                onClick: l.onClick,\n                                additionalProperties: l.additionalProperties,\n                                linkTag: l.linkTag,\n                                innerClassName: l.innerClassName\n                            }}\n                        />\n                    ))}\n                </>\n            );\n        }\n        return null;\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { LogLevel, StaticTelemetry } from '@msdyn365-commerce/telemetry-internal';\nimport { IActionContext } from '../interfaces';\nexport namespace requestHookRegistrar {\n    export enum RequestReaderAction {\n        send,\n        redirect\n    }\n    export interface IRequestReaderOutput {\n        action: RequestReaderAction;\n        parameters: string[] | undefined;\n    }\n    type requestReaderPlugin = (ctx: IActionContext) => Promise<IRequestReaderOutput | undefined>;\n    // more plugins will be added future.\n    interface IRequestHookBase {\n        requestReaderPlugin: requestReaderPlugin;\n    }\n\n    // TODO: more plugins will be added for each hook.\n    export interface IInitialHook extends IRequestHookBase {}\n    export interface IPreRenderHook extends IRequestHookBase {}\n    export interface IPostRenderHook extends IRequestHookBase {}\n\n    interface IHookRegistration {\n        initialHook?: IInitialHook;\n        preRenderHook?: IPreRenderHook;\n        postRenderHook?: IPostRenderHook;\n    }\n    export const requestHookRegistration: IHookRegistration = {};\n\n    const createHook = (hookType: 'initial' | 'pre-render' | 'post-render') => (options: IRequestHookBase) => {\n        switch (hookType) {\n            case 'initial':\n                if (requestHookRegistration.initialHook) {\n                    StaticTelemetry.log(LogLevel.Error, `initialHook is already registered, please avoid duplicate registration`);\n                    throw new Error('Initial hook is already registered, can not register duplicate initial hook');\n                }\n                requestHookRegistration.initialHook = options;\n                break;\n            case 'pre-render':\n                if (requestHookRegistration.preRenderHook) {\n                    StaticTelemetry.log(LogLevel.Error, `pre-render is already registered, please avoid duplicate registration`);\n                    throw new Error('pre-render hook is already registered, can not register duplicate pre-render hook');\n                }\n                requestHookRegistration.preRenderHook = options;\n                break;\n            case 'post-render':\n                if (requestHookRegistration.postRenderHook) {\n                    StaticTelemetry.log(LogLevel.Error, `post-render is already registered, please avoid duplicate registration`);\n                    throw new Error('post-render hook is already registered, can not register duplicate post-render hook');\n                }\n                requestHookRegistration.postRenderHook = options;\n                break;\n            default:\n                StaticTelemetry.log(LogLevel.Warning, `unsupported request hook registration ${hookType}`);\n                break;\n        }\n    };\n\n    export const createInitialHook = createHook('initial');\n    export const createpreRenderHook = createHook('pre-render');\n    export const createpostRenderHook = createHook('post-render');\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '../interfaces';\n\n/**\n * Retrieves performance utils package and cache where the data should be stored.\n * If feature is not enabled or if cache is not present, returns undefined.\n * @param context - Action context.\n * @returns Performance utils package chunk and cache instance.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getPerformanceUtils = (msdyn365Commerce: any, context: IActionContext) => {\n    const shouldRunPerformanceAnalysis =\n        context.requestContext.features?.enable_performance_analysis && context.requestContext.params.isPerfAnalysis;\n\n    if (!shouldRunPerformanceAnalysis) {\n        return undefined;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Retrieve performance tools binder.\n    const performanceUtilsPackage = msdyn365Commerce.perfAnalysisBinder();\n\n    // @ts-ignore -- Property not exposed.\n    const cache = context.requestCache?.internalCache;\n    if (!cache) {\n        return undefined;\n    }\n\n    return {\n        cache,\n        performanceUtilsPackage\n    };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n    ITelemetry,\n    ITelemetryModuleContext,\n    ITrackDependency,\n    LogLevel,\n    TelemetryEvent,\n    TelemetryEventContent,\n    TelemetryLogOptions\n} from '@msdyn365-commerce/telemetry-internal';\nimport { merge as _merge } from 'lodash';\nimport * as React from 'react';\nimport { ICommerceApiSettings, IModule } from '../contract';\nimport {\n    IAction,\n    IActionContext,\n    IActionInput,\n    IAny,\n    ICoreContext,\n    IDictionary,\n    IGeneric,\n    IRequestContext,\n    ISessionStorageContext\n} from '../interfaces';\nimport { ICookieContext } from '../interfaces/context/ICookieContext';\nimport msdyn365Commerce, { MSDyn365Commerce } from '../msdyn365-commerce';\nimport { CultureInfoFormatter, getCurrencyCodeFromContext } from '../utilities';\n\ndeclare let process: IGeneric<IAny>;\n\nconst renderModuleAttributes = (props: IGeneric<IAny>): IDictionary<string> => {\n    if (!props || !props.id) {\n        return {};\n    }\n\n    return { 'data-m-t': props.typeName };\n};\n\n/**\n * Creates a new mock telemetry object, takes a partial ITelemetry and fills in missing required properties\n * @param telemetry A partial or full implmentation of ITelemetry\n */\nexport const buildMockTelemetry = (telemetry?: Partial<ITelemetry>): ITelemetry => {\n    const defaultMockTelemetry: ITelemetry = {\n        trace: (message: string) => console.log(`[Mock Trace]: ${message}`),\n        debug: (message: string, ...meta: IAny[]) => console.log(`[Mock Debug]: ${message}`, ...meta),\n        information: (message: string) => console.log(`[Mock Info]: ${message}`),\n        warning: (message: string) => console.log(`[Mock Warning]: ${message}`),\n        error: (message: string, ...meta: IAny[]) => console.log(`[Mock Error]: ${message}`, ...meta),\n        exception: (error: Error) => console.log(`[Mock Exception]: ${error}`),\n        critical: (message: string) => console.log(`[Mock Info]: ${message}`),\n        log: (logLevel: LogLevel, messageTemplate: string, logOptions?: TelemetryLogOptions) =>\n            console.log('[Mock Log]: ', logLevel, messageTemplate, logOptions),\n        logEvent: (eventType: TelemetryEvent, payload: TelemetryEventContent) => {\n            // intentionally blank\n        },\n        trackMetric: (name: string, value: number) => console.log('[Mock Track Metric]: ', name, value),\n        trackEvent: (name: string, properties, measurements) => console.log('[Mock Track Event]: ', properties, measurements),\n        setTelemetryRequestContext: () => {\n            return;\n        },\n        setTelemetryModuleContext: (moduleContext: ITelemetryModuleContext) => buildMockTelemetry,\n        trackDependency: (options: ITrackDependency) => {\n            console.log('[Mock Track Dependency]: ', options);\n        },\n        setTelemetryAttribute: (telemetryId: string, additionalTelemetryProperties: object) => {\n            return { 'data-bi-id': '12345', 'data-m': '{\"id\":\"12345\",\"key1\":\"val1\"}\"' };\n        }\n    };\n    return telemetry ? { ...defaultMockTelemetry, ...telemetry } : defaultMockTelemetry;\n};\n\n/**\n * Creates a mock CookieContext. Takes a partial ICookieContext and fills in required properties\n * @param context Partial action context.\n */\n// eslint-disable-next-line complexity\nexport const buildMockCookieContext = (context?: Partial<ICookieContext>): ICookieContext => {\n    return {\n        get:\n            (context && context.get) ||\n            ((cookiename: string) => {\n                return { name: cookiename, value: undefined, status: 'NOT_FOUND' };\n            }),\n        set:\n            (context && context.set) ||\n            (<T>(_cookieName: string, _cookieValue: T): void => {\n                console.log('set called');\n            }),\n        remove:\n            (context && context.remove) ||\n            ((): void => {\n                console.log('remove called');\n            }),\n        getCartCookie:\n            (context && context.getCartCookie) ||\n            ((): string => {\n                console.log('getCartCookie called');\n                return '';\n            }),\n        setCartCookie:\n            (context && context.setCartCookie) ||\n            ((): void => {\n                console.log('setCartCookie called');\n            }),\n        getCheckoutCartCookie:\n            (context && context.getCheckoutCartCookie) ||\n            ((): string => {\n                console.log('getCheckouCartCookie called');\n                return '';\n            }),\n        setCheckoutCartCookie:\n            (context && context.setCheckoutCartCookie) ||\n            ((): void => {\n                console.log('setCheckouCartCookie called');\n            }),\n        removeCheckoutCartCookie:\n            (context && context.removeCheckoutCartCookie) ||\n            ((): void => {\n                console.log('removeCheckoutCartCookie called');\n            }),\n        getAccountSelectionCookie:\n            (context && context.getAccountSelectionCookie) ||\n            ((): string => {\n                console.log('getAccountSelectionCookie called');\n                return '';\n            }),\n        setAccountSelectionCookie:\n            (context && context.setAccountSelectionCookie) ||\n            ((): void => {\n                console.log('setAccountSelectionCookie called');\n            }),\n        removeAccountSelectionCookie:\n            (context && context.removeAccountSelectionCookie) ||\n            ((): void => {\n                console.log('removeAccountSelectionCookie called');\n            }),\n        isConsentGiven:\n            (context && context.isConsentGiven) ||\n            ((): boolean => {\n                return true;\n            }),\n        setConsentCookie:\n            (context && context.setConsentCookie) ||\n            ((): void => {\n                console.log('setConsentCookie called');\n            }),\n        deleteConsentCookie:\n            (context && context.deleteConsentCookie) ||\n            ((): void => {\n                console.log('deleteConsentCookie called');\n            }),\n        getTargetIdCookie:\n            (context && context.getCartCookie) ||\n            ((): string => {\n                console.log('getTargetIdCookie called');\n                return '';\n            })\n    };\n};\n\nexport const buildMockSessionStorageContext = (context?: Partial<ISessionStorageContext>): ISessionStorageContext => {\n    return {\n        getDataFromStorage:\n            (context && context.getDataFromStorage) ||\n            ((): object => {\n                console.log('getDataFromStorage called');\n                return {};\n            }),\n        setDataInStorage:\n            (context && context.setDataInStorage) ||\n            ((): void => {\n                console.log('setDataInStorage called');\n                return;\n            }),\n        getCheckoutCartData:\n            (context && context.getCheckoutCartData) ||\n            ((): object => {\n                console.log('getCheckoutCartData called');\n                return {};\n            }),\n        setCheckoutCartData:\n            (context && context.setCheckoutCartData) ||\n            ((): void => {\n                console.log('setCheckoutCartData called');\n                return;\n            }),\n        removeDataFromStorage:\n            (context && context.removeDataFromStorage) ||\n            ((): void => {\n                console.log('removeDataFromStorage called');\n                return;\n            }),\n        removeCheckoutCartData:\n            (context && context.removeCheckoutCartData) ||\n            ((): void => {\n                console.log('removeCheckoutCartData called');\n                return;\n            })\n    };\n};\n\n/**\n * Creates a mock IRequestContext. Takes a partial IRequestContext and fills in required properties\n * @param requestContext Partial IRequestContext\n */\nexport const buildMockRequest = (requestContext?: Partial<IRequestContext>): IRequestContext => {\n    const mockRequest: IRequestContext = {\n        url: {\n            requestUrl: new URL('https://contoso.com'),\n            staticCdnUrl: 'string'\n        },\n        canonicalDomain: 'contoso.com',\n        canonicalUrl: 'https://contoso.com',\n        locale: 'en-us',\n        textDirection: 'ltr',\n        params: {\n            isDebug: false,\n            isEditor: false,\n            isPreview: false,\n            isPerfAnalysis: false,\n            concatJs: {\n                hasValue: false,\n                isTruthy: false,\n                value: undefined\n            },\n            /**\n             * Theme SCSS override matching registered theme name\n             */\n            theme: ''\n        },\n        device: {\n            Type: 'pc'\n        },\n        user: {\n            token: 'mockToken',\n            isAuthenticated: false,\n            optOutWebActivityTracking: false,\n            isB2b: true\n        },\n        app: {},\n        apiSettings: {\n            baseUrl: 'mockBaseUrl',\n            channelId: 1,\n            eCommerceChannelId: '',\n            oun: 'mockOUN',\n            catalogId: 2,\n            baseImageUrl: 'https://cms-ppe-imageresizer-mr.trafficmanager.net/cms/api/fabrikamsb/imageFileData/search?fileName=/',\n            ratingsReviewsEndpoint: '',\n            retailServerProxyVersion: '9.0.0',\n            rnr: {\n                proxyUrl: '',\n                url: '',\n                id: ''\n            },\n            imageResizerEndPoint: 'https://cms-ppe-imageresizer-mr.trafficmanager.net',\n            imageResizerEndPointPreview: 'https://cms-ppe-imageresizer-mr.trafficmanager.net'\n        },\n        gridSettings: {\n            xs: { w: 768 },\n            sm: { w: 992 },\n            md: { w: 1200 },\n            lg: { w: 1600 },\n            xl: { w: 1800 }\n        },\n        urlTokens: {},\n        operationId: 'mockOperationId',\n        siteTheme: 'default',\n        // feature switches coming from server\n        features: {},\n        pageData: {},\n        headers: {},\n        cookies: buildMockCookieContext(),\n        sessionStorage: buildMockSessionStorageContext(),\n        themeOverride: {\n            url: '',\n            disableDefault: false\n        },\n        telemetrySettings: {\n            eventHubAuthToken: '',\n            eventHubEndPoint: '',\n            optOutWebActivityTracking: false,\n            operationId: 'mockOperationId',\n            instrumentationKey: '',\n            environmentId: 'Development',\n            operationalInsightsInstrumentationKey: ''\n        },\n        telemetryData: {\n            Checkout: [\n                {\n                    orderId: '',\n                    cartId: '097504969642348742',\n                    cartVersion: '12432',\n                    Products: [\n                        {\n                            productChannelId: 18629762,\n                            productChannelName: 'store',\n                            productCategoryId: '9754',\n                            productCategoryName: 'Sunglasses',\n                            productId: '970374',\n                            productName: 'Aviator',\n                            productSku: 'special',\n                            productPrice: 120,\n                            productQuantity: 1,\n                            productCurrency: 'USD'\n                        }\n                    ]\n                }\n            ],\n            ProductPageView: {\n                productChannelId: 18629762,\n                productChannelName: '',\n                productCategoryId: '',\n                productCategoryName: '',\n                productId: '08439484',\n                productName: 'Awesome Tie',\n                productSku: '',\n                productPrice: 98,\n                productQuantity: '',\n                productCurrency: ''\n            }\n        },\n        siteStylePreset: ''\n    };\n    return _merge(mockRequest, requestContext);\n};\n\n// eslint-disable-next-line react/display-name\nconst mockRenderView = (FunctionalComponent?: React.FC) => <T extends IModule>(props: T) => {\n    if (!FunctionalComponent) {\n        return null;\n    }\n\n    return React.createElement(FunctionalComponent, <any>props);\n};\n\n/**\n * Creates a mock IMSDyn365ActionContext. Takes a partial IActionContext and fills in required properties\n * @param context Partial action context.\n */\nexport const buildMockActionContext = (context?: Partial<IActionContext>): IActionContext => {\n    return {\n        chainAction:\n            (context && context.chainAction) ||\n            (async <T = unknown>(action: IAction<T>, input: IActionInput | IActionInput[]) => {\n                return null;\n            }),\n        update:\n            (context && context.update) ||\n            ((input: IActionInput | IActionInput[], data: any): any => {\n                return data;\n            }),\n        trace:\n            (context && context.trace) ||\n            ((message: string): void => {\n                return;\n            }),\n        get:\n            (context && context.get) ||\n            ((cacheObjectType: string, cacheKey: string) => {\n                return null;\n            }),\n        getAll:\n            (context && context.getAll) ||\n            ((cacheObjectType: string) => {\n                return null;\n            }),\n        runAllActionsInQueue: async () => {\n            return;\n        },\n        requestContext: buildMockRequest(context && context.requestContext),\n        telemetry: buildMockTelemetry(context && context.telemetry),\n        ...context\n    };\n};\n\n/**\n * Creates a mock Core Context\n * @param coreContext Partial core context\n */\nexport const buildMockCoreContext = <TApp extends {} = {}>(coreContext: Partial<ICoreContext<TApp>>): ICoreContext<TApp> => {\n    const request = buildMockRequest(coreContext.request);\n    return {\n        actionContext: buildMockActionContext(coreContext.actionContext),\n        app: coreContext.app || <TApp>{},\n        telemetry: buildMockTelemetry(coreContext.telemetry),\n        request,\n        cultureFormatter: coreContext.cultureFormatter || new CultureInfoFormatter(request.locale, getCurrencyCodeFromContext(request))\n    };\n};\n\n/**\n * Creates a mock MSDyn365 App with fake API settings for use in testing\n */\nexport const initializeMockApp = (mockSettings?: ICommerceApiSettings) => {\n    (<IGeneric<IAny>>MSDyn365Commerce).prototype.setMockSettings = function(): void {\n        this._env = process.env.NODE_ENV;\n        this._commerceApiSetting = mockSettings || {\n            baseUrl: 'http://mock.cloud.retail.dynamics.com/',\n            channelId: 1,\n            catalogId: 0,\n            oun: '1',\n            baseImageUrl: `http://mock.cloud.retail.dynamics.com/MediaServer/`\n        };\n    };\n\n    (<IGeneric<IAny>>msdyn365Commerce).setMockSettings();\n};\n\n/**\n * Generates a mock IModule<TData> prop\n * @param moduleData Mock TData that maps to props.data\n * @param dataActions Mock data actions that map to props.dataActions\n * @param moduleConfig Mock module configs that map to props.config\n * @param mockContext Mock ICoreContext that map to props.context\n * @param mockTelemetry Mock ITelemetry that map to props.telemetry. If no mock is provided a default will be passed that logs to console.\n */\nexport const buildMockModuleProps = <TData = IGeneric<IAny>, TConfig = IGeneric<IAny>>(\n    moduleData: TData,\n    dataActions: IGeneric<IAny>,\n    moduleConfig?: TConfig,\n    mockContext?: ICoreContext,\n    mockTelemetry?: ITelemetry,\n    app?: IGeneric<IAny>,\n    view?: React.FC\n): IModule<TData> => {\n    mockContext = buildMockCoreContext(mockContext || {});\n    return {\n        context: mockContext,\n        data: moduleData,\n        dataActions: dataActions,\n        config: moduleConfig || {},\n        id: 'mock-id',\n        friendlyName: 'Mock Id',\n        typeName: 'mock-type',\n        telemetry: buildMockTelemetry(mockTelemetry),\n        app: { ...{ config: {} }, ...app },\n        renderModuleAttributes: renderModuleAttributes,\n        renderView: mockRenderView(view)\n    };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IRenderingHelper } from '../../interfaces/IRenderingHelper';\n\nexport const DATA_ATTRIBUTE = 'data-i';\nexport const FRAGMENT_ATTRIBUTE = 'fragment';\nexport const FRAGMENT_MODULE_ATTRIBUTE = 'fragmentmodule';\nexport const CONTAINER_TYPE = 'containerModule';\nexport const EMPTY_SLOT_TYPE_NAME = 'empty-slot';\nexport const ADD_CONTAINER_CLASS_NAME = 'add-container-inner';\nexport const ADD_CONTAINER_CLASS_NAME_ON_DRAG_OVER = 'ondrop';\nexport const ADD_CONTAINER_CLASS_NAME_ON_DRAGGING_MODULE = 'drop-module';\nexport const ADD_CONTAINER_CLASS_NAME_ON_DRAGGING_FRAGMENT = 'drop-fragment';\nexport const ADD_CONTAINER_CLASS_NAME_ON_DRAGGING_NOT_ALLOWED = 'drop-error';\nexport const NO_POINTER_EVENTS_CLASS_NAME = 'ms-no-pointer-events';\n\nexport type AddModuleBoxState = 'Initial' | 'InsertModule' | 'InsertFragment' | 'MoveNotAllowed';\n\nexport type ElementDataInfo = {\n    dataInfo: DataInfo;\n    element: HTMLElement | null;\n};\n\ntype DataInfo = {\n    id: string;\n    parentId: string;\n    slotId: string;\n    typeName: string;\n    friendlyName: string;\n    moduleType: string;\n    isFragment: boolean;\n    isFragmentModule: boolean;\n};\n\n/**\n * Get HTML element by a given Id.\n * @param elementId The HTML element Id.\n * @returns {HTMLElement | null} Returns the html element if element exists. Otherwise, return null.\n */\nexport function getElementById(elementId: string): HTMLElement | null {\n    return elementId ? document.getElementById(elementId) : null;\n}\n\n/**\n * Get the module html element by data Id.\n * @param moduleDataId The module data Id.\n * @returns {HTMLElement | null} Returns the html module element if module exists. Otherwise, return null.\n */\nexport function getModuleById(moduleDataId: string): HTMLElement | null {\n    if (!moduleDataId) {\n        return null;\n    }\n    const modules = [...Array.from(document.body.querySelectorAll(`[${DATA_ATTRIBUTE}]`))];\n    const foundModule = modules.find(c => getElementDataInfo(<HTMLElement>c).dataInfo.id === moduleDataId);\n    return foundModule ? <HTMLElement>foundModule : null;\n}\n\n/**\n * Get a list of all add module boxes.\n * @returns {ElementDataInfo[]} list of modules.\n */\nexport function getAllAddModuleBoxes(): ElementDataInfo[] {\n    const modules = [...Array.from(document.body.querySelectorAll(`[${DATA_ATTRIBUTE}]`))];\n    return modules.map(m => getElementDataInfo(<HTMLElement>m)).filter(m => m.dataInfo.typeName === EMPTY_SLOT_TYPE_NAME);\n}\n\n/**\n * Get a list of modules by parent data Id and slot data Id.\n * @param parentId The parent data Id.\n * @param slotId The slot Id.\n * @returns {Element[]} list of modules.\n */\nexport function getModulesByParentIdAndSlotId(parentId: string, slotId: string): Element[] {\n    let modules: Element[] = [];\n\n    if (!parentId || !slotId) {\n        return modules;\n    }\n\n    const parentModule = getElementDataInfoById(parentId);\n    if (parentModule.element) {\n        modules = [...Array.from(parentModule.element.querySelectorAll(`[${DATA_ATTRIBUTE}]`))];\n        modules = modules.filter(m => {\n            const dataInfo = getElementDataInfo(<HTMLElement>m).dataInfo;\n            if (dataInfo.parentId === parentId && dataInfo.slotId === slotId && dataInfo.typeName !== EMPTY_SLOT_TYPE_NAME) {\n                return true;\n            }\n            return false;\n        });\n    }\n    return modules;\n}\n\n/**\n * Get the closest module to a specific html element target.\n * @param target The specific html element target.\n * @returns {HTMLElement | null} Returns the html module element if element exists. Otherwise, return null.\n */\nexport function getModuleByTarget(target: HTMLElement): HTMLElement | null {\n    let moduleElement: HTMLElement | null = target;\n    const dataAttribute = moduleElement.getAttribute(DATA_ATTRIBUTE);\n    if (!dataAttribute) {\n        // Returns the closest ancestor which has an attribute equals to DATA_ATTRIBUTE\n        // Gets the closest module to the target\n        moduleElement = moduleElement.closest(`[${DATA_ATTRIBUTE}]`);\n    }\n    return moduleElement;\n}\n\n/**\n * Get data info from the data-i element attribute.\n * @param element The html element.\n * @returns {ElementDataInfo} data info from the data-i element attribute.\n */\nexport function getElementDataInfo(element: HTMLElement | null): ElementDataInfo {\n    if (element) {\n        const dataAttribute = element.getAttribute(DATA_ATTRIBUTE);\n        if (dataAttribute) {\n            const json = dataAttribute.replace(/([^:,{}]+):([^:,{}]+)/g, '\"$1\":\"$2\"');\n            const obj = JSON.parse(json);\n            return {\n                dataInfo: {\n                    id: obj?.id,\n                    parentId: obj?.p,\n                    slotId: obj?.s,\n                    typeName: obj?.t,\n                    friendlyName: obj?.fn,\n                    moduleType: obj?.mt,\n                    isFragment: isElementFragment(element),\n                    isFragmentModule: isElementFragmentModule(element)\n                },\n                element: element\n            };\n        }\n    }\n    return {\n        dataInfo: {\n            id: '',\n            parentId: '',\n            slotId: '',\n            typeName: '',\n            friendlyName: '',\n            moduleType: '',\n            isFragment: false,\n            isFragmentModule: false\n        },\n        element: element\n    };\n}\n\n/**\n * Get the element data info by target.\n * @param target The target html element.\n * @returns {ElementDataInfo} data info from the data-i element attribute.\n */\nexport function getElementDataInfoByTarget(target: HTMLElement): ElementDataInfo {\n    return getElementDataInfo(getModuleByTarget(target));\n}\n\n/**\n * Get the element data info by module Id.\n * @param moduleId The module Id.\n * @returns {ElementDataInfo} data info from the data-i element attribute.\n */\nexport function getElementDataInfoById(moduleId: string): ElementDataInfo {\n    return getElementDataInfo(getModuleById(moduleId));\n}\n\n/**\n * clear the element data info object.\n */\nexport function cleanDataInfo(): ElementDataInfo {\n    return {\n        dataInfo: {\n            id: '',\n            parentId: '',\n            slotId: '',\n            typeName: '',\n            friendlyName: '',\n            moduleType: '',\n            isFragment: false,\n            isFragmentModule: false\n        },\n        element: null\n    };\n}\n\n/**\n * Get rendering helper.\n */\nexport function getRenderingHelper(): IRenderingHelper | undefined {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const _msdyn365AuthoringHelper = window && (<any>window)._msdyn365.authoringHelper;\n    if (_msdyn365AuthoringHelper && _msdyn365AuthoringHelper.renderingHelper) {\n        return _msdyn365AuthoringHelper.renderingHelper;\n    }\n}\n\n/**\n * Update the add module inner container class\n * @param addInnerContainer The add module inner container element.\n * @param state The state to where the element classes should be updated to.\n */\nexport function updateAddModuleInnerContainerClass(addInnerContainer: Element, state: AddModuleBoxState = 'Initial'): void {\n    let className = ADD_CONTAINER_CLASS_NAME;\n    switch (state) {\n        case 'InsertModule':\n            className += ` ${ADD_CONTAINER_CLASS_NAME_ON_DRAG_OVER} ${ADD_CONTAINER_CLASS_NAME_ON_DRAGGING_MODULE}`;\n            appendNoPointerEventsToChildren(addInnerContainer);\n            break;\n        case 'InsertFragment':\n            className += ` ${ADD_CONTAINER_CLASS_NAME_ON_DRAG_OVER} ${ADD_CONTAINER_CLASS_NAME_ON_DRAGGING_FRAGMENT}`;\n            appendNoPointerEventsToChildren(addInnerContainer);\n            break;\n        case 'MoveNotAllowed':\n            className += ` ${ADD_CONTAINER_CLASS_NAME_ON_DRAG_OVER} ${ADD_CONTAINER_CLASS_NAME_ON_DRAGGING_NOT_ALLOWED}`;\n            appendNoPointerEventsToChildren(addInnerContainer);\n            break;\n        default:\n            removeNoPointerEventsFromChildren(addInnerContainer);\n    }\n    addInnerContainer.className = className;\n}\n\n/**\n * Set children to have no pointer events.\n * This prevents drag enter event from being triggered for each children in the add module slot\n * @param element the element which children classes should be updated.\n */\nfunction appendNoPointerEventsToChildren(element: Element): void {\n    const elementChildren = Array.from(element.children);\n    elementChildren.map(c => {\n        if (c.className) {\n            if (!c.className.includes(NO_POINTER_EVENTS_CLASS_NAME)) {\n                c.className += ` ${NO_POINTER_EVENTS_CLASS_NAME}`;\n            }\n        } else {\n            c.className = `${NO_POINTER_EVENTS_CLASS_NAME}`;\n        }\n    });\n}\n/**\n * Remove no pointer events class.\n * This will set the children back to their original classes.\n * @param element the element which children classes should be updated.\n */\nfunction removeNoPointerEventsFromChildren(element: Element): void {\n    const elementChildren = Array.from(element.children);\n    elementChildren.map(c => {\n        if (c.className && c.className.includes(NO_POINTER_EVENTS_CLASS_NAME)) {\n            c.className = c.className.replace(NO_POINTER_EVENTS_CLASS_NAME, '').trim();\n        }\n    });\n}\n/**\n * Returns whether or not the element is a fragment container.\n * @param element The html element.\n * @returns {boolean} Whether or not the element is a fragment container.\n */\nfunction isElementFragment(element: HTMLElement): boolean {\n    return !!element.getAttribute(FRAGMENT_ATTRIBUTE);\n}\n\n/**\n * Returns whether or not the element is a fragment module.\n * @param element The html element.\n * @returns {boolean} Whether or not the element is a fragment module.\n */\nfunction isElementFragmentModule(element: HTMLElement): boolean {\n    return !!element.getAttribute(FRAGMENT_MODULE_ATTRIBUTE);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable max-len */\nimport { CONTAINER_TYPE, ElementDataInfo, getRenderingHelper } from './drag-and-drop-utils';\n\ntype IconType = 'container' | 'module' | 'fragment' | 'notDroppable';\ntype IconInfo = { className: string; viewBox: string; iconType: IconType; isDroppable: boolean; d: string };\ntype IconTypeDictionary = Record<IconType, IconInfo>;\nconst ICON_TYPE: IconTypeDictionary = {\n    container: {\n        className: 'ms-container-icon',\n        d:\n            'M0 1664v-256h128v256H0zM256 0v128H0V0h256zM0 2048v-256h128v256H0zM1792 0v128h-256V0h256zM0 1280v-256h128v256H0zm640-896h768l384 640-384 640H640l-384-640 384-640zm696 1152l307-512-307-512H712l-307 512 307 512h624zM640 0v128H384V0h256zM0 896V640h128v256H0zM1024 0v128H768V0h256zm384 0v128h-256V0h256zm512 1792v-256h128v256h-128zm0-768V768h128v256h-128zm0 384v-256h128v256h-128zm0-768V384h128v256h-128zm0-640h128v256h-128V0zM0 512V256h128v256H0zm640 1536v-128h256v128H640zm-384 0v-128h256v128H256zm1152 0v-128h256v128h-256zm-384 0v-128h256v128h-256zm768 0v-128h256v128h-256z',\n        viewBox: '30 0 2048 2048',\n        iconType: 'container',\n        isDroppable: true\n    },\n    module: {\n        className: 'ms-module-icon',\n        d: 'M1536 128l512 896-512 896H512L0 1024l512-896h1024zm-74 1664l439-768-439-768H586l-439 768 439 768h876z',\n        viewBox: '30 0 2048 2048',\n        iconType: 'module',\n        isDroppable: true\n    },\n    fragment: {\n        className: 'ms-fragment-icon',\n        d:\n            'M768 896H256L0 448 256 0h512l256 448-256 448zM330 128L147 448l183 320h364l183-320-183-320H330zm-74 896h512l256 448-256 448H256L0 1472l256-448zm438 768l183-320-183-320H330l-183 320 183 320h364zm970-1280l256 448-256 448h-512L896 960l256-448h512zm-74 768l183-320-183-320h-364l-183 320 183 320h364z',\n        viewBox: '0 0 1920 1920',\n        iconType: 'fragment',\n        isDroppable: true\n    },\n    notDroppable: {\n        className: 'ms-not-droppable-icon',\n        d:\n            'M939 171q129 0 249 33t224 95 190 146 147 190 94 225 34 249q0 129-33 249t-95 224-146 191-190 147-225 94-249 34q-130 0-250-33t-224-95-190-147-147-190-94-224-34-250q0-129 33-249t95-224 147-190 190-147 224-94 250-34zm0 1740q111 0 213-28t192-81 162-126 125-162 81-191 29-214q0-110-28-212t-81-192-126-162-163-126-191-81-213-29q-111 0-213 28t-192 81-162 126-125 162-81 191-29 214q0 111 28 213t81 192 125 162 163 126 191 80 214 29zm-470-887h939v171H469v-171z',\n        viewBox: '20 170 1877 1877',\n        iconType: 'notDroppable',\n        isDroppable: false\n    }\n};\n// The styles for these classes are defined in base-page.tsx\nconst DRAG_IMAGE_CLASS_NAME = 'ms-drag-image';\nconst DRAG_ICON_BOX_CLASS_NAME = 'ms-drag-icon-box';\nconst DRAG_TEXT_BOX_CLASS_NAME = 'ms-drag-text-box';\nconst DRAG_TEXT_CONTENT_CLASS_NAME = 'ms-drag-text-content';\nconst SVG_URL = 'http://www.w3.org/2000/svg';\n\n/**\n * Provides the drag and drop image control\n */\nexport class DragAndDropImage {\n    private dragImage: HTMLElement | null;\n    private transparentImage: HTMLElement | null;\n    private iconType: IconType | null;\n\n    constructor() {\n        this.dragImage = null;\n        this.transparentImage = null;\n        this.iconType = null;\n    }\n\n    /**\n     * Update the drag image position.\n     * @param x The position of the image on the x-axis.\n     * @param y The position of the image on the y-axis.\n     */\n    public updatePosition = (x: number, y: number): void => {\n        if (this.dragImage) {\n            this.dragImage.style.display = '';\n            this.dragImage.style.left = `${x}px`;\n            this.dragImage.style.top = `${y}px`;\n        }\n    };\n\n    /**\n     * Hide image.\n     */\n    public hide = (): void => {\n        if (this.dragImage) {\n            this.dragImage.style.display = 'none';\n        }\n    };\n\n    /**\n     * Set transparent image to be used as the data transfer image.\n     * @returns {HTMLElement | null} The transparent image element.\n     */\n    public setTransparentImage = (): HTMLElement => {\n        this.transparentImage = document.createElement('div');\n        document.body.appendChild(this.transparentImage);\n        return this.transparentImage;\n    };\n\n    /**\n     * Check if the status of the image is droppable.\n     * @returns {boolean} If the current status of the image is droppable.\n     */\n    public isStatusDroppable = (): boolean => {\n        return !!this.dragImage && this.iconType !== 'notDroppable';\n    };\n\n    /**\n     * Check if the status of the image is not droppable.\n     * @returns {boolean} If the current status of the image is not droppable.\n     */\n    public isStatusNotDroppable = (): boolean => {\n        return !!this.dragImage && this.iconType === 'notDroppable';\n    };\n\n    /**\n     * Create or update the drop allowed image element if necessary.\n     * @param dragElementDataInfo The drag element data info.\n     * @param x The position of the image on the x-axis.\n     * @param y The position of the image on the y-axis.\n     */\n    public setDropAllowedImage = (dragElementDataInfo: ElementDataInfo, x: number, y: number): void => {\n        this._setDragImage(this._getIconInfo(dragElementDataInfo), this._getImageName(dragElementDataInfo), x, y);\n    };\n\n    /**\n     * Create or update the drop not allowed image element if necessary.\n     * @param x The position of the image on the x-axis.\n     * @param y The position of the image on the y-axis.\n     */\n    public setDropNotAllowedImage = (x: number, y: number): void => {\n        this._setDragImage(this._getIconInfo(), 'Move not allowed', x, y);\n    };\n\n    /**\n     * Clear the drag and drop image.\n     */\n    public clear = (): void => {\n        if (this.dragImage) {\n            this.dragImage.remove();\n        }\n        if (this.transparentImage) {\n            this.transparentImage.remove();\n        }\n        this.dragImage = null;\n        this.transparentImage = null;\n        this.iconType = null;\n    };\n\n    /**\n     * Get the name to be displayed on the drag image.\n     * @param dragElementDataInfo The drag element data info.\n     * @returns {string} The name to be displayed on the drag image.\n     */\n    private _getImageName(dragElementDataInfo: ElementDataInfo): string {\n        let dragImageName = dragElementDataInfo.dataInfo.friendlyName;\n        if (dragElementDataInfo.dataInfo.isFragment) {\n            const helper = getRenderingHelper();\n            if (helper && helper.getFragmentDisplayName) {\n                dragImageName = helper.getFragmentDisplayName(dragElementDataInfo.dataInfo.id);\n            }\n        }\n        return dragImageName;\n    }\n\n    /**\n     * Get the information about the icon to be used inside the drag image.\n     * @param dragElementDataInfo The drag element data info.\n     * @returns {IconInfo} The info about the icon to be used inside the drag image.\n     */\n    private _getIconInfo(dragElementDataInfo?: ElementDataInfo): IconInfo {\n        if (!dragElementDataInfo) {\n            return ICON_TYPE.notDroppable;\n        } else if (dragElementDataInfo.dataInfo.isFragment || dragElementDataInfo.dataInfo.isFragmentModule) {\n            return ICON_TYPE.fragment;\n        } else if (dragElementDataInfo.dataInfo.moduleType === CONTAINER_TYPE) {\n            return ICON_TYPE.container;\n        } else {\n            return ICON_TYPE.module;\n        }\n    }\n\n    /**\n     * Create or update the drag image element if necessary.\n     * @param iconInfo The info about the icon to be displayed in the drag image.\n     * @param textContent The text content to be placed inside the text box.\n     * @param x The position of the image on the x-axis.\n     * @param y The position of the image on the y-axis.\n     */\n    private _setDragImage = (iconInfo: IconInfo, textContent: string, x: number, y: number): void => {\n        if (!this.dragImage) {\n            this.dragImage = this._createDragImage(iconInfo, textContent, x, y);\n            document.body.appendChild(this.dragImage);\n        } else if (this.iconType && this.iconType !== iconInfo.iconType) {\n            const droppableClassName = iconInfo.isDroppable ? 'droppable' : 'not-droppable';\n            const textBox = this.dragImage.querySelector(`.${DRAG_TEXT_BOX_CLASS_NAME}`);\n            if (textBox) {\n                const text = textBox.querySelector(`.${DRAG_TEXT_CONTENT_CLASS_NAME}`);\n                if (text) {\n                    text.className = `${DRAG_TEXT_CONTENT_CLASS_NAME} ${droppableClassName}`;\n                    text.textContent = textContent;\n                    textBox.className = `${DRAG_TEXT_BOX_CLASS_NAME} ${droppableClassName}`;\n                }\n            }\n            const iconBox = this.dragImage.querySelector(`.${DRAG_ICON_BOX_CLASS_NAME}`);\n            if (iconBox) {\n                iconBox.className = `${DRAG_ICON_BOX_CLASS_NAME} ${droppableClassName}`;\n                const iconPath = iconBox.querySelector(`.${ICON_TYPE[this.iconType].className}`);\n                if (iconPath) {\n                    iconPath.setAttribute('class', iconInfo.className);\n                }\n                const iconSVG = iconBox.querySelector(`svg`);\n                if (iconSVG) {\n                    iconSVG.setAttribute('viewBox', iconInfo.viewBox);\n                }\n            }\n        }\n        this.iconType = iconInfo.iconType;\n    };\n\n    /**\n     * Create the drag image element.\n     * @param iconInfo The info about the icon to be displayed in the drag image.\n     * @param textContent The text content to be placed inside the text box.\n     * @param x The position of the image on the x-axis.\n     * @param y The position of the image on the y-axis.\n     * @returns {HTMLElement} The drag image element.\n     */\n    private _createDragImage = (iconInfo: IconInfo, textContent: string, x: number, y: number): HTMLElement => {\n        const image = document.createElement('div');\n        image.className = DRAG_IMAGE_CLASS_NAME;\n        image.style.left = `${x}px`;\n        image.style.top = `${y}px`;\n\n        const iconBox = this._createDragIcon(iconInfo);\n        const textBox = this._createDragText(textContent, iconInfo.isDroppable);\n\n        image.appendChild(iconBox);\n        image.appendChild(textBox);\n\n        return image;\n    };\n\n    /**\n     * Create the icon box for the drag image element.\n     * @param iconInfo The info about the icon to be displayed in the drag image.\n     * @returns {HTMLElement} The drag icon element.\n     */\n    private _createDragIcon = (iconInfo: IconInfo): HTMLElement => {\n        const iconBox = document.createElement('div');\n        iconBox.className = `${DRAG_ICON_BOX_CLASS_NAME} ${iconInfo.isDroppable ? 'droppable' : 'not-droppable'}`;\n\n        const svg = document.createElementNS(SVG_URL, 'svg');\n        svg.setAttribute('viewBox', iconInfo.viewBox);\n\n        const path = document.createElementNS(SVG_URL, 'path');\n        path.setAttribute('class', iconInfo.className);\n        path.setAttribute('d', iconInfo.d);\n\n        svg.appendChild(path);\n        iconBox.appendChild(svg);\n\n        return iconBox;\n    };\n\n    /**\n     * Create the drag image element.\n     * @param textContent The text content to be placed inside the text box.\n     * @param isDroppable If the textbox is for droppable elements.\n     * @returns {HTMLElement} The drag text content.\n     */\n    private _createDragText = (textContent: string, isDroppable: boolean): HTMLElement => {\n        const droppableClassName = isDroppable ? 'droppable' : 'not-droppable';\n        const textBox = document.createElement('div');\n        textBox.className = `${DRAG_TEXT_BOX_CLASS_NAME} ${droppableClassName}`;\n\n        const text = document.createElement('p');\n        text.className = `${DRAG_TEXT_CONTENT_CLASS_NAME} ${droppableClassName}`;\n        text.textContent = textContent;\n\n        textBox.appendChild(text);\n\n        return textBox;\n    };\n}\nconst dragAndDropImage = new DragAndDropImage();\nexport default dragAndDropImage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { isEqual as _isEqual } from 'lodash';\nimport { IRenderingHelper } from '../../interfaces/IRenderingHelper';\nimport {\n    ElementDataInfo,\n    getAllAddModuleBoxes,\n    getElementDataInfo,\n    getElementDataInfoById,\n    getModuleById,\n    getModulesByParentIdAndSlotId,\n    updateAddModuleInnerContainerClass\n} from './drag-and-drop-utils';\nconst PLACEHOLDER_TOP_CLASS_NAME = 'ms-drag-placeholder-top';\nconst PLACEHOLDER_BOTTOM_CLASS_NAME = 'ms-drag-placeholder-bottom';\n\nexport type PlaceHolderPlacement = {\n    moduleId: string;\n    parentId: string;\n    slotId: string;\n    index: number;\n    relativeIndex: number;\n    placeBottom: boolean;\n};\n\n/**\n * Provides the drag and drop events implementation\n */\nexport class DragAndDropPlaceholder {\n    private placement: PlaceHolderPlacement | null;\n    private moduleElement: HTMLElement | null;\n    private addModuleBoxes: ElementDataInfo[] | null;\n    private renderingHelper: IRenderingHelper | undefined;\n\n    constructor() {\n        this.placement = null;\n        this.moduleElement = null;\n        this.addModuleBoxes = null;\n    }\n\n    /**\n     * Return the placeholder information.\n     */\n    public getPlaceholder = (): PlaceHolderPlacement | null => {\n        return this.placement;\n    };\n\n    /**\n     * Clear placeholder.\n     */\n    public clear = (): void => {\n        this._removePlaceholderFromElement();\n        this._setAllAddModuleBoxesToInitialState();\n        this.placement = null;\n        this.moduleElement = null;\n        this.addModuleBoxes = null;\n    };\n\n    /**\n     * Clear placeholder on site builder and SDK.\n     */\n    public clearAll = (): void => {\n        this.clear();\n        this.renderingHelper?.removePlaceholder();\n    };\n\n    /**\n     * Set rendering helper to be used when calling site builder APIs.\n     * @param renderingHelper The rendring helper interface.\n     */\n    public setRenderingHelper = (renderingHelper: IRenderingHelper): void => {\n        this.renderingHelper = renderingHelper;\n    };\n\n    /**\n     * Move placeholder to a specific position inside a specific container.\n     * @param parentId The module id where the module/container should to be dropped\n     * @param index The index position for the module drop.\n     * @param slotId The slot id where the module/container should to be dropped.\n     * @param moduleId The module id of the element being dropped.\n     */\n    public movePlaceholder = (parentId: string, index: number, slotId: string, moduleId?: string): void => {\n        if (!parentId || !slotId || index < 0) {\n            return;\n        }\n\n        const parentModule = getModuleById(parentId);\n        if (parentModule) {\n            // get all modules inside the container.\n            const modules = getModulesByParentIdAndSlotId(parentId, slotId);\n            this._setAllAddModuleBoxesToInitialState();\n            if (modules.length === 0) {\n                this._removePlaceholderFromElement();\n                this._setAddModuleBoxToInsertState(\n                    parentId,\n                    slotId,\n                    moduleId ? getElementDataInfoById(moduleId).dataInfo.isFragment : false\n                );\n            } else {\n                if (index >= 0 && index < modules.length) {\n                    // if position index is within the range of possible indexes, insert place holder in the position of the current module.\n                    const currentModule = modules[index];\n                    this._movePlaceholder(<HTMLElement>currentModule);\n                } else {\n                    // if position is not in the range of available indexes, append placeholder to last module.\n                    const currentModule = modules[modules.length - 1];\n                    this._movePlaceholder(<HTMLElement>currentModule, true);\n                }\n            }\n        }\n    };\n\n    /**\n     * Set placeholder on position.\n     * @param dragModule The draggable module attributes and html element.\n     * @param dropModule The droppable module attributes and html element.\n     * @param y The position of the mouse cursor on the y-axis.\n     */\n    public setPlaceHolderOnPosition = (dragModule: ElementDataInfo, dropModule: ElementDataInfo, y: number): void => {\n        const placeholderInfo = this._getPlaceholderPlacementInfo(dragModule, dropModule, y);\n        if (placeholderInfo) {\n            if (dropModule.element && this._hasPlaceholderPositionChanged(placeholderInfo)) {\n                // If placeholder should be displayed in a new location, update placeholder on canvas and site builder.\n                this._movePlaceholder(dropModule.element, placeholderInfo.placeBottom);\n                this.renderingHelper?.onDrag(dropModule.dataInfo.parentId, placeholderInfo.relativeIndex, dropModule.dataInfo.slotId);\n            }\n        } else if (this._hasPlaceholderPositionChanged(placeholderInfo)) {\n            // If placeholder should be removed and has not been yet, clear placeholder from canvas and site builder.\n            this.clearAll();\n        }\n\n        this.placement = placeholderInfo;\n    };\n\n    /**\n     * Get a specific add module box html element.\n     * @param parentId The parent data Id.\n     * @param slotId The slot data Id.\n     * @returns {HTMLElement | null} Returns the html module element if module exists. Otherwise, return null.\n     */\n    private _getAddModuleBox = (parentId: string, slotId: string): HTMLElement | null => {\n        if (!this.addModuleBoxes) {\n            this.addModuleBoxes = getAllAddModuleBoxes();\n        }\n        const foundBox = this.addModuleBoxes.find(a => a.dataInfo.id === parentId && a.dataInfo.slotId === slotId);\n        return foundBox ? foundBox.element : null;\n    };\n\n    /**\n     * Update the targeted add module box to insert state.\n     * @param parentId The parent data Id.\n     * @param slotId The slot data Id.\n     * @param isFragment True, if the module to be added is a fragment. Otherwise, false.\n     */\n    private _setAddModuleBoxToInsertState = (parentId: string, slotId: string, isFragment: boolean): void => {\n        const addModuleBoxElement = this._getAddModuleBox(parentId, slotId);\n        if (addModuleBoxElement && addModuleBoxElement.firstElementChild) {\n            updateAddModuleInnerContainerClass(\n                <HTMLElement>addModuleBoxElement.firstElementChild,\n                isFragment ? 'InsertFragment' : 'InsertModule'\n            );\n        }\n    };\n\n    /**\n     * Update all add module boxes to its initial state.\n     */\n    private _setAllAddModuleBoxesToInitialState = (): void => {\n        if (!this.addModuleBoxes) {\n            this.addModuleBoxes = getAllAddModuleBoxes();\n        }\n        this.addModuleBoxes.map(m => {\n            if (m.element?.firstElementChild) {\n                updateAddModuleInnerContainerClass(m.element.firstElementChild);\n            }\n        });\n    };\n\n    /**\n     * Returns whether or not the placeholder position has changed.\n     */\n    private _hasPlaceholderPositionChanged = (placement: PlaceHolderPlacement | null): boolean => {\n        return !_isEqual(this.placement, placement);\n    };\n\n    /**\n     * Get the information for the placeholder placement on modules.\n     * @param dragModule The draggable module attributes and html element.\n     * @param dropModule The droppable module attributes and html element.\n     * @param y The position of the mouse cursor on the y-axis.\n     */\n    private _getPlaceholderPlacementInfo(dragModule: ElementDataInfo, dropModule: ElementDataInfo, y: number): PlaceHolderPlacement | null {\n        // Get all modules inside the container.\n        const modules = getModulesByParentIdAndSlotId(dropModule.dataInfo.parentId, dropModule.dataInfo.slotId);\n\n        if (modules.length === 0) {\n            return null;\n        }\n\n        const dragModuleIndex = modules.findIndex(m => getElementDataInfo(<HTMLElement>m).dataInfo.id === dragModule.dataInfo.id);\n        let dropModuleIndex = modules.findIndex(m => getElementDataInfo(<HTMLElement>m).dataInfo.id === dropModule.dataInfo.id);\n        let dropModuleRelativeIndex = dropModuleIndex;\n\n        // if drop module is not found or if it is the drag module, ignore it.\n        if (dropModuleIndex < 0 || dropModuleIndex === dragModuleIndex) {\n            return null;\n        }\n\n        // If the dragged module is in the current container and comes before the droppend module, update the drop index to ignore the drag module position.\n        if (dragModuleIndex >= 0 && dragModuleIndex < dropModuleIndex) {\n            dropModuleIndex -= 1;\n        }\n\n        let placeBottom = false;\n\n        if (dropModule.element) {\n            const box = dropModule.element.getBoundingClientRect();\n\n            const distanceToBottom = box.bottom - y;\n            const distanceToTop = y - box.top;\n            if (distanceToBottom < distanceToTop) {\n                dropModuleIndex += 1;\n                dropModuleRelativeIndex += 1;\n                placeBottom = true;\n            }\n        }\n\n        return {\n            moduleId: dragModule.dataInfo.id,\n            parentId: dropModule.dataInfo.parentId,\n            slotId: dropModule.dataInfo.slotId,\n            index: dropModuleIndex,\n            relativeIndex: dropModuleRelativeIndex,\n            placeBottom\n        };\n    }\n\n    /**\n     * Add placeholder to the top or to the bottom of a module.\n     * @param moduleElement The module element.\n     * @param placeBottom If the placeholder should be placed at the bottom of the module.\n     */\n    private _movePlaceholder = (moduleElement: HTMLElement, placeBottom: boolean = false): void => {\n        this._removePlaceholderFromElement();\n        if (placeBottom) {\n            moduleElement.className += ` ${PLACEHOLDER_BOTTOM_CLASS_NAME}`;\n        } else {\n            moduleElement.className += ` ${PLACEHOLDER_TOP_CLASS_NAME}`;\n        }\n\n        this.moduleElement = moduleElement;\n    };\n\n    /**\n     * Remove placeholder.\n     */\n    private _removePlaceholderFromElement = (): void => {\n        if (this.moduleElement && this.moduleElement.className) {\n            if (this.moduleElement.className.includes(PLACEHOLDER_BOTTOM_CLASS_NAME)) {\n                this.moduleElement.className = this.moduleElement.className.replace(PLACEHOLDER_BOTTOM_CLASS_NAME, '').trim();\n            } else if (this.moduleElement.className.includes(PLACEHOLDER_TOP_CLASS_NAME)) {\n                this.moduleElement.className = this.moduleElement.className.replace(PLACEHOLDER_TOP_CLASS_NAME, '').trim();\n            }\n        }\n        this.moduleElement = null;\n    };\n}\nconst dragAndDropPlaceholder = new DragAndDropPlaceholder();\nexport default dragAndDropPlaceholder;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { get as _get, has as _has, set as _set } from 'lodash';\nimport { IAny, IDictionary } from '../../interfaces';\nimport { IRenderingHelper } from '../../interfaces/IRenderingHelper';\nimport dragAndDropImage from './drag-and-drop-image';\nimport dragAndDropPlaceholder from './drag-and-drop-placehoder';\nimport {\n    cleanDataInfo,\n    ElementDataInfo,\n    EMPTY_SLOT_TYPE_NAME,\n    getElementById,\n    getElementDataInfoById,\n    getElementDataInfoByTarget,\n    getModuleById,\n    getRenderingHelper,\n    updateAddModuleInnerContainerClass\n} from './drag-and-drop-utils';\n\n/**\n * Provides the drag and drop events implementation\n */\nexport class DragAndDropEvents {\n    private cache: IDictionary<IAny>;\n    private dragElement: ElementDataInfo;\n    private dropElement: ElementDataInfo;\n    private isCursorOnDroppableArea: boolean;\n    private isDragging: boolean;\n    private renderingHelper: IRenderingHelper | undefined;\n    private rootModuleId: string | undefined;\n\n    constructor() {\n        this.cache = {};\n        this.dragElement = cleanDataInfo();\n        this.dropElement = cleanDataInfo();\n        this.isCursorOnDroppableArea = false;\n        this.isDragging = false;\n    }\n\n    /**\n     * Set draggable events for a specific module.\n     * @param sourceModuleId The module to be set as draggable.\n     * @param rootModuleId The root module to be set as droppable.\n     */\n    public setModuleAsDraggable = (sourceModuleId: string, rootModuleId: string): void => {\n        this.renderingHelper = getRenderingHelper();\n        if (this.renderingHelper) {\n            dragAndDropPlaceholder.setRenderingHelper(this.renderingHelper);\n        }\n        this._setRootModuleId(rootModuleId);\n        this._setRootModuleAsDroppable();\n\n        const module = getModuleById(sourceModuleId);\n        if (module) {\n            module.addEventListener('dragstart', this._onDragStart);\n            module.addEventListener('drag', this._onDrag);\n            module.addEventListener('dragend', this._onDragEnd);\n            module.setAttribute('draggable', 'true');\n        }\n    };\n\n    /**\n     * Set the root module Id.\n     * @param moduleId The root module Id.\n     */\n    private _setRootModuleId = (moduleId: string): void => {\n        this.rootModuleId = moduleId;\n    };\n\n    /**\n     * Clear cache object.\n     */\n    private _clearCache = (): void => {\n        this.cache = {};\n    };\n\n    /**\n     * Check if cache has the information whether or not a module can be dropped in parent container.\n     * @param moduleId The module id.\n     * @param parentId The parent container id.\n     * @param slotId The slot id.\n     * @returns {boolean} Returns true cache has the information whether or not a module can be dropped in parent container. Otherwise returns false.\n     */\n    private _cacheHasIsDroppableInfo = (moduleId: string, parentId: string, slotId: string): boolean => {\n        return _has(this.cache, this._getCacheKey(moduleId, parentId, slotId));\n    };\n\n    /**\n     * Return whether or not a module can be dropped in parent container.\n     * @param moduleId The module id.\n     * @param parentId The parent container id.\n     * @param slotId The slot id.\n     * @returns {boolean | unknown} Returns whether or not a module can be dropped in parent container.\n     */\n    private _isModuleDroppable = (moduleId: string, parentId: string, slotId: string): boolean | unknown => {\n        if (!parentId || !moduleId || !slotId) {\n            return false;\n        }\n        this._checkIsDroppableAndAddToCache(moduleId, parentId, slotId);\n        return _get(this.cache, this._getCacheKey(moduleId, parentId, slotId), false);\n    };\n\n    /**\n     * Set whether or not a module can be dropped in parent container.\n     * @param moduleId The module id.\n     * @param parentId The parent container id.\n     * @param slotId The slot id.\n     */\n    private _setModuleIsDroppable = (moduleId: string, parentId: string, slotId: string, canBeDrop: boolean): void => {\n        _set(this.cache, this._getCacheKey(moduleId, parentId, slotId), canBeDrop);\n    };\n\n    /**\n     * Create a key to cache information whether or not a module is droppable in parent container.\n     * @param moduleId The module id.\n     * @param parentId The parent container id.\n     * @param slotId The slot id.\n     * @returns {string} Returns the cache key.\n     */\n    private _getCacheKey = (moduleId: string, parentId: string, slotId: string): string => {\n        return `${moduleId}_${parentId}_${slotId}`;\n    };\n\n    /**\n     * Check if module can be dropped in parent container and cache the information.\n     * @param moduleId The module id.\n     * @param parentId The parent container id.\n     * @param slotId The slot id.\n     */\n    private _checkIsDroppableAndAddToCache = (moduleId: string, parentId: string, slotId: string): void => {\n        if (!this._cacheHasIsDroppableInfo(moduleId, parentId, slotId)) {\n            const elementDataInfo = getElementDataInfoById(parentId);\n            if (elementDataInfo.dataInfo.isFragment || elementDataInfo.dataInfo.isFragmentModule) {\n                this._setModuleIsDroppable(moduleId, parentId, slotId, false);\n            } else {\n                const isDroppable = this.renderingHelper?.isDroppable(moduleId, parentId, slotId) || false;\n                this._setModuleIsDroppable(moduleId, parentId, slotId, isDroppable);\n            }\n        }\n    };\n\n    /**\n     * Handles the on drag over event for containers.\n     * @param e The react drag event.\n     */\n    private _onDragOver = (e: Event): void => {\n        if (!this.isDragging) {\n            return;\n        }\n\n        e.preventDefault();\n        this.isCursorOnDroppableArea = true;\n        const dragEvent = <DragEvent>e;\n        const elementDataInfo = getElementDataInfoByTarget(<HTMLElement>e.target);\n        if (elementDataInfo.dataInfo.typeName === EMPTY_SLOT_TYPE_NAME) {\n            dragAndDropImage.updatePosition(dragEvent.pageX, dragEvent.pageY);\n            return;\n        }\n\n        this.dropElement = elementDataInfo;\n        if (this._isModuleDroppable(this.dragElement.dataInfo.id, this.dropElement.dataInfo.parentId, this.dropElement.dataInfo.slotId)) {\n            dragAndDropPlaceholder.setPlaceHolderOnPosition(this.dragElement, this.dropElement, dragEvent.clientY);\n            if (dragAndDropImage.isStatusNotDroppable()) {\n                dragAndDropImage.setDropAllowedImage(this.dragElement, dragEvent.pageX, dragEvent.pageY);\n            }\n        } else if (dragAndDropImage.isStatusDroppable()) {\n            dragAndDropPlaceholder.clearAll();\n            dragAndDropImage.setDropNotAllowedImage(dragEvent.pageX, dragEvent.pageY);\n        }\n        dragAndDropImage.updatePosition(dragEvent.pageX, dragEvent.pageY);\n        this.isCursorOnDroppableArea = false;\n    };\n\n    /**\n     * Handles the on drag enter event for containers.\n     * @param e The react drag event.\n     */\n    private _onDragEnter = (e: Event): void => {\n        if (this.isDragging) {\n            e.preventDefault();\n            this.isCursorOnDroppableArea = true;\n            const elementDataInfo = getElementDataInfoByTarget(<HTMLElement>e.target);\n            if (\n                elementDataInfo.dataInfo.typeName === EMPTY_SLOT_TYPE_NAME &&\n                elementDataInfo.element &&\n                elementDataInfo.element.firstElementChild\n            ) {\n                const dragEvent = <DragEvent>e;\n                // Remove placeholder from canvas and from site builder.\n                dragAndDropPlaceholder.clearAll();\n\n                if (this._isModuleDroppable(this.dragElement.dataInfo.id, elementDataInfo.dataInfo.id, elementDataInfo.dataInfo.slotId)) {\n                    this.dropElement = elementDataInfo;\n                    // Get the container inner element and update its class.\n                    updateAddModuleInnerContainerClass(\n                        elementDataInfo.element.firstElementChild,\n                        this.dragElement.dataInfo.isFragment ? 'InsertFragment' : 'InsertModule'\n                    );\n                    // Add placeholder to position 0 on site builder.\n                    this.renderingHelper?.onDrag(elementDataInfo.dataInfo.id, 0, elementDataInfo.dataInfo.slotId);\n\n                    dragAndDropImage.setDropAllowedImage(this.dragElement, dragEvent.pageX, dragEvent.pageY);\n                } else {\n                    // Get the container inner element and update its class.\n                    updateAddModuleInnerContainerClass(elementDataInfo.element.firstElementChild, 'MoveNotAllowed');\n                    if (dragAndDropImage.isStatusDroppable()) {\n                        dragAndDropImage.setDropNotAllowedImage(dragEvent.pageX, dragEvent.pageY);\n                    }\n                }\n            }\n        }\n    };\n\n    /**\n     * Handles the on drag leave event for containers.\n     * @param e The react drag event.\n     */\n    private _onDragLeave = (e: Event): void => {\n        if (this.isDragging) {\n            e.preventDefault();\n            const elementDataInfo = getElementDataInfoByTarget(<HTMLElement>e.target);\n            if (\n                elementDataInfo.dataInfo.typeName === EMPTY_SLOT_TYPE_NAME &&\n                elementDataInfo.element &&\n                elementDataInfo.element.firstElementChild\n            ) {\n                updateAddModuleInnerContainerClass(elementDataInfo.element.firstElementChild);\n            }\n            this.isCursorOnDroppableArea = false;\n        }\n    };\n\n    /**\n     * Handles the on drop event for containers.\n     * @param e The react drag event.\n     */\n    private _onDrop = (e: Event): void => {\n        if (this.isDragging) {\n            e.preventDefault();\n            if (this.dropElement.dataInfo.typeName === EMPTY_SLOT_TYPE_NAME) {\n                if (this._isModuleDroppable(this.dragElement.dataInfo.id, this.dropElement.dataInfo.id, this.dropElement.dataInfo.slotId)) {\n                    this.renderingHelper?.onDrop(\n                        this.dragElement.dataInfo.id,\n                        this.dropElement.dataInfo.id,\n                        0,\n                        this.dropElement.dataInfo.slotId\n                    );\n                }\n                if (this.dropElement.element && this.dropElement.element.firstElementChild) {\n                    updateAddModuleInnerContainerClass(this.dropElement.element.firstElementChild);\n                }\n            } else {\n                const placeholderInfo = dragAndDropPlaceholder.getPlaceholder();\n                if (placeholderInfo) {\n                    const { moduleId, parentId, index, slotId } = placeholderInfo;\n                    if (index >= 0 && this._isModuleDroppable(moduleId, parentId, slotId)) {\n                        this.renderingHelper?.onDrop(moduleId, parentId, index, slotId);\n                    }\n                }\n            }\n        }\n    };\n\n    /**\n     * Remove draggable attributes and events.\n     * @param moduleId The module to have attributes removed.\n     */\n    private _removeDraggableEvents = (moduleId: string): void => {\n        if (moduleId) {\n            const draggableModule = getModuleById(moduleId);\n            if (draggableModule) {\n                draggableModule.removeEventListener('dragstart', this._onDragStart);\n                draggableModule.removeEventListener('drag', this._onDrag);\n                draggableModule.removeEventListener('dragend', this._onDragEnd);\n                draggableModule.removeAttribute('draggable');\n            }\n        }\n    };\n\n    /**\n     * Handles the drag event.\n     * @param e The drag event.\n     */\n    private _onDrag = (e: Event): void => {\n        if (!this.isDragging || !this.isCursorOnDroppableArea) {\n            dragAndDropImage.hide();\n        }\n    };\n\n    /**\n     * Handles the drag start event.\n     * @param e The drag event.\n     */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _onDragStart = (e: Event): void => {\n        const dragEvent = <DragEvent>e;\n        this.isDragging = true;\n        this.isCursorOnDroppableArea = true;\n        this.dragElement = getElementDataInfoByTarget(<HTMLElement>e.target);\n        dragAndDropImage.setDropAllowedImage(this.dragElement, dragEvent.pageX, dragEvent.pageY);\n        // Set drag image to a empty div.\n        // This prevents the ghost image from being displayed.\n        dragEvent.dataTransfer?.setDragImage(dragAndDropImage.setTransparentImage(), 0, 0);\n    };\n\n    /**\n     * Handles the drag end event.\n     * @param e The drag event.\n     */\n    private _onDragEnd = (e: Event): void => {\n        this.isDragging = false;\n        this.isCursorOnDroppableArea = false;\n        // remove draggable events\n        this._removeDraggableEvents(this.dragElement.dataInfo.id);\n        this._removeDroppableEvents();\n        this._clearAllCache();\n    };\n\n    /**\n     * Clear all cache information.\n     */\n    private _clearAllCache = (): void => {\n        this.dragElement = cleanDataInfo();\n        this.dropElement = cleanDataInfo();\n        this.isDragging = false;\n        this.isCursorOnDroppableArea = false;\n        this._clearCache();\n        dragAndDropPlaceholder.clearAll();\n        dragAndDropImage.clear();\n    };\n\n    /**\n     * Set droppable events for the root module.\n     */\n    private _setRootModuleAsDroppable = (): void => {\n        const droppableModule = getElementById(this.rootModuleId || '');\n        if (droppableModule) {\n            droppableModule.addEventListener('dragenter', this._onDragEnter);\n            droppableModule.addEventListener('dragleave', this._onDragLeave);\n            droppableModule.addEventListener('dragover', this._onDragOver);\n            droppableModule.addEventListener('drop', this._onDrop);\n        }\n    };\n\n    /**\n     * Remove droppable events.\n     */\n    private _removeDroppableEvents = (): void => {\n        const droppableModule = getElementById(this.rootModuleId || '');\n        if (droppableModule) {\n            droppableModule.removeEventListener('dragenter', this._onDragEnter);\n            droppableModule.removeEventListener('dragleave', this._onDragLeave);\n            droppableModule.removeEventListener('dragover', this._onDragOver);\n            droppableModule.removeEventListener('drop', this._onDrop);\n        }\n    };\n}\nconst dragAndDropEvents = new DragAndDropEvents();\nexport default dragAndDropEvents;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport dragAndDropEvents from './drag-and-drop-events';\nimport dragAndDropPlaceholder from './drag-and-drop-placehoder';\n\n/**\n * Helper function used to sync the placeholder between rendering and tools in drag/drop scenarios\n * @param parentId The module id where the module/container should to be dropped\n * @param index The index position for the module drop.\n * @param slotId The slot id where the module/container should to be dropped.\n * @param moduleId The module id of the element being dropped.\n */\nexport function onDrag(parentId: string, index: number, slotId: string, moduleId?: string): void {\n    dragAndDropPlaceholder.movePlaceholder(parentId, index, slotId, moduleId);\n}\n\n/**\n * Helper function used to remove the placeholder between rendering and tools in drag/drop scenarios\n */\nexport function removePlaceholder(): void {\n    dragAndDropPlaceholder.clear();\n}\n\n/**\n * Helper function used to set modules as draggable in drag/drop scenarios.\n * @param moduleId The module to be set as draggable.\n * @param rootModuleId The root module to be set as droppable.\n */\nexport function setDraggable(moduleId: string, rootModuleId: string): void {\n    dragAndDropEvents.setModuleAsDraggable(moduleId, rootModuleId);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport msdyn365Commerce, { MSDyn365Commerce } from './msdyn365-commerce';\nexport * from './contract';\nexport * from './interfaces';\nexport * from './interfaces/IRenderingHelper';\nexport * from './components';\nexport * from './models';\nexport * from './mock/mock-helper';\nexport * from './utilities';\nexport * from './utilities/ImageResizerHelper';\nexport * from './utilities/drag-and-drop/drag-and-drop-authoring';\nexport { isNonceEnabled } from './utilities/helper';\nexport { msdyn365Commerce, MSDyn365Commerce };\nexport default msdyn365Commerce;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IDataAttributeRenderer } from '../interfaces';\nimport { IDictionary } from '../interfaces/IDictionary';\n\n/**\n * Commerce Insights attribute renderer that generates a 'data-m' telemetry attribute\n */\nexport const commerceInsightsAttributeRenderer: IDataAttributeRenderer = (\n    telemetryId: string,\n    additionalTelemetryData?: object\n): IDictionary<string> => {\n    let properties: string = '';\n\n    if (additionalTelemetryData) {\n        for (const prop of Object.entries(additionalTelemetryData)) {\n            properties += `,\"${prop[0]}\":\"${prop[1]}\"`;\n        }\n    }\n\n    return {\n        'data-bi-id': `${telemetryId}`,\n        'data-m': `{\"tid\":\"${telemetryId}\"${properties}}`\n    };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IDataAttributeRenderer } from '../interfaces';\nimport { IDictionary } from '../interfaces/IDictionary';\n\nconst pageName = 'pgname';\nconst moduleName = 'mname';\nconst eventType = 'etype';\n\n/**\n * Commerce Insights attribute renderer that generates a 'data-m' telemetry attribute\n */\nexport const expAttributeRenderer: IDataAttributeRenderer = (\n    telemetryId: string,\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    additionalTelemetryData?: any\n): IDictionary<string> => {\n    if (additionalTelemetryData && pageName in additionalTelemetryData && moduleName in additionalTelemetryData) {\n        let eventName = `${additionalTelemetryData[pageName]}.${additionalTelemetryData[moduleName]}.${telemetryId}`;\n        if (additionalTelemetryData[eventType]) {\n            eventName += `.${additionalTelemetryData[eventType]}`;\n        }\n        return {\n            'data-exp-event-id': eventName\n        };\n    } else {\n        return {};\n    }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICartInfo, ICustomEvent, IPageViewInfo, IProductTransaction } from '../../interfaces';\n\n/***\n * Enum type to represent supported telemetry events.\n */\nexport enum TelemetryEvent {\n    PageView = 'PageView',\n    ProductPageView = 'ProductPageView',\n    AddToCart = 'AddToCart',\n    RemoveFromCart = 'RemoveFromCart',\n    UpdateInCart = 'UpdateInCart',\n    CheckOut = 'CheckOut',\n    Purchase = 'Purchase',\n    Custom = 'Custom'\n}\n\n/***\n * Union type of content types accepted by the logEvent() API.\n */\nexport type TelemetryEventContent =\n    | IPageViewInfo // PageView\n    | ICartInfo // ProductPageView, AddToCart, RemoveFromCart, UpdateInCart, CheckOut\n    | IProductTransaction // Purchase\n    | ICustomEvent; // Custom\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { ITelemetryCommon, ITelemetryModuleContext, LogLevel } from '../interfaces';\nimport { TelemetryLogOptions } from '../telemetry';\n\nexport const NumericLogLevel = {\n    trace: 0,\n    debug: 1,\n    information: 2,\n    warning: 3,\n    error: 4,\n    critical: 5,\n    none: -1\n};\n\n/*\n * Type definition for a log\n */\nexport type ILog = { logLevel: LogLevel; message: string };\n\n/**\n * Interface exposing methods for trace logging, telemetry event logging, and data attribute rendering\n * @property trace          {Function}  - Logs the given message at a Trace level\n * @property debug          {Function}  - Logs the given message at a Debug level\n * @property information    {Function}  - Logs the given message at a Information level\n * @property warning        {Function}  - Logs the given message at a Warning level\n * @property error          {Function}  - Logs the given message at a Error level\n * @property critical       {Function}  - Logs the given message at a Critical level\n * @property exception      {Function}  - Logs the given error object\n */\nexport interface ITelemetry extends ITelemetryCommon {\n    /**\n     * Logs a structured message at the given log level, with optional custom tags and/or an exception\n     * @param logLevel LogLevel of the message\n     * @param messageTemplate String to log, denoting placeholders with {placeholder}\n     * @param logOptions Contains arguments to replace placeholders, custom tags for log, and optional error object\n     */\n    log(logLevel: LogLevel, messageTemplate: string, logOptions?: TelemetryLogOptions): void;\n\n    /**\n     * Logs a trace message with the Trace log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    trace(message: string, ...args: any): void;\n    /**\n     * Logs a trace message with the Debug log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    debug(message: string, ...args: any): void;\n    /**\n     * Logs a trace message with the Information log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    information(message: string, ...args: any): void;\n    /**\n     * Logs a trace message with the Warning log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    warning(message: string, ...args: any): void;\n    /**\n     * Logs a trace message with the Error log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    error(message: string, ...args: any): void;\n    /**\n     * Logs a trace message with the Critical log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    critical(message: string, ...args: any): void;\n\n    /**\n     * Logs an Error object as an exception\n     * @param error The Error object to log\n     */\n    exception(error: Error): void;\n\n    /**\n     * Sets the portion of the telemetry context that will be attached to all logs for a module\n     * @param moduleContext Part of the telemetry context that lasts during a module rendering\n     */\n    setTelemetryModuleContext(moduleContext: ITelemetryModuleContext): () => ITelemetry;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IDictionary, ITelemetryRequestContext, ITrackDependency, TelemetryEvent, TelemetryEventContent } from '../interfaces';\n\nexport enum LogLevel {\n    /**\n     * For information that's typically valuable only for debugging. These messages may contain sensitive application data and so shouldn't be enabled in a production environment. Disabled by default.\n     */\n    Trace = 'trace',\n    /**\n     * For information that may be useful in development and debugging. Example: Entering method Configure with flag set to true. Enable Debug level logs in production only when troubleshooting, due to the high volume of logs.\n     */\n    Debug = 'debug',\n    /**\n     * For tracking the general flow of the app. These logs typically have some long-term value. Example: Request received for path /api/todo\n     */\n    Information = 'information',\n    /**\n     * For abnormal or unexpected events in the app flow.\n     * These may include errors or other conditions that don't cause the app to stop but might need to be investigated. Handled exceptions are a common place to use the Warning log level. Example: FileNotFoundException for file quotes.txt.\n     */\n    Warning = 'warning',\n    /**\n     * For errors and exceptions that cannot be handled.\n     * These messages indicate a failure in the current activity or operation (such as the current HTTP request), not an app-wide failure. Example log message: Cannot insert record due to duplicate key violation.\n     */\n    Error = 'error',\n    /**\n     * For failures that require immediate attention. Examples: data loss scenarios, out of disk space.\n     */\n    Critical = 'critical',\n    None = 'none'\n}\n\n/**\n * Common interface shared by internal telemetry and telemetry client\n */\n\nexport interface ITelemetryCommon {\n    /**\n     * Log a metric\n     * @param name metric name\n     * @param value metriv value\n     */\n    trackMetric(name: string, value: number): void;\n\n    /**\n     * Log an event\n     * @param trackEventOptions Event data\n     */\n    trackEvent<TProperties = Partial<IDictionary<string>>, TMeasurements = Partial<IDictionary<number>>>(\n        name: string,\n        properties?: TProperties,\n        measurements?: TMeasurements\n    ): void;\n\n    /**\n     * Track a dependency\n     *\n     * @param {ITrackDependency} options the dependency options\n     */\n    trackDependency(options: ITrackDependency): void;\n\n    /**\n     * Sets the portion of the telemetry context that will be attached to all logs for a request\n     * @param requestContext Part of the telemetry context that lasts the entire request\n     */\n    setTelemetryRequestContext(requestContext: ITelemetryRequestContext): void;\n\n    /**\n     * Log an event\n     * @param eventType event type\n     * @param payload event payload\n     */\n    logEvent(eventType: TelemetryEvent, payload: TelemetryEventContent): void;\n\n    /**\n     * Render telemetry data attribute\n     * @param telemetryId Unique ID for telemetry object\n     * @param additionalTelemetryData Any additional properties to set\n     */\n    setTelemetryAttribute?(telemetryId: string, additionalTelemetryData?: object): IDictionary<string>;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    ICartInfo,\n    // ICustomEvent,\n    IEventLogger,\n    // IPageViewInfo,\n    IProductInfo,\n    IProductTransaction,\n    TelemetryEvent,\n    TelemetryEventContent\n} from '../interfaces';\n\n/**\n * Commerce Insights logger that sends events to MS clickstream pipeline\n */\nexport class CommerceInsightsLogger implements IEventLogger {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _client: any;\n\n    /**\n     * Registers the Web Analytics plugin for use with the Commerce Insights logger\n     */\n    public registerWebAnalyticsPlugin = (webAnalyticsPlugin: object): void => {\n        this._client = webAnalyticsPlugin;\n    };\n\n    /**\n     * Sends the given event to the Commerce Insights data pipeline\n     * @param eventType Type of event to log\n     * @param payload Extra parameters dependent on the eventType\n     */\n    public logEvent(eventType: TelemetryEvent, payload: TelemetryEventContent): void {\n        // Can't log if Web Analytics plugin not initialized\n        if (this._client === undefined) {\n            return;\n        }\n\n        let eventData: { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] } | undefined;\n        let eventName: string;\n\n        // Check event type and convert to appropriate schema\n        switch (eventType) {\n            case TelemetryEvent.PageView:\n                // TODO (matt, 6/15/20): Filtering all manual page views, undo once 1DS forwarding to framework implemented\n                return;\n            /* if (this._isPageViewInfo(payload)) {\n                    eventName = TelemetryEvent.PageView;\n                    eventData = this._populatePageViewInfo(payload);\n                } else {\n                    console.error('PageView event needs PageViewInfo data'); return;\n                }\n                break; */\n            case TelemetryEvent.ProductPageView:\n                if (this._isCartInfo(payload)) {\n                    eventName = TelemetryEvent.ProductPageView;\n                    eventData = this._populateCartInfo(payload);\n                } else {\n                    console.error('ProductPageView event needs an array of ProductUnit data');\n                    return;\n                }\n                break;\n            case TelemetryEvent.AddToCart:\n                if (this._isCartInfo(payload)) {\n                    eventName = TelemetryEvent.AddToCart;\n                    eventData = this._populateCartInfo(payload);\n                } else {\n                    console.error('AddToCart event needs an array of ProductUnit data');\n                    return;\n                }\n                break;\n            case TelemetryEvent.RemoveFromCart:\n                if (this._isCartInfo(payload)) {\n                    eventName = TelemetryEvent.RemoveFromCart;\n                    eventData = this._populateCartInfo(payload);\n                } else {\n                    console.error('RemoveFromCart event needs an array of ProductUnit data');\n                    return;\n                }\n                break;\n            case TelemetryEvent.UpdateInCart:\n                if (this._isCartInfo(payload)) {\n                    eventName = TelemetryEvent.UpdateInCart;\n                    eventData = this._populateCartInfo(payload);\n                } else {\n                    console.error('UpdateInCart event needs an array of ProductUnit data');\n                    return;\n                }\n                break;\n            case TelemetryEvent.CheckOut:\n                if (this._isCartInfo(payload)) {\n                    eventName = TelemetryEvent.CheckOut;\n                    eventData = this._populateCartInfo(payload);\n                } else {\n                    console.error('CheckOut event needs an array of ProductUnit data');\n                    return;\n                }\n                break;\n            case TelemetryEvent.Purchase:\n                if (this._isProductTransaction(payload)) {\n                    eventName = TelemetryEvent.Purchase;\n                    eventData = this._populateProductTransaction(payload);\n                } else {\n                    console.error('Purchase event needs ProductTransaction data');\n                    return;\n                }\n                break;\n            case TelemetryEvent.Custom:\n                // TODO (matt, 6/15/20): Filtering all manual page views, undo once 1DS forwarding to framework implemented\n                return;\n            /* if (this._isCustomEvent(payload)) {\n                    eventName = TelemetryEvent.Custom;\n                    eventData = this._populateCustomEvent(payload);\n                } else {\n                    console.error('Custom event needs CustomEvent data'); return;\n                }\n                break; */\n            default:\n                eventName = '';\n        }\n\n        // Log event\n        this._client.trackEvent({\n            name: eventName,\n            baseType: 'EventData',\n            baseData: { name: eventName },\n            data: eventData\n        });\n\n        return;\n    }\n\n    /*\n     * Determines if the telemetry event data is IPageViewInfo\n     * @param payload Telemetry event data to check\n    private _isPageViewInfo(payload: TelemetryEventContent): payload is IPageViewInfo {\n        return (<IPageViewInfo>payload).title !== undefined;\n    }\n     */\n\n    /**\n     * Determines if the telemetry event data is array of ICartInfo\n     * @param payload Telemetry event data to check\n     */\n    private _isCartInfo(payload: TelemetryEventContent): payload is ICartInfo {\n        return (<ICartInfo>payload).cartId !== undefined;\n    }\n\n    /**\n     * Determines if the telemetry event data is IProductTransaction\n     * @param payload Telemetry event data to check\n     */\n    private _isProductTransaction(payload: TelemetryEventContent): payload is IProductTransaction {\n        return (<IProductTransaction>payload).id !== undefined;\n    }\n\n    /*\n     * Determines if the telemetry event data is ICustomEvent\n     * @param payload Telemetry event data to check\n    private _isCustomEvent(payload: TelemetryEventContent): payload is ICustomEvent {\n        return (<ICustomEvent>payload).contentCategory !== undefined;\n    }\n     */\n\n    /*\n     * Converts IPageViewInfo data into the format 1DS expects\n     * @param payload Telemetry event data to convert\n    private _populatePageViewInfo(\n        payload: IPageViewInfo\n    ): { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] } {\n        return {\n            title: payload.title,\n            location: payload.location || '',\n            page: payload.page || ''\n        };\n    }\n     */\n\n    /**\n     * Converts ICartInfo data into the format 1DS expects\n     * @param payload Telemetry event data to convert\n     */\n    private _populateCartInfo(payload: ICartInfo): { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] } {\n        const productArray: { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] }[] = [];\n\n        payload.products.forEach(product => {\n            productArray.push(this._populateProductInfo(product));\n        });\n\n        return {\n            products: productArray,\n            orderId: payload.orderId || '',\n            cartId: payload.cartId || '',\n            cartVersion: payload.cartVersion || ''\n        };\n    }\n\n    /**\n     * Converts IProductInfo data into the format 1DS expects\n     * @param payload Telemetry event data to convert\n     */\n    private _populateProductInfo(\n        payload: IProductInfo\n    ): { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] } {\n        return {\n            productChannelId: payload.productChannelId || '',\n            productChannelName: payload.productChannelName || '',\n            productCategoryId: payload.productCategoryId || '',\n            productCategoryName: payload.productCategoryName || '',\n            productId: payload.productId || '',\n            productName: payload.productName || '',\n            productSku: payload.productSku || '',\n            productPrice: payload.productPrice || '',\n            productQuantity: payload.productQuantity || '',\n            productCurrency: payload.productCurrency || ''\n        };\n    }\n\n    /**\n     * Converts IProductTransaction data into the format 1DS expects\n     * @param payload Telemetry event data to convert\n     */\n    private _populateProductTransaction(\n        payload: IProductTransaction\n    ): { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] } {\n        const productArray: { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] }[] = [];\n\n        if (payload.products) {\n            payload.products.forEach(product => {\n                productArray.push(this._populateProductInfo(product));\n            });\n        }\n\n        return {\n            id: payload.id,\n            affiliation: payload.affiliation || '',\n            revenue: payload.revenue || -1,\n            tax: payload.tax || -1,\n            shippingCost: payload.shippingCost || -1,\n            products: productArray\n        };\n    }\n\n    /*\n     * Converts ICustomEvent data into the format 1DS expects\n     * @param payload Telemetry event data to convert\n    private _populateCustomEvent(\n        payload: ICustomEvent\n    ): { [key: string]: string | number | boolean | object | string[] | number[] | boolean[] } {\n        return {\n            contentCategory: payload.contentCategory,\n            contentAction: payload.contentAction || {}\n        };\n    }\n     */\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IEventId, IEventTime, ISuccess, TSuccessNumber, TSuccessString } from '../interfaces';\n\nexport const EVENT_CLIENT_RENDER_START = 'ClientRenderEventStart';\nexport const EVENT_CLIENT_RENDER_STOP = 'ClientRenderEventStop';\nexport const CONTENT_SECURITY_POLICY_ERROR = 'Content Security Policy error';\n\n/**\n * Additional properties to send along with ending a request\n */\nexport interface IEventClientRenderProperties extends IEventId, ISuccess<TSuccessString> {}\n\nexport interface IEventClientRenderMetrics extends IEventTime, ISuccess<TSuccessNumber> {}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IEventId, ISuccess, TSuccessString } from '../interfaces';\n\nexport const EVENT_HTTP_SERVICE_START = 'HttpServiceEventStart';\nexport const EVENT_HTTP_SERVICE_STOP = 'HttpServiceEventStop';\n\n/**\n * Additional properties to send along with ending a request\n */\nexport interface IEventHttpServiceStopProperties extends IEventId, ISuccess<TSuccessString> {\n    statusCode: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport const EVENT_WEB_VITALS_CLS = 'WebVitalsCLSEvent';\nexport const EVENT_WEB_VITALS_FCP = 'WebVitalsFCPEvent';\nexport const EVENT_WEB_VITALS_FID = 'WebVitalsFIDEvent';\nexport const EVENT_WEB_VITALS_INP = 'WebVitalsINPEvent';\nexport const EVENT_WEB_VITALS_LCP = 'WebVitalsLCPEvent';\nexport const EVENT_WEB_VITALS_TTFB = 'WebVitalsTTFBEvent';\n\nexport interface IEventClientWebVitalsCLSMetrics {\n    value: number;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { sha256 } from 'js-sha256';\n\n/**\n * execute callback. Variable name intentionally short\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const p = <T = any>(innerFunction: (...args: any) => T) => innerFunction();\n\nexport const generateEventNameHash = (eventName: string): string => {\n    // Only generate hash client side\n    if (typeof window !== 'undefined') {\n        return sha256(eventName);\n    }\n    return eventName;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport uuid from 'uuid/v4';\nimport { commerceInsightsAttributeRenderer } from '../attribute-renderers';\nimport { CommerceInsightsLogger } from '../event-loggers';\nimport { generateEventNameHash, p } from '../helpers';\nimport {\n    ICustomEvent,\n    IDataAttributeRenderer,\n    IEventLogger,\n    IExpLogger,\n    IPageViewInfo,\n    IRegisterTraceLoggerOptions,\n    ITelemetry,\n    ITelemetryContext,\n    ITelemetryRequestContext,\n    ITraceLogger,\n    LogLevel,\n    NumericLogLevel,\n    TelemetryEvent,\n    TelemetryEventContent\n} from '../interfaces';\nimport { IDictionary } from '../interfaces/IDictionary';\nimport { ITrackDependency } from '../interfaces/ITrackDependency';\nimport { InternalTelemetryLogOptions } from './internal-telemetry-log-options';\nimport { TelemetryLogOptions } from './telemetry-log-options';\n\n/**\n * Base class for Telemetry & Internal telemetry\n * @abstract\n * @class TelemetryBase\n */\nexport abstract class TelemetryBase {\n    /**\n     * Enable Data Analytics feature switch\n     */\n    protected _enableDataAnalytics: boolean;\n\n    /**\n     * Map of timers\n     */\n    protected _timers: Map<string, number>;\n\n    /**\n     * Array of ILogger objects representing the trace loggers used.\n     */\n    protected _traceLoggers: ITraceLogger[];\n\n    /**\n     * An object holding the information about telemetry event loggers.\n     */\n    protected _eventLoggers: IEventLogger[];\n\n    /**\n     * An object holding the information about the experimentation logger.\n     */\n    protected _expLogger: IExpLogger | undefined;\n\n    /**\n     * Array holding the registered Data Attribute Renderers\n     */\n    protected _attributeRenderers: IDataAttributeRenderer[];\n\n    /**\n     * Context object used with telemetry.\n     */\n    protected _telemetryContext: ITelemetryContext;\n\n    /**\n     * Dictionary of loggers by name (if one is provided)\n     */\n    protected _namedLoggers: IDictionary<ITraceLogger>;\n\n    /**\n     * WebAnalytics client used to send BI events\n     */\n    protected _webAnalyticsPlugin?: object;\n\n    public static generateGuid = (): string => {\n        return uuid();\n    };\n\n    public constructor() {\n        this._enableDataAnalytics = false;\n        this._traceLoggers = [];\n        this._eventLoggers = [];\n        this._attributeRenderers = [];\n        this._telemetryContext = {\n            requestContext: {},\n            moduleContext: {}\n        };\n        this._namedLoggers = {};\n        this._timers = new Map<string, number>();\n    }\n\n    /**\n     * Start a named timer\n     *\n     * @param {string} id of timer\n     * @memberof InternalTelemetry\n     */\n    public startTimer = (timerId: string): void => {\n        this._timers.set(timerId, Date.now());\n    };\n\n    /**\n     * Stops a named timer\n     *\n     * @param {string} timerId id of timer\n     * @param {boolean} [removeTimer=true] should time be removed from dictionary? default rue\n     * @returns {number} elapsed time in ms\n     */\n    public stopTimer = (timerId: string, removeTimer: boolean = true): number => {\n        const now = Date.now();\n        const result: number = this._timers.has(timerId) ? now - <number>this._timers.get(timerId) : -1;\n        if (removeTimer) {\n            this._timers.delete(timerId);\n        }\n        return result;\n    };\n\n    /**\n     * Saves the feature swtich marking whether data analytics is enabled for this request\n     */\n    public enableDataAnalytics = (enableDataAnalytics: boolean): void => {\n        this._enableDataAnalytics = enableDataAnalytics;\n\n        if (this._enableDataAnalytics) {\n            this._eventLoggers = [new CommerceInsightsLogger()];\n            this._attributeRenderers = [commerceInsightsAttributeRenderer];\n        }\n    };\n\n    /**\n     * Renders a data attribute string\n     */\n    public setTelemetryAttribute = (telemetryId: string, additionalTelemetryData?: object): IDictionary<string> => {\n        let telemetryAttribute: IDictionary<string> = {};\n\n        for (let i = 0; i < this._attributeRenderers.length; ++i) {\n            telemetryAttribute = { ...telemetryAttribute, ...this._attributeRenderers[i](telemetryId, additionalTelemetryData) };\n        }\n\n        return telemetryAttribute;\n    };\n\n    /**\n     * Logs a telemetry event.\n     */\n    public logEvent = (eventType: TelemetryEvent, payload: TelemetryEventContent): void => {\n        for (let i = 0; i < this._eventLoggers.length; ++i) {\n            p(() => this._eventLoggers[i].logEvent(eventType, payload));\n        }\n\n        // if exp logger is registered, mutate and send event\n        if (this._expLogger) {\n            let eventName: string | undefined = '';\n            switch (eventType) {\n                case TelemetryEvent.PageView:\n                    const pageViewEventName = (<IPageViewInfo>payload).title ? `${(<IPageViewInfo>payload).title}.PageView` : '';\n                    eventName = pageViewEventName;\n                    break;\n                case TelemetryEvent.Custom:\n                    eventName = this._generateEventName(payload);\n                    if (eventName) {\n                        break;\n                    }\n                default:\n                    eventName = eventType;\n            }\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            const expPayload: any = <any>payload;\n            expPayload.eventName = eventName;\n            const eventNameHash = generateEventNameHash(eventName);\n            this._expLogger.logEvent(eventNameHash, expPayload);\n        }\n    };\n\n    /**\n     * Tracks a metric\n     */\n    public trackMetric = (name: string, value: number): void => {\n        this.notifyTraceLoggers(logger => logger.trackMetric(name, value, this._telemetryContext));\n    };\n\n    /**\n     * Tracks an event\n     */\n    public trackEvent = <TProperties, TMeasurements>(\n        name: string,\n        properties?: TProperties,\n        measurements?: TMeasurements,\n        context?: ITelemetryContext\n    ): void => {\n        this.notifyTraceLoggers(logger => logger.trackEvent<TProperties, TMeasurements>(name, properties, measurements, context));\n    };\n\n    public trackPageView = (page: string, url?: string) => {\n        this.notifyTraceLoggers(logger => logger.trackPageView(page, url));\n    };\n\n    public trackDependency = (options: ITrackDependency) => {\n        this.notifyTraceLoggers(logger => logger.trackDependency(options));\n    };\n\n    /**\n     * Adds the given trace logger to the list of trace loggers.\n     * @param traceLogger - The ILogger object to be added to the list of trace loggers\n     */\n    public registerTraceLogger = (options: IRegisterTraceLoggerOptions): void => {\n        if (options.traceLogger) {\n            if (options.traceLogger.initialize && options.options) {\n                options.traceLogger.initialize(options.options);\n            }\n            this._traceLoggers.push(options.traceLogger);\n            options.name && (this._namedLoggers[options.name] = options.traceLogger);\n        }\n    };\n\n    /**\n     * Adds the given event logger to the list of event loggers\n     * @param eventLogger - The IEventLogger object to be added to the list of event loggers\n     */\n    public registerEventLogger = (eventLogger: IEventLogger): void => {\n        this._eventLoggers.push(eventLogger);\n    };\n\n    /**\n     * Adds the given experimentation logger to the telemetry object\n     * @param expLogger - The IExpLogger object to be added\n     */\n    public registerExpLogger = (expLogger: IExpLogger): void => {\n        this._expLogger = expLogger;\n    };\n\n    /**\n     * Adds the given attribute renderer to the list of attribute renderers\n     * @param attributeRenderer - The IDataAttributeRenderer object to be added to the list of attribute renderers\n     */\n    public registerAttributeRenderer = (attributeRenderer: IDataAttributeRenderer): void => {\n        this._attributeRenderers.push(attributeRenderer);\n    };\n\n    /**\n     * Registers the Web Analytics plugin for use in the BI logging framework\n     */\n    public registerWebAnalyticsPlugin = (webAnalyticsPlugin: object): void => {\n        this._webAnalyticsPlugin = webAnalyticsPlugin;\n\n        // Pass Web Analytics plugin to the Commerce Insights logger\n        if (this._enableDataAnalytics) {\n            (<CommerceInsightsLogger>this._eventLoggers[0]).registerWebAnalyticsPlugin(webAnalyticsPlugin);\n        }\n    };\n\n    /**\n     * Merges the properties specific to the current request that should be added to every log\n     * @param requestContext Contains the context items specific to the current request\n     */\n    public setTelemetryRequestContext = (requestContext: Partial<ITelemetryRequestContext>): void => {\n        this._telemetryContext.requestContext = { ...(this._telemetryContext.requestContext || {}), ...requestContext };\n    };\n\n    /**\n     * Gets named logger if it exists\n     *\n     * @param {string} name name of logger to get\n     */\n    public getNamedLoggerInstance = <T extends unknown = ITelemetry>(name: string): T | undefined => {\n        return <T>this._namedLoggers[name];\n    };\n\n    /**\n     * String formatter\n     * @param templateString Template string\n     * @param args ordered argument list\n     */\n    public stringFormat = (templateString: string, args: string[]): string => {\n        for (let index = 0; index < args.length; ++index) {\n            templateString = templateString.replace(`$${index}`, args[index]);\n        }\n        return templateString;\n    };\n\n    /**\n     * Helper to notify trace loggers\n     *\n     * @private\n     * @memberof Telemetry\n     */\n    protected notifyTraceLoggers = (fx: (logger: ITraceLogger) => void) => {\n        for (let i = 0; i < this._traceLoggers.length; ++i) {\n            // TODO: revisit this unhandled promise\n            fx(this._traceLoggers[i]);\n        }\n    };\n\n    protected _log = (\n        logLevel: LogLevel,\n        messageTemplate: string,\n        logOptions?: InternalTelemetryLogOptions | TelemetryLogOptions\n    ): void => {\n        const requestedLogLevel = NumericLogLevel[logLevel];\n        const minLogLevel = <number>(<unknown>process.env.SDK_MIN_LOG_LEVEL);\n\n        // Do not log if below minimum log level\n        if (requestedLogLevel < minLogLevel) {\n            return;\n        }\n\n        // Create map of placeholders in string and arguments provided\n        const regex = /{([a-zA-Z_0123456789]+)}/g;\n        const placeholders = new Map();\n        const values = logOptions && logOptions.values ? logOptions.values : [];\n        let i = 0;\n        let match = regex.exec(messageTemplate);\n\n        while (match !== null) {\n            // If this placeholder is a repeat of a previous one\n            if (placeholders.get(match[1]) !== undefined) {\n                match = regex.exec(messageTemplate);\n                // Else if a new placeholder but no more arguments were given\n            } else if (values[i] === undefined) {\n                values[i] = `Undefined - No value given for this placeholder`;\n                // Still increment in case a placeholder value in the middle was undefined\n                placeholders.set(match[1], values[i++]);\n                // Get next match\n                match = regex.exec(messageTemplate);\n                // Else save match and next argument provided\n            } else {\n                placeholders.set(match[1], values[i++]);\n\n                // Get next match\n                match = regex.exec(messageTemplate);\n            }\n        }\n        this.notifyTraceLoggers((logger: ITraceLogger) => {\n            logger.sendLog(\n                logLevel,\n                this._telemetryContext,\n                messageTemplate,\n                placeholders,\n                logOptions && logOptions.customTags,\n                logOptions && logOptions.exception\n            );\n        });\n    };\n\n    /**\n     * Generates the event name for a custom click event\n     * @param payload Payload of custom event\n     */\n    private _generateEventName(payload: TelemetryEventContent): string | undefined {\n        if ((<ICustomEvent>payload).contentCategory === 'click') {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            const attributes: any = (<ICustomEvent>payload).contentAction;\n\n            // Generate event name for custom clicks with page name, module name, and either element text or recordId\n            if (attributes && attributes.pgname && attributes.mname && (attributes.etext || attributes.recid)) {\n                return `${attributes.pgname}.${attributes.mname}.${attributes.etext || attributes.recid}${\n                    attributes.etype ? `.${attributes.etype}` : ''\n                }`;\n            }\n        }\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInternalTelemetry, ITelemetryModuleContext, LogLevel } from '../interfaces';\nimport { InternalTelemetryLogOptions } from './internal-telemetry-log-options';\nimport { TelemetryBase } from './telemetry-base';\n\n/**\n * Telemetry client containing trace loggers\n */\nexport class InternalTelemetry extends TelemetryBase implements IInternalTelemetry {\n    /**\n     * Creates a new instance of InternalTelemetry.\n     */\n    public constructor() {\n        super();\n    }\n\n    public setTelemetryModuleContext = (moduleContext: ITelemetryModuleContext) => {\n        return () => {\n            // Create copy of telemetry object with specified module context\n            // TODO: kopik do we need to create new instance of telemetry here or can we just capture in closure?\n            const telemetryWithContext = new InternalTelemetry();\n            telemetryWithContext._enableDataAnalytics = this._enableDataAnalytics;\n            telemetryWithContext._webAnalyticsPlugin = this._webAnalyticsPlugin;\n            telemetryWithContext._traceLoggers = this._traceLoggers;\n            telemetryWithContext._eventLoggers = this._eventLoggers;\n            telemetryWithContext._expLogger = this._expLogger;\n            telemetryWithContext._attributeRenderers = this._attributeRenderers;\n            telemetryWithContext._telemetryContext.requestContext = this._telemetryContext.requestContext;\n            telemetryWithContext._telemetryContext.moduleContext = moduleContext;\n\n            return telemetryWithContext;\n        };\n    };\n\n    /**\n     * Logs a structured message at the given log level, with optional custom tags and/or an exception\n     * @param logLevel LogLevel of the message\n     * @param messageTemplate String to log, denoting placeholders with {placeholder}.\n     * Example input string: \"Hello {signedInUser}! Good {morningOrEvening}!\"\n     * @param logOptions Contains arguments to replace placeholders, custom tags for log, and optional error object.\n     * For the example message template, arguments need to be provided for 'user' and 'morningOrEvening'.\n     */\n    public log = (logLevel: LogLevel, messageTemplate: string, logOptions?: InternalTelemetryLogOptions): void => {\n        this._log(logLevel, messageTemplate, logOptions);\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InternalTelemetry } from './internal-telemetry';\nconst _telemetry = new InternalTelemetry();\nexport { _telemetry as StaticTelemetry };\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Helper function that attempts to stringify data. If stringify fails, it will\n * fallback to basic string serialization.\n */\nexport function safeStringify(input: unknown): string {\n    let output: string;\n\n    try {\n        output = typeof input === 'object' ? JSON.stringify(input) : String(input);\n    } catch (e) {\n        if (e && e.name === 'TypeError') {\n            // Fallback to string serialization\n            output = String(input);\n        } else {\n            throw e;\n        }\n    }\n\n    return output;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetry, ITelemetryModuleContext, LogLevel, NumericLogLevel } from '../interfaces';\nimport { safeStringify } from '../loggers/logging-helper';\nimport { TelemetryBase } from './telemetry-base';\nimport { TelemetryLogOptions } from './telemetry-log-options';\n\n/**\n * Telemetry client containing trace loggers\n */\nexport class Telemetry extends TelemetryBase implements ITelemetry {\n    /**\n     * Creates a new instance of Telemetry.\n     */\n    public constructor() {\n        super();\n    }\n\n    /**\n     * Logs a trace message with the Trace log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    public trace = (message: string, ...args: unknown[]): void => {\n        this._logTrace(LogLevel.Trace, message, args);\n    };\n\n    /**\n     * Logs a trace message with the Debug log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    public debug = (message: string, ...args: unknown[]): void => {\n        this._logTrace(LogLevel.Debug, message, args);\n    };\n\n    /**\n     * Logs a trace message with the Information log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    public information = (message: string, ...args: unknown[]): void => {\n        this._logTrace(LogLevel.Information, message, args);\n    };\n\n    /**\n     * Logs a trace message with the Warning log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    public warning = (message: string, ...args: unknown[]): void => {\n        this._logException(LogLevel.Warning, message, args);\n    };\n\n    /**\n     * Logs a trace message with the Error log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    public error = (message: string, ...args: unknown[]): void => {\n        this._logException(LogLevel.Error, message, args);\n    };\n\n    /**\n     * Logs a trace message with the Critical log level\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    public critical = (message: string, ...args: unknown[]): void => {\n        this._logException(LogLevel.Critical, message, args);\n    };\n\n    /**\n     * Logs an Error object as an exception\n     * @param error The Error object to log\n     */\n    public exception = (error: Error): void => {\n        this.notifyTraceLoggers(logger => logger.exception(error, this._telemetryContext));\n    };\n\n    /**\n     * Sets the properties specific to the current module that should be added to every log\n     * @param moduleContext Contains the context items specific to the current module\n     */\n    public setTelemetryModuleContext = (moduleContext: ITelemetryModuleContext) => {\n        return () => {\n            // Create copy of telemetry object with specified module context\n            // TODO: kopik do we need to create new instance of telemetry here or can we just capture in closure?\n            const telemetryWithContext = new Telemetry();\n            telemetryWithContext._enableDataAnalytics = this._enableDataAnalytics;\n            telemetryWithContext._webAnalyticsPlugin = this._webAnalyticsPlugin;\n            telemetryWithContext._traceLoggers = this._traceLoggers;\n            telemetryWithContext._eventLoggers = this._eventLoggers;\n            telemetryWithContext._expLogger = this._expLogger;\n            telemetryWithContext._attributeRenderers = this._attributeRenderers;\n            telemetryWithContext._telemetryContext.requestContext = this._telemetryContext.requestContext;\n            telemetryWithContext._telemetryContext.moduleContext = moduleContext;\n\n            return telemetryWithContext;\n        };\n    };\n\n    /**\n     * Logs a structured message at the given log level, with optional custom tags and/or an exception\n     * @param logLevel LogLevel of the message\n     * @param messageTemplate String to log, denoting placeholders with {placeholder}.\n     * Example input string: \"Hello {signedInUser}! Good {morningOrEvening}!\"\n     * @param logOptions Contains arguments to replace placeholders, custom tags for log, and optional error object.\n     * For the example message template, arguments need to be provided for 'user' and 'morningOrEvening'.\n     */\n    public log = (logLevel: LogLevel, messageTemplate: string, logOptions?: TelemetryLogOptions): void => {\n        this._log(logLevel, messageTemplate, logOptions);\n    };\n\n    /**\n     * Logs an exception message with the given LogLevel\n     * @param logLevel LogLevel of the trace message\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    private _logException = (logLevel: LogLevel, message: string, args: unknown[]): void => {\n        // Append any extra arguments to the message\n        let fullMessage = message;\n        args.forEach(arg => {\n            fullMessage = fullMessage.concat('\\n', safeStringify(arg));\n        });\n        this._log(logLevel, message, { exception: { name: message, message: fullMessage } });\n    };\n\n    /**\n     * Logs a trace message with the given LogLevel\n     * @param logLevel LogLevel of the trace message\n     * @param message The string to log\n     * @param args Any extra arguments to log. Will be converted to strings and appended to message\n     */\n    private _logTrace = (logLevel: LogLevel, message: string, args: unknown[]): void => {\n        const requestedLogLevel = NumericLogLevel[logLevel];\n        const minLogLevel = <number>(<unknown>process.env.SDK_MIN_LOG_LEVEL);\n        if (minLogLevel <= requestedLogLevel) {\n            this.notifyTraceLoggers(logger => logger.log(logLevel, message, args, this._telemetryContext));\n        }\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { DynamicsPrivacyLog } from './dynamics-privacy-log';\n\n/**\n * Wraps the given data in an 'AccessControl' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asAccessControl<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'AccessControl',\n        isCustomerData: false,\n        isRestrictedData: true,\n        isPersonalData: false,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'CustomerContent' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asCustomerContent<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'CustomerContent',\n        isCustomerData: true,\n        isRestrictedData: true,\n        isPersonalData: true,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'EUII' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asEUII<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'EUII',\n        isCustomerData: true,\n        isRestrictedData: true,\n        isPersonalData: true,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'SupportData' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asSupportData<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'SupportData',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: true,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'AccountData' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asAccountData<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'AccountData',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: true,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'PublicPersonalData' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asPublicPersonalData<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'PublicPersonalData',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: true,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'EUPI' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asEUPI<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'EUPI',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: true,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'OII' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asOII<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'OII',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: false,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'SystemMetadata' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asSystemMetadata<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'SystemMetadata',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: false,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Wraps the given data in an 'PublicNonPersonalData' DynamicsPrivacyLog object.\n * @param data Data to wrap with privacy information\n */\nexport function asPublicNonPersonalData<T>(data: T): DynamicsPrivacyLog<T> {\n    return {\n        data: data,\n        classificationLevel: 'PublicNonPersonalData',\n        isCustomerData: false,\n        isRestrictedData: false,\n        isPersonalData: false,\n        __isDynamicsPrivacy: true\n    };\n}\n\n/**\n * Gets the data out of the input object if it is a DynamicsPrivacyLog object.\n * Filters data if it contains privacy information.\n * @param input Input object that may or may not be a DynamicsPrivacyLog\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getFilteredData(input: any): any {\n    // Check if the input is a DynamicsPrivacyLog object\n    if (input && input.__isDynamicsPrivacy) {\n        // If input contains privacy data, censor output\n        if (input.isCustomerData || input.isRestrictedData || input.isPersonalData) {\n            return `DATA CENSORED (${input.classificationLevel})`;\n        } else {\n            return input.data;\n        }\n    } else {\n        return input;\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SeverityLevel } from 'applicationinsights/out/Declarations/Contracts';\nimport { ITelemetryContext } from '../interfaces';\nimport { IDictionary } from '../interfaces/IDictionary';\nimport { getFilteredData } from '../privacy/dynamics-privacy-helper';\nimport { safeStringify } from './logging-helper';\n\n/**\n * Key value for Custom Tags custom dimension in AppInsights events\n */\nexport const customTagsKey: string = 'custom-tags';\n\n/**\n * Key value for Message Template custom dimension in AppInsights events\n */\nexport const messageTemplateKey: string = 'message-template';\n\n/**\n * Key value for Module ID custom dimension in AppInsights events\n */\nexport const moduleIdKey: string = 'Module ID';\n\n/**\n * Key value for Module Type custom dimension in AppInsights events\n */\nexport const moduleTypeKey: string = 'Module Type';\n\n/**\n * Key value for Page Type custom dimension in AppInsights events\n */\nexport const pageTypeKey: string = 'Page Type';\n\n/**\n * Key value for Page Type custom dimension in AppInsights events\n */\nexport const cmsPageIdKey: string = 'CMS Page ID';\n\n/**\n * Key value for Channel id custom dimension in AppInsights events\n */\nexport const channelIdKey: string = 'Channel ID';\n\n/**\n * Builds custom properties list from telemetry context and message template arguments\n * @param context Telemetry context from which the properties will be pulled\n * @param placeholders List of placeholders in messageTemplate along with position in string\n * @param values Arguments to replace placeholders\n */\nexport function buildPropertiesList(\n    context: ITelemetryContext,\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    placeholders: Map<string, any>,\n    customTags?: string[]\n): IDictionary<string> {\n    // Start properties list with those from telemetry context\n    const properties: IDictionary<string> = getPropertiesFromContext(context);\n\n    // Add message template arguments as custom properties\n    placeholders.forEach((value, key) => {\n        // Get filtered data out of placeholder if it is a privacy object\n        const data = getFilteredData(value);\n\n        // Add placeholder to list of custom parameters\n        properties[`param_${key}`] = safeStringify(data);\n    });\n\n    // Add custom tags to properties\n    if (customTags) {\n        properties[customTagsKey] = [].join.apply(customTags, [', ']);\n    }\n\n    return properties;\n}\n\n/**\n * Converts the given telemetry context into AppInsights readable properties\n * @param context Telemetry context from which the properties will be pulled\n */\nexport function getPropertiesFromContext(context: ITelemetryContext): IDictionary<string> {\n    const properties: IDictionary<string> = {};\n    // Only add context to properties if they have been set (non-empty string)\n    if (context.moduleContext.moduleId) {\n        properties[moduleIdKey] = context.moduleContext.moduleId;\n    }\n    if (context.moduleContext.moduleType) {\n        properties[moduleTypeKey] = context.moduleContext.moduleType;\n    }\n    if (context.requestContext.pageId) {\n        properties[cmsPageIdKey] = context.requestContext.pageId;\n    }\n    if (context.requestContext.pageType) {\n        properties[pageTypeKey] = context.requestContext.pageType;\n    }\n    if (context.requestContext.channelId) {\n        properties[channelIdKey] = context.requestContext.channelId;\n    }\n\n    return properties;\n}\n\n/**\n * Given a severity level and if debug flag is set or not, this method will return true if we should bypass logs\n * @param severityLevel - SeverityLevel enum\n * @param isDebug - boolean\n */\nexport function shouldSkipLogging(severityLevel: SeverityLevel | undefined, isDebug: boolean): boolean {\n    // Do not send events marked as None or Debug to AppInsights\n    // Do not send events marked as trace to AppInsights, if debug mode is not on\n\n    return severityLevel === undefined || (!isDebug && severityLevel === 0);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    ApplicationInsights,\n    IEventTelemetry,\n    ITraceTelemetry,\n    IExceptionTelemetry,\n    IPageViewTelemetry,\n    IDependencyTelemetry\n} from '@microsoft/applicationinsights-web';\nimport { ITelemetryContext, ITraceLogger, ITraceLoggerParams, LogLevel } from '../interfaces';\nimport { IDictionary } from '../interfaces/IDictionary';\nimport { ITrackDependency } from '../interfaces/ITrackDependency';\nimport { TelemetryBase } from '../telemetry';\nimport { buildPropertiesList, getPropertiesFromContext, messageTemplateKey, shouldSkipLogging } from './app-insights-helper';\nimport { safeStringify } from './logging-helper';\n\nexport enum LoggerType {\n    MSFTApplicationInsightsLogger,\n    OperationalApplicationInsightsLogger\n}\n\n/**\n * Client-side logger that sends messages to Application Insights\n */\nexport class ClientAppInsightsJSLogger implements ITraceLogger {\n    /**\n     * Mapping between telemetry framework LogLevel and AppInsights JS Severity Levels\n     */\n    private static _severityLevelMapping: Map<LogLevel, number> = new Map([\n        [LogLevel.Trace, 0],\n        [LogLevel.Information, 1],\n        [LogLevel.Warning, 2],\n        [LogLevel.Error, 3],\n        [LogLevel.Critical, 4]\n    ]);\n\n    private options: ITraceLoggerParams = <ITraceLoggerParams>{};\n    private AppInsights: ApplicationInsights;\n    private loggertype: LoggerType;\n\n    /**\n     * Creates a new instance of AppInsights Logger\n     * @param loggerType The type of instance of Application Insights\n     * @param instrumentationKey The instrumentation key for the Application Insights instance\n     */\n    constructor(loggerType: LoggerType, instrumentationKey: string) {\n        const eventLog: IEventTelemetry = {\n            name: 'Client version of Application Insights registered'\n        };\n\n        this.loggertype = loggerType;\n\n        // @ts-ignore -- fetching globally available properties\n        const loggerProps = window.___initialData___.requestContext;\n\n        this.AppInsights = new ApplicationInsights({\n            config: {\n                instrumentationKey: instrumentationKey,\n                enableCorsCorrelation: true,\n                // @ts-ignore -- fetching globally available properties\n                correlationHeaderDomains: window._loggerProps[0].correlationHeaderDomains\n            }\n        });\n\n        this.AppInsights.loadAppInsights();\n\n        if (this.loggertype === LoggerType.MSFTApplicationInsightsLogger) {\n            this.addTelemetryInitializer(loggerProps);\n\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const _this = this;\n            // @ts-ignore -- globally providing the application insights trackException instance for logging\n            window['_aiTrackExceptionInstance'] = exceptionLog => _this.AppInsights.trackException(exceptionLog);\n        }\n\n        if (this.loggertype === LoggerType.OperationalApplicationInsightsLogger) {\n            this.operationalInsightsEventFilter();\n\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const _this = this;\n            // @ts-ignore -- globally providing the operational insights trackException instance for logging\n            window['_oiTrackExceptionInstance'] = exceptionLog => _this.AppInsights.trackException(exceptionLog);\n        }\n\n        this.AppInsights.trackPageView();\n        this.AppInsights.trackEvent(eventLog);\n\n        // empty error queue if present\n        // @ts-ignore\n        const errors = window._globalErrors;\n        if (errors && errors.length) {\n            for (let i = 0; i < errors.length; i++) {\n                this.AppInsights.trackException(errors[i]);\n            }\n        }\n    }\n\n    public initialize(options: ITraceLoggerParams): void {\n        this.options = options;\n    }\n\n    /**\n     * @internal\n     * Logs a trace message to AppInsights\n     * @param logLevel LogLevel of the message\n     * @param context Telemetry context to add to log\n     * @param messageTemplate Structured log formatted string\n     * @param placeholders List of placeholders in messageTemplate along with position in string\n     * @param values Arguments to replace placeholders\n     * @param customTags Array of strings to attach to log\n     */\n    public sendLog(\n        logLevel: LogLevel,\n        context: ITelemetryContext,\n        messageTemplate: string,\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        placeholders: Map<string, any>,\n        customTags?: string[],\n        exception?: Error\n    ): void {\n        // Convert ITelemetry LogLevel to corresponding AppInsights SeverityLevel when logging\n        const severityLevel = ClientAppInsightsJSLogger._severityLevelMapping.get(logLevel);\n\n        if (shouldSkipLogging(severityLevel, this.options.isDebug)) {\n            return;\n        }\n\n        // Build properties list with telemetry context and message template arguments\n        const properties: IDictionary<string> = buildPropertiesList(context, placeholders, customTags);\n\n        if (exception === undefined) {\n            // Send log to AppInsights as trace event\n            const traceLog: ITraceTelemetry = {\n                message: messageTemplate,\n                severityLevel: severityLevel\n            };\n            this.AppInsights.trackTrace(traceLog, properties);\n        } else {\n            // Attach message template as custom property\n            properties[messageTemplateKey] = messageTemplate;\n\n            const exceptionLog: IExceptionTelemetry = {\n                exception: exception,\n                properties: properties,\n                severityLevel: severityLevel\n            };\n            // Send log to AppInsights as exception event\n            this.AppInsights.trackException(exceptionLog);\n        }\n    }\n\n    /**\n     * @internal\n     * Logs a trace message to AppInsights\n     * @param logLevel Severity level of the log\n     * @param message String to log\n     * @param args Any additional objects to log\n     * @param context Additional properties to add to the log\n     */\n    public log(logLevel: LogLevel, message: string, args: unknown[], context: ITelemetryContext): void {\n        // Convert ITelemetry LogLevel to corresponding AppInsights SeverityLevel when logging\n        const severityLevel = ClientAppInsightsJSLogger._severityLevelMapping.get(logLevel);\n\n        if (shouldSkipLogging(severityLevel, this.options.isDebug)) {\n            return;\n        }\n\n        // Append any extra arguments to the message\n        let fullMessage = message;\n        args.forEach(arg => {\n            fullMessage = fullMessage.concat('\\n', safeStringify(arg));\n        });\n\n        const traceLog: ITraceTelemetry = {\n            message: `${logLevel}: ${fullMessage}`,\n            properties: getPropertiesFromContext(context)\n        };\n        this.AppInsights.trackTrace(traceLog);\n    }\n    /**\n     * @internal\n     * Logs an error object to AppInsights as an exception\n     * @param error Error object to log\n     * @param context Additional properties to add to the log\n     */\n    public exception(error: Error, context: ITelemetryContext): void {\n        const exceptionLog: IExceptionTelemetry = {\n            exception: error,\n            properties: getPropertiesFromContext(context)\n        };\n        this.AppInsights.trackException(exceptionLog);\n    }\n    /**\n     * @internal\n     * No-op - not tracking client side metrics\n     * @param name name of the metric\n     * @param value value of the metric\n     */\n    public trackMetric(name: string, value: number, context: ITelemetryContext): void {\n        // noop\n    }\n    /**\n     * Track a structured event with app insights\n     *\n     * @template TProperties interface for properties\n     * @template TMeasurements interface for measurements to go with the event\n     * @param {ITrackEventOptions<TProperties, TMeasurements>} trackEventOptions event options\n     */\n    public trackEvent<TProperties, TMeasurements>(\n        name: string,\n        properties?: TProperties,\n        measurements?: TMeasurements,\n        context?: ITelemetryContext\n    ): void {\n        const eventLog: IEventTelemetry = {\n            name: name,\n            properties: <IDictionary<string>>(<unknown>properties),\n            measurements: <IDictionary<number>>(<unknown>measurements)\n        };\n        this.AppInsights.trackEvent(eventLog);\n    }\n\n    /**\n     * Track a page view\n     *\n     * @param {string} name\n     * @param {string} [url]\n     */\n    public trackPageView(name: string, url?: string): void {\n        const pageViewLog: IPageViewTelemetry = {\n            name: name,\n            uri: url\n        };\n        this.AppInsights.trackPageView(pageViewLog);\n    }\n\n    /**\n     * Track request\n     * @param options request options\n     */\n    public trackDependency(options: ITrackDependency): void {\n        const id = TelemetryBase.generateGuid();\n\n        const dependencyLog: IDependencyTelemetry = {\n            id: id,\n            type: options.method,\n            target: `https://${options.target}${options.name}` || '',\n            name: options.name || '',\n            duration: options.duration,\n            success: options.success,\n            responseCode: options.resultCode,\n            properties: options.properties\n        };\n        this.AppInsights.trackDependencyData(dependencyLog);\n    }\n\n    private operationalInsightsEventFilter() {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const telemetryInitializer = (envelope: any) => {\n            const MessageString = 'MessageData';\n            const EventString = 'EventData';\n            const RemoteDependencyDataString = 'RemoteDependencyData';\n\n            if (envelope) {\n                const baseType = envelope.baseType;\n                if (baseType === MessageString || baseType === EventString) {\n                    return false;\n                }\n                // All retail server calls will have requestId set. if no requestId set, drop it\n                if (baseType === RemoteDependencyDataString && !envelope.baseData.properties.requestId) {\n                    return false;\n                }\n\n                return true;\n            }\n        };\n\n        this.AppInsights.addTelemetryInitializer(telemetryInitializer);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private addTelemetryInitializer(loggerProps: any) {\n        const IS_DEV = process.env.NODE_ENV === 'development';\n        const sdkVersion = loggerProps._debug.commerceSDKVersion;\n        const sskVersion = loggerProps._debug.commerceSSKVersion || 'XX';\n        const retailProxyVersion = loggerProps._debug.retailProxyVersion || 'XX';\n        let environmentId = 'Development';\n        let commerceCoreEnvironmentId = 'Development';\n\n        if (!IS_DEV) {\n            environmentId = loggerProps.telemetrySettings.environmentId;\n            commerceCoreEnvironmentId = loggerProps.telemetrySettings.commerceCoreEnvId || 'CommerceCore_EnvironmentId_Missing';\n        }\n\n        const pageViewDataString = 'PageviewData';\n        const pageviewPerformanceDataString = 'PageviewPerformanceData';\n        const remoteDependencyDataString = 'RemoteDependencyData';\n        const exceptionDataString = 'ExceptionData';\n        const censoredString = 'CENSORED';\n\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const telemetryInitializer = (envelope: any) => {\n            const telemetryItem = envelope.baseData;\n            telemetryItem.properties = telemetryItem.properties || {};\n\n            if (envelope) {\n                const baseType = envelope.baseType;\n                // we add more client performance metrics to PageviewPerformanceData\n                if (baseType === pageviewPerformanceDataString) {\n                    const performanceNavigationTimming = window && window.performance.getEntriesByType('navigation');\n                    const performancePaintTiming = window.performance.getEntriesByType('paint');\n                    // add performance metrics\n                    if (performanceNavigationTimming && performanceNavigationTimming.length > 0) {\n                        const performanceNavigationTimmingData = performanceNavigationTimming[0];\n                        const duration = performanceNavigationTimmingData.duration;\n                        // @ts-ignore -- Content Load Event Start\n                        const domContentLoadedEventStart = performanceNavigationTimmingData.domContentLoadedEventStart;\n                        // @ts-ignore -- Content Load Event End\n                        const domContentLoadedEventEnd = performanceNavigationTimmingData.domContentLoadedEventEnd;\n                        // @ts-ignore\n                        const domInteractive = performanceNavigationTimmingData.domInteractive;\n                        // @ts-ignore -- performance Navigation complete duration\n                        const domComplete = performanceNavigationTimmingData.domComplete;\n                        duration ? (telemetryItem.properties.duration = duration) : null;\n                        domContentLoadedEventStart && domContentLoadedEventEnd\n                            ? (telemetryItem.properties.domContentLoadedEvent = domContentLoadedEventEnd - domContentLoadedEventStart)\n                            : null;\n                        domInteractive ? (telemetryItem.properties.domInteractive = domInteractive) : null;\n                        domComplete ? (telemetryItem.properties.domComplete = domComplete) : null;\n                    }\n                    // add painting perf metrics\n                    if (performancePaintTiming && performancePaintTiming.length > 0) {\n                        performancePaintTiming.forEach(paintTiming => {\n                            telemetryItem.properties[paintTiming.name] = paintTiming.startTime;\n                        });\n                    }\n                }\n\n                // To check the telemetry item’s type\n                if (baseType === pageViewDataString || baseType === pageviewPerformanceDataString) {\n                    // this statement removes url from all page view documents\n                    telemetryItem.uri = `URL ${censoredString}`;\n                    // @ts-ignore\n                    telemetryItem.properties['ExperimentVariants'] = window._loggerProps[0].expVariantInfo;\n                }\n                // All retail server calls will have requestId set. if no requestId set, censor the strings\n                if (baseType === remoteDependencyDataString && !telemetryItem.properties.requestId) {\n                    return false;\n                }\n\n                if (envelope.tags) {\n                    if (\n                        baseType === exceptionDataString ||\n                        baseType === pageviewPerformanceDataString ||\n                        baseType === pageViewDataString ||\n                        baseType === remoteDependencyDataString\n                    ) {\n                        envelope.tags['ai.operation.name'] = censoredString;\n                    }\n                }\n            }\n\n            const props = telemetryItem.properties;\n            props['Environment id'] = environmentId;\n            props['Commerce core environment id'] = commerceCoreEnvironmentId;\n            props['SDK Version'] = sdkVersion;\n            props['RetailProxy Version'] = retailProxyVersion;\n            // @ts-ignore\n            props['Node Process ID'] = window._loggerProps[0].processID;\n            props['SSK Version'] = sskVersion;\n            props['Server operation id'] = loggerProps.telemetrySettings.operationId;\n            // @ts-ignore\n            props['DA SDK Version'] = window && window.oneDSWeb && window.oneDSWeb.config && window.oneDSWeb.config._daSdkVer;\n        };\n\n        this.AppInsights.addTelemetryInitializer(telemetryInitializer);\n    }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetryContext, ITraceLogger, ITraceLoggerParams, LogLevel } from '../interfaces';\nimport { ITrackDependency } from '../interfaces/ITrackDependency';\n/**\n * Default console logger\n * This is a default logger that just logs messages directly to the console\n */\nclass GenericConsoleLogger implements ITraceLogger {\n    private options: ITraceLoggerParams = <ITraceLoggerParams>{};\n\n    public initialize(options: ITraceLoggerParams): void {\n        this.options = options;\n    }\n\n    /**\n     * @internal\n     * Logs a message to the console, prefixed with custom tags, and with arguments following\n     * @param logLevel LogLevel of the message\n     * @param context Telemetry context to add to log\n     * @param messageTemplate Structured log formatted string\n     * @param placeholders List of placeholders in messageTemplate along with position in string\n     * @param values Arguments to replace placeholders\n     * @param customTags Array of strings to attach to log\n     */\n    public sendLog(\n        logLevel: LogLevel,\n        context: ITelemetryContext,\n        messageTemplate: string,\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        placeholders: Map<string, any>,\n        customTags?: string[],\n        exception?: Error\n    ): void {\n        // Determine console output method based on log level\n        let printFunction: Function;\n        switch (logLevel) {\n            case LogLevel.Critical:\n            case LogLevel.Error:\n                printFunction = console.error;\n                break;\n            case LogLevel.Warning:\n                printFunction = console.warn;\n                break;\n            case LogLevel.Information:\n            case LogLevel.Debug:\n            case LogLevel.Trace:\n                // Don't print debug and info messages to console unless in debug mode\n                if (!this.options.isDebug) {\n                    return;\n                }\n            default:\n                printFunction = console.log;\n        }\n\n        // Output tags and message template\n        let tagsString = '';\n        if (customTags !== undefined) {\n            customTags.forEach(tag => {\n                tagsString += `[${tag}]`;\n            });\n        }\n        tagsString && printFunction(tagsString);\n        let message = messageTemplate;\n\n        // Output arguments\n        for (const [key, value] of placeholders.entries()) {\n            let messageValue;\n            // If Dynamics privacy object only print data value, else print object\n            if (value.__isDynamicsPrivacy) {\n                messageValue = value.data;\n            } else {\n                messageValue = value;\n            }\n            if (messageValue.toString() === '[object Object]') {\n                messageValue = JSON.stringify(messageValue, null, 2);\n            }\n            message = message.replace(new RegExp(`{${key}}`, 'g'), messageValue);\n        }\n        printFunction(`[${logLevel}] ${message}`);\n\n        // Print exception if present\n        if (exception !== undefined) {\n            printFunction(exception.stack);\n        }\n    }\n\n    /**\n     * @internal\n     * Logs a message to the console based on LogLevel\n     */\n    public log(logLevel: LogLevel, message: string, args: unknown[], context: ITelemetryContext): void {\n        switch (logLevel) {\n            case LogLevel.Information:\n                this.options.isInfo && this._printMessages(console.log, message, args);\n                break;\n            case LogLevel.Debug:\n                this.options.isDebug && this._printMessages(console.log, message, args);\n                break;\n            case LogLevel.Trace:\n                this._printMessages(console.log, message, args);\n                break;\n            case LogLevel.Warning:\n                this._printMessages(console.warn, message, args);\n                break;\n            case LogLevel.Critical:\n            case LogLevel.Error:\n                this._printMessages(console.error, message, args);\n                break;\n            default:\n        }\n    }\n\n    /**\n     * @internal\n     * Logs an exception object to the console\n     */\n    public exception(error: Error, context: ITelemetryContext): void {\n        if (error) {\n            console.error(error.stack);\n        }\n    }\n\n    /**\n     * @internal\n     * Tracks a metric\n     * @param name Metric name\n     * @param value Metric value\n     */\n    public trackMetric(name: string, value: number, context: ITelemetryContext): void {\n        console.log(`${name}: ${value}`);\n    }\n\n    public trackEvent<TProperties, TMeasurements>(\n        name: string,\n        properties?: TProperties,\n        measurements?: TMeasurements,\n        context?: ITelemetryContext\n    ): void {\n        const event = {\n            name: name,\n            time: new Date(),\n            properties,\n            measurements\n        };\n        this.log(LogLevel.Information, name, [event], <ITelemetryContext>context);\n    }\n\n    /**\n     * Track a page view\n     *\n     * @param {string} name\n     * @param {string} [url]\n     */\n    public trackPageView(name: string, url?: string): void {\n        this.trackEvent('trackPageView', { url });\n    }\n\n    /**\n     * Track request\n     * @param options the request options\n     */\n    public trackDependency(options: ITrackDependency): void {\n        this.trackEvent('trackRequest', options);\n    }\n\n    /**\n     * Prints the given message and arguments to the console via the given function\n     * @param printFunction Function to use to print\n     * @param message String to print\n     * @param args Additional args to print\n     */\n    private _printMessages(printFunction: Function, message: string, args: unknown[]): void {\n        printFunction(message);\n        args.forEach(arg => {\n            printFunction(arg);\n        });\n    }\n}\n\nconst singletonLoggerInstance = new GenericConsoleLogger();\nexport { singletonLoggerInstance as GenericConsoleLogger };\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport const EXCEPTION_CURRENCY_FORMATTER = 'Unable to determine currency format';\nexport const NAME_CURRENCY_FORMATTER_EXCEPTION = 'CurrencyFormatterException';\nexport const EXCEPTION_LOAD_DATA_EXCEPTION = 'Load data exception';\nexport const EXCEPTION_PARSE_ISSUE = 'Content not parsed correctly';\nexport const EXCEPTION_GENERIC_EXPRESS = 'Express Caught an exception';\nexport const EXCEPTION_INVALID_URL = 'Invalid URL';\nexport const EXCEPTION_HTTP_TIMEOUT = 'Request timed out';\nexport const EXCEPTION_PAGECONFIG = 'Error while attempting to get page config';\nexport const EXCEPTION_PAGERENDERING = 'Error in page rendering.';\nexport const EXCEPTION_NO1RFRESPONSE = 'Unable to retrieve Server page response';\nexport const EXCEPTION_UNREGISTEREDMODULEID = 'Module id: $0, type: $1 is not registered';\nexport const EXCEPTION_ERROR_CLIENT_BOUNDARY = 'Error in client error boundary';\nexport const EXCEPTION_MISSINGMODULECONFIG = 'Module config is missing for module with id $0 type $1';\nexport const EXCEPTION_NOMODULEBINDER = 'Cannot get module binder for $0';\nexport const EXCEPTION_MODULERENDERFAIL = 'Failed to render module with id $0';\nexport const EXCEPTION_CLIENT_CACHE_HYDRATE = 'Error while hydrating the client-side cache $0';\nexport const EXCEPTION_LOADDATA_ACTION = 'Threw error while processing action {actionName}';\nexport const EXCEPTION_LOADDATA_ACTION_0 = 'Threw error while processing action {actionName} for module {moduleName}';\nexport const EXCEPTION_LOADDATA_ACTION_1 = 'Issue with data action';\nexport const EXCEPTION_LOADDATA_ACTION_2 = 'Issue with data action registered at {actionPath} for module {moduleName}';\nexport const EXCEPTION_LOADDATA_ACTION_3 = 'Encountered an error while processing ajax data action $0';\nexport const EXCEPTION_API_ROUTE1 = 'missing id parameter';\nexport const EXCEPTION_API_ROUTE2 = 'invalid action id parameter passed';\nexport const EXCEPTION_API_ROUTE3 = 'error occurred while executing the given data action';\nexport const EXCEPTION_DATAACTION_EXECUTION = 'Error encountered with execution of action: {actionError}';\nexport const EXCEPTION_NO_MOCKS_FOUND = 'No mock files found with mock paths';\nexport const EXCEPTION_NOTYPEQUERY = 'Please specify type query string. Eg: http://localhost:3000/modules?type=hero:hero1,hero:hero2';\nexport const EXCEPTION_JSONPARSEFAILED = 'JSON Parsing failed';\nexport const EXCEPTION_BADCONFIGPASSED = 'Malformed config $0 passed';\nexport const EXCEPTION_BADPAGECONTEXT = `PageContext can't be created with null or empty page data`;\nexport const EXCEPTION_INITIALDATAFAIL = 'Backend state not found on `window.___initialData___`. Unable to initialize client code.';\nexport const EXCEPTION_EXPECTED501 = 'expected to throw 501: $0';\nexport const EXCEPTION_PARSECONFIGVALUE = 'Failed to parse the given config value';\nexport const EXCEPTION_PRODUCT_LIST_ACTION = 'Error while running productList hydration action';\nexport const EXCEPTION_PRODUCT_LIST_CLIENTSIDE_HYDRATION = 'Error while hydrating productList on client';\nexport const EXCEPTION_LINK_ACTION = 'Error while running link hydration action';\nexport const INVALID_PRODUCT_LIST_TYPE = 'An invalid productList type was found $0';\nexport const NAME_CULTURE_INFO_FORMATTER_EXCEPTION = 'CultureInfoFormatterException';\nexport const EXCEPTION_RS_INTERCEPT = `Could not intercept RS request`;\n\nexport const EXCEPTION_INVALID_ARGUMENT = (functionName: string, invalidVariable: string): string => {\n    return `Invalid input. Argument ${invalidVariable} to ${functionName} is invalid or undefined.`;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport const MESSAGE_SERVER_ENDPOINT = 'Server Endpoint: {serverEndpoint}';\nexport const MESSAGE_GETTING_PAGE_RESPONSE = 'Getting Page Response for: {pageUrl}';\nexport const MESSAGE_CREATE_INPUT_LOADDATA = 'Created input for data actions $0 in $1-$2';\nexport const MESSAGE_NO_MOCK_FOUND = 'No mock path found from query';\nexport const MESSAGE_NO_SERVER_ENDPOINT_SET =\n    'No server endpoint provided in .env file to lookup url. Please use a page mock or set MSDyn365_HOST in the .env file.';\nexport const MESSAGE_OVERRIDE_MODULE_CONFIG = 'Overriding module data property $0 with $1 for module $2';\nexport const MESSAGE_NEWCHILDPROP = 'Adding new child property $0 in $1 for module $2';\nexport const MESSAGE_INVALIDJSONPATH = 'Invalid JSON path, could not create new property in $0 for module $1';\nexport const MESSAGE_MULTIPLE_REND_CONTEXTS = 'Multiple RenderingContexts found across module mocks, only the first will be used';\nexport const MESSAGE_MOCKSNOTFOUND = 'Unable to find module mocks. Please ensure module mocks exist for the following mocks $0.';\nexport const MESSAGE_RS_CALL_ARGUMENTS = `Server-side retail call [m:{method}; e:{endPoint};v:{vector};r:{requestId}]`;\nexport const MESSAGE_DEBUG_MODULE_SSR_ERROR =\n    'To debug the error further, please add debug=true query param to the page url to get more verbose debug information on the page.';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport const MESSAGE_CLIENT_RENDER_ERROR = 'Backend state not found on `window.___initialData___`. Unable to initialize client code.';\n"],"names":["MSDyn365Commerce","constructor","_cartCookie","_checkoutCartCookie","_accountSelectionCookie","_checkoutCartKeyPrefix","_buildVersion","_env","_commerceApiSetting","_themeRegistration","themes","styles","_imageSettings","imageSettings","gridSettings","_themeSettings","_themeModules","_initialLoadCompleted","_environmentVariable","_isClientHydrate","_appSettings","app","config","routes","msdyn365","contentSecurityPolicy","_featureNames","_versionDependentFeatureInfo","_moduleCssStaticPaths","Set","getEnvironmentVariable","environmentName","defaultValue","this","setClientHydrate","isClientHydrate","getAllEnvironmentVariable","setEnvironmentVariable","process","env","SUBMISSIONID","setInitialLoadCompleted","initialLoadCompleted","setThemeRegistration","themeRegistration","setThemeModules","themeModules","createComponent","name","componentObj","props","component","Error","Element","React","createComponentOverride","_siteCssUrl","_experimentationConnector","_segmentationConnectors","_geoLookupConnector","_connectorCache","_secretManager","_localCredentials","_platformSettings","window","isBrowser","_resourceManager","_renderResultsCache","State","RefreshType","ImageFetchPriority","NON_SCRIPT_TAGS","DATA_LOAD_POINT","HEAD_START_LOAD_POINT","HEAD_END_LOAD_POINT","BODY_START_LOAD_POINT","BODY_END_LOAD_POINT","HEAD_ELEMENT_IDENTIFIER_ATTR","METATYPES","FAVICON_REL","COMPONENT_TYPES","ALLOWED_DUPLICATES","TAG_NAMES","DOMAttributeNames","acceptCharset","className","htmlFor","httpEquiv","reactElementToDOM","element","tagType","type","el","document","createElement","Object","keys","forEach","property","attr","toLowerCase","setAttribute","children","dangerouslySetInnerHTML","innerHTML","__html","textContent","join","filterScripts","filterBody","t","tagName","attrVal","getAttribute","addElementToHtmlSlot","slot","loadPointToLookFor","loadPoint","prepend","appendChild","doUpdateHead","head","tags","h","headType","toString","components","push","titleTag","title","titleComponent","initialData","___initialData___","pageRoot","titleTemplate","replace","updateTitle","length","updateElements","headEl","getElementsByTagName","bodyEl","oldTags","Array","prototype","slice","call","querySelectorAll","bodyScriptTags","concat","newTags","map","filter","newTag","len","i","oldTag","removeAttribute","isEqualNode","splice","nodeName","parentNode","removeChild","mapOnServer","htmlHeadIncludeWithSideEffect","withSideEffect","reducedComponents","reduce","a","b","isArray","toArray","reverse","Boolean","metaTypes","metaCategories","tagComponent","tagElement","key","has","add","metaType","category","categories","unique","mergedComponents","child","index","childElement","META_CONTENT_APPEND_ATTR","content","componentMap","hasFavIcon","comp","indexOf","rel","nonScriptTags","scriptTags","headStart","headEnd","bodyStart","bodyEnd","updateHead","HtmlHeadInclude","WrappedComponent","_a","Component","canUseDOM","shouldComponentUpdate","nextProps","_isEqual","render","msdyn365Commerce","assign","peek","rewind","mappedState","PlaceholderForContainerPreviewComponent","ref","useRef","useEffect","current","id","error","message","typeName","comment","slotId","parentId","JSON","stringify","useMemo","style","color","backgroundColor","textAlign","role","renderModuleAttributes","display","resources","clickToConfigure","EmptyPlaceholderImage","super","classnames","_emptyImageClassName","LoadingPlaceholderImage","_loadingImageClassName","isEmptyOrNullObject","obj","isAuthoringEditEnabled","context","features","authoring_inline_edit","params","isEditor","tryParseInt","value","parsedValue","parseInt","isNaN","undefined","SDK_FRAGMENT_NAME","getAsset","assetPath","assetUrl","url","staticCdnUrl","charAt","substr","submissionId","isNonceEnabled","requestContext","nonceToken","disableContentSecurityPolicy","enableNonce","verboseLogger","telemetry","messageTemplate","logOptions","logLevel","arguments","LogLevel","Information","enable_verbose_logs","log","checkVersionForFeature","feature","getVersionDependentFeatureInfo","skipConsoleWarn","originalConsole","_objectSpread","console","showDebug","warn","isOboRequest","user","isOBORequest","getCustomerAccountNumberForAllChannelType","isChannelTypeB2B","customerAccountNumber","_requestContext$cooki","accountSelectionCookie","cookies","getAccountSelectionCookie","isEmptyOrWhitespace","can","split","isObo","getCustomerAccountNumber","str","trim","_requestContext$apiSe","apiSettings","channelCustomerType","isUserTypeB2B","_requestContext$user","_requestContext$user2","isB2b","EditError","required","PROPERTY_DISABLED","setPrototypeOf","Name","PROPERTY_INIT","getEditableFieldClassName","disabled","isEditorialMode","ImageField","svgRenderer","setSvgRenderer","editableProps","onKeyPress","event","charCode","onChange","preventDefault","onDoubleClick","onMouseOver","onFocus","onBlur","onMouseOut","tabIndex","fieldProps","editProps","src","placeholderImageUrl","height","placeholderConfig","then","svg","_fieldProps$placehold","SvgComponent","DEFAULT_PLACEHOLDER","LARGE_IMAGE_PLACEHOLDER","default","largePicturePlaceholder","SMALL_IMAGE_PLACEHOLDER","smallPicturePlaceholder","TEST_PLACEHOLDER","testPlaceholder","svgProps","divStyle","alignItems","width","svgConfig","svgPropety","margin","imageFallbackOptimize","additionalProperties","domPurify","TextField","_this$props$requestCo","state","displayHtml","text","dp","_onChange","bind","_onBlur","_onFocus","isEmpty","UNSAFE_componentWillReceiveProps","_isTextEmpty","_getDisplayText","ContentEditable","html","tag","displayValue","FieldType","Text","Link","currentTarget","innerText","target","setState","displayText","placeholderText","sanitize","ALLOWED_TAGS","LinkField","href","ariaLabel","openInNewTab","onClick","linkTag","innerClassName","VideoField","_props$editPropKey","editPropKey","WYSIWYG_INIT","EditableField","_fireClientDataUpdateEventForImagePlaceholder","imagePropertyName","moduleId","disabledProperties","_msdyn365","authoringHelper","getDisabledProperties","fullPath","p","startsWith","dispatchEvent","CustomEvent","detail","_onChangeHandler","_isRequired","isDisabled","componentDidMount","_checkDisabledStatus","_props$requestContext","enabled","testCafeFlag","query","testCafe","RichText","Image","Video","videoProps","_this$props","eventObj","binding","eventTarget","$type","e","_updateStatus","status","getLargestGridSettingViewportName","xl","lg","md","sm","xs","getMinMaxWidth","viewport","largestGridSettingViewportName","gridSetting","max","w","min","viewports","find","setting","getImageResizeUrl","imageSrc","vpSetting","inputImageSettings","skipWidthAndHeightSettings","externalProvider","queryString","isSitecoreCmsProviderUrl","santizeSitecoreImageUrl","qe","q","quality","updateImageResizerQueryString","srcUrl","URL","search","searchParams","delete","getSourceData","image","imageAttributes","_imageAttributes$requ","media","getMedia","formatMediaQuery","srcSet","parsedQueryString","URLSearchParams","mode","set","get","cropFocalRegion","siteCoreBaseUrl","externalCmsBaseUrls","includes","baseImageUrl","imageName","decodeURIComponent","validateBaseImageUrl","generateImageUrl","imageUrl","encodeURIComponent","generateImageUrlForOmniChanel","imageResizerEndPoint","endsWith","constructViewportInformationForImage","moduleName","moduleLayout","propertyName","themeSettings","modules","themeSettingsForModule","themeSettingsForLayout","properties","imageViewportProperties","_get2","_cloneDeep2","key2","svgPreviewImage","fileName","shouldUseDefaultSVGPlaceholder","enableDefaultPlaceholder","isDefaultPlaceholderFeatureOn","NativeImage","_this","_this$props$shouldHid","_props$editProps","getSVGConfig","attributes","largestViewport","SVGHeight","SVGWidth","getPlaceholderAspectRatio","preserveAspectRatio","getSrcImage","stateSrc","fallBackSrc","source","test","urlSrc","urlFallBack","paramsSrc","paramsFallBack","convertToMultipleExtensions","inputString","formats","baseParts","basePath","ext","defaultImage","lazyLoad","loaded","loadFailureBehavior","_imageAttributes$edit","_this$props$imageSett","binaryHash","altText","focalRegion","cropRegions","description","fileSize","imageStyle","isLocalizable","isDecorativeImage","orientation","_links","_objectWithoutProperties","_excluded","cssClassName","filteredClassName","isUsingSVGPlaceholder","moduleType","layout","getPlaceholderName","SVGConfig","shouldBeVisibleIfFallbackNotSpecified","shouldHideOnFailure","bypassHideOnFailure","disableLazyLoad","hiddenStyle","loadFailed","visibility","parentTagToRemove","fallbacksrc","alt","onError","imageFailed","onLoad","imageLoaded","node","ReactDOM","querySelector","complete","naturalWidth","getSourceTag","srcData","imageSetting","preserveImageSpace","configs","prevState","componentDidUpdate","prevProps","onWillRender","pictureAttributes","_excluded2","sourceTags","vp","ThumbnailImage","_thumbnailProps","_props$thumbnailQuali","_props$sizeCompressin","_props$minimumSizeDim","thumbnailQuality","_defaultThumbnailQuality","sizeCompressingFactor","_defaultSizeCompressingFactor","minimumSizeDimensionValue","_defaultMinimumSizeDimensionValue","_updateImageDimension","size","minSize","Math","newSize","floor","minNewSize","defaultSize","imageDimension","_newImageDimension$q","newImageDimension","parameters","originalWidth","_extractParameterValue","originalHeight","_getCompressedSize","part","parameterName","currentWidthParameter","Number","_unused","_thumbnailClassName","MainImage","renderOptimizedImageWithEvent","_mainImageClassName","renderPureHtmlOptimizedImage","pictureHtml","ReactDOMServer","_msdyn365Commerce$pla","platformSettings","enableImageOptimizeEvents","_props$shouldUseThumb","_props$requestContext2","_props$imageSettings","_props$shouldSkipToMa","_props$requestContext3","_props$requestContext4","localShouldUseThumbnailsSetting","shouldUseThumbnails","globalShouldUseThumbnailsSetting","_shouldUseThumbnails","localShouldSkipToMainImage","shouldSkipToMainImage","globalShouldUseNewImageComponent","shouldUseNewImageComponent","_shouldSkipToMainImage","disable_image_componentv2","getInitialState","onMainImageUpdate","onThumbnailImageUpdate","isLoadingPlaceholderHidden","isThumbnailLoadingFinished","isThumbnailLoadingFailed","isThumbnailHidden","isMainImageLoadingFinished","isMainImageLoadingFailed","_hideThumbnailTimeout","clearTimeout","_hideLoadingPlaceholderTimeout","_setThumbnailHideTimeout","_setLoadingPlaceholderHideTimeout","_renderMainImage","_className","_getImageContent","_getImageContentWithThumbnail","_getImageContentWithoutThumbnail","_renderEmptyPlaceholderImage","_renderLoadingPlaceholderImage","_renderThumbnailImage","setTimeout","_defaultLoadingPlaceholderHidingDelay","_defaultThumbnailHidingDelay","_imageClassName","isHidden","_hiddenStateClassName","isLoading","_loadingStateClassName","isSkipping","CoreContext","actionContext","request","internalTelemetry","cultureFormatter","WithContext","Consumer","setTelemetryModuleContext","parseODataResponse","response","createDefaultRequest","requestUrl","httpMethod","body","options","method","data","timeout","headers","sendCommerceRequest","async","requestId","InternalTelemetry","generateGuid","requestConfig","StaticTelemetry","trackEvent","EVENT_HTTP_SERVICE_START","oun","Accept","ContentType","axios","EVENT_HTTP_SERVICE_STOP","statusCode","success","catch","code","sendRequest","_sendRequest","commerceApiRequest","dataActionId","operationId","sitePath","commerceVideoMetadataRequest","identities","eCommerceOverrideChannelId","eCommerceChannelId","videoIdentities","locale","domainName","origin","requestPath","numericIdentifier","CultureInfoFormatter","currencyCode","formatCurrency","price","_validateInput","currencyFormatter","numFormatterConstructor","currency","formatNumber","format","numberFormatter","formatDate","date","dateFormatter","dateFormatterConstructor","Date","formatTime","time","timeFormatter","hour","minute","loadIntlPollyfillQsp","load_intl_polyfills","loadIntlPollyfills","IntlPolyfill","Intl","NumberFormat","DateTimeFormat","areIntlLocalesSupported","JEST_WORKER_ID","require","memoizeFormatConstructor","validation","methodName","argName","NAME_CULTURE_INFO_FORMATTER_EXCEPTION","EXCEPTION_INVALID_ARGUMENT","parameterize","sep","parameterizeFeatureFlags","neutralizedName","candidateName","enableUrlLocalization","enableUrlEncoding","versionComparer","versionToCheck","versionToCompareAgainst","sign","localeCompare","numeric","sensitivity","versionLt","versionGte","result","PreviewRequestState","PASSTHROUGH_QUERY_PARAMS","categorySegment","ctx","getParameterizeFeatureFlagsWithRequestContext","record","NeutralizedName","Slug","platformRoutes","RecordId","categoryMoniker","product","productMoniker","list","listMoniker","ensureSlashConsistency","appendQueryParams","route","queryParams","hostName","skipCatalogId","preview","domain","catalogid","values","newDomain","overrideDomain","appendQueryString","catalogId","_context$requestConte","_context$requestConte2","_context$requestConte3","_context$requestConte5","_context$requestConte4","hostname","getRoutePath","routeContext","returnUrl","populateSitePath","unshift","getUrlSync","pageType","appRoutes","pageRouteFromAppSettings","destinationUrl","getCatalogId","_requestContext$query","catalogidstr","getCatalogIdForSdk","fallbackCatalogId","rcsuVersion","getCategoriesUrlSync","categoriesPath","categoriesPathUrls","tempSegments","Segments","seg","CategoryName","CategoryId","Url","getFriendlyName","nameTranslations","nameTranslation","item","Language","getParameterizeFeatureFlags","getRichTextHtml","RichTextComponent","onEdit","_this$props$editProps","_this$props$editProps2","link","onTextChange","linkText","linkUrl","Links","links","l","requestHookRegistrar","RequestReaderAction","requestHookRegistration","createHook","hookType","initialHook","preRenderHook","postRenderHook","Warning","createInitialHook","createpreRenderHook","createpostRenderHook","getPerformanceUtils","_context$requestCache","enable_performance_analysis","isPerfAnalysis","performanceUtilsPackage","perfAnalysisBinder","cache","requestCache","internalCache","buildMockSessionStorageContext","getDataFromStorage","setDataInStorage","getCheckoutCartData","setCheckoutCartData","removeDataFromStorage","removeCheckoutCartData","buildMockRequest","mockRequest","canonicalDomain","canonicalUrl","textDirection","isDebug","isPreview","concatJs","hasValue","isTruthy","theme","device","Type","token","isAuthenticated","optOutWebActivityTracking","baseUrl","channelId","ratingsReviewsEndpoint","retailServerProxyVersion","rnr","proxyUrl","imageResizerEndPointPreview","urlTokens","siteTheme","pageData","cookiename","_cookieName","_cookieValue","remove","getCartCookie","setCartCookie","getCheckoutCartCookie","setCheckoutCartCookie","removeCheckoutCartCookie","setAccountSelectionCookie","removeAccountSelectionCookie","isConsentGiven","setConsentCookie","deleteConsentCookie","getTargetIdCookie","sessionStorage","themeOverride","disableDefault","telemetrySettings","eventHubAuthToken","eventHubEndPoint","instrumentationKey","environmentId","operationalInsightsInstrumentationKey","telemetryData","Checkout","orderId","cartId","cartVersion","Products","productChannelId","productChannelName","productCategoryId","productCategoryName","productId","productName","productSku","productPrice","productQuantity","productCurrency","ProductPageView","siteStylePreset","_merge2","DATA_ATTRIBUTE","EMPTY_SLOT_TYPE_NAME","ADD_CONTAINER_CLASS_NAME","NO_POINTER_EVENTS_CLASS_NAME","getElementById","elementId","getModuleById","moduleDataId","foundModule","from","c","getElementDataInfo","dataInfo","getAllAddModuleBoxes","m","getModulesByParentIdAndSlotId","parentModule","getElementDataInfoById","dataAttribute","json","parse","s","friendlyName","fn","mt","isFragment","isElementFragment","isFragmentModule","isElementFragmentModule","getElementDataInfoByTarget","moduleElement","closest","getModuleByTarget","getRenderingHelper","_msdyn365AuthoringHelper","renderingHelper","updateAddModuleInnerContainerClass","addInnerContainer","appendNoPointerEventsToChildren","removeNoPointerEventsFromChildren","ICON_TYPE","container","d","viewBox","iconType","isDroppable","module","fragment","notDroppable","SVG_URL","updatePosition","x","y","dragImage","left","top","hide","setTransparentImage","transparentImage","isStatusDroppable","isStatusNotDroppable","setDropAllowedImage","dragElementDataInfo","_setDragImage","_getIconInfo","_getImageName","setDropNotAllowedImage","clear","iconInfo","droppableClassName","textBox","iconBox","iconPath","iconSVG","_createDragImage","_createDragIcon","_createDragText","createElementNS","path","dragImageName","helper","getFragmentDisplayName","PLACEHOLDER_TOP_CLASS_NAME","PLACEHOLDER_BOTTOM_CLASS_NAME","getPlaceholder","placement","_removePlaceholderFromElement","_setAllAddModuleBoxesToInitialState","addModuleBoxes","clearAll","_this$renderingHelper","removePlaceholder","setRenderingHelper","movePlaceholder","_setAddModuleBoxToInsertState","currentModule","_movePlaceholder","setPlaceHolderOnPosition","dragModule","dropModule","placeholderInfo","_getPlaceholderPlacementInfo","_this$renderingHelper2","_hasPlaceholderPositionChanged","placeBottom","onDrag","relativeIndex","_getAddModuleBox","foundBox","addModuleBoxElement","firstElementChild","_m$element","_isEqual2","dragModuleIndex","findIndex","dropModuleIndex","dropModuleRelativeIndex","box","getBoundingClientRect","bottom","setModuleAsDraggable","sourceModuleId","rootModuleId","dragAndDropPlaceholder","_setRootModuleId","_setRootModuleAsDroppable","addEventListener","_onDragStart","_onDrag","_onDragEnd","_clearCache","_cacheHasIsDroppableInfo","_has2","_getCacheKey","_isModuleDroppable","_checkIsDroppableAndAddToCache","_setModuleIsDroppable","canBeDrop","_set2","elementDataInfo","_onDragOver","isDragging","isCursorOnDroppableArea","dragEvent","dropElement","dragElement","clientY","dragAndDropImage","pageX","pageY","_onDragEnter","_onDragLeave","_onDrop","_this$renderingHelper3","onDrop","_this$renderingHelper4","_removeDraggableEvents","draggableModule","removeEventListener","_dragEvent$dataTransf","dataTransfer","setDragImage","_removeDroppableEvents","_clearAllCache","droppableModule","setDraggable","dragAndDropEvents","commerceInsightsAttributeRenderer","telemetryId","additionalTelemetryData","prop","entries","pageName","expAttributeRenderer","eventName","TelemetryEvent","NumericLogLevel","trace","debug","information","warning","critical","none","CommerceInsightsLogger","registerWebAnalyticsPlugin","webAnalyticsPlugin","_client","logEvent","eventType","payload","eventData","PageView","_isCartInfo","_populateCartInfo","AddToCart","RemoveFromCart","UpdateInCart","CheckOut","Purchase","_isProductTransaction","_populateProductTransaction","Custom","baseType","baseData","productArray","products","_populateProductInfo","affiliation","revenue","tax","shippingCost","EVENT_CLIENT_RENDER_START","EVENT_CLIENT_RENDER_STOP","CONTENT_SECURITY_POLICY_ERROR","EVENT_WEB_VITALS_CLS","EVENT_WEB_VITALS_FCP","EVENT_WEB_VITALS_FID","EVENT_WEB_VITALS_INP","EVENT_WEB_VITALS_LCP","EVENT_WEB_VITALS_TTFB","generateEventNameHash","sha256","TelemetryBase","startTimer","timerId","_timers","now","stopTimer","removeTimer","enableDataAnalytics","_enableDataAnalytics","_eventLoggers","_attributeRenderers","setTelemetryAttribute","telemetryAttribute","innerFunction","_expLogger","_generateEventName","expPayload","eventNameHash","trackMetric","notifyTraceLoggers","logger","_telemetryContext","measurements","trackPageView","page","trackDependency","registerTraceLogger","traceLogger","initialize","_traceLoggers","_namedLoggers","registerEventLogger","eventLogger","registerExpLogger","expLogger","registerAttributeRenderer","attributeRenderer","_webAnalyticsPlugin","setTelemetryRequestContext","getNamedLoggerInstance","stringFormat","templateString","args","fx","_log","regex","placeholders","Map","match","exec","sendLog","customTags","exception","moduleContext","contentCategory","contentAction","pgname","mname","etext","recid","etype","uuid","telemetryWithContext","_telemetry","safeStringify","input","output","String","Telemetry","_len","_key","_logTrace","Trace","_len2","_key2","Debug","_len3","_key3","_len4","_key4","_logException","_len5","_key5","_len6","_key6","Critical","fullMessage","arg","asSystemMetadata","classificationLevel","isCustomerData","isRestrictedData","isPersonalData","__isDynamicsPrivacy","getPropertiesFromContext","pageId","shouldSkipLogging","severityLevel","LoggerType","ClientAppInsightsJSLogger","loggerType","loggertype","loggerProps","AppInsights","ApplicationInsights","enableCorsCorrelation","correlationHeaderDomains","_loggerProps","loadAppInsights","MSFTApplicationInsightsLogger","addTelemetryInitializer","exceptionLog","trackException","OperationalApplicationInsightsLogger","operationalInsightsEventFilter","errors","_globalErrors","_severityLevelMapping","apply","buildPropertiesList","traceLog","trackTrace","eventLog","pageViewLog","uri","dependencyLog","duration","responseCode","resultCode","trackDependencyData","envelope","sdkVersion","_debug","commerceSDKVersion","sskVersion","commerceSSKVersion","retailProxyVersion","commerceCoreEnvironmentId","commerceCoreEnvId","pageViewDataString","pageviewPerformanceDataString","remoteDependencyDataString","censoredString","telemetryItem","performanceNavigationTimming","performance","getEntriesByType","performancePaintTiming","performanceNavigationTimmingData","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","domComplete","domContentLoadedEvent","paintTiming","startTime","expVariantInfo","processID","oneDSWeb","_daSdkVer","singletonLoggerInstance","printFunction","tagsString","messageValue","RegExp","stack","isInfo","_printMessages","EXCEPTION_LOAD_DATA_EXCEPTION","EXCEPTION_UNREGISTEREDMODULEID","EXCEPTION_ERROR_CLIENT_BOUNDARY","EXCEPTION_MISSINGMODULECONFIG","EXCEPTION_NOMODULEBINDER","EXCEPTION_MODULERENDERFAIL","EXCEPTION_CLIENT_CACHE_HYDRATE","EXCEPTION_LOADDATA_ACTION_0","EXCEPTION_LOADDATA_ACTION_1","EXCEPTION_LOADDATA_ACTION_2","EXCEPTION_DATAACTION_EXECUTION","EXCEPTION_BADPAGECONTEXT","EXCEPTION_INITIALDATAFAIL","EXCEPTION_PRODUCT_LIST_ACTION","EXCEPTION_PRODUCT_LIST_CLIENTSIDE_HYDRATION","EXCEPTION_LINK_ACTION","INVALID_PRODUCT_LIST_TYPE","functionName","invalidVariable","MESSAGE_CREATE_INPUT_LOADDATA","MESSAGE_CLIENT_RENDER_ERROR"],"sourceRoot":""}