{"version":3,"sources":["webpack:///./node_modules/core-js/internals/math-sign.js","webpack:///./src/components/product/ValueProps.js","webpack:///./node_modules/core-js/modules/es.math.sign.js","webpack:///./src/store/app/selectors.js","webpack:///./src/components/product/BarrierBusters.js","webpack:///./src/components/seo/Page.js","webpack:///./src/components/product/ProductLandingCards.js","webpack:///./src/utils/markdown.js","webpack:///./src/components/OverlayLink.js"],"names":["module","exports","Math","sign","x","Wrapper","styled","Container","attrs","id","p","margin20","css","media","mobile","StyledRow","Row","Column","div","removePadding","PropsArea","ValueProp","index","tablet","Icon","responsive","sm","md","ValuePropLabel","span","Font","circular","Color","ritualBlue","rem","ValueProps","renderValueProp","valueProp","icon","i","cleanedIconName","replace","IconElement","Icons","capitalize","ClinicalIcons","key","render","this","props","valueProps","icons","location","className","map","React","Component","$","target","stat","app","state","isLoaded","createSelector","appLoaded","isUserLoaded","authInitialized","isFetchingUserData","fetchingDataAfterAuth","isUserDataLoaded","BarrierBusterWrapper","ol","BarrierBusterItem","li","Title","Body","BarrierBusters","sanitizeContent","copy","sanitizedContent","sanitizeHtml","allowedTags","parseMarkdown","renderItem","item","title","body","dangerouslySetInnerHTML","__html","items","PageSEO","pagePath","description","image","Grid","MobileNavigation","white","MobileLabel","ProductCards","selectedIndex","floatNavigation","throttledOnScroll","throttle","onScroll","bind","scrollableRef","labelRefs","componentDidMount","smoothscroll","polyfill","window","addEventListener","componentWillUnmount","removeEventListener","cancel","getSanitizedProductLabels","productLabels","label","navigationOnScroll","setActiveState","elementOffsets","forEach","offsetFromTop","document","getElementById","getBoundingClientRect","top","push","newIndex","length","setState","scrollToIndex","element","topPosition","shouldDisplayFixed","offsetHeight","clickLabel","sanitizedProductLabels","offset","scrollY","pageYOffset","scroll","behavior","products","dispatchAddProductToCart","ref","r","bleedLeft","bleedRight","onClick","product","ProductCard","NameMap","name","plain","ProductCardWrapper","lg","ProductCardContent","ProductTitle","h2","ProductImage","Img","ProductDescription","LearnMore","MagicLink","isLearnMoreVariation","variation","handleVariationCTAClick","trackCTAClick","planId","getPlanIdForProductSku","sku","metrics","track","nonInteraction","trackLearnMoreClick","url","event","preventDefault","navigate","stockStatus","productName","ctaText","intl","t","formatCurrency","price","round","learnMoreLink","slug","checkoutButtonProps","buttonText","summary","fixed","alternateThumbnail","fadeIn","alt","style","userSelect","userDrag","pointerEvents","touchCallout","shortDescription","to","defaultMessage","connect","addProductToCart","content","localized","_","g1","g2","localizePath","Marked","parseInline","processHtml","Overlay","ritualLightYellow","OverlayContainer","CloseButton","button","rgba","ritualYellow","CloseIcon","Close","TextContainer","LinkArrow","OverlayLink","isEnabled","overlayClosed","handleOverlayCloseClick","handleOverlayLinkClick","destination","linkDestination","e","stopPropagation","heading","subheading","isOverlayDisplayed","ArrowRoundedRight"],"mappings":"+EAEAA,EAAOC,QAAUC,KAAKC,MAAQ,SAAcC,GAE1C,OAAmB,IAAXA,GAAKA,IAAWA,GAAKA,EAAIA,EAAIA,EAAI,GAAK,EAAI,I,y0CCUpD,IAAMC,EAAUC,YAAOC,KAAWC,MAAM,CACtCC,GAAI,gBADO,0EAAGH,CAAH,SAGT,SAAAI,GAAC,OACDA,EAAEC,UACFC,YADA,QAEIC,IAAMC,OAFV,SAQEC,EAAYT,YAAOU,KAAKR,MAAM,CAClCC,GAAI,oBADS,4EAAGH,CAAH,qCAMXO,IAAMC,OANK,MAWTG,EAASX,IAAOY,IAAV,yEAAGZ,CAAH,+DACK,SAAAI,GAAC,OAAKA,EAAES,cAAgB,MAAQ,UAC7B,SAAAT,GAAC,OAAKA,EAAES,cAAgB,MAAQ,SAGhDN,IAAMC,OALE,MAiBNM,EAAYd,IAAOY,IAAIV,MAAM,CACjCC,GAAI,gCADS,4EAAGH,CAAH,oDAMXO,IAAMC,OANK,MAaTO,EAAYf,IAAOY,IAAIV,OAAM,SAAAE,GAAC,MAAK,CACvCD,GAAG,oCAAqCC,EAAEY,UAD7B,4EAAGhB,CAAH,yFAWXO,IAAMU,OAXK,KAeXV,IAAMC,OAfK,MA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AAA,SAAwBI,GAEtBA,EAAEC,kBACF3L,KAAKkF,SAAS,CACZmG,eAAe,K,EAInBtL,OAAA,WAAU,IAAD,EACyBC,KAAKC,MAA7B2L,EADD,EACCA,QAASC,EADV,EACUA,WADV,EAE8B7L,KAAKa,MAAlCuK,EAFD,EAECA,UAAWC,EAFZ,EAEYA,cAEbS,EAAqBV,IAAcC,EACzC,OACE,oCACGS,GACC,kBAACtB,EAAD,KACE,kBAACE,EAAD,CAAkBrE,QAASrG,KAAKuL,wBAC9B,kBAACZ,EAAD,CAAatE,QAASrG,KAAKsL,yBACzB,6BACE,kBAACP,EAAD,QAIJ,kBAACpJ,EAAD,KACE,kBAACsJ,EAAD,KACE,4BAAKW,GACL,2BAAIC,IAGN,kBAACX,EAAD,CAAW7K,UAAU,cACnB,kBAAC,IAAM0L,kBAAP,Y,GA9DuBxL,IAAMC","file":"d4f1cbe54caf5958f920da2f04999452c730519d-3cc6fac16830ce6e85a0.js","sourcesContent":["// `Math.sign` method implementation\n// https://tc39.github.io/ecma262/#sec-math.sign\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","import React from \"react\";\nimport { Icons, ClinicalIcons } from \"../../utils/svg\";\nimport {\n Font,\n Color,\n rem,\n media,\n capitalize,\n responsive,\n} from \"../../utils/style\";\nimport styled, { css } from \"styled-components\";\nimport Container from \"../Container\";\nimport Row from \"../Row\";\n\nconst Wrapper = styled(Container).attrs({\n id: \"value-props\",\n})`\n ${p =>\n p.margin20 &&\n css`\n ${media.mobile`\n padding: 0 20px;\n `}\n `}\n`;\n\nconst StyledRow = styled(Row).attrs({\n id: \"value-props_row\",\n})`\n position: relative;\n z-index: 1;\n\n ${media.mobile`\n border: none;\n `};\n`;\n\nconst Column = styled.div`\n padding-top: ${p => (p.removePadding ? \"0px\" : \"40px\")};\n padding-bottom: ${p => (p.removePadding ? \"0px\" : \"40px\")};\n position: relative;\n\n ${media.mobile`\n\n &:after {\n position: absolute;\n content: '';\n bottom: 0;\n left: 20px;\n right: 20px;\n }\n `};\n`;\n\nconst PropsArea = styled.div.attrs({\n id: \"value-props_row_column_area\",\n})`\n display: flex;\n justify-content: space-between;\n\n ${media.mobile`\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n `};\n`;\n\nconst ValueProp = styled.div.attrs(p => ({\n id: `value-props_row_column_area_prop-${p.index}`,\n}))`\n display: flex;\n flex-direction: column;\n width: 134px;\n\n &:last-child {\n margin-right: 0;\n }\n\n ${media.tablet`\n margin-right: 8px;\n `};\n\n ${media.mobile`\n flex-direction: row;\n width: 100%;\n margin: 0 0 24px 0;\n\n\n &:last-child {\n margin: 0;\n }\n `};\n`;\n\nconst Icon = styled.div.attrs(p => ({\n id: `value-props_row_column_area_prop-${p.index}_icon`,\n}))`\n position: relative;\n width: 32px;\n height: 32px;\n flex: 0 0 32px;\n margin: 0 8px 0 0;\n\n svg {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n\n ${responsive.sm`\n width: 40px;\n height: 40px;\n margin: 0 auto 16px;\n `}\n\n ${responsive.md`\n min-height: 40px;\n `}\n`;\n\nconst ValuePropLabel = styled.span.attrs(p => ({\n id: `value-props_row_column_area_prop-${p.index}_label`,\n}))`\n ${Font.circular}\n color: ${Color.ritualBlue};\n font-size: ${rem(16)};\n line-height: ${rem(22)};\n font-weight: 300;\n text-align: center;\n flex: 1 1 100%;\n\n ${media.mobile`\n text-align: left;\n flex: 1 1 auto;\n align-self: center;\n `}\n`;\n\nexport default class ValueProps extends React.Component {\n renderValueProp(valueProp, icon, i) {\n let cleanedIconName = icon.replace(\"icon\", \"\").replace(/-/gi, \"\");\n let IconElement =\n Icons[capitalize(cleanedIconName)] ||\n ClinicalIcons[capitalize(cleanedIconName)];\n return (\n \n \n \n \n {valueProp}\n \n );\n }\n\n render() {\n let {\n valueProps,\n icons,\n location,\n removePadding,\n className = \"col-lg-10 offset-lg-1\",\n margin20,\n } = this.props;\n\n if (typeof valueProps !== \"object\" || typeof icons !== \"object\")\n return null;\n\n return (\n \n \n \n \n {valueProps.map((valueProp, i) => {\n return this.renderValueProp(valueProp, icons[i], i);\n })}\n \n \n \n \n );\n }\n}\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.github.io/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","import { createSelector } from \"reselect\";\n\nconst app = state => state.app;\n\nconst isLoaded = createSelector(app, app => app.appLoaded);\n\n/**\n * Whether we finished trying to load the user. When authed, this is false until\n * the user has been fetched. When unauthed, this is true as soon as the\n * guest_id has been loaded.\n */\nconst isUserLoaded = createSelector(app, app => app.authInitialized);\n\n// Whether we are actively fetching any user data. This can be true both at\n// initial load and after auth. If the user is unauthed, this will still be\n// true if we're fetching the user's cart.\nconst isFetchingUserData = createSelector(\n app,\n app => app.fetchingDataAfterAuth,\n);\n\nconst isUserDataLoaded = createSelector(\n isUserLoaded,\n isFetchingUserData,\n (isUserLoaded, isFetchingUserData) => {\n return isUserLoaded && !isFetchingUserData;\n },\n);\n\nexport default {\n isLoaded,\n isUserLoaded,\n isFetchingUserData,\n isUserDataLoaded,\n};\n","import React from \"react\";\nimport { Icons } from \"../../utils/svg\";\nimport { Font, Color, rem, responsive } from \"../../utils/style\";\nimport styled from \"styled-components\";\nimport sanitizeHtml from \"isomorphic-html-sanitize\";\nimport { parseMarkdown } from \"../../utils/markdown\";\n\nconst BarrierBusterWrapper = styled.ol`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n overflow: hidden;\n padding: 0;\n list-style: none;\n\n ${responsive.sm`\n justify-content: space-between;\n `};\n`;\n\nconst BarrierBusterItem = styled.li`\n flex: 0 0 calc(50% - (14px / 2));\n text-align: center;\n margin-top: 40px;\n margin-right: 14px;\n\n &:nth-child(2n) {\n margin-right: 0;\n }\n\n ${responsive.sm`\n flex: 0 0 calc(33% - (100px / 3));\n margin-right: 40px;\n\n &:nth-child(2n) {\n margin-right: 40px;\n }\n\n &:nth-child(3n) {\n margin-right: 0;\n }\n `};\n\n ${responsive.md`\n flex: 0 0 calc(33% - (132px / 3));\n margin-top: 56px;\n margin-right: 66px;\n\n &:nth-child(2n) {\n margin-right: 66px;\n }\n\n &:nth-child(3n) {\n margin-right: 0;\n }\n `};\n`;\n\nconst Icon = styled.div`\n display: block;\n width: 30px;\n height: 30px;\n margin: 0 auto 12px;\n position: relative;\n\n ${responsive.md`\n width: 35px;\n height: 35px;\n margin-bottom: 25px;\n `};\n\n svg {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n`;\n\nconst Title = styled.p`\n ${Font.circular};\n font-size: ${rem(16)};\n line-height: ${rem(26)};\n font-weight: 500;\n margin: 0 0 8px;\n color: ${Color.ritualBlue};\n\n ${responsive.md`\n font-size: ${rem(20)};\n line-height: ${rem(30)};\n margin-bottom: 16px;\n `};\n`;\n\nconst Body = styled.p`\n ${Font.circular};\n font-size: ${rem(14)};\n line-height: ${rem(20)};\n font-weight: 300;\n margin: 0;\n color: rgba(20, 43, 111, 0.56);\n\n ${responsive.md`\n font-size: ${rem(16)};\n line-height: ${rem(22)};\n `};\n`;\n\nexport default class BarrierBusters extends React.Component {\n sanitizeContent(copy) {\n const sanitizedContent = sanitizeHtml(copy, { allowedTags: [] });\n return parseMarkdown(sanitizedContent);\n }\n\n renderItem(item, i) {\n let cleanedIconName = item.icon.replace(\"icon\", \"\").replace(/-/gi, \"\");\n let IconElement = Icons[cleanedIconName];\n\n const title = this.sanitizeContent(item.title);\n const body = this.sanitizeContent(item.body);\n\n return (\n \n \n \n \n \n <Body dangerouslySetInnerHTML={{ __html: body }} />\n </BarrierBusterItem>\n );\n }\n\n render() {\n let { items } = this.props;\n\n return (\n <BarrierBusterWrapper>\n {items.map((item, i) => {\n return this.renderItem(item, i);\n })}\n </BarrierBusterWrapper>\n );\n }\n}\n","import React, { Component } from \"react\";\n\nimport GeneralTags from \"./GeneralTags\";\n\nclass PageSEO extends Component {\n render() {\n const { pagePath, title, description, image } = this.props;\n\n return (\n <div>\n <GeneralTags\n pagePath={pagePath}\n title={title}\n description={description}\n image={image}\n />\n </div>\n );\n }\n}\n\nexport default PageSEO;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport smoothscroll from \"smoothscroll-polyfill\";\nimport throttle from \"lodash/throttle\";\n\n// Services\nimport intl from \"../../services/intl\";\nimport { navigate } from \"../../services/navigation\";\n\n// Utils\nimport NameMap from \"../../utils/nameMap\";\nimport { Color, rem, Font, responsive } from \"../../utils/style\";\nimport { variation } from \"../../utils/launchDarkly\";\nimport { getPlanIdForProductSku } from \"../../utils/planToProduct\";\nimport metrics from \"../../utils/metrics\";\n\n// Components\nimport Img from \"gatsby-image\";\nimport RitualButton from \"../global/RitualButton\";\nimport CheckoutButton from \"./CheckoutButton\";\nimport MagicLink from \"../MagicLink\";\nimport ScrollableOverflow from \"../ScrollableOverflow\";\nimport Text from \"../Text\";\n\n// Store\nimport { connect } from \"react-redux\";\nimport { addProductToCart } from \"../../store/cart/actions\";\n\n// Styled Elements\nconst Grid = styled.div.attrs({\n id: \"ProductLandingCards\",\n})`\n display: flex;\n align-items: stretch;\n justify-content: center;\n flex-wrap: wrap;\n margin-bottom: 80px;\n position: relative;\n padding-top: 38px;\n\n ${responsive.sm`\n padding-top: 0;\n `};\n\n ${responsive.md`\n margin-bottom: 120px;\n `}\n`;\n\nconst MobileNavigation = styled.div`\n position: absolute;\n top: 0;\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n\n overflow: visible;\n\n ${responsive.sm`\n display: none;\n `};\n\n &.fixed {\n position: fixed;\n top: 52px;\n right: 0px;\n z-index: 10;\n background-color: ${Color.white};\n padding: 8px 36px 8px;\n }\n`;\n\nconst MobileLabel = styled.span`\n font-size: ${rem(12)};\n line-height: ${rem(20)};\n letter-spacing: 0.8px;\n font-weight: 500;\n opacity: 0.56;\n cursor: pointer;\n border-bottom: 2px solid transparent;\n user-select: none;\n margin-right: 32px;\n\n &:last-of-type {\n margin-right: 0;\n }\n\n &.active {\n opacity: 1;\n border-bottom: 2px solid ${Color.ritualBlue};\n }\n`;\n\n// Height of Ritual nav + label nav\nconst mobileNavigationBuffer = 52 + 38;\n\nexport class ProductCards extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n selectedIndex: 0,\n floatNavigation: false,\n };\n\n this.throttledOnScroll = throttle(this.onScroll.bind(this), 500);\n\n this.scrollableRef = null;\n this.labelRefs = [];\n }\n\n componentDidMount() {\n // Adds polyfill for window.scroll({params})\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll#Browser_Compatibility\n smoothscroll.polyfill();\n window.addEventListener(\"scroll\", this.throttledOnScroll);\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.throttledOnScroll);\n this.throttledOnScroll.cancel();\n }\n\n getSanitizedProductLabels() {\n const { productLabels } = this.props;\n\n return productLabels.map(label => {\n return label.replace(/[^A-Za-z0-9]/gi, \"\");\n });\n }\n\n onScroll() {\n this.navigationOnScroll();\n this.setActiveState();\n }\n\n setActiveState() {\n const elementOffsets = [];\n\n const sanitizedProductLabels = this.getSanitizedProductLabels();\n\n sanitizedProductLabels.forEach(label => {\n const element = document.getElementById(label);\n const offsetFromTop =\n element.getBoundingClientRect().top - (mobileNavigationBuffer + 1);\n\n // We check if the distance from the element to top of viewport\n // is negative, if so we add it to array\n if (Math.sign(offsetFromTop) < 0) {\n elementOffsets.push(offsetFromTop);\n }\n });\n\n // Only visible elements are added to array, so we can use array.length\n // to determine active index :)\n const newIndex = elementOffsets.length ? elementOffsets.length - 1 : 0;\n const { selectedIndex } = this.state;\n\n // Wrapped in statement to prevent multiple renders when nothing changes\n if (selectedIndex !== newIndex) {\n this.setState({\n selectedIndex: newIndex,\n });\n\n // Scroll the Mobile Navigation to the newly active element.\n if (this.scrollableRef) {\n this.scrollableRef.scrollToIndex(newIndex);\n }\n }\n }\n\n navigationOnScroll() {\n const { floatNavigation } = this.state;\n\n const element = document.getElementById(\"ProductLandingCards\");\n\n // Distance from top of element to top of viewport\n const topPosition = element.getBoundingClientRect().top;\n\n // Determines if we should `absolute: fixed` the navigation\n //\n // The 2nd part of this argument is negative as the element has\n // scrolled past the top of the viewport, so we check if its between\n // 8px from top of viewport and negative ElementHeight from top of viewport\n const shouldDisplayFixed =\n topPosition <= 8 && topPosition >= 0 - element.offsetHeight;\n\n // Wrapped in statements to protect setting state every px scrolled\n if (!floatNavigation && shouldDisplayFixed) {\n this.setState({\n floatNavigation: true,\n });\n } else if (floatNavigation && !shouldDisplayFixed) {\n this.setState({\n floatNavigation: false,\n });\n }\n }\n\n clickLabel(index) {\n const sanitizedProductLabels = this.getSanitizedProductLabels();\n const element = document.getElementById(sanitizedProductLabels[index]);\n const offset =\n element.getBoundingClientRect().top +\n (window.scrollY || window.pageYOffset); // IE fallback\n if (element && offset) {\n window.scroll({\n top: offset - mobileNavigationBuffer,\n behavior: \"smooth\",\n });\n }\n }\n\n render() {\n const { floatNavigation } = this.state;\n const { productLabels, products, dispatchAddProductToCart } = this.props;\n const sanitizedProductLabels = this.getSanitizedProductLabels();\n\n if (!products || !productLabels || !sanitizedProductLabels) return null;\n\n return (\n <Grid>\n <MobileNavigation className={floatNavigation ? \"fixed\" : \"\"}>\n <ScrollableOverflow\n ref={r => (this.scrollableRef = r)}\n bleedLeft={true}\n bleedRight={true}\n >\n {productLabels.map((label, index) => {\n let className =\n index === this.state.selectedIndex ? \"active\" : \"\";\n return (\n <MobileLabel\n onClick={() => this.clickLabel(index)}\n className={className}\n key={index}\n ref={r => (this.labelRefs[index] = r)}\n >\n {label}\n </MobileLabel>\n );\n })}\n </ScrollableOverflow>\n </MobileNavigation>\n {products.map((product, index) => {\n return (\n <ProductCard\n id={sanitizedProductLabels[index]}\n key={NameMap(product.name).plain}\n index={index}\n product={product}\n dispatchAddProductToCart={dispatchAddProductToCart}\n />\n );\n })}\n </Grid>\n );\n }\n}\n\nconst ProductCardWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n flex: 0 0 100%;\n margin: 0 0 40px;\n\n &:last-child {\n margin-bottom: 0;\n }\n\n ${responsive.sm`\n flex: 1 1 calc(50% - 20px);\n margin-right: 20px;\n margin-bottom: 0px;\n max-width: 280px;\n\n &:nth-child(2n+1) {\n margin-right: 0;\n }\n\n &:nth-child(n+4) {\n margin-top: 40px;\n }\n\n &:last-child {\n margin-right: 0;\n }\n `};\n\n ${responsive.md`\n flex: 0 0 calc(33% - (60px / 3));\n margin: 0 26px 0 0;\n max-width: 294px;\n\n &:nth-child(2n+1) {\n margin-right: 26px;\n }\n\n &:nth-child(n+4) {\n margin-top: 0;\n }\n\n &:nth-child(3n+1) {\n margin-right: 0;\n }\n\n &:nth-child(n+5) {\n margin-top: 80px;\n }\n\n &:last-child {\n margin-right: 0;\n }\n `};\n\n ${responsive.lg`\n max-width: 370px;\n margin: 0 30px 0 0;\n `};\n`;\n\nconst ProductCardContent = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n background-color: rgba(242, 241, 245, 0.56);\n border-radius: 8px;\n padding: 16px;\n margin-bottom: 8px;\n max-width: 280px;\n\n ${responsive.sm`\n max-width: none;\n width: 280px;\n `};\n\n ${responsive.md`\n width: 294px;\n border-radius: 16px;\n padding: 24px 16px;\n margin-bottom: 16px;\n `};\n\n ${responsive.lg`\n width: 370px;\n padding: 24px 32px;\n `}\n`;\n\nconst ProductTitle = styled.h2`\n ${Font.circular};\n font-size: ${rem(18)};\n line-height: ${rem(28)};\n font-weight: 500;\n text-align: center !important;\n margin: 0 0 4px;\n\n ${responsive.md`\n font-size: ${rem(22)};\n line-height: ${rem(32)};\n letter-spacing: -0.2px;\n margin: 0 0 12px;\n `};\n`;\n\nconst ProductImage = styled(Img)`\n overflow: hidden;\n margin-bottom: 4px;\n height: 120px;\n width: 120px;\n max-height: 120px;\n max-width: 120px;\n\n ${responsive.md`\n width: 204px;\n height: 204px;\n max-height: 204px;\n max-width: 204px;\n margin-bottom: 8px;\n `};\n`;\n\nconst ProductDescription = styled.p`\n ${Font.circular};\n font-size: ${rem(14)};\n line-height: ${rem(20)};\n font-weight: 300;\n text-align: center !important;\n margin: 0 0 12px;\n\n ${responsive.md`\n font-size: ${rem(16)};\n line-height: ${rem(22)};\n font-weight: 300;\n margin: 0 0 16px;\n `};\n`;\n\nconst LearnMore = styled(MagicLink)`\n font-size: ${rem(16)};\n line-height: ${rem(26)};\n font-weight: 500;\n border-bottom: 2px solid ${Color.ritualBlue};\n cursor: pointer;\n margin: 0;\n transition: opacity 0.2s;\n\n &:hover {\n opacity: 0.56;\n }\n\n ${responsive.md`\n font-size: ${rem(18)};\n line-height: ${rem(28)};\n `};\n`;\n\nexport class ProductCard extends React.Component {\n constructor() {\n super();\n\n this.state = {\n isLearnMoreVariation: false,\n };\n }\n\n componentDidMount() {\n this.setState({\n isLearnMoreVariation: variation(\"shop-landing-cta-swap\"),\n });\n }\n\n handleVariationCTAClick(title, location, product) {\n this.trackCTAClick(title, location);\n\n const planId = getPlanIdForProductSku(product.sku);\n this.props.dispatchAddProductToCart(planId);\n }\n\n trackCTAClick(title, location) {\n metrics.track(\"CTA Clicked\", {\n title: title,\n nonInteraction: false,\n location: location,\n });\n }\n\n trackLearnMoreClick(title, location, url, event) {\n event.preventDefault();\n metrics.track(\"CTA Clicked\", {\n title: title,\n nonInteraction: false,\n location: location,\n });\n navigate(url);\n }\n\n render() {\n const { id, product } = this.props;\n\n // If the product is out of stock, do not update the variation.\n const isLearnMoreVariation =\n this.state.isLearnMoreVariation && product.stockStatus === \"in stock\";\n\n const productName = NameMap(product.name).plain;\n\n let ctaText = intl.t(\"general.button-add-cart\", \"Add to Cart\");\n ctaText = `${intl.formatCurrency(product.price, { round: true })} — ${ctaText}`;\n\n const learnMoreLink = `/products/${product.slug}`;\n\n const checkoutButtonProps = {\n id: `${id}_button`,\n className: \"yellow-cta\",\n buttonText: ctaText,\n stockStatus: product.stockStatus,\n trackCTAClick: this.trackCTAClick.bind(\n this,\n ctaText,\n \"Product List Page\",\n ),\n product,\n };\n\n return (\n <ProductCardWrapper id={id}>\n <ProductCardContent>\n <ProductTitle id={`${id}_title`}>{product.summary}</ProductTitle>\n <ProductImage\n id={`${id}_image`}\n fixed={product.alternateThumbnail.fixed}\n fadeIn={true}\n alt={product.alternateThumbnail.description}\n style={{\n userSelect: \"none\",\n userDrag: \"none\",\n pointerEvents: \"none\",\n touchCallout: \"none\",\n }}\n />\n <ProductDescription id={`${id}_description`}>\n {product.shortDescription}\n </ProductDescription>\n\n {isLearnMoreVariation ? (\n <RitualButton\n id={`${id}_learn-more-button`}\n className=\"yellow-cta\"\n to={learnMoreLink}\n onClick={event =>\n this.trackLearnMoreClick(\n \"Learn More\",\n \"Product List Page\",\n learnMoreLink,\n event,\n )\n }\n title={`Learn more about ${productName}`}\n >\n <Text id=\"general.learn-more\" defaultMessage=\"Learn More\" />\n </RitualButton>\n ) : (\n <CheckoutButton {...checkoutButtonProps} />\n )}\n </ProductCardContent>\n {isLearnMoreVariation ? (\n <LearnMore\n id={`${id}_link`}\n to=\"/cart\"\n onClick={this.handleVariationCTAClick.bind(\n this,\n ctaText,\n \"Product List Page\",\n product,\n )}\n >\n {ctaText}\n </LearnMore>\n ) : (\n <LearnMore\n id={`${id}_learn-more-link`}\n to={learnMoreLink}\n onClick={event =>\n this.trackLearnMoreClick(\n \"Learn More\",\n \"Product List Page\",\n learnMoreLink,\n event,\n )\n }\n title={`Learn more about ${productName}`}\n >\n <Text id=\"general.learn-more\" defaultMessage=\"Learn More\" />\n </LearnMore>\n )}\n </ProductCardWrapper>\n );\n }\n}\n\nexport default connect(null, {\n dispatchAddProductToCart: addProductToCart,\n})(ProductCards);\n","import Marked from \"marked\";\nimport intl from \"../services/intl\";\n\nexport function localizeMarkdownLinks(data) {\n return data.replace(\n /\\[([^\\]]*)\\]\\(([^)]*)\\)/g,\n (_, g1, g2) => `[${g1}](${intl.localizePath(g2)})`,\n );\n}\n\nexport function localizeHtmlLinks(data) {\n return data.replace(\n /href=\"(.*?)\"/g,\n (_, g1) => `href=\"${intl.localizePath(g1)}\"`,\n );\n}\n\nexport function parseMarkdown(content) {\n const localized = localizeMarkdownLinks(content);\n return Marked.parseInline(localized);\n}\n\nexport function processHtml(content) {\n return localizeHtmlLinks(content);\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\n\n// Services\nimport { navigate } from \"../services/navigation\";\n\n// Utils\nimport { Color, rem, responsive, rgba } from \"../utils/style\";\nimport { Icons } from \"../utils/svg\";\nimport { variation } from \"../utils/launchDarkly\";\nimport metrics from \"../utils/metrics\";\n\nconst Overlay = styled.div`\n position: fixed;\n height: auto;\n width: calc(100% - 16px);\n background: ${Color.ritualLightYellow};\n border-radius: 0px 8px 8px;\n margin: auto;\n bottom: 8px;\n right: 8px;\n z-index: 100;\n\n &:hover {\n cursor: pointer;\n\n .link-arrow {\n background: ${Color.ritualBlue};\n\n svg {\n g {\n stroke: white;\n }\n }\n }\n }\n\n ${responsive.sm`\n max-width: 320px;\n `}\n`;\n\nconst OverlayContainer = styled.div`\n position: relative;\n display: flex;\n padding: 16px;\n\n ${responsive.sm`\n padding: 24px;\n `}\n`;\n\nconst CloseButton = styled.button`\n position: absolute;\n top: -16px;\n left: 0;\n height: 36px;\n width: 36px;\n background: ${Color.ritualLightYellow};\n padding: 0;\n border: none;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n\n [data-whatintent=\"mouse\"] &:focus,\n [data-whatintent=\"touch\"] &:focus {\n outline: none;\n }\n\n div {\n position: relative;\n height: 12px;\n width: 12px;\n }\n\n &:hover {\n svg {\n g {\n stroke: ${rgba(Color.ritualBlue, 0.16)};\n }\n }\n\n & + div {\n .link-arrow {\n background: ${Color.ritualYellow};\n\n svg {\n g {\n stroke: ${Color.ritualBlue};\n }\n }\n }\n }\n }\n`;\n\nconst CloseIcon = styled(Icons.Close)`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n\n g {\n stroke: ${rgba(Color.ritualBlue, 0.24)};\n }\n`;\n\nconst Body = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nconst TextContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n h4 {\n font-size: ${rem(16)};\n line-height: ${rem(26)};\n margin: 0;\n padding: 0;\n padding-bottom: 4px;\n }\n\n p {\n font-size: ${rem(14)};\n font-weight: 300;\n line-height: ${rem(20)};\n margin: 0;\n padding: 0;\n max-width: 210px;\n\n ${responsive.sm`\n max-width: unset;\n `}\n }\n`;\n\nconst LinkArrow = styled.button`\n height: 48px;\n width: 48px;\n margin-left: 8px;\n border: none;\n border-radius: 50%;\n background: ${Color.ritualYellow};\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n align-items: center;\n\n [data-whatintent=\"mouse\"] &:focus,\n [data-whatintent=\"touch\"] &:focus {\n outline: none;\n }\n`;\n\nexport default class OverlayLink extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n isEnabled: false,\n overlayClosed: false,\n };\n\n this.handleOverlayCloseClick = this.handleOverlayCloseClick.bind(this);\n this.handleOverlayLinkClick = this.handleOverlayLinkClick.bind(this);\n }\n\n componentDidMount() {\n this.setState({\n isEnabled: variation(\"shop-landing-bundle-builder\"),\n });\n }\n\n handleOverlayLinkClick() {\n const { location, title } = this.props;\n\n metrics.track(\"CTA Clicked\", {\n location: location ? location : \"Shop Landing Page Overlay\",\n title: title ? title : \"Build a Bundle\",\n });\n\n const destination = this.props.linkDestination || \"/build-a-bundle\";\n navigate(destination);\n }\n\n handleOverlayCloseClick(e) {\n // dont propagate since close handler is inside navigate handler\n e.stopPropagation();\n this.setState({\n overlayClosed: true,\n });\n }\n\n render() {\n const { heading, subheading } = this.props;\n const { isEnabled, overlayClosed } = this.state;\n\n const isOverlayDisplayed = isEnabled && !overlayClosed;\n return (\n <>\n {isOverlayDisplayed && (\n <Overlay>\n <OverlayContainer onClick={this.handleOverlayLinkClick}>\n <CloseButton onClick={this.handleOverlayCloseClick}>\n <div>\n <CloseIcon />\n </div>\n </CloseButton>\n\n <Body>\n <TextContainer>\n <h4>{heading}</h4>\n <p>{subheading}</p>\n </TextContainer>\n\n <LinkArrow className=\"link-arrow\">\n <Icons.ArrowRoundedRight />\n </LinkArrow>\n </Body>\n </OverlayContainer>\n </Overlay>\n )}\n </>\n );\n }\n}\n"],"sourceRoot":""}