core/skin/p009.yurecnt.ru/js/lazyload-1.3.min.js

1 line
20 KiB
JavaScript
Raw Normal View History

2023-04-09 19:52:26 +05:00
var lzld="1209_1713";function t_lazyload__init(){t_lazyload__detectwebp();for(var t=document.querySelector("#allrecords"),e=(t&&"yes"===t.getAttribute("data-tilda-imgoptimoff")?window.lazy_imgoptimoff="yes":window.lazy_imgoptimoff="",document.querySelectorAll(".t156 .t-img")),o=0;o<e.length;o++)e[o].setAttribute("data-lazy-rule","skip");t=document.querySelectorAll(".t492,.t552,.t251,.t603,.t660,.t661,.t662,.t680,.t827,.t909,.t218,.t740,.t132,.t694,.t762,.t786,.t546");Array.prototype.forEach.call(t,function(t){t=t.querySelectorAll(".t-bgimg");Array.prototype.forEach.call(t,function(t){t.setAttribute("data-lazy-rule","comm:resize,round:100")})}),setTimeout(function(){lazyload_cover=new LazyLoad({elements_selector:".t-cover__carrier",show_while_loading:!1,data_src:"content-cover-bg",placeholder:"",threshold:700})},100),setTimeout(function(){var t,e;lazyload_img=new LazyLoad({elements_selector:".t-img",threshold:800}),lazyload_bgimg=new LazyLoad({elements_selector:".t-bgimg",show_while_loading:!1,placeholder:"",threshold:800}),lazyload_iframe=new LazyLoad({elements_selector:".t-iframe"}),window.jQuery&&jQuery(document).bind("slide.bs.carousel",function(){setTimeout(function(){t_lazyload_update()},500)}),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&document.body&&"object"==typeof document.body&&document.body.classList&&((t=document.createElement("div")).classList.add("t-mbfix"),document.body.appendChild(t),e=document.querySelector(".t-mbfix"),setTimeout(function(){e.classList.add("t-mbfix_hide")},50),setTimeout(function(){null!==e.parentNode&&e.parentNode.removeChild(e)},1e3))},500),window.addEventListener("resize",function(){clearTimeout(window.t_lazyload_resize_timerid),window.t_lazyload_resize_timerid=setTimeout(t_lazyload__onWindowResize,1e3)}),setTimeout(function(){"object"==typeof performance&&"object"==typeof performance.timing&&(window.t_lazyload_domloaded=+window.performance.timing.domContentLoadedEventEnd-+window.performance.timing.navigationStart)},0)}function t_lazyload_update(){"undefined"!=typeof lazyload_cover&&lazyload_cover.update(),"undefined"!=typeof lazyload_img&&lazyload_img.update(),"undefined"!=typeof lazyload_bgimg&&lazyload_bgimg.update(),"undefined"!=typeof lazyload_iframe&&lazyload_iframe.update()}function t_lazyload__onWindowResize(){var t;t_lazyload_update(),"yes"!==window.lazy_imgoptimoff&&(t=document.querySelectorAll(".t-cover__carrier, .t-bgimg, .t-img"),Array.prototype.forEach.call(t,function(t){window.t_lazyload_updateResize_elem(t)}))}function t_lazyload__detectwebp(){var t=new Image;t.onload=t.onerror=function(){2==t.height&&(window.lazy_webp="y")},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}function t_lazyLoad__appendImgStatToArr(t,e){var o;void 0!==navigator.sendBeacon&&(o=(new Date).getTime(),(t=t.getAttribute("src"))&&(o={time:o-e},0===t.indexOf("https://thumb.tildacdn")&&(o.th="y"),0===t.indexOf("https://static.tildacdn")&&(o.st="y"),(o.th||o.st)&&window.t_loadImgStats.push(o)))}function t_lazyload__ping(e){var o="https://"+e+".tildacdn.com";if("static"==e){var t=document.currentScript;if("object"==typeof t&&"string"==typeof t.src&&0===t.src.indexOf(o))return;if(null===document.head.querySelector('script[src^="'+o+'"]'))return}t=new Image;t.src=o+"/pixel.png",t.onload=function(){window["lazy_ok_"+e]="y"},setTimeout(function(){var t;"y"!==window["lazy_ok_"+e]&&(window["lazy_err_"+e]="y",console.log(e+" ping error"),t=document.querySelectorAll(".loading"),Array.prototype.forEach.call(t,function(t){var e="",e=t.lazy_loading_src;"string"==typeof str&&0===e.indexOf(o)&&(t.classList.remove("loading"),t.wasProcessed=!1)}),t_lazyload_update())},1e4)}!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.LazyLoad=e()}(this,function(){var e,n,a,o,h,y,i=!1;function l(t,e,o){var i;n?t.addEventListener(e,o):a&&t.attachEvent("on"+e,(i=t,function(){o.call(i,window.event)}))}function r(t,e,o){n?t.removeEventListener(e,o):a&