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AAEpB,EAAM,MAAE0B,EAAK,wBAAEC,GAA4BJ,EAEhH,OACItB,EAAAA,cAACC,EAAAA,KAAIC,OAAAC,OAAA,GAAKN,GACL0B,EACAL,EACAQ,EACAF,EACAL,EACApB,EACA0B,IAwXmBma,CAAkBta,GACjCf,GAAiB6V,EAAoBrT,EAAOgO,EAAOJ,GACnD3M,EACA3D,GAAsBsU,EAAyB5R,EAAOgO,EAAOJ,GAC7DrP,MAAAA,GAAAA,EAAaI,wBACV1B,EAAAA,cAAA,OAAKkC,UAAU,8BAA8BZ,EAAYI,yBACzD,KAjPQZ,CAAAA,IACxB,GAAKA,GAAsC,IAAvBA,EAAYC,OAIhC,OAAOf,EAAAA,cAAAA,EAAAA,SAAA,KAAGc,EAAY,KA6OTD,CAAmBkC,EAAMkB,OAASlB,EAAMkB,MAAMnD,aAC/Cd,EAAAA,cAAA,OAAKkC,UAAU,gCAAgCa,EAAMuE,UAAUuU,UAC/D7b,EAAAA,cAACC,EAAAA,KAAI,CAACiC,UAAU,gCACX2B,GAAmBuT,EAAsBvT,GACzCC,GAA0BsT,EAAsBtT,IAErD9D,EAAAA,cAACC,EAAAA,KAAI,CAACiC,UAAU,mCACZlC,EAAAA,cAAA,OAAKkC,UAAU,wCAAwCa,EAAMuE,UAAUwU,iBACtEta,GAEJuX,EAAAA,gBAAgBC,YAAYjW,EAAMkB,MAAM8X,sBACrC/b,EAAAA,cAACC,EAAAA,KAAI,CAACiC,UAAU,qCAAqCa,EAAMkB,MAAM8X,qBAAqB,IACtF,eC/iBpBC,EAAOC,QAAUjc,cCAjBgc,EAAOC,QAAUC","sources":["webpack://bju-press/./src/themes/base/views/buybox.view.tsx?0647","webpack://bju-press/./src/themes/christian-school/views/buybox.view.tsx?e537","webpack://bju-press/./src/themes/homeschool/views/buybox.view.tsx?e8a4","webpack://bju-press/./src/utilities/analytics/analytics-dispatcher.ts?75be","webpack://bju-press/./src/utilities/variable-replacer.ts?aee0","webpack://bju-press/./lib/buybox/module-registration.js?bcce","webpack://bju-press/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://bju-press/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://bju-press/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://bju-press/./src/modules/fabrikam/views/buybox.view.tsx?aec4","webpack://bju-press/./src/modules/adventureworks/views/components/buybox-add-to-order-template.tsx?ceb4","webpack://bju-press/./src/modules/adventureworks/views/buybox.view.tsx?98cf","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Utility imports for customizations\r\n//----------------------------------------------------------\r\nimport { convertProductAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { attrNames, labelResources } from '../../../utilities/global-constants';\r\nimport { varReplace } from '../../../utilities/variable-replacer';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Added imports for additional config from\r\n// extended definition\r\n//----------------------------------------------------------\r\nimport { IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData } from './buybox.data';\r\n//----------------------------------------------------------\r\n\r\n// @CUSTOM: imports analytics\r\nimport { publish } from '../../../utilities/analytics/analytics-dispatcher';\r\nimport { SingleProductEvent } from '../../../utilities/analytics/analytics-events';\r\n\r\nlet sentAnalytics = false;\r\n//----------------------------------------------------------\r\n\r\nconst BuyboxView: React.FC> = props => { // @CUSTOM: Added extended definition props and data\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n slots, // @CUSTOM: Added extended definition slots\r\n data // @CUSTOM: To get product data for description and item ID\r\n } = props;\r\n\r\n // @CUSTOM: PDP view analytics\r\n if (!sentAnalytics && typeof window !== 'undefined') {\r\n\r\n const product = props.data.product.result;\r\n\r\n setTimeout(() => {\r\n // @CUSTOM: send pdpview event here to ensure subscribe has fired\r\n if (product && !sentAnalytics) {\r\n sentAnalytics = true;\r\n\r\n const productPrice = props.data.productPrice.result;\r\n\r\n const analyticsProductData: SingleProductEvent = {\r\n itemID: product.ItemId || '',\r\n name: product.Name || '',\r\n discount: productPrice?.DiscountAmount,\r\n variant: '',\r\n quantity: 1,\r\n price: productPrice?.BasePrice || product.Price,\r\n currency: props.context.request.channel?.Currency || 'USD'\r\n };\r\n publish('productDetailView', analyticsProductData);\r\n }\r\n }, 0);\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Get converted product attributes\r\n //------------------------------------------------------\r\n const productSpecificationData = data?.productSpecificationData?.result;\r\n const productAttributes = productSpecificationData && convertProductAttributes(productSpecificationData);\r\n //-------------------------------------------------------\r\n\r\n // @CUSTOM: override short description field with product attribute\r\n let productDescriptionOverride;\r\n if (props.config.descriptionOverride && productAttributes) {\r\n const productDescriptionOverrideText = productAttributes[props.config.descriptionOverride];\r\n if (productDescriptionOverrideText) {\r\n productDescriptionOverride =

