PageSourceSearch

https://www.astonmartin.com/theme/10.3.52.0.4/assets/astonmartin/mjs/hover-video-block.bundle.js

js astonmartin.com collected 2026-10-01 09:10:29 UTC 9,002 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkaml=self.webpackChunkaml||[]).push([[9229],{14927:(e,t,o)=>{o.d(t,{A:()=>n});var i=o(76314),r=o.n(i)()((function(e){return e[1]}));r.push([e.id,'.video-hover{position:relative;display:block;width:100%;padding-bottom:50%}.video-hover video{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%}@media(min-width: 1024px){.video-hover video{-o-object-fit:cover;object-fit:cover}}.video-hover-block{position:relative;height:100%;padding-top:60px;padding-bottom:60px}@media(min-width: 768px){.video-hover-block{padding-top:10vw;padding-bottom:10vw}}@media(max-width: 1024px){.video-hover-block .container{max-width:100%}.video-hover-block .container [class*=col-]{padding-left:0;padding-right:0}}.video-hover-block .video-hover-card{display:flex;flex-direction:column;overflow:hidden;height:100%}.video-hover-block .video-hover{padding-bottom:100%;background:var(--darkGrey)}@media(orientation: landscape)and (max-width: 766px){.video-hover-block .video-hover{padding-bottom:66%}}@media(min-width: 1024px){.video-hover-block .video-hover{padding-bottom:66%}}.video-hover-block .copy{padding:24px 20px;display:flex;align-items:flex-start;justify-content:space-between;background:var(--darkGrey);height:100%}@media(min-width: 1024px){.video-hover-block .copy{padding:32px}}.video-hover-block .copy div:first-child{max-width:80%}.video-hover-block .copy h3{font-family:var(--ff-amflare);font-size:14px;line-height:20px;margin-bottom:8px;color:var(--white)}@media screen and (min-width: 1024px){.video-hover-block .copy h3{font-size:16px;line-height:24px}}@media screen and (min-width: 2560px){.video-hover-block .copy h3{font-size:21px;line-height:48px}}.video-hover-block .copy p{color:var(--almostWhite);font-weight:300}@media screen and (min-width: 2560px){.video-hover-block .copy p{font-size:18px;line-height:40px}}.video-hover-block .copy .btn{background:rgba(0,0,0,0);text-indent:-1000000px;width:24px;height:24px;position:relative;pointer-events:none;padding:0;outline:none;display:inline-block}.video-hover-block .copy .btn:focus,.video-hover-block .copy .btn:focus-visible{outline:none}.video-hover-block .copy .btn::before{content:"";width:100%;height:1px;position:absolute;margin-top:-0.5px;top:50%;left:0;background:var(--greyLight)}.video-hover-block .copy .btn::after{content:"";width:1px;height:100%;position:absolute;top:0;left:50%;margin-left:-0.5px;background:var(--greyLight)}.video-hover-block.var-white{background:var(--white)}.video-hover-block.var-white .video-hover{background:var(--almostBlack12)}.video-hover-block.var-white .copy{border-left:1px solid var(--almostBlack12);border-right:1px solid var(--almostBlack12);border-bottom:1px solid var(--almostBlack12);background:var(--white)}.video-hover-block.var-white .copy h3{color:var(--almostBlack)}.video-hover-block.var-white .copy p{color:var(--almostBlack)}.video-hover-block .preloader{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);transition:opacity .6s var(--ease-in-sine);opacity:1}.video-hover-block .preloader .spinner{width:60px;height:60px;animation:spin 1s linear infinite}.custom-cr{cursor:none !important}.custom-cursor{position:fixed;top:0;left:0;z-index:9999999;cursor:none !important;pointer-events:none}.cursor-plus span{width:58px;height:58px;background:var(--white);border-radius:100%;display:flex;align-items:center;justify-content:center;animation:grow-and-shrink 200ms;animation-timing-function:ease-in-out}@media screen and (min-width: 1920px){.cursor-plus span{width:72px;height:72px}}.cursor-plus span .icon{width:12px;height:12px;position:relative}@media screen and (min-width: 1920px){.cursor-plus span .icon{width:24px;height:24px}}.cursor-plus span .icon:before{content:"";width:100%;height:1px;position:absolute;margin-top:-0.5px;top:50%;left:0;background:var(--greyLight)}.cursor-plus span .icon::after{content:"";width:1px;height:100%;position:absolute;top:0;left:50%;margin-left:-0.5px;background:var(--greyLight)}.block>section.video-hover-block.var-dark{background:#121212}@keyframes grow-and-shrink{0%{transform:scale(0.8)}100%{transform:scale(1)}}@keyframes spin{100%{transform:rotate(360deg)}}',""]);const n=r},70108:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});
1var i=o(2131),r=o(85072),n=o.n(r),a=o(14927),d={insert:"head",singleton:!1};n()(a.A,d);a.A.locals;var s=o(72306);function c(e,t,o){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:String(i))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function l(e,t,o,i,r,n,a){try{var d=e[n](a),s=d.value}catch(e){return void o(e)}d.done?t(s):Promise.resolve(s).then(i,r)}function v(e){return function(){var t=this,o=arguments;return new Promise((function(i,r){var n=e.apply(t,o);function a(e){l(n,i,r,a,d,"next",e)}function d(e){l(n,i,r,a,d,"throw",e)}a(void 0)}))}}class h{constructor(e){this.el=e,this.video=e.querySelector("video"),this.carousel=e.classList.contains("carousel-tile"),this.carousel&&(this.image=e.querySelector("picture")),this.video&&this.lazyLoad()}initVideoHover(){if(window.matchMedia("(max-width: 1023px)").matches){var e=new i.Controller;new i.Scene({triggerElement:this.el,triggerHook:.75}).addTo(e).on("start",(e=>{"FORWARD"===e.scrollDirection?this.videoAnimationIn(this.el):this.videoAnimationOutMobile(this.el)}))}else this.el.addEventListener("mouseenter",(()=>{this.videoAnimationIn(this.el)})),this.el.addEventListener("mouseleave",(()=>{this.videoAnimationOut(this.el)})),this.carousel&&(this.video.style.display="none",this.video.addEventListener("ended",(()=>{this.video.style.display="none",this.image.style.display="block"})))}prepareSource(){var e=this;return v((function*(){var t="",o=e.video.querySelector("source");t=window.matchMedia("(max-width: 767px) and (orientation: portrait)").matches?o.getAttribute("data-video-normaldef"):o.getAttribute("data-video-highdef"),e.video.addEventListener("loadeddata",(()=>{e.discardPreloader()})),e.video.setAttribute("autoplay",!e.carousel),e.video.setAttribute("src",t),e.initVideoHover()}))()}preloadVideo(e){return v((function*(){var t=yield fetch(e),o=yield t.blob();return URL.createObjectURL(o)}))()}lazyLoad(){this.createPreloader();this.observer=new IntersectionObserver((e=>{[...e].forEach((e=>{e.isIntersecting&&(this.observer.disconnect(),this.prepareSource())}))}),{threshold:[.01,1],rootMargin:"100% 0% 100% 0%"}),this.observer.observe(this.video)}createPreloader(){this.video.insertAdjacentHTML("afterend",s.O)}discardPreloader(){var e=this.el.querySelector(".preloader");e.addEventListener("transitionend",(()=>{e.remove()})),setTimeout((()=>{e.style.opacity=0,this.video.style.opacity=1}),100)}videoAnimationIn(e){var t=e.querySelector("video");if(4===t.readyState||t.readyState>=2&&navigator.userAgent.match(/firefox|fxios/i)){this.carousel&&(this.video.style.display="block",this.image.style.display="none");var o=()=>{Math.round(t.currentTime)===Math.round(t.duration/2)&&(t.pause(),t.removeEventListener("timeupdate",o))};t.currentTime<=t.duration/2?(t.play(),t.addEventListener("timeupdate",o)):(t.currentTime=t.duration-t.currentTime,t.play(),t.addEventListener("timeupdate",o)),e.addEventListener("mouseleave",(()=>{t.removeEventListener("timeupdate",o)})),e.addEventListener("scroll",(()=>{t.removeEventListener("timeupdate",o)}))}}videoAnimationOut(e){var t=e.querySelector("video");4===t.readyState&&(t.paused,t.currentTime=t.duration-t.currentTime,t.play())}videoAnimationOutMobile(e){var t=e.querySelector("video");4===t.readyState&&t.play()}}class p{constructor(){c(this,"moveCursor",(e=>{var t=e.clientY,o=e.clientX;document.querySelector(".cursor-plus").style.transform="translate3d(".concat(o-25,"px, ").concat(t-25,"px, 0)")})),this.initCursorMove()}
1createCursor(){document.querySelector("body").insertAdjacentHTML("afterend",'<div class="custom-cursor cursor-plus"><span><i class="icon"></i></span></div>')}destroyCursor(){var e=document.querySelector(".cursor-plus");e.parentNode.removeChild(e)}initCursorMove(){document.querySelectorAll(".custom-cr").forEach((e=>{e.addEventListener("mouseenter",this.createCursor,this.moveCursor),e.addEventListener("click",this.destroyCursor),e.addEventListener("mouseleave",this.destroyCursor),e.addEventListener("mousemove",this.moveCursor)}))}}const u=new class{init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".video-hover-card";new p,e.querySelectorAll(t).forEach((e=>{try{new h(e)}catch(e){console.warn(e)}}))}}},72306:(e,t,o)=>{o.d(t,{O:()=>i});var i='<div class="preloader"><img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src="/-/media/assets/spinner.png" class="spinner" loading="lazy"></div>'}}]);

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.