PageSourceSearch

https://www.ford.nl/etc/designs/dse/dsefoe-core-components/clientl…onents_ts_components_tabs_tabs_module_ts.js

js ford.nl collected 2026-09-24 19:14:10 UTC 4,743 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdsefoe_core_components=self.webpackChunkdsefoe_core_components||[]).push([["async-dsefoe-core-components_ts_components_tabs_tabs_module_ts"],{483:(t,e,n)=>{n.r(e),n.d(e,{default:()=>b});var s=n(768),i=n.n(s),a=n(876),o=n(862);const r=function(){function t(t){this.element=t,this.tabsPanels=this.element.querySelectorAll(".cmp-tabs__tabpanel"),this.tabListGeneric=this.element.querySelector(".cmp-tabs__tablist-generic"),this.tabListHero=this.element.querySelector(".cmp-tabs__tablist-hero"),this.isHeroVideo=this.element.classList.contains("dse-tabs-hero-style"),this.tabContainer=this.isHeroVideo?this.tabListHero:this.tabListGeneric,this.tabMenuTabs=Array.from(this.tabContainer.querySelectorAll(".cmp-tabs__tab")),this.bindUIEvent(),this.handleHeroStyles()}return t.prototype.handleMouseNavigation=function(t){var e=t.target;this.toggleActiveTab(e)},t.prototype.toggleActiveTab=function(t){var e=t;this.tabMenuTabs.forEach((function(t){t.id===e.id?(t.classList.add(o.pz.ACTIVE_TAB),t.tabIndex=0,t.ariaSelected="true",t.scrollIntoView({behavior:"smooth",block:"nearest"})):(t.classList.remove(o.pz.ACTIVE_TAB),t.tabIndex=-1,t.ariaSelected="false")})),this.tabsPanels.forEach((function(t){var n=e.id.replace("-hero","");t.id.includes(n)?t.classList.add(o.pz.ACTIVE_TABPANEL):t.classList.remove(o.pz.ACTIVE_TABPANEL)})),document.dispatchEvent(new CustomEvent(o.pz.TAB_CLICK_EVENT))},t.prototype.setFocusToTabRight=function(t){if(t===this.tabMenuTabs[this.tabMenuTabs.length-1])this.tabMenuTabs[0].focus();else{var e=this.tabMenuTabs.findIndex((function(e){return e===t}));this.tabMenuTabs[e+1].focus()}},t.prototype.setFocusToTabLeft=function(t){var e;if(t===this.tabMenuTabs[0])e=this.tabMenuTabs[this.tabMenuTabs.length-1];else{var n=this.tabMenuTabs.findIndex((function(e){return e===t}));e=this.tabMenuTabs[n-1]}e.focus()},t.prototype.handleKeyboardNavigation=function(t){var e=t.key,n=t.target;if(n.classList.contains(o.pz.MENU_TAB))switch(e){case"Enter":this.toggleActiveTab(n);break;case"ArrowRight":this.setFocusToTabRight(n);break;case"ArrowLeft":this.setFocusToTabLeft(n)}},t.prototype.handleHeroStyles=function(){var t,e,n,s;this.isHeroVideo?(null===(t=this.tabListGeneric)||void 0===t||t.classList.add("hidden"),null===(e=this.tabListHero)||void 0===e||e.classList.remove("hidden"),this.tabsPanels&&this.tabsPanels.forEach((function(t){t.classList.remove("dse-grid__padding-to-grid-margin")}))):(null===(n=this.tabListGeneric)||void 0===n||n.classList.remove("hidden"),null===(s=this.tabListHero)||void 0===s||s.classList.add("hidden"),this.tabsPanels&&this.tabsPanels.forEach((function(t){for(var e=!1,n=0,s=o.pz.FULL_WIDTH_LIST;n<s.length;n++){var i=s[n];if(t.querySelector(".".concat(i))){e=!0;break}}e?t.classList.remove("dse-grid__padding-to-grid-margin"):t.classList.add("dse-grid__padding-to-grid-margin")})))},t.prototype.bindUIEvent=function(){var t=this;this.tabMenuTabs.forEach((function(e){e.addEventListener("click",t.handleMouseNavigation.bind(t)),e.addEventListener("keydown",t.handleKeyboardNavigation.bind(t))}))},t}();var c=function(t,e,n,s){return new(n||(n=Promise))((function(i,a){function o(t){try{c(s.next(t))}catch(t){a(t)}}function r(t){try{c(s.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,r)}c((s=s.apply(t,e||[])).next())}))},l=function(t,e){var n,s,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=r(0),o.throw=r(1),o.return=r(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(r){return function(c){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,r[0]&&(a=0)),a;)try{if(n=1,s&&(i=2&r[0]?s.return:r[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,r[1])).done)return i;switch(s=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,s=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],s=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}},u={name:"dse-tabs",selector:".tabs",init:function(t){return c(this,void 0,void 0,(function(){return l(this,(function(e){return[2,new r(t)]}))}))}};a.A.getAuthorStatus()||i().registerComponent(u);const b=u}}]);

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.