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,2FAUvBQ,EAAWR,EAAAA,QAAAA,GAAAA,WAAS,mFAATA,CAAS,+HAIbS,EAAAA,GAMPC,EAAcV,EAAAA,QAAAA,EAAAA,WAAQ,sFAARA,CAAQ,wjBAUfW,EAAAA,GAkBPC,EAAaZ,EAAAA,QAAAA,IAAAA,WAAU,sFAAVA,CAAU,kGAQvBa,EAAkBb,EAAAA,QAAAA,GAAAA,WAAS,2FAATA,CAAS,2HAY3Bc,EAAYd,EAAAA,QAAAA,KAAAA,WAAW,qFAAXA,CAAW,yG","sources":["webpack://bluewave-energy/./src/dynamicComponents/headerWithParagraphButton/headerWithParagraphButton.js","webpack://bluewave-energy/./src/dynamicComponents/headerWithParagraphButton/headerWithParagraphButtonStyle.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './headerWithParagraphButtonStyle';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { useContentfulImages } from '../../hooks/useContentfulImages';\nimport isExternalUrl, { addTrailingSlash, isExternalUrlhref } from '../../utils';\nimport { useEffect } from 'react';\nimport useContentfulAssets from '../../hooks/useContentfulAssets';\n\nconst HeaderWithParagraphButton = ({\n sectionData,\n handleRequestCallBack,\n location,\n}) => {\n 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 const optionsMainStyle = {\n renderNode: {\n [BLOCKS.HEADING_1]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_2]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_3]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_6]: (node, children) => (\n {children}\n ),\n [BLOCKS.PARAGRAPH]: (node, children) => (\n {children}\n ),\n [BLOCKS.UL_LIST]: (node, children) => (\n {children}\n ),\n [BLOCKS.OL_LIST]: (node, children) => (\n {children}\n ),\n [BLOCKS.LIST_ITEM]: (node, children) => (\n {children}\n ),\n [INLINES.HYPERLINK]: (node, children) =>\n node?.data?.uri === '/contact/customer-care/#top' ? (\n \n {children}\n \n ) : (\n \n {children}\n \n ),\n [BLOCKS.EMBEDDED_ASSET]: (node) => {\n const asset = useContentfulImages(node.data.target.sys.id);\n return asset.node.file.url.includes('image') ? (\n \n ) : (\n <>\n );\n },\n [INLINES.ASSET_HYPERLINK]: (node, children) => {\n const asset = useContentfulAssets(node.data.target.sys.id);\n if (asset) {\n return (\n \n {children}\n \n );\n }\n },\n [BLOCKS.HR]: () => ,\n },\n renderText: (text) =>\n text.split('\\n').flatMap((text, i) => [i > 0 &&
, text]),\n };\n return (\n \n {sectionData?.elementId?.trim() && (\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};\nexport default HeaderWithParagraphButton;\n","import styled from 'styled-components';\nimport ArrowImage from '../../images/arrow-blue.png';\nimport LinkArrowImage from '../../images/arrow-blue.png';\n\nexport const MainDiv = styled.div`\n color: #666;\n font-family: 'Figtree-Regular', arial, sans-serif;\n font-size: 15px;\n line-height: 24px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 15px;\n line-height: 22px;\n }\n`;\nexport const HeaderH1 = styled.h1`\n margin: 0 0 35px 0;\n padding: 0;\n font-family: 'Figtree-Light', arial, sans-serif;\n font-weight: normal !important;\n color: #00457c;\n font-size: 45px;\n line-height: 50px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 35px;\n line-height: 40px;\n }\n`;\nexport const HeaderH2 = styled.h2`\n margin: 0 0 35px 0;\n padding: 0;\n font-family: 'Figtree-Light', arial, sans-serif;\n font-weight: normal !important;\n color: #037ec4;\n font-size: 32px;\n line-height: 38px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 25px;\n line-height: 30px;\n margin-bottom: 20px;\n }\n`;\n\nexport const ParaText = styled.p`\n margin: 0 0 30px 0;\n padding: 0;\n b {\n font-family: 'Figtree-Bold', arial, sans-serif;\n font-weight: bold;\n }\n i {\n font-style: italic;\n }\n code {\n font-size: 19px;\n line-height: 28px;\n color: #666;\n font-family: 'Figtree-Regular', arial, sans-serif;\n letter-spacing: 0.02em;\n font-style: normal !important;\n @media (max-width: 767px) {\n font-size: 18px;\n line-height: 25px;\n }\n }\n`;\n\nexport const HeaderH3 = styled.h3`\n margin: 0 0 35px 0;\n padding: 0;\n font-family: 'Figtree-Light', arial, sans-serif;\n font-weight: normal !important;\n color: #48b4f1;\n font-size: 26px;\n line-height: 35px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 18px;\n line-height: 23px;\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderH6 = styled.h6`\ncolor: #666;\nfont-family: 'Figtree-Regular', arial, sans-serif;\nwhite-space: pre-wrap;\nfont-size: 19px;\nline-height: 28px;\nmargin-bottom:30px;\nletter-spacing: 0.02em;\n@media (max-width: 767px) {\n font-size: 19px;\n line-height: 25px;\n}\n`;\n\nexport const UnorderedList = styled.ul`\n margin: 0 0 30px 0;\n padding: 0;\n`;\nexport const OrderedList = styled.ul`\n margin: 0 0 30px 0;\n padding-left: 40px;\n li {\n background: none;\n list-style: decimal;\n padding: 0;\n }\n`;\n\nexport const ListItem = styled.li`\n margin: 0;\n padding: 4px 0 4px 25px;\n list-style: none;\n background: url(${LinkArrowImage}) no-repeat 0 10px;\n background-size: 7px auto;\n p {\n margin: 0;\n }\n`;\nexport const ButtonStyle = styled.a`\n display: inline-block;\n padding: 16px 85px 14px 15px;\n margin: 0 5px 5px 0;\n font-family: 'Figtree-Medium', arial, sans-serif;\n font-size: 13px;\n line-height: 16px;\n text-transform: uppercase !important;\n text-align: left;\n color: #037ec4;\n background: url(${ArrowImage}) 95% center no-repeat rgb(235, 245, 250);\n background-size: 12px auto;\n transition: background-position 0.15s ease-out;\n border: none;\n cursor: pointer;\n text-decoration: none;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n width: 100% !important;\n margin: 0 0 25px 0 !important;\n }\n :hover {\n background-position: 90% center;\n text-decoration: none;\n color: #037ec4;\n }\n`;\n\nexport const ImageStyle = styled.img`\n height: auto !important;\n width: auto !important;\n border: 0;\n vertical-align: top;\n margin-bottom: 30px;\n`;\n\nexport const HorizontalBreak = styled.hr`\n height: 1px;\n border: none;\n background: #e5e5e5;\n margin: 50px 0;\n clear: both;\n opacity: 1;\n @media (max-width: 767px) {\n margin: 30px 0;\n }\n`;\n\nexport const SpanStyle = styled.span`\n position: absolute;\n top: 460px;\n @media (max-width: 991px) {\n top: -60px;\n }\n @media (max-width: 767px) {\n top: -45px;\n }\n`;\n"],"names":["sectionData","handleRequestCallBack","location","useEffect","elementId","hash","replace","Promise","resolve","document","getElementById","setTimeout","window","href","optionsMainStyle","renderNode","BLOCKS","node","children","INLINES","data","uri","onClick","isExternalUrlhref","addTrailingSlash","process","target","isExternalUrl","asset","useContentfulImages","sys","id","file","url","includes","src","alt","title","useContentfulAssets","renderText","text","split","flatMap","i","key","trim","header","subText","contentDetails","documentToReactComponents","JSON","parse","raw","MainDiv","styled","HeaderH1","HeaderH2","ParaText","HeaderH3","HeaderH6","UnorderedList","OrderedList","ListItem","LinkArrowImage","ButtonStyle","ArrowImage","ImageStyle","HorizontalBreak","SpanStyle"],"sourceRoot":""}