'+(left>0?'Открыть ещё '+portion+' '+(portion===1?'раздел':'раздела'):'')+'';
}
updateButton();
sections[initiallyVisible-1].after(button);
button.addEventListener('click',function(){
var nextSections=sections.slice(shown,shown+batchSize);
if(!nextSections.length)return;
nextSections.forEach(function(section){
section.hidden=false;
section.classList.add('solargy-revealing');
requestAnimationFrame(function(){
section.style.maxHeight=section.scrollHeight+'px';
section.classList.remove('solargy-revealing');
observe(section);
});
setTimeout(function(){section.style.maxHeight='';section.style.overflow='';},720);
});
shown+=nextSections.length;
updateButton();
nextSections[0].scrollIntoView({behavior:'smooth',block:'start'});
if(shown>=sections.length){
button.setAttribute('aria-expanded','true');
button.classList.add('solargy-progressive-done');
setTimeout(function(){button.remove();},300);
}
});
})();
