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C,wBCxBAsC,EAAOC,QAAUtpB,2BCAjBqpB,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/analytics/utagCaller.ts?3814","webpack://mattressfirm/./src/Utilities/cart-utils.ts?6ba1","webpack://mattressfirm/./src/Utilities/constants.ts?8bdf","webpack://mattressfirm/./src/Utilities/emtpyChecker.ts?e2f5","webpack://mattressfirm/./src/Utilities/enum.ts?dc36","webpack://mattressfirm/./src/Utilities/get-html-parser-value.ts?1fb6","webpack://mattressfirm/./src/Utilities/get-zipcode.ts?4f03","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/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/get-sm-inventory-status.action.ts?cb72","webpack://mattressfirm/./src/actions/product-compare-buybox-state-sharing.ts?5126","webpack://mattressfirm/./src/actions/select-your-foundation.action.ts?e743","webpack://mattressfirm/./src/common/cookies/cookie-utils.ts?68f7","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/data-actions/utilities/utils.ts?7452","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 master_customer_code?: string | null;\r\n order_number?: 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, { IActionContext } 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, CartLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { setCookie } from '../common/cookies/cookie-utils';\r\nimport { LocalStorageKeys, MFRMProductTypes } from './enum';\r\nimport { getByIdAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { IMfrmAddress } from '../modules/mfrm-checkout-shipping-address';\r\nimport { ICoreProductsCartData } from '../themes/mattressfirm/views/checkout.view';\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\nexport interface ICartIconData {\r\n iconUrl?: string;\r\n altText?: string;\r\n ariaLabel?: string;\r\n}\r\nexport interface IEyeBrowIcon {\r\n iconName?: string;\r\n iconURL?: string;\r\n}\r\n\r\nconst getSetLocalStorage = (key: string, getSet: string, valueToSet?: any, returnType?: any) => {\r\n // The type of the value to return (must be added).\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 const storedValue = localStorage.getItem(key);\r\n try {\r\n return storedValue ? JSON.parse(storedValue) : (returnType ?? \"\");\r\n } catch {\r\n // JSON.parse will throw an error If it's stored as string; return string value in that case\r\n return storedValue;\r\n }\r\n case 'remove':\r\n return localStorage.removeItem(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 products?.length && products.length > 0 && setCoreProductCookie(products); // Set cookie if it has core products\r\n return getSetLocalStorage('product_details', getSet, products, []);\r\n};\r\n\r\n// Following function sets cookie to check if cart has core item; Cookie is needed to access it on server side for skeleton on checkout\r\nconst setCoreProductCookie = (products: IProductDetails[]) => {\r\n for (const psp of products) {\r\n if (psp.typeOfProduct.toLowerCase().trim() === MFRMProductTypes.core) {\r\n setCookie('has-core-product', true);\r\n return;\r\n }\r\n }\r\n setCookie('has-core-product', false);\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 getSetSelectedBonusItem = (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\n\r\nexport const getSetParcelInventoryData = (getSet: string, details?: IParcelInventoryDetails[]) => {\r\n return getSetLocalStorage('parcel_inventory_details', getSet, details, []);\r\n};\r\n\r\nexport const getSetDropshipLatestDeliveryMsg = (getSet: string, msg?: string) => {\r\n return getSetLocalStorage(LocalStorageKeys.DropshipLatestDeliveryMsg, getSet, msg, '');\r\n};\r\n\r\nexport const getSetParcelLatestDeliveryMsg = (getSet: string, msg?: string) => {\r\n return getSetLocalStorage(LocalStorageKeys.ParcelLatestDeliveryMsg, getSet, msg, '');\r\n};\r\n\r\nexport const getSetCustomerPhone = (getSet: string, phone?: string) => {\r\n return getSetLocalStorage(LocalStorageKeys.CustomerPhone, getSet, phone, '');\r\n};\r\n\r\nexport const getSetSelectedDeliveryService = (getSet: string, phone?: string) => {\r\n return getSetLocalStorage(LocalStorageKeys.SelectedDeliveryService, getSet, phone, '');\r\n};\r\n\r\nexport const getSetCustomerBillingSameDelivery = (getSet: string, isSame?: string) => {\r\n return getSetLocalStorage(LocalStorageKeys.CustomerBillingSameDelivery, getSet, isSame, '');\r\n};\r\n\r\nexport const getSetRecycleFee = (getSet: string, fee?: string) => {\r\n return getSetLocalStorage(LocalStorageKeys.RecycleFee, getSet, fee, '');\r\n};\r\n\r\nexport const getSetSelectedDeliverySlot = (getSet: string, slot?: string) => {\r\n return getSetLocalStorage('selected_delivery_slot ', getSet, slot, '');\r\n};\r\n\r\nexport const getSetSelectedDeliveryDate = (getSet: string, date?: Date) => {\r\n return getSetLocalStorage('selected_delivery_date', getSet, date, '');\r\n};\r\nexport const getSetCoreProductDeliveryMsg = (getSet: string, msg?: string) => {\r\n return getSetLocalStorage('coreprod_deliverymsg', getSet, msg, '');\r\n};\r\n\r\nexport const getSetDefaultDeliverySelected = (getSet: string, selected?: boolean) => {\r\n return getSetLocalStorage('default_delivery_selected', getSet, selected, '');\r\n};\r\n\r\nexport const getSetTimeSlot = (getSet: string, selected?: string) => {\r\n return getSetLocalStorage('time_slot', getSet, selected, '');\r\n};\r\n\r\nexport const getSetDaySlot = (getSet: string, selected?: string) => {\r\n return getSetLocalStorage('day_slot', getSet, selected, '');\r\n};\r\n\r\nexport const getSetServiceName = (getSet: string, selected?: string) => {\r\n return getSetLocalStorage('service_name', getSet, selected, '');\r\n};\r\n\r\nexport const getSetSelectedServicePrice = (getSet: string, selected?: number) => {\r\n return getSetLocalStorage('selected_service_price', getSet, selected, 0);\r\n};\r\n\r\nexport const getSetCoreShippingMsg = (getSet: string, selected?: string) => {\r\n return getSetLocalStorage('core_shipping_msg', getSet, selected, '');\r\n};\r\n\r\nexport const getSetEcomMonthlyAmount = (getSet: string, selected?: number) => {\r\n return getSetLocalStorage('ecom_monthly_amount', getSet, selected, '');\r\n};\r\n\r\nexport const getSetExpressType = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('express-type', getSet, value, ''); /* Selected express payment method name; Also used in sales header attributes */\r\n};\r\n\r\nexport const getSetApplepayCheckoutError = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('applepay-checkout-error', getSet, value, ''); /* It indicates that retrieveCardPayment/checkout API for applepay is failed on the Cart/Checkout page, It displays error above the shipping address */\r\n};\r\n\r\nexport const getSetApplepayError = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('applepay-error', getSet, value, ''); /* It indicates that retrieveCardPayment API for applepay is failed on the Cart page, It displays error above the shipping address */\r\n};\r\n\r\nexport const getSetApplepayIFrameError = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('applepay-iframe-error', getSet, value, ''); /* It indicates that applepay iframe has an error and if its true; applepay button will not be shown and also stop showing loader for applepay */\r\n};\r\n\r\nexport const getSetGetCardApplepayPass = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('getcardapplepay-pass', getSet, value, ''); /* It indicates that getCardPaymentAcceptPoint() API gives success for applepay; If it's true, 'applepay-iframe-error' will be checked after that */\r\n};\r\n\r\nexport const getSetGetCardApplepayFail = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('getcardapplepay-fail', getSet, value, ''); /* It indicates that getCardPaymentAcceptPoint() API is failed for applepay; If it's true => 1. 'applepay-iframe-error' will be checked after that; 2. it'll display error on the respective page cart/checkout */\r\n};\r\n\r\nexport const getSetLoadExpress = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('loadExpress', getSet, value, ''); /* Avoid display loader on checkout page in case of express checkout */\r\n};\r\n\r\nexport const getSetPaypalCheckoutError = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('paypal-checkout-error', getSet, value, ''); /* It indicates that retrieveCardPayment/checkout API for paypal is failed on the Cart/Checkout page, It displays error above the shipping address */\r\n};\r\n\r\nexport const getSetPaypalError = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('paypal-error', getSet, value, ''); /* It indicates that retrieveCardPayment API for paypal is failed on the Cart page, It displays error above the shipping address */\r\n};\r\n\r\nexport const getSetPaypalIFrameError = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('paypal-iframe-error', getSet, value, ''); /* It indicates that paypal iframe has an error and if its true; paypal button will not be shown and also stop showing loader for paypal */\r\n};\r\n\r\nexport const getSetGetCardExpressPass = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('getcardexpress-pass', getSet, value, ''); /* It indicates that getCardPaymentAcceptPoint() API gives success for paypal; If it's true, 'paypal-iframe-error' will be checked after that */\r\n};\r\n\r\nexport const getSetGetCardExpressFail = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('getcardexpress-fail', getSet, value, ''); /* It indicates that getCardPaymentAcceptPoint() API is failed for paypal; If it's true => 1. 'paypal-iframe-error' will be checked after that; 2. it'll display error on the respective page cart/checkout */\r\n};\r\n\r\nexport const getSetExpressAddress = (getSet: string, value?: IMfrmAddress) => {\r\n return getSetLocalStorage('express-address', getSet, value, []); /* Address from express address is saved. If user updates it by clicking on edit customer info, updated address will be saved in it. But if user re-authenticate, it will reset the old address and will save the new one */\r\n};\r\n\r\nexport const getSetExpressPageLoad = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('express_page_load', getSet, value, ''); /* It checks if express checkout page is reloaded */\r\n};\r\n\r\nexport const getSetThankyou = (getSet: string, value?: any) => {\r\n return getSetLocalStorage('thankyou_payment_details', getSet, value, '');\r\n};\r\n\r\nexport const getSetEcomFinanceOption = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('Ecom_FinanceOption', getSet, value, '');\r\n};\r\n\r\nexport const getSetEcomFinancePlanId = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('Ecom_FinancePlanId', getSet, value, '');\r\n};\r\n\r\nexport const getSetCoreProdMsg = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('payment_review_latest_core_prod_msg', getSet, value, '');\r\n};\r\n\r\nexport const getSetBillingAddress = (getSet: string, value?: any) => {\r\n return getSetLocalStorage('billing_address', getSet, value, {});\r\n};\r\n\r\nexport const getSetPaymentLoader = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('paymentloader', getSet, value, '');\r\n};\r\n\r\nexport const getSetLastPaymentConnector = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('lastPaymentConnector', getSet, value, '');\r\n};\r\n\r\nexport const getSetPaymentRadioName = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('payment_radio_name', getSet, value, '');\r\n};\r\n\r\nexport const getSetPaymentRadioIndex = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('payment_radio_index', getSet, value, '');\r\n};\r\n\r\nexport const getSetSelectedPaymentRadio = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('selectedPaymentRadio', getSet, value, '');\r\n};\r\n\r\nexport const getSetPaymentInfoForOCPage = (getSet: string, value?: any) => {\r\n return getSetLocalStorage('temp_card_payment_info_for_order_confirmation', getSet, value, '');\r\n};\r\n\r\nexport const getSetCurrentStep = (getSet: string, value?: number) => {\r\n return getSetLocalStorage('current_step', getSet, value, 0);\r\n};\r\n\r\nexport const getSetCheckoutCurrentStep = (getSet: string, value?: number) => {\r\n return getSetLocalStorage('checkout_current_step', getSet, value, 0);\r\n};\r\n\r\nexport const getSetCartCoreProductInfo = (getSet: string, value?: ICoreProductsCartData[]) => {\r\n return getSetLocalStorage('cart_core_prods_info', getSet, value, []);\r\n};\r\n\r\nexport const getSetUpdatedEmail = (getSet: string, value?: string) => {\r\n return getSetLocalStorage('updated_email ', getSet, value, '');\r\n};\r\n\r\nexport const getSetSelectedDeliverySlotZone = (getSet: string, zone?: string) => {\r\n return getSetLocalStorage('selected_delivery_slot_zone ', getSet, zone, '');\r\n};\r\n\r\nconst processCartLine = async (cartLine: CartLine, actionContext: IActionContext, channelId: number) => {\r\n try {\r\n const productResponse = await getByIdAsync(\r\n {callerContext: actionContext, queryResultSettings: {Paging: {Top: 1}}},\r\n cartLine.ProductId || 0,\r\n channelId\r\n );\r\n\r\n if (productResponse?.DefaultUnitOfMeasure) {\r\n // Adding unit of measure for order confirmation emails to get Ecom_variantId attribute\r\n cartLine.UnitOfMeasureSymbol = productResponse.DefaultUnitOfMeasure;\r\n return cartLine;\r\n } else {\r\n // Handle the case where DefaultUnitOfMeasure is not available\r\n return cartLine;\r\n }\r\n } catch (error) {\r\n // Handle errors if getByIdAsync fails for a specific productId\r\n console.error(`Error processing ProductId ${cartLine.ProductId}: ${error.message}`);\r\n return cartLine;\r\n }\r\n};\r\n\r\nexport const addUnitOfMeasureInAddCartLine = async (cartLines: CartLine[], actionContext: IActionContext, channelId: number) => {\r\n const promises = cartLines\r\n .filter((cartLine: any) => !cartLine.DefaultUnitOfMeasure)\r\n .map((cartLine: any) => processCartLine(cartLine, actionContext, channelId));\r\n\r\n try {\r\n return await Promise.all(promises);\r\n } catch (error) {\r\n // Handle errors if any of the promises fail\r\n console.error(`Error processing cartLines: ${error}`);\r\n return cartLines;\r\n }\r\n};","export const variantQueryStringName = 'variantid';","// tslint:disable\r\nexport const hasArray = (values: any): any[] | undefined => {\r\n return (typeof values !== 'string') && values && values.length ? values : undefined;\r\n};","/* MFRMProductTypes enum is used to check/compare the product type with product_details cookie\r\nby converting it to lower case used mainly in \"conditional statements\" */\r\nexport enum MFRMProductTypes {\r\n core = 'core',\r\n smallParcel = 'parcel',\r\n dropShip = 'drop ship'\r\n}\r\n\r\n// DeliveryModes enum is used to pass the modOfDelivery value in \"API payloads\"\r\nexport enum DeliveryModes {\r\n core = 'Delivery',\r\n smallParcel = 'Parcel',\r\n dropShip = 'Drop Ship'\r\n}\r\n\r\n// Enum for Delivery Date details messages show on cart page.\r\nexport enum DeliveryDateDetails {\r\n DeliveryToday = 'Delivery by Today',\r\n DeliveryTomorrow = 'Delivery by Tomorrow',\r\n DeliveryBy = 'Delivery by',\r\n AvailableYes = 'yes'\r\n}\r\n\r\n// coreItemShippingType constant value is used to compare the shipping type of core products\r\nexport const coreItemShippingType = 'delivery';\r\n\r\nexport enum EyeBrowMessage {\r\n BestSeller = \"Best Seller\",\r\n SleepExpertPick = \"Sleep Expert® Pick\",\r\n OnlyAtMattressFirm = \"Only at Mattress Firm\",\r\n SleepScoreValidated = \"Sleep score validated\",\r\n PLPRibbon = \"Best Seller\",\r\n}\r\n\r\nexport enum EyeBrowAttributeName {\r\n BestSeller = 'BestSeller',\r\n SE_Pick = 'SE_Pick',\r\n IsExclusive = 'IsExclusive',\r\n SleepScore = 'SleepScore',\r\n PLP_Ribbon = 'PLP_Ribbon',\r\n}\r\n// this text is sent to rating component on cart page (as it is used on cart page so sending cart module name)\r\nexport const cartModuleName = 'mfrm-cart';\r\n\r\n// Define an enum for local storage keys\r\nexport enum LocalStorageKeys {\r\n DropshipLatestDeliveryMsg = 'payment_review_dropship_latest_del_msg',\r\n ParcelLatestDeliveryMsg = 'payment_review_parcel_latest_del_msg',\r\n CustomerPhone = 'customer_phone',\r\n SelectedDeliveryService = 'selected_delivery_service',\r\n CustomerBillingSameDelivery = 'is_customer_billing_same_as_delivery',\r\n RecycleFee = 'recycleFee'\r\n}\r\n// this text is using for progressive value\r\nexport const progressiveName = 'Progressive';","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;","import { IActionContext } from '@msdyn365-commerce/core';\r\nimport Cookies from 'universal-cookie';\r\nexport const getZipCode = (ctx: IActionContext): string | undefined => {\r\n //@ts-ignore\r\n const geolocationZipCode = ctx.requestContext.geoLocation?.zipCode ? ctx.requestContext.geoLocation.zipCode : ctx.requestContext.geoLocation?.res?.zipCode;\r\n const cookie = new Cookies();\r\n const zipcode = cookie.get('zip_code') ? cookie.get('zip_code') : geolocationZipCode;\r\n return zipcode ?? undefined;\r\n};\r\nexport const getGeoLocationZipCode = (ctx: IActionContext): string | undefined => {\r\n //@ts-ignore\r\n const zipCode = ctx.requestContext.geoLocation?.zipCode ? ctx.requestContext.geoLocation.zipCode : ctx.requestContext.geoLocation?.res?.zipCode;\r\n return zipCode ?? null;\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 * 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","// 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. 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 { mFIATPInventoryStatusAsync } from './CoreProductDataActionExtension.g';\r\nimport { IMFIATPInventoryStatusResponse, IMFICLDeliveryScheduleParameters } from './CoreProductDataServiceEntities.g';\r\n\r\n/**\r\n * Small parcel getInventory status Input Action\r\n */\r\n\r\nexport class GetATPInventoryStatusInput 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 const key = Array.prototype.map.call(this.input.ItemLines, (item) => { return item.VariantRecordId; }).sort().join(\",\");\r\n return `Get-Inventory-Status${this.input.ZipCode}-${this.input.ItemLines![0].ItemId}-${key}-${\r\n this.input?.Weeks\r\n }-${this.input?.RequestedDate}`;\r\n };\r\n // public getCacheKey = () => 'do';\r\n public getCacheObjectType = () => 'GetATPInventoryStatusResult';\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 getATPInventoryStatusAction(\r\n request: GetATPInventoryStatusInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.input) {\r\n try {\r\n const result = await mFIATPInventoryStatusAsync({ 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: >getATPInventoryStatusAction,\r\n // Give your data action a unique id\r\n id: 'GetATPInventoryStatus'\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 { observable } from 'mobx';\r\n/**\r\n * SelectYourFoundation Input Action\r\n */\r\nexport class ProductCompareBuyboxStateSharing implements Msdyn365.IActionInput {\r\n @observable public zipCode?: string | undefined;\r\n // Construct the input needed to run the action\r\n constructor(zipCode: string | undefined) {\r\n this.zipCode = zipCode;\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 = () => `ProductCompareBuyboxStateSharing`;\r\n public getCacheObjectType = () => 'ProductCompareBuyboxStateSharing';\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 zipCode: string | undefined;\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 ProductCompareBuyboxStateSharing(args?.config?.zipCode);\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: ProductCompareBuyboxStateSharing, 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 { zipCode: input.zipCode };\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: 'ProductCompareBuyboxStateSharing',\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 * 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","import Cookies from 'universal-cookie';\r\n\r\nconst cookies = new Cookies();\r\n\r\n// use this function to get cookie\r\nexport function getCookie(cookieName: string): string | undefined {\r\n return cookies.get(cookieName);\r\n}\r\n\r\n// use this function to set cookie\r\nexport function setCookie(cookieName: string, cookieValue: any, options?: any): void {\r\n cookies.set(cookieName, cookieValue, options);\r\n}\r\n\r\n// use this function to remove cookie\r\nexport function removeCookie(cookieName: string, options?: any): void {\r\n cookies.remove(cookieName, options);\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 id: 'DimensionPrices',\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 id: 'VariantIDs',\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 id: 'StoreSelectorState',\r\n action: >storeSelectorStateAction,\r\n input: createInput\r\n});\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IAny, ICommerceApiSettings, ICoreContext, ICreateActionContext, IGeneric, IRequestContext } from '@msdyn365-commerce/core';\r\nimport {\r\n AsyncResult, CartLine, CommerceListLine, ProductDimension,\r\n ProductDimensionType, ProductSearchResult, SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ProductDetailsCriteria, InventoryLevels, ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { variantQueryStringName } from '../../Utilities/constants';\r\n// import { parseSearchData } from '@msdyn365-commerce-modules/retail-actions/src/utilities/input-data-parser';\r\n\r\nexport const wrapInResolvedAsyncResult = (input: T | null | undefined): AsyncResult => {\r\n return >{\r\n status: 'SUCCESS',\r\n result: input,\r\n metadata: {}\r\n };\r\n};\r\n\r\nexport const wrapInRejectedAsyncResult = (input: T | null | undefined): AsyncResult => {\r\n return >{\r\n status: 'FAILED',\r\n result: input,\r\n metadata: {}\r\n };\r\n};\r\n\r\n\r\n/**\r\n * Utility function to extract the active productId in the following priority:\r\n * First query param (productId), then UrlToken (itemId), then module config.\r\n * @param inputData - The Action Input data.\r\n * @returns Productid or undefined.\r\n */\r\nexport const getSelectedProductIdFromActionInput = (inputData: ICreateActionContext>): string | undefined => {\r\n const context = inputData.requestContext;\r\n const variantId = context.app.config.queryBasedVariantSelection ? getQueryParamsFromQueryByName(context.url.requestUrl, variantQueryStringName) : undefined;\r\n\r\n if (variantId) {\r\n return variantId;\r\n } else if (context.query?.productId) {\r\n return context.query.productId;\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Exsiting code.\r\n } else if (context.urlTokens && inputData.requestContext.urlTokens.itemId && inputData.requestContext.urlTokens.pageType === 'Product') {\r\n return context.urlTokens.itemId;\r\n } else if (inputData && inputData.config && inputData.config.productId) {\r\n return inputData.config.productId;\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const getQueryParamsFromQueryByName = (inputUrl: URL, queryParamName: string) => {\r\n const urlWithIgnoredCase = new URL(inputUrl.toString().toLocaleLowerCase());\r\n const urlParameters = urlWithIgnoredCase.searchParams;\r\n const value = urlParameters.get(queryParamName.trim().toLocaleLowerCase());\r\n if (!value || Number.isNaN(Number(value))) {\r\n return undefined;\r\n }\r\n return value;\r\n};\r\n/**\r\n * Generates a Image URL based on data return from retail server.\r\n * @param imageUrl The image url returned by Retail Server.\r\n * @param ctx The request context.\r\n * @param apiSettings\r\n */\r\nexport const generateImageUrl = (imageUrl: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\r\n if (imageUrl) {\r\n // Images hosted in CMS include schema\r\n if (imageUrl.startsWith('http')) {\r\n return imageUrl;\r\n }\r\n\r\n // Images hosted in Retail Server must be encoded and joined with the base image url\r\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\r\n }\r\n\r\n // D365Commerce.telemetry.warning(`Unable to generate a proper Image URL for Product: ${product.RecordId}`);\r\n return undefined;\r\n\r\n};\r\n\r\n/**\r\n * Represents app configuration for dimensions.\r\n */\r\nexport interface IDimensionsConfig {\r\n dimensionsAsSwatchType?: DimensionTypes[];\r\n dimensionsInProductCard?: DimensionTypes[];\r\n inventoryLevel?: InventoryLevels;\r\n dimensionToPreSelectInProductCard?: DimensionTypes;\r\n}\r\n\r\n/**\r\n * Represents app configuration for dimensions.\r\n */\r\nexport interface IDimensionsApp {\r\n config: IDimensionsConfig;\r\n}\r\n\r\n/**\r\n * Represents product dimension types.\r\n */\r\nexport enum DimensionTypes {\r\n none = 'none',\r\n color = 'color',\r\n configuration = 'configuration',\r\n size = 'size',\r\n style = 'style'\r\n}\r\n\r\n/**\r\n * Defines display configuration types.\r\n */\r\nexport enum DimensionSwatchDisplayTypes {\r\n default = 'default',\r\n productCard = 'productCard'\r\n}\r\n\r\n/**\r\n * Checks if rendering the particular dimensions is allowed.\r\n * @param dimensionType - Dimension to be displayed.\r\n * @param context - Core application context.\r\n * @param displayType - The swatch location, the component from which it comes from.\r\n * @returns Updates the state with new product page url.\r\n */\r\nexport const checkIfShouldDisplayAsSwatch = (\r\n dimensionType: DimensionTypes,\r\n context: ICoreContext,\r\n displayType: DimensionSwatchDisplayTypes = DimensionSwatchDisplayTypes.default): boolean => {\r\n\r\n // Additional checks for the product card since it has a separate config setting.\r\n if (displayType === DimensionSwatchDisplayTypes.productCard) {\r\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\r\n if (!ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) ||\r\n dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) ||\r\n !dimensionsToDisplayOnProductCard.includes(dimensionType)) {\r\n return false;\r\n }\r\n }\r\n\r\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\r\n return ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\r\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\r\n dimensionsToDisplayAsSwatch.includes(dimensionType);\r\n};\r\n\r\n/**\r\n * Generates an image URL for a swatch.\r\n * @param imageUrl - The image url returned by Retail Server.\r\n * @param apiSettings - The request context.\r\n * @returns Full image url.\r\n */\r\nexport const generateSwatchImageUrl = (imageUrl: string, apiSettings: ICommerceApiSettings): string => {\r\n if (imageUrl.startsWith('http')) {\r\n return imageUrl;\r\n }\r\n\r\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\r\n};\r\n\r\n/**\r\n * Generates a Image URL for a product based on data return from retail server.\r\n * @param product The Product returned by Retail Server.\r\n * @param ctx The request context.\r\n * @param apiSettings\r\n */\r\nexport const generateProductImageUrl = (\r\n product: SimpleProduct | ProductSearchResult,\r\n apiSettings: ICommerceApiSettings\r\n): string | undefined => {\r\n return generateImageUrl(product.PrimaryImageUrl, apiSettings);\r\n};\r\n\r\n/**\r\n * Creates a CartLine object from the passed data.\r\n * @param product The product.\r\n * @param quantity The quantity.\r\n * @param catalogId The catalog.\r\n */\r\nexport const buildCartLine = (product: SimpleProduct, quantity?: number, catalogId?: number): CartLine => {\r\n return {\r\n CatalogId: catalogId || 0,\r\n Description: product.Description,\r\n\r\n // TODO: Investigate this value and what it represents\r\n EntryMethodTypeValue: 3,\r\n ItemId: product.ItemId,\r\n ProductId: product.RecordId,\r\n Quantity: quantity || 1,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure\r\n };\r\n};\r\n\r\n/**\r\n * Creates a CommerceListLine (also know as WishlistLine) object from the passed data.\r\n * @param productId The RecordId of the Product to be added.\r\n * @param customerId The account number of the customer.\r\n * @param wishlistId The Id of the commerce list.\r\n */\r\nexport const buildWishlistLine = (productId: number, customerId: string, wishlistId: number): CommerceListLine => {\r\n return {\r\n CommerceListId: wishlistId,\r\n ProductId: productId,\r\n CustomerId: customerId\r\n };\r\n};\r\n\r\n/**\r\n * Utility function to prepare the product details criteria before getting full product:\r\n * @param inputData The Action Input data\r\n */\r\nexport const getProductDetailsCriteriaFromActionInput = (inputData: ICreateActionContext>): ProductDetailsCriteria => {\r\n if (inputData && inputData.config) {\r\n return {\r\n getPrice: !inputData.config.hidePrice,\r\n getRating: !inputData.config.hideRating\r\n };\r\n }\r\n return {\r\n getPrice: true,\r\n getRating: true\r\n };\r\n};\r\n\r\n/**\r\n * Transforms search text into the expected 'search terms' format, expected by refiner APIs.\r\n * @param searchText Free-form text used for searching for products or categories of products.\r\n */\r\nexport const ensureSearchTextIsFormedProperly = (searchText: string): string => {\r\n const prefix = searchText.startsWith('\\'') ? '' : '\\'';\r\n const suffix = searchText.endsWith('\\'') ? '' : '\\'';\r\n return `${prefix}${searchText}${suffix}`;\r\n};\r\n\r\nexport const ensureSafeSearchText = (searchText: string): string => {\r\n return searchText?.replace(/[^\\d\\sA-Za-z]+/g, '');\r\n};\r\n\r\nexport const buildCacheKey = (base: string, apiSettings: ICommerceApiSettings, locale?: string): string => {\r\n return `${base}-chanId:${apiSettings.channelId}-catId:${apiSettings.catalogId}${locale ? `-${locale}` : ''}`;\r\n};\r\n\r\nexport const buildCacheKeyWithUrlTokens = (base: string, requestContext: IRequestContext): string => {\r\n const urlTokens = requestContext.urlTokens;\r\n const defaultCacheKey = buildCacheKey(base, requestContext.apiSettings, requestContext.locale);\r\n return urlTokens ? `${defaultCacheKey}-${urlTokens.itemId}-${urlTokens.recordId}-${urlTokens.pageType}` : defaultCacheKey;\r\n};\r\n\r\n/**\r\n * Generates a key from set of arguments as inputs.\r\n *\r\n * @param args Argument list of pivots to generate key from.\r\n * @param handler Handler function for null/undefined values.\r\n */\r\n\r\ntype TKeyTypes = string | number | boolean | null | undefined;\r\ninterface IGenerateKeyOptions {\r\n separator?: string;\r\n handler?(input: null | undefined): string;\r\n}\r\nexport const generateKey = (args: TKeyTypes[], options?: IGenerateKeyOptions): string => {\r\n const { handler, separator }: IGenerateKeyOptions = { ...{ separator: '-', handler: undefined }, ...(options || {}) };\r\n return args\r\n .map(arg => {\r\n if (arg === null || arg === undefined) {\r\n if (handler) {\r\n return handler(arg);\r\n }\r\n }\r\n return arg;\r\n })\r\n .join(separator);\r\n};\r\n\r\n/**\r\n * Gets the fall back image url for a variant image.\r\n * @param itemId Item id of a product.\r\n * @param apiSettings Api setting from request context.\r\n */\r\nexport const getFallbackImageUrl = (itemId: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\r\n if (!itemId) {\r\n return '';\r\n }\r\n\r\n const parsedItemId = itemId.trim().split(' ')[0];\r\n\r\n const productUrl = `Products/${parsedItemId}_000_001.png`;\r\n return generateImageUrl(productUrl, apiSettings);\r\n};\r\n\r\n/**\r\n * Converts retail proxy product dimension type to display dimension type.\r\n * @param productDimensionType - Product dimension type from retail proxy.\r\n * @returns Local dimension type.\r\n */\r\nexport const convertProductDimensionTypeToDimensionTypes = (productDimensionType: ProductDimensionType): DimensionTypes => {\r\n switch (productDimensionType) {\r\n case ProductDimensionType.Color:\r\n return DimensionTypes.color;\r\n case ProductDimensionType.Configuration:\r\n return DimensionTypes.configuration;\r\n case ProductDimensionType.Size:\r\n return DimensionTypes.size;\r\n case ProductDimensionType.Style:\r\n return DimensionTypes.style;\r\n default:\r\n return DimensionTypes.none;\r\n }\r\n};\r\n\r\n/**\r\n * Converts display dimension type to retail proxy product dimension type.\r\n * @param dimensionType - Local dimension type.\r\n * @returns Product dimension type from retail proxy.\r\n */\r\nexport const convertDimensionTypeToProductDimensionType = (dimensionType: DimensionTypes): ProductDimensionType => {\r\n switch (dimensionType) {\r\n case DimensionTypes.color:\r\n return ProductDimensionType.Color;\r\n case DimensionTypes.configuration:\r\n return ProductDimensionType.Configuration;\r\n case DimensionTypes.size:\r\n return ProductDimensionType.Size;\r\n case DimensionTypes.style:\r\n return ProductDimensionType.Style;\r\n default:\r\n return ProductDimensionType.None;\r\n }\r\n};\r\n\r\n/**\r\n * Sets dimensions to url.\r\n * @param inputUrl - Url to update.\r\n * @param productDimensions - Dimensions to set.\r\n */\r\nexport const setDimensionValuesToQuery = (inputUrl: URL, productDimensions: ProductDimension[]): void => {\r\n for (const dimension of productDimensions) {\r\n inputUrl.searchParams.set(\r\n convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue), dimension.DimensionValue?.Value ?? '');\r\n }\r\n\r\n window.history?.replaceState(window.history.state, '', inputUrl.toString()?.replace(inputUrl.host, window.location.host));\r\n};\r\n\r\n/**\r\n * Retrieves dimension value stored in url.\r\n * @param urlParameters - Url parameters.\r\n * @param productDimensionType - The dimension type to retrieve.\r\n * @returns Product dimension item.\r\n */\r\nconst parseDimensionFromUrl = (urlParameters: URLSearchParams, productDimensionType: ProductDimensionType): ProductDimension | undefined => {\r\n const localDimensionType = convertProductDimensionTypeToDimensionTypes(productDimensionType);\r\n const value = urlParameters.get(localDimensionType);\r\n if (!value) {\r\n return undefined;\r\n }\r\n return {\r\n DimensionTypeValue: productDimensionType,\r\n DimensionValue: {\r\n RecordId: 0,\r\n Value: value\r\n }\r\n };\r\n};\r\n\r\n/**\r\n * Retrieves all dimensions from URL.\r\n * @param urlParameters - Url parameters.\r\n * @returns Product dimensions stored in url.\r\n */\r\nconst parseDimensionsFromUrl = (urlParameters: URLSearchParams): ProductDimension[] => {\r\n const dimensionsToParse: ProductDimensionType[] = [\r\n ProductDimensionType.Color,\r\n ProductDimensionType.Configuration,\r\n ProductDimensionType.Size,\r\n ProductDimensionType.Style\r\n ];\r\n const parsedDimensions = dimensionsToParse.map(dimension => parseDimensionFromUrl(urlParameters, dimension));\r\n return ArrayExtensions.validValues(parsedDimensions);\r\n};\r\n\r\n/**\r\n * Utility function to extract the dimension values from input url querystring.\r\n * @param inputUrl - The request url.\r\n * @returns The selected dimension values.\r\n */\r\nexport const getDimensionValuesFromQuery = (inputUrl: URL): ProductDimension[] => {\r\n const urlWithIgnoredCase = new URL(inputUrl.toString().toLocaleLowerCase());\r\n const urlParameters = urlWithIgnoredCase.searchParams;\r\n const dimensions: ProductDimension[] = parseDimensionsFromUrl(urlParameters);\r\n return dimensions;\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 productPrice: { result: productPrice },\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\nimport useVwoClientInstance from '../../common/hooks/useVwoClientInstance';\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 // VWO Tracking\r\n const {vwoAccountId, vwoSdkKey} = props.app.config;\r\n if( vwoAccountId && vwoSdkKey ){\r\n const [ vwoClientInstance, vwoUserId ] = useVwoClientInstance(vwoAccountId, vwoSdkKey );\r\n if( vwoClientInstance ){\r\n const campaignKey = null;\r\n const userId = vwoUserId;\r\n vwoClientInstance.track(campaignKey, userId, 'pdpPageviews');\r\n }\r\n }\r\n\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","isBrowser","localStorage","setItem","JSON","stringify","storedValue","getItem","parse","_unused","removeItem","getSetProductData","products","length","setCoreProductCookie","psp","typeOfProduct","toLowerCase","trim","MFRMProductTypes","core","setCookie","getSetProductSpec","getSetPromoCodeApplyList","getSetPromoCode","getSetGrandTotal","total","getSetBonusItemProd","globalBonusItems","getSetSelectedBonusItem","bonusItemArray","getSetBonusCouponDetail","getCoupons","getSetPrevBonasModalState","previousBonasModal","getSetBonusItemBrandName","bonusItemsBrandName","getSetDateGroupedProducts","getSetExpressFlow","express","getSetWmapCartLines","getSetCartProductPrice","priceDetails","getSetParcelInventoryData","details","getSetDropshipLatestDeliveryMsg","msg","LocalStorageKeys","DropshipLatestDeliveryMsg","getSetParcelLatestDeliveryMsg","ParcelLatestDeliveryMsg","getSetCustomerPhone","phone","CustomerPhone","getSetSelectedDeliveryService","SelectedDeliveryService","getSetCustomerBillingSameDelivery","isSame","CustomerBillingSameDelivery","getSetRecycleFee","fee","RecycleFee","getSetSelectedDeliverySlot","slot","getSetSelectedDeliveryDate","date","getSetCoreProductDeliveryMsg","getSetDefaultDeliverySelected","selected","getSetTimeSlot","getSetDaySlot","getSetServiceName","getSetSelectedServicePrice","getSetCoreShippingMsg","getSetEcomMonthlyAmount","getSetExpressType","value","getSetApplepayCheckoutError","getSetApplepayError","getSetApplepayIFrameError","getSetGetCardApplepayPass","getSetGetCardApplepayFail","getSetLoadExpress","getSetPaypalCheckoutError","getSetPaypalError","getSetPaypalIFrameError","getSetGetCardExpressPass","getSetGetCardExpressFail","getSetExpressAddress","getSetExpressPageLoad","getSetThankyou","getSetEcomFinanceOption","getSetEcomFinancePlanId","getSetCoreProdMsg","getSetBillingAddress","getSetPaymentLoader","getSetLastPaymentConnector","getSetPaymentRadioName","getSetPaymentRadioIndex","getSetSelectedPaymentRadio","getSetPaymentInfoForOCPage","getSetCurrentStep","getSetCheckoutCurrentStep","getSetCartCoreProductInfo","getSetUpdatedEmail","getSetSelectedDeliverySlotZone","zone","addUnitOfMeasureInAddCartLine","cartLines","actionContext","channelId","promises","filter","cartLine","DefaultUnitOfMeasure","map","productResponse","getByIdAsync","callerContext","queryResultSettings","Paging","Top","ProductId","UnitOfMeasureSymbol","error","message","processCartLine","Promise","all","variantQueryStringName","hasArray","values","undefined","DeliveryModes","DeliveryDateDetails","coreItemShippingType","EyeBrowMessage","EyeBrowAttributeName","cartModuleName","progressiveName","parsedValue","parsedArr","ReactHtmlParser","toString","getZipCode","ctx","_ctx$requestContext$g","_ctx$requestContext$g2","geolocationZipCode","requestContext","geoLocation","zipCode","res","cookie","Cookies","zipcode","get","getGeoLocationZipCode","_ctx$requestContext$g3","_ctx$requestContext$g4","CompleteYourBedPillowInput","constructor","pillow","getCacheKey","getCacheObjectType","dataCacheType","this","Msdyn365","action","input","id","args","_args$config","config","CompleteyourBedProtectorInput","protector","MFIPromotionExtensionClass","odataObject","ItemId","DistinctProductVariant","EyeBrows","i","className","substr","lastIndexOf","concat","EntityClasses","ExtensionProperties","createMFIGetAvailablePromotionsDescriptionInput","availablePromotionsDescription","itemId","DataServiceQuery","DataServiceEntities","availablePromotionsDescriptionsQuery","resultSettings","createDataServiceRequestForOperation","bypassCache","returnEntity","GetEyebrowMessageInput","item","pageType","isCached","_this$item$Items","createCacheKey","Items","obj","join","result","context","request","callActionOrExecute","mFIGetAvailablePromotionsDescriptionAsync","GetATPInventoryStatusInput","arguments","_this$input","_this$input2","Array","prototype","call","ItemLines","VariantRecordId","sort","ZipCode","Weeks","RequestedDate","mFIATPInventoryStatusAsync","ProductCompareBuyboxStateSharing","__decorate","observable","SelectYourFoundationInput","foundation","cookies","getCookie","cookieName","cookieValue","options","set","removeCookie","remove","BuyboxGetDimensionPricingInput","productId","getDimensionPricingAction","pricingData","baseProduct","isArray","getVariantsByDimensionValuesAsync","MasterProductId","then","variants","dimensionsSizes","productIds","variant","_variant$Dimensions","Dimensions","dimension","DimensionTypeValue","_dimension$DimensionV2","sizeLabel","DimensionValue","Value","priceLabel","Price","dimensionLabel","_dimension$DimensionV","extensionProperties","property","_property$Key","_property$Value","_property$Value2","Key","StringValue","getHtmlParserValue","getDimensionLabel","_dimension$DimensionV3","_dimension$DimensionV4","price","RecordId","name","push","catch","telemetry","exception","Error","createObservableDataAction","inputData","query","apiSettings","urlTokens","BuyboxGetDimensionVariantAvailabilityInput","getAllVariantsAction","fetchedVariants","variantAvailabilityData","variantID","sizeDimensionRecordID","colorDimensionRecordId","itemID","isAvailable","sizeValue","secondaryDimensionValue","StoreSelectorStateInput","storeSelectorStateAction","isModalOpen","prefferedStore","getSelectedProductIdFromActionInput","_context$query","variantId","app","queryBasedVariantSelection","getQueryParamsFromQueryByName","url","requestUrl","inputUrl","queryParamName","URL","toLocaleLowerCase","searchParams","Number","isNaN","generateImageUrl","imageUrl","startsWith","baseImageUrl","encodeURIComponent","DimensionTypes","DimensionSwatchDisplayTypes","getFallbackImageUrl","parsedItemId","split","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","categoryName","productBrandName","productUrl","productImageUrl","productSize","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","parseInt","find","role","tabIndex","onKeyUp","handleKeyPress","keyCode","formatCurrencyFunc","percentDiff","outOfStockText","returnValidPricing","BuyBoxSizeRedesignComponent","sizeDimensions","isActive","_selectedValueData$fi","isVariantAvailableAtAll","isAnyVariantAvailable","customVariantName","getCustomizedVariantName","variantNameConfig","originalVariantName","variantNameMapObject","customizedVariantName","variantMappingConfig","disabled","Dropdown","state","_this$props","super","selectMenu","_onChanged","setState","selectedIndex","onChange","innerText","dimensionValue","payLoad","getPayloadObject","telemetryContent","dropdownName","componentDidMount","current","componentDidUpdate","_this$props2","preSelectionSet","render","dropdownList","dropdownToggleName","attribute","getTelemetryAttributes","assign","ref","hidden","_this$props$variantAv","dim","_this$props$selectedS","selectedSize","observer","generateOnClick","setActiveVariant","selectedValueAvailable","isVariantSelectionRedesignEnabled","swatchName","DimensionValues","index","_dimensionValue$Dimen","recordID","currVariantID","availabilityList","dimensionId","DimensionId","replace","isVariantIdNotAvailable","element","document","getElementsByClassName","click","style","backgroundImage","slice","_renderSlashItem","HeightFoundationComponent","_handleOnClick","selectedId","dimensionName","dimensionList","_this$props$variantAv2","classNames","currentVariantId","outOfStockSmallParcel","outOfStockBoolean","BuyboxErrorBlock","_ref","showError","configureErrors","quantityError","customAmountError","otherError","resources","errorMessages","Alert","color","assertive","buyboxErrorMessageHeader","_getProductType","shippingInformation","_isOrderQuantityLimitsFeatureEnabled","_props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","data","customerInformation","IsB2b","BuyboxAddToCart","addToCart","buyboxProps","variantOutOfStock","itemOutOfMarket","outOfStockSmallParcelState","adjustableItem","ContainerProps","mfrmAddToCart","defaultMinimumKeyInPrice","defaultMaximumKeyInPrice","_attributes$find","_productSpecification","_productSpecification2","_props$data$deliveryO","_props$context$action","_props$data$deliveryO2","typeName","product","productPrice","productAvailableQuantity","productSpecificationData","categoryPaths","minimumKeyInPrice","maximumKeyInPrice","brandBackofficeAttributePdp","allCategoriesArr","categoryObj","Name","attributes","currAttribute","TextValue","quantity","errorState","errorHost","selectedProduct","isUpdatingDimension","isUpdatingDeliveryOptions","isServiceItem","keyInPriceAmount","allVariantOOS","ecomAllVairantStockInfoConcatenated","variantIdOOS","lastBreadcrumbCategoryLink","outOfStockValue","specificationData","_specificationData$Na","_props$context$app$co","outOfStockProductKey","shippingInformationSmall","attr","_attr$Name","smallParcelAttributeKey","BooleanValue","_props$state","checkSPAvailibility","_props$state2","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","channel","EmailDeliveryModeCode","isEmailDelivery","DeliveryOptions","ArrayExtensions","hasElements","Code","successfulATC","button","AddToCartComponent","addToCartText","addToCartProductsText","mfrmOutOfStockCustomText","mfrmOutOfStockText","mfrmContinueShoppingText","mfrmContinueShoppingLink","mfrmOutOfStockSmallParcell","navigationUrl","getUrlSync","onError","quantityErrorForState","customAmountErrorForState","otherErrorForState","getGenericError","cart","failureReason","getQuantityError","stockLeft","cartActionResult","substatus","_resources$invalidSma","formatedAmountLimit","cultureFormatter","formatCurrency","invalidSmallCustomAmountText","_resources$invalidLar","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","_buyboxProps$config$s","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","_estimatorLink$linkUr","storeId","requestType","payFrequency","approveMeName","approveMeSlugValue","estimatorURL","linkUrl","destinationUrl","requestTypeValue","getRequestType","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","_attributeValues$find","_currAttribute$Name","_result$","_result$2","_props$state$productP","_props$state$productP2","_props$state$productP3","_props$state$productP4","_props$app$config$pro","_product$result","_product$result2","_props$data$listPageS","_product$result3","_props$state$currentP","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","productIdPrefix","mfrmProductId","setLeasingButtonActive","setActiveVariantId","setActiveColorVariantId","SetoutOfStockSmallParcelState","isCallChatProduct","_attr$Name2","tagsArr","setItemOutOfMarket","setVariantOutOfStock","listPageStateBuyBox","renderDimensions","_props$variantAvailib","_props$data$productSp","_props$state$currentP2","_preSelectedDimension","_preSelectedDimension2","sizeVariantsLength","setSizeVariantsLength","setIsOpen","setisMobile","selectedDisplayLabel","setselectedDisplayLabel","setSelectedDimensionLabel","setDimensionPrice","setDiscountAmount","setPercentDiff","setSetlectedSize","selectedVariantId","_props$data$product","modalDimensionsArray","preSelectedDimension","viewPort","_getViewPort","currentProductDimensions","getDropdownList","dimensionValues","activePrices","setActivePrices","dimensionPrices","showColorPicker","_props$config$eComDis","eComDisplayColorLabel","_getActivePrices","resultPrices","err","valueId","enhancedAction","generalConfig","enhanced_action","dimensionSelectedAsync","dropdownCallback","notification","resolve","reject","toggleBuyBoxModal","buyBoxModalAddItemClick","calculatePercentage","dimPrice","discountAmnt","percentSaved","Math","round","output","_result$find","_result$find2","_props$resources$sele","eComDisplayColorAsDropDown","displayAsDropdown","dropDownDisplayLabel","getDropdownName","selectDimensionFormatString","_props$variantAvailib2","_props$variantAvailib3","doesSelectedValueExist","doesSelectedValueAvailable","availableOptions","availableDimensionValues","includes","alternativeOption","enableVariantSelectionRedesign","toUpperCase","Listing","_DimensionValue$Value","label","damount","percent","size","SEODropdownList","productDimension","variantNameMapping","BuyboxProductConfigureMfrm","_objectSpread","setActiveSwatchSelected","outOfStock","setOutOfStock","avList","variantsIDIter","_smallParcelProductATPCallForInventoryStatus","showViewCartLink","isLoadedprogressiveLeasingEstimator","vwoAccountId","vwoSdkKey","vwoClientInstance","vwoUserId","useVwoClientInstance","campaignKey","userId","track","Module","HtmlHeadInclude","hideRating","ErrorBoundary","CustomSkeleton","isEyeBrowLoading","BuyboxDeliveryByMessage","isStoreLoading","x","circle","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","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","computed","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","encodeURI","geolocationApiUrl","script","createElement","setAttribute","resourceSets","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","lang","market","_document2","_document3","defer","mapAPIReady","isMapApiLoaded","addEventListener","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","getGenericAction","module","exports","ReactDOM"],"sourceRoot":""}