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ADkB/oB,IAAd+oB,GAAyBd,EAAUc,GACnCL,EAAoBH,EAAW9oB,KAAMspB,GAElCb,EAAapD,EAAYrlB,MAlBb,SAAUspB,GAC7B,OAAO,SAAUC,EAAGC,GAClB,YAAkBjpB,IAAd+oB,GAAiCA,EAAUC,EAAGC,IAAM,EAEpDA,GAAMA,GAAW,EAEjBD,GAAMA,EAAU,EACV,IAANA,GAAiB,IAANC,EAAgB,EAAID,EAAI,GAAK,EAAIC,EAAI,EAAI,GAAK,EACtDD,EAAIC,CACb,CACF,CAQyCC,CAAeH,GACxD,IAAIL,GAAeD,+BCpEnB,IAAI9G,EAAS,EAAQ,IACjBwH,EAAQ,EAAQ,KAChBrC,EAAsB,EAAQ,IAC9BK,EAAQ,EAAQ,IAChBiC,EAAa,EAAQ,KAErBtG,EAAYnB,EAAOmB,UACnBgC,EAAcgC,EAAoBhC,YAClCG,EAAyB6B,EAAoB7B,uBAC7CoE,EAAkB,GAAGC,eAGrBC,IAAyBzG,GAAaqE,GAAM,WAC9CkC,EAAgBpC,KAAK,IAAInE,EAAU,GACrC,IAUAmC,EAAuB,kBAAkB,WACvC,OAAOkE,EACLE,EACAE,EAAuBH,EAAWtE,EAAYrlB,OAASqlB,EAAYrlB,MACnE2pB,EAAWxoB,WAEf,GAdaumB,GAAM,WACjB,MAAO,CAAC,EAAG,GAAGmC,kBAAoB,IAAIxG,EAAU,CAAC,EAAG,IAAIwG,gBAC1D,MAAOnC,GAAM,WACXrE,EAAUE,UAAUsG,eAAerC,KAAK,CAAC,EAAG,GAC9C","sources":["webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://Msdyn365.Commerce.Online/./src/modules/bulk-purchase/bulk-purchase.tsx?9fd5","webpack://Msdyn365.Commerce.Online/./src/modules/buybox/components/buybox-find-in-store.tsx?3ef8","webpack://Msdyn365.Commerce.Online/./src/modules/buybox/buybox.tsx?e22d","webpack://Msdyn365.Commerce.Online/./src/modules/buybox/buybox.view.tsx?376b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-buffer-basic-detection.js?f54a","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-buffer-view-core.js?ec3e","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-fill.js?e9e8","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-big-int.js?fe6c","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-offset.js?28dc","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-positive-integer.js?9b91","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.fill.js?0858","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.set.js?4e03","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.sort.js?733e","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.to-locale-string.js?3d1c"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps {\n productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps {\n container: IModuleProps;\n content: React.ReactElement;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n isExpanded: boolean;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent {\n public static readonly className = 'ms-bulk-purchase';\n\n public constructor(props: IBulkPurchaseExtendedProps) {\n super(props);\n\n this.state = {\n isExpanded: false\n };\n }\n\n public render(): React.ReactElement | null {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n if (!hasDimensionsInProps && !hasDimensionsInData) {\n return null;\n }\n\n const viewProps: IBulkPurchaseViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className: classnames(BulkPurchase.className, this.props.config.className)\n },\n content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderCollapseContent(className: string): React.ReactElement {\n return (\n
\n {this._renderCollapseButton(`${className}__collapse-button`)}\n {this._renderCollapse(`${className}__collapse`)}\n
\n );\n }\n\n private _renderCollapseButton(className: string): React.ReactElement {\n return (\n \n {this.props.resources.bulkPurchaseHeaderTitle}\n \n );\n }\n\n private _renderCollapse(className: string): React.ReactElement {\n return (\n \n {this._renderMainContent(`${className}__main-content`)}\n \n );\n }\n\n private _renderMainContent(className: string): React.ReactElement {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return (\n
\n {!isMobileDevice && (\n
\n \n
\n )}\n {this._renderMatrix(`${className}__matrix-container`)}\n
\n );\n }\n\n private _renderMatrix(className: string): React.ReactElement {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n\n return (\n }\n data={{\n dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n orderTemplates: this.props.data.orderTemplates?.result,\n customerInformation: this.props.data.customerInformation?.result\n }}\n resources={this.props.resources}\n />\n );\n }\n\n /**\n * Callback which toggles collapse mode.\n */\n private readonly _toggleCollapse = () => {\n this.setState(state => ({\n isExpanded: !state.isExpanded\n }));\n };\n}\n\nexport default BulkPurchase;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToCartBehavior,\n IAddToCartFailureResult,\n IAddToCartResources,\n ItemSuccessfullyAddedToCartNotification,\n PriceComponent\n} from '@msdyn365-commerce/components';\nimport { getUrlSync, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\nimport { DeliveryOption, FeatureState, OrgUnitLocation, ProductAvailableQuantity, ProductDimension } from '@msdyn365-commerce/retail-proxy';\nimport { NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport {\n ArrayExtensions,\n DeliveryMode,\n IProductInventoryInformation,\n isAggregatedInventory\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { BuyboxErrorBlock } from '../../../common/buybox-components';\nimport { IBuyboxCallbacks, IBuyboxState } from '../../../common/buyboxInterface';\nimport { getConfigureErrors, getGenericError } from '../../../common/utilities/error-utilities';\nimport { IBuyboxData } from '../buybox.data';\nimport { IBuyboxProps, IBuyboxResources } from '../buybox.props.autogenerated';\n\nconst modalCloseButtonReference: React.RefObject = React.createRef();\n\n/**\n * FindinStore failure Interface.\n */\nexport interface IFindInStoreFailureResult {\n missingDimensions?: ProductDimension[];\n}\n\n/**\n * BuyBoxFindinStore View Props Interface.\n */\nexport interface IBuyboxFindInStoreViewProps {\n storeSelector?: React.ReactNode;\n heading?: React.ReactNode;\n description?: React.ReactNode;\n errors?: React.ReactNode;\n button?: React.ReactNode;\n productPickupOptionList?: React.ReactNode;\n\n modal?: React.ReactNode;\n\n ContainerProps: INodeProps;\n\n openFindInStoreDialog(): Promise;\n}\n\n/**\n * On click find store handler.\n * @param props -Buybox data.\n * @param state -Buybox state.\n * @param callbacks -Buybox callbacks.\n * @returns Find in store.\n */\nconst onClickFindInStoreHandler = (props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks) => async () => {\n await findInStoreOnClick(props, state, callbacks);\n};\n\n/**\n * Inventory settings based on the inventory policy for aggregated availability.\n */\ninterface IInventorySettingsProps {\n isSectionDisabled: boolean;\n description: string;\n buttonText: string;\n}\n\n/**\n * The function defines the settings values for a given inventory configuration.\n * @param context - The context.\n * @param isStockCheck - Flag to enable inventory validation.\n * @param productAvailability - The product inventory information.\n * @param buyboxResources - The buybox string resources.\n * @param isLoading - Is loading.\n * @returns Boolean.\n */\nfunction getFindInStoreInventorySettings(\n context: ICoreContext,\n isStockCheck: boolean,\n productAvailability: IProductInventoryInformation[] | undefined,\n buyboxResources: IBuyboxResources,\n isLoading?: boolean\n): IInventorySettingsProps {\n // If shouldValidateAggregation is true then is required to check for the product inventory, based on this the messaging will change\n // and the find in store button will be ensbled or disabled\n\n let isSectionDisabled: boolean;\n let buttonText;\n let description: string;\n\n let pickupInventory: IProductInventoryInformation | undefined;\n\n if (!isStockCheck || isLoading) {\n return {\n isSectionDisabled: false,\n buttonText: buyboxResources.findInStoreLinkText,\n description: buyboxResources.findInStoreDescriptionText\n };\n }\n\n if (productAvailability) {\n pickupInventory = productAvailability.find(pickup => pickup.deliveryType === DeliveryMode.pickup);\n }\n\n // If aggregated is enabled, then we need to validate the inventor check for find in store.\n // If an individual is selected, then we will always show a find in store button.\n if (isAggregatedInventory(context.actionContext)) {\n if (productAvailability && pickupInventory?.IsProductAvailable) {\n isSectionDisabled = false;\n buttonText = buyboxResources.findInStoreLinkText;\n description = buyboxResources.findInStoreDescriptionText;\n } else {\n isSectionDisabled = true;\n buttonText = buyboxResources.findInStoreNotAvailableTextButton;\n description = buyboxResources.findInStoreNotAvailableDescription;\n }\n } else {\n isSectionDisabled = false;\n buttonText = buyboxResources.findInStoreLinkText;\n description = buyboxResources.findInStoreDescriptionText;\n }\n\n return {\n isSectionDisabled,\n description,\n buttonText\n };\n}\n\n/**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns Boolean flag.\n */\nconst matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: string[] | undefined\n): boolean => {\n const deliveryOption: string[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n return deliveryOption;\n });\n\n return ArrayExtensions.hasElements(deliveryOption);\n};\n\nexport function getBuyboxFindInStore(\n props: IBuyboxProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): IBuyboxFindInStoreViewProps | undefined {\n const {\n data,\n slots: { storeSelector },\n resources: {\n priceFree,\n originalPriceText,\n currentPriceText,\n findInStoreHeaderText,\n buyBoxGoToCartText,\n buyBoxContinueShoppingText,\n closeNotificationLabel,\n buyBoxSingleItemText,\n buyBoxMultiLineItemFormatText,\n buyBoxHeaderMessageText,\n descriptionTextToShowAllPickupOptions\n },\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n }\n } = props;\n\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const product = data?.product?.result;\n const price = data?.productPrice?.result;\n const cart = data?.cart?.result;\n const deliveryOptions = data?.deliveryOptions?.result;\n const productAvailability = data.productAvailableQuantity?.result;\n const retailMulitplePickupMFeatureState = data?.featureState?.result?.find(\n (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n const channelDeliveryOptionConfig = data?.channelDeliveryOptionConfig?.result;\n\n const missingDimensions = product?.Dimensions?.filter(dimension => !dimension.DimensionValue?.Value);\n\n const {\n errorState: { configureErrors, quantityError, otherError, errorHost },\n modalOpen,\n quantity\n } = state;\n\n const { isSectionDisabled, buttonText, description } = getFindInStoreInventorySettings(\n props.context,\n props.context.app.config.enableStockCheck,\n productAvailability,\n props.resources,\n props.data.productAvailableQuantity.status === 'LOADING' || ArrayExtensions.hasElements(missingDimensions)\n );\n\n if (!product || !ArrayExtensions.hasElements(storeSelector)) {\n return undefined;\n }\n\n if (!deliveryOptions || !deliveryOptions.DeliveryOptions) {\n return undefined;\n }\n\n // If no delivery options present on the product, or none of the delivery options\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n if (retailMulitplePickupMFeatureState && channelDeliveryOptionConfig) {\n if (!matchDeliveryOptions(deliveryOptions.DeliveryOptions, channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\n return undefined;\n }\n } else if (\n !PickupDeliveryModeCode ||\n !deliveryOptions.DeliveryOptions.find((option: DeliveryOption) => option.Code === PickupDeliveryModeCode)\n ) {\n return undefined;\n }\n\n const dialogStrings = {\n goToCartText: buyBoxGoToCartText,\n continueShoppingText: buyBoxContinueShoppingText,\n closeNotificationLabel,\n headerItemOneText: buyBoxSingleItemText,\n headerItemFormatText: buyBoxMultiLineItemFormatText,\n headerMessageText: buyBoxHeaderMessageText,\n freePriceText: priceFree,\n originalPriceText,\n currentPriceText\n };\n\n const priceComponent = price ? (\n \n ) : (\n ''\n );\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const popupProps: IPopupProps = {\n context: props.context,\n className: 'ms-buybox',\n id: props.id,\n typeName: props.typeName,\n data: { product: props.data.product?.result, price: props.data.productPrice?.result },\n dialogStrings,\n imageSettings: defaultImageSettings,\n gridSettings: props.context.request.gridSettings,\n productQuantity: quantity,\n priceComponent,\n navigationUrl: getUrlSync('cart', props.context.actionContext),\n modalOpen,\n setModalOpen: callbacks.changeModalOpen\n };\n const renderModalPopup = ;\n\n return {\n ContainerProps: {\n className: 'ms-buybox__find-in-store'\n },\n\n storeSelector: storeSelector[0],\n\n openFindInStoreDialog: onClickFindInStoreHandler(props, state, callbacks),\n\n heading: ,\n\n description:

{description}

,\n productPickupOptionList:\n retailMulitplePickupMFeatureState && !isSectionDisabled ? (\n <>\n

{descriptionTextToShowAllPickupOptions}

\n
    \n {deliveryOptions.DeliveryOptions.map((item: DeliveryOption) => {\n return (\n
  • \n {item.Description}\n
  • \n );\n })}\n
\n \n ) : null,\n errors: (\n \n ),\n\n button: (\n \n {buttonText}\n \n ),\n\n modal: renderModalPopup\n };\n}\n\n/**\n * Handler for find in store button.\n * @param props - BuyBox data.\n * @param state - BuyBox state.\n * @param callbacks - BuyBox callbacks.\n * @returns - Promise.\n */\nasync function findInStoreOnClick(props: IBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n cart: { result: cart },\n productAvailableQuantity: { result: productAvailableQuantity }\n },\n resources,\n context,\n modules\n } = props;\n\n const { selectedProduct, quantity } = state;\n\n let dataProduct = props.data.product.result;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.find(\n (featureState: FeatureState) => featureState.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n if (selectedProduct) {\n dataProduct = (await selectedProduct) || dataProduct;\n }\n\n if (!dataProduct || !storeSelectorStateManager) {\n return;\n }\n\n const product = dataProduct;\n\n const missingDimensions =\n product.Dimensions &&\n product.Dimensions.filter((dimension: ProductDimension) => !(dimension.DimensionValue && dimension.DimensionValue.Value));\n\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n\n if (missingDimensions && missingDimensions.length > 0) {\n if (callbacks.updateErrorState) {\n callbacks.updateErrorState({\n errorHost: 'FINDINSTORE',\n configureErrors: getConfigureErrors(missingDimensions, resources)\n });\n }\n } else {\n storeSelectorStateManager\n .openDialog({\n product,\n id: storeSelectorId,\n parentElementRef: modalCloseButtonReference,\n deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result : undefined,\n onLocationSelected: async (orgUnitLocation: OrgUnitLocation, deliveryMode: string) => {\n if (!cart) {\n return Promise.resolve();\n }\n\n const behavior = props.context?.app?.config?.addToCartBehavior;\n\n return cart\n .addProductToCart({ product, count: quantity, location: orgUnitLocation, deliveryMode })\n .then((result: ICartActionResult) => {\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\n callbacks.changeModalOpen(false);\n let productAvailability: ProductAvailableQuantity | undefined;\n if (state.productAvailableQuantity) {\n productAvailability = state.productAvailableQuantity.ProductAvailableQuantity;\n } else if (productAvailableQuantity && ArrayExtensions.hasElements(productAvailableQuantity)) {\n const shippingInventory = productAvailableQuantity.find(\n shipping => shipping.deliveryType === DeliveryMode.pickup\n );\n productAvailability = shippingInventory?.ProductAvailableQuantity;\n } else {\n productAvailability = undefined;\n }\n const failureResult: IAddToCartFailureResult = {\n failureReason: 'CARTACTIONFAILED',\n cartActionResult: { status: result.status, substatus: result.substatus }\n };\n callbacks.updateErrorState({\n errorHost: 'ADDTOCART',\n configureErrors: {},\n otherError: getGenericError(\n failureResult,\n cart,\n resources,\n context,\n product,\n productAvailability,\n orgUnitLocation\n )\n });\n } else {\n callbacks.updateErrorState({\n configureErrors: {}\n });\n const navigationUrl = getUrlSync('cart', context.actionContext);\n if (behavior === undefined || behavior === AddToCartBehavior.goToCart) {\n if (result.status === 'SUCCESS' && navigationUrl) {\n window.location.assign(navigationUrl);\n }\n } else if (behavior === AddToCartBehavior.showModal) {\n callbacks.changeModalOpen(true);\n } else if (behavior === AddToCartBehavior.showNotification) {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n lg: { q: 'w=240&h=240&m=6', w: 0, h: 0 },\n xl: { q: 'w=240&h=240&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n const telemetryContent = getTelemetryObject(\n props.context.request.telemetryPageName!,\n props.friendlyName,\n props.telemetry\n );\n const dialogStrings: IAddToCartResources = {\n goToCartText: resources.buyBoxGoToCartText,\n continueShoppingText: resources.buyBoxContinueShoppingText,\n closeNotificationLabel: resources.closeNotificationLabel,\n headerItemOneText: resources.buyBoxSingleItemText,\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\n headerMessageText: resources.buyBoxHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n addedQuantityText: resources.addedQuantityText\n };\n const notification = new ItemSuccessfullyAddedToCartNotification(\n props.context,\n dialogStrings,\n defaultImageSettings,\n props.context.request.gridSettings,\n product,\n props.data.productPrice?.result,\n quantity,\n navigationUrl,\n telemetryContent,\n props.id,\n props.typeName\n );\n NotificationsManager.instance().addNotification(notification);\n }\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.exception(error);\n props.telemetry.debug('Unable to add product to cart');\n }\n });\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to find in store');\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 { getCatalogId, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core-internal';\nimport {\n CommerceProperty,\n ProductDeliveryOptions,\n ProductDimensionValue,\n ProductDimensionValueInventoryAvailability,\n ProductPrice,\n ReleasedProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { BulkPurchase } from '@msdyn365-commerce-modules/bulk-purchase';\nimport {\n ArrayExtensions,\n DeliveryMode,\n FinitePromiseQueue,\n FinitePromiseQueueError,\n getDeliveryOptionsForSelectedVariant,\n GetDeliveryOptionsForSelectedVariantInput,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getInventoryLevelCodeFromDimensionValue,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getSelectedVariant,\n IDimensionsApp,\n IDimensionValueForSelectedVariant,\n InventoryLevelValues,\n IProductInventoryInformation,\n IPromiseQueue,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput,\n setDimensionValuesToQuery\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport {\n getBuyboxAddToCart,\n getBuyBoxInventoryLabel,\n getBuyboxKeyInPrice,\n getBuyboxProductAddToOrderTemplate,\n getBuyboxProductAddToWishlist,\n getBuyboxProductComparisonButton,\n getBuyboxProductDescription,\n getBuyboxProductPrice,\n getBuyboxProductQuantity,\n getBuyboxProductRating,\n getBuyboxProductTitle,\n getBuyboxProductUnitOfMeasure,\n getBuyboxShopSimilarButton,\n getQuantityLimitsMessages,\n RetailDefaultOrderQuantityLimitsFeatureName\n} from '../../common/buybox-components';\nimport { getBuyboxProductConfigure } from '../../common/buybox-product-configure';\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxCommonData,\n IBuyboxExtentedProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IErrorState,\n ShopSimiliarButtonType\n} from '../../common/buyboxInterface';\nimport { IBuyboxData } from './buybox.data';\nimport { IBuyboxProps, IBuyboxResources } from './buybox.props.autogenerated';\nimport { getBuyboxFindInStore, IBuyboxFindInStoreViewProps } from './components/buybox-find-in-store';\nimport { RecentlyViewedState } from '../recently-viewed';\n\nexport interface IBuyboxViewProps extends IBuyboxProps {\n state: IBuyboxState;\n ModuleProps: IModuleProps;\n ProductInfoContainerProps: INodeProps;\n MediaGalleryContainerProps: INodeProps;\n callbacks: IBuyboxCallbacks;\n mediaGallery?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n rating?: React.ReactNode;\n price?: React.ReactNode;\n productComparisonButton?: React.ReactNode;\n bulkPurchaseLink?: React.ReactNode;\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\n addToWishlist?: IBuyboxAddToWishlistViewProps;\n max: number | undefined;\n addToCart: IBuyboxAddToCartViewProps;\n findInStore?: IBuyboxFindInStoreViewProps;\n quantity?: IBuyboxProductQuantityViewProps;\n configure?: IBuyboxProductConfigureViewProps;\n inventoryLabel?: React.ReactNode;\n shopSimilarLook?: IBuyboxShopSimilarLookViewProps;\n shopSimilarDescription?: IBuyboxShopSimilarLookViewProps;\n quantityLimitsMessages: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n keyInPrice?: IBuyboxKeyInPriceViewProps;\n unitOfMeasure?: React.ReactNode;\n}\n\n/**\n * Buybox Module.\n */\nclass Buybox extends React.PureComponent, IBuyboxState> {\n /**\n * A queue of tasks of processing the changes in the dimensions.\n * Limit to two processes:\n * 1 - for the current process, which is under execution at the moment.\n * 2 - next process, which will process the latest version of data.\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\n */\n private readonly dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\n\n private dimensions: { [id: number]: string } = {};\n\n private readonly buyboxCallbacks: IBuyboxCallbacks = {\n updateQuantity: (newQuantity: number): boolean => {\n const errorState = { ...this.state.errorState };\n errorState.quantityError = undefined;\n errorState.otherError = undefined;\n\n this.setState({ quantity: newQuantity, errorState });\n return true;\n },\n updateErrorState: (newErrorState: IErrorState): void => {\n this.setState({ errorState: newErrorState });\n },\n updateSelectedProduct: (\n newSelectedProduct: Promise,\n newInventory: IProductInventoryInformation | undefined,\n newPrice: ProductPrice | undefined,\n newDeliveryOptions: ProductDeliveryOptions | undefined\n ): void => {\n this.setState({\n selectedProduct: newSelectedProduct,\n productAvailableQuantity: newInventory,\n productDeliveryOptions: newDeliveryOptions\n });\n this._updatePrice(newPrice);\n },\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this.dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this.dimensionUpdateQueue\n .enqueue(async () => {\n return this._updateDimensions();\n })\n .catch((error: unknown) => {\n // Ignore discarded processes.\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw error;\n }\n });\n },\n getDropdownName: (dimensionType: number, resources: IBuyboxResources): string => {\n return this._getDropdownName(dimensionType, resources);\n },\n changeModalOpen: (isModalOpen: boolean): void => {\n this.setState({ modalOpen: isModalOpen });\n },\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n this.setState({ isUpdatingDimension });\n },\n\n /**\n * Update isUpdatingDeliveryOptions state.\n *\n * @param isUpdatingDeliveryOptions - The status of updating delivery options.\n */\n changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\n this.setState({ isUpdatingDeliveryOptions });\n },\n\n updateKeyInPrice: (customPrice: number): void => {\n // Remove custom amount error when updating the custom price\n const errorState = { ...this.state.errorState };\n errorState.customAmountError = undefined;\n\n this.setState({ isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState });\n this._updatePrice(this.state.productPrice, customPrice);\n }\n };\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: IBuyboxProps, state: IBuyboxState) {\n super(props);\n this.state = {\n errorState: {\n configureErrors: {}\n },\n quantity: 1,\n min: undefined,\n max: undefined,\n selectedProduct: undefined,\n productPrice: undefined,\n productDeliveryOptions: undefined,\n\n modalOpen: false,\n isUpdatingDimension: false,\n isUpdatingDeliveryOptions: false\n };\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n }\n\n public async componentDidMount(): Promise {\n const {\n data: {\n product: { result: product },\n productPrice\n },\n context\n } = this.props;\n\n productPrice.then(async result => {\n this._updatePrice(result);\n });\n\n if (product) {\n // Check if the product is service or not by product type\n if (product.ItemTypeValue === ReleasedProductType.Service) {\n this.setState({ isServiceItem: true });\n }\n await this._updateQuantitiesInState(product);\n }\n\n if (product && context.app.config.maxRecentlyViewedItemsCount > 0) {\n RecentlyViewedState.instance(this.props.context, context.app.config.maxRecentlyViewedItemsCount, product.RecordId);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n slots: { mediaGallery, productComparisonButton },\n data: {\n product: { result: product }\n },\n config: { className = '' }\n } = this.props;\n\n const { max } = this.state;\n\n if (!product) {\n this.props.context.telemetry.error('Product content is empty, module wont render');\n return null;\n }\n\n const props = this.props as IBuyboxExtentedProps;\n const defaultMinimumKeyInPrice = 10;\n const defaultMaximumKeyInPrice = 100;\n\n const context = this.props.context as ICoreContext;\n const inventoryLevel = context.app.config.inventoryLevel;\n const dimensionValuesWithInventory = ArrayExtensions.flatten(\n ArrayExtensions.validValues(this.props.data.productDimensions.result?.map(value => value.dimensionValuesWithInventory))\n );\n const hasAvailableProducts =\n !ArrayExtensions.hasElements(dimensionValuesWithInventory) ||\n dimensionValuesWithInventory.some((value: unknown) => {\n const inventoryLevelCode = getInventoryLevelCodeFromDimensionValue(\n value as ProductDimensionValueInventoryAvailability,\n inventoryLevel\n );\n return inventoryLevelCode !== InventoryLevelValues.outOfStock;\n });\n\n const viewProps: IBuyboxViewProps = {\n ...(this.props as IBuyboxProps),\n state: this.state,\n mediaGallery: mediaGallery && mediaGallery.length > 0 ? mediaGallery[0] : undefined,\n ModuleProps: {\n moduleProps: this.props,\n className: classnames('ms-buybox', className)\n },\n ProductInfoContainerProps: {\n className: 'ms-buybox__content'\n },\n MediaGalleryContainerProps: {\n className: 'ms-buybox__media-gallery'\n },\n telemetryContent: this.telemetryContent,\n callbacks: this.buyboxCallbacks,\n title: getBuyboxProductTitle(props),\n description: getBuyboxProductDescription(props),\n bulkPurchaseLink: this._renderBuyboxBulkPurchaseLink(),\n unitOfMeasure: getBuyboxProductUnitOfMeasure(props),\n configure: getBuyboxProductConfigure(props, this.state, this.buyboxCallbacks),\n findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\n price: getBuyboxProductPrice(props, this.state),\n addToCart: getBuyboxAddToCart(\n props,\n this.state,\n this.buyboxCallbacks,\n defaultMinimumKeyInPrice,\n defaultMaximumKeyInPrice,\n undefined,\n hasAvailableProducts\n ),\n productComparisonButton: ArrayExtensions.hasElements(productComparisonButton)\n ? getBuyboxProductComparisonButton(\n productComparisonButton[0],\n product,\n getCatalogId(this.props.context.request),\n this.state\n )\n : undefined,\n addToOrderTemplate: getBuyboxProductAddToOrderTemplate(props, this.state, this.buyboxCallbacks),\n addToWishlist: getBuyboxProductAddToWishlist(props, this.state, this.buyboxCallbacks),\n rating: !props.context.app.config.hideRating && getBuyboxProductRating(props),\n quantity: product.IsGiftCard ? undefined : getBuyboxProductQuantity(props, this.state, this.buyboxCallbacks),\n inventoryLabel: getBuyBoxInventoryLabel(props),\n shopSimilarLook:\n this.props.config.enableShopSimilarLooks && !product.IsGiftCard\n ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Looks)\n : undefined,\n shopSimilarDescription:\n this.props.config.enableShopSimilarDescription && !product.IsGiftCard\n ? getBuyboxShopSimilarButton(props, ShopSimiliarButtonType.Description)\n : undefined,\n keyInPrice:\n this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected\n ? getBuyboxKeyInPrice(props, this.state, this.buyboxCallbacks)\n : undefined,\n quantityLimitsMessages: getQuantityLimitsMessages(props, this.state),\n max\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles anchor click event and scrolls to the given bulk purchase module.\n * @param bulkPurchaseModule - Bulk purchase module.\n * @returns Handler.\n */\n private readonly _onBulkPurchaseLinkClick = (bulkPurchaseModule: Element) => () => {\n const boundingRect = bulkPurchaseModule.getBoundingClientRect();\n window.scrollTo(boundingRect.left, boundingRect.top);\n };\n\n private _renderBuyboxBulkPurchaseLink(): React.ReactNode {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Temporary switch for the feature which is under development.\n if (!this.props.context.app.config.isBulkPurchaseEnabled) {\n return null;\n }\n\n if (!msdyn365Commerce.isBrowser) {\n return null;\n }\n\n const bulkPurchaseModules = Array.from(document.getElementsByClassName(BulkPurchase.className));\n\n if (!ArrayExtensions.hasElements(bulkPurchaseModules)) {\n return null;\n }\n\n return (\n \n {this.props.resources.bulkPurchaseLinkText}\n \n );\n }\n\n private _updatePrice(newPrice: ProductPrice | undefined, customPrice: number | undefined = this.state.keyInPriceAmount): void {\n if (this.state.isCustomPriceSelected && newPrice) {\n newPrice.CustomerContextualPrice = customPrice;\n }\n this.setState({ productPrice: newPrice });\n }\n\n private _getProductVariant(dimensionsToUpdate: { [id: number]: string }) {\n const {\n data: {\n product: { result: product }\n },\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n\n const productDimensions = this.props.data.productDimensions.result!;\n\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\n // over the information in data\n const mappedDimensions = productDimensions\n .map(dimension => {\n const dimensions = (dimension.dimensionValuesWithInventory ??\n dimension.DimensionValues ??\n []) as IDimensionValueForSelectedVariant[];\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue:\n dimensions.find(\n value => value.DimensionValue?.RecordId.toString() === dimensionsToUpdate[dimension.DimensionTypeValue]\n )?.DimensionValue ?? dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n })\n .filter(dimension => dimension.DimensionValue);\n setDimensionValuesToQuery(this.props.context.actionContext.requestContext.url.requestUrl, mappedDimensions);\n\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n // so that places like add to cart can await it\n const selectedProductPromise = getSelectedVariant(\n new SelectedVariantInput(\n product!.MasterProductId ? product!.MasterProductId : product!.RecordId,\n channelId,\n undefined,\n undefined,\n this.props.context.request\n ),\n actionContext\n );\n this.setState({ selectedProduct: selectedProductPromise });\n\n return { productVariantPromise: selectedProductPromise, mappedDimensions };\n }\n\n private readonly _updateDimensions = async (): Promise => {\n const product = this.props.data.product.result;\n\n const productDimensions = this.props.data.productDimensions.result;\n\n const hasProductDimensions = ArrayExtensions.hasElements(productDimensions);\n\n if (!product || !hasProductDimensions) {\n return;\n }\n\n const dimensionsToUpdate: { [id: number]: string } = { ...this.dimensions };\n this.setState({ isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\n\n // Step 1: Clear error state to display relevant errors\n if (this.state.errorState.otherError || this.state.errorState.quantityError) {\n const clearErrorState = { ...this.state.errorState };\n clearErrorState.otherError = undefined;\n if (this.state.errorState.errorHost === 'ADDTOCART') {\n clearErrorState.quantityError = undefined;\n clearErrorState.errorHost = undefined;\n }\n this.setState({ errorState: clearErrorState });\n }\n\n // Step 2: Clear any errors indicating the dimension wasn't selected\n for (const key of Object.keys(dimensionsToUpdate)) {\n if (this.state.errorState.configureErrors[key]) {\n this.setState(previousState => {\n const errorState = previousState.errorState;\n errorState.configureErrors[key] = undefined;\n return { errorState };\n });\n }\n }\n\n const data = this._getProductVariant(dimensionsToUpdate);\n const productVariant: SimpleProduct | null = await data.productVariantPromise;\n\n if (!productVariant) {\n return;\n }\n\n const promises: Promise[] = [\n this._getDimensionsForSelectedVariant(productVariant, data.mappedDimensions),\n this._hydrateInventoryInfo(productVariant),\n this._hydratePrice(productVariant),\n this._hydrateDeliveryOptions(productVariant),\n this._updateQuantitiesInState(productVariant)\n ];\n\n await Promise.all(promises);\n };\n\n private async _getDimensionsForSelectedVariant(\n productVariant: SimpleProduct,\n mappedDimensions: {\n /* eslint-disable @typescript-eslint/naming-convention -- Retail proxy values */\n DimensionTypeValue: number;\n DimensionValue: ProductDimensionValue | undefined;\n ExtensionProperties: CommerceProperty[] | undefined;\n /* eslint-enable @typescript-eslint/naming-convention -- Retail proxy values */\n }[]\n ): Promise {\n await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(\n productVariant.MasterProductId ? productVariant.MasterProductId : productVariant.RecordId,\n this.props.context.request.apiSettings.channelId,\n mappedDimensions,\n this.props.context.request\n ),\n this.props.context.actionContext\n );\n }\n\n private async _hydrateInventoryInfo(productVariant: SimpleProduct): Promise {\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\n // so that places like add to cart can await it\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\n new ProductAvailabilitiesForSelectedVariantInput(productVariant.RecordId, this.props.context.request.apiSettings.channelId),\n this.props.context.actionContext\n );\n\n const newShippingQuantity = newAvailableQuantity?.find(\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (shipping: { deliveryType: any }) => shipping.deliveryType === DeliveryMode.shipping\n );\n const isCustomPriceSelected = productVariant.Dimensions?.find(\n dimension =>\n dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value?.toLowerCase() === 'custom'\n );\n if (isCustomPriceSelected) {\n this.setState({ isCustomPriceSelected: true });\n } else {\n this.setState(previousState => {\n const errorState = previousState.errorState;\n errorState.customAmountError = undefined;\n return { isCustomPriceSelected: false, isPriceKeyedIn: false, errorState };\n });\n }\n\n if (newShippingQuantity) {\n this.setState({ productAvailableQuantity: newShippingQuantity });\n } else {\n this.setState({ productAvailableQuantity: undefined });\n }\n }\n\n private async _hydratePrice(productVariant: SimpleProduct): Promise {\n // Step 6. Use these dimensions hydrate the product price.\n const newPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(productVariant.RecordId, this.props.context.request.apiSettings.channelId),\n this.props.context.actionContext\n );\n\n if (newPrice) {\n this._updatePrice(newPrice);\n }\n }\n\n private async _hydrateDeliveryOptions(productVariant: SimpleProduct): Promise {\n const retailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n\n // Step 7. Use these dimensions hydrate the product delivery options.\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\n new GetDeliveryOptionsForSelectedVariantInput(\n productVariant.RecordId,\n this.props.context.request.apiSettings.channelId,\n undefined,\n undefined,\n retailMultiplePickupFeatureState?.IsEnabled\n ),\n this.props.context.actionContext\n );\n\n if (newDeliveryOptions) {\n this.setState({ productDeliveryOptions: newDeliveryOptions });\n }\n }\n\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\n if (isOrderQuantityLimitsFeatureEnabled && product) {\n this.setState({\n min: product.Behavior?.MinimumQuantity || 1,\n\n // If max by feature in default order settings is not defined then use max from site settings or default max 10.\n max:\n product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0\n ? product.Behavior?.MaximumQuantity\n : this.props.context.app.config.maxQuantityForCartLineItem || 10\n });\n } else {\n this.setState({\n min: 1,\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10\n });\n }\n }\n\n private readonly _getDropdownName = (dimensionType: number, resources: IBuyboxResources): string => {\n const isGiftCard = this.props.data.product.result?.IsGiftCard;\n\n switch (dimensionType) {\n case 1: // ProductDimensionType.Color\n return resources.productDimensionTypeColor;\n case 2: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // ProductDimensionType.Size\n return resources.productDimensionTypeSize;\n case 4: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n const featureStatuses = await this.props.data.featureState;\n const isFeatureEnabledInHq = featureStatuses?.find(\n featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName\n )?.IsEnabled;\n if (!isFeatureEnabledInHq) {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n let customerInfo;\n try {\n customerInfo = await this.props.data.customerInformation;\n } catch (error) {\n this.props.telemetry.information(error);\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\n return false;\n }\n\n return (\n customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n );\n }\n}\n\nexport default Buybox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps\n} from '../../common';\nimport { IBuyboxViewProps } from './buybox';\nimport { IBuyboxFindInStoreViewProps } from './components/buybox-find-in-store';\n\nconst BuyboxView: React.FC = props => {\n const {\n ModuleProps,\n MediaGalleryContainerProps,\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n shopSimilarDescription,\n unitOfMeasure,\n productComparisonButton\n } = props;\n\n return (\n \n {props.mediaGallery}\n \n {title}\n {price}\n {unitOfMeasure}\n {props.bulkPurchaseLink}\n {description}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity)}\n {inventoryLabel}\n {addToCart && _renderAddToCart(addToCart)}\n {findInStore && _renderFindInStore(findInStore)}\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n {productComparisonButton}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n \n \n );\n};\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return <>{socialShare[0]};\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\nexport default BuyboxView;\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar TypeError = global.TypeError;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQUIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar getTypedArrayConstructor = function (it) {\n var proto = getPrototypeOf(it);\n if (!isObject(proto)) return;\n var state = getInternalState(proto);\n return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return hasOwn(TypedArrayConstructorsList, klass)\n || hasOwn(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced, options) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) {\n // old WebKit bug - some methods are non-configurable\n try {\n TypedArrayConstructor.prototype[KEY] = property;\n } catch (error2) { /* empty */ }\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n defineBuiltIn(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n defineBuiltIn(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQUIRED = true;\n defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {\n configurable: true,\n get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n }\n });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n getTypedArrayConstructor: getTypedArrayConstructor,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = lengthOfArrayLike(O);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","var toPrimitive = require('../internals/to-primitive');\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n","var toPositiveInteger = require('../internals/to-positive-integer');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw $RangeError('Wrong offset');\n return offset;\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar $RangeError = RangeError;\n\nmodule.exports = function (it) {\n var result = toIntegerOrInfinity(it);\n if (result < 0) throw $RangeError(\"The argument can't be less than 0\");\n return result;\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\nvar toBigInt = require('../internals/to-big-int');\nvar classof = require('../internals/classof');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n var count = 0;\n // eslint-disable-next-line es/no-typed-arrays -- safe\n new Int8Array(2).fill({ valueOf: function () { return count++; } });\n return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n aTypedArray(this);\n var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n","'use strict';\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toOffset = require('../internals/to-offset');\nvar toIndexedObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar RangeError = global.RangeError;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n var array = new Uint8ClampedArray(2);\n call($set, array, { length: 1, 0: 3 }, 1);\n return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n var array = new Int8Array(2);\n array.set(1);\n array.set('2', 1);\n return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var src = toIndexedObject(arrayLike);\n if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n var length = this.length;\n var len = lengthOfArrayLike(src);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n","'use strict';\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar internalSort = require('../internals/array-sort');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n nativeSort(array, function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort(this, comparefn);\n\n return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar apply = require('../internals/function-apply');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\nvar arraySlice = require('../internals/array-slice');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return apply(\n $toLocaleString,\n TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),\n arraySlice(arguments)\n );\n}, FORCED);\n"],"names":["BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","undefined","preferredStore","_unused","isDialogOpen","_context","context","async","input","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","length","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","id","Error","key","MsDyn365","window","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","getElementById","url","lang","market","reject","_document2","_document3","_document3$body","type","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","error","createStoreSelectorStateInput","result","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","BulkPurchase","React","props","super","_toggleCollapse","setState","state","isExpanded","render","_this$props$data$prod","hasDimensionsInProps","ArrayExtensions","productDimensions","hasDimensionsInData","viewProps","_objectSpread","container","moduleProps","className","classnames","content","_renderCollapseContent","renderView","_renderCollapseButton","_renderCollapse","Button","onClick","title","bulkPurchaseHeaderTitle","Collapse","isOpen","_renderMainContent","isMobileDevice","isMobile","variant","VariantType","request","RichTextComponent","text","bulkPurchaseDescriptionText","_renderMatrix","_this$props$data$orde","_this$props$data$cust","ProductDimensionsMatrix","dimensions","orderTemplates","customerInformation","modalCloseButtonReference","onClickFindInStoreHandler","callbacks","_props$data","_props$data$featureSt","_props$data$featureSt2","_props$data$featureSt3","storeSelectorStateManager","cart","productAvailableQuantity","modules","selectedProduct","quantity","dataProduct","product","multiplePickupStoreSwitchName","retailMulitplePickupMFeatureState","featureState","find","Name","IsEnabled","missingDimensions","Dimensions","filter","dimension","DimensionValue","Value","storeSelectorId","Object","keys","storeSelector","updateErrorState","errorHost","configureErrors","getConfigureErrors","openDialog","parentElementRef","deliveryOptions","onLocationSelected","orgUnitLocation","deliveryMode","_props$context","_props$context$app","_props$context$app$co","behavior","addToCartBehavior","addProductToCart","count","location","then","status","substatus","productAvailability","changeModalOpen","ProductAvailableQuantity","shippingInventory","shipping","deliveryType","DeliveryMode","failureResult","failureReason","cartActionResult","otherError","getGenericError","navigationUrl","getUrlSync","AddToCartBehavior","assign","_props$data$productPr2","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","telemetry","dialogStrings","goToCartText","buyBoxGoToCartText","continueShoppingText","buyBoxContinueShoppingText","closeNotificationLabel","headerItemOneText","buyBoxSingleItemText","headerItemFormatText","buyBoxMultiLineItemFormatText","headerMessageText","buyBoxHeaderMessageText","freePriceText","priceFree","originalPriceText","currentPriceText","addedQuantityText","notification","ItemSuccessfullyAddedToCartNotification","gridSettings","productPrice","typeName","NotificationsManager","addNotification","catch","exception","debug","message","findInStoreOnClick","getBuyboxFindInStore","_data$product","_data$productPrice","_data$cart","_data$deliveryOptions","_data$productAvailabl","_data$featureState","_data$featureState$re","_data$featureState$re2","_data$channelDelivery","_product$Dimensions","_props$data$product","_props$data$productPr","slots","findInStoreHeaderText","descriptionTextToShowAllPickupOptions","PickupDeliveryModeCode","price","channelDeliveryOptionConfig","_dimension$DimensionV","errorState","quantityError","modalOpen","isSectionDisabled","buttonText","description","isStockCheck","buyboxResources","isLoading","pickupInventory","findInStoreLinkText","findInStoreDescriptionText","pickup","isAggregatedInventory","_pickupInventory","IsProductAvailable","findInStoreNotAvailableTextButton","findInStoreNotAvailableDescription","getFindInStoreInventorySettings","enableStockCheck","DeliveryOptions","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","map","delivery","deliveryCode","Code","push","PickupDeliveryModeCodes","option","priceComponent","PriceComponent","popupProps","imageSettings","productQuantity","setModalOpen","renderModalPopup","Popup","ContainerProps","openFindInStoreDialog","heading","Heading","headingTag","productPickupOptionList","item","Description","errors","BuyboxErrorBlock","showError","button","color","ref","disabled","modal","Buybox","dimensionUpdateQueue","FinitePromiseQueue","buyboxCallbacks","updateQuantity","newQuantity","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","productDeliveryOptions","_updatePrice","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","FinitePromiseQueueError","getDropdownName","dimensionType","_getDropdownName","isModalOpen","changeUpdatingDimension","isUpdatingDimension","changeUpdatingDeliveryOptions","isUpdatingDeliveryOptions","updateKeyInPrice","customPrice","customAmountError","isPriceKeyedIn","keyInPriceAmount","_onBulkPurchaseLinkClick","bulkPurchaseModule","boundingRect","getBoundingClientRect","scrollTo","left","top","hasProductDimensions","dimensionsToUpdate","clearErrorState","previousState","_getProductVariant","productVariant","productVariantPromise","promises","_getDimensionsForSelectedVariant","mappedDimensions","_hydrateInventoryInfo","_hydratePrice","_hydrateDeliveryOptions","_updateQuantitiesInState","all","isGiftCard","IsGiftCard","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","min","max","ItemTypeValue","ReleasedProductType","isServiceItem","maxRecentlyViewedItemsCount","RecentlyViewedState","RecordId","_this$props$data$prod2","mediaGallery","productComparisonButton","inventoryLevel","dimensionValuesWithInventory","hasAvailableProducts","some","getInventoryLevelCodeFromDimensionValue","InventoryLevelValues","ModuleProps","ProductInfoContainerProps","MediaGalleryContainerProps","getBuyboxProductTitle","getBuyboxProductDescription","bulkPurchaseLink","_renderBuyboxBulkPurchaseLink","unitOfMeasure","getBuyboxProductUnitOfMeasure","configure","getBuyboxProductConfigure","findInStore","getBuyboxProductPrice","addToCart","getBuyboxAddToCart","getBuyboxProductComparisonButton","getCatalogId","addToOrderTemplate","getBuyboxProductAddToOrderTemplate","addToWishlist","getBuyboxProductAddToWishlist","rating","hideRating","getBuyboxProductRating","getBuyboxProductQuantity","inventoryLabel","getBuyBoxInventoryLabel","shopSimilarLook","enableShopSimilarLooks","getBuyboxShopSimilarButton","ShopSimiliarButtonType","shopSimilarDescription","enableShopSimilarDescription","keyInPrice","enableKeyInPrice","isCustomPriceSelected","getBuyboxKeyInPrice","quantityLimitsMessages","getQuantityLimitsMessages","isBulkPurchaseEnabled","msdyn365Commerce","bulkPurchaseModules","Array","from","getElementsByClassName","bulkPurchaseLinkText","CustomerContextualPrice","apiSettings","channelId","_ref","_dimension$dimensionV","_dimensions$find$Dime","_dimensions$find","DimensionValues","DimensionTypeValue","_value$DimensionValue","toString","ExtensionProperties","setDimensionValuesToQuery","selectedProductPromise","getSelectedVariant","SelectedVariantInput","MasterProductId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","_productVariant$Dimen","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","newShippingQuantity","toLowerCase","getPriceForSelectedVariant","PriceForSelectedVariantInput","_this$props$data$feat","retailMultiplePickupFeatureState","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","_product$Behavior","_product$Behavior2","_product$Behavior3","_product$Behavior4","_isOrderQuantityLimitsFeatureEnabled","Behavior","MinimumQuantity","MaximumQuantity","maxQuantityForCartLineItem","_this$props$context","_this$props$context$r","_this$props$context$r2","_this$props$context$r3","_featureStatuses$find","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","featureStatuses","RetailDefaultOrderQuantityLimitsFeatureName","customerInfo","information","IsB2b","_renderAddToCart","errorBlock","Node","_renderAddToOrderTemplate","_renderAddToWishlist","_renderConfigure","dropdowns","_renderConfigureDropdown","_renderSocialShare","socialShare","dropdown","LabelContainerProps","select","_renderFindInStore","_renderQuantity","_renderKeyInPrice","_renderShopSimilarItem","shopSimilarItem","Module","module","exports","ArrayBuffer","DataView","NAME","Constructor","Prototype","NATIVE_ARRAY_BUFFER","DESCRIPTORS","global","isCallable","isObject","hasOwn","classof","tryToString","createNonEnumerableProperty","defineBuiltIn","defineBuiltInAccessor","isPrototypeOf","getPrototypeOf","setPrototypeOf","wellKnownSymbol","uid","InternalStateModule","enforceInternalState","enforce","getInternalState","get","Int8Array","Int8ArrayPrototype","prototype","Uint8ClampedArray","Uint8ClampedArrayPrototype","TypedArray","TypedArrayPrototype","ObjectPrototype","TypeError","TO_STRING_TAG","TYPED_ARRAY_TAG","TYPED_ARRAY_CONSTRUCTOR","NATIVE_ARRAY_BUFFER_VIEWS","opera","TYPED_ARRAY_TAG_REQUIRED","TypedArrayConstructorsList","Uint8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","BigIntArrayConstructorsList","BigInt64Array","BigUint64Array","getTypedArrayConstructor","it","proto","isTypedArray","klass","Function","configurable","aTypedArray","aTypedArrayConstructor","C","exportTypedArrayMethod","KEY","property","forced","options","ARRAY","TypedArrayConstructor","error2","exportTypedArrayStaticMethod","isView","toObject","toAbsoluteIndex","lengthOfArrayLike","O","argumentsLength","index","end","endPos","toPrimitive","$TypeError","argument","prim","BigInt","toPositiveInteger","$RangeError","RangeError","BYTES","offset","toIntegerOrInfinity","ArrayBufferViewCore","$fill","toBigInt","call","uncurryThis","fails","slice","actualValue","fill","valueOf","toOffset","toIndexedObject","$set","set","WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS","array","TO_OBJECT_BUG","arrayLike","len","aCallable","internalSort","FF","IE_OR_EDGE","V8","WEBKIT","nativeSort","sort","ACCEPT_INCORRECT_ARGUMENTS","STABLE_SORT","mod","expected","a","b","comparefn","x","y","getSortCompare","apply","arraySlice","$toLocaleString","toLocaleString","TO_LOCALE_STRING_BUG"],"sourceRoot":""}