PageSourceSearch

https://www.astonmartin.com/theme/10.3.52.0.4/assets/astonmartin/mjs/derivative-switcher.bundle.js

js astonmartin.com collected 2026-10-01 09:03:40 UTC 9,224 bytes, 1 lines download raw bytes

1(self.webpackChunkaml=self.webpackChunkaml||[]).push([[948,9182,5737],{77831:(e,t,i)=>{"use strict";i.d(t,{A:()=>v});var a=i(76314),r=i.n(a),o=i(4417),n=i.n(o),l=i(91966),c=i.n(l),s=r()((function(e){return e[1]})),p=n()(c());s.push([e.id,'.derivative-switcher-popup{position:fixed;top:0px;left:0px;width:-moz-fit-content;width:fit-content;min-width:400px;display:flex;justify-content:center;flex-direction:column;border-radius:4px;border-top:1px solid rgba(255,255,255,.2);background:rgba(0,0,0,.6);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transform:translateX(-100%);opacity:0;height:100vh;transition:.65s ease-in-out;transition:opacity .3s,transform .3s}@media(max-width: 1023px){.derivative-switcher-popup{padding:0 16px;min-width:100vw;height:100%}}.derivative-switcher-popup.active{z-index:1999;opacity:1;display:flex;justify-content:flex-end;transform:translateX(0)}.derivative-switcher-popup.active ul{position:relative;display:flex;flex-direction:column;align-items:flex-start;bottom:0;padding:0px 80px 190px 80px;width:-moz-max-content;width:max-content}@media(min-width: 1024px)and (max-width: 1439px){.derivative-switcher-popup.active ul{padding:0px 104px 170px 56px}}@media(max-width: 1023px){.derivative-switcher-popup.active ul{overflow-y:auto;position:absolute;padding:40px 0 0 0;bottom:72px;display:flex;justify-content:center;height:calc(100vh - 112px);width:calc(100vw - 32px)}}@media(min-width: 768px)and (max-width: 1023px){.derivative-switcher-popup.active ul{align-items:center}}.derivative-switcher-popup.active ul li{list-style:none}.derivative-switcher-popup.active ul li:not(:last-child){margin-bottom:40px}@media(min-width: 1024px)and (max-width: 1439px){.derivative-switcher-popup.active ul li:not(:last-child){margin-bottom:32px}}@media(max-width: 1023px){.derivative-switcher-popup.active ul li{word-wrap:break-word}.derivative-switcher-popup.active ul li:not(:last-child){margin-bottom:48px}}.derivative-switcher-popup.active ul li a{display:inline-block;color:rgba(255,255,255,.5);font-size:24px;line-height:32px;letter-spacing:1px;font-family:"AstonMartinSans"}@media(max-width: 1023px){.derivative-switcher-popup.active ul li a{font-family:"AstonMartinFlare";font-size:32px;line-height:40px}}.derivative-switcher-popup.active ul li a:hover,.derivative-switcher-popup.active ul li a:focus{color:#fff}.derivative-switcher-popup.active ul li a.active{font-size:54px;color:#fff;font-family:"AstonMartinFlare";font-style:normal;font-weight:400;line-height:70px}.derivative-switcher-popup.active ul li a.active::after{position:relative;content:url('+p+");color:#fff;padding-left:24px}@media(max-width: 1023px){.derivative-switcher-popup.active ul li a.active::after{position:absolute;content:url("+p+')}}@media(max-width: 1023px){.derivative-switcher-popup.active ul li a.active{font-size:32px;font-family:"AstonMartinFlare"}}.derivative-switcher-popup.active .derivative-switcher-close{position:absolute;left:48px;top:20px;background-color:rgba(0,0,0,0);fill:#fff;cursor:pointer;z-index:2000}@media(max-width: 1023px){.derivative-switcher-popup.active .derivative-switcher-close{position:absolute;display:block;padding:0px 16px;border-radius:2px;box-shadow:0px 1px 3px 0px rgba(18,18,18,.2),0px -1px 0px 0px rgba(18,18,18,.08) inset,0px 1px .5px 0px rgba(255,255,255,.12) inset;-webkit-backdrop-filter:blur(35px);backdrop-filter:blur(35px);background:rgba(255,255,255,.15);height:40px;left:50%;transform:translate(-50%);top:calc(100% - 72px)}}',""]);const v=s},4417:e=>{"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},91966:e=>{e.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3e %3cpath d='M20 6L9 17L4 12' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e"},64883:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DerivativeSwitcher:()=>s,derivativeSwitcherController:()=>p});var a=i(53479),r=i(85072),o=i.n(r),n=i(77831),l={insert:"head",singleton:!1};o()(n.A,l);n.A.locals;function c(e,t,i){var a;return(t="symbol"==typeof(a=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?a:String(a))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class s{constructor(){c(this,"closeDerivativeSwitcher",(()=>{this.derivativeModalClose()})),c(this,"openDerivativeSwitcher",(()=>{this.toggleDerivativeSwitcher("none");this.derivativeSwitcherPopup.classList.contains("active")?this.closeDerivativeSwitcher():(this.derivativeSwitcherPopup.classList.add("active"),a.globalDatalayer.pushToDataLayer({event:"expand_derivative_selector_click"}),document.querySelector("body").classList.add("overlay-active"),this.derivativeSwitcherClose.addEventListener("click",this.closeDerivativeSwitcher),document.body.addEventListener("click",this.closeDerivativeSwitcher))})),this.derivativeSwitcherOpen=document.querySelectorAll(".derivative-switcher"),this.derivativeSwitcherPopup=document.querySelector(".derivative-switcher-popup"),this.derivativeSwitcherClose=this.derivativeSwitcherPopup.querySelector(".derivative-switcher-close"),this.heroDerivativeSelector=".hero-carousel-content_title.derivative-switcher",this.derivativeSwitcherPopup.addEventListener("click",(e=>{"a"===e.target.tagName.toLowerCase()&&e.target.classList.contains("active")||e.stopPropagation()}))}derivativeModalClose(){this.toggleDerivativeSwitcher("block"),this.derivativeSwitcherPopup.classList.remove("active"),document.querySelector("body").classList.remove("overlay-active"),a.globalDatalayer.pushToDataLayer({event:"collapse_ derivative_selector_click"}),this.derivativeSwitcherClose.removeEventListener("click",this.closeDerivativeSwitcher),document.body.removeEventListener("click",this.closeDerivativeSwitcher)}toggleDerivativeSwitcher(e){document.querySelectorAll(this.heroDerivativeSelector).forEach((t=>{t.style.display=e}))}
1pushDataLayerOnClick(e){var t={event:"model_click",model:e.getAttribute("data-derivative-name")||null};a.globalDatalayer.pushToDataLayer(t)}init(){this.derivativeSwitcherPopup.querySelector("ul").addEventListener("click",(e=>{"a"!==e.target.tagName.toLowerCase()||e.target.classList.contains("active")||this.pushDataLayerOnClick(e.target)})),this.derivativeSwitcherOpen.forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),this.openDerivativeSwitcher()}))}))}}var p=new s},53479:(e,t,i)=>{"use strict";function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?a(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t,i){var a;return(t="symbol"==typeof(a=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?a:String(a))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.r(t),i.d(t,{globalDatalayer:()=>n});var n=new class{constructor(){o(this,"globaldata",{})}init(){try{var e,t=JSON.parse(document.body.getAttribute("data-global-layer"))||{};this.globaldata=r({event:"page_info",url:window.location.pathname,page_name:document.title,device:document.body.getAttribute("data-device-type")},t),window.globalGALayer=this.globaldata,null===(e=window.engagePromise)||void 0===e||e.then((()=>{this.personalizeGlobalData=window.engage.globalPageViewEventData;var e={url:window.location.pathname};engage.pageView(this.personalizeGlobalData,e)}))}catch(e){console.warn("Unable to read data-global-layer attribute")}this.pushGlobalDataLayer()}pushGlobalDataLayer(){var e=()=>{var e=r({screen_resolution:"".concat(window.screen.width,"x").concat(window.screen.height),viewport_size:"".concat(window.innerWidth,"x").concat(window.innerHeight)},this.globaldata);window.dataLayer&&window.dataLayer.push(e)};"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,0)}pushToDataLayer(e){window.dataLayer&&e&&(window.dataLayer.push(r({},e)),this.pushGlobalDataLayer())}pushToPersonalizeDatalayer(e){if(window.engage&&e){var t=r({},e),i=t.event;delete t.event,this.personalizeGlobalData||(this.personalizeGlobalData=window.engage.globalPageViewEventData),window.engage.event(i,this.personalizeGlobalData,t)}}}}}]);

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.