{"version":3,"sources":["webpack://@verndale/toolkit/./src/js/react-components/pagination.jsx","webpack://@verndale/toolkit/./src/js/react-hooks/use-search-listing.js","webpack://@verndale/toolkit/./src/js/react-components/search-listing/card.jsx","webpack://@verndale/toolkit/./src/js/react-components/search-listing/websites.jsx","webpack://@verndale/toolkit/./src/js/react-components/search-listing/facets.jsx","webpack://@verndale/toolkit/./src/js/react-components/search-listing/index.jsx","webpack://@verndale/toolkit/./src/js/react-components/select.jsx","webpack://@verndale/toolkit/./src/js/react-components/spinner.jsx","webpack://@verndale/toolkit/./src/js/react-hooks/use-fetch.js","webpack://@verndale/toolkit/./src/js/react-hooks/use-media-query.js","webpack://@verndale/toolkit/./src/js/react-hooks/use-query-string.js"],"names":[],"mappings":"wMAKO,KAAM,GAAW,SAEjB,WAAwB,EAAc,IAAK,EAAa,IAAK,CAClE,KAAM,GAAU,SAAS,EAAa,EAAE,EAClC,EAAQ,SAAS,EAAY,EAAE,EAErC,MAAO,CAAC,GAAG,GAAI,OAAM,CAAK,CAAC,EACxB,IAAI,CAAC,EAAG,IAAU,EAAQ,CAAC,EAC3B,OAAO,GACF,GAAS,GAGX,IAAW,GACX,IAAW,EAAU,GACrB,IAAW,EAAU,GACrB,IAAW,GACX,IAAW,EAAU,GACrB,IAAW,EAAU,GACrB,IAAW,CAMd,EACA,QAAQ,CAAC,EAAQ,EAAO,IACnB,EAAQ,GAAK,EAAS,IAAM,EAAM,EAAQ,GACrC,CAAC,EAAU,CAAM,EAGnB,CACR,EACA,IAAI,MAAM,CACf,CAEO,WAAoB,CACzB,YACA,cAAc,IACd,aACA,eACA,cAAc,IACb,CACD,MAAI,UAAS,EAAY,EAAE,GAAK,EAAU,KAGxC,gBAAC,OAAI,UAAW,SAAW,aAAc,CAAS,CAAC,EACjD,gBAAC,MAAG,UAAU,mBAAmB,KAAK,MAAM,EAC1C,gBAAC,UACC,gBAAC,UACC,aAAW,sBACX,SAAU,IAAgB,IAC1B,QAAS,IAAM,EAAa,GAAG,SA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ACF,EAAG,CAAC,CAAU,CAAC,EAER,CACT,C,mIC3BA,KAAM,CAAE,UAAS,YAAa,OAE9B,WAAwB,EAAS,CAC/B,KAAM,GAAS,GAAG,EAAS,aAAa,EAAS,OAAO,EAAS,WAAW,IAC5E,EAAQ,UAAU,CAAC,EAAG,GAAI,CAAM,CAClC,CAEO,WAA6B,EAAK,EAAO,CAC9C,KAAM,GAAc,EAAS,OACvB,EAAS,IAAK,QAAS,CAAW,GAAI,GAAM,CAAM,EAElD,EAAiB,OAAO,QAAQ,CAAM,EAAE,OAC1C,OAAO,QAAQ,CAAM,EAAE,OAAO,CAAC,CAAC,CAAE,KAAO,CAAC,EAC1C,CAAC,EACC,EAAW,OAAO,YAAY,CAAc,EAE5C,EAAa,YAAa,EAAU,CACxC,YAAa,OACf,CAAC,EACD,EAAe,EAAa,IAAI,IAAe,EAAE,CACnD,CAEO,WAA6B,EAAK,CACvC,KAAM,GAAc,EAAS,OAG7B,MAAO,SAFiB,EAAa,CAAE,YAAa,OAAQ,CAAC,EAE/C,EAChB,CAEO,WAAwB,EAAK,EAAe,GAAI,CACrD,KAAM,CAAC,EAAO,GAAY,eAAS,EAAoB,CAAG,GAAK,CAAY,EACrE,EAAa,kBACjB,GAAc,CACZ,EAAS,CAAQ,EACjB,EAAoB,EAAK,CAAQ,CACnC,EACA,CAAC,CAAG,CACN,EAEA,sBAAU,IAAM,CACd,KAAM,GAAiB,IAAM,EAAS,EAAoB,CAAG,CAAC,EAC9D,cAAO,iBAAiB,WAAY,CAAc,EAC3C,IAAM,OAAO,oBAAoB,WAAY,CAAc,CACpE,EAAG,CAAC,EAAK,CAAU,CAAC,EAEb,CAAC,EAAO,CAAU,CAC3B,C","file":"scripts/4.ebfb4843061a6c51ad4c.js","sourcesContent":["// @ts-check\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { classNames } from '../utils';\n\nexport const ELLIPSIS = '…';\n\nexport function calcPagination(currentPage = '1', totalPages = '1') {\n const current = parseInt(currentPage, 10);\n const total = parseInt(totalPages, 10);\n\n return [...new Array(total)]\n .map((_, index) => index + 1)\n .filter((number) => {\n if (total <= 5) return true;\n\n if (\n number === 1 ||\n number === current - 2 ||\n number === current - 1 ||\n number === current ||\n number === current + 1 ||\n number === current + 2 ||\n number === total\n ) {\n return true;\n }\n\n return false;\n })\n .flatMap((number, index, array) => {\n if (index > 0 && number - 1 !== array[index - 1]) {\n return [ELLIPSIS, number];\n }\n\n return number;\n })\n .map(String);\n}\n\nexport function Pagination({\n className,\n currentPage = '1',\n totalPages,\n onPageChange,\n hideSummary = false\n}) {\n if (parseInt(totalPages, 10) <= 1) return null;\n\n return (\n
\n
    \n
  1. \n onPageChange(`${parseInt(currentPage, 10) - 1}`)}\n >\n
  2. \n {calcPagination(currentPage, totalPages).map((page, index) => (\n
  3. \n onPageChange(page)}\n disabled={page === currentPage || page === ELLIPSIS}\n aria-label={`Go to page ${page}`}\n className={classNames(\n page === currentPage && 'current',\n parseInt(page, 10) === parseInt(currentPage, 10) - 2 &&\n parseInt(currentPage, 10) !== parseInt(totalPages, 10) &&\n 'lg-only',\n parseInt(page, 10) === parseInt(currentPage, 10) + 2 &&\n parseInt(currentPage, 10) !== 1 &&\n 'lg-only',\n parseInt(page, 10) === 1 &&\n parseInt(currentPage, 10) > 2 &&\n 'lg-only',\n parseInt(page, 10) === parseInt(totalPages, 10) &&\n parseInt(currentPage, 10) + 1 < parseInt(totalPages, 10) &&\n 'lg-only',\n page === ELLIPSIS && 'lg-only'\n )}\n >\n {page}\n \n
  4. \n ))}\n
  5. \n onPageChange(`${parseInt(currentPage, 10) + 1}`)}\n >\n
  6. \n
