\n \n `},setSpinner=e=>{document.getElementsByClassName("layer-spinner")[0].style.display=e?"flex":"none"},ads=()=>{const e=window.innerWidth<640;window.yaContextCb.push((()=>{Ya.Context.AdvManager.render({blockId:e?"R-A-2369467-20":"R-A-2369467-37",type:"rewarded",platform:e?"touch":"desktop"})}))};async function getResult(){const e=getCharacterID(),t=getTestId();var n,s;n=!0,document.getElementsByClassName("layer-spinner")[0].style.display=n?"flex":"none",ads(),await(s=250,new Promise((e=>setTimeout(e,s))));const a=await API("testwho/result/update",{test_id:t,character_id:e});var r;r=a,document.getElementById("result").innerHTML=`\n
\n
${r.name}
\n
${r.description}
\n
\n
\n
\n
`}function go(e){window.location.href=`https://testopus.ru/test/${e}`}let img=new Image;img.src="/images/check.svg",questions.forEach(((e,t)=>{Array.from(e.getElementsByClassName("answer")).forEach(((e,n)=>{e.onclick=e=>handleAnswerClick(e,t)}))}));const back=()=>{""!==document.referrer&&-1!==document.referrer.indexOf(window.location.host)?window.history.back():window.location.href="/"},resultButton=document.getElementById("result-button");resultButton.onclick=getResult;const createTestEl=document.getElementById("create-test");createTestEl&&(createTestEl.onclick=()=>{let e=/Android/i.test(navigator.userAgent);window.open(e?"vk://vk.com/app7968053#create-test":"https://vk.com/app7968053#create-test"),sendStat({open:"create"})});const renderAds=(e,t={})=>{window.yaContextCb.push((()=>{Ya.Context.AdvManager.render({blockId:`R-A-2369467-${e}`,renderTo:`yandex_rtb_R-A-2369467-${e}`,...t})}))};function pushAdsBeforeQuestions(){const e=document.querySelectorAll(".question"),t=document.getElementById("main"),n=Math.min(24,e.length-1),s=Math.floor(n/2);for(let s=2;s<20&&s1e3?renderAds(41):renderAds(35,{type:"floorAd",platform:"touch"}),renderAds(39,{type:"feed",statId:3});