1class SlideshowComponent extends HTMLElement{constructor(){super(),this.SlideshowInterface()}SlideshowInterface(e){var t=this;const i={};function o(e,t){if(null!==e.querySelector("[data-slideshow-video]"))if(void 0===window.onYouTubeIframeAPIReady){window.onYouTubeIframeAPIReady=()=>{i[t]=new SlideShow(e)};const o=document.createElement("script");o.src="https://www.youtube.com/player_api";const a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)}else{const o=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{i[t]=new SlideShow(e),o()}}else i[t]=new SlideShow(e)}function a(e){i[e]&&(i[e].destroy(),delete i[e])}function n(e){const t=window.getComputedStyle(e);return 0!==parseFloat(t.opacity)&&"none"!==t.display&&"hidden"!==t.visibility}let s=[];void 0!==e?e.length?s=Array.from(e):s[0]=e:s=Array.from(document.querySelectorAll("[data-index-slideshow]")),s&&s.forEach(((e,t)=>{n(e)&&o(e,t)}));let l=null;return window.addEventListener("resize",(()=>{clearTimeout(l),l=setTimeout((()=>{s.forEach(((e,t)=>{n(e)&&void 0===i[t]?o(e,t):!n(e)&&i[t]&&a(t)}))}),100)})),i}}class SlideShow{constructor(e){const t=this;const i={container:"[data-slideshow-container]",slide:"[data-slideshow-slide]",background:"[data-slideshow-bkg]",caption:"[data-slideshow-caption]",captionText:"[data-slideshow-caption-text]",next:"[data-slideshow-nav-next]",prev:"[data-slideshow-nav-prev]",pagination:"[data-slideshow-pagination]",video:"[data-slideshow-video]",videoPlace:"[data-slideshow-video-place]",videoFile:"[data-slideshow-video-file]",videoFilePlace:"[data-slideshow-video-file-place]"};const o={slideshow:"data-slideshow-param",caption:"data-slideshow-caption",video:"data-slideshow-video",videoIndex:"data-slideshow-video-index",videoFile:"data-slideshow-video-file",videoFileIndex:"data-slideshow-video-file-index"};const a={};let n=null;if(void 0!==e){const s=attr(e,o.slideshow);if(null===s||""===s)return null;const l=JSON.parse(s);this.height=parseInt(l.height,10)||e.clientHeight,this.width=parseInt(l.width,10)||e.clientWidth;const d=find(i.container,e);d.style.height=`${(e.offsetWidth/this.width*this.height).toFixed(4)}px`;const r=Array.from(findAll(i.slide,e));if(!r)return this;const c=t=>{let i=attr(t,"data-font-size");null!==i&&""!==i||(i=window.getComputedStyle(t,null).getPropertyValue("font-size").replace("px",""),attr(t,"data-font-size",i));const o=e.offsetWidth/this.width*parseFloat(i);t.style.fontSize=o>10?`${o.toFixed(4)}px`:"10px"};r&&r.forEach(((e,a)=>{const n=Array.from(findAll(i.caption,e));let s=50*(n.length-1);n&&n.forEach((e=>{const n=e;const l=attr(e,o.caption);if(null!==l&&""!==l){const o=JSON.parse(l);const d=e.parentNode;if(d){const e=parseFloat(o.positionY).toFixed(4);const i=parseFloat(o.positionX).toFixed(4);const a={position:"absolute",top:`${e}%`,width:n?`${n.naturalWidth/this.width*100}%`:"auto","z-index":parseInt(o.zIndex,10)||99};t.isRTL()?(a.right=`${i}%`,a.left="auto","left"===o.align?a.transform="translateX(100%)":"center"===o.align?a.transform="translateX(50%)":a.transform="translateX(0)"):(a.left=`${i}%`,a.right="auto","left"===o.align?a.transform="translateX(-100%)":"center"===o.align?a.transform="translateX(-50%)":a.transform="translateX(0)"),Object.keys(a).forEach((e=>{d.style[e]=a[e]}))}const r={position:"relative","animation-delay":`${s}ms`};Object.keys(r).forEach((t=>{e.style[t]=r[t]})),"text"===o.type&&(attr(e,i.captionText.replace(/\[|\]/g,""),"true"),c(e)),0===a?e.classList.add(o.entranceEffect):e.classList.add(o.exitEffect)}s-=50}))}));let f=!1;"true"===l.autoplay&&(f={delay:parseInt(l.autoplaySpeed,10),disableOnInteraction:!1}),n=new Swiper(d,{init:!1,slidesPerView:1,loop:r.length,direction:"horizontal",preloadImages:!1,navigation:{nextEl:find(i.next,e),prevEl:find(i.prev,e)},pagination:{el:find(i.pagination,e),clickable:!0,modifierClass:"index-slideshow-pagination-",bulletClass:"index-slideshow-pagination-bullet",bulletActiveClass:"index-slideshow-pagination-bullet-active",currentClass:"index-slideshow-pagination-current",totalClass:"index-slideshow-pagination-total",hiddenClass:"index-slideshow-pagination-hidden"},effect:l.effect,autoplay:f,lazy:{loadPrevNext:!0}});const h={};const p={};n.on("init",(()=>{const t=Array.from(findAll(i.captionText,e));t&&t.forEach((e=>{e.classList.remove("hidden")}));const a=Array.from(findAll(i.video,e));a&&a.forEach(((e,t)=>{attr(e,o.videoIndex,t);const a=attr(e,o.video);if(null!==a&&""!==a){const o=JSON.parse(a);h[`${o.id}-${t}`]=new YT.Player(find(i.videoPlace,e),{height:"100%",width:"100%",videoId:o.id,events:{onStateChange(e){switch(e.data){case 0:n.autoplay.start();break;case 1:n.autoplay.stop();break;case 2:n.autoplay.start();break;default:break}}}})}}));const s=Array.from(findAll(i.videoFile,e));
1s&&s.forEach(((e,t)=>{attr(e,o.videoFileIndex,t);const a=attr(e,o.videoFile);if(null!==a&&""!==a){const o=JSON.parse(a);p[`${o.id}-${t}`]=find(i.videoFilePlace,e)}}))})),n.init(),n.on("slideChangeTransitionStart",(()=>{for(let e=0;e<n.slides.length;e++)if(e!==n.activeIndex){const t=Array.from(findAll(i.caption,n.slides[e]));t&&t.forEach((e=>{const t=attr(e,o.caption);if(null!==t&&""!==t){const i=JSON.parse(t);e.classList.remove(i.entranceEffect),e.classList.add(i.exitEffect)}}));const a=Array.from(findAll(i.video,n.slides[e]));a&&a.forEach((e=>{const t=attr(e,o.video);if(null!==t&&""!==t){const i=undefined;const a=`${JSON.parse(t).id}-${attr(e,o.videoIndex)}`;void 0!==h[a]&&1===h[a].getPlayerState()&&h[a].stopVideo()}}));const s=Array.from(findAll(i.videoFile,n.slides[e]));s&&s.forEach((e=>{const t=attr(e,o.videoFile);if(null!==t&&""!==t){const i=undefined;const a=`${JSON.parse(t).id}-${attr(e,o.videoFileIndex)}`;void 0!==p[a]&&(p[a].pause(),p[a].currentTime=0)}}))}else{find(i.background,n.slides[e]).classList.remove("hidden");const t=Array.from(findAll(i.captionText,n.slides[e]));t&&t.forEach((e=>{c(e)}))}})),n.on("slideChangeTransitionEnd",(()=>{const e=Array.from(findAll(i.caption,n.slides[n.activeIndex]));e&&e.forEach(((e,t)=>{const i=attr(e,o.caption);const s=`${n.activeIndex}-${t}`;if(null!==i&&""!==i){const t=JSON.parse(i);e.classList.remove(t.exitEffect),e.classList.add(t.entranceEffect),void 0!==a[s]&&null!==a[s]&&(clearTimeout(a[s]),a[s]=null),a[s]=setTimeout((()=>{e.classList.remove(t.entranceEffect),e.classList.add(t.exitEffect),a[n.activeIndex]=null}),parseInt(l.autoplaySpeed,10)-1e3)}}));const t=Array.from(findAll(i.video,n.slides[n.activeIndex]));t&&t.forEach((e=>{const t=attr(e,o.video);if(null!==t&&""!==t){const i=JSON.parse(t);if("true"===i.autoplay){const t=`${i.id}-${attr(e,o.videoIndex)}`;void 0!==h[t]&&(n.autoplay.stop(),h[t].playVideo())}}}));const s=Array.from(findAll(i.videoFile,n.slides[n.activeIndex]));s&&s.forEach((e=>{const t=attr(e,o.videoFile);if(null!==t&&""!==t){const i=JSON.parse(t);if("true"===i.autoplay){const t=`${i.id}-${attr(e,o.videoFileIndex)}`;void 0!==p[t]&&(n.autoplay.stop(),p[t].play())}}})),n.update()})),n.on("resize",(()=>{d.style.height=`${(e.offsetWidth/this.width*this.height).toFixed(4)}px`;const t=Array.from(findAll(i.captionText,n.slides[n.activeIndex]));t&&t.forEach((e=>{c(e)}))})),n.on("beforeDestroy",(()=>{removeAttr(d,"style");const t=Array.from(findAll(i.caption,e));t&&t.forEach((e=>{removeAttr(e,"style")}))})),n.update()}return n}isRTL(){return document.querySelector('html[dir="rtl"]')}}customElements.define("slideshow-component",SlideshowComponent); 2//# sourceMappingURL=/s/files/1/0006/0397/9833/t/44/assets/slideshow.js.map?v=6044185068636589720
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.