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EAAAA,SAAA,KACD,GAGL6B,WAAaC,GACXA,EAAKC,MAAM,MAAMC,SAAQ,CAACF,EAAMG,IAAM,CAACA,EAAI,GAAKjC,EAAAA,cAAA,MAAIkC,IAAKD,IAAOH,MAEpE,OACE9B,EAAAA,cAACC,EAAAA,KAAW,MACTR,aAAW,EAAXA,EAAa0C,kBACZC,EAAAA,EAAAA,GACEC,KAAKC,MAAM7C,SAA2B,QAAhBD,EAAXC,EAAa0C,sBAAc,IAAA3C,OAAhB,EAAXA,EAA6B+C,KACxC7C,GAEQ,C,4OCrDX,MAAM8C,EAAaC,EAAAA,QAAOC,IAAGC,WAAA,CAAAC,YAAA,0CAAAC,YAAA,gBAAVJ,CAAU,mEAMvBK,EAAWL,EAAAA,QAAOM,GAAEJ,WAAA,CAAAC,YAAA,wCAAAC,YAAA,gBAATJ,CAAS,yMAkBpBO,EAAiBP,EAAAA,QAAOQ,EAACN,WAAA,CAAAC,YAAA,8CAAAC,YAAA,gBAARJ,CAAQ,kYA4BzBS,EAAYT,EAAAA,QAAOU,EAACR,WAAA,CAAAC,YAAA,yCAAAC,YAAA,gBAARJ,CAAQ,4GAWpBW,EAAUX,EAAAA,QAAOY,GAAEV,WAAA,CAAAC,YAAA,uCAAAC,YAAA,gBAATJ,CAAS,sKAUnBa,EAAOb,EAAAA,QAAOc,IAAGZ,WAAA,CAAAC,YAAA,oCAAAC,YAAA,gBAAVJ,CAAU,4S","sources":["webpack://islandpetro/./src/components/slpImageWithParagraph/slpImageWithParagraph.js","webpack://islandpetro/./src/components/slpImageWithParagraph/slpImageWithParagraphStyles.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './slpImageWithParagraphStyles';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport useContentfulAssets from '../../hooks/useContentfulAssets';\nimport isExternalUrl, {\n addTrailingSlash,\n isExternalUrlhref,\n} from '../../utils';\n\nconst SlpImageWithParagraph = ({ sectionData }) => {\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.PARAGRAPH]: (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.split('\\n').flatMap((text, i) => [i > 0 &&
, text]),\n };\n return (\n \n {sectionData?.contentDetails &&\n documentToReactComponents(\n JSON.parse(sectionData?.contentDetails?.raw),\n optionsMainStyle\n )}\n \n );\n};\n\nexport default SlpImageWithParagraph;\n","import styled from 'styled-components';\n\nexport const ImageStyle = styled.img`\n height: auto;\n width: auto;\n margin-bottom: 20px;\n vertical-align: top;\n`;\nexport const HeaderH2 = styled.h2`\n font-size: 20px;\n line-height: 24px;\n color: #636466;\n padding: 0;\n font-family: 'Figtree-Regular', arial, sans-serif;\n b {\n color: #636466;\n }\n @media (max-width: 991px) {\n font-size: 21px;\n line-height: 34px;\n b {\n color: #636466;\n }\n }\n`;\n\nexport const ParagraphStyle = styled.p`\n text-align: center;\n color: #636466;\n font-family: 'Figtree-Regular', arial, sans-serif;\n font-size: 18px;\n padding: 0;\n font-family: 'Figtree-Regular', arial, sans-serif;\n margin-bottom: 40px;\n b {\n color: #636466;\n }\n code {\n font-size: 13px;\n line-height: 15px;\n color: #636466;\n padding: 0;\n font-family: 'Figtree-Regular', arial, sans-serif;\n }\n @media (max-width: 991px) {\n font-size: 21px;\n line-height: 34px;\n margin: 0;\n b {\n color: #636466;\n }\n }\n`;\n\nexport const LinkStyle = styled.a`\n text-decoration: none;\n color: #636466;\n font-size: 30px;\n line-height: 40px;\n text-align: center;\n b {\n color: #636466;\n }\n`;\n\nexport const Header1 = styled.h1`\n font-size: 46px;\n line-height: 56px;\n padding: 25px 0 0 0;\n margin: 0 0 25px 0;\n font-family: 'Figtree-Regular', arial, sans-serif;\n font-weight: normal !important;\n color: #636466;\n`;\n\nexport const Body = styled.div`\n position: relative;\n margin: 0 auto !important;\n padding: 0;\n text-align: center;\n padding-bottom: 30px;\n margin: 0;\n padding: 0;\n color: #636466;\n font-family: 'Figtree-Regular', arial, sans-serif;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.02em;\n @media (max-width: 991px) {\n width: 100%;\n margin: 0;\n height: auto;\n padding:25px;\n`;\n"],"names":["_ref","_sectionData$contentD","sectionData","optionsMainStyle","renderNode","BLOCKS","HEADING_1","node","children","React","Styled","HEADING_2","PARAGRAPH","INLINES","HYPERLINK","_node$data","_node$data2","_node$data3","_node$data4","href","isExternalUrlhref","data","uri","addTrailingSlash","process","target","isExternalUrl","EMBEDDED_ASSET","asset","useContentfulAssets","sys","id","file","url","includes","src","alt","title","renderText","text","split","flatMap","i","key","contentDetails","documentToReactComponents","JSON","parse","raw","ImageStyle","styled","img","withConfig","displayName","componentId","HeaderH2","h2","ParagraphStyle","p","LinkStyle","a","Header1","h1","Body","div"],"sourceRoot":""}