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AAAA,EAAAQ,EAAA2E,MAAA,SAAAnF,EAAA6C,SAAA,CAAAlC,EAAA,IAAAW,EAAA,CAAAqC,SAAA5D,EAAA4D,QAAA,CAAAnC,QAAAf,CAAA,GAAAG,EAAAD,EAAAyE,iBAAA,EAAA/C,gBAAA7B,CAAA,EAAAT,EAAA6D,eAAA,CAAA7D,EAAA8D,WAAA,EAAA1D,EAAA,OAAAQ,GAAA,MAAAV,CAAAA,EAAAU,EAAAa,OAAA,SAAAtB,CAAAA,EAAAD,EAAAoF,gBAAA,SAAAnF,EAAAqC,MAAA,QAAAzB,EAAA,OAAAH,GAAA,MAAAJ,CAAAA,EAAAI,EAAAa,OAAA,SAAAjB,EAAA+E,6BAAA,iBAAAzE,EAAA0E,IAAA,SAAA1C,UAAA,mBAAAC,MAAA,CAAApC,GAAA2D,SAAA,CAAAzD,EAAA,GAAAC,EAAA8B,GAAA,EAAArC,EAAA8D,QAAA,EAAAC,SAAAlE,GAAA,GAAAU,EAAA8B,GAAA,EAAAmC,EAAA,CAAAO,iBAAAlF,EAAAqF,0BAAA1E,CAAA","sources":["webpack://_N_E/./adapters/helpers/ArticleBlock.js","webpack://_N_E/./components/ArticleBody/ArticleBody.js","webpack://_N_E/"],"sourcesContent":["import React, {Fragment} from 'react'\nimport componentFactory from '../../components/ComponentFactory';\nimport { customJsonstringify } from './Utils';\n\nclass ArticleBlock {\n\n constructor(props) {\n this.props = props;\n this.article = props.article;\n this.contents = props.contents || this.article?.contents || [];\n this.contentIndex = props.contentIndex || 0;\n this.promotions = props.promotions || this.article?.relatedPromotions || [];\n this.promotionIndex = props.promotionIndex || 0;\n }\n\n renderBlock(moduleClass, attributes, moduleBody) {\n const moduleDefinition = componentFactory.getModule(moduleClass);\n if (moduleDefinition) {\n const module = React.createElement(moduleDefinition, attributes, moduleBody);\n return module;\n } else {\n console.info('Unsupported module type : ' + moduleClass);\n }\n }\n\n renderHtmlBlock(attributes) {\n let { classNames, anchorId, textContent } = attributes.extraAttributes.richTextBlock.fields;\n return ();\n }\n\n renderBlockFromDocument(extraAttributes, onClickCallback, customEvent, index) {\n const document = this.getDocument();\n if (document && document.fields && document.fields.contentType) {\n let contentType = document.fields.contentType;\n let blockName = document.fields.name;\n let className = document.fields.classNames;\n\n let attributes = {\n name: blockName,\n document: document,\n className: className,\n onClickCallback,\n customEvent,\n key: blockName,\n index,\n ...extraAttributes\n };\n\n if(attributes?.extraAttributes?.richTextBlock?.fields?.textContent) {\n return this.renderHtmlBlock(attributes);\n } else {\n return this.renderBlock(contentType, attributes, null);\n }\n\n } else {\n console.error('Unsupported block is currently assign to page:' + this.props?.page?.fields?.name);\n }\n }\n\n /**\n * Render the modules assigned to the page.\n * @returns {*}\n */\n renderChildBlocks(extraAttributes, onClickCallback, customEvent) {\n const doc = this.getDocument();\n return ((doc. fields && doc.fields.blocks) ?\n \n { doc.fields.blocks.map((child, index) => {\n if(this.isRenderable(child)) {\n let extraAttributesClone = JSON.parse(customJsonstringify(extraAttributes));\n let currentExtraAttributes = this.reassignExtraAttributes(extraAttributesClone, child);\n\n const props = {\n document: child,\n article: this.article,\n contents:this.contents,\n contentIndex: this.contentIndex,\n promotions:this.promotions,\n promotionIndex: this.promotionIndex\n };\n\n return new ArticleBlock(props)\n .renderBlockFromDocument(currentExtraAttributes, onClickCallback, customEvent, index)\n }\n })}\n \n :\n null\n );\n }\n\n getDocument() {\n let doc = this.props.document;\n\n if (doc == null) {\n doc = this.props;\n }\n\n if (!doc) {\n doc = {};\n }\n\n return doc;\n }\n\n isRenderable(document) {\n if(document.fields.contentType == 'promoBlock' ){\n return (this.promotionIndex < this.promotions.length);\n } else if(document.fields.contentType == 'richTextBlock') {\n return (this.contentIndex < this.contents.length);\n } else {\n return true;\n }\n }\n\n reassignExtraAttributes(extraAttributes, document) {\n if(document.fields.contentType == 'promoBlock' && this.promotions.length > 0){\n extraAttributes['extraAttributes']['promo'] = this.promotions[this.promotionIndex];\n if(this.promotionIndex < this.promotions.length) {\n this.promotionIndex++;\n }\n }\n\n if(document.fields.contentType == 'richTextBlock' && this.contents.length > 0){\n extraAttributes['extraAttributes']['richTextBlock'] = this.contents[this.contentIndex];\n if(this.contentIndex < this.contents.length) {\n this.contentIndex++;\n }\n }\n return extraAttributes;\n }\n}\n\nexport default ArticleBlock","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ArticleBlock from '../../adapters/helpers/ArticleBlock';\nimport dynamic from 'next/dynamic';\nconst BiographyContent = dynamic(() => import('../BiographyContent/BiographyContent'))\n\nexport default function ArticleBody(props) {\n const extraAttributes = props.extraAttributes || {};\n const article = extraAttributes.entity;\n const classAttribute = extraAttributes.entity?.className;\n const articleBlock = new ArticleBlock({document: props.document, article });\n\n const children = articleBlock.renderChildBlocks({ extraAttributes }, props.onClickCallback, props.customEvent);\n const biographyContent = articleBlock?.article?.biographyContent?.fields || null;\n const biographyModalArticleList = articleBlock?.article?.articleListsForBiographyModal || null\n\n return (\n
\n {children}\n {biographyContent && }\n
\n );\n}\n\nArticleBody.propTypes = {\n className: PropTypes.string,\n extraAttributes: PropTypes.object,\n document: PropTypes.object,\n onClickCallback: PropTypes.func,\n customEvent: PropTypes.object\n};\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7725],{57725:function(t,e,n){n.r(e),n.d(e,{default:function(){return k}});var o=n(67294),r=n(930),i=n.n(r),l=n(33227),s=n.n(l),c=n(88361),u=n.n(c),a=n(93613),d=n(8996),p=n(85893);function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}var m=function(){function t(e){var n,o;s()(this,t),this.props=e,this.article=e.article,this.contents=e.contents||(null==(n=this.article)?void 0:n.contents)||[],this.contentIndex=e.contentIndex||0,this.promotions=e.promotions||(null==(o=this.article)?void 0:o.relatedPromotions)||[],this.promotionIndex=e.promotionIndex||0}return u()(t,[{key:\"renderBlock\",value:function(t,e,n){var r=a.Z.getModule(t);if(r)return o.createElement(r,e,n);console.info(\"Unsupported module type : \"+t)}},{key:\"renderHtmlBlock\",value:function(t){var e=t.extraAttributes.richTextBlock.fields,n=e.classNames,o=e.anchorId,r=e.textContent;return(0,p.jsx)(\"div\",{id:o,className:\"ob-html-block \".concat(n),dangerouslySetInnerHTML:{__html:r}})}},{key:\"renderBlockFromDocument\",value:function(t,e,n,o){var r,l,s,c=this.getDocument();if(c&&c.fields&&c.fields.contentType){var u,a,d,p=c.fields.contentType,m=c.fields.name,f=function(t){for(var e=1;e0&&(t.extraAttributes.promo=this.promotions[this.promotionIndex],this.promotionIndex0&&(t.extraAttributes.richTextBlock=this.contents[this.contentIndex],this.contentIndex