PageSourceSearch

https://lacongiunta.ch/wp-content/themes/lay/frontend/assets/js/frontend.critical-init.min.js?ver=11.8.1

js lacongiunta.ch collected 2026-10-02 22:58:39 UTC 7,205 bytes, 1 lines download raw bytes

1(()=>{var h=!1,m=window.layCriticalInitData||{},e=100,f=function(){},v=function(t){return!(!t||"function"!=typeof t.getBoundingClientRect)&&0<(t=t.getBoundingClientRect()).bottom&&t.top<window.innerHeight+e&&0<t.right&&t.left<window.innerWidth},r=function(t){for(var e=[265,512,768,1024,1280,1920,2560,3200,3840,4096],i=t,n=0;n<e.length;n++)if(t<=e[n]){i=e[n];break}return i},b=function(t){var e,i,n,a;t&&"function"==typeof t.getBoundingClientRect&&(n=t.getBoundingClientRect().width,i=window.getComputedStyle?window.getComputedStyle(t).objectFit:"",0===n&&(e=parseFloat(t.getAttribute("data-ar")),a=t.clientHeight,!Number.isNaN(e))&&0!==e&&0<a&&(n=a/e),"cover"!==t.getAttribute("data-parent-fit")&&"cover"!==i||(a=parseInt(t.getAttribute("data-w"),10),e=parseInt(t.getAttribute("data-h"),10),Number.isNaN(a))||Number.isNaN(e)||0===e||(i=(i=t.parentNode?t.parentNode.getBoundingClientRect():null)&&0===i.width&&0===i.height&&t.parentNode&&t.parentNode.parentNode?t.parentNode.parentNode.getBoundingClientRect():i)&&0<i.height&&(n=a/e<i.width/i.height?i.width:a/e*i.height),n)&&0<n&&(a=r(n),t.setAttribute("sizes",a+"px"),t.setAttribute("data-sizes",a+"px"))},A=function(t){return"string"==typeof t&&0===t.indexOf("data:image")},_=function(t){return t.currentSrc||t.src||t.getAttribute("src")||""},w=function(t){return t.complete&&0<t.naturalWidth&&!A(_(t))},x=function(){var t=parseInt(m.breakpoint,10);return Number.isNaN(t)&&(t=480),window.innerWidth<=t?"phone":"desktop"},L=function(t){for(var e=0;e<t.children.length;e++){var i=t.children[e];i&&"SOURCE"===i.tagName&&i.dataset&&null!=i.dataset.src&&(i.src=i.dataset.src)}t.setAttribute("preload","auto");try{t.load()}catch(t){}t.classList.remove("video-lazyload"),t.classList.add("loaded"),t.classList.contains("autoplay")&&t.setAttribute("autoplay","")},z=function(t){var e,i;t&&(t.classList.contains("carousel-original-img")?(e=t.getAttribute("data-lay-src"))&&t.setAttribute("src",e):t.classList.contains("carousel-responsive-img")&&(e=t.getAttribute("data-lay-srcset"),i=t.getAttribute("data-lay-src"),b(t),e&&t.setAttribute("srcset",e),!e)&&i&&t.setAttribute("src",i),t.complete?t.classList.add("loaded"):(t.addEventListener("load",function(){t.classList.add("loaded")},{once:!0}),t.addEventListener("error",function(){t.classList.add("loaded")},{once:!0})))},n={masked_lines:!0,fade_lines:!0,masked_words:!0,fade_words:!0,fade_characters:!0,typewriter_lines:!0,typewriter_words:!0},N=function(){for(var t=document.querySelectorAll(".lay-text-animation[data-animation-type]"),e=0;e<t.length;e++){var i=t[e].getAttribute("data-animation-type");if(i&&n[i])return!0}return!1},S=function(t){return{"pretext_hyphenation_germanic.min.js":"lay-pretext-hyphenation-germanic","pretext_hyphenation_roman.min.js":"lay-pretext-hyphenation-roman","pretext_hyphenation_en.min.js":"lay-pretext-hyphenation-en"}[t]||"lay-pretext-hyphenation-en"},E=function(t,e,i,n){var a;document.getElementById(t)?i&&i():((a=document.createElement("script")).id=t,a.src=e,a.async=!0,a.onload=i,a.onerror=n||function(){f("[critical_init] pretext lazy: script error",e)},document.body.appendChild(a))},C=function(t,e){return e?t+(-1===t.indexOf("?")?"?":"&")+"ver="+encodeURIComponent(e):t},j=function(t,e){function i(){window.layPretextTextAnimation&&"function"==typeof window.layPretextTextAnimation.registerHyphenationPatterns?t(!0):Date.now()-n>e?t(!1):requestAnimationFrame(i)}var n=Date.now();i()};window.laytheme.on("newpageshownfast",function(){var e,i,t,n,a,r,o,s,l,c,d,u,g,p,y;h?f("[critical_init] skip, already ran once"):(h=!0,f("[critical_init] run initial fast media load"),(t=m||{}).template_uri&&t.pretext_hyphenation_js&&(!N()||window.layPretextTextAnimation&&"function"==typeof window.layPretextTextAnimation.registerHyphenationPatterns||(n=String(t.template_uri).replace(/\/?$/,"")+"/frontend/assets/js/",a=C(n+"pretext_textanimation.min.js",t.asset_version),e=C(n+t.pretext_hyphenation_js,t.asset_version),i=S(t.pretext_hyphenation_js),f("[critical_init] pretext lazy prefetch: core +",t.pretext_hyphenation_js),E("lay-pretext-textanimation",a,function(){j(function(t){t?E(i,e,function(){f("[critical_init] pretext lazy: hyphenation loaded")}):f("[critical_init] pretext lazy: API missing after core load")},15e3)}))),n=x(),f("[critical_init] screen size:",n),t="desktop"===n?document.querySelectorAll("#grid, .cover-region-desktop, #footer"):(n=[],document.querySelector("body>.lay-content #custom-phone-grid")?n.push("#custom-phone-grid",".cover-region-phone"):n.push("#grid",".cover-region-desktop"),document.querySelector("body>.lay-content #footer-custom-phone-grid")?n.push("#footer-custom-phone-grid"):n.push("#footer"),document.querySelectorAll(n.join(", "))),f("[critical_init] target containers:",t.length),(a=t)&&0!==a.length?(o=r=0,s=m.image_loading||"lazy_load",l=function(t,e){t.classList.remove("lazyloading"),t.classList.add("lazyload"),t.classList.remove("lazyloaded"),t.classList.remove("loaded-error"),e?t.classList.add("loaded-error"):(t.classList.add("lazyloaded"),t.classList.add("loaded"))},c=function(t){t.setAttribute("data-was-processed","true")},a.forEach(function(t){t.querySelectorAll("img.setsizes, img.lay-gif, img.lay-image-original, img.lazyload, img.lay-image-responsive").forEach(function(t){var e,i,n,a;v(t)&&("lazy_load"===s?(n=t.getAttribute("data-srcset"),e=t.getAttribute("data-src"),(n||t.classList.contains("setsizes")||t.classList.contains("lay-image-responsive")||t.classList.contains("lazyload"))&&b(t),n&&t.setAttribute("srcset",n
1),i=t.classList.contains("lay-image-original")||t.classList.contains("lay-gif"),n||!e||!i&&t.getAttribute("src")&&!A(t.getAttribute("src"))||t.setAttribute("src",e),w(t)?(c(t),l(t,!1)):t.complete&&!A(_(t))?(c(t),l(t,!0)):(t.addEventListener("load",function(){w(t)&&(c(t),l(t,!1))},{once:!0}),t.addEventListener("error",function(){c(t),l(t,!0)},{once:!0})),o++):(t.classList.contains("setsizes")||t.classList.contains("lay-image-responsive")?(n=t.getAttribute("data-srcset"),b(t),n&&t.setAttribute("srcset",n),a=t.getAttribute("data-src"),n||!a||t.getAttribute("src")||t.setAttribute("src",a)):(a=t.getAttribute("data-src"))&&t.setAttribute("src",a),r++))})}),f("[critical_init] image mode:",s,"| loaded instant:",r,"| triggered lazyload:",o)):f("[critical_init] no targets for image loading"),(u=t)&&0!==u.length?(d=0,u.forEach(function(t){t.querySelectorAll("video.video-lazyload:not(.video-inside-thumbnailgrid-with-filter)").forEach(function(t){v(t)&&(L(t),d++)})}),f("[critical_init] loaded above-the-fold html5 videos:",d)):f("[critical_init] no targets for html5 video loading"),(u=t)&&0!==u.length?(y=p=g=0,u.forEach(function(t){t.querySelectorAll(".lay-carousel").forEach(function(t){if(v(t)){g++;for(var e=t.querySelectorAll(".lay-carousel-slide img.carousel-original-img, .lay-carousel-slide img.carousel-responsive-img"),i=0;i<e.length&&i<2;i++)z(e[i]),p++;for(var n=t.querySelectorAll(".lay-carousel-slide video.video-lazyload"),a=0;a<n.length;a++)v(n[a])&&(L(n[a]),y++)}})}),f("[critical_init] visible carousels:",g,"| loaded carousel images:",p,"| loaded carousel videos:",y)):f("[critical_init] no targets for carousel media loading"),f("[critical_init] done"))})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.