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AAAA,EAAAD,EAAA0E,IAAA,SAAAzE,EAAA0E,MAAA,EAAAnE,EAAA,IAAAkC,EAAAU,CAAA,CAAAlD,GAAAO,EAAAV,EAAAiD,eAAA,CAAArC,EAAAZ,EAAA6E,eAAA,CAAA/D,EAAAd,EAAA8E,WAAA,QAAArE,EAAAsE,uBAAA,CAAArE,EAAAE,EAAAE,EAAA,SAAAkE,WAAA/E,CAAAA,EAAA,GAAAQ,IAAAR,EAAAW,EAAAqE,EAAA,CAAAC,cAAA,CAAAhF,GAAAO,IAAAR,EAAAW,EAAAuE,EAAA,CAAAD,cAAA,CAAAhF,GAAAO,IAAAR,EAAAW,EAAAuE,EAAA,CAAAC,SAAA,UAAApF,CAAA,CAAAC,CAAA,MAAAC,EAAAC,EAAAM,EAAAT,EAAA2E,IAAA,CAAAjE,EAAAV,EAAAqF,OAAA,UAAAtC,EAAAuC,GAAA,OAAAC,KAAA,MAAA9E,EAAA,OAAAA,EAAA+E,GAAA,cAAA9E,EAAA,MAAAA,GAAA,MAAAR,CAAAA,EAAAQ,CAAA,YAAAR,EAAAuF,KAAA,IAAAC,MAAAhF,EAAA,MAAAA,GAAA,MAAAP,CAAAA,EAAAO,CAAA,YAAAP,EAAAsF,KAAA,IAAAE,SAAA1F,CAAA,KAAAA,CAAA,KAAAD,EAAA,EAAA4F,EAAAtC,EAAA,GAAAxC,EAAAiB,CAAA,EAAAuB,EAAAa,GAAAJ,EAAA,GAAAhB,EAAAuC,GAAA,SAAAO,wBAAA,CAAAC,OAAAhD,IAAAiD,QAAA,CAAAhC,EAAA,kBAAAhB,EAAAuC,GAAA,SAAApB,UAAAP,EAAA,IAAAqC,MAAA,CAAA/B,GAAAQ,GAAAZ,EAAA8B,SAAAC,CAAA","sources":["webpack://_N_E/./adapters/helpers/functions.js","webpack://_N_E/./components/RichText/RichText.js","webpack://_N_E/./adapters/helpers/Contentful.js","webpack://_N_E/"],"sourcesContent":["export function chunk(items, size) {\n if(!Array.isArray(items)\n || items.length === 0\n || !Number.isInteger(size)\n || size === 0) {\n return [];\n }\n\n const chunks = [];\n let chunk = [];\n\n for(let i = 0; i < items.length; i++) {\n chunk.push(items[i]);\n if((i + 1) % size === 0) {\n chunks.push(chunk);\n chunk = [];\n }\n }\n\n if(chunk.length > 0) {\n chunks.push(chunk);\n }\n\n return chunks;\n}\n\nexport function flatten(array) {\n if (!Array.isArray(array)) {\n return [];\n }\n\n return array.reduce((previous, current) => {\n if (Array.isArray(current)){\n return previous.concat(current);\n } else {\n previous.push(current);\n return previous;\n }\n }, []);\n}\n\nexport function minimum(array) {\n if (!Array.isArray(array)) {\n return undefined;\n }\n\n let minimum = undefined;\n\n for(let i = 0; i < array.length; i++) {\n const value = array[i];\n if(typeof value === 'number') {\n if(minimum === undefined || value < minimum) {\n minimum = value;\n }\n }\n }\n\n return minimum;\n}\n\n// function to return N given of items in an Array\nexport function first(array, n) {\n // if passed array is not an array, return empty array\n if (!Array.isArray(array)\n || n <= 0) {\n return [];\n }\n\n //if N number is bigger or equal slice up the entire thing\n if(n >= array.length) {\n return array.slice();\n } else {\n // otherwise return only N numbers of array items\n return array.slice(0, n);\n }\n}\n\nexport function isLater(value) {\n // Return true if today is after the value date\n let result = false\n\n if (value && value instanceof Date) {\n result = new Date() > value;\n } else if (value) {\n result = new Date() > new Date(value)\n }\n\n return result;\n}\n\nexport function isObject(value) {\n return (!!value) && (value.constructor === Object);\n}\n\nexport function findIndex(array, fn) {\n if (!Array.isArray(array)\n || !(typeof fn === 'function')) {\n return undefined;\n }\n for(let i = 0; i < array.length; i++) {\n const element = array[i];\n\n if(fn(element)) {\n return i;\n }\n }\n\n return undefined;\n}\n\nexport function escapeHtml(unsafe) {\n return unsafe\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\nexport function textShorterFn(text, count, insertDots) {\n return (\n text.slice(0, count) + (text.length > count && insertDots ? \"...\" : \"\")\n );\n}","import React, { useMemo } from 'react'\nimport PropTypes from 'prop-types';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { recursivelyRemoveSysFromEntry } from '../../adapters/helpers/Contentful';\nimport Block from '../../adapters/helpers/Block';\nimport Component from '../../adapters/helpers/entity/Component';\nimport { RichTextConstants } from '../../adapters/helpers/Constants'\nimport DOMPurify from 'isomorphic-dompurify';\n\nexport default function RichText(props) {\n const {document, extraAttributes} = props;\n\n const entityRichTextBlock = extraAttributes?.richTextBlock || [];\n\n const richTextBlock = new Component(entityRichTextBlock);\n const text = document?.fields?.text || richTextBlock.getFieldValue(RichTextConstants.text);\n const classNames = document?.fields?.classNames || richTextBlock.getFieldValue(RichTextConstants.classNames);\n const anchorId = document?.fields?.anchorId || richTextBlock.getFieldValue(RichTextConstants.anchorId);\n const textContent = document?.fields?.textContent;\n const propClassname = props.className || '';\n\n const options = useMemo(() => {\n const handleEmbedNode = (node => {\n const target = recursivelyRemoveSysFromEntry(node?.data?.target);\n const block = new Block(target);\n \n const {\n extraAttributes,\n onClickCallback,\n customEvent\n } = props;\n\n return block.renderBlockFromDocument(extraAttributes,\n onClickCallback,\n customEvent);\n } );\n \n const handleHyperLink = (node, children) => {\n const { data, content } = node;\n return {children}\n };\n\n return ({\n renderNode: {\n [BLOCKS.EMBEDDED_ENTRY]: handleEmbedNode,\n [INLINES.EMBEDDED_ENTRY]: handleEmbedNode,\n [INLINES.HYPERLINK]: handleHyperLink,\n }\n });\n }, [props]);\n\n const component = (text) ? documentToReactComponents(text, options) : textContent ?
: null;\n return (
\n {component}\n
);\n}\n\nRichText.propTypes = {\n className: PropTypes.string,\n document: PropTypes.object,\n extraAttributes: PropTypes.any\n};\n","import {isObject} from './functions'; \n\n\n// If this function works fine, should replace the one in BlockDao\nexport function recursivelyRemoveSysFromEntry(entry) {\n if(Array.isArray(entry)) {\n return entry.map(x => recursivelyRemoveSysFromEntry(x));\n }\n\n if(!isObject(entry)) {\n return entry;\n }\n const sysType = entry?.sys?.type\n const contentType = entry?.sys?.contentType?.sys?.id || \n ((sysType === 'Asset') ? sysType : undefined);\n const fields = entry?.fields;\n\n if(contentType && fields) {\n const _sysRemovedFields = recursivelyRemoveSysFromEntry(fields);\n\n const revision = contentType == 'staticImage' ? entry?.sys?.revision : undefined;\n\n return {fields: {..._sysRemovedFields, contentType, revision}};\n } else {\n const keys = Object.keys(entry);\n const _entry = {};\n \n for (const key of keys) {\n _entry[key] = recursivelyRemoveSysFromEntry(entry[key]);\n }\n return _entry;\n }\n}","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7539],{61986:function(n,e,r){function t(n,e){if(!Array.isArray(n)||0===n.length||!Number.isInteger(e)||0===e)return[];for(var r=[],t=[],u=0;u0&&r.push(t),r}function u(n){if(Array.isArray(n)){for(var e=void 0,r=0;r=n.length?n.slice():n.slice(0,e)}function i(n){var e=!1;return n&&n instanceof Date?e=new Date>n:n&&(e=new Date>new Date(n)),e}function o(n){return!!n&&n.constructor===Object}function c(n,e){if(Array.isArray(n)&&\"function\"==typeof e)for(var r=0;r/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\")}function s(n,e,r){return n.slice(0,e)+(n.length>e&&r?\"...\":\"\")}r.d(e,{Kn:function(){return o},LT:function(){return u},Ps:function(){return l},Xv:function(){return a},cx:function(){return c},dV:function(){return s},en:function(){return i},yo:function(){return t}})},67539:function(n,e,r){r.r(e),r.d(e,{default:function(){return h}});var t=r(930),u=r.n(t),l=r(67294),i=r(80865),o=r(74129),c=r(61986);function a(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function s(n){for(var e=1;e