PageSourceSearch

https://www.toyota.com/etc.clientlibs/tcom/clientlibs/clientlib-site/resources/js/3025.3cb5198f1700bacf8f9f.js

js toyota.com collected 2026-09-24 07:50:56 UTC 8,181 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[3025,10463,11574],{82390:function(e,t,i){i.d(t,{A:function(){return u}});var s,a,n,o,r=i(44410),m=1,c="postMessage",d="addEventListener",l=window[c];class h{constructor(){this.has_postMessage=window[c]}static sendMessage(e,t,i){t&&(e="string"==typeof e?e:JSON.stringify(e),i=i||parent,l?i[c](e,t.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):t&&(i.location=t.replace(/#.*$/,"")+"#"+ +new Date+m+++"&"+e))}static receiveMessage(e,t,i){l?(e&&(n&&o(),n=function(i){if(console.log("PostMessage:callback",i.origin,t,i),"string"==typeof t&&i.origin!==t||"function"==typeof t&&!1===t(i.origin))return!1;e(i)}),window[d]?window[e?d:"removeEventListener"]("message",n,!1):window[e?"attachEvent":"detachEvent"]("onmessage",n)):(s&&clearInterval(s),s=null,e&&(i="number"==typeof t?t:"number"==typeof i?i:100,s=setInterval(function(){var t=document.location.hash,i=/^#?\d+&/;t!==a&&i.test(t)&&(a=t,e({data:t.replace(i,"")}))},i)))}}o=h.receiveMessage;class u{constructor(e){this.configuration=e,this.configuration.inAppDisplay=this.configuration.inAppDisplay||!1,this.paymentEstimatorIframeTags=new r.A,this.boundOnZipcodeChange=this._onZipcodeChange.bind(this),this.boundOnWindowResize=this._onWindowResize.bind(this),this.boundOnMessage=this._onMessage.bind(this),this.boundOnIframeLoad=this._onIframeLoaded.bind(this),this.siteDriverPostMessage(),this.initialize(this.configuration),this.zipcodeChangeToken=tcom_v2.pubsub.subscribe(tcom_v2.geolocation.topics.ZIPCODE_CHANGE,this.boundOnZipcodeChange),this.windowResizeToken=tcom_v2.pubsub.subscribe("tcom.window.resize",this.boundOnWindowResize),window.addEventListener("message",this.boundOnMessage,!1),tcom_v2.pubsub.subscribe("tcom.ui.modal.close",()=>{window.removeEventListener("message",this.boundOnMessage,!1)})}_onMessage(e){this.processPostMessage(e,this)}_onWindowResize(){this.setIframeHeight()}_onZipcodeChange(e,t){this.configuration.zipcode=t.zipcode,this.loadIframe(this.configuration,!0)}initialize(e){this.loadIframe(e)}loadIframe(e,t=!1){e.searchInventory?this.setSITIframeUrl(e):this.setIframeURL(e,t),this.iframe.onload=this.boundOnIframeLoad}_onIframeLoaded(){this.iframe.contentWindow.postMessage({method:"init",brand:"toyota"},"*"),this.setIframeHeight()}siteDriverPostMessage(){const e=this;h.receiveMessage(t=>{var i={};t?.data&&t?.origin.includes("kbb.com")&&(i=t.data,e.handleKbbSiteDriverEvents(t,i,e),console.log("KBB_SITEDRIVER.receiveMessage",t))},void 0)}isJsonString(e){try{JSON.parse(e)}catch(e){return console.log("KBB_SITEDRIVER.receiveMessage: not a valid JSON string"),!1}return!0}handleKbbSiteDriverEvents(e,t,i){try{const s=this.isJsonString(t)?JSON.parse(t):t,a=s?.KBB_LeadDriver_Event;if(s&&"object"==typeof s&&s.hasOwnProperty("eventFields")&&"valueYourTrade"==s.eventFields.feature)console.log(s),i.iframe.contentWindow?.postMessage(e.data,"*");else if(a&&a.data_label.includes("value another vehicle"));else if(a&&a.event.toLowerCase().includes("button press")&&a.data_label.toLowerCase().includes("trade-in"));else if(void 0!==e.data&&!e.data.type&&"string"==typeof e.data){const t=e.data?.split(":");if("ResizeIFrame"===t[0]){document.getElementById(t[1]).height=t[2];const e=document.getElementById(t[1])?.offsetTop,i=t[2],s=window.pageYOffset;s>Number(e)+Number(i)-150&&document.getElementById(t[1])?.scrollIntoView()}else if("ScrollToIFrame"===t[0]){const e=document.getElementById(t[1]);e&&window.pageYOffset>e.getBoundingClientRect().top&&e?.scrollIntoView()}else if("SendIframeIds"===t[0]){const e=document.getElementsByTagName("iframe");if(null!=e&&void 0!==e&&e.length>0)for(let t=0;t<e.length;t++)(e[t].src.toLowerCase().indexOf("ldti")>0||e[t].src.toLowerCase().indexOf("leaddriver")>0||e[t].src.toLowerCase().indexOf("profileid=")>0)&&(0===e[t].id.length&&(e[t].id="ldtiAutoResize"+t),e[t]?.contentWindow?.postMessage("SendIFrameId:"+e[t]?.id,"*"))}}}catch(e){}}_updateChangeVehicleCTA(){let e=/search\-inventory|bap/.test(tcom_v2.util.getPageName()),t=document.createElement("style");e&&(t.textContent="body {overflow: hidden;} .est-chnge-veh {display: none};",this.iframe.contentDocument.head.appendChild(t))}setIframeURL(e,t=!1){let i="",s="",a=tcom_env.services.paymentEstimator.host,n=["year","series","trim","accessories","lang","msrp","offer","tab"],o={"gr-supra":"supra",grsupra:"supra",gr86:"86"};"string"==typeof this.configuration.series&&this.configuration.series.length>0?(this.configuration.series=this.configuration.series.replace(/[^a-zA-Z0-9]/g,""),this.configuration.series=o[this.configuration.series]||this.configuration.series):this.configuration.series=void 0;for(let t in e)this.configuration.hasOwnProperty(t)&&-1!==n.indexOf(t)&&""!=e[t]&&(s+=`&${t}=${e[t]}`);if(i=`${a}/#/${this.configuration.module}?zip=${this.configuration.zipcode}${s}`,this.iframeURL=i,1==this.configuration.render&&document.getElementById("payment-estimator-iframe").setAttribute("src",this.iframeURL),this.iframe=document.getElementById("payment-estimator-iframe"),t){let e=this.iframe.cloneNode();this.iframe.parentNode.replaceChild(e,this.iframe),this.iframe=e}}setSITIframeUrl(e){let t=`https://www.sit.pes.tms.aws.toyota.com/#/estimator?series=${e.series}&trim=${e.trim}&year=${e.year}&zip=${e.zipcode}&msrp=${e.msrp}`;e.msrpTotalBuilt&&(t+="&isTaab=true"),this.iframeURL=t,1==this.configuration.render&&document.getElementById("payment-estimator-iframe").setAttribute("src",this.iframeURL),this.iframe=document.getElementById("payment-estimator-iframe")}setIframeHeight(){this.iframe.contentWindow.postMessage({method:"getHeight"},"*")}processPostMessage(e,t){let i;try{i=JSON.parse(e.data)}catch(t){console.warn("Payment estimator data could not be parsed into JSON, assigning object"),i=e.data}if(i.iframeHeight&&Number(window.localStorage.getItem("iframeHeight"))!=Number(i.iframeHeight)&&(t.iframe.height=Number(i.iframeHeight)+50,window.localStorage.setItem("iframeHeight",Number(i.iframeHeight)+50),tcom_v2.pubsub.publish("iframe.height.set")),this.configuration.modal||this.configuration.inAppDisplay||!i.stateChange||window.scrollTo(0,0),i.command&&"triggerTag"==i.command&&i.kpis&&i.details){let e=i.kpis,t=i.details;this._isNotSuppressedApp(e)&&this._isAcceptableTag(e,t)&&this.paymentEstimatorIframeTags.fireTag(e,t),tcom_v2.pubsub.publish("paymentestimator.subpageload",i)}}_isNotSuppressedApp(e){let t=tcom_v2.util.getPageName();return!("km-pe-shown"!==e||!["mlp","fso","features","payment-estimator"].includes(t))||(!("aa-pageload"!==e||!["payment-estimator"].includes(t))||!["search-inventory","build-and-price","bap","mlp","fso","results","build","features","payment-estimator"].includes(t))}_isAcceptableTag(e,t){return("aa-pageload"!==e||"contact dealer modal"!==t.content_section)&&["aa-pageload","aa-component-views","aa-link","km-pe-shown","km-pe-start","km-pe-complete","km-cad-shown","km-cad-start","km-cad-complete"].includes(e)}destroy(){tcom_v2.pubsub.unsubscribe(this.zipcodeChangeToken),tcom_v2.pubsub.unsubscribe(this.windowResizeToken),window.removeEventListener("message",this.boundOnMessage,!1);let e=document.getElementById("payment-estimator-iframe");for(;e.firstChild;)e.removeChild(e.firstChild)}}},44410:function(e,t,i){i.d(t,{A:function(){return s}});class s{constructor(){}fireTag(e,t){tcom_v2.analytics.fire(e,t)}}},24538:function(e,t,i){function s(){return'<div class="payment-estimator-wrapper">\n            <iframe id="payment-estimator-iframe" src="" frameborder="0" scrolling="no"></iframe>\n        </div>'}i.d(t,{A:function(){return s}}),i.dn(s)},3025:function(e,t,i){i.r(t),i.d(t,{default:function(){return n}});var s=i(82390),a=i(24538);class n{constructor(e){this.config={...e},this.initModal()}initModal(){let e=document.createElement("div");e.innerHTML=(0,a.A)(),this.config.modal.setContent(e,!1),this.config.modal.setTitle("Payment Estimator"),this.initPaymentEstimatorIframe(),this.paymentEstimatorIframe.iframe.
1src=this.paymentEstimatorIframe.iframeURL,this.config.modal.setLoading(!1)}initPaymentEstimatorIframe(){this.paymentEstimatorIframe=new s.A(this.config.data)}}}}]);
2//# sourceMappingURL=3025.3cb5198f1700bacf8f9f.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.