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gBACPC,GAAI,GAEJC,KAAK,EACLC,GAAI,YACJC,EAAG,kCACHC,EAAG,YAEHC,IAAK,GAGLvK,GAAI,+CAKRP,OAAO+K,aAAe/K,OAAO+K,cAAgB,GAC7C/K,OAAO+K,aAAavL,QAApB,OACOQ,OAAO+K,aAAavL,SAAW,IAC/B4K,EAAQ5K,SAGXQ,OAAO+K,aAAaV,YAApB,OACGrK,OAAO+K,aAAaV,aAAe,IACnCD,EAAQC,aAEY,MAAMW,EAAiB,GAC9BA,EAAe,+FAAiG,CACxHV,EAAG,IAAMC,EAAQ,MACjBU,GAAI,uDAEpBjL,OAAO+K,aAAe/K,OAAO+K,cAAgB,GAC7C/K,OAAO+K,aAAaC,eAApB,OAC2BhL,OAAO+K,aAAaC,gBAAkB,IACtCA,UCtC3BE,EAAOC,QAAUhN,cCAjB+M,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/analytics/htmlToText.ts?c3c7","webpack://mattressfirm/./src/Utilities/get-dynamic-image.tsx?8e0f","webpack://mattressfirm/./src/Utilities/get-view-port.tsx?4210","webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/modules/d5-mfrm-explore-mattress-guides/featured-content.tsx?3af2","webpack://mattressfirm/./src/modules/d5-mfrm-explore-mattress-guides/d5-mfrm-explore-mattress-guides.tsx?83a7","webpack://mattressfirm/./src/modules/d5-mfrm-explore-mattress-guides/d5-mfrm-explore-mattress-guides.view.tsx?8b3b","webpack://mattressfirm/./lib/d5-mfrm-explore-mattress-guides/module-registration.js?4551","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["\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 MsDyn365, { IImageData } from '@msdyn365-commerce/core';\r\nimport _get from 'lodash/get';\r\nimport _cloneDeep from 'lodash/cloneDeep';\r\nimport * as React from 'react';\r\n\r\ninterface IImageDimension {\r\n width: string;\r\n height: string;\r\n}\r\ninterface IImageSettings {\r\n sm: IImageDimension;\r\n md: IImageDimension;\r\n lg: IImageDimension;\r\n}\r\nexport interface IResponsiveImage {\r\n desktop: IImageData | undefined;\r\n tablet: IImageData | undefined;\r\n mobile: IImageData | undefined;\r\n defaultImg: IImageData | undefined;\r\n imageSettingViewports?: IImageSettings | undefined;\r\n}\r\n\r\nexport interface IResponsiveImageFromSeoData {\r\n desktop: IImageData | undefined;\r\n tablet: IImageData | undefined;\r\n mobile: IImageData | undefined;\r\n imageSettingViewports?: IImageSettings | undefined;\r\n}\r\n\r\nexport const getResponsiveFromSeoData = ({ desktop, tablet, mobile }: IResponsiveImageFromSeoData) => {\r\n const desktopWidth = 1025;\r\n const tabletWidth = 768;\r\n\r\n const query = {\r\n desktop: '',\r\n tablet: '',\r\n mobile: ''\r\n };\r\n\r\n // Removing resizing for the time being to discuss with Microsoft\r\n // if (imageSettingViewports) {\r\n // const { sm, md, lg } = imageSettingViewports;\r\n // query.desktop = `&w=${lg.width}&h=${lg.height}`;\r\n // query.tablet = `&w=${md.width}&h=${md.height}`;\r\n // query.mobile = `&w=${sm.width}&h=${sm.height}`;\r\n // }\r\n\r\n return (\r\n \r\n <>\r\n {desktop?.src && }\r\n {tablet?.src && }\r\n {mobile?.src && }\r\n {desktop?.altText}\r\n \r\n \r\n );\r\n\r\n};\r\n\r\n// Note Responsive Image does not use Msdyn365 Image component\r\nexport const getResponsiveImage = ({ desktop, tablet, mobile, defaultImg }: IResponsiveImage): React.ReactNode => {\r\n // Note this is a temp solution as D365 does not support dynamic images across viewports\r\n\r\n const desktopWidth = 1025;\r\n const tabletWidth = 768;\r\n const lazyload = !defaultImg?.imageSettings?.disableLazyLoad;\r\n\r\n const query = {\r\n desktop: '',\r\n tablet: '',\r\n mobile: ''\r\n };\r\n\r\n // Removing resizing for the time being to discuss with Microsoft\r\n // if (imageSettingViewports) {\r\n // const { sm, md, lg } = imageSettingViewports;\r\n // query.desktop = `&w=${lg.width}&h=${lg.height}`;\r\n // query.tablet = `&w=${md.width}&h=${md.height}`;\r\n // query.mobile = `&w=${sm.width}&h=${sm.height}`;\r\n // }\r\n\r\n const defaultImgSrc = `${defaultImg?.src}${query.desktop}${\r\n defaultImg?.imageSettings?.quality ? `&q=${defaultImg.imageSettings.quality}` : ''\r\n }`;\r\n\r\n return (\r\n \r\n {lazyload ? (\r\n <>\r\n {desktop?.src && }\r\n {tablet?.src && }\r\n {mobile?.src && }\r\n \r\n \r\n ) : (\r\n <>\r\n {desktop?.src && }\r\n {tablet?.src && }\r\n {mobile?.src && }\r\n {defaultImg?.altText}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport interface IDynamicImageProps {\r\n moduleName: string;\r\n}\r\n\r\nexport const getDynamicImageSettings = ({ moduleName }: IDynamicImageProps) => {\r\n // This logic is directly from MsDyn Image Component src builder\r\n // just applied to get dynamic image settings if they are defined\r\n const imageSettings = { viewports: undefined };\r\n const themeSettingsForModule = MsDyn365.themeSettings?.mattressfirm?.modules?.[moduleName];\r\n if (themeSettingsForModule) {\r\n const themeSettingsForLayout = themeSettingsForModule.properties.dynamic;\r\n if (themeSettingsForLayout) {\r\n const imageViewportProperties = _get(themeSettingsForLayout.properties, ['image'], { properties: imageSettings }).properties;\r\n // Clone the image viewport properties from theme settings\r\n // so that the proxy traps do not affect the global themesettings\r\n imageSettings.viewports = _cloneDeep(imageViewportProperties);\r\n }\r\n }\r\n\r\n return imageSettings.viewports;\r\n};\r\n","import MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nconst _getViewPort = (context: ICoreContext): GridSize => {\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n } else {\r\n return 'xl';\r\n }\r\n }\r\n }\r\n return 'xs';\r\n};\r\n\r\nexport default _getViewPort;\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 return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n return new RegExp(pattern, 'gi');\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 MsDyn365, { IGridSettings, IImageData, Image, RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { htmltoText } from '../../Utilities/analytics/htmlToText';\r\nimport * as React from 'react';\r\nimport classname from 'classnames';\r\nimport { getDynamicImageSettings, getResponsiveImage } from '../../Utilities/get-dynamic-image';\r\nimport { IDynamicImagesData } from '../../themes/mattressfirm/definition-extensions/content-block.ext.props.autogenerated';\r\n\r\ninterface IContentData {\r\n image: IImageData;\r\n contentIndex: number;\r\n title: RichText;\r\n description: RichText | undefined;\r\n gridSettings: IGridSettings;\r\n linkTo: string;\r\n useDynamicImages?: boolean;\r\n dynamicImages?: IDynamicImagesData;\r\n}\r\n\r\nexport default (props: IContentData) => {\r\n const styles = 'd5-mfrm-explore-mattress-guides__';\r\n const {\r\n image,\r\n title,\r\n useDynamicImages,\r\n dynamicImages,\r\n description,\r\n gridSettings,\r\n linkTo,\r\n contentIndex\r\n } = props;\r\n\r\n const cardShape = classname(\r\n contentIndex === 0 || contentIndex === 2 ? `${styles}card-shape-small-card` : '',\r\n contentIndex === 1 || contentIndex === 3 ? `${styles}card-shape-medium-card` : '',\r\n contentIndex === 4 ? `${styles}card-shape-large-card` : ''\r\n );\r\n\r\n const cardBottomMargin = classname(\r\n contentIndex === 0 ? `${styles}bottom-margin-small-card` : '',\r\n contentIndex === 1 ? `${styles}bottom-margin-medium-card` : ''\r\n );\r\n\r\n const textContainer = classname(\r\n contentIndex === 0 || contentIndex === 2 ? `${styles}text-container-small-card` : '',\r\n contentIndex === 1 || contentIndex === 3 ? `${styles}text-container-medium-card` : '',\r\n contentIndex === 4 ? `${styles}text-container-large-card` : ''\r\n );\r\n\r\n const arrowAlignment = classname(\r\n contentIndex === 0 || contentIndex === 2 ? `${styles}arrow-small-card` : '',\r\n contentIndex === 1 || contentIndex === 3 ? `${styles}arrow-medium-card` : '',\r\n contentIndex === 4 ? `${styles}arrow-large-card` : ''\r\n );\r\n\r\n const descriptionContainer = classname(\r\n contentIndex === 0 || contentIndex === 2 ? `${styles}description-container-small-card` : '',\r\n contentIndex === 1 || contentIndex === 3 ? `${styles}description-container-medium-card` : '',\r\n contentIndex === 4 ? `${styles}description-container-large-card` : ''\r\n );\r\n\r\n let currentImage;\r\n\r\n // Only use Responsive Image if Dynamic Images are defined\r\n if (dynamicImages && useDynamicImages) {\r\n currentImage = getResponsiveImage({\r\n desktop: dynamicImages?.desktopImage,\r\n tablet: dynamicImages?.tabletImage,\r\n mobile: dynamicImages?.mobileImage,\r\n defaultImg: image,\r\n imageSettingViewports: getDynamicImageSettings({ moduleName: 'd5-mfrm-explore-mattress-guides' })\r\n });\r\n }\r\n\r\n const imageDisplay = (useDynamicImages ?\r\n (\r\n
{currentImage}
\r\n ) : (\r\n {image?.altText}\r\n )\r\n );\r\n\r\n const titleDisplayed = htmltoText(title.toString()).trim();\r\n const handleClick = () => {\r\n if (MsDyn365.isBrowser) {\r\n // @ts-ignore\r\n if (utag) {\r\n // @ts-ignore\r\n utag.link({\r\n event: 'shopping-guide-reel',\r\n event_category: 'shopping guide reel',\r\n event_action: `content slot ${contentIndex + 1} CTA click D5`,\r\n event_label: titleDisplayed,\r\n event_noninteraction: 'false'\r\n });\r\n }\r\n window.location.href = linkTo;\r\n }\r\n };\r\n\r\n const shoppingGuideRef = React.useRef();\r\n React.useEffect(() => {\r\n shoppingGuideRef.current && shoppingGuideRef.current.addEventListener('click', handleClick);\r\n }, []);\r\n\r\n const preventFocusState = (event: React.MouseEvent) => {\r\n event.preventDefault();\r\n };\r\n\r\n return (\r\n \r\n
\r\n {imageDisplay}\r\n
\r\n
\r\n \r\n
\r\n {description && }\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\n\r\nimport * as React from 'react';\r\n\r\nimport FeaturedContent from './featured-content';\r\nimport { ID5MfrmExploreMattressGuidesData } from './d5-mfrm-explore-mattress-guides.data';\r\nimport { ID5MfrmExploreMattressGuidesProps } from './d5-mfrm-explore-mattress-guides.props.autogenerated';\r\n\r\nimport { navLinkKeywordRemoval } from '../../Utilities/plp-url-utils';\r\n\r\nexport interface ID5MfrmExploreMattressGuidesViewProps extends ID5MfrmExploreMattressGuidesProps {\r\n contentItems: React.ReactNode[];\r\n}\r\n\r\n/**\r\n *\r\n * D5MfrmExploreMattressGuides component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass D5MfrmExploreMattressGuides extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n if (!this.props.config.featuredContentList) {\r\n return null;\r\n }\r\n\r\n const viewProps: ID5MfrmExploreMattressGuidesViewProps = {\r\n ...(this.props as ID5MfrmExploreMattressGuidesProps),\r\n contentItems: this._getContentItems()\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _getContentItems = (): React.ReactNode[] => {\r\n const {\r\n config: { featuredContentList },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = this.props;\r\n\r\n return featuredContentList.map((content, index) => {\r\n const { title, useDynamicImages, dynamicImages, description, image, link } = content;\r\n\r\n return (\r\n \r\n );\r\n });\r\n };\r\n}\r\n\r\nexport default D5MfrmExploreMattressGuides;\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 Carousel from 'mfcl/Carousel';\r\nimport * as React from 'react';\r\nimport _getViewPort from '../../Utilities/get-view-port';\r\nimport { ID5MfrmExploreMattressGuidesViewProps } from './d5-mfrm-explore-mattress-guides';\r\nimport { addThrottledEvent } from '@msdyn365-commerce-modules/utilities';\r\nimport MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\n\r\nexport default (props: ID5MfrmExploreMattressGuidesViewProps) => {\r\n const {\r\n contentItems,\r\n context\r\n } = props;\r\n\r\n const [loaded, setIsLoaded] = React.useState(false);\r\n const hideLoader = () => {\r\n setIsLoaded(true);\r\n };\r\n const [isMobile, setisMobile] = React.useState(false);\r\n const [isTablet, setisTablet] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n MsDyn365.isBrowser && addThrottledEvent(window, 'resize', () => updateViewPort(context, setisMobile, setisTablet));\r\n updateViewPort(context, setisMobile, setisTablet);\r\n });\r\n\r\n const updateViewPort = (\r\n context: ICoreContext,\r\n setisMobile: React.Dispatch>,\r\n setisTablet: React.Dispatch>\r\n ): void => {\r\n const viewport = _getViewPort(context);\r\n\r\n if (viewport === 'xs' || viewport === 'sm') {\r\n setisMobile(true);\r\n setisTablet(false);\r\n } else if (viewport === 'md') {\r\n setisMobile(false);\r\n setisTablet(true);\r\n } else {\r\n setisMobile(false);\r\n setisTablet(false);\r\n }\r\n };\r\n\r\n React.useEffect(hideLoader, []);\r\n return (\r\n
\r\n { (isMobile || isTablet) ? (\r\n
\r\n \r\n {contentItems}\r\n \r\n
\r\n ) : (\r\n <>\r\n
\r\n {contentItems[0]}\r\n {contentItems[2]}\r\n
\r\n
\r\n {contentItems[1]}\r\n {contentItems[3]}\r\n
\r\n
\r\n {contentItems[4]}\r\n
\r\n \r\n )}\r\n
\r\n );\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['d5-mfrm-explore-mattress-guides'] = {\n c: () => require('partner/modules/d5-mfrm-explore-mattress-guides/d5-mfrm-explore-mattress-guides.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'd5-mfrm-explore-mattress-guides',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/d5-mfrm-explore-mattress-guides'\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|d5-mfrm-explore-mattress-guides|d5-mfrm-explore-mattress-guides'] = {\n c: () => require('partner/modules/d5-mfrm-explore-mattress-guides/d5-mfrm-explore-mattress-guides.view.tsx'),\n cn: '__local__-__local__-d5-mfrm-explore-mattress-guides'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["htmltoText","html","MsDyn365","tempDivElement","document","createElement","innerHTML","textContent","innerText","getResponsiveFromSeoData","desktop","tablet","mobile","query","React","src","media","srcSet","alt","altText","getResponsiveImage","defaultImg","tabletWidth","lazyload","imageSettings","disableLazyLoad","defaultImgSrc","quality","className","getDynamicImageSettings","moduleName","viewports","undefined","themeSettingsForModule","mattressfirm","modules","themeSettingsForLayout","properties","dynamic","imageViewportProperties","_get","_cloneDeep","context","window","innerWidth","gridSettings","request","xs","w","sm","md","lg","canonicalURL","requestContext","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","filteredPath","join","filteredURL","length","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","trim","forEach","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","async","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","link","linkBase","linkParams","endsWith","linkParam","map","param","filteredLink","includeConfigList","includeConfig","pattern","RegExp","props","styles","image","title","useDynamicImages","dynamicImages","description","linkTo","contentIndex","cardShape","classname","cardBottomMargin","textContainer","arrowAlignment","descriptionContainer","currentImage","desktopImage","tabletImage","mobileImage","imageSettingViewports","imageDisplay","Image","Object","titleDisplayed","toString","handleClick","utag","event","event_category","event_action","event_label","event_noninteraction","location","href","shoppingGuideRef","current","addEventListener","ref","onMouseDown","preventDefault","RichTextComponent","text","D5MfrmExploreMattressGuides","constructor","_getContentItems","featuredContentList","this","content","index","FeaturedContent","key","linkUrl","destinationUrl","render","viewProps","contentItems","renderView","loaded","setIsLoaded","isMobile","setisMobile","isTablet","setisTablet","addThrottledEvent","updateViewPort","viewport","_getViewPort","Carousel","itemsToShow","hideIndicators","disableControls","variableWidth","ariaLabel","binding","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}