PageSourceSearch

https://www.volvotrucks.fi/clientlibs-edge/production/20260917131920/shared/components/content/teaser.js

js volvotrucks.fi collected 2026-10-05 03:23:45 UTC 11,002 bytes, 5 lines download raw bytes

1(()=>{"use strict";var e,t,i,o,n,r,a={75434(e,t,i){i.d(t,{Ay:()=>n});var o=i(96115);function n(){window.adobeDataLayer=window.adobeDataLayer||[];let e=window.adobeDataLayer,t={...o.A.component.data.interaction},i=["h1","h2","h3","h4","h5","h6"];function n(i){let n,r=(Object.keys(n={...t,...i}).forEach(e=>{var t;return(""===(t=n[e])||null===t||Array.isArray(t)&&0===t.length)&&delete n[e]}),{event:o.A.component.events.interaction,_volvo:{universal:{web:{component:n}}},web:{webInteraction:{type:"other"}}});r&&e.push(r)}function r(){n(t)}return{init:function(e,i){t={...t,...i},e&&e.addEventListener("click",r)},interaction:n,getNearestHeading:function(e){let t="";return function e(o){if(!o)return"";let n=o.parentElement;if(!n)return"";if(t)return t;let r=[];return r=i.includes(n.tagName.toLowerCase())||n.classList.contains("font-volvo")?[n]:Array.from(n.querySelectorAll(i.join(", "))),n.classList.contains("root")?t="":0===r.length?e(n):t=r.at(-1)&&r.at(-1).textContent,t}(e)}}}},96115(e,t,i){i.d(t,{A:()=>n});let o={URL:"",language:"",name:"",milestone:"",type:""},n={application:{events:{interaction:"applicationInteraction"},data:{interaction:{name:"",stepNumber:"",stepName:"",subStep:"",action:"",selectedOptions:null,applicationInteraction:{value:1}}}},component:{events:{interaction:"componentInteraction"},data:{interaction:{parent:"",name:"",displayText:"",action:"",title:"",type:"",href:"",details:"",placement:"",selectedOptions:void 0,componentInteraction:{value:1}}}},form:{events:{error:"formSubmitError",success:"formSubmitSuccess",view:"formView"},data:{success:{formSubmitSuccess:{value:1}},error:{formSubmitError:{value:1}},view:{formView:{value:1}}}},download:{eventName:"fileDownload",fixedValues:{download:"download",downloadlist:"downloadlist",eventList:"eventlist",eventInformation:"event information",calendar:"calendar"}},scroll:{events:{interaction:"siteScroll"},data:{interaction:{siteScroll:{value:1},depth:""}},values:{percentages:[25,50,75,100]}},video:{events:{milestone:"videoMilestone",pause:"videoPause",play:"videoPlay"},data:{milestone:{...o,videoMilestone:{value:1}},pause:{...o,videoPause:{value:1}},play:{...o,videoPlay:{value:1}}},values:{milestones:[0,25,50,75,95]}},searchResultClick:{events:{searchResultClick:"searchResultClick"},data:{term:void 0,results:{numberPerPage:void 0,numberTotal:void 0,clickedResult:{index:void 0,title:void 0,url:void 0,category:void 0}},searchResultClick:{value:1},location:void 0,type:"QR"}},siteSearch:{events:{siteSearch:"siteSearch"},data:{autoComplete:{clicked:!1,value:void 0},term:void 0,results:{numberPerPage:void 0,numberTotal:void 0},siteSearch:{value:1},selectedOptions:void 0,location:void 0,type:"QR"}},attributes:{analyticsForm:"data-analytics-form"},selectors:{invalidFormControls:":invalid:not(form),vcdk-dropdown[error],vcdk-checkbox-group[error],vcdk-radio-group[error]",downloadLink:".eventlist__downloadLink"}}},92110(e,t,i){var o=i(38443),n=i(7967),r=i(48183),a=i(75434),s=i(10996),l=i(26203),d=i(42415),c=i(8246),u=i(40765),p=i(12259),v=i(17140),h=i(97503),m=i(14837),f=i(7859);let b={parent:void 0,name:"Teaser",displayText:"",action:"click",title:"",type:"Teaser",href:"",details:void 0,placement:"Body"},g={cmpTeaser:".cmp-teaser",collageBox:".collage__box",videoOvelayContainer:".video__overlay__container",videoOvelayButton:".video__overlay__button",imageLink:".img__link",videoLink:".video__link",imageContainer:".img__container",video:".img__asset__video",productCard:".teaser--product-card",teaser:".teaser",content:".cmp-teaser__content",description:".cmp-teaser__description",videoElement:"video",titleElement:".cmp-teaser__title",titleIcon:".cmp-teaser__title-icon",titleLink:".cmp-teaser__title-link",teaserVolvoCom:".teaser--com",carouselVolvoCom:".carousel--com"},y={active:"active",titleNoBreakWrapper:"cmp-teaser__title-no-break",productCard:"teaser--product-card"},k="poster";class L extends o.A{constructor(e,t){super(e,t),this.init()}init(){(0,r.A)(this.el),this.setRefs(),function(e){var t;let{context:i,mode:o="",onBreakpointChange:n}=e,r=i?.classList.contains(m.classVCDKModeDark)||!!i&&Array.from(i.classList).some(e=>e.includes("text--white")||e.includes("text-color--white")),a=i?.classList.contains(m.classVCDKModeLight),s=i?.classList.contains(m.classVCDKModeInherit),l=(0,p.bG)(),d=(t=r?"dark":"light",o||t);i&&function(){let e,t=(e=i.parentNode,e?.tagName.toLowerCase()==="vcdk-theme-provider"?e:null);if(r===a&&t){let e=t.parentNode;e.insertBefore(i,t),e.removeChild(t)}if((r!==a||o)&&!s){if(t)t.classList="",t.classList.add(...i.classList,`vcdk-theme-${l}`),t.themeId=`${l}-${d}`;else{let e,t;e=(0,c.U9)({class:m.classVCDKThemeProviderEditorial,[v.attributeVCDKMode]:d,themeId:`${l}-${d}`}),(t=(0,u.qg)(`<vcdk-theme-provider ${e}></vcdk-theme-provider>`)).classList.add(...i.classList),i.classList="",i.parentNode.insertBefore(t,i),t.appendChild(i)}n&&(0,h.Tg)([480,768,960],n)}}()}({context:this.teaser,mode:this.getTeaserVCDKMode()}),this.setTeaserHeightInCollage(),function(e,t,i){var o,n;let r,a,s,l=e.querySelector(t.titleElement),d=l?.querySelector(t.titleIcon);if(!l||!d||(0,f.V)())return;let c=(o=t.titleLink,l.querySelector(o)||l),u=(r=c.textContent.trim())?r.split(/\s+/):null;if(!u)return;let p=u.slice(0,-1).join(" "),v=u[u.length-1];d.remove();let h=(n=i.titleNoBreakWrapper,(a=document.createElement("span")).className=n,(s=document.createElement("span")).textContent=v,a.appendChild(s),a.appendChild(d),a);p?c.textContent=`${p} `:c.textContent="",c.appendChild(h)}(this.el,g,y),this.addEventListeners(),this.setCTAURL(),this.initTeaserHeightListener(),this.analytics=(0,a.Ay)()}getTeaserVCDKMode(){return this.el.closest(g.collageBox)||this.el.closest(g.teaserVolvoCom)&&!this.el.closest(g.carouselVolvoCom)||this.options.isTextWhite?"dark":""}setRefs(){this.imgLink=this.find(g.imageLink),this.imageContainer=this.find(g.imageContainer),this.video=this.find(g.video),this.videoLink=this.find(g.videoLink),this.productCard=this.el.classList.contains(y.productCard)?this.el:null,this.teaser=this.el.closest(g.teaser),this.descriptions=this.el.querySelectorAll(g.description)}setCTAURL(){if(this.options.CTAURL&&this.options.isTeaserHero)if(this.imgLink)this.imgLink.href=this.options.CTAURL,this.toggleExter
1nalLink(this.imgLink);else if(!this.video&&this.imageContainer){var e;let t,i,o=this.imageContainer.innerHTML;this.imageContainer.innerHTML=(t=(e={link:this.options.CTAURL,body:o,isInternalLink:this.options.isInternalLink}).isInternalLink?"":'target="_blank"',i=`
2        <a class="img__link" href="${e.link}" data-cmp-hook-image="link" ${t}>
3            ${e.body}
4        </a>
5    `,(0,d.r)(i)(e))}else this.videoLink&&(this.videoLink.href=this.options.CTAURL,this.toggleExternalLink(this.videoLink))}toggleExternalLink(e){this.options.isInternalLink?e.removeAttribute("target"):e.setAttribute("target","_blank")}setTeaserHeightInCollage(){let e=this.el.closest(g.collageBox);if(e){let t=this.el.querySelector(g.cmpTeaser);t&&t.style.setProperty("--teaser-height",`${e.offsetHeight}px`)}}initTeaserHeightListener(){(0,h.Tg)([480,768,960],()=>{this.setTeaserHeightInCollage()})}onTeaserVideoInitialized({target:e,detail:t}){let{callbacks:i,viewerModifiers:o}=t,{hideControls:n}=i,r=e.querySelector(g.videoElement),a=r?.getAttribute(k),s=a?.replace(/&wid=\d+/,"");if(r?.setAttribute(k,s),o.loop){this.playIndicator=(0,l.A)(e),n();let t=e.closest(g.videoOvelayContainer);if(t&&1){let e=t.querySelector(g.videoOvelayButton);e&&(e.style.pointerEvents="none")}}}onClick({target:e}){let t=e.href?e:e.closest("a")||null;t&&this.analytics.interaction({...b,...this.options.analyticsData,...{displayText:t.textContent?.replace(/\s+/g," ").trim()||""}})}addEventListeners(){this.el.addEventListener(s.DM_VIDEO_INITIALIZED,this.onTeaserVideoInitialized.bind(this)),this.el.addEventListener("click",this.onClick.bind(this)),this.productCard&&(this.productCard.addEventListener("touchstart",()=>{this.productCard.classList.add(y.active)}),this.productCard.addEventListener("touchend",()=>{this.productCard.classList.remove(y.active)}))}}(0,n.kz)({Teaser:L})},99302(e,t,i){i.d(t,{K:()=>o});let o={tagName:"vcdk-icon-button",attributes:{icon:"icon",filled:"filled",size:"size",variant:"variant",disabled:"disabled",href:"href",download:"download",hreflang:"hreflang",ping:"ping",referrerPolicy:"referrerPolicy",rel:"rel",target:"target",form:"form",formaction:"formaction",formenctype:"formenctype",formmethod:"formmethod",formnovalidate:"formnovalidate",formtarget:"formtarget",name:"name",type:"type",value:"value",tabIndex:"tabIndex",autofocus:"autofocus",buttonRole:"button-role",buttonAriaLabel:"button-aria-label",buttonAriaControls:"button-aria-controls",buttonAriaExpanded:"button-aria-expanded",buttonAriaHaspopup:"button-aria-haspopup"},properties:{buttonAriaLabel:"buttonAriaLabel",buttonRole:"buttonRole",buttonAriaControls:"buttonAriaControls",buttonAriaExpanded:"buttonAriaExpanded",buttonAriaHaspopup:"buttonAriaHaspopup"},selectors:{component:"vcdk-icon-button"}}}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={exports:{}};return a[e].call(i.exports,i,i.exports,l),i.exports}l.m=a,l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(i,o){if(1&o&&(i=this(i)),8&o||"object"==typeof i&&i&&(4&o&&i.__esModule||16&o&&"function"==typeof i.then))return i;var n=Object.create(null);l.r(n);var r={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&i;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{r[e]=()=>i[e]});return r.default=()=>i,l.d(n,r),n},l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.e=()=>Promise.resolve(),l.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i=[],l.O=(e,t,o,n)=>{if(t){n=n||0;for(var r=i.length;r>0&&i[r-1][2]>n;r--)i[r]=i[r-1];i[r]=[t,o,n];return}for(var a=1/0,r=0;r<i.length;r++){for(var t=i[r][0],o=i[r][1],n=i[r][2],s=!0,d=0;d<t.length;d++)(!1&n||a>=n)&&Object.keys(l.O).every(e=>l.O[e](t[d]))?t.splice(d--,1):(s=!1,n<a&&(a=n));if(s){i.splice(r--,1);var c=o();void 0!==c&&(e=c)}}return e},l.rv=()=>"1.7.11",l.j="7451",o={7451:0},l.O.j=e=>0===o[e],n=(e,t)=>{var i,n,r=t[0],a=t[1],s=t[2],d=0;if(r.some(e=>0!==o[e])){for(i in a)l.o(a,i)&&(l.m[i]=a[i]);if(s)var c=s(l)}for(e&&e(t);d<r.length;d++)n=r[d],l.o(o,n)&&o[n]&&o[n][0](),o[n]=0;return l.O(c)},(r=self.webpackChunkvolvo_fe_build=self.webpackChunkvolvo_fe_build||[]).forEac
5h(n.bind(null,0)),r.push=n.bind(null,r.push.bind(r)),l.ruid="[email protected]";var d=l.O(void 0,["8263"],()=>l(92110));d=l.O(d)})();

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.