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EhH,OACItB,EAAAA,cAACoD,EAAAA,KAAIS,OAAA1D,OAAA,GAAKsI,GACLS,EACAH,EACAK,EACA/H,EACA2H,EACAR,EACAW,IAwXmB4U,CAAkBzc,GACjCJ,GAAiByX,EAAoB/X,EAAOe,EAAOD,GACnDU,EACAnB,GAAsBkW,EAAyBvW,EAAOe,EAAOD,GAC7DJ,MAAAA,GAAAA,EAAa8H,wBACVpJ,EAAAA,cAAA,OAAKL,UAAU,8BAA8B2B,EAAY8H,yBACzD,KAjPQzE,CAAAA,IACxB,GAAKA,GAAsC,IAAvBA,EAAY2D,OAIhC,OAAOtI,EAAAA,cAAAA,EAAAA,SAAA,KAAG2E,EAAY,KA6OTD,CAAmB9D,EAAMuD,OAASvD,EAAMuD,MAAMQ,aAC/C3E,EAAAA,cAAA,OAAKL,UAAU,gCAAgCiB,EAAMgB,UAAUoc,UAC/Dhe,EAAAA,cAACoD,EAAAA,KAAI,CAACzD,UAAU,gCACXmC,GAAmB6X,EAAsB7X,GACzCI,GAA0ByX,EAAsBzX,IAErDlC,EAAAA,cAACoD,EAAAA,KAAI,CAACzD,UAAU,mCACZK,EAAAA,cAAA,OAAKL,UAAU,wCAAwCiB,EAAMgB,UAAUqc,iBACtE5c,GAEJuE,EAAAA,gBAAgBC,YAAYjF,EAAMuD,MAAM+Z,sBACrCle,EAAAA,cAACoD,EAAAA,KAAI,CAACzD,UAAU,qCAAqCiB,EAAMuD,MAAM+Z,qBAAqB,IACtF,eC/iBpBC,EAAOC,QAAUpe,cCAjBme,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/evet_b2b_theme/views/hsoCustomPopup.tsx?1fdb","webpack://Msdyn365.Commerce.Online/./src/themes/evet_b2b_theme/views/buybox.view.tsx?1b10","webpack://Msdyn365.Commerce.Online/./lib/buybox/module-registration.js?bcce","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://Msdyn365.Commerce.Online/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/buybox.view.tsx?aec4","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/buybox-add-to-order-template.tsx?ceb4","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/buybox.view.tsx?98cf","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { IComponentProps } from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\nimport { Modal, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport interface IPopupProps extends IComponentProps<{ product: SimpleProduct | undefined; }> {\r\n dialogStrings?: {\r\n message: string;\r\n buttonMessage: string;\r\n };\r\n className: string;\r\n navigationUrl?: string;\r\n modalOpen: boolean | undefined;\r\n setModalOpen(newValue: boolean): void;\r\n}\r\n\r\nexport const Popup = (popupProps: IPopupProps) => {\r\n const {\r\n dialogStrings,\r\n className,\r\n navigationUrl,\r\n modalOpen,\r\n setModalOpen,\r\n } = popupProps;\r\n const closeModal = React.useCallback(() => {\r\n window.location.assign(navigationUrl!);\r\n setModalOpen(false);\r\n }, [setModalOpen]);\r\n if (!dialogStrings) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n {dialogStrings.message}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Popup;\r\n","/*!\r\n * Copyright (c) HSO.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxCallbacks,\r\n IBuyboxData,\r\n IBuyboxFindInStoreViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxProps,\r\n IBuyboxShopSimilarLookViewProps,\r\n IBuyboxState,\r\n IBuyboxViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IncrementalQuantity, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { StringExtensions, ArrayExtensions, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { AttributeValue, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport React, { useState } from 'react';\r\nimport {\r\n IBuyboxProps as IBuyboxExtentionProps,\r\n IBuyboxResources as IBuyboxExtentionResources\r\n} from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData as IBuyboxExtentionData } from './buybox.data';\r\nimport { IPopupProps, Popup } from './hsoCustomPopup';\r\n\r\nconst BuyboxView: React.FC> = props => {\r\n const {\r\n data: {\r\n product: { result: product },\r\n productAvailableQuantity: { result: productAvailableQuantity },\r\n }\r\n } = props;\r\n props.data.popUpClass = 'noshow-popupclass';\r\n props.data.shouldRenderPopUpAlternateProduct = false;\r\n debugger;\r\n if (product && props.config.enableAlternateProductRedirect) {\r\n let useAltItem: number =\r\n (product &&\r\n product.ExtensionProperties &&\r\n product.ExtensionProperties?.some(ep => {\r\n return ep.Key?.startsWith('USEALTITEMID');\r\n }) &&\r\n ArrayExtensions.firstOrDefault(product.ExtensionProperties?.filter(ep => {\r\n return ep.Key?.startsWith('USEALTITEMID');\r\n }))?.Value?.IntegerValue) ||\r\n 0;\r\n\r\n let altItem: number =\r\n (product &&\r\n product.ExtensionProperties &&\r\n product.ExtensionProperties?.some(ep => {\r\n return ep.Key?.startsWith('ALTPRODUCT');\r\n }) &&\r\n ArrayExtensions.firstOrDefault(product.ExtensionProperties?.filter(ep => {\r\n return ep.Key?.startsWith('ALTPRODUCT');\r\n }))?.Value?.LongValue) ||\r\n 0;\r\n\r\n if (useAltItem > 0 && altItem > 0) {\r\n debugger;\r\n let isProductAvailable: boolean = (productAvailableQuantity && productAvailableQuantity.length > 0 && ArrayExtensions.firstOrDefault(productAvailableQuantity)?.IsProductAvailable) || false;\r\n let productUrl: string = product && getProductPageUrlSync(product?.Name || '', altItem, props.context.actionContext, undefined);\r\n if (useAltItem === 1 && !isProductAvailable) {\r\n props.data.navigationToAlternateProduct = productUrl;\r\n props.data.popUpClass = 'show-popupclass';\r\n props.data.shouldRenderPopUpAlternateProduct = true;\r\n return _renderView(props);\r\n } else if (useAltItem === 2) {\r\n props.data.navigationToAlternateProduct = productUrl;\r\n props.data.popUpClass = 'show-popupclass';\r\n props.data.shouldRenderPopUpAlternateProduct = true;\r\n return _renderView(props);\r\n } else {\r\n return _renderView(props);\r\n }\r\n } else {\r\n return _renderView(props);\r\n }\r\n } else {\r\n return _renderView(props);\r\n }\r\n};\r\n\r\nconst _renderView = (props: IBuyboxViewProps & IBuyboxExtentionProps) => {\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n telemetryContent,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n title,\r\n rating,\r\n callbacks,\r\n state,\r\n resources,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n quantityLimitsMessages,\r\n max,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n } = props;\r\n\r\n const {\r\n data: {\r\n product: { result: product },\r\n productSpecificationData: { result: productSpecificationData }\r\n }\r\n } = props;\r\n\r\n const [modalOpen, setModalOpen] = useState(props.data.shouldRenderPopUpAlternateProduct);\r\n let PopupProps: IPopupProps= {\r\n dialogStrings: {\r\n message: props.config.alternateProductText!,\r\n buttonMessage: resources.redirectButtonText\r\n },\r\n className:'closePopUp',\r\n navigationUrl: props.data.navigationToAlternateProduct,\r\n modalOpen,\r\n setModalOpen,\r\n context: props.context,\r\n typeName: props.typeName,\r\n id: props.id,\r\n data: {product}\r\n }\r\n const _redirectToAlternateProduct = (event: React.MouseEvent): void => {\r\n window.location.assign(event.currentTarget.name);\r\n console.log(event.currentTarget.name);\r\n }\r\n\r\n return (\r\n <>\r\n {Popup(PopupProps)}\r\n
\r\n \r\n {resources.redirectButtonText}\r\n \r\n
\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {_renderProductNumber(props, product)}\r\n {_renderProductPrice(props, state)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {description}\r\n {_renderTextBlock(props.slots.textBlocks)}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {quantity && _renderQuantity(quantity, callbacks, props, state, resources, quantityLimitsMessages, max, telemetryContent)}\r\n {inventoryLabel}\r\n {_renderCartAndActions(addToCart, addToOrderTemplate, addToWishlist)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {props.config.enableProductDocument && _renderProductDocument(productSpecificationData, props.config.documentHeading)}\r\n \r\n \r\n {props.config.enableProductDescription && _renderProductDescription(productSpecificationData, props.config.descriptionHeading)}\r\n \r\n );\r\n}\r\n\r\nconst _renderProductNumber = (props: IBuyboxProps, product?: SimpleProduct): JSX.Element | undefined => {\r\n return product && (props.context.app.config.showProductNumber || false) &&

{product.ItemId}

;\r\n};\r\n\r\nconst _renderProductPrice = (props: IBuyboxViewProps & IBuyboxExtentionProps, state: IBuyboxState): JSX.Element | undefined => {\r\n const { id, typeName, context, resources } = props;\r\n const hasProductDimensions = ArrayExtensions.hasElements(props.data.productDimensions?.result);\r\n let evetFreePlaceholder = props.context.app.config.enableFreeTextPlaceholder ? props.context.app.config.freeTextPlaceholder : resources.priceFree;\r\n if (((props.context.app.config.disablePriceForNotAuthorizedUser || false) && !props.context.request.user.isAuthenticated && (state.productPrice?.CustomerContextualPrice === undefined || state.productPrice?.CustomerContextualPrice >= 0) && (props.config.enableCustomPriceMessage || false))) {\r\n return

{props.config.textMessageForNotLoggedInUser || ''}

;\r\n } else if (hasProductDimensions && (state.productPrice?.CustomerContextualPrice === undefined || state.productPrice?.CustomerContextualPrice === 0) && (props.context.app.config.enableCustomPriceMessage || false)) {\r\n let textMessageForMasterVariant: string = '';\r\n switch (props.context.request.locale.trim().toUpperCase()) {\r\n case 'EN-US':\r\n textMessageForMasterVariant = props.context.app.config.textMessageForMasterVariantEN || '';\r\n break;\r\n case 'DE':\r\n textMessageForMasterVariant = props.context.app.config.textMessageForMasterVariantDE || '';\r\n break;\r\n case 'DA':\r\n textMessageForMasterVariant = props.context.app.config.textMessageForMasterVariantDA || '';\r\n break;\r\n default:\r\n textMessageForMasterVariant = '';\r\n break;\r\n }\r\n\r\n return

{textMessageForMasterVariant}

;\r\n } else {\r\n return (\r\n state.productPrice && (\r\n featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n )?.IsEnabled\r\n }\r\n isSalesAgreementPriceFeatureEnabled={\r\n props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSalesAgreementPriceSupportFeature'\r\n )?.IsEnabled\r\n }\r\n priceResources={{\r\n priceRangeSeparator: resources.priceRangeSeparator,\r\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\r\n salesAgreementExpirationDatePrompt: resources.salesAgreementExpirationDatePrompt,\r\n salesAgreementCommittedQuantityPrompt: resources.salesAgreementCommittedQuantityPrompt,\r\n salesAgreementRemainingQuantityPrompt: resources.salesAgreementRemainingQuantityPrompt\r\n }}\r\n freePriceText={evetFreePlaceholder}\r\n originalPriceText={resources.originalPriceText}\r\n currentPriceText={resources.currentPriceText}\r\n />\r\n )\r\n );\r\n }\r\n};\r\n\r\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\r\n if (!textBlocks || textBlocks.length === 0) {\r\n return undefined;\r\n }\r\n\r\n return <>{textBlocks[0]};\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 _renderCartAndActions = (\r\n addToCart?: IBuyboxAddToCartViewProps,\r\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps,\r\n addToWishlist?: IBuyboxAddToWishlistViewProps\r\n): JSX.Element | undefined => {\r\n if (!addToCart && !addToWishlist) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n
\r\n {addToCart && addToCart.errorBlock}\r\n {addToOrderTemplate && addToOrderTemplate.errorBlock}\r\n {addToWishlist && addToWishlist.errorBlock}\r\n
\r\n {addToCart && addToCart.button}\r\n {addToOrderTemplate && addToOrderTemplate.button}\r\n {addToWishlist && addToWishlist.button}\r\n
\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 _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\n/**\r\n * On Change function.\r\n * @param callbacks -Callbacks.\r\n * @returns Update quantity.\r\n */\r\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (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\nconst _renderQuantity = (\r\n quantityComponent: IBuyboxProductQuantityViewProps,\r\n callbacks: IBuyboxCallbacks,\r\n props: IBuyboxProps,\r\n state: IBuyboxState,\r\n extentionResources: IBuyboxExtentionResources,\r\n quantityLimitsMessages: React.ReactNode,\r\n max: number | undefined,\r\n telemetryContent?: ITelemetryContent\r\n): JSX.Element => {\r\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\r\n\r\n const { resources } = props;\r\n\r\n const { quantity } = state;\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {errors}\r\n \r\n\r\n \r\n {_renderQuantityLimitsMessages(props, quantityLimitsMessages)}\r\n \r\n );\r\n};\r\n\r\nexport function _renderQuantityLimitsMessages(\r\n props: IBuyboxProps,\r\n quantityLimitsMessages: React.ReactNode\r\n): React.ReactNode | undefined {\r\n const maxQuantityForCartLineItem = props.context.app.config.maxQuantityForCartLineItem;\r\n if(maxQuantityForCartLineItem == undefined || maxQuantityForCartLineItem == 999999999999999)\r\n {\r\n return undefined;\r\n }\r\n else{\r\n return quantityLimitsMessages;\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\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\r\n const { ContainerProps, errors, input } = shopSimilarItem;\r\n\r\n return (\r\n \r\n {errors}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst _renderProductDocument = (attributes?: AttributeValue[], heading?: string): JSX.Element | null => {\r\n let product =\r\n attributes &&\r\n ArrayExtensions.firstOrDefault(attributes?.filter(att => {\r\n return att.Name?.trim()?.toUpperCase()?.includes('document'.trim().toUpperCase());\r\n }));\r\n\r\n return (\r\n <>\r\n {}\r\n {(product == null || product == undefined) || StringExtensions.isNullOrWhitespace(product?.TextValue) ? null : }\r\n \r\n );\r\n};\r\n\r\nconst _renderProductDescription = (attributes?: AttributeValue[], heading?: string): JSX.Element | null => {\r\n let product =\r\n attributes &&\r\n ArrayExtensions.firstOrDefault(attributes?.filter(att => {\r\n return att.Name?.trim()?.toUpperCase()?.includes('description'.trim().toUpperCase());\r\n }));\r\n\r\n return (\r\n <>\r\n {}\r\n {(product == null || product == undefined) || StringExtensions.isNullOrWhitespace(product?.TextValue) ? null : }\r\n \r\n );\r\n};\r\n\r\nexport default BuyboxView;\r\n","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['buybox'] = {\n c: () => require('@msdyn365-commerce-modules/buybox/dist/lib/modules/buybox/buybox'),\n $type: 'containerModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 0},{name:'catalogs', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs', runOn: 0},{name:'channelDeliveryOptionConfig', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration', 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: 1},{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: 1},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'buybox',\n p: 'buybox',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/buybox/dist/lib/modules/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-catalogs';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-catalogs');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-channel-delivery-option-configuration');\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 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__|themes|evet_b2b_theme|views|buybox'] = {\n c: () => require('partner/themes/evet_b2b_theme/views/buybox.view.tsx'),\n cn: '__local__-__local__-buybox'\n };\nviewDictionary['@msdyn365-commerce-modules|buybox|modules|buybox|buybox'] = {\n c: () => require('@msdyn365-commerce-modules/buybox/dist/lib/modules/buybox/buybox.view.js'),\n cn: '@msdyn365-commerce-modules-buybox-buybox'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|buybox'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/buybox.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-buybox'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|buybox'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/buybox.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxData,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport { IncrementalQuantity, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxProps as IBuyboxExtentionProps,\n IBuyboxResources as IBuyboxExtentionResources\n} from '../definition-extensions/buybox.ext.props.autogenerated';\n\nconst BuyboxView: React.FC> = props => {\n const {\n ModuleProps,\n MediaGalleryContainerProps,\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n telemetryContent,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n callbacks,\n state,\n resources,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n quantityLimitsMessages,\n max,\n shopSimilarDescription,\n unitOfMeasure\n } = props;\n\n return (\n \n {props.mediaGallery}\n \n {title}\n {price}\n {unitOfMeasure}\n {props.bulkPurchaseLink}\n {description}\n {_renderTextBlock(props.slots.textBlocks)}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity, callbacks, props, state, resources, quantityLimitsMessages, max, telemetryContent)}\n {inventoryLabel}\n {_renderCartAndActions(addToCart, addToOrderTemplate, addToWishlist)}\n {findInStore && _renderFindInStore(findInStore)}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n \n \n );\n};\n\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\n if (!textBlocks || textBlocks.length === 0) {\n return undefined;\n }\n\n return <>{textBlocks[0]};\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return <>{socialShare[0]};\n};\n\nconst _renderCartAndActions = (\n addToCart?: IBuyboxAddToCartViewProps,\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps,\n addToWishlist?: IBuyboxAddToWishlistViewProps\n): JSX.Element | undefined => {\n if (!addToCart && !addToWishlist) {\n return undefined;\n }\n\n return (\n
\n {addToCart && addToCart.errorBlock}\n {addToOrderTemplate && addToOrderTemplate.errorBlock}\n {addToWishlist && addToWishlist.errorBlock}\n
\n {addToCart && addToCart.button}\n {addToOrderTemplate && addToOrderTemplate.button}\n {addToWishlist && addToWishlist.button}\n
\n
\n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\n/**\n * On Change function.\n * @param callbacks -Callbacks.\n * @returns Update quantity.\n */\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n};\n\nconst _renderQuantity = (\n quantityComponent: IBuyboxProductQuantityViewProps,\n callbacks: IBuyboxCallbacks,\n props: IBuyboxProps,\n state: IBuyboxState,\n extentionResources: IBuyboxExtentionResources,\n quantityLimitsMessages: React.ReactNode,\n max: number | undefined,\n telemetryContent?: ITelemetryContent\n): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\n\n const { resources } = props;\n\n const { quantity } = state;\n\n return (\n \n \n {heading}\n {errors}\n \n\n \n {quantityLimitsMessages}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\n\nexport default BuyboxView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToOrderTemplateComponent,\n IAddToOrderTemplateDialogResources,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n IOrderTemplateActionErrorResult,\n IOrderTemplateNameDialogResources\n} from '@msdyn365-commerce/components';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n getConfigureErrors,\n IBuyboxCallbacks,\n IBuyboxCommonResources,\n IBuyboxData,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport * as React from 'react';\n\nimport { IBuyboxProps as IBuyboxExtentionProps } from '../../definition-extensions/buybox.ext.props.autogenerated';\n\n/**\n * To generate AddToOrderTemplateDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of AddToOrderTemplateDialog resources..\n */\nfunction generateAddToOrderTemplateDialogResources(resources: IBuyboxCommonResources): IAddToOrderTemplateDialogResources {\n return {\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\n\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\n\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\n\n selectTemplatesText: resources.selectTemplatesText,\n addToTemplateButtonText: resources.addToTemplateButtonText,\n lineItemsText: resources.lineItemsText\n };\n}\n\n/**\n * To generate OrderTemplateNameDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of OrderTemplateNameDialog resources..\n */\nfunction generateOrderTemplateNameDialogResources(resources: IBuyboxCommonResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n}\n\n/**\n * To generate ItemAddedToOrderTemplateDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of ItemAddedToOrderTemplateDialog resources..\n */\nfunction generateItemAddedToOrderTemplateDialogResources(resources: IBuyboxCommonResources): IItemAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\n freePriceText: resources.priceFree,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText\n };\n}\n\n/**\n * To generate DuplicateItemsWhenAddingToOrderTemplateDialog resources.\n * @param resources - The resources.\n * @returns -- Returns the list of DuplicateItemsWhenAddingToOrderTemplateDialog resources..\n */\nfunction generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n resources: IBuyboxCommonResources\n): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n return {\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\n updateQuantityButtonText: resources.updateQuantityButtonText,\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\n };\n}\n\n/**\n * Add to wishlist failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox resources.\n * @param product -Simple product.\n * @returns Update error state.\n */\nconst onAddToOrderTemplateFailed = (callbacks: IBuyboxCallbacks, resources: IBuyboxCommonResources, product: SimpleProduct | undefined) => (\n result: IOrderTemplateActionErrorResult\n) => {\n callbacks.updateErrorState({\n errorHost: 'ORDER_TEMPLATE',\n configureErrors:\n result.status === 'MISSING_DIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\n });\n};\n\n/**\n * RenderAddToOrderTemplateButton.\n * @param props - Buybox view props.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @param product - Product data.\n * @returns -- Returns JSX element.\n */\nexport const renderAddToOrderTemplateButton = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n product: SimpleProduct\n): React.ReactNode => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from module file.\n id,\n typeName,\n context,\n data: {\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n resources,\n config\n } = props;\n\n const { quantity } = state;\n\n const isShowButtonText = true;\n const isMultipleCatalogsFeatureEnabled = props.isChannelMultipleCatalogsFeatureEnabled || false;\n return (\n orderTemplates && (\n \n )\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddToWishlistComponent, IWishlistActionErrorResult } from '@msdyn365-commerce/components';\nimport { format, ItemAvailability, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreInfo } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n getConfigureErrors,\n IBuyboxAddToCartViewProps,\n IBuyboxCallbacks,\n IBuyboxCommonResources,\n IBuyboxData,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxResources as IBuyboxExtentionResources,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport {\n ArrayExtensions,\n getFullAvailableInventoryNearby,\n GetFullAvailableInventoryNearbyInput,\n IFullOrgUnitAvailability\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { IncrementalQuantity, INodeProps, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IBuyboxProps as IBuyboxExtentionProps, IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\nimport { renderAddToOrderTemplateButton } from './components/buybox-add-to-order-template';\n\n/**\n * BuyBoxConstants enum.\n */\nexport enum BuyBoxConstants {\n zero = 0\n}\n\n/**\n * On Change function.\n * @param callbacks -Callbacks.\n * @returns Update quantity.\n */\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n};\n\n/**\n * RenderQuantity.\n * @param quantityComponent - QuantityComponent.\n * @param callbacks - Callbacks.\n * @param props - Props.\n * @param state - State.\n * @param extentionResources - ExtentionResources.\n * @param quantityLimitsMessages - QuantityLimitsMessages.\n * @param max - Max.\n * @param telemetryContent - TelemetryContent.\n * @param unitOfMeasure - Unit Of Measure.\n * @returns -- Returns.\n */\nconst renderQuantity = (\n quantityComponent: IBuyboxProductQuantityViewProps,\n callbacks: IBuyboxCallbacks,\n props: IBuyboxProps,\n state: IBuyboxState,\n extentionResources: IBuyboxExtentionResources,\n quantityLimitsMessages: React.ReactNode,\n\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n max: number | undefined,\n telemetryContent?: ITelemetryContent,\n unitOfMeasure?: React.ReactNode\n): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\n\n const { resources } = props;\n\n const { quantity } = state;\n\n return (\n \n \n {heading}\n {errors}\n \n\n \n {unitOfMeasure}\n {quantityLimitsMessages}\n \n );\n};\n\n/**\n * Render key in price function.\n * @param keyInPrice - KeyInPrice.\n * @returns -- Returns.\n */\nconst renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\n/**\n * RenderAddToCart.\n * @param addToCart - AddToCart.\n * @returns -- Returns.\n */\nconst renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\n/**\n * RenderFindInStore.\n * @param findInStore - FindInStore.\n * @returns -- Returns.\n */\nconst renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\n/**\n * RenderAddToOrderTemplate.\n * @param props - Buybox view props.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @returns -- Returns.\n */\nconst renderAddToOrderTemplate = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): JSX.Element | null => {\n const product = props.data.product.result;\n if (!props.addToOrderTemplate || !product) {\n return null;\n }\n\n const orderTemplateButton = renderAddToOrderTemplateButton(props, state, callbacks, product);\n\n return (\n \n {props.addToOrderTemplate.errorBlock}\n {orderTemplateButton}\n \n );\n};\n\n/**\n * Add to wishlist failed function.\n * @param callbacks -Buybox callbacks.\n * @param resources -Buybox resources.\n * @param product -Simple product.\n * @returns Update error state.\n */\nconst onAddToWishlistFailed = (callbacks: IBuyboxCallbacks, resources: IBuyboxCommonResources, product: SimpleProduct | undefined) => (\n result: IWishlistActionErrorResult\n) => {\n callbacks.updateErrorState({\n errorHost: 'WISHLIST',\n configureErrors:\n result.status === 'MISSINGDIMENSION' ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard) : {}\n });\n};\n\n/**\n * RenderAddToWishlist.\n * @param props - Buybox view props.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @param product - Product data.\n * @returns -- Returns.\n */\nconst renderAddtoWishlistButton = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks,\n product: SimpleProduct\n): React.ReactNode => {\n const { context, resources } = props;\n const wishlists = props.data.wishlists.result;\n const isShowWishlitButtonText = true;\n return (\n \n );\n};\n\n/**\n * RenderAddToWishlist.\n * @param props - Buybox viewprops.\n * @param state - Buybox state.\n * @param callbacks - Buybox callbacks.\n * @returns -- Returns.\n */\nconst renderAddToWishlist = (\n props: IBuyboxViewProps & IBuyboxExtentionProps,\n state: IBuyboxState,\n callbacks: IBuyboxCallbacks\n): JSX.Element | null => {\n const product = props.data.product.result;\n if (!props.addToWishlist || !product) {\n return null;\n }\n\n if (!props.config.enableWishlist) {\n return null;\n }\n\n const wishlistButton = renderAddtoWishlistButton(props, state, callbacks, product);\n return (\n \n {props.addToWishlist.errorBlock}\n {wishlistButton}\n \n );\n};\n\n/**\n * RRenderShopSimilarItem.\n * @param shopSimilarItem - ShopSimilarItem.\n * @returns -- Returns.\n */\nconst renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\n\n/**\n * RenderSocialShare.\n * @param socialShare - Social share react node array.\n * @returns -- Returns.\n */\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return <>{socialShare[0]};\n};\n\n/**\n * RenderConfigureDropdown.\n * @param dropdown - Buybox product configure dropdown view props.\n * @returns -- Returns JSX.Element.\n */\nconst renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n {heading}\n {select}\n {errors}\n \n );\n};\n\n/**\n * RenderConfigure.\n * @param configure - Buybox product configure view props.\n * @returns -- Returns JSX.Element.\n */\nconst renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(renderConfigureDropdown)};\n};\n\n/**\n * BuyboxView.\n * @param props - Props.\n * @returns -- Returns.\n */\nconst BuyboxView: React.FC> = props => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n const {\n ModuleProps,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n MediaGalleryContainerProps,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n productComparisonButton,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n shopSimilarDescription,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from Buybox.tsx file\n max,\n unitOfMeasure,\n callbacks,\n state,\n resources,\n quantityLimitsMessages,\n telemetryContent,\n app: { config: appConfig },\n catalogs\n } = props;\n let skuText: string = props.resources.skuText;\n skuText += props.data.product.result?.ItemId;\n const preferredStoreInfo: IStoreInfo | undefined = props.data.storeSelectorStateManager.result?.preferredStore;\n const preferredStoreId = preferredStoreInfo?.StoreId ? preferredStoreInfo.StoreId : '';\n const preferredStoreName = preferredStoreInfo?.StoreName ? preferredStoreInfo.StoreName : '';\n\n const [availability, setAvailability] = React.useState('');\n const [isStoreChange, setIsStoreChange] = React.useState(false);\n\n /**\n * GetStockInventoryLabel.\n * @param availabilityWithHours - Stock availability with hours.\n * @returns -- Returns.\n */\n const getStockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours && ArrayExtensions.hasElements(availabilityWithHours.ProductInventoryInformation)) {\n for (const productInventoryInformation of availabilityWithHours.ProductInventoryInformation) {\n if (\n availabilityWithHours.OrgUnitAvailability?.OrgUnitLocation?.InventoryLocationId ===\n productInventoryInformation.InventLocationId\n ) {\n return productInventoryInformation.StockLevelLabel;\n }\n }\n }\n\n return undefined;\n };\n\n const getInventory = React.useCallback(async () => {\n const input = new GetFullAvailableInventoryNearbyInput(\n props.data.product.result?.RecordId,\n BuyBoxConstants.zero,\n BuyBoxConstants.zero,\n BuyBoxConstants.zero,\n BuyBoxConstants.zero,\n true\n );\n\n /**\n * IsProductInStock.\n * @param itemAvailabilities - Item availability array.\n * @returns -- Returns.\n */\n const isProductInStock = (itemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!appConfig.enableStockCheck) {\n return true;\n }\n\n if (ArrayExtensions.hasElements(itemAvailabilities)) {\n return itemAvailabilities[BuyBoxConstants.zero].AvailableQuantity! > BuyBoxConstants.zero;\n }\n\n return false;\n };\n\n await getFullAvailableInventoryNearby(input, props.context.actionContext)\n .catch((error: Error) => {\n props.telemetry.error(error.message);\n })\n .then(response => {\n if (response && ArrayExtensions.hasElements(response)) {\n const isPreferredStore = (value: IFullOrgUnitAvailability) =>\n value.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === preferredStoreId;\n const filteredFullOrgUnitAvailability = response.filter(isPreferredStore);\n const preferredStoreAvailability = ArrayExtensions.hasElements(filteredFullOrgUnitAvailability)\n ? filteredFullOrgUnitAvailability[BuyBoxConstants.zero]\n : undefined;\n const stockStatusLabel: string | undefined = getStockInventoryLabel(preferredStoreAvailability);\n const isInStock = isProductInStock(preferredStoreAvailability?.OrgUnitAvailability?.ItemAvailabilities);\n const resourceLabel = isInStock ? props.resources.inStockText : props.resources.outOfStockText;\n const stockText: string | undefined = stockStatusLabel ? stockStatusLabel : resourceLabel;\n const preferredStoreAvailabilityText = `${format(\n props.resources.availabilityAtPreferredStoreText,\n preferredStoreName\n )} ${stockText}`;\n setAvailability(preferredStoreAvailabilityText);\n }\n });\n\n setIsStoreChange(false);\n }, [\n props.data.product.result?.RecordId,\n appConfig.enableStockCheck,\n preferredStoreId,\n preferredStoreName,\n props.context.actionContext,\n props.resources.availabilityAtPreferredStoreText,\n props.resources.inStockText,\n props.resources.outOfStockText,\n props.telemetry\n ]);\n\n React.useEffect(() => {\n if (props.config.displayStockAvailability) {\n getInventory().catch((error: Error) => {\n props.telemetry.error(error.message);\n });\n }\n }, [getInventory, isStoreChange, props.telemetry, props.config.displayStockAvailability]);\n\n reaction(\n () => props.data.storeSelectorStateManager.result?.selectedStoreLocationId,\n () => {\n setIsStoreChange(true);\n }\n );\n\n /**\n * RenderAvailabiltyAtPreferredStore.\n * @returns -- Returns.\n */\n const renderAvailabilityAtPreferredStore = (): JSX.Element | undefined => {\n const hasProductDimensions = ArrayExtensions.hasElements(props.data.product.result?.Dimensions);\n if (hasProductDimensions && props.data.product.result?.MasterProductId === undefined) {\n return undefined;\n }\n const containerProps: INodeProps = {\n className: 'ms-buybox__preferred-store-availability',\n tag: 'span'\n };\n\n return {availability};\n };\n return (\n \n {props.mediaGallery}\n \n {catalogs && catalogs[0].Name}\n {title}\n \n
{skuText}
\n {rating}\n
\n \n
{props.resources.priceText}
\n {price}\n
\n {configure && renderConfigure(configure)}\n {keyInPrice && renderKeyInPrice(keyInPrice)}\n \n
\n {quantity &&\n renderQuantity(\n quantity,\n callbacks,\n props,\n state,\n resources,\n quantityLimitsMessages,\n max,\n telemetryContent,\n unitOfMeasure\n )}\n {props.bulkPurchaseLink}\n
\n
\n {props.config.displayStockAvailability && preferredStoreId && renderAvailabilityAtPreferredStore()}\n {inventoryLabel}\n {renderAddToCart(addToCart)}\n {findInStore && renderFindInStore(findInStore)}\n {addToWishlist && renderAddToWishlist(props, state, callbacks)}\n {productComparisonButton}\n {addToOrderTemplate && renderAddToOrderTemplate(props, state, callbacks)}\n {findInStore?.productPickupOptionList ? (\n
{findInStore.productPickupOptionList}
\n ) : null}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n
{props.resources.shopText}
\n \n {shopSimilarLook && renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && renderShopSimilarItem(shopSimilarDescription)}\n \n \n
{props.resources.descriptionText}
\n {description}\n
\n {ArrayExtensions.hasElements(props.slots.productSpecification) ? (\n {props.slots.productSpecification[0]}\n ) : null}\n
\n
\n );\n};\n\nexport default BuyboxView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["Popup","popupProps","dialogStrings","className","navigationUrl","modalOpen","setModalOpen","closeModal","React","window","location","assign","Modal","isOpen","onClosed","toggle","ModalHeader","id","message","_renderView","props","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","addToCart","addToOrderTemplate","addToWishlist","telemetryContent","configure","description","findInStore","quantity","title","rating","callbacks","state","resources","inventoryLabel","shopSimilarLook","keyInPrice","quantityLimitsMessages","max","shopSimilarDescription","unitOfMeasure","productComparisonButton","data","product","result","productSpecificationData","useState","shouldRenderPopUpAlternateProduct","PopupProps","config","alternateProductText","buttonMessage","redirectButtonText","navigationToAlternateProduct","context","typeName","popUpClass","Node","key","name","onClick","event","currentTarget","console","log","Module","Object","mediaGallery","_renderProductNumber","_renderProductPrice","bulkPurchaseLink","_renderTextBlock","slots","textBlocks","_renderConfigure","_renderKeyInPrice","_renderQuantity","_renderCartAndActions","_renderFindInStore","_renderSocialShare","socialShare","_renderShopSimilarItem","enableProductDocument","_renderProductDocument","documentHeading","enableProductDescription","_renderProductDescription","descriptionHeading","app","showProductNumber","ItemId","_props$data$productDi","_state$productPrice","_state$productPrice2","_state$productPrice3","_state$productPrice4","hasProductDimensions","ArrayExtensions","hasElements","productDimensions","evetFreePlaceholder","enableFreeTextPlaceholder","freeTextPlaceholder","priceFree","disablePriceForNotAuthorizedUser","request","user","isAuthenticated","undefined","productPrice","CustomerContextualPrice","enableCustomPriceMessage","textMessageForNotLoggedInUser","textMessageForMasterVariant","locale","trim","toUpperCase","textMessageForMasterVariantEN","textMessageForMasterVariantDE","textMessageForMasterVariantDA","_props$data$featureSt","_props$data$featureSt2","PriceComponent","price","isPriceMinMaxEnabled","featureState","find","Name","IsEnabled","isSalesAgreementPriceFeatureEnabled","priceResources","priceRangeSeparator","salesAgreementPricePrompt","salesAgreementExpirationDatePrompt","salesAgreementCommittedQuantityPrompt","salesAgreementRemainingQuantityPrompt","freePriceText","originalPriceText","currentPriceText","length","errorBlock","button","ContainerProps","dropdowns","map","_renderConfigureDropdown","dropdown","LabelContainerProps","heading","errors","select","storeSelector","modal","productPickupOptionList","onChangeHandler","newValue","updateQuantity","quantityComponent","extentionResources","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","_renderQuantityLimitsMessages","maxQuantityForCartLineItem","input","shopSimilarItem","attributes","firstOrDefault","filter","att","_att$Name","includes","Msdyn365","text","StringExtensions","isNullOrWhitespace","TextValue","dangerouslySetInnerHTML","_att$Name2","productAvailableQuantity","enableAlternateProductRedirect","_product$ExtensionPro","_ArrayExtensions$firs","_product$ExtensionPro2","_product$ExtensionPro3","_ArrayExtensions$firs2","_product$ExtensionPro4","useAltItem","ExtensionProperties","some","ep","_ep$Key","Key","startsWith","_ep$Key2","Value","IntegerValue","altItem","_ep$Key3","_ep$Key4","LongValue","_ArrayExtensions$firs3","isProductAvailable","IsProductAvailable","productUrl","getProductPageUrlSync","actionContext","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","_objectSpread","viewDictionary","cn","BaseStoreSelectorStateManager","constructor","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","this","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","preferredStore","_unused","_context","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","MsDyn365","isBrowser","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","requestContext","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","query","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","point","coordinates","body","appendChild","_document","isNullOrEmpty","getElementById","url","lang","market","reject","_document2","_document3","type","async","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","error","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","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","onAddToOrderTemplateFailed","updateErrorState","errorHost","configureErrors","status","getConfigureErrors","missingDimensions","IsGiftCard","BuyBoxConstants","renderAddToOrderTemplate","orderTemplateButton","renderAddToOrderTemplateButton","orderTemplates","customerInformation","isMultipleCatalogsFeatureEnabled","isChannelMultipleCatalogsFeatureEnabled","AddToOrderTemplateComponent","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","onError","shouldShowButtonFailedTooltip","isCustomPriceSelected","showButtonTooltip","showButtonText","imageSettings","isMultipleCatalogFeatureEnabledInHq","catalogId","currentCatalogId","onAddToWishlistFailed","renderAddToWishlist","enableWishlist","wishlistButton","renderAddtoWishlistButton","wishlists","AddToWishlistComponent","addToWishlistButtonText","removeFromWishlistButtonText","addToWishlistMessage","removedFromWishlistMessage","addItemToWishlistError","removeItemFromWishlistError","nameOfWishlist","ariaRole","getSelectedProduct","selectedProduct","renderShopSimilarItem","renderConfigureDropdown","_props$data$product$r","_props$data$storeSele","_props$data$product$r3","appConfig","catalogs","skuText","preferredStoreInfo","storeSelectorStateManager","preferredStoreId","preferredStoreName","availability","setAvailability","isStoreChange","setIsStoreChange","getInventory","_props$data$product$r2","GetFullAvailableInventoryNearbyInput","RecordId","zero","getFullAvailableInventoryNearby","catch","telemetry","then","response","_preferredStoreAvaila","isPreferredStore","_value$OrgUnitAvailab","OrgUnitAvailability","OrgUnitLocation","OrgUnitNumber","filteredFullOrgUnitAvailability","preferredStoreAvailability","stockStatusLabel","availabilityWithHours","ProductInventoryInformation","productInventoryInformation","_availabilityWithHour","InventoryLocationId","InventLocationId","StockLevelLabel","getStockInventoryLabel","resourceLabel","itemAvailabilities","ItemAvailabilities","enableStockCheck","AvailableQuantity","inStockText","outOfStockText","stockText","preferredStoreAvailabilityText","format","availabilityAtPreferredStoreText","displayStockAvailability","reaction","_props$data$storeSele2","priceText","renderConfigure","renderKeyInPrice","renderQuantity","renderAvailabilityAtPreferredStore","_props$data$product$r4","_props$data$product$r5","Dimensions","MasterProductId","tag","renderAddToCart","renderFindInStore","shopText","descriptionText","productSpecification","module","exports","ReactDOM"],"sourceRoot":""}