{"version":3,"file":"components-iframeContainer-iframeContainer-6c1855f893afaea78afa.js","mappings":"gNAoDA,UA/CwB,SAAC,GAA+B,IAAD,IAA5BA,EAA4B,EAA5BA,YAAaC,EAAe,EAAfA,SACtCC,EAAAA,WAAA,iBAAgB,wFACVF,MAAAA,OAAA,EAAAA,EAAaG,cAAcF,MAAAA,GAA3B,UAA2BA,EAAUG,YAArC,aAA2B,EAAgBC,QAAQ,IAAK,KAD9C,gCAEW,IAAIC,SAAQ,SAACC,GAAa,IAAD,GACtC,QAAR,EAAAC,gBAAA,eAAUC,eAAeT,MAAAA,OAAzB,EAAyBA,EAAaG,aAAcI,GAAQ,MAHlD,eAMVG,YAAW,WACTC,OAAOV,SAASW,KAAhB,KAA2BZ,MAAAA,OAA3B,EAA2BA,EAAaG,aACvC,KARO,2CAWb,CAACH,MAAAA,OAAD,EAACA,EAAaG,YAEjBD,EAAAA,WAAgB,WACdS,OAAOE,aACL,CAAEC,KAAK,EAAOC,wBAAyB,OACvC,eAED,IAEH,IAAMC,EAAmB,CACvBC,YAAU,OACPC,EAAAA,QAAAA,WAAoB,SAACC,GAAD,aACnB,gBAAC,OAAD,KACE,gBAAC,SAAD,CACEC,GAAG,WACHC,QAAQ,2FACRC,MAAO,CAAEC,MAAO,OAAQC,OAAQ,OAAQC,OAAQ,SAChDC,IAAKP,MAAAA,GAAF,UAAEA,EAAMQ,YAAR,aAAE,EAAYC,IACjBC,YAAY,QARV,IAcZ,OACE,4BACG7B,MAAAA,OAAA,EAAAA,EAAa8B,kBACZC,EAAAA,EAAAA,GACEC,KAAKC,MAAMjC,MAAAA,GAAX,UAAWA,EAAa8B,sBAAxB,aAAW,EAA6BI,KACxClB,M,0GC5CGmB,EAASC,EAAAA,QAAAA,OAAAA,WAAH,wEAAGA,CAAH,iCAKNC,EAAOD,EAAAA,QAAAA,IAAAA,WAAH,sEAAGA,CAAH","sources":["webpack://commercial-ultramar/./src/components/iframeContainer/iframeContainer.js","webpack://commercial-ultramar/./src/components/iframeContainer/iframeContainerStyles.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './iframeContainerStyles';\nimport { INLINES } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\n\nconst IframeContainer = ({ 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 React.useEffect(() => {\n window.iFrameResize(\n { log: false, heightCalculationMethod: 'max' },\n '#vizi_mjp'\n );\n }, []);\n\n const optionsMainStyle = {\n renderNode: {\n [INLINES.HYPERLINK]: (node) => (\n \n \n \n ),\n },\n };\n return (\n
\n {sectionData?.contentDetails &&\n documentToReactComponents(\n JSON.parse(sectionData?.contentDetails?.raw),\n optionsMainStyle\n )}\n
\n );\n};\n\nexport default IframeContainer;\n","import styled from 'styled-components';\n\nexport const Iframe = styled.iframe`\n min-width: 100%;\n border: none;\n`;\n\nexport const Body = styled.div`\n margin: auto;\n overflow-x: scroll; \n overflow-y: scroll;\n -webkit-overflow-scrolling:touch;\n height: 650px;\n width: 90%;\n\n @media (max-width: 1199px) {\n padding: 0px 50px 20px 50px;\n }\n @media (max-width: 767px) {\n padding: 0px 35px 0 35px;\n height: 550px;\n width: 100%;\n }\n`;\n"],"names":["sectionData","location","React","elementId","hash","replace","Promise","resolve","document","getElementById","setTimeout","window","href","iFrameResize","log","heightCalculationMethod","optionsMainStyle","renderNode","INLINES","node","id","sandbox","style","width","border","height","src","data","uri","frameborder","contentDetails","documentToReactComponents","JSON","parse","raw","Iframe","styled","Body"],"sourceRoot":""}