PageSourceSearch

https://www.hotelcasadelmar.com/app/themes/azds-default/assets/scripts/blocks/hero-home.js?ver=1790884669

js hotelcasadelmar.com collected 2026-10-03 21:39:02 UTC 8,431 bytes, 2 lines download raw bytes

1!function(){"use strict";var e={2647:function(e,t,o){o.d(t,{K:function(){return a}});var s=o(8609);function a(e,t){const o=e.getBoundingClientRect();let a=88;if(window.innerWidth<s.f.md&&(a=48),o.top<a){const e=o.top+window.scrollY-a-t;window.scrollTo({top:e,behavior:"smooth"})}}},5511:function(e,t,o){function s(e,t=null,o={}){const s='<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 11 11" fill="none"><path d="M10.625 0.875V9.625C10.625 9.85706 10.5328 10.0796 10.3687 10.2437C10.2046 10.4078 9.98206 10.5 9.75 10.5H7.5625C7.33044 10.5 7.10788 10.4078 6.94378 10.2437C6.77969 10.0796 6.6875 9.85706 6.6875 9.625V0.875C6.6875 0.642936 6.77969 0.420376 6.94378 0.256282C7.10788 0.0921872 7.33044 0 7.5625 0H9.75C9.98206 0 10.2046 0.0921872 10.3687 0.256282C10.5328 0.420376 10.625 0.642936 10.625 0.875ZM3.0625 0H0.875C0.642936 0 0.420376 0.0921872 0.256282 0.256282C0.0921872 0.420376 0 0.642936 0 0.875V9.625C0 9.85706 0.0921872 10.0796 0.256282 10.2437C0.420376 10.4078 0.642936 10.5 0.875 10.5H3.0625C3.29456 10.5 3.51712 10.4078 3.68122 10.2437C3.84531 10.0796 3.9375 9.85706 3.9375 9.625V0.875C3.9375 0.642936 3.84531 0.420376 3.68122 0.256282C3.51712 0.0921872 3.29456 0 3.0625 0Z" fill="white"/></svg>',a='<svg xmlns="http://www.w3.org/2000/svg" width="10" height="12" viewBox="0 0 10 12" fill="none"><path d="M9.625 5.68777C9.62536 5.83632 9.58727 5.98243 9.51444 6.1119C9.44161 6.24136 9.33652 6.34978 9.20938 6.4266L1.33 11.2468C1.19716 11.3281 1.04501 11.3725 0.889261 11.3754C0.733517 11.3783 0.579827 11.3395 0.444063 11.2632C0.309591 11.188 0.197573 11.0783 0.119527 10.9455C0.0414813 10.8127 0.000224688 10.6614 0 10.5074V0.868164C0.000224688 0.714101 0.0414813 0.562878 0.119527 0.430046C0.197573 0.297215 0.309591 0.187568 0.444063 0.112382C0.579827 0.0360104 0.733517 -0.00273412 0.889261 0.000150033C1.04501 0.00303418 1.19716 0.0474425 1.33 0.128789L9.20938 4.94894C9.33652 5.02577 9.44161 5.13418 9.51444 5.26365Q9.58727 5.39312 9.625 5.68777Z" fill="white"/></svg>',n=o.player||null,i=e=>n?n.paused():e.paused,r=e=>n?n.play():e.play(),l=(e,t,o)=>{n?n.on(t,o):e.addEventListener(t,o)};e.forEach((e,o)=>{if(e.closest(".video-wrapper-accessible"))return;!n&&e.hasAttribute("controls")&&e.hasAttribute("autoplay")&&e.removeAttribute("controls"),e.id||(e.id=`accessible-video-${t??o}`);const d="absolute"===window.getComputedStyle(e).position,c=e.closest(".hero-home"),u=e.classList.contains("hero__video-background")||"hero-background-video"===e.id||e.closest(".hero__video-background-outer"),h=document.createElement("div");h.className="video-wrapper-accessible";let p=null;u?(h.classList.add("video-wrapper-accessible--hero"),p=e.closest(".hero__slide-outer")||e.closest(".swiper-slide"),p&&p.classList.add("hero-slide-accessible-video")):c?(h.classList.add("video-wrapper-accessible--absolute"),p=c):d&&h.classList.add("video-wrapper-accessible--absolute"),e.parentNode.insertBefore(h,e),h.appendChild(e);const m=document.createElement("button");m.type="button",m.className="video-pause-control",m.setAttribute("aria-controls",e.id);const v=()=>{const t=m.querySelector(".video-pause-control__icon");t&&(i(e)?(m.setAttribute("aria-label","Play video"),m.setAttribute("aria-pressed","false"),t.innerHTML=a):(m.setAttribute("aria-label","Pause video"),m.setAttribute("aria-pressed","true"),t.innerHTML=s))},y=()=>{let t=(e=>n?n.readyState():e.readyState)(e)>=3;c&&(e.classList.contains("hero-home__media-default")?e.classList.contains("hero-home__media-default--hide")&&(t=!1):e.classList.contains("hero-home__media")&&(e.classList.contains("hero-home__media--active")||(t=!1))),t?(m.style.opacity="",m.style.pointerEvents="",m.style.zIndex="100",c?m.setAttribute("tabindex","-1"):m.removeAttribute("tabindex"),m.proxyBtn&&m.proxyBtn.removeAttribute("tabindex")):(m.style.opacity="0",m.style.pointerEvents="none",m.style.zIndex="-1",m.setAttribute("tabindex","-1"),m.proxyBtn&&m.proxyBtn.setAttribute("tabindex","-1"))};if(m.innerHTML=`<span class="video-pause-control__icon">${i(e)?a:s}</span>`,v(),y(),c&&new MutationObserver(y).observe(e,{attributes:!0,attributeFilter:["class","style"]}),c){const t=e.dataset.heroHomeNavItem;let o=null;if(t){const e=c.querySelector(`.hero-home__nav-item[data-hero-home-nav-item="${t}"]`);e&&(o=e.querySelector(".hero-home__nav-content"))}const s=c.parentNode;"static"===window.getComputedStyle(s).position&&(s.style.position="relative"),s.appendChild(m),m.style.position="absolute",m.style.bottom="auto";const a=()=>{const e=c.offsetHeight;m.style.top=e-52+"px"};if(a(),window.addEventListener("resize",a),o){const e=document.createElement("button");e.type="button",e.className="video-pause-proxy",e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.margin="-1px",e.style.overflow="hidden",e.style.clip="rect(0, 0, 0, 0)",e.style.whiteSpace="nowrap",e.style.border="0",m.proxyBtn=e,o.parentNode.insertBefore(e,o.nextSibling);const t=()=>{"0"===m.style.opacity?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex")};new MutationObserver(t).observe(m,{attributes:!0,attributeFilter:["style"]}),t(),e.addEventListener("focus",()=>{m.focus()}),m.addEventListener("keydown",t=>{if("Tab"===t.key)if(t.preventDefault(),t.shiftKey)o.focus();else{const t=Array.from(document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not
1([tabindex="-1"])'));let o=null;for(let s=t.indexOf(e)+1;s<t.length;s++)if(t[s]!==m&&!t[s].classList.contains("video-pause-control")){o=t[s];break}o&&o.focus()}})}m.setAttribute("tabindex","-1")}else u&&p?p.appendChild(m):h.appendChild(m);const b=r(e);void 0!==b&&"function"==typeof b.catch&&b.catch(()=>{v()}),l(e,"play",v),l(e,"pause",v),l(e,"canplay",y),l(e,"playing",y),l(e,"waiting",y),m.addEventListener("click",()=>{i(e)?r(e):(e=>{n?n.pause():e.pause()})(e)})})}o.d(t,{o:function(){return s}}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{s(document.querySelectorAll("video[autoplay]"))}):s(document.querySelectorAll("video[autoplay]"))},8609:function(e,t,o){o.d(t,{f:function(){return s}});const s={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400}}},t={};function o(s){var a=t[s];if(void 0!==a)return a.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,o),n.exports}o.d=function(e,t){for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var s=o(2647),a=o(5511);const n="hero-home__nav-item--active",i="hero-home__media--active",r="hero-home__media-default--hide";document.querySelectorAll(".hero-home").forEach(function(e){const t=e.querySelectorAll("[data-hero-home-nav-item]"),o=e.querySelectorAll(".hero-home__nav-content"),a=e.querySelector("[data-hero-home-media-default]");let l=null;function d(t){const o=t.dataset.heroHomeNavItem;if(l!==o){const s=e.querySelector(`.${n}`);s&&s.classList.remove(n),t.classList.add(n);const d=e.querySelector(`.${i}`);d&&d.classList.remove(i);const c=e.querySelector(`[data-hero-home-nav-item='${o}']`);c&&c.classList.add(i),l=o,a.classList.add(r)}else if(!l){t.classList.add(n);const s=e.querySelector(`[data-hero-home-nav-item=${o}]`);s&&s.classList.add(i),l=o,a.classList.add(r)}}t.forEach(e=>{e.addEventListener("mouseenter",e=>{d(e.target)})}),o.forEach(t=>{t.addEventListener("focus",t=>{const o=t.target.closest(".hero-home__nav-item");d(o);let a=0;e.querySelector(".hero-home__nav").querySelector(`.${n}`)&&(a=20),(0,s.K)(o,a)})})});const l=window.matchMedia("(min-width: 768px)");function d(e){document.querySelectorAll("[data-poster-desktop]").forEach(t=>{if(e.matches){const e=t;e.poster=e.dataset.posterDesktop,"VIDEO-JS"===e.tagName&&(e.style.backgroundImage=`url('${e.dataset.posterDesktop}')`)}})}l.addEventListener("change",d),d(l),document.querySelectorAll(".hero-home video[data-hero-home-media-default]").forEach(e=>{const t=e.closest(".hero-home"),o=t&&t.querySelector(".cloudflare-video__poster");if(!o)return;const s=()=>o.classList.add("cloudflare-video__poster--hidden");!e.paused&&e.currentTime>0?s():e.addEventListener("playing",s,{once:!0})});const c=document.querySelectorAll(".hero-home video[data-hero-home-media-default], .hero-home video[data-hero-home-nav-item]");c.length&&(0,a.o)(c)}();
2//# sourceMappingURL=hero-home.js.map

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.