{"version":3,"sources":["webpack:///./src/js/components/Spinner.js","webpack:///./src/js/modules/pager/utils.js","webpack:///./src/js/modules/pager/index.js","webpack:///./src/js/modules/search-results/hooks/useQueryString.js","webpack:///./node_modules/query-string/index.js","webpack:///./node_modules/strict-uri-encode/index.js","webpack:///./node_modules/decode-uri-component/index.js","webpack:///./node_modules/split-on-first/index.js","webpack:///./node_modules/filter-obj/index.js","webpack:///./src/js/modules/search-results/hooks/useClickOutside.js","webpack:///./src/js/modules/search-results/hooks/useConditionalFetch.js","webpack:///./src/js/modules/search-results/hooks/useSuggestedResults.js","webpack:///./src/js/modules/favorites-listing/NotificationBar.js","webpack:///./src/js/modules/search-results/hooks/useFetch.js","webpack:///./src/js/modules/listing/FavoriteButton.js","webpack:///./src/js/modules/search-results/Masthead.js","webpack:///./src/js/modules/search-results/Facet.js","webpack:///./src/js/modules/search-results/Filters.js","webpack:///./src/js/modules/search-results/Listing.js","webpack:///./src/js/modules/search-results/Sort.js","webpack:///./src/js/modules/search-results/hooks/useResults.js","webpack:///./src/js/modules/search-results/SearchResults.js","webpack:///./src/js/modules/search-results/index.js"],"names":["Spinner","props","loading","className","getPageSpread","pages","current","map","page","isCurrent","pagerArrow","window","ue","pager","arrowPrev","aria-label","prevArrowLabel","xmlns","width","height","viewBox","xlinkHref","arrowNext","nextArrowLabel","Pager","total","onChange","focusTable","items","Array","from","keys","n","isEllipses","getPages","handleChange","cb","length","isPrevDisabled","isNextDisabled","previous","key","onClick","disabled","title","labelPrev","next","labelNext","p","history","location","setQueryStringValue","value","queryString","search","values","qs","parse","filteredValues","Object","entries","filter","v","newQsValue","stringify","fromEntries","qsValue","newUrl","protocol","host","pathname","pushState","setQueryString","getQueryStringValue","stringifyUrl","input","options","url","hashStart","indexOf","slice","removeHash","split","queryFromUrl","extract","parsedQueryFromUrl","hash","getHash","query","assign","useQueryString","initialValue","setValue","useState","onSetValue","useCallback","newValue","useEffect","handlePopState","addEventListener","removeEventListener","strictUriEncode","decodeComponent","splitOnFirst","filterObject","encodeFragmentIdentifier","Symbol","validateArrayFormatSeparator","TypeError","encode","strict","encodeURIComponent","decode","queryStart","parseValue","parseNumbers","Number","isNaN","trim","parseBooleans","toLowerCase","sort","arrayFormat","arrayFormatSeparator","formatter","result","accumulator","exec","replace","undefined","concat","isArray","includes","isEncodedArray","item","test","arrayValue","parserForArrayFormat","ret","create","param","k","reduce","Boolean","keysSorter","a","b","exports","object","shouldFilter","skipNull","skipEmptyString","index","join","keyValueSep","encoderForArrayFormat","objectCopy","x","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","pick","exclude","exclusionFilter","module","str","charCodeAt","toString","toUpperCase","singleMatcher","RegExp","multiMatcher","decodeComponents","components","decodeURIComponent","err","left","right","prototype","call","tokens","match","i","encodedURI","replaceMap","customDecodeURIComponent","string","separator","separatorIndex","obj","predicate","isArr","val","useClickOutside","ref","e","contains","target","document","abortController","AbortController","useConditionalFetch","condition","response","setResponse","error","setError","isLoading","setIsLoading","async","json","fetch","signal","then","res","fetchData","useSuggestedResults","liveQuery","debouncedQuery","setDebouncedQuery","stringifiedUrl","keyword","suggestions","Results","onQueryChange","useDebouncedFn","cancel","NotificationBar","show","setShow","firstRender","setFirstRender","action","setAction","displayAgain","setDisplayAgain","timeOutRef","useRef","buttonsContainer","blockSize","setBlockSize","handleResize","dismiss","clearTimeout","setTimeout","handleAction","timer","heading","_action","offsetHeight","onTransitionEnd","buttons","onDismiss","aria-labelledby","id","style","type","dismissNotification","subdata","copy","role","label","useFetch","FavoriteButton","setLoading","favorited","setFavorited","favoriteId","submitNotification","handleFavoriteId","loggedIn","headers","postEndpoint","method","body","JSON","add","r","data","Success","onHandleNotification","prev","querySelector","setAttribute","loginBtn","linkqueries","URLSearchParams","prevHref","getAttribute","set","replaceAll","catch","console","finally","data-favorited","labelFavorited","labelFavorite","Masthead","queryValue","endpointSuggestions","summary","onSearch","searchLabel","searchPlaceholder","suggestedResultsLabel","viewAllResultsLabel","viewAllResultsUrl","searchValue","setSearchValue","allowExpand","setAllowExpand","inputFocused","setInputFocused","isExpanded","inputId","nanoid","listId","suggestionsRef","inputRef","handleClickSuggestion","dangerouslySetInnerHTML","__html","aria-haspopup","aria-owns","onSubmit","preventDefault","noValidate","htmlFor","autoComplete","onFocus","onBlur","placeholder","autoFocus","closest","Title","Url","ContentType","Institution","Guid","href","Facet","updateFacets","expanded","setExpanded","facetsQs","setFacetsQs","getActiveFacets","contentId","buttonId","state","facet","handleClear","aria-expanded","aria-controls","Value","Label","Count","name","checked","Filters","collapseFiltersLabel","filterResultsLabel","expandFiltersLabel","filters","itemsLength","isDesktop","resetLabel","onFiltersChange","facetsCount","isSmall","useMediaQuery","clearFacets","customEvent","CustomEvent","dispatchEvent","Items","Listing","labels","timeout","favoriteBtn","favoritedBtn","barAddedHeading","barAddedCopy","barRemovedHeading","barRemovedCopy","barViewFavoritesBtn","barViewFavoritesUrl","barDismissBtn","displayNotification","setDisplayNotification","handleShowNotification","handleNotificationDismiss","handleViewFavorites","IsSuggested","Heading","Teaser","SuggestedLabel","CanFavorite","Favorited","classNames","substr","notificationProps","renderNotification","Sort","defaultValue","useResults","facets","setFacets","setPage","queries","setFavoriteId","get","setQuery","setSort","queryParams","acc","listingItems","resultsLabel","ResultsLabel","currentPage","CurrentPage","totalPages","TotalPages","Summary","SearchResults","endpointResults","noResultsRtf","sortOptions","resetPage","handleFiltersChange","option","delete","replaceState","num","Module"],"mappings":"2FAAA,oBAeeA,IAbCC,GACPA,EAAMC,QACX,yBAAKC,UAAU,WACb,yBAAKA,UAAU,iBACb,8BACA,8BACA,8BACA,gCAGF,M,qDCZN,MAAMC,EAAgB,CAACC,EAAOC,IACRD,EAAME,IAAIC,IAAQ,CACpCA,OACAC,UAAWH,IAAYE,K,MCA3B,MAAME,EAAU,UAAGC,OAAOC,UAAV,aAAG,EAAWC,MACxBC,EACJ,yBACEC,aAAYL,aAAZ,EAAYA,EAAYM,eACxBb,UAAU,eACVc,MAAM,6BACNC,MAAM,KACNC,OA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JTmO","file":"28.73277f.js","sourcesContent":["import React from 'react';\n\nconst Spinner = props => {\n return props.loading ? (\n
\n
\n
\n
\n
\n
\n
\n
\n ) : null;\n};\n\nexport default Spinner;\n","const getPageSpread = (pages, current) => {\n const spreadPages = pages.map(page => ({\n page,\n isCurrent: current === page\n }));\n return spreadPages;\n};\n\nexport const getPages = (current, total) => {\n if (total <= 5) {\n const items = Array.from(new Array(total).keys()).map(n => n + 1);\n return getPageSpread(items, current);\n }\n if (current < 5) {\n const items = Array.from(new Array(4).keys()).map(n => n + 1);\n return [\n ...getPageSpread(items, current),\n { isEllipses: true, page: 5 },\n ...getPageSpread([total], current)\n ];\n }\n if (total > 5 && current >= total - 3) {\n return [\n ...getPageSpread([1], current),\n { isEllipses: true, page: total - 4 },\n ...getPageSpread([total - 3, total - 2, total - 1, total], current)\n ];\n }\n if (total > 6 && current > 4) {\n return [\n ...getPageSpread([1], current),\n { isEllipses: true, page: current - 2 },\n ...getPageSpread([current - 1, current, current + 1], current),\n { isEllipses: true, page: current + 2 },\n ...getPageSpread([total], current)\n ];\n }\n return [];\n};\n","import React from 'react';\nimport { getPages } from './utils';\n\nconst pagerArrow = window.ue?.pager;\nconst arrowPrev = (\n \n \n \n);\nconst arrowNext = (\n \n \n \n);\n\nconst Pager = props => {\n const { page, total, onChange, focusTable } = props;\n const pages = getPages(page, total);\n\n const handleChange = cb => {\n if (focusTable) {\n focusTable();\n }\n onChange(cb);\n };\n\n if (pages.length <= 1) return null;\n\n const isPrevDisabled = page === 1;\n const isNextDisabled = page === total;\n const previous = (\n \n handleChange(page - 1)}\n className=\"pager__button\"\n disabled={isPrevDisabled}\n title={pagerArrow?.prevArrowLabel}\n >\n {props.labelPrev}\n {arrowPrev}\n \n \n );\n const next = (\n \n handleChange(page + 1)}\n className=\"pager__button\"\n disabled={isNextDisabled}\n title={pagerArrow?.nextArrowLabel}\n >\n {props.labelNext}\n {arrowNext}\n \n \n );\n return (\n
    \n {previous}\n {pages.map(p => (\n \n handleChange(p.page)}\n className=\"pager__button\"\n >\n {p.isEllipses ? '...' : p.page}\n \n \n ))}\n {next}\n
\n );\n};\n\nexport default Pager;\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\nfunction setQueryStringValue(key, value) {\n const queryString = location.search;\n const values = { ...qs.parse(queryString), [key]: value };\n const filteredValues =\n Object.entries(values).length > 0\n ? Object.entries(values).filter(([, v]) => v)\n : [];\n const newQsValue = qs.stringify(Object.fromEntries(filteredValues));\n setQueryString(newQsValue ? `?${newQsValue}` : '');\n}\n\nexport function getQueryStringValue(key) {\n const queryString = location.search;\n const values = qs.parse(queryString);\n return values[key];\n}\n\nfunction getHash(url) {\n let hash = '';\n const hashStart = url.indexOf('#');\n if (hashStart !== -1) {\n hash = url.slice(hashStart);\n }\n\n return hash;\n}\n\nfunction removeHash(input) {\n const hashStart = input.indexOf('#');\n if (hashStart !== -1) {\n input = input.slice(0, hashStart);\n }\n\n return input;\n}\n\nexport function stringifyUrl(input, options) {\n const url = removeHash(input.url).split('?')[0] || '';\n const queryFromUrl = qs.extract(input.url);\n const parsedQueryFromUrl = qs.parse(queryFromUrl);\n const hash = getHash(input.url);\n const query = Object.assign(parsedQueryFromUrl, input.query);\n let queryString = qs.stringify(query, options);\n if (queryString) {\n queryString = `?${queryString}`;\n }\n\n return `${url}${queryString}${hash}`;\n}\n\nfunction 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\nexport default useQueryString;\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","import { useEffect } from 'react';\n\nfunction useClickOutside(ref, cb) {\n useEffect(() => {\n function onClick(e) {\n if (!ref?.current?.contains(e.target)) {\n cb(e);\n }\n }\n\n document.addEventListener('click', onClick);\n () => document.removeEventListener('click', onClick);\n }, []);\n}\n\nexport default useClickOutside;\n","import { useEffect, useState } from 'react';\n\nconst abortController = new AbortController();\n\nfunction useConditionalFetch(url, condition = false) {\n const [response, setResponse] = useState(null);\n const [error, setError] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n async function fetchData() {\n setIsLoading(true);\n try {\n const json = await window\n .fetch(url, {\n signal: abortController.signal\n })\n .then(res => res.json());\n setResponse(json);\n } catch (error) {\n setError(error);\n } finally {\n setIsLoading(false);\n }\n }\n\n if (condition) {\n fetchData();\n }\n }, [url, condition]);\n\n return { response, error, isLoading };\n}\n\nexport default useConditionalFetch;\n","import { useEffect, useState } from 'react';\nimport { useDebouncedFn } from 'beautiful-react-hooks';\nimport { stringifyUrl } from './useQueryString';\nimport useConditionalFetch from './useConditionalFetch';\n\nfunction useSuggestedResults(url, liveQuery) {\n const [debouncedQuery, setDebouncedQuery] = useState('');\n const stringifiedUrl = stringifyUrl({\n url,\n query: { ...(debouncedQuery && { keyword: debouncedQuery }) }\n });\n const { response, error, isLoading } = useConditionalFetch(\n stringifiedUrl,\n !!debouncedQuery.trim()\n );\n const suggestions = response?.Results || [];\n\n const onQueryChange = useDebouncedFn(() => {\n if (liveQuery?.trim().length >= 2) {\n setDebouncedQuery(liveQuery);\n }\n }, 200);\n\n useEffect(() => {\n onQueryChange();\n return () => onQueryChange.cancel();\n }, [onQueryChange]);\n\n return { response, error, isLoading, suggestions };\n}\n\nexport default useSuggestedResults;\n","import React, { useEffect, useState, useRef } from 'react';\n\nexport default function NotificationBar(props) {\n const [show, setShow] = useState(false);\n const [firstRender, setFirstRender] = useState(true);\n const [action, setAction] = useState();\n const [displayAgain, setDisplayAgain] = useState(false);\n const timeOutRef = useRef(null);\n const buttonsContainer = useRef(null);\n const [blockSize, setBlockSize] = useState(0);\n\n useEffect(() => {\n\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize)\n }\n }, [])\n\n\n useEffect(() => {\n setFirstRender(false);\n\n if (props.dismiss && show) {\n clearTimeout(timeOutRef.current);\n timeOutRef.current = setTimeout(() => {\n handleAction('0');\n }, props.timer);\n\n return () => {\n clearTimeout(timeOutRef.current);\n };\n }\n }, [show]);\n\n useEffect(() => {\n if (!firstRender) {\n setShow(false);\n setDisplayAgain(true);\n }\n }, [props.heading]);\n\n useEffect(() => {\n if (!show && displayAgain) {\n setTimeout(() => {\n setShow(true);\n setDisplayAgain(false);\n }, 100);\n }\n }, [show, displayAgain]);\n\n useEffect(() => {\n if (!firstRender) {\n setShow(true);\n }\n }, [firstRender]);\n\n const handleAction = _action => {\n setShow(false);\n setAction(_action);\n };\n\n const handleTransition = () => {\n if (!show) {\n switch (action) {\n case 1:\n props.buttons[0].action();\n break;\n case 2:\n props.buttons[1].action();\n break;\n default:\n props.onDismiss();\n }\n }\n };\n\n const handleResize = () => {\n setBlockSize(buttonsContainer.current.offsetHeight);\n }\n\n return (\n \n \n \n \n \n \n
\n
\n

\n {props.heading}\n {props.subdata && (\n {props.subdata}\n )}\n

\n {props.copy &&

{props.copy}

}\n
\n
\n {props.buttons.length > 0 && (\n
\n {props.buttons[0] && (\n handleAction(1)}\n >\n {props.buttons[0].label}\n \n )}\n {props.buttons[1] && (\n handleAction(2)}\n >\n {props.buttons[1].label}\n \n )}\n
\n )}\n
\n \n );\n}\n","import { useEffect, useState } from 'react';\n\nconst abortController = new AbortController();\n\nfunction useFetch(url, options) {\n const [response, setResponse] = useState(null);\n const [error, setError] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n async function fetchData() {\n setIsLoading(true);\n try {\n const json = await window\n .fetch(url, {\n ...options,\n signal: abortController.signal\n })\n .then(res => res.json());\n setResponse(json);\n } catch (error) {\n setError(error);\n } finally {\n setIsLoading(false);\n }\n }\n\n fetchData();\n }, [url, options]);\n\n return { response, error, isLoading };\n}\n\nexport default useFetch;\n","import React, { useState, useEffect } from 'react';\n\nfunction FavoriteButton(props) {\n const [loading, setLoading] = useState(false);\n const [favorited, setFavorited] = useState(props.favorited);\n\n useEffect(() => {\n if (props.favoriteId === props.id) {\n submitNotification();\n props.handleFavoriteId();\n }\n }, []);\n\n const submitNotification = () => {\n if (props.loggedIn === 'true') {\n setLoading(true);\n\n const headers = {\n 'content-type': 'application/json'\n };\n fetch(props.postEndpoint, {\n method: 'POST',\n headers,\n body: JSON.stringify({ id: props.id, add: !favorited })\n })\n .then(r => r.json())\n .then(data => {\n if (data.Success) {\n props.onHandleNotification(!favorited);\n setFavorited(prev => !prev);\n } else {\n document\n .querySelector('.login-modal')\n ?.setAttribute('aria-hidden', false);\n const loginBtn = document.querySelector('#log-in-modal #login-btn');\n const linkqueries = new URLSearchParams(window.location.search);\n const prevHref = loginBtn.getAttribute('href').split('%3F')[0];\n linkqueries.set('favoriteid', props.id);\n loginBtn.setAttribute(\n 'href',\n `${prevHref}%3F${linkqueries\n .toString()\n .replaceAll('&', '%26')\n .replaceAll('=', '%3D')}`\n );\n }\n })\n .catch(console.error)\n .finally(() => {\n setLoading(false);\n });\n } else {\n document\n .querySelector('.login-modal')\n ?.setAttribute('aria-hidden', false);\n const loginBtn = document.querySelector('#log-in-modal #login-btn');\n const linkqueries = new URLSearchParams(window.location.search);\n const prevHref = loginBtn?.getAttribute('href').split('%3F')[0];\n linkqueries.set('favoriteid', props.id);\n loginBtn?.setAttribute(\n 'href',\n `${prevHref}%3F${linkqueries\n .toString()\n .replaceAll('&', '%26')\n .replaceAll('=', '%3D')}`\n );\n }\n };\n return (\n submitNotification()}\n >\n \n \n \n \n \n \n {favorited ? props.labelFavorited : props.labelFavorite}\n \n );\n}\n\nexport default FavoriteButton;\n","import React, { useRef, useState, useEffect } from 'react';\nimport { nanoid } from 'nanoid';\nimport useSuggestedResults from './hooks/useSuggestedResults';\nimport useClickOutside from './hooks/useClickOutside';\n\nfunction Masthead({\n queryValue,\n endpointSuggestions,\n heading,\n summary,\n onSearch,\n searchLabel,\n searchPlaceholder,\n suggestedResultsLabel,\n viewAllResultsLabel,\n viewAllResultsUrl\n}) {\n const [searchValue, setSearchValue] = useState('');\n const [allowExpand, setAllowExpand] = useState(false);\n const [inputFocused, setInputFocused] = useState(false);\n const { suggestions } = useSuggestedResults(endpointSuggestions, searchValue);\n const isExpanded = allowExpand && searchValue && suggestions?.length > 0;\n const { current: inputId } = useRef(`id-${nanoid()}`);\n const { current: listId } = useRef(`id-${nanoid()}`);\n const suggestionsRef = useRef(null);\n const inputRef = useRef(null);\n\n function handleSubmit(e) {\n e.preventDefault();\n onSearch(searchValue);\n setAllowExpand(false);\n }\n\n function handleChange(e) {\n setSearchValue(e.target.value);\n setAllowExpand(true);\n }\n\n function handleClickOutside(e) {\n if (!e.target.closest('.search-results__suggestions')) {\n setAllowExpand(false);\n }\n }\n\n function handleClickSuggestion() {\n setSearchValue('');\n }\n\n useEffect(() => {\n setSearchValue(queryValue || '');\n }, [queryValue]);\n\n useClickOutside(suggestionsRef, e => {\n if (e.target !== inputRef?.current) setAllowExpand(false);\n });\n\n return (\n
\n

{heading}

\n {summary && (\n \n )}\n \n
\n {!inputFocused && !searchValue && (\n \n )}\n {\n setAllowExpand(true);\n setInputFocused(true);\n }}\n onBlur={() => setInputFocused(false)}\n placeholder={inputFocused ? searchPlaceholder : ''}\n type=\"text\"\n autoFocus\n />\n \n \n \n \n \n
\n {isExpanded && (\n \n

\n {suggestedResultsLabel}\n

\n
    \n {suggestions.map(\n ({ Title, Url, ContentType, Institution, Guid }) => (\n
  • \n \n
    {Title}
    \n {(ContentType || Institution) && (\n
    \n {ContentType && {ContentType}}\n {Institution && {Institution}}\n
    \n )}\n \n
  • \n )\n )}\n
\n \n {viewAllResultsLabel}\n \n
\n )}\n \n
\n );\n}\n\nexport default Masthead;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { nanoid } from 'nanoid';\nimport useQueryString from './hooks/useQueryString';\n\nfunction Facet({ heading, items, value, updateFacets }) {\n const [expanded, setExpanded] = useState(false);\n const [facetsQs, setFacetsQs] = useQueryString(value);\n const getActiveFacets = useCallback(() => {\n if (Array.isArray(facetsQs)) return facetsQs;\n return facetsQs ? [facetsQs] : [];\n }, [facetsQs]);\n const { current: contentId } = useRef(`id-${nanoid()}`);\n const { current: buttonId } = useRef(`id-${nanoid()}`);\n\n const handleChange = useCallback(\n (val, state) => {\n if (state) {\n setFacetsQs([...getActiveFacets(), val]);\n } else {\n setFacetsQs(getActiveFacets().filter(facet => facet !== val));\n }\n updateFacets(value);\n },\n [getActiveFacets, setFacetsQs, updateFacets, value]\n );\n\n useEffect(() => {\n const handleClear = () => setFacetsQs([]);\n window.addEventListener('clearFacets', handleClear);\n return () => window.removeEventListener('clearFacets', handleClear);\n }, [handleChange, setFacetsQs]);\n\n useEffect(() => {\n updateFacets(value);\n }, [facetsQs]);\n\n return (\n
\n setExpanded(!expanded)}\n className=\"listing-filters__section-expand-trigger\"\n aria-expanded={expanded}\n aria-controls={contentId}\n id={buttonId}\n >\n

{heading}

\n \n \n \n \n {expanded && (\n \n {items?.map(({ Value, Label, Count }) => (\n
\n \n {Count}\n
\n ))}\n \n )}\n
\n );\n}\n\nexport default Facet;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { useMediaQuery } from 'beautiful-react-hooks';\nimport Facet from './Facet';\nimport { getQueryStringValue } from './hooks/useQueryString';\n\nfunction Filters({\n collapseFiltersLabel,\n filterResultsLabel,\n expandFiltersLabel,\n filters,\n isLoading,\n itemsLength,\n isDesktop,\n resetLabel,\n onFiltersChange,\n facetsCount\n}) {\n const isSmall = useMediaQuery('(max-width: 599px)');\n const [expanded, setExpanded] = useState(false);\n const [facetsQs, setFacetsQs] = useState({});\n\n function updateFacets(keyword) {\n setFacetsQs(prev => ({\n ...prev,\n [keyword]: getQueryStringValue(keyword)\n }));\n }\n\n const clearFacets = useCallback(() => {\n const customEvent = new window.CustomEvent('clearFacets');\n window.dispatchEvent(customEvent);\n setFacetsQs({});\n setExpanded(false);\n }, [setFacetsQs, setExpanded]);\n\n useEffect(() => {\n onFiltersChange(facetsQs);\n }, [facetsQs]);\n\n return (\n
\n {!isSmall && (\n
\n

\n {filterResultsLabel}\n

\n {facetsCount > 0 && (\n \n )}\n
\n )}\n
\n {isSmall &&\n (!expanded ? (\n setExpanded(true)}\n className=\"listing-filters__expand-wrapper\"\n >\n \n \n \n

\n {expandFiltersLabel}\n {facetsCount}\n

\n \n ) : (\n
\n

{filterResultsLabel}

\n setExpanded(false)}\n className=\"listing-filters__close\"\n aria-label={collapseFiltersLabel}\n >\n \n \n \n \n
\n ))}\n\n {(expanded || isDesktop) && (\n <>\n
\n {filters?.map(({ Label, Value, Items }) => (\n \n ))}\n
\n {isSmall && (\n
\n \n {resetLabel}\n \n setExpanded(false)}\n className=\"btn btn--primary\"\n >\n See {itemsLength} result{itemsLength > 1 ? 's' : ''}\n \n
\n )}\n \n )}\n
\n
\n );\n}\n\nexport default Filters;\n","import React, { useState } from 'react';\nimport { classNames } from '../../helpers';\nimport NotificationBar from '../favorites-listing/NotificationBar';\nimport FavoriteButton from '../listing/FavoriteButton';\n\nconst MAX_CHARS = 225;\n\nfunction Listing({\n items,\n labels,\n timeout,\n loggedIn,\n postEndpoint,\n favoriteId,\n handleFavoriteId\n}) {\n const {\n favoriteBtn,\n favoritedBtn,\n barAddedHeading,\n barAddedCopy,\n barRemovedHeading,\n barRemovedCopy,\n barViewFavoritesBtn,\n barViewFavoritesUrl,\n barDismissBtn\n } = JSON.parse(labels);\n\n const [displayNotification, setDisplayNotification] = useState(0);\n\n const handleShowNotification = add => {\n if (add) {\n if (displayNotification !== 1) {\n setDisplayNotification(1);\n }\n } else {\n if (displayNotification !== 2) {\n setDisplayNotification(2);\n }\n }\n };\n\n const handleNotificationDismiss = () => {\n setDisplayNotification(0);\n };\n\n const handleViewFavorites = () => {\n window.location.href = barViewFavoritesUrl;\n };\n\n const renderNotification = () => {\n const notificationProps = {\n dismiss: true,\n timer: timeout,\n onDismiss: handleNotificationDismiss,\n id: '',\n heading: '',\n subdata: '',\n copy: '',\n buttons: [\n {\n label: barViewFavoritesBtn,\n action: handleViewFavorites\n },\n {\n label: barDismissBtn,\n action: handleNotificationDismiss\n }\n ]\n };\n\n switch (displayNotification) {\n case 1:\n notificationProps.heading = barAddedHeading;\n notificationProps.copy = barAddedCopy;\n break;\n case 2:\n notificationProps.heading = barRemovedHeading;\n notificationProps.copy = barRemovedCopy;\n break;\n default:\n return;\n }\n\n return ;\n };\n\n return (\n <>\n {items?.map(\n ({\n Guid,\n IsSuggested,\n Url,\n Heading,\n Teaser,\n ContentType,\n Institution,\n SuggestedLabel,\n CanFavorite,\n Favorited\n }) => (\n \n
\n {IsSuggested ? (\n \n {SuggestedLabel}\n \n ) : (\n
\n )}\n {!!CanFavorite && (\n \n )}\n
\n \n

{Heading}

\n
\n {Teaser && (\n

\n {Teaser.length > MAX_CHARS\n ? Teaser.substr(0, MAX_CHARS)\n : Teaser}\n

\n )}\n {(ContentType || Institution) && (\n
\n {ContentType && {ContentType}}\n {Institution && {Institution}}\n
\n )}\n
\n )\n )}\n {displayNotification > 0 && renderNotification()}\n \n );\n}\n\nexport default Listing;\n","import React from 'react';\n\nfunction Sort({ options, defaultValue, value, onChange }) {\n return (\n
\n onChange(e.target.value)}\n >\n {options.map(({ Value, Label }) => (\n \n ))}\n \n \n \n \n
\n );\n}\n\nexport default Sort;\n","import { useState } from 'react';\nimport useFetch from './useFetch';\nimport useQueryString, { stringifyUrl } from './useQueryString';\n\nfunction useResults(url) {\n const [facets, setFacets] = useState({});\n const [page, setPage] = useQueryString('page');\n const queries = new URLSearchParams(window.location.search);\n const [favoriteId, setFavoriteId] = useState(queries.get('favoriteid') || '');\n const [query, setQuery] = useQueryString('query');\n const [sort, setSort] = useQueryString('sort');\n const queryParams = {\n ...(page && { page }),\n ...(query && { query }),\n ...(sort && { sort }),\n ...facets\n };\n const facetsCount = Object.values(facets)\n .filter(Boolean)\n .reduce((acc, current) => {\n if (Array.isArray(current)) {\n return acc + current.length;\n }\n return acc + 1;\n }, 0);\n const stringifiedUrl = stringifyUrl({ url, query: queryParams });\n const { response, error, isLoading } = useFetch(stringifiedUrl);\n const listingItems = response?.Results || [];\n const filters = response?.Filters || [];\n const resultsLabel = response?.ResultsLabel || '';\n const currentPage = response?.CurrentPage || 1;\n const totalPages = response?.TotalPages || 1;\n const summary = response?.Summary || '';\n\n return {\n response,\n isLoading,\n error,\n listingItems,\n resultsLabel,\n currentPage,\n totalPages,\n summary,\n filters,\n page,\n setPage,\n query,\n setQuery,\n sort,\n setSort,\n facetsCount,\n setFacets,\n favoriteId,\n setFavoriteId\n };\n}\n\nexport default useResults;\n","import React, { useRef } from 'react';\nimport Masthead from './Masthead';\nimport Filters from './Filters';\nimport Listing from './Listing';\nimport Pager from '../pager';\nimport Spinner from '../../components/Spinner';\nimport Sort from './Sort';\nimport useResults from './hooks/useResults';\n\nfunction SearchResults({\n collapseFiltersLabel,\n endpointSuggestions,\n endpointResults,\n expandFiltersLabel,\n filterResultsLabel,\n noResultsRtf,\n heading,\n resetLabel,\n searchLabel,\n searchPlaceholder,\n sortOptions,\n suggestedResultsLabel,\n viewAllResultsLabel,\n viewAllResultsUrl,\n labels,\n timeout,\n postEndpoint,\n loggedIn\n}) {\n const { current: options } = useRef(JSON.parse(sortOptions));\n const {\n isLoading,\n error,\n listingItems,\n resultsLabel,\n currentPage,\n totalPages,\n summary,\n filters,\n page,\n setPage,\n query,\n setQuery,\n sort,\n setSort,\n facetsCount,\n setFacets,\n favoriteId,\n setFavoriteId\n } = useResults(endpointResults);\n\n function resetPage() {\n if (page) {\n setPage('1');\n }\n }\n\n function handleSortChange(option) {\n resetPage();\n setSort(option);\n }\n\n function handleFiltersChange(value) {\n resetPage();\n setFacets(value);\n }\n\n function handleQueryChange(query) {\n resetPage();\n setQuery(query);\n }\n\n function handleFavoriteId() {\n const queries = new URLSearchParams(window.location.search);\n queries.delete('favoriteid');\n window.history.replaceState({}, document.title, `?${queries.toString()}`);\n\n setFavoriteId('');\n }\n\n return (\n <>\n \n
\n
\n \n
\n
\n
\n

{resultsLabel}

\n {sortOptions?.length > 0 && (\n \n )}\n
\n {listingItems?.length > 0 ? (\n \n ) : (\n \n )}\n setPage(num)}\n />\n
\n
\n \n \n \n );\n}\n\nexport default SearchResults;\n","import Module from './SearchResults';\n\nexport default Module;\n"],"sourceRoot":""}