PageSourceSearch

https://csodasmagyarorszag.hu/build/assets/Banner-CJmx7FWx.js

js csodasmagyarorszag.hu collected 2026-10-03 20:37:55 UTC 2,428 bytes, 1 lines download raw bytes

1import{_ as d,ar as m,o as a,c as i,a as r,d as o,s as l,n as c}from"./app-Bi54FpcO.js";const h="/build/assets/banner-close-x-CUbU1zJP.svg",b={name:"Banner",mixins:[m],data(){return{bannerCloseIcon:h,isDismissed:!1,currentBannerIndex:0,autoRotationInterval:null}},computed:{bannerBackgroundStyle(){return this.embedded?{}:{backgroundImage:"url('/assets/images/banner-desktop-bg.png')"}},bannerItems(){const e=this.module?.instance_data?.items;return Array.isArray(e)?e.filter(n=>n?.image):[]},bannerItem(){return this.bannerItems.length?this.bannerItems[this.currentBannerIndex]??this.bannerItems[0]:null},hasMultipleBanners(){return this.bannerItems.length>1}},methods:{dismissBanner(){this.isDismissed=!0,this.stopAutoRotation()},showNextBanner(){this.hasMultipleBanners&&(this.currentBannerIndex=(this.currentBannerIndex+1)%this.bannerItems.length)},bannerLinkByItem(e){return e&&(e.pageUrl||this.module?.instance_data?.pageUrl||e.subtitle||e.url||e.link)||"#"},startAutoRotation(){this.stopAutoRotation(),!(!this.hasMultipleBanners||this.isDismissed)&&(this.autoRotationInterval=window.setInterval(()=>{this.showNextBanner()},1e4))},stopAutoRotation(){this.autoRotationInterval!==null&&(window.clearInterval(this.autoRotationInterval),this.autoRotationInterval=null)}},watch:{hasMultipleBanners(e){e||(this.currentBannerIndex=0),this.startAutoRotation()}},mounted(){this.startAutoRotation()},beforeUnmount(){this.stopAutoRotation()}},I=["src"],f=["href"],g=["src","alt"];function p(e,n,B,x,s,t){return t.bannerItem&&!s.isDismissed?(a(),i("section",{key:0,class:l(["relative w-full px-4 py-6 md:px-6 md:py-8",{"bg-cover bg-center bg-no-repeat":!e.embedded}]),style:c(t.bannerBackgroundStyle)},[e.embedded?o("",!0):(a(),i("button",{key:0,type:"button","aria-label":"Close banner",class:"absolute right-4 top-4 z-20 inline-flex h-6 w-6 items-center justify-center md:right-6 md:top-6",onClick:n[0]||(n[0]=(...u)=>t.dismissBanner&&t.dismissBanner(...u))},[r("img",{src:s.bannerCloseIcon,alt:"",class:"h-6 w-6"},null,8,I)])),r("div",{class:l(["mx-auto flex w-full justify-center",e.embedded?"max-w-[746px]":"max-w-[1190px]"])},[r("a",{href:t.bannerLinkByItem(t.bannerItem),target:"_blank",rel:"noopener noreferrer",class:"block"},[r("img",{src:t.bannerItem.image,alt:t.bannerItem.imageAlt||t.bannerItem.title||"Banner",class:"block rounded-lg"},null,8,g)],8,f)],2)],6)):o("",!0)}const y=d(b,[["render",p]]);export{y as default};

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.