{productDescriptionOverrideText}

;\r\n }\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting product item ID for SKU display\r\n //------------------------------------------------------\r\n const productData = data?.product?.result;\r\n const itemId = productData?.ItemId;\r\n const skuDisplay = itemId && (\r\n
\r\n {labelResources.sku}\r\n {itemId}\r\n
\r\n );\r\n //------------------------------------------------------\r\n\r\n // @CUSTOM: backorder customization\r\n const productAvail = props.data.backorderAvail.result;\r\n\r\n // @CUSTOM: unbuyable customization\r\n const unbuyable = productAttributes && productAttributes[attrNames.notBuyable] as string;\r\n\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {/* @CUSTOM: price moved to below description */}\r\n {/* @CUSTOM: PowerReviews slot */}\r\n {slots.reviewSnippet?.length && _renderSlotItems(slots.reviewSnippet)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/* @CUSTOM: override short description field with product attribute */}\r\n {productDescriptionOverride || description}\r\n {/* @CUSTOM: Kit selector module slot */}\r\n {slots.kitSelector?.length && _renderSlotItems(slots.kitSelector)}\r\n {slots.kitCustomizer?.length && _renderSlotItems(slots.kitCustomizer)}\r\n {/* @CUSTOM: Product SKU display */}\r\n {skuDisplay}\r\n {price}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {/* @CUSTOM: backorder customization */}\r\n {productAvail && _renderBackOrder(productAvail, props.config.backOrderText)}\r\n {/* @CUSTOM: Unbuyable customization */}\r\n {unbuyable && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* @CUSTOM: Moved elements below inside a container div */}\r\n {!unbuyable &&
\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n
}\r\n {/* @CUSTOM: Blacklisted shipping areas */}\r\n {props.config.blacklistedShippingAreasText && productAttributes && productAttributes[attrNames.blacklistedShippingAreas] && (\r\n
\r\n \r\n
\r\n )}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {/* @CUSTOM: Installment calculator */}\r\n {slots.installmentCal?.length && _renderSlotItems(slots.installmentCal)}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\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 _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToWishlist;\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\n// @CUSTOM: backorder customization\r\nconst _renderBackOrder = (productAvailableQuantity: IProductInventoryInformation[], text: RichText | undefined): JSX.Element | null => {\r\n\r\n const isAvail = productAvailableQuantity?.find(avail => {\r\n return avail.IsProductAvailable\r\n });\r\n\r\n if (isAvail) {\r\n return null;\r\n }\r\n\r\n return (\r\n \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\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\n//----------------------------------------------------------\r\n// @CUSTOM: Render slot items\r\n//----------------------------------------------------------\r\nconst _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n <>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n//----------------------------------------------------------\r\n\r\nexport default BuyboxView;\r\n","/*!\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Utility imports for customizations\r\n//----------------------------------------------------------\r\nimport { convertProductAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { attrNames, labelResources } from '../../../utilities/global-constants';\r\nimport { varReplace } from '../../../utilities/variable-replacer';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Added imports for additional config from\r\n// extended definition\r\n//----------------------------------------------------------\r\nimport { IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData } from './buybox.data';\r\n//----------------------------------------------------------\r\n\r\n// @CUSTOM: imports analytics\r\nimport { publish } from '../../../utilities/analytics/analytics-dispatcher';\r\nimport { SingleProductEvent } from '../../../utilities/analytics/analytics-events';\r\n\r\nlet sentAnalytics = false;\r\n//----------------------------------------------------------\r\n\r\nconst BuyboxView: React.FC> = props => { // @CUSTOM: Added extended definition props and data\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n slots, // @CUSTOM: Added extended definition slots\r\n data, // @CUSTOM: To get product data for description and item ID\r\n resources // @CUSTOM: To get custom buybox.definition resources for pricing label\r\n } = props;\r\n\r\n // @CUSTOM: PDP view analytics\r\n if (!sentAnalytics && typeof window !== 'undefined') {\r\n\r\n const product = props.data.product.result;\r\n\r\n setTimeout(() => {\r\n // @CUSTOM: send pdpview event here to ensure subscribe has fired\r\n if (product && !sentAnalytics) {\r\n sentAnalytics = true;\r\n\r\n const productPrice = props.data.productPrice.result;\r\n\r\n const analyticsProductData: SingleProductEvent = {\r\n itemID: product.ItemId || '',\r\n name: product.Name || '',\r\n discount: productPrice?.DiscountAmount,\r\n variant: '',\r\n quantity: 1,\r\n price: productPrice?.BasePrice || product.Price,\r\n currency: props.context.request.channel?.Currency || 'USD'\r\n };\r\n publish('productDetailView', analyticsProductData);\r\n }\r\n }, 0);\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Get converted product attributes\r\n //------------------------------------------------------\r\n const productSpecificationData = data?.productSpecificationData?.result;\r\n const productAttributes = productSpecificationData && convertProductAttributes(productSpecificationData);\r\n //-------------------------------------------------------\r\n\r\n // @CUSTOM: override short description field with product attribute\r\n let productDescriptionOverride;\r\n if (props.config.descriptionOverride && productAttributes) {\r\n const productDescriptionOverrideText = productAttributes[props.config.descriptionOverride];\r\n if (productDescriptionOverrideText) {\r\n productDescriptionOverride =

