1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,280126,e=>{e.v({ImNotSure:"ValuationForm-module-scss-module__hpCQoG__ImNotSure",exclusionMessage:"ValuationForm-module-scss-module__hpCQoG__exclusionMessage",formBody:"ValuationForm-module-scss-module__hpCQoG__formBody",formContainer:"ValuationForm-module-scss-module__hpCQoG__formContainer",formNoPadding:"ValuationForm-module-scss-module__hpCQoG__formNoPadding",formWidth:"ValuationForm-module-scss-module__hpCQoG__formWidth",searchButton:"ValuationForm-module-scss-module__hpCQoG__searchButton",stepHeading:"ValuationForm-module-scss-module__hpCQoG__stepHeading",vehicleCheck:"ValuationForm-module-scss-module__hpCQoG__vehicleCheck"})},349833,182228,e=>{"use strict";var t=e.i(563705),a=e.i(464645),i=e.i(509672),s=e.i(271104),l=e.i(974036),o=e.i(880854),r=e.i(480040),n=e.i(868028),d=e.i(667568),c=e.i(197721);e.i(789556);var u=e.i(205637),m=e.i(644800),h=e.i(969570),f=e.i(884102),p=e.i(104377),x=e.i(593806),v=e.i(833921),g=e.i(524620),y=e.i(412065),j=e.i(606144),b=e.i(749281),w=e.i(802872),_=e.i(348797),N=e.i(998380),C=e.i(615190),S=e.i(491315),k=e.i(486874),V=e.i(349759),A=e.i(556167),P=e.i(920269),T=e.i(649854),F=e.i(139768),W=e.i(520036),I=e.i(953117),O=e.i(154072),D=e.i(321634),z=e.i(104215),B=e.i(973909),H=e.i(732618),G=e.i(576241),M=e.i(129182),E=e.i(812731);let R=({isSuccessPage:e})=>{let[a,i]=(0,l.useAtom)(n.userValuationAtom);return a?.make?(0,t.jsxs)(E.Card,{className:"mb-3",style:{borderRadius:"1rem"},children:[(0,t.jsxs)(E.CardHeader,{children:[(0,t.jsx)(E.CardTitle,{className:"text-primary",style:{fontSize:"1.25rem"},children:"Your Current Trade-In Vehicle"}),!e&&(0,t.jsxs)(E.CardDescription,{children:["You have already received a valuation for this ",a?.year," ",a?.make,"Â ",a?.model,". If you have another vehicle you would like to trade-in, get started below."]})]}),(0,t.jsx)(E.CardContent,{children:(0,t.jsxs)("ul",{className:"mb-0",children:[a?.make&&(0,t.jsxs)("li",{children:["Your Vehicle:Â ",(0,t.jsxs)("strong",{children:[a?.year," ",a?.make," ",a?.model]})]}),!(0,n.isValuationPriceHidden)()&&a?.offer_price&&!a?.valuation_range&&(0,t.jsxs)("li",{children:["Estimated Valuation:"," ",(0,t.jsxs)("strong",{children:["$",a?.offer_price?.toLocaleString()]})]})]})}),(0,t.jsx)(E.CardFooter,{children:!e&&(0,t.jsx)("button",{className:"btn btn-primary",onClick:()=>i({}),children:"Add Another Vehicle"})})]}):null};e.s(["YourCurrentValuation",0,R],182228);var q=e.i(280126);let $=(0,T.default)(()=>e.A(303794),{loadableGenerated:{modules:[385876]},ssr:!1}),U=({car:e})=>!d.default.valuationWizard?.locationSelect||e?.id?null:V.default.valuationWizard?.CustomLocationInput?(0,t.jsx)(V.default.valuationWizard.CustomLocationInput,{}):S.isRegent?(0,t.jsx)("div",{className:"col-12",children:(0,t.jsx)(F.default,{locationType:"sales",label:"Select A Location Near You",useDealership:!0})}):(0,t.jsx)("div",{className:"col-12",children:(0,t.jsx)(B.default,{locationType:"sales",label:"Preferred Dealership"})}),L=({data:e})=>(0,t.jsxs)("div",{className:q.default.vehicleCheck,children:[(0,t.jsx)("p",{children:"Your Vehicle:"}),(0,t.jsxs)("h5",{children:[e.year," ",e.make," ",e.model]}),(0,t.jsx)("h6",{className:"card-subtitle text-muted mb-2",children:e.badge}),(0,t.jsx)("small",{className:"text-center",children:"There's a chance these details might not match your car. Please double check that they are correct for your car before proceeding."}),S.isTWGCars&&(0,t.jsxs)("small",{className:"text-center",children:["Please ensure the details of your car are correct - if not, your on-screen offer may not be accurate and will not be valid. In this case, please"," ",(0,t.jsx)(N.default,{href:"/contact",children:"contact"}
1)," one of our locations below to discuss your vehicle in person."]})]}),Y=()=>{let[e]=(0,l.useAtom)(n.exclusionMessageAtom);return e?(0,t.jsx)("div",{className:(0,C.cn)(q.default.exclusionMessage,"bg-success mx-2"),children:(0,t.jsx)("div",{children:e})}):null};var Q=e.i(944875),J=e.i(789580),K=e.i(885765),Z=e.i(451877),X=e.i(3366),ee=e.i(470636),et=e.i(465316),ea=e.i(757656);let ei=["Not the price I was expecting","I'm not ready to sell - I was just curious as to my car's value","I got a better price elsewhere","Other"],es=()=>(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("h3",{className:"mb-2 text-lg font-semibold text-zinc-900",children:"We're unable to provide an online valuation"}),(0,t.jsx)("p",{className:"mb-0 text-zinc-600",children:"However, we'd love to give you an on-site valuation â our team will be in touch shortly."})]}),el=()=>{let{watch:e}=(0,P.useFormContext)(),a=e("reason_for_not_accepting_offer");return(0,t.jsxs)("div",{className:"mx-auto max-w-md text-center",children:[(0,t.jsx)("h3",{className:"mb-2 text-lg font-semibold text-zinc-900",children:"What is the main reason you didn't accept our valuation?"}),(0,t.jsx)("p",{className:"mb-4 text-sm text-zinc-600",children:"Please select an option below"}),(0,t.jsx)(X.default,{name:"reason_for_not_accepting_offer",formItem:{name:"reason_for_not_accepting_offer",label:"Reason for not accepting offer"},defaultValue:"",options:ei,label:!1,direction:"column",className:"text-left"}),(0,t.jsx)("div",{className:"mt-4 flex justify-center",children:(0,t.jsx)(j.SubmitButton,{disabled:!a,children:"Send Feedback"})})]})},eo=()=>{let e=(0,l.useAtomValue)(n.userValuationAtom),{hideOfferAcceptance:i,isLoading:s}=(0,x.usePlugins)(),[o,r]=(0,a.useState)(!1);if(e.exclusion)return(0,t.jsx)(es,{});if(!e.offer_price)return(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(H.default,{})});if(o)return(0,t.jsx)(el,{});let d=[e.year,e.make,e.model].filter(Boolean).join(" ")||"Your vehicle",c=e.valuation_range?e.valuation_range:(e=>{if(null==e||""===e)return"$0";let t="string"==typeof e?parseInt(e,10):e;return Number.isNaN(t)?"$0":"$"+t.toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")})(e.offer_price);return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-lg text-center",children:[(0,t.jsx)("div",{className:"bg-primary/10 text-primary mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full",children:(0,t.jsx)(ea.FaCheckCircle,{size:24,"aria-hidden":"true"})}),(0,t.jsx)("h3",{className:"mb-1 text-xl font-bold text-zinc-900 sm:text-2xl",children:"Your instant offer is ready!"}),(0,t.jsx)("p",{className:"mb-5 text-sm text-zinc-600 sm:text-base",children:"Lock in your value today."}),(0,t.jsx)("div",{className:"mb-3 rounded-xl border border-zinc-200 bg-white p-4 shadow-sm",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)("div",{className:"bg-primary/10 text-primary flex h-10 w-10 shrink-0 items-center justify-center rounded-full",children:(0,t.jsx)(ea.FaCar,{size:18,"aria-hidden":"true"})}),(0,t.jsxs)("div",{className:"min-w-0 text-center",children:[(0,t.jsx)("p",{className:"text-primary mb-0 text-xs font-bold tracking-wide uppercase",children:"Your Vehicle"}),(0,t.jsx)("p",{className:"mb-0 truncate text-base font-semibold text-zinc-900",children:d})]})]})}),(0,t.jsxs)("div",{className:"mb-5 rounded-xl border border-zinc-200 bg-white p-5 shadow-sm",children:[(0,t.jsx)("p",{className:"mb-2 text-sm text-zinc-700",children:"Your estimated Instant Offer Value:"}),(0,t.jsx)("p",{className:"text-primary mb-2 text-4xl font-extrabold sm:text-5xl",children:c}),(0,t.jsx)("p",{className:"mb-0 text-xs text-zinc-500",children:"Based on current market demand in your area and subject to vehicle inspection."})]}),!s&&(i?(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(K.ViewOnlyOfferContent,{})}):(0,t.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:gap-4",children:[(0,t.jsx)(ee.Button,{type:"submit",className:"w-full sm:flex-1",children:"Accept Offer"}),(0,t.jsx)(ee.Button,{type:"button",variant:"primary",outline:!0,className:"w-full sm:flex-1",onClick:()=>r(!0),children:"No Thanks"})]})),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-md bg-zinc-100 px-3 py-2 text-xs text-zinc-700",children:[(0,t.jsx)(ea.FaRegCalendarAlt,{className:"text-primary",size:14,"aria-hidden":"true"}),(0,t.jsx)("span",{children:"Offer expires in 5 business days"})]})]})},er=()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{children:"Happy with the estimated value?"}),(0,t.jsx)("p",{children:'Click "Accept Offer," and our team will reach out to schedule your vehicle inspection. By accepting this offer, you confirm that the information provided in this online valuation is accurate and that you have disclosed any existing damage to the vehicle.'})]}
1),en=({hidePrice:e=!1,hideAcceptance:i=!1,pluginsLoading:s=!1})=>{let[l,o]=(0,a.useState)(!1),{watch:r}=(0,P.useFormContext)(),n=r("reason_for_not_accepting_offer");return s?null:i?(0,t.jsx)(K.ViewOnlyOfferContent,{}):l?(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{children:"What is the main reason you didn't accept our price valuation?"}),(0,t.jsx)("p",{children:"Please select an option below"}),(0,t.jsx)(X.default,{name:"reason_for_not_accepting_offer",formItem:{name:"reason_for_not_accepting_offer",label:"Reason for not accepting offer"},defaultValue:"",options:["Not the price I was expecting","I'm not ready to sell - I was just curious as to my car's value","I got a better price elsewhere","Other"],label:!1,direction:"column",className:"mx-auto max-w-lg"}),"Not the price I was expecting"===n&&(0,t.jsx)("div",{className:"mx-auto max-w-96",children:(0,t.jsx)(Z.default,{name:"expected_price",label:"What price did you expect?",placeholder:"Please enter a price amount"})}),(0,t.jsx)(j.SubmitButton,{children:"Send Feedback"})]}):(0,t.jsx)(t.Fragment,{children:J.enableUserToSayNo?(0,t.jsxs)(t.Fragment,{children:[V.default.valuationWizard?.OfferContent?(0,t.jsx)(V.default.valuationWizard.OfferContent,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{children:e?"Ready to proceed?":"Are you ready to accept this offer?"}),(0,t.jsx)("p",{children:"Please select an option below"})]}),(0,t.jsxs)("div",{className:"flex justify-center gap-2",children:[(0,t.jsx)(ee.Button,{type:"submit",children:d.default.valuationWizard.acceptButtonText??"Accept Offer"}),(0,t.jsx)(ee.Button,{outline:!0,type:"button",onClick:()=>o(!0),children:"No Thanks"})]})]}):V.default.valuationWizard?.OfferContent?(0,t.jsx)(V.default.valuationWizard.OfferContent,{}):S.isPWAH?(0,t.jsx)(er,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{children:e?"Ready to proceed?":"Happy with the estimated value?"}),(0,t.jsx)("p",{children:"Please submit an enquiry to proceed"})]})})};var ed=e.i(786148),ec=e.i(141974);let eu=[{name:"vehicle-details",type:"CUSTOM",component:({car:e,dark:a,termsMessage:i,resetForm:o,setSwitchToTradeIn:r,recentSearchError:c,vehicleSearchError:u})=>{let{isSubmitted:m,isSubmitting:h}=(0,P.useFormState)(),{setValue:f}=(0,P.useFormContext)(),[p]=(0,l.useAtom)(n.userValuationAtom),[x]=(0,l.useAtom)(n.exclusionMessageAtom),v=S.isRegent;if(p.offer_price)return(0,t.jsx)(R,{});let g=p.id&&m,y=S.isTWGCars?"Confirm Vehicle for Offer":"Search Vehicle";return(0,t.jsxs)("div",{className:(0,C.cn)(a&&"text-white","px-md-2 container"),children:[!S.isTWGCars&&(0,t.jsx)(Y,{}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)("div",{className:"col-md-6 col-12",children:(0,t.jsx)(W.default,{name:"kms",placeholder:"Vehicle Kilometers",label:!0})}),(0,t.jsx)("div",{className:"col-md-6 col-12",children:(0,t.jsx)(O.default,{name:"regoState",placeholder:"State",label:!0,defaultValue:s.default?.address?.state?s.default?.address?.state:"",options:M.states.map(e=>({label:e,value:e}))})}),v&&(0,t.jsx)("div",{className:"col-md-6 col-12",children:(0,t.jsx)(I.default,{name:"postcode",placeholder:"Postcode",label:!0})}),(0,t.jsxs)("div",{className:(0,C.cn)("col-12",v&&"col-md-6"),children:[(0,t.jsx)(D.default,{name:"rego",placeholder:d.default.valuationWizard.customRegoField?d.default.valuationWizard.customRegoField:"Number Plate",label:!0}),d.default.valuationWizard?.imNotSure&&(0,t.jsx)("div",{children:(0,t.jsx)("small",{className:q.default.ImNotSure,onClick:()=>r(!0),children:"I'm not sure.."})}),!1]}),(S.isJohnHughesSite||S.isWWYW)&&(0,t.jsx)(G.PostcodeCoreFields,{}),(0,t.jsxs)("div",{className:"col-12",children:[!S.isJohnHughesSite&&!S.isWWYW&&!S.isJumaPrestige&&(0,t.jsx)(A.default,{label:!0}),(0,t.jsx)(z.default,{name:"message",label:"Enquiry Details",placeholder:"Please specify your trade-in enquiry.",required:!1,rows:5})]}),V.default.valuationWizard?.CustomFields&&(0,t.jsx)(V.default.valuationWizard.CustomFields,{car:e}),(0,t.jsx)(U,{car:e}),!S.isJohnHughesSite&&!S.isWWYW&&(0,t.jsx)("div",{className:"col-12",children:(0,t.jsx)($,{})})]}),(0,t.jsx)("small",{style:{color:"#6c757d"},children:i}),(0,t.jsx)(Y,{}),(0,t.jsx)("div",{className:"row justify-content-center",children:g||x?(0,t.jsx)("button",{className:(0,C.cn)(q.default.searchButton,"btn mt-3",S.isBlinkr?"btn-primary":S.isSydneySouthAutomotive||S.isPeterWarrenAutomotiveRegional||S.isAutomotiveDirectUsedCars?"btn-secondary":"btn-danger"),onClick:()=>{f("rego",""),o()},type:"button",children:"Start New Search"}):(0,t.jsxs)("button",{className:q.default.searchButton+" btn btn-primary mt-3",type:"submit",children:[y," ",h&&!p.id&&(0,t.jsx)(H.default,{})]})}),g&&(0,t.jsx)(L,{data:p}),u&&(0,t.jsxs)("div",{className:q.default.vehicleCheck,children:[(0,t.jsx)("p",{children:"Sorry, we couldn`t find your vehicle."}),(0,t.jsx)("p",{children:"Please check your details and try again."})]}),c&&(0,t.jsxs)("div",{className:q.default.vehicleCheck,children:[(0,t.jsx)("p",{children:"Sorry, you've already searched with those details."}),(0,t.jsx)("p",{children:"Please update your Number Plate or State details and try again."})]})]},"vehicleDetailsStep")}}],em=[{name:"vehicle-conditions",type:"CUSTOM",component:({dark:e})=>{let i=S.isDarkMode,[s]=(0,l.useAtom)(n.userValuationAtom),o=(0,a.useMemo)(()=>{let e=s?.form_questions??[];
1if(S.isJumaPrestige)return[...J.defaultVehicleConditionStepFields.filter(e=>"adjustments.forSale"!==e.name),{name:"numberOfKeys",type:"number",label:"How many keys does the vehicle have?",required:!0,placeholder:"Enter number of keys here.",options:[]},{name:"postcode",type:"number",label:"Residential Postcode",required:!0,placeholder:"Enter your postcode here.",options:[]}];if(S.isPWAH)return[...J.defaultVehicleConditionStepFields,{name:"damage",type:"textarea",label:"Please provide details of any known damage to the vehicle.",required:!1,placeholder:"Enter known damage here.",options:[]}];let t=e.filter(e=>(e.answers?.length??0)>0);return 0===t.length?J.defaultVehicleConditionStepFields:t.map(e=>({name:`adjustments.${(0,ec.parameterize)(e.question)}`,type:"button",label:e.question,options:e.answers?.map(e=>e?.answer)??[]}))},[s?.form_questions]);return(0,t.jsx)("div",{className:(0,C.cn)((e||i)&&"text-white","px-md-2 container"),children:o.map((e,a)=>(0,t.jsx)(ed.default,{...e},e.name+a))},"vehicleConditionStep")}}],eh=[{name:"photos",type:"CUSTOM",component:k.PhotoUploadStep}],ef=[{name:"valuation",type:"CUSTOM",component:({dark:e})=>{var a;let[i]=(0,l.useAtom)(n.userValuationAtom),{hideOfferAcceptance:o,isLoading:r}=(0,x.usePlugins)(),c=(0,n.isValuationPriceHidden)();if(S.isBlinkr)return(0,t.jsxs)("div",{className:(0,C.cn)(e&&"text-white","px-md-2 container"),children:[(0,t.jsx)(eo,{}),V.default.forms?.CustomFormDisclaimer&&(0,t.jsx)(V.default.forms.CustomFormDisclaimer,{})]});let u=i?.valuation_range?"We estimate your car is valued between the range of ":`Based on the details you have provided, estimated value for your ${i.year} 2 ${i.make} ${i.model} is`,m=c?`Thank you for providing the details for your ${i.year} ${i.make} ${i.model}.`:d.default.valuationWizard.offerIntroText??u,h=S.isQAutomotive?"Please note that the estimated value is a guide only and may change after the physical inspection. Any additional accessories fitted to your vehicle will be taken into account during the inspection.":"*Estimate does not take into consideration any additional accessories you might have had fitted to the car. We will factor those in at inspection.",f=void 0===d.default.valuationWizard.offerEstimateDisclaimer?h:d.default.valuationWizard.offerEstimateDisclaimer;return(0,t.jsx)("div",{className:(0,C.cn)(e&&"text-white","px-md-2 container"),children:(0,t.jsxs)("div",{className:"container text-center",children:[(0,t.jsx)(et.ResponsiveH4,{children:m}),(0,t.jsx)("hr",{}),(0,t.jsx)("div",{className:"text-success",children:i.offer_price?i.exclusion?(0,t.jsx)("h5",{children:"We are unable to provide an online valuation - However, we would love to give you an on-site valuation."}):c?(0,t.jsx)("h5",{children:"Our team will review your vehicle details and be in touch shortly."}):i?.valuation_range?(0,t.jsxs)("h3",{children:[i.valuation_range,"*"]}):(0,t.jsxs)("h3",{children:[(a=i?.offer_price?.toString())?"$"+parseInt(a).toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"):"$0.00","*"]}):(0,t.jsx)(H.default,{})}),S.isMagicDealGroup&&(0,t.jsx)("p",{className:"small mt-0",children:`All offers made by ${s.default.name} for the trade-in or sale of your vehicle are 3 subject to inspection and verification by ${s.default.name}. The final offer value 4 will be confirmed upon viewing the vehicle in person.`}),!c&&f&&(0,t.jsx)("p",{className:"small mt-0",children:f}),!i.exclusion&&(0,t.jsx)(en,{hidePrice:c,hideAcceptance:o&&!c,pluginsLoading:r}),V.default.forms?.CustomFormDisclaimer&&(0,t.jsx)(V.default.forms.CustomFormDisclaimer,{})]})})}}],ep=[{type:"CUSTOM",name:"user-details",component:({car:e})=>"verificationSent"===(0,l.useAtomValue)(v.loginStatusAtom)?(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"mt-2 mb-3",children:"We just need to verify itâs youâ¦"}),(0,t.jsx)(D.default,{name:"code",label:"Verification code",placeholder:"Verification code",help:"Check your phone for an SMS from TWVerify",rules:{validate:e=>6===e.length||"You have not entered the correct value"}})]}):(0,t.jsxs)("div",{children:[(0,t.jsx)(A.default,{label:!0}),(0,t.jsx)(W.default,{name:"kms",label:"Vehicle Kilometers",placeholder:"Vehicle Kilometers"}),S.isBlinkr&&(0,t.jsx)(I.default,{name:"postcode",placeholder:"Postcode",label:!0}),!S.isJumaPrestige||!S.isBlinkr&&(0,t.jsx)(z.default,{name:"message",label:"Enquiry Details",placeholder:"Please specify your trade-in enquiry."}),V.default.valuationWizard?.CustomFields&&(0,t.jsx)(V.default.valuationWizard.CustomFields,{car:e}),(0,t.jsx)(U,{car:e}),(0,t.jsx)(Q.default,{})]})}],ex=S.isGalleriaToyota||S.isScarboroToyota?"Estimated Online Valuation":S.isTWGCars?"Get Instant Offer*":S.isBlinkr?"Instant Offer":"Estimated Valuation Offer",ev={"Rego Lookup":{fields:[{name:"rego",type:"rego",lookupType:"autograb"}],heading:"Find Your Car",description:"Please fill in your vehicleâs details below."},"User Details":{fields:ep,heading:"User Details",description:"Please fill in your details below"},"Vehicle Details":{fields:eu,heading:"Vehicle Details",description:S.isUnitedWholesale?"Please fill in your vehicleâs details below for a system generated instant offer":S.isTWGCars?"To get your instant on-screen offer, please enter details below.":"Please enter your vehicle's odometer, state and registration details."},"Vehicle Conditions":{fields:em,heading:"Vehicle Conditions",description:""},Photos:{fields:eh,heading:"Add Photos",description:"Optional â photos help us give you a more accurate valuation."},"Valuation Offer":{fields:ef,get heading(){return d.default.valuationWizard.offerHeading??ex},description:""}},eg=S.isTWGCars?`Oh no! We can't give an on-screen offer on this car ð. Please get in touch with our friendly team at one of the locations below ð.`:"Unfortunately, weâre unable to provide an online valuation for this vehicle right now. Please contact our team and weâll be happy to assist you.";e.s(["ValuationForm",0,({page_id:e,customTermsMessage:k=!1,removeWidth:V=!1,removePadding:A=!1,car:P,setSwitchToTradeIn:T,submitCallback:F,hidePoweredBy:W=!1})=>{let I=(0,h.useClientsideRouter)();(0,f.useGatedRoutes)({car:P});let{loginStatus:O,user:D,setUser:z,signInWithOtp:B,verifyOtp:H}=(0,v.useSMSAuthentication)(),G=(0,a.useRef)(null),M=(0,a.useRef)(null),{stepKeys:E,steps:R}=(0,p.constructStepsWithTypeSafety)(ev,["Vehicle Details"]),$=(0,p.useMultistep)(R),{isLastStep:U,nextStep:L,stepIndex:Y,setCurrentError:Q}=$,K=E[Y],Z=P?18:40,X=P?52:43,ee=P?53:50,et=i.default[Z].eventCategory,{hideOfferAcceptance:ea}=(0,x.usePlugins)(P),ei=ea&&!(0,n.isValuationPriceHidden)(),[es,el]=(0,l.useAtom)(n.userValuationAtom),eo=(0,r.useUserTrackingForLead)(),er=(0,l.useSetAtom)(o.enquiredCarAtom),en=(0,l.useSetAtom)(n.exclusionMessageAtom),[ed,ec]=(0,a.useState)(!1),[eu,em]=(0,a.useState)(!1),[eh,ef]=(0,a.useState)(!1);(0,a.useEffect)(()=>{S.isNZWebsite&&T(!0)},[T]);let ep=()=>{el({}),Q(""),en(""),ec(!1)},ex=async t=>{let a=eo?.firstPageQuery,s=eo?.visitedPages,l=t["Vehicle State"];if(U){let{email:a,phone:s,message:l,postcode:o}=t,r=!t.reason_for_not_accepting_offer,n={category:et,subcategory:r?"3. Offer Accepted":"4. Offer Rejected",lead_id:es.lead_id,form_completed:!0,offer_accepted:r,message:l,postcode:o,page_id:e};return!r&&(n.reason_for_not_accepting_offer=t.reason_for_not_accepting_offer,t?.expected_price&&(n.expected_price=t.expected_price)),(0,g.sendToServer)(n).then(()=>((0,_.globalEvent)({eventId:Z,userData:{email:a,phone:s}}),P?.id&&er(P),F&&"function"==typeof F)?F():(0,g.redirectToSuccess)(I,i.default[Z].eventCategory,r?void 0:[{key:"offer_rejected",value:t.reason_for_not_accepting_offer}]))}switch(K){case"Rego Lookup":if(J.verifyPhoneBeforeValuationLookup&&!D?.id)break;L();break;case"User Details":{(0,_.globalEvent)({eventId:43,userData:{email:t.email,phone:t.phone}});let e=await (0,n.getTradeInVehicle)({userData:{...t,rego_state:l},car:P,firstPageQuery:a,visitedPages:s});if(e?.lead_id)if(el({...e,offer_price:null}),e.exclusion)Q(eg);else if(J.enableAutograbSignIn&&!D){let e=(0,C.formatPhoneForTwillio)(t.phone);if("verificationSent"===O){let a=await H(e,t.code);a?.id&&(z(a),L())}else await B(e,t)}else L();else Q(e?.error??"An unknown error occured: A vehicle valuation cannot be provided at this time.");break}case"Vehicle Details":if(ed)L();else{if(es.rego===t.rego&&es.rego_state===l){em(!0);break}(0,_.globalEvent)({eventId:X,userData:{email:t.email,phone:t.phone}}),el({});let e=await (0,n.getTradeInVehicle)({userData:{...t,rego_state:l},car:P,firstPageQuery:a,visitedPages:s});e?.lead_id?(el({...e,offer_price:null}),ef(!1),Q(""),e.exclusion?en(eg):ec(!0)):(ef(!0),e?.error?Q(e?.error):Q("An unknown error occured: A vehicle valuation cannot be provided at this time."))}break;case"Vehicle Conditions":{(0,_.globalEvent)({eventId:ee,userData:{email:t.email,phone:t.phone}});let a=await (0,n.getTradeInValuation)({adjustments:t.adjustments,id:es.id});if(a?.offer_price){if(G.current.scrollIntoView(),el({...es,...a}),ei&&!a.exclusion)try{await (0,n.completeViewOnlyValuation)({lead_id:es.lead_id,category:et,page_id:e}),(0,_.globalEvent)({eventId:Z,userData:{email:t.email,phone:t.phone}}),P?.id&&er(P)}catch{}L()}else a?.error?Q(a?.error):Q("An unknown error occured: A vehicle valuation cannot be provided at this time.");break}case"Photos":{let e=await (0,u.uploadValuationPhotos)({valuationId:es.id,userData:t,uploadedRef:M});if(!e.ok){Q(e.error);break}L()}}},ey=(0,t.jsx)("span",{children:k||(0,t.jsx)(t.Fragment,{children:s.default?.valuation?.valuation_terms_and_conditions_url&&(0,t.jsxs)(t.Fragment,{children:["By clicking search I agree with the"," ",(0,t.jsx)(N.default,{href:S.isJohnHughesSite?"/pages/sell-your-car-terms-and-conditions":s.default?.valuation?.valuation_terms_and_conditions_url,children:"Terms and Conditions*"})]})})}),ej=!d.default.halfDarkMode&&S.isDarkMode,[eb,ew]=(0,l.useAtom)(n.regoAtom),e_=eb||"";return(0,a.useEffect)(()=>{eb&&ew("")},[eb,ew]),(0,t.jsx)("div",{className:q.default.formContainer,children:(0,t.jsxs)("div",{ref:G,className:(0,C.cn)("overflow-hidden",q.default.formBody,!V&&q.default.formWidth,A&&q.default.formNoPadding,ej?"bg-dark":"bg-white"),children:[(0,t.jsx)(w.default,{totalSteps:E.length,currentStep:Y+1,wrapperClassName:(0,C.cn)("w-100 pt-3 pb-0 overflow-hidden",ej?"text-white":"",S.isBlinkr&&"hidden lg:block"),stepData:E.map(e=>
4({heading:ev[e].heading,description:ev[e].description})),stepHeadingClass:(0,C.cn)(q.default.stepHeading,S.isBlinkr&&"Valuation Offer"===K&&"mt-4")}),(0,t.jsxs)(j.Form,{className:(0,C.cn)(ej&&"text-white","w-100 px-2"),onSubmit:ex,defaultValues:{regoState:s.default.address.state,category:et,page_id:e??null,rego:e_||""},children:[E.map((e,a)=>a!==Y?null:(0,t.jsx)(y.FormStep,{currentFields:ev[e].fields,heading:ev[e].heading||e,cardContentClassName:"px-0 px-md-4",description:ev[e].description,index:a,multiStep:$,hideBtn:"Valuation Offer"===K&&ei,headerProps:{className:(0,C.cn)("d-none",ej&&"text-white","User Details"===K&&"verificationSent"===O?"d-lg-none":"d-lg-block",S.isBlinkr&&"Valuation Offer"===K&&"text-center")},buttonProps:{disabled:"Vehicle Details"===K&&!ed,className:"Rego Lookup"===K||"Valuation Offer"===K&&J.enableUserToSayNo?"d-none":void 0},backButtonProps:{className:U?"d-none":void 0},car:P,termsMessage:ey,resetForm:ep,vehicleSearchError:eh,recentSearchError:eu,setSwitchToTradeIn:T,submitBtnText:S.isGalleriaToyota||S.isScarboroToyota?"Enquire Now":S.isPurelyCommercials||(0,n.isValuationPriceHidden)()?"Submit Enquiry":S.isMagicDealGroup?"Accept Estimated Valuation Offer":d.default.valuationWizard.acceptButtonText??"Accept Offer"},e)),(0,t.jsx)(J.CheckForAutograbSource,{}),(0,t.jsx)(b.SyncSMSVerified,{}),(0,t.jsx)(c.default,{}),!W&&(0,t.jsx)(m.PoweredByAutograb,{})]})]},"valuationForm")})}],349833)},775889,e=>{e.v({ActiveStep:"Stepper-module-scss-module__wAHyDq__ActiveStep",CircularStepper:"Stepper-module-scss-module__wAHyDq__CircularStepper",Step:"Stepper-module-scss-module__wAHyDq__Step",StepContainer:"Stepper-module-scss-module__wAHyDq__StepContainer",StepNumber:"Stepper-module-scss-module__wAHyDq__StepNumber"})},802872,139768,e=>{"use strict";var t=e.i(563705),a=e.i(998194),i=e.i(667568);e.i(37622);var s=e.i(272560);function l(e){return(0,s.GenIcon)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}var o=e.i(615190),r=e.i(491315),n=e.i(775889);e.s(["default",0,({totalSteps:e,currentStep:s,wrapperClassName:d="pt-3 pb-4 overflow-hidden",stepData:c,stepHeadingClass:u})=>{let m=[...Array(e).keys()],h=!i.default.halfDarkMode&&r.isDarkMode;return m.length<2?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)("div",{className:d,children:[(0,t.jsx)("nav",{className:"d-none d-lg-flex nav nav-pills justify-content-around position-relative mb-3 flex-row",children:m.length>1&&m.map((e,a)=>(0,t.jsxs)("div",{className:(0,o.cn)(n.default.StepContainer,"d-flex flex-column align-items-center px-2 text-center"),style:{width:`calc(100% / ${m.length})`},children:[(0,t.jsx)("div",{className:n.default.StepNumber,children:(0,t.jsx)("div",{className:(0,o.cn)(n.default.Step,"nav-link rounded-circle d-flex",s===e+1||s>e+1?n.default.ActiveStep:h?"bg-dark":""),children:s&&s>e+1?(0,t.jsx)(l,{size:20,style:{marginLeft:"-0.25rem",marginRight:"-0.25rem"}}):e+1})}),c&&(0,t.jsx)("p",{className:`mt-2 mb-0 ${s===e+1&&"font-weight-bold"}`,children:c[a].heading})]},`step-${a}`))}),(0,t.jsxs)("div",{className:"d-flex d-lg-none justify-content-between px-sm-3 mb-4 px-4",children:[(0,t.jsx)(a.CircularProgressbar,{className:n.default.CircularStepper,styles:(0,a.buildStyles)({textColor:"var(--stepper-text-color)",textSize:"1.5rem",pathColor:"var(--stepper-active-color)",trailColor:"var(--stepper-inactive-color)"}),value:s,maxValue:m.length,text:`${s} of ${m.length}`}),c&&(0,t.jsxs)("div",{className:"pl-2 text-right",children:[(0,t.jsx)("h3",{className:(0,o.cn)(u,"mb-sm-2 mb-1"),children:c[s-1].heading}),s!==m.length&&(0,t.jsxs)("p",{className:"m-0",children:["Next: ",c[s].heading]})]})]})]})}],802872);var d=e.i(464645),c=e.i(920269),u=e.i(271104),m=e.i(635757),h=e.i(154072);let f=u.default;e.s(["default",0,({placeholder:e="Please select a dealership...",locations:a=f.locations,make:i,locationType:s,showCityName:l=!1,useDealership:o=!1,...r})=>{let n=o?"dealership_id":"location_id",{watch:u,setValue:p}=(0,c.useFormContext)(),[x,v]=(0,d.useState)(!1),[g,y]=(0,d.useState)(null),[j,b]=(0,d.useState)(""),w=u().postcode,_=(0,d.useMemo)(()=>{let e=[...a];return i&&(e=e.filter(e=>e.manufacturers.includes(i))),s&&(e=(0,m.getFilteredLocations)(e,s?.toLowerCase())),g&&(e=e.map(e=>({...e,distance:(0,m.calculateDistance)(g.lat,g.lng,parseFloat(e.address.lat),parseFloat(e.address.long))})).sort((e,t)=>
4e.distance-t.distance)),(0,m.locationsSelectOptions)(e,l,o)},[s,a,i,l,o,g]),N=(0,d.useCallback)(async()=>{if(4===`${w}`.length&&w!==j){b(w);try{let{lat:e,lng:t}=await (0,m.getLatLongFromPostcode)(w);y({lat:e,lng:t})}catch(e){console.error(e.message)}}},[j,w]);return((0,d.useEffect)(()=>{x||1!==_.length||(p(n,_[0].value),v(!0)),w&&N()},[x,N,n,_,w,p]),_&&0!==_.length)?(0,t.jsx)(h.default,{defaultValue:"",placeholder:e,options:_||[],...r,name:n}):null}],139768)},576241,e=>{"use strict";var t=e.i(563705),a=e.i(693828),i=e.i(406320),s=e.i(75615),l=e.i(186847),o=e.i(953117);e.i(154072),e.i(129182);var r=e.i(491315);e.s(["PostcodeCoreFields",0,()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"col-12",children:(0,t.jsx)(s.default,{label:!0})}),(0,t.jsxs)("div",{className:"row col-12 pr-0",children:[(0,t.jsx)("div",{className:"col-md-6 col-12 pr-0",children:(0,t.jsx)(o.default,{name:"postcode",placeholder:"Postcode"})}),(0,t.jsx)("div",{className:"col-md-6 col-12 pr-0 pl-3",children:(0,t.jsx)(l.default,{name:"phone",placeholder:"Phone"})})]}),(0,t.jsx)("div",{className:"col-12",children:(0,t.jsx)(i.default,{name:"email",placeholder:"Email"})})]}),"TradeInQuestionsJHG",0,()=>(0,t.jsxs)("div",{style:{background:r.isHuntermotiveUsedCars?"":"#f9fbfc"},children:[(0,t.jsx)(a.default,{title:"What type of vehicles do you buy or trade in?",children:(0,t.jsx)("p",{className:"mb-0 pt-3",children:"We will buy or trade in all types of motor vehicles, including cars, vans and utes. There are some vehicles that we won't be able to give you an online estimated value for, but once you provide the details of your vehicle and we organise an inspection, we'll be able to give you a price. Generally, cars over 7 years old or 100,000 kilometres will not generate an online estimate."})}
4),(0,t.jsxs)(a.default,{title:"How is the online estimate calculated?",children:[(0,t.jsx)("p",{className:"mb-2 pt-3",children:"The online estimated valuation is calculated by taking into account the following:"}),(0,t.jsxs)("ul",{className:"mb-0",children:[(0,t.jsx)("li",{children:"Current market pricing, based on data supplied by an third party independent vehicle valuation tool Autograb"}),(0,t.jsx)("li",{children:"The make, model and year of your car"}),(0,t.jsx)("li",{children:"The number of kilometers on the odometer"}),(0,t.jsx)("li",{children:"The service history of the car and log books are up to date and available"}),(0,t.jsx)("li",{children:"All the components of your car are working/ still with the car e.g. GPS, cargo blinds"}),(0,t.jsx)("li",{children:"2 sets of keys are included"}),(0,t.jsx)("li",{children:"There are no illegal modifications"}),(0,t.jsx)("li",{children:"The interior and exterior condition of your car is considered good given its age"})]})]}),(0,t.jsx)(a.default,{title:"How do I know the exact price for my trade-in?",children:(0,t.jsx)("p",{className:"mb-0 pt-3",children:"The price given online is an estimated valuation. This is an indicative price only, subject to inspection. After submitting your enquiry, one of our team will be in touch to book an inspection of your car. Only after inspection will an exact price be given. An offer will be made to sell your car or trade-in, if it is a vehicle we would like to buy. The final price may differ from the online estimated valuation given the actual condition of the car."})}),(0,t.jsx)(a.default,{title:"Can I sell or trade-in my car if it's still under finance or has money outstanding?",children:(0,t.jsx)("p",{className:"mb-0 pt-3",children:"Yes, but you must obtain a letter from your finance institution indicating the outstanding balance. The amount offered will be paid to your financial institution once the vehicle has been traded in. If the offer is higher than the vehicle payout figure, the difference will be paid to you (or the registered owner) via direct credit to your bank account."})}),(0,t.jsx)(a.default,{title:"Where can I get my car inspected? ",children:(0,t.jsxs)("p",{className:"mb-0 pt-3",children:["Once your online enquiry has been submitted, one of our team will c
4ontact you to arrange an inspection at a time that best suits you. This could be at one of our dealership locations when you're coming in to view and test drive a new vehicle. Alternatively, we"," ",!r.isHuntermotiveUsedCars&&"have other locations around Perth and ","can also come to you."]})})]})])}]);
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.