// Polyfill: Array.prototype.some
1014if (!Array.prototype.some) { 1015 Array.prototype.some = function(fun/*, thisArg*/) { 1019 throw new TypeError('Array.prototype.some called on null or undefined'); 1022 if (typeof fun !== 'function') { 1023 throw new TypeError(); 1026 var t = Object(this); 1027 var len = t.length >>> 0; 1029 var thisArg = arguments.length >= 2 ? arguments[1] : void 0; 1030 for (var i = 0; i < len; i++) { 1031 if (i in t && fun.call(thisArg, t[i], i, t)) { 1040// Polyfill: Element.prototype.matches() 1042 var matches = e.matches || e.matchesSelector || e.webkitMatchesSelector || e.mozMatchesSelector || e.msMatchesSelector || e.oMatchesSelector; 1043 !matches ? (e.matches = e.matchesSelector = function matches(selector) { 1044 var matches = document.querySelectorAll(selector); 1046 return Array.prototype.some.call(matches, function(e) { 1049 }) : (e.matches = e.matchesSelector = matches); 1050})(Element.prototype); 1052// Polyfill: Element.prototype.closest() 1053if (!Element.prototype.closest) { 1054 Element.prototype.closest = function (s) { 1056 while (el && el.nodeType === 1) { 1057 if (Element.prototype.matches.call(el, s)) { 1060 el = el.parentElement || el.parentNode; 1066// Функция временно продублирована из tilda-scrits для избежания проблем с кэшем 1067function t_triggerEvent(el, eventName) { 1070 if (document.createEvent) { 1071 event = document.createEvent('HTMLEvents'); 1072 event.initEvent(eventName, true, false); 1073 } else if (document.createEventObject) { 1074 event = document.createEventObject(); 1075 event.eventType = eventName; 1078 event.eventName = eventName; 1080 if (el.dispatchEvent) { 1081 el.dispatchEvent(event); 1082 } else if (el.fireEvent) { 1083 el.fireEvent('on' + event.eventType, event); 1084 } else if (el[eventName]) { 1086 } else if (el['on' + eventName]) { 1087 el['on' + eventName](); 1091function t_vote__getRootZone() { 1092 const allrecords = document.getElementById('allrecords'); 1093 const rootZone = allrecords && allrecords.getAttribute('data-tilda-root-zone'); 1094 return rootZone || 'one';