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QAAQgE,EAAMhE,MAAQ,KAAKgE,EAAMsuB,KAAO,YAAYtuB,EAAMsuB,OAAS,KAClHtuB,EAAMuuB,OAAS,WAAWvuB,EAAMuuB,SAAW,KAG/C,OAAO,IAAI/H,SAAQ,CAACC,EAASC,KAAU,UACnC,MAAMiH,EAAiB,QAAX,EAAGhd,gBAAQ,aAAR,EAAUid,cAAc,UACvCD,EAAO9O,KAAO,kBACd8O,EAAOjyB,OAAQ,EACfiyB,EAAOa,OAAQ,EACfb,EAAO1P,IAAM7N,EACbud,EAAOztB,GAAK,uBACRuH,SACAA,OAAOgnB,YAAc,KACjB5uB,KAAK6uB,gBAAiB,EACtBjI,MAGRkH,EAAOgB,iBAAiB,SAAU1tB,IAC9BylB,EAAOzlB,MAEH,QAAR,EAAA0P,gBAAQ,OAAM,QAAN,EAAR,EAAUud,YAAI,OAAd,EAAgBC,YAAYR,OCnGjC,SAASiB,EAA8B9tB,GAC1C,OAAO,IAAI+tB,EAAAA,aAAyC,UAAW/tB,EAAQ,+BDavEwI,EAAAA,EAAAA,IAAAA,CADCvJ,EAAAA,IAAM,+BAsDPuJ,EAAAA,EAAAA,IAAAA,CADCvJ,EAAAA,IAAM,+BC9DX,MAIa+uB,GAA6B7oB,EAAAA,EAAAA,IAA2B,CACjElG,OAA6CgvB,EAAAA,iBAC7C/uB,MAN2CkG,GACpC0oB,EAA8B,IAAIhC,KAQ7C,wBCxBAoC,EAAOC,QAAUzmB,2BCAjBwmB,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/analytics/utagCaller.ts?3814","webpack://mattressfirm/./src/Utilities/cart-utils.ts?6ba1","webpack://mattressfirm/./src/Utilities/emtpyChecker.ts?e2f5","webpack://mattressfirm/./src/Utilities/get-html-parser-value.ts?1fb6","webpack://mattressfirm/./src/actions/complete-your-bed-pillow.action.ts?db7f","webpack://mattressfirm/./src/actions/complete-your-bed-protector.action.ts?82b2","webpack://mattressfirm/./src/actions/get-delivery-message.action.ts?965e","webpack://mattressfirm/./src/actions/EyebrowMessageDataServiceEntities.g.ts?c30c","webpack://mattressfirm/./src/actions/EyebrowMessageDataActionExtension.g.ts?1765","webpack://mattressfirm/./src/actions/get-eyebrow-message.action.ts?b0a0","webpack://mattressfirm/./src/actions/select-your-foundation.action.ts?e743","webpack://mattressfirm/./src/data-actions/buybox-get-dimension-pricing-action.ts?1fcd","webpack://mattressfirm/./src/data-actions/buybox-get-dimension-variants-availability-action.ts?fbe8","webpack://mattressfirm/./src/data-actions/store-selector-state-data-action.ts?6df6","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-call-chat.tsx?d8c6","webpack://mattressfirm/./src/modules/mfrm-buybox/list-page-state-buybox.ts?792c","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-size-component.tsx?61da","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-size-redesign-component.tsx?fe1b","webpack://mattressfirm/./src/Utilities/get-customized-variant-name.ts?0a2b","webpack://mattressfirm/./src/modules/mfrm-buybox/components/dropdown/dropdown.tsx?7f62","webpack://mattressfirm/./src/modules/mfrm-buybox/components/listing/listing.tsx?f7d9","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-height-foundation-redesign-component.tsx?0fe1","webpack://mattressfirm/./src/modules/mfrm-buybox/components/addtocart.tsx?6747","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-add-to-cart.tsx?1948","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-view-cart-link.tsx?5f11","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-social-share.tsx?5cfe","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-find-in-store.tsx?4a1a","webpack://mattressfirm/./src/themes/mattressfirm/custom-components/sleep-expert-summary-component.tsx?b78e","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-sleep-expert-summary.tsx?1d11","webpack://mattressfirm/./src/modules/mfrm-buybox/mfrm-buybox.props.autogenerated.ts?86c0","webpack://mattressfirm/./src/modules/mfrm-buybox/components/progressive-leasing-estimator.tsx?83c4","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-progressive-leasing-estimator.tsx?bad7","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-financing-per-month.tsx?dd8b","webpack://mattressfirm/./src/modules/mfrm-buybox/mfrm-buybox.view.tsx?d135","webpack://mattressfirm/./src/modules/mfrm-buybox/components/buybox-product-configure-mfrm.tsx?77c4","webpack://mattressfirm/./lib/mfrm-buybox/module-registration.js?d206","webpack://mattressfirm/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://mattressfirm/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://mattressfirm/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import { IAnalyticsConfiguration } from './clickTrack';\r\n\r\n// Interface for 3rd-party function. AKA utag.\r\ninterface ITealium {\r\n link(data: {}): void | false;\r\n view(data: {}): void | false;\r\n data(data: {}): void | false;\r\n}\r\n\r\nexport interface IPromotionConfig {\r\n event?: string | null;\r\n event_name?: string | null;\r\n search_term?: string | null;\r\n search_type?: string | null;\r\n event_category?: string | null;\r\n event_action?: string | null;\r\n event_label?: string | null;\r\n event_type?: string | null;\r\n event_noninteraction?: string;\r\n enhanced_action?: string | null;\r\n customer_email?: string | undefined;\r\n customer_phone_number?: string | undefined;\r\n first_name?: string | undefined;\r\n last_name?: string | undefined;\r\n address1?: string | undefined;\r\n address2?: string | undefined;\r\n city?: string | undefined;\r\n state?: string | undefined;\r\n zip_code?: string | undefined;\r\n order_subtotal?: string | undefined;\r\n order_currency?: string | undefined;\r\n country?: string | undefined;\r\n // productConfig?: IProductDataConfig;\r\n checkout_step?: string;\r\n checkout_option?:(string | undefined)[];\r\n checkout_type?:(string | undefined)[];\r\n product_id?: (string | undefined)[];\r\n product_name?: (string | undefined)[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined | number)[];\r\n product_price?: (string | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n product_url?: (string | undefined)[];\r\n product_size?: (string | undefined)[];\r\n product_image_url?: (string | undefined)[];\r\n core_item_flag?: string | null;\r\n funnel_type?: string | null;\r\n ga_title?: string | null;\r\n ga_location?: string | null;\r\n order_quantity?: string | null;\r\n}\r\n\r\ninterface IProductDataConfig {\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n}\r\n\r\nexport interface IAnalyticsConfigurationData {\r\n productConfig?: IProductDataConfig;\r\n}\r\n\r\n\r\n// Legacy function\r\nexport const callUtag = async (objToCall: IPromotionConfig) => {\r\n void await callUtagLink(objToCall);\r\n};\r\n\r\n/**\r\n * Tealium dispatch click tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagLink = async (objToCall: IPromotionConfig | IAnalyticsConfiguration) => {\r\n try {\r\n Object.keys(objToCall).forEach(\r\n key => {\r\n if (objToCall[key] === null) {\r\n delete objToCall[key];\r\n }\r\n }\r\n );\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.link(objToCall); }\r\n\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Tealium dispatch view tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagView = async (objToCall: {}) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.view(objToCall); }\r\n } catch (e) {\r\n console.log('utag View Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Not currently implemented.\r\n * @param objToCall\r\n * @param dataType\r\n */\r\nexport const callUtagData = ({ productConfig = {} }: IAnalyticsConfigurationData , dataType: string) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n switch (dataType) {\r\n case 'data':\r\n // @ts-ignore\r\n if('utag' in window) { utag.data = {...utag.data, ...productConfig}; }\r\n break;\r\n case '_data':\r\n // @ts-ignore\r\n utag_data = {...utag_data , ...productConfig};\r\n break;\r\n default:\r\n null;\r\n }\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};","import MsDyn365 from '@msdyn365-commerce/core';\r\nimport {IProductDetails,IProductBonusItems, IProductBonusWithBrandName } from '../modules/mfrm-cart/mfrm-cart';\r\nimport {IMFIBonusItemsResponse, IMFIGetBonusCouponsDetailsResponse} from '../actions/BonusItemDataServiceEntities.g';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nexport interface IMFRMDateGroupedProducts {\r\n dateStr: string;\r\n days?: string;\r\n productVariantRecordIds: number[];\r\n productItemIds: string[];\r\n productsType: string;\r\n}\r\n\r\nexport interface IExpressFlow {\r\n paymentEdit: boolean\r\n}\r\n\r\nexport interface ICartProductPrice {\r\n variantRecordId: number;\r\n price: number;\r\n}\r\n\r\n/** interface for parcel inventory details */\r\nexport interface IParcelInventoryDetails {\r\n itemId: string | undefined;\r\n location: string | undefined;\r\n productId: string | undefined;\r\n quantity: string | undefined;\r\n}\r\n\r\nconst getSetLocalStorage = (key: string, getSet: string, valueToSet?: any, returnType?: any) => {\r\n if (MsDyn365.isBrowser) {\r\n switch (getSet) {\r\n case 'set':\r\n return localStorage.setItem(key, JSON.stringify(valueToSet || returnType));\r\n case 'get':\r\n return JSON.parse(localStorage.getItem(key) || '[]');\r\n default:\r\n return returnType;\r\n }\r\n } else {\r\n return returnType;\r\n }\r\n};\r\n\r\nexport const getSetProductData = (getSet: string, products?: IProductDetails[]) => {\r\n return getSetLocalStorage('product_details', getSet, products, []);\r\n};\r\n\r\nexport const getSetProductSpec = (getSet: string, products?: IProductDetails[]) => {\r\n return getSetLocalStorage('product_specification', getSet, products, []);\r\n};\r\n\r\nexport const getSetPromoCodeApplyList = (getSet: string) => {\r\n return getSetLocalStorage('promo_code_apply_list', getSet, [], []);\r\n};\r\n\r\nexport const getSetPromoCode = (getSet: string) => {\r\n return getSetLocalStorage('promoCode', getSet, [], []);\r\n};\r\n\r\nexport const getSetGrandTotal = (getSet: string, total?: string) => {\r\n return getSetLocalStorage('grand_total', getSet, total, 0);\r\n};\r\n\r\nexport const getSetBonusItemProd = (getSet: string, globalBonusItems?: IMFIBonusItemsResponse[])=>{\r\n return getSetLocalStorage('BonusItemProduct', getSet, globalBonusItems, []);\r\n};\r\n\r\nexport const getSetSelectedBonasItem = (getSet: string, bonusItemArray?: IProductBonusItems[]) => {\r\n return getSetLocalStorage('selectedBonasItems', getSet, bonusItemArray, []);\r\n};\r\n\r\nexport const getSetBonusCouponDetail = (getSet: string, getCoupons?: IMFIGetBonusCouponsDetailsResponse[])=>{\r\n return getSetLocalStorage('bonusCouponsDetail', getSet, getCoupons, []);\r\n};\r\n\r\nexport const getSetPrevBonasModalState = (getSet: string, previousBonasModal?: IProductBonusItems[]) => {\r\n return getSetLocalStorage('previousBonasModalState', getSet, previousBonasModal, []);\r\n};\r\n\r\nexport const getSetBonusItemBrandName = (getSet: string, bonusItemsBrandName?: IProductBonusWithBrandName[]) => {\r\n return getSetLocalStorage('bonusItmesWithBrand', getSet, bonusItemsBrandName, []);\r\n};\r\n\r\nexport const getSetDateGroupedProducts = (getSet: string, products?: IMFRMDateGroupedProducts[]) => {\r\n return getSetLocalStorage('date_grouped_products', getSet, products, []);\r\n};\r\n\r\nexport const getSetExpressFlow = (getSet: string, express?: IExpressFlow) => {\r\n return getSetLocalStorage('express_flow', getSet, express, []);\r\n};\r\nexport const getSetWmapCartLines = (getSet: string, products?: { product: SimpleProduct, count: number }[]) => {\r\n return getSetLocalStorage('wmapCartLines', getSet, products, []);\r\n};\r\n\r\nexport const getSetCartProductPrice = (getSet: string, priceDetails?: ICartProductPrice[]) => {\r\n return getSetLocalStorage('cart_product_price', getSet, priceDetails, []);\r\n};\r\nexport const getSetParcelInventoryData = (getSet: string, details?: IParcelInventoryDetails[]) => {\r\n return getSetLocalStorage('parcel_inventory_details', getSet, details, []);\r\n};","// tslint:disable\r\nexport const hasArray = (values: any): any[] | undefined => {\r\n return (typeof values !== 'string') && values && values.length ? values : undefined;\r\n};","import ReactHtmlParser from 'react-html-parser';\r\n\r\nconst getHtmlParserValue = (value?: string) => {\r\n let parsedValue = '';\r\n const parsedArr = value && ReactHtmlParser(value);\r\n if (parsedArr && parsedArr?.length > 0) {\r\n parsedValue = parsedArr[0] ? parsedArr[0].toString() : '';\r\n }\r\n return parsedValue;\r\n};\r\n\r\nexport default getHtmlParserValue;","/*!\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * CompleteyourBedPillow Input Action\r\n */\r\nexport class CompleteYourBedPillowInput implements Msdyn365.IActionInput {\r\n public pillow: SimpleProduct | undefined | null;\r\n // Construct the input needed to run the action\r\n constructor(pillow: SimpleProduct | undefined | null) {\r\n this.pillow = pillow;\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CompleteyourBedPillow`;\r\n public getCacheObjectType = () => 'CompleteyourBedPillow';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\nexport interface ICompleteYourBedPillowData {\r\n pillow: SimpleProduct | undefined | null;\r\n}\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new CompleteYourBedPillowInput(args?.config?.pillow);\r\n};\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: CompleteYourBedPillowInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { pillow: input.pillow };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // Give your data action a unique id\r\n id: 'CompleteyourBedPillow',\r\n input: createInput\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * CompleteyourBedProtector Input Action\r\n */\r\nexport class CompleteyourBedProtectorInput implements Msdyn365.IActionInput {\r\n public protector: SimpleProduct | undefined | null;\r\n // Construct the input needed to run the action\r\n constructor(protector: SimpleProduct | undefined | null) {\r\n this.protector = protector;\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `CompleteyourBedProtector`;\r\n public getCacheObjectType = () => 'CompleteyourBedProtector';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\nexport interface ICompleteYourBedProtectorData {\r\n protector: SimpleProduct | undefined | null;\r\n}\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new CompleteyourBedProtectorInput(args?.config?.protector);\r\n};\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: CompleteyourBedProtectorInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { protector: input.protector };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // Give your data action a unique id\r\n id: 'CompleteyourBedProtector',\r\n input: createInput\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { mFIATPInventoryAsync } from './CoreProductDataActionExtension.g';\r\nimport { IMFIATPInventoryResponse, IMFICLDeliveryScheduleParameters } from './CoreProductDataServiceEntities.g';\r\n\r\n/**\r\n * GetDeliveryMessage Input Action\r\n */\r\n\r\nexport class GetDeliveryMessageInput implements Msdyn365.IActionInput {\r\n // Construct the input needed to run the action\r\n public input: IMFICLDeliveryScheduleParameters;\r\n public isCached?: boolean;\r\n constructor(input: IMFICLDeliveryScheduleParameters, isCached: boolean = true) {\r\n this.input = input;\r\n this.isCached = isCached;\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () =>\r\n `Get-Delivery-Message${this.input.ZipCode}-${this.input.ItemLines![0].ItemId}-${this.input.ItemLines![0].VariantRecordId}`;\r\n // public getCacheKey = () => 'do';\r\n public getCacheObjectType = () => 'GetDeliveryMessageResult';\r\n public dataCacheType = (): Msdyn365.CacheType => (this.isCached ? 'request' : 'none');\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\n// const createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n// return new GetDeliveryMessageInput();\r\n// };\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function getDeliveryMessageAction(\r\n request: GetDeliveryMessageInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.input) {\r\n try {\r\n const result = await mFIATPInventoryAsync({ callerContext: ctx }, request.input);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getDeliveryMessageAction,\r\n // Give your data action a unique id\r\n id: 'GetDeliveryMessage'\r\n // input: createInput\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","// tslint:disable\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/**\r\n * MFIPromotion entity interface.\r\n */\r\nexport interface IMFIPromotion {\r\n ItemId: string;\r\n DistinctProductVariant?: string;\r\n EyeBrows?: Entities.Promotion[];\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFIAvailablePromotionDescription entity interface.\r\n */\r\nexport interface IMFIAvailablePromotionDescription {\r\n PriceGroup?: string;\r\n Items?: IMFIItem[];\r\n}\r\n\r\n/**\r\n * MFIItem entity interface.\r\n */\r\nexport interface IMFIItem {\r\n ItemId?: string;\r\n DistinctProductVariant?: string;\r\n}\r\n\r\n/**\r\n * MFIPromotion entity class.\r\n */\r\nexport class MFIPromotionExtensionClass implements IMFIPromotion {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DistinctProductVariant: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public EyeBrows: Entities.Promotion[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DistinctProductVariant = odataObject.DistinctProductVariant;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.EyeBrows = undefined;\r\n if (odataObject.EyeBrows) {\r\n this.EyeBrows = [];\r\n for (let i = 0; i < odataObject.EyeBrows.length; i++) {\r\n if (odataObject.EyeBrows[i]) {\r\n if (odataObject.EyeBrows[i]['@odata.type']) {\r\n let className: string = odataObject.EyeBrows[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.EyeBrows[i] = new EntityClasses[className](odataObject.EyeBrows[i]);\r\n }\r\n } else {\r\n this.EyeBrows[i] = new EntityClasses.PromotionClass(odataObject.EyeBrows[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.EyeBrows[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (let i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIAvailablePromotionDescription entity class.\r\n */\r\nexport class MFIAvailablePromotionDescriptionExtensionClass implements IMFIAvailablePromotionDescription {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public PriceGroup: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Items: IMFIItem[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.PriceGroup = odataObject.PriceGroup;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Items = undefined;\r\n if (odataObject.Items) {\r\n this.Items = [];\r\n for (let i = 0; i < odataObject.Items.length; i++) {\r\n if (odataObject.Items[i]) {\r\n if (odataObject.Items[i]['@odata.type']) {\r\n let className: string = odataObject.Items[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.Items[i] = new EntityClasses[className](odataObject.Items[i]);\r\n }\r\n } else {\r\n this.Items[i] = new MFIItemExtensionClass(odataObject.Items[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Items[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFIItem entity class.\r\n */\r\nexport class MFIItemExtensionClass implements IMFIItem {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ItemId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public DistinctProductVariant: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ItemId = odataObject.ItemId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.DistinctProductVariant = odataObject.DistinctProductVariant;\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n// tslint:disable\r\nimport {\r\n AsyncResult,\r\n callActionOrExecute,\r\n DataServiceQuery,\r\n IContext,\r\n IDataServiceRequest,\r\n IQueryResultSettings\r\n} from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './EyebrowMessageDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction availablePromotionsDescriptionsQuery(itemId?: string): DataServiceQuery {\r\n const key = itemId ? { ItemId: itemId } : null;\r\n return new DataServiceQuery('AvailablePromotionsDescriptions', 'MFIPromotion', DataServiceEntities.MFIPromotionExtensionClass, key);\r\n}\r\n\r\nexport function createMFIGetAvailablePromotionsDescriptionInput(\r\n queryResultSettings: IQueryResultSettings,\r\n availablePromotionsDescription: DataServiceEntities.IMFIAvailablePromotionDescription\r\n): IDataServiceRequest {\r\n const query = availablePromotionsDescriptionsQuery().resultSettings(queryResultSettings);\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetAvailablePromotionsDescription',\r\n true,\r\n DataServiceEntities.MFIPromotionExtensionClass,\r\n 'true',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIPromotion' },\r\n { availablePromotionsDescription: availablePromotionsDescription }\r\n );\r\n}\r\n\r\nexport function mFIGetAvailablePromotionsDescriptionAsync(\r\n context: IContext,\r\n availablePromotionsDescription: DataServiceEntities.IMFIAvailablePromotionDescription\r\n): AsyncResult {\r\n const request = createMFIGetAvailablePromotionsDescriptionInput(context.queryResultSettings || {}, availablePromotionsDescription);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n// tslint:disable-next-line: no-duplicate-imports\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { CacheType } from '@msdyn365-commerce/retail-proxy';\r\nimport { mFIGetAvailablePromotionsDescriptionAsync } from './EyebrowMessageDataActionExtension.g';\r\nimport { IMFIAvailablePromotionDescription, IMFIPromotion } from './EyebrowMessageDataServiceEntities.g';\r\n/**\r\n * GetEyebrowMessage Input Action\r\n */\r\n\r\nexport class GetEyebrowMessageInput implements Msdyn365.IActionInput {\r\n // Construct the input needed to run the action\r\n public item: IMFIAvailablePromotionDescription;\r\n public isCached?: boolean;\r\n public pageType?: string;\r\n private readonly createCacheKey: string | '';\r\n constructor(item: IMFIAvailablePromotionDescription, pageType?: string, isCached?: boolean) {\r\n this.item = item;\r\n this.isCached = isCached;\r\n this.pageType = pageType;\r\n // incase of pdp cache key will be based on variantId and on PLP will be basded on ItemId\r\n this.createCacheKey =\r\n this.item.Items?.map(obj => (this.pageType === 'pdp' ? obj?.DistinctProductVariant : obj?.ItemId))\r\n .join('-')\r\n .toString() || '';\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `Get-Eyebrow-Message-${this.createCacheKey}`;\r\n // public getCacheKey = () => 'EyebrowMessage';\r\n public getCacheObjectType = () => 'EyebrowMessage';\r\n public dataCacheType = (): CacheType => (this.isCached ? 'application' : 'application');\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function getEyebrowAction(input: GetEyebrowMessageInput, ctx: IActionContext): Promise {\r\n try {\r\n const result = await mFIGetAvailablePromotionsDescriptionAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 50 } } },\r\n input.item\r\n );\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n return null;\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getEyebrowAction,\r\n // Give your data action a unique id\r\n id: 'GetEyebrowMessage'\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * SelectYourFoundation Input Action\r\n */\r\nexport class SelectYourFoundationInput implements Msdyn365.IActionInput {\r\n public foundation: SimpleProduct | undefined | null;\r\n // Construct the input needed to run the action\r\n constructor(foundation: SimpleProduct | undefined | null) {\r\n this.foundation = foundation;\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () => `SelectYourFoundation`;\r\n public getCacheObjectType = () => 'SelectYourFoundation';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\nexport interface ISelectYourFoundationData {\r\n foundation: SimpleProduct | undefined | null;\r\n}\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new SelectYourFoundationInput(args?.config?.foundation);\r\n};\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function action(input: SelectYourFoundationInput, ctx: Msdyn365.IActionContext): Promise {\r\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // Uncomment the below line to get the value from a service\r\n // const response = await Msdyn365.sendRequest('/get/example/id/1', 'get');\r\n return { foundation: input.foundation };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n // Give your data action a unique id\r\n id: 'SelectYourFoundation',\r\n input: createInput\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { getByIdAsync, getVariantsByDimensionValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nimport getHtmlParserValue from '../Utilities/get-html-parser-value';\r\n\r\n// tslint:disable-next-line: completed-docs\r\nexport class BuyboxGetDimensionPricingInput implements IActionInput {\r\n public channelId: number;\r\n public productId: number;\r\n constructor(productId: number, channelId: number) {\r\n this.channelId = channelId;\r\n this.productId = productId;\r\n }\r\n public getCacheKey = () => `DimensionPrices`;\r\n public getCacheObjectType = () => 'Product';\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nexport interface IBuyboxGetDimensionPricingActionData {\r\n discountAmount?: number;\r\n name: string;\r\n price: number;\r\n productId: number;\r\n dimensionLabel: string;\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n if (inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.productId) {\r\n return new BuyboxGetDimensionPricingInput(\r\n +inputData.requestContext.query.productId,\r\n +inputData.requestContext.apiSettings.channelId\r\n );\r\n } else if (inputData && inputData.requestContext && inputData.requestContext.urlTokens && inputData.requestContext.urlTokens.itemId) {\r\n return new BuyboxGetDimensionPricingInput(\r\n +inputData.requestContext.urlTokens.itemId,\r\n +inputData.requestContext.apiSettings.channelId\r\n );\r\n } else if (inputData && inputData.config && inputData.config.productId) {\r\n return new BuyboxGetDimensionPricingInput(inputData.config.productId, inputData.requestContext.apiSettings.channelId);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\nconst getDimensionLabel = (dimension: ProductDimension): string | undefined => {\r\n const extensionProperties = dimension.DimensionValue?.ExtensionProperties;\r\n\r\n let dimensionLabel;\r\n extensionProperties?.forEach(property => {\r\n if (property.Key?.toLowerCase() === 'description') {\r\n dimensionLabel = property.Value?.StringValue && getHtmlParserValue(property.Value?.StringValue);\r\n }\r\n });\r\n\r\n return dimensionLabel;\r\n};\r\n\r\nexport async function getDimensionPricingAction(\r\n input: BuyboxGetDimensionPricingInput,\r\n ctx: IActionContext\r\n): Promise {\r\n const pricingData: IBuyboxGetDimensionPricingActionData[] = [];\r\n\r\n const productResponse = await getByIdAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 1 } } },\r\n input.productId,\r\n input.channelId\r\n );\r\n const baseProduct = Array.isArray(productResponse) ? productResponse[0] : productResponse;\r\n\r\n await getVariantsByDimensionValuesAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 500 } } },\r\n baseProduct.MasterProductId || input.productId,\r\n input.channelId,\r\n []\r\n )\r\n .then(async (variants: SimpleProduct[]) => {\r\n // TODO: refactor code to use Hashmap\r\n // ex: https://codepen.io/asadalikanwal/pen/ZEpgmzd?editors=1111\r\n if (variants) {\r\n const dimensionsSizes = {};\r\n const productIds = [];\r\n variants.forEach(variant => {\r\n variant.Dimensions?.forEach(dimension => {\r\n if (dimension.DimensionTypeValue === 3) {\r\n const sizeLabel = dimension.DimensionValue?.Value?.toLowerCase().trim();\r\n const priceLabel = variant.Price;\r\n const dimensionLabel = getDimensionLabel(dimension);\r\n if (sizeLabel) {\r\n if (dimensionsSizes.hasOwnProperty(sizeLabel)) {\r\n if (priceLabel && dimensionsSizes[sizeLabel].price >= priceLabel) {\r\n dimensionsSizes[sizeLabel] = {\r\n price: priceLabel,\r\n productId: variant.RecordId,\r\n name: dimension.DimensionValue?.Value,\r\n dimensionLabel: dimensionLabel\r\n };\r\n }\r\n } else {\r\n dimensionsSizes[sizeLabel] = {\r\n price: priceLabel,\r\n productId: variant.RecordId,\r\n name: dimension.DimensionValue?.Value,\r\n dimensionLabel: dimensionLabel\r\n };\r\n }\r\n }\r\n }\r\n });\r\n });\r\n\r\n if (dimensionsSizes) {\r\n // push all dimension/variant ids to array for activePrice call\r\n for (const key of Object.keys(dimensionsSizes)) {\r\n if (dimensionsSizes.hasOwnProperty(key)) {\r\n pricingData.push(dimensionsSizes[key]);\r\n productIds.push(dimensionsSizes[key].productId);\r\n }\r\n }\r\n }\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n throw new Error('[IBuyboxGetDimensionPricingActionData]Unable to retieve data');\r\n });\r\n return pricingData;\r\n}\r\n\r\nexport default createObservableDataAction({\r\n action: >getDimensionPricingAction,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { getByIdAsync, getVariantsByDimensionValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n// tslint:disable-next-line: completed-docs\r\nexport class BuyboxGetDimensionVariantAvailabilityInput implements IActionInput {\r\n public channelId: number;\r\n public productId: number;\r\n constructor(productId: number, channelId: number) {\r\n this.channelId = channelId;\r\n this.productId = productId;\r\n }\r\n public getCacheKey = () => `VariantIDs-${this.productId}`;\r\n public getCacheObjectType = () => 'VariantIDs';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nexport interface IBuyboxGetDimensionVariantAvailabilityActionData {\r\n variantID: number;\r\n sizeDimensionRecordID: number;\r\n colorDimensionRecordId: number;\r\n dimensionRecordID?: number;\r\n itemID: string;\r\n sizeValue: string;\r\n isAvailable: boolean;\r\n secondaryDimensionValue?: string; // can be color or height\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n if (inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.productId) {\r\n return new BuyboxGetDimensionVariantAvailabilityInput(\r\n +inputData.requestContext.query.productId,\r\n +inputData.requestContext.apiSettings.channelId\r\n );\r\n } else if (inputData && inputData.requestContext && inputData.requestContext.urlTokens && inputData.requestContext.urlTokens.itemId) {\r\n return new BuyboxGetDimensionVariantAvailabilityInput(\r\n +inputData.requestContext.urlTokens.itemId,\r\n +inputData.requestContext.apiSettings.channelId\r\n );\r\n } else if (inputData && inputData.config && inputData.config.productId) {\r\n return new BuyboxGetDimensionVariantAvailabilityInput(inputData.config.productId, inputData.requestContext.apiSettings.channelId);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\nexport async function getAllVariantsAction(\r\n input: BuyboxGetDimensionVariantAvailabilityInput,\r\n ctx: IActionContext\r\n): Promise {\r\n const fetchedVariants: IBuyboxGetDimensionVariantAvailabilityActionData[] = [];\r\n const productResponse = await getByIdAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: 1 } } }, input.productId, input.channelId);\r\n const baseProduct = Array.isArray(productResponse) ? productResponse[0] : productResponse;\r\n await getVariantsByDimensionValuesAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: 500 } } },\r\n baseProduct.MasterProductId || input.productId,\r\n input.channelId,\r\n []\r\n )\r\n .then(async (variants: SimpleProduct[]) => {\r\n // TODO: refactor code to use Hashmap\r\n // ex: https://codepen.io/asadalikanwal/pen/ZEpgmzd?editors=1111\r\n if (variants) {\r\n variants.forEach((variant) => {\r\n const variantAvailabilityData: IBuyboxGetDimensionVariantAvailabilityActionData = { variantID: -1, sizeDimensionRecordID: -1, colorDimensionRecordId: -1, itemID: '', isAvailable: true, sizeValue: '' };\r\n variant.Dimensions?.forEach((dimension) => {\r\n if (dimension.DimensionTypeValue === 1) {\r\n variantAvailabilityData.variantID = variant.RecordId;\r\n variantAvailabilityData.colorDimensionRecordId = dimension.DimensionValue!.RecordId;\r\n variantAvailabilityData.itemID = variant.ItemId!;\r\n variantAvailabilityData.secondaryDimensionValue = dimension.DimensionValue?.Value;\r\n } else if (dimension.DimensionTypeValue === 3) {\r\n variantAvailabilityData.variantID = variant.RecordId;\r\n variantAvailabilityData.sizeDimensionRecordID = dimension.DimensionValue!.RecordId;\r\n variantAvailabilityData.sizeValue = dimension.DimensionValue!.Value!;\r\n }\r\n });\r\n fetchedVariants.push(variantAvailabilityData);\r\n });\r\n }\r\n return fetchedVariants;\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n throw new Error('[IBuyboxGetDimensionPricingActionData]Unable to retieve data');\r\n });\r\n return fetchedVariants;\r\n}\r\n\r\nexport default createObservableDataAction({\r\n action: >getAllVariantsAction,\r\n input: createInput\r\n});\r\n","import MsDyn365, {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IStoreSelectorState } from './store-selector-state';\r\n/**\r\n * storeSelectorState - action input\r\n */\r\nexport class StoreSelectorStateInput implements IActionInput {\r\n public getCacheKey = () => `storeSelectorState`;\r\n public getCacheObjectType = () => 'storeSelectorState';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * StoreSelectorStateInput - action\r\n */\r\nexport async function storeSelectorStateAction(input: StoreSelectorStateInput, ctx: IActionContext): Promise {\r\n const prefferedStore: OrgUnitLocation =\r\n MsDyn365.isBrowser && localStorage.getItem('_mfrm__prefferedStore_')\r\n ? JSON.parse(localStorage.getItem('_mfrm__prefferedStore_') || '')\r\n : {};\r\n return { isModalOpen: false, prefferedStore: prefferedStore };\r\n}\r\n\r\n/**\r\n * StoreSelectorStateInput - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new StoreSelectorStateInput();\r\n};\r\n\r\n/**\r\n * StoreSelectorStateInput - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >storeSelectorStateAction,\r\n input: createInput\r\n});\r\n","import React from 'react';\r\nimport { IMfrmBuyboxConfig } from \"..\";\r\nimport {\r\n ContentEditableEvent,\r\n IRequestContext,\r\n Text\r\n} from '@msdyn365-commerce/core';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport const BuyboxCallChat = (props: {config: IMfrmBuyboxConfig, requestContext: IRequestContext}): JSX.Element => {\r\n const {config, requestContext} = props;\r\n const telOnClick = () => {\r\n window.location.href = `tel:+${config.callChatPhoneNumber}`;\r\n };\r\n\r\n const toggleChatClick = () => {\r\n // tslint:disable: no-function-expression\r\n // tslint:disable: typedef\r\n setTimeout(function () {\r\n // eslint-disable-next-line no-eval, security/detect-eval-with-expression\r\n eval(\r\n `var elems = document.querySelectorAll('.uiButton.helpButtonEnabled, .minimizedContainer.helpButton, .sidebarHeader.minimizedContainer'); if(elems != undefined && elems.length > 0) { if(elems.length > 1){elems[1].click()} else {elems[0].click()}}`\r\n );\r\n }, 1000);\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n // @ts-ignore\r\n // tslint:disable-next-line: object-literal-key-quotes\r\n utag.link({\r\n event: 'chat-widget-initiated',\r\n event_type: 'chat_click',\r\n event_category: 'chat',\r\n event_action: 'click',\r\n event_label: 'chat engagement'\r\n });\r\n }\r\n };\r\n\r\n const onTextChange = (event: ContentEditableEvent) => (config.callChatMessage = event.target.value);\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { observable } from 'mobx';\r\n\r\n\r\n/**\r\n * ListPageState class\r\n */\r\nexport class ListPageStateBuyBox {\r\n @observable public variantId: string | undefined = '';\r\n @observable public itemId: string | undefined = '';\r\n @observable public name: string | undefined = '';\r\n @observable public categoryName: string | undefined = '';\r\n @observable public productBrandName: string | undefined = '';\r\n @observable public price: string | undefined = '';\r\n @observable public productUrl: string | undefined = '';\r\n @observable public productImageUrl: string | undefined = '';\r\n @observable public productSize: string | undefined = '';\r\n}\r\n\r\n/**\r\n * ListPageStateInput - action input\r\n */\r\nexport class ListPageStateBuyBoxInput implements IActionInput {\r\n public getCacheKey = () => `ListPageStateBuyBox`;\r\n public getCacheObjectType = () => 'ListPageStateBuyBox';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nexport async function listPageStateAction(\r\n input: ListPageStateBuyBoxInput,\r\n ctx: IActionContext\r\n): Promise {\r\n return new ListPageStateBuyBox();\r\n}\r\n\r\n/**\r\n * create new input for create action\r\n */\r\nexport const createListPageInput = (\r\n inputData: ICreateActionContext>\r\n): IActionInput => {\r\n return new ListPageStateBuyBoxInput();\r\n};\r\n\r\n/**\r\n * ListPageState - create action\r\n */\r\nexport default createObservableDataAction({\r\n action: >listPageStateAction,\r\n input: createListPageInput\r\n});\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 * as React from 'react';\r\n\r\nimport { Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../../data-actions/buybox-get-dimension-variants-availability-action';\r\nimport { IModalDimensions } from './buybox-product-configure-mfrm';\r\n\r\nimport classnames from 'classnames';\r\n\r\nexport interface IMfrmModalDrawerViewProps {\r\n isOpen?: boolean;\r\n className?: string;\r\n isMobile: boolean;\r\n modalDimensions?: IModalDimensions[];\r\n preSelection?: IModalDimensions;\r\n variantAvailibilityList: IBuyboxGetDimensionVariantAvailabilityActionData[];\r\n outOfStockText: string;\r\n percentFunc(dimensionPrice: number, discountAmount: number): void;\r\n formatCurrencyFunc(dimPrice: number | undefined): void;\r\n addItemClick(\r\n selectId: string,\r\n selectedValue: string,\r\n dropdownId: string,\r\n selectedDimensionLabel?: string,\r\n isAddItemClick?: boolean\r\n ): void;\r\n dimensionClickFunc?(): void;\r\n onCloseModal?(): void;\r\n}\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const BuyBoxSizeComponent: React.FC = props => {\r\n const { preSelection } = props;\r\n const isPreSelected = preSelection && preSelection.selectId.length && preSelection.selectedValue.length ? true : false;\r\n const [selectId, setSelectId] = React.useState();\r\n const [preSelectionPending, setPreSelectionPending] = React.useState(true);\r\n\r\n const handleKeyPress = (\r\n e: React.KeyboardEvent,\r\n highlightId: string,\r\n highlightValue: string,\r\n highlightDimensionLabel?: string\r\n ) => {\r\n if (e.keyCode === 13) {\r\n updatePricing(highlightId, highlightValue, highlightDimensionLabel, true);\r\n }\r\n };\r\n\r\n const updatePricing = (highlightId: string, highlightValue: string, highlightDimensionLabel?: string, isAddItemClick?: boolean) => {\r\n const selectHighlightId = highlightId;\r\n const selectedValue = highlightValue;\r\n const selectedDimensionLabel = highlightDimensionLabel;\r\n setSelectId(highlightId);\r\n\r\n let discountAmount = 0;\r\n let dimensionPrice = 0;\r\n\r\n props.modalDimensions &&\r\n props.modalDimensions.map(i => {\r\n if (preSelectionPending) {\r\n if (i.selectedValue === preSelection?.selectedValue) {\r\n discountAmount = i.discountAmount || 0;\r\n dimensionPrice = i.dimensionPrice || 0;\r\n }\r\n } else {\r\n if (i.selectedValue === selectedValue) {\r\n discountAmount = i.discountAmount || 0;\r\n dimensionPrice = i.dimensionPrice || 0;\r\n }\r\n }\r\n });\r\n\r\n if (preSelectionPending) {\r\n if (isPreSelected) {\r\n props.percentFunc(dimensionPrice, discountAmount);\r\n }\r\n } else {\r\n props.percentFunc(dimensionPrice, discountAmount);\r\n }\r\n\r\n if (highlightId) {\r\n selectHighlightId &&\r\n selectedValue &&\r\n props.modalDimensions &&\r\n props.addItemClick(\r\n selectHighlightId,\r\n selectedValue,\r\n props.modalDimensions[0].dropdownId,\r\n selectedDimensionLabel,\r\n isAddItemClick\r\n );\r\n } else {\r\n preSelection &&\r\n props.modalDimensions &&\r\n props.addItemClick(\r\n preSelection.selectId,\r\n preSelection.selectedValue,\r\n props.modalDimensions[0].dropdownId,\r\n preSelection.dimensionLabel,\r\n isAddItemClick\r\n );\r\n }\r\n };\r\n\r\n const returnValidPricing = (discountAmount: number, dimensionPrice: number) => {\r\n return discountAmount && dimensionPrice\r\n ? props.formatCurrencyFunc(dimensionPrice - discountAmount)\r\n : dimensionPrice\r\n ? props.formatCurrencyFunc(dimensionPrice)\r\n : '';\r\n };\r\n\r\n\r\n // if a pre-selection was made\r\n if (preSelection && isPreSelected && preSelectionPending) {\r\n updatePricing(preSelection.selectId, preSelection.selectedValue, preSelection.dimensionLabel, false);\r\n setPreSelectionPending(false);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n

