PageSourceSearch

https://www.enchantingtravels.com/wp-content/themes/enchanting/dist/components/hero/index.js?ver=2026.09.23.04

js enchantingtravels.com collected 2026-09-24 19:40:48 UTC 2,964 bytes, 1 lines download raw bytes

1(()=>{"use strict";const{customElements:t,HTMLElement:e}=window;t.define("et-hero-cta",class extends e{constructor(){var t;super(),this.button=this.querySelector(".btn"),null===(t=this.button)||void 0===t||t.addEventListener("click",this.buttonClicked.bind(this))}buttonClicked(t){var e,i,o;const s=null!==(i=null===(e=this.button)||void 0===e?void 0:e.getAttribute("href"))&&void 0!==i?i:"";s.startsWith("#")&&(t.preventDefault(),null===(o=document.querySelector(s))||void 0===o||o.scrollIntoView())}}),t.define("et-hero-caption",class extends e{constructor(){super(),this.addEventListener("click",this.toggleVisibility.bind(this))}toggleVisibility(){this.toggleAttribute("active")}}),t.define("et-hero-collage",class extends e{constructor(){super(),this.imageLoadedCount=0,this.mainHeroContainer=this.closest(".hero"),this.images=this.mainHeroContainer.querySelectorAll("img"),this.images.forEach(t=>{t.complete?this.imageLoaded():t.addEventListener("load",this.imageLoaded.bind(this))})}imageLoaded(){this.imageLoadedCount++,this.imageLoadedCount===this.images.length&&this.mainHeroContainer.classList.add("loaded")}}),t.define("et-hero-video",class extends e{constructor(){var t;super(),this.video=this.querySelector("video"),this.toggleButton=this.querySelector(".hero__video-action-btn"),this.video&&(this.loadVideo(),this.video.addEventListener("canplaythrough",this.playVideo.bind(this)),this.video.addEventListener("play",this.syncButtonToPlaying.bind(this)),this.video.addEventListener("pause",this.syncButtonToPaused.bind(this)),null===(t=this.toggleButton)||void 0===t||t.addEventListener("click",this.togglePlayPause.bind(this)),this.syncButtonToVideoState())}syncButtonToVideoState(){var t;(null===(t=this.video)||void 0===t?void 0:t.paused)?this.syncButtonToPaused():this.syncButtonToPlaying()}loadVideo(){var t,e;if(!this.video)return;const i=null===(t=this.video)||void 0===t?void 0:t.querySelectorAll("source");for(const t of i)t.src=null!==(e=t.dataset.src)&&void 0!==e?e:"";this.video.load()}updateToggleButtonState(t){var e,i;if(!this.toggleButton)return;const o=null!==(e=this.toggleButton.getAttribute("data-pause-label"))&&void 0!==e?e:"Pause video",s=null!==(i=this.toggleButton.getAttribute("data-play-label"))&&void 0!==i?i:"Play video";t?(this.toggleButton.setAttribute("aria-label",o),this.toggleButton.setAttribute("title",o),this.toggleButton.setAttribute("data-state","playing")):(this.toggleButton.setAttribute("aria-label",s),this.toggleButton.setAttribute("title",s),this.toggleButton.setAttribute("data-state","paused"))}syncButtonToPlaying(){var t;null===(t=this.video)||void 0===t||t.setAttribute("active","true"),this.updateToggleButtonState(!0)}syncButtonToPaused(){var t;null===(t=this.video)||void 0===t||t.removeAttribute("active"),this.updateToggleButtonState(!1)}togglePlayPause(){this.video&&(this.video.paused?this.video.play():this.video.pause())}playVideo(){var t;null===(t=this.video)||void 0===t||t.play()}})})();

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.