1(function () { 2 var loader = document.getElementById('toafLoader'); 3 if (!loader) { 4 document.body.classList.add('toaf-loader-complete'); 5 window.dispatchEvent(new CustomEvent('toafLoaderComplete')); 6 return; 7 } 8 9 var page = document.getElementById('page'); 10 var logomarkGroup = document.getElementById('toafLogomarkGroup'); 11 var logowordGroup = document.getElementById('toafLogowordGroup'); 12 var logoO = document.getElementById('toafLogoO'); 13 14 // ViewBox center: 200.5, logomark center: ~46.5 15 var logomarkShift = 154; 16 17 function forceReveal() { 18 if (loader) { 19 loader.style.display = 'none'; 20 } 21 if (page) { 22 page.style.opacity = '1'; 23 } 24 document.body.classList.add('toaf-loader-complete'); 25 window.dispatchEvent(new CustomEvent('toafLoaderComplete')); 26 } 27 28 if (typeof gsap === 'undefined') { 29 forceReveal(); 30 return; 31 } 32 33 // Initial states: logomark centered, logoword at its native position but invisible 34 gsap.set(logomarkGroup, { x: logomarkShift }); 35 36 var tl = gsap.timeline({ 37 onComplete: function () { 38 loader.style.visibility = 'hidden'; 39 loader.style.pointerEvents = 'none'; 40 } 41 }); 42 43 var holdDuration = 1.2; 44 var moveDuration = 0.6; 45 var wordDelay = 0.3; 46 47 // Phase 1: spin the O during the hold 48 tl.fromTo(logoO, { rotation: 0 }, { 49 rotation: 360, 50 svgOrigin: '34.22 11.35', 51 duration: holdDuration, 52 ease: 'power1.inOut' 53 }, 0); 54 55 // Phase 2: logomark shifts left to its native position 56 tl.to(logomarkGroup, { 57 x: 0, 58 duration: moveDuration, 59 ease: 'power2.inOut' 60 }, holdDuration); 61 62 // Phase 3: logoword fades in, starting 0.2s after the logomark starts moving 63 tl.to(logowordGroup, { 64 opacity: 1, 65 duration: moveDuration - wordDelay, 66 ease: 'power2.out' 67 }, holdDuration + wordDelay); 68 69 // Phase 4: hold full logo for 0.8s, then curtain lifts + content fades in 70 tl.to(loader, { 71 y: '-100%', 72 duration: 0.8, 73 ease: 'power3.inOut', 74 onStart: function () { 75 document.body.classList.add('toaf-loader-complete'); 76 window.dispatchEvent(new CustomEvent('toafLoaderComplete')); 77 } 78 }, '>+=0.5'); 79 80 if (page) { 81 tl.to(page, { 82 opacity: 1, 83 duration: 0.4, 84 ease: 'power2.out' 85 }, '<'); 86 } 87 88 // Safety: force-reveal if timeline somehow stalls 89 setTimeout(function () { 90 if (!document.body.classList.contains('toaf-loader-complete')) { 91 forceReveal(); 92 } 93 }, 8000); 94})();
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.