PageSourceSearch

https://cdn.vialibri.net/static/assets/LibraryCategoryList-BLgUCogp.js

js vialibri.net collected 2026-09-24 09:37:52 UTC 3,750 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="3eb4e689-c790-4b53-b4b3-4fecdd7dd236",e._sentryDebugIdIdentifier="sentry-dbid-3eb4e689-c790-4b53-b4b3-4fecdd7dd236")}catch(e){}}();import"./_sentry-release-injection-file-SYOkQ1Km.js";import{a as e}from"./rolldown-runtime-BBzOAo5_.js";import{t as r}from"./react-DuV36FPs.js";import{n as s,t as a}from"./FavouriteStarIcon-COqxca8m.js";import{t as i}from"./groupBy-6rNyxNFA.js";import{n as t,t as l}from"./EmptyList-DBru4o3z.js";import{K as n,at as o,g as c,n as d,r as u,z as b}from"./index-CRc22cjs.js";var h=e(r()),m=o(),f=n();var y=(0,m.withTranslators)((function({id:e,unsearchable:r,t:s}){const a=d((e=>e.librarySearch)),i=(0,h.useMemo)((()=>!(a.author||a.title||a.all_text)),[a]),t=(0,h.useCallback)((()=>b({id:e,values:a,fromHistory:!1})),[e,a]);let l;return r?l=s("We are currently unable to search this library."):i&&(l=s("Please enter a search query in the form above and then click this button.")),(0,f.jsx)("button",{className:"library__actions-link button button--outline button--small",disabled:i||r,type:"button",onClick:t,title:l,children:(0,f.jsx)(m.T,{message:"Search"})})})),j=h.memo((function({id:e,name:r,description:s,url:i,unsearchable:t,note:l=null}){const n=d((r=>!!r.userSettings.library_search_favourites&&r.userSettings.library_search_favourites.includes(e))),o=u(),b=(0,h.useCallback)((()=>o(c(e))),[o,e]);return(0,f.jsxs)("div",{className:"library",children:[(0,f.jsxs)("div",{className:"library__actions",children:[(0,f.jsx)(y,{id:e,unsearchable:t}),(0,f.jsx)(a,{isFavourite:n,toggleFavourite:b})]}),(0,f.jsxs)("div",{className:"library__info",children:[(0,f.jsx)("span",{className:"library__title",children:i?(0,f.jsx)("a",{href:i,target:"_blank",rel:"nofollow noreferrer",children:r}):r}),s&&(0,f.jsx)("span",{className:"library__description",children:s}),l&&(0,f.jsx)("div",{className:"library__note",children:l})]})]})})),_=(0,m.withTranslators)((({category:e,libraries:r,t:s})=>(0,f.jsxs)("div",{className:"category",children:[(0,f.jsx)("div",{className:"category__title",children:(e=>{switch(e){case"multinational":return s("Multi-National Union and Census Catalogues");case"national-library":return s("National Libraries");case"national-union":return s("National Union Catalogues");case"research":return s("Research & Special Collections Libraries");case"universities-na":return s("University Libraries (North America)");case"favourites":return s("Favourites");default:return""}})(e)}),(0,f.jsx)("div",{className:"libraries",children:r.map((e=>(0,h.createElement)(j,{...e,key:e.id})))})]},e))),g=[],x=["name","description"],v=(0,m.withTranslators)((({data:e,t:r})=>{const a=d((e=>e.userSettings.library_search_favourites))||g,{filter:n,setFilter:o,filteredItems:c}=s({items:e,filterFields:x}),u=(0,h.useMemo)((()=>c.filter((e=>a.includes(e.id)))),[a,c]),b=(0,h.useMemo)((()=>i(c,"category")),[c]);return(0,f.jsxs)("div",{className:"libraries__box",children:[(0,f.jsxs)("div",{className:"libraries__header",children:[(0,f.jsx)("h2",{children:(0,f.jsx)(m.T,{message:"Libraries"})}),(0,f.jsx)(t,{placeholder:r("Find a library"),onChange:o,value:n})]}),(0,f.jsxs)("div",{className:"categories",children:[u.length?(0,f.jsx)(_,{category:"favourites",libraries:u}):null,c.length?Object.entries(b).map((([e,r])=>(0,f.jsx)(_,{category:e,libraries:r},e))):(0,f.jsx)(l,{onClearFilter:()=>o(""),children:(0,f.jsx)(m.T,{message:'No libraries match "{{ filterText }}".',filterText:n})})]})]})}));export{v as default};
2//# sourceMappingURL=LibraryCategoryList-BLgUCogp.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.