{productDescriptionOverrideText}

;\r\n }\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting product item ID for SKU display\r\n //------------------------------------------------------\r\n const productData = data?.product?.result;\r\n const itemId = productData?.ItemId;\r\n const skuDisplay = (\r\n
\r\n {labelResources.sku}\r\n {itemId}\r\n
\r\n );\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting user authentication status and setting pricing label for it\r\n //------------------------------------------------------\r\n const signedIn = props.context.request.user.isAuthenticated;\r\n const pricingOrg = (\r\n
\r\n {signedIn ? resources.pricingOrgSignedIn : resources.pricingOrgSignedOut}\r\n
\r\n )\r\n //------------------------------------------------------\r\n\r\n // @CUSTOM: backorder customization\r\n const productAvail = props.data.backorderAvail.result;\r\n\r\n // @CUSTOM: unbuyable customization\r\n const unbuyable = productAttributes && productAttributes[attrNames.notBuyable] as string;\r\n\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {/* @CUSTOM: price moved to below description */}\r\n {/* @CUSTOM: PowerReviews slot */}\r\n {slots.reviewSnippet?.length && _renderSlotItems(slots.reviewSnippet)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/* @CUSTOM: override short description field with product attribute */}\r\n {productDescriptionOverride || description}\r\n {/* @CUSTOM: Kit selector module slot */}\r\n {slots.kitSelector?.length && _renderSlotItems(slots.kitSelector)}\r\n {slots.kitCustomizer?.length && _renderSlotItems(slots.kitCustomizer)}\r\n {/* @CUSTOM: Product SKU display */}\r\n {skuDisplay}\r\n {/* @CUSTOM: Pricing organization context label*/}\r\n {pricingOrg}\r\n {price}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {/* @CUSTOM: backorder customization */}\r\n {productAvail && _renderBackOrder(productAvail, props.config.backOrderText)}\r\n {/* @CUSTOM: Unbuyable customization */}\r\n {unbuyable && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* @CUSTOM: Moved elements below inside a container div */}\r\n {!unbuyable &&
\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n
}\r\n {/* @CUSTOM: Blacklisted shipping areas */}\r\n {props.config.blacklistedShippingAreasText && productAttributes && productAttributes[attrNames.blacklistedShippingAreas] && (\r\n
\r\n \r\n
\r\n )}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {/* @CUSTOM: Installment calculator */}\r\n {slots.installmentCal?.length && _renderSlotItems(slots.installmentCal)}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\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 _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToWishlist;\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\n// @CUSTOM: backorder customization\r\nconst _renderBackOrder = (productAvailableQuantity: IProductInventoryInformation[], text: RichText | undefined): JSX.Element | null => {\r\n\r\n const isAvail = productAvailableQuantity?.find(avail => {\r\n return avail.IsProductAvailable\r\n });\r\n\r\n if (isAvail) {\r\n return null;\r\n }\r\n\r\n return (\r\n \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\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\n//----------------------------------------------------------\r\n// @CUSTOM: Render slot items\r\n//----------------------------------------------------------\r\nconst _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n <>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n//----------------------------------------------------------\r\n\r\nexport default BuyboxView;\r\n","/*!\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IBuyboxAddToCartViewProps,\r\n IBuyboxAddToOrderTemplateViewProps,\r\n IBuyboxAddToWishlistViewProps,\r\n IBuyboxKeyInPriceViewProps,\r\n IBuyboxProductConfigureDropdownViewProps,\r\n IBuyboxProductConfigureViewProps,\r\n IBuyboxProductQuantityViewProps,\r\n IBuyboxShopSimilarLookViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewProps } from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxFindInStoreViewProps } from '@msdyn365-commerce-modules/buybox';\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Utility imports for customizations\r\n//----------------------------------------------------------\r\nimport { convertProductAttributes } from '../../../utilities/data-attribute-parser';\r\nimport { attrNames, labelResources } from '../../../utilities/global-constants';\r\nimport { varReplace } from '../../../utilities/variable-replacer';\r\n//----------------------------------------------------------\r\n\r\n//----------------------------------------------------------\r\n// @CUSTOM: Added imports for additional config from\r\n// extended definition\r\n//----------------------------------------------------------\r\nimport { IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { IBuyboxProps } from '../definition-extensions/buybox.ext.props.autogenerated';\r\nimport { IBuyboxData } from './buybox.data';\r\n//----------------------------------------------------------\r\n\r\n// @CUSTOM: imports analytics\r\nimport { publish } from '../../../utilities/analytics/analytics-dispatcher';\r\nimport { SingleProductEvent } from '../../../utilities/analytics/analytics-events';\r\n\r\nlet sentAnalytics = false;\r\n//----------------------------------------------------------\r\n\r\nconst BuyboxView: React.FC> = props => { // @CUSTOM: Added extended definition props and data\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n addToOrderTemplate,\r\n addToWishlist,\r\n configure,\r\n description,\r\n findInStore,\r\n quantity,\r\n price,\r\n title,\r\n rating,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n shopSimilarDescription,\r\n unitOfMeasure,\r\n productComparisonButton,\r\n slots, // @CUSTOM: Added extended definition slots\r\n data // @CUSTOM: To get product data for description and item ID\r\n } = props;\r\n\r\n // @CUSTOM: PDP view analytics\r\n if (!sentAnalytics && typeof window !== 'undefined') {\r\n\r\n const product = props.data.product.result;\r\n\r\n setTimeout(() => {\r\n // @CUSTOM: send pdpview event here to ensure subscribe has fired\r\n if (product && !sentAnalytics) {\r\n sentAnalytics = true;\r\n\r\n const productPrice = props.data.productPrice.result;\r\n\r\n const analyticsProductData: SingleProductEvent = {\r\n itemID: product.ItemId || '',\r\n name: product.Name || '',\r\n discount: productPrice?.DiscountAmount,\r\n variant: '',\r\n quantity: 1,\r\n price: productPrice?.BasePrice || product.Price,\r\n currency: props.context.request.channel?.Currency || 'USD'\r\n };\r\n publish('productDetailView', analyticsProductData);\r\n }\r\n }, 0);\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Get converted product attributes\r\n //------------------------------------------------------\r\n const productSpecificationData = data?.productSpecificationData?.result;\r\n const productAttributes = productSpecificationData && convertProductAttributes(productSpecificationData);\r\n //-------------------------------------------------------\r\n\r\n // @CUSTOM: override short description field with product attribute\r\n let productDescriptionOverride;\r\n if (props.config.descriptionOverride && productAttributes) {\r\n const productDescriptionOverrideText = productAttributes[props.config.descriptionOverride];\r\n if (productDescriptionOverrideText) {\r\n productDescriptionOverride =