Choose a Size

\r\n {props.modalDimensions && props.modalDimensions.map((dimension: IModalDimensions) => {\r\n let isAvailable = false;\r\n for (let idx = 0; idx < props.variantAvailibilityList.length; idx++) {\r\n // tslint:disable-next-line: radix\r\n const sameSizeVariantsAvailability = props.variantAvailibilityList.filter((variant => variant.sizeDimensionRecordID === parseInt(dimension.selectId, 10)));\r\n isAvailable = sameSizeVariantsAvailability.find(variant => variant.isAvailable) ? true : false;\r\n }\r\n return (\r\n { dimension.selectId && dimension.selectedValue && updatePricing(dimension.selectId, dimension.selectedValue, dimension.dimensionLabel, true); }}\r\n // tslint:disable-next-line: jsx-no-lambda & react-this-binding-issue\r\n onKeyUp={(e) => { dimension.selectId && dimension.selectedValue && handleKeyPress(e, dimension.selectId, dimension.selectedValue, dimension.dimensionLabel); }}\r\n >\r\n
\r\n
\r\n
\r\n {dimension.selectedValue}\r\n
\r\n
\r\n {dimension.dimensionLabel}\r\n
\r\n
\r\n {isAvailable ?\r\n
\r\n {\r\n dimension && dimension.discountAmount !== undefined && dimension.dimensionPrice !== undefined\r\n ? returnValidPricing(dimension.discountAmount, dimension.dimensionPrice)\r\n : ''\r\n }\r\n
\r\n {dimension.percentDiff ? {dimension.percentDiff}% Off : null}\r\n {dimension.discountAmount ?  {props.formatCurrencyFunc(dimension.dimensionPrice)} : null}\r\n
\r\n
\r\n :\r\n
\r\n
\r\n {props.outOfStockText}\r\n
\r\n
\r\n }\r\n
\r\n \r\n );\r\n })}\r\n
\r\n \r\n );\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\nimport * as React from 'react';\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../../data-actions/buybox-get-dimension-variants-availability-action';\r\nimport { IModalDimensions } from './buybox-product-configure-mfrm';\r\nimport { IVariantNameMappingData } from '../mfrm-buybox.props.autogenerated';\r\nimport { getCustomizedVariantName } from '../../../Utilities/get-customized-variant-name';\r\nexport interface IMfrmSizeViewProps {\r\n sizeDimensions?: IModalDimensions[];\r\n preSelection?: IModalDimensions;\r\n variantAvailibilityList: IBuyboxGetDimensionVariantAvailabilityActionData[];\r\n outOfStockText: string;\r\n percentFunc(dimensionPrice: number, discountAmount: number): void;\r\n addItemClick(\r\n selectId: string,\r\n selectedValue: string,\r\n dropdownId: string,\r\n selectedDimensionLabel?: string,\r\n isAddItemClick?: boolean\r\n ): void;\r\n variantMappingConfig: IVariantNameMappingData[] | undefined;\r\n}\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const BuyBoxSizeRedesignComponent: React.FC = props => {\r\n const { preSelection } = props;\r\n const isPreSelected = preSelection && preSelection.selectId.length && preSelection.selectedValue.length ? true : false;\r\n const [selectId, setSelectId] = React.useState();\r\n const [preSelectionPending, setPreSelectionPending] = React.useState(true);\r\n const handleKeyPress = (\r\n e: React.KeyboardEvent,\r\n highlightId: string,\r\n highlightValue: string,\r\n highlightDimensionLabel?: string\r\n ) => {\r\n if (e.keyCode === 13) {\r\n updatePricing(highlightId, highlightValue, highlightDimensionLabel, true);\r\n }\r\n };\r\n const updatePricing = (highlightId: string, highlightValue: string, highlightDimensionLabel?: string, isAddItemClick?: boolean) => {\r\n const selectHighlightId = highlightId;\r\n const selectedValue = highlightValue;\r\n const selectedDimensionLabel = highlightDimensionLabel;\r\n setSelectId(highlightId);\r\n let discountAmount = 0;\r\n let dimensionPrice = 0;\r\n props.sizeDimensions &&\r\n props.sizeDimensions.map(i => {\r\n if (preSelectionPending) {\r\n if (i.selectedValue === preSelection?.selectedValue) {\r\n discountAmount = i.discountAmount || 0;\r\n dimensionPrice = i.dimensionPrice || 0;\r\n }\r\n } else {\r\n if (i.selectedValue === selectedValue) {\r\n discountAmount = i.discountAmount || 0;\r\n dimensionPrice = i.dimensionPrice || 0;\r\n }\r\n }\r\n });\r\n if (preSelectionPending) {\r\n if (isPreSelected) {\r\n props.percentFunc(dimensionPrice, discountAmount);\r\n }\r\n } else {\r\n props.percentFunc(dimensionPrice, discountAmount);\r\n }\r\n if (highlightId) {\r\n selectHighlightId &&\r\n selectedValue &&\r\n props.sizeDimensions &&\r\n props.addItemClick(\r\n selectHighlightId,\r\n selectedValue,\r\n props.sizeDimensions[0].dropdownId,\r\n selectedDimensionLabel,\r\n isAddItemClick\r\n );\r\n } else {\r\n preSelection &&\r\n props.sizeDimensions &&\r\n props.addItemClick(\r\n preSelection.selectId,\r\n preSelection.selectedValue,\r\n props.sizeDimensions[0].dropdownId,\r\n preSelection.dimensionLabel,\r\n isAddItemClick\r\n );\r\n }\r\n };\r\n // if a pre-selection was made\r\n if (preSelection && isPreSelected && preSelectionPending) {\r\n updatePricing(preSelection.selectId, preSelection.selectedValue, preSelection.dimensionLabel, false);\r\n setPreSelectionPending(false);\r\n }\r\n return (\r\n
    \r\n {props.sizeDimensions && props.sizeDimensions.map((dimension: IModalDimensions) => {\r\n let isAvailable = false;\r\n for (let idx = 0; idx < props.variantAvailibilityList.length; idx++) {\r\n // tslint:disable-next-line: radix\r\n const sameSizeVariantsAvailability = props.variantAvailibilityList.filter((variant => variant.sizeDimensionRecordID === parseInt(dimension.selectId, 10)));\r\n isAvailable = sameSizeVariantsAvailability.find(variant => variant.isAvailable) ? true : false;\r\n }\r\n const isActive = dimension.selectId === selectId;\r\n if (isActive && isAvailable === false) {\r\n const selectedValueData = props.variantAvailibilityList.filter(item => item.sizeValue === dimension.selectedValue);\r\n const isVariantAvailableAtAll = selectedValueData.filter(item => item.isAvailable === true)?.length;\r\n const isAnyVariantAvailable = props.variantAvailibilityList.filter(item => item.isAvailable === true);\r\n if (isVariantAvailableAtAll === 0 && isAnyVariantAvailable.length !== 0) {\r\n updatePricing(isAnyVariantAvailable[0].sizeDimensionRecordID.toString(), isAnyVariantAvailable[0].sizeValue, '', true);\r\n }\r\n }\r\n const customVariantName = getCustomizedVariantName(props.variantMappingConfig, dimension.selectedValue);\r\n return (\r\n { dimension.selectId && dimension.selectedValue && updatePricing(dimension.selectId, dimension.selectedValue, dimension.dimensionLabel, true); }}\r\n // tslint:disable-next-line: jsx-no-lambda & react-this-binding-issue\r\n onKeyUp={(e) => { dimension.selectId && dimension.selectedValue && handleKeyPress(e, dimension.selectId, dimension.selectedValue, dimension.dimensionLabel); }}\r\n >\r\n \r\n \r\n );\r\n })}\r\n
\r\n );\r\n};","import { IVariantNameMappingData } from '../modules/mfrm-buybox/mfrm-buybox.props.autogenerated';\r\n\r\nexport const getCustomizedVariantName = (variantNameConfig: IVariantNameMappingData[] | undefined, originalVariantName: string): string | undefined => {\r\n const variantNameMapObject = variantNameConfig?.find((variant) => variant.originalVariantName === originalVariantName);\r\n if (variantNameMapObject?.originalVariantName === originalVariantName) {\r\n return variantNameMapObject?.customizedVariantName;\r\n }\r\n else {\r\n return originalVariantName;\r\n }\r\n};","/**\r\n * Copyright (c) 2018 Microsoft Corporation\r\n */\r\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IDropdownProps } from './';\r\nimport { IDropdownItemProps } from './dropdown.props';\r\nimport { observer } from 'mobx-react';\r\ntype IDropdownState = {\r\n /**\r\n * @friendlyName selectedIndex\r\n * @description selected index\r\n */\r\n selectedIndex: string;\r\n /**\r\n * @friendlyName preSelectionSet\r\n * @description is a preselection set for the dropdown\r\n */\r\n preSelectionSet?: boolean;\r\n};\r\n/**\r\n *\r\n * DropDown component\r\n * @extends {React.PureComponent}\r\n */\r\n@observer\r\nexport class Dropdown extends React.PureComponent {\r\n private selectMenu: React.RefObject = React.createRef();\r\n private payLoad: IPayLoad;\r\n constructor(props: IDropdownProps, state: IDropdownState) {\r\n super(props);\r\n {\r\n /* VSI Customization - START */\r\n }\r\n const selectedValue = this.props?.dimensionValue?.RecordId?.toString() || '';\r\n this.state = {\r\n selectedIndex: selectedValue\r\n };\r\n {\r\n /* VSI Customization - END */\r\n }\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, this.props.dropdownName);\r\n }\r\n public componentDidMount(): void {\r\n {\r\n /* VSI Customization - START */\r\n }\r\n if (this.selectMenu.current && this.state.selectedIndex === '') {\r\n this.selectMenu.current.selectedIndex = 0;\r\n }\r\n {\r\n /* VSI Customization - END */\r\n }\r\n }\r\n public componentDidUpdate(): void {\r\n const selectedValue = this.props?.dimensionValue?.RecordId?.toString() || '';\r\n selectedValue && !this.state.preSelectionSet && this.setState({ selectedIndex: selectedValue, preSelectionSet: true });\r\n }\r\n public render(): JSX.Element {\r\n const { dropdownId, dropdownList, dropdownName, dropdownToggleName } = this.props;\r\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n return (\r\n \r\n \r\n {dropdownList.map(\r\n (item: IDropdownItemProps) => {\r\n const isAvailable = this.props.variantAvailibilityList?.find(dim => dim.sizeValue.toLowerCase() === this.props.selectedSize?.toLowerCase() && dim.colorDimensionRecordId.toString() === item.id)?.isAvailable;\r\n const isActive = this.state.selectedIndex === item.id.toString();\r\n return (\r\n item && \r\n {item.value}\r\n \r\n );\r\n }\r\n )}\r\n \r\n );\r\n }\r\n private _onChanged = async (event: React.ChangeEvent) => {\r\n this.setState({ selectedIndex: event.target.value });\r\n if (this.props.onChange) {\r\n await this.props.onChange({\r\n dropdownId: this.props.dropdownId,\r\n selectId: event.target.value,\r\n selectedValue: event.target.innerText\r\n });\r\n }\r\n };\r\n}","import { ProductDimensionValue } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../../../data-actions/buybox-get-dimension-variants-availability-action';\r\nimport { getQueryParamsFromQueryByName } from '../../../../data-actions/utilities/utils';\r\nimport { variantQueryStringName } from '../../../../Utilities/constants';\r\nexport interface IListingProps {\r\n swatchName: string;\r\n dimension: IDimensionData;\r\n baseImageUrl: string;\r\n availabilityList: IBuyboxGetDimensionVariantAvailabilityActionData[];\r\n selectedSize: string;\r\n generateOnClick(id: number, value: string, variantID: number): (e: React.MouseEvent) => void;\r\n setActiveVariant(variantID: number): void;\r\n isVariantSelectionRedesignEnabled: boolean;\r\n selectedValueAvailable: boolean | undefined;\r\n}\r\nexport interface IDimensionData {\r\n DimensionTypeValue: number;\r\n DimensionValue?: ProductDimensionValue;\r\n DimensionValues?: ProductDimensionValue[];\r\n}\r\n/**\r\n *\r\n * Listing component\r\n * @extends {React.PureComponent}\r\n */\r\n\r\nexport const _renderSlashItem = (\r\n isVariantSelectionRedesignEnabled: boolean\r\n): JSX.Element => {\r\n return (\r\n isVariantSelectionRedesignEnabled\r\n ? \r\n : \r\n );\r\n};\r\n\r\nconst Listing = (props: IListingProps) => {\r\n const render = (props: IListingProps) => {\r\n const { baseImageUrl, dimension, generateOnClick, setActiveVariant, selectedValueAvailable, isVariantSelectionRedesignEnabled } = props;\r\n return (\r\n
    \r\n {dimension.DimensionValues\r\n ? dimension.DimensionValues.map((dimensionValue, index) => {\r\n const recordID = dimensionValue.RecordId.toString();\r\n let isAvailable = false;\r\n // For value of current color variant ID\r\n let currVariantID = -1;\r\n // check variant availability list to see if variant is out of stock\r\n for (let i = 0; i < props.availabilityList.length; i++) {\r\n const colorDimensionRecordId = JSON.stringify(props.availabilityList[i].colorDimensionRecordId);\r\n if (props.selectedSize === props.availabilityList[i].sizeValue && colorDimensionRecordId === recordID) {\r\n isAvailable = props.availabilityList[i].isAvailable;\r\n currVariantID = props.availabilityList[i].variantID;\r\n }\r\n }\r\n const dimensionId = dimensionValue.DimensionId?.replace(/[/]/g, '^')?.replace(/\\s+/g, '_').toLowerCase();\r\n const selectedValue = (dimension.DimensionValue && dimension.DimensionValue.RecordId) || 'not available';\r\n const isActive = selectedValue === dimensionValue.RecordId;\r\n const url = new URL(window.location.href.toString());\r\n const isVariantIdNotAvailable = Number(getQueryParamsFromQueryByName(url, variantQueryStringName)) ? false : true;\r\n\r\n if (isActive) {\r\n if (isVariantIdNotAvailable || !selectedValueAvailable) {\r\n const element = document.getElementsByClassName(\"selected\")[0] as HTMLElement;\r\n element?.click();\r\n }\r\n setActiveVariant(currVariantID);\r\n }\r\n return (\r\n !isAvailable ?\r\n \r\n
    \r\n {/*Note: will likely eventually update generateOnClick so you can pass in dimensionValue.RecordId instead of the index*/}\r\n \r\n {_renderSlashItem(isVariantSelectionRedesignEnabled)}\r\n
    \r\n \r\n :\r\n \r\n
    \r\n {/*Note: will likely eventually update generateOnClick so you can pass in dimensionValue.RecordId instead of the index*/}\r\n \r\n
    \r\n \r\n );\r\n })\r\n : false}\r\n
