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ial-ultramar/./src/components/headerWithParagraph/headerWithParagraphStyles.js","webpack://commercial-ultramar/./src/constants/superScript.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './headerWithParagraphStyles';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { MainContainer, SpanStyle } from '../../styles';\nimport useContentfulAssets from '../../hooks/useContentfulAssets';\nimport isExternalUrl, { addTrailingSlash, isExternalUrlHref } from '../../utils';\nimport { superScriptChars } from '../../constants/superScript';\n\nconst HeadingWithParaLinks = ({ sectionData, location }) => {\n React.useEffect(async () => {\n if (sectionData?.elementId === location?.hash?.replace('#', '')) {\n const waitedID = await new Promise((resolve) => {\n document?.getElementById(sectionData?.elementId) && resolve(true);\n });\n if (waitedID) {\n setTimeout(() => {\n window.location.href = `#${sectionData?.elementId}`;\n }, 500);\n }\n }\n }, [sectionData?.elementId]);\n\n const optionsMainStyle = {\n renderNode: {\n [BLOCKS.HEADING_2]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_3]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_4]: (node, children) => (\n {children}\n ),\n [BLOCKS.PARAGRAPH]: (node, children) => (\n {children}\n ),\n [BLOCKS.UL_LIST]: (node, children) => (\n {children}\n ),\n [BLOCKS.LIST_ITEM]: (node, children) => (\n {children}\n ),\n [INLINES.HYPERLINK]: (node, children) => (\n \n {children}\n \n ),\n [BLOCKS.EMBEDDED_ASSET]: (node) => {\n const asset = useContentfulAssets(node?.data?.target?.sys?.id);\n return asset?.node?.file?.url?.includes('image') ? (\n \n ) : (\n <>>\n );\n },\n },\n renderText: (text) =>\n text\n ?.split('\\n')\n .flatMap((text, i) => [\n i > 0 &&
,\n \n {text\n ?.split('')\n ?.map((i, index) =>\n superScriptChars.includes(i) ? (\n \n {i}\n \n ) : (\n i\n )\n )}\n ,\n ]),\n };\n return (\n \n \n {sectionData?.header?.trim() && (\n {sectionData?.header}\n )}\n {sectionData?.subText?.trim() && (\n {sectionData?.subText}\n )}\n {sectionData?.contentDetails &&\n documentToReactComponents(\n JSON.parse(sectionData?.contentDetails?.raw),\n optionsMainStyle\n )}\n \n );\n};\n\nexport default HeadingWithParaLinks;\n","import styled from 'styled-components';\nimport IconCheck from '../../images/icon-check.png';\nimport IconArrowYellowRight from '../../images/icon-arrow-yellow-right.png';\n\nexport const HeaderH2 = styled.h2`\n text-align: ${(props) => (props.$textAlign ? 'center' : 'left')};\n position: relative;\n margin: 0 0 35px 0;\n font-family: 'MrAlex', sans-serif;\n font-size: 45px;\n line-height: 50px;\n color: #00539d;\n @media (max-width: 1399px) {\n font-size: 40px;\n line-height: 45px;\n margin-bottom: 30px;\n }\n @media (max-width: 767px) {\n font-size: 30px;\n line-height: 35px;\n }\n`;\nexport const HeaderH3 = styled.h3`\n margin: 0 0 35px 0;\n font-family: 'HelveticaNeue-Light', sans-serif;\n font-size: 32px;\n line-height: 37px;\n color: #00a6e8;\n text-align: ${(props) => (props.$textAlign ? 'center' : 'left')};\n @media (max-width: 1399px) {\n font-size: 28px;\n line-height: 32px;\n margin-bottom: 30px;\n }\n @media (max-width: 767px) {\n font-size: 25px;\n line-height: 30px;\n }\n`;\nexport const HeadingH4 = styled.h4`\n padding: 0 0 15px 0;\n margin: 0 0 35px 0;\n font-family: 'HelveticaNeue-Light', sans-serif;\n font-size: 24px;\n line-height: 29px;\n color: rgba(0, 0, 0, 0.6);\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n font-weight: normal;\n @media (max-width: 1399px) {\n font-size: 22px;\n line-height: 27px;\n margin-bottom: 30px;\n }\n @media (max-width: 767px) {\n font-size: 20px;\n line-height: 25px;\n }\n`;\n\nexport const ParaText = styled.p`\n margin-bottom: 40px;\n @media (max-width: 1399px) {\n margin-bottom: 30px;\n }\n i {\n font-style: italic;\n margin-bottom: 0;\n font-size: 18px;\n line-height: 24px;\n @media (max-width: 1399px) {\n font-size: 15px;\n line-height: 22px;\n }\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 20px;\n }\n }\n b {\n font-family: 'HelveticaNeue-Bold', arial, sans-serif;\n font-weight: normal;\n font-style: normal;\n }\n`;\n\nexport const ImageStyle = styled.img`\n height: auto;\n width: auto;\n border: 0;\n vertical-align: top;\n margin: 0 0 40px 0;\n @media (max-width: 1399px) {\n margin-bottom: 30px;\n }\n`;\nexport const SuperScriptStyle = styled.sup`\n vertical-align: top;\n font-size: 18px;\n line-height: 30px;\n`;\nexport const UnorderedList = styled.ul`\n margin: 0 0 30px 0;\n padding: 0;\n`;\nexport const ListItem = styled.li`\n padding: 0 0 15px 50px;\n background: url(${IconCheck}) no-repeat 0 1px;\n background-size: 30px auto;\n list-style: none;\n margin: 0;\n p {\n margin: 0;\n }\n\n @media (max-width: 767px) {\n padding-top: 1px;\n padding-left: 40px;\n background-position: 0 0;\n background-size: 25px auto;\n }\n`;\nexport const ListItemArrow = styled.li`\n padding: 0 0 15px 30px;\n background: url(${IconArrowYellowRight}) no-repeat 0 9px;\n background-size: 10px auto;\n list-style: none;\n margin: 0;\n p {\n margin: 0;\n }\n @media (max-width: 1399px) {\n background-position: 0 9px;\n }\n @media (max-width: 767px) {\n background-position: 0 5px;\n }\n`;\nexport const LinkStyle = styled.a`\n text-decoration: none;\n color: #00a6e8;\n transition: 0.25s ease-out;\n`;\nexport const ListItemNumber = styled.li`\n position: relative;\n margin: 0;\n padding: 15px 0 15px 65px;\n p {\n margin: 0px;\n }\n @media (max-width: 767px) {\n padding-left: 50px;\n }\n ::before {\n content: counter(standard-counter);\n counter-increment: standard-counter;\n position: absolute;\n left: 0px;\n width: 40px;\n text-align: center;\n padding: 6px 0 0 0;\n font-family: 'MrAlex', arial, sans-serif;\n font-size: 30px;\n line-height: 30px;\n color: #ffc905;\n border: 2px solid #ffc905;\n border-radius: 50%;\n\n @media (max-width: 767px) {\n top: 11px;\n width: 30px;\n height: 30px;\n padding: 3px 0 0 0;\n font-size: 20px;\n line-height: 20px;\n }\n }\n`;\nexport const OrderListItem = styled.ol`\n margin: 0 0 30px 0;\n list-style-type: none;\n counter-reset: standard-counter;\n position: relative;\n padding: 0;\n`;\nexport const ButtonStyle = styled.a`\n display: inline-block;\n position: relative;\n top: 0;\n padding: 15px 35px;\n margin-right: 10px;\n margin-bottom: 40px;\n font-family: 'MrAlex', sans-serif;\n font-size: 24px;\n line-height: 28px;\n text-transform: uppercase;\n font-weight: bold;\n color: #00a6e8;\n border: 2px solid #00a6e8;\n box-shadow: 0 0 0 2px rgb(255 255 255 / 0%);\n border-radius: 100px;\n cursor: pointer;\n text-decoration: none;\n\n @media (max-width: 1399px) {\n font-size: 20px;\n line-height: 24px;\n margin-bottom: 30px;\n }\n @media (max-width: 1199px) {\n font-size: 25px;\n line-height: 25px;\n }\n\n @media (max-width: 767px) {\n font-size: 22px;\n line-height: 25px;\n }\n i {\n @media (max-width: 767px) {\n font-size: 22px;\n line-height: 25px;\n }\n }\n :hover {\n top: -5px;\n color: #f7991c;\n border-color: #f7991c;\n box-shadow: 0 5px 0 0 #f7991c;\n }\n`;\n","export const superScriptChars = ['®', '§'];\n"],"names":["sectionData","location","React","elementId","hash","replace","Promise","resolve","document","getElementById","setTimeout","window","href","optionsMainStyle","renderNode","BLOCKS","node","children","INLINES","isExternalUrlHref","data","uri","addTrailingSlash","process","target","isExternalUrl","asset","useContentfulAssets","sys","id","file","url","includes","src","alt","title","renderText","text","split","flatMap","i","key","map","index","superScriptChars","header","trim","subText","contentDetails","documentToReactComponents","JSON","parse","raw","HeaderH2","styled","props","$textAlign","HeaderH3","HeadingH4","ParaText","ImageStyle","SuperScriptStyle","UnorderedList","ListItem","IconCheck","ListItemArrow","IconArrowYellowRight","LinkStyle","ListItemNumber","OrderListItem","ButtonStyle"],"sourceRoot":""}