1(()=>{var e={973(e,t,n){e.exports={...n(174)}},288(e,t,n){e.exports={...n(742)}},679(e,t,n){"use strict";n.d(t,{A:()=>r});const r={counts:function(e={},t){return t.error||void 0===t.payload||"SET_COUNTS"!==t.type?e:t.payload},moreRequestData:function(e={},t){return t.error||void 0===t.payload||"SET_MORE_REQUEST_DATA"!==t.type?e:t.payload}}},606(e){var t,n,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l,i=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?i=l.concat(i):u=-1,i.length&&p())}function p(){if(!c){var e=s(d);c=!0;for(var t=i.length;t;){for(l=i,i=[];++u<t;)l&&l[u].run();u=-1,t=i.length}l=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];i.push(new g(e,t)),1!==i.length||c||s(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},742(e,t,n){const{log:r}=n(437);e.exports={fatal:(e,t=null)=>{r("FATAL",e,t)},error:(e,t=null)=>{r("ERROR",e,t)},warn:(e,t=null)=>{r("WARN",e,t)},info:(e,t=null)=>{r("INFO",e,t)},debug:(e,t=null)=>{r("DEBUG",e,t)},trace:(e,t=null)=>{r("TRACE",e,t)}}},437(e,t,n){const{levels:r,colors:a,logLevel:o,stderrLevels:s}=n(812);r[o];e.exports={log:(e,t,n)=>{false}}},812(e,t,n){const r=n(606).env.LOG_LEVEL||"INFO",a={FATAL:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,TRACE:5},o=new Set;Object.keys(a).forEach(e=>{a[e]<a.INFO&&o.add(e)});e.exports={levels:a,logLevel:r,stderrLevels:o,colors:{FATAL:"red bold",ERROR:"red",WARN:"yellow",INFO:"green",DEBUG:"cyan",TRACE:"blue"}}},174(e){"use strict";e.exports=DDC.WsmCommonData}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=ReactDOM,t=React;var r=n.n(t);const a=ReactRedux;var o=n(973);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(null,arguments)}class l extends r().Component{constructor(e){super(e),this.renderDelegate=this.renderDelegate.bind(this)}renderDelegate({labels:e}){const{HeadingTag:t,headingText:n,widgetId:a,toggleCollapse:o,showIcon:l,headingClasses:i,iconClasses:c}=this.props,u=[...c];let d={};if(o){const e="ddc-icon-expand";u.push(e),u.push("icon-style-collapse"),d={role:"button","data-toggle":"collapse","data-target":`#${a}-collapse`,"data-expand-icon-class":`${e}`,"data-collapse-icon-class":"ddc-icon-collapse","aria-expanded":"false","aria-controls":`${a}-collapse`}}return r().createElement(t,s({className:i.join(" ")},d),l&&r().createElement(r().Fragment,null,r().createElement("i",{className:u.join(" ")})," "),e.getHTML(n))}render(){return this.props.headingText&&"FALSE"!==this.props.headingText.toUpperCase()?r().createElement(o.Common,{render:this.renderDelegate}):null}}l.defaultProps={HeadingTag:"h3",headingText:""};const i=l,c=e=>{const{id:t,children:n,toggleCollapse:a}=e;return a?r().createElement("div",{id:`${t}-collapse`,className:"collapse collapse-content"},n):n};c.defaultProps={toggleCollapse:!1};const u=c,d=()=>"undefined"!=typeof window&&window.newrelic&&"object"==typeof window.newrelic;var p=n(174);const g=(e,t,n,r)=>{e({element:t,result:`Navigated to ${n}`,elementCta:r})},h=({className:e,label:n,count:a,link:o,trackGa:s,name:l})=>{const{textColor:i,countTextSize:c,labelTextSize:u,animate:d}=(0,p.usePrefs)(),[h,m]=(0,t.useState)(!1),f=()=>{m(!h)};if(null===a)return null;const E=e.toLowerCase().replace(/_/g,"-"),y=r().createElement("div",{className:i},r().createElement("div",{className:`item-count ${c}`},a),r().createElement("div",{className:`item-label ddc-font-size-${u}`},n)),w="transition-property-transform transition-timing-function-standard transition-duration-lg",T=h?`${w} scale-110`:`${w} scale-100`;return"0"!==a?r().createElement("div",{className:`count-item p-2 ${d?`animate ${T}
1`:" "} item-${E}`,onClick:()=>{g(s,l,o,n)},onMouseEnter:f,onMouseLeave:f,role:"presentation"},o?r().createElement("a",{className:"item-link text-no-decoration",href:o},y):y):null};h.defaultProps={link:null};const m=h,f=({counts:e,trackGa:t})=>{const{paragraphLabel:n,paragraphTextSize:a,paragraphTextAlign:o,paragraphCountFontWeight:s,textColor:l}=(0,p.usePrefs)(),i=(0,p.useLabels)().get(n),c=i.match(/\{([^}]+)\}/g),u=`text-content-container ${a} ${o} ${l}`,d=`${s} ${l}`,h=[],m=(e,t)=>{e===c.length-1&&t.length>0&&h.push(r().createElement("span",{key:`string${e+1}`,dangerouslySetInnerHTML:{__html:t}}))};return c&&c.reduce((n,a,o)=>{let l=r().createElement("span",{key:`count${o}`},a);const i=e.filter(e=>e.name===a.replace("{","").replace("}",""))[0];if(i){const{count:e,name:n,link:a,label:c}=i;l=a?r().createElement("a",{key:`count${o}`,className:d,href:a,onClick:()=>{g(t,n,a,c)}},e):r().createElement("span",{key:`count${o}`,className:s},e)}const c=n.substring(n.indexOf(a)+a.length);return 0!==n.indexOf(a)?(h.push(r().createElement("span",{key:`string${o}`,dangerouslySetInnerHTML:{__html:n.substring(0,n.indexOf(a))}})),h.push(l),m(o,c),c):(h.push(l),m(o,c),n.substring(a.length))},i),r().createElement("p",{className:u},h)};f.defaultProps={};const E=f;function y(e,t="en_US"){return"undefined"!=typeof Intl&&Intl.NumberFormat?"number"!=typeof e?"":new Intl.NumberFormat(t.replace("_","-")).format(e):e.toString()}const w=({counts:e})=>{const t=(0,p.useSitemap)(),n=(0,p.useLabels)(),{windowId:a,locale:o}=(0,p.useRequestData)(),{allVehicleLabel:s,allVehicleLink:l,roundVehiclesTo:i,preownedVehicleLabel:c,preownedVehicleLink:u,certifiedVehicleLabel:d,certifiedVehicleLink:g,newVehicleLabel:h,newVehicleLink:f,displayStyle:w,makeLabel:T,makeLink:v,makeCount:S,dealershipLabel:C,dealershipLink:L,dealershipCount:b,showCounts:I}=(0,p.usePrefs)(),_=e=>{if("undefined"!=typeof window){const t=window.DDC||{},n={event:"widgetUserEvent",widgetName:"ws-inv-count-display",widgetId:a,widgetState:"default",element:"",action:"clicked",result:"",elementCta:""};t.fireTrackingEvent&&t.fireTrackingEvent({...n,...e})}},N=(e,r,a,s)=>{const l={};return l.label=n.get(e),l.link=t.get(r),l.count=a?((e,t,n)=>{if(t>1){const r=Math.floor(e/t)*t,a=y(r,n);return r<e?`${a}+`:a}return y(e,n)})(parseInt(a,10),s,o):null,l},D=I.split(",").reduce((t,n)=>{let a={};switch(n){case"ALL_VEHICLES":a=N(s,l,e&&e[n],i);break;case"USED_VEHICLES":a=N(c,u,e&&e[n],i);break;case"NEW_VEHICLES":a=N(h,f,e&&e[n],i);break;case"CERTIFIED_VEHICLES":a=N(d,g,e&&e[n],i);break;case"MAKES":a=N(T,v,S,1);break;default:a=N(C,L,b,1)}return"Paragraph"===w?t.push({name:n,count:a.count,link:a.link}):t.push(r().createElement(m,{key:n,className:n,label:a.label,count:a.count,link:a.link,trackGa:_,name:n})),t},[]);return"Paragraph"===w?r().createElement(E,{counts:D,trackGa:_}):r().createElement("div",{className:"d-flex flex-wrap justify-content-around text-center pt-3 pb-4 m-3"},D)},T=DDC.Hysterics;var v=n(288),S=n.n(v);const C={NEW_VEHICLES:0,CERTIFIED_VEHICLES:0,USED_VEHICLES:0,ALL_VEHICLES:0},L={isLoading:!0,errorMsg:null},b=(0,T.hysteriFetch)("ws-inv-count-display-get-counts"),I=(e,t)=>{switch(t.type){case"GET_COUNTS_INIT":return{...e,isLoading:!0,errorMsg:null};case"GET_COUNTS_SUCCESS":case"GET_COUNTS_FAILURE":return{...e,isLoading:!1,errorMsg:t.payload.errorMsg,counts:t.payload.counts};default:return{...e}}},_=()=>{const{moreRequestData:{parameterMap:e,siteId:n}}=(0,a.useSelector)(e=>e),r=(0,p.useFlags)(),o=(0,p.usePrefs)(),s=r["ws-inv-count-display-use-wis"],{inventoryCountAccounts:l}=o;let i=e?.siteId||n;""!==l&&s&&(i=l);const c=r["ws-inv-count-display-fetch-timeout"],u=o["listing.config.id"],[d,g]=(0,t.useReducer)(I,L);return(0,t.useEffect)(()=>{(async()=>{g({type:"GET_COUNTS_INIT"});try{let e;e=s?await b(`/api/widget/ws-inv-count-display/inventory-counts?siteId=${i}&listingConfigId=${u}`,{method:"GET"},{[T.wrappers.circuitBreaker.contextKey]:{timeout:2*c},[T.wrappers.timeout.contextKey]:{timeout:2*c}}):await b(`/api/widget/ws-inv-count-display/getCounts/${i}/${u}`,{method:"GET",timeout:c,headers:{Accept:"application/vnd.dealer.freeformsearch.v1+json","Cache-Control":"no-cache",Connection:"keep-alive"}}),g({type:"GET_COUNTS_SUCCESS",payload:e})}catch(e){S().error(`ws-inv-count-display getCounts failure. ${e}`),g({type:"GET_COUNTS_FAILURE",payload:{counts:C,errorMsg:e}})}})()},[]),d},N=()=>{const{countTextSize:e,labelTextSize:t}=(0,p.usePrefs)();return r().createElement("div",{"data-testid":"placeholder-container",className:"pt-3 pb-4 m-3"},r().createElement("div",{className:`item-count ${e}`},r().createElement("div",{className:"invisible"},"0")),r().createElement("div",{className:`mt-3 item-label ddc-font-size-${t}`},r().createElement("div",{className:"invisible"},"labels")))},D=()=>{const{counts:e,isLoading:t,errorMsg:n}=_(),{displayStyle:a}=(0,p.usePrefs)();return t?"Paragraph"===a?null:r().createElement(N,null):n&&(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;d()&&window.newrelic.addPageAction(e,t)}("ws-inv-count-display count request failed.",{errorMsg:n}),"Paragraph"===a)?null:r().createElement(w,{counts:e})},k=(e,t,n)=>{const r=["ddc-content",t];return e&&r.push(e),n&&r.push("collapse-container"),r},x=(e,t,n)=>{const r=[],{widgetHeading:a,headingIconClasses:o,headingIconSize:s,headingIconStyle:l}=e;return a&&t&&(r.push("ddc-icon"),n||r.push(`ddc-icon-${l}`),s&&r.push(`ddc-icon-size-${s}`),o&&r.push(o)),r},R=(e,t,n)=>{const r=[],{headingSize:a,headingStyles:o,headingClasses:s}=e;return r.push("widget-heading"),"MOBILE"===t&&r.push("ddc-heading"),s&&r.push(s),a&&r.push(a),o&&r.push(`ddc-heading-${o}`),n&&r.push("collapse-heading"),r},A=({outputWrapperDiv:e,store:t,widgetId:n,widgetName:o})=>{const s=t.getState(),l=s.prefs||{},c=l.widgetHeading&&"true"===l.toggleCollapse||!1,d=!!l.headingIconStyle||c;const p=r().createElement(a.Provider,{store:t},r().createElement(i,{HeadingTag:l.headingTag,headingText:l.widgetHeading,widgetId:n,toggleCollapse:c,showIcon:d,headingClasses:R(l,s.requestData.deviceType,c),iconClasses:x(l,d,c)}),r().createElement(u,{id:n,toggleCollapse:c},r().createElement(D,null)));if(e){if(!o)throw new Error("widgetName is required if outputWrapperDiv is true.");return r().createElement("div",{id:`${n}-app-root`,className:k(l.widgetClasses,o,c).join(" "),"data-widget-name":o,"data-widget-id":n},p)}return p},O=RTK;const $=[],P={requestData:function(e={},t=null){return!t.error&&t.payload&&"WS_SCRIPTS_SET_REQUEST_DATA"===t.type?t.payload:e},prefs:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_SET_PREFS"!==t.type?e:t.payload},labels:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_ADD_LABELS"!==t.type?e:{...e,...t.payload}},sitemap:function(e={}
1,t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_ADD_SITEMAP"!==t.type?e:{...e,...t.payload}},flags:function(e={},t=null){return t.error||void 0===t.payload||"WS_SCRIPTS_SET_FEATURE_FLAGS"!==t.type?e:t.payload}};function U(e){const[t,r]=(()=>{let e={},t={};const r=[];try{e=n(679).A,r.push("../reducers")}catch(e){}try{t=Object(function(){var e=new Error("Cannot find module '../features'");throw e.code="MODULE_NOT_FOUND",e}()),r.push("../features")}catch(e){}return[{...e,...t},r]})();return(0,O.configureStore)({reducer:{...t,...P},middleware:e=>e().concat($),preloadedState:e})}const F={};(()=>{const t=(n="ws-inv-count-display",window.DDC&&window.DDC.WS&&window.DDC.WS.state&&window.DDC.WS.state[n]?window.DDC.WS.state[n]:{});var n;Object.keys(t).forEach(n=>{const r=U(((e,t)=>{let n=e[t];return"string"==typeof n&&(n=JSON.parse(n)),n})(t,n));F[n]=r,(0,e.hydrate)(React.createElement(A,{outputWrapperDiv:!1,store:r,widgetId:n}),document.getElementById(`${n}-app-root`)),delete t[n]})})()})()})(); 2//# sourceMappingURL=bundle.08d5beb67027d9af717b998525f4545b.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.