\r\n );\r\n };\r\n return render(props);\r\n};\r\nexport default Listing;","/**\r\n * Copyright (c) 2018 Microsoft Corporation\r\n */\r\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IDropdownItemProps, IDropdownOnSelectionChangeNotification } from './dropdown/dropdown.props';\r\nimport { observer } from 'mobx-react';\r\nimport { ProductDimensionValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../../data-actions/buybox-get-dimension-variants-availability-action';\r\ntype IHeightFoundationState = {\r\n /**\r\n * @friendlyName selectedIndex\r\n * @description selected index\r\n */\r\n selectedIndex: string;\r\n /**\r\n * @friendlyName preSelectionSet\r\n * @description is a preselection set for the dropdown\r\n */\r\n preSelectionSet?: boolean;\r\n};\r\nexport interface IDimensionProps {\r\n /**\r\n * @friendlyName dropdownId\r\n * @description Id for dropdown component\r\n */\r\n dimensionId: string;\r\n /**\r\n * @friendlyName variantAvailibilityList\r\n * @description array for checking variant aviability\r\n */\r\n variantAvailibilityList: IBuyboxGetDimensionVariantAvailabilityActionData[];\r\n /**\r\n * @friendlyName dropdownName\r\n * @description Name of the dropdown component\r\n */\r\n dimensionName: string;\r\n selectedSize: string;\r\n dimensionValue?: ProductDimensionValue;\r\n /**\r\n * @friendlyName dropdownList\r\n * @description List of items in dropdown\r\n */\r\n dimensionList: IDropdownItemProps[];\r\n /**\r\n * @telemetryContent telemetryContent\r\n * @description telemetry content\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n /**\r\n * @friendlyName onChange\r\n * @description Callback that gets fired when when a selected dimension changes\r\n */\r\n onChange?(notification: IDropdownOnSelectionChangeNotification): Promise;\r\n setActiveVariant(variantID: number): void;\r\n}\r\n/**\r\n *\r\n * DropDown component\r\n * @extends {React.PureComponent}\r\n */\r\n@observer\r\nexport class HeightFoundationComponent extends React.PureComponent {\r\n private selectMenu: React.RefObject = React.createRef();\r\n private payLoad: IPayLoad;\r\n constructor(props: IDimensionProps, state: IHeightFoundationState) {\r\n super(props);\r\n {\r\n /* VSI Customization - START */\r\n }\r\n const selectedValue = this.props?.dimensionValue?.RecordId?.toString() || '';\r\n this.state = {\r\n selectedIndex: selectedValue\r\n };\r\n {\r\n /* VSI Customization - END */\r\n }\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, this.props.dimensionName);\r\n }\r\n public componentDidMount(): void {\r\n {\r\n /* VSI Customization - START */\r\n }\r\n if (this.selectMenu.current && this.state.selectedIndex === '') {\r\n this.selectMenu.current.selectedIndex = 0;\r\n }\r\n {\r\n /* VSI Customization - END */\r\n }\r\n }\r\n public componentDidUpdate(): void {\r\n const selectedValue = this.props?.dimensionValue?.RecordId?.toString() || '';\r\n selectedValue && !this.state.preSelectionSet && this.setState({ selectedIndex: selectedValue, preSelectionSet: true });\r\n }\r\n public render(): JSX.Element {\r\n const { dimensionList } = this.props;\r\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n return (\r\n <>\r\n
    \r\n {dimensionList.map(\r\n (item) => {\r\n const isAvailable = this.props.variantAvailibilityList.find(dim => dim.sizeValue.toLowerCase() === this.props.selectedSize.toLowerCase() && dim.colorDimensionRecordId.toString() === item.id)?.isAvailable;\r\n const isActive = this.state.selectedIndex === item.id.toString();\r\n const classNames = !isAvailable ? 'msc-dimensions-wrapper msc-dimensions-wrapper-disable' : isActive ? 'msc-dimensions-wrapper msc-dimensions-wrapper-active' : 'msc-dimensions-wrapper';\r\n const currentVariantId = this.props.variantAvailibilityList.find(dim => dim.sizeValue.toLowerCase() === this.props.selectedSize.toLowerCase() && dim.colorDimensionRecordId.toString() === item.id)?.variantID;\r\n if (isActive) {\r\n currentVariantId && this.props.setActiveVariant(currentVariantId);\r\n }\r\n return (\r\n item && this._handleOnClick(item.id, item.value)}\r\n role='button'\r\n >\r\n \r\n \r\n );\r\n }\r\n )}\r\n
