PageSourceSearch

https://windows10all.ru/wp-content/cache/wpfc-minified/jmc9miy9/4e5mq.js

js windows10all.ru collected 2026-10-05 00:19:56 UTC 16,081 bytes, 2 lines download raw bytes

1!function(){"use strict";class e{static mainSel=".democracy_js";static screenSel=".dem_screen_js";static cacheScreenSel=".dem_screen_cache_js";static userAnswerSel=".dem_add_answer_txt_js";static $loader=null;static loaderTmr=null;static ajaxurl="";static cookieDays=0;static animSpeed=0;static lineAnimSpeed=0}class t{static#e=new WeakMap;pid=0;maxAnsws=0;answsMaxHeight="";noticeStatus="";noticeHtml="";noticeElement=null;noticeTimeout=null;constructor(e){const t=JSON.parse(e.dataset.opts||"{}");this.pid=parseInt(t.pid,10)||0,this.maxAnsws=parseInt(t.max_answs,10)||0,this.answsMaxHeight=String(t.answs_max_height||"")}static get(e){let n=t.#e.get(e);return n||(n=new t(e),t.#e.set(e,n)),n}}class n{static detectRealHeight(e){if(!e.parentElement)return e.getBoundingClientRect().height;const t=e.cloneNode(!0);t.querySelectorAll("input, select, textarea, button").forEach(e=>e.removeAttribute("name")),Object.assign(t.style,{height:"auto",maxHeight:"none",position:"absolute",left:"-9999px",top:"0",width:window.getComputedStyle(e).width,visibility:"hidden",pointerEvents:"none"}),e.before(t);const n=window.getComputedStyle(t),s="border-box"===n.boxSizing?parseFloat(n.height):t.getBoundingClientRect().height;return t.remove(),s}static setHeight(t,s=!1){const i=n.detectRealHeight(t);if(s){const s=e.animSpeed||0;n.animateHeight(t,i,s)}else t.style.height=i+"px"}static isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}static setAnswsMaxHeight(s){const i=s.closest(e.mainSel),o=t.get(i).answsMaxHeight;if(!o)return;const r=s.querySelector(".dem_answers_list_js"),a=n.heightToPixels(o,r);r.style.maxHeight="none",r.style.overflowY="visible";const c=window.getComputedStyle(r);if(("border-box"===c.boxSizing?parseFloat(c.height):r.getBoundingClientRect().height)-a>100){r.style.position="relative";const t=n.newEl('<span class="dem__collapser dem_collapser_js"><span class="arr"></span></span>');r.append(t);const i=()=>{t.classList.add("expanded"),t.classList.remove("collapsed")},c=()=>{t.classList.add("collapsed"),t.classList.remove("expanded")};let l;"true"===s.dataset.expanded?i():(c(),r.style.height=o,r.style.overflowY="hidden"),t.addEventListener("mouseenter",function(){"true"!==s.dataset.expanded&&(l=setTimeout(()=>t.dispatchEvent(new Event("click")),1e3))}),t.addEventListener("mouseleave",function(){clearTimeout(l)}),t.addEventListener("click",function(){if(clearTimeout(l),"true"===s.dataset.expanded)c(),delete s.dataset.expanded,s.style.height="auto",r.style.overflowY="hidden",n.animateHeight(r,a,e.animSpeed,()=>{s.style.height=n.detectRealHeight(s)+"px"});else{i();const t=n.detectRealHeight(r)+7;s.dataset.expanded="true",s.style.height="auto",n.animateHeight(r,t,e.animSpeed,()=>{s.style.height=n.detectRealHeight(s)+"px",r.style.overflowY="visible"})}})}}static heightToPixels(e,t){const n=parseFloat(e);switch(e.replace(n,"").trim()){case"px":return n;case"rem":return n*parseFloat(getComputedStyle(document.documentElement).fontSize);case"em":return n*parseFloat(getComputedStyle(t).fontSize);case"vh":return n/100*window.innerHeight;case"vw":return n/100*window.innerWidth;case"%":return n/100*t.getBoundingClientRect().height;default:return parseFloat(e)}}static#t=!1;static maxAnswLimitInit(){if(n.#t)return;n.#t=!0;const t=t=>{const s=t.target;if(!(s instanceof HTMLInputElement)||"change"===t.type&&"checkbox"!==s.type||"input"===t.type&&!s.matches(e.userAnswerSel))return;const i=s.closest(e.screenSel);i&&n.updateMaxAnswLimit(i)};document.addEventListener("change",t),document.addEventListener("input",t)}static updateMaxAnswLimit(e){const{maxAnsws:t,checkedCount:s,userAnswerInput:i,hasUserAnswer:o,isMaxReached:r}=n.maxAnswLimitData(e);if(!t)return;const a=e.querySelectorAll('input[type="checkbox"]');if(!a.length)return;a.forEach(e=>{const t=r&&!e.checked;e.disabled=t,e.closest(".dem_answer_item_js")?.classList.toggle("dem-disabled",t)});const c=e.querySelector(".dem_add_answer_item_js");if(i){const e=!o&&s>=t;return i.disabled=e,void c?.classList.toggle("dem-disabled",e)}if(c){const e=s>=t;c.classList.toggle("dem-disabled",e);const n=c.querySelector(".dem_add_answer_link_js");n&&(e?(n.setAttribute("aria-disabled","true"),n.setAttribute("tabindex","-1")):(n.removeAttribute("aria-disabled"),n.removeAttribute("tabindex")))}}static maxAnswLimitData(n){const s=n.closest(e.mainSel),i=t.get(s).maxAnsws;if(!i)return{};const o=n.querySelectorAll('input[type="checkbox"]:checked').length,r=n.querySelector(e.userAnswerSel),a=!!r?.value.trim();return{maxAnsws:i,checkedCount:o,userAnswerInput:r,hasUserAnswer:
1a,isMaxReached:o+(a?1:0)>=i}}static demShake(e){const t=window.getComputedStyle(e).position;t&&"static"!==t||(e.style.position="relative");e.animate([{left:"0px"},{left:"-10px",offset:.2},{left:"10px",offset:.4},{left:"-10px",offset:.6},{left:"10px",offset:.8},{left:"0px",offset:1}],{duration:500,iterations:1,easing:"linear"})}static loadingDots(t){const s="input"===t.tagName.toLowerCase(),i=s?t.value:t.innerHTML;"..."===i.slice(-3)?t[s?"value":"innerHTML"]=i.slice(0,-3):t[s?"value":"innerHTML"]+=".",e.loaderTmr=setTimeout(()=>n.loadingDots(t),200)}static resetHeight(e){n.clear_hAnim(e),e.getAnimations().forEach(e=>e.cancel()),e.style.height="auto"}static animateHeight(e,t,s,i){const o=e.getBoundingClientRect().height;if(n.clear_hAnim(e),!s)return e.style.height=t+"px",void(i&&i());e._hAnim=e.animate([{height:`${o}px`},{height:`${t}px`}],{duration:s,easing:"ease-out",fill:"forwards"}),e._hAnim.onfinish=()=>{e.style.height=t+"px",n.clear_hAnim(e),i&&i()},e._hAnim.oncancel=()=>{delete e._hAnim}}static clear_hAnim(e){e._hAnim&&(e._hAnim.oncancel=null,e._hAnim.cancel(),delete e._hAnim)}static newEl(e){let t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild}static fadeIn(e,t=300){if(n.showElement(e),!e.animate||!t)return void(e.style.opacity=null);e.style.opacity="0";const s=e.animate([{opacity:0},{opacity:1}],{duration:t,easing:"linear"});s.onfinish=()=>e.style.opacity=null,s.oncancel=()=>e.style.opacity=null}static showElement(e){e.hidden=!1,"none"===e.style.display?e.style.display=null:"none"===getComputedStyle(e).display&&(e.style.display="block")}static hideElement(e){e.style.display="none"}}class s{static setLoader(t){if(e.$loader){const n=e.$loader.cloneNode(!0);n.style.display="table";const s=t.closest(e.screenSel);s&&s.append(n)}else e.loaderTmr=setTimeout(()=>n.loadingDots(t),50)}static unsetLoader(t){if(e.$loader){t.closest(e.mainSel).querySelectorAll(".dem_loader_js").forEach(e=>e.remove())}else clearTimeout(e.loaderTmr)}}
2function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)"__proto__"!==s&&(e[s]=n[s])}return e}var o=function e(t,n){function s(e,s,o){if("undefined"!=typeof document){"number"==typeof(o=i({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in o)o[a]&&(r+="; "+a,!0!==o[a]&&(r+="="+o[a].split(";")[0]));return document.cookie=e+"="+t.write(s,e)+r}}return Object.create({set:s,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],s={},i=0;i<n.length;i++){var o=n[i].split("="),r=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(a in s||(s[a]=t.read(r,a)),e===a)break}catch(e){}}return e?s[e]:s}},remove:function(e,t){s(e,"",i({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,i({},this.attributes,t))},withConverter:function(t){return e(i({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class r{static set(e,n,s=!1){const i=t.get(e);clearTimeout(i.noticeTimeout),i.noticeStatus=n?.status||"",i.noticeHtml=n?.html||"",r.#n(e,s)}static#n(e,n=!1){const s=t.get(e);if(e.querySelector(".dem_notice_js")?.remove(),s.noticeElement=null,!s.noticeStatus||!s.noticeHtml)return;const i=document.querySelector(".dem_notice_template_js"),o=i?.content.firstElementChild?.cloneNode(!0);if(!o)return;o.dataset.notice_status=s.noticeStatus,o.querySelector(".dem_notice_message_js").innerHTML=s.noticeHtml;const r=()=>{o.remove(),s.noticeElement===o&&(s.noticeStatus="",s.noticeHtml="",s.noticeElement=null,s.noticeTimeout=null)};o.querySelector(".dem_notice_close_js")?.addEventListener("click",r),e.prepend(o),s.noticeElement=o,n&&(s.noticeTimeout=setTimeout(r,1e4))}}class a{static actionsHandler;static initAll(){const e=document.querySelectorAll(".dem_cache_screens_js");
2e.length&&e.forEach(e=>a.initCache(e))}static initCache(n){const i=a.findMainBlock(n);if(!i)return void console.warn("Democracy: Main dem div not found");const o=i.querySelector(e.screenSel);if(!o)return;const c=t.get(i).pid,l=a.getPollCookie(c,e.cookieDays),d="notVoted"===l,u=l&&!d,m=n.querySelector(e.cacheScreenSel+".vote"),h=n.querySelector(e.cacheScreenSel+".voted"),p=m?m.innerHTML:"",f=h?h.innerHTML:"";if(!p)return;const _=u&&f;if(o.innerHTML=(_?f:p)+"\x3c!--cache--\x3e",o.classList.remove("vote","voted"),o.classList.add(_?"voted":"vote"),u&&a.setAnswers(o,l),a.actionsHandler(o),!d&&!u&&1===parseInt(n.dataset.opt_logs,10)){let t;const n=function(){clearTimeout(t)},l=function(){t=setTimeout(function(){if(i._vote_check_done)return;i._vote_check_done=!0;const t=i.querySelector(".dem_link_js");t&&s.setLoader(t),a.post(e.ajaxurl,{dem_pid:c,dem_act:"getVotedIds",action:"dem_ajax"}).then(e=>{if(t&&s.unsetLoader(o),!e.voted_for&&!e.notice)return;o.dataset.expanded="true";const n=e.voted_for&&f;o.innerHTML=n?f:p,o.classList.remove("vote","voted"),o.classList.add(n?"voted":"vote"),a.setAnswers(o,e.voted_for),a.actionsHandler(o),"login_required"===e.n
2otice?.status&&o.querySelector(".dem_revote_button_js")?.remove(),r.set(i,e.notice,!0)}).catch(e=>{t&&s.unsetLoader(o),console.warn("Democracy: AJAX request failed",e)})},700)};i.addEventListener("mouseenter",l),i.addEventListener("mouseleave",n),i.addEventListener("click",l)}}static setAnswers(e,t){const s=t.split(/,/).filter(e=>""!==e);if(e.classList.contains("voted")){const t=e.querySelector(".dem_answers_list_js"),n=t?t.dataset.voted_txt:"";s.forEach(t=>{a.queryAidNodes(e,t).forEach(e=>{e.classList.add("dem-voted-this");const t=e.getAttribute("title")||"";n&&e.setAttribute("title",n+t)})}),e.querySelectorAll(".dem_vote_link_js").forEach(e=>e.remove())}else{const t=Array.from(e.querySelectorAll("[data-aid]")),i=e.querySelector(".dem_voted_button_js");s.forEach(t=>{a.queryAidNodes(e,t).forEach(e=>{e.querySelectorAll("input").forEach(e=>{e.checked=!0})})}),t.forEach(e=>{e.querySelectorAll("input").forEach(e=>{e.disabled=!0})}),e.querySelectorAll(".dem_vote_button_js").forEach(e=>e.remove()),i?n.showElement(i):e.querySelectorAll(".dem_revote_button_wrap_js").forEach(n.showElement)}}static findMainBlock(t){let n=t.previousElementSibling;for(;n;){if(n.matches(e.mainSel))return n;n=n.previousElementSibling}return t.closest(e.mainSel)}static getPollCookie(e,t){const n=o.get("demPoll");if(!n)return null;const s=String(e),i=Math.trunc(86400*Number(t)),r=Date.now()/1e3;let a=null;for(const e of n.split("|")){const t=e.match(/^(\d+):(0|[1-9]\d*(?:_[1-9]\d*)*)-([0-9a-z]+)$/);if(!t||t[1]!==s)continue;const n=t[2],o=parseInt(t[3],36),c="0"===n?43200:i;o&&c>0&&o+c>r&&(a="0"===n?"notVoted":n.replaceAll("_",","))}return a}static queryAidNodes(e,t){const n=window.CSS&&CSS.escape?CSS.escape(t):t;return Array.from(e.querySelectorAll('[data-aid="'+n+'"]'))}static post(e,t){const n=new URLSearchParams;return Object.keys(t).forEach(e=>n.append(e,t[e])),fetch(e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:n}).then(e=>{if(!e.ok)throw new Error("Bad network response");return e.json()})}}document.addEventListener("DOMContentLoaded",function(){const i=document.querySelectorAll(e.mainSel);if(!i.length)return;e.$loader=document.querySelector(".dem_loader_js");const o=window.democracyPollConfig||{};function c(t){t.querySelectorAll("[data-dem-act]").forEach(e=>{"A"===e.tagName&&e.setAttribute("href",""),e.addEventListener("click",t=>{t.preventDefault(),e.blur(),u(e,e.getAttribute("data-dem-act"))})}),l(t),n.resetHeight(t),n.setAnswsMaxHeight(t),n.updateMaxAnswLimit(t),e.lineAnimSpeed&&t.querySelectorAll(".dem_fill_js").forEach(t=>{setTimeout(()=>function(t){const n=t.dataset.width;if(!n)return;if(!t.animate)return void(t.style.width=n);t.animate([{width:window.getComputedStyle(t).width},{width:n}],{duration:e.lineAnimSpeed,easing:"linear",fill:"forwards"}).onfinish=()=>t.style.width=n}(t),e.animSpeed)}),n.setHeight(t,!1)}function l(t){(function(e){return!!e.querySelector('.dem_vote_wrap_js[data-is_auto_vote="1"]')})(t)&&!t.querySelector(e.userAnswerSel)&&t.querySelectorAll(".dem_vote_button_js").forEach(e=>e.style.display="none")}function d(t){const s=t.closest(e.screenSel);if(s.querySelector("[type=checkbox]")&&n.maxAnswLimitData(s).isMaxReached)return n.demShake(t),!1;const i=n.newEl('<input type="text" class="dem-add-answer-txt dem_add_answer_txt_js" value="">');i.addEventListener("keydown",e=>{if("Enter"===e.key&&!e.isComposing){e.preventDefault();u(s.querySelector('.dem_vote_button_js [data-dem-act="vote"]')||i,"vote")}}),i.closeListeners=[],i.closeNewAnswer=()=>function(e,t,s){if(!t.isConnected)return;t.closeListeners.forEach(e=>e.removeEventListener("click",t.closeNewAnswer)),t.parentElement.querySelector(".dem_add_answer_close_js")?.remove(),t.remove(),n.fadeIn(s),n.updateMaxAnswLimit(e),l(e),requestAnimationFrame(()=>n.setHeight(e,!0))}(s,i,t),s.querySelectorAll("[type=radio]").forEach(e=>{e.checked=!1,i.closeListeners.push(e),e.addEventListener("click",i.closeNewAnswer)});const o=s.querySelector(".dem_vote_button_js");o&&n.showElement(o),n.hideElement(t),t.after(i),n.hideElement(i),n.fadeIn(i),i.focus(),n.updateMaxAnswLimit(s),requestAnimationFrame(()=>n.setHeight(s,!0));const r=n.newEl('<span class="dem-add-answer-close dem_add_answer_
2close_js">×</span>');r.style.lineHeight=i.offsetHeight+"px",r.addEventListener("click",i.closeNewAnswer),i.before(r)}function u(i,o){const l=i.closest(e.mainSel),u={dem_pid:t.get(l).pid,dem_act:o,action:"dem_ajax"};if(void 0===u.dem_pid)return console.warn("Poll id is not defined!"),!1;if("vote"===o&&(u.answer_ids=function(t){const n=t.closest(e.screenSel);if(!n)return"";const s=n.querySelector(e.userAnswerSel),i=s?s.value:"";let o=[];const r=n.querySelectorAll("[type=checkbox]:checked");if(r.length)r.forEach(e=>o.push(e.value));else{const e=n.querySelector("[type=radio]:checked");e&&o.push(e.value)}return i&&o.push(i),o=o.join("~"),o||""}(i),!u.answer_ids))return n.demShake(i),!1;if("delVoted"===o&&!confirm(i.dataset.confirm_text))return!1;if("newAnswer"===o)return d(i),!1;const m=i.closest(e.screenSel);return!!m&&(s.setLoader(i),a.post(e.ajaxurl,u).finally(()=>s.unsetLoader(m)).then(e=>{if(!e.screen_html)return void r.set(l,e.notice);m.dataset.expanded="true";m.style.transition="opacity 500ms ease",m.style.opacity=0,setTimeout(()=>{m.innerHTML=e.screen_html,c(m),r.set(l,e.notice),function(e){const t=e.getBoundingClientRect();return t.bottom>200&&t.top<window.innerHeight}(l)||l.scrollIntoView({behavior:"smooth",block:"start"}),m.style.opacity=1},500)}).catch(e=>{s.unsetLoader(m),console.warn("Democracy: AJAX request failed",e)}),!1)}e.ajaxurl=o.ajax_url,e.cookieDays=o.cookie_days,e.animSpeed=parseInt(o.anim_speed),e.lineAnimSpeed=parseInt(o.line_anim_speed),queueMicrotask(function(){const s=[];i.forEach(i=>{t.get(i);const o=i.querySelector(e.screenSel);o&&n.isVisible(o)&&s.push(o)}),s.forEach(e=>c(e));const o=()=>s.forEach(e=>n.setHeight(e));window.addEventListener("load",o),window.addEventListener("resize",o),n.maxAnswLimitInit(),a.actionsHandler=c,a.initAll()})})}();

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.