1function t_removeEl(e){e.parentNode&&e.parentNode.removeChild(e)}function tvote__init(e){var t;if(!document.getElementById("allrecords").getAttribute("data-tilda-mode")){var o=document.querySelector("#rec"+e);if(window.tildaVoteObserver)return window.tildaVoteObserver.observe(o);var r=new IntersectionObserver(tvote__handleObserver,{threshold:.1});window.tildaVoteObserver=r,r.observe(o)}}function tvote__handleObserver(e,t){e.forEach((function(e){if(0!==e.intersectionRatio){var o=e.target;t.unobserve(o);var r=o.querySelector(".t-vote"),n=tvote__makeFullVoteID(r),a=new Date,i={type:r.getAttribute("data-vote-type"),voteID:n,voteEl:r,voteVisibility:r.getAttribute("data-vote-visibility"),startDate:a};t_vote__checkVoteCondition(i),"yes"!==r.getAttribute("data-vote-finished")?setTimeout((function(){t_vote__initOneVote(i)}),500):r.classList.add("t-vote_sended")}}))}function tvote__makeFullVoteID(e){e instanceof Element||(e=e[0]);var t=e.getAttribute("data-vote-id");if(t){var o=document.querySelector("#allrecords").getAttribute("data-tilda-project-id")+t;return o=o.replace(""","").replace("'","").replace(/[&/\\#,+()$~%.'":;*?!<>{}\-_\s]/g,""),e.setAttribute("data-vote-id",o),o}}function t_vote__checkVoteCondition(e){var t=t_vote__getCookie("vote"+e.voteID),o=t_vote__getCookie("voteresult"+e.voteID);if("yes"===e.voteVisibility||"onclick"===e.voteVisibility&&t){var r=e.voteEl.querySelectorAll(".t-vote__btn-res");Array.prototype.forEach.call(r,(function(e){e.style.display="block"}))}t&&(e.voteEl.classList.add("js-vote-sended"),e.voteEl.classList.add("t-vote_sended")),"single"===e.type&&t&&o&&e.voteEl.querySelector('[data-answer-id="'+o+'"] .t-vote__btn-el').classList.add("t-vote__btn-el_active"),tvote__getResult(e.voteID)}function t_vote__getCookie(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}function tvote__getResult(e){var t=document.querySelector('[data-vote-id=" …Длинные строки сокращены. Полная версия доступна по ссылке «Полный текст».