\r\n \r\n );\r\n }\r\n private _handleOnClick = async (selectedId: string, selectedValue: string) => {\r\n this.setState({ selectedIndex: selectedId });\r\n if (this.props.onChange) {\r\n await this.props.onChange({\r\n dropdownId: this.props.dimensionId,\r\n selectId: selectedId,\r\n selectedValue: selectedValue\r\n });\r\n }\r\n };\r\n}\r\n","import { getConfigureErrors, getGenericError, getQuantityError } from '@msdyn365-commerce-modules/buybox';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Alert, getTelemetryObject, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { IAddToCartFailureResult } from '@msdyn365-commerce/components';\r\nimport { getUrlSync, IImageSettings } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport AddToCartComponent from '../../../themes/mattressfirm/views/components/addtocart';\r\nimport _getInventoryQuantity from '../../../Utilities/get-inventory-quantity';\r\nimport { IBuyboxViewPropsExtended } from '../types';\r\nimport { IMfrmBuyboxResources } from '../mfrm-buybox.props.autogenerated';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IMfrmBuyboxAddToCartViewProps {\r\n ContainerProps?: INodeProps;\r\n errorBlock?: React.ReactNode;\r\n button?: React.ReactNode;\r\n}\r\nexport interface IBuyboxErrorBlockProps {\r\n configureErrors: { [configureId: string]: string | undefined };\r\n quantityError?: string;\r\n customAmountError?: string;\r\n otherError?: string;\r\n resources: IMfrmBuyboxResources;\r\n showError: boolean;\r\n}\r\n\r\nlet telemetryContent: ITelemetryContent;\r\nlet outOfStockSmallParcel: boolean = false;\r\nlet outOfStockBoolean: boolean | undefined = false;\r\nexport const BuyboxErrorBlock: React.FC = ({ showError, configureErrors, quantityError, customAmountError, otherError, resources }) => {\r\n let errorMessages: (string | undefined)[] = [];\r\n\r\n errorMessages = Object.values(configureErrors).filter(message => message !== undefined);\r\n\r\n if (quantityError) {\r\n errorMessages.push(quantityError);\r\n }\r\n\r\n if (customAmountError) {\r\n errorMessages.push(customAmountError);\r\n }\r\n\r\n if (otherError) {\r\n errorMessages.push(otherError);\r\n }\r\n\r\n return (\r\n 0}\r\n color='danger'\r\n assertive={true}\r\n aria-label={resources.buyboxErrorMessageHeader}\r\n >\r\n \r\n {errorMessages.map((message, index) => {\r\n return (\r\n
\r\n {message}\r\n
\r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\n// tslint:disable-next-line:max-func-body-length cyclomatic-complexity\r\nexport function mfrmgetBuyboxAddToCart(\r\n props: IBuyboxViewPropsExtended,\r\n defaultMinimumKeyInPrice: number,\r\n defaultMaximumKeyInPrice: number,\r\n variantOutOfStock: boolean,\r\n itemOutOfMarket: boolean,\r\n outOfStockSmallParcelState: boolean,\r\n adjustableItem: SimpleProduct | undefined,\r\n pillow: SimpleProduct | undefined,\r\n protector: SimpleProduct | undefined\r\n): IMfrmBuyboxAddToCartViewProps {\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n data: {\r\n product: { result: product },\r\n productAvailableQuantity: { result: productAvailableQuantity },\r\n productSpecificationData,\r\n categoryPaths\r\n },\r\n resources,\r\n config: { minimumKeyInPrice, maximumKeyInPrice },\r\n app: {\r\n config: { brandBackofficeAttributePdp }\r\n }\r\n } = props;\r\n const allCategoriesArr = categoryPaths?.result;\r\n const categoryObj = allCategoriesArr && allCategoriesArr[allCategoriesArr?.length - 1];\r\n const categoryName: string | undefined = categoryObj ? `${categoryObj?.Name}` : undefined;\r\n const fallBackBrandAttribute = 'VENDOR BRAND';\r\n const attribute = brandBackofficeAttributePdp || fallBackBrandAttribute;\r\n const attributes = productSpecificationData.result;\r\n let productBrandName =\r\n attributes &&\r\n attributes.find(currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attribute.toLowerCase().trim())\r\n ?.TextValue;\r\n productBrandName = productBrandName ? `${productBrandName}` : undefined;\r\n const {\r\n quantity,\r\n errorState: { configureErrors, quantityError, customAmountError, otherError, errorHost },\r\n selectedProduct,\r\n isUpdatingDimension,\r\n isUpdatingDeliveryOptions,\r\n isServiceItem,\r\n keyInPriceAmount\r\n } = props.state;\r\n let allVariantOOS = false;\r\n const { ecomAllVairantStockInfoConcatenated } = props;\r\n if (ecomAllVairantStockInfoConcatenated && ecomAllVairantStockInfoConcatenated.length > 0) {\r\n for (let i = 0;i < props.ecomAllVairantStockInfoConcatenated.length;i++) {\r\n const variantIdOOS = ecomAllVairantStockInfoConcatenated[i].split('|');\r\n if (variantIdOOS && variantIdOOS[0] && variantIdOOS[1] && variantIdOOS[1] !== '0') {\r\n allVariantOOS = true;\r\n } else {\r\n allVariantOOS = false;\r\n break;\r\n }\r\n }\r\n }\r\n const lastBreadcrumbCategoryLink = categoryPaths && categoryPaths.result && categoryPaths?.result[categoryPaths?.result.length - 1];\r\n const outOfStockValue = productSpecificationData.result?.filter((specificationData) => {\r\n return specificationData.Name?.trim().toLowerCase() === props.context.app.config.outOfStockProductKey?.trim().toLowerCase();\r\n });\r\n\r\n const shippingInformationSmall = productSpecificationData.result?.find(\r\n attr => attr.Name?.trim() === props.context.app.config.smallParcelAttributeKey\r\n )?.TextValue;\r\n outOfStockBoolean = outOfStockValue && outOfStockValue[0] && outOfStockValue[0].BooleanValue;\r\n outOfStockBoolean ? (outOfStockSmallParcel = true) : (outOfStockSmallParcel = false);\r\n if (outOfStockBoolean === null || outOfStockBoolean === undefined) {\r\n outOfStockSmallParcel = false;\r\n }\r\n\r\n // checked product small parcel and drop ship product type\r\n if (shippingInformationSmall && _getProductType(shippingInformationSmall.toLowerCase()) === 'Drop Ship') {\r\n if (outOfStockBoolean) {\r\n outOfStockSmallParcel = true;\r\n } else {\r\n outOfStockSmallParcel = false;\r\n }\r\n } else if (shippingInformationSmall && _getProductType(shippingInformationSmall.toLowerCase()) === 'Small Parcel') {\r\n // tslint:disable-next-line: no-floating-promises\r\n if (outOfStockBoolean) {\r\n outOfStockSmallParcel = true;\r\n } else {\r\n const checkSPAvailibility = props.state?.variantAvailibilityList?.find((variant) => variant.variantID === product?.RecordId);\r\n if (checkSPAvailibility && !checkSPAvailibility?.isAvailable) {\r\n if (!props.state?.variantAvailibilityList?.some(variant => variant.isAvailable && variant.variantID !== product?.RecordId)) {\r\n outOfStockSmallParcel = true;\r\n }\r\n } else {\r\n outOfStockSmallParcel = false;\r\n }\r\n }\r\n } else if (shippingInformationSmall && _getProductType(shippingInformationSmall.toLowerCase()) === 'Core') {\r\n if (outOfStockBoolean) {\r\n outOfStockSmallParcel = true;\r\n } else {\r\n outOfStockSmallParcel = false;\r\n }\r\n }\r\n const productAvailability = props.state.productAvailableQuantity\r\n ? props.state.productAvailableQuantity.ProductAvailableQuantity\r\n : productAvailableQuantity && productAvailableQuantity.length\r\n ? productAvailableQuantity[0].ProductAvailableQuantity\r\n : undefined;\r\n\r\n const onAddToCartFailed = (result: IAddToCartFailureResult) => {\r\n let quantityErrorForState: string | undefined;\r\n let customAmountErrorForState: string | undefined;\r\n // VSI Performance Customization - used cart props.data.cart.result\r\n let otherErrorForState: string | undefined = getGenericError(\r\n result,\r\n props.data.cart.result,\r\n resources,\r\n context,\r\n product,\r\n productAvailability,\r\n undefined\r\n );\r\n\r\n if (result.failureReason === 'OUTOFSTOCK') {\r\n quantityErrorForState = result.failureReason === 'OUTOFSTOCK' ? getQuantityError(result.stockLeft, resources) : undefined;\r\n } else if (\r\n result.failureReason === 'CARTACTIONFAILED' &&\r\n result.cartActionResult &&\r\n (result.cartActionResult.substatus === 'MAXQUANTITY' || result.cartActionResult.substatus === 'QUANTITYLIMITS')\r\n ) {\r\n // VSI Performance Customization - used cart props.data.cart.result\r\n quantityErrorForState = getGenericError(\r\n result,\r\n props.data.cart.result,\r\n resources,\r\n context,\r\n product,\r\n productAvailability,\r\n undefined\r\n );\r\n otherErrorForState = undefined; // prevent error duplication in otherError and quantityError\r\n }\r\n\r\n if (result.failureReason === 'INVALIDCUSTOMAMOUNT') {\r\n if (keyInPriceAmount === undefined || keyInPriceAmount < (minimumKeyInPrice || defaultMinimumKeyInPrice)) {\r\n const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(minimumKeyInPrice || defaultMinimumKeyInPrice);\r\n customAmountErrorForState = resources.invalidSmallCustomAmountText?.replace('{minAmount}', formatedAmountLimit);\r\n } else if (keyInPriceAmount > (maximumKeyInPrice || defaultMaximumKeyInPrice)) {\r\n const formatedAmountLimit = props.context.cultureFormatter.formatCurrency(maximumKeyInPrice || defaultMaximumKeyInPrice);\r\n customAmountErrorForState = resources.invalidLargeCustomAmountText?.replace('{maxAmount}', formatedAmountLimit);\r\n }\r\n }\r\n\r\n props.callbacks.updateErrorState({\r\n errorHost: 'ADDTOCART',\r\n quantityError: quantityErrorForState,\r\n configureErrors:\r\n result.failureReason === 'MISSINGDIMENSION'\r\n ? getConfigureErrors(result.missingDimensions, resources, product?.IsGiftCard)\r\n : {},\r\n customAmountError: customAmountErrorForState,\r\n otherError: otherErrorForState\r\n });\r\n };\r\n\r\n const dialogStrings = {\r\n goToCartText: resources.buyBoxGoToCartText,\r\n continueShoppingText: resources.buyBoxContinueShoppingText,\r\n headerItemOneText: resources.buyBoxSingleItemText,\r\n headerItemFormatText: resources.buyBoxMultiLineItemFormatText,\r\n headerMessageText: resources.buyBoxHeaderMessageText,\r\n freePriceText: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText\r\n };\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=240&h=240&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=240&h=240&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const isLoading = props.data.productAvailableQuantity.status === 'LOADING';\r\n if (isLoading) {\r\n props.callbacks.changeUpdatingDimension(false);\r\n }\r\n\r\n const isLoadingDeliveryOptions = typeName !== 'quickview' && props.data.deliveryOptions?.status === 'LOADING';\r\n if (isLoadingDeliveryOptions && props.callbacks.changeUpdatingDeliveryOptions) {\r\n props.callbacks.changeUpdatingDeliveryOptions(false);\r\n }\r\n\r\n telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\r\n\r\n // check if the product delivery mode is electronic\r\n const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\r\n const deliveryOptions = props.data.deliveryOptions?.result;\r\n const isEmailDelivery =\r\n deliveryOptions &&\r\n deliveryOptions.DeliveryOptions &&\r\n ArrayExtensions.hasElements(deliveryOptions.DeliveryOptions) &&\r\n deliveryOptions.DeliveryOptions[0].Code === emailDeliveryModeCode;\r\n\r\n const successfulATC = props.state.successfulATC;\r\n\r\n return {\r\n ContainerProps: {\r\n className: 'ms-buybox__add-to-cart-container'\r\n },\r\n button: product && (\r\n <>\r\n \r\n \r\n ),\r\n errorBlock: (\r\n \r\n )\r\n };\r\n}\r\n\r\nconst _getProductType = (shippingInformation: string | undefined): string => {\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'delivery') {\r\n return 'Core';\r\n }\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'parcel') {\r\n return 'Small Parcel';\r\n }\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'drop ship') {\r\n return 'Drop Ship';\r\n }\r\n return '';\r\n};\r\n\r\nconst _isOrderQuantityLimitsFeatureEnabled = (props: IBuyboxViewPropsExtended): boolean | undefined => {\r\n const defaultOrderQuantityLimitsFeatureConfig = props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n return false;\r\n }\r\n\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n return true;\r\n }\r\n\r\n const customerInfo = props.data.customerInformation.result;\r\n return (\r\n customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n IBuyboxAddToCartViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\nimport { IBuyboxViewPropsExtended } from '../types';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { mfrmgetBuyboxAddToCart } from './addtocart';\r\n\r\nexport const BuyboxAddToCart = (props:{\r\n addToCart: IBuyboxAddToCartViewProps,\r\n buyboxProps: IBuyboxViewPropsExtended,\r\n variantOutOfStock: boolean,\r\n itemOutOfMarket: boolean,\r\n outOfStockSmallParcelState: boolean,\r\n adjustableItem: SimpleProduct | undefined,\r\n pillow: SimpleProduct | undefined,\r\n protector: SimpleProduct | undefined\r\n}): JSX.Element => {\r\n const {addToCart, buyboxProps, variantOutOfStock, itemOutOfMarket, outOfStockSmallParcelState, adjustableItem, pillow, protector} = props;\r\n const { ContainerProps } = addToCart;\r\n const mfrmDefaultMinimumKeyInPrice = 10;\r\n const mfrmDefaultMaximumKeyInPrice = 100;\r\n // tslint:disable-next-line:max-line-length\r\n const mfrmAddToCart = mfrmgetBuyboxAddToCart(\r\n buyboxProps,\r\n mfrmDefaultMinimumKeyInPrice,\r\n mfrmDefaultMaximumKeyInPrice,\r\n variantOutOfStock,\r\n itemOutOfMarket,\r\n outOfStockSmallParcelState,\r\n adjustableItem,\r\n pillow,\r\n protector\r\n ); // mfrmgetBuyboxAddToCart(props, props.state, props.callbacks, mfrmDefaultMinimumKeyInPrice, mfrmDefaultMaximumKeyInPrice);\r\n\r\n return (\r\n \r\n {mfrmAddToCart && mfrmAddToCart.errorBlock}\r\n {mfrmAddToCart && mfrmAddToCart.button}\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { IBuyboxViewPropsExtended } from '../types';\r\n\r\nexport const BuyboxViewCartLink = (props: IBuyboxViewPropsExtended) => {\r\n return (\r\n \r\n \r\n \r\n {props.resources.viewCartLinkText}\r\n \r\n \r\n \r\n );\r\n};","import React from 'react';\r\n\r\nexport const BuyboxSocialShare = (props: {socialShare: React.ReactNode[]}): JSX.Element | null => {\r\n const { socialShare } = props;\r\n if (!socialShare || socialShare?.length === 0) {\r\n return null;\r\n }\r\n\r\n return <>{socialShare[0]};\r\n};\r\n","import React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n IBuyboxFindInStoreViewProps\r\n} from '@msdyn365-commerce-modules/buybox';\r\n\r\nexport const BuyboxFindInStore = (props: IBuyboxFindInStoreViewProps): JSX.Element => {\r\n const {\r\n ContainerProps,\r\n storeSelector,\r\n heading,\r\n description,\r\n errors,\r\n button,\r\n modal,\r\n productPickupOptionList\r\n } = props;\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};","import * as React from 'react';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\n\r\nexport interface ISleepExpertSummaryComponentProps {\r\n sleepExpertOpinionHeadingText : RichText,\r\n sleepExpertSummaryText?:string;\r\n }\r\nexport const SleepExpertSummaryComponent: React.FC = ({sleepExpertOpinionHeadingText,sleepExpertSummaryText}) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {sleepExpertSummaryText}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default SleepExpertSummaryComponent;","import React from 'react';\r\nimport { IBuyboxViewPropsExtended } from '../types';\r\nimport { SleepExpertSummaryComponent } from '../../../themes/mattressfirm/custom-components/sleep-expert-summary-component';\r\n\r\n\r\nexport const BuyboxSleepExpertSummary = (props:{buyboxProps: IBuyboxViewPropsExtended, sleepExpertSummaryText: string | undefined}): JSX.Element => {\r\n const {buyboxProps, sleepExpertSummaryText} = props;\r\n const sleepExpertOpinionHeadingText = buyboxProps.config.sleepExpertOpinionHeadingText ?? '';\r\n return sleepExpertSummaryText ? (\r\n \r\n ) : (\r\n <>\r\n );\r\n};","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IMfrmBuybox containerModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\n\r\nexport const enum titleHeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IMfrmBuyboxConfig extends Msdyn365.IModuleConfig {\r\n showBVRatings?: boolean;\r\n eComDisplayColorAsDropDown?: string;\r\n eComDisplayColorLabel?: string;\r\n titleHeadingTag?: titleHeadingTag;\r\n className?: string;\r\n variantNameMapping?: IVariantNameMappingData[];\r\n enableShopSimilarLooks?: boolean;\r\n renderOOBMediaGallery?: boolean;\r\n enableShopSimilarDescription?: boolean;\r\n enableKeyInPrice?: boolean;\r\n minimumKeyInPrice?: number;\r\n maximumKeyInPrice?: number;\r\n callChatPhoneNumber?: string;\r\n callChatMessage?: string;\r\n productId?: string;\r\n progressiveLeasingEstimator?: IProgressiveLeasingEstimatorData;\r\n targetAudienceGroup?: string;\r\n enableVariantSelectionRedesign?: boolean;\r\n cSatRatingHeadingText?: string;\r\n cSatRatingPopoverText?: string;\r\n sleepExpertOpinionHeadingText?: Msdyn365.RichText;\r\n}\r\n\r\nexport interface IMfrmBuyboxResources {\r\n closeNotificationLabel: string;\r\n findInStoreNotAvailableTextButton: string;\r\n findInStoreNotAvailableDescription: string;\r\n findInStoreLinkText: string;\r\n findInStoreHeaderText: string;\r\n findInStoreDescriptionText: string;\r\n priceFree: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n addToCartText: string;\r\n addToCartProductsText: string;\r\n viewCartLinkText: string;\r\n outOfStockText: string;\r\n averageRatingAriaLabel: string;\r\n selectDimensionFormatString: string;\r\n productDimensionTypeColor: string;\r\n productDimensionTypeConfiguration: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n productDimensionTypeAmount: string;\r\n createOrderTemplateHeader: string;\r\n orderTemplateTitle: string;\r\n orderTemplateNameAriaLabel: string;\r\n createOrderTemplateDescription: string;\r\n createNewOrderTemplateButtonText: string;\r\n createOrderTemplateButtonText: string;\r\n cancelNewOrderTemplateCreationButtonText: string;\r\n defaultOrderTemplateName: string;\r\n addToOrderTemplateHeader: string;\r\n addToOrderTemplateButtonTooltip: string;\r\n noOrderTemplatesMessage: string;\r\n noOrderTemplatesDescription: string;\r\n createAnOrderTemplateButtonText: string;\r\n cancelOrderTemplateCreationButtonText: string;\r\n selectTemplatesText: string;\r\n addToTemplateButtonText: string;\r\n lineItemsText: string;\r\n addToOrderTemplateButtonText: string;\r\n addToOrderTemplateMessage: string;\r\n addItemToOrderTemplateError: string;\r\n viewOrderTemplateButtonText: string;\r\n continueShoppingButtonText: string;\r\n itemAddedToOrderTemplateHeaderItemOneText: string;\r\n itemAddedToOrderTemplateHeaderItemFormatText: string;\r\n itemAddedToOrderTemplateHeaderMessageText: string;\r\n duplicatedProductsHeader: string;\r\n duplicatedProductsDescription: string;\r\n updateQuantityButtonText: string;\r\n cancelDuplicateItemsButtonText: string;\r\n addToWishlistButtonText: string;\r\n removeFromWishlistButtonText: string;\r\n nameOfWishlist: string;\r\n inputQuantityAriaLabel: string;\r\n addToWishlistMessage: string;\r\n removedFromWishlistMessage: string;\r\n addItemToWishlistError: string;\r\n removeItemFromWishlistError: string;\r\n productQuantityHeading: string;\r\n errorMessageOutOfStock: string;\r\n errorMessageOutOfRangeOneLeft: string;\r\n errorMessageOutOfRangeFormat: string;\r\n productDimensionTypeColorErrorMessage: string;\r\n productDimensionTypeConfigurationErrorMessage: string;\r\n productDimensionTypeSizeErrorMessage: string;\r\n productDimensionTypeStyleErrorMessage: string;\r\n productDimensionTypeAmountErrorMessage: string;\r\n buyboxErrorMessageHeader: string;\r\n addedToCartFailureMessage: string;\r\n maxQuantityLimitText: string;\r\n invalidSmallCustomAmountText: string;\r\n invalidLargeCustomAmountText: string;\r\n shopSimilarLooksText: string;\r\n shopSimilarDescriptionText: string;\r\n buyBoxGoToCartText: string;\r\n buyBoxContinueShoppingText: string;\r\n buyBoxSingleItemText: string;\r\n buyBoxMultiLineItemFormatText: string;\r\n buyBoxHeaderMessageText: string;\r\n maxQuantityText: string;\r\n minQuantityText: string;\r\n addedQuantityText: string;\r\n buyboxKeyInPriceLabelHeading: string;\r\n descriptionTextToShowAllPickupOptions: string;\r\n availableInStoresText: string;\r\n notAvailableInStoresText: string;\r\n availableInStoresTextV2: string;\r\n notAvailableInStoresTextV2: string;\r\n onlineOnlyProductsText: string;\r\n deliveryBy: string;\r\n changeZipCode: string;\r\n enterZipCode: string;\r\n mfrmOutOfStockText: string;\r\n mfrmContinueShoppingText: string;\r\n mfrmInvalidZipCode: string;\r\n informationIconText: string;\r\n priceRangeSeparator: string;\r\n bulkPurchaseLinkText: string;\r\n viewStoreDetailsText: string;\r\n changeStoreText: string;\r\n storeOpenAtHours: string;\r\n storeCloseAtHours: string;\r\n storeHoursClosedText: string;\r\n swatchItemAriaLabel: string;\r\n salesAgreementPricePrompt: string;\r\n salesAgreementExpirationDatePrompt: string;\r\n salesAgreementCommittedQuantityPrompt: string;\r\n salesAgreementRemainingQuantityPrompt: string;\r\n}\r\n\r\nexport interface IVariantNameMappingData {\r\n originalVariantName?: string;\r\n customizedVariantName?: string;\r\n}\r\n\r\nexport const enum ProgressiveLeasingEstimatorRequestType {\r\n pdp = 'pdp',\r\n checkoutPdp = 'checkoutPdp'\r\n}\r\n\r\nexport const enum ProgressiveLeasingEstimatorPayFrequency {\r\n weekly = 'weekly',\r\n biWeekly = 'biWeekly',\r\n semiMonthly = 'semiMonthly',\r\n monthly = 'monthly'\r\n}\r\n\r\nexport interface IProgressiveLeasingEstimatorData {\r\n infoText: string;\r\n progressiveLogo?: Msdyn365.IImageData;\r\n estimatorLink?: IEstimatorLinkData;\r\n requestType: ProgressiveLeasingEstimatorRequestType;\r\n payFrequency: ProgressiveLeasingEstimatorPayFrequency;\r\n storeId: string;\r\n approveMeName?: string;\r\n approveMeSlugValue?: string;\r\n}\r\n\r\nexport interface IEstimatorLinkData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IMfrmBuyboxProps extends Msdyn365.IModule {\r\n resources: IMfrmBuyboxResources;\r\n config: IMfrmBuyboxConfig;\r\n slots: {\r\n mediaGallery: React.ReactNode[];\r\n storeSelector: React.ReactNode[];\r\n textBlocks: React.ReactNode[];\r\n socialShare: React.ReactNode[];\r\n mfrmStoreSelector: React.ReactNode[];\r\n mfrmMediaGallery: React.ReactNode[];\r\n additionalModules: React.ReactNode[];\r\n stylesAndDisruptorsModules: React.ReactNode[];\r\n completeYourBed: React.ReactNode[];\r\n chooseYourFoundationModule: React.ReactNode[];\r\n };\r\n}\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 { Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nimport React, { useEffect, useState } from 'react';\r\n\r\nimport { fireAnalyticsLink } from '../../../Utilities/analytics/clickTrack';\r\nimport {\r\n IProgressiveLeasingEstimatorData,\r\n ProgressiveLeasingEstimatorPayFrequency,\r\n ProgressiveLeasingEstimatorRequestType\r\n} from '../mfrm-buybox.props.autogenerated';\r\n\r\nexport interface IMfrmProgressiveLeasingEstimatorProps {\r\n progressiveLeasingEstimator: IProgressiveLeasingEstimatorData;\r\n productPrice: number;\r\n ctx: Msdyn365.IRequestContext;\r\n isLeaseActive: boolean;\r\n}\r\n\r\nexport const MfrmProgressiveLeasingEstimator: React.FC = props => {\r\n const { infoText, estimatorLink } = props.progressiveLeasingEstimator;\r\n const [isOpen, setModalStatus] = useState(false);\r\n let estimatorUrl = buildEstimatorURL(props.progressiveLeasingEstimator, props.productPrice);\r\n // If MSFT suggests us to use imageSettings, we will uncomment this piece of code (linked to line : 73)\r\n // const imageProps = {\r\n // gridSettings: props.ctx.gridSettings || {},\r\n // imageSettings: progressiveLogo && progressiveLogo.imageSettings,\r\n // };\r\n\r\n const _openModal = (e: React.MouseEvent) => {\r\n if (!props.isLeaseActive) {\r\n e.preventDefault();\r\n } else {\r\n fireAnalyticsLink({\r\n eventName: 'internal navigation',\r\n eventCategory: 'internal links',\r\n eventAction: 'to: Progressive Leasing modal',\r\n eventLabel: `from PDP financing “${estimatorLink?.linkText}” link`,\r\n eventNoninteraction: 'false'\r\n });\r\n setModalStatus(true);\r\n }\r\n };\r\n\r\n const _closeModal = () => {\r\n setModalStatus(false);\r\n };\r\n\r\n useEffect(() => {\r\n const iframe = Msdyn365.msdyn365Commerce.isBrowser && document.querySelector('.msc-modal__iframe');\r\n if (iframe) {\r\n if (!isOpen) {\r\n (iframe as HTMLIFrameElement).src = 'about:blank';\r\n } else {\r\n (iframe as HTMLIFrameElement).src = estimatorUrl!;\r\n }\r\n }\r\n }, [isOpen]);\r\n\r\n useEffect(() => {\r\n estimatorUrl = buildEstimatorURL(props.progressiveLeasingEstimator, props.productPrice);\r\n }, [props.productPrice]);\r\n\r\n return (\r\n <>\r\n
\r\n
or {infoText?.replace(/\\u2028/, '')}\r\n \r\n {estimatorLink?.linkText || 'Link'}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {/* // TODO: Remove the hardcoding once MSFT fixes the issue with imageSettings */}\r\n {/* */}\r\n \r\n {
\r\n
\r\n \r\n );\r\n};\r\n\r\nconst buildEstimatorURL = (progressiveLeasingEstimator: IProgressiveLeasingEstimatorData, itemCost: number) => {\r\n const { storeId, estimatorLink, requestType, payFrequency, approveMeName, approveMeSlugValue } = progressiveLeasingEstimator;\r\n\r\n // base url\r\n const estimatorURL =\r\n (estimatorLink &&\r\n estimatorLink.linkUrl &&\r\n estimatorLink.linkUrl.destinationUrl &&\r\n new URL(estimatorLink.linkUrl.destinationUrl?.replace('#', '%23'))) ||\r\n undefined;\r\n\r\n // add params\r\n const requestTypeValue = getRequestType(requestType);\r\n requestTypeValue && estimatorURL?.searchParams.append('requestType', requestTypeValue);\r\n\r\n const payFrequencyValue = getPayFrequency(payFrequency);\r\n payFrequencyValue && estimatorURL?.searchParams.append('payFrequency', payFrequencyValue);\r\n\r\n estimatorURL?.searchParams.append('storeId', storeId);\r\n estimatorURL?.searchParams.append('itemCost', itemCost.toString());\r\n\r\n approveMeName && estimatorURL?.searchParams.append('approveMeName', approveMeName);\r\n approveMeSlugValue && estimatorURL?.searchParams.append('approveMeSlugValue', approveMeSlugValue);\r\n\r\n const stateCode = getStateCode();\r\n stateCode && estimatorURL?.searchParams.append('stateCode', stateCode);\r\n\r\n return estimatorURL ? decodeURIComponent(estimatorURL.href) : undefined;\r\n};\r\n\r\nconst getRequestType = (type: ProgressiveLeasingEstimatorRequestType) => {\r\n switch (type) {\r\n case ProgressiveLeasingEstimatorRequestType.pdp:\r\n return 'pdp';\r\n case ProgressiveLeasingEstimatorRequestType.checkoutPdp:\r\n return 'checkout-pdp';\r\n default:\r\n return undefined;\r\n }\r\n};\r\n\r\nconst getPayFrequency = (frequency: ProgressiveLeasingEstimatorPayFrequency) => {\r\n switch (frequency) {\r\n case ProgressiveLeasingEstimatorPayFrequency.weekly:\r\n return 'weekly';\r\n case ProgressiveLeasingEstimatorPayFrequency.biWeekly:\r\n return 'biWeekly';\r\n case ProgressiveLeasingEstimatorPayFrequency.semiMonthly:\r\n return 'semiMonthly';\r\n case ProgressiveLeasingEstimatorPayFrequency.monthly:\r\n return 'monthly';\r\n default:\r\n return undefined;\r\n }\r\n};\r\n\r\n// TODO: will use MaxMind Geolocation to get state code in the future\r\nconst getStateCode = (): string | undefined => {\r\n const prefferedStoreData = localStorage.getItem('_mfrm__prefferedStore_');\r\n const parsedPrefferedStoreData = prefferedStoreData && JSON.parse(prefferedStoreData);\r\n\r\n return parsedPrefferedStoreData?.State;\r\n};\r\n","import React from 'react';\r\nimport { IProgressiveLeasingEstimatorData } from '../mfrm-buybox.props.autogenerated';\r\nimport {\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport { MfrmProgressiveLeasingEstimator } from './progressive-leasing-estimator';\r\n\r\nexport const BuyboxProgressiveLeasingEstimator = (\r\n props: {\r\n progressiveLeasingEstimator: IProgressiveLeasingEstimatorData,\r\n productPrice: number,\r\n ctx: IRequestContext,\r\n leaseState: boolean\r\n }\r\n): JSX.Element | null => {\r\n const {\r\n progressiveLeasingEstimator,\r\n productPrice,\r\n ctx,\r\n leaseState\r\n } = props;\r\n return (\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { FinancingPerMonthComponent } from '../../../themes/mattressfirm/custom-components/financing-per-month-component';\r\nimport { IBuyboxViewPropsExtended } from '../types';\r\nimport { IMfrmBuyboxProps } from '../mfrm-buybox.props.autogenerated';\r\nimport { IMfrmBuyBoxData } from '../mfrm-buybox.view';\r\n\r\nexport const BuyboxFinancingPerMonth = (\r\n props:{\r\n buyboxProps: IBuyboxViewPropsExtended & IMfrmBuyboxProps,\r\n originalPrice: number | undefined,\r\n discountValue: number | undefined,\r\n productPrice: number | undefined,\r\n categoryName: string | undefined,\r\n activeVariantId: number | undefined,\r\n productId: number | undefined,\r\n activeColorVariantId: number | undefined,\r\n isLoadedPriceComponent: boolean | undefined,\r\n parentCategory?: string | undefined\r\n }\r\n): JSX.Element => {\r\n const {\r\n buyboxProps,\r\n originalPrice,\r\n discountValue,\r\n productPrice,\r\n categoryName,\r\n activeVariantId,\r\n productId,\r\n activeColorVariantId,\r\n isLoadedPriceComponent,\r\n parentCategory\r\n } = props;\r\n const percentageDiscount = discountValue && originalPrice && (discountValue / originalPrice) * 100;\r\n return (\r\n \r\n );\r\n};","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\n// VSI Customization - end\r\nimport {\r\n HtmlHeadInclude,\r\n IImageData,\r\n ILinkData,\r\n RichTextComponent\r\n} from '@msdyn365-commerce/core';\r\nimport { ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\r\n// VSI Customization - starts\r\nimport { AsyncResult, AttributeValue, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { Dayjs } from 'dayjs';\r\nimport * as React from 'react';\r\nimport getHtmlParserValue from '../../Utilities/get-html-parser-value';\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../data-actions/buybox-get-dimension-variants-availability-action';\r\nimport { IStoreSelectorState } from '../../data-actions/store-selector-state';\r\nimport _getDeliveryByMessage from '../../Utilities/get-delivery-by-message';\r\n\r\n/** VSI Customization - Start */\r\nimport _getInventoryQuantity from '../../Utilities/get-inventory-quantity';\r\nimport { BuyboxProductConfigureMfrm } from './components/buybox-product-configure-mfrm';\r\n/** VSI Customization - End */\r\nimport { IBuyboxViewPropsExtended } from './types';\r\nimport { IMfrmBuyboxData } from './mfrm-buybox.data';\r\nimport { IBuyboxGetDimensionPricingActionData } from '../../data-actions/buybox-get-dimension-pricing-action';\r\n\r\nimport CustomSkeleton from '../../themes/mattressfirm/custom-components/CustomSkeleton';\r\n\r\nimport { BuyboxCallChat } from './components/buybox-call-chat';\r\nimport { BuyboxAddToCart } from './components/buybox-add-to-cart';\r\nimport { BuyboxViewCartLink } from './components/buybox-view-cart-link';\r\nimport { BuyboxSocialShare } from './components/buybox-social-share';\r\nimport { BuyboxFindInStore } from './components/buybox-find-in-store';\r\nimport { BuyboxSleepExpertSummary } from './components/buybox-sleep-expert-summary';\r\nimport { BuyboxProgressiveLeasingEstimator } from './components/buybox-progressive-leasing-estimator';\r\nimport { BuyboxFinancingPerMonth } from './components/buybox-financing-per-month';\r\nimport { BuyboxDeliveryByMessage } from './components/buybox-devliery-by-message';\r\nimport { _smallParcelProductATPCallForInventoryStatus } from '../../Utilities/mfrm-buybox-utils';\r\nimport { ErrorBoundary } from '../../common/components/error-boundary';\r\n\r\n// TODO: remove this interface and all references to it\r\nexport interface IMfrmBuyBoxData extends IMfrmBuyboxData {\r\n productSpecificationData: AsyncResult;\r\n dimensionPrices: AsyncResult;\r\n allVariants: AsyncResult;\r\n storeSelectorStateManager: AsyncResult;\r\n storeSelectorState: AsyncResult;\r\n categoryPaths: AsyncResult;\r\n allProductVariants: AsyncResult;\r\n}\r\n\r\nexport interface IBrandLinkData {\r\n linkText?: string;\r\n linkUrl: ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IVariantStockInfo {\r\n VariantRecID: number;\r\n OutOfStock: boolean;\r\n}\r\n\r\nexport interface IBrandListData {\r\n brandName: string;\r\n brandLogo: IImageData;\r\n logoHeight?: number;\r\n brandLink?: IBrandLinkData;\r\n brandLeadtime?: string;\r\n}\r\n\r\nexport interface IMfrmAtpMessage {\r\n Message?: string;\r\n}\r\n\r\nexport interface IBadgeData {\r\n src: string;\r\n alt: string;\r\n start: Dayjs;\r\n end: Dayjs;\r\n}\r\n\r\nconst setActiveSwatchSelected = (\r\n variantID: number,\r\n outOfStock: boolean,\r\n setOutOfStock: (outOfStock: boolean) => void,\r\n avList: IBuyboxGetDimensionVariantAvailabilityActionData[]\r\n): void => {\r\n if (variantID < 0) {\r\n return;\r\n }\r\n if (avList?.length) {\r\n for (let variantsIDIter = 0; variantsIDIter < avList.length; variantsIDIter++) {\r\n if (avList[variantsIDIter].variantID === variantID) {\r\n if (outOfStock !== !avList[variantsIDIter].isAvailable) {\r\n setOutOfStock(!avList[variantsIDIter].isAvailable);\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n};\r\n\r\n// tslint:disable-next-line\r\nconst BuyboxView: React.FC = props => {\r\n const {\r\n ModuleProps,\r\n MediaGalleryContainerProps,\r\n ProductInfoContainerProps,\r\n addToCart,\r\n /*addToWishlist,*/\r\n findInStore,\r\n title,\r\n inventoryLabel,\r\n shopSimilarLook,\r\n keyInPrice,\r\n /*addToOrderTemplate*/\r\n productBadges,\r\n ratingComponent,\r\n tryInStoreComponent,\r\n promotionalMessage,\r\n customerSatisfactionScore,\r\n adjustableItem,\r\n pillow,\r\n protector,\r\n config: {\r\n progressiveLeasingEstimator,\r\n renderOOBMediaGallery\r\n },\r\n slots: { mfrmStoreSelector, mediaGallery, mfrmMediaGallery, additionalModules, stylesAndDisruptorsModules, chooseYourFoundationModule, completeYourBed },\r\n data: { product, productSpecificationData, categoryPaths: { result } }\r\n } = props;\r\n {\r\n /* VSI Customization - START */\r\n }\r\n let parentCategory = result && result[0]?.Name ? result[0]?.Name?.toLowerCase() : '';\r\n parentCategory = parentCategory === 'mattresses' || parentCategory === 'pillows' || parentCategory === 'bedding' ? parentCategory : 'default';\r\n const dimensionRows = parentCategory === 'pillows' ? 1 : 2;\r\n const AttributeValues = productSpecificationData.result;\r\n const productPrice = props.state.productPrice?.CustomerContextualPrice;\r\n const originalPrice = props.state.productPrice?.AdjustedPrice;\r\n const discountValue = props.state.productPrice?.DiscountAmount;\r\n const productId = props.state.productPrice?.ProductId;\r\n const productIdPrefix = (props.app.config.productIdPrefix && props.app.config.productIdPrefix?.trim()) || '';\r\n const mfrmProductId = product.result?.ItemId ? `${productIdPrefix}${product.result?.ItemId}` : null;\r\n const [isLeaseActive, setLeasingButtonActive] = React.useState(true);\r\n const [activeVariantId, setActiveVariantId] = React.useState(productId);\r\n const [activeColorVariantId, setActiveColorVariantId] = React.useState(productId);\r\n const [outOfStockSmallParcelState, SetoutOfStockSmallParcelState] = React.useState(false);\r\n // call/chat product\r\n const isCallChatProduct = productSpecificationData.result?.find(attr => attr.Name?.trim().toLowerCase() === 'call/chat only')\r\n ?.BooleanValue;\r\n const sleepExpertSummaryText = productSpecificationData.result?.find(attr => attr.Name?.trim().toLowerCase() === 'sleep expert opinion')\r\n ?.TextValue;\r\n const tagsArr = _getBuyboxSEOMetaTags(AttributeValues);\r\n const [itemOutOfMarket, setItemOutOfMarket] = React.useState(false);\r\n const [variantOutOfStock, setVariantOutOfStock] = React.useState(false);\r\n const setActiveVariant = async (variantID: number) => {\r\n setActiveColorVariantId(variantID);\r\n setActiveSwatchSelected(variantID, variantOutOfStock, setVariantOutOfStock, props.state.variantAvailibilityList);\r\n if (outOfStockSmallParcelState) {\r\n await _smallParcelProductATPCallForInventoryStatus(props, props.data.product.result!.RecordId, props.data.product.result!.ItemId, SetoutOfStockSmallParcelState, true).then().catch();\r\n }\r\n };\r\n const categoryName = props.data.listPageStateBuyBox.result?.categoryName;\r\n const propsWithLeasingState = {\r\n ...props,\r\n setLeasingButtonActive,\r\n variantAvailibilityList: props.state.variantAvailibilityList,\r\n setActiveVariant,\r\n outOfStockSmallParcelState,\r\n setActiveVariantId\r\n };\r\n const renderDimensions = BuyboxProductConfigureMfrm(propsWithLeasingState);\r\n const showViewCartLink = props.showViewCartLink;\r\n /* VSI Customization - END */\r\n const isLoadedPriceComponent = (productPrice && (activeVariantId === product.result?.RecordId || activeColorVariantId === productId)) ? true : false;\r\n const isLoadedprogressiveLeasingEstimator = progressiveLeasingEstimator && productPrice ? true : false;\r\n return (\r\n \r\n {/* VSI Customization - START - 6432 */}\r\n \r\n {tagsArr?.map(\r\n (tag, index) =>\r\n tag?.content && \r\n )}\r\n \r\n\r\n {/* VSI Customization - END - 6432 */}\r\n \r\n {/* VSI Customization - START */}\r\n {productBadges}\r\n {/* VSI Customization - END */}\r\n {renderOOBMediaGallery ? mediaGallery : mfrmMediaGallery}\r\n \r\n\r\n {/* VSI Customization - END */}\r\n \r\n {/* VSI Customization - START */}\r\n \r\n {customerSatisfactionScore}\r\n {/* VSI Customization - END */}\r\n {title}\r\n {/* VSI Customization - START */}\r\n \r\n {mfrmProductId && (\r\n \r\n {mfrmProductId}\r\n \r\n )}\r\n {!props.context.app.config.hideRating && ratingComponent}\r\n \r\n {/* Financing Per Month Redesign code starts here */}\r\n { }\r\n {!isLoadedPriceComponent ?\r\n <>\r\n \r\n \r\n \r\n : \r\n }\r\n {isLoadedprogressiveLeasingEstimator ? (progressiveLeasingEstimator &&\r\n productPrice &&\r\n ) ||\r\n null : }\r\n {/* Financing Per Month Redesign code ends here */}\r\n {/*TODO: What is this*/}\r\n {inventoryLabel}\r\n {(props.state.isEyeBrowLoading) ? :\r\n }\r\n {/*Delivery By Message and Try In-store Redesign code starts here */}\r\n
\r\n \r\n {' '}\r\n {props.state.isStoreLoading ? : tryInStoreComponent}\r\n
\r\n {/*Delivery By Message and Try In-store Redesign code starts here */}\r\n {!props.state.currentProductDimensions?.length && <>\r\n \r\n
\r\n {[...Array(dimensionRows * 3)].map((i, x) => )}\r\n
\r\n \r\n
\r\n {[...Array(1 * 3)].map((i, x) => )}\r\n
}\r\n {renderDimensions}\r\n {chooseYourFoundationModule}\r\n {categoryName === \"Mattresses\" && completeYourBed}\r\n {/*TODO: What is this*/}\r\n {keyInPrice}\r\n <>\r\n {isCallChatProduct\r\n ? \r\n : addToCart &&\r\n }\r\n {showViewCartLink ? : null}\r\n \r\n {/*TODO: What is this*/}\r\n {findInStore && }\r\n
\r\n \r\n {shopSimilarLook}\r\n {mfrmStoreSelector?.[0]}\r\n {additionalModules}\r\n \r\n
\r\n {stylesAndDisruptorsModules}\r\n
\r\n
\r\n
\r\n );\r\n };\r\n\r\n{\r\n /* VSI Customization - START - 6432 */\r\n}\r\n\r\nconst _getBuyboxSEOMetaTags = (attributeValues: AttributeValue[] | undefined) => {\r\n const pageKeywords = _getSEOMetaTagValue(attributeValues, 'pageKeywords');\r\n const pageKeywordsParser = pageKeywords && getHtmlParserValue(pageKeywords);\r\n\r\n return [{ content: pageKeywordsParser?.toString(), name: 'keywords' }];\r\n};\r\n\r\nconst _getSEOMetaTagValue = (attributeValues: AttributeValue[] | undefined, keyValue: string) => {\r\n return attributeValues?.find(currAttribute => currAttribute.Name?.toLowerCase().trim() === keyValue?.toLowerCase().trim())?.TextValue;\r\n};\r\n\r\n\r\n{\r\n /* VSI Customization - END - 6432 */\r\n}\r\n\r\nexport default BuyboxView;\r\n","import { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { ProductDimensionValue } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport * as React from 'react';\r\nimport { IBuyboxGetDimensionPricingActionData } from '../../../data-actions/buybox-get-dimension-pricing-action';\r\nimport { IBuyboxGetDimensionVariantAvailabilityActionData } from '../../../data-actions/buybox-get-dimension-variants-availability-action';\r\nimport { fireAnalyticsLink } from '../../../Utilities/analytics/clickTrack';\r\nimport _getViewPort from '../../../Utilities/get-view-port';\r\nimport { _getActivePrices } from '../../../Utilities/mfrm-buybox-utils';\r\nimport { IBuyboxViewPropsExtended } from '../types';\r\nimport { IMfrmBuyboxProps } from '../mfrm-buybox.props.autogenerated';\r\nimport { IMfrmBuyBoxData } from '../mfrm-buybox.view';\r\nimport { BuyBoxSizeComponent } from './buybox-size-component';\r\nimport { BuyBoxSizeRedesignComponent } from './buybox-size-redesign-component';\r\nimport { Dropdown } from './dropdown/dropdown';\r\nimport { IDropdownItemProps } from './dropdown/dropdown.props';\r\nimport Listing from './listing';\r\nimport { HeightFoundationComponent } from './buybox-height-foundation-redesign-component';\r\n\r\nexport interface INotificationData {\r\n dropdownId: string;\r\n selectId: string;\r\n selectedValue: string;\r\n}\r\nexport interface IModalDimensions {\r\n selectId: string;\r\n selectedValue: string;\r\n dropdownId: string;\r\n dimensionPrice?: number;\r\n discountAmount?: number;\r\n percentDiff?: string;\r\n dimensionLabel?: string;\r\n}\r\n\r\nexport interface IProgressiveLeasingState {\r\n setLeasingButtonActive: React.Dispatch>;\r\n}\r\nexport interface IVariantAvailabilityProps {\r\n variantAvailibilityList: IBuyboxGetDimensionVariantAvailabilityActionData[];\r\n}\r\n\r\nexport interface IVariantSelected {\r\n setActiveVariant(variantID: number): void;\r\n}\r\n\r\nexport interface IFinancingPerMonthCallbacks {\r\n setActiveVariantId(selectedVariantId: number | undefined): void;\r\n}\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nexport const BuyboxProductConfigureMfrm: React.FC &\r\n IProgressiveLeasingState &\r\n IVariantAvailabilityProps &\r\n IVariantSelected &\r\n IFinancingPerMonthCallbacks> = props => {\r\n const [sizeVariantsLength, setSizeVariantsLength] = React.useState(0);\r\n const [isOpen, setIsOpen] = React.useState(false); // modal toggle state\r\n const [isMobile, setisMobile] = React.useState(false);\r\n const [selectedDisplayLabel, setselectedDisplayLabel] = React.useState();\r\n const [selectedDimensionLabel, setSelectedDimensionLabel] = React.useState();\r\n const [dimensionPrice, setDimensionPrice] = React.useState();\r\n const [discountAmount, setDiscountAmount] = React.useState();\r\n const [percentDiff, setPercentDiff] = React.useState();\r\n const [selectedSize, setSetlectedSize] = React.useState('');\r\n const selectedVariantId = props.variantAvailibilityList.find(\r\n item => item.sizeValue && item.sizeValue.toLowerCase().trim() === selectedSize.toLowerCase().trim() && item.variantID === props.data.product?.result?.RecordId\r\n )?.variantID;\r\n const modalDimensionsArray: IModalDimensions[] = [];\r\n let preSelectedDimension: IModalDimensions = {\r\n selectId: '',\r\n selectedValue: '',\r\n dropdownId: ''\r\n };\r\n const { context } = props;\r\n React.useEffect(() => {\r\n const viewPort = _getViewPort(context);\r\n viewPort === 'xs' || viewPort === 'sm' ? setisMobile(true) : setisMobile(false);\r\n }, []);\r\n\r\n // VSI Customization - START - 47026\r\n React.useEffect(() => {\r\n props.state.currentProductDimensions && props.state.currentProductDimensions.length > 0\r\n && props.state.currentProductDimensions?.map((dimension, i) => {\r\n const dropdownList: IDropdownItemProps[] = getDropdownList(dimension.DimensionValues);\r\n if (dimension && dimension.DimensionTypeValue === 3) {\r\n setSizeVariantsLength(dropdownList?.length ? dropdownList?.length : 0);\r\n }\r\n });\r\n }, [props.state.currentProductDimensions]);\r\n\r\n React.useEffect(() => {\r\n props.setActiveVariantId(selectedVariantId);\r\n }, [selectedVariantId]);\r\n\r\n const getDropdownList = (dimensionValues: ProductDimensionValue[] | undefined): IDropdownItemProps[] => {\r\n const dropdownList = dimensionValues && dimensionValues?.length > 0\r\n ? dimensionValues.map(dimensionValue => {\r\n return {\r\n value: dimensionValue.Value || '',\r\n id: dimensionValue.RecordId.toString(),\r\n selectedValue: (dimensionValue && dimensionValue.RecordId.toString()) || ''\r\n };\r\n })\r\n : [];\r\n return dropdownList;\r\n };\r\n // VSI Customization - END - 47026\r\n\r\n const {\r\n context: {\r\n request: {\r\n apiSettings: { baseImageUrl }\r\n }\r\n }\r\n } = props;\r\n const [activePrices, setActivePrices] = React.useState(props.data.dimensionPrices.result!);\r\n const [showColorPicker] = React.useState(\r\n !!props.data.productSpecificationData.result\r\n ?.find(attr => attr.Name?.toLowerCase().trim() === props.config.eComDisplayColorLabel?.toLowerCase().trim())\r\n ?.TextValue?.toLowerCase()\r\n );\r\n React.useEffect(() => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n _getActivePrices(props.data.dimensionPrices.result!, props.context.actionContext).then(resultPrices => {\r\n setActivePrices(resultPrices);\r\n }).catch(err => console.log('Error', err));\r\n }, [props.data.dimensionPrices.result]);\r\n\r\n const generateOnClick = (id: number, valueId: string, variantID: number) => async (e: React.MouseEvent) => {\r\n fireAnalyticsLink({\r\n eventName: 'PDP-card-action',\r\n eventCategory: 'PDP Card Action',\r\n eventAction: 'Change Color',\r\n eventLabel: 'Change Color PDP',\r\n eventNoninteraction: 'false',\r\n enhancedAction: 'change_color',\r\n generalConfig: { enhanced_action: 'change_color' }\r\n });\r\n await props.callbacks.dimensionSelectedAsync(id, valueId);\r\n };\r\n const dropdownCallback = (notification: INotificationData): Promise => {\r\n return new Promise((resolve, reject) => {\r\n resolve(props.callbacks.dimensionSelectedAsync(+notification.dropdownId, notification.selectId));\r\n });\r\n };\r\n const toggleBuyBoxModal = () => {\r\n setIsOpen(!isOpen);\r\n };\r\n const buyBoxModalAddItemClick = async (\r\n selectId: string,\r\n selectedValue: string,\r\n dropdownId: string,\r\n dimensionLabel?: string,\r\n isAddItemClick?: boolean\r\n ) => {\r\n setSetlectedSize(selectedValue);\r\n if (isAddItemClick) {\r\n fireAnalyticsLink({\r\n eventName: 'PDP-card-action',\r\n eventAction: 'Change Size',\r\n eventCategory: 'PDP Card Action',\r\n eventNoninteraction: 'false',\r\n eventLabel: 'Change Size PDP',\r\n enhancedAction: 'change_size',\r\n generalConfig: { enhanced_action: 'change_size' }\r\n });\r\n }\r\n setIsOpen(false);\r\n props.setLeasingButtonActive(false);\r\n setselectedDisplayLabel(selectedValue);\r\n setSelectedDimensionLabel(dimensionLabel);\r\n isAddItemClick ? await dropdownCallback({ selectId: selectId, selectedValue: selectedValue, dropdownId: dropdownId }) : null;\r\n props.setLeasingButtonActive(true);\r\n };\r\n const calculatePercentage = (dimPrice: number, discountAmnt: number) => {\r\n const percentSaved = Math.round((discountAmnt / dimPrice) * 100);\r\n setPercentDiff(percentSaved);\r\n setDiscountAmount(discountAmnt);\r\n setDimensionPrice(dimPrice);\r\n };\r\n const formatCurrency = (price: number | undefined): string | undefined => {\r\n if (price === undefined) {\r\n return undefined;\r\n }\r\n return props.context.cultureFormatter.formatCurrency(price);\r\n };\r\n // tslint:disable-next-line: max-func-body-length\r\n const output = props.state.currentProductDimensions && props.state.currentProductDimensions.length > 0\r\n ? props.state.currentProductDimensions?.map((dimension, i) => {\r\n const {\r\n data: {\r\n productSpecificationData: { result }\r\n },\r\n config: { eComDisplayColorAsDropDown, eComDisplayColorLabel }\r\n } = props;\r\n // tslint:disable-next-line: max-line-length\r\n const displayAsDropdown =\r\n result && eComDisplayColorAsDropDown\r\n ? result.find(obj => obj.Name && obj.Name.toLowerCase().trim() === eComDisplayColorAsDropDown.toLowerCase().trim())\r\n ?.BooleanValue\r\n : ''; // Get EcomDisplayColorAsDropDown value\r\n const dropDownDisplayLabel =\r\n result && eComDisplayColorLabel\r\n ? result.find(obj => obj.Name && obj.Name.toLowerCase().trim() === eComDisplayColorLabel.toLowerCase().trim())\r\n ?.TextValue\r\n : ''; // Get EcomDisplayColorLabel value\r\n const dropdownName = props.callbacks.getDropdownName(dimension.DimensionTypeValue, props.resources);\r\n const dropdownId = dimension.DimensionTypeValue.toString();\r\n const dropdownToggleName = props.resources.selectDimensionFormatString?.replace('{0}', dropdownName.toLowerCase());\r\n const swatchName = props.callbacks.getDropdownName(dimension.DimensionTypeValue, props.resources).toLowerCase();\r\n const dropdownList: IDropdownItemProps[] = getDropdownList(dimension.DimensionValues);\r\n if (dimension && dimension.DimensionTypeValue === 1) {\r\n const { DimensionTypeValue, DimensionValues, DimensionValue } = dimension;\r\n // check if type of dimension is height since it also has a DimensionTypeValue of 1\r\n // TODO: see if any other dimension types have a DimensionTypeValue of 1\r\n const doesSelectedValueExist = props.variantAvailibilityList.filter(item => item.colorDimensionRecordId === dimension.DimensionValue?.RecordId && item.sizeValue === selectedSize).length;\r\n const doesSelectedValueAvailable = props.variantAvailibilityList.find(item => item.colorDimensionRecordId === dimension.DimensionValue?.RecordId && item.sizeValue === selectedSize)?.isAvailable;\r\n const availableOptions = props.variantAvailibilityList.filter(item => item.sizeValue.toLowerCase().trim() === selectedSize.toLowerCase().trim()).map(item => item.secondaryDimensionValue);\r\n const availableDimensionValues = DimensionValues?.filter(item => availableOptions.includes(item.Value));\r\n const alternativeOption = props.variantAvailibilityList.find(item => item.sizeValue.toLowerCase().trim() === selectedSize.toLowerCase().trim() && item.isAvailable === true)?.secondaryDimensionValue;\r\n const dimensionValue = doesSelectedValueExist !== 0 && doesSelectedValueAvailable ? DimensionValue : DimensionValues?.find(item => item.Value === alternativeOption);\r\n const selectedValue = (dimension.DimensionValue && dimension.DimensionValue.RecordId) || 'not available';\r\n const isActive = selectedValue === DimensionValue?.RecordId;\r\n const isVariantSelectionRedesignEnabled = props.config.enableVariantSelectionRedesign || false;\r\n\r\n return (\r\n <>\r\n {(displayAsDropdown !== true || displayAsDropdown === null) && showColorPicker ?\r\n <>\r\n \r\n {props.config.enableVariantSelectionRedesign ?\r\n \r\n \r\n {`${dropdownName.toUpperCase()}: `}\r\n {isVariantSelectionRedesignEnabled && isActive ? dimensionValue?.DimensionId : ''}\r\n \r\n {`${availableDimensionValues?.length} Colors`}\r\n :\r\n \r\n {dropdownName} {dimensionValue && dimensionValue.Value ? ({dimensionValue.Value}) : false}\r\n \r\n }\r\n \r\n \r\n \r\n \r\n {/* Keep original Color Dropdown hidden for SEO */}\r\n \r\n {dropdownName}\r\n \r\n \r\n \r\n :\r\n null\r\n }\r\n {dropdownList.length > 1 && displayAsDropdown === true ?\r\n \r\n {props.config.enableVariantSelectionRedesign ? {`${dropDownDisplayLabel} :`} : {dropDownDisplayLabel}}\r\n {/* tslint:disable: max-line-length */}\r\n
\r\n {props.config.enableVariantSelectionRedesign ?\r\n :\r\n \r\n }\r\n
\r\n
\r\n :\r\n null\r\n }\r\n \r\n );\r\n\r\n } else if (dimension && dimension.DimensionTypeValue === 3) {\r\n const { DimensionValue } = dimension;\r\n\r\n dropdownList && dropdownList.length > 0 && dropdownList.forEach(item => {\r\n let damount = 0;\r\n let price = 0;\r\n let percent = '';\r\n let label;\r\n\r\n activePrices &&\r\n activePrices.forEach(size => {\r\n if (size.name === item.value) {\r\n price = size.price;\r\n label = size.dimensionLabel;\r\n if (size.discountAmount) {\r\n damount = size.discountAmount;\r\n percent = damount > 0 ? Math.round((damount / price) * 100).toString() : '';\r\n }\r\n }\r\n });\r\n if (item.value.trim().toLowerCase() === DimensionValue?.Value?.trim().toLowerCase()) {\r\n preSelectedDimension = {\r\n selectId: item.id,\r\n selectedValue: item.value,\r\n dropdownId: dropdownId,\r\n discountAmount: damount,\r\n dimensionPrice: price,\r\n percentDiff: percent,\r\n dimensionLabel: label\r\n };\r\n if ((discountAmount === undefined || discountAmount <= 0) && damount > 0) {\r\n setDiscountAmount(damount);\r\n const percentSaved = Math.round((damount / price) * 100);\r\n setPercentDiff(percentSaved);\r\n }\r\n }\r\n modalDimensionsArray.push({\r\n selectId: item.id,\r\n selectedValue: item.value,\r\n dropdownId: dropdownId,\r\n discountAmount: damount,\r\n dimensionPrice: price,\r\n percentDiff: percent,\r\n dimensionLabel: label\r\n });\r\n });\r\n\r\n // Hidden Size Dropdown with full dimensions for SEO\r\n const SEODropdownList = modalDimensionsArray.map(productDimension => {\r\n // tslint:disable-next-line: no-shadowed-variable\r\n const { dimensionLabel, dimensionPrice, selectId, selectedValue } = productDimension;\r\n // tslint:disable-next-line: no-unnecessary-local-variable\r\n const SEODropDownItem = {\r\n value: `${selectedValue} - ${dimensionLabel} - ${formatCurrency(dimensionPrice)}`,\r\n id: selectId,\r\n selectedValue: selectedValue\r\n };\r\n\r\n return SEODropDownItem;\r\n });\r\n return (// Keeping dropdown for ADA complianace hidden for now.\r\n \r\n {dropdownName}\r\n \r\n \r\n );\r\n } else {\r\n return (// Keeping dropdown for ADA complianace hidden for now.\r\n \r\n {dropdownName}\r\n \r\n \r\n );\r\n }\r\n }) : undefined;\r\n\r\n return (\r\n \r\n {!props.config.enableVariantSelectionRedesign ?\r\n <>\r\n \r\n {/* tslint:disable-next-line: cyclomatic-complexity */}\r\n {sizeVariantsLength === 1 || sizeVariantsLength === 0 ? (\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {selectedDisplayLabel ? selectedDisplayLabel : 'Select a Size'}\r\n
\r\n
{selectedDimensionLabel}
\r\n
\r\n \r\n {selectedDisplayLabel && discountAmount && dimensionPrice\r\n ? formatCurrency(dimensionPrice - discountAmount)\r\n : dimensionPrice\r\n ? formatCurrency(dimensionPrice)\r\n : ''\r\n }\r\n
\r\n
\r\n {selectedDisplayLabel && percentDiff && percentDiff !== 0 ? (\r\n {percentDiff}% Off\r\n ) : null}\r\n {selectedDisplayLabel && discountAmount ? (\r\n  {formatCurrency(dimensionPrice)}\r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n
\r\n ) : (\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {selectedDisplayLabel ? selectedDisplayLabel : 'Select a Size'}\r\n
\r\n
{selectedDimensionLabel}
\r\n
\r\n \r\n {selectedDisplayLabel && discountAmount && dimensionPrice\r\n ? formatCurrency(dimensionPrice - discountAmount)\r\n : formatCurrency(dimensionPrice)}\r\n
\r\n
\r\n {selectedDisplayLabel && percentDiff && percentDiff !== 0 ? (\r\n {percentDiff}% Off\r\n ) : null}\r\n {selectedDisplayLabel && discountAmount ? (\r\n  {formatCurrency(dimensionPrice)}\r\n ) : null}\r\n
\r\n
\r\n
\r\n \r\n
\r\n )}\r\n \r\n : <>\r\n {modalDimensionsArray.length !== 0 &&

Size: {preSelectedDimension?.dimensionLabel !== undefined && preSelectedDimension?.dimensionLabel}

}\r\n \r\n \r\n }\r\n {output}\r\n \r\n );\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['mfrm-buybox'] = {\n c: () => require('partner/modules/mfrm-buybox/mfrm-buybox.tsx'),\n $type: 'containerModule',\n da: [{name:'allProductVariants', path:'data-actions/buybox-get-all-variants-list', runOn: 0},{name:'allVariants', path:'data-actions/buybox-get-dimension-variants-availability-action', runOn: 0},{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 1},{name:'categoryPaths', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-category-paths', runOn: 0},{name:'completeYourBedPillow', path:'actions/complete-your-bed-pillow.action', runOn: 0},{name:'completeYourBedProtector', path:'actions/complete-your-bed-protector.action', runOn: 0},{name:'customerInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'deliveryOptions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-delivery-options-for-selected-variant', runOn: 0},{name:'dimensionPrices', path:'data-actions/buybox-get-dimension-pricing-action', runOn: 0},{name:'listPageStateBuyBox', path:'modules/mfrm-buybox/list-page-state-buybox', runOn: 0},{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0},{name:'productAvailableQuantity', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-product-availabilities-for-selected-variant', runOn: 0},{name:'productDimensions', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-dimensions-for-selected-variant', runOn: 0},{name:'productPrice', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-price-for-selected-variant', runOn: 0},{name:'productSpecificationData', path:'data-actions/get-attributes-for-selected-variant', runOn: 0},{name:'selectedFoundation', path:'actions/select-your-foundation.action', runOn: 0},{name:'storeSelectorState', path:'data-actions/store-selector-state-data-action', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-buybox',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-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-category-paths';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-category-paths');\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-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-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/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/complete-your-bed-pillow.action';\n let dataAction = require('partner/actions/complete-your-bed-pillow.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/complete-your-bed-protector.action';\n let dataAction = require('partner/actions/complete-your-bed-protector.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'actions/select-your-foundation.action';\n let dataAction = require('partner/actions/select-your-foundation.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/buybox-get-all-variants-list';\n let dataAction = require('partner/data-actions/buybox-get-all-variants-list');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/buybox-get-dimension-pricing-action';\n let dataAction = require('partner/data-actions/buybox-get-dimension-pricing-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/buybox-get-dimension-variants-availability-action';\n let dataAction = require('partner/data-actions/buybox-get-dimension-variants-availability-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/get-attributes-for-selected-variant';\n let dataAction = require('partner/data-actions/get-attributes-for-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/store-selector-state-data-action';\n let dataAction = require('partner/data-actions/store-selector-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/mfrm-buybox/list-page-state-buybox';\n let dataAction = require('partner/modules/mfrm-buybox/list-page-state-buybox');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mfrm-buybox|mfrm-buybox'] = {\n c: () => require('partner/modules/mfrm-buybox/mfrm-buybox.view.tsx'),\n cn: '__local__-__local__-mfrm-buybox'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["callUtag","async","callUtagLink","objToCall","Object","keys","forEach","key","utag","global","hasOwnProperty","link","e","console","log","callUtagView","view","getSetLocalStorage","getSet","valueToSet","returnType","MsDyn365","localStorage","setItem","JSON","stringify","parse","getItem","getSetProductData","products","getSetProductSpec","getSetPromoCodeApplyList","getSetPromoCode","getSetGrandTotal","total","getSetBonusItemProd","globalBonusItems","getSetSelectedBonasItem","bonusItemArray","getSetBonusCouponDetail","getCoupons","getSetPrevBonasModalState","previousBonasModal","getSetBonusItemBrandName","bonusItemsBrandName","getSetDateGroupedProducts","getSetExpressFlow","express","getSetWmapCartLines","getSetCartProductPrice","priceDetails","getSetParcelInventoryData","details","hasArray","values","length","undefined","value","parsedValue","parsedArr","ReactHtmlParser","toString","CompleteYourBedPillowInput","constructor","pillow","getCacheKey","getCacheObjectType","dataCacheType","this","Msdyn365","action","input","ctx","id","args","config","CompleteyourBedProtectorInput","protector","GetDeliveryMessageInput","isCached","ZipCode","ItemLines","ItemId","VariantRecordId","request","result","mFIATPInventoryAsync","callerContext","error","MFIPromotionExtensionClass","odataObject","DistinctProductVariant","EyeBrows","i","className","substr","lastIndexOf","concat","EntityClasses","ExtensionProperties","createMFIGetAvailablePromotionsDescriptionInput","queryResultSettings","availablePromotionsDescription","itemId","DataServiceQuery","DataServiceEntities","availablePromotionsDescriptionsQuery","resultSettings","createDataServiceRequestForOperation","bypassCache","returnEntity","GetEyebrowMessageInput","item","pageType","createCacheKey","Items","map","obj","join","context","callActionOrExecute","mFIGetAvailablePromotionsDescriptionAsync","Paging","Top","SelectYourFoundationInput","foundation","BuyboxGetDimensionPricingInput","productId","channelId","getDimensionPricingAction","pricingData","productResponse","getByIdAsync","baseProduct","Array","isArray","getVariantsByDimensionValuesAsync","MasterProductId","then","variants","dimensionsSizes","productIds","variant","Dimensions","dimension","DimensionTypeValue","sizeLabel","DimensionValue","Value","toLowerCase","trim","priceLabel","Price","dimensionLabel","extensionProperties","property","Key","StringValue","getHtmlParserValue","getDimensionLabel","price","RecordId","name","push","catch","telemetry","exception","Error","createObservableDataAction","inputData","requestContext","query","apiSettings","urlTokens","BuyboxGetDimensionVariantAvailabilityInput","getAllVariantsAction","fetchedVariants","variantAvailabilityData","variantID","sizeDimensionRecordID","colorDimensionRecordId","itemID","isAvailable","sizeValue","secondaryDimensionValue","StoreSelectorStateInput","storeSelectorStateAction","isModalOpen","prefferedStore","BuyboxCallChat","props","telOnClick","window","location","href","callChatPhoneNumber","toggleChatClick","setTimeout","eval","event","event_type","event_category","event_action","event_label","onTextChange","callChatMessage","target","React","Node","Text","text","editProps","onEdit","onClick","ListPageStateBuyBox","variantId","categoryName","productBrandName","productUrl","productImageUrl","productSize","__decorate","observable","ListPageStateBuyBoxInput","listPageStateAction","createListPageInput","BuyBoxSizeComponent","preSelection","isPreSelected","selectId","selectedValue","setSelectId","preSelectionPending","setPreSelectionPending","updatePricing","highlightId","highlightValue","highlightDimensionLabel","isAddItemClick","selectHighlightId","selectedDimensionLabel","discountAmount","dimensionPrice","modalDimensions","percentFunc","addItemClick","dropdownId","Modal","autoFocus","fade","isOpen","horizontalPosition","isMobile","verticalPosition","zIndex","toggle","onCloseModal","applicationNode","modalClassName","classnames","ModalHeader","ModalBody","idx","variantAvailibilityList","filter","parseInt","find","role","tabIndex","onKeyUp","keyCode","handleKeyPress","formatCurrencyFunc","percentDiff","outOfStockText","BuyBoxSizeRedesignComponent","sizeDimensions","isActive","isVariantAvailableAtAll","isAnyVariantAvailable","customVariantName","variantNameConfig","originalVariantName","variantNameMapObject","customizedVariantName","getCustomizedVariantName","variantMappingConfig","disabled","Dropdown","state","super","selectMenu","_onChanged","setState","selectedIndex","onChange","innerText","dimensionValue","payLoad","getPayloadObject","telemetryContent","dropdownName","componentDidMount","current","componentDidUpdate","preSelectionSet","render","dropdownList","dropdownToggleName","attribute","getTelemetryAttributes","ref","selected","hidden","dim","selectedSize","observer","baseImageUrl","generateOnClick","setActiveVariant","selectedValueAvailable","isVariantSelectionRedesignEnabled","swatchName","DimensionValues","index","recordID","currVariantID","availabilityList","dimensionId","DimensionId","replace","url","URL","isVariantIdNotAvailable","Number","getQueryParamsFromQueryByName","variantQueryStringName","element","document","getElementsByClassName","click","style","backgroundImage","slice","_renderSlashItem","HeightFoundationComponent","_handleOnClick","selectedId","dimensionName","dimensionList","classNames","currentVariantId","outOfStockSmallParcel","outOfStockBoolean","BuyboxErrorBlock","showError","configureErrors","quantityError","customAmountError","otherError","resources","errorMessages","message","Alert","color","assertive","buyboxErrorMessageHeader","_getProductType","shippingInformation","_isOrderQuantityLimitsFeatureEnabled","defaultOrderQuantityLimitsFeatureConfig","app","platform","enableDefaultOrderQuantityLimits","customerInfo","data","customerInformation","IsB2b","BuyboxAddToCart","addToCart","buyboxProps","variantOutOfStock","itemOutOfMarket","outOfStockSmallParcelState","adjustableItem","ContainerProps","mfrmAddToCart","defaultMinimumKeyInPrice","defaultMaximumKeyInPrice","typeName","product","productAvailableQuantity","productSpecificationData","categoryPaths","minimumKeyInPrice","maximumKeyInPrice","brandBackofficeAttributePdp","allCategoriesArr","categoryObj","Name","attributes","currAttribute","TextValue","quantity","errorState","errorHost","selectedProduct","isUpdatingDimension","isUpdatingDeliveryOptions","isServiceItem","keyInPriceAmount","allVariantOOS","ecomAllVairantStockInfoConcatenated","variantIdOOS","split","lastBreadcrumbCategoryLink","outOfStockValue","specificationData","outOfStockProductKey","shippingInformationSmall","attr","smallParcelAttributeKey","BooleanValue","checkSPAvailibility","some","productAvailability","ProductAvailableQuantity","dialogStrings","goToCartText","buyBoxGoToCartText","continueShoppingText","buyBoxContinueShoppingText","headerItemOneText","buyBoxSingleItemText","headerItemFormatText","buyBoxMultiLineItemFormatText","headerMessageText","buyBoxHeaderMessageText","freePriceText","priceFree","originalPriceText","currentPriceText","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","isLoading","status","callbacks","changeUpdatingDimension","isLoadingDeliveryOptions","deliveryOptions","changeUpdatingDeliveryOptions","getTelemetryObject","telemetryPageName","friendlyName","emailDeliveryModeCode","actionContext","channel","EmailDeliveryModeCode","isEmailDelivery","DeliveryOptions","ArrayExtensions","Code","successfulATC","button","AddToCartComponent","addToCartText","addToCartProductsText","mfrmOutOfStockCustomText","mfrmOutOfStockText","mfrmContinueShoppingText","mfrmContinueShoppingLink","mfrmOutOfStockSmallParcell","navigationUrl","getUrlSync","productPrice","onError","quantityErrorForState","customAmountErrorForState","otherErrorForState","getGenericError","cart","failureReason","getQuantityError","stockLeft","cartActionResult","substatus","formatedAmountLimit","cultureFormatter","formatCurrency","invalidSmallCustomAmountText","invalidLargeCustomAmountText","updateErrorState","getConfigureErrors","missingDimensions","IsGiftCard","getSelectedProduct","gridSettings","imageSettings","isAddServiceItemToCart","isPriceKeyedIn","customPriceAmount","isCustomPriceSelected","isOrderQuantityLimitsFeatureEnabled","isAddEmailDeliveryItemToCart","extensionProps","allProductVariants","productCategoryName","productBrand","updateSuccessfulATC","variantIdForTracking","errorBlock","mfrmgetBuyboxAddToCart","BuyboxViewCartLink","viewCartLink","viewCartLinkText","BuyboxSocialShare","socialShare","BuyboxFindInStore","storeSelector","heading","description","errors","modal","productPickupOptionList","SleepExpertSummaryComponent","sleepExpertOpinionHeadingText","sleepExpertSummaryText","tag","RichTextComponent","BuyboxSleepExpertSummary","titleHeadingTag","ProgressiveLeasingEstimatorRequestType","ProgressiveLeasingEstimatorPayFrequency","MfrmProgressiveLeasingEstimator","infoText","estimatorLink","progressiveLeasingEstimator","setModalStatus","useState","estimatorUrl","buildEstimatorURL","_closeModal","useEffect","iframe","querySelector","src","isLeaseActive","fireAnalyticsLink","eventName","eventCategory","eventAction","eventLabel","linkText","eventNoninteraction","preventDefault","ariaLabel","alt","type","sandbox","itemCost","storeId","requestType","payFrequency","approveMeName","approveMeSlugValue","estimatorURL","linkUrl","destinationUrl","requestTypeValue","getRequestType","searchParams","append","payFrequencyValue","getPayFrequency","stateCode","getStateCode","decodeURIComponent","pdp","checkoutPdp","frequency","weekly","biWeekly","semiMonthly","monthly","prefferedStoreData","parsedPrefferedStoreData","State","BuyboxProgressiveLeasingEstimator","leaseState","BuyboxFinancingPerMonth","originalPrice","discountValue","activeVariantId","activeColorVariantId","isLoadedPriceComponent","parentCategory","percentageDiscount","FinancingPerMonthComponent","sellingPrice","_getBuyboxSEOMetaTags","attributeValues","pageKeywords","_getSEOMetaTagValue","pageKeywordsParser","content","keyValue","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","findInStore","title","inventoryLabel","shopSimilarLook","keyInPrice","productBadges","ratingComponent","tryInStoreComponent","promotionalMessage","customerSatisfactionScore","renderOOBMediaGallery","slots","mfrmStoreSelector","mediaGallery","mfrmMediaGallery","additionalModules","stylesAndDisruptorsModules","chooseYourFoundationModule","completeYourBed","dimensionRows","AttributeValues","CustomerContextualPrice","AdjustedPrice","DiscountAmount","ProductId","productIdPrefix","mfrmProductId","setLeasingButtonActive","setActiveVariantId","setActiveColorVariantId","SetoutOfStockSmallParcelState","isCallChatProduct","tagsArr","setItemOutOfMarket","setVariantOutOfStock","listPageStateBuyBox","renderDimensions","sizeVariantsLength","setSizeVariantsLength","setIsOpen","setisMobile","selectedDisplayLabel","setselectedDisplayLabel","setSelectedDimensionLabel","setDimensionPrice","setDiscountAmount","setPercentDiff","setSetlectedSize","selectedVariantId","modalDimensionsArray","preSelectedDimension","viewPort","_getViewPort","currentProductDimensions","getDropdownList","dimensionValues","activePrices","setActivePrices","dimensionPrices","showColorPicker","eComDisplayColorLabel","_getActivePrices","resultPrices","err","valueId","enhancedAction","generalConfig","enhanced_action","dimensionSelectedAsync","dropdownCallback","notification","Promise","resolve","reject","toggleBuyBoxModal","buyBoxModalAddItemClick","calculatePercentage","dimPrice","discountAmnt","percentSaved","Math","round","output","eComDisplayColorAsDropDown","displayAsDropdown","dropDownDisplayLabel","getDropdownName","selectDimensionFormatString","doesSelectedValueExist","doesSelectedValueAvailable","availableOptions","availableDimensionValues","includes","alternativeOption","enableVariantSelectionRedesign","toUpperCase","Listing","label","damount","percent","size","SEODropdownList","productDimension","variantNameMapping","BuyboxProductConfigureMfrm","outOfStock","setOutOfStock","avList","variantsIDIter","setActiveSwatchSelected","_smallParcelProductATPCallForInventoryStatus","showViewCartLink","isLoadedprogressiveLeasingEstimator","Module","HtmlHeadInclude","hideRating","ErrorBoundary","CustomSkeleton","isEyeBrowLoading","BuyboxDeliveryByMessage","isStoreLoading","x","circle","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","path","runOn","iNM","ns","n","p","md","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","_readFromToCookie","storeInfo","preferredStore","_context","selectedStoreLocationId","storeName","writeToCookie","StoreId","StoreName","Latitude","Longitude","_writeToCookie","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","removeItem","cookieValue","computed","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","encodeURI","geolocationApiUrl","requestUrl","script","createElement","setAttribute","remove","resourceSets","point","coordinates","body","appendChild","StringExtensions","getElementById","lang","market","defer","mapAPIReady","isMapApiLoaded","addEventListener","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","getGenericAction","module","exports","ReactDOM"],"sourceRoot":""}