PageSourceSearch

https://www.mclartyauto.com/resources/doCtaControllerChunk.js?v=23…&h=084a635e6aeb3ba7b248

js mclartyauto.com collected 2026-09-28 08:21:12 UTC 4,638 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksite_client_side=self.webpackChunksite_client_side||[]).push([[791],{3393:(t,e,a)=>{a.r(e),a.d(e,{default:()=>f});const n={EXPAND:1,ARROW_LEFT:2,ARROW_RIGHT:3},s=1,c=2,o=3,r=4,i=5,l=6,u=[s,c,o,l];function d(t,e){if(t.iconclass)return t;switch(e){case n.EXPAND:t.iconclass="fa fa-chevron-down";break;case n.ARROW_LEFT:t.iconclass="fa fa-chevron-right";break;case n.ARROW_RIGHT:t.iconclass="fa fa-chevron-left"}return t}class f{constructor(t,e){this._element=t,this._config=e,this._tagList=["H1","H2","H3"],this.initialize()}initialize(){this.validateConfig()&&"gm"===this._config.oem&&this.generateHtmlForGm()}validateConfig(){let t=!0;return this._config.ctatype||(console.warn("DO-CTA does not contain the required ctaType attribute, and therefore will not be rendered."),t=!1),this._config.oem||(console.warn("DO-CTA does not contain the required oem attribute, and therefore will not be rendered."),t=!1),t}generateHtmlForGm(){this.setDataLoc();const t=function(t){let e=!0,a="",f="",h=0,b="";const g=t.ctatype.toLowerCase();switch(g){case"img":a="img",f="stat-image-link",h=c;break;case"imgbg":a="div",f="stat-image-link",h=o,t=function(t){return t.src&&(t.ctastyle?t.ctastyle+=` background-image:url('${t.src}');`:t.ctastyle=`background-image:url('${t.src}');`,t.src=""),t.class?t.class.includes("img-background")||(t.class+=" img-background"):t.class="img-background",t}(t);break;case"imgthumb":a="img",f="stat-thumbnail",h=c;break;case"text":a="a",f="stat-text-link",h=s;break;case"searchbtn":a="button",f="stat-search-button",h=s;break;case"btn":a="button",f="stat-button-link",h=s;break;case"tab":a="a",f="stat-tab-link",h=s;break;case"searchsubmit":a="button",f="stat-search-submit",h=s;break;case"close":a="button",f="stat-button-close",h=s;break;case"input":a="input",f="stat-input-field",h=l,t.type="text";break;case"radio":a="input",f="stat-radio",h=l,t.type="radio";break;case"checkbox":a="input",f="stat-checkbox",h=l,t.type="checkbox";break;case"dropdown":a="select",f="stat-dropdown",h=r,t=function(t){return function(t){if(t.options)return t.options=t.options.split(","),t}(t)}(t);break;case"arrowleft":f="stat-arrow-prev",h=i,t=d(t,n.ARROW_LEFT);break;case"arrowright":f="stat-arrow-next",h=i,t=d(t,n.ARROW_RIGHT);break;case"expand":f="stat-expand-icon",h=i,t=d(t,n.EXPAND);break;case"icon":f="stat-icon-link",h=i,t=d(t,-1);break;default:e=!1}if(!e)return console.warn(`The given ctaType value of ${g} is not valid. No element will be rendered`),"";switch(t=function(t,e){return t.class||(t.class=""),t.dataLoc||(t.dataLoc="",console.warn(`No data-loc attribute was generated for <do-cta> component ${t["component-id"]}`)),e==s&&(t.ctavalue||(t.ctavalue="",console.warn(`No ctaValue attribute exists for <do-cta> component ${t["component-id"]}`))),u.includes(e)&&(t.href||(t.href="",console.warn(`No href attribute exists for <do-cta> component ${t["component-id"]}`))),t}(t,h),b=function(t){let e="";const a=new Set(["ctatype","ctavalue","dataLoc","oem","class","style","iconclass","href"]),n=Object.keys(t);for(const s of n)if(!a.has(s)){const a=t[s];let n=s;"ctastyle"===s&&(n="style"),a&&(e+=` ${n}="${a}"`)}return e}(t),h){case s:{let e="";return t.href&&(e=`href=${t.href} `),function(t,e,a,n,s){return`<${e} ${n} class="${a} ${t.class}" data-loc="${t.dataLoc}" ${s}>${t.ctavalue}</${e}>`}(t,a,f,e,b)}case c:case o:return function(t,e,a,n){return`<a href="${t.href}"><${e} class="${a} ${t.class}" data-loc="${t.dataLoc}" ${n}></${e}></a>`}(t,a,f,b);case l:return function(t,e,a,n){return`<${e} class="${a} ${t.class}" data-loc="${t.dataLoc}" ${n}></${e}>`}(t,a,f,b);case r:return function(t,e,a){let n=`<select class="${e} ${t.class}" data-loc="${t.dataLoc}" ${a}">`;return t.options.forEach((function(t){n+=`<option value="${t}">${t}</option>`})),n+="</select>",n}(t,f,b);case i:return function(t,e,a){return`<a href="${t.href}" class="${e} ${t.class}" data-loc="${t.dataLoc}" ${a}><i class="${t.iconclass}"></i></a>`}(t,f,b)}}(this._config);this._element.outerHTML=t}setDataLoc(){if(this._config.dataLoc)return;let t=this._element;for(;!this.getHeadingTags(t)&&(t=this.getNextElement(t),t););}getNextElement(t){return t===this._element&&t.previousElementSibling?t.previousElementSibling:t.parentElement}getHeadingTags(t){var e;if(t.children)for(let a=0;a<t.children.length;a++){const n=t.children[a];if(this._tagList.includes(n.tagName))return this._config.dataLoc=null===(e=n.textContent)||void 0===e?void 0:e.toLowerCase(),!0}return!1}}}}]);
2//# sourceMappingURL=doCtaControllerChunk.js.map?v=23.116.0+20260924.10.cf1de5f1f4d4b9684c3a72f57e64cdbc99f7122f&h=084a635e6aeb3ba7b248

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.