1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function($,Drupal){'use strict';Drupal.behaviors.displayBanner={attach:function(context,settings){$(once('ad-banner-wrapper','.ad-banner-wrapper',context)).each(function(i,e){if(settings.banners===null)return;const adBannerWrapper=$(this);const bannerType=adBannerWrapper.attr('data-banner-type');const liveRotation=adBannerWrapper.attr('data-live-rotation')==='1';const rotationPeriod=parseInt(adBannerWrapper.attr('data-rotation-period'),10)*1000||4000;const banners=settings.banners[bannerType];const bannerKeys=Object.keys(banners);if(bannerKeys.length===0)return;if(!liveRotation){const randomKey=bannerKeys[Math.floor(Math.random()*bannerKeys.length)];const randomBanner=banners[randomKey];adBannerWrapper.html(randomBanner);return;}let currentIndex=0;const displayNextBanner=()=>{const key=bannerKeys[currentIndex];const banner=banners[key];adBannerWrapper.html(banner);currentIndex=(currentIndex+1)%bannerKeys.length;setTimeout(displayNextBanner,rotationPeriod);};displayNextBanner();});}};})(jQuery,Drupal);;
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.