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G,MAAOA,MAExH,EAT2C,IAU5C4F,EAAMa,OAASZ,GAAe1I,EAAAA,cAAoBuJ,EAAAA,EAAY,CAAE7D,UAAWA,EAAWC,SA9B7E,GA8BiGE,aAAeH,IACjHuC,EAAe,CAAEvC,aAAY,EAC9BE,WAAY8C,MAAkB,G","sources":["webpack://royal-geographical-society/./src/core/enums.ts","webpack://royal-geographical-society/./src/helpers/api.ts","webpack://royal-geographical-society/./src/hoc/withQueryParams.tsx","webpack://royal-geographical-society/./src/hoc/withRouter.tsx","webpack://royal-geographical-society/./src/hooks/useApi.ts","webpack://royal-geographical-society/./src/stories/Components/Cards/ArticleCard/ArticleCard.tsx","webpack://royal-geographical-society/./src/stories/Components/Cards/ResourceCard/ResourceCard.styles.ts","webpack://royal-geographical-society/./src/stories/Components/Cards/ResourceCard/ResourceCard.tsx","webpack://royal-geographical-society/./src/stories/Components/Global/Pagination/Pagination.styles.ts","webpack://royal-geographical-society/./src/stories/Components/Global/Pagination/Pagination.tsx","webpack://royal-geographical-society/./src/stories/Widgets/ArticleListing/ArticleListing.styles.ts","webpack://royal-geographical-society/./src/stories/Widgets/GenericListing/GenericListing.styles.ts","webpack://royal-geographical-society/./src/stories/Widgets/GenericListing/GenericListing.tsx"],"sourcesContent":["export var PageType;\r\n(function (PageType) {\r\n PageType[\"Content\"] = \"content\";\r\n PageType[\"Events\"] = \"events\";\r\n PageType[\"News\"] = \"news\";\r\n PageType[\"Resources\"] = \"resources\";\r\n PageType[\"CGeogMembers\"] = \"cGeogMember\";\r\n})(PageType || (PageType = {}));\r\n","// ADD API URLS BELOW\r\nexport const API_URLS = {\r\n ARTICLE_LIST: '/umbraco/api/listing/articles',\r\n SEARCH_RESULTS_LIST: '/umbraco/api/searchapi/search',\r\n};\r\n","import React from 'react';\r\nimport { Route } from 'react-router';\r\nimport { QueryParamProvider } from 'use-query-params';\r\nimport { withRouter } from './withRouter';\r\nexport function withQueryParams(WrappedComponent) {\r\n const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\r\n const ComponentWithQueryParams = (props) => {\r\n return (React.createElement(QueryParamProvider, { ReactRouterRoute: Route },\r\n React.createElement(WrappedComponent, { ...props })));\r\n };\r\n ComponentWithQueryParams.displayName = `withQueryParams(${displayName})`;\r\n return withRouter(ComponentWithQueryParams);\r\n}\r\n","import React from 'react';\r\nimport { BrowserRouter, StaticRouter } from 'react-router-dom';\r\nexport function withRouter(WrappedComponent) {\r\n const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';\r\n const ComponentWithRouter = (props) => {\r\n if (typeof window === 'undefined') {\r\n if (!props.location) {\r\n throw new Error(`The \"location\" prop was not provided when the \"withRouter\" HOC was used. Ensure the Tag Helper is using the \"use-router\" parameter.`);\r\n }\r\n return (React.createElement(StaticRouter, { basename: props.basename, context: props.context, location: props.location },\r\n React.createElement(WrappedComponent, { ...props })));\r\n }\r\n return (React.createElement(BrowserRouter, { basename: props.basename },\r\n React.createElement(WrappedComponent, { ...props })));\r\n };\r\n ComponentWithRouter.displayName = `withRouter(${displayName})`;\r\n return ComponentWithRouter;\r\n}\r\n","import React from 'react';\r\nimport { useFirstMountState } from 'react-use';\r\nexport function useApi(url, enable = true, jsonPostData = '') {\r\n const [data, setData] = React.useState();\r\n const [error, setError] = React.useState();\r\n const [loading, setLoading] = React.useState(false);\r\n const [complete, setComplete] = React.useState(false);\r\n const isFirstMount = useFirstMountState();\r\n React.useEffect(() => {\r\n if (isFirstMount || !enable) {\r\n return;\r\n }\r\n doAsync();\r\n async function doAsync() {\r\n try {\r\n setLoading(true);\r\n const res = await fetch(url, {\r\n method: jsonPostData !== '' ? 'POST' : 'GET',\r\n body: jsonPostData !== '' ? jsonPostData : null,\r\n headers: {\r\n 'content-type': 'application/json',\r\n },\r\n });\r\n if (!res.ok) {\r\n setData(undefined);\r\n setError(new Error(res.statusText));\r\n setLoading(false);\r\n return;\r\n }\r\n const data = (await res.json());\r\n setData(data);\r\n setError(undefined);\r\n setLoading(false);\r\n setComplete(true);\r\n }\r\n catch (error) {\r\n setData(undefined);\r\n setError(error);\r\n setLoading(false);\r\n }\r\n }\r\n }, [enable, url, jsonPostData]);\r\n return { data, error, loading, complete };\r\n}\r\n","import { imageUrl } from '@helpers/image';\r\nimport { getSvgFromSystem, SystemIcon } from '@helpers/systemIcons';\r\nimport React from 'react';\r\nimport { ArticleCardStyles as S } from './ArticleCard.styles';\r\nconst ArticleCard = ({ categoryTag, content, cta, date, featured = false, hideImage = false, image, theme, title, translations, }) => {\r\n return (React.createElement(S.Container, { as: \"a\", href: cta?.url, target: cta?.target ?? '_self', id: cta?.id, title: cta.text ?? translations['translations.global.btn.moreInfo'], \"data-featured\": featured ? '' : null, \"data-component-theme\": theme },\r\n !hideImage && (React.createElement(S.ImageWrapper, null,\r\n categoryTag && React.createElement(S.CategoryTag, null, categoryTag),\r\n React.createElement(S.Image, { alt: image.altText, loading: \"lazy\", role: image.altText ? undefined : 'presentation', src: featured\r\n ? imageUrl(image, { width: 564, height: 330 })\r\n : imageUrl(image, { width: 368, height: 280 }), width: featured ? '564' : '368', height: featured ? '330' : '280' }))),\r\n React.createElement(S.NewsCardContent, null,\r\n React.createElement(S.Title, null, title),\r\n React.createElement(S.Content, null, content),\r\n date && (React.createElement(S.ArticleInfo, null, date && (React.createElement(S.ArticleInfoItem, null,\r\n React.createElement(S.ArticleInfoItemIcon, null, getSvgFromSystem(SystemIcon.Calendar)),\r\n date)))),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight)))));\r\n};\r\nexport default ArticleCard;\r\n","import brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport { Device, from } from '@helpers/media';\r\nimport { paragraphSmall } from '@helpers/typography';\r\nimport styled from 'styled-components';\r\nimport { ArticleCardStyles } from '../ArticleCard/ArticleCard.styles';\r\nimport { CtaCardStyles } from '../CtaCard/CtaCard.styles';\r\nimport { InformationCardStyles } from '../InformationCard/InformationCard.styles';\r\nconst Container = styled(ArticleCardStyles.Container) `\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n`;\r\nconst ImageWrapper = styled(ArticleCardStyles.ImageWrapper) ``;\r\nconst CategoryTag = styled(ArticleCardStyles.CategoryTag) ``;\r\nconst Image = styled(ArticleCardStyles.Image) ``;\r\nconst CardContent = styled(InformationCardStyles.Content) `\r\n position: relative;\r\n padding-bottom: 79px;\r\n\r\n ${Container}[data-memberOnlyContent=true] & {\r\n padding-bottom: 20px;\r\n }\r\n\r\n ${Container}[data-featured] & {\r\n background-color: var(--themeColor);\r\n padding: 20px 30px 79px;\r\n }\r\n\r\n ${Container}[data-featured][data-memberOnlyContent=true] & {\r\n background-color: var(--themeColor);\r\n padding: 20px 30px 0;\r\n }\r\n`;\r\nconst Title = styled(ArticleCardStyles.Title) ``;\r\nconst Content = styled.p `\r\n ${paragraphSmall};\r\n margin-bottom: 10px;\r\n\r\n ${Container}[data-featured] & {\r\n color: ${brand.white};\r\n }\r\n`;\r\nconst ArticleInfo = styled.div ``;\r\nconst ArticleInfoItem = styled(ArticleCardStyles.ArticleInfoItem) ``;\r\nconst ArticleInfoItemIcon = styled.div `\r\n display: flex;\r\n align-items: center;\r\n width: 16px;\r\n margin-right: 7px;\r\n`;\r\nconst ArrowIcon = styled(CtaCardStyles.ArrowIcon) `\r\n top: auto;\r\n bottom: 10px;\r\n right: 15px;\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n top: auto;\r\n bottom: 10px;\r\n right: 20px;\r\n\r\n ${Container}[data-featured] & {\r\n bottom: 20px;\r\n right: 30px;\r\n }\r\n }\r\n\r\n ${Container}[data-featured] & {\r\n background-color: ${brand.white};\r\n\r\n svg {\r\n path:first-child {\r\n stroke: var(--themeColor);\r\n }\r\n }\r\n }\r\n`;\r\nconst MemberOnlyContent = styled.div `\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n width: 100%;\r\n margin-top: auto;\r\n padding: 10px ${fluid(15, 20)};\r\n color: ${brand.white};\r\n text-transform: uppercase;\r\n background-color: var(--themeColor);\r\n\r\n > span {\r\n ${fonts.agBook.regular};\r\n font-size: ${fluid(16, 18)};\r\n line-height: ${fluid(19, 22)};\r\n margin-left: ${fluid(12, 32)};\r\n }\r\n\r\n ${ArrowIcon} {\r\n position: relative;\r\n bottom: auto;\r\n right: auto;\r\n background-color: ${brand.white};\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n top: auto;\r\n bottom: auto;\r\n }\r\n\r\n svg {\r\n path {\r\n &:first-child {\r\n stroke: var(--themeColor);\r\n }\r\n }\r\n }\r\n }\r\n\r\n ${Container}[data-featured] & {\r\n width: calc(100% + 60px);\r\n margin-left: -30px;\r\n padding: 10px 30px;\r\n background-color: ${brand.white};\r\n color: var(--themeColor);\r\n\r\n ${ArrowIcon} {\r\n position: relative;\r\n bottom: auto;\r\n right: auto;\r\n background-color: var(--themeColor);\r\n\r\n svg {\r\n path {\r\n &:first-child {\r\n stroke: ${brand.white};\r\n }\r\n }\r\n }\r\n }\r\n }\r\n`;\r\nexport const ResourceCardStyles = {\r\n ArrowIcon,\r\n CardContent,\r\n CategoryTag,\r\n Container,\r\n Content,\r\n ArticleInfo,\r\n ArticleInfoItem,\r\n ArticleInfoItemIcon,\r\n Image,\r\n ImageWrapper,\r\n MemberOnlyContent,\r\n Title,\r\n};\r\n","import { imageUrl } from '@helpers/image';\r\nimport { getSvgFromSystem, SystemIcon } from '@helpers/systemIcons';\r\nimport React from 'react';\r\nimport { ResourceCardStyles as S } from './ResourceCard.styles';\r\nconst ResourceCard = ({ categoryTag, content, cta, featured = false, hideImage = false, image, memberOnlyContent = false, theme, title, translations, }) => {\r\n return (React.createElement(S.Container, { as: \"a\", href: cta.url, title: cta.text ?? translations['translations.global.btn.moreInfo'], id: cta.id, \"data-memberOnlyContent\": memberOnlyContent, \"data-featured\": featured ? '' : null, \"data-component-theme\": theme },\r\n !hideImage && (React.createElement(S.ImageWrapper, null,\r\n categoryTag && React.createElement(S.CategoryTag, null, categoryTag),\r\n React.createElement(S.Image, { alt: image.altText, loading: \"lazy\", role: image.altText ? undefined : 'presentation', src: featured\r\n ? imageUrl(image, { width: 564, height: 330 })\r\n : imageUrl(image, { width: 368, height: 280 }), width: featured ? '564' : '368', height: featured ? '330' : '280' }))),\r\n React.createElement(S.CardContent, null,\r\n React.createElement(S.Title, null, title),\r\n React.createElement(S.Content, null, content),\r\n !memberOnlyContent && (React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight))),\r\n memberOnlyContent && featured && (React.createElement(S.MemberOnlyContent, null,\r\n React.createElement(\"span\", null, translations['translations.global.memberOnlyContent']),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight))))),\r\n memberOnlyContent && !featured && (React.createElement(S.MemberOnlyContent, null,\r\n React.createElement(\"span\", null, translations['translations.global.memberOnlyContent']),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight))))));\r\n};\r\nexport default ResourceCard;\r\n","import { transition } from '@helpers/animate';\r\nimport brand from '@helpers/brand';\r\nimport fonts from '@helpers/fonts';\r\nimport { Device, from } from '@helpers/media';\r\nimport { rgba } from 'polished';\r\nimport styled from 'styled-components';\r\nconst Wrapper = styled.div `\r\n display: block;\r\n user-select: none;\r\n margin-top: 40px;\r\n\r\n ul {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n place-content: center;\r\n place-items: center;\r\n column-gap: 10px;\r\n width: 100%;\r\n\r\n @media ${from(Device.TabletSmall)} {\r\n column-gap: 20px;\r\n }\r\n\r\n li {\r\n display: inline-block;\r\n opacity: 1;\r\n transition: opacity 0.15s ease-out;\r\n padding: 0;\r\n\r\n a {\r\n ${fonts.agBook.bold};\r\n font-size: 16px;\r\n line-height: 1;\r\n display: flex;\r\n color: ${brand.grey.grey41};\r\n background-color: ${rgba(brand.white, 0)};\r\n border: 2px solid ${brand.grey.grey41};\r\n font-feature-settings: 'tnum' on;\r\n margin: 0;\r\n place-content: center;\r\n place-items: center;\r\n text-decoration: none;\r\n width: 42px;\r\n height: 42px;\r\n\r\n @media ${from(Device.TabletSmall)} {\r\n width: 57px;\r\n }\r\n }\r\n\r\n a {\r\n ${transition('color, background-color, opacity')};\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &:focus {\r\n outline: none;\r\n opacity: 0.6;\r\n }\r\n\r\n @supports selector(:focus-visible) {\r\n &:focus-visible {\r\n color: ${brand.black};\r\n }\r\n }\r\n\r\n @supports not selector(:focus-visible) {\r\n &:focus {\r\n color: ${brand.black};\r\n }\r\n }\r\n }\r\n\r\n &:not(.previous):not(.next) {\r\n &:hover {\r\n opacity: 0.6;\r\n }\r\n }\r\n\r\n &.previous,\r\n &.next {\r\n &:focus {\r\n opacity: 0.6;\r\n }\r\n\r\n a {\r\n width: auto;\r\n height: auto;\r\n border: none;\r\n background-color: transparent;\r\n color: ${brand.grey.grey41};\r\n\r\n > div {\r\n display: inline-flex;\r\n align-items: center;\r\n\r\n > span {\r\n display: none;\r\n\r\n @media ${from(Device.TabletSmall)} {\r\n display: inline-block;\r\n }\r\n }\r\n }\r\n\r\n &:focus,\r\n &:hover {\r\n svg path {\r\n stroke-width: 5;\r\n }\r\n }\r\n }\r\n\r\n svg {\r\n display: block;\r\n height: 26px;\r\n height: 26px;\r\n\r\n path {\r\n ${transition('stroke-width')};\r\n\r\n &:first-child {\r\n stroke: ${brand.grey.grey41};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &.previous {\r\n svg {\r\n transform: scaleX(-1);\r\n\r\n @media ${from(Device.TabletSmall)} {\r\n margin-right: 10px;\r\n }\r\n }\r\n }\r\n\r\n &.next {\r\n svg {\r\n @media ${from(Device.TabletSmall)} {\r\n margin-left: 10px;\r\n }\r\n }\r\n }\r\n\r\n &.break {\r\n a {\r\n border: none;\r\n width: 30px;\r\n height: auto;\r\n font-size: 32px;\r\n line-height: 12px;\r\n top: -8px;\r\n }\r\n }\r\n\r\n &.selected {\r\n a {\r\n color: ${brand.white};\r\n background-color: ${brand.grey.grey41};\r\n ${transition('opacity')};\r\n\r\n &::after {\r\n opacity: 1;\r\n }\r\n\r\n @supports selector(:focus-visible) {\r\n &:focus-visible {\r\n background-color: ${brand.grey.grey13};\r\n color: ${brand.white};\r\n }\r\n }\r\n\r\n @supports not selector(:focus-visible) {\r\n &:focus {\r\n background-color: ${brand.grey.grey13};\r\n color: ${brand.white};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: default;\r\n pointer-events: none;\r\n display: none;\r\n }\r\n }\r\n }\r\n`;\r\nexport default {\r\n Wrapper,\r\n};\r\n","import { Device, until } from '@helpers/media';\r\nimport { SystemIcon, getSvgFromSystem } from '@helpers/systemIcons';\r\nimport React from 'react';\r\nimport ReactPaginate from 'react-paginate';\r\nimport { useMedia } from 'react-use';\r\nimport PaginationStyles from './Pagination.styles';\r\nconst Pagination = ({ pageIndex, pageSize, totalCount, onPageChange, }) => {\r\n const isMobile = useMedia(until(Device.Tablet), false);\r\n return (React.createElement(PaginationStyles.Wrapper, null,\r\n React.createElement(ReactPaginate, { pageCount: Math.ceil(totalCount / pageSize), pageRangeDisplayed: isMobile ? 1 : 3, marginPagesDisplayed: 1, previousLabel: React.createElement(\"div\", null,\r\n getSvgFromSystem(SystemIcon.HoverArrowRight),\r\n React.createElement(\"span\", null, \"Previous\")), nextLabel: React.createElement(\"div\", null,\r\n React.createElement(\"span\", null, \"Next\"),\r\n getSvgFromSystem(SystemIcon.HoverArrowRight)), forcePage: pageIndex - 1, hrefBuilder: (page, pageCount) => (page >= 1 && page <= pageCount ? `/page/${page}` : '#'), hrefAllControls: true, onPageChange: ({ selected }) => {\r\n onPageChange(selected + 1);\r\n } })));\r\n};\r\nexport default Pagination;\r\n","import { fluid } from '@helpers/fluid';\r\nimport { baseGrid } from '@helpers/grid';\r\nimport { Device, from } from '@helpers/media';\r\nimport SectionWrapper from '@stories/Components/Global/SectionWrapper/SectionWrapper';\r\nimport styled from 'styled-components';\r\nconst Container = styled(SectionWrapper) ``;\r\nconst Listing = styled.div `\r\n ${baseGrid};\r\n grid-template-columns: 1fr;\r\n row-gap: ${fluid(30, 32)};\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n grid-template-columns: repeat(2, 1fr);\r\n column-gap: 16px;\r\n }\r\n\r\n @media ${from(Device.Tablet)} {\r\n grid-template-columns: repeat(3, 1fr);\r\n }\r\n`;\r\nconst SearchInput = styled.input ``;\r\nexport const ArticleListingStyles = {\r\n Container,\r\n Listing,\r\n SearchInput,\r\n};\r\n","import { Device, from } from '@helpers/media';\r\nimport { contentStyles } from '@helpers/typography';\r\nimport SectionWrapper from '@stories/Components/Global/SectionWrapper/SectionWrapper';\r\nimport SectionWrapperStyles from '@stories/Components/Global/SectionWrapper/SectionWrapper.styles';\r\nimport styled from 'styled-components';\r\nimport { ArticleListingStyles } from '../ArticleListing/ArticleListing.styles';\r\nconst ListingContainer = styled(SectionWrapper) ``;\r\nconst ContentContainer = styled(SectionWrapper) `\r\n ${SectionWrapperStyles.Inner} {\r\n padding-bottom: 0;\r\n }\r\n\r\n + ${ListingContainer} {\r\n @media ${from(Device.Tablet)} {\r\n --sectionSpacingTop: 60px;\r\n }\r\n }\r\n`;\r\nconst ArticleListing = styled(ArticleListingStyles.Listing) ``;\r\nconst Content = styled.div `\r\n ${contentStyles};\r\n`;\r\nexport const GenericListingStyles = {\r\n ArticleListing,\r\n Content,\r\n ContentContainer,\r\n ListingContainer,\r\n};\r\n","import { PageType } from '@core/enums';\r\nimport { API_URLS } from '@helpers/api';\r\nimport { withQueryParams } from '@hoc/withQueryParams';\r\nimport { useApi } from '@hooks/useApi';\r\nimport ArticleCard from '@stories/Components/Cards/ArticleCard/ArticleCard';\r\nimport EventCard from '@stories/Components/Cards/EventCard/EventCard';\r\nimport ResourceCard from '@stories/Components/Cards/ResourceCard/ResourceCard';\r\nimport Pagination from '@stories/Components/Global/Pagination/Pagination';\r\nimport queryString from 'query-string';\r\nimport React from 'react';\r\nimport { NumberParam, useQueryParams } from 'use-query-params';\r\nimport { GenericListingStyles as S } from './GenericListing.styles';\r\nconst GenericListing = ({ content, dataApiUrl = API_URLS.ARTICLE_LIST, filters, id, initialData, pageContext, pageIds, pageType, theme, }) => {\r\n // Define query string parameters.\r\n const [queryParams, setQueryParams] = useQueryParams({\r\n pageIndex: NumberParam,\r\n });\r\n // Get page index or default.\r\n const pageIndex = queryParams.pageIndex ?? 1;\r\n const pageSize = 12;\r\n // Construct API url.\r\n const parameters = queryString.stringify({\r\n docId: pageContext?.documentId,\r\n pageIndex: pageIndex,\r\n pageSize: pageSize,\r\n filter: filters,\r\n pageIds: pageIds,\r\n pageType: pageType\r\n });\r\n const apiUrl = `${dataApiUrl}?${parameters}`;\r\n // Fetch data.\r\n const { data } = useApi(apiUrl);\r\n // Get items from response or initial items.\r\n const items = data?.items ?? initialData.items;\r\n const totalItems = data?.totalItems ?? initialData.totalItems;\r\n return (React.createElement(React.Fragment, null,\r\n content && (React.createElement(S.ContentContainer, { innerWidth: \"narrow\", flush: \"top\" },\r\n React.createElement(S.Content, { dangerouslySetInnerHTML: { __html: content } }))),\r\n React.createElement(S.ListingContainer, { innerWidth: \"reduced\", id: id }, items && (React.createElement(React.Fragment, null,\r\n React.createElement(S.ArticleListing, null, (() => {\r\n switch (pageType) {\r\n case PageType.News:\r\n return items.map((item, index) => (React.createElement(ArticleCard, { key: `item-${index}`, ...item, theme: theme })));\r\n case PageType.Events:\r\n return items.map((item, index) => (React.createElement(EventCard, { key: `item-${index}`, ...item, theme: theme })));\r\n case PageType.Resources:\r\n return items.map((item, index) => (React.createElement(ResourceCard, { key: `item-${index}`, ...item, theme: theme })));\r\n }\r\n })()),\r\n items.length < totalItems && (React.createElement(Pagination, { pageIndex: pageIndex, pageSize: pageSize, onPageChange: (pageIndex) => {\r\n setQueryParams({ pageIndex });\r\n }, totalCount: totalItems })))))));\r\n};\r\nexport default withQueryParams(GenericListing);\r\n"],"names":["PageType","API_URLS","ARTICLE_LIST","SEARCH_RESULTS_LIST","withQueryParams","WrappedComponent","displayName","name","ComponentWithQueryParams","props","React","QueryParamProvider","ReactRouterRoute","Route","ComponentWithRouter","window","location","Error","StaticRouter","basename","context","BrowserRouter","withRouter","useApi","url","enable","jsonPostData","data","setData","error","setError","loading","setLoading","complete","setComplete","isFirstMount","useFirstMountState","async","res","fetch","method","body","headers","ok","undefined","statusText","json","doAsync","categoryTag","content","cta","date","featured","hideImage","image","theme","title","translations","S","as","href","target","id","text","alt","altText","role","src","imageUrl","width","height","getSvgFromSystem","SystemIcon","Container","styled","ArticleCardStyles","ImageWrapper","CategoryTag","Image","CardContent","InformationCardStyles","Title","Content","paragraphSmall","brand","ArticleInfo","ArticleInfoItem","ArticleInfoItemIcon","ArrowIcon","CtaCardStyles","from","Device","ResourceCardStyles","MemberOnlyContent","fluid","fonts","memberOnlyContent","Wrapper","rgba","transition","pageIndex","pageSize","totalCount","onPageChange","isMobile","useMedia","until","PaginationStyles","ReactPaginate","pageCount","Math","ceil","pageRangeDisplayed","marginPagesDisplayed","previousLabel","nextLabel","forcePage","hrefBuilder","page","hrefAllControls","selected","ArticleListingStyles","SectionWrapper","Listing","baseGrid","SearchInput","ListingContainer","ContentContainer","SectionWrapperStyles","GenericListingStyles","ArticleListing","contentStyles","dataApiUrl","filters","initialData","pageContext","pageIds","pageType","queryParams","setQueryParams","useQueryParams","NumberParam","apiUrl","queryString","docId","documentId","filter","items","totalItems","innerWidth","flush","dangerouslySetInnerHTML","__html","map","item","index","ArticleCard","key","EventCard","ResourceCard","length","Pagination"],"sourceRoot":""}