\n {hideSummary ? null : (\n \n Page {currentPage} of {totalPages}\n \n )}\n
\n );\n}\n\nPagination.propTypes = {\n className: PropTypes.string,\n currentPage: PropTypes.string,\n totalPages: PropTypes.string,\n onPageChange: PropTypes.func,\n hideSummary: PropTypes.bool\n};\n","import { stringifyUrl } from 'query-string';\nimport { useState } from 'react';\nimport { useFetch } from './use-fetch';\nimport { useQueryString } from './use-query-string';\n\nexport function useSearchListing({\n endpoint,\n pageQueryString,\n sortByQueryString,\n itemsPerPageQueryString\n}) {\n const [page, setPage] = useQueryString(pageQueryString);\n const [isFacetsOpen, setIsFacetsOpen] = useState(false);\n const [sortBy, setSortBy] = useQueryString(sortByQueryString);\n const [itemsPerPage, setItemsPerPage] = useQueryString(\n itemsPerPageQueryString\n );\n const [activeFacets, setActiveFacets] = useState({});\n\n const stringifiedUrl = stringifyUrl(\n {\n url: endpoint,\n query: {\n ...(page && { [pageQueryString]: page }),\n ...(sortBy && { [sortByQueryString]: sortBy }),\n ...(itemsPerPage && { [itemsPerPageQueryString]: itemsPerPage }),\n ...activeFacets\n }\n },\n { arrayFormat: 'comma' }\n );\n const { data, error, isLoading } = useFetch(stringifiedUrl);\n return {\n data,\n error,\n isLoading,\n page,\n setPage,\n sortBy,\n setSortBy,\n itemsPerPage,\n setItemsPerPage,\n activeFacets,\n setActiveFacets,\n isFacetsOpen,\n setIsFacetsOpen\n };\n}\n","import React, { useId } from 'react';\nimport PropTypes from 'prop-types';\nimport { classNames } from '../../utils';\n\nfunction SearchCard({\n Author,\n Type,\n Title,\n Link,\n Thumb,\n OverlayImage,\n Description,\n PublishedDate,\n PublishedDateText,\n Breadcumbs,\n Prices,\n isLocked,\n isVideo,\n ProductImageFlags\n}) {\n const id = useId();\n\n return (\n
\n {Thumb?.Src ? (\n \n {OverlayImage && OverlayImage.Src ? (\n \n {Thumb.Alt}\n \n ) : null}\n \n \n \n {ProductImageFlags && ProductImageFlags.length > 0 && (\n
\n {ProductImageFlags.map((flag, index) => (\n \n {flag?.FlagText}\n \n ))}\n
\n )}\n \n ) : null}\n
\n {Type}\n

\n ' : ''}`\n }}\n />\n

\n {Author ? (\n

\n {Author}\n

\n ) : null}\n \n

\n {Prices ? (\n

\n \n {Prices.MemberPriceLabel} {Prices.MemberPrice}\n \n {Prices.NonMemberPrice && Prices.NonMemberPriceLabel ? (\n \n {Prices.NonMemberPriceLabel} {Prices.NonMemberPrice}\n \n ) : null}\n {Prices.AdditionalPrices?.map((price, index) => (\n \n {price.Label} {price.Price}\n \n ))}\n
\n ) : null}\n\n {Breadcumbs?.length ? (\n \n \n \n ) : null}\n
\n
\n );\n}\n\nSearchCard.propTypes = {\n Author: PropTypes.string.isRequired,\n Type: PropTypes.string.isRequired,\n Title: PropTypes.string.isRequired,\n Link: PropTypes.string.isRequired,\n Thumb: PropTypes.shape({\n Src: PropTypes.string.isRequired,\n Alt: PropTypes.string.isRequired\n }),\n OverlayImage: PropTypes.shape({\n Src: PropTypes.string.isRequired,\n Position: PropTypes.string.isRequired\n }),\n Description: PropTypes.string.isRequired,\n PublishedDate: PropTypes.string.isRequired,\n PublishedDateText: PropTypes.string.isRequired,\n isLocked: PropTypes.oneOfType([PropTypes.bool, PropTypes.instanceOf(null)]),\n isVideo: PropTypes.oneOfType([PropTypes.bool, PropTypes.instanceOf(null)]),\n Breadcumbs: PropTypes.arrayOf(\n PropTypes.shape({\n Title: PropTypes.string.isRequired,\n Link: PropTypes.string.isRequired\n })\n ),\n Prices: PropTypes.shape({\n MemberPrice: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(null)\n ]),\n MemberPriceLabel: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(null)\n ]),\n NonMemberPrice: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(null)\n ]),\n NonMemberPriceLabel: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(null)\n ]),\n AdditionalPrices: PropTypes.arrayOf(\n PropTypes.shape({\n Label: PropTypes.string.isRequired,\n Price: PropTypes.string.isRequired\n })\n )\n }),\n ProductImageFlags: PropTypes.array\n};\n\nexport default SearchCard;\n","import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport { classNames } from '../../utils';\n\nfunction Websites({ websites }) {\n return (\n
\n

{websites?.Label}

\n \n
\n );\n}\n\nWebsites.propTypes = {\n websites: PropTypes.shape({\n Label: PropTypes.string.isRequired,\n Items: PropTypes.arrayOf(\n PropTypes.shape({\n Label: PropTypes.string,\n Count: PropTypes.number,\n Url: PropTypes.string,\n Current: PropTypes.bool\n })\n ).isRequired\n }).isRequired\n};\n\nexport default memo(Websites);\n","import React, { useCallback, useEffect, useState, useId, memo } from 'react';\nimport PropTypes from 'prop-types';\nimport AnimateHeight from 'react-animate-height';\nimport { BREAKPOINTS, classNames } from '../../utils';\nimport { useMediaQuery } from '../../react-hooks/use-media-query';\nimport Websites from './websites';\nimport {\n getQueryStringValue,\n setQueryStringValue,\n useQueryString\n} from '../../react-hooks/use-query-string';\n\nfunction Facets({\n appliedFiltersLabel,\n activeFacets,\n data,\n websites,\n isOpen,\n setIsOpen,\n setActiveFacets,\n setPage,\n clearAllLabel\n}) {\n const id = useId();\n const isDesktop = useMediaQuery(\n `(min-width: ${BREAKPOINTS.TABLET_LANDSCAPE}px)`\n );\n const [facetsQs, setFacetsQs] = useState({});\n const [, updateState] = useState();\n const forceUpdate = useCallback(() => updateState({}), []);\n\n const updateFacets = useCallback(\n (keyword) => {\n const value = getQueryStringValue(keyword);\n\n setFacetsQs((prev) => ({\n ...prev,\n [keyword]: value ?? []\n }));\n },\n [setFacetsQs]\n );\n\n const appliedFilters = Object.entries(activeFacets)\n .filter(([k]) => k !== 'website')\n .map(([k, v]) => (Array.isArray(v) ? [k, v] : [k, [v]]))\n .flatMap(([k, v]) =>\n v.map((i) => {\n const category = data?.find((item) => item?.Value === k);\n\n return {\n key: k,\n value: i,\n categoryLabel: category?.Label,\n label: category?.Items.find((item) => item?.Value === i)?.Label\n };\n })\n );\n\n const handleFacetRemove = useCallback(\n (key, value) => {\n const event = new CustomEvent('popstate');\n const active = (() => {\n const facets = getQueryStringValue(key);\n if (Array.isArray(facets)) return facets;\n return facets ? [facets] : [];\n })();\n setQueryStringValue(\n key,\n active.filter((v) => v !== value)\n );\n setActiveFacets((prev) => ({\n ...prev,\n [key]: active.filter((v) => v !== value)\n }));\n setPage('');\n window.dispatchEvent(event);\n },\n [setActiveFacets, setPage]\n );\n\n const clearAllFacets = useCallback(() => {\n const event = new CustomEvent('popstate');\n Object.keys(activeFacets).forEach((key) => {\n setQueryStringValue(key, []);\n setActiveFacets((prev) => ({\n ...prev,\n [key]: []\n }));\n setPage('');\n });\n window.dispatchEvent(event);\n }, [setActiveFacets, setPage, activeFacets]);\n\n useEffect(() => {\n if (Object.keys(facetsQs).length) setActiveFacets(facetsQs);\n }, [facetsQs]);\n\n return (\n <>\n setIsOpen((prev) => !prev)}\n >\n Narrow result\n \n \n {websites ? : null}\n {data?.map((facet, index) => (\n \n ))}\n {appliedFilters.length ? (\n
\n

\n

{appliedFiltersLabel}

\n \n

\n
    \n {appliedFilters.map(\n ({ key, value, categoryLabel, label }, index) => (\n
  • \n handleFacetRemove(key, value)}\n aria-label={`Remove Facet - ${categoryLabel}: ${label}`}\n >\n {categoryLabel}: {label}\n ×\n \n
  • \n )\n )}\n
\n
\n ) : null}\n \n \n );\n}\n\nFacets.propTypes = {\n appliedFiltersLabel: PropTypes.string,\n clearAllLabel: PropTypes.string,\n activeFacets: PropTypes.object,\n setPage: PropTypes.func.isRequired,\n isOpen: PropTypes.bool.isRequired,\n setIsOpen: PropTypes.func.isRequired,\n setActiveFacets: PropTypes.func.isRequired,\n data: PropTypes.arrayOf(\n PropTypes.shape({\n Label: PropTypes.string,\n Value: PropTypes.string,\n Items: PropTypes.arrayOf(\n PropTypes.shape({\n Count: PropTypes.number,\n Label: PropTypes.string,\n Value: PropTypes.string\n })\n )\n })\n ),\n websites: PropTypes.shape({\n Label: PropTypes.string,\n Items: PropTypes.arrayOf(\n PropTypes.shape({\n Label: PropTypes.string,\n Count: PropTypes.number,\n Url: PropTypes.string,\n Current: PropTypes.bool\n })\n )\n })\n};\n\nfunction Facet({ facet, updateFacets, setPage, forceUpdate, index }) {\n const [facetQs, setFacetQs] = useQueryString(facet?.Value);\n const getActiveFilters = useCallback(() => {\n if (Array.isArray(facetQs)) return facetQs;\n return facetQs ? [facetQs] : [];\n }, [facetQs]);\n const handleChange = useCallback(\n (val, checked) => {\n if (checked) {\n setFacetQs([...getActiveFilters(), val]);\n } else {\n setFacetQs(getActiveFilters().filter((f) => f !== val));\n }\n setPage('');\n forceUpdate();\n },\n [getActiveFilters, setFacetQs, updateFacets, facet?.Value]\n );\n\n useEffect(() => {\n updateFacets(facet?.Value);\n }, [facetQs]);\n\n return (\n 8 && 'search-facet-group--scrollable'\n )}\n >\n

