PageSourceSearch

https://www.mccarthytoyota.co.za/cardinal-contact-us.component-N5VDA5M7.js

js mccarthytoyota.co.za collected 2026-10-09 01:21:54 UTC 12,959 bytes, 1 lines download raw bytes

1import{a as J}from"./chunk-E73CYXJC.js";import{a as A}from"./chunk-JLPTGOCR.js";import"./chunk-DEUWUAXV.js";import{F as Y}from"./chunk-QXHXUPCS.js";import{a as Z}from"./chunk-BKNRABXX.js";import{a as Q,b as D}from"./chunk-IKEBIHIM.js";import{c as X}from"./chunk-KDT3JFSJ.js";import"./chunk-32NJGUPF.js";import{b as R,c as z,d as h,e as V,f as j,h as B,k as G,l as H,q as W,s as $}from"./chunk-6RMYUR5K.js";import{$a as i,Ba as q,Ca as p,Ia as I,Lb as T,Mc as L,Nc as K,Ta as N,Ua as c,Va as s,Z as v,_ as b,_a as x,ab as n,bb as u,ca as E,d as y,fb as M,ga as P,hb as S,jb as m,na as k,oc as O,vb as r,wb as f,xa as a,xb as g,xc as F,yb as w,yc as U}from"./chunk-P63SUPO6.js";var oe=t=>({"big-checkbox":t});function re(t,d){if(t&1&&(i(0,"div",4),u(1,"app-slider",14),n()),t&2){let e=m(2);a(),x("images",e.banners)("template","cardinal no-slope")("activeIndex",0)}}function le(t,d){t&1&&(i(0,"li"),r(1,"First Name is required."),n())}function ce(t,d){t&1&&(i(0,"li"),r(1,"Last Name is required."),n())}function se(t,d){t&1&&(i(0,"li"),r(1,"Valid Email is required."),n())}function de(t,d){t&1&&(i(0,"li"),r(1,"10+ digit Contact Number is required."),n())}function me(t,d){t&1&&(i(0,"li"),r(1,"Please accept the Terms and Conditions."),n())}function pe(t,d){t&1&&(i(0,"li"),r(1,"Please complete the recaptcha."),n())}function ue(t,d){if(t&1&&(i(0,"ul",27),c(1,le,2,0,"li"),c(2,ce,2,0,"li"),c(3,se,2,0,"li"),c(4,de,2,0,"li"),c(5,me,2,0,"li"),c(6,pe,2,0,"li"),n()),t&2){let e=m(3);a(),s(e.formEnquire.controls.name!=null&&e.formEnquire.controls.name.errors?1:-1),a(),s(e.formEnquire.controls.surname!=null&&e.formEnquire.controls.surname.errors?2:-1),a(),s(e.formEnquire.controls.email!=null&&e.formEnquire.controls.email.errors?3:-1),a(),s(e.formEnquire.controls.phone!=null&&e.formEnquire.controls.phone.errors?4:-1),a(),s(e.formEnquire.controls.tcs!=null&&e.formEnquire.controls.tcs.errors?5:-1),a(),s(e.formEnquire.controls.recaptchaPassed!=null&&e.formEnquire.controls.recaptchaPassed.errors?6:-1)}}function Ce(t,d){if(t&1){let e=M();i(0,"div",11)(1,"div",15)(2,"div",16),u(3,"input",17),n()(),i(4,"div",18)(5,"div",16),u(6,"input",19),n()(),i(7,"div",18)(8,"div",16),u(9,"input",20),n()(),i(10,"div",18)(11,"div",16),u(12,"input",21),n()(),i(13,"div",18)(14,"div",16),u(15,"textarea",22),n()(),i(16,"div",23),u(17,"input",24),i(18,"p"),r(19," I agree to the "),i(20,"span",25),S("click",function(){v(e);let l=m(2);return b(l.tcs())}),r(21,"Terms and Conditions"),n()()(),u(22,"div",26),c(23,ue,7,6,"ul",27),i(24,"div",28)(25,"button",29),S("click",function(){v(e);let l=m(2);return b(l.submit())}
1),r(26,"Send Enquiry"),n()()()}if(t&2){let e=m(2);a(17),x("ngClass",T(4,oe,(e.currentSite==null?null:e.currentSite.ThemeCode)=="Cardinal")),a(5),N("data-sitekey",e.currentSite.RecaptchaKey),a(),s(e.formEnquire.invalid&&e.failedsubmit==!0?23:-1),a(2),x("disabled",e.submitting)}}function he(t,d){if(t&1&&(i(0,"p"),r(1),n()),t&2){let e=m(2);a(),f(e.Dealer==null?null:e.Dealer.AddressPhysicalStreet)}}function _e(t,d){if(t&1&&(i(0,"p"),r(1),n()),t&2){let e=m(2);a(),f(e.Dealer==null?null:e.Dealer.AddressPhysicalSuburb)}}function xe(t,d){if(t&1&&(i(0,"p"),r(1),n()),t&2){let e=m(2);a(),w("",e.Dealer==null?null:e.Dealer.AddressPhysicalCity,", ",e.Dealer==null?null:e.Dealer.AddressPhysicalAreaCode)}}function fe(t,d){if(t&1&&(i(0,"p"),r(1),n()),t&2){let e=m(2);a(),g("Phone Number | ",e.Dealer==null?null:e.Dealer.PhoneNumber)}}function ge(t,d){if(t&1&&(i(0,"p"),r(1),n()),t&2){let e=m(2);a(),g("Fax Number | ",e.Dealer==null?null:e.Dealer.FaxNumber)}}function ve(t,d){if(t&1&&(i(0,"p"),r(1),n()),t&2){let e=m(2);a(),f(e.Dealer==null?null:e.Dealer.Location.replace(",",", "))}}function be(t,d){if(t&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),c(4,re,2,3,"div",4),i(5,"div",5),u(6,"app-cardinal-search"),n()()()(),i(7,"div",6)(8,"div",7),r(9),n()(),i(10,"div",8)(11,"div",2)(12,"div",9)(13,"form",10),c(14,Ce,27,6,"div",11),n()(),i(15,"div",12)(16,"h3"),r(17,"Address"),n(),c(18,he,2,1,"p"),c(19,_e,2,1,"p"),c(20,xe,2,2,"p"),i(21,"h3"),r(22,"Contact Details"),n(),c(23,fe,2,1,"p"),c(24,ge,2,1,"p"),i(25,"h3"),r(26,"GPS Coordinates"),n(),c(27,ve,2,1,"p"),n()()(),u(28,"div",13),n()),t&2){let e=m();a(4),s(e.banners.length>0?4:-1),a(5),g(" ",e.currentSite==null?null:e.currentSite.Name," "),a(4),x("formGroup",e.formEnquire),a(),s(e.submitloading?-1:14),a(4),s(e.Dealer!=null&&e.Dealer.AddressPhysicalStreet?18:-1),a(),s(e.Dealer!=null&&e.Dealer.AddressPhysicalSuburb?19:-1),a(),s(e.Dealer!=null&&e.Dealer.AddressPhysicalCity?20:-1),a(3),s(e.Dealer!=null&&e.Dealer.PhoneNumber?23:-1),a(),s(e.Dealer!=null&&e.Dealer.FaxNumber?24:-1),a(3),s(e.Dealer!=null&&e.Dealer.Location?27:-1)}}var Le=(()=>{class t{constructor(e,o,l,_,C,ee,te,ie,ne,ae){this.apiservice=e,this.siteService=o,this.platformId=l,this.formBuilder=_,this.ngzone=C,this._document=ee,this.renderer=te,this.campaignService=ie,this.modalService=ne,this.taskservice=ae,this.banners=[],this.loading=!0,this.mapLoaded=!1,this.failedsubmit=!1,this.submitloading=!1,this.submitting=!1,this.formEnquire=this.formBuilder.group({name:[null,h.required],surname:[null,h.required],email:[null,[h.required,h.email,h.pattern(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/)]],phone:[null,[h.required,h.pattern(/^(?:[\+][0-9])?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4}$/)]],department:["ContactUs"],notes:[null],tcs:[!1,h.requiredTrue],recaptchaPassed:[{value:!1,disabled:!0},h.requiredTrue]})}checkOrder(){return this.datecheck?this.datecheck:(this.datecheck=Date.now(),this.datecheck)}loadRecaptchaScript(){let e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js",e.async=!0,e.defer=!0,e.id="recaptcha",e.onload=()=>{},document.body.appendChild(e),window.resolveRecaptcha=()=>{this.ngzone.run(()=>{this.resolveRecaptcha()})},window.expiredRecaptcha=()=>{this.ngzone.run(()=>{this.expiredRecaptcha()})},this.formEnquire.get("recaptchaPassed")?.enable()}expiredRecaptcha(){this.formEnquire.get("recaptchaPassed")?.patchValue(!1),alert("Please complete the recaptcha again.")}resolveRecaptcha(){alert("Recaptcha completed successfully."),this.formEnquire.get("recaptchaPassed")?.patchValue(!0)}ngOnInit(){this.siteService.get().then(e=>{this.currentSite=e,this.apiservice.get("Dealerships",{SiteID_FK:this.currentSite.SiteID_PK,PageSize:9999,PageNumber:1,OrderBy:""}).then(o=>{this.Dealer=o.body[0],setTimeout(()=>{this.loadJsScript()},500)}),this.apiservice.get("Banners",{SiteID_FK:e.SiteID_PK,Module:"Dealer Locator",PageSize:9999,PageNumber:1,OrderBy:"Order.ASC",Active:1,Deleted:0}).then(o=>{this.banners=o.body,this.loading=!1,setTimeout(()=>{this.loadRecaptchaScript()},500)}),this.apiservice.get("EnquiryTypes",{PageSize:9999,PageNumber:1,OrderBy:"",Active:1,Deleted:0},!0).then(o=>{this.enquiryType=o.body})})}mapLoad(){this.mapLoaded=!0}loadJsScript(){U(this.platformId)&&(Q({key:this.currentSite.GoogleMapsKey,v:"weekly"}),Promise.all([D("maps"),D("marker")]).then(()=>y(this,null,function*(){let e={lat:Number.parseFloat(this.Dealer.Location.split(",")[0]),lng:Number.parseFloat(this.Dealer.Location.split(",")[1])},o=new google.maps.Map(document.getElementById("map"),{center:e,zoom:14}),l='<div id="content"><div id="siteNotice"></div><h5 id="firstHeading" class="firstHeading" style="font-size:1rem">
1'+this.Dealer.Name+'</h5><div id="bodyContent">'+(this.Dealer.PhoneNumber?'<a class="call" href="tel:'+this.Dealer.PhoneNumber+'"><p style="margin-bottom: 2px;">Tel: '+this.Dealer.PhoneNumber+"</p></a>":"")+'<p style="margin-bottom: 2px;">Address: '+this.Dealer.AddressPhysicalStreet+", "+this.Dealer.AddressPhysicalCity+'</p><a href="https://maps.google.com?saddr=Current+Location&daddr='+this.Dealer.Location+'" target="_blank">Get Google Map Directions</a>'+(this.Dealer.WebAddress?'<p style="margin-bottom: 2px;">Website: '+this.Dealer.WebAddress+"</p>":"")+"</div></div>",_=new google.maps.InfoWindow({content:l,ariaLabel:this.Dealer.Name}),C=new google.maps.Marker({map:o,position:e,title:this.Dealer.Name});_.open({anchor:C,map:o}),C.addListener("click",()=>{_.open({anchor:C,map:o})}),this.mapLoaded=!0})))}tcs(){this.modalService.open("tcs")}generateGUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var o=Math.random()*16|0,l=e==="x"?o:o&3|8;return l.toString(16)})}getCookie(e){var o=`; ${document.cookie}`,l;return l=o.split(`; ${e}=`),l.length===2?l.pop().split(";").shift():null}submit(){if(this.formEnquire.invalid)this.failedsubmit=!0;else{var e={event:"lead_submit",lead_type:"automotive",lead_source:"website",lead_first_name:this.formEnquire.controls.name.value,lead_last_name:this.formEnquire.controls.surname.value,lead_email:this.formEnquire.controls.email.value,lead_phone:this.formEnquire.controls.phone.value,lead_comments:this.formEnquire.controls.notes.value||""};try{window.dataLayer.push(e),sessionStorage.setItem("GAData",JSON.stringify(e))}catch(C){}var o=this.generateGUID()+"-T"+Date.now();let _=this.renderer.createElement("script");_.text="fbq('track', 'Lead', {currency: "+this.currentSite.currencyCode+`, value: 'null'}, {eventID:"`+o+'" });',this.renderer.appendChild(this._document.body,_),this.submitting=!0;var l={Active:1,ContactNo:this.formEnquire.controls.phone.value,DealershipID_FK:this.Dealer.DealershipID_PK,Deleted:0,Email:this.formEnquire.controls.email.value,Marketing:!1,Name:this.formEnquire.controls.name.value,Notes:this.formEnquire.controls.notes.value||"",SiteID_FK:this.currentSite.SiteID_PK,TitleID_FK:1,Surname:this.formEnquire.controls.surname.value,UtmCampaign:this.campaignService.getGoogleTracking(),VehicleModelID_FK:null,SpecialID_FK:null,VehicleStockID_FK:null,EnquiryTypeID_FK:this.enquiryType.find(C=>C.Code=="ContactUs").EnquiryTypeID_PK,LinkURL:window.location.href,FacebookFBP:this.getCookie("_fbp"),FacebookFBC:this.getCookie("_fbc"),FacebookFBE:o,DataSourceID_FK:this.Dealer.DataSourceID_FK??1};this.apiservice.post("Enquiries",l).then(C=>{C.EnquiryID_PK!==null&&(window.location.href="/callback/thankyou")})}}static{this.\u0275fac=function(o){return new(o||t)(p(L),p(K),p(k),p(W),p(P),p(E),p(q),p(J),p(A),p(Z))}}static{this.\u0275cmp=I({type:t,selectors:[["app-cardinal-contact-us"]],decls:1,vars:1,consts:[[1,"contactus"],[1,"container-fluid"],[1,"row"],[1,"col-xs-12","p-0"],[1,"col-12"],[1,"search"],[1,"pageHead","text-white"],[1,"py-1","px-3"],[1,"container","pt-3"],[1,"col-12","col-md-6","offset-md-2"],[3,"formGroup"],[1,"card-body","mx-1"],[1,"dealerDetails","pb-3","px-3","col-12","col-md-4"],["id","map",1,"map"],[3,"images","template","activeIndex"],[1,"col-12","selectbox"],[1,"select-radius"],["formControlName","name","type","text","placeholder","First Name"],[1,"selectbox"],["formControlName","surname","type","text","placeholder","Surname"],["type","text","formControlName","email","placeholder","Email Address"],["type","text","formControlName","phone","placeholder","Contact Number"],["rows","2","formControlName","notes","placeholder","Optional Message"],[1,"col-12","market"],["type","checkbox","id","marketing","formControlName","tcs","name","marketing","value","true",3,"ngClass"],[1,"fake-link",3,"click"],["id","ThemedRecaptcha","data-callback","resolveRecaptcha","data-expired-callback","expiredRecaptcha",1,"g-recaptcha","pb-2"],[1,"requirements","ms-2","ps-2"],[1,"buttons"],[1,"btn-primary","col-12","col-md-6",3,"click","disabled"]],template:function(o,l){o&1&&c(0,be,29,10,"div",0),o&2&&s(l.loading?-1:0)},dependencies:[F,O,Y,X,$,B,z,R,V,j,H,G],styles:[".map[_ngcontent-%COMP%]{height:400px;border-top:5px solid var(--primary)}.pageHead[_ngcontent-%COMP%]{margin-right:auto;margin-left:auto;background-color:var(--primary);font-size:28px;text-transform:uppercase}.market[_ngcontent-%COMP%]{font-size:.85rem;display:inline-flex}.market[_ngcontent-%COMP%]   .big-checkbox[_ngcontent-%COMP%]{width:16px;height:16px;margin-left:5px;margin-top:3px!important}.market[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{margin-bottom:auto;margin-top:5px;margin-right:5px}.requirements[_ngcontent-%COMP%]{font-size:12px;margin-left:20px}.processing[_ngcontent-%COMP%]{margin-top:20px;text-align:center}.processing[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-top:30px}.processing[_ngcontent-%COMP%]   .icon-clock[_ngcontent-%COMP%]{font-size:80px;color:var(--primary)}.selectbox[_ngcontent-%COMP%]{margin-bottom:18px}.selectbox[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{height:34px!important}.fake-link[_ngcontent-%COMP%]{color:#00f!important;text-decoration:underline;cursor:pointer}.fake-link[_ngcontent-%COMP%]:hover{color:#00a!important}textarea[_ngcontent-%COMP%]{height:150px;padding:15px 7px;
1margin-bottom:-5px}.dealerDetails[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}.dealerDetails[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:24px;font-weight:600;text-decoration:underline}button[_ngcontent-%COMP%]{float:left;min-width:max-content;margin:10px 0 20px}"]})}}return t})();export{Le as CardinalContactUsComponent};

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.