/* OK ITHAKI V249526R10F3 — EXCLUSIVE MODERN ANONYMOUS WALL ROUTE */
(function(){
'use strict';
if(window.__ITHAKI_V249526R10F3_WALL_OWNER__)return;
window.__ITHAKI_V249526R10F3_WALL_OWNER__={version:'V249526R10F3',exclusiveModernWall:true,singleWallOverlay:true,stopsLegacyFallbackChain:true,allWallEntriesCanonical:true,at:Date.now()};
window.EXCLUSIVE_MODERN_WALL_OWNER_R10F3=true;
window.WALL_FALLBACK_CHAIN_STOPPED_R10F3=true;
window.WALL_ALL_ENTRIES_CANONICAL_R10F3=true;
const I=()=>window.ITH=window.ITH||{},$=id=>document.getElementById(id);
let canonical=null;
function captureCanonical(){if(canonical)return canonical;const f=I().openAnonymousWallV249526R10F3||I().openAnonymousWallV249526||window.openAnonymousWallV249526;if(typeof f==='function'&&f!==openExclusive)canonical=f;return canonical}
function closeForeignWalls(){document.querySelectorAll('#ithUnifiedWall397,#ithV411Wall,#ithWall357,#v411Overlay,.v411Overlay,#ithWall378').forEach(x=>x.remove());const current=[...document.querySelectorAll('#ith526AnonymousWall')];current.slice(1).forEach(x=>x.remove())}
function closeMenus(){const p=$('plusSheet');if(p)p.classList.remove('show','ith529CanonicalPlus','ith530CanonicalPlus');const m=$('memberMenu');if(m&&m.dataset.ithakiOwner!=='notifications')m.classList.remove('show')}
function openExclusive(){closeMenus();closeForeignWalls();const f=captureCanonical();if(typeof f==='function'){try{f.call(I());const root=$('ith526AnonymousWall');if(root){root.dataset.wallOwner='r10f3';document.documentElement.setAttribute('data-ithaki-wall-open-r10f3','1');return true}}catch(e){console.error('R10F3 wall open',e)}}try{const t=I().toast||window.toast;if(typeof t==='function')t('Ο Ανώνυμος Τοίχος δεν άνοιξε. Κάνε Ctrl+F5 και ξαναδοκίμασε.',5500)}catch(e){}return true}
function install(){captureCanonical();const o=I();['openAnonymousWallV249526','openAnonymousWallV249526R10F3','openAnonymousWallV249283','openZeroSupportWallV249270','openUnifiedWallV249397','openWallV249357','openCurrentWallV249440','openWallV411','openAnonymousWallV411','openProfessionalAnonymousWallV249378','openDirectWallV249434'].forEach(k=>{o[k]=openExclusive;window[k]=openExclusive});document.documentElement.setAttribute('data-ithaki-v249526r10f3','exclusive-modern-anonymous-wall')}
function isWallControl(el){if(!el)return false;if(el.matches('#plusSheet [data-r9plus="anon_wall"],#plusSheet [data-r8plus="anon_wall"],#plusSheet [data-act="anon_wall"],#ith526PlusWall,[data-bil-action="wall"],[data-a="wall"],#ithHomeWall378'))return true;const oc=String(el.getAttribute('onclick')||'');if(/open(?:Anonymous|Current|Professional)?Wall|openZeroSupportWall/i.test(oc))return true;return false}
function capture(e){const el=e.target&&e.target.closest&&e.target.closest('button,a,[role="button"]');if(!isWallControl(el))return;e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();openExclusive()}
document.addEventListener('click',capture,true);
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',install,{once:true});else install();
window.addEventListener('pageshow',install);window.addEventListener('ithaki:page-changed',install);
new MutationObserver(()=>{const root=$('ith526AnonymousWall');if(root){root.dataset.wallOwner='r10f3';closeForeignWalls()}}).observe(document.documentElement,{childList:true,subtree:true});
})();
