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B,OAAO,SAAUC,EAAGC,GAClB,YAAkB1xB,IAAdwxB,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,IAAIN,GAAeD,iBCpEnB,IAAI5G,EAAS,EAAQ,IACjBuH,EAAQ,EAAQ,KAChBtC,EAAsB,EAAQ,IAC9BK,EAAQ,EAAQ,IAChBkC,EAAa,EAAQ,KAErBrG,EAAYnB,EAAOmB,UACnB+B,EAAc+B,EAAoB/B,YAClCG,EAAyB4B,EAAoB5B,uBAC7CoE,EAAkB,GAAGC,eAGrBC,IAAyBxG,GAAamE,GAAM,WAC9CmC,EAAgBrC,KAAK,IAAIjE,EAAU,GACrC,IAUAkC,EAAuB,kBAAkB,WACvC,OAAOkE,EACLE,EACAE,EAAuBH,EAAWtE,EAAYttB,OAASstB,EAAYttB,MACnE4xB,EAAWzQ,WAEf,GAdauO,GAAM,WACjB,MAAO,CAAC,EAAG,GAAGoC,mBAAqB,IAAIvG,EAAU,CAAC,EAAG,IAAIuG,gBAC3D,MAAOpC,GAAM,WACXnE,EAAUjI,UAAUwO,eAAetC,KAAK,CAAC,EAAG,GAC9C","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/BuyBoxSelectedQuantity/ecomm-buybox-selected-quantity.ts?a3aa","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/components/Quantity.tsx?5de7","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/utilities/error-utilities.ts?5740","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/components/ecomm-buybox-small-components.tsx?34a6","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/components/ecomm-buybox-find-in-store.tsx?c597","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/components/dropdown/dropdown.tsx?1ff1","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/components/ecomm-buybox-product-configure.tsx?e067","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/ecomm-buybox.tsx?3035","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-buybox/ecomm-buybox.view.tsx?c8e7","webpack://Msdyn365.Commerce.Online/./lib/ecomm-buybox/module-registration.js?f326","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/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-buffer-basic-detection.js?5950","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-buffer-view-core.js?33b1","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/array-fill.js?22cc","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-big-int.js?941c","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-offset.js?7b8b","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/internals/to-positive-integer.js?0ad5","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.fill.js?9ddd","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.set.js?f24f","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.sort.js?bca0","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.typed-array.to-locale-string.js?074d"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\n/**\r\n * GetActivecategorymenustate Input Action\r\n */\r\nexport class GetSelectedQuantityValuesInput implements Msdyn365.IActionInput {\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SelectedProductQuamtity`;\r\n public getCacheObjectType = () => 'SelectedProductQuamtity';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// TODO: Create a data model here or import one to capture the response of the action\r\nexport interface IGetSelectedQuantityStateData {\r\n selectedQuantity: number;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetSelectedQuantityValuesInput();\r\n};\r\n\r\n/**\r\n * TODO: Use this function to call your action and process the results as needed\r\n */\r\nasync function getSelectedQuantityValuesStateAction(input: GetSelectedQuantityValuesInput, ctx: Msdyn365.IActionContext):Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // TODO: Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { selectedQuantity: 1 };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getSelectedQuantityValuesStateAction,\r\n // TODO: Give your data action a unique id\r\n id: 'GetSelectedQuantityValuesStateActionState',\r\n input: createInput\r\n // TODO: Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});","import { getPayloadObject, getTelemetryAttributes, IPayLoad, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport { debounce } from 'lodash';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IQuantityProps } from './Quantity.props';\r\nimport { GetSelectedQuantityValuesInput } from '../../../actions/BuyBoxSelectedQuantity/ecomm-buybox-selected-quantity';\r\n\r\ninterface IQuantityState {\r\n currentInput: number;\r\n isUpdateing: boolean;\r\n}\r\n/**\r\n * Quantity Component - This component is used to add or remove quantity\r\n */\r\n@observer\r\nexport default class Quantity extends React.PureComponent {\r\n public static defaultProps: Partial = {\r\n min: 1,\r\n decrementGlyphClass: 'fas fa-minus',\r\n incrementGlyphClass: 'fas fa-plus'\r\n };\r\n\r\n private inputRef: React.RefObject = React.createRef();\r\n private payLoad: IPayLoad;\r\n\r\n constructor(props: IQuantityProps) {\r\n super(props);\r\n this.state = { currentInput: props.currentCount || 1, isUpdateing: false };\r\n this._onIncrement = this._onIncrement.bind(this);\r\n this._onDecrement = this._onDecrement.bind(this);\r\n this._handleChange = this._handleChange.bind(this);\r\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\r\n }\r\n\r\n public componentDidUpdate(prevProps: IQuantityProps): void {\r\n if (!this.props.disabled && this.state.currentInput !== this.props.currentCount && prevProps.currentCount !== this.props.currentCount) {\r\n this.setState({ currentInput: this.props.currentCount || 1});\r\n }\r\n\r\n if (this.props.disabled && !this.state.isUpdateing) {\r\n this.setState({ isUpdateing: true });\r\n }\r\n\r\n if (!this.props.disabled && this.state.isUpdateing) {\r\n this.setState({ currentInput: this.props.currentCount || 1, isUpdateing: false });\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n min,\r\n max,\r\n } = this.props;\r\n\r\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\r\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\r\n const decrementDisabled = this.state.currentInput <= (min || 1) || this.props.isGiftCard;\r\n const incrementDisabled = this.state.currentInput >= max || this.props.isGiftCard;\r\n const currentValue = this.state.currentInput;\r\n this.payLoad.contentAction.etext = TelemetryConstant.DecrementQuantity;\r\n const decrementAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.IncrementQuantity;\r\n const incrementAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n let extraClassDecrement = '';\r\n if (decrementDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassDecrement ='disabled';\r\n\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClassDecrement = 'transition';\r\n }\r\n let extraClassIncrement = '';\r\n if (incrementDisabled) {\r\n // The quantity has reached its boundaries (max or min)\r\n extraClassIncrement ='disabled';\r\n } else if (this.props.disabled) {\r\n // this.props.disabled shows if the state is not succeded yet\r\n extraClassIncrement = 'transition';\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n private _onIncrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity < this.props.max) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity + 1 ;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = this.props.max;\r\n }\r\n\r\n if (invokeCallback && this.props.onChange) {\r\n if (this.props.onChange(updatedQuantity)) {\r\n this.setState({ currentInput: updatedQuantity });\r\n this.props.context?.update(new GetSelectedQuantityValuesInput(), { selectedQuantity: updatedQuantity });\r\n }\r\n }\r\n }\r\n\r\n private _onDecrement(): void {\r\n let invokeCallback = false;\r\n const currQuantity = this.state.currentInput;\r\n let updatedQuantity: number;\r\n\r\n if (currQuantity > 1) {\r\n invokeCallback = true;\r\n updatedQuantity = currQuantity - 1;\r\n } else {\r\n invokeCallback = false;\r\n updatedQuantity = 1;\r\n }\r\n\r\n if (invokeCallback && this.props.onChange) {\r\n if (this.props.onChange(updatedQuantity)) {\r\n this.setState({ currentInput: updatedQuantity });\r\n this.props.context?.update(new GetSelectedQuantityValuesInput(), { selectedQuantity: updatedQuantity });\r\n }\r\n }\r\n }\r\n\r\n private _handleChange(e: React.ChangeEvent): void {\r\n const currentValue = parseInt((e.target.value), 10);\r\n this.props.context?.update(new GetSelectedQuantityValuesInput(), { selectedQuantity: currentValue });\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n const inputElement = this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\r\n\r\n if (currentValue > this.props.max) {\r\n this.setState(\r\n { currentInput: this.props.max },\r\n () => {\r\n debounce(\r\n () => {\r\n // due of usage debouncer, we may ignore onChange return value\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n },\r\n 200)();\r\n }\r\n );\r\n } else {\r\n this.setState(\r\n { currentInput: currentValue },\r\n () => {\r\n debounce(\r\n () => {\r\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue)) {\r\n // due of usage debouncer, we may ignore onChange return value\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n\r\n if (inputElement) {\r\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\r\n inputElement.setAttribute('value', currentValue.toString());\r\n }\r\n }\r\n },\r\n 200)();\r\n }\r\n );\r\n }\r\n }\r\n\r\n private _validateMin = (): void => {\r\n const minValue = this.props.min === undefined ? 1 : this.props.min;\r\n if (isNaN(this.state.currentInput) || (this.state.currentInput < minValue)) {\r\n this.setState({ currentInput: minValue }, () => { this.props.onChange && this.props.onChange(this.state.currentInput); });\r\n } else {\r\n this.props.onChange && this.props.onChange(this.state.currentInput);\r\n }\r\n }\r\n}","/* tslint:disable: no-duplicate-imports */\r\nimport { IAddToCartFailureResult } from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { OrgUnitLocation, ProductAvailableQuantity , ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { IEcommBuyboxResources } from '../ecomm-buybox.props.autogenerated';\r\n\r\nexport function getQuantityError(stockLeft: number | undefined, resources: IEcommBuyboxResources): string | undefined {\r\n if (!stockLeft || stockLeft <= 0) {\r\n return resources.errorMessageOutOfStock;\r\n } else if (stockLeft === 1) {\r\n return resources.errorMessageOutOfRangeOneLeft;\r\n } else {\r\n return resources.errorMessageOutOfRangeFormat.replace('{numLeft}', stockLeft.toString());\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:cyclomatic-complexity\r\nexport function getGenericError(\r\n result: IAddToCartFailureResult,\r\n cart: ICartState | undefined,\r\n resources: IEcommBuyboxResources,\r\n context: ICoreContext>,\r\n product: SimpleProduct | undefined,\r\n productAvailability: ProductAvailableQuantity | undefined,\r\n location: OrgUnitLocation | undefined)\r\n : string | undefined {\r\n if (result.failureReason === 'EMPTYINPUT') {\r\n return resources.addedToCartFailureMessage;\r\n } else if (result.failureReason === 'CARTACTIONFAILED') {\r\n if (result.cartActionResult && result.cartActionResult.substatus === 'MAXQUANTITY') {\r\n // get the quantity of the product in cart\r\n let elementFoundAt:number = -1;\r\n const productIdToFind = product?.RecordId;\r\n\r\n for (let i = 0; i < cart!.cart.CartLines!.length; i++) {\r\n if (cart!.cart.CartLines![`${i}`].ProductId === productIdToFind &&\r\n (cart!.cart.CartLines![`${i}`].DeliveryMode || '') === (location && context.actionContext.requestContext.channel?.PickupDeliveryModeCode || '') &&\r\n (cart!.cart.CartLines![`${i}`].FulfillmentStoreId || '') === (location?.OrgUnitNumber || '')) {\r\n elementFoundAt = i;\r\n\r\n break;\r\n }\r\n }\r\n\r\n let curQuantity: number = 0;\r\n\r\n if (elementFoundAt !== -1) {\r\n const cartLineToUpdate = {...cart!.cart.CartLines![`${elementFoundAt}`]};\r\n curQuantity = cartLineToUpdate.Quantity || 0;\r\n }\r\n\r\n // get the quantity limit for the product\r\n const maxQuantityForCartLineItem = context.app.config.maxQuantityForCartLineItem;\r\n const availableQty = productAvailability?.AvailableQuantity;\r\n\r\n let quantityLimit: number;\r\n\r\n if (maxQuantityForCartLineItem === undefined && availableQty === undefined) {\r\n quantityLimit = 10;\r\n } else if (availableQty === undefined) {\r\n quantityLimit = maxQuantityForCartLineItem;\r\n } else if (maxQuantityForCartLineItem === undefined) {\r\n quantityLimit = availableQty;\r\n } else {\r\n quantityLimit = Math.min(maxQuantityForCartLineItem, availableQty);\r\n }\r\n\r\n return resources.maxQuantityLimitText.replace('{curQuantity}', curQuantity.toString()).replace('{maxQuantity}', quantityLimit.toString());\r\n } else if (result.cartActionResult && result.cartActionResult.substatus === 'QUANTITYLIMITS') {\r\n return result.cartActionResult?.errorDetails?.LocalizedMessage;\r\n }\r\n\r\n return resources.addedToCartFailureMessage;\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nexport function getConfigureErrors(result: ProductDimension[] | undefined, resources: IEcommBuyboxResources, isGiftCard?: Boolean): { [configureId: string]: string | undefined } {\r\n if (!result) {\r\n return {};\r\n }\r\n\r\n const dimensions: { [configureId: string]: string | undefined } = {};\r\n\r\n result.forEach(dimension => {\r\n dimensions[dimension.DimensionTypeValue] = getDimensionErrorString(dimension.DimensionTypeValue, resources, isGiftCard);\r\n });\r\n\r\n return dimensions;\r\n}\r\n\r\nexport function getDimensionErrorString(dimensionTypeValue: number, resources: IEcommBuyboxResources, isGiftCard?: Boolean): string {\r\n switch (dimensionTypeValue) {\r\n case 1: // ProductDimensionType.Color\r\n return resources.productDimensionTypeColorErrorMessage;\r\n case 2: // ProductDimensionType.Configuration\r\n return resources.productDimensionTypeConfigurationErrorMessage;\r\n case 3: // ProductDimensionType.Size\r\n return resources.productDimensionTypeSizeErrorMessage;\r\n case 4: // ProductDimensionType.Style\r\n return isGiftCard ? resources.productDimensionTypeAmountErrorMessage : resources.productDimensionTypeStyleErrorMessage;\r\n default:\r\n return '';\r\n }\r\n}","/* tslint:disable: no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\n// import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Alert, Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, Heading, INodeProps, ITelemetryContent, Node, /*Quantity,*/ TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport Quantity from './Quantity';\r\nimport {\r\n AddToOrderTemplateComponent,\r\n AddToWishlistComponent,\r\n IAddToOrderTemplateDialogResources,\r\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\r\n IItemAddedToOrderTemplateDialogResources,\r\n IOrderTemplateActionErrorResult,\r\n IOrderTemplateNameDialogResources,\r\n IWishlistActionErrorResult,\r\n PriceComponent,\r\n RatingComponent\r\n} from '@msdyn365-commerce/components';\r\nimport { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { IBuyboxState } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxCallbacks } from '../ecomm-buybox';\r\nimport { getConfigureErrors } from '../utilities/error-utilities';\r\nimport { IEcommBuyboxData } from '../ecomm-buybox.data';\r\nimport { IEcommBuyboxProps, IEcommBuyboxResources } from '../ecomm-buybox.props.autogenerated';\r\n\r\nexport function getBuyBoxInventoryLabel(props: IEcommBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n data: { productAvailableQuantity: { result: productAvailableQuantity } },\r\n } = props;\r\n if (!productAvailableQuantity || !productAvailableQuantity.length) {\r\n return undefined;\r\n }\r\n if (productAvailableQuantity &&\r\n productAvailableQuantity.length &&\r\n productAvailableQuantity[0].StockLevelLabel) {\r\n const inventoryClassName = productAvailableQuantity[0].StockLevelCode ?\r\n `ms-buybox__inventory-label ms-buybox__inventory-code-${productAvailableQuantity[0].StockLevelCode.toLowerCase()}` :\r\n 'ms-buybox__inventory-label';\r\n return (
{productAvailableQuantity[0].StockLevelLabel}
);\r\n }\r\n\r\n return undefined;\r\n\r\n}\r\nexport function getBuyboxProductTitle(props: IEcommBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n data: { product: { result: product } },\r\n config: { titleHeadingTag = 'h1' }\r\n } = props;\r\n\r\n return product && (\r\n \r\n );\r\n}\r\n\r\nexport function getBuyboxProductDescription(props: IEcommBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n data: { product: { result: product } }\r\n } = props;\r\n\r\n return product && (\r\n

{product.Description}

\r\n );\r\n}\r\n\r\nexport interface IBuyboxAddToCartViewProps {\r\n ContainerProps: INodeProps;\r\n errorBlock?: React.ReactNode;\r\n button?: React.ReactNode;\r\n button2?: React.ReactNode;\r\n}\r\n\r\nlet telemetryContent: ITelemetryContent;\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport function getBuyboxAddToCart(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks,\r\n defaultMinimumKeyInPrice: number, defaultMaximumKeyInPrice: number): IBuyboxAddToCartViewProps {\r\n const {\r\n typeName,\r\n data: { productAvailableQuantity: {} },\r\n resources,\r\n config: {}\r\n } = props;\r\n\r\n const {\r\n // quantity,\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n customAmountError,\r\n otherError,\r\n errorHost\r\n },\r\n } = state;\r\n\r\n const isLoading = props.data.productAvailableQuantity.status === 'LOADING';\r\n if (isLoading) {\r\n callbacks.changeUpdatingDimension(false);\r\n }\r\n\r\n const isLoadingDeliveryOptions = typeName !== 'quickview' && props.data.deliveryOptions?.status === 'LOADING';\r\n if (isLoadingDeliveryOptions && callbacks.changeUpdatingDeliveryOptions) {\r\n callbacks.changeUpdatingDeliveryOptions(false);\r\n }\r\n\r\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!,\r\n props.friendlyName,\r\n props.telemetry);\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ecomm-buybox-action-wrapper'\r\n },\r\n button: (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport function getBuyboxProductPrice(props: IEcommBuyboxProps, state: IBuyboxState): React.ReactElement | undefined {\r\n const { id, typeName, context, resources } = props;\r\n\r\n const priceComponent = state.productPrice && state.productPrice.BasePrice != 0 && (\r\n
\r\n \r\n

{props.config.pricePerUnitTitle ? props.config.pricePerUnitTitle : 'Price Per Unit'}

\r\n
\r\n ) || undefined;\r\n\r\n return state.productPrice && priceComponent && (\r\n priceComponent\r\n );\r\n}\r\n\r\nexport function getBuyboxProductRating(props: IEcommBuyboxProps): React.ReactElement | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: { ratingsSummary: { result: ratingsSummary } },\r\n resources\r\n } = props;\r\n\r\n const ratingComponent = ratingsSummary && ratingsSummary.averageRating && (\r\n \r\n ) || undefined;\r\n\r\n return ratingsSummary && ratingComponent && (\r\n ratingComponent\r\n );\r\n}\r\n\r\nexport interface IBuyboxAddToOrderTemplateViewProps {\r\n ContainerProps: INodeProps;\r\n errorBlock?: React.ReactNode;\r\n button?: React.ReactNode;\r\n}\r\n\r\nfunction generateAddToOrderTemplateDialogResources(resources: IEcommBuyboxResources): IAddToOrderTemplateDialogResources {\r\n return {\r\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\r\n\r\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\r\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\r\n\r\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\r\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\r\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\r\n\r\n selectTemplatesText: resources.selectTemplatesText,\r\n addToTemplateButtonText: resources.addToTemplateButtonText,\r\n lineItemsText: resources.lineItemsText\r\n };\r\n}\r\n\r\nfunction generateOrderTemplateNameDialogResources(resources: IEcommBuyboxResources): IOrderTemplateNameDialogResources {\r\n return {\r\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\r\n orderTemplateTitleLabel: resources.orderTemplateTitle,\r\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\r\n orderTemplateDescription: resources.createOrderTemplateDescription,\r\n\r\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\r\n\r\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\r\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\r\n };\r\n}\r\n\r\nfunction generateItemAddedToOrderTemplateDialogResources(resources: IEcommBuyboxResources): IItemAddedToOrderTemplateDialogResources {\r\n return {\r\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\r\n continueShoppingButtonText: resources.continueShoppingButtonText,\r\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\r\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\r\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText\r\n };\r\n}\r\n\r\nfunction generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(resources: IEcommBuyboxResources): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\r\n return {\r\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\r\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\r\n updateQuantityButtonText: resources.updateQuantityButtonText,\r\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\r\n };\r\n}\r\n\r\nexport function getBuyboxProductAddToOrderTemplate(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToOrderTemplateViewProps | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: {\r\n product: { result: product },\r\n orderTemplates: { result: orderTemplates },\r\n customerInformation: { result: customerInformation }\r\n },\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n customAmountError,\r\n otherError,\r\n errorHost\r\n },\r\n quantity\r\n } = state;\r\n\r\n // If custom amount is selected, add-to-orderTemplate is disabled\r\n if (state.isCustomPriceSelected) {\r\n return undefined;\r\n }\r\n\r\n const onAddToOrderTemplateFailed = (result: IOrderTemplateActionErrorResult) => {\r\n callbacks.updateErrorState({\r\n errorHost: 'ORDER_TEMPLATE',\r\n configureErrors: result.status === 'MISSING_DIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {},\r\n });\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__add-to-order-template-container'\r\n },\r\n button: product && orderTemplates && (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxAddToWishlistViewProps {\r\n ContainerProps: INodeProps;\r\n errorBlock?: React.ReactNode;\r\n button?: React.ReactNode;\r\n}\r\nexport function getBuyboxProductAddToWishlist(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxAddToWishlistViewProps | undefined {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: {\r\n product: { result: product },\r\n wishlists: { result: wishlists }\r\n },\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n customAmountError,\r\n otherError,\r\n errorHost\r\n },\r\n selectedProduct\r\n } = state;\r\n\r\n // If custom amount is selected, add-to-wishlist is disabled\r\n if (state.isCustomPriceSelected) {\r\n return undefined;\r\n }\r\n\r\n const onAddToWishlistFailed = (result: IWishlistActionErrorResult) => {\r\n callbacks.updateErrorState({\r\n errorHost: 'WISHLIST',\r\n configureErrors: result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {},\r\n });\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__add-to-wishlist-container'\r\n },\r\n button: product && (\r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxProductQuantityViewProps {\r\n ContainerProps: INodeProps;\r\n LabelContainerProps: INodeProps;\r\n\r\n heading: React.ReactNode;\r\n errors?: React.ReactNode;\r\n\r\n input: React.ReactNode;\r\n}\r\nexport function getBuyboxProductQuantity(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductQuantityViewProps {\r\n const {\r\n resources,\r\n context\r\n } = props;\r\n\r\n const\r\n {\r\n quantity,\r\n max,\r\n errorState: {\r\n quantityError,\r\n }\r\n } = state;\r\n\r\n const onChange = (newValue: number): boolean => {\r\n if (callbacks.updateQuantity) {\r\n return callbacks.updateQuantity(newValue);\r\n }\r\n return true;\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__quantity'\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: 'ms-buybox__product-quantity-label',\r\n htmlFor: 'ms-buybox__product-quantity-input'\r\n },\r\n heading: (\r\n
{resources.productQuantityHeading}
\r\n ),\r\n errors: quantityError && (\r\n \r\n \r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxShopSimilarLookViewProps {\r\n ContainerProps: INodeProps;\r\n errors?: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nexport function getBuyboxShopSimilarLook(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxShopSimilarLookViewProps {\r\n const {\r\n resources,\r\n context,\r\n data: {\r\n product: { result: product }\r\n },\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: { }\r\n } = state;\r\n\r\n const navigationUrl = () => {\r\n const searchURL = getUrlSync('search', context && context.actionContext);\r\n const separator = searchURL!.includes('?') ? '&' : '?';\r\n document.location.href = `${searchURL}${separator}productId=${product && product.RecordId}`;\r\n };\r\n const payLoad = getPayloadObject('click', telemetryContent, TelemetryConstant.ShopSimliarLooks);\r\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__shopsimilarlooks'\r\n },\r\n input: (\r\n \r\n {resources.shopSimilarLooksText}\r\n \r\n )\r\n };\r\n}\r\n\r\nexport interface IBuyboxKeyInPriceViewProps {\r\n ContainerProps: INodeProps;\r\n LabelContainerProps: INodeProps;\r\n heading: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nexport function getBuyboxKeyInPrice(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxKeyInPriceViewProps {\r\n const {\r\n config,\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: { }\r\n } = state;\r\n\r\n const onChange = (e: React.ChangeEvent) => {\r\n const value = e.currentTarget.value;\r\n callbacks.updateKeyInPrice(value.length ? Number(value) : parseFloat(value));\r\n };\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__key_in_price'\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: 'ms-buybox__key_in_price-label',\r\n htmlFor: 'ms-buybox__key_in_price'\r\n },\r\n heading: (\r\n
{resources.buyboxKeyInPriceLabelHeading}
\r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n\r\n}\r\n\r\nexport interface IBuyboxErrorBlockProps {\r\n configureErrors: { [configureId: string]: string | undefined };\r\n quantityError?: string;\r\n customAmountError?: string;\r\n otherError?: string;\r\n resources: IEcommBuyboxResources;\r\n showError: boolean;\r\n}\r\nexport const BuyboxErrorBlock: React.FC = ({ showError, configureErrors, quantityError, customAmountError, otherError, resources }) => {\r\n let errorMessages: (string | undefined)[] = [];\r\n\r\n errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\r\n\r\n if (quantityError) {\r\n errorMessages.push(quantityError);\r\n }\r\n\r\n if (customAmountError) {\r\n errorMessages.push(customAmountError);\r\n }\r\n\r\n if (otherError) {\r\n errorMessages.push(otherError);\r\n }\r\n\r\n return (\r\n 0} color='danger' assertive={true} aria-label={resources.buyboxErrorMessageHeader} >\r\n \r\n {errorMessages.map((message, index) => {\r\n return (\r\n
{message}
\r\n );\r\n })}\r\n
\r\n );\r\n};\r\n\r\nexport function getQuantityLimitsMessages(props: IEcommBuyboxProps, state: IBuyboxState): React.ReactElement | undefined {\r\n const {\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n min,\r\n max,\r\n } = state;\r\n\r\n if (!_isOrderQuantityLimitsFeatureEnabled(props)) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n \r\n {_renderMaxLabel(max, resources.maxQuantityText)}\r\n {_renderMinLabel(min, resources.minQuantityText)}\r\n \r\n );\r\n}\r\n\r\nexport const RetailDefaultOrderQuantityLimitsFeatureName: string = 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature';\r\n\r\nconst _renderMaxLabel = (max: number | undefined, maxQuantityText: string): React.ReactElement | undefined => {\r\n if (max && max !== 0 && max !== Number.MAX_VALUE) {\r\n return(\r\n

\r\n {maxQuantityText.replace('{max}', max.toString())}\r\n

\r\n );\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst _renderMinLabel = (min: number | undefined, minQuantityText: string): JSX.Element | undefined => {\r\n if (min && min > 1) {\r\n return(\r\n

\r\n {minQuantityText.replace('{min}', min.toString())}\r\n

\r\n );\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst _isOrderQuantityLimitsFeatureEnabled = (props: IEcommBuyboxProps): boolean | undefined => {\r\n const isFeatureEnabledInHq = props.data.featureState.result\r\n ?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)?.IsEnabled;\r\n if (!isFeatureEnabledInHq) {\r\n return false;\r\n }\r\n const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n\r\n const customerInfo = props.data.customerInformation.result;\r\n return customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\r\n};\r\n","/* tslint:disable: no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nimport { Heading, INodeProps, IPopupProps, Popup } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { DeliveryOption, ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { IAddToCartFailureResult, PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IBuyboxState } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxCallbacks } from '../ecomm-buybox';\r\nimport { getConfigureErrors, getGenericError } from '../utilities/error-utilities';\r\nimport { BuyboxErrorBlock } from './index';\r\nimport { IEcommBuyboxData } from '../ecomm-buybox.data';\r\nimport { IEcommBuyboxProps } from '../ecomm-buybox.props.autogenerated';\r\n\r\nexport interface IFindInStoreFailureResult {\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\nexport interface IBuyboxFindInStoreViewProps {\r\n storeSelector?: React.ReactNode;\r\n heading?: React.ReactNode;\r\n description?: React.ReactNode;\r\n errors?: React.ReactNode;\r\n button?: React.ReactNode;\r\n productPickupOptionList?: React.ReactNode;\r\n\r\n modal?: React.ReactNode;\r\n\r\n ContainerProps: INodeProps;\r\n\r\n openFindInStoreDialog(): Promise;\r\n}\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport function getBuyboxFindInStore(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxFindInStoreViewProps | undefined {\r\n const {\r\n data,\r\n slots: {\r\n storeSelector\r\n },\r\n resources : {\r\n priceFree,\r\n originalPriceText,\r\n currentPriceText,\r\n findInStoreHeaderText,\r\n findInStoreDescriptionText,\r\n findInStoreLinkText,\r\n buyBoxGoToCartText,\r\n buyBoxContinueShoppingText,\r\n buyBoxSingleItemText,\r\n buyBoxMultiLineItemFormatText,\r\n buyBoxHeaderMessageText,\r\n descriptionTextToShowAllPickupOptions\r\n },\r\n context: {\r\n request: {\r\n channel: {\r\n PickupDeliveryModeCode\r\n } = { PickupDeliveryModeCode: undefined }\r\n }\r\n }\r\n } = props;\r\n\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const product = data?.product?.result;\r\n const price = data?.productPrice?.result;\r\n const storeSelectorStateManager = data?.storeSelectorStateManager?.result;\r\n const cart = data?.cart?.result;\r\n const deliveryOptions = data?.deliveryOptions?.result;\r\n const retailMulitplePickupMFeatureState = data?.featureState?.result?.\r\n find(featureState => featureState.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n quantityError,\r\n otherError,\r\n errorHost\r\n },\r\n modalOpen,\r\n quantity\r\n } = state;\r\n\r\n const onClick = () => findInStoreOnClick(props, state, callbacks);\r\n\r\n if (!product || !storeSelectorStateManager || !storeSelector || storeSelector.length === 0) {\r\n return undefined;\r\n }\r\n\r\n // If no delivery options present on the product, or none of the delivery options\r\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\r\n if (!deliveryOptions ||\r\n !deliveryOptions.DeliveryOptions ||\r\n !PickupDeliveryModeCode ||\r\n !deliveryOptions.DeliveryOptions.find(option => option.Code === PickupDeliveryModeCode)) {\r\n return undefined;\r\n }\r\n\r\n const dialogStrings = {\r\n goToCartText: buyBoxGoToCartText,\r\n continueShoppingText: buyBoxContinueShoppingText,\r\n headerItemOneText: buyBoxSingleItemText,\r\n headerItemFormatText: buyBoxMultiLineItemFormatText,\r\n headerMessageText: buyBoxHeaderMessageText,\r\n freePriceText: priceFree,\r\n originalPriceText: originalPriceText,\r\n currentPriceText: currentPriceText\r\n };\r\n\r\n const priceComponent = price ? (\r\n ) : '';\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const popupProps: IPopupProps = {\r\n context: props.context,\r\n className: 'ms-buybox',\r\n id: props.id,\r\n typeName: props.typeName,\r\n data: {product: props.data.product?.result, price: props.data.productPrice?.result},\r\n dialogStrings: dialogStrings,\r\n imageSettings: defaultImageSettings,\r\n gridSettings: props.context.request.gridSettings,\r\n productQuantity: quantity,\r\n priceComponent: priceComponent,\r\n navigationUrl: getUrlSync('cart', props.context.actionContext),\r\n modalOpen: modalOpen,\r\n setModalOpen: callbacks.changeModalOpen\r\n };\r\n const renderModalPopup = ;\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__find-in-store'\r\n },\r\n\r\n storeSelector: storeSelector[0],\r\n\r\n openFindInStoreDialog: onClick,\r\n\r\n heading: (\r\n \r\n ),\r\n\r\n description: (\r\n

\r\n {findInStoreDescriptionText}\r\n

\r\n ),\r\n productPickupOptionList: retailMulitplePickupMFeatureState ? (\r\n \r\n

\r\n {descriptionTextToShowAllPickupOptions}\r\n

\r\n
    \r\n {deliveryOptions.DeliveryOptions.map((item:DeliveryOption) => {\r\n return
  • {item.Description}
  • ;\r\n })\r\n }\r\n
\r\n
\r\n ): null,\r\n errors: (\r\n \r\n ),\r\n\r\n button: (\r\n \r\n {findInStoreLinkText}\r\n \r\n ),\r\n\r\n modal: renderModalPopup\r\n };\r\n}\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nasync function findInStoreOnClick(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): Promise {\r\n const {\r\n data: {\r\n storeSelectorStateManager: {result: storeSelectorStateManager },\r\n cart: {result: cart },\r\n productAvailableQuantity: { result: productAvailableQuantity}\r\n },\r\n resources,\r\n context,\r\n modules,\r\n } = props;\r\n\r\n const {\r\n selectedProduct,\r\n quantity\r\n } = state;\r\n\r\n let dataProduct = props.data.product.result;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const retailMulitplePickupMFeatureState = props.data?.featureState?.result?.\r\n find(featureState => featureState.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n if (selectedProduct) {\r\n dataProduct = (await selectedProduct) || dataProduct;\r\n }\r\n\r\n if (!dataProduct || !storeSelectorStateManager) {\r\n return;\r\n }\r\n\r\n const product = dataProduct;\r\n\r\n const missingDimensions = product.Dimensions && product.Dimensions.filter(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value));\r\n\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n\r\n if (missingDimensions && missingDimensions.length > 0) {\r\n if (callbacks.updateErrorState) {\r\n callbacks.updateErrorState(\r\n {\r\n errorHost: 'FINDINSTORE',\r\n configureErrors: getConfigureErrors(missingDimensions, resources),\r\n }\r\n );\r\n }\r\n } else {\r\n storeSelectorStateManager.openDialog({\r\n product,\r\n id : storeSelectorId,\r\n deliveryOptions: retailMulitplePickupMFeatureState ? props.data.deliveryOptions.result: undefined,\r\n onLocationSelected: (orgUnitLocation, deliveryMode) => {\r\n if (!cart) {\r\n return Promise.resolve();\r\n }\r\n\r\n const behavior = props.context?.app?.config?.addToCartBehavior;\r\n\r\n return cart.addProductToCart({product: product, count: quantity, location: orgUnitLocation, deliveryMode: deliveryMode})\r\n .then(result => {\r\n if (result.status === 'FAILED' && result.substatus === 'MAXQUANTITY') {\r\n callbacks.changeModalOpen(false);\r\n\r\n const productAvailability = state.productAvailableQuantity ?\r\n state.productAvailableQuantity.ProductAvailableQuantity :\r\n productAvailableQuantity && productAvailableQuantity.length?\r\n productAvailableQuantity[0].ProductAvailableQuantity: undefined;\r\n\r\n const failureResult: IAddToCartFailureResult = {failureReason: 'CARTACTIONFAILED', cartActionResult: {status: result.status, substatus: result.substatus}};\r\n callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n configureErrors: {},\r\n otherError: getGenericError(failureResult, cart, resources, context, product, productAvailability, orgUnitLocation)\r\n });\r\n } else {\r\n if ((behavior === undefined || behavior === 'goToCart')) {\r\n const navigationUrl = getUrlSync('cart', context.actionContext);\r\n\r\n if (result.status === 'SUCCESS' && navigationUrl) {\r\n window.location.assign(navigationUrl);\r\n }\r\n } else if (behavior === 'showModal') {\r\n callbacks.updateErrorState({\r\n configureErrors: {}\r\n });\r\n callbacks.changeModalOpen(true);\r\n }\r\n }\r\n }).catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.exception(error);\r\n props.telemetry.debug('Unable to add product to cart');\r\n }\r\n return;\r\n });\r\n }\r\n }).catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.error(error.message);\r\n props.telemetry.debug('Unable to find in store');\r\n }\r\n return;\r\n });\r\n }\r\n\r\n return;\r\n}","/**\r\n * Copyright (c) 2018 Microsoft Corporation\r\n */\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IDropdownProps } from './';\r\nimport { IDropdownItemProps } from './dropdown.props';\r\n\r\ntype IDropdownState = {\r\n /**\r\n * @friendlyName selectedIndex\r\n * @description selected index\r\n */\r\n selectedIndex: string;\r\n};\r\n\r\n/**\r\n *\r\n * DropDown component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class Dropdown extends React.PureComponent {\r\n private selectMenu: React.RefObject = React.createRef();\r\n private payLoad: IPayLoad;\r\n\r\n constructor(props: IDropdownProps, state: IDropdownState) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: ''\r\n };\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, this.props.dropdownName);\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.selectMenu.current) {\r\n this.selectMenu.current.selectedIndex = 0;\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {dropdownId, dropdownList, dropdownName, dropdownToggleName} = this.props;\r\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n return (\r\n \r\n \r\n {dropdownList.map(\r\n (item: IDropdownItemProps) => item && \r\n )}\r\n \r\n );\r\n }\r\n\r\n private _onChanged = async (event: React.ChangeEvent) => {\r\n this.setState({selectedIndex: event.target.value});\r\n\r\n if (this.props.onChange) {\r\n await this.props.onChange({\r\n dropdownId: this.props.dropdownId,\r\n selectId: event.target.value,\r\n selectedValue: event.target.innerText\r\n });\r\n }\r\n };\r\n}","/* tslint:disable: no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nimport { getTelemetryObject, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { IBuyboxState } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxCallbacks } from '../ecomm-buybox';\r\nimport { Dropdown, IDropdownItemProps, IDropdownOnSelectionChangeNotification } from './dropdown';\r\nimport { IEcommBuyboxData } from '../ecomm-buybox.data';\r\nimport { IEcommBuyboxProps, IEcommBuyboxResources } from '../ecomm-buybox.props.autogenerated';\r\n\r\nexport interface IBuyboxProductConfigureProps {\r\n product: SimpleProduct;\r\n productDimensions: ProductDimensionFull[];\r\n resources: IEcommBuyboxResources;\r\n channelId: number;\r\n actionContext: IActionContext;\r\n errors: { [configureId: string]: string | undefined };\r\n\r\n dimensionChanged?(newValue: number): void;\r\n}\r\n\r\nexport interface IBuyboxProductConfigureDropdownViewProps {\r\n ContainerProps: INodeProps;\r\n LabelContainerProps: INodeProps;\r\n\r\n heading: React.ReactNode;\r\n errors?: React.ReactNode;\r\n\r\n select: React.ReactNode;\r\n}\r\n\r\nexport interface IBuyboxProductConfigureViewProps {\r\n ContainerProps: INodeProps;\r\n\r\n dropdowns: IBuyboxProductConfigureDropdownViewProps[];\r\n}\r\n\r\nlet telemetryContent: ITelemetryContent;\r\n\r\nexport function getBuyboxProductConfigure(props: IEcommBuyboxProps, state: IBuyboxState, callbacks: IBuyboxCallbacks): IBuyboxProductConfigureViewProps | undefined {\r\n const {\r\n data: {\r\n product: {result: product },\r\n productDimensions: {result: productDimensions },\r\n },\r\n resources\r\n } = props;\r\n\r\n const\r\n {\r\n errorState: {\r\n configureErrors,\r\n }\r\n } = state;\r\n\r\n const\r\n {\r\n getDropdownName\r\n } = callbacks;\r\n\r\n if (!product || !productDimensions) {\r\n return undefined;\r\n }\r\n\r\n const onChanged = async (notification: IDropdownOnSelectionChangeNotification) =>\r\n _onChanged(notification, callbacks.dimensionSelectedAsync);\r\n\r\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n const dropdowns = productDimensions.map(productDimensionFull => _mapProductDimensionFullToDropdownViewProps(productDimensionFull, resources, configureErrors, getDropdownName, onChanged));\r\n\r\n if (!dropdowns || dropdowns.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__configure'\r\n },\r\n dropdowns: dropdowns\r\n };\r\n}\r\n\r\nconst _onChanged = async (\r\n notification: IDropdownOnSelectionChangeNotification,\r\n dimensionChanged: (newValue: number, selectedDimensionValue: string) => Promise,\r\n ): Promise => {\r\n await dimensionChanged(+notification.dropdownId, notification.selectId);\r\n};\r\n\r\nconst _mapProductDimensionFullToDropdownViewProps =\r\n (\r\n productDimensionFull: ProductDimensionFull,\r\n resources: IEcommBuyboxResources,\r\n configureErrors: {[configureId: string]: string | undefined},\r\n getDropdownName: (dimensionType: number, resources: IEcommBuyboxResources) => string,\r\n dropdownCallback: (notification: IDropdownOnSelectionChangeNotification) => Promise\r\n ): IBuyboxProductConfigureDropdownViewProps => {\r\n const dropdownName = getDropdownName(productDimensionFull.DimensionTypeValue, resources);\r\n const dropdownId = productDimensionFull.DimensionTypeValue.toString();\r\n const dropdownToggleName = resources.selectDimensionFormatString.replace('{0}', dropdownName.toLocaleLowerCase());\r\n const dropdownList: IDropdownItemProps[] = productDimensionFull.DimensionValues\r\n ? productDimensionFull.DimensionValues.map(dimensionValue => {\r\n return {\r\n value: dimensionValue.Value || '',\r\n id: dimensionValue.RecordId.toString()\r\n };\r\n })\r\n : [];\r\n const errorMessage = configureErrors[`${dropdownId}`];\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__dropdown'\r\n },\r\n LabelContainerProps: {\r\n tag: 'label',\r\n className: 'ms-buybox__dropdown-quantity-label',\r\n htmlFor: `ms-buybox__dropown-quantity-input-${dropdownId}`\r\n },\r\n errors: errorMessage && (\r\n \r\n \r\n ),\r\n heading: (\r\n
{dropdownName}
\r\n ),\r\n select: (\r\n \r\n )\r\n };\r\n};","import * as React from 'react';\r\n\r\nimport {\r\n getDeliveryOptionsForSelectedVariant,\r\n GetDeliveryOptionsForSelectedVariantInput,\r\n getDimensionsForSelectedVariant,\r\n GetDimensionsForSelectedVariantInput,\r\n getPriceForSelectedVariant,\r\n getProductAvailabilitiesForSelectedVariant,\r\n getSelectedVariant,\r\n IProductInventoryInformation,\r\n PriceForSelectedVariantInput,\r\n ProductAvailabilitiesForSelectedVariantInput,\r\n SelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n// tslint:disable-next-line:no-duplicate-imports\r\nimport { FinitePromiseQueue, FinitePromiseQueueError, IPromiseQueue } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\r\nimport { ProductDeliveryOptions, ProductDimensionValue, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nimport classnames from 'classnames';\r\n\r\nimport { IEcommBuyboxData } from './ecomm-buybox.data';\r\nimport { IEcommBuyboxProps } from './ecomm-buybox.props.autogenerated';\r\nimport { IEcommBuyboxResources } from './ecomm-buybox.props.autogenerated';\r\nimport {\r\n getBuyboxAddToCart,\r\n getBuyboxFindInStore,\r\n getBuyBoxInventoryLabel,\r\n getBuyboxKeyInPrice,\r\n getBuyboxProductAddToOrderTemplate,\r\n getBuyboxProductAddToWishlist,\r\n getBuyboxProductConfigure,\r\n getBuyboxProductDescription,\r\n getBuyboxProductPrice,\r\n getBuyboxProductQuantity,\r\n getBuyboxProductRating,\r\n getBuyboxProductTitle,\r\n getBuyboxShopSimilarLook,\r\n getQuantityLimitsMessages,\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxFindInStoreViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps,\r\n RetailDefaultOrderQuantityLimitsFeatureName\r\n} from './components';\r\nimport { Overlay } from 'react-portal-overlay';\r\n\r\nexport declare type IBuyboxErrorHost = 'ADDTOCART' | 'FINDINSTORE' | 'WISHLIST' | 'SHOPSIMILARITEM' | 'ORDER_TEMPLATE';\r\n\r\nexport interface IErrorState {\r\n errorHost?: IBuyboxErrorHost;\r\n\r\n configureErrors: { [configureId: string]: string | undefined };\r\n quantityError?: string;\r\n customAmountError?: string;\r\n otherError?: string;\r\n}\r\n\r\nexport interface IBuyboxCallbacks {\r\n updateQuantity(newQuantity: number): boolean;\r\n updateKeyInPrice(keyInPrice: number): void;\r\n updateErrorState(newErrorState: IErrorState): void;\r\n updateSelectedProduct(\r\n selectedProduct: Promise,\r\n newInventory: IProductInventoryInformation | undefined,\r\n newPrice: ProductPrice | undefined,\r\n newDeliveryOptions: ProductDeliveryOptions | undefined): void;\r\n getDropdownName(dimensionType: number, resources: IEcommBuyboxResources): string;\r\n dimensionSelectedAsync(selectedDimensionId: number, selectedDimensionValueId: string): Promise;\r\n changeModalOpen(isModalOpen: boolean): void;\r\n changeUpdatingDimension(isUpdatingDimension: boolean): void;\r\n changeUpdatingDeliveryOptions?(isUpdatingDeliveryOptions: boolean): void;\r\n}\r\n\r\nexport interface IBuyboxState {\r\n quantity: number;\r\n min: number | undefined;\r\n max: number | undefined;\r\n errorState: IErrorState;\r\n selectedProduct?: Promise;\r\n productAvailableQuantity?: IProductInventoryInformation;\r\n productPrice?: ProductPrice;\r\n productDeliveryOptions?: ProductDeliveryOptions;\r\n modalOpen?: boolean;\r\n isUpdatingDimension?: boolean;\r\n isUpdatingDeliveryOptions?: boolean;\r\n isServiceItem?: boolean;\r\n isPriceKeyedIn?: boolean;\r\n keyInPriceAmount?: number;\r\n isCustomPriceSelected?: boolean;\r\n openOverlay:boolean;\r\n}\r\n\r\nexport interface IBuyboxViewProps extends IEcommBuyboxProps {\r\n state: IBuyboxState;\r\n\r\n ModuleProps: IModuleProps;\r\n ProductInfoContainerProps: INodeProps;\r\n MediaGalleryContainerProps: INodeProps;\r\n\r\n callbacks: IBuyboxCallbacks;\r\n\r\n mediaGallery?: React.ReactNode;\r\n\r\n title?: React.ReactNode;\r\n description?: React.ReactNode;\r\n rating?: React.ReactNode;\r\n price?: React.ReactNode;\r\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps;\r\n addToWishlist?: IBuyboxAddToWishlistViewProps;\r\n max: number | undefined;\r\n\r\n addToCart: IBuyboxAddToCartViewProps;\r\n findInStore?: IBuyboxFindInStoreViewProps;\r\n quantity?: IBuyboxProductQuantityViewProps;\r\n configure?: IBuyboxProductConfigureViewProps;\r\n inventoryLabel?: React.ReactNode;\r\n shopSimilarLook?: IBuyboxShopSimilarLookViewProps;\r\n quantityLimitsMessages: React.ReactNode;\r\n telemetryContent?: ITelemetryContent;\r\n keyInPrice?: IBuyboxKeyInPriceViewProps;\r\n}\r\n\r\n/**\r\n * Buybox Module\r\n */\r\nclass Buybox extends React.PureComponent, IBuyboxState> {\r\n /**\r\n * A queue of tasks of processing the changes in the dimensions.\r\n * Limit to two processes:\r\n * 1 - for the current process, which is under execution at the moment.\r\n * 2 - next process, which will process the latest version of data.\r\n * @remark Enqueueing new promises will discard the previous ones (except the one which is under processing).\r\n */\r\n private dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(2);\r\n private dimensions: { [id: number]: string } = {};\r\n\r\n private buyboxCallbacks: IBuyboxCallbacks = {\r\n updateQuantity: (newQuantity: number): boolean => {\r\n const errorState = {...this.state.errorState};\r\n errorState.quantityError = undefined;\r\n errorState.otherError = undefined;\r\n\r\n this.setState({quantity: newQuantity, errorState: errorState});\r\n\r\n return true;\r\n },\r\n updateErrorState: (newErrorState: IErrorState): void => {\r\n this.setState({errorState: newErrorState});\r\n },\r\n updateSelectedProduct: (\r\n newSelectedProduct: Promise,\r\n newInventory: IProductInventoryInformation | undefined,\r\n newPrice: ProductPrice | undefined,\r\n newDeliveryOptions: ProductDeliveryOptions | undefined\r\n ): void => {\r\n this.setState({\r\n selectedProduct: newSelectedProduct,\r\n productAvailableQuantity: newInventory,\r\n productDeliveryOptions: newDeliveryOptions\r\n });\r\n \r\n this._updatePrice(newPrice);\r\n },\r\n dimensionSelectedAsync: (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\r\n this.dimensions[`${selectedDimensionId}`] = selectedDimensionValueId;\r\n \r\n return this.dimensionUpdateQueue.enqueue(() => {\r\n return this._updateDimensions();\r\n }).catch((reason: any) => { // tslint:disable-line:no-any\r\n // Ignore discarded processes.\r\n if (reason !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\r\n throw reason;\r\n }\r\n });\r\n },\r\n getDropdownName: (dimensionType: number, resources: IEcommBuyboxResources): string => {\r\n return this._getDropdownName(dimensionType, resources);\r\n },\r\n changeModalOpen: (isModalOpen: boolean): void => {\r\n this.setState({modalOpen: isModalOpen});\r\n },\r\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\r\n this.setState({isUpdatingDimension: isUpdatingDimension});\r\n },\r\n /**\r\n * Update isUpdatingDeliveryOptions state.\r\n *\r\n * @param isUpdatingDeliveryOptions - The status of updating delivery options.\r\n */\r\n changeUpdatingDeliveryOptions: (isUpdatingDeliveryOptions: boolean): void => {\r\n this.setState({ isUpdatingDeliveryOptions });\r\n },\r\n updateKeyInPrice: (customPrice: number): void => {\r\n // Remove custom amount error when updating the custom price\r\n const errorState = {...this.state.errorState};\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({isPriceKeyedIn: true, keyInPriceAmount: customPrice, errorState: errorState});\r\n this._updatePrice(this.state.productPrice, customPrice);\r\n }\r\n };\r\n\r\n private telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: IEcommBuyboxProps, state: IBuyboxState) {\r\n super(props);\r\n \r\n this.state = {\r\n errorState: {\r\n configureErrors: {}\r\n },\r\n quantity: 1,\r\n min: undefined,\r\n max: undefined,\r\n selectedProduct: undefined,\r\n productPrice: undefined,\r\n productDeliveryOptions: undefined,\r\n\r\n modalOpen: false,\r\n isUpdatingDimension: false,\r\n isUpdatingDeliveryOptions: false,\r\n openOverlay:props.context.request.user.isAuthenticated?false:true\r\n };\r\n \r\n this.telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const {\r\n data: {\r\n product: { result: product },\r\n productPrice\r\n },\r\n } = this.props;\r\n\r\n productPrice.then(async (result) => {\r\n this._updatePrice(result);\r\n });\r\n\r\n if (product) {\r\n // Check if the product is service or not by product type.\r\n const PRODUCTASSERVICE = 2 as ReleasedProductType.Service;\r\n\r\n if (product.ItemTypeValue === PRODUCTASSERVICE) {\r\n this.setState({isServiceItem: true});\r\n }\r\n\r\n await this._updateQuantitiesInState(product);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n slots: {\r\n mediaGallery,\r\n },\r\n data: {\r\n product: { result: product },\r\n selectedQuantity: { result: selectedQuantity }\r\n },\r\n config: { className = '' },\r\n context: { request: { user } }\r\n } = this.props;\r\n\r\n const{ max } = this.state;\r\n\r\n if (!product) {\r\n this.props.context.telemetry.error('Product content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n if (!selectedQuantity) {\r\n this.props.context.telemetry.error('Selected quantity is 0');\r\n return null;\r\n }\r\n\r\n const defaultMinimumKeyInPrice = 10;\r\n const defaultMaximumKeyInPrice = 100;\r\n\r\n if (this.props.data.selectedQuantity&&this.props.data.selectedQuantity.result&&this.state.quantity!==this.props.data.selectedQuantity.result.selectedQuantity) {\r\n if (this.state.quantity > 0) {\r\n this.setState({quantity: this.props.data.selectedQuantity.result.selectedQuantity});\r\n }\r\n }\r\n\r\n const viewProps: IBuyboxViewProps = {\r\n ...(this.props as IEcommBuyboxProps),\r\n state: this.state,\r\n mediaGallery: mediaGallery && mediaGallery.length > 0 ? mediaGallery[0] : undefined,\r\n ModuleProps: {\r\n moduleProps: this.props,\r\n className: classnames('ecomm-buybox ms-buybox row', className)\r\n },\r\n MediaGalleryContainerProps: {\r\n className: 'ms-buybox__media-gallery col-sm-6'\r\n },\r\n ProductInfoContainerProps: {\r\n className: 'ms-buybox__content col-sm-6'\r\n },\r\n telemetryContent: this.telemetryContent,\r\n callbacks: this.buyboxCallbacks,\r\n title: getBuyboxProductTitle(this.props),\r\n description: getBuyboxProductDescription(this.props),\r\n configure: getBuyboxProductConfigure(this.props, this.state, this.buyboxCallbacks),\r\n findInStore: getBuyboxFindInStore(this.props, this.state, this.buyboxCallbacks),\r\n price: getBuyboxProductPrice(this.props, this.state),\r\n addToCart: getBuyboxAddToCart(this.props, this.state, this.buyboxCallbacks, defaultMinimumKeyInPrice, defaultMaximumKeyInPrice),\r\n addToOrderTemplate: getBuyboxProductAddToOrderTemplate(this.props, this.state, this.buyboxCallbacks),\r\n addToWishlist: getBuyboxProductAddToWishlist(this.props, this.state, this.buyboxCallbacks),\r\n rating: !this.props.context.app.config.hideRating && getBuyboxProductRating(this.props),\r\n quantity: product.IsGiftCard ? undefined : getBuyboxProductQuantity(this.props, this.state, this.buyboxCallbacks),\r\n inventoryLabel: getBuyBoxInventoryLabel(this.props),\r\n shopSimilarLook: this.props.config.enableShopSimilarLooks && !product.IsGiftCard ? getBuyboxShopSimilarLook(this.props, this.state, this.buyboxCallbacks) : undefined,\r\n keyInPrice: this.props.config.enableKeyInPrice && this.state.isCustomPriceSelected?getBuyboxKeyInPrice(this.props, this.state, this.buyboxCallbacks):undefined,\r\n quantityLimitsMessages: getQuantityLimitsMessages(this.props, this.state),\r\n max: max\r\n };\r\n\r\n return <>\r\n {this.props.renderView(viewProps) as React.ReactElement}\r\n \r\n
this.setState({openOverlay:false})}>\r\n
{\r\n console.log(event.target)\r\n console.log(event.currentTarget)\r\n if (event.target !== event.currentTarget) {\r\n event.stopPropagation();\r\n } \r\n }}>\r\n
{this.props.context.request.locale=='zh-Hans'?'事先请登入':'Please Sign in First'}
\r\n
{this.props.context.request.locale=='zh-Hans'?'请先登入户口以避免失去在此页注入的数据':'If you have an account with us, please sign in first to avoid losing any information entered on this page'}
\r\n
\r\n {this.props.context.request.locale=='zh-Hans'?'登入户口':'Go to Sign In Page'}\r\n
this.setState({openOverlay:false})} className='dismiss-popup'>{this.props.context.request.locale=='zh-Hans'?'也许稍后':'Maybe Later'}
\r\n
\r\n
\r\n
\r\n
\r\n \r\n }\r\n\r\n private _updatePrice(\r\n newPrice: ProductPrice | undefined,\r\n customPrice: number | undefined = this.state.keyInPriceAmount): void {\r\n\r\n if (this.state.isCustomPriceSelected && newPrice) {\r\n newPrice.CustomerContextualPrice = customPrice;\r\n }\r\n \r\n this.setState({productPrice: newPrice});\r\n }\r\n\r\n // tslint:disable-next-line:max-func-body-length\r\n private _updateDimensions = async (): Promise => {\r\n const {\r\n data: {\r\n product: {result: product },\r\n productDimensions: {result: productDimensions },\r\n },\r\n context: {\r\n actionContext,\r\n request: {\r\n apiSettings: { channelId }\r\n }\r\n }\r\n } = this.props;\r\n\r\n if (!product || !productDimensions) {\r\n return;\r\n }\r\n\r\n const dimensionsToUpdate: { [id: number]: string } = {...this.dimensions};\r\n this.setState({isUpdatingDimension: true, isUpdatingDeliveryOptions: true });\r\n\r\n // Step 1: Update state to indicate which dimensions are selected\r\n if (this.state.errorState.otherError) {\r\n const clearOtherErrorState = {...this.state.errorState};\r\n clearOtherErrorState.otherError = undefined;\r\n this.setState({errorState: clearOtherErrorState});\r\n }\r\n\r\n // Step 2: Clear any errors indicating the dimension wasn't selected\r\n for (const key of Object.keys(dimensionsToUpdate)) {\r\n if (this.state.errorState.configureErrors[`${key}`]) {\r\n const errorState = {...this.state.errorState};\r\n errorState.configureErrors[`${key}`] = undefined;\r\n\r\n this.setState({errorState: errorState});\r\n }\r\n }\r\n\r\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\r\n // over the information in data\r\n const mappedDimensions = productDimensions.map(dimension => {\r\n return {\r\n DimensionTypeValue: dimension.DimensionTypeValue,\r\n DimensionValue: this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) || dimension.DimensionValue,\r\n ExtensionProperties: dimension.ExtensionProperties\r\n };\r\n }).filter(dimension => {\r\n return dimension && dimension.DimensionValue;\r\n });\r\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n const selectedProduct = new Promise(async (resolve, reject) => {\r\n const newProduct = (await getSelectedVariant(\r\n new SelectedVariantInput(\r\n product.MasterProductId ? product.MasterProductId : product.RecordId,\r\n channelId,\r\n mappedDimensions\r\n ),\r\n actionContext\r\n ));\r\n \r\n if (newProduct) {\r\n await getDimensionsForSelectedVariant(\r\n new GetDimensionsForSelectedVariantInput(\r\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\r\n channelId,\r\n mappedDimensions\r\n ),\r\n actionContext\r\n );\r\n }\r\n\r\n resolve(newProduct);\r\n });\r\n this.setState({selectedProduct: selectedProduct});\r\n const variantProduct = await selectedProduct;\r\n\r\n if (variantProduct) {\r\n // Step 5. Use these dimensions hydrate the inventory. Wrap this in a promise\r\n // so that places like add to cart can await it\r\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(\r\n new ProductAvailabilitiesForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId\r\n ),\r\n actionContext\r\n );\r\n\r\n const isCustompriceSelected = variantProduct && variantProduct.Dimensions && variantProduct.Dimensions.find(dimension => dimension.DimensionTypeValue === 4 && dimension.DimensionValue && dimension.DimensionValue.Value === 'Custom');\r\n \r\n if (isCustompriceSelected) {\r\n this.setState({isCustomPriceSelected: true});\r\n } else {\r\n // Remove custom amount error when unselect the custom amount\r\n const errorState = {...this.state.errorState};\r\n errorState.customAmountError = undefined;\r\n\r\n this.setState({isCustomPriceSelected: false, isPriceKeyedIn: false, errorState: errorState});\r\n }\r\n\r\n if (newAvailableQuantity && newAvailableQuantity.length) {\r\n this.setState({productAvailableQuantity: newAvailableQuantity[0]});\r\n } else {\r\n this.setState({productAvailableQuantity: undefined});\r\n }\r\n\r\n // Step 6. Use these dimensions hydrate the product price.\r\n const newPrice = await getPriceForSelectedVariant(\r\n new PriceForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId\r\n ),\r\n actionContext\r\n );\r\n\r\n if (newPrice) {\r\n this._updatePrice(newPrice);\r\n }\r\n\r\n const RetailMulitplePickupMFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature');\r\n // Step 7. Use these dimensions hydrate the product delivery options.\r\n const newDeliveryOptions = await getDeliveryOptionsForSelectedVariant(\r\n new GetDeliveryOptionsForSelectedVariantInput(\r\n variantProduct.RecordId,\r\n channelId,\r\n undefined,\r\n undefined,\r\n RetailMulitplePickupMFeatureState?.IsEnabled\r\n ),\r\n actionContext\r\n );\r\n\r\n if (newDeliveryOptions) {\r\n this.setState({productDeliveryOptions: newDeliveryOptions});\r\n }\r\n\r\n await this._updateQuantitiesInState(variantProduct);\r\n }\r\n }\r\n\r\n private async _updateQuantitiesInState(product: SimpleProduct): Promise {\r\n const isOrderQuantityLimitsFeatureEnabled = await this._isOrderQuantityLimitsFeatureEnabled();\r\n \r\n if (isOrderQuantityLimitsFeatureEnabled && product) {\r\n this.setState({\r\n quantity: product.Behavior?.DefaultQuantity || 1,\r\n min: product.Behavior?.MinimumQuantity || 1,\r\n max: (product.Behavior?.MaximumQuantity && product.Behavior?.MaximumQuantity > 0)\r\n ? product.Behavior?.MaximumQuantity\r\n : Number.MAX_VALUE,\r\n });\r\n } else {\r\n this.setState({\r\n min: 1,\r\n max: this.props.context.app.config.maxQuantityForCartLineItem || 10,\r\n });\r\n }\r\n }\r\n\r\n private _updateDimensionValue = (productDimensionFull: ProductDimensionFull, newValueId: string | undefined): ProductDimensionValue | undefined => {\r\n if (newValueId && productDimensionFull.DimensionValues) {\r\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private _getDropdownName = (dimensionType: number, resources: IEcommBuyboxResources): string => {\r\n const isGiftCard = this.props.data.product.result?.IsGiftCard;\r\n\r\n switch (dimensionType) {\r\n case 1: // ProductDimensionType.Color\r\n return resources.productDimensionTypeColor;\r\n case 2: // ProductDimensionType.Configuration\r\n return resources.productDimensionTypeConfiguration;\r\n case 3: // ProductDimensionType.Size\r\n return resources.productDimensionTypeSize;\r\n case 4: // ProductDimensionType.Style\r\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\r\n default:\r\n return '';\r\n }\r\n };\r\n\r\n private async _isOrderQuantityLimitsFeatureEnabled(): Promise {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n \r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n const featureStatuses = await this.props.data.featureState;\r\n const isFeatureEnabledInHq = featureStatuses?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)?.IsEnabled;\r\n \r\n if (!isFeatureEnabledInHq) {\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n \r\n let customerInfo;\r\n \r\n try {\r\n customerInfo = await this.props.data.customerInformation;\r\n } catch (error) {\r\n const msg = error as unknown as string;\r\n\r\n this.props.telemetry.information(msg);\r\n this.props.telemetry.debug('Unable to receive Customer Information. May be user is not authorized');\r\n \r\n return false;\r\n }\r\n\r\n return customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\r\n }\r\n}\r\n\r\nexport default Buybox;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nimport { isMobile } from 'react-device-detect';\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n // IBuyboxAddToWishlistViewProps,\r\n IBuyboxFindInStoreViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps\r\n // IBuyboxShopSimilarLookViewProps\r\n } from './components';\r\n\r\nconst BuyboxView: React.FC = props => {\r\n const { ModuleProps, MediaGalleryContainerProps, ProductInfoContainerProps, addToCart, addToOrderTemplate, configure, description, findInStore, quantity, price, title, rating, inventoryLabel, keyInPrice } = props;\r\n /*{shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}*/\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {price}\r\n {description}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {!isMobile && (addToCart && _renderAddToCart(addToCart))}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n { _renderSocialShare(props.slots && props.slots.socialShare)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button, button2 } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n {button2}\r\n \r\n );\r\n};\r\n\r\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\r\n \r\n );\r\n};\r\n\r\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\r\n const { ContainerProps, dropdowns } = configure;\r\n\r\n return {dropdowns.map(_renderConfigureDropdown)};\r\n};\r\n\r\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!socialShare || socialShare.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return <>{socialShare[0]};\r\n};\r\n\r\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n {select}\r\n \r\n );\r\n};\r\n\r\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\r\n\r\n return (\r\n \r\n {storeSelector}\r\n {heading}\r\n {productPickupOptionList}\r\n {description}\r\n {errors}\r\n {button}\r\n {modal}\r\n \r\n );\r\n};\r\n\r\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\r\n const {ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\r\n\r\n return(\r\n \r\n {heading}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nexport default BuyboxView;","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['ecomm-buybox'] = {\n c: () => require('partner/modules/ecomm-buybox/ecomm-buybox.tsx'),\n $type: 'containerModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'deliveryOptions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-selected-variant', runOn: 0},{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0},{name:'orderTemplates', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/order-templates/get-order-templates-preview', runOn: 0},{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0},{name:'productAvailableQuantity', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant', runOn: 0},{name:'productDimensions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant', runOn: 0},{name:'productPrice', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-price-for-selected-variant', runOn: 0},{name:'ratingsSummary', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary', runOn: 0},{name:'selectedQuantity', path:'actions/BuyBoxSelectedQuantity/ecomm-buybox-selected-quantity', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 0},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'ecomm-buybox',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/ecomm-buybox'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-price-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-price-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-ratings-summary');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/order-templates/get-order-templates-preview';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/order-templates/get-order-templates-preview');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/BuyBoxSelectedQuantity/ecomm-buybox-selected-quantity';\n let dataAction = require('partner/actions/BuyBoxSelectedQuantity/ecomm-buybox-selected-quantity');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|ecomm-buybox|ecomm-buybox'] = {\n c: () => require('partner/modules/ecomm-buybox/ecomm-buybox.view.tsx'),\n cn: '__local__-__local__-ecomm-buybox'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","module.exports = React;","module.exports = ReactDOM;","'use strict';\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 new 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 new 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 new 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","'use strict';\nvar 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 new $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n","'use strict';\nvar 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 new $RangeError('Wrong offset');\n return offset;\n};\n","'use strict';\nvar 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 new $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 new 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":["GetSelectedQuantityValuesInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","async","input","ctx","selectedQuantity","id","args","Quantity","React","props","super","inputRef","_validateMin","minValue","undefined","this","min","isNaN","state","currentInput","setState","onChange","currentCount","isUpdateing","_onIncrement","bind","_onDecrement","_handleChange","payLoad","getPayloadObject","telemetryContent","componentDidUpdate","prevProps","disabled","render","max","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","decrementDisabled","isGiftCard","incrementDisabled","currentValue","contentAction","etext","TelemetryConstant","DecrementQuantity","decrementAttributes","getTelemetryAttributes","IncrementQuantity","incrementAttributes","extraClassDecrement","extraClassIncrement","className","Object","assign","title","decrementButtonAriaLabel","onClick","tabIndex","color","type","pattern","value","onBlur","inputQuantityAriaLabel","role","ref","incrementButtonAriaLabel","invokeCallback","currQuantity","updatedQuantity","_this$props$context","context","update","_this$props$context2","e","_this$props$context3","parseInt","target","inputElement","current","HTMLInputElement","_debounce","setAttribute","toString","defaultProps","__decorate","observer","getGenericError","result","cart","resources","product","productAvailability","location","failureReason","addedToCartFailureMessage","cartActionResult","substatus","elementFoundAt","productIdToFind","RecordId","i","CartLines","length","_context$actionContex","ProductId","DeliveryMode","actionContext","requestContext","channel","PickupDeliveryModeCode","FulfillmentStoreId","OrgUnitNumber","curQuantity","cartLineToUpdate","_objectSpread","maxQuantityForCartLineItem","app","config","availableQty","AvailableQuantity","quantityLimit","Math","maxQuantityLimitText","replace","_result$cartActionRes","errorDetails","LocalizedMessage","getConfigureErrors","dimensions","forEach","dimension","DimensionTypeValue","dimensionTypeValue","productDimensionTypeColorErrorMessage","productDimensionTypeConfigurationErrorMessage","productDimensionTypeSizeErrorMessage","productDimensionTypeAmountErrorMessage","productDimensionTypeStyleErrorMessage","getDimensionErrorString","getBuyBoxInventoryLabel","data","productAvailableQuantity","StockLevelLabel","inventoryClassName","StockLevelCode","toLowerCase","getBuyboxProductTitle","titleHeadingTag","Heading","headingTag","text","Name","getBuyboxProductDescription","Description","getBuyboxAddToCart","callbacks","defaultMinimumKeyInPrice","defaultMaximumKeyInPrice","_props$data$deliveryO","typeName","errorState","configureErrors","quantityError","customAmountError","otherError","errorHost","status","changeUpdatingDimension","deliveryOptions","changeUpdatingDeliveryOptions","getTelemetryObject","request","telemetryPageName","friendlyName","telemetry","ContainerProps","button","window","href","learnUrl","learnTitle","errorBlock","BuyboxErrorBlock","showError","getBuyboxProductPrice","priceComponent","productPrice","BasePrice","PriceComponent","price","freePriceText","priceFree","originalPriceText","currentPriceText","pricePerUnitTitle","getBuyboxProductRating","ratingsSummary","ratingComponent","averageRating","RatingComponent","avgRating","readOnly","ariaLabel","format","averageRatingAriaLabel","ratingCount","reviewsCount","generateAddToOrderTemplateDialogResources","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","generateOrderTemplateNameDialogResources","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","getBuyboxProductAddToOrderTemplate","orderTemplates","customerInformation","quantity","isCustomPriceSelected","AddToOrderTemplateComponent","addToOrderTemplateButtonText","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","addToOrderTemplateButtonTooltip","duplicateItemsWhenAddingToOrderTemplateDialogResources","onError","updateErrorState","missingDimensions","IsGiftCard","getBuyboxProductAddToWishlist","wishlists","selectedProduct","AddToWishlistComponent","addToWishlistButtonText","removeFromWishlistButtonText","addToWishlistMessage","removedFromWishlistMessage","addItemToWishlistError","removeItemFromWishlistError","nameOfWishlist","getSelectedProduct","getBuyboxProductQuantity","LabelContainerProps","tag","htmlFor","heading","productQuantityHeading","errors","newValue","updateQuantity","getBuyboxShopSimilarLook","ShopSimliarLooks","attribute","Button","shopSimilarLooksText","navigationUrl","searchURL","getUrlSync","separator","includes","document","getBuyboxKeyInPrice","buyboxKeyInPriceLabelHeading","currentTarget","updateKeyInPrice","Number","parseFloat","minimumKeyInPrice","keyInPriceAmount","_ref","errorMessages","values","filter","message","push","Alert","isOpen","assertive","buyboxErrorMessageHeader","map","index","key","getQuantityLimitsMessages","_isOrderQuantityLimitsFeatureEnabled","Node","_renderMaxLabel","maxQuantityText","_renderMinLabel","minQuantityText","RetailDefaultOrderQuantityLimitsFeatureName","MAX_VALUE","_props$data$featureSt","_props$context","featureState","find","IsEnabled","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","IsB2b","getBuyboxFindInStore","_data$product","_data$productPrice","_data$storeSelectorSt","_data$cart","_data$deliveryOptions","_data$featureState","_props$data$product","_props$data$productPr","slots","storeSelector","findInStoreHeaderText","findInStoreDescriptionText","findInStoreLinkText","buyBoxGoToCartText","buyBoxContinueShoppingText","buyBoxSingleItemText","buyBoxMultiLineItemFormatText","buyBoxHeaderMessageText","descriptionTextToShowAllPickupOptions","storeSelectorStateManager","retailMulitplePickupMFeatureState","modalOpen","_props$data","modules","dataProduct","multiplePickupStoreSwitchName","Dimensions","DimensionValue","Value","storeSelectorId","keys","openDialog","onLocationSelected","orgUnitLocation","deliveryMode","Promise","resolve","behavior","addToCartBehavior","addProductToCart","count","then","changeModalOpen","ProductAvailableQuantity","failureResult","catch","error","exception","debug","findInStoreOnClick","DeliveryOptions","option","Code","dialogStrings","goToCartText","continueShoppingText","headerItemOneText","headerItemFormatText","headerMessageText","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","popupProps","imageSettings","gridSettings","productQuantity","setModalOpen","renderModalPopup","Popup","openFindInStoreDialog","description","productPickupOptionList","item","modal","Dropdown","selectMenu","_onChanged","selectedIndex","event","dropdownId","selectId","selectedValue","innerText","dropdownName","componentDidMount","dropdownList","dropdownToggleName","selected","hidden","getBuyboxProductConfigure","productDimensions","getDropdownName","onChanged","notification","dimensionSelectedAsync","dropdowns","productDimensionFull","_mapProductDimensionFullToDropdownViewProps","dimensionChanged","dropdownCallback","selectDimensionFormatString","toLocaleLowerCase","DimensionValues","dimensionValue","errorMessage","select","Buybox","dimensionUpdateQueue","FinitePromiseQueue","buyboxCallbacks","newQuantity","newErrorState","updateSelectedProduct","newSelectedProduct","newInventory","newPrice","newDeliveryOptions","productDeliveryOptions","_updatePrice","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","reason","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","dimensionType","_getDropdownName","isModalOpen","isUpdatingDimension","isUpdatingDeliveryOptions","customPrice","isPriceKeyedIn","apiSettings","channelId","dimensionsToUpdate","clearOtherErrorState","mappedDimensions","_updateDimensionValue","ExtensionProperties","reject","newProduct","getSelectedVariant","SelectedVariantInput","MasterProductId","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","_this$props$data$feat","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","getPriceForSelectedVariant","PriceForSelectedVariantInput","RetailMulitplePickupMFeatureState","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","_updateQuantitiesInState","newValueId","_this$props$data$prod","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeSize","productDimensionTypeAmount","productDimensionTypeStyle","openOverlay","user","isAuthenticated","PRODUCTASSERVICE","ItemTypeValue","isServiceItem","mediaGallery","viewProps","ModuleProps","moduleProps","classnames","MediaGalleryContainerProps","ProductInfoContainerProps","configure","findInStore","addToCart","addToOrderTemplate","addToWishlist","rating","hideRating","inventoryLabel","shopSimilarLook","enableShopSimilarLooks","keyInPrice","enableKeyInPrice","quantityLimitsMessages","renderView","Overlay","open","closeOnClick","console","log","stopPropagation","locale","style","display","flexDirection","justifyContent","alignItems","width","signInUrl","arguments","CustomerContextualPrice","_product$Behavior","_product$Behavior2","_product$Behavior3","_product$Behavior4","_product$Behavior5","Behavior","DefaultQuantity","MinimumQuantity","MaximumQuantity","_featureStatuses$find","featureStatuses","msg","information","_renderAddToCart","button2","_renderAddToOrderTemplate","_renderConfigure","_renderConfigureDropdown","_renderSocialShare","socialShare","dropdown","_renderFindInStore","_renderQuantity","_renderKeyInPrice","Module","isMobile","binding","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","_readFromToCookie","storeInfo","JSON","parse","preferredStore","_unused","isDialogOpen","_context","storeId","selectedStoreLocationId","storeName","writeToCookie","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","MsDyn365","isBrowser","localStorage","removeItem","setItem","cookieValue","getItem","computed","observable","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","requestUrl","script","createElement","remove","resourceSets","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","url","lang","market","_document2","_document3","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","module","exports","ReactDOM","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","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","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","Array","a","b","comparefn","x","y","getSortCompare","apply","arraySlice","$toLocaleString","toLocaleString","TO_LOCALE_STRING_BUG"],"sourceRoot":""}