');
            const mainCountBadge = document.getElementById('main-count');
            const communityCountBadge = document.getElementById('community-count');

            let datasets = [];
            let mainCatalogDatasets = [];
            let communityCatalogDatasets = [];
            let filteredDatasets = [];
            let currentPage = 1;
            let currentView = 'grid';
            const itemsPerPage = 12;
            let searchTimeout = null;
            let activeThematicFilters = [];