{productDescriptionOverrideText}

;\r\n }\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Getting product item ID for SKU display\r\n //------------------------------------------------------\r\n const productData = data?.product?.result;\r\n const itemId = productData?.ItemId;\r\n const skuDisplay = (\r\n
\r\n {labelResources.sku}\r\n {itemId}\r\n
\r\n );\r\n //------------------------------------------------------\r\n\r\n // @CUSTOM: backorder customization\r\n const productAvail = props.data.backorderAvail.result;\r\n\r\n // @CUSTOM: unbuyable customization\r\n const unbuyable = productAttributes && productAttributes[attrNames.notBuyable] as string;\r\n\r\n return (\r\n \r\n {props.mediaGallery}\r\n \r\n {title}\r\n {/* @CUSTOM: price moved to below description */}\r\n {/* @CUSTOM: PowerReviews slot */}\r\n {slots.reviewSnippet?.length && _renderSlotItems(slots.reviewSnippet)}\r\n {unitOfMeasure}\r\n {props.bulkPurchaseLink}\r\n {/* @CUSTOM: override short description field with product attribute */}\r\n {productDescriptionOverride || description}\r\n {/* @CUSTOM: Kit selector module slot */}\r\n {slots.kitSelector?.length && _renderSlotItems(slots.kitSelector)}\r\n {slots.kitCustomizer?.length && _renderSlotItems(slots.kitCustomizer)}\r\n {/* @CUSTOM: Product SKU display */}\r\n {skuDisplay}\r\n {price}\r\n {rating}\r\n {configure && _renderConfigure(configure)}\r\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\r\n {/* @CUSTOM: backorder customization */}\r\n {productAvail && _renderBackOrder(productAvail, props.config.backOrderText)}\r\n {/* @CUSTOM: Unbuyable customization */}\r\n {unbuyable && (\r\n
\r\n \r\n
\r\n )}\r\n\r\n {/* @CUSTOM: Moved elements below inside a container div */}\r\n {!unbuyable &&
\r\n {quantity && _renderQuantity(quantity)}\r\n {inventoryLabel}\r\n {addToCart && _renderAddToCart(addToCart)}\r\n {findInStore && _renderFindInStore(findInStore)}\r\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\r\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\r\n
}\r\n {/* @CUSTOM: Blacklisted shipping areas */}\r\n {props.config.blacklistedShippingAreasText && productAttributes && productAttributes[attrNames.blacklistedShippingAreas] && (\r\n
\r\n \r\n
\r\n )}\r\n {_renderSocialShare(props.slots && props.slots.socialShare)}\r\n {productComparisonButton}\r\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\r\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\r\n {/* @CUSTOM: Installment calculator */}\r\n {slots.installmentCal?.length && _renderSlotItems(slots.installmentCal)}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToCart;\r\n\r\n return (\r\n \r\n {errorBlock}\r\n {button}\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 _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\r\n const { ContainerProps, errorBlock, button } = addToWishlist;\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\n// @CUSTOM: backorder customization\r\nconst _renderBackOrder = (productAvailableQuantity: IProductInventoryInformation[], text: RichText | undefined): JSX.Element | null => {\r\n\r\n const isAvail = productAvailableQuantity?.find(avail => {\r\n return avail.IsProductAvailable\r\n });\r\n\r\n if (isAvail) {\r\n return null;\r\n }\r\n\r\n return (\r\n \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\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\n//----------------------------------------------------------\r\n// @CUSTOM: Render slot items\r\n//----------------------------------------------------------\r\nconst _renderSlotItems = (items: React.ReactNode[]): JSX.Element => {\r\n return (\r\n <>\r\n {items.map((slot: React.ReactNode, index: number) => (\r\n \r\n {slot}\r\n \r\n ))}\r\n \r\n );\r\n}\r\n//----------------------------------------------------------\r\n\r\nexport default BuyboxView;\r\n","//==============================================================================\r\n// Analytics Event Dispatcher (Simple Pub-Sub system)\r\n//\r\n// This module receives events and forwards them to the appropriate handlers\r\n// Subscriptions are managed using a subscriber ID to aid in unsubscribing\r\n//\r\n// NOTE: Singletons aren't compatible with SSR. This module acts as a singleton,\r\n// maintaining its data as a global. Modules MUST call subscribe on the client\r\n// ONLY (via componentDidMount).\r\n//\r\n// @TODO: Currently, only client-side events will be processed. Events generated\r\n// during server-side renders will be lost. If we move data to a data action\r\n// it can be persisted from server to client. That will allow us to queue up\r\n// events generated on the server or before subscriptions occur, and emit\r\n// them immediately upon subscription.\r\n//==============================================================================\r\nimport { EventHandler } from \"./analytics-events\";\r\n\r\n//==============================================================================\r\n// INTERFACES\r\n//==============================================================================\r\n\r\n// List of subscribers to a single event\r\ninterface EventSubscribers {\r\n [subscriber: string]: EventHandler;\r\n}\r\n\r\n//==============================================================================\r\n// GLOBALS\r\n//==============================================================================\r\n\r\n// List of subscriptions, organized by event name and then subscriber name\r\nconst subscriptions: { [eventName: string]: EventSubscribers } = {};\r\n\r\n//==============================================================================\r\n// FUNCTIONS\r\n//==============================================================================\r\n\r\n//==========================================================\r\n// Called by event emitters when an event occurs\r\n//\r\n// NOTE: This should only be called on the client! Events on\r\n// the server will be lost. They should instead be queued\r\n// via a data action cache.\r\n//==========================================================\r\nexport function publish(eventName: string, eventData: unknown): void {\r\n\r\n // Get the list of subscribers for this event\r\n const subscribers = Object.keys(subscriptions[eventName] || {});\r\n\r\n // Notify each subscriber\r\n subscribers.forEach(subscriber => subscriptions[eventName][subscriber](eventData));\r\n}\r\n\r\n//==========================================================\r\n// Called by event handlers when they self-register for events\r\n//==========================================================\r\nexport function subscribe(subscriber: string, eventName: string, handler: EventHandler): void {\r\n\r\n // If it's a new event, create an entry\r\n subscriptions[eventName] = subscriptions[eventName] || {};\r\n\r\n // Ensure this subscriber isn't already subscribed to this event\r\n if (subscriptions[eventName][subscriber]) {\r\n throw new Error(`Duplicate subscription request for ${subscriber}: ${eventName}`);\r\n }\r\n\r\n // Add the subscription\r\n subscriptions[eventName][subscriber] = handler;\r\n}\r\n\r\n//==========================================================\r\n// Unsubscribe from a single event\r\n//==========================================================\r\nexport function unsubscribe(subscriber: string, eventName: string): void {\r\n if (subscriptions[eventName] && subscriptions[eventName][subscriber]) {\r\n delete subscriptions[eventName][subscriber];\r\n }\r\n}\r\n","//==============================================================================\r\n// Variable Replacer\r\n//\r\n// General purpose tool to replace variables within a string\r\n//==============================================================================\r\n\r\nexport function varReplace(text: string, vars: {[key: string]: string}): string {\r\n return text.replace(/{(.+?)}/g, (_, match) => vars[match] || '');\r\n}\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|base|views|buybox'] = {\n c: () => require('partner/themes/base/views/buybox.view.tsx'),\n cn: '__local__-__local__-buybox'\n };\nviewDictionary['__local__|__local__|themes|christian-school|views|buybox'] = {\n c: () => require('partner/themes/christian-school/views/buybox.view.tsx'),\n cn: '__local__-__local__-buybox'\n };\nviewDictionary['__local__|__local__|themes|homeschool|views|buybox'] = {\n c: () => require('partner/themes/homeschool/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":["sentAnalytics","_renderAddToCart","addToCart","ContainerProps","errorBlock","button","React","Node","Object","assign","_renderAddToOrderTemplate","addToOrderTemplate","_renderAddToWishlist","addToWishlist","_renderConfigure","configure","dropdowns","map","_renderConfigureDropdown","_renderSocialShare","socialShare","length","dropdown","LabelContainerProps","heading","errors","select","_renderFindInStore","findInStore","storeSelector","description","modal","productPickupOptionList","_renderBackOrder","productAvailableQuantity","text","find","avail","IsProductAvailable","RichTextComponent","className","_renderQuantity","quantity","input","_renderKeyInPrice","keyInPrice","_renderShopSimilarItem","shopSimilarItem","_renderSlotItems","items","slot","index","key","props","_data$productSpecific","_data$product","_slots$reviewSnippet","_slots$kitSelector","_slots$kitCustomizer","_slots$installmentCal","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","price","title","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","productComparisonButton","slots","data","window","product","result","setTimeout","_props$context$reques","productPrice","analyticsProductData","itemID","ItemId","name","Name","discount","DiscountAmount","variant","BasePrice","Price","currency","context","request","channel","Currency","publish","productSpecificationData","productAttributes","convertProductAttributes","productDescriptionOverride","config","descriptionOverride","productDescriptionOverrideText","productData","itemId","skuDisplay","labelResources","sku","productAvail","backorderAvail","unbuyable","attrNames","notBuyable","Module","mediaGallery","reviewSnippet","bulkPurchaseLink","kitSelector","kitCustomizer","backOrderText","blacklistedShippingAreasText","blacklistedShippingAreas","varReplace","areas","installmentCal","resources","signedIn","user","isAuthenticated","pricingOrg","pricingOrgSignedIn","pricingOrgSignedOut","subscriptions","eventName","eventData","keys","forEach","subscriber","subscribe","handler","Error","vars","replace","_","match","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","id","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","undefined","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","actionContext","requestContext","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","app","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","url","lang","market","reject","_document2","_document3","type","async","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","error","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","_renderTextBlock","textBlocks","_renderCartAndActions","onChangeHandler","callbacks","newValue","updateQuantity","quantityComponent","state","extentionResources","quantityLimitsMessages","max","telemetryContent","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","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","freePriceText","priceFree","originalPriceText","currentPriceText","generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","onAddToOrderTemplateFailed","updateErrorState","errorHost","configureErrors","status","getConfigureErrors","missingDimensions","IsGiftCard","BuyBoxConstants","renderAddToOrderTemplate","orderTemplateButton","renderAddToOrderTemplateButton","typeName","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","message","then","response","ArrayExtensions","hasElements","_preferredStoreAvaila","isPreferredStore","_value$OrgUnitAvailab","OrgUnitAvailability","OrgUnitLocation","OrgUnitNumber","filteredFullOrgUnitAvailability","filter","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":""}