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ers/utils.ts","webpack://brc/./src/stories/Components/Misc/HeadingSummaryBlock/HeadingSummaryBlock.styles.ts","webpack://brc/./src/stories/Components/Misc/HeadingSummaryBlock/HeadingSummaryBlock.tsx","webpack://brc/./src/stories/Widgets/Media/Media.styles.ts","webpack://brc/./src/stories/Widgets/Media/Media.tsx","webpack://brc/./src/stories/Widgets/RichText/RichText.styles.ts"],"sourcesContent":["import { css } from 'styled-components';\r\n/**\r\n * Returns the aspect ratio of the given width and height as a percentage.\r\n */\r\nexport function aspectRatio(width, height) {\r\n return (height / width) * 100;\r\n}\r\n/**\r\n * Re-usable styles for image container where the\r\n * image needs to maintain it's aspect ratio\r\n *\r\n * @param width\r\n * @param height\r\n * @returns\r\n */\r\nexport function imageWrapperPreserveRatio(width, height) {\r\n if (!width && !height) {\r\n return null;\r\n }\r\n return css `\r\n position: relative;\r\n overflow: hidden;\r\n overflow: clip;\r\n width: 100%;\r\n aspect-ratio: ${width / height};\r\n `;\r\n}\r\n/**\r\n * Calculates the percentage bottom padding\r\n * required to maintain a certain ratio.\r\n *\r\n * To be used in cases where the image ratio\r\n * changes based on viewport.\r\n *\r\n * @param width\r\n * @param height\r\n * @returns padding-bottom: {ratioPercentage}%\r\n */\r\nexport function imageWrapperRatioPadding(width, height) {\r\n if (!width && !height) {\r\n return '';\r\n }\r\n const ratioPercentage = aspectRatio(width, height).toFixed(2);\r\n return `padding-bottom: ${ratioPercentage}%`;\r\n}\r\n/**\r\n * Re-usable styles for an image placed within\r\n * a container maintaining aspect ratio\r\n */\r\nexport const imageCoverContainer = (relative) => css `\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n ${!relative && 'position: absolute; top: 0;left: 0;'}\r\n`;\r\n","import queryString from 'query-string';\r\n/**\r\n * Create an image URL for ImageProcessor\r\n * @param image The image model\r\n * @param imageParams The image parameters\r\n * @returns The image URL\r\n */\r\nexport function imageUrl(image, imageParams) {\r\n if (!image) {\r\n return '';\r\n }\r\n const params = {\r\n rxy: image.focalPoint ? `${image.focalPoint.top},${image.focalPoint.left}` : undefined,\r\n ...imageParams,\r\n };\r\n if (params.width && params.heightratio) {\r\n params.height = Math.round(params.width / params.heightratio);\r\n }\r\n if (params.height && params.widthratio) {\r\n params.width = Math.round(params.height / params.widthratio);\r\n }\r\n const paramsString = queryString.stringify(params);\r\n return `${image.src}${paramsString ? `?${queryString.stringify(params)}` : ''}`;\r\n}\r\nexport function getSrcs(image, upper, lower, steps, ratio, imageParams) {\r\n if (!image) {\r\n return undefined;\r\n }\r\n const sizes = getRange(upper, lower, steps);\r\n const sizesArr = sizes.map((size) => `${imageUrl(image, { ...imageParams, width: size, heightratio: ratio })} ${size}w`);\r\n return {\r\n src: sizesArr[0].split(' ')[0],\r\n srcSet: sizesArr.join(','),\r\n };\r\n}\r\nexport function getRetinaSrcs(image, width, ratio) {\r\n const dprs = [1, 1.5, 2, 2.5, 3];\r\n const dprsArr = dprs.map((dpr) => `${imageUrl(image, { width: width * dpr, heightratio: ratio })} ${dpr}x`);\r\n return {\r\n src: dprsArr[0].split(' ')[0],\r\n srcSet: dprsArr.join(','),\r\n };\r\n}\r\nfunction getRange(upper, lower, steps) {\r\n const difference = upper - lower;\r\n const increment = difference / (steps - 1);\r\n return [\r\n lower,\r\n ...Array(steps - 2)\r\n .fill('')\r\n .map((_, index) => Math.ceil(lower + increment * (index + 1))),\r\n upper,\r\n ];\r\n}\r\n","export function sleep(ms) {\r\n return new Promise((resolve) => setTimeout(resolve, ms));\r\n}\r\nexport function formatNumberValue(value, maximumDecimals, minimumDigits) {\r\n const formatter = new Intl.NumberFormat(undefined, {\r\n maximumFractionDigits: maximumDecimals ?? 0,\r\n minimumIntegerDigits: minimumDigits ?? 1,\r\n });\r\n return formatter.format(value);\r\n}\r\n/** Clamp index to be within the min/max index range. */\r\nexport function clamp(value, max) {\r\n return Math.max(Math.min(value, max), 0);\r\n}\r\n/**\r\n * Rule structure for react-hook-form\r\n */\r\nexport const EMAIL_RULE = {\r\n message: `Please enter a valid email address`,\r\n value: /^[\\w\\-.\\d*]+@[\\w\\-\\d.]+(\\.\\w*)$/,\r\n};\r\nexport const highlightTitleWords = (title) => title.replaceAll(/\\*(.*?)\\*/g, '$1');\r\n","import { transition } from '@helpers/animate';\r\nimport brand, { BrandColours } from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport { Device, from } from '@helpers/media';\r\nimport { contentStyles, h2, subheading } from '@helpers/typography';\r\nimport styled from 'styled-components';\r\nconst ContentWrapper = styled.div `\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n\r\n [data-layout='central'] &,\r\n [data-layout='split'] & {\r\n max-width: 546px;\r\n }\r\n\r\n [data-layout='central'] & {\r\n margin-left: auto;\r\n margin-right: auto;\r\n }\r\n`;\r\nconst Container = styled.section `\r\n --headingMargin: ${fluid(8, 14)};\r\n\r\n display: flex;\r\n flex-direction: column;\r\n\r\n &[data-layout='default'],\r\n &[data-layout='central'] {\r\n max-width: 695px;\r\n }\r\n\r\n &[data-layout='central'] {\r\n text-align: center;\r\n margin-left: auto;\r\n margin-right: auto;\r\n }\r\n\r\n &:not(:has(${ContentWrapper})) {\r\n --headingMargin: 0px;\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n &[data-layout='central'] {\r\n align-items: center;\r\n text-align: center;\r\n margin-left: auto;\r\n margin-right: auto;\r\n }\r\n\r\n &[data-layout='split'] {\r\n --headingMargin: 0px;\r\n\r\n flex-direction: row;\r\n justify-content: space-between;\r\n column-gap: ${fluid(56, 120)};\r\n }\r\n }\r\n`;\r\nconst HeadIcon = styled.div `\r\n display: none;\r\n\r\n [data-layout='central'] & {\r\n display: block;\r\n\r\n svg {\r\n width: ${fluid(48, 65)};\r\n height: ${fluid(48, 65)};\r\n }\r\n }\r\n`;\r\nconst Subheading = styled.span `\r\n ${subheading};\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n ${Container}[data-layout='split'] & {\r\n grid-column: 1 / span 1;\r\n }\r\n }\r\n`;\r\nconst Heading = styled.h2 `\r\n ${h2};\r\n\r\n text-wrap: pretty;\r\n margin-bottom: var(--headingMargin);\r\n color: var(--headingColour, currentColor);\r\n\r\n ${Container}[data-layout='split'] & {\r\n max-width: 695px;\r\n }\r\n\r\n > span {\r\n ${transition('background-size, color', 0.5)};\r\n\r\n display: inline;\r\n background-image: linear-gradient(\r\n to right,\r\n var(--highlightColour, transparent),\r\n var(--highlightColour, transparent)\r\n );\r\n background-repeat: no-repeat;\r\n background-size: 100% 100%;\r\n transition-delay: 200ms;\r\n color: var(--highlightTextColour, currentColor);\r\n padding: 0 8px;\r\n margin-left: -8px;\r\n\r\n ${Container}[data-animate='false'] & {\r\n background-size: 0% 100%;\r\n color: currentColor;\r\n }\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n ${Container}[data-layout='split'] & {\r\n grid-column: 1 / span 1;\r\n }\r\n }\r\n`;\r\nconst LogoImage = styled.img `\r\n display: block;\r\n`;\r\nconst Content = styled.div `\r\n ${contentStyles};\r\n\r\n [data-theme=${BrandColours.PurpleDark}] &,\r\n [data-theme=${BrandColours.PurpleLight}] & {\r\n ol,\r\n ul {\r\n li::before {\r\n color: ${brand.global.white};\r\n }\r\n }\r\n }\r\n`;\r\nconst ButtonWrapper = styled.div `\r\n display: flex;\r\n gap: var(--headerBlockButtonsGap, ${fluid(16, 38)});\r\n flex-wrap: wrap;\r\n margin-top: ${fluid(16, 38)};\r\n`;\r\nconst DetailContent = styled.div `\r\n ${transition('transform, opacity', 0.5)};\r\n ${fonts.lato.semiBold};\r\n\r\n font-size: ${fluid(15, 16)};\r\n line-height: ${fluid(23, 26)};\r\n display: inline-flex;\r\n flex-wrap: wrap;\r\n gap: 8px 32px;\r\n margin-top: ${fluid(10, 14)};\r\n\r\n &:not(:last-child) {\r\n margin-bottom: ${fluid(10, 14)};\r\n }\r\n\r\n @media print {\r\n opacity: 1 !important;\r\n transform: translateY(0px) !important;\r\n }\r\n\r\n [data-animate='false'] & {\r\n opacity: 0;\r\n transform: translateY(20px);\r\n\r\n @media print {\r\n opacity: 1 !important;\r\n transform: translateY(0px) !important;\r\n }\r\n }\r\n\r\n [data-secondary=${BrandColours.White}] & {\r\n color: ${brand.grey.dark};\r\n }\r\n\r\n ::before {\r\n content: '';\r\n display: block;\r\n width: 5px;\r\n height: 5px;\r\n border-radius: 50%;\r\n background-color: ${brand.global.white};\r\n position: absolute;\r\n top: 50%;\r\n right: calc((37px / 2) * -1);\r\n transform: translateY(-50%);\r\n\r\n [data-secondary=${BrandColours.White}] & {\r\n background-color: ${brand.grey.dark};\r\n }\r\n }\r\n\r\n :last-child::before {\r\n content: none;\r\n }\r\n`;\r\nconst Detail = styled.span `\r\n display: inline-flex;\r\n align-items: center;\r\n gap: ${fluid(4, 8)};\r\n position: relative;\r\n\r\n svg {\r\n width: 24px;\r\n height: 24px;\r\n\r\n [data-secondary=${BrandColours.White}] & {\r\n color: ${brand.primary.purple.light};\r\n }\r\n }\r\n`;\r\nconst HeadingSummaryBlockStyles = {\r\n Container,\r\n HeadIcon,\r\n Heading,\r\n Subheading,\r\n LogoImage,\r\n Content,\r\n ContentWrapper,\r\n ButtonWrapper,\r\n DetailContent,\r\n Detail,\r\n};\r\nexport default HeadingSummaryBlockStyles;\r\n","import { rootMargin } from '@helpers/animate';\r\nimport { getSvgIcon, InterfaceIcon } from '@helpers/icons';\r\nimport { highlightTitleWords } from '@helpers/utils';\r\nimport { useInView } from '@hooks/useInView';\r\nimport { LinkButton } from '@stories/Components/Buttons/Button/Button';\r\nimport * as React from 'react';\r\nimport S from './HeadingSummaryBlock.styles';\r\nconst HeadingSummaryBlock = (props) => {\r\n const [containerRef, inView] = useInView({ rootMargin }, false, props.pageContext?.isEditMode);\r\n if (!props.summary && !props.heading) {\r\n return null;\r\n }\r\n function hasContent() {\r\n return !!props.summary || (props.ctas && props.ctas.length > 0)\r\n || !!props.date || !!props.time\r\n || !!props.location || !!props.readTime;\r\n }\r\n return (React.createElement(S.Container, { ref: containerRef, \"data-layout\": props.layout ?? 'default', \"data-animate\": inView },\r\n React.createElement(\"div\", null,\r\n props.headIcon && React.createElement(S.HeadIcon, null, getSvgIcon(props.headIcon)),\r\n props.subheading && React.createElement(S.Subheading, null, props.subheading),\r\n props.heading && (React.createElement(S.Heading, { as: props.headingType, dangerouslySetInnerHTML: { __html: highlightTitleWords(props.heading) } })),\r\n props.logoImage && (React.createElement(S.LogoImage, { src: props.logoImage.src, alt: props.logoImage.altText, loading: \"lazy\" }))),\r\n hasContent() ? (React.createElement(S.ContentWrapper, null,\r\n props.summary && React.createElement(S.Content, { dangerouslySetInnerHTML: { __html: props.summary } }),\r\n props.date || props.time || props.location || props.readTime ? (React.createElement(S.DetailContent, null,\r\n props.date && (React.createElement(S.Detail, null,\r\n getSvgIcon(InterfaceIcon.CalendarBlank),\r\n props.date)),\r\n props.time && (React.createElement(S.Detail, null,\r\n getSvgIcon(InterfaceIcon.Clock),\r\n props.time)),\r\n props.location && (React.createElement(S.Detail, null,\r\n getSvgIcon(InterfaceIcon.Location),\r\n props.location)),\r\n props.readTime && (React.createElement(S.Detail, null,\r\n props.readTime,\r\n \" \",\r\n props.translations?.['global.readtime.label'] ?? '')))) : null,\r\n props.ctas && props.ctas.length > 0 ? (React.createElement(S.ButtonWrapper, { \"data-variant\": props.ctaWrapperVariant }, props.ctas.map((cta, i) => (React.createElement(LinkButton, { key: `${cta.text}-${props.heading}-${i}`, buttonType: cta.buttonType ? cta.buttonType : 'primary', href: cta.url, target: cta.target, icon: cta.icon }, cta.text))))) : null)) : null));\r\n};\r\nexport default HeadingSummaryBlock;\r\n","import { transition } from '@helpers/animate';\r\nimport { imageCoverContainer, imageWrapperPreserveRatio } from '@helpers/aspectRatio';\r\nimport brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport { ButtonReset } from '@helpers/global';\r\nimport { baseGrid } from '@helpers/grid';\r\nimport { Device, from, until } from '@helpers/media';\r\nimport HeadingSummaryBlockStyles from '@stories/Components/Misc/HeadingSummaryBlock/HeadingSummaryBlock.styles';\r\nimport SectionWrapper, { BackgroundVariant, } from '@stories/Components/Misc/SectionWrapper/SectionWrapper';\r\nimport SectionWrapperStyles from '@stories/Components/Misc/SectionWrapper/SectionWrapper.styles';\r\nimport styled from 'styled-components';\r\nimport { centralColumns } from '../RichText/RichText.styles';\r\nconst Container = styled(SectionWrapper) `\r\n @media print {\r\n page-break-before: auto;\r\n page-break-after: auto;\r\n page-break-inside: avoid;\r\n }\r\n\r\n --sectionSpacingTop: 40px;\r\n --sectionSpacingBottom: 40px;\r\n\r\n ${SectionWrapperStyles.Inner} {\r\n ${baseGrid};\r\n\r\n @media print {\r\n padding: 0 !important;\r\n margin: 0 !important;\r\n }\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n &[data-layout='central'][data-variant=${BackgroundVariant.White}] {\r\n ${SectionWrapperStyles.Inner} {\r\n --sectionSpacingTop: 0;\r\n --sectionSpacingBottom: 0;\r\n }\r\n }\r\n }\r\n\r\n ${HeadingSummaryBlockStyles.Container} {\r\n grid-column: 1 / -1;\r\n margin-bottom: ${fluid(24, 42)};\r\n\r\n @media ${until(Device.TabletLarge)} {\r\n align-items: center;\r\n text-align: center;\r\n margin-left: auto;\r\n margin-right: auto;\r\n }\r\n }\r\n`;\r\nconst MediaWrapper = styled.div `\r\n ${ButtonReset};\r\n ${imageWrapperPreserveRatio(344, 220)};\r\n\r\n grid-column: 1 / -1;\r\n border-radius: ${fluid(10, 20)};\r\n\r\n ${Container}[data-layout='central'] & {\r\n ${centralColumns};\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n aspect-ratio: 1712 / 838;\r\n }\r\n\r\n @media print {\r\n width: 60%;\r\n margin: 0 auto;\r\n }\r\n\r\n [data-show-overlay='true'] & {\r\n &::after {\r\n content: '';\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n\r\n @media print {\r\n display: none;\r\n }\r\n }\r\n }\r\n`;\r\nconst Image = styled.img `\r\n ${transition('opacity', 0.5)};\r\n ${imageCoverContainer()};\r\n\r\n &:nth-child(2) {\r\n ${MediaWrapper}[data-playing='true'] & {\r\n opacity: 0;\r\n pointer-events: none;\r\n }\r\n }\r\n`;\r\nconst PlayIcon = styled.span `\r\n ${transition('transform, opacity', 0.5)};\r\n\r\n @media print {\r\n display: none;\r\n }\r\n\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n display: grid;\r\n place-content: center;\r\n width: ${fluid(64, 150)};\r\n aspect-ratio: 1;\r\n background-color: ${brand.primary.blue.light};\r\n color: ${brand.global.white};\r\n transform: translate(-50%, -50%);\r\n border-radius: ${fluid(8, 16)};\r\n transform-origin: center;\r\n z-index: 1;\r\n\r\n svg {\r\n display: block;\r\n width: ${fluid(24, 70)};\r\n }\r\n\r\n ${MediaWrapper}:focus-visible &,\r\n ${MediaWrapper}:hover & {\r\n transform: translate(-50%, -50%) scale(1.1);\r\n opacity: 0.9;\r\n }\r\n\r\n ${MediaWrapper}[data-playing='true'] & {\r\n opacity: 0;\r\n pointer-events: none;\r\n }\r\n\r\n ${Container}[data-layout='central'] & {\r\n width: ${fluid(48, 112)};\r\n }\r\n`;\r\nconst MediaStyles = {\r\n Container,\r\n MediaWrapper,\r\n Image,\r\n PlayIcon,\r\n};\r\nexport default MediaStyles;\r\n","import { InterfaceIcon, getSvgIcon } from '@helpers/icons';\r\nimport { getSrcs } from '@helpers/image';\r\nimport { Device, until } from '@helpers/media';\r\nimport HeadingSummaryBlock from '@stories/Components/Misc/HeadingSummaryBlock/HeadingSummaryBlock';\r\nimport { BackgroundVariant } from '@stories/Components/Misc/SectionWrapper/SectionWrapper';\r\nimport * as React from 'react';\r\nimport ReactPlayer from 'react-player/youtube';\r\nimport S from './Media.styles';\r\nconst Media = (props) => {\r\n const [playing, setPlaying] = React.useState(false);\r\n const srcs = props.image\r\n ? props.layout === 'central'\r\n ? getSrcs(props.image, 1020, 344, 6, 344 / 220)\r\n : getSrcs(props.image, 1712, 344, 10, 344 / 220)\r\n : undefined;\r\n const sizes = props.layout === 'central'\r\n ? `${until(Device.TabletLarge)} 100vw, ${until(Device.DesktopSmall)} 83vw, ${until(Device.DesktopLarge)} 66vw, 840px`\r\n : `${until(Device.DesktopLarge)} 100vw, 1712px`;\r\n if (!srcs) {\r\n return null;\r\n }\r\n return (React.createElement(S.Container, { id: props.anchorId, variant: props.variant ? props.variant : BackgroundVariant.White, translations: props.translations, \"data-layout\": props.layout ?? 'full-width', \"data-show-overlay\": props.video && !playing },\r\n React.createElement(HeadingSummaryBlock, { ...props, summary: props.summary ? `
${props.summary}
` : undefined, layout: 'central' }),\r\n React.createElement(S.MediaWrapper, { \"data-playing\": playing, ...(props.video && !playing\r\n ? {\r\n as: 'button',\r\n onClick: () => setPlaying(true),\r\n 'aria-label': props.translations?.['global.media.play'],\r\n }\r\n : {}) },\r\n playing && props.video ? (React.createElement(S.Image, { as: \"span\" },\r\n React.createElement(ReactPlayer, { url: props.video, playing: true, controls: true, width: \"100%\", height: \"100%\" }))) : null,\r\n React.createElement(S.Image, { src: srcs.src, srcSet: srcs.srcSet, sizes: sizes, alt: props.image.altText, loading: \"lazy\" }),\r\n props.video && React.createElement(S.PlayIcon, null, getSvgIcon(InterfaceIcon.Play)))));\r\n};\r\nexport default Media;\r\n","import { fluid } from '@helpers/fluid';\r\nimport { baseGrid } from '@helpers/grid';\r\nimport { Device, from } from '@helpers/media';\r\nimport { contentStyles, h3, reverseLinkUnderline, subheading } from '@helpers/typography';\r\nimport SectionWrapper from '@stories/Components/Misc/SectionWrapper/SectionWrapper';\r\nimport SectionWrapperStyles from '@stories/Components/Misc/SectionWrapper/SectionWrapper.styles';\r\nimport styled, { css } from 'styled-components';\r\nconst Container = styled(SectionWrapper) `\r\n ${SectionWrapperStyles.Inner} {\r\n ${baseGrid};\r\n\r\n @media print {\r\n padding: 50px 0;\r\n }\r\n }\r\n`;\r\nexport const centralColumns = css `\r\n @media ${from(Device.TabletLarge)} {\r\n grid-column: 2 / -2;\r\n }\r\n\r\n @media ${from(Device.DesktopSmall)} {\r\n grid-column: 3 / -3;\r\n }\r\n\r\n @media ${from(Device.DesktopLarge)} {\r\n grid-column: 4 / -4;\r\n }\r\n`;\r\nconst HeadingContainer = styled.div `\r\n grid-column: 1 / -1;\r\n\r\n ${Container}[data-layout='default'] &,\r\n ${Container}[data-layout='central'] & {\r\n ${centralColumns};\r\n }\r\n\r\n ${Container}[data-layout='split'] & {\r\n @media ${from(Device.TabletLarge)} {\r\n grid-column: 1 / span 4;\r\n }\r\n\r\n @media ${from(Device.DesktopSmall)} {\r\n grid-column: 1 / span 5;\r\n }\r\n }\r\n\r\n ${Container}[data-layout='central'] & {\r\n text-align: center;\r\n }\r\n`;\r\nconst SubHeading = styled.span `\r\n ${subheading};\r\n\r\n margin-bottom: ${fluid(8, 12)};\r\n`;\r\nconst Heading = styled.h2 `\r\n ${h3};\r\n`;\r\nconst ContentContainer = styled.div `\r\n grid-column: 1 / -1;\r\n\r\n ${Container}[data-layout='default'] &,\r\n ${Container}[data-layout='central'] & {\r\n ${centralColumns};\r\n\r\n ${() => CtasContainer} {\r\n margin-top: ${fluid(32, 34)};\r\n }\r\n }\r\n\r\n ${Container}[data-layout='central'] & {\r\n text-align: center;\r\n }\r\n\r\n ${Container}[data-layout='split'] & {\r\n @media ${from(Device.TabletLarge)} {\r\n grid-column: 5 / -1;\r\n }\r\n\r\n @media ${from(Device.DesktopSmall)} {\r\n grid-column: 6 / -1;\r\n }\r\n\r\n @media ${from(Device.DesktopLarge)} {\r\n grid-column: 7 / -1;\r\n }\r\n\r\n ${() => CtasContainer} {\r\n margin-top: ${fluid(32, 46)};\r\n }\r\n }\r\n`;\r\nconst Content = styled.div `\r\n ${contentStyles};\r\n\r\n > p,\r\n > ul > li,\r\n > ol > li,\r\n blockquote {\r\n &:not(\r\n .large,\r\n .small,\r\n .x-small,\r\n .subheading,\r\n .h1-styles,\r\n .h2-styles,\r\n .h3-styles,\r\n .h4-styles,\r\n .h5-styles,\r\n .h6-styles\r\n ) {\r\n font-size: ${fluid(15, 24)};\r\n line-height: ${fluid(23, 35)};\r\n }\r\n }\r\n\r\n a,\r\n p a {\r\n ${reverseLinkUnderline};\r\n display: inline;\r\n scroll-margin: calc(var(--headerHeight, 0px) + 50px) 0 0;\r\n }\r\n\r\n > ol,\r\n > ul {\r\n margin-left: ${fluid(16, 24)};\r\n }\r\n\r\n @media print {\r\n blockquote {\r\n &:before {\r\n content: '“';\r\n font-size: 64px;\r\n line-height: 70px;\r\n background-image: none;\r\n margin-bottom: 0;\r\n }\r\n }\r\n }\r\n`;\r\nconst CtasContainer = styled.div `\r\n display: flex;\r\n flex-wrap: wrap;\r\n gap: 10px ${fluid(10, 20)};\r\n`;\r\nconst RichTextStyles = {\r\n Container,\r\n Content,\r\n ContentContainer,\r\n Heading,\r\n SubHeading,\r\n HeadingContainer,\r\n CtasContainer,\r\n};\r\nexport default RichTextStyles;\r\n"],"names":["imageWrapperPreserveRatio","width","height","css","imageCoverContainer","relative","imageUrl","image","imageParams","params","rxy","focalPoint","top","left","undefined","heightratio","Math","round","widthratio","paramsString","queryString","src","getSrcs","upper","lower","steps","ratio","sizes","increment","Array","fill","map","_","index","ceil","getRange","sizesArr","size","split","srcSet","join","sleep","ms","Promise","resolve","setTimeout","clamp","value","max","min","highlightTitleWords","title","replaceAll","ContentWrapper","styled","div","withConfig","displayName","componentId","Container","section","fluid","from","Device","TabletLarge","HeadIcon","Subheading","span","subheading","Heading","h2","transition","LogoImage","img","Content","contentStyles","BrandColours","PurpleDark","PurpleLight","brand","global","white","ButtonWrapper","DetailContent","fonts","lato","semiBold","White","grey","dark","Detail","primary","purple","light","props","_props$pageContext","_props$layout","_props$translations$g","_props$translations","containerRef","inView","useInView","rootMargin","pageContext","isEditMode","summary","heading","React","S","ref","layout","headIcon","getSvgIcon","as","headingType","dangerouslySetInnerHTML","__html","logoImage","alt","altText","loading","ctas","length","date","time","location","readTime","InterfaceIcon","CalendarBlank","Clock","Location","translations","ctaWrapperVariant","cta","i","LinkButton","key","text","buttonType","href","url","target","icon","SectionWrapper","SectionWrapperStyles","Inner","baseGrid","BackgroundVariant","HeadingSummaryBlockStyles","until","MediaWrapper","ButtonReset","centralColumns","Image","PlayIcon","blue","playing","setPlaying","srcs","DesktopSmall","DesktopLarge","id","anchorId","variant","video","HeadingSummaryBlock","onClick","ReactPlayer","controls","Play","HeadingContainer","SubHeading","h3","ContentContainer","CtasContainer","reverseLinkUnderline"],"sourceRoot":""}