1"use strict"; 2var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 return new (P || (P = Promise))(function (resolve, reject) { 5 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 }); 10}; 11class ConsumerReports { 12 constructor() { 13 this.markIds = {}; 14 this.initialize(); 15 if (document.querySelector('.consumerReports[data-cr-is-vdp="true"]')) { 16 void this.startAsync(); 17 } 18 document.addEventListener("do.vehicleloadend", () => this.startAsync()); 19 } 20 startAsync() { 21 return this.processElementsAsync(); 22 } 23 initialize() { 24 let ss; 25 (function (w, d, s, o, f, js, fjs) { 26 w['JS-Widget'] = o; 27 w[o] = w[o] || function () { 28 (w[o].q = w[o].q || 29 []).push(arguments); 30 }; 31 js = d.createElement(s), (ss = 32 document.getElementsByTagName("script")), (fjs = ss[ss.length - 1]); 33 js.id = o; 34 js.src = f; 35 js.async = 1; 36 fjs.parentNode.insertBefore(js, fjs); 37 }(window, document, 'script', 'tw', 'https://ygscdn.azureedge.net/CR/widget.js')); 38 window.tw('init', null); 39 } 40 processElementsAsync() { 41 return __awaiter(this, void 0, void 0, function* () { 42 const elements = Array.from(document.querySelectorAll('.consumerReports:not(:has(div[id^="trustmark-wrapper-"]))')); 43 for (const element of elements) { 44 const oem = element.dataset.oem; 45 const id = element.id; 46 const isInitialized = element.dataset.initialized; 47 if (!isInitialized) { 48 const type = Number.parseInt(element.dataset.type) || 1; 49 this.initializeTrustmark(element, id, oem, type); 50 } 51 } 52 }); 53 } 54 initializeTrustmark(element, id, oem, type) { 55 const markId = id.split('-')[0]; 56 let width = 300; 57 switch (oem) { 58 case "subaru": 59 case "volkswagen": 60 width = 90; 61 break; 62 } 63 window.tw('trustmark', { 64 trustmarkNumber: markId, 65 type: type, 66 containerId: id, 67 width: width, 68 }); 69 element.dataset.initialized = "true"; 70 } 71} 72DoUtility.SelfInstantiateOnLoad(ConsumerReports); 73//# sourceMappingURL=consumerReports.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.