"use strict";function loadFullPublication(a){if(!0!==blockedButton){blockedButton=!0;var b=YRG.one(".loadMoreButton");b.addClass("btn-inactive"),b.setHTML("Loading..."),YRG.rg.ajax("publicliterature.PublicHtmlPdfViewer.readMore.html",{uid:a},function(a){if(a.success){b.hide();var c=YRG.all(".pdf-viewer-page"),d=c.item(c.size()-1),e=void 0;a.result.map(function(a){e='<div class="pdf-viewer-page">'+a+"</div>",d.insert(e,"after"),d=e})}else blockedButton=!1,b.removeClass("btn-inactive"),b.setHTML("Read full publication")},this,null,"GET")}}function isInViewport(a){return a.getBoundingClientRect().top<window.innerHeight+a.getBoundingClientRect().height}function loadBackgroundImage(a){if(a.hasAttribute("data-bg")){var b=a.getAttribute("data-bg");isInViewport(a)&&!loaded.includes(b)&&(a.style.backgroundSize="contain",a.style.backgroundImage="url("+b+")",loaded.push(b))}}var blockedButton=!1,loaded=[],timeout=void 0;document.addEventListener("DOMContentLoaded",function(){function a(){for(var a=b.length;a--;)loadBackgroundImage(b.item(a))}var b=document.querySelectorAll("[data-bg]");window.addEventListener("scroll",function(b){timeout&&clearTimeout(timeout),timeout=setTimeout(a,100)});for(var c=b.length;c--;)loadBackgroundImage(b.item(c))});