text: /*! Wowchemy v5.0.0-beta.2 | https://wowchemy.com/ */
  /*! Copyright 2016-present George Cushen (https://georgecushen.com/) */
  /*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md */
  
  ;
  (()=>{var codeHighlighting=false;var hugoEnvironment="production";var searchEnabled=true;function fixMermaid(){let mermaids=[];[].push.apply(mermaids,document.getElementsByClassName("language-mermaid"));for(let i=0;i<mermaids.length;i++){let mermaidCodeElement=mermaids[i];let newElement=document.createElement("div");newElement.innerHTML=mermaidCodeElement.innerHTML;newElement.classList.add("mermaid");mermaidCodeElement.parentNode.replaceWith(newElement);}}
  function fadeIn(element,duration=600){element.style.display="";element.style.opacity="0";let last=+new Date();let tick=function(){element.style.opacity=(+element.style.opacity+(new Date()-last)/duration).toString();last=+new Date();if(+element.style.opacity<1){window.requestAnimationFrame&&requestAnimationFrame(tick)||setTimeout(tick,16);}};tick();}
  var body=document.body;function getThemeMode(){return parseInt(localStorage.getItem("wcTheme")||2);}
  function canChangeTheme(){return Boolean(window.wc.darkLightEnabled);}
  function initThemeVariation(){if(!canChangeTheme()){console.debug("User theming disabled.");return{isDarkTheme:window.wc.isSiteThemeDark,themeMode:window.wc.isSiteThemeDark?1:0};}
  console.debug("User theming enabled.");let isDarkTheme;let currentThemeMode=getThemeMode();console.debug(`User's theme variation: ${currentThemeMode}`);switch(currentThemeMode){case 0:isDarkTheme=false;break;case 1:isDarkTheme=true;break;default:if(window.matchMedia("(prefers-color-scheme: dark)").matches){isDarkTheme=true;}else if(window.matchMedia("(prefers-color-scheme: light)").matches){isDarkTheme=false;}else{isDarkTheme=window.wc.isSiteThemeDark;}
  break;}
  if(isDarkTheme&&!body.classList.contains("dark")){console.debug("Applying Wowchemy dark theme");document.body.classList.add("dark");}else if(!isDarkTheme&&body.classList.contains("dark")){console.debug("Applying Wowchemy light theme");document.body.classList.remove("dark");}
  return{isDarkTheme,themeMode:currentThemeMode};}
  function changeThemeModeClick(newMode){if(!canChangeTheme()){console.debug("Cannot change theme - user theming disabled.");return;}
  let isDarkTheme;switch(newMode){case 0:localStorage.setItem("wcTheme","0");isDarkTheme=false;console.debug("User changed theme variation to Light.");break;case 1:localStorage.setItem("wcTheme","1");isDarkTheme=true;console.debug("User changed theme variation to Dark.");break;default:localStorage.setItem("wcTheme","2");if(window.matchMedia("(prefers-color-scheme: dark)").matches){isDarkTheme=true;}else if(window.matchMedia("(prefers-color-scheme: light)").matches){isDarkTheme=false;}else{isDarkTheme=window.wc.isSiteThemeDark;}
  console.debug("User changed theme variation to Auto.");break;}
  renderThemeVariation(isDarkTheme,newMode);}
  function showActiveTheme(mode){let linkLight2=document.querySelector(".js-set-theme-light");let linkDark2=document.querySelector(".js-set-theme-dark");let linkAuto2=document.querySelector(".js-set-theme-auto");if(linkLight2===null){return;}
  switch(mode){case 0:linkLight2.classList.add("dropdown-item-active");linkDark2.classList.remove("dropdown-item-active");linkAuto2.classList.remove("dropdown-item-active");break;case 1:linkLight2.classList.remove("dropdown-item-active");linkDark2.classList.add("dropdown-item-active");linkAuto2.classList.remove("dropdown-item-active");break;default:linkLight2.classList.remove("dropdown-item-active");linkDark2.classList.remove("dropdown-item-active");linkAuto2.classList.add("dropdown-item-active");break;}}
  function renderThemeVariation(isDarkTheme,themeMode=2,init=false){const codeHlLight=document.querySelector("link[title=hl-light]");const codeHlDark=document.querySelector("link[title=hl-dark]");const codeHlEnabled=codeHlLight!==null||codeHlDark!==null;const diagramEnabled=document.querySelector("script[title=mermaid]")!==null;showActiveTheme(themeMode);const themeChangeEvent=new CustomEvent("wcThemeChange",{detail:{isDarkTheme:()=>isDarkTheme}});document.dispatchEvent(themeChangeEvent);if(!init){if(isDarkTheme===false&&!body.classList.contains("dark")||isDarkTheme===true&&body.classList.contains("dark")){return;}}
  if(isDarkTheme===false){if(!init){Object.assign(document.body.style,{opacity:0,visibility:"visible"});fadeIn(document.body,600);}
  body.classList.remove("dark");if(codeHlEnabled){console.debug("Setting HLJS theme to light");if(codeHlLight){codeHlLight.disabled=false;}
  if(codeHlDark){codeHlDark.disabled=true;}}
  if(diagramEnabled){console.debug("Initializing Mermaid with light theme");if(init){window.mermaid.initialize({startOnLoad:true,theme:"default",securityLevel:"loose"});}else{location.reload();}}}else if(isDarkTheme===true){if(!init){Object.assign(document.body.style,{opacity:0,visibility:"visible"});fadeIn(document.body,600);}
  body.classList.add("dark");if(codeHlEnabled){console.debug("Setting HLJS theme to dark");if(codeHlLight){codeHlLight.disabled=true;}
  if(codeHlDark){codeHlDark.disabled=false;}}
  if(diagramEnabled){console.debug("Initializing Mermaid with dark theme");if(init){window.mermaid.initialize({startOnLoad:true,theme:"dark",securityLevel:"loose"});}else{location.reload();}}}}
  function onMediaQueryListEvent(event){if(!canChangeTheme()){return;}
  const darkModeOn=event.matches;console.debug(`OS dark mode preference changed to ${darkModeOn?"\u{1F312} on":"\u2600\uFE0F off"}.`);let currentThemeVariation=getThemeMode();let isDarkTheme;if(currentThemeVariation===2){if(window.matchMedia("(prefers-color-scheme: dark)").matches){isDarkTheme=true;}else if(window.matchMedia("(prefers-color-scheme: light)").matches){isDarkTheme=false;}else{isDarkTheme=window.wc.isSiteThemeDark;}
  renderThemeVariation(isDarkTheme,currentThemeVariation);}}
  console.debug(`Environment: ${hugoEnvironment}`);function getNavBarHeight(){let $navbar=$("#navbar-main");let navbar_offset=$navbar.outerHeight();console.debug("Navbar height: "+navbar_offset);return navbar_offset;}
  function scrollToAnchor(target,duration=600){target=typeof target==="undefined"||typeof target==="object"?decodeURIComponent(window.location.hash):target;if($(target).length){target="#"+$.escapeSelector(target.substring(1));let elementOffset=Math.ceil($(target).offset().top-getNavBarHeight());$("body").addClass("scrolling");$("html, body").animate({scrollTop:elementOffset},duration,function(){$("body").removeClass("scrolling");});}else{console.debug("Cannot scroll to target `#"+target+"`. ID not found!");}}
  function fixScrollspy(){let $body=$("body");let data=$body.data("bs.scrollspy");if(data){data._config.offset=getNavBarHeight();$body.data("bs.scrollspy",data);$body.scrollspy("refresh");}}
  function removeQueryParamsFromUrl(){if(window.history.replaceState){let urlWithoutSearchParams=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.hash;window.history.replaceState({path:urlWithoutSearchParams},"",urlWithoutSearchParams);}}
  window.addEventListener("hashchange",scrollToAnchor);$("#navbar-main li.nav-item a.nav-link, .js-scroll").on("click",function(event){let hash=this.hash;if(this.pathname===window.location.pathname&&hash&&$(hash).length&&$(".js-widget-page").length>0){event.preventDefault();let elementOffset=Math.ceil($(hash).offset().top-getNavBarHeight());$("html, body").animate({scrollTop:elementOffset},800);}});$(document).on("click",".navbar-collapse.show",function(e){let targetElement=$(e.target).is("a")?$(e.target):$(e.target).parent();if(targetElement.is("a")&&targetElement.attr("class")!="dropdown-toggle"){$(this).collapse("hide");}});var pubFilters={};var searchRegex;var filterValues;var $grid_pubs=$("#container-publications");if($grid_pubs.length){$grid_pubs.isotope({itemSelector:".isotope-item",percentPosition:true,masonry:{columnWidth:".grid-sizer"},filter:function(){let $this=$(this);let searchResults=searchRegex?$this.text().match(searchRegex):true;let filterResults=filterValues?$this.is(filterValues):true;return searchResults&&filterResults;}});let $quickSearch=$(".filter-search").keyup(debounce(function(){searchRegex=new RegExp($quickSearch.val(),"gi");$grid_pubs.isotope();}));$(".pub-filters").on("change",function(){let $this=$(this);let filterGroup=$this[0].getAttribute("data-filter-group");pubFilters[filterGroup]=this.value;filterValues=concatValues(pubFilters);$grid_pubs.isotope();if(filterGroup==="pubtype"){let url=$(this).val();if(url.substr(0,9)===".pubtype-"){window.location.hash=url.substr(9);}else{window.location.hash="";}}});}
  function debounce(fn,threshold){let timeout;threshold=threshold||100;return function debounced(){clearTimeout(timeout);let args=arguments;let _this=this;function delayed(){fn.apply(_this,args);}
  timeout=setTimeout(delayed,threshold);};}
  function concatValues(obj){let value="";for(let prop in obj){value+=obj[prop];}
  return value;}
  function filter_publications(){if(!$grid_pubs.length)
  return;let urlHash=window.location.hash.replace("#","");let filterValue="*";if(urlHash!=""&&!isNaN(urlHash)){filterValue=".pubtype-"+urlHash;}
  let filterGroup="pubtype";pubFilters[filterGroup]=filterValue;filterValues=concatValues(pubFilters);$grid_pubs.isotope();$(".pubtype-select").val(filterValue);}
  function initMap(){if($("#map").length){let map_provider=$("#map-provider").val();let lat=$("#map-lat").val();let lng=$("#map-lng").val();let zoom=parseInt($("#map-zoom").val());let address=$("#map-dir").val();let api_key=$("#map-api-key").val();if(map_provider==="google"){let map=new GMaps({div:"#map",lat,lng,zoom,zoomControl:true,zoomControlOpt:{style:"SMALL",position:"TOP_LEFT"},streetViewControl:false,mapTypeControl:false,gestureHandling:"cooperative"});map.addMarker({lat,lng,click:function(){let url="https://www.google.com/maps/place/"+encodeURIComponent(address)+"/@"+lat+","+lng+"/";window.open(url,"_blank");},title:address});}else{let map=new L.map("map").setView([lat,lng],zoom);if(map_provider==="mapbox"&&api_key.length){L.tileLayer("https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",{attribution:'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery \xA9 <a href="http://mapbox.com">Mapbox</a>',tileSize:512,maxZoom:18,zoomOffset:-1,id:"mapbox/streets-v11",accessToken:api_key}).addTo(map);}else{L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(map);}
  let marker=L.marker([lat,lng]).addTo(map);let url=lat+","+lng+"#map="+zoom+"/"+lat+"/"+lng+"&layers=N";marker.bindPopup(address+'<p><a href="https://www.openstreetmap.org/directions?engine=osrm_car&route='+url+'">Routing via OpenStreetMap</a></p>');}}}
  function printLatestRelease(selector,repo){if(hugoEnvironment==="production"){$.getJSON("https://api.github.com/repos/"+repo+"/tags").done(function(json){let release=json[0];$(selector).append(" "+release.name);}).fail(function(jqxhr,textStatus,error){let err=textStatus+", "+error;console.log("Request Failed: "+err);});}}
  function toggleSearchDialog(){if($("body").hasClass("searching")){$("[id=search-query]").blur();$("body").removeClass("searching compensate-for-scrollbar");removeQueryParamsFromUrl();$("#fancybox-style-noscroll").remove();}else{if(!$("#fancybox-style-noscroll").length&&document.body.scrollHeight>window.innerHeight){$("head").append('<style id="fancybox-style-noscroll">.compensate-for-scrollbar{margin-right:'+(window.innerWidth-document.documentElement.clientWidth)+"px;}</style>");$("body").addClass("compensate-for-scrollbar");}
  $("body").addClass("searching");$(".search-results").css({opacity:0,visibility:"visible"}).animate({opacity:1},200);$("#search-query").focus();}}
  function normalizeCarouselSlideHeights(){$(".carousel").each(function(){let items=$(".carousel-item",this);items.css("min-height",0);let maxHeight=Math.max.apply(null,items.map(function(){return $(this).outerHeight();}).get());items.css("min-height",maxHeight+"px");});}
  function fixHugoOutput(){$("#TableOfContents").addClass("nav flex-column");$("#TableOfContents li").addClass("nav-item");$("#TableOfContents li a").addClass("nav-link");$("input[type='checkbox'][disabled]").parents("ul").addClass("task-list");}
  function getSiblings(elem){return Array.prototype.filter.call(elem.parentNode.children,function(sibling){return sibling!==elem;});}
  $(document).ready(function(){fixHugoOutput();fixMermaid();if(codeHighlighting){hljs.initHighlighting();}
  let{isDarkTheme,themeMode}=initThemeVariation();renderThemeVariation(isDarkTheme,themeMode,true);});$(window).on("load",function(){let isotopeInstances=document.querySelectorAll(".projects-container");let isotopeInstancesCount=isotopeInstances.length;let isotopeCounter=0;isotopeInstances.forEach(function(isotopeInstance,index){console.debug(`Loading Isotope instance ${index}`);let iso;let isoSection=isotopeInstance.closest("section");let layout="";if(isoSection.querySelector(".isotope").classList.contains("js-layout-row")){layout="fitRows";}else{layout="masonry";}
  let defaultFilter=isoSection.querySelector(".default-project-filter");let filterText="*";if(defaultFilter!==null){filterText=defaultFilter.textContent;}
  console.debug(`Default Isotope filter: ${filterText}`);imagesLoaded(isotopeInstance,function(){iso=new Isotope(isotopeInstance,{itemSelector:".isotope-item",layoutMode:layout,masonry:{gutter:20},filter:filterText});let isoFilterButtons=isoSection.querySelectorAll(".project-filters a");isoFilterButtons.forEach((button)=>button.addEventListener("click",(e)=>{e.preventDefault();let selector=button.getAttribute("data-filter");console.debug(`Updating Isotope filter to ${selector}`);iso.arrange({filter:selector});button.classList.remove("active");button.classList.add("active");let buttonSiblings=getSiblings(button);buttonSiblings.forEach((buttonSibling)=>{buttonSibling.classList.remove("active");buttonSibling.classList.remove("all");});}));incrementIsotopeCounter();});});function incrementIsotopeCounter(){isotopeCounter++;if(isotopeCounter===isotopeInstancesCount){console.debug(`All Portfolio Isotope instances loaded.`);if(window.location.hash){scrollToAnchor(decodeURIComponent(window.location.hash),0);}}}
  if($(".pub-filters-select")){filter_publications();}
  $(".js-cite-modal").click(function(e){e.preventDefault();let filename=$(this).attr("data-filename");let modal=$("#modal");modal.find(".modal-body code").load(filename,function(response,status,xhr){if(status=="error"){let msg="Error: ";$("#modal-error").html(msg+xhr.status+" "+xhr.statusText);}else{$(".js-download-cite").attr("href",filename);}});modal.modal("show");});$(".js-copy-cite").click(function(e){e.preventDefault();let range=document.createRange();let code_node=document.querySelector("#modal .modal-body");range.selectNode(code_node);window.getSelection().addRange(range);try{document.execCommand("copy");}catch(e2){console.log("Error: citation copy failed.");}
  window.getSelection().removeRange(range);});initMap();let githubReleaseSelector=".js-github-release";if($(githubReleaseSelector).length>0){printLatestRelease(githubReleaseSelector,$(githubReleaseSelector).data("repo"));}
  document.addEventListener("keyup",(event)=>{if(event.code==="Escape"){const body2=document.body;if(body2.classList.contains("searching")){toggleSearchDialog();}}
  if(event.key==="/"){let focusedElement=document.hasFocus()&&document.activeElement!==document.body&&document.activeElement!==document.documentElement&&document.activeElement||null;let isInputFocused=focusedElement instanceof HTMLInputElement||focusedElement instanceof HTMLTextAreaElement;if(searchEnabled&&!isInputFocused){event.preventDefault();toggleSearchDialog();}}});if(searchEnabled){$(".js-search").click(function(e){e.preventDefault();toggleSearchDialog();});}
  $('[data-toggle="tooltip"]').tooltip();fixScrollspy();});var linkLight=document.querySelector(".js-set-theme-light");var linkDark=document.querySelector(".js-set-theme-dark");var linkAuto=document.querySelector(".js-set-theme-auto");if(linkLight&&linkDark&&linkAuto){linkLight.addEventListener("click",(event)=>{event.preventDefault();changeThemeModeClick(0);});linkDark.addEventListener("click",(event)=>{event.preventDefault();changeThemeModeClick(1);});linkAuto.addEventListener("click",(event)=>{event.preventDefault();changeThemeModeClick(2);});}
  var darkModeMediaQuery=window.matchMedia("(prefers-color-scheme: dark)");darkModeMediaQuery.addEventListener("change",(event)=>{onMediaQueryListEvent(event);});window.addEventListener("load",normalizeCarouselSlideHeights);window.addEventListener("resize",normalizeCarouselSlideHeights);window.addEventListener("orientationchange",normalizeCarouselSlideHeights);$("body").on("mouseenter mouseleave",".dropdown",function(e){var dropdown=$(e.target).closest(".dropdown");var menu=$(".dropdown-menu",dropdown);dropdown.addClass("show");menu.addClass("show");setTimeout(function(){dropdown[dropdown.is(":hover")?"addClass":"removeClass"]("show");menu[dropdown.is(":hover")?"addClass":"removeClass"]("show");},300);});var resizeTimer;$(window).resize(function(){clearTimeout(resizeTimer);resizeTimer=setTimeout(fixScrollspy,200);});})();;(()=>{var content_type={authors:"Authors",event:"\u0412\u044B\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F",post:"\u0421\u0442\u0430\u0442\u044C\u0438",project:"\u041F\u0440\u043E\u0435\u043A\u0442\u044B",publication:"\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438",slides:"Slides"};var i18n={no_results:"\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",placeholder:"\u041F\u043E\u0438\u0441\u043A ...",results:"\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043D\u0430\u0439\u0434\u0435\u043D"};var search_config={indexURI:"/labnn-group/ru/index.json",minLength:1,threshold:0.3};var fuseOptions={shouldSort:true,includeMatches:true,tokenize:true,threshold:search_config.threshold,location:0,distance:100,maxPatternLength:32,minMatchCharLength:search_config.minLength,keys:[{name:"title",weight:0.99},{name:"summary",weight:0.6},{name:"authors",weight:0.5},{name:"content",weight:0.2},{name:"tags",weight:0.5},{name:"categories",weight:0.5}]};var summaryLength=60;function getSearchQuery(name){return decodeURIComponent((location.search.split(name+"=")[1]||"").split("&")[0]).replace(/\+/g," ");}
  function updateURL(url){if(history.replaceState){window.history.replaceState({path:url},"",url);}}
  function initSearch(force,fuse){let query=$("#search-query").val();if(query.length<1){$("#search-hits").empty();$("#search-common-queries").show();}
  if(!force&&query.length<fuseOptions.minMatchCharLength)
  return;$("#search-hits").empty();$("#search-common-queries").hide();searchAcademic(query,fuse);let newURL=window.location.protocol+"//"+window.location.host+window.location.pathname+"?q="+encodeURIComponent(query)+window.location.hash;updateURL(newURL);}
  function searchAcademic(query,fuse){let results=fuse.search(query);if(results.length>0){$("#search-hits").append('<h3 class="mt-0">'+results.length+" "+i18n.results+"</h3>");parseResults(query,results);}else{$("#search-hits").append('<div class="search-no-results">'+i18n.no_results+"</div>");}}
  function parseResults(query,results){$.each(results,function(key,value){let content_key=value.item.section;let content="";let snippet="";let snippetHighlights=[];if(["publication","event"].includes(content_key)){content=value.item.summary;}else{content=value.item.content;}
  if(fuseOptions.tokenize){snippetHighlights.push(query);}else{$.each(value.matches,function(matchKey,matchValue){if(matchValue.key=="content"){let start=matchValue.indices[0][0]-summaryLength>0?matchValue.indices[0][0]-summaryLength:0;let end=matchValue.indices[0][1]+summaryLength<content.length?matchValue.indices[0][1]+summaryLength:content.length;snippet+=content.substring(start,end);snippetHighlights.push(matchValue.value.substring(matchValue.indices[0][0],matchValue.indices[0][1]-matchValue.indices[0][0]+1));}});}
  if(snippet.length<1){snippet+=value.item.summary;}
  let template=$("#search-hit-fuse-template").html();if(content_key in content_type){content_key=content_type[content_key];}
  let templateData={key,title:value.item.title,type:content_key,relpermalink:value.item.relpermalink,snippet};let output=render(template,templateData);$("#search-hits").append(output);$.each(snippetHighlights,function(hlKey,hlValue){$("#summary-"+key).mark(hlValue);});});}
  function render(template,data){let key,find,re;for(key in data){find="\\{\\{\\s*"+key+"\\s*\\}\\}";re=new RegExp(find,"g");template=template.replace(re,data[key]);}
  return template;}
  if(typeof Fuse==="function"){$.getJSON(search_config.indexURI,function(search_index){let fuse=new Fuse(search_index,fuseOptions);let query=getSearchQuery("q");if(query){$("body").addClass("searching");$(".search-results").css({opacity:0,visibility:"visible"}).animate({opacity:1},200);$("#search-query").val(query);$("#search-query").focus();initSearch(true,fuse);}
  $("#search-query").keyup(function(e){clearTimeout($.data(this,"searchTimer"));if(e.keyCode==13){initSearch(true,fuse);}else{$(this).data("searchTimer",setTimeout(function(){initSearch(false,fuse);},250));}});});}})();