PageSourceSearch

https://www.interfax.ru/js/script.js?v=BrBcwet_BUXvcSoy-CSmM1NssGVm_yisBK-S2EX3BYU

js interfax.ru collected 2026-10-01 06:27:11 UTC 85,747 bytes, 6 lines download raw bytes

1/*!
2 * Stickyfill – `position: sticky` polyfill
3 * v. 2.1.0 | https://github.com/wilddeer/stickyfill
4 * MIT License
5 */
6function isIPad() { var userAgent = window.navigator && window.navigator.userAgent || ""; return /iPad/i.test(userAgent) } function getElementsList(html) { var temp_wrap = document.createElement("div"), temp_div = document.createElement("div"); return temp_div.className = "temp", temp_div.innerHTML = html, temp_wrap.appendChild(temp_div), temp_wrap.querySelectorAll(".temp > *") } !function (a, b) { "use strict"; function d(a, b) { for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]) } function e(a) { return parseFloat(a) || 0 } function f(a) { for (var b = 0; a;)b += a.offsetTop, a = a.offsetParent; return b } function g() { function c() { a.pageXOffset != m.left ? (m.top = a.pageYOffset, m.left = a.pageXOffset, p.refreshAll()) : a.pageYOffset != m.top && (m.top = a.pageYOffset, m.left = a.pageXOffset, n.forEach((function (a) { return a._recalcPosition() }))) } function d() { f = setInterval((function () { n.forEac
6h((function (a) { return a._fastCheck() })) }), 500) } if (!k) { k = !0, c(), a.addEventListener("scroll", c), a.addEventListener("resize", p.refreshAll), a.addEventListener("orientationchange", p.refreshAll); var f = void 0, g = void 0, h = void 0; "hidden" in b ? (g = "hidden", h = "visibilitychange") : "webkitHidden" in b && (g = "webkitHidden", h = "webkitvisibilitychange"), h ? (b[g] || d(), b.addEventListener(h, (function () { b[g] ? clearInterval(f) : d() }))) : d() } } var h = function () { function a(a, b) { for (var c = 0; c < b.length; c++) { var d = b[c]; d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) } } return function (b, c, d) { return c && a(b.prototype, c), d && a(b, d), b } }(), i = !1, j = void 0 !== a; j && a.getComputedStyle ? function () { var a = b.createElement("div");["", "-webkit-", "-moz-", "-ms-"].some((function (b) { try { a.style.position = b + "sticky" } catch (a) { } return "" != a.style.position })) && (i = !0) }() : i = !0; var k = !1, l = "undefined" != typeof ShadowRoot, m = { top: null, left: null }, n = [], o = function () { function g(a) { if (function (a, b) { if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") }(this, g), !(a instanceof HTMLElement)) throw new Error("First argument must be HTMLElement"); if (n.some((function (b) { return b._node === a }))) throw new Error("Stickyfill is already applied to this node"); this._node = a, this._stickyMode = null, this._active = !1, n.push(this), this.refresh() } return h(g, [{ key: "refresh", value: function () { if (!i && !this._removed) { this._active && this._deactivate(); var c = this._node, g = getComputedStyle(c), h = { position: g.position, top: g.top, display: g.display, marginTop: g.marginTop, marginBottom: g.marginBottom, marginLeft: g.marginLeft, marginRight: g.marginRight, cssFloat: g.cssFloat }; if (!isNaN(parseFloat(h.top)) && "table-cell" != h.display && "none" != h.display) { this._active = !0; var j = c.style.position; "sticky" != g.position && "-webkit-sticky" != g.position || (c.style.position = "static"); var k = c.parentNode, m = l && k instanceof ShadowRoot ? k.host : k, n = c.getBoundingClientRect(), o = m.getBoundingClientRect(), p = getComputedStyle(m); this._parent = { node: m, styles: { position: m.style.position }, offsetHeight: m.offsetHeight }, this._offsetToWindow = { left: n.left, right: b.documentElement.clientWidth - n.right }, this._offsetToParent = { top: n.top - o.top - e(p.borderTopWidth), left: n.left - o.left - e(p.borderLeftWidth), right: -n.right + o.right - e(p.borderRightWidth) }, this._styles = { position: j, top: c.style.top, bottom: c.style.bottom, left: c.style.left, right: c.style.right, width: c.style.width, marginTop: c.style.marginTop, marginLeft: c.style.marginLeft, marginRight: c.style.marginRight }; var q = e(h.top); this._limits = { start: n.top + a.pageYOffset - q, end: o.top + a.pageYOffset + m.offsetHeight - e(p.borderBottomWidth) - c.offsetHeight - q - e(h.marginBottom) }; var r = p.position; "absolute" != r && "relative" != r && (m.style.position = "relative"), this._recalcPosition(); var s = this._clone = {}; s.node = b.createElement("div"), d(s.node.style, { width: n.right - n.left + "px", height: n.bottom - n.top + "px", marginTop: h.marginTop, marginBottom: h.marginBottom, marginLeft: h.marginLeft, marginRight: h.marginRight, cssFloat: h.cssFloat, padding: 0, border: 0, borderSpacing: 0, fontSize: "1em", position: "static" }), k.insertBefore(s.node, c), s.docOffsetTop = f(s.node) } } } }, { key: "_recalcPosition", value: function () { if (this._active && !this._removed) { var a = m.top <= this._limits.start ? "start" : m.top >= this._limits.end ? "end" : "middle"; if (this._stickyMode != a) { switch (a) { case "start": d(this._node.style, { position: "absolute", left: this._offsetToParent.left + "px", right: this._offsetToParent.right + "px", top: this._offsetToParent.top + "px", bottom: "auto", width: "auto", marginLeft: 0, marginRight: 0, marginTop: 0 }); break; case "middle": d(this._node.style, { position: "fixed", left: this._offsetToWindow.left + "px", right: this._offsetToWindow.right + "px", top: this._styles.top, bottom: "auto", width: "auto", marginLeft: 0, marginRight: 0, marginTop: 0 }); break; case "end": d(this._node.style, { position: "absolute", left: this._offsetToParent.left + "px", right: this._offsetToParent.right + "px", top: "auto", bottom: 0, width: "auto", marginLeft: 0, marginRight: 0 }) }this._stickyMode = a } } } }, { key: "_fastCheck", value: function () { this._active && !this._removed && (Math.abs(f(this._clone.node) - this._clone.docOffsetTop) > 1 || Math.abs(this._parent.node.offsetHeight - this._parent.offsetHeight) > 1) && this.refresh() } }, { key: "_deactivate", value: function () { var a = this; this._active && !this._removed && (this._clone.node.parentNode.removeChild(this._clone.node), delete this._clone, d(this._node.style, this._styles), delete this._styles, n.some((function (b) { return b !== a && b._parent && b._parent.node === a._parent.node })) || d(this._parent.node.style, this._parent.styles), delete this._parent, this._stickyMode = null, this._active = !1, delete this._offsetToWindow, delete this._offsetToParent, delete this._limits) } }, { key: "remove", value: function () { var a = this; this._deactivate(), n.some((function (b, c) { if (b._node === a._node) return n.splice(c, 1), !0 })), this._removed = !0 } }]), g }(), p = { stickies: n, Sticky: o, forceSticky: function () { i = !1, g(), this.refreshAll() }, addOne: function (a) { if (!(a instanceof HTMLElement)) { if (!a.length || !a[0]) return; a = a[0] } for (var b = 0; b < n.length; b++)if (n[b]._node === a) return n[b]; return new o(a) }, add: function (a) { if (a instanceof HTMLElement && (a = [a]), a.length) { for (var b = [], c = function (c) { var d = a[c]; return d instanceof HTMLElement ? n.some((function (a) { if (a._node === d) return b.push(a), !0 })) ? "continue" : void b.push(new o(d)) : (b.push(void 0), "continue") }, d = 0; d < a.length; d++)c(d); return b } }
6, refreshAll: function () { n.forEach((function (a) { return a.refresh() })) }, removeOne: function (a) { if (!(a instanceof HTMLElement)) { if (!a.length || !a[0]) return; a = a[0] } n.some((function (b) { if (b._node === a) return b.remove(), !0 })) }, remove: function (a) { if (a instanceof HTMLElement && (a = [a]), a.length) for (var b = function (b) { var c = a[b]; n.some((function (a) { if (a._node === c) return a.remove(), !0 })) }, c = 0; c < a.length; c++)b(c) }, removeAll: function () { for (; n.length;)n[0].remove() } }; i || g(), "undefined" != typeof module && module.exports ? module.exports = p : j && (a.Stickyfill = p) }(window, document), function (t, e) { function o(t, e, n) { t[e] = t[e] || n } var r = ["responseType", "withCredentials", "timeout", "onprogress"]; t.ajax = function (t, a) { function s(t, e) { return function () { c || (a(void 0 === f.status ? t : f.status, 0 === f.status ? "Error" : f.response || f.responseText || e, f), c = !0) } } var u = t.headers || {}, i = t.body, d = t.method || (i ? "POST" : "GET"), c = !1, f = function (t) { return t && e.XDomainRequest && !/MSIE 1/.test(navigator.userAgent) ? new XDomainRequest : e.XMLHttpRequest ? new XMLHttpRequest : void 0 }(t.cors); f.open(d, t.url, !0); var l = f.onload = s(200); f.onreadystatechange = function () { 4 === f.readyState && l() }, f.onerror = s(null, "Error"), f.ontimeout = s(null, "Timeout"), f.onabort = s(null, "Abort"), i && (o(u, "X-Requested-With", "XMLHttpRequest"), e.FormData && i instanceof e.FormData || o(u, "Content-Type", "application/x-www-form-urlencoded")); for (var m = 0, v = r.length; v > m; m++)void 0 !== t[p = r[m]] && (f[p] = t[p]); for (var p in u) f.setRequestHeader(p, u[p]); return f.send(i), f }, e.nanoajax = t }({}, function () { return this }()), Element.prototype.closest || (Element.prototype.closest = function (s) { var el = this; do { if (Element.prototype.matches.call(el, s)) return el; el = el.parentElement || el.parentNode } while (null !== el && 1 === el.nodeType); return null }), function () { try { window.external.msSiteModeCreateJumplist("Интерфакс"), window.external.msSiteModeAddJumpListItem("Фотогалереи", "http://interfax.ru/photo/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Сюжеты", "http://interfax.ru/story/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Все новости", "http://interfax.ru/news/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Москва", "http://interfax.ru/moscow/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Культура", "http://interfax.ru/culture/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Спорт", "http://interfax.ru/sport/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Экономика", "http://interfax.ru/business/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("В Мире", "http://interfax.ru/world/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("В России", "http://interfax.ru/russia/", "http://interfax.ru/favicon.ico"), window.external.msSiteModeAddJumpListItem("Главное", "http://interfax.ru/", "http://interfax.ru/favicon.ico") } catch (ex) { } }(), function () { var dataTouch = !!("ontouchstart" in window || window.navigator.maxTouchPoints || window.DocumentTouch && window.document instanceof window.DocumentTouch); document.querySelector("body").setAttribute("data-touch", dataTouch) }(), /iPhone|iPad|iPod/i.test(navigator.userAgent) && document.body.classList.add("pointer"), document.onkeydown = onKeyDown; var selText = ""; function onKeyDown(event) { if (window.IS_BOT) return !0; if (selText = "", window.event && (event = window.event), event.ctrlKey && (selText = window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text, 13 === (event.keyCode ? event.keyCode : event.which ? event.which : null))) { var loaded = !1, iframe = document.querySelector(".spellCheckFrame"); iframe.setAttribute("src", "/spellerror?i=" + Math.random()), iframe.addEventListener("load", (function () { loaded || (iframe.contentWindow.document.querySelector('input[name="pageaddress"]').value = window.location, iframe.contentWindow.document.querySelector('textarea[name="errortext"]').value = selText, loaded = !0) })), document.querySelector(".spellCheck").style.display = "block", document.addEventListener("click", (function (e) { (e && e.target || event.scrElement).parents(".spell
6Check").length || (document.querySelector(".spellCheck").style.display = "none", event.stopPropagation()) })) } } /Googlebot|bingbot|Slurp|DuckDuckBot|Yandex(Bot|Images) |Mail\.RU_Bot/i.test(navigator.userAgent) && (document.documentElement.classList.add("is-bot"), window.IS_BOT = !0); var sX = 0, sMX = 0; function setSwipe(id) { var el = document.querySelectorAll(id); if (!(0 == !!document.addEventListener || el.length < 1 || 0 == !!("ontouchstart" in window))) for (var i = 0; i < el.length; i++)switch (el[i].addEventListener("touchstart", (function (e) { sX = e.touches[0].pageX }), !1), id) { case ".psnBlock .psBlock": el[i].addEventListener("touchmove", (function (e) { calcSwipeMove(e, 20) && photoSlider(calcSwipeMove(e, 20), ".slidePS", ".psBlock") }), !1); break; case ".psBig .psBlock": el[i].addEventListener("touchmove", (function (e) { calcSwipeMove(e, 30) && photoSlider(calcSwipeMove(e, 30), ".psBig", ".psBlock") }), !1); break; case ".v31__quotelist .v31__quoBlock": el[i].addEventListener("touchmove", (function (e) { calcSwipeMove(e, 60) && quoteSlider(calcSwipeMove(e, 60)) }), !1) } } function calcSwipeMove(e, x) { x = void 0 === x ? 30 : x; var result = !1; return (sMX = e.touches[0].pageX - sX) < -1 * x ? result = "right" : sMX > x && (result = "left"), result } var sliderContainer = document.querySelector(".slider-container"); if (sliderContainer) { var startX, currentIndex = 0, slidesPerView = 1; function updateSlidesPerView() { slidesPerView = window.innerWidth >= 1024 ? 5 : window.innerWidth >= 768 ? 3 : window.innerWidth >= 640 ? 2 : 1 } function updateSlider() { var sliderWrapper = document.querySelector(".slider-wrapper"), slideWidth = document.querySelector(".slider-slide").getBoundingClientRect().width, offset = -currentIndex * slideWidth; sliderWrapper.style.transform = "translateX(" + offset + "px)", updateButtons() } function updateButtons() { var prevButton = document.querySelector(".slider-button.prev"), nextButton = document.querySelector(".slider-button.next"), maxIndex = document.querySelectorAll(".slider-slide").length - slidesPerView; 0 === currentIndex ? (prevButton.disabled = !0, prevButton.style.opacity = "0.4", prevButton.style.backgroundColor = "#000") : (prevButton.disabled = !1, prevButton.style.opacity = "1", prevButton.style.backgroundColor = "#00848c"), currentIndex === maxIndex ? (nextButton.disabled = !0, nextButton.style.opacity = "0.4", nextButton.style.backgroundColor = "#000") : (nextButton.disabled = !1, nextButton.style.opacity = "1", nextButton.style.backgroundColor = "#00848c") } function slide(direction) { var maxIndex = document.querySelectorAll(".slider-slide").length - slidesPerView; "right" === direction && currentIndex < maxIndex ? currentIndex++ : "left" === direction && currentIndex > 0 && currentIndex--, updateSlider() } var ecoMO = document.querySelector(".ecoMO"); ecoMO && sliderContainer && (sliderContainer.addEventListener("touchstart", (function (e) { startX = e.touches[0].clientX })), sliderContainer.addEventListener("touchmove", (function (e) { if (startX) { e.preventDefault(); var currentX = e.touches[0].clientX, diffX = startX - currentX; Math.abs(diffX) > 50 && (slide(diffX > 0 ? "right" : "left"), startX = null) } }))), updateSlidesPerView(), updateSlider(), window.addEventListener("resize", (function () { updateSlidesPerView(), updateSlider() })) } function getCookie(name) { var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)")); return matches ? decodeURIComponent(matches[1]) : void 0 } function setCookie(name, value, options) { var expires = (options = options || {}).expires; if ("number" == typeof expires && expires) { var d = new Date; d.setTime(d.getTime() + 1e3 * expires), expires = options.expires = d } expires && expires.toUTCString && (options.expires = expires.toUTCString()); var updatedCookie = name + "=" + (value = encodeURIComponent(value)); for (var propName in options) { updatedCookie += "; " + propName; var propValue = options[propName]; !0 !== propValue && (updatedCookie += "=" + propValue) } document.cookie = updatedCookie }
6 function deleteCookie(name) { setCookie(name, "", { expires: -1 }) } var photoSliderTimestamp = 0; function photoSlider(direction, wrapSelector, photoBoxSelector, target, stepModifier) { if (Date.now && Date.now() - photoSliderTimestamp > 500) { if (photoSliderTimestamp = Date.now(), void 0 === target) { var e = event || window.event; target = e && e.target || event.scrElement } stepModifier = void 0 === stepModifier ? 1 : stepModifier; var pBoxListStepCalc, wrap = target.parents(wrapSelector)[0], pBox = wrap.querySelector(photoBoxSelector), btnLeft = wrap.querySelector(".psArLeft"), btnRight = wrap.querySelector(".psArRight"), pBoxWidth = pBox.getBoundingClientRect().width, pBoxList = pBox.children[0], pBoxListLeft = parseInt(window.getComputedStyle(pBoxList).left, 10), pBoxListWidth = pBoxList.offsetWidth, pBoxListItemWidth = pBoxList.children[1].offsetWidth, pBoxListStepOffset = (Math.floor(pBoxWidth / pBoxListItemWidth) + stepModifier) * pBoxListItemWidth; "left" == direction ? ((pBoxListStepCalc = pBoxListLeft + pBoxListStepOffset) + 20 >= 0 && (pBoxListStepCalc = 0, btnLeft.style.opacity = "0.4"), btnRight.style.opacity = "1") : (pBoxListStepCalc = pBoxListLeft - pBoxListStepOffset, Math.abs(pBoxListStepCalc) >= pBoxListWidth - pBoxWidth - 150 && (pBoxListStepCalc = -1 * (pBoxListWidth - pBoxWidth), btnRight.style.opacity = "0.4"), btnLeft.style.opacity = "1"), pBoxList.classList.add("runAnimationLeft"), pBoxList.style.left = pBoxListStepCalc + "px", setTimeout((function () { pBoxList.classList.remove("runAnimationLeft") }), 500) } } function quoteShredder(direction, quoteList) { var temp; if (!(quoteList.children.length < 25)) if ("right" == direction) for (var i = 0; i < 5; i++)temp = parseInt(window.getComputedStyle(quoteList).left, 10), temp += quoteList.children[1].offsetWidth, quoteList.removeChild(quoteList.children[0]), quoteList.style.left = temp + "px"; else for (i = 0; i < 5; i++)temp = quoteList.children, quoteList.removeChild(temp[temp.length - 1]) } !function () { var vp = getQ(); window.addEventListener("resize", (function () { var photoSliderList = document.querySelectorAll(".psBlock>div"), rightArrows = document.querySelectorAll(".psArRight"), leftArrows = document.querySelectorAll(".psArLeft"); if (photoSliderList.length > 0 && vp != getQ()) { vp = getQ(); for (var i = 0; i < photoSliderList.length; i++)photoSliderList[i].style.left = "0px"; for (i = 0; i < rightArrows.length; i++)rightArrows[i].style.opacity = "1", leftArrows[i].style.opacity = "0.4" } })) }(); var now_queuelist = !0; function quoteSlider(direction, target) { if (void 0 === target) { var e = event || window.event; target = e && e.target || event.scrElement } if (0 != now_queuelist) { now_queuelist = !1; var blockId, quoteWrap = document.querySelector(".v31__quoBlock"), quoteList = document.querySelector(".v31__quoBlock > div"), quoteListItemWidth = quoteList.children[1].offsetWidth, quoteListOffset = Math.abs(parseInt(window.getComputedStyle(quoteList).left, 10)), btnLeft = document.querySelector(".v31__quotelist .psArLeft"), btnRight = document.querySelector(".v31__quotelist .psArRight"); "right" == direction && quoteList.offsetWidth - (quoteListOffset + quoteWrap.offsetWidth + 200) < quoteWrap.offsetWidth ? (blockId = document.querySelector(".v31__quotelist .v31__quoBlock>div>div:last-child").getAttribute("data-id"), nanoajax.ajax({ url: "/quotes/", method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" }, body: "id=" + blockId + "&a=right" }, (function (code, responseText, request) { code >= 200 && code < 400 && "none" != responseText ? (quoteList.insertAdjacentHTML("beforeend", responseText), setQuoteClick(), setTimeout((function () { quoteShredder(direction, quoteList) }), 600), btnRight.classList.add("iShow")) : btnRight.classList.remove("iShow"), photoSlider("right", ".v31__quotelist", ".v31__quoBlock", target) }))) : "right" == direction ? photoSlider("right", ".v31__quotelist", ".v31__quoBlock", target) : "left" == direction && quoteListOffset < quoteWrap.offsetWidth + 200 ? (blockId = document.querySelector(".v31__quotelist .v31__quoBlock>div>div:first-child").getAttribute("data-id"), nanoajax.ajax({ url: "/quotes/", method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" }, body: "id=" + blockId + "&a=left" }, (function (code, responseText, request) { code >= 200 && code < 400 && "none" != responseText ? (quoteList.style.left = -1 * quoteListOffset - 5 * quoteListItemWidth + "px", quoteList.insertAdjacentHTML("afterbegin", responseText), setQuoteClick(), quoteShredder(direction, quoteList), btnLeft.classList.add("iShow")) : btnLeft.classList.remove("iShow"), photoSlider("left", ".v31__quotelist", ".v31__quoBlock", target) }))) : "left" == direction && photoSlider("left", ".v31__quotelist", ".v31__quoBlock", target), setTimeout((function () { now_queuelist = !0 }), 600) } } function getQuotes() { var blockId = document.querySelector(".v31__quoBlock>div>div:last-child").getAttribute("data-id"); nanoajax.ajax({ url: "/quotes/", method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" }, body: "id=" + blockId + "&a=right" }, (function (code, responseText, request) { code >= 200 && code < 400 && "none" != responseText ? (document.querySelector(".v31__quotelist > div > div").insertAdjacentHTML("beforeend", responseText), setQuoteClick()) : document.querySelector(".v31__qmore").style.display = "none" })) } function setQuoteClick() { if (document.querySelector(".v31__quotelist")) for (var temp = document.querySelectorAll(".v31__quotelist .v31__quote_show"), i = 0; i < temp.length; i++)temp[i].addEventListener("click", (function (e) { this.parents(".v31__squote")[0] && (this.parents(".v31__squote")[0].classList.add("v31__quote"), this.parents(".v31__squote")[0].classList.remove("v31__squote")) })) } function webRReloader(nodes) { if (nodes) { var list__webr = []; if (void 0 !== nodes.length ? nodes.length > 1 ? nodes[nodes.length - 1] && nodes[nodes.length - 1].querySelectorAll && (list__webr = nodes[nodes.length - 1].querySelectorAll("[data-type=webrwrap]")) : 1 == nodes.length ? nodes[0] && nodes[0].querySelectorAll && (list__webr = nodes[0].querySelectorAll("[data-type=webrwrap]")) : nodes.querySelectorAll && (list__webr = nodes.querySelectorAll("[data-type=webrwrap]")) : nodes.querySelectorAll && (list__webr = nodes.querySelectorAll("[data-type=webrwrap]")), list__webr && list__webr.length) for (var i = 0; i < list__webr.length; i++) { var wrap = list__webr[i]; if (wrap && (0 == wrap.innerHTML.length && void 0 !== window.Ya && window.Ya && window.Ya.adfoxCode && "function" == typeof window.Ya.adfoxCode.reload)) try { var wrapId = wrap.getAttribute("id"); wrapId && window.Ya.adfoxCode.reload(wrapId) } catch (ex) { } } } } function getQ() { var ww, ww_el = document.querySelectorAll("main > div"), result = 1280; return (ww = ww_el.length > 0 ? ww_el[0].offsetWidth : document.querySelector("body > div").offsetWidth) < 760 ? result = 320 : 760 == ww ? result = 768 : 1e3 == ww && (result = 1024), result } function smartMenu(add) { var el__toplinks = document.querySelector(".toplinks"), el__smartmenu = document.querySelector("#smartMenuLink"); if (el__toplinks) { if (add && el__smartmenu && document.addEventListener) return void document.addEventListener("click", (function (event) { var isCl
6ickOnMenu = el__toplinks.contains(event.target), isClickOnButton = el__smartmenu.contains(event.target); 0 == isClickOnMenu && 0 == isClickOnButton && (el__toplinks.classList.remove("inline__block"), el__smartmenu.classList.remove("hbut__menushow")) })); el__toplinks.classList.contains("inline__block") ? (el__toplinks.classList.remove("inline__block"), el__smartmenu.classList.remove("hbut__menushow")) : (el__toplinks.classList.add("inline__block"), el__smartmenu.classList.add("hbut__menushow")) } } setQuoteClick(), function () { if (document.addEventListener) { if (document.querySelectorAll(".quotes__wrap-sch").length > 0) { for (var schQList = document.querySelectorAll(".quotes__wrap-sch .v31__quote_show"), i = 0; i < schQList.length; i++)schQList[i].addEventListener("click", (function (e) { this.parents(".v31__quote-sch")[0].classList.add("v31__quote"), this.parents(".v31__quote-sch")[0].classList.remove("v31__quote-sch") })); var flag__quotes__wrap = !0; window.addEventListener("resize", (function () { if (getQ() > 700 && !0 === flag__quotes__wrap) { for (var list__quotes = document.querySelectorAll(".quotes__wrap-sch .v31__quote"), i = 0; i < list__quotes.length; i++)list__quotes[i].classList.remove("v31__quote"), list__quotes[i].classList.add("v31__quote-sch"); flag__quotes__wrap = !1 } else getQ() <= 700 && !1 === flag__quotes__wrap && (flag__quotes__wrap = !0) })) } if (document.querySelectorAll(".v31__quoBlock").length > 0) { var flag__v31__quoBlock = !0, v31__quoBlock_vp = getQ(), v31__quoBlock_slider = document.querySelector(".v31__quoBlock > div"); window.addEventListener("resize", (function () { if (getQ() > 700 && !0 === flag__v31__quoBlock) { for (var list__quotes = document.querySelectorAll(".v31__quoBlock .v31__quote"), i = 0; i < list__quotes.length; i++)list__quotes[i].classList.remove("v31__quote"), list__quotes[i].classList.add("v31__squote"); flag__v31__quoBlock = !1 } else getQ() <= 700 && !1 === flag__v31__quoBlock && (flag__v31__quoBlock = !0); getQ() != v31__quoBlock_vp && (v31__quoBlock_vp = getQ(), v31__quoBlock_slider.style.left = "0px") })) } } }(), smartMenu(!0), window.addEventListener && document.querySelectorAll(".sPageForm").length > 0 && window.addEventListener("click", (function (event) { var el__searchmenu = document.querySelector(".sPageForm .sec_all"), el__searchmenubut = document.querySelector(".sPageForm .sec_list"), isClickOnMenu = el__searchmenu.contains(event.target), isClickOnMenubut = el__searchmenubut.contains(event.target); 0 == isClickOnMenu && 0 == isClickOnMenubut && el__searchmenu.classList.remove("sec_show") })), function () { var mobileHeaderAdvertClass = "mobile_header_with_ad"; function updateMobileHeaderAdvertState() { if (document.body) { var shouldUseAdvertHeader = window.innerWidth < 760 && !!document.querySelector("header .toplogo__advertisement-wrap .toplogo__advertisement-mobile"); document.body.classList.toggle(mobileHeaderAdvertClass, shouldUseAdvertHeader) } } function watchMobileHeaderAdvert() { var toplogoElement = document.querySelector("header .toplogo"); toplogoElement && window.MutationObserver && new MutationObserver((function () { updateMobileHeaderAdvertState() })).observe(toplogoElement, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["class"] }) } "loading" === document.readyState ? document.addEventListener("DOMContentLoaded", (function () { updateMobileHeaderAdvertState(), watchMobileHeaderAdvert() })) : (updateMobileHeaderAdvertState(), watchMobileHeaderAdvert()), window.addEventListener && (window.addEventListener("resize", updateMobileHeaderAdvertState), window.addEventListener("orientationchange", updateMobileHeaderAdvertState)) }(), function () { var headerElement = document.querySelector("header"), headerOffset = 0, isHeaderFixed = !1, isTicking = !1, scheduleFrame = window.requestAnimationFrame || function (callback) { setTimeout(callback, 16) }; function updateHeaderStickyState() { if (document.body && headerElement) { isHeaderFixed || (headerOffset = headerElement.offsetTop); var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, startFixing = (window.innerWidth < 760 ? 50 : document.querySelectorAll(".rule__sp").length > 0 ? 140 : 197) + headerOffset, scrollBuffer = window.innerWidth < 760 ? 4 : 0; !isHeaderFixed && scrollTop > startFixing + scrollBuffer ? (document.body.classList.add("scrolled"), isHeaderFixed = !0) : isHeaderFixed && scrollTop < startFixing - scrollBuffer && (document.body.classList.remove("scrolled"), isHeaderFixed = !1) } } window.addEventListener && headerElement && (window.addEventListener("scroll", (function () { isTicking || (isTicking = !0, scheduleFrame((function () { updateHeaderStickyState(), isTicking = !1 }))) })), window.addEventListener("resize", updateHeaderStickyState), window.addEventListener("orientationchange", updateHeaderStickyState), updateHeaderStickyState()) }(), function () { setSwipe(".psnBlock .psBlock"), setSwipe(".psBig .psBlock"), setSwipe(".v31__quotelist .v31__quoBlock"); var vk_post = document.querySelectorAll("div[id*='vk_post_'][data-id2]"); if (vk_post.length > 0) for (var i = 0; i < vk_post.length; i++) { var script = document.createElement("script"); script.innerText = "(function() { if (!window.VK || !VK.Widgets || !VK.Widgets.Post || !VK.Widgets.Post('" + vk_post[i].getAttribute("id") + "', " + vk_post[i].getAttribute("data-id2") + ", " + vk_post[i].getAttribute("data-id3") + ", '" + vk_post[i].getAttribute("data-id4") + "', {width: 500})) setTimeout(arguments.callee, 50); }());", vk_post[i].insertAdjacentElement("beforeend", script) } document.getElementById("sec_all") && (document.getElementById("sec_all").style.display = "none"), document.querySelector(".select") && (document.querySelector(".select").style.display = "inline-block");
6 var fqSend = document.querySelectorAll(".faqSend>div"); if (fqSend.length > 0 && document.addEventListener) for (i = 0; i < fqSend.length; i++)fqSend[i].addEventListener("click", (function () { this.parentNode.classList.toggle("faqSendOpen") })); window.NodeList && !NodeList.prototype.forEach && (NodeList.prototype.forEach = Array.prototype.forEach); var secList = document.querySelector(".sec_list"), secAll = document.querySelector(".sec_all"), secAllLi = document.querySelectorAll("ul.sec_all li"); if (secList && document.addEventListener && secList.addEventListener("click", (function () { secAll.classList.toggle("sec_show") })), secAllLi.length > 0 && document.addEventListener) for (i = 0; i < secAllLi.length; i++)secAllLi[i].addEventListener("click", (function () { secAll.classList.remove("sec_show"), document.querySelector(".sec_list span").innerText = this.innerText; var secSelected = document.querySelector("#sec_all option[selected]"); secSelected && secSelected.removeAttribute("selected"), document.querySelector('#sec_all [value="' + this.getAttribute("value") + '"]').setAttribute("selected", "selected") })) }(); var curMonth = "none", curYear = "none"; function createCalendar(top, left, formid, year, month, day, search) { var dateNow = new Date; year = void 0 === year ? dateNow.getFullYear() : year, month = void 0 === month ? dateNow.getMonth() : month, day = void 0 === day ? dateNow.getDate() : day; var weekDay = ["пн", "вт", "ср", "чт", "пт", "сб", "вс"]; search ? (curMonth = month, curYear = year) : ("none" == curMonth && (curMonth = month), "none" == curYear && (curYear = year)); var monthName = ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], date = new Date(year, month), dayCount = new Date(year, month + 1, 0).getDate(), dayNum = 1 - (0 == date.getDay() ? 7 : date.getDay()), parent = document.getElementById("dp_cal"); parent.innerHTML = ""; var table = document.createElement("table"); table.className = "datepick", table.setAttribute("onselectstart", "return false"); var div = document.createElement("div"); div.className = "dp_main", div.id = "dp_main", div.setAttribute("onmouseout", 'window.timer = setTimeout("closeCalendar()",300)'), div.setAttribute("onmousemove", "if(window.timer){clearTimeout(window.timer)}"), window.timer && clearTimeout(window.timer); var tr = document.createElement("tr"), button = document.createElement("span"); button.className = "leftBut", button.setAttribute("onclick", "createCalendar(" + top + ", " + left + ", '" + formid + "'," + year + ", " + (month - 1) + "," + day + ")"), (elem = document.createElement("th")).appendChild(button), tr.appendChild(elem); var monthCont = document.createElement("label"); monthCont.className = "selectMonth", monthCont.setAttribute("onclick", "toggleCalendarDateMenu(0)"); var monthChecker = document.createElement("input"); monthChecker.setAttribute("type", "checkbox"), monthChecker.style.display = "none", monthChecker.id = "monthChecker"; for (var monthMenu = document.createElement("div"), i = 0; i < 12; i++) { var monthOpt = document.createElement("span"); i == date.getMonth() && (monthCont.appendChild(document.createTextNode(monthName[i])), monthOpt.setAttribute("class", "sel")), "from" == formid || "to" == formid ? monthOpt.setAttribute("onclick", "pickThis(1," + (i + 1) + "," + year + ',"' + formid + '");createCalendar(' + top + ", " + left + ', "' + formid + '",' + year + ", " + i + "," + day + ");toggleCalendarDateMenu(0)") : monthOpt.setAttribute("onclick", "createCalendar(" + top + ", " + left + ', "' + formid + '",' + year + ", " + i + "," + day + ");toggleCalendarDateMenu(0)"), monthOpt.appendChild(document.createTextNode(monthName[i])), monthMenu.appendChild(monthOpt) } monthCont.appendChild(monthMenu); var yearCont = document.createElement("label"); yearCont.className = "selectYear", yearCont.setAttribute("onclick", "toggleCalendarDateMenu(true)"); var elem, yearChecker = document.createElement("input"); yearChecker.setAttribute("type", "checkbox"), yearChecker.style.display = "none", yearChecker.id = "yearChecker"; var yearMenu = document.createElement("div"); for (i = dateNow.getFullYear(); i >= 2008; i--) { var yearOpt = document.createElement("span"); i == date.getFullYear() && (yearCont.appendChild(document.createTextNode(i)), yearOpt.setAttribute("class", "sel")), "from" == formid || "to" == formid ? yearOpt.setAttribute("onclick", "pickThis(1," + (month + 1) + "," + i + ',"' + formid + '");createCalendar(' + top + ", " + left + ', "' + formid + '",' + i + ", " + month + "," + day + ");toggleCalendarDateMenu(true)") : yearOpt.setAttribute("onclick", "createCalendar(" + top + ", " + left + ', "' + formid + '",' + i + ", " + month + "," + day + ");toggleCalendarDateMenu(true)"), yearOpt.appendChild(document.createTextNode(i)), yearMenu.appendChild(yearOpt) } yearCont.appendChild(yearMenu), (elem = document.createElement("th")).setAttribute("colspan", "5"), elem.appendChild(monthChecker), elem.appendChild(monthCont), elem.appendChild(yearChecker), elem.appendChild(yearCont), tr.appendChild(elem), button = document.createElement("span"), date.getMonth() == dateNow.getMonth() && date.getFullYear() == dateNow.getFullYear() ? button.className = "rightButOff" : (button.className = "rightBut", button.setAttribute("onclick", "createCalendar(" + top + ", " + left + ', "' + formid + '",' + year + ", " + (month + 1) + "," + day + ")")), (elem = document.createElement("th")).appendChild(button), tr.appendChild(elem), table.appendChild(tr); for (var row = 0; dayNum < dayCount; row++) { tr = document.createElement("tr"); table.appendChild(tr); for (var col = 0; col < 7; col++)0 == row ? ((elem = document.createElement("th")).className = "wd", cell = weekDay[col]) : (dayNum++, elem = document.createElement("td"), dayNum <= dayCount ? (dayNum > dateNow.getDate() && dateNow.getMonth() == date.getMonth() && date.getFullYear() == dateNow.getFullYear() ? elem.className = "dateIn dateOut" : dayNum <= 0 ? elem.setAttribute("onclick", "pickThis(" + new Date(year, month, dayNum).getDate() + "," + date.getMonth() + "," + date.getFullYear() + ', "' + formid + '")') : (elem.className = dayNum == day && month 
6== curMonth && year == curYear ? "dateCur" : "dateIn", elem.setAttribute("onclick", "pickThis(" + dayNum + "," + (date.getMonth() + 1) + "," + date.getFullYear() + ', "' + formid + '")')), cell = dayNum) : dayNum > dayCount && date.getMonth() == dateNow.getMonth() && date.getFullYear() == dateNow.getFullYear() && (elem.className = "dateOut"), cell = new Date(year, month, dayNum).getDate()), elem.appendChild(document.createTextNode(cell)), tr.appendChild(elem) } div.appendChild(table), parent.appendChild(div), parent.style.top = top + "px", parent.style.left = left + "px", document.addEventListener && document.addEventListener("mouseup", (function (e) { (e && e.target || event.scrElement).parents("#dp_cal").length || closeCalendar() }), { once: !0 }) } function setLZ(x) { return x < 10 ? "0" + x : x } function closeCalendar() { document.getElementById("dp_cal").innerHTML = "" } function pickThis(d, m, y, id) { if ("history" == (id = (id || "").toLowerCase()) || "sport" == id) window.location = "/news/" + y + "/" + setLZ(m) + "/" + setLZ(d) + "/"; else if ("pressreleases" == id) window.location = "/pressreleases/" + y + "/" + setLZ(m) + "/" + setLZ(d) + "/"; else if ("russia" == id || "world" == id || "culture" == id || "business" == id || "moscow" == id || "digital" == id) window.location = "/" + id + "/news/" + y + "/" + setLZ(m) + "/" + setLZ(d) + "/"; else if ("from" == id || "to" == id) document.getElementById(id).value = setLZ(d) + "." + setLZ(m) + "." + y, closeCalendar(0); else { document.getElementById(id).value = setLZ(d) + "." + setLZ(m) + "." + y, closeCalendar() } } function openCalendar(top, left, id, year, month, day) { var date = new Array, now = new Date; if ("to" != (id = id || void 0) && "from" != id || "дд.мм.гггг" == document.getElementById(id).value) date[2] = null != year ? year : now.getFullYear(), date[1] = null != month ? month : now.getMonth() + 1, date[0] = null != day ? day : now.getDate(); else date = document.getElementById(id).value.split("."); createCalendar(top, left, id, date[2], date[1] - 1, date[0], !0) } function toggleCalendarDateMenu(type) { var monthChecker = document.querySelector("#monthChecker"), yearChecker = document.querySelector("#yearChecker"); type ? (yearChecker.checked = 1 != yearChecker.checked, monthChecker.checked = !1) : (monthChecker.checked = 1 != monthChecker.checked, yearChecker.checked = !1) } function schTabsMove(m, e) { document.querySelector("main").offsetWidth > 430 || ("right" == m ? (e.previousElementSibling.setAttribute("style", "left:auto;right:0;"), e.style.display = "none", e.parentNode.children[0].style.display = "block") : (e.nextElementSibling.setAttribute("style", "right:auto;left:0;"), e.style.display = "none", e.parentNode.children[2].style.display = "block")) } function Social(name, x, nw) { title = x.parents("[data-type='socialbar']")[0].getAttribute("data-title"), url = x.parents("[data-type='socialbar']")[0].getAttribute("data-url"); var ourl, sys_link = "?utm_source=mob%26utm_medium=cpc%26utm_campaign=mob", enTitle = title.replace(/%/g, "---P---"); enTitle = (enTitle = (enTitle = encodeURI(enTitle)).replace(/---P---/g, "%25")).replace(/&/g, "%26"); switch (name) { case "vk": ourl = "http://vk.com/share.php?url=" + url + "&title=" + enTitle; break; case "ok": ourl = "http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl=" + url + "&st.comments=" + enTitle; break; case "mx": ourl = "https://max.ru/:share?text=" + encodeURIComponent(title + "\n" + url + sys_link); break; case "tg": ourl = "tg://msg_url?url=" + encodeURIComponent(url + sys_link) + "&text=" + enTitle, console.log(ourl); break; case "em": ourl = "mailto:?to=&subject=" + enTitle + "&body=" + enTitle + "%0A" + url + sys_link }nw ? window.open(ourl, null, "status=no,location=no,toolbar=no,menubar=no,width=615,height=500,left=300,top=300") : window.location = ourl } function showMoreStories(x) { for (var storyLinks = document.querySelectorAll('a[style*="none"]'), i = 0; i < storyLinks.length; i++)storyLinks[i].removeAttribute("style"); x.parentNode.removeChild(x) } function serialize(form) { var field, l, s = []; if ("object" == typeof form && "FORM" == form.nodeName.toUpperCase()) for (var len = form.elements.length, i = 0; i < len; i++)if ((field = form.elements[i]).name && !field.disabled && "file" != field.type && "reset" != field.type && "submit" != field.type && "button" != field.type) if ("select-multiple" == field.type) { l = form.elements[i].options.length; for (var j = 0; j < l; j++)field.options[j].selected && (s[s.length] = encodeURIComponent(field.name) + "=" + encodeURIComponent(field.options[j].value)) } else ("checkbox" != field.type && "radio" != field.type || field.checked) && (s[s.length] = encodeURIComponent(field.name) + "=" + encodeURIComponent(field.value)); return s.join("&").replace(/%20/g, "+") } function simpleFormChecker(form_el, status_el) { for (var inputs = document.querySelectorAll(form_el 
6+ " [data-check=true]"), mess = "Вы не заполнили следующие обязательные поля: \n\n", nextstep = !0, i = (status_el = status_el || form_el, 0); i < inputs.length; i++)inputs[i].value.length < 3 && (mess += "- " + inputs[i].getAttribute("placeholder") + "\n", nextstep = !1); if (".form__accreditation" == form_el) { var select_el = document.querySelector(".list__pc>select"); ("none" == select_el.value || "other" == select_el.value && document.querySelector("input[name=industryother]").value.length < 3) && (mess += "- Отрасль\n", nextstep = !1) } document.querySelectorAll(form_el + " [name=agree]").length > 0 && !document.querySelector(form_el + " [name=agree]").checked && (mess += "- Необходимо согласие на обработку персональных данных\n", nextstep = !1); let action_handler = document.querySelector(form_el + " [name=requesttype]").value; if (("undefined" == action_handler || action_handler.length < 3) && (mess += "- Не указан адрес обращения\n", nextstep = !1), nextstep) { var all_inputs = serialize(document.querySelector(form_el)); nanoajax.ajax({ url: "/sendrequest/" + action_handler, method: "POST", responseType: "text", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" }, body: all_inputs }, (function (code, data, request) { try { data = JSON.parse(data) } catch (e) { return void alert("Ошибка при получении ответа от сервера. Попробуйте повторить позже.\n\r" + e) } 200 == code ? 500 == data.status || 422 == data.status ? alert(data.message) : document.querySelector(status_el).innerHTML = "<span class='title' style='text-transform:none;'>" + data.message + "</span>" : alert(data.message) })) } else alert(mess) } function setVPort() { var body = document.querySelector("body"); document.documentElement.clientWidth > document.documentElement.clientHeight ? (body.classList.remove("portrait"), body.classList.add("landscape")) : (body.classList.remove("landscape"), body.classList.add("portrait")) } function checkAndHideInlineAd(adWrap) { if (adWrap) var tries = 0, timer = setInterval((function () { if (tries++, adWrap.querySelector("iframe") || adWrap.querySelector("img") || adWrap.querySelector("yatag") || adWrap.querySelector('[id^="yandex_rtb"]') || adWrap.querySelector('[id^="adfox_"] iframe')) return adWrap.style.display = "", void clearInterval(timer); tries >= 10 && (adWrap.style.display = "none", clearInterval(timer)) }), 300) } function ads__ban_inline(nxtStep) { if (!document.querySelector(".spOnline")) { nxtStep = nxtStep > 0 ? nxtStep : 0; var article = document.querySelector("main > .mainblock:first-of-type .leftside article"); if (article) { var paragraphs = Array.prototype.slice.call(article.querySelectorAll(":scope > p")); if (paragraphs.length) { var ads__ban_inline_hide = article.querySelector(".ads__ban_inline_hide") || document.querySelector(".ads__ban_inline_hide"); if (ads__ban_inline_hide) { var at__fulltext = 0; if (paragraphs.forEach((function (el) { at__fulltext += el.innerText.length })), !(at__fulltext < 900)) { var at__middle = at__fulltext / 2, at__current = 0, at__findet = !0; nxtStep < 5 && ads__ban_inline_hide.querySelector("div") && ads__ban_inline_hide.querySelector("div").innerHTML.length < 30 && ads__ban_inline_hide.querySelectorAll("script").length > 0 ? setTimeout((function () { ads__ban_inline(++nxtStep) }), 1e3) : paragraphs.forEach((function (el) { if ((at__current += el.innerText.length) >= at__middle && at__findet) { at__findet = !1, ads__ban_inline_hide.querySelectorAll("script").length > 0 && ads__ban_inline_hide.querySelectorAll("div").forEach((function (el) { el.innerHTML = " " })); var at__html = ads__ban_inline_hide.innerHTML; ads__ban_inline_hide.parentNode.removeChild(ads__ban_inline_hide); var at__html_wrap = document.createElement("div"); at__html_wrap.innerHTML = at__html, at__html_wrap.className = "ads__ban_inline", el.innerText.length > 150 ? checkTagname(getSibling(el, "prev"), "p") && getSibling(el, "prev") && getSibling(el, "prev").innerText.length > 150 && el.parentNode.querySelector("p").innerText != (getSibling(el, "prev") && getSibling(el, "prev").innerText) || checkTagname(getSibling(el, "prev"), "p") && checkTagname(getSibling(el, "prev", 2), "p") && (getSibling(el, "prev") && getSibling(el, "prev").innerText.length) <= 150 ? (el.insertAdjacentElement("beforebegin", at__html_wrap), nodeScriptReplace(at__html_wrap), checkAndHideInlineAd(at__html_wrap)) : (checkTagname(getSibling(el, "next"), "h2") || checkTagname(getSibling(el, "next"), "p") && (getSibling(el, "next") && getSibling(el, "next").innerText.length) > 150 || checkTagname(getSibling(el, "next"), "p") && checkTagname(getSibling(el, "next", 2), "p") && (getSibling(el, "next") && getSibling(el, "next").innerText.length) <= 150) && (el.insertAdjacentElement("afterend", at__html_wrap), nodeScriptReplace(at__html_wrap), checkAndHideInlineAd(at__html_wrap)) : (checkTagname(getSibling(el, "prev"), "p") && getSibling(el, "prev") && getSibling(el, "prev").innerText.length > 150 && el.parentNode.querySelector("p").innerText != (getSibling(el, "prev") && getSibling(el, "prev").innerText) || checkTagname(getSibling(el, "prev"), "p") && checkTagname(getSibling(el, "prev", 2), "p") && getSibling(el, "prev") && getSibling(el, "prev").innerText.length <= 150) && (checkTagname(getSibling(el, "next"), "h2") || checkTagname(getSibling(el, "next"), "p")) ? (el.insertAdjacentElement("beforebegin", at__html_wrap), nodeScriptReplace(at__html_wrap), checkAndHideInlineAd(at__html_wrap)) : (checkTagname(getSibling(el, "next"), "h2") || checkTagname(getSibling(el, "next"), "p") && getSibling(el, "next") && getSibling(el, "next").innerText.length > 150 || checkTagname(getSibling(el, "next"), "p") && getSibling(el, "next", 2) && checkTagname(getSibling(el, "next", 2), "p") && getSibling(el, "next") && getSibling(el, "next").innerText.length <= 150) && checkTagname(getSibling(el, "prev"), "p") && (el.insertAdjacentElement("afterend", at__html_wrap), nodeScriptReplace(at__html_wrap), checkAndHideInlineAd(at__html_wrap)) } })) } } } } } } function checkTagname(el, name) { return !(!el || el.tagName.toLowerCase() != name.toLowerCase()) } function getSibling(el, dir, x) { x = void 0 === x ? 1 : x; for (var i = 0; i < x && (el = "prev" == dir ? el.previousElementSibling : el.nextElementSibling); i++); return el } !function () { if (document.addEventListener) { var popupImgs = document.querySelectorAll(".show_popup_img"); if (0 == popupImgs.length) return; for (var i = 0; i < popupImgs.length; i++)popupImgs[i].addEventListener("click", (function () { var docBody = document.querySelector("body"), documentHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight), popupImgPos = window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop, popupImgSource = this.cloneNode(!1); popupImgSource.removeAttribute("width"), popupImgSource.removeAttribute("height"), docBody.insertAdjacentHTML("beforeend", '<div class="popupImageBackgroun
6d"><div class="popupImageTable"><div class="popupImageTd"><div class="popupImageInline"></div></div></div></div>'); var popupImageBackground = document.querySelector(".popupImageBackground"), popupImageTable = document.querySelector(".popupImageTable"); popupImageBackground.style.height = documentHeight + "px", popupImageTable.style.top = popupImgPos + 100 + "px", document.querySelector(".popupImageInline").appendChild(popupImgSource), popupImageBackground.addEventListener("click", (function () { popupImageBackground.parentNode.removeChild(popupImageBackground), popupImageTable.parentNode.removeChild(popupImageTable) })) })) } }(), window.onresize = function () { setVPort() }, setVPort(); var getScrollDirectionTimeout, onlineUpdateContent = ""; function checkOnlineUpdate(id) { setInterval((function () { var spOnlineLastBlock = document.querySelector('.spOnline > div:not([data-content="webR"]):first-child'); if (spOnlineLastBlock) { var online_last_id = spOnlineLastBlock.getAttribute("id"); nanoajax.ajax({ url: "/chronicleeventchecker.asp", responseType: "text", body: "r=" + online_last_id + "&n=" + id }, (function (code, data, request) { if ("delete" == data) return void spOnlineLastBlock.remove(); let spOnlineBlockTop = spOnlineLastBlock.getBoundingClientRect().top, isLastEventVisible = spOnlineBlockTop > 80 && spOnlineBlockTop < window.innerHeight, tempWrap = document.createElement("div"); if (tempWrap.innerHTML = data, tempWrap.children[0].hasAttribute("id")) { for (let i = 0; i < tempWrap.children.length; i++) { let itemId = tempWrap.children[i].getAttribute("id"), itemInDoc = document.querySelector('.spOnline > [id="' + itemId + '"]'); itemInDoc ? (comparOnlineBlocks(itemInDoc, tempWrap.children[i]), tempWrap.children[i].setAttribute("data-remove", "true")) : tempWrap.children[i].className = "spOnline-item spOnline-item-new" } tempWrap.querySelectorAll('[data-remove="true"]').forEach((item => { item.remove() })), onlineUpdateContent = tempWrap.innerHTML, !document.querySelector('[data-id="online_updater"]') && tempWrap.children.length > 0 && (!isLastEventVisible && onlineUpdateContent.length > 10 ? document.querySelector("body").insertAdjacentHTML("beforeend", '<div data-id="online_updater"><div><div onclick="addOnlineUpdate(true);">Появилось обновление</div></div></div>') : addOnlineUpdate(!1)) } })) } }), 5e3) } function comparOnlineBlocks(docBlock, serverBlock) { let docBlockText = ""; docBlock.querySelectorAll("div:nth-child(3) > p").forEach(((item, i) => { docBlockText += item.innerText })); let docBlockScripts = docBlock.querySelectorAll(".wg_script_block").length, serverBlockText = ""; serverBlock.querySelectorAll("div:nth-child(3) > p").forEach(((item, i) => { serverBlockText += item.innerText })); let serverBlockScripts = serverBlock.querySelectorAll(".wg_script_block").length; docBlockText.trim() == serverBlockText.trim() && docBlockScripts == serverBlockScripts || (docBlock.innerHTML = serverBlock.innerHTML, nodeScriptReplace(docBlock)) } function addOnlineUpdate(autoScroll) { let updateButton = document.querySelector('[data-id="online_updater"]'); if (updateButton && updateButton.remove(), onlineUpdateContent.length < 10) return; const spOnline = document.querySelector(".spOnline"), spOnlineBlock = document.querySelector(".spOnline > div:first-child"); autoScroll && spOnlineBlock.scrollIntoView({ behavior: "smooth", block: "center" }), setTimeout((function () { spOnline.insertAdjacentHTML("afterbegin", onlineUpdateContent), newItems = spOnline.querySelectorAll(".spOnline-item-new"); var page_title = document.querySelector("title").innerText, page_url = window.location.href; updateCounters(page_title, page_url, page_url, !1), newItems.forEach(((item, i) => { nodeScriptReplace(item) })), setTimeout((function () { newItems.forEach(((item, i) => { item.classList.remove("spOnline-item-new") })) }), 100), onlineUpdateContent = "" }), 200); let bannerId = 320 == getQ() ? "adfox_online-center_mobile" : "adfox_online-center_desktop"; window.Ya.adfoxCode.reload(bannerId) } function updateCounters(page_title, page_url, page_referrer, social) { document.title = page_title; var counters_block = document.querySelector(".counters__block > div"); if (counters_block) { counters_block.innerHTML = ""; var img_tns = new Image; img_tns.src = "//www.tns-counter.ru/V13a***R>" + page_referrer.replace(/\*/g, "%2a") + "*finmarket_ru/ru/CP1251/tmsec=interfax_total/", counters_block.appendChild(img_tns), window.mscounterCallbacks = window.mscounterCallbacks || [], window.mscounterCallbacks.push((() =>
6 { msCounterExampleCom = new MSCounter.counter({ account: "interfax_ru", tmsec: "interfax", autohit: !0 }) })); var img_li = new Image; img_li.src = "//counter.yadro.ru/hit;interfax?r" + escape(page_referrer) + ("undefined" == typeof screen ? "" : ";s" + screen.width + "*" + screen.height + "*" + (screen.colorDepth ? screen.colorDepth : screen.pixelDepth)) + ";u" + escape(page_url) + ";h" + escape(page_title.substring(0, 80)) + ";" + Math.random(), counters_block.appendChild(img_li); var img_cntimg = document.createElement("IMG"), m = new RegExp("(http(s)?\\:\\/\\/)?([\\.\\-_0-9A-Za-z]{1,})(.*)").exec(page_referrer); img_cntimg.src = "/cnt/" + encodeURI(m[3]).replace(/'/g, "%27") + "?" + encodeURI(m[4]).replace(/'/g, "%27"), counters_block.appendChild(img_cntimg) } try { ym(22006243, "hit", page_url, { title: page_title, referer: page_referrer }) } catch (e) { console.error(e) } if (social) { var social_schare = document.querySelector(".header__soc"); social_schare.setAttribute("data-title", page_title), social_schare.setAttribute("data-url", page_url) } } function reloadPageAndGo(gt) { var url = window.location.href.split("#")[0].split("?")[0] + "?" + Math.random() + gt; location.href = url } function Search_SetAction(form) { 1449 != form.sec.value && (form.action = "http://www.interfax.ru/search/") } function getScrollDirection(y) { var result = "down"; window.pageYOffset < y && (result = "up"), Math.abs(window.pageYOffset - y) > 20 && document.querySelector("body").setAttribute("data-scroll", result) } function scrollListener() { if (null == getScrollDirectionTimeout) { var scrollDefault = window.pageYOffset; getScrollDirectionTimeout = setTimeout((function () { getScrollDirection(scrollDefault), getScrollDirectionTimeout = void 0 }), 200) } } window.addEventListener && window.addEventListener("scroll", (function () { scrollListener() })); var photoInFocus, isReadyToGet = !0, isHistoryMove = !1, photoboxNum = 2, counterCanUpdate = !1; function scrollPhotobox() { var photobox = document.querySelector(".photobox"), all_photos = document.querySelectorAll(".photobox figure"), photo_last = all_photos[all_photos.length - 1], vp_height = document.documentElement.clientHeight, vp_width = document.documentElement.clientWidth, vp_ratio = Math.ceil(vp_width / vp_height), vp_fix = Math.min(3, Math.max(2, vp_ratio)), photo_y = photo_last.getBoundingClientRect().top, story_id = photo_last.getAttribute("data-story"), excluded_photo_id = photo_last.getAttribute("data-exclude"), photo_order = photo_last.getAttribute("data-order"); isReadyToGet && photo_y < vp_height && 0 == document.querySelectorAll(".photobox .photo__more").length && (isReadyToGet = !1, nanoajax.ajax({ url: "/photo/" + story_id + "/?handler=more&order=" + photo_order + "&ex=" + excluded_photo_id + "&num=" + photoboxNum, method: "GET", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" } }, (function (code, responseText, request) { if (code >= 200 && code < 400) { for (var el_list = getElementsList(responseText), i = 0; i < el_list.length; i++)photobox.insertAdjacentElement("beforeend", el_list[i]); var webr_list = document.querySelectorAll("#adfox_preid"); for (i = 0; i < webr_list.length; i++)nodeScriptReplace(webr_list[i].parentElement); var figures = photobox.querySelectorAll("figure"); figures[figures.length - 1].classList.add("fade-in"), isReadyToGet = !0, photoboxNum++ } else setTimeout(scrollPhotobox, 2e3) }))); for (var i = 0; i < all_photos.length; i++)if (all_photos[i].getBoundingClientRect().top < vp_height / vp_fix + 50 && all_photos[i].getBoundingClientRect().top > 50 * vp_fix && all_photos[i] !== photoInFocus) { photoInFocus = all_photos[i]; var page_referrer = window.location.href, page_url = photoInFocus.querySelector('[itemprop="url"]').getAttribute("href"), page_title = photoInFocus.querySelector('[itemprop="name"]').getAttribute("content"), page_thumbnail = photoInFocus.querySelector('[itemprop="thumbnail"]').getAttribute("href"), page_description = photoInFocus.querySelectorAll(".desc").length > 0 ? photoInFocus.querySelector(".desc").textContent : ""; if (!1 === isHistoryMove && history.replaceState) try { history.replaceState({}, page_title, page_url) } catch (e) { console.error(e) } !0 === counterCanUpdate ? (updateCounters(page_title, page_url, page_referrer, !0), "function" == typeof window.sendAudiencePageView && window.sendAudiencePageView(page_referrer)) : counterCanUpdate = !0, document.querySelector('[property="og:url"]').setAttribute("content", page_url), document.querySelector('[property="og:title"]').setAttribute("content", page_title), document.querySelector('[property="og:image"]').setAttribute("content", page_thumbnail), document.querySelector('[property="og:description"]').setAttribute("content", page_description), document.querySelector('[name="twitter:url"]').setAttribute("content", page_url), document.querySelector('[name="twitter:title"]').setAttribute("content", page_title), document.querySelector('[name="twitter:image"]').setAttribute("content", page_thumbnail), document.querySelector('[name="twitter:description"]').setAttribute("content", page_description); break } } function showMeMoreImgs(el) { nanoajax.ajax({ url: "/photo/" + el.getAttribute("data-story") + "/?handler=next&photo=" + el.getAttribute("data-photo") + "&num=" + photoboxNum, method: "GET", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" } }, (function (code, responseText, request) { if (code >= 200 && code < 400) { for (var el_list = getElementsList(responseText), i = 0; i < el_list.length; i++)el.parentNode.insertAdjacentElement("beforeend", el_list[i]); var webr_list = document.querySelectorAll("#adfox_preid"); for (i = 0; i < webr_list.length; i++)nodeScriptReplace(webr_list[i].parentElement); var figures = el.parentNode.querySelectorAll("figure"); figures[figures.length - 1].classList.add("fade-in"), el.parentNode.removeChild(el), isReadyToGet = !0, photoboxNum++ } })) } document.querySelectorAll(".photobox").length > 0 && (document.addEventListener ? document.addEventListener("scroll", (function () { scrollPhotobox() })) : window.onscroll = function () { scrollPhotobox() }, scrollPhotobox()); var timelineLoading = !1; function getMoreTimeline() { if (!timelineLoading) { timelineLoading = !0; var timeline = getQ() > 900 ? "mainblock" : "timeline"; ("txtind_1513" === (document.body.getAttribute("data-pagetype") || "").toLowerCase() || /\/digital\/?$/i.test(location.pathname)) && (timeline = "t
6imeline"); var moreBtn = document.querySelector(".timeline__btnsgroup .timeline__more"); moreBtn && (moreBtn.disabled = !0, moreBtn.classList.add("is-loading")); var timetags = document.querySelectorAll(".timeline time[datetime]"); if (timetags.length) { var lastnews_datetime = timetags[timetags.length - 1].getAttribute("datetime"); if (lastnews_datetime) { var requestString = timeline + "/" + lastnews_datetime; nanoajax.ajax({ url: requestString, method: "GET", responseType: "" }, (function (code, responseText, request) { try { if (code < 200 || code >= 400) return void removeOnlyMoreButton(); var el__fortest = document.createElement("div"); if (el__fortest.innerHTML = responseText, el__fortest.querySelector(".nothing")) return void removeOnlyMoreButton(); if (0 == el__fortest.querySelectorAll("div").length) return void removeOnlyMoreButton(); if ("mainblock" == timeline) { var elForInsert = el__fortest.querySelector(".mainblock"); if (!elForInsert) return void removeOnlyMoreButton(); var list__mainblock = document.querySelectorAll("main > .mainblock"); if (!list__mainblock.length) return void removeOnlyMoreButton();
6 var el__timelinebtns = document.querySelector(".timeline__btnsgroup"); el__timelinebtns && el__timelinebtns.parentElement && el__timelinebtns.parentElement.removeChild(el__timelinebtns), list__mainblock[list__mainblock.length - 1].insertAdjacentElement("afterend", elForInsert), safeNodeScriptReplace((list__mainblock = document.querySelectorAll("main > .mainblock"))[list__mainblock.length - 1]), safeWebRReloader(list__mainblock), isIPad() && list__mainblock[list__mainblock.length - 1].classList.add("pagecolumn") } else { var el__wrap = document.createElement("div"), el__wrapInner = document.createElement("div"); el__wrapInner.className = "timeline", el__wrapInner.innerHTML = responseText, el__wrap.appendChild(el__wrapInner); var elsForInsert = el__wrap.querySelectorAll(".timeline > div"), timelineEl = document.querySelector("main .timeline"); if (!timelineEl) return void finish(); if (!elsForInsert.length) return void removeOnlyMoreButton(); for (var timelineWebRBefore = document.querySelectorAll(".timeline [data-content=webR]"), i = 0; i < elsForInsert.length; i++)timelineEl.insertAdjacentElement("beforeend", elsForInsert[i]); for (var timelineWebRAfter = document.querySelectorAll(".timeline [data-content=webR]"), j = 0; j < timelineWebRAfter.length; j++)timelineWebRBefore[j] != timelineWebRAfter[j] && (safeNodeScriptReplace(timelineWebRAfter[j]), safeWebRReloader(timelineWebRAfter[j])) } } finally { finish() } })) } else finish() } else finish() } function finish() { timelineLoading = !1, moreBtn && (moreBtn.disabled = !1, moreBtn.classList.remove("is-loading")) } function removeOnlyMoreButton() { var btn = document.querySelector(".timeline__bt
6nsgroup .timeline__more"); btn && btn.parentNode && btn.parentNode.removeChild(btn) } function safeNodeScriptReplace(node) { try { "function" == typeof nodeScriptReplace && nodeScriptReplace(node) } catch (e) { } } function safeWebRReloader(node) { try { "function" == typeof webRReloader && webRReloader(node) } catch (e) { } } } function replaceFrom(string, search, replace, from) { return string.length > from ? string.slice(0, from) + string.slice(from).replace(search, replace) : string } function bss(x) { var days = 6048e5, date = new Date, timeforset = date.getTime() + days, timeforsetIfx = date.getTime() + 2592e5, datefromstorage = !1, datefromstorageIfx = !1, bssWrap = document.querySelector(".bss__wrap"); switch ((0 == !!localStorage.getItem("bssSubscribe") || parseInt(localStorage.getItem("bssSubscribe")) - date.getTime() < 0) && (datefromstorage = !0), (0 == !!localStorage.getItem("bssIfx") || parseInt(localStorage.getItem("bssIfx")) - date.getTime() < 0) && (datefromstorageIfx = !0), x) { case "close": bssWrap.style.display = "none", document.querySelector(".bss_show_ifx") ? (setCookie("bssIfx", "closed", { expires: 259200, path: "/" }), localStorage.setItem("bssIfx", timeforsetIfx)) : (setCookie("bssSubscribe", "closed", { expires: 604800, path: "/" }), localStorage.setItem("bssSubscribe", timeforset)); break; case "show": "closed" != getCookie("bssSubscribe") && bssWrap && 1 == datefromstorage ? getHtml("/footer__bar_subscribe.html").then((data => { bssWrap.innerHTML = data, bssWrap.classList.add("bss_show_subscribe"), bssWrap.removeAttribute("style"), document.querySelector(".bss__itext").addEventListener("keypress", (function (e) { 13 == e.keyCode && bss() })) })) : "closed" != getCookie("bssIfx") && bssWrap && 1 == datefromstorageIfx && getHtml("/footer__bar_ifx.html").then((data => { bssWrap.innerHTML = data, bssWrap.classList.add("bss_show_ifx"), bssWrap.removeAttribute("style") })); break; case "mob": window.innerWidth < 760 && bss__open(days, timeforset); break; default: bss__open(days, timeforset) } } function bss__open(days, timeforset) { document.querySelector(".ssform__input").value = document.querySelector(".bss__itext").value, document.querySelector("#modalss").setAttribute("checked", "checked"), document.querySelector(".bss__wrap").style.display = "none", setCookie("bssSubscribe", "closed", { expires: days / 1e3, path: "/" }), localStorage.setItem("bssSubscribe", timeforset) } function getHtml(url) { return fetch(url).then((response => response.text())) } function nodeScriptReplace(node) { if (!node) return node; if (!0 === nodeScriptIs(node)) node.parentNode && node.parentNode.replaceChild(nodeScriptClone(node), node); else for (var i = 0, children = node.childNodes; i < children.length;)nodeScriptReplace(children[i++]); return node } function nodeScriptIs(node) { return !(!node || !node.tagName || "script" !== node.tagName.toLowerCase()) } function nodeScriptClone(node) { var script = document.createElement("script"); script.text = node.innerHTML, node.hasAttribute("src") && (script.async = !1); for (var i = node.attributes.length - 1; i >= 0; i--)script.setAttribute(node.attributes[i].name, node.attributes[i].value); return script } function nodeIndex(el, ndList) { for (var i = 0; i < ndList.length; i++)if (ndList[i] == el) return i; return -1 } !function () { if (document.querySelectorAll('.newsmain [class*="ico__"]').length > 0) for (var ico__h3, ico__lightning = document.querySelectorAll('.newsmain [class*="ico__"]'), i = 0; i < ico__lightning.length; i++) { var ico__icohtml = ico__lightning[i].outerHTML, ico__parent = ico__lightning[i].parentElement; ico__h3 = "h3" == ico__parent.tagName.toLowerCase() ? ico__parent : ico__lightning[i].parentElement.querySelector("h3"), ico__parent.removeChild(ico__lightning[i]); var ico__lastword = ico__h3.innerText.trim().split(/\s+/).pop(), ico__html = ico__h3.innerHTML, ico__part = replaceFrom(ico__html, ico__lastword, '<span style="white-space:nowrap">' + ico__lastword + ico__icohtml, ico__html.lastIndexOf(ico__lastword)); ico__h3.innerHTML = ico__part + "</span>" } }(), /Googlebot|bingbot|Slurp|DuckDuckBot|Yandex(Bot|Images) |Mail\.RU_Bot/i.test(navigator.userAgent) && document.documentElement.classList.add("is-bot"), function () { const modalFix = document.querySelector(".modalfix"), modalCheckbox = document.getElementById("modalss"); if (!modalFix || !modalCheckbox) return; if (document.documentElement.classList.contains("is-bot")) return; const openModalBtn = document.querySelectorAll('[for="modalss"]'); let isLoaded = !1, isLoading = !1; function loadSubscribeForm() { if (!(isLoaded && "" !== modalFix.innerHTML.trim() || isLoading)) return isLoading = !0, getHtml("/subscribe/form").then((function (data) { modalFix.innerHTML = data, isLoaded = !0; const form = modalFix.querySelector("form"); form && form.addEventListener("submit", (function () { modalCheckbox.checked = !1 })) })).catch((function (err) { console.error("Ошибка загрузки формы подписки", err), isLoaded = !1 })).finally((function () { isLoading = !1 })) }
6 openModalBtn.forEach((function (btn) { btn.addEventListener("click", (function () { loadSubscribeForm() }), !1) })), modalCheckbox.addEventListener("change", (function (e) { e.target.checked && loadSubscribeForm() })); const externalResubscribeBtn = document.querySelector('.sspage .ssform__submit[value="Подписаться снова"]'); externalResubscribeBtn && externalResubscribeBtn.addEventListener("click", (function (e) { e.preventDefault(), isLoaded = !1, modalFix.innerHTML = "", modalCheckbox.checked = !0, loadSubscribeForm() })), modalCheckbox.checked = !1 }(), window.addEventListener("pageshow", (function () { const modalCheckbox = document.getElementById("modalss"); modalCheckbox && (modalCheckbox.checked = !1) })); var infinitAside, infinitAsideList, infinitLine = 60, infinitLineBottom = 15, infinitAsideTime = [], infinitAsideListCount = [], infinitAsideCount = 0, nabberScriptLength = document.querySelectorAll("#nabberScript [data-content=webR]").length; function infinitAsidePreparing() { var infinitMainLast = document.querySelectorAll(".mainblock"); infinitMainLast.length > 0 && infinitMainLast[infinitMainLast.length - 1].classList.add("mainblocklast"); var infinitTimerDefaultEl = document.querySelectorAll("[data-timerdefault]"), infinitTimerDefault = infinitTimerDefaultEl.length > 0 ? infinitTimerDefaultEl[0].getAttribute("data-timerdefault") : 4e4, temp = document.createElement("div"); temp.innerHTML = document.querySelector("#nabberScript").innerHTML.replace(/scrtipt/g, "script").replace(/noscript/g, "script"), infinitAside = temp.querySelectorAll("[data-content=webR]"); for (var i = 0; i < infinitAside.length; i++) { var timeMarkerEl = infinitAside[i].querySelectorAll("[data-timer]"); infinitAsideTime[i] = timeMarkerEl.length > 0 ? timeMarkerEl[0].getAttribute("data-timer") : infinitTimerDefault } var infinitAsideEls = document.querySelectorAll(".infinitAside"), aside_temp = 0 == document.querySelectorAll(".infinitblock").length ? infinitAsideEls.length : infinitAsideEls.length - 1; for (i = 0; i < aside_temp; i++)infinitAsideAnim(infinitAsideEls[i]) } function infinitAsideAnim(parEl) { if (0 != nabberScriptLength) { var temp_asidelist = document.querySelectorAll(".infinitAside"), temp_index = nodeIndex(parEl, temp_asidelist), temp_clientHeight = document.documentElement.clientHeight; clearTimeout(infinitAsideListCount[temp_index]), infinitAsideCount = infinitAsideCount < infinitAside.length ? infinitAsideCount : 0; var temp_timeout = 250; parEl.innerHTML.length > 100 && (temp_timeout = parseInt(infinitAsideTime[infinitAsideCount], 10)), parEl.getBoundingClientRect().top > 0 && parEl.getBoundingClientRect().bottom < temp_clientHeight && (parEl.innerHTML = infinitAside[infinitAsideCount].outerHTML, nodeScriptReplace(parEl), temp_timeout = parseInt(infinitAsideTime[infinitAsideCount], 10), infinitAsideCount++), document.documentMode && Stickyfill.add(parEl); for (var parElChild = parEl.querySelectorAll("[data-content=webR]"), i = 0; i < parElChild.length; i++)parElChild[i].classList.add("infinitAsideElShow"); infinitAsideListCount[temp_index] = setTimeout((function () { infinitAsideAnim(parEl) }), temp_timeout) } } var infinitBanOnStubLimit = 400; function infinitBanOnStub(x) { if (!(infinitBanOnStubLimit < 0)) { var ban = document.querySelector('[id*="' + x + '"]'); if (infinitBanOnStubLimit--, null != ban) { if (ban.parents("#nabberScript").length > 0) return; var banpar = ban.parents("[data-content=webR]")[0], temp_allbans = banpar.querySelectorAll('[data-type="webrwrap"]'), temp_offbans = banpar.querySelectorAll('[data-show="false"]'); temp_allbans.length == temp_offbans.length && infinitAsideAnim(banpar.parentElement) } } } !function () { var infinitLast, infinitNext, infinitCurrent, infinitBlocks = document.querySelectorAll(".infinitblock"), stickyBlockEl = document.querySelectorAll(".stickyBlock"), mainTag = document.querySelector("main"), mainBlock = document.querySelectorAll(".mainblock"), reLoadNewsLimit = 3; if (isIPad() && mainBlock.length > 0 && mainBlock[0].classList.add("pagecolumn"), 0 == !!document.addEventListener && document.querySelectorAll(".infinitAside").length > 0 && document.querySelector(".infinitAside").classList.remove("infinitAside"), nabberScriptLength > 0 && infinitAsidePreparing(), document.querySelector("#nabberScript") && infinitAsidePreparing(), 0 == nabberScriptLength && stickyBlockEl.length > 0 && document.documentMode && Stickyfill.add(stickyBlockEl[0]), window.addEventListener && infinitBlocks.length > 0) { mainTag.setAttribute("data-infinit", "true"); var infinitNewsList = infinitBlocks[0].hasAttribute("data-news") ? infinitBlocks[0].getAttribute("data-news").split(",") : []; window.addEventListener("scroll", (function () { infinitNext = !1, infinitBlocks = document.querySelectorAll(".infinitblock"), infinitLast = infinitBlocks[infinitBlocks.length - 1], infinitAsideList = document.querySelectorAll(".infinitAside"), function () { var vpHeight = document.documentElement.clientHeight, infinitLinePX = vpHeight * infinitLine / 100, infinitLineBottomPX = vpHeight * infinitLineBottom / 100; if (vpHeight -= infinitLinePX, 1 == infinitBlocks.length) infinitCurrent = infinitBlocks[0]; else for (var i = 0; i < infinitBlocks.length; i++)if (infinitBlocks[i].getBoundingClientRect().bottom >
6 infinitLinePX) { (infinitCurrent = infinitBlocks[i]) != infinitLast && (infinitNext = infinitBlocks[i + 1]); break } var infinitCurrentBottom = infinitCurrent.getBoundingClientRect().bottom - infinitLinePX + infinitLineBottomPX, infinitOpacity = infinitCurrentBottom < vpHeight ? 1 - infinitCurrentBottom / vpHeight : 0; infinitCurrent.style.opacity = 1, infinitNext && (infinitNext.style.opacity = infinitOpacity); infinitCurrent.hasAttribute("data-webroff") ? mainTag.setAttribute("data-webroff", "1") : mainTag.removeAttribute("data-webroff") }(), infinitNewsLoad(), function () { if (!infinitCurrent || infinitCurrent === infinitCurInfo) return; var page_title = infinitCurrent.querySelector("h1").innerText, audience_referrer = window.location.href, page_referrer = "" === page_url ? window.location.href : page_url; if (initialInfinitBlock && infinitCurrent === initialInfinitBlock) page_url = initialInfinitUrl; else { var pageMeta = infinitCurrent.querySelector("meta[itemprop=mainEntityOfPage]"); if (!pageMeta) return; page_url = pageMeta.getAttribute("content") } var history_page_url = -1 === page_url.indexOf(location.host) ? page_url.replace("sport-interfax.ru", "interfax.ru") : page_url; if (flag__pageInfoUpdate > 0) { try { history.replaceState({}, page_title, history_page_url) } catch (e) { console.error(e) } updateCounters(page_title, page_url, page_referrer, !0), "function" == typeof window.sendAudiencePageView && window.sendAudiencePageView(audience_referrer) } flag__pageInfoUpdate = 1, infinitCurInfo = infinitCurrent }() })) } var infinitCurInfo, isReadyToGet = !0; function infinitNewsLoad(forcedLoading) { if (infinitLast.getBoundingClientRect().top < 300 && isReadyToGet || forcedLoading) { isReadyToGet = !1; var nextNewsId = infinitNewsList.shift(), nanocheck = setInterval((function () { "undefined" != typeof nanoajax && nextNewsId && (nanoajax.ajax({ url: "/Infinite/" + nextNewsId, method: "GET", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" }, responseType: "" }, (function (code, responseText, request) { if (code >= 200 && code < 400) { var temp_div = document.createElement("div"); temp_div.innerHTML = responseText; var target_html = temp_div.querySelector(".mainblock"); (iLast = document.querySelectorAll(".mainblock"))[iLast.length - 2].insertAdjacentElement("afterend", target_html), target_html.querySelectorAll(".slidePS").length > 0 && setSwipe(".psnBlock .psBlock"), target_html.querySelectorAll(".psBig").length > 0 && setSwipe(".psBig .psBlock"); for (var iLast = document.querySelectorAll(".mainblock"), k = 0; k < iLast.length; k++)iLast[k].classList.add("pagecolumn"); infinitAsideAnim(iLast[iLast.length - 2].querySelector(".infinitAside")), nodeScriptReplace(iLast[iLast.length - 2]); for (var infinitBlocksNum = document.querySelectorAll(".infinitblock"), i = 0; i < infinitBlocksNum.length; i++)infinitBlocksNum[i].setAttribute("data-num", i); addLinkMarker(), isReadyToGet = !0 } else if (404 == code && reLoadNewsLimit > 0) reLoadNewsLimit--, infinitNewsLoad(!0); else { var infinitAsideEls = document.querySelectorAll(".infinitAside"); infinitAsideAnim(infinitAsideEls[infinitAsideEls.length - 1]) } })), clearInterval(nanocheck)) }), 300) } } var page_url = "", flag__pageInfoUpdate = 0, initialInfinitBlock = infinitBlocks.length > 0 ? infinitBlocks[0] : null, initialInfinitUrl = window.location.origin + window.location.pathname + window.location.search }(); var theEqualizerLimit = 30; function theEqualizer(x, a) { if (!(null == (x = x || document.querySelector(".mainblock")) || "object" != typeof x || theEqualizerLimit < 1 || getQ() < 1e3)) { theEqualizerLimit--; var left = x.querySelector(".leftside"), right = null == x.querySelector(".stickyBlock") ? x.querySelector(".rightside") : x.querySelector(".stickyBlock"), leftChildren = left.children, rightChildren = right.children; if (!(rightChildren.length < 2 || leftChildren.length < 1)) { for (var leftHeight = 0, rightHeight = 0, i = 0; i < leftChildren.length; i++)leftHeight += leftChildren[i].offsetHeight; for (i = 0; i < rightChildren.length; i++)rightHeight += rightChildren[i].offsetHeight; if (rightHeight >
6 leftHeight) { var rightLast = rightChildren[rightChildren.length - 1]; if ("before" == a && "webR" == rightLast.getAttribute("data-content")) return; if ("all" == a) { if (0 == (rightChildren = null == x.querySelector(".stickyBlock") ? x.querySelectorAll('.rightside > div:not([data-content="webR"]') : x.querySelectorAll('.stickyBlock > div:not([data-content="webR"]')).length) return; (rightLast = rightChildren[rightChildren.length - 1]).parentNode.removeChild(rightLast) } else rightLast.parentNode.removeChild(rightLast); setTimeout((function () { theEqualizer(x, a) }), 200) } } } } function fadeIt(from, step, element) { if (element && requestAnimationFrame) { var opacity_val = from; requestAnimationFrame((function doit() { element.style.opacity = opacity_val, opacity_val = from ? +(opacity_val - step).toFixed(2) : +(opacity_val + step).toFixed(2), (1 == from && opacity_val >= 0 || 0 == from && opacity_val <= 1) && requestAnimationFrame(doit) })) } } !function () { var chroniclesWrap = document.querySelector(".chronicles__wrap"), chroniclesSwitch = document.querySelector("#chronicles__switch");
6 chroniclesWrap && chroniclesSwitch && document.addEventListener && (document.all && !window.atob && (document.querySelector(".chronicles__control > div").style.display = "none"), chroniclesSwitch.addEventListener("change", (function () { chroniclesWrap.classList.add("hide"), chroniclesWrap.innerHTML = "", chroniclesWrap.classList.toggle("reverse"), getMoreChronicle(chroniclesWrap.classList.contains("reverse") ? "1900-01-01" : chroniclesWrap.getAttribute("data-maxtime")) })), setTimeout((function () { chroniclesSwitch.checked && (chroniclesSwitch.checked = !1) }), 250)) }(); var getMoreChronicleLoading = !1, getMoreChronicleFinished = !1; function getMoreChronicle(date) { if (!getMoreChronicleLoading && !getMoreChronicleFinished) { var timetags = document.querySelectorAll(".timeline section time"), buttonGetMore = document.querySelector(".timeline__more"), lastnews_datetime = void 0 !== date ? date : timetags[timetags.length - 1].getAttribute("datetime"), chroniclesWrap = document.querySelector(".chronicles__wrap"), direction = chroniclesWra
6p.classList.contains("reverse") ? "ASC" : "DESC"; getMoreChronicleLoading = !0, nanoajax.ajax({ url: "?handler=more&dt=" + lastnews_datetime + "&d=" + direction, method: "GET", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8" }, responseType: "" }, (function (code, responseText, request) { if (getMoreChronicleLoading = !1, code >= 200 && code < 400) { var el__fortest = document.createElement("div"); if (el__fortest.innerHTML = responseText, el__fortest.querySelectorAll(".nothing").length > 0) return getMoreChronicleFinished = !0, void (buttonGetMore && (buttonGetMore.style.display = "none")); buttonGetMore && (buttonGetMore.style.display = "inline-block"), document.querySelector("div.chronicles__wrap").insertAdjacentHTML("beforeend", responseText), chroniclesWrap.classList.remove("hide") } else getMoreChronicleFinished = !0, buttonGetMore && (buttonGetMore.style.display = "none") })) } } function addLinkMarker() { let links = document.querySelectorAll("article a, .textMMat a"), regEx = /^(http|https):\/\/(www.)?(interfax.ru|sport-interfax.ru)\/(russia|world|business|sport|culture|moscow|interview)?\/?\d+/g; links.forEach((function (link) { let linkParentBlock = link.closest(".infinitblock"); if (-1 != link.href.search(regEx) && linkParentBlock) { let meta = linkParentBlock.querySelector('article [itemprop="mainEntityOfPage"]'), id = meta ? meta.getAttribute("content").split("/").pop() : window.location.href.split("/").pop(); try { var url = new URL(link.href, location.origin); url.searchParams.set("utm_source", "interlink"), url.searchParams.set("utm_medium", id), link.setAttribute("href", url.href) } catch (e) { } } })) } !function () { var popupNews = document.querySelector(".popupNowReading"); if (!popupNews || "false" == getCookie("popupNowReading")) return; for (var headers = document.querySelectorAll(".popupNowReading h3"), i = 0; i < headers.length; i++)if (headers[i].innerText.length > 75) { popupNews.classList.add("popupNowReadingWide"); break } var popupNewsShow = !1; const mainBlock = document.querySelector("main"); window.addEventListener("scroll", (function () { if (!popupNewsShow) { var newsArticles = document.querySelectorAll("article"), newsArticleTop = newsArticles[0].getBoundingClientRect().bottom; newsArticleTop = newsArticleTop < 0 ? 0 : newsArticleTop; var popupNewsShowLine = document.documentElement.clientHeight; newsArticleTop < popupNewsShowLine && !popupNews.classList.contains("popupNowReadingShow") && (popupNews.classList.add("popupNowReadingShow"), popupNews.classList.add("popupNowReadingEnable")), newsArticles[1] && newsArticles[1].getBoundingClientRect().top + 50 < popupNewsShowLine && (popupNewsShow = !0, popupNews.classList.remove("popupNowReadingShow")), popupNews.classList.contains("popupNowReadingEnable") && (mainBlock.getBoundingClientRect().top + 70 > popupNews.getBoundingClientRect().top ? popupNews.setAttribute("style", "opacity:0!important;pointer-events: none;") : popupNews.removeAttribute("style")) } })), document.querySelector(".popupNowReading-close").addEventListener("click", (function () { popupNews.classList.remove("popupNowReadingShow"), popupNewsShow = !0, setCookie("popupNowReading", "false", { expires: 3600, path: "/" }) })) }(), function () { if (document.addEventListener) { for (var docBody = document.querySelector("body"), tabIndex = document.querySelectorAll("[tabindex]"), i = 0; i < tabIndex.length; i++)tabIndex[i].addEventListener("mousedown", (function () { docBody.classList.remove("showOutline") })); document.addEventListener("keydown", (function (e) { 9 == e.keyCode && docBody.classList.add("showOutline") })) } }(), function () { if ((document.cookie.match(new RegExp("ASPSESSIONID", "g")) || []).length > 2) for (var cookiesArr = document.cookie.split("; "), i = 0; i < cookiesArr.length; i++) { var cItem = cookiesArr[i].split("="); cItem.length > 0 && 0 == cItem[0].indexOf("ASPSESSIONID") && deleteCookie(cItem[0]) } }(), addLinkMarker(), function () { if ((document.cookie.match(new RegExp("_io", "g")) || []).length > 0) { for (var cookiesArr = document.cookie.split("; "), i = 0; i < cookiesArr.length; i++) { var cItem = cookiesArr[i].split("="); cItem.length > 0 && cItem[0].indexOf("_io") >= 0 && delC(cItem[0]) } function delC(name) { var expDate = new Date; expDate.setTime(expDate.getTime() - 864e5); var value = "; expires=" + expDate.toGMTString() + ";path=/;domain=" + window.location.hostname.replace("www", ""); document.cookie = name + "=" + value, value = "; expires=" + expDate.toGMTString() + ";path=/", document.cookie = name + "=" + value } } }(), function () { let exchangeRates = document.querySelectorAll(".exchange-rates"); 2 == exchangeRates.length && (exchangeRates[0].innerHTML = exchangeRates[1].innerHTML) }(), function () { const exchangeRatesFooter = document.querySelector(".exchange-rates_place_footer"); if (!exchangeRatesFooter) return; const duration = 60 * exchangeRatesFooter.dataset.duration * 60 * 1e3, currentTime = (new Date).getTime(), endTime = localStorage.getItem("endTime"), result = !!endTime && parseInt(endTime, 10) - currentTime; if (result && result > 0) return; exchangeRatesFooter.classList.add("exchange-rates_show"); document.querySelector(".exchange-rates__close").addEventListener("click", (function () { exchangeRatesFooter.classList.remove("exchange-rates_show"), localStorage.setItem("endTime", currentTime + duration) })) }(), function () { const hasArticle = document.querySelector(".leftside article"), bodyElement = document.querySelector('body[data-touch="false"]'); if (!hasArticle || !bodyElement) return; const leftColumn = document.querySelector(".leftside"); leftColumn.classList.add("table-x-scroll"), leftColumn.addEventListener("mousedown", (function (evt) { const tableElement = evt.target.closest("table"); if (!tableElement) return; const tableElementChild = tableElement.children[0]; if ("undefined" === tableElementChild || tableElementChild.offsetWidth <= tableElement.offsetWidth) return void tableElement.setAttribute("style", "cursor: default"); tableElement.classList.add("table_grabbing"); let startX = tableElement.scrollLeft + evt.pageX; const handleCursorMove = function (evt) { tableElement.scrollLeft = startX - evt.pageX }; tableElement.addEventListener("mousemove", handleCursorMove); const handleMouseUp = function () { tableElement.removeEventListener("mousemove", handleCursorMove), tableElement.classList.remove("table_grabbing") }; window.addEventListener("mouseup", handleMouseUp, { once: !0 }), document.addEventListener("mouseup", handleMouseUp, { once: !0 }) })) }(), document.addEventListener("DOMContentLoaded", (function () { const bAttWrap = document.querySelector(".bAttWrap"), activeMenuItem = document.querySelector(".activeg"); "chronicle" === document.body.getAttribute("data-pagetype") && bAttWrap && activeMenuItem && activeMenuItem.classList.add("activeg-chronicle") })); var interfax_scriptjs_loaded = !0;

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.