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,GAAKD,EAAEpN,OAAS,EAAGqN,IAEjC,GADAzL,EAAKwJ,EAAGgC,EAAEC,IACNjC,EAAEpL,SAAWkN,EAAK,OAAO9B,EAE/B+B,EAAIhE,EAAI3K,GAIZ,OADAoD,EAAKwJ,EAAGS,EAAYhB,EAAG1B,IAChBiC,MAGViB,IAAUN,EAAmCL,K","sources":["webpack://mattressfirm/./src/Utilities/analytics/clickTrack.ts?bce2","webpack://mattressfirm/./src/Utilities/analytics/htmlToText.ts?c3c7","webpack://mattressfirm/./src/Utilities/analytics/promotionClickTrack.ts?a0bd","webpack://mattressfirm/./src/Utilities/analytics/utagCaller.ts?3814","webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/modules/mfrm-rest-assured-promise/mfrm-rest-assured-promise.tsx?8c2b","webpack://mattressfirm/./src/modules/mfrm-rest-assured-promise/mfrm-rest-assured-promise.view.tsx?ebe1","webpack://mattressfirm/./src/modules/mfrm-rest-assured-promise/analytics.ts?29fb","webpack://mattressfirm/./lib/mfrm-rest-assured-promise/module-registration.js?1e2b","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b","webpack://mattressfirm/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.match.js?f0c8","webpack://mattressfirm/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.split.js?e6e1"],"sourcesContent":["import { callUtagLink } from \"./utagCaller\";\r\n\r\nexport interface IUtagPromoConfig {\r\n promotion_impression_name?: string[];\r\n promotion_impression_id?: string[];\r\n promotion_impression_creative?: string[];\r\n promotion_impression_position?: (string | undefined)[];\r\n promotion_name?: string[];\r\n promotion_id?: string[];\r\n promotion_creative?: string[];\r\n promotion_position?: (string | undefined)[];\r\n}\r\n\r\nexport interface IUtagGeneralConfig {\r\n enhanced_action?: string | undefined;\r\n}\r\nexport interface ICustomerConfig {\r\n customer_email?: string;\r\n}\r\nexport interface IProductConfig {\r\n product_id?: string[];\r\n product_name?: string[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n product_list_name?: string[];\r\n product_position?: (number | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n checkout_step?: string;\r\n}\r\nexport interface IProductImpressionConfig {\r\n product_impression_brand?: (string | undefined)[];\r\n product_impression_list_name?: (string | undefined)[];\r\n product_impression_id?: string[];\r\n product_impression_name?: string[];\r\n product_impression_category?: string[];\r\n product_impression_variant?: (string | undefined)[];\r\n product_impression_position?: number[];\r\n product_impression_price?: number[];\r\n}\r\nexport interface IAnalyticsConfiguration {\r\n event?: string | null;\r\n eventName?: string | null;\r\n eventCategory?: string | null;\r\n eventAction?: string | null;\r\n eventLabel?: string | null;\r\n eventType?: string | null;\r\n eventNoninteraction?: string;\r\n enhancedAction?: string | null;\r\n searchTerm?: string | undefined | null;\r\n searchType?: string | undefined | null;\r\n generalConfig?: IUtagGeneralConfig;\r\n promoConfig?: IUtagPromoConfig;\r\n productConfig?: IProductConfig;\r\n customerConfig?: ICustomerConfig;\r\n productImpressionConfig?: IProductImpressionConfig;\r\n wmap_type?: string;\r\n wmap_order_total?: number;\r\n wmap_amount_due?: number;\r\n wmap_paid?: number;\r\n wmap_pymt_amt?: number;\r\n}\r\n\r\nexport const fireAnalyticsLink = ({\r\n searchTerm = null,\r\n searchType = null,\r\n eventName = null,\r\n eventCategory = null,\r\n eventAction = null,\r\n eventLabel = null,\r\n eventType = null,\r\n eventNoninteraction = 'false',\r\n enhancedAction = null,\r\n generalConfig = {},\r\n promoConfig = {},\r\n productConfig = {},\r\n customerConfig = {},\r\n productImpressionConfig = {}\r\n}: IAnalyticsConfiguration) => {\r\n void callUtagLink({\r\n ...generalConfig,\r\n ...promoConfig,\r\n ...productConfig,\r\n ...customerConfig,\r\n ...productImpressionConfig,\r\n event: eventName,\r\n event_category: eventCategory,\r\n event_action: eventAction,\r\n event_label: eventLabel,\r\n event_type: eventType,\r\n event_noninteraction: eventNoninteraction,\r\n enhanced_action: enhancedAction,\r\n search_term: searchTerm,\r\n search_type: searchType\r\n });\r\n};","\r\n// Convert Rich Text inner text to string for analytics tagging\r\n\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const htmltoText = (html: string) => {\r\n if(MsDyn365.isBrowser) {\r\n // Create a new div element\r\n const tempDivElement = document.createElement('div');\r\n\r\n // Set the HTML content with the given value\r\n // tslint:disable-next-line: no-inner-html\r\n tempDivElement.innerHTML = html;\r\n\r\n // Retrieve the text property of the element\r\n return tempDivElement.textContent || tempDivElement.innerText || '';\r\n } else {\r\n return '';\r\n }\r\n};","import { fireAnalyticsLink } from './clickTrack';\r\n\r\ninterface IPromotionConfigs {\r\n eventLabel: string;\r\n promotionName: string[];\r\n promotionId: string[];\r\n promotionCreative: string[];\r\n promotionPosition: (string | undefined)[];\r\n}\r\n\r\nexport const firePromotionImpression = ({ eventLabel = '', promotionName = [], promotionId = [], promotionCreative = [], promotionPosition = [] }: IPromotionConfigs) => {\r\n fireAnalyticsLink({\r\n eventName: 'promotion-impression',\r\n eventCategory: 'ecommerce',\r\n eventAction: 'promotion impression',\r\n eventLabel: eventLabel,\r\n eventNoninteraction: 'true',\r\n promoConfig: {\r\n promotion_impression_name: promotionName,\r\n promotion_impression_id: promotionId,\r\n promotion_impression_creative: promotionCreative,\r\n promotion_impression_position: promotionPosition\r\n }\r\n });\r\n};\r\n\r\nexport const firePromotionClick = ({ eventLabel = '', promotionName = [], promotionId = [], promotionCreative = [], promotionPosition = [] }: IPromotionConfigs) => {\r\n fireAnalyticsLink({\r\n eventName: 'promotion-click',\r\n eventCategory: 'ecommerce',\r\n eventAction: 'promotion click',\r\n eventLabel: eventLabel,\r\n eventNoninteraction: 'false',\r\n promoConfig: {\r\n promotion_name: promotionName,\r\n promotion_id: promotionId,\r\n promotion_creative: promotionCreative,\r\n promotion_position: promotionPosition\r\n }\r\n });\r\n};","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 { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IVirtualRefinersConfig {\r\n order: number;\r\n refinerName: string;\r\n enableForMattresses: boolean;\r\n enableForOtherCategories: boolean;\r\n allowDuplicate: boolean;\r\n}\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const origin = requestUrl.origin;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `${origin}/${filteredPath}`;\r\n};\r\n\r\nexport const filteredURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `/${filteredPath}`;\r\n};\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURLWithoutBaseUrl = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('\\/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n return urlParts?.join('\\/');\r\n};\r\n\r\n/**\r\n * This will remove the Pipe sign value set from urlParts\r\n * @param urlParts\r\n * @returns\r\n */\r\nexport const removePipeSignValue = (urlParts: string[]) => {\r\n // urlParts.forEach((part, index) => {\r\n // const indexOfValue = urlParts.indexOf('%7c');\r\n // if (indexOfValue !== -1) {\r\n // urlParts.splice(indexOfValue, 1);\r\n // }\r\n // });\r\n\r\n if (urlParts !== undefined && urlParts.length > 0) {\r\n urlParts = urlParts.filter(urlPart => urlPart.indexOf('%7c') === -1);\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will remove the keywords from urlParts array which were received from\r\n * the app.settings.json/CMS Extensions\r\n * @param urlParts\r\n * @param requestContext\r\n * @returns urlParts array filtered\r\n */\r\nexport const removeKeywords = (urlParts: string[], requestContext: IRequestContext): string[] => {\r\n const removeKeywordFromUrl = requestContext.app.config.removeKeywordFromUrl;\r\n\r\n if (urlParts.length > 0 && removeKeywordFromUrl && removeKeywordFromUrl.length > 0) {\r\n const removeKeywordFromUrlArray: string[] = removeKeywordFromUrl?.trim().split(',');\r\n removeKeywordFromUrlArray?.length > 0 &&\r\n urlParts.forEach(_part => {\r\n removeKeywordFromUrlArray.forEach(removeKeyword => {\r\n const trimmedKeyword = removeKeyword.trim().toLowerCase();\r\n const indexOfValue = urlParts.indexOf(trimmedKeyword);\r\n if (trimmedKeyword.length > 0 && indexOfValue !== -1) {\r\n urlParts.splice(indexOfValue, 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will sort the Virtual refiner config based on order and return\r\n * only active virtual refiner configs based on isMattress category will\r\n * be returned\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getSortedVirtualRefinerConfig = (\r\n requestContext: IRequestContext,\r\n isMattressesCategory: boolean | undefined\r\n): IVirtualRefinersConfig[] | undefined => {\r\n let appConfigSorted = getVirtualRefinerConfig(requestContext);\r\n\r\n // sort the config by provided config\r\n if (appConfigSorted) {\r\n if (isMattressesCategory === true) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForMattresses;\r\n });\r\n } else if (isMattressesCategory === false) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForOtherCategories;\r\n });\r\n }\r\n appConfigSorted.sort((a: IVirtualRefinersConfig, b: IVirtualRefinersConfig) => {\r\n return a.order - b.order;\r\n });\r\n }\r\n\r\n return appConfigSorted;\r\n};\r\n\r\n/**\r\n * Virtual refiner names from the app.settings.json will be returned which can be used\r\n * to filter out refiners data based upon active virtual refiners\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns string[]\r\n */\r\nexport const getVirtualRefinerNames = (requestContext: IRequestContext, isMattressesCategory: boolean | undefined): string[] => {\r\n const sortedVirtualRefinerConfig = getSortedVirtualRefinerConfig(requestContext, isMattressesCategory);\r\n\r\n const appConfigRefinerNames: string[] = [];\r\n\r\n sortedVirtualRefinerConfig &&\r\n sortedVirtualRefinerConfig.forEach(sortedConfig => {\r\n appConfigRefinerNames.push(sortedConfig.refinerName.trim().toLowerCase());\r\n });\r\n\r\n return appConfigRefinerNames;\r\n};\r\n\r\n/**\r\n * This will return the value of virtual refiner configuration\r\n * @param requestContext\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getVirtualRefinerConfig = (requestContext: IRequestContext): IVirtualRefinersConfig[] => {\r\n return requestContext.app.config.urlModifications;\r\n};\r\n\r\nexport async function getVirtualRefinerValues(\r\n requestContext: IRequestContext,\r\n virtualRefiners: IProductRefinerHierarchy[]\r\n): Promise {\r\n const virtualRefinerValues: ProductRefinerValue[] = [];\r\n if (virtualRefiners.length === 0) {\r\n return virtualRefinerValues;\r\n }\r\n const requestUrl = requestContext.url.requestUrl;\r\n // const origin = requestUrl.origin;\r\n const path = requestUrl.pathname;\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n urlParts.splice(-1);\r\n }\r\n\r\n // run loop for each url part and get values from refiners for further usage\r\n const finalizedUrlParts: string[] = [];\r\n urlParts.forEach(plainUrlPart => {\r\n const urlPart = decodeURIComponent(plainUrlPart);\r\n if (urlPart.indexOf('|') !== -1) {\r\n const splitOnPipeSign = urlPart?.split('|');\r\n const filteredParts = splitOnPipeSign.filter(part => part.length > 0);\r\n filteredParts.forEach(filteredPart => {\r\n finalizedUrlParts.push(filteredPart.toLowerCase().trim());\r\n });\r\n }\r\n finalizedUrlParts.push(urlPart);\r\n });\r\n finalizedUrlParts.forEach((urlPart) => {\r\n virtualRefiners.forEach((mainRefiner) => {\r\n mainRefiner.Values.forEach((refinerValue) => {\r\n const refinerValueKeyName = refinerValue.LeftValueBoundString?.toLowerCase().trim().split(' ')?.join('-')?.replace(/\\&/g, 'and')?.replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-');\r\n if (refinerValueKeyName && refinerValueKeyName === urlPart) {\r\n virtualRefinerValues.push(refinerValue);\r\n }\r\n });\r\n });\r\n });\r\n\r\n return virtualRefinerValues;\r\n}\r\n\r\n/**\r\n * For navigation menu links, it will remove keywords configured in global configurations from the navigation link\r\n * and clp link and return url path string\r\n * @param link\r\n * @param requestContext\r\n * @returns string\r\n */\r\nexport const navLinkKeywordRemoval = (link: string, requestContext: IRequestContext): string => {\r\n // Using the rest operator in case there is a weirdly formatted URL with multiple question marks.\r\n const [linkBase, ...linkParams] = link?.split('?');\r\n\r\n // Only apply to category links and product links, which end in .c or .p. Check that a keyword is configured.\r\n if (!linkBase.endsWith('.c') && !linkBase.endsWith('.p') || !requestContext.app.config) {\r\n return link;\r\n }\r\n\r\n // Separate out url parts split on forward /\r\n let urlParts = linkBase?.split('\\/');\r\n\r\n // Remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // Glue the URL params back together\r\n const linkParam = linkParams.map(param => `?${param}`)?.join('');\r\n\r\n // Rebuild URL by joining with forward slash and appending any URL parameters\r\n const filteredLink = `${urlParts?.join('/')}${linkParam}`;\r\n return `${filteredLink}`;\r\n};\r\nexport const regExSpecialChars = (includeConfigList: string): RegExp => {\r\n let includeConfig = '';\r\n if (includeConfigList !== undefined && includeConfigList !== '') {\r\n includeConfig = includeConfigList?.trim().split(',')?.join('\\\\\\\\');\r\n includeConfig = includeConfig && includeConfig !== '' ? `\\\\\\\\${includeConfig}` : '';\r\n const pattern = `[^\\\\w\\\\&\\\\|${includeConfig}]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\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\n/* tslint:disable: no-duplicate-imports */\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IMfrmRestAssuredPromiseProps } from './mfrm-rest-assured-promise.props.autogenerated';\r\n\r\nexport interface IIMfrmRestAssuredPromisePropsViewProps extends IMfrmRestAssuredPromiseProps<{}> {\r\n title?: React.ReactNode;\r\n text?: React.ReactNode;\r\n image?: React.ReactNode;\r\n className?: string;\r\n restAssuredPromiseContainer: IModuleProps;\r\n imageContainer: INodeProps;\r\n detailsContainer: INodeProps;\r\n restAssuredPromiseAnchorTag?: INodeProps;\r\n imageAriaLabel?: string;\r\n link?: string;\r\n isPromotion: boolean;\r\n}\r\n/**\r\n *\r\n * MFRM Rest Assured Promise component\r\n * Module Cloned from ContentBlock\r\n * @extends {React.PureComponent}\r\n */\r\n\r\nclass MfrmRestAssuredPromise extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const { heading, paragraph, image, className, imageAriaLabel, enhancedEcommTracking } = this.props.config;\r\n\r\n const restAssuredPromiseTitle = heading && (\r\n \r\n );\r\n const imageProps = {\r\n gridSettings: this.props.context.request.gridSettings || {},\r\n imageSettings: image && image.imageSettings\r\n };\r\n\r\n const restAssuredPromiseText = paragraph && (\r\n \r\n );\r\n const restAssuredPromiseImage = image && (\r\n \r\n );\r\n\r\n if (!restAssuredPromiseTitle && !restAssuredPromiseText && !restAssuredPromiseImage) {\r\n this.props.context.telemetry.error('Rest Assured Promise block is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const isPromotion = enhancedEcommTracking === 'promotion';\r\n\r\n const restAssuredPromiseviewProps = {\r\n ...this.props,\r\n title: restAssuredPromiseTitle,\r\n text: restAssuredPromiseText,\r\n image: restAssuredPromiseImage,\r\n moduleClass: this.props.config.className,\r\n restAssuredPromiseContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-content-block', className)\r\n },\r\n imageContainer: { className: 'ms-content-block__image' },\r\n detailsContainer: { className: 'ms-content-block__details' },\r\n restAssuredPromiseAnchorTag: {\r\n tag: 'a',\r\n className: 'ms-content-block__link',\r\n role: 'link',\r\n href: this._getLink()\r\n },\r\n imageAriaLabel,\r\n isPromotion\r\n };\r\n\r\n return this.props.renderView(restAssuredPromiseviewProps) as React.ReactElement;\r\n }\r\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\r\n\r\n private _getLink(): string | null {\r\n const { link } = this.props.config;\r\n if (link) {\r\n return link.destinationUrl;\r\n }\r\n return null;\r\n }\r\n}\r\n\r\nexport default MfrmRestAssuredPromise;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* tslint:disable: no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { useInView } from 'react-intersection-observer';\r\nimport { fireAnalyticsLink } from '../../Utilities/analytics/clickTrack';\r\nimport { htmltoText } from '../../Utilities/analytics/htmlToText';\r\nimport { firePromotionClick, firePromotionImpression } from '../../Utilities/analytics/promotionClickTrack';\r\nimport { navLinkKeywordRemoval } from '../../Utilities/plp-url-utils';\r\nimport { getAnalyticsConfig, getPromoAnalyticsConfig } from './analytics';\r\nimport { IIMfrmRestAssuredPromisePropsViewProps } from './mfrm-rest-assured-promise';\r\n\r\nconst MfrmRestAssuredPromiseView: React.FC = props => {\r\n const {\r\n restAssuredPromiseContainer,\r\n imageContainer,\r\n detailsContainer,\r\n title,\r\n text,\r\n image,\r\n restAssuredPromiseAnchorTag,\r\n isPromotion,\r\n config\r\n } = props;\r\n\r\n const [paragraphText, setParagraphText] = React.useState('');\r\n\r\n const pagePath = MsDyn365.isBrowser\r\n ? window.location.href.split(location.host)[1].includes('?')\r\n ? window.location.href.split(location.host)[1].split('?')[0]\r\n : window.location.href.split(location.host)[1]\r\n : '';\r\n\r\n const analyticsConfig = getAnalyticsConfig(pagePath, paragraphText, config.tealiumEvent);\r\n const promoAnalyticsConfig = getPromoAnalyticsConfig(\r\n props.config.image,\r\n restAssuredPromiseAnchorTag,\r\n pagePath,\r\n paragraphText,\r\n config.tealiumPromotion\r\n );\r\n\r\n const handleAnalytics = () => {\r\n if (MsDyn365.isBrowser) {\r\n fireAnalyticsLink({ ...analyticsConfig });\r\n if (isPromotion) {\r\n firePromotionClick({ ...promoAnalyticsConfig });\r\n }\r\n\r\n if (restAssuredPromiseAnchorTag?.href) {\r\n window.location.href = navLinkKeywordRemoval(restAssuredPromiseAnchorTag.href, props.context.request);\r\n }\r\n }\r\n };\r\n\r\n const [ref, inView] = useInView({\r\n triggerOnce: true,\r\n rootMargin: '25px'\r\n });\r\n\r\n React.useEffect(() => {\r\n if (MsDyn365.isBrowser && isPromotion && inView) {\r\n firePromotionImpression({ ...promoAnalyticsConfig });\r\n }\r\n setParagraphText(config.paragraph ? htmltoText(config.paragraph.toString()).trim() : '');\r\n }, [inView, paragraphText]);\r\n\r\n return (\r\n \r\n ) => {\r\n event.preventDefault();\r\n handleAnalytics();\r\n }}\r\n >\r\n {image}\r\n \r\n {title}\r\n {text}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default MfrmRestAssuredPromiseView;\r\n","import { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { IImageData } from '@msdyn365-commerce/core';\r\nimport { ITealiumEventData, ITealiumPromotionData } from './mfrm-rest-assured-promise.props.autogenerated';\r\n\r\nexport const getPromoAnalyticsConfig = (image: IImageData | undefined, restAssuredPromiseAnchorTag: INodeProps | undefined, pagePath: string, paragraphText: string, tealiumPromotion: ITealiumPromotionData | undefined) => {\r\n // Use Configured Paragraph text as Promotion Name\r\n const promoName = tealiumPromotion?.promotion_name || paragraphText;\r\n // Use Configured Link as Promotion ID\r\n const promoID = tealiumPromotion?.promotion_id || restAssuredPromiseAnchorTag?.href || '';\r\n // Use Configured Image URL as default Creative\r\n const promoCreative = tealiumPromotion?.promotion_creative_version || image?.title || image?.altText || '';\r\n const promoPosition = tealiumPromotion?.promotion_position || undefined;\r\n\r\n return {\r\n eventLabel: `${promoName} from ${pagePath}`,\r\n promotionName: [promoName],\r\n promotionId: [promoID],\r\n promotionCreative: [promoCreative],\r\n promotionPosition: [promoPosition]\r\n };\r\n};\r\n\r\nexport const getAnalyticsConfig = (pagePath: string, paragraphText: string, tealiumEvent: ITealiumEventData | undefined) => {\r\n return {\r\n eventName: tealiumEvent?.event || 'rap-module',\r\n eventCategory: tealiumEvent?.event_category || 'rest assured promise module',\r\n eventAction: tealiumEvent?.event_action || `${paragraphText} click`,\r\n eventLabel: tealiumEvent?.event_label || pagePath\r\n };\r\n};","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['mfrm-rest-assured-promise'] = {\n c: () => require('partner/modules/mfrm-rest-assured-promise/mfrm-rest-assured-promise.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-rest-assured-promise',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-rest-assured-promise'\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-rest-assured-promise|mfrm-rest-assured-promise'] = {\n c: () => require('partner/modules/mfrm-rest-assured-promise/mfrm-rest-assured-promise.view.tsx'),\n cn: '__local__-__local__-mfrm-rest-assured-promise'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","'use strict';\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar MAX_UINT32 = 0xFFFFFFFF;\nvar min = Math.min;\nvar push = uncurryThis([].push);\nvar stringSlice = uncurryThis(''.slice);\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nvar BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length !== 4 ||\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length;\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);\n } : nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? call(splitter, separator, O, limit)\n : call(internalSplit, toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (!BUGGY) {\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n }\n\n var C = speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n push(A, stringSlice(S, p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n push(A, z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n push(A, stringSlice(S, p));\n return A;\n }\n ];\n}, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n"],"names":["fireAnalyticsLink","_ref","searchTerm","searchType","eventName","eventCategory","eventAction","eventLabel","eventType","eventNoninteraction","enhancedAction","generalConfig","promoConfig","productConfig","customerConfig","productImpressionConfig","callUtagLink","_objectSpread","event","event_category","event_action","event_label","event_type","event_noninteraction","enhanced_action","search_term","search_type","htmltoText","html","MsDyn365","isBrowser","tempDivElement","document","createElement","innerHTML","textContent","innerText","firePromotionImpression","promotionName","promotionId","promotionCreative","promotionPosition","promotion_impression_name","promotion_impression_id","promotion_impression_creative","promotion_impression_position","firePromotionClick","_ref2","promotion_name","promotion_id","promotion_creative","promotion_position","callUtag","async","objToCall","Object","keys","forEach","key","utag","global","hasOwnProperty","link","e","console","log","callUtagView","view","canonicalURL","requestContext","_urlParts","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","join","filteredURL","_urlParts2","undefined","length","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","trim","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","_refinerValue$LeftVal","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","_linkParams$map","_urlParts4","linkBase","linkParams","endsWith","linkParam","map","param","includeConfigList","includeConfig","_includeConfigList$tr","RegExp","MfrmRestAssuredPromise","React","constructor","handleTextChange","this","props","heading","text","target","value","handleParagraphChange","paragraph","render","image","className","imageAriaLabel","enhancedEcommTracking","restAssuredPromiseTitle","Msdyn365","tag","editProps","onEdit","context","request","imageProps","gridSettings","imageSettings","restAssuredPromiseText","restAssuredPromiseImage","assign","telemetry","error","isPromotion","restAssuredPromiseviewProps","title","moduleClass","restAssuredPromiseContainer","moduleProps","classnames","imageContainer","detailsContainer","restAssuredPromiseAnchorTag","role","href","_getLink","renderView","destinationUrl","paragraphText","setParagraphText","pagePath","window","location","host","includes","analyticsConfig","getAnalyticsConfig","tealiumEvent","promoAnalyticsConfig","getPromoAnalyticsConfig","tealiumPromotion","promoName","promotion_creative_version","altText","ref","inView","useInView","triggerOnce","rootMargin","toString","Module","Node","onClick","preventDefault","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","module","exports","ReactDOM","call","fixRegExpWellKnownSymbolLogic","anObject","isNullOrUndefined","toLength","requireObjectCoercible","getMethod","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","string","rx","S","res","done","fullUnicode","unicode","lastIndex","result","A","matchStr","uncurryThis","speciesConstructor","stickyHelpers","fails","UNSUPPORTED_Y","min","Math","stringSlice","slice","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","re","originalExec","exec","apply","arguments","BUGGY","SPLIT","nativeSplit","internalSplit","separator","limit","splitter","C","unicodeMatching","flags","ignoreCase","multiline","source","lim","q","z","i"],"sourceRoot":""}