(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4735],{1392:(e,t,a)=>{"use strict";a.d(t,{a:()=>l});var i=a(6029);a(55729);var r=a(37291),s=a(75828),n=a.n(s);let l=e=>{let{children:t,color:a="white",className:s,...l}=e;return(0,i.jsx)(r.E,{theme:"dark",color:a,size:"sm",className:n()("flex flex-nowrap px-[8px] drop-shadow-md",s),...l,children:t})}},1409:(e,t,a)=>{"use strict";a.d(t,{E:()=>n});var i=a(27550),r=a(22527),s=a(56775);let n=(0,i.Ay)`
    fragment VehicleCardPricing_Listing on Listing {
  __typename
  id
  vehicle {
    __typename
    condition
    ...VehicleCardMileage_Vehicle
  }
  consumerProspectedAt
  pricing {
    __typename
    totalMsrp
    subTotal
    listPrice
  }
  marketAnalysis {
    __typename
    marketAverageAnalysis {
      __typename
      averageSaved
      averagePrice
    }
  }
  precalculatedLease {
    __typename
    totalMonthlyPayment
    disclaimer
  }
  precalculatedLoan {
    __typename
    totalMonthlyPayment
    disclaimer
  }
  preprospectDisclaimers {
    __typename
    lease
    loan
  }
  ...VehicleCardPriceRating_Listing
}
    ${r.M}
${s.m}`},2076:(e,t,a)=>{"use strict";a.d(t,{K:()=>s});var i=a(6029);a(55729);var r=a(7557);let s=e=>{let{fill:t,...a}=e;return(0,i.jsx)(r.I,{spriteID:t?"verified-fill":"verified",...a})}},2432:(e,t,a)=>{"use strict";a.d(t,{p:()=>k});var i=a(6029),r=a(55729),s=a(89337),n=a(46936),l=a(57398),o=a(99280),c=a(6040),d=a(21334),m=a(60748),u=a(55407),p=a(44970),h=a(2029),g=a(65023),v=a(78388),x=a(65536),y=a(75828),f=a.n(y);let _=e=>{let{title:t}=e;return(0,i.jsxs)("div",{"data-test":"rebrandLoadingAnimation",className:"flex h-[50vh] flex-col items-center justify-center",children:[t&&(0,i.jsx)(o.D,{size:"3",className:"mt-2 text-center",children:t}),(0,i.jsx)("div",{className:"relative flex items-center justify-center",children:(0,i.jsx)(x.$,{className:f()("absolute","top-[-100%] left-[50%] h-[100px] w-[70px] translate-x-[-50%] translate-y-[-50%]"),size:"3"})})]})};var C=a(83658),b=a(23147),j=a(72366),N=a(92688),S=a(91442),w=a(57493);let k=e=>{let{customListItems:t,error:a,handleSubmit:x,redirecting:y,trackPageName:k,title:I,subtitle:L,loadingTitle:P="",loading:A,showFields:$,tcpa:E,readOnly:D,isModal:T,modalTitle:V}=e,R=(0,p.wA)(),{updateConsumer:F}=(0,h.H)(),{consumer:M,isAuthenticatedPartnerUser:z}=(0,h.i)(),G=(0,p.d4)(e=>e.env.partner.relationshipType),U=(0,b.G)({default:(0,i.jsxs)("span",{children:["Verify your information to see ",G," Pricing"]}),truecar:(0,i.jsxs)("span",{children:["Welcome back,",(0,i.jsx)("br",{}),"thanks for using TrueCar."]})}),{acceptedTos:O,email:B,phone:H}=M,{getReturnUser:q,setReturnUser:W}=(0,S.J)(),Y=z||$?q():void 0,{register:J,handleSubmit:K,errors:Q,setError:Z,watch:X,control:ee}=(0,j.m)({reValidateMode:"onBlur",defaultValues:{email:Y?.email||B||"",phone:Y?.phone||H||"",acceptedTos:O}}),et=async e=>{if(z||$){let t;let a={};if(null===B&&(a.emailAddress=e.email,t=!0),H!==e.phone&&(a.phoneNumber=e.phone,t=!0),O||(a.acceptedTos=!0,t=!0),t){let{consumerErrors:t}=await F(a);if(t){t.base&&Z("email",{message:t.base,shouldFocus:!0}),t.phone&&Z("phone",{message:t.phone}),t.email&&Z("email",{message:t.email});return}await R((0,g.zp)({email:{value:e.email},phone:{value:e.phone},terms:{value:!0}})),z&&(e.email!==Y?.email||e.phone!==Y?.phone)&&W(e.email,e.phone)}}else O!==e.acceptedTos&&(await F({acceptedTos:!0}),await R((0,g.zp)({terms:{value:!0}})));x()};if(!a&&(A||y))return(0,i.jsx)(_,{title:P});let ea=t||["Receive upfront, discounted price offers","Browse dealership inventory","Local TrueCar Certified Dealers will contact you with limited time offers"],ei=T?s.c:r.Fragment,er=T?n.j:r.Fragment,es=I??(z?U:"Here's What Happens Next");return(0,i.jsxs)(i.Fragment,{children:[T&&V&&(0,i.jsx)(l.r,{"data-test":"confirmRegHeader",title:V}),(0,i.jsx)(ei,{children:(0,i.jsx)(C.BV,{name:k||"Reprospect Confirmation",children:(0,i.jsxs)("div",{className:f()("mx-auto",T&&"sm:max-w-[400px]"),children:[T?(0,i.jsx)(o.D,{size:3,className:f()("text-center",!T&&"pt-7"),children:es}):(0,i.jsx)(o.D,{"data-test":"registrationConfirmHeading",level:"1",size:"3",lg:"2",className:"pt-5 text-center",children:es}),(0,i.jsx)("div",{className:"mb-4",children:L??(z&&(0,i.jsxs)("span",{className:"text-muted",children:["Please confirm your information to access your"," ",G," pricing and view local inventory. Dealers will contact you with offers."]}))}),(0,i.jsxs)("div",{className:"flex flex-col items-center",children:[!z&&!!ea.length&&(0,i.jsx)("ul",{className:f()("list-disc-emphasized space-y-2 md:mx-5 text-left",T&&"mt-4"),children:ea.map(e=>(0,i.jsx)("li",{children:e},e))}),(0,i.jsxs)(c.l,{id:"confirm-return-user-form","data-test":"confirmForm",onSubmit:K(et),className:"flex h-full grow flex-col sm:h-auto sm:grow-0",children:[D?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{...J("email"),type:"hidden"}),(0,i.jsx)("input",{...J("phone"),type:"hidden"}),(0,i.jsx)(w.K,{})]}):(0,i.jsx)(i.Fragment,{children:(z||$)&&(0,i.jsxs)(d.f,{className:"mt-3",children:[(0,i.jsx)(m.f,{xs:12,md:6,children:(0,i.jsx)(u.Y,{...J("email",{required:!0,email:!0}),error:Q.email?.message,inputMode:"email",label:"Email Address","data-test":"registrationConfirmEmailInput",required:!0})}),(0,i.jsx)(m.f,{xs:12,md:6,className:"mt-3 md:mt-0",children:(0,i.jsx)(j.F,{control:ee,error:Q.phone?.message,required:!0,"data-test":"registrationConfirmPhoneInput"})})]})}),(0,i.jsxs)("div",{className:"mt-3 flex flex-col items-center gap-4 text-left",children:[E,!O&&(0,i.jsx)("div",{className:"text-left",children:(0,i.jsx)(N.C,{register:J,error:!!Q.acceptedTos,checked:X("acceptedTos")})})]}),a&&(0,i.jsx)("div",{className:"mx-auto mt-3 text-red",children:a})]})]})]})})}),(0,i.jsx)(er,{children:(0,i.jsx)(v.D,{form:"confirm-return-user-form",loading:A&&!a,"data-test":"registrationConfirmButton",className:"w-full sm:max-w-[400px] md:max-w-[320px] mx-auto",children:"Ok, Let's Go!"})})]})}},3409:(e,t,a)=>{"use strict";a.d(t,{u:()=>s});var i=a(27550),r=a(34514);let s=(0,i.Ay)`
    fragment useLeadDistanceCalculator_Listing on Listing @argumentDefinitions(postalCode: {type: "String"}, postalCodeExists: {type: "Boolean!"}) {
  __typename
  id
  vehicle {
    __typename
    year
    condition
    make {
      __typename
      id
      slug
    }
    model {
      __typename
      id
      slug
    }
  }
  ...getLeadDistance_Listing @arguments(postalCode: $postalCode, postalCodeExists: $postalCodeExists)
}
    ${r.b}`},5276:(e,t,a)=>{"use strict";a.d(t,{n:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment usePartnerPreferredProgram_PartnerPreferredProgram on PartnerPreferredProgram {
  __typename
  programName
  partnerIcon
  bannerHeading
  benefits
}
    `},5976:(e,t,a)=>{"use strict";a.d(t,{n:()=>s});var i=a(27550),r=a(3409);let s=(0,i.Ay)`
    fragment LeadSubmissionModal_Listing on Listing @argumentDefinitions(postalCode: {type: "String"}, postalCodeExists: {type: "Boolean!"}) {
  __typename
  ...useLeadDistanceCalculator_Listing @arguments(postalCode: $postalCode, postalCodeExists: $postalCodeExists)
  id
  vehicle {
    __typename
    year
    condition
    vin
    make {
      __typename
      id
      databaseId
    }
    model {
      __typename
      id
      databaseId
    }
    style {
      __typename
      id
      trim {
        __typename
        id
        databaseId
      }
    }
  }
  dealership {
    __typename
    id
    name
  }
}
    ${r.u}`},7037:(e,t,a)=>{"use strict";a.d(t,{B:()=>m}),a(80581);var i=a(27550);let r=(0,i.Ay)`
    query getConsumerSavedVehicleUpdate {
  consumer {
    __typename
    id
  }
}
    `;r.documentId="9870061f3307f97aeaf66058818472eee979fa91a87b1c8e0283155c291528b2";let s=(0,i.Ay)`
    mutation useSavedVehicle_saveVehicle($vin: String!) {
  consumerCreateSavedVehicle(input: {vin: $vin}, createEvent: true) {
    __typename
    savedVehicle {
      __typename
      id
      listing {
        __typename
        id
        consumerContext {
          __typename
          saved
        }
      }
    }
  }
}
    `;s.documentId="9a7014870b27664c9b2f97f4f973f1236968ecebdebe6eb17f268749dc159306";let n=(0,i.Ay)`
    mutation useSavedVehicle_unsaveVehicle($vin: String!) {
  consumerRemoveSavedVehicle(input: {vin: $vin}) {
    __typename
    savedVehicle {
      __typename
      id
      listing {
        __typename
        id
        consumerContext {
          __typename
          saved
        }
      }
    }
  }
}
    `;n.documentId="c8a35dffd2bd53105bfa5d005c5db6a755b3f9c9b69ac87a51c1b0abcea2955a";var l=a(55729),o=a(83658),c=a(73431),d=a(93780);let m=e=>{let{listing:t,taggingSource:a,trackPaymentsSave:i}=e,r=(0,o.z1)(),s=(0,d.mK)(),n=(0,d.Pr)(),{notify:m}=(0,c.E)(),g=(0,l.useCallback)(()=>{let e=s.readQuery({query:u})?.consumer?.id;e&&n({id:e,type:"Consumer",fieldName:"savedVehicles"})},[s,n]),{callMutation:v}=(0,d.Ll)(p,{validate:e=>{let{data:t}=e;if(!t?.consumerCreateSavedVehicle?.savedVehicle.listing)return"Sorry, we weren't able to save that vehicle."},onSuccess:()=>{g(),m({type:"success",tracking:{eventAction:"View Saved Vehicles Notification",eventCategory:"Saved Vehicle",eventLabel:"Pop-Up Notification"},description:"This vehicle was saved in Favorite Cars in your account."})},onError:()=>{m({type:"error",description:"Sorry, we weren't able to save that vehicle."})}}),{callMutation:x}=(0,d.Ll)(h,{validate:e=>{let{data:t}=e;if(!t?.consumerRemoveSavedVehicle?.savedVehicle?.listing)return"Sorry, we weren't able to remove that vehicle."},onSuccess:()=>{g()},onError:()=>{m({type:"error",description:"Sorry, we weren't able to remove that vehicle."})}}),{vehicle:{vin:y},dealership:{databaseId:f}}=t,_=!!t.consumerContext?.saved;return l.useCallback(async()=>{t.consumerContext?.saved?x({variables:{vin:y}}):v({variables:{vin:y}}),r({dealerVin:`${y}:${f}`,eventAction:`${a} User ${_?"Unsaved":"Saved"} Vehicle${i?" With Payments":""}`,eventCategory:"Engagement",eventLabel:y})},[f,_,t.consumerContext?.saved,v,a,r,i,x,y])},u=r,p=s,h=n},7536:(e,t,a)=>{"use strict";a.d(t,{J:()=>r.JC,R:()=>i.R});var i=a(47948),r=a(99536)},10319:(e,t,a)=>{"use strict";a.d(t,{E:()=>s});var i=a(27550),r=a(95834);let s=(0,i.Ay)`
    fragment VehicleCardFooter_ListingSearchEdge on ListingSearchEdge {
  __typename
  cursor
  node {
    __typename
    id
    tcplusEligible
    ...VehicleCardFooter_Listing
  }
  distance {
    __typename
    miles
  }
}
    ${r.p}`},10429:(e,t,a)=>{"use strict";a.d(t,{R:()=>i});let i=(e,t)=>!!t&&"USED"===e&&["dallas-tx","miami-fl","las-vegas-nv","jacksonville-fl","nashville-tn","san-francisco-ca","indianapolis-in","fort-worth-tx","anaheim-ca","fort-lauderdale-fl","baltimore-md"].includes(t)},10490:(e,t,a)=>{"use strict";a.d(t,{f:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment CheckoutRegistration_Geolocation on Geolocation {
  __typename
  id
  postalCode
}
    `},11281:(e,t,a)=>{"use strict";a.d(t,{O:()=>i.O7});var i=a(66013)},12871:(e,t,a)=>{"use strict";a.d(t,{m:()=>n});var i=a(27550),r=a(25689),s=a(61155);let n=(0,i.Ay)`
    fragment Listing_Listing on Listing @argumentDefinitions(galleryImagesCount: {type: "Int!"}) {
  __typename
  id
  isMultiLocation
  distanceRetailing
  vehicle {
    __typename
    condition
    make {
      __typename
      id
      slug
    }
    model {
      __typename
      id
      slug
    }
  }
  dealership {
    __typename
    id
    databaseId
    location {
      __typename
      id
      geolocation {
        __typename
        id
        city
        state
        postalCode
      }
    }
  }
  tcplusEligible
  ...VehicleCardSmallerCard_Listing @arguments(galleryImagesCount: $galleryImagesCount)
  ...useSavedVehicleLightReg_Listing
}
    ${r.S}
${s.I}`},13493:(e,t,a)=>{"use strict";a.d(t,{c:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment useEVLeaseIncentive_ListingSearchEdge on ListingSearchEdge {
  __typename
  cursor
  evIncentivesDetails {
    __typename
    federalNewLeaseValue
  }
}
    `},14735:(e,t,a)=>{"use strict";a.d(t,{ll:()=>eL});var i=a(6029);a(12871),a(28366),a(79213),a(77801);var r=a(33422),s=a(23983),n=a(93780),l=a(55729);a(25689),a(18336),a(80835),a(27851);var o=a(75828),c=a.n(o),d=a(21157),m=a.n(d),u=a(61328),p=a(87804),h=a(83658),g=a(37508),v=a(34728),x=a(74603),y=a(1510),f=a(35205),_=a(29107),C=a.n(_);a(13493);var b=a(94570);let j=e=>{let{listingEdge:t,dealType:a}=e,i=t.evIncentivesDetails.federalNewLeaseValue;return{shouldShowFedEVLeaseIncentive:!!i&&"lease"===a,fedEVIncentiveBadgeText:`${(0,b.G)(i)} EV Incentive Available \xb9`}};var N=a(80561),S=a(2076),w=a(47266);let k=()=>(0,i.jsxs)(w.p,{"data-test":"cpoBadge",children:[(0,i.jsx)(S.K,{fill:!0,size:14,className:"fill-purple shrink-0 mr-[2px]",role:"presentation",alt:""}),(0,i.jsx)("span",{className:"text-xs font-bold",children:"CPO"})]});a(39032),a(1409);var I=a(99280),L=a(37291),P=a(28802),A=a(54042);a(56775);var $=a(92026),E=a(38726);let D=e=>{let{listing:t}=e,a="NO_EXCLUSION"===t.pricing.exclusion,r=!!t.consumerProspectedAt&&a,{condition:s}=t.vehicle,n=t.marketAnalysis?.priceQuality;if(!n||"USED"!==s&&!r)return null;let l=$.FN[n],o=$._v[n];return(0,i.jsx)("div",{"data-test":"vehicleCardPriceRating",children:(0,i.jsx)(E.G,{label:o,labelClassName:"truncate text-xs",type:l,size:16,containerClassName:"flex items-center ml-1"})})};a(22527);var T=a(82499),V=a(10573);let R=e=>{let{vehicle:t}=e,{condition:a,mileage:r}=t;return!r||"NEW"===a&&r<500?null:(0,i.jsx)("div",{className:"flex w-full justify-end",children:(0,i.jsxs)("div",{className:"flex items-center truncate text-xs","data-test":"vehicleMileage",children:[(0,i.jsx)(V.t,{size:14,className:"mr-[2px]"}),(0,T.Z)(r)," miles"]})})};a(66032);var F=a(71848);let M=e=>{let{listingEdge:t}=e,{stips:a}=t.estimatedMonthlyPaymentDetails||{},{listPrice:r}=t.node.pricing,s=a?.includes("REQUIRES_TRADE_IN");return(r||s)&&s?(0,i.jsx)("div",{className:"flex items-center justify-between gap-1",children:s&&(0,i.jsxs)("div",{className:"flex items-center gap-x-[4px]",children:[(0,i.jsx)(z,{className:"text-xs"}),(0,i.jsx)(F.F,{className:"scale-75 z-[3]",children:(0,i.jsx)(G,{})})]})}):null},z=e=>{let{children:t,className:a}=e;return(0,i.jsxs)(L.E,{"data-test":"requiresTradeBadge",color:"yellow",size:"sm",className:a,children:["Trade-in required",t]})},G=()=>(0,i.jsx)("span",{"data-test":"requiresTradeDisclaimer",children:"Final approval may require applicant to verify an open auto loan has been traded in or paid-off. Including a trade-in may impact final payment terms."}),U=e=>{let{listingSearchEdge:t,dealType:a,isGoFi:r}=e,{node:{pricing:{totalMsrp:s,subTotal:n,listPrice:l},marketAnalysis:o,preprospectDisclaimers:c,precalculatedLoan:d,precalculatedLease:m,consumerProspectedAt:u,vehicle:p},estimatedMonthlyPaymentDetails:h}=t,g=!!u,v="USED"===p.condition,x=g?n:v?l:s,y=o?.marketAverageAnalysis?.averagePrice,f=!v&&y&&s&&y<s?o?.marketAverageAnalysis?.averageSaved:null,_=h?.amount??null??d?.totalMonthlyPayment,C=m?.totalMonthlyPayment,j=h?.downPayment;return x?(0,i.jsxs)("div",{className:"grid gap-y-1 items-center w-full","data-test":"vehicleCardPricing",children:[(0,i.jsxs)("div",{className:"flex gap-x-1 items-center text-xs",children:[(0,i.jsxs)(I.D,{size:3.5,className:"flex items-center whitespace-pre text-[20px]",children:[(0,i.jsxs)("span",{"data-test":"vehicleCardPricingPrice",children:[(0,b.G)(x)," "]}),(0,i.jsx)("span",{"data-test":"vehicleCardPricingPriceLabel",className:"font-normal text-xs",children:g?"Your price":v?"List price":"MSRP"})]}),g||v?(0,i.jsx)(D,{listing:t.node}):(0,i.jsx)(i.Fragment,{children:!!f&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(L.E,{color:"blue","data-test":"vehicleCardPricingAvgSaved",children:[(0,b.G)(f)," avg. off MSRP"]}),(0,i.jsx)(B,{disclaimer:A.u,title:"Average savings"})]})})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-[8px]",children:["cash"!==a&&(0,i.jsx)(O,{dealType:a,disclaimer:c[a],monthlyPayment:"loan"===a?_:C,isGoFi:r}),r&&(0,i.jsxs)("div",{className:"flex gap-x-1 items-start",children:[(0,i.jsxs)(I.D,{size:5,className:"flex items-end whitespace-pre","data-test":"vehicleCardMinDown",children:[(0,b.G)(j),(0,i.jsx)("span",{className:"font-normal text-xs",children:" Due at signing"})]}),(0,i.jsx)(M,{listingEdge:t})]}),(0,i.jsx)("div",{className:"flex",children:(0,i.jsx)("div",{children:(0,i.jsx)(R,{vehicle:p})})})]})]}):(0,i.jsx)(I.D,{size:4,className:"text-muted",children:"Price Not Available"})},O=e=>{let{dealType:t,monthlyPayment:a,disclaimer:r,isGoFi:s}=e,n="loan"===t?"finance":"lease";if(!a)return null;let l=s?m()(n):`Est. ${n}`;return(0,i.jsxs)("div",{className:"flex items-center gap-x-1","data-test":"vehicleCardPricingPaymentInfo",children:[(0,i.jsxs)(I.D,{size:5,className:"flex items-end whitespace-pre",children:[(0,b.G)(a),"/mo"," ",(0,i.jsxs)("span",{className:"font-normal text-xs",children:[l,s&&(0,i.jsx)("span",{children:" w/ taxes, fees & delivery"})]})]}),r&&(0,i.jsx)("div",{className:"flex items-end","data-test":"vehicleCardPriceLabelDisclaimers",children:(0,i.jsx)(B,{disclaimer:r,title:`Monthly ${n} payment`})})]})},B=e=>{let{disclaimer:t,title:a}=e;return(0,i.jsx)(P.R,{content:t,className:"z-[3] scale-75",title:a})};var H=a(7536);a(58836);var q=a(27686),W=a(60376);let Y=()=>(0,i.jsxs)(w.p,{"data-test":"hybridBadge",children:[(0,i.jsx)(W.g,{fill:!0,size:14,className:"text-[color:var(--green-600)]",alt:"Hybrid"}),(0,i.jsx)("span",{className:"text-xs",children:"Hybrid"})]});var J=a(79943);let K=()=>(0,i.jsxs)(w.p,{"data-test":"phevBadge",children:[(0,i.jsx)(J.u,{fill:!0,size:14,className:"text-[color:var(--green-600)]",alt:"PHEV"}),(0,i.jsx)("span",{className:"text-xs",children:"PHEV"})]}),Q=e=>{let{vehicle:{fuelType:t}}=e;return t?({Electric:(0,i.jsx)(q.n,{}),"Plug-In Hybrid":(0,i.jsx)(K,{}),Hybrid:(0,i.jsx)(Y,{})})[t]:null};a(37721);var Z=a(1700),X=a(65272);let ee=e=>{let{vehicle:t,showMileage:a}=e,{make:r,model:s,year:n,style:l,condition:o}=t,c=l?.name||"";return(0,i.jsxs)(I.D,{level:2,className:"w-full text-sm","data-test":"vehicleCardInfo",children:[(0,i.jsxs)("div",{"data-test":"vehicleCardConditionYearMake",className:"truncate font-bold",children:[m()(o)," ",n," ",r.name]}),(0,i.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-1","data-test":"vehicleCardTrim",children:[(0,i.jsx)("div",{className:"truncate",children:(0,X.S)(s.name,c||Z.XV)}),a&&(0,i.jsx)(R,{vehicle:t})]})]})};a(95834),a(10319),a(64688);var et=a(82062),ea=a(54817),ei=a(97554),er=a.n(ei),es=a(31134);let en=e=>{let{dealershipName:t,className:a}=e;return(0,i.jsxs)("div",{className:c()("flex items-center text-xs gap-x-1",a),children:[(0,i.jsx)(es.y,{size:"xs",className:"shrink-0"}),(0,i.jsx)("span",{className:"truncate",children:t})]})},el=e=>{let{listingEdge:t,deliveryLocation:a,isGoFi:r,children:s,className:n,showDealershipName:l,deliveryRatesLoading:o}=e,d=t.node,{geolocation:m}=d.dealership.location,u=a?.city||m.city,p=a?.state||m.state,h=t.distance?t.distance.miles:null,g=d.pricing.deliveryFee,v="Delivery";if(d.pricing.transferFee){let{transferFee:e}=d.pricing;u=e.fromCity,p=e.fromState,h=e.distance,g=e.amount,v="Transfer"}let x=er()(g)?(0,b.G)(g):"",y=(()=>{let e=[];return x&&e.push(`${x} delivery to your door`),((t.distance?.miles||0)<=eo||!x)&&e.push("FREE pickup"),e.join(" or ")})();return(0,i.jsxs)("div",{"data-test":"vehicleCardFooter",className:c()("flex w-full items-center justify-between border-t-[1px] px-2 py-2 text-xs text-muted flex-wrap",n),children:[l&&(0,i.jsx)(en,{dealershipName:d.dealership.name,className:"w-full"}),(0,i.jsx)("div",{className:"min-h-[18px]",children:o?(0,i.jsx)(et.b,{height:18,width:100}):(0,i.jsx)(i.Fragment,{children:r?(0,i.jsx)(i.Fragment,{children:x&&(0,i.jsxs)(i.Fragment,{children:[x," delivery fee included"]})}):d.tcplusEligible?(0,i.jsx)(i.Fragment,{children:y}):(0,i.jsxs)(i.Fragment,{children:[(d.distanceRetailing||d.pricing.transferFee)&&`${x} ${v} \xb7 `,h?`${(0,ea.B)(h)} mi away`:`${u}, ${p}`]})})}),s]})},eo=50;var ec=a(27550);let ed=(0,ec.Ay)`
    query getLeadSubmissionModal($vin: String!, $postalCodeExists: Boolean!, $postalCode: String) {
  listing(vin: $vin) {
    __typename
    vehicle {
      __typename
      year
      condition
      make {
        __typename
        slug
        id
        databaseId
      }
      model {
        __typename
        slug
        id
        databaseId
      }
      vin
      style {
        __typename
        id
        trim {
          __typename
          id
          databaseId
        }
      }
    }
    dealership {
      __typename
      id
      leadRadius
      location {
        __typename
        id
        geolocation {
          __typename
          id
          distanceFrom(postalCode: $postalCode) @include(if: $postalCodeExists)
        }
      }
      name
    }
    id
  }
}
    `;ed.documentId="cec911d5085441b1ca7e79a9cc67661b70cffaa03b1c97e9dc420ce754065657";var em=a(64476),eu=a(6612);let ep=e=>{let{vin:t,financingType:a,isOpen:r,onClose:s,onLeadSuccess:l,sponsoredListing:o,preferTestDrive:c,modalTitle:d,showDistanceIndicator:m=!1}=e,{postalCode:u}=(0,eu.Y)(),{data:p}=(0,n.IT)(eh,{variables:{vin:t,postalCodeExists:!!u,postalCode:u},ssr:!1}),h=p?.listing;return h?(0,i.jsx)(em.wb,{showDistanceIndicator:m,isOpen:r,onClose:s,onLeadSuccess:l,listing:h,financingType:a,modalTitle:d,sponsoredListing:o,preferTestDrive:c}):null},eh=ed;var eg=a(41728),ev=a(78239),ex=a(67133),ey=a(1392),ef=a(56787);let e_=e=>{let{liked:t,partnerPreferredBannerProps:a,discountLabel:r,contacted:s,preferredDealer:n,sponsored:l,buyOnline:o,highApprovalRate:c,onClickLike:d}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"absolute top-2 left-2 z-[2]",children:(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[o&&(0,i.jsx)(ex.b,{"data-test":"vehicleCardTcPlusBadge"}),s?(0,i.jsxs)(ey.a,{"data-test":"vehicleCardOverlayBadge",children:[(0,i.jsx)(eg.Q,{size:12,fill:!0,className:"mr-[4px]"}),(0,i.jsx)("div",{children:o?"Order started":"Contacted"})]}):l?(0,i.jsx)(ey.a,{"data-test":"vehicleCardOverlayBadge",children:"Sponsored"}):n?(0,i.jsx)(ef.q,{bannerProps:a,"data-test":"vehicleCardOverlayPreferredDealerBadge"}):c?(0,i.jsx)(ey.a,{"data-test":"vehicleCardOverlayBadge",children:"99% Finance Approval Rate"}):r?(0,i.jsx)(ey.a,{"data-test":"vehicleCardOverlayBadge",children:r}):null]})}),(0,i.jsx)(ev.$,{selected:t,onClick:()=>{d(t?"unlike":"like")},theme:"dark",className:"absolute top-0 right-0 z-10 p-2","aria-label":t?"Remove from favorites":"Add to favorites","data-test":"vehicleCardLikeButton","data-test-item":t?"liked":""})]})};var eC=a(53282),eb=a(76734),ej=a(55811),eN=a(19292),eS=a(71748),ew=a(10429);let ek=e=>{let{loading:t,listingEdge:a,hideDealerDiscount:r,onClick:s,onClickLike:n,onClickUnlockOverride:o,"data-test":d,dealType:_,deliveryLocation:b,partner:S,isGoFiActive:w=!1,getVdpHref:I,currentFilters:L,similar:P,sourceType:A,vehiclePosition:$,searchLocation:E,sponsored:D,trackingVariables:T,showDistanceIndicator:V=!1,deliveryRatesLoading:R,...F}=e,{flags:{autonationAvailabilityEnabled:M}}=(0,ej.W)(),z=(0,ew.R)(L.condition,`${L?.city}-${L?.state}`),{saveScrollPosition:G}=(0,eS.m)(),{isPreferredDealer:O}=(0,H.R)(),B=(0,h.z1)(),{push:q}=(0,g.cq)(),W=a.node,{consumerProspectedAt:Y,vehicle:J,tcplusEligible:K,dealership:Z,distanceRetailing:X,isMultiLocation:et}=W,ea=!!W.consumerContext?.saved,{vin:ei,condition:er,year:es,style:en}=J,eo=(0,y.g)(W),ec=!r&&eo?eo.split(" ").map(m()).join(" "):null,{shouldShowFedEVLeaseIncentive:ed,fedEVIncentiveBadgeText:em}=j({listingEdge:a,dealType:_});!ec&&ed&&(ec=em);let eu=J.make.name,eh=J.model.name,eg=W.galleryImages.nodes[0]??{url:C(),height:1,width:1,metadata:[]},ev=eg.metadata||"",ex=ev.includes("FULL_SUBJECT"),ey=ev.includes("PLACEHOLDER"),ef=W?.pricing.exclusion==="NO_EXCLUSION"||W?.pricing.exclusion==="MAAP_WEB",ek=!!W.consumerProspectedAt&&ef,[eL,eP]=(0,l.useState)(!1),[eA,e$]=(0,l.useState)(!1),[eE,eD]=(0,l.useState)(!1),eT=en?.name?`, ${en.name}`:"",eV=`View details for ${es} ${eu} ${eh}${eT}`,eR="See actual pricing",eF=(0,g.pp)(),eM="cash"===L.dealType?void 0:L.dealType,ez=E?.postalCode,eG=Z.location.geolocation.postalCode,eU=(0,eN.c)({tcplusEligible:K}),eO=I({newness:J.condition,vin:J.vin,paymentPreference:eM,sourceType:A,position:$,similar:P,sponsored:D,preferTestDrive:eU,returnTo:eF,...X&&{zipcode:ez}||et&&{zipcode:eG},...X?{zipcode:ez}:{},splat:eI({year:J.year,makeSlug:J.make.slug,modelSlug:J.model.slug})}),{flags:{truecarPlusEnabled:eB}}=(0,ej.W)(),eH=(0,H.J)(S),eq=eB&&K;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(u.Z,{className:"shadow-lg h-full",linkCover:eV,href:eO,"aria-label":`View details for ${J.year} ${J.make.name} ${J.model.name}, ${J.style?.name}`,onClick:e=>{G(),s?.(e)},"data-test":d||("USED"===L.condition?"usedListing":"newListing"),"data-test-item":J.vin,"data-test-dealerid":Z.databaseId,...F,children:[(0,i.jsxs)("div",{className:"relative w-full",children:[(0,i.jsx)(p.V,{className:c()(ey&&"px-3","rounded-md overflow-hidden border-b-[1px] border-solid"),width:16,height:"eager"===t?9.05:9,fit:ex?"fill":"crop",fallbackSrc:C(),url:eg.url,sizes:300,alt:"",role:"presentation",block:!0,loading:"eager"===t?"eager":"lazy",pad:ex?20:void 0}),(0,i.jsx)("div",{className:c()("absolute bottom-[-16px] right-2","z-20"),children:(0,i.jsx)(eC.m,{liked:ea,unlocked:ek,onToggle:e=>{e&&B({...T,eventCategory:"Engagement",eventAction:"Action Menu Icon Click",eventLabel:"Action Menu Icon Click"})},onClickLike:e=>{n?.(e);let t="like"===e?"Add to favorites Click":"Remove from favorites Click";B({...T,eventCategory:"Action Menu pop-up screen",eventAction:t,eventLabel:t})},onClickShare:()=>{eP(!0),B({...T,eventCategory:"Action Menu pop-up screen",eventAction:"Share Click",eventLabel:"Share Click"})},onClickView:()=>{e$(!0),B({...T,eventCategory:"Action Menu pop-up screen",eventAction:"Quick view Click",eventLabel:"Quick view Click"})},onClickUnlock:()=>{o?o():eD(!0),B({...T,eventCategory:"Action Menu pop-up screen",eventAction:"Unlock dealer details Click",eventLabel:"Unlock dealer details Click"})},unlockCta:eR})}),(0,i.jsx)(e_,{liked:ea,contacted:!!Y,sponsored:!!D,preferredDealer:!!O(Z),partnerPreferredBannerProps:eH,buyOnline:!!eq,highApprovalRate:(0,N.l)({dealership:W.dealership}),discountLabel:ec,onClickLike:e=>{n?.(e);let t="like"===e?"Add to favorites Click":"Remove from favorites Click";B({...T,eventCategory:"Action Menu pop-up screen",eventAction:t,eventLabel:t})}})]},eg.url),(0,i.jsx)("div",{className:"mt-1 flex w-full items-start p-2 text-left flex-grow",children:(0,i.jsxs)("div",{className:"w-full truncate",children:[(0,i.jsx)(ee,{vehicle:W.vehicle}),(0,i.jsx)("div",{className:"mt-1 flex justify-between gap-1 items-end",children:(0,i.jsx)(U,{listingSearchEdge:a,dealType:_,isGoFi:w})})]})}),(0,i.jsx)(el,{listingEdge:a,deliveryLocation:b,isGoFi:w,showDealershipName:z,deliveryRatesLoading:R,children:(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[J.certifiedPreOwned&&(0,i.jsx)(k,{}),(0,i.jsx)(Q,{vehicle:J})]})})]}),(0,i.jsx)(v.J,{open:eL,setOpen:eP,pricing:W.pricing,vehicle:J}),eE&&(K?(0,i.jsx)(x.U,{modalTitle:eR,searchLocation:b,showRegModal:eE,onClose:()=>eD(!1),paymentType:(0,f.l)(_),refetchDataAfterLoginOrRegistering:()=>{eO&&q(eO)},vehicleCondition:er,vin:ei,isGoFi:w,sponsoredListing:D,preferTestDrive:eU}):(0,i.jsx)(ep,{showDistanceIndicator:V,modalTitle:eR,vin:ei,financingType:(0,f.l)(_),isOpen:eE,onClose:()=>eD(!1),onLeadSuccess:()=>{eO&&q(eO)},sponsoredListing:D,preferTestDrive:eU})),eA&&(0,i.jsx)(eb.G,{vin:ei,open:eA,setOpen:()=>{e$(!1)},showSeeMorePhotosOverlay:!0,autonationAvailabilityEnabled:M,href:eO})]})},eI=e=>{let{year:t,makeSlug:a,modelSlug:i}=e;return`${t}-${a}-${i}`},eL=l.memo(e=>{let{currentFilters:t,listingEdge:a,loading:n,searchLocation:o,sponsored:c,similar:d,getVdpHref:m,sourceType:u,vehiclePosition:p,onClick:h,onClickUnlockOverride:g,trackingVariables:v,partner:x,deliveryRatesLoading:y=!1,showDistanceIndicator:f=!1,..._}=e,{isGoFiActive:C}=l.useContext(r.K),{onToggle:b,lightRegOpen:j,setLightRegOpen:N,handleFormSuccess:S}=(0,s.x)({listing:a.node});return(0,i.jsxs)("div",{className:"flex w-full flex-col",children:[(0,i.jsx)(ek,{deliveryLocation:o,listingEdge:a,hideDealerDiscount:t.hideDealerDiscount,loading:n,onClick:h,onClickLike:b,sponsored:c,showDistanceIndicator:f,dealType:t.dealType,onClickUnlockOverride:g,trackingVariables:v,isGoFiActive:C,partner:x,deliveryRatesLoading:y,similar:d,sourceType:u,vehiclePosition:p,currentFilters:t,searchLocation:o,getVdpHref:m,..._}),j&&(0,i.jsx)(s.M,{lightRegOpen:j,setLightRegOpen:N,handleFormSuccess:S})]})})},17600:(e,t,a)=>{"use strict";function i(e){return e?e.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):""}a.d(t,{n:()=>i})},18210:(e,t,a)=>{"use strict";a.d(t,{$:()=>n}),a(3409),a(93780);var i=a(37508),r=a(31819);a(34514);let s=e=>{let{listing:t}=e,{dealership:a}=t,i=a.location.geolocation.distanceFrom,r=a.leadRadius;return{isWithinLeadRadius:!("number"==typeof i&&"number"==typeof r&&i>=r),distanceFromDealership:i}},n=e=>{let{listing:t}=e,{push:a}=(0,i.cq)();return t?{...s({listing:t}),onSearchRadiusChange:e=>{a(r.x.generate({condition:t.vehicle.condition,makeModelTrim:[{makeSlug:t.vehicle.make.slug,modelSlug:t.vehicle.model.slug}],year:{min:t.vehicle.year,max:t.vehicle.year},searchRadius:e}))}}:{onSearchRadiusChange:()=>{},isWithinLeadRadius:!0,distanceFromDealership:null}}},18336:(e,t,a)=>{"use strict";a.d(t,{d:()=>o});var i=a(27550),r=a(25689),s=a(10319),n=a(13493),l=a(39032);let o=(0,i.Ay)`
    fragment VehicleCardSmallerCard_ListingSearchEdge on ListingSearchEdge @argumentDefinitions(galleryImagesCount: {type: "Int!"}) {
  __typename
  cursor
  node {
    __typename
    id
    ...VehicleCardSmallerCard_Listing @arguments(galleryImagesCount: $galleryImagesCount)
  }
  estimatedMonthlyPaymentDetails {
    __typename
    amount
    apr
    downPayment
    termLength
  }
  ...VehicleCardFooter_ListingSearchEdge
  ...useEVLeaseIncentive_ListingSearchEdge
  ...VehicleCardPricing_ListingSearchEdge
}
    ${r.S}
${s.E}
${n.c}
${l.d}`},19292:(e,t,a)=>{"use strict";a.d(t,{c:()=>i.c});var i=a(43944)},22527:(e,t,a)=>{"use strict";a.d(t,{M:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleCardMileage_Vehicle on Vehicle {
  __typename
  condition
  mileage
}
    `},23983:(e,t,a)=>{"use strict";a.d(t,{M:()=>p,x:()=>v});var i=a(6029),r=a(55729),s=a(46936),n=a(57398),l=a(89337),o=a(79328),c=a(42796),d=a(83658),m=a(9885);let u=e=>{let{children:t}=e;return(0,i.jsx)(s.j,{children:(0,i.jsx)("div",{className:"w-full text-center",children:t})})},p=r.memo(e=>{let{handleFormSuccess:t,lightRegOpen:a,setLightRegOpen:r}=e,s=(0,d.z1)();return a?(0,i.jsx)("div",{"data-test":"savedVehicleLightReg",children:(0,i.jsx)(o.N.Provider,{value:{Header:n.r,Body:l.c,Footer:u},children:(0,i.jsx)(c.k.Provider,{value:{onLoginSuccessAnalytics:()=>{s({eventAction:"Account Sign In",eventCategory:"Registration",regFlowName:"Saved Vehicle Email"})},onSignupSuccessAnalytics:()=>{s({eventAction:"Account Sign Up",eventCategory:"Registration",regFlowName:"Saved Vehicle Email"})},onSocialAuthSuccessAnalytics:e=>{let{status:t,authSource:a}=e;200===t?s({eventAction:"Account Sign In",eventCategory:"Registration",regFlowName:`Saved Vehicle ${a}`}):s({eventAction:"Account Sign Up",eventCategory:"Registration",regFlowName:`Saved Vehicle ${a}`})}},children:(0,i.jsx)(m.L,{open:a,title:"Add to Your Favorites",subtitle:"Sign up to view your favorite cars across devices and get price drop alerts.",onClose:()=>{r(!1)},onRegComplete:t,registrationSource:"Save Vehicle"})})})}):null});a(61155);var h=a(33131),g=a(7037);a(93780);let v=e=>{let{listing:t,taggingSource:a,trackPaymentsSave:i}=e,[s,n]=r.useState(!1),l=(0,g.B)({listing:t,taggingSource:a,trackPaymentsSave:i}),{isAuthenticated:o}=(0,h.i)(),c=!o,d=r.useCallback(()=>c?n(!0):l(),[l,c]),m=r.useCallback(async()=>{n(!1),l()},[l]);return r.useMemo(()=>({onToggle:d,lightRegOpen:s,setLightRegOpen:n,handleFormSuccess:m}),[m,s,d])}},25689:(e,t,a)=>{"use strict";a.d(t,{S:()=>p});var i=a(27550),r=a(37721),s=a(58836),n=a(66623),l=a(39997),o=a(27014),c=a(81304),d=a(91674),m=a(95834),u=a(1409);let p=(0,i.Ay)`
    fragment VehicleCardSmallerCard_Listing on Listing @argumentDefinitions(galleryImagesCount: {type: "Int!"}) {
  __typename
  id
  tcplusEligible
  consumerProspectedAt
  isMultiLocation
  consumerContext {
    __typename
    saved
  }
  vehicle {
    __typename
    certifiedPreOwned
    vin
    year
    make {
      __typename
      id
      name
      slug
    }
    model {
      __typename
      id
      name
      slug
    }
    style {
      __typename
      id
      name
      electricRange
    }
    condition
    ...VehicleCardCarInfo_Vehicle
    ...FuelTypeBadge_Vehicle
    ...VehicleShareModal_Vehicle
  }
  galleryImages(first: $galleryImagesCount) {
    __typename
    nodes {
      __typename
      width
      height
      url
      metadata
    }
  }
  pricing {
    __typename
    exclusion
    discountLabel
    ...VehicleShareModal_Pricing
  }
  dealership {
    __typename
    id
    name
    databaseId
    location {
      __typename
      id
      geolocation {
        __typename
        id
        city
        state
        postalCode
      }
    }
    ...useIsDriveTime_Dealership
    ...usePartnerPreferred_Dealership
  }
  ...getDiscountLabel_Listing
  ...VehicleCardFooter_Listing
  ...VehicleCardPricing_Listing
}
    ${r.i}
${s.B}
${n.C}
${l.C}
${o.h}
${c.b}
${d.N}
${m.p}
${u.E}`},27014:(e,t,a)=>{"use strict";a.d(t,{h:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment useIsDriveTime_Dealership on Dealership {
  __typename
  id
  parentDealershipName
}
    `},27686:(e,t,a)=>{"use strict";a.d(t,{n:()=>n});var i=a(6029);a(55729);var r=a(76645),s=a(47266);let n=()=>(0,i.jsxs)(s.p,{"data-test":"evBadge",children:[(0,i.jsx)(r.N,{fill:!0,size:14,className:"text-[color:var(--green-600)]",alt:"EV","aria-hidden":!0}),(0,i.jsx)("span",{className:"text-xs",children:"EV"})]})},27851:(e,t,a)=>{"use strict";a.d(t,{o:()=>s});var i=a(27550),r=a(47811);let s=(0,i.Ay)`
    fragment VehicleCardSmallerCard_Partner on Partner {
  __typename
  id
  ...usePartnerPreferredProgram_Partner
}
    ${r.M}`},28366:(e,t,a)=>{"use strict";a.d(t,{F:()=>n});var i=a(27550),r=a(12871),s=a(18336);let n=(0,i.Ay)`
    fragment Listing_ListingSearchEdge on ListingSearchEdge @argumentDefinitions(galleryImagesCount: {type: "Int!"}) {
  __typename
  cursor
  node {
    __typename
    id
    ...Listing_Listing @arguments(galleryImagesCount: $galleryImagesCount)
  }
  ...VehicleCardSmallerCard_ListingSearchEdge @arguments(galleryImagesCount: $galleryImagesCount)
}
    ${r.m}
${s.d}`},29107:e=>{e.exports="/assets/_next/static/images/broken-image-f45bdb5ab292c7bb1ff24f21f470dd09.svg"},32259:(e,t,a)=>{"use strict";a.d(t,{N:()=>r});var i=a(53605);let r=(0,i.v)({newness:i.u.enum("used","new","USED","NEW"),vin:i.u.unsafeString,splat:i.u.unsafeString.optional,sourceType:i.u.enum("marketplace","vla","ranking","recommendation","tcplus_landing","best_matches").optional,position:i.u.number.optional,sponsored:i.u.boolean.optional,similar:i.u.boolean.optional,zipcode:i.u.unsafeString.optional,deliveryZipcode:i.u.unsafeString.optional,buyOnline:i.u.boolean.optional,u1:i.u.number.optional,subid1:i.u.string.optional,paymentPreference:i.u.enum("cash","loan","lease").optional,activeTab:i.u.enum("loan","lease","cash").optional,dealType:i.u.enum("loan","lease","cash").optional,down:i.u.number.optional,term:i.u.number.optional,ficoScore:i.u.number.optional,annualMileage:i.u.number.optional,dueAtSigning:i.u.number.optional,loanPayoff:i.u.number.optional,tradeValue:i.u.number.optional,showDisclaimer:i.u.boolean.optional,fromSavedVehicles:i.u.boolean.optional,source:i.u.unsafeString.optional,memberId:i.u.unsafeString.optional,srcID:i.u.string.optional,buildId:i.u.string.optional,dealershipId:i.u.string.optional,returnTo:i.u.url.optional,prospect:i.u.boolean.optional,showGoFiPrequal:i.u.boolean.optional,householdIncome:i.u.number.optional,householdSize:i.u.number.optional,turnIn:i.u.boolean.optional,core:i.u.boolean.optional,preferTestDrive:i.u.boolean.optional},e=>{let{householdIncome:t,householdSize:a,...i}=e;return{...t||a?{household:{income:t??0,size:a??0}}:{},...i}},e=>{let{newness:t,vin:a,splat:i,sourceType:r,position:s,sponsored:n,similar:l,buyOnline:o,activeTab:c,dealType:d,down:m,term:u,ficoScore:p,annualMileage:h,dueAtSigning:g,loanPayoff:v,tradeValue:x,showDisclaimer:y,zipcode:f,deliveryZipcode:_,paymentPreference:C,source:b,memberId:j,fromSavedVehicles:N,u1:S,subid1:w,buildId:k,dealershipId:I,returnTo:L,prospect:P,showGoFiPrequal:A,household:$,turnIn:E,core:D,preferTestDrive:T}=e;return{path:`/${t.toLowerCase()}-cars-for-sale/listing/${a}/${i??""}`,query:{sourceType:r,position:s,...n&&{sponsored:n},...l&&{similar:l},returnTo:L,activeTab:c,dealType:d,buyOnline:o,down:m,term:u,ficoScore:p,annualMileage:h,dueAtSigning:g,loanPayoff:v,tradeValue:x,showDisclaimer:y,zipcode:f,deliveryZipcode:_,paymentPreference:C,source:b,memberId:j,fromSavedVehicles:N,u1:S,subid1:w,prospect:P,turnIn:E,...k&&{buildId:k,source:b},...I&&{dealershipId:I},showGoFiPrequal:!!A||void 0,...$&&$.income>0&&$.size>0?{householdIncome:$.income,householdSize:$.size}:{},core:D||void 0,...T&&{preferTestDrive:T}}}});r.routeName="marketplaceVdpRoute"},33422:(e,t,a)=>{"use strict";a.d(t,{K:()=>i.K});var i=a(72252)},34514:(e,t,a)=>{"use strict";a.d(t,{b:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment getLeadDistance_Listing on Listing @argumentDefinitions(postalCode: {type: "String"}, postalCodeExists: {type: "Boolean!"}) {
  __typename
  id
  dealership {
    __typename
    id
    leadRadius
    location {
      __typename
      id
      geolocation {
        __typename
        id
        distanceFrom(postalCode: $postalCode) @include(if: $postalCodeExists)
      }
    }
  }
}
    `},34728:(e,t,a)=>{"use strict";a.d(t,{J:()=>j});var i=a(6029);a(66623),a(39997);var r=a(66437),s=a(94570),n=a(32485);let l=(e,t)=>{let a=n._.stringify(t);return -1!==e.indexOf("?")?`${e}&${a}`:`${e}?${a}`};a(93780);var o=a(83658),c=a(12092),d=a(51744),m=a(69417),u=a(57398),p=a(89337),h=a(79865),g=a(95481),v=a(75068),x=a(85033),y=a(96424),f=a(54348),_=a.n(f),C=a(55729),b=a(44970);let j=e=>{let{vehicle:t,pricing:a,open:n,setOpen:f,eventActionPrefix:j="Marketplace VDP"}=e,N=(0,o.z1)(),{breakpointDown:S}=(0,c.d)(),w=(0,d.$)(),[k,I]=C.useState("Copy Link"),L=l(r.N.generate({vin:t.vin,newness:t.condition}),{utm_source:"vdp_share",utm_medium:"sharing"}),P=`https://${window.location.host}`+L,A=(0,b.d4)(e=>e.env.partner),$=a.listPrice?`Check out this ${t.year} ${t.make.name} ${t.model.name} on ${A.partnerName} ${A.programName} for ${(0,s.G)(a.listPrice)}`:`Check out this ${t.year} ${t.make.name} ${t.model.name} on ${A.partnerName} ${A.programName}`,E=a.listPrice?`Hey - check out this ${t.year} ${t.make.name} ${t.model.name} on ${A.partnerName} ${A.programName} for ${(0,s.G)(a.listPrice)}`:`Hey - check out this ${t.year} ${t.make.name} ${t.model.name} on ${A.partnerName} ${A.programName}`;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(m.a,{id:"shareListingModal",open:n,onClose:()=>f(!1),size:"sm","aria-labelledby":"shareListingModalHeader",children:[(0,i.jsx)(u.r,{id:"shareListingModalHeader",title:"Share This Listing"}),(0,i.jsxs)(p.c,{children:[(0,i.jsxs)(h.$,{block:!0,color:"primary",externalLink:!0,target:"",href:`mailto:?subject=${$}&body=${E}%0D%0A%0D%0A${encodeURIComponent(P)}`,onClick:()=>{N({eventCategory:"Share Engagement",eventAction:`${j} Email Share`})},children:[(0,i.jsx)(g.j,{size:"sm",before:!0}),"Email"]}),(0,i.jsxs)(h.$,{block:!0,color:"primary",className:"mt-2",onClick:()=>{I("Copied"),_()(P),N({eventCategory:"Engagement",eventAction:`${j} Copy to Clipboard`}),setTimeout(()=>{I("Copy Link")},4e3)},children:[(0,i.jsx)(v.i,{size:"sm",before:!0}),(0,i.jsx)("span",{"aria-live":"Copied"===k?"polite":void 0,children:k})]}),S("sm")&&w&&(0,i.jsxs)(h.$,{block:!0,color:"primary",className:"mt-2",href:`sms:?&body=${E}%0D%0A%0D%0A${encodeURIComponent(P)}`,externalLink:!0,target:"",onClick:()=>{N({eventCategory:"Share Engagement",eventAction:`${j} Message Share`})},children:[(0,i.jsx)(x.N,{size:"md",before:!0}),"Message"]}),(0,i.jsxs)(h.$,{block:!0,color:"primary",className:"mt-2",onClick:()=>f(!1),children:[(0,i.jsx)(y.g,{size:"sm",before:!0}),"Close"]})]})]})})}},37721:(e,t,a)=>{"use strict";a.d(t,{i:()=>s});var i=a(27550),r=a(22527);let s=(0,i.Ay)`
    fragment VehicleCardCarInfo_Vehicle on Vehicle {
  __typename
  year
  make {
    __typename
    id
    name
  }
  model {
    __typename
    id
    name
  }
  style {
    __typename
    id
    name
  }
  condition
  ...VehicleCardMileage_Vehicle
}
    ${r.M}`},38726:(e,t,a)=>{"use strict";a.d(t,{G:()=>v});var i=a(6029);a(55729);var r=a(75828),s=a.n(r),n=a(7557);let l=e=>{let{fill:t,...a}=e;return(0,i.jsx)(n.I,{spriteID:t?"leaderboard-fill":"leaderboard",...a})},o=e=>{let{fill:t,...a}=e;return(0,i.jsx)(n.I,{spriteID:"caret-double-down",...a})};var c=a(6384),d=a(7732),m=a(31243);let u=Number(window?.getComputedStyle(document.body)?.getPropertyValue("font-size")?.match(/\d+/)?.[0]||0)||16,p=e=>e/u,h=e=>"string"==typeof e&&["xs","sm","md","lg"].includes(e)?p(n.F[e]):"number"==typeof e?p(e):0,g=e=>"string"==typeof e&&["xs","sm","md","lg"].includes(e)?Math.round(n.F[e]/1.2):"number"==typeof e?Math.round(e/1.2):0,v=e=>{let{containerClassName:t,iconContainerClassName:a,className:r,fill:n=!0,label:u,labelClassName:p,size:v=22,type:x,iconAfter:y=!1,...f}=e;if(!x)return null;let _={height:`${h(v)}rem`,width:`${h(v)}rem`},C={fill:n,size:g(v)},b=(0,i.jsx)("span",{"data-test":"graphIconLabel",className:s()("graph-icon-title",y?"mr-1":"ml-1",p),children:u});return(0,i.jsxs)("div",{className:s()(t),children:[y&&b,"IconLeaderboard"===x&&(0,i.jsx)("div",{className:s()("graph-icon-container",a),style:_,children:(0,i.jsx)(l,{className:r,size:C.size,...f})}),"IconCaretDoubleDown"===x&&(0,i.jsx)("div",{className:s()("graph-icon-container graph-icon-bucket-one",a),style:_,children:(0,i.jsx)(o,{className:s()("graph-icon",r),...C,...f})}),"IconArrowDropDown"===x&&(0,i.jsx)("div",{className:s()("graph-icon-container graph-icon-bucket-two",a),style:_,children:(0,i.jsx)(c.U,{className:s()("graph-icon",r),...C,...f})}),"IconCheck"===x&&(0,i.jsx)("div",{className:s()("graph-icon-container graph-icon-bucket-three",a),style:_,children:(0,i.jsx)(d.K,{className:s()("graph-icon",r),...C,...f})}),"IconArrowDropUp"===x&&(0,i.jsx)("div",{className:s()("graph-icon-container graph-icon-bucket-four",a),style:_,children:(0,i.jsx)(m.b,{className:s()("graph-icon",r),...C,...f})}),!y&&b]})}},39032:(e,t,a)=>{"use strict";a.d(t,{d:()=>n});var i=a(27550),r=a(1409),s=a(66032);let n=(0,i.Ay)`
    fragment VehicleCardPricing_ListingSearchEdge on ListingSearchEdge {
  __typename
  cursor
  estimatedMonthlyPaymentDetails {
    __typename
    amount
    downPayment
  }
  node {
    __typename
    id
    ...VehicleCardPricing_Listing
  }
  ...VehicleCardGoFiStips_ListingSearchEdge
}
    ${r.E}
${s.d}`},39997:(e,t,a)=>{"use strict";a.d(t,{C:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleShareModal_Pricing on Pricing {
  __typename
  listPrice
}
    `},41728:(e,t,a)=>{"use strict";a.d(t,{Q:()=>s});var i=a(6029);a(55729);var r=a(7557);let s=e=>{let{fill:t,...a}=e;return(0,i.jsx)(r.I,{spriteID:t?"new_releases-fill":"new_releases",...a})}},42796:(e,t,a)=>{"use strict";a.d(t,{k:()=>i});let i=a(55729).createContext({})},43944:(e,t,a)=>{"use strict";a.d(t,{c:()=>n});var i=a(23147),r=a(37508),s=a(55729);let n=e=>{let{tcplusEligible:t}=e,a=(0,i.G)({uber:!0,default:!1}),n=(0,r.jp)();return s.useMemo(()=>a&&!t&&"preferTestDrive"in n&&"true"===String(n.preferTestDrive),[a,n,t])}},44911:e=>{e.exports="/assets/_next/static/images/truecar-plus-logo-fullname-d5d89416a79b05828c968c646a83ca99.png"},47266:(e,t,a)=>{"use strict";a.d(t,{p:()=>r});var i=a(6029);a(55729);let r=e=>{let{children:t,...a}=e;return(0,i.jsx)("div",{className:"flex h-[20px] items-center rounded-full pl-[4px] pr-[7px] border bg-white text-dark",...a,children:t})}},47811:(e,t,a)=>{"use strict";a.d(t,{M:()=>s});var i=a(27550),r=a(5276);let s=(0,i.Ay)`
    fragment usePartnerPreferredProgram_Partner on Partner {
  __typename
  id
  partnerPreferredProgram {
    __typename
    ...usePartnerPreferredProgram_PartnerPreferredProgram
  }
}
    ${r.n}`},47948:(e,t,a)=>{"use strict";a.d(t,{R:()=>i}),a(81304),a(93780);let i=()=>({isPreferredDealer:e=>!!e.dealershipConsumerContext?.partnerPreferred})},49036:(e,t,a)=>{"use strict";a.d(t,{c:()=>r});var i=a(86065);let r=()=>{let{setValue:e,removeValue:t,value:a}=(0,i.F)("currentMarketplaceSearchFilters");return{setSessionSRPFilterValue:t=>{e(JSON.stringify(t))},sessionSRPFilterValue:JSON.parse(a),removeSessionSRPFilterValue:t}}},53282:(e,t,a)=>{"use strict";a.d(t,{m:()=>y});var i=a(6029),r=a(36352),s=a(11765),n=a(35349),l=a(55729),o=a(7557);let c=e=>{let{fill:t,...a}=e;return(0,i.jsx)(o.I,{spriteID:"more-vert",...a})},d=e=>{let{fill:t,...a}=e;return(0,i.jsx)(o.I,{spriteID:t?"heart_minus-fill":"heart_minus",...a})},m=e=>{let{fill:t,...a}=e;return(0,i.jsx)(o.I,{spriteID:t?"heart_plus-fill":"heart_plus",...a})},u=e=>{let{fill:t,...a}=e;return(0,i.jsx)(o.I,{spriteID:"ios_share",...a})},p=e=>{let{fill:t,...a}=e;return(0,i.jsx)(o.I,{spriteID:"frame_inspect",...a})},h=e=>{let{fill:t,...a}=e;return(0,i.jsx)(o.I,{spriteID:t?"paid-fill":"paid",...a})};var g=a(75828),v=a.n(g);let x=e=>{let{onClick:t,children:a}=e;return(0,i.jsx)(r.t,{className:"pl-2 text-sm flex items-center",onClick:t,children:a})},y=e=>{let{liked:t,unlocked:a,onToggle:r,onClickLike:o,onClickShare:g,onClickView:y,onClickUnlock:f,hideUnlock:_,unlockCta:C="See actual pricing",className:b}=e,[j,N]=(0,l.useState)(!1);return(0,i.jsxs)(s.m,{menuClassName:"z-[9999] my-1 w-[250px] border-none bg-white p-2","data-test":"vehicleCardActionDropDown",isOpen:j,setIsOpen:e=>{r?.(e),N(e)},placement:"bottom-end",toggle:(0,i.jsxs)(n.C,{tag:"button",className:v()("flex h-[32px] w-[32px] flex-row items-center justify-between overflow-hidden rounded-full border-[1px] bg-white px-2 text-sm text-[color:var(--gray-700)]","drop-shadow-sm hover:cursor-pointer hover:drop-shadow active:drop-shadow-lg",b),"aria-label":"More options",children:[(0,i.jsx)("p",{className:"sr-only",children:"Menu"}),(0,i.jsx)(c,{size:22,className:v()("absolute left-1/2 top-1/2 h-[10px] -translate-x-1/2 -translate-y-1/2","fill-[currentColor] align-middle text-[22px] leading-[10px] tracking-[1px]")})]}),children:[(0,i.jsxs)(x,{onClick:()=>{o(t?"unlike":"like")},children:[t?(0,i.jsx)(d,{size:20}):(0,i.jsx)(m,{size:20}),(0,i.jsx)("span",{className:"ml-2 font-normal",children:t?"Remove from favorites":"Add to favorites"})]}),(0,i.jsxs)(x,{onClick:g,children:[(0,i.jsx)(u,{size:20}),(0,i.jsx)("span",{className:"ml-2 font-normal",children:"Share"})]}),(0,i.jsxs)(x,{onClick:y,children:[(0,i.jsx)(p,{size:20}),(0,i.jsx)("span",{className:"ml-2 font-normal",children:"Quick view"})]}),!a&&!_&&(0,i.jsxs)(x,{onClick:f,children:[(0,i.jsx)(h,{size:20}),(0,i.jsx)("span",{className:"ml-2 font-normal",children:C})]})]})}},54042:(e,t,a)=>{"use strict";a.d(t,{u:()=>i});let i="The Average Savings for this vehicle is based on recent transactions from other buyers. It shows how much others have saved off the MSRP for similar vehicles. The savings calculation uses anonymized data, filtering out extreme cases and adjusting for factors like transaction timing and manufacturer incentives. In some cases, it may be adjusted to reflect sudden market changes."},54564:e=>{e.exports="/assets/_next/static/images/handshake-b0d499ca8d6703e340bfd03d397d0b9a.svg"},54817:(e,t,a)=>{"use strict";a.d(t,{B:()=>r});var i=a(76255);function r(e){return e<10?(Math.round(10*e)/10).toString():(0,i.Z)(Math.round(e))}},56775:(e,t,a)=>{"use strict";a.d(t,{m:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleCardPriceRating_Listing on Listing {
  __typename
  id
  consumerProspectedAt
  vehicle {
    __typename
    condition
  }
  marketAnalysis {
    __typename
    priceQuality
  }
  pricing {
    __typename
    exclusion
  }
}
    `},56787:(e,t,a)=>{"use strict";a.d(t,{q:()=>o});var i=a(6029);a(55729);var r=a(1392),s=a(87804),n=a(75828),l=a.n(n);let o=e=>{let{bannerProps:t,className:a,...n}=e;if(!t)return null;let{partnerIcon:o,programName:c}=t;return(0,i.jsxs)(r.a,{className:l()("items-center gap-1",a),color:"blue",...n,children:[o&&(0,i.jsx)(s.V,{url:o,width:10,height:10,role:"presentation",alt:"",className:"shrink-0 overflow-hidden rounded"}),c]})}},57493:(e,t,a)=>{"use strict";a.d(t,{K:()=>m});var i=a(6029),r=a(33131),s=a(17600);a(55729);var n=a(7557);let l=e=>{let{fill:t,...a}=e;return(0,i.jsx)(n.I,{spriteID:t?"smartphone-fill":"smartphone",...a})};var o=a(95481),c=a(75828),d=a.n(c);let m=e=>{let{className:t}=e,{consumer:a}=(0,r.i)();return a.phone||a.email?(0,i.jsxs)("div",{className:d()("flex gap-x-3 gap-y-2 flex-wrap justify-center",t),children:[a.phone&&(0,i.jsxs)("span",{"data-test":"tcpaUserInfoPhone",className:"flex items-center gap-1 whitespace-nowrap",children:[(0,i.jsx)(l,{className:"flex-shrink-0"}),(0,s.n)(a.phone)]}),a.email&&(0,i.jsxs)("span",{"data-test":"tcpaUserInfoEmail",className:"flex items-center gap-1 whitespace-nowrap",children:[(0,i.jsx)(o.j,{className:"flex-shrink-0"}),a.email]})]}):null}},58836:(e,t,a)=>{"use strict";a.d(t,{B:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment FuelTypeBadge_Vehicle on Vehicle {
  __typename
  fuelType
}
    `},60376:(e,t,a)=>{"use strict";a.d(t,{g:()=>s});var i=a(6029);a(55729);var r=a(7557);let s=e=>{let{fill:t,...a}=e;return(0,i.jsx)(r.I,{spriteID:t?"leaf-fill":"leaf",...a})}},61155:(e,t,a)=>{"use strict";a.d(t,{I:()=>s});var i=a(27550),r=a(80581);let s=(0,i.Ay)`
    fragment useSavedVehicleLightReg_Listing on Listing {
  __typename
  id
  ...useSavedVehicle_Listing
}
    ${r.I}`},64476:(e,t,a)=>{"use strict";a.d(t,{wb:()=>el,s0:()=>j});var i=a(6029),r=a(55729),s=a(44970),n=a(89337),l=a(87928),o=a(99280),c=a(6040),d=a(63062),m=a(41296),u=a(54817),p=a(46936),h=a(79865),g=a(83658),v=a(27550);let x=(0,v.Ay)`
    mutation useLeadSubmissionSubmitLead($input: ProspectConnectMarketplaceVehicleInput!) {
  prospectConnectMarketplaceVehicle(input: $input) {
    __typename
    ... on ArgumentsError {
      __typename
      errors {
        __typename
        argument
        attributeName
        message
      }
    }
    ... on ProspectConnectMarketplaceVehiclePayload {
      __typename
      leadId
      prospectedItem {
        __typename
        id
        consumerProspectedAt
        consumerDeal {
          __typename
          databaseId
          id
        }
        isMultiLocation
        dealership {
          __typename
          id
          location {
            __typename
            id
            geolocation {
              __typename
              id
              postalCode
            }
          }
        }
      }
    }
  }
}
    `;x.documentId="b430591f07a0e0962a7f8d19656a6acd5d99ecca05ea016d0326ce0c04a5e66b";var y=a(93780),f=a(4140),_=a(2029),C=a(19968);let b="Error submitting form. Please try again later.",j=e=>{let{vin:t,financingType:a,unlockTaxesAndFees:i=!1,skipConsumerUpdate:r=!1,leadAttributes:s}=e,n=(0,C.D)()??void 0,[l,{loading:o}]=(0,y.n_)(N),{recordEngagement:c}=(0,f.G)(),{consumer:d}=(0,_.i)(),{updateConsumer:m}=(0,_.H)();return{submitLead:async(e,o)=>{let u={};if(!r){let t=!1;e.confirmedTos&&!d.acceptedTos&&(u.acceptedTos=!0,t=!0),e.email!==d.email&&(u.emailAddress=e.email,t=!0),e.phoneNumber!==d.phone&&(u.phoneNumber=e.phoneNumber,t=!0),t&&m({...u,context:"MARKETPLACE"})}let p=e.postalCode||n;try{let r=await l({variables:{input:{confirmedTcpa:e.confirmedTcpa,confirmedTos:e.confirmedTos,postalCode:p,overrideEmailAddress:e.email||d.email,overridePhoneNumber:e.phoneNumber||d.phone,vin:t,financingType:a,vehicleRegistrationZipcode:i?e.vehicleRegistrationZipcode:void 0,core:e.submitAsCoreLead,leadAttributes:s}}}),n=r?.data?.prospectConnectMarketplaceVehicle;if(!n||"errors"in n||!n.prospectedItem.consumerProspectedAt){let e=n&&"errors"in n&&!!n.errors.find(e=>"Consumer's distance from dealership exceeds the dealership's preference"===e.message);return{data:null,error:e?"This dealer does not currently service your area.":b}}if(o?.recordEngagement&&c(),o?.onProspectSuccess&&n&&"prospectedItem"in n){let{isMultiLocation:t,dealership:a}=n.prospectedItem,i=e?.postalCode||"";t&&(i=a.location.geolocation.postalCode),i?o?.onProspectSuccess(i):o?.onProspectSuccess()}return{data:n,error:null}}catch(e){if(e?.networkError)return{data:null,error:"There seems to be a problem with your connection, please try again later."};return{data:null,error:b}}},loading:o}},N=x;var S=a(23147),w=a(72366),k=a(92688),I=a(77429),L=a.n(I),P=a(75828),A=a.n(P),$=a(57493),E=a(84756),D=a(33131),T=a(50333),V=a.n(T);let R=e=>{let t,{vin:a,onProspectSuccess:v,onLeadSubmit:x,newOrUsed:y,makeId:f,modelId:_,trimId:C,ariaHeadingId:b,financingType:N,readonlyTitle:I,sponsoredListing:P,preferTestDrive:T,submitAsCoreLead:R,displayDistanceWarning:F,distanceFromDealership:M}=e,z=(0,g.z1)(),{consumer:G,isAuthenticatedPartnerUser:U}=(0,D.i)(),O=(0,s.d4)(e=>e.env.partner),[B,H]=(0,r.useState)(null),q=!U,{register:W,handleSubmit:Y,errors:J,control:K,watch:Q}=(0,w.m)({defaultValues:{email:G.email??"",phone:G.phone??"",acceptedTos:G.acceptedTos||!1}}),{tcpa:Z,confirmTcpa:X}=(0,E.a)({contactPreference:G.preferredContactMethod,identifier:a,className:"text-xs text-muted text-left"}),{submitLead:ee,loading:et}=j({vin:a,financingType:N,leadAttributes:[...P?["SPONSORED_LISTING"]:[],...T?["UBER_TEST_DRIVE"]:[]]}),ea=async e=>{let{firstName:t,lastName:i,postalCode:r}=G,{email:s,phone:n}=q?G:e,l=G.acceptedTos||e.acceptedTos;if(x?.(),X(a),!(t&&i&&r&&s&&n))return;H(null);let{error:o,data:c}=await ee({confirmedTcpa:l,confirmedTos:l,email:s,postalCode:r,phoneNumber:n,sponsoredListing:P,submitAsCoreLead:R},{recordEngagement:!0,onProspectSuccess:v});if(o){H(o);return}c&&z({leadId:c.leadId,page:"Used Car Summary",eventCategory:"Prospect",eventAction:"Used Car Lead Submit",eventLabel:"NEW"===y?"New":"Used"})},ei=r.useRef(!1);r.useEffect(()=>{if(!ei.current){ei.current=!0;let{partnerName:e}=O;z({eventAction:"Registration Return Visitor Modal",partnerBrand:e,makeId:f,modelId:_,trimId:C,pageName:"Used Car Registration Return Visitor",eventCategory:"Modal View"})}},[f,_,O,z,C]),(0,S.G)({default:!1,truecar:!0})&&(t="Unlock Dealer Details");let er=q?"I agree, let's go!":t??"Confirm Availability";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.c,{id:"multiStepReturnUserForm","data-test":q?"redesignedMultiStepReturnUserForm":"multiStepReturnUserForm","aria-labelledby":b,children:[(0,i.jsxs)("div",{className:"sm:max-w-[400px] mx-auto",children:[q?(0,i.jsxs)("div",{className:"mb-5 mt-2 flex flex-col items-center text-center sm:mt-0",children:[(0,i.jsx)(l.E,{src:L(),alt:"","aria-hidden":!0,width:80,height:81}),(0,i.jsx)(o.D,{size:"3",id:b,children:I||"Get actual pricing and dealer contact information"})]}):(0,i.jsxs)(o.D,{size:"3",className:"mx-3 mb-3 text-center",id:b,children:[er," and Get Your ",O.partnerSiteName," ",O.relationshipType," Price"]}),(0,i.jsxs)(c.l,{id:"multi-step-return-user-form",className:A()(q&&"flex grow flex-col"),onSubmit:Y(ea),children:[q?(0,i.jsx)($.K,{className:"pb-4"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w.F,{className:"mb-4 w-full",control:K,error:J.phone?.message,required:!0,"data-test":"vdpMultistepRegPhoneNumber"}),(0,i.jsx)(d.A,{className:"mb-4",...W("email",{required:!0,email:!0}),autoComplete:"email",label:"Email","data-test":"vdpMultistepRegUserEmail",error:J.email?.message,value:Q("email")})]}),Z,!G.acceptedTos&&(0,i.jsx)("div",{className:A()("mt-3 flex",q&&"justify-center"),children:(0,i.jsx)(k.C,{register:W,error:!!J.acceptedTos,checked:Q("acceptedTos"),"data-test":"vdpMultistepRegReturnUserTermsAccepted",required:!0,className:"mb-2"})})]}),B&&(0,i.jsx)("div",{className:"mx-auto mt-3 text-red",children:B})]}),F&&!!M&&(0,i.jsxs)("div",{className:"text-[#FF6400] flex mt-2 text-sm",children:[(0,i.jsx)(m.i,{className:"mr-1"}),(0,i.jsxs)("p",{children:["This vehicle is located"," ",(0,u.B)(V()(M))," ",1===M?"mile":"miles"," away from your location."]})]})]}),(0,i.jsx)(p.j,{children:(0,i.jsx)(h.$,{form:"multi-step-return-user-form","data-test":"multistepRegNextBtn",color:"primary",size:"lg",className:"w-full sm:max-w-[400px] md:max-w-[320px] mx-auto",disabled:et,loading:et,type:"submit",children:er})})]})};a(5976);var F=a(12092),M=a(69417),z=a(78260),G=a(65971),U=a(63771);let O=e=>{let{onProspectSuccess:t,financingType:a,className:n,vin:l,newOrUsed:o,modalTitle:c,onRegSuccessProfileComplete:d,sponsoredListing:p,preferTestDrive:h,submitAsCoreLead:v,isWithinLeadRadius:x,distanceFromDealership:y}=e,f=(0,g.z1)(),{matches:_}=(0,G._P)(U.o.abtDistanceTransparencyIndicator),{submitLead:C,loading:b}=j({vin:l,financingType:a,leadAttributes:[...p?["SPONSORED_LISTING"]:[],...h?["UBER_TEST_DRIVE"]:[]]}),N=(0,r.useCallback)(async e=>{let{error:a,data:i}=await C({confirmedTcpa:e.confirmedTcpa,confirmedTos:e.confirmedTcpa,email:e.email,phoneNumber:e.phoneNumber,postalCode:e.zip,sponsoredListing:p,submitAsCoreLead:v},{recordEngagement:!0,onProspectSuccess:t});if(a)return a;i&&f({leadId:i.leadId,page:"Used Car Summary",eventCategory:"Prospect",eventAction:"Used Car Lead Submit",eventLabel:"NEW"===o?"New":"Used"})},[C,p,v,t,f,o]),w=(0,s.d4)(e=>e.env.partner),k=(0,S.G)({default:!1,truecar:!0}),{relationshipType:I,partnerName:L,programName:P,supportPhoneNumber:A}=w;return(0,i.jsx)(z.c,{layout:z.k,className:n,title:"Login or sign up",subtitle:k?"To check availability, access your program price and ensure dealers honor any savings you might qualify for, log in or sign up.":"To check availability, access your program price and ensure dealers honor any savings you might qualify for, provide your information.",modalTitle:c,profile:{includeAddress:!0,skipLogin:!k,continueOnLastStep:!k,tcpaIdentifier:l,profileOnly:!k,allowSocialLoginOnProfileOnly:!k,allowGuestWithAccount:!0,dictionary:{email:{footer:k?`To check availability, access your ${I.toLowerCase()} price and ensure dealers honor any savings you might qualify for, provide your information`:`When you use the ${L} ${P} you get the actual price of a vehicle, so there are no surprises at the dealership`},name:{footer:k?`When you use the ${L} ${P} you get the actual price of a vehicle, so there are no surprises at the dealership`:"To check availability, access your member price and ensure dealers honor any savings you might qualify for, please provide your information."},address:{footer:k?"Have questions? Comments? TrueCar representatives are standing by (888) TRUECAR":`Have questions? Comments? You can contact a representative from ${L}'s ${P} at ${A}.`}}},registrationSource:"NEW"===o?"New Car Marketplace Registration":"Used Car Marketplace Registration",continueAsGuest:!0,onSuccess:N,onSuccessLoading:b,onRegSuccessProfileComplete:d,ariaId:"profile-registration-form",warning:_("challenger1")&&!x&&y&&(0,i.jsxs)("div",{className:"text-[#FF6400] flex mt-3",children:[(0,i.jsx)(m.i,{className:"mr-1"}),(0,i.jsxs)("p",{children:["This vehicle is located"," ",(0,u.B)(V()(y))," ",1===y?"mile":"miles"," away from your location."]})]})})};var B=a(65536),H=a(92068),q=a(82086),W=a(57393),Y=a(5461),J=a(84848),K=a(5279),Q=a(86065);let Z=e=>{let{dealershipName:t,email:a,onSubmit:s,ariaHeadingId:l}=e,d=(0,g.z1)(),m=(0,S.G)({truecar:!0,default:!1}),{consumer:{authenticated:u}}=(0,Y.i)(),{checkEmailExists:p}=(0,K.c)(),{registerConsumer:v,loading:x}=(0,J.vn)(),[y,f]=(0,r.useState)(!0),[_,C]=(0,r.useState)(!1),[b,j]=(0,r.useState)(!0),{register:N,handleSubmit:w,errors:k,setError:I}=(0,W.m)({reValidateMode:"onChange",defaultValues:{password:""}}),{value:L,setValue:P}=(0,Q.F)("profileRegHideCreateAccount");(0,r.useEffect)(()=>{d({eventAction:"Contacted Dealer",eventCategory:"Registration",eventLabel:"Open"})},[d]);let A=(0,r.useMemo)(()=>"true"===L,[L]),$=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if($.current)return;let e=async e=>{j(!0),C((await p(e)).result||!1),j(!1)};a&&!u&&m&&!A&&e(a),$.current=!0},[a,p,u,y,m,A]);let E=(0,r.useCallback)(async e=>{let{password:t}=e;if(a&&!u){let e=await v({emailAddress:a,password:t,registrationSource:"Marketplace"});if(e?.consumerErrors){let{consumerErrors:t}=e;t.base&&I("password",{message:t.base,shouldFocus:!0})}else s()}},[v,I,a,u,s]),D=(0,r.useCallback)(()=>{P("true"),d({eventAction:"Contacted Dealer",eventCategory:"Registration",eventLabel:"Continue without Account"}),s()},[s,d,P]);return(0,r.useEffect)(()=>{(u||_||A||!m)&&s()},[_,A,m,s,u]),(0,i.jsx)(n.c,{className:"flex w-full flex-1 flex-col items-center justify-center",children:b?(0,i.jsx)(B.$,{size:3}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(H.I,{color:"info",fill:!0,size:65}),(0,i.jsx)(o.D,{size:2,className:"mt-2 text-center",id:l,children:"Sent!"}),(0,i.jsx)("p",{className:"mt-2 text-center text-[18px] font-bold","data-test":"leadSuccessDealershipName",children:t}),(0,i.jsx)("p",{className:"mt-1 text-center",children:"will reach out to you shortly."}),(0,i.jsx)("p",{className:"mx-3 mt-3 mb-3 text-center text-base sm:mx-0",children:"You’re off to a great start! Save time by entering a password!"}),(0,i.jsxs)(c.l,{className:"flex w-full max-w-[315px] flex-col",onSubmit:w(E),children:[(0,i.jsx)(W.U,{hidePassword:y,setHidePassword:f,...N("password",{required:!0,createPassword:!0}),required:!0,"data-test":"leadSuccessPassword",error:k.password?.message}),(0,i.jsx)(h.$,{className:"mt-3 mb-1 w-full",size:"lg",block:!0,color:"primary",type:"submit","data-test":"leadSuccessCreateAccountBtn",loading:x,"aria-label":"create account",onClick:()=>{d({eventAction:"Contacted Dealer",eventCategory:"Registration",eventLabel:"Create Account"})},children:"Create Account"})]}),(0,i.jsx)(q.z,{onClick:()=>D(),"data-test":"leadSuccessBtnNoAccount","aria-label":"continue without creating an account",className:"mt-3",children:"Skip for now"})]})})};var X=a(57398),ee=a(66757),et=a(3617),ea=a(90462),ei=a(11281);let er=e=>{let{defaultSearchRadius:t,distanceFromDealership:a,onSearchRadiusChange:s,setDistanceIndicatorOpen:l}=e,[o,c]=r.useState(!0),[d,m]=r.useState(t);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(X.r,{title:"Vehicle Is Farther Away"}),(0,i.jsxs)(n.c,{className:"flex w-full flex-1 flex-col items-center justify-center",children:[!!a&&(0,i.jsxs)("p",{className:"-mt-3",children:["This vehicle is located"," ",(0,u.B)(V()(a))," miles from your location. Would you like to continue with seeing its price?"]}),(0,i.jsxs)(ee.z,{className:"mt-3",value:o?"no":"yes",onChange:()=>c(!o),type:"input",label:"Size",children:[(0,i.jsx)(et.h,{value:"yes",className:"mb-3",children:"Yes, I'm aware of the distance and want to continue."}),(0,i.jsx)(et.h,{value:"no",className:A()(o?"mb-[8px]":"mb-3"),children:"No, let's find listings closer to me."})]}),o&&(0,i.jsx)("div",{className:"mb-3",children:(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)("div",{className:"text-muted col-span-6",children:"New distance"}),(0,i.jsx)(ea.o,{className:"col-span-6",borderless:!0,"aria-label":"Change search radius",value:d.toString(),"data-test":"searchFiltersSearchRadius",onChange:e=>{m(parseInt(e))},options:ei.O})]})}),(0,i.jsx)(p.j,{className:"w-full",children:(0,i.jsx)("div",{className:"w-full",children:o?(0,i.jsx)(h.$,{className:"w-full",color:"primary",onClick:()=>!!s&&s(d),tracking:{eventAction:"No",eventCategory:"Dealer Distance Transparency Modal",eventLabel:d},children:"Show Result"}):(0,i.jsx)(h.$,{className:"w-full",color:"primary",onClick:()=>l(!1),tracking:{eventAction:"Yes",eventCategory:"Dealer Distance Transparency Modal",eventLabel:a},children:"Next"})})})]})]})};var es=a(18210),en=a(49036);let el=e=>{var t;let{showDistanceIndicator:a=!1,isOpen:s,onClose:n,hideClose:l,onLeadSuccess:o,onLeadSubmit:c,listing:d,financingType:m="CASH",modalTitle:u,sponsoredListing:p,preferTestDrive:h,submitAsCoreLead:v}=e,x=(0,g.z1)(),{breakpointDown:y}=(0,F.d)(),{matches:f}=(0,G._P)(U.o.abtDistanceTransparencyIndicator),{consumer:_,profileComplete:C}=(0,D.i)(),{onSearchRadiusChange:b,distanceFromDealership:j,isWithinLeadRadius:N}=(0,es.$)({listing:d}),{sessionSRPFilterValue:S}=(0,en.c)(),w=(t=S?.searchRadius||0,[10,25,50,75,100,150,200,250,500].reverse().find(e=>t>e)??5e3),[k,I]=(0,r.useState)(!1),[L,P]=(0,r.useState)(!1),A=!!_.verificationRequested&&!_.verified,$=!!_.authenticated&&!A,[E,T]=(0,r.useState)({}),z=E[d.vehicle.vin],B=(0,r.useRef)(!1),{setValue:H}=(0,Q.F)("profileRegHideCreateAccount"),[q,W]=(0,r.useState)(!0),Y=a&&f("challenger2")&&!N&&q;(0,r.useEffect)(()=>{s&&!k&&_?.loaded&&(P(C&&!A),I(!0))},[_.authenticated,_?.loaded,A,k,s,C]),(0,r.useEffect)(()=>{s&&!B.current&&(L||$||(B.current=!0,x({eventAction:"Contact Dealer",eventCategory:"Registration",eventLabel:"Open - No Account"})),$&&(B.current=!0,x({eventAction:"Contact Dealer",eventCategory:"Registration",eventLabel:"Open - Signed In"})),Y&&x({eventAction:"Shown",eventCategory:"Dealer Distance Transparency Modal"}))},[x,s,L,$,Y]);let J=(0,r.useCallback)(e=>{T(e=>({...e,[d.vehicle.vin]:!0})),o&&(P(!0),e?o({queryZipCode:e}):o())},[d.vehicle.vin,o]),K="profile-registration-form",X=a&&!N;return(0,i.jsx)(M.a,{id:"lead-submission-modal",open:s,onClose:()=>{z?(H("true"),x({eventAction:"Contacted Dealer",eventCategory:"Registration",eventLabel:"Close"})):x({eventAction:"Contact Dealer",eventCategory:"Registration",eventLabel:"Close"}),n()},hideClose:l,drawer:y("sm")?"bottom":void 0,className:"md:max-w-[480px]","aria-label":"profile registration submit lead modal","aria-labelledby":K,"data-test":"vdpLeadSubmissionModal",children:Y?(0,i.jsx)(er,{defaultSearchRadius:w,distanceFromDealership:V()(j||0),setDistanceIndicatorOpen:W,onSearchRadiusChange:b}):z?(0,i.jsx)(Z,{dealershipName:String(d.dealership.name),email:_.email,onSubmit:n,ariaHeadingId:K}):L?(0,i.jsx)(R,{vin:d.vehicle.vin,newOrUsed:d.vehicle.condition,makeId:Number(d.vehicle.make.databaseId),modelId:Number(d.vehicle.model.databaseId),trimId:d.vehicle.style?Number(d.vehicle.style.trim.databaseId):null,onProspectSuccess:J,onLeadSubmit:c,ariaHeadingId:K,financingType:m,sponsoredListing:p,preferTestDrive:h,submitAsCoreLead:v,displayDistanceWarning:X&&f("challenger1"),distanceFromDealership:j??void 0}):(0,i.jsx)(O,{isWithinLeadRadius:N,distanceFromDealership:j??void 0,modalTitle:u,onProspectSuccess:J,financingType:m,vin:d.vehicle.vin,newOrUsed:d.vehicle.condition,onRegSuccessProfileComplete:()=>{P(!0)},sponsoredListing:p,preferTestDrive:h,submitAsCoreLead:v})})}},64688:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleCardFooter_Geolocation on Geolocation {
  __typename
  id
  state
  city
}
    `},65536:(e,t,a)=>{"use strict";a.d(t,{$:()=>n});var i=a(6029);a(55729);var r=a(75828),s=a.n(r);let n=e=>{let{className:t,size:a,...r}=e;return(0,i.jsx)("div",{className:s()("loader-lines",a&&l[a],t),...r,children:(0,i.jsxs)("div",{className:"loader-lines-center",children:[(0,i.jsx)("div",{className:"loader-lines-line"}),(0,i.jsx)("div",{className:"loader-lines-line"}),(0,i.jsx)("div",{className:"loader-lines-line"}),(0,i.jsx)("div",{className:"loader-lines-line"})]})})},l={1:"loader-lines-1",2:"loader-lines-2",3:"loader-lines-3"}},66032:(e,t,a)=>{"use strict";a.d(t,{d:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleCardGoFiStips_ListingSearchEdge on ListingSearchEdge {
  __typename
  cursor
  estimatedMonthlyPaymentDetails {
    __typename
    stips
  }
  node {
    __typename
    id
    pricing {
      __typename
      listPrice
    }
  }
}
    `},66437:(e,t,a)=>{"use strict";a.d(t,{N:()=>i.N});var i=a(32259)},66623:(e,t,a)=>{"use strict";a.d(t,{C:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleShareModal_Vehicle on Vehicle {
  __typename
  vin
  condition
  year
  make {
    __typename
    id
    name
  }
  model {
    __typename
    id
    name
  }
}
    `},67133:(e,t,a)=>{"use strict";a.d(t,{b:()=>l});var i=a(6029);a(55729);var r=a(1392),s=a(75828),n=a.n(s);let l=e=>{let{className:t,...a}=e;return(0,i.jsx)(r.a,{className:n()("uppercase",t),color:"blue",...a,children:"Buy Online"})}},71748:(e,t,a)=>{"use strict";a.d(t,{m:()=>i.V});var i=a(51380)},72252:(e,t,a)=>{"use strict";a.d(t,{K:()=>i});let i=(0,a(55729).createContext)({isGoFiActive:!1,isNonActiveGoFiMode:!1,renderGoFiPrompt:!1,fetchMoreListings:()=>{},hasMoreListings:!1,isLoadingMoreListings:!1,isGoFiEnabled:!1})},74603:(e,t,a)=>{"use strict";a.d(t,{U:()=>C});var i=a(6029);a(10490);var r=a(55729);a(93780);var s=a(83658),n=a(78260),l=a(33131),o=a(44911),c=a.n(o),d=a(12092),m=a(69417),u=a(87804),p=a(64476),h=a(99280),g=a(87928),v=a(98094),x=a(2432),y=a(54564),f=a.n(y);let _=e=>{let{identifier:t,handleSubmit:a,error:n,submissionLoading:o,authenticationRequired:c,isTCPlusNewCarOnly:d,modalTitle:m}=e,u=(0,s.z1)(),{consumer:p,isAuthenticatedPartnerUser:y,profileComplete:_}=(0,l.i)(),C=!!(p.email&&p.phone)&&!y,{tcpa:b,confirmTcpa:j,confirmedTcpa:N}=(0,v.a)({contactPreference:"any",identifier:t,className:C?"mt-3 text-xs text-muted":void 0}),S=()=>{j(),a()};(0,r.useEffect)(()=>{!n&&!o&&!y&&(!c||p.authenticated)&&_&&p.acceptedTos&&N&&a()},[c,N,p.acceptedTos,p.authenticated,n,y,a,_,o]),(0,r.useEffect)(()=>{u({eventAction:"Confirm Modal",eventCategory:"Modal View"})},[u]);let w=d?(0,i.jsx)(h.D,{size:"3",className:"pb-2-5 md:-mt-2",children:"Buy your car online"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.E,{src:f(),alt:"","aria-hidden":!0}),(0,i.jsx)(h.D,{size:"3",children:"Get actual pricing"})]}),k=d?"Easily handle every step of the car-buying process at your convenience. Pick up or delivery? Cash or finance? It's your call! To get started, simply agree to connect with a Certified Dealer to view your personalized pricing.":null;return C?(0,i.jsx)(x.p,{handleSubmit:S,title:w,subtitle:k,loading:o,error:n,trackPageName:"Marketplace Reprospect Confirmation",showFields:!0,customListItems:[],tcpa:b,modalTitle:k?m:void 0,isModal:!0,readOnly:!0}):(0,i.jsx)(x.p,{handleSubmit:S,title:"Get Pricing",loading:o,error:n,trackPageName:"Marketplace Reprospect Confirmation",showFields:!0,customListItems:[],tcpa:b,modalTitle:m,isModal:!0})},C=e=>{let{showRegModal:t,onClose:a,hideClose:o,vin:h,vehicleCondition:g,paymentType:v,refetchDataAfterLoginOrRegistering:x,setRegIsLoading:y,searchLocation:f,isGoFi:C,sponsoredListing:b,preferTestDrive:j,modalTitle:N}=e,{consumer:S,profileComplete:w}=(0,l.i)(),[k,I]=(0,r.useState)(!1),[L,P]=(0,r.useState)(!1),A=(0,s.z1)(),{breakpointDown:$}=(0,d.d)(),E=$("sm")?"bottom":void 0,[D,T]=r.useState(""),{submitLead:V}=(0,p.s0)({unlockTaxesAndFees:C,vin:h,financingType:v,leadAttributes:[...b?["SPONSORED_LISTING"]:[],...j?["UBER_TEST_DRIVE"]:[]]}),[R,F]=r.useState(!1),M="NEW"===g&&!C,[z,G]=r.useState(!1),U=r.useCallback(async()=>{G(!0);let{error:e}=await V({confirmedTcpa:!0,vehicleRegistrationZipcode:f?.postalCode,sponsoredListing:b});if(e){T("There was an issue submitting your request."),G(!1);return}T(""),A({eventAction:"Buy Online - Marketplace Lead Submit",eventCategory:"Prospect",eventLabel:"NEW"===g?"New":"Used"}),x?.(),G(!1),a(),y?.(!0),F(!1)},[a,x,f,y,A,g,V,b]);if((0,r.useEffect)(()=>{t&&!k&&S?.loaded&&(C?S.authenticated?U():F(!0):P(!!(S.authenticated&&w&&S.verified)),I(!0))},[S.authenticated,S?.loaded,S.verified,k,C,w,t,U]),L)return(0,i.jsx)(m.a,{id:"checkout-registration-modal","aria-label":"Profile registration TC+ modal","aria-labelledby":"checkoutConfirm",className:"md:max-w-[480px]",open:t,onClose:a,hideClose:o||M,drawer:E,children:(0,i.jsx)(_,{handleSubmit:U,submissionLoading:z,error:D,identifier:h,authenticationRequired:!0,isTCPlusNewCarOnly:M,modalTitle:N})});if(C&&!R)return null;let O=M?(0,i.jsx)(i.Fragment,{children:"Buy your car online"}):(0,i.jsxs)(i.Fragment,{children:["Get Started with",(0,i.jsx)("span",{className:"mx-1 inline-flex",children:(0,i.jsx)(u.V,{url:c(),width:99,height:19,alt:"TrueCar Plus"})})]}),B=M?"Easily handle every step of the car-buying process at your convenience. Pick up or delivery? Cash or finance? It's your call! To get started, simply agree to connect with a Certified Dealer to view your personalized pricing.":"With TrueCar+ you get the discounted price you'll pay at the dealership. Log in or sign up to continue.";return(0,i.jsx)(m.a,{"aria-label":"Profile registration TC+ modal","aria-labelledby":"profile-registration-form",open:C?R:t,onClose:a,drawer:E,className:"md:max-w-[480px]",children:(0,i.jsx)(n.c,{layout:n.k,title:O,subtitle:B,modalTitle:N,profile:C?void 0:{includeAddress:!0,tcpaIdentifier:h},registrationSource:"VDP Marketplace TC+ Registration",onRegSuccessProfileComplete:()=>{T(""),P(!0)},onSuccess:U,onSuccessLoading:z,onSuccessError:D,ariaId:"profile-registration-form"})})}},75068:(e,t,a)=>{"use strict";a.d(t,{i:()=>s});var i=a(6029);a(55729);var r=a(7557);let s=e=>{let{fill:t,...a}=e;return(0,i.jsx)(r.I,{spriteID:t?"content_copy-fill":"content_copy",...a})}},76734:(e,t,a)=>{"use strict";a.d(t,{G:()=>L});var i=a(6029),r=a(27550);let s=(0,r.Ay)`
    query getQuickViewModal($vin: String!, $galleryImagesCount: Int, $postalCode: String, $postalCodeExists: Boolean = false) {
  listing(vin: $vin) {
    __typename
    id
    galleryImages(first: $galleryImagesCount) {
      __typename
      edges {
        __typename
        cursor
        node {
          __typename
          metadata
          width
          height
          url
        }
      }
    }
    dealership {
      __typename
      parentDealershipName
      id
      location {
        __typename
        id
        geolocation {
          __typename
          id
          city
          state
          distanceFrom(postalCode: $postalCode) @include(if: $postalCodeExists)
        }
      }
    }
    availability
    consumerProspectedAt
    pricing {
      __typename
      transferFee {
        __typename
        fromCity
        fromState
      }
    }
    listedAt
    vehicle {
      __typename
      vin
      stockNumber
      condition
      bodyStyle
      engine
      exteriorColor {
        __typename
        ... on BasicColor {
          __typename
          name
          rgbHex
        }
      }
      interiorColor {
        __typename
        ... on BasicColor {
          __typename
          name
          rgbHex
        }
        ... on VehicleColor {
          __typename
          id
        }
      }
      mileage
      fuelType
      mpg {
        __typename
        city
        highway
      }
      transmission
      style {
        __typename
        id
        driveType {
          __typename
          id
          acronym
        }
        electricRange
      }
      conditionHistory {
        __typename
        ownerCount
        accidentCount
      }
    }
  }
}
    `;s.documentId="84b388cc62670f1425f26fab92f78f0314b06b24a51f9662f2e41edbceef3da1";var n=a(55729),l=a(93780),o=a(69417),c=a(57398),d=a(89337),m=a(46936),u=a(79865),p=a(61568);a(74695).m;var h=a(75828),g=a.n(h),v=a(83658),x=a(63798),y=a(87804),f=a(62511),_=a(29107),C=a.n(_),b=a(53693),j=a(2213);let N=()=>(0,i.jsx)("div",{className:"absolute top-0 left-0 bottom-0 right-0 z-[2] w-full",children:(0,i.jsxs)("div",{className:"relative flex h-full w-full items-center justify-center",children:[(0,i.jsx)("div",{className:"absolute top-0 bottom-0 left-0 right-0 rounded bg-[#0000005c]"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("span",{className:"text-lg text-white",children:"See more photos"}),(0,i.jsx)(j.B,{after:!0,size:29,className:"fill-white"})]})]})});var S=a(88833);let w=e=>{let{listing:t,loading:a,href:r,rel:s,target:l,showSeeMorePhotosOverlay:o,autonationAvailabilityEnabled:c}=e,d=(0,v.z1)(),m=void 0!==l?{target:l}:{},u=t.galleryImages?.edges.length>0,p=u?t.galleryImages?.edges:[{node:{url:C(),height:1,width:1,metadata:[]}}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.F,{slidesToShow:1,className:"relative mt-2 w-full",dots:!0,dotsPosition:"inside",dotsTheme:"dark",prevButton:k,nextButton:k,buttonPosition:"inside",onSlideChange:e=>{d({eventAction:"SRP Vehicle Card Photo Scroll",eventCategory:"Engagement",eventLabel:`Slide ${e[0]+1} of ${t.galleryImages?.edges.length}`})},children:p.map((e,t)=>{let{node:l}=e,c=(l.metadata||"").includes("FULL_SUBJECT"),h=t===p.length-1&&o?{eventAction:"SRP Vehicle Card Last Photo Click",eventCategory:"Engagement"}:void 0;return(0,n.createElement)(S.N,{"data-test":"quickViewModalImageLink","aria-hidden":"true",href:r,rel:s,...m,key:l.url,tabIndex:-1,onClick:()=>{h&&d(h)},className:"relative block",children:[t===p.length-1&&o&&(0,i.jsx)(N,{},"overlay"),(0,i.jsx)(y.V,{className:"rounded-[10px]",width:16,height:"eager"===a?9.05:9,fit:u?"fill":void 0,fallbackSrc:C(),url:l.url,alt:"",role:"presentation",block:!0,loading:"eager"===a&&0===t?"eager":t>0?"lazy":void 0,pad:u&&c?20:void 0},l.url)]})})}),(0,i.jsx)(b.f,{listing:t,className:"mt-2",hideHeading:!0,showConditionHistory:!0,autonationAvailabilityEnabled:c})]})},k=e=>{let{className:t,iconClassName:a,direction:r,...s}=e;return(0,i.jsx)(f.m,{direction:r,className:g()("carousel-arrow-vehicle-card-carousel-button","prev"===r?"carousel-arrow-vehicle-card-carousel-button-prev":"carousel-arrow-vehicle-card-carousel-button-next",t),iconClassName:g()(a,"carousel-arrow-vehicle-card-carousel-button-icon"),...s})};var I=a(35355);let L=e=>{let{vin:t,open:a,setOpen:r,showSeeMorePhotosOverlay:s,autonationAvailabilityEnabled:n,href:h}=e,{data:g}=(0,l.IT)(P,{variables:{vin:t,galleryImagesCount:5},ssr:!1});return(0,i.jsxs)(o.a,{open:a,onClose:()=>r(!1),size:"md","data-test":"quickViewModal","aria-labelledby":"modal-popup-quickview",children:[(0,i.jsx)(c.r,{title:"Quick View"}),(0,i.jsx)(d.c,{children:g?.listing?(0,i.jsx)(w,{listing:g.listing,href:h,showSeeMorePhotosOverlay:s,autonationAvailabilityEnabled:n}):(0,i.jsx)(I.D,{})}),(0,i.jsx)(m.j,{children:(0,i.jsx)(u.$,{"aria-label":"View full listing",color:"primary",href:h,children:(0,i.jsxs)("div",{className:"ml-2 flex items-center",children:["View full listing",(0,i.jsx)(p.Y,{size:"sm"})]})})})]})},P=s},77429:e=>{e.exports="/assets/_next/static/images/handshake-b0d499ca8d6703e340bfd03d397d0b9a.svg"},77801:(e,t,a)=>{"use strict";a.d(t,{C:()=>s});var i=a(27550),r=a(27851);let s=(0,i.Ay)`
    fragment Listing_Partner on Partner {
  __typename
  id
  ...VehicleCardSmallerCard_Partner
}
    ${r.o}`},78388:(e,t,a)=>{"use strict";a.d(t,{D:()=>s});var i=a(6029),r=a(79865);a(55729);let s=e=>(0,i.jsx)(r.$,{"data-test":"regCTAButton",color:"primary",size:"lg",type:"submit",...e})},79213:(e,t,a)=>{"use strict";a.d(t,{O:()=>s});var i=a(27550),r=a(80835);let s=(0,i.Ay)`
    fragment Listing_Geolocation on Geolocation {
  __typename
  id
  postalCode
  ...VehicleCardSmallerCard_Geolocation
}
    ${r.Y}`},79328:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});let i=a(55729).createContext(void 0)},79943:(e,t,a)=>{"use strict";a.d(t,{u:()=>s});var i=a(6029);a(55729);var r=a(7557);let s=e=>{let{fill:t,...a}=e;return(0,i.jsx)(r.I,{spriteID:t?"plug-fill":"plug",...a})}},80561:(e,t,a)=>{"use strict";a.d(t,{l:()=>i}),a(27014),a(93780);let i=e=>{let{dealership:t}=e;return!!t.parentDealershipName?.match(/^drivetime/i)}},80581:(e,t,a)=>{"use strict";a.d(t,{I:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment useSavedVehicle_Listing on Listing {
  __typename
  id
  vehicle {
    __typename
    vin
  }
  dealership {
    __typename
    id
    databaseId
  }
  consumerContext {
    __typename
    saved
  }
}
    `},80835:(e,t,a)=>{"use strict";a.d(t,{Y:()=>n});var i=a(27550),r=a(64688),s=a(10490);let n=(0,i.Ay)`
    fragment VehicleCardSmallerCard_Geolocation on Geolocation {
  __typename
  id
  postalCode
  ...VehicleCardFooter_Geolocation
  ...CheckoutRegistration_Geolocation
}
    ${r.Z}
${s.f}`},81304:(e,t,a)=>{"use strict";a.d(t,{b:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment usePartnerPreferred_Dealership on Dealership {
  __typename
  id
  databaseId
  dealershipConsumerContext {
    __typename
    partnerPreferred
  }
}
    `},82499:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i.Z});var i=a(73562)},85033:(e,t,a)=>{"use strict";a.d(t,{N:()=>s});var i=a(6029);a(55729);var r=a(7557);let s=e=>{let{fill:t,...a}=e;return(0,i.jsx)(r.I,{spriteID:"human-talk",...a})}},91442:(e,t,a)=>{"use strict";a.d(t,{J:()=>n});var i=a(51693);let r="returnUserEmail",s="returnUserPhone",n=()=>{let{getCookie:e,setCookie:t}=(0,i.l)();return{getReturnUser:()=>({email:e(r)||"",phone:e(s)||""}),setReturnUser:(e,a)=>{t(r,e),t(s,a)}}}},92026:(e,t,a)=>{"use strict";a.d(t,{FN:()=>i,_v:()=>r,ew:()=>s});let i={EXCELLENT:"IconCaretDoubleDown",GREAT:"IconArrowDropDown",FAIR:"IconCheck",HIGH:"IconArrowDropUp"},r={EXCELLENT:"Excellent Price",GREAT:"Great Price",FAIR:"Fair Price",HIGH:"High Price"},s={EXCELLENT:0,GREAT:1,FAIR:2,HIGH:3}},95834:(e,t,a)=>{"use strict";a.d(t,{p:()=>r});var i=a(27550);let r=(0,i.Ay)`
    fragment VehicleCardFooter_Listing on Listing {
  __typename
  id
  distanceRetailing
  dealership {
    __typename
    id
    name
    location {
      __typename
      id
      geolocation {
        __typename
        id
        city
        state
      }
    }
  }
  pricing {
    __typename
    deliveryFee
    transferFee {
      __typename
      amount
      fromCity
      fromState
      distance
    }
  }
}
    `},99536:(e,t,a)=>{"use strict";a.d(t,{JC:()=>s}),a(5276),a(47811),a(93780);var i=a(90408);let r=e=>(0,i.Q)(e),s=e=>{if(!e?.partnerPreferredProgram)return null;let{programName:t,partnerIcon:a,bannerHeading:i,benefits:s}=e.partnerPreferredProgram;return i&&s?{programName:""===t?"Preferred Dealer":t,partnerIcon:a?r(a):"",bannerHeading:i,benefits:s}:null}}}]);