{"version":3,"file":"components-headerWithParagraphImageRight-headerWithParagraphImageRight-d2db8f113c07108b6407.js","mappings":"kMAgGA,UAzFsCA,IAAgC,IAADC,EAAAC,EAAAC,EAAAC,EAAA,IAA9B,YAAEC,EAAW,SAAEC,GAAUN,GAC9DO,EAAAA,EAAAA,YAAUC,UAAa,IAADC,EACpB,IAAIJ,aAAW,EAAXA,EAAaK,cAAcJ,SAAc,QAANG,EAARH,EAAUK,YAAI,IAAAF,OAAN,EAARA,EAAgBG,QAAQ,IAAK,KAAK,OACxC,IAAIC,SAASC,IAAa,IAADC,GACtC,QAARA,EAAAC,gBAAQ,IAAAD,OAAA,EAARA,EAAUE,eAAeZ,aAAW,EAAXA,EAAaK,aAAcI,GAAQ,EAAK,KAGjEI,YAAW,KACTC,OAAOb,SAASc,KAAQ,IAAGf,aAAW,EAAXA,EAAaK,WAAW,GAClD,IAEP,IACC,CAACL,aAAW,EAAXA,EAAaK,YACjB,MAAMW,EAAmB,CACvBC,WAAY,CACV,CAACC,EAAAA,OAAOC,WAAY,CAACC,EAAMC,IACzBC,EAAAA,cAACC,EAAAA,SAAe,KAAEF,GAEpB,CAACH,EAAAA,OAAOM,WAAY,CAACJ,EAAMC,IACzBC,EAAAA,cAACC,EAAAA,SAAe,KAAEF,GAEpB,CAACH,EAAAA,OAAOO,WAAY,CAACL,EAAMC,IACzBC,EAAAA,cAACC,EAAAA,SAAe,KAAEF,GAEpB,CAACH,EAAAA,OAAOQ,SAAU,CAACN,EAAMC,IACvBC,EAAAA,cAACC,EAAAA,cAAoB,KAAEF,GAEzB,CAACH,EAAAA,OAAOS,WAAY,CAACP,EAAMC,IACzBC,EAAAA,cAACC,EAAAA,SAAe,KAAEF,GAEpB,CAACO,EAAAA,QAAQC,WAAY,CAACT,EAAMC,KAAQ,IAAAS,EAAAC,EAAAC,EAAAC,EAAA,OAClCX,EAAAA,cAACC,EAAAA,UAAgB,CACfR,MAAMmB,EAAAA,EAAAA,IAAkBd,SAAU,QAANU,EAAJ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AS,+HAIbiB,EAAAA,GAMPC,EAAYlB,EAAAA,QAAOmB,EAACjB,WAAA,CAAAC,YAAA,gDAAAC,YAAA,gBAARJ,CAAQ,iGASpBoB,EAAapB,EAAAA,QAAOqB,IAAGnB,WAAA,CAAAC,YAAA,iDAAAC,YAAA,gBAAVJ,CAAU,qOAMvBsB,IAAgC,IAArBA,EAAMvC,WAAsB,gBAAkB,MAWzDwC,EAAkBvB,EAAAA,QAAOwB,GAAEtB,WAAA,CAAAC,YAAA,sDAAAC,YAAA,gBAATJ,CAAS,0H","sources":["webpack://islandpetro/./src/components/headerWithParagraphImageRight/headerWithParagraphImageRight.js","webpack://islandpetro/./src/components/headerWithParagraphImageRight/headerWithParagraphImageRightStyle.js"],"sourcesContent":["import React, { useEffect } from 'react';\nimport * as Styled from './headerWithParagraphImageRightStyle';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { useContentfulImages } from '../../hooks/useContentfulImages';\nimport isExternalUrl, { isExternalUrlhref,addTrailingSlash } from '../../utils';\n\nconst HeaderWithParagraphImageRight = ({ sectionData, location }) => {\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_2]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_3]: (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 = useContentfulImages(node.data.target.sys.id);\n return asset.node.file.url.includes('image') ? (\n asset?.node?.description ? (\n \n \n \n ) : (\n \n )\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?.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 HeaderWithParagraphImageRight;\n","import styled from 'styled-components';\nimport LinkArrowImage from '../../images/icon-home-arrow-orange.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: #00483a;\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: #008268;\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 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: #008168;\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 UnorderedList = styled.ul`\n margin: 0 0 30px 0;\n padding: 0;\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 LinkStyle = styled.a`\n text-decoration: none;\n color: #eea200;\n :hover {\n text-decoration: none;\n color: #008268;\n outline: none;\n }\n`;\nexport const ImageStyle = styled.img`\n float: right;\n height: auto !important;\n width: auto !important;\n border: 0;\n vertical-align: top;\n margin: ${(props) => (props.$hasMargin === true ? '0 0 30px 30px' : '0')};\n @media (max-width: 767px) {\n display: block;\n float: none;\n margin: 0 0 30px 0 !important;\n }\n @media (max-width: 399px) {\n width: 60% !important;\n }\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"],"names":["_ref","_sectionData$elementI","_sectionData$header","_sectionData$subText","_sectionData$contentD","sectionData","location","useEffect","async","_location$hash","elementId","hash","replace","Promise","resolve","_document","document","getElementById","setTimeout","window","href","optionsMainStyle","renderNode","BLOCKS","HEADING_2","node","children","React","Styled","HEADING_3","PARAGRAPH","UL_LIST","LIST_ITEM","INLINES","HYPERLINK","_node$data","_node$data2","_node$data3","_node$data4","isExternalUrlhref","data","uri","addTrailingSlash","process","target","isExternalUrl","EMBEDDED_ASSET","_asset$node","_asset$node2","_asset$node3","asset","useContentfulImages","sys","id","file","url","includes","description","src","alt","title","$hasMargin","HR","renderText","text","split","flatMap","i","key","trim","header","subText","contentDetails","documentToReactComponents","JSON","parse","raw","MainDiv","styled","div","withConfig","displayName","componentId","HeaderH1","h1","HeaderH2","h2","ParaText","p","HeaderH3","h3","UnorderedList","ul","ListItem","li","LinkArrowImage","LinkStyle","a","ImageStyle","img","props","HorizontalBreak","hr"],"sourceRoot":""}