"use strict";if("serviceWorker"in navigator){var newWorker,home_loading_timeout=2e3,home_loading_begin=new Date;navigator.serviceWorker.register("/sw.js").then(function(e){document.body.classList.add("shown"),e.addEventListener("updatefound",function(){document.body.style.overflow="hidden",document.querySelector("#home-loading").style.display="block",(newWorker=e.installing).addEventListener("statechange",function(){switch(newWorker.state){case"installed":var e=new Date;if(home_loading_timeout<e-home_loading_begin)document.querySelector("#home-loading").style.display="none",document.body.style.overflow="auto";else setTimeout(function(){document.querySelector("#home-loading").style.display="none",document.body.style.overflow="auto"},home_loading_timeout-(e-home_loading_begin))}})})})}else document.body.classList.add("shown");