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,IACF,SAAAuB,CAAA,CAAAC,CAAA,SAAA1I,EAAApB,KAAA,MAAAC,UAAA,MAAAc,CAAA,EAxHgBgJ,EAAAA,SAAe,CA0LlC7J,CAAAA,EAAA,QAAea,yBCrMf,CAAAiJ,OAAAC,QAAA,CAAAD,OAAAC,QAAA,MAAA7B,IAAA,EACA,mBACA,WACA,OAAe9H,EAAQ,MACvB,EACA","sources":["webpack://_N_E/./adapters/model/ContentfulClient.js","webpack://_N_E/./pages/article-landing.js","webpack://_N_E/?ea9a"],"sourcesContent":["const contentful = require('contentful');\n\nclass ContentfulClient {\n\n constructor() {\n this.personalAccessToken = process.env.CF_PERSONAL_ACCESS_TOKEN;\n this.deliveryAccessToken = process.env.CF_DELIVERY_ACCESS_TOKEN;\n this.spaceId = process.env.CF_SPACE_ID;\n this.environmentId = process.env.CF_ENVIRONMENT;\n\n if(this.deliveryAccessToken && this.deliveryAccessToken !== '') {\n this.contentfulClient = contentful.createClient({\n space: this.spaceId,\n accessToken: this.deliveryAccessToken,\n environment: this.environmentId\n });\n }\n\n }\n\n static create() {\n return new ContentfulClient();\n }\n getPersonalAccessToken() {\n return this.personalAccessToken;\n }\n getDeliveryAccessToken() {\n return this.deliveryAccessToken;\n }\n getSpaceId() {\n return this.spaceId;\n }\n getEnvironmentId() {\n return this.environmentId;\n }\n\n async getClient() {\n return this.contentfulClient;\n }\n}\n\nexport default new ContentfulClient();","import '@babel/polyfill';\nimport React, {Fragment, Suspense} from 'react';\nimport Router from 'next/router';\nimport Block from '../adapters/helpers/Block';\nimport PropTypes from 'prop-types'\nimport dynamic from 'next/dynamic';\nconst Meta = dynamic(()=> import('../components/Meta/Meta'));\nimport {asyncForEach} from '../adapters/helpers/Utils';\nimport contentfulClient from '../adapters/model/ContentfulClient';\nconst GTMScriptFunction = dynamic(() => import('../components/GTMScriptFunction'));\nimport Loader from '../adapters/helpers/Loader';\n\nclass Page extends React.Component {\n\n componentDidMount() {\n Router.beforePopState(({as}) => {\n location.href = as;\n });\n }\n\n static async getInitialProps({ asPath }) {\n const client = await contentfulClient.getClient();\n const locales = await client.getLocales();\n const defaultLocale = locales.items.find(locale => locale.default);\n const countryCode = defaultLocale.code.slice(-2);\n const languageCode = defaultLocale.code.substring(0, 2);\n\n const baseProps = await this.initPage(asPath);\n baseProps.countryCode = countryCode;\n baseProps.languageCode = languageCode;\n return {\n ...baseProps\n }\n }\n\n static async initPage(slug) {\n let page = {};\n let groupedArticles = {};\n\n if (slug) {\n const { default: pageDao } = await import('Model/dao/PageDao');\n page = await pageDao.getActivePageBySlug(slug);\n const pageWithSys = await pageDao.getActivePageBySlugWithSysFields(slug);\n\n if(pageWithSys?.fields?.categories && pageWithSys?.fields?.categories.length > 0) {\n // Fetch article for every categories assign to the page\n // Those are assign to an object by name and passed globally to every block in the page\n // { \"category-1\" : [{article object}], \"category-2\" : [{article object}] }\n await asyncForEach(pageWithSys?.fields?.categories, groupedArticles, this.fetchArticles);\n }\n }\n\n if(page?.fields?.series){\n page?.fields?.series.map((allSeries)=>{\n if(allSeries?.fields?.backgroundAsset?.fields){\n allSeries.fields.backgroundAsset.fields.isBannerImage = true;\n }\n if(allSeries?.fields?.mobileBackgroundAsset?.fields){\n allSeries.fields.mobileBackgroundAsset.fields.isBannerImage = true;\n }\n })\n }\n else{\n page?.fields?.blocks[0]?.fields?.blocks[1]?.fields?.blocks?.map((blocksArr)=>{\n if(blocksArr?.fields?.devicesConfigurations){\n blocksArr?.fields?.devicesConfigurations.map((devices)=>{\n if(devices?.fields?.backgroundAsset?.fields){\n devices.fields.backgroundAsset.fields.isBannerImage = true\n }\n })\n }\n \n if(blocksArr?.fields?.backgroundAsset && blocksArr?.fields?.backgroundAsset?.fields){\n blocksArr.fields.backgroundAsset.fields.isBannerImage = true;\n }\n\n if(blocksArr?.fields?.mobileBackgroundAsset && blocksArr?.fields?.mobileBackgroundAsset?.fields){\n blocksArr.fields.mobileBackgroundAsset.fields.isBannerImage = true;\n }\n if(blocksArr?.fields?.contentType == \"articleListBlock\" && blocksArr?.fields?.articleList){\n let newArticleLists = []\n blocksArr?.fields?.articleList.map((articleLists)=>{\n let articlesObj = {\n \"fields\" : {\n \"articleOverview\" : articleLists.fields.articleOverview,\n \"name\" : articleLists.fields.name,\n \"contentType\": articleLists.fields.contentType,\n },\n \"metadata\" : articleLists.metadata\n };\n newArticleLists.push(articlesObj)\n })\n blocksArr.fields.articleList = newArticleLists\n }\n })\n }\n\n page.fields.categories = []\n\n return {'page' : page, 'articles': groupedArticles};\n }\n\n static async fetchArticles(category, container) {\n const { default: articleDao } = await import('Model/dao/ArticleDao');\n let idsToSearch = [];\n\n let categoryId = category.sys.id;\n let subCategoriesIds = category?.fields?.subcategories?.map(subcategory => subcategory.sys?.id);\n\n if(subCategoriesIds){\n subCategoriesIds.forEach(subCategoryId => idsToSearch.push(subCategoryId));\n } else {\n idsToSearch.push(categoryId)\n }\n\n const categoryArticles = await articleDao.getLatestArticleBySubcategories(idsToSearch);\n let finalCategoryArticles = [];\n for(let i=0;i 0) {\n container[category.fields.name] = finalCategoryArticles;\n }\n }\n\n constructor(props) {\n super(props);\n }\n\n /**\n * Rendering of the page. This always render the page using a common layout.\n *\n * Override the render method to do otherwise.\n *\n * @returns {*}\n */\n render() {\n let page = this.getPage();\n const pagePath = page.slug.fields.slug;\n let metaData = this.getMetadata()\n if(metaData){\n metaData.pageType = 'page'\n }\n return (\n \n }>\n }> \n }>\n
\n {this.renderBody()}\n
\n
\n }>\n \n \n
\n
\n )\n }\n\n getPage() {\n return this.props.page.fields;\n }\n\n getArticles() {\n return this.props.articles;\n }\n\n getMetadata() {\n return this.props.page.fields.metadata.fields\n }\n\n /**\n * By default, the page will render the modules of the page.\n * Can be overridden on the child class to do specific rendering.\n * @returns {*|void}\n */\n renderBody() {\n return new Block(this.props.page).renderChildBlocks({ extraAttributes : {articles: this.getArticles()}});\n }\n}\n\nPage.propTypes = {\n page: PropTypes.object,\n languageCode: PropTypes.string,\n countryCode: PropTypes.string,\n articles: PropTypes.array\n};\n\nexport default Page\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/article-landing\",\n function () {\n return require(\"private-next-pages/article-landing.js\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/article-landing\"])\n });\n }\n "],"names":["contentful","require","ContentfulClient","_getClient","_classCallCheck","personalAccessToken","process","deliveryAccessToken","spaceId","environmentId","contentfulClient","createClient","space","accessToken","environment","_createClass","key","value","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","abrupt","stop","apply","arguments","__webpack_exports__","Z","Meta","dynamic","__webpack_require__","e","then","bind","loadableGenerated","webpack","GTMScriptFunction","Promise","all","Page","_React$Component","_inherits","_getInitialProps","_initPage","_fetchArticles","_super","props","call","Router","_ref","as","location","href","pagePath","page","getPage","slug","fields","metaData","getMetadata","pageType","_jsx","Fragment","children","_jsxs","Suspense","fallback","Loader","metadata","className","renderBody","languageCode","countryCode","articles","Block","renderChildBlocks","extraAttributes","getArticles","_ref2","asPath","client","defaultLocale","baseProps","getClient","sent","getLocales","locales","items","find","locale","code","slice","substring","initPage","_objectSpread","_x","_callee2","_page","_page$fields","groupedArticles","_pageWithSys$fields","_pageWithSys$fields2","pageDao","pageWithSys","_pageWithSys$fields3","_page2","_page2$fields","_page3","_page3$fields","_page3$fields$blocks$","_page3$fields$blocks$2","_page3$fields$blocks$3","_page3$fields$blocks$4","_page3$fields$blocks$5","_context2","_yield$import","getActivePageBySlug","getActivePageBySlugWithSysFields","categories","length","asyncForEach","fetchArticles","series","map","allSeries","_allSeries$fields","_allSeries$fields$bac","_allSeries$fields2","_allSeries$fields2$mo","backgroundAsset","isBannerImage","mobileBackgroundAsset","blocks","blocksArr","_blocksArr$fields","devicesConfigurations","_blocksArr$fields2","devices","_devices$fields","_devices$fields$backg","_blocksArr$fields3","_blocksArr$fields4","_blocksArr$fields4$ba","_blocksArr$fields5","_blocksArr$fields6","_blocksArr$fields6$mo","_blocksArr$fields7","contentType","_blocksArr$fields8","articleList","_blocksArr$fields9","newArticleLists","articleLists","articlesObj","articleOverview","name","push","_x2","_callee3","category","container","_category$fields","_category$fields$subc","articleDao","idsToSearch","categoryId","subCategoriesIds","categoryArticles","finalCategoryArticles","i","tempobj","_context3","_yield$import2","sys","id","subcategories","subcategory","_subcategory$sys","forEach","subCategoryId","getLatestArticleBySubcategories","_x3","_x4","React","window","__NEXT_P"],"sourceRoot":""}