PageSourceSearch

https://nbe.nl/app/cache/min/1/app/themes/nbe/static/js/partials/slider-swapping-slides.js?ver=1783515072

js nbe.nl collected 2026-10-02 08:31:06 UTC 1,892 bytes, 7 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){function initSwapSlider(root){const GAP=15;const track=root.querySelector('[data-track]');const cards=Array.from(track.querySelectorAll('.swap-card'));if(!cards.length)return;const dotsWrap=root.querySelector('[data-dots]')||(()=>{const el=document.createElement('div');el.className='swap-dots';el.setAttribute('data-dots','');root.appendChild(el);return el})();const dotEls=cards.map((_,i)=>{const dot=document.createElement('span');dot.className='swap-dot';dotsWrap.appendChild(dot);return dot});function updateDots(){const activeIdx=order[0];for(let i=0;i<dotEls.length;i++){dotEls[i].classList.toggle('is-active',i===activeIdx)}}
2let order=cards.map((_,i)=>i);let animating=!1;const DUR=1000;function layout(){const cardW=cards[0].offsetWidth;for(let pos=0;pos<order.length;pos++){const idx=order[pos];const el=cards[idx];const x=pos*(cardW+GAP);const z=10-pos;el.style.setProperty('--x',x+'px');el.style.setProperty('--z',z.toString());el.style.pointerEvents=(pos===0)?'auto':'none';el.setAttribute('aria-hidden',pos===0?'false':'true')}
3track.style.height=(cards[0].offsetHeight+10)+'px';updateDots()}
4function next(){if(animating)return;animating=!0;order.unshift(order.pop());layout();setTimeout(()=>(animating=!1),DUR)}
5function prev(){if(animating)return;animating=!0;order.push(order.shift());layout();setTimeout(()=>(animating=!1),DUR)}
6const ro=new ResizeObserver(layout);ro.observe(cards[0]);window.addEventListener('resize',layout);window.addEventListener('load',layout);root.querySelector('[data-next]')?.addEventListener('click',next);root.querySelector('[data-prev]')?.addEventListener('click',prev);root.addEventListener('keydown',(e)=>{if(e.key==='ArrowRight')next();if(e.key==='ArrowLeft')prev()});root.setAttribute('tabindex','0');layout()}
7document.querySelectorAll('[data-swap-slider]').forEach(initSwapSlider)})

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.