PageSourceSearch

https://www.prestonmazda.com/resources/pages/homepageCosmos/homepa….9.1438c351f0114d50b33068f234773d29b19a5961

js prestonmazda.com collected 2026-10-04 13:29:57 UTC 8,662 bytes, 2 lines download raw bytes

1(()=>{"use strict";var e,t,a={4011:(e,t,a)=>{a.d(t,{Z:()=>r});class r{constructor(e){this.initialize=()=>{this._tabs.forEach(((e,t)=>{0!==t||this._selectedTab?e!==this._selectedTab&&this.deselectTab(e):this.selectTab(e),e.addEventListener("click",this.onTabClick),e.addEventListener("keydown",this.onTabKeydown)}))},this.onTabClick=e=>{const t=e.currentTarget;this.deselectTab(this._selectedTab),this.selectTab(t);const a=this.getTabPanel(t);null==a||a.focus()},this.selectTab=e=>{this._selectedTab=e,this.setActiveDescendent(e.id),e.setAttribute("tabindex","0"),e.setAttribute("aria-selected","true"),e.parentElement.classList.add("active");const t=this.getTabPanel(e);null==t||t.removeAttribute("aria-hidden"),null==t||t.removeAttribute("hidden"),null==t||t.classList.add("active")},this.deselectTab=e=>{if(!e)return;e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected","false"),e.parentElement.classList.remove("active");const t=this.getTabPanel(e);null==t||t.setAttribute("hidden","hidden"),null==t||t.classList.remove("active")},this.setActiveDescendent=e=>{this._tabList.setAttribute("aria-activedescendent",e)},this.onTabKeydown=e=>{const t=this._tabs.indexOf(e.currentTarget);switch(e.key){case"Home":this._tabs[0].focus();break;case"End":this._tabs[this._tabs.length-1].focus();break;case"ArrowUp":case"ArrowLeft":t>0?this._tabs[t-1].focus():this._tabs[this._tabs.length-1].focus();break;case"ArrowDown":case"ArrowRight":t===this._tabs.length-1?this._tabs[0].focus():this._tabs[t+1].focus()}},this.getTabPanel=e=>{const t=e.getAttribute("aria-controls");return t?document.getElementById(t):null},this._tabList=e,this._tabList.querySelector("[data-toggle='tab']")||(this._tabs=Array.from(e.querySelectorAll("[role='tab']")),this._selectedTab=e.querySelector("[aria-selected='true']"),this._tabs.length>0&&this.initialize())}static setNewDefaultActiveTab(e){e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0"),e.parentElement.classList.add("active");const t=e.closest("[role='tablist']");null==t||t.setAttribute("aria-activedescendent",e.id),(null==t?void 0:t.querySelectorAll("[role='tab']")).forEach((t=>{t!==e&&(t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1"),t.parentElement.classList.remove("active"))}))}}function s(){document.querySelectorAll("[role='tablist']").forEach((e=>new r(e)))}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",s):s()},9483:(e,t,a)=>{a.d(t,{FT:()=>s,bI:()=>i});var r=function(e,t,a,r){return new(a||(a=Promise))((function(s,i){function n(e){try{c(r.next(e))}catch(e){i(e)}}function o(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(n,o)}c((r=r.apply(e,t||[])).next())}))};function s(e,t,a,s,...i){const n=(c=t)?"length"in c?Array.from(c):[c]:[],o=new IntersectionObserver((t=>{null==t||t.forEach((t=>r(this,void 0,void 0,(function*(){if(null==t?void 0:t.isIntersecting)try{const r=yield e();a&&new r.default(t.target,...i),o.unobserve(t.target)}catch(e){return console.error("An error occurred when trying to dynamically import a class."),void console.error(e)}}))))}),s);var c;n.forEach((e=>{o.observe(e)}))}function i(e,t){const a=document.querySelector(`${e}[aria-busy]`),r=document.querySelector(t);null==a||a.setAttribute("aria-busy","false"),null==r||r.remove()}}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return a[e].call(i.exports,i,i.exports,s),i.exports}s.m=a,s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,a)=>(s.f[a](e,t),t)),[])),s.u=e=>(({332:"searchByFilter",588:"homepageSearchWidgetCosmos",648:"searchByBudget",810:"searchByKeyword"}[e]||e)+"Chunk.js?v=23.118.0+20260929.9.1438c351f0114d50b33068f234773d29b19a5961&h="+{214:"d62eff35c7c48bfc86e2",320:"4203cdd535c088127d83",332:"3abc49e92b241aac74f4",588:"8f28c14ec24c2b70549d",648:"e40d011eddda42e66580",810:"8abfb70828bba05f95e9"}[e]),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}
1}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="site-client-side:",s.l=(a,r,i,n)=>{if(e[a])e[a].push(r);else{var o,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==a||u.getAttribute("data-webpack")==t+i){o=u;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",t+i),o.src=a),e[a]=[r];var h=(t,r)=>{o.onerror=o.onload=null,clearTimeout(b);var s=e[a];if(delete e[a],o.parentNode&&o.parentNode.removeChild(o),s&&s.forEach((e=>e(r))),t)return t(r)},b=setTimeout(h.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=h.bind(null,o.onerror),o.onload=h.bind(null,o.onload),c&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var a=t.getElementsByTagName("script");if(a.length)for(var r=a.length-1;r>-1&&!e;)e=a[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{var e={262:0,192:0};s.f.j=(t,a)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else{var i=new Promise(((a,s)=>r=e[t]=[a,s]));a.push(r[2]=i);var n=s.p+s.u(t),o=new Error;s.l(n,(a=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=a&&("load"===a.type?"missing":a.type),n=a&&a.target&&a.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+n+")",o.name="ChunkLoadError",o.type=i,o.request=n,r[1](o)}}),"chunk-"+t,t)}};var t=(t,a)=>{var r,i,[n,o,c]=a,l=0;if(n.some((t=>0!==e[t]))){for(r in o)s.o(o,r)&&(s.m[r]=o[r]);c&&c(s)}for(t&&t(a);l<n.length;l++)i=n[l],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},a=self.webpackChunksite_client_side=self.webpackChunksite_client_side||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),(()=>{var e=s(4011);class t{constructor(){this.tabButtonSelector="data-homepage-search-tab-pane",this.filterTabContent=document.querySelector(`[${this.tabButtonSelector}="filter"]`),this.keywordTabContent=document.querySelector(`[${this.tabButtonSelector}="keyword"]`),this.budgetTabContent=document.querySelector(`[${this.tabButtonSelector}="budget"]`),this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/i.test(navigator.userAgent),this.tabList=document.getElementById("shopByVehicleSearchNav"),this.activeTab=this.tabList.querySelector(".active"),document.querySelectorAll(".shop-by-vehicle__search .search-nav .search-nav__btn").forEach((e=>{this.addButtonIconImages(e)})),this.setDefaultTabForDevice()}checkForHiddenTabs(){this.isMobile?this.getValidTabsAndTagOrder("desktop"):this.getValidTabsAndTagOrder("mobile")}getValidTabsAndTagOrder(e){const t=document.getElementById("shopByVehicleSearchNav"),a=Array.from(t.getElementsByClassName("nav-item")),r=[];let s=0;for(const t of a)t.classList.contains(e)||(t.children[0].dataset.dotaggingElementOrder=s.toString(),r.push(t),s++);return s<2&&(this.tabList.style.justifyContent="center"),r}setNewActiveTab(t){const a=this.getValidTabsAndTagOrder(t)[0];a.classList.add("active"),e.Z.setNewDefaultActiveTab(a.children[0]);const r=a.children[0].dataset.homepageSearchTab,s=document.querySelector(`[data-homepage-search-tab-pane="${r}"]`);null==s||s.classList.add("active"),s.removeAttribute("hidden")}setDefaultTabForDevice(){if(this.isMobile&&this.activeTab.classList.contains("desktop")||!this.isMobile&&this.activeTab.classList.contains("mobile")){this.activeTab.classList.remove("active"),this.tabList.style.justifyContent="center";const e=this.activeTab.children[0].getAttribute("aria-controls"),t=document.getElementById(e);null==t||t.classList.remove("active"),null==t||t.setAttribute("hidden","true"),this.setNewActiveTab("desktop")}this.checkForHiddenTabs()}addButtonIconImages(e){const t=e.querySelector(".search-nav__img"),a=e.dataset.iconUrl;t.style["-webkit-mask-image"]=`url(${a}`}}var a=s(9483);new class{constructor(){new t,this.loadWidgetOnScroll()}loadWidgetOnScroll(){const e=document.querySelector("#homepageSearchWidgetCosmos");e&&(0,a.FT)((()=>s.e(588).then(s.bind(s,9194))),e,!0)}}})()})();
2//# sourceMappingURL=homepageSearchWidgetCosmosBundle.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.