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A,IAAC,YAAEZ,EAAW,QAAEhI,GAAS4I,EAAA,OAAKnJ,EAAAA,cAACoJ,EAAAA,KAAIX,OAAAC,OAAA,GAAKH,GAAchI,IAiB3F,EAPyC8I,IAAA,IAAC,YAAEpB,EAAW,OAAEK,EAAM,SAAEQ,GAAUO,EAAA,OACvErJ,EAAAA,cAACsJ,EAAAA,OAAMb,OAAAC,OAAA,GAAKT,GACPK,GAAUtI,EAAAA,cAACkJ,EAAST,OAAAC,OAAA,GAAKJ,IAC1BtI,EAAAA,cAACoJ,EAAAA,KAAIX,OAAAC,OAAA,GAAKI,aC9BlBS,EAAOC,QAAUxJ,cCAjBuJ,EAAOC,QAAUC","sources":["webpack://henrys-ecommerce/./lib/map/module-registration.js?7fc9","webpack://henrys-ecommerce/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://henrys-ecommerce/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://henrys-ecommerce/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://henrys-ecommerce/./src/distributor-selector-state-manager/map-distributor-selector-state-manager.ts?573e","webpack://henrys-ecommerce/./src/distributor-selector-state-manager/distributor-selector-state-manager-data-action.ts?b68c","webpack://henrys-ecommerce/./src/modules/map/map.tsx?6111","webpack://henrys-ecommerce/./src/modules/map/map.view.tsx?5db9","webpack://henrys-ecommerce/external var \"React\"?0d3b","webpack://henrys-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['map'] = {\n c: () => require('@msdyn365-commerce-modules/map/dist/lib/modules/map/map'),\n $type: 'contentModule',\n da: [{name:'distributorSelectorStateManager', path:'@msdyn365-commerce-modules/distributor-utilities/dist/lib/distributor-selector-state-manager/distributor-selector-state-manager-data-action', runOn: 1},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'map',\n p: 'map',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/map/dist/lib/modules/map'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/distributor-utilities/dist/lib/distributor-selector-state-manager/distributor-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/distributor-utilities/dist/lib/distributor-selector-state-manager/distributor-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['@msdyn365-commerce-modules|map|modules|map|map'] = {\n c: () => require('@msdyn365-commerce-modules/map/dist/lib/modules/map/map.view.js'),\n cn: '@msdyn365-commerce-modules-map-map'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n if (window) {\n const currentWindowAPI = window.mapAPIReady;\n window.mapAPIReady = () => {\n if (currentWindowAPI) {\n currentWindowAPI();\n }\n this.isMapApiLoaded = true;\n };\n }\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport { IDistributorInfo, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IDistributorSelectionStateContext,\n IDistributorLocation,\n IDistributorSelectorStateManager\n} from './i-distributor-selection-state-manager';\n\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IDistributorSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapDistributorSelectorStateManager implements IDistributorSelectorStateManager {\n @observable public isMapApiLoaded?: boolean;\n @observable public selectedDistributorId?: number;\n @observable public hideDistributorWarning?: boolean;\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n @observable public isMapModuleLoaded?: boolean;\n @observable public showDistributorDetailsOnMap?: boolean;\n @observable public distributorList?: IDistributorInfo[];\n @observable protected _distributorDetailContext?: IDistributorSelectionStateContext;\n @observable protected _distributorSelectorContext?: IDistributorSelectionStateContext;\n\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @computed public get isDistributorSelectorDialogOpen(): Readonly {\n return this._distributorSelectorContext !== undefined;\n }\n\n @computed public get isDistributorDetailPopupOpen(): Readonly {\n return this._distributorDetailContext !== undefined;\n }\n\n @computed public get distributorSelectorContext(): Readonly {\n return this._distributorSelectorContext;\n }\n\n private readonly hideDistributorWarningLocalStorageKey: string = '_msdyn365__hideDistributorWarning_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n this.showDistributorDetailsOnMap = true;\n\n const hideDistributorWarning = this._readFromToCookie(this.hideDistributorWarningLocalStorageKey);\n try {\n const distributorWarning = hideDistributorWarning ? JSON.parse(hideDistributorWarning) : false;\n\n if (distributorWarning) {\n this.hideDistributorWarning = distributorWarning;\n }\n } catch {\n this.hideDistributorWarning = false;\n }\n }\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setDistributorsList(input: IDistributorInfo[]): Promise {\n this.distributorList = input;\n }\n\n @action\n public async setSelectedDistributorId(distributorId: number | undefined): Promise {\n this.selectedDistributorId = distributorId;\n }\n\n @action\n public async hideWarningMessage(writeToCookie: boolean = false) {\n this.hideDistributorWarning = true;\n if (writeToCookie) {\n this._writeToCookie(this.hideDistributorWarningLocalStorageKey, JSON.stringify(true));\n }\n }\n\n @action\n public async updateDistributorMapVisibility(input: boolean) {\n this.showDistributorDetailsOnMap = input;\n }\n\n @action\n public async openDistributorSelectorDialog(input: IDistributorSelectionStateContext): Promise {\n if (this._distributorSelectorContext) {\n throw new Error('Distributor selector dialog is already opened');\n }\n\n this._distributorSelectorContext = input;\n }\n\n @action\n public async openDistributorDetailPopup(input: IDistributorSelectionStateContext): Promise {\n if (this._distributorDetailContext) {\n throw new Error('Distributor detail popup is already opened');\n }\n\n this._distributorDetailContext = input;\n }\n\n @action\n public async closeDistributorSelectorDialog(): Promise {\n this._distributorSelectorContext = undefined;\n }\n\n @action\n public async closeDistributorDetailPopup(): Promise {\n this._distributorDetailContext = undefined;\n }\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext?.requestContext?.channel?.BingMapsApiKey ||\n !actionContext?.requestContext?.channel?.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n if (window) {\n const currentWindowAPI = window.mapAPIReady;\n window.mapAPIReady = () => {\n if (currentWindowAPI) {\n currentWindowAPI();\n }\n this.isMapApiLoaded = true;\n };\n }\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IDistributorSelectorStateManager } from './i-distributor-selection-state-manager';\nimport { MapDistributorSelectorStateManager } from './map-distributor-selector-state-manager';\n\nexport function createDistributorSelectorStateInput(\n result: IDistributorSelectorStateManager\n): GenericInput {\n return new GenericInput('mapDSSM', result, 'IDistributorSelectorStateManager');\n}\n\nconst createDistributorSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createDistributorSelectorStateInput(new MapDistributorSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createDistributorSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IMapData } from './map.data';\nimport { IMapProps, IPushpinOptionsData } from './map.props.autogenerated';\n\n/**\n * Header Interface.\n */\nexport interface IHeader {\n headerProps: INodeProps;\n heading: React.ReactNode;\n}\n\n/**\n * MapViewProps Interface.\n */\nexport interface IMapViewProps extends IMapProps {\n ModuleProps: IModuleProps;\n Header: IHeader;\n MapProps: INodeProps;\n Map: Microsoft.Maps.Map | undefined;\n}\n\n/**\n *\n * Map component.\n * @extends {React.Component>}\n */\n@observer\nclass Map extends React.Component> {\n @observable public map: Microsoft.Maps.Map | undefined;\n private timeout: number = 500;\n\n private readonly mapRef: React.RefObject = React.createRef();\n\n public constructor(props: IMapProps) {\n super(props);\n }\n\n public componentDidMount(): void {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n }\n } = this.props;\n\n if (channel && !channel.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n return;\n }\n\n if (channel && !channel.BingMapsEnabled) {\n telemetry.error('Map is disabled from HQ.');\n return;\n }\n\n const loadMapAPIInput = {\n key: channel?.BingMapsApiKey,\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n };\n\n if (\n this.props.data.storeSelectorStateManager?.result?.isMapApiLoaded ||\n this.props.data.distributorSelectorStateManager?.result?.isMapApiLoaded\n ) {\n this._initMap();\n if (this.props.data.distributorSelectorStateManager?.result?.isDistributorSelectorDialogOpen) {\n this._updateMapsForDistributor();\n } else {\n this._updateMap();\n }\n }\n\n when(\n () => !!this.props.data.storeSelectorStateManager?.result?.setMapModuleLoaded,\n () => {\n this.props.data.storeSelectorStateManager?.result?.setMapModuleLoaded(true);\n }\n );\n\n when(\n () => !!this.props.data.distributorSelectorStateManager?.result?.setMapModuleLoaded,\n () => {\n this.props.data.distributorSelectorStateManager?.result?.setMapModuleLoaded(true);\n }\n );\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager?.result?.loadMapApi ||\n this.props.data.distributorSelectorStateManager?.result?.loadMapApi,\n () => {\n if (this.props.data.distributorSelectorStateManager?.result?.loadMapApi) {\n this.props.data.distributorSelectorStateManager?.result?.loadMapApi(loadMapAPIInput);\n } else {\n this.props.data.storeSelectorStateManager?.result?.loadMapApi(loadMapAPIInput);\n }\n }\n );\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager?.result?.isMapApiLoaded ||\n this.props.data.distributorSelectorStateManager?.result?.isMapApiLoaded,\n () => {\n this._initMap();\n }\n );\n\n reaction(\n () => {\n return [\n this.props.data.storeSelectorStateManager.result?.context?.orgUnitStoreInformation,\n this.props.data.storeSelectorStateManager.result?.selectedStoreLocationId,\n this.map\n ];\n },\n () => {\n this._updateMap();\n }\n );\n\n reaction(\n () => {\n return [\n this.props.data.distributorSelectorStateManager?.result?.distributorList,\n this.props.data.distributorSelectorStateManager?.result?.selectedDistributorId,\n this.map\n ];\n },\n () => {\n this._updateMapsForDistributor();\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { heading, className },\n data\n } = this.props;\n\n const shouldDisplayMap = data.storeSelectorStateManager?.result?.isDialogOpen\n ? data.storeSelectorStateManager?.result?.listMapViewState.displayMap\n : data.distributorSelectorStateManager?.result?.isDistributorSelectorDialogOpen\n ? data.distributorSelectorStateManager?.result?.listMapViewState.displayMap\n : false;\n\n const viewProps: IMapViewProps = {\n ...this.props,\n ModuleProps: {\n tag: 'div',\n moduleProps: this.props,\n className: classname('ms-map', { show: shouldDisplayMap }, className)\n },\n Header: {\n headerProps: { className: 'ms-map__header' },\n heading: heading?.text && (\n \n )\n },\n MapProps: {\n tag: 'div',\n className: 'ms-map__body',\n ref: this.mapRef\n },\n Map: this.map\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Initialize the map.\n */\n private readonly _initMap = () => {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n data\n } = this.props;\n\n if (data.storeSelectorStateManager?.result?.isMapApiLoaded || data.distributorSelectorStateManager?.result?.isMapApiLoaded) {\n this.map = new Microsoft.Maps.Map(this.mapRef.current as HTMLElement, {\n credentials: channel?.BingMapsApiKey,\n pushpinAccessible: true\n });\n Microsoft.Maps.Events.addHandler(this.map, 'click', async () => {\n if (data.distributorSelectorStateManager?.result?.isDistributorSelectorDialogOpen) {\n // Hide the distributor details that appear below the screen size of 768px.\n data.distributorSelectorStateManager?.result?.updateDistributorMapVisibility(false);\n await data.distributorSelectorStateManager?.result?.setSelectedDistributorId(undefined);\n } else {\n await data.storeSelectorStateManager?.result?.setSelectedStoreLocationId(undefined);\n }\n });\n }\n };\n\n private readonly _updateMapsForDistributor = () => {\n const pushpinOptions = this.props.config.pushpinOptions;\n const distributorSelectorStateManager = this.props.data.distributorSelectorStateManager?.result;\n const distributorInfoList = distributorSelectorStateManager?.distributorList;\n const selectedDistributorId = distributorSelectorStateManager?.selectedDistributorId;\n\n if (this.map && ArrayExtensions.hasElements(distributorInfoList)) {\n let mapLocation: OrgUnitLocation | undefined;\n this.map.entities.clear();\n const pushpins: Microsoft.Maps.IPrimitive[] = [];\n\n const distributorList = distributorInfoList.filter(distributor => distributor.OrgUnit !== undefined);\n\n for (const [index, distributorInfo] of distributorList.entries()) {\n const orgUnit = distributorInfo.OrgUnit;\n\n if (orgUnit?.Latitude && orgUnit.Longitude) {\n const isLocationSelected = selectedDistributorId === orgUnit?.RecordId;\n const options = this._getPushpinOptions(isLocationSelected, index, pushpinOptions);\n const pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(orgUnit?.Latitude, orgUnit.Longitude), options);\n\n Microsoft.Maps.Events.addHandler(pushpin, 'click', () => {\n this.handleDistributorPushpinClick(orgUnit.RecordId);\n });\n isLocationSelected ? pushpins.unshift(pushpin) : pushpins.push(pushpin);\n\n if (isLocationSelected) {\n mapLocation = orgUnit;\n }\n }\n }\n if (mapLocation) {\n const currentLocation = new Microsoft.Maps.Location(mapLocation.Latitude, mapLocation.Longitude);\n this.map.setView({ center: currentLocation });\n } else {\n this.map.setView({\n bounds: Microsoft.Maps.LocationRect?.fromShapes(pushpins)\n });\n }\n\n this.map.setOptions({ pushpinAccessible: true });\n this.map.entities.push(pushpins);\n }\n };\n\n /**\n * Update the map.\n */\n private readonly _updateMap = () => {\n const pushpinOptions = this.props.config.pushpinOptions;\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager?.result;\n const orgUnitStoreInformation = storeSelectorStateManager?.context?.orgUnitStoreInformation;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n\n if (this.map && orgUnitStoreInformation) {\n let mapLocation: OrgUnitLocation | undefined;\n this.map.entities.clear();\n const pushpins: Microsoft.Maps.IPrimitive[] = [];\n\n const storeLocationList = orgUnitStoreInformation.filter(store => store.OrgUnitAvailability !== undefined);\n\n for (const [index, unitStoreInfo] of storeLocationList.entries()) {\n const storeLocation = unitStoreInfo.OrgUnitAvailability?.OrgUnitLocation;\n\n if (storeLocation?.Latitude && storeLocation.Longitude) {\n const isSelectedLocation = selectedStoreLocationId === storeLocation.OrgUnitNumber;\n const options = this._getPushpinOptions(isSelectedLocation, index, pushpinOptions);\n const pushpin = new Microsoft.Maps.Pushpin(\n new Microsoft.Maps.Location(storeLocation.Latitude, storeLocation.Longitude),\n options\n );\n\n Microsoft.Maps.Events.addHandler(pushpin, 'click', () => {\n this.handleClickEvent(storeLocation.OrgUnitNumber);\n });\n isSelectedLocation ? pushpins.unshift(pushpin) : pushpins.push(pushpin);\n\n if (isSelectedLocation) {\n mapLocation = storeLocation;\n }\n }\n }\n\n if (mapLocation) {\n const currentLocation = new Microsoft.Maps.Location(mapLocation.Latitude, mapLocation.Longitude);\n this.map.setView({ center: currentLocation });\n } else {\n // Create a LocationRect from array of pushpins and set the map view.\n this.map.setView({\n bounds: Microsoft.Maps.LocationRect?.fromShapes(pushpins)\n });\n }\n\n this.map.setOptions({ pushpinAccessible: true });\n this.map.entities.push(pushpins);\n }\n };\n\n /**\n * Handle click event.\n * @param orgUnitNumber - Organization unit number.\n */\n private readonly handleClickEvent = (orgUnitNumber: string | undefined): void => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n if (orgUnitNumber) {\n setTimeout(() => {\n storeSelectorStateManager?.setSelectedStoreLocationId(orgUnitNumber);\n }, this.timeout);\n }\n };\n\n /**\n * Handle the click event of the pushpin for distributors on the maps.\n * @param recordId - RecordId.\n */\n private readonly handleDistributorPushpinClick = (recordId: number | undefined): void => {\n const distributorSelectorStateManager = this.props.data.distributorSelectorStateManager?.result;\n // Show the distributor details that appear below the screen size of 768px.\n distributorSelectorStateManager?.updateDistributorMapVisibility(true);\n distributorSelectorStateManager?.setSelectedDistributorId(undefined);\n if (recordId) {\n setTimeout(() => {\n distributorSelectorStateManager?.setSelectedDistributorId(recordId);\n }, this.timeout);\n }\n };\n\n /**\n * Get the pushpin option.\n * @param isSelectedLocation - Is selected location.\n * @param index - Index.\n * @param pushpinOptions - PushpinOptions.\n * @returns - The pushpin options.\n */\n private readonly _getPushpinOptions = (isSelectedLocation: boolean, index: number, pushpinOptions?: IPushpinOptionsData) => {\n const text = pushpinOptions?.showIndex ? (index + 1).toString() : undefined;\n\n const size = pushpinOptions?.size || 1;\n const color = isSelectedLocation ? pushpinOptions?.selectionColor || pushpinOptions?.color : pushpinOptions?.color;\n const icon = this._getSvgIcon(size, color, text);\n\n return {\n // Fallback if icon doesn't render properly\n color: isSelectedLocation ? pushpinOptions?.selectionColor : pushpinOptions?.color,\n icon\n };\n };\n\n private readonly _getSvgIcon = (size: number, color?: string, text?: string) => {\n const baseValue: number = 32;\n return `\n \n ${text ? `${text}` : ''}\n `;\n };\n}\n\nexport default Map;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeader, IMapViewProps } from './map';\n\n/**\n * Render the heading.\n * @param param0 -- Heading props.\n * @param param0.headerProps -- Heading Props.\n * @param param0.heading -- Heading Node.\n * @returns -- Returns the node.\n */\nconst MapHeader: React.FC = ({ headerProps, heading }) => {heading};\n\n/**\n * Renders the map view props.\n * @param param0 -- Map view props.\n * @param param0.ModuleProps -- Module props.\n * @param param0.Header -- Header props.\n * @param param0.MapProps -- Map props.\n * @returns -- Returns the map module.\n */\nconst MapView: React.FC = ({ ModuleProps, Header, MapProps }) => (\n \n {Header && }\n \n \n);\n\nexport default MapView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","undefined","preferredStore","_unused","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","length","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","key","MsDyn365","isBrowser","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","actionContext","requestContext","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","app","config","requestUrl","Promise","resolve","script","document","createElement","setAttribute","data","remove","resourceSets","resources","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","currentWindowAPI","mapAPIReady","isMapApiLoaded","url","lang","market","reject","_document2","_document3","type","async","defer","src","addEventListener","error","createStoreSelectorStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","MapDistributorSelectorStateManager","hideDistributorWarningLocalStorageKey","showDistributorDetailsOnMap","hideDistributorWarning","distributorWarning","_distributorSelectorContext","_distributorDetailContext","distributorList","distributorId","selectedDistributorId","_actionContext$reques","_actionContext$reques2","createDistributorSelectorStateInput","Map","React","props","super","timeout","mapRef","handleHeadingChange","event","heading","text","target","_initMap","_data$storeSelectorSt","_data$distributorSele","context","storeSelectorStateManager","distributorSelectorStateManager","map","Microsoft","Maps","current","credentials","pushpinAccessible","Events","addHandler","_data$distributorSele2","_data$distributorSele3","_data$distributorSele4","_data$storeSelectorSt2","isDistributorSelectorDialogOpen","updateDistributorMapVisibility","setSelectedDistributorId","setSelectedStoreLocationId","_updateMapsForDistributor","_this$props$data$dist","pushpinOptions","distributorInfoList","ArrayExtensions","hasElements","mapLocation","entities","clear","pushpins","filter","distributor","OrgUnit","index","distributorInfo","entries","orgUnit","isLocationSelected","RecordId","options","_getPushpinOptions","pushpin","Pushpin","Location","handleDistributorPushpinClick","unshift","push","currentLocation","setView","center","_Microsoft$Maps$Locat","bounds","LocationRect","fromShapes","setOptions","_updateMap","_this$props$data$stor","_storeSelectorStateMa","orgUnitStoreInformation","storeLocationList","store","OrgUnitAvailability","unitStoreInfo","_unitStoreInfo$OrgUni","storeLocation","OrgUnitLocation","isSelectedLocation","OrgUnitNumber","handleClickEvent","_Microsoft$Maps$Locat2","orgUnitNumber","setTimeout","recordId","_this$props$data$dist2","showIndex","toString","size","color","selectionColor","icon","_getSvgIcon","componentDidMount","_this$props$context","_this$props$data$stor2","_this$props$data$dist3","telemetry","loadMapAPIInput","locale","_this$props$data$dist4","when","_this$props$data$stor3","setMapModuleLoaded","_this$props$data$stor4","_this$props$data$dist5","_this$props$data$dist6","reaction","_this$props$data$stor5","_this$props$data$dist7","loadMapApi","_this$props$data$dist8","_this$props$data$dist9","_this$props$data$stor6","_this$props$data$stor7","_this$props$data$dist10","_this$props$data$stor8","_this$props$data$stor9","_this$props$data$dist11","_this$props$data$dist12","render","_data$storeSelectorSt3","_data$storeSelectorSt4","_data$distributorSele5","_data$distributorSele6","className","shouldDisplayMap","isDialogOpen","viewProps","ModuleProps","tag","moduleProps","classname","show","Header","headerProps","Msdyn365","Object","assign","editProps","onEdit","request","MapProps","ref","renderView","observer","MapHeader","_ref","Node","_ref2","Module","module","exports","ReactDOM"],"sourceRoot":""}