{facet?.Label}

\n
    \n {facet?.Items?.map((item) => {\n const id = `${item?.Value}-${index}`;\n return (\n
  • \n
    \n handleChange(item?.Value, e.target.checked)}\n checked={getActiveFilters().includes(item?.Value)}\n />\n \n
    \n
  • \n );\n })}\n
\n \n );\n}\n\nFacet.propTypes = {\n forceUpdate: PropTypes.func.isRequired,\n index: PropTypes.number.isRequired,\n setPage: PropTypes.func.isRequired,\n updateFacets: PropTypes.func.isRequired,\n facet: PropTypes.shape({\n Label: PropTypes.string.isRequired,\n Value: PropTypes.string.isRequired,\n Items: PropTypes.arrayOf(\n PropTypes.shape({\n Label: PropTypes.string.isRequired,\n Value: PropTypes.string.isRequired,\n Info: PropTypes.oneOfType([\n PropTypes.string.isRequired,\n PropTypes.oneOf([null]).isRequired\n ])\n })\n ).isRequired\n }).isRequired\n};\n\nexport default memo(Facets);\n","import React, { useRef, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Select from '../select';\nimport { Pagination } from '../pagination';\nimport { useSearchListing } from '../../react-hooks/use-search-listing';\nimport SearchCard from './card';\nimport Facets from './facets';\nimport { scrollToElement } from '../../utils';\nimport Spinner from '../spinner';\n\nfunction SearchListing({\n endpoint,\n pageQueryString,\n itemsPerPageQueryString,\n itemsPerPageLabel,\n itemsPerPageOptions,\n sortByLabel,\n sortByOptions,\n sortByQueryString,\n appliedFiltersLabel,\n clearAllLabel,\n queryLabel,\n errorTemplate\n}) {\n const { current: sortByData } = useRef(JSON.parse(sortByOptions));\n const { current: itemsPerPageData } = useRef(JSON.parse(itemsPerPageOptions));\n const {\n data,\n error,\n isLoading,\n page,\n setPage,\n sortBy,\n setSortBy,\n itemsPerPage,\n setItemsPerPage,\n activeFacets,\n setActiveFacets,\n isFacetsOpen,\n setIsFacetsOpen\n } = useSearchListing({\n endpoint,\n pageQueryString,\n sortByQueryString,\n itemsPerPageQueryString\n });\n\n if (error) return null;\n\n const [needsReload, setNeedsReload] = useState(false);\n\n useEffect(() => {\n if (needsReload) {\n scrollToElement('.search-listing');\n setNeedsReload(false);\n }\n }, [data]);\n\n function setSelectValue(func, val) {\n setPage('');\n func(val);\n setNeedsReload(true);\n }\n\n function handlePageChange(value) {\n setNeedsReload(true);\n setPage(value);\n }\n\n return (\n <>\n {isLoading ? : null}\n
\n

{queryLabel}

\n {data?.Facets || data?.Websites ? (\n \n ) : null}\n
\n
\n
\n setSelectValue(setSortBy, value)}\n />\n {data?.TotalPages ? (\n \n ) : null}\n setSelectValue(setItemsPerPage, value)}\n />\n
\n
\n {data?.Items ? (\n data.Items?.map(\n (\n {\n Author,\n Type,\n Title,\n Link,\n Thumb,\n OverlayImage,\n Description,\n PublishedDate,\n PublishedDateText,\n Breadcumbs,\n Prices,\n isLocked,\n isVideo,\n ProductImageFlags\n },\n index\n ) => (\n \n )\n )\n ) : (\n \n )}\n
\n
\n setSelectValue(setSortBy, value)}\n />\n setSelectValue(setItemsPerPage, value)}\n />\n {data?.TotalPages ? (\n \n ) : null}\n setSelectValue(setItemsPerPage, value)}\n />\n
\n
\n \n );\n}\n\nSearchListing.propTypes = {\n endpoint: PropTypes.string.isRequired,\n pageQueryString: PropTypes.string.isRequired,\n itemsPerPageQueryString: PropTypes.string.isRequired,\n itemsPerPageLabel: PropTypes.string.isRequired,\n itemsPerPageOptions: PropTypes.string.isRequired,\n sortByLabel: PropTypes.string.isRequired,\n sortByOptions: PropTypes.string.isRequired,\n sortByQueryString: PropTypes.string.isRequired,\n appliedFiltersLabel: PropTypes.string.isRequired,\n clearAllLabel: PropTypes.string.isRequired,\n queryLabel: PropTypes.string.isRequired,\n errorTemplate: PropTypes.string.isRequired\n};\n\nexport default SearchListing;\n","import React, { useId } from 'react';\nimport PropTypes from 'prop-types';\nimport { classNames } from '../utils';\n\nfunction Select({\n className,\n label,\n options,\n hideLabel = false,\n placeholder,\n placeholderClickable = false,\n value,\n onChange,\n rounded = true\n}) {\n const id = useId();\n\n return (\n \n \n {label}\n \n onChange(e.target.value)}\n >\n {placeholder ? (\n \n ) : null}\n {options.map((option) => (\n \n ))}\n \n \n );\n}\n\nSelect.propTypes = {\n className: PropTypes.string,\n hideLabel: PropTypes.bool,\n label: PropTypes.string.isRequired,\n placeholder: PropTypes.string,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n Label: PropTypes.string.isRequired,\n Value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .isRequired\n })\n ).isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onChange: PropTypes.func,\n rounded: PropTypes.bool,\n placeholderClickable: PropTypes.bool\n};\n\nexport default Select;\n","import React from 'react';\n\nfunction Spinner() {\n return (\n
\n
\n
\n );\n}\n\nexport default Spinner;\n","import { useEffect, useState } from 'react';\n\nexport const useFetch = (url) => {\n const [data, setData] = useState(null);\n const [error, setError] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n const abortController = new AbortController();\n const { signal } = abortController;\n\n const fetchData = async () => {\n if (!url) return;\n setIsLoading(true);\n try {\n const res = await fetch(url, { signal });\n\n if (!res?.ok) {\n const err = new Error('Fetch error');\n err.status = res.status || '00';\n err.statusText = res.statusText || 'Unknown error';\n throw err;\n }\n\n const json = await res.json();\n\n if (json?.success && !signal.aborted) {\n setData(json?.data);\n setError(null);\n } else {\n setData(json?.data);\n setError(json?.message);\n }\n } catch (err) {\n if (!signal.aborted) {\n setData(null);\n setError(err);\n }\n } finally {\n if (!signal.aborted) {\n setIsLoading(false);\n }\n }\n };\n\n fetchData();\n\n return () => abortController.abort();\n }, [url]);\n\n return { data, error, isLoading };\n};\n","import { useEffect, useState } from 'react';\n\nexport const useMediaQuery = (mediaQuery) => {\n const [isVerified, setIsVerified] = useState(\n !!window.matchMedia(mediaQuery).matches\n );\n\n useEffect(() => {\n const mediaQueryList = window.matchMedia(mediaQuery);\n const documentChangeHandler = () => setIsVerified(!!mediaQueryList.matches);\n\n try {\n mediaQueryList.addEventListener('change', documentChangeHandler);\n } catch (e) {\n // Safari isn't supporting mediaQueryList.addEventListener\n mediaQueryList.addListener(documentChangeHandler);\n }\n\n documentChangeHandler();\n return () => {\n try {\n mediaQueryList.removeEventListener('change', documentChangeHandler);\n } catch (e) {\n // Safari isn't supporting mediaQueryList.removeEventListener\n mediaQueryList.removeListener(documentChangeHandler);\n }\n };\n }, [mediaQuery]);\n\n return isVerified;\n};\n","import { useState, useCallback, useEffect } from 'react';\nimport qs from 'query-string';\n\nconst { history, location } = window;\n\nfunction setQueryString(qsValue) {\n const newUrl = `${location.protocol}//${location.host}${location.pathname}${qsValue}`;\n history.pushState({}, '', newUrl);\n}\n\nexport function setQueryStringValue(key, value) {\n const queryString = location.search;\n const values = { ...qs.parse(queryString), [key]: value };\n\n const filteredValues = Object.entries(values).length\n ? Object.entries(values).filter(([, v]) => v)\n : [];\n const newValue = Object.fromEntries(filteredValues);\n\n const newQsValue = qs.stringify(newValue, {\n arrayFormat: 'comma'\n });\n setQueryString(newQsValue ? `?${newQsValue}` : '');\n}\n\nexport function getQueryStringValue(key) {\n const queryString = location.search;\n const values = qs.parse(queryString, { arrayFormat: 'comma' });\n\n return values[key];\n}\n\nexport function useQueryString(key, initialValue = '') {\n const [value, setValue] = useState(getQueryStringValue(key) || initialValue);\n const onSetValue = useCallback(\n (newValue) => {\n setValue(newValue);\n setQueryStringValue(key, newValue);\n },\n [key]\n );\n\n useEffect(() => {\n const handlePopState = () => setValue(getQueryStringValue(key));\n window.addEventListener('popstate', handlePopState);\n return () => window.removeEventListener('popstate', handlePopState);\n }, [key, onSetValue]);\n\n return [value, onSetValue];\n}\n"],"sourceRoot":""}