PageSourceSearch

https://spn-sta.spinny.com/spinny-web/2.0.275/assets/js/3890.04a208b38eefee87d5fd.desktop.js

js spinny.com collected 2026-09-24 19:05:31 UTC 52,944 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3890],{85798:function(e,n,a){var o=a(12957),i=a(85893);n.Z=({width:e="28",height:n="28",viewBox:a="0 0 28 28",fill:t="none",stroke:r=o.Z.border20,pencilFill:s=o.Z.textSecondary,noCircle:l=!1})=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:n,viewBox:a,children:l?(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12.0145L0.0132801 9.42857C0.0132801 9.2827 0.0796809 9.15009 0.172642 9.044L6.71284 2.52542L10.0533 5.8611L3.50596 12.399C3.39972 12.5051 3.26692 12.5582 3.12084 12.5582L0.544486 12.5714C0.398405 12.5714 0.265603 12.5184 0.159362 12.4123C0.0531207 12.3062 0 12.1603 0 12.0145ZM10.8234 5.09219L12.4037 3.51417C12.6161 3.30199 12.6161 2.9572 12.4037 2.73177L9.85387 0.159132C9.64139 -0.053044 9.29611 -0.053044 9.07034 0.159132L7.48269 1.75633L10.8234 5.09219Z",fill:s}):(0,i.jsx)("g",{fill:t,fillRule:"evenodd",children:(0,i.jsx)("g",{children:(0,i.jsxs)("g",{transform:"translate(-323 -384) translate(323 384)",children:[(0,i.jsx)("circle",{cx:"14",cy:"14",r:"13.5",stroke:r}),(0,i.jsxs)("g",{children:[(0,i.jsx)("path",{d:"M0 0L14 0 14 14 0 14z",transform:"translate(7 7)"}),(0,i.jsx)("path",{fill:s,fillRule:"nonzero",d:"M1.75 10.185v1.773c0 .164.128.292.292.292h1.773c.076 0 .152-.03.204-.088l6.37-6.364-2.187-2.187-6.364 6.364c-.059.058-.088.128-.088.21zm10.33-6.078c.228-.228.228-.595 0-.823L10.717 1.92c-.228-.227-.595-.227-.823 0L8.826 2.987l2.187 2.187 1.068-1.067z",transform:"translate(7 7)"})]})]})})})})},45706:function(e,n,a){var o=a(85893);n.Z=()=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,o.jsx)("circle",{cx:"8",cy:"8",r:"7.25",fill:"white",stroke:"#6300A3",strokeWidth:"1.5"}),(0,o.jsx)("path",{d:"M9.8493 8.61427L7.3323 11.2031L7.26453 11.2728L7.3323 11.3425L8.0393 12.0697L8.111 12.1435L8.1827 12.0697L12.0717 8.06971L12.1395 8L12.0717 7.93029L8.1827 3.93029L8.111 3.85655L8.0393 3.93029L7.3323 4.65747L7.26453 4.72718L7.3323 4.79689L9.8493 7.38573H4H3.9V7.48573V8.51427V8.61427H4H9.8493Z",fill:"#6300A3",stroke:"#6300A3",strokeWidth:"0.2"})]})},35958:function(e,n,a){a.d(n,{Z:function(){return t}}),a(67294);var o=a(28700),i=a(85893),t=({classname:e="",isDesktop:n=!1,...a})=>{let{Icon:t,toolTipData:r,onClick:s}=a;return(0,i.jsx)("div",{className:(0,o.Y1)(n&&"ToolTipIcon__toolTipIconContainer"),children:(0,i.jsx)("i",{"data-tooltip":r,onClick:()=>{s&&s()},className:e,role:"none",children:t})})}},3890:function(e,n,a){a.d(n,{Z:function(){return se}});var o=a(67294),i=a(45007),t=a(77462),r=a(98746),s=a(52846),l=a(29531),m=a(28700),c=a(41441),d=a(62250),u=a(99528),p=a(94456),_=a(97229),h=a(29059),x=a(91063),v=a(88515),g={loanBreakUpContainer:"LoanBreakupGraph__loanBreakUpContainer",loanBreakUpHeading:"LoanBreakupGraph__loanBreakUpHeading",loanBreakUpGraph:"LoanBreakupGraph__loanBreakUpGraph",totalLoanAmount:"LoanBreakupGraph__totalLoanAmount",loanAmountPoint:"LoanBreakupGraph__loanAmountPoint",loanBreakUpValueContainer:"LoanBreakupGraph__loanBreakUpValueContainer",loanAmount:"LoanBreakupGraph__loanAmount",loanAmountInterest:"LoanBreakupGraph__loanAmountInterest",loanBreakUpValue:"LoanBreakupGraph__loanBreakUpValue",loanAmountValue:"LoanBreakupGraph__loanAmountValue",loanAmountInterestValue:"LoanBreakupGraph__loanAmountInterestValue",customDonutGraph:"LoanBreakupGraph__customDonutGraph",donutBar:"LoanBreakupGraph__donutBar",innerCircle:"LoanBreakupGraph__innerCircle",pdpDesktop:"LoanBreakupGraph__pdpDesktop",tncContainer:"LoanBreakupGraph__tncContainer",loanBreakUpContainerDesktop:"LoanBreakupGraph__loanBreakUpContainerDesktop"},L=a(85893),y=({isDesktop:e=!1,sucessGreen:n=!1,pdpDesktop:a=!1,handleViewLoanTnc:o,data:i})=>{let{loanAmount:t,emiResult:r,loanDuration:s,savings:l}=i,c=r*s-t>0?r*s-t:0;return(0,L.jsxs)("div",{className:(0,m.Y1)(g.loanBreakUpContainer,e&&g.loanBreakUpContainerDesktop,a&&g.pdpDesktop),children:[!e&&!a&&(0,L.jsx)("h3",{className:g.loanBreakUpHeading,children:"Loan Breakup"}),(0,L.jsx)("div",{className:g.loanBreakUpGraph,children:(0,L.jsx)("div",{className:g.customDonutGraph,children:(0,L.jsx)("div",{className:g.donutBar,style:{transform:`rotate(-${t?c/(c+t)*180:0}deg)`}
1,children:(0,L.jsx)("div",{className:g.innerCircle})})})}),(0,L.jsxs)("div",{className:g.loanBreakUpValueContainer,children:[(0,L.jsxs)("div",{className:g.loanBreakUpValue,children:[(0,L.jsxs)("div",{className:g.loanAmountPoint,children:[(0,L.jsx)("div",{className:g.loanAmount}),"Principal Loan Amount"]}),(0,L.jsx)("div",{className:g.loanAmountValue,children:0===c?"NA":`₹${(0,m.b)(t)}`})]}),(0,L.jsxs)("div",{className:g.loanBreakUpValue,children:[(0,L.jsxs)("div",{className:g.loanAmountPoint,children:[(0,L.jsx)("div",{className:(0,m.Y1)(g.loanAmountInterest,n&&g.green)}),"Total Interest Payable"]}),(0,L.jsx)("div",{className:(0,m.Y1)(g.loanAmountInterestValue,n&&g.green),children:0===c?"NA":`₹${(0,m.b)(c)}`})]}),(0,L.jsxs)("div",{className:g.totalLoanAmount,children:[(0,L.jsxs)("div",{className:g.loanAmountPoint,children:[(0,L.jsx)(v.Z,{}),"Total Amount Payable"]}),(0,L.jsx)("div",{className:g.loanAmountValue,children:0===c?"NA":`₹${(0,m.b)(t+c)}`})]})]}),a&&!!l&&l>0&&(0,L.jsxs)("div",{className:g.tncContainer,children:[(0,L.jsx)("sup",{children:"#"}),(0,L.jsx)("button",{onClick:o,type:"button",children:"T&C apply."})]})]})},f=a(17861),E=a(96503),b=a(71090),j=a(29784),C=a(59161),w=a(27716),A=a(41786),D=a(58371),k=a(59218),N=a(17001),F=a(44353),S=a(76228),I=a(70157),R=a(64835),V=a(76908),T=a(19080),B=a(45706),M=a(94213),P=a(83908),Z=a(12957),O=a(60305),U=a(95099),G=a(95046),Y=a(74417),$={emiFormContainer:"LoanEmiForm__emiFormContainer",sliderSectionWrapper:"LoanEmiForm__sliderSectionWrapper",sliderSectionWrapperV2:"LoanEmiForm__sliderSectionWrapperV2",btn:"LoanEmiForm__btn",errorContainer:"LoanEmiForm__errorContainer",showAnimation:"LoanEmiForm__showAnimation",fadeOut:"LoanEmiForm__fadeOut",animateError:"LoanEmiForm__animateError",animateErrorDisplay:"LoanEmiForm__animateErrorDisplay",visibleError:"LoanEmiForm__visibleError",roiErrorContainer:"LoanEmiForm__roiErrorContainer",emiResultContainer:"LoanEmiForm__emiResultContainer",emiTopSection:"LoanEmiForm__emiTopSection",currency:"LoanEmiForm__currency",emi:"LoanEmiForm__emi",emiV2:"LoanEmiForm__emiV2",emiAmount:"LoanEmiForm__emiAmount",preText:"LoanEmiForm__preText",postText:"LoanEmiForm__postText",emiResult:"LoanEmiForm__emiResult",loanBreakUp:"LoanEmiForm__loanBreakUp",disableLoanBreakUp:"LoanEmiForm__disableLoanBreakUp",loanBreakUpV2:"LoanEmiForm__loanBreakUpV2",text:"LoanEmiForm__text",editROIContainer:"LoanEmiForm__editROIContainer",roi:"LoanEmiForm__roi",textRoi:"LoanEmiForm__textRoi",inputdivContainer:"LoanEmiForm__inputdivContainer",inputIconContainer:"LoanEmiForm__inputIconContainer",inputOfRoi:"LoanEmiForm__inputOfRoi",bottomContainer:"LoanEmiForm__bottomContainer",bottomText:"LoanEmiForm__bottomText",disclaimer:"LoanEmiForm__disclaimer",bottomContainerV2:"LoanEmiForm__bottomContainerV2",sliderSection:"LoanEmiForm__sliderSection",topSection:"LoanEmiForm__topSection",sectionHeading:"LoanEmiForm__sectionHeading",sectionHeadingV2:"LoanEmiForm__sectionHeadingV2",sectionValue:"LoanEmiForm__sectionValue",sectionValueV2:"LoanEmiForm__sectionValueV2",topSectionV2:"LoanEmiForm__topSectionV2",sliderRange:"LoanEmiForm__sliderRange",sliderRangeV2:"LoanEmiForm__sliderRangeV2",sliderInput:"LoanEmiForm__sliderInput",inputV2:"LoanEmiForm__inputV2",sliderInputV2:"LoanEmiForm__sliderInputV2",emiPDP:"LoanEmiForm__emiPDP",financeBtn:"LoanEmiForm__financeBtn",modalheading:"LoanEmiForm__modalheading",stripMargin:"LoanEmiForm__stripMargin",savings:"LoanEmiForm__savings",limitedPeriodOffer:"LoanEmiForm__limitedPeriodOffer",tncContainer:"LoanEmiForm__tncContainer",processingFeeText:"LoanEmiForm__processingFeeText",emiPDPMobile:"LoanEmiForm__emiPDPMobile",loanEmiFormContainerDesktop:"LoanEmiForm__loanEmiFormContainerDesktop",contentSection:"LoanEmiForm__contentSection",sliderSectionCarChoosen:"LoanEmiForm__sliderSectionCarChoosen",loanBreakUpCar:"LoanEmiForm__loanBreakUpCar",emiResultCarChoosen:"LoanEmiForm__emiResultCarChoosen",emiDescription:"LoanEmiForm__emiDescription",sliderSectionCarNotEligible:"LoanEmiForm__sliderSectionCarNotEligible",pdpModal:"LoanEmiForm__pdpModal",pdpModalEmi:"Lo
1anEmiForm__pdpModalEmi",signalBasedFlip:"LoanEmiForm__signalBasedFlip",signalBasedFlipStrip:"LoanEmiForm__signalBasedFlipStrip"},H=({isCarChoosen:e=!1,carNotEligible:n=!1,carData:a=null,fromPDP:s=!1,isModal:l=!1,setModalOverflow:c=null,isUsedCarLoanV2:d=!1,pdpCtaText:u,pdpCtaEventAttributes:p,..._})=>{let{isDesktop:h,emiDetails:v,setShowLoanBreakUp:g,loanBoundries:b,updateEmiDetails:H,customDimension:q,setShowTnc:z,isBothLoanSaleActive:J}=_,{base:K,loanApplication:Q,productDetail:X,buyersList:ee,currentUser:ne,userProfileData:ae,isSignalBasedProfilingEnabled:oe}=(0,i.v9)(e=>({base:e.base,loanApplication:e.product.pageData.loanApplication,productDetail:e.product.pageData.productDetail,buyersList:e.userInventory.buyersList,currentUser:e.usedCarLoan.currentUser,userProfileData:e.carListing.userProfileData,isSignalBasedProfilingEnabled:e.base.isSignalBasedProfilingEnabled}),i.wU),ie=(0,f.s0)(),te=(0,i.I0)(),re=new S.L(te),se=new O.t(te),le=(0,f.TH)(),me=new URLSearchParams(le.search).get("source"),{loanAmount:ce,loanDuration:de,downpayment:ue}=b,pe=s?"loan":"loan-page",_e=(0,E.Z)("genericGA4Event",{eventName:"used_car_loan_calc_emi_tab_seen",eventCategory:"section_seen",componentTitle:"loan_calculator",componentSubTitle:"",additionalAttribute:JSON.stringify({signal_based_pa:oe?"y":"n",sale:J?"y":"n",model_score:ae?.propensity_score,severity:ae?.probability_tier})}),{sendUCLGAEvent:he}=(0,D.zn)(q,"","loan_calculator"),[xe,ve]=(0,o.useState)({loanAmount:{isError:!1,message:`Sorry! Maximum loan possible ${e?"on this car":""} is ₹${(0,m.b)(e?v.maxLoanAmount:ce.max)}.`,errorId:(0,o.createRef)(),animationId:(0,o.createRef)()},loanDuration:{isError:!1,message:`Sorry! Maximum tenure possible\n       on this car is ${v.maxLoanDuration} years.`,errorId:(0,o.createRef)(),animationId:(0,o.createRef)()},roi:{isError:!1,message:"Please enter a valid value",errorId:(0,o.createRef)(),animationId:(0,o.createRef)()},downpayment:{isError:!1,message:`Sorry! Maximum down\n       payment possible on this car is ₹${(0,m.b)(v.maxDownpayment)}`,errorId:(0,o.createRef)(),animationId:(0,o.createRef)()},mindownpayment:{isError:!1,message:`Minimum down payment required on this car is ₹ ${(0,m.b)(v.minDownpayment)}.`,errorId:(0,o.createRef)(),animationId:(0,o.createRef)()},minloanAmount:{isError:!1,message:`Minimum loan amount required is ₹ ${(0,m.b)(ce.min)}.`,errorId:(0,o.createRef)(),animationId:(0,o.createRef)()}}),ge=K?.currentLocation?.cityConfig?.isLuxury&&"luxury"===a?.category,Le=(0,o.useRef)(xe);Le.current=xe;let ye=(0,o.useRef)({loanAmount:(0,o.createRef)(),loanDuration:(0,o.createRef)(),roi:(0,o.createRef)(),downpayment:(0,o.createRef)()}),[fe,Ee]=(0,o.useState)({loanAmount:v.loanAmount,downpayment:v.downpayment,roi:v.roi}),be=X.sold,je=(0,o.useRef)(fe);je.current=fe;let Ce=X.finance?.best?.details?.emi?.best,we=X.finance?.best?.details?.old_emi?.best,Ae=(0,o.useMemo)(()=>{let e,n=Number(v?.loanDuration??0),a=((e=v?.savings?Number(v.savings):Number(we?.toString().replace(/,/g,"")||0)-Number(Ce?.toString().replace(/,/g,"")||0))*n).toString();return{emiSavingsPerMonth:e,totalEmiSavings:a,loanDuration:n}},[v,we,Ce]),De="high"===ae?.probability_tier?.toLowerCase(),ke="medium"===ae?.probability_tier?.toLowerCase(),Ne=ae?.profile_status||ae?.current_profile_status,Fe=Math.round(ae?.probability?.display_pct??0),Se=ae?.offer_amount?(0,m.b)(ae.offer_amount,!0,!1,!1):"",Ie="number"==typeof ae?.offer_amount,Re=oe&&(De||ke&&"number"==typeof ae?.probability?.display_pct)&&Ie&&!h&&!(Ne&&w.n4.includes(Ne)),{isUCLV2Enabled:Ve}=(0,k.Z)(),Te=e=>{Le?.current[e]?.isError&&(Le.current[e].animationId&&clearInterval(Le.current[e].animationId),Le.current[e].errorId&&clearInterval(Le.current[e].errorId),ve({...Le.current,[e]:{...Le.current[e],isError:!1}}))},Be=()=>{Te("loanAmount"),Te("downpayment"),Te("mindownpayment"),Te("minloanAmount")},Me=(n,a)=>{Le.current.minloanAmount.isError||e&&Le.current.mindownpayment.isError&&je.current.downpayment<v.minDownpayment&&"downpayment"!==a?H(n,a,!0):H(n,a)},Pe=(e,n,a=!1)=>{(0,r.sendGAEvent)(pe,a?`${(0,G.Le)(e)}-input-error`:`${(0,G.Le)(e)}-input`,n,{...q,buyer_id:ne?.buyer_id||null})},Ze=(e,n,a=!1)=>{(0,r.sendGAEvent)(pe,a?`${(0,G.Le)(e)}-slider-error`:`${(0,G.Le)(e)}-slider`,n,{...q,buyer_id:ne?.buyer_id||null})},Oe=e=>{if(e){let n="mindownpayment"===e?"downpayment":"minloanAmount"===e?"loanAmount":e;Le.current[e].errorId&&clearInterval(Le.current[e].errorId),xe[e].animationId&&clearInterval(Le.current[e].animationId),ve({...Le.current,[e]:{...Le.current[e],isError:!0,errorId:setTimeout(()=>{ye.current[n]&&ye.current[n]?.current?.classList.remove($.showAnimation),ve({...Le.current,[e]:{...Le.current[e],isError:!1}})},5e3),animationId:setTimeout(()=>{ye.current[n]&&ye.current[n]?.current?.classList.add($.showAnimation)},"roi"===e?4500:4e3)}})}},Ue=(n,a)=>{v.maxLoanDuration&&n>v.maxLoanDuration&&e?a?Ze("loanDuration",n,!0):(Oe("loanDuration"),n!==v.maxLoanDuration&&Me(v.maxLoanDuration,"loanDuration")):a?d?he("used_car_loan_emi_duration_slider_click",ee?.data?.[0]?.buyer_id,"cta_click","",n):Ze("loanDuration",n):(Te("loanDuration"),Me(n,"loanDuration"))},Ge=(n,a)=>{v.maxLoanAmount&&n>v.maxLoanAmount&&e?a?d?he("used_car_loan_emi_amount_slider_click",ee?.data?.[0]?.buyer_id,"cta_click","",n):Ze("loanAmount",n,!0):(Oe("loanAmount"),n!==v.maxLoanAmount&&(H(v.maxLoanAmount,"loanAmount"),Ee(e=>({...e,loanAmount:v.maxLoanAmount})))):a?d?he("used_car_loan_emi_amount_slider_click",ee?.data?.[0]?.buyer_id,"cta_click","",n):Ze("loanAmount",n,!1):(Be(),a||(H(n,"loanAmount"),Ee(e=>({...e,loanAmount:n}))))},Ye=()=>{v.emiResult&&(d||((0,r.pushIntoGA4)({eventName:"used_car_loan_view_loan_breakup_click",eventCategory:"cta_click",componentTitle:"loan_calculator",componentSubTitle:"emi_tab",buyer_id:ne?.buyer_id},"genericProductGA4Event"),(0,r.sendGAEvent)(pe,"button-click","loan-breakup-view",{...q,buyer_id:ne?.buyer_id})),g(!0),s&&c&&l&&c(!0)),d&&(he("used_car_loan_view_loan_breakup_click",ee?.data?.[0]?.buyer_id,"cta_click",""),he("used_car_loan_view_breakup_popup_seen",ee?.data?.[0]?.buyer_id,"section_seen","-"))},$e=()=>{z(!0),s&&c&&l&&c(!0)},He=(n,o)=>{v.maxDownpayment&&n>v.maxDownpayment&&e?o?Ze("downpayment",n,!0):(Te("mindownpayment"),Oe("downpayment"),n!==v.maxDownpayment&&(Ee(e=>({...e,downpayment:v.maxDownpayment,loanAmount:0})),H(v.maxDownpayment,"downpayment"))):n<v.minDownpayment&&e?o?Ze("downpayment",n,!0):(Te("downpayment"),Oe("mindownpayment"),n!==v.minDownpayment&&(Ee(e=>({...e,downpayment:v.minDownpayment})),H(v.minDownpayment,"downpayment"))):o?Ze("downpayment",n):(Be(),Me(n,"downpayment"),a?.price.toString()===n.toString()?Ee(e=>({...e,downpayment:n,loanAmount:0})):Ee(e=>({...e,downpayment:n})))},We=(0,o.useCallback)((0,Y.Rq)(Pe,2e3),[]),qe=(0,o.useCallback)((0,Y.Rq)(Pe,2e3),[]),ze=n=>{let a=n.target.value.split(",").join("").replace("₹ ","").replace("₹","");a?a&&/^\d*$/g.exec(a)&&(a>=ce.min&&a<=(e?v.maxLoanAmount:ce.max)?(Be(),Ee({...fe,loanAmount:a}),H(a,"loanAmount"),We("loanAmount",a,!1),d?he("used_car_loan_emi_amount_box_input",ee?.data?.[0]?.buyer_id,"value_entered","",a):(0,r.pushIntoGA4)({eventName:"used_car_loan_emi_amount_box_input",eventCategory:"value_entered",componentTitle:"loan_calculator",componentSubTitle:"emi_tab",eventValue:a,buyer_id:ne?.buyer_id},"genericProductGA4Event")):a>=(e?v.maxLoanAmount:ce.max)?Oe("loanAmount"):(H(a,"loanAmount",!0),Ee({...fe,loanAmount:a}),ve({...xe,minloanAmount:{...xe.minloanAmount,isError:!0}}),We("loanAmount",a,!0))):(Ee({...fe,loanAmount:""===a?0:a}),H(0,"loanAmount",!0))},Je=e=>{let n=e.target.value.split(",").join("").replace("₹ ","").replace("₹","");if(n){if(n&&/^\d*$/g.exec(n))if(n>=v.minDownpayment&&n<=v.maxDownpayment)Be(),a?.price.toString()===n.toString()?Ee({...fe,downpayment:n,loanAmount:0}):Ee({...fe,downpayment:n}),a?.price&&a.price-n<ce.min?H(n,"downpayment",!0):H(n,"downpayment"),qe("downpayment",n,!1);else if(n>=v.maxDownpayment)Oe("downpayment");else{H(n,"downpayment",!0),Ee({...fe,downpayment:n}),Be();let{downpayment:e}=xe;xe.downpayment.isError&&(e={...xe.downpayment,isError:!1}),ve({...Le.current,downpayment:e,mindownpayment:{...xe.mindownpayment,isError:!0}}),qe("downpayment",n,!0)}}else H(0,"downpayment",!0),Ee({...fe,downpayment:n})},Ke=()=>{(0,r.pushIntoGA4)({eventName:"used_car_loan_emi_amount_slider_click",eventCategory:"cta_click",componentTitle:"loan_calculator",componentSubTitle:"emi_tab",eventValue:v.loanAmount,buyer_id:ne?.buyer_id},"genericProductGA4Event"),Ge(v.loanAmount,!0)},Qe=()=>{(0,r.pushIntoGA4)({eventName:"emi_calculator_down_payment_set",eventCategory:"slider_scroll",componentTitle:l?"check_eligibility":"emi_calculator",componentSubTitle:l?"emi_calculator":"",eventValue:v.downpayment,buyer_id:ne?.buyer_id},"genericProductGA4Event"),He(v.downpayment,!0)},Xe=()=>{(0,r.pushIntoGA4)({eventName:"used_car_loan_emi_duration_slider_click",eventCategory:"cta_click",componentTitle:"loan_calculator",componentSubTitle:"emi_tab",eventValue:v.loanDuration,buyer_id:ne?.buyer_id},"genericProductGA4Event"),Ue(v.loanDuration,!0)},en=new I.l(te);(0,o.useEffect)(()=>{Q.redirect&&(l&&en.closeModal(),se.closeLoanForm(),K?.isUserLoggedIn&&!window?.location?.href?.includes("/account/apply-finance/")&&!window?.location?.href?.includes(w.hs)&&(s&&K.isSoftProfilingEnabled&&(0,j.t_)(w.SS,{url:le.pathname,historyIdx:"u">typeof window?window.history.state?.idx??0:0}),ie(`/account/apply-finance/${(0,r.getReferrelUrl)(!0)}&car-id=${a?.id}&frompdp=true`)))},[Q.redirect,l,K.isUserLoggedIn]);let nn=()=>{let e=(0,r.getMaxUtmParamObject)("pdp","BookTestDrive");(0,A.U4)(l?"Calculate EMI widget":"EMI calculator");let n=()=>{(0,r.sendGAEvent)(pe,"button-click",s&&l?"check-eligibility-btn-pdpemi":"
1check-eligibility-btn-pdp",{...q,buyer_id:ne?.buyer_id}),(0,r.pushIntoGA4)({eventName:"pdp_get_offer_emi_click",eventCategory:"footer_cta_click",componentTitle:l?"check_eligibility":"emi_calculator",componentSubTitle:l?"emi_calculator":"",buyer_id:ne?.buyer_id,...u&&{additionalAttribute:JSON.stringify({...p,cta_text:u})}},"genericProductGA4Event"),(0,r.sendGAEvent)(pe,"button-click","apply-finance",{...q,buyer_id:ne?.buyer_id||null})},o={car_value:a.price.toString(),loan_value:v.loanAmount.toString(),loan_duration:v.loanDuration,city:{display_name:a.city,name:a.city.toLowerCase()},sell_lead_id:a?.id,entryPoint:"PDP_Finance",isMax:ge,utm_object_max:e,finance_source:l?G.yl.PDP_EMI_BOTTOM_SHEET:me||G.yl.PDP_LOAN_CALCULATOR};if(K.isUserLoggedIn){s&&K.isSoftProfilingEnabled&&(0,j.t_)(w.SS,{url:le.pathname,historyIdx:"u">typeof window?window.history.state?.idx??0:0});let e={...o,contact_info:K.userInfo.contact_info};se.submitLoanForm(e)}else{let e={type:U.k2.SUBMIT_LOAN_FORM_REQUST,data:o};if(Ve){n(),(0,j.t_)(w.mI,e),(0,j.t_)(w.Q2,o.finance_source),s&&K.isSoftProfilingEnabled&&(0,j.t_)(w.SS,{url:le.pathname,historyIdx:"u">typeof window?window.history.state?.idx??0:0});let i=(0,r.getReferrelUrl)(!0).replace(/([?&])source=[^&]*/g,"$1").replace(/[?&]$/,"");ie(`/used-car-loan/${i}&car-id=${a?.id}&frompdp=true&autoOpenEdit=false`)}else re.showLoginModal({title:"Log in to check loan eligibility",postLoginAction:e,postMobileSubmitAction:e,pageLabel:"Finance",category:"Finance",entryPoint:"PDP_Finance",redirect_url:`/account/apply-finance/${(0,r.getReferrelUrl)(!0)}&car-id=${a?.id}&frompdp=true`,isBuyLeadGenCTA:!0}),s&&K.isSoftProfilingEnabled&&(0,j.t_)(w.SS,{url:le.pathname,historyIdx:"u">typeof window?window.history.state?.idx??0:0})}n()};(0,o.useEffect)(()=>{if(!s)if(fe.loanAmount<ce.min)0===fe.loanAmount&&xe.minloanAmount.isError?Te("minloanAmount"):0!==fe.loanAmount&&ve({...xe,minloanAmount:{...xe.minloanAmount,isError:!0}});else{Te("minloanAmount");let{minloanAmount:n}=xe;xe.minloanAmount.isError&&(n={...xe.minloanAmount,isError:!1}),e&&(fe.loanAmount>v.maxLoanAmount?ve({...xe,minloanAmount:n,loanAmount:{...xe.loanAmount,isError:!0}}):Te("loanAmount"))}},[fe.loanAmount]),(0,o.useEffect)(()=>{e&&!s&&(0!==v.loanAmount&&0!==v.downpayment?Ee({...fe,loanAmount:v.loanAmount,downpayment:v.downpayment}):(0!==v.loanAmount&&Ee({...fe,loanAmount:v.loanAmount}),0!==v.downpayment&&Ee({...fe,downpayment:v.downpayment})))},[v.downpayment,v.loanAmount]);let an=(0,o.useMemo)(()=>(0,L.jsx)(R.Z,{onMouseUp:h?Ke:null,onTouchEnd:h?null:Ke,isLoan:!0,maxvalue:v.maxLoanAmount,name:"product-emi-loan-amount",min:fe.loanAmount<ce.min?0:ce.min,max:ce.max,step:100,value:v.loanAmount<ce.min?0:v.loanAmount,theme:"purpleBackgound",handleOnChange:Ge,disabled:n,dataId:"loan-amount-slider"}),[v.loanAmount,v.maxLoanAmount]),on=(0,o.useMemo)(()=>(0,L.jsx)(R.Z,{onMouseUp:h?Xe:null,onTouchEnd:h?null:Xe,isLoan:!0,maxvalue:v.maxLoanDuration,name:"product-emi-loan-duration",min:de.min,max:s?v.maxLoanDuration:de.max,step:1,value:v.loanDuration,theme:"purpleBackgound",handleOnChange:Ue,disabled:n,dataId:"loan-duration-slider"}),[v.maxLoanDuration,v.loanDuration]),tn=(0,o.useMemo)(()=>(0,L.jsx)(R.Z,{onMouseUp:h?Qe:null,onTouchEnd:h?null:Qe,isLoan:!0,minvalue:fe.downpayment<v.minDownpayment?0:v.minDownpayment,maxvalue:v.maxDownpayment,name:"product-emi-loan-duration",min:ue.min,max:ue.max,step:100,value:v.downpayment,theme:"purpleBackgound",handleOnChange:He,disabled:n,dataId:"loan-payment-slider"}),[v.downpayment,v.maxDownpayment,v.minDownpayment]),rn=()=>(0,L.jsxs)("div",{className:$.contentSection,children:[(0,L.jsxs)("div",{className:(0,m.Y1)(d?$.sliderSectionWrapperV2:$.sliderSectionWrapper,e&&$.sliderSectionCarChoosen,e&&l&&$.pdpModal,e&&v.maxLoanDuration<=0&&$.sliderSectionCarNotEligible),children:[(0,L.jsxs)("div",{className:$.sliders,children:[(0,L.jsxs)("div",{className:(0,m.Y1)($.sliderSection,e&&$.sliderSectionCarChoosen),children:[(0,L.jsxs)("div",{className:(0,m.Y1)($.topSection,d&&$.topSectionV2),children:[(0,L.jsx)("div",{className:(0,m.Y1)($.sectionHeading,d&&$.sectionHeadingV2),children:"Loan Amount"}),s?(0,L.jsxs)("div",{className:$.sectionValue,children:["₹ ",(0,m.b)(v.loanAmount)]}):(0,L.jsx)("div",{className:(0,m.Y1)($.sliderInput,$.sliderInputV2),children:(0,L.jsx)("input",{className:(0,m.Y1)($.input,d&&$.inputV2),type:"text",step:1,value:`₹ ${(0,m.b)(fe.loanAmount)}`,min:ce.min,max:e?v.maxLoanAmount:ce.max,onChange:ze,disabled:n})})]}),(0,L.jsx)("div",{className:$.sliderWrapper,children:an}),(0,L.jsxs)("div",{className:$.sliderRange,children:[(0,L.jsxs)("div",{className:(0,m.Y1)($.sliderMinRange,d&&$.sliderRangeV2),children:["₹ ",(0,m.b)(ce.min)]}),(0,L.jsxs)("div",{className:(0,m.Y1)($.sliderMaxRange,d&&$.sliderRangeV2),children:["₹ ",(0,m.b)(ce.max)]})]}),!s&&(0,L.jsxs)("div",{className:(0,m.Y1)($.errorContainer,(xe?.loanAmount?.isError||xe?.minloanAmount?.isError)&&$.visibleError),ref:ye.current.loanAmount,children:[(0,L.jsx)(x.Z,{height:"12px",width:"12px"})," ",xe?.loanAmount?.isError?xe?.loanAmount?.message:xe?.minloanAmount?.message]})]}),e&&(0,L.jsxs)("div",{className:(0,m.Y1)($.sliderSection),children:[(0,L.jsxs)("div",{className:$.topSection,children:[(0,L.jsxs)("div",{className:$.sectionHeading,children:["Down Payment",(0,L.jsx)("sup",{children:"*"})]}),s?(0,L.jsxs)("div",{className:$.sectionValue,children:["₹ ",(0,m.b)(v.downpayment)]}):(0,L.jsx)("div",{className:$.sliderInput,children:(0,L.jsx)("input",{className:$.input,type:"text",step:1,value:`₹ ${(0,m.b)(fe.downpayment)}`,min:ue.min,max:ue.max,onChange:Je,disabled:n})})]}),(0,L.jsx)("div",{className:$.sliderWrapper,children:tn}),(0,L.jsxs)("div",{className:$.sliderRange,children:[(0,L.jsxs)("div",{className:$.rangeValue,children:["₹ ",(0,m.b)(ue.min)]}),(0,L.jsxs)("div",{className:$.rangeValue,children:["₹ ",(0,m.b)(ue.max)]})]}),!s&&(0,L.jsxs)("div",{className:(0,m.Y1)($.errorContainer,(xe?.downpayment?.isError||xe.mindownpayment?.isError)&&$.visibleError),ref:ye.current.downpayment,children:[(0,L.jsx)(x.Z,{height:"12px",width:"12px"})," ",xe?.downpayment?.isError?xe?.downpayment?.message:xe?.mindownpayment?.message]})]}),(0,L.jsxs)("div",{className:(0,m.Y1)($.sliderSection),children:[(0,L.jsxs)("div",{className:(0,m.Y1)($.topSection,d&&$.topSectionV2),children:[(0,L.jsx)("div",{className:(0,m.Y1)($.sectionHeading,d&&$.sectionHeadingV2),children:"Duration of Loan"}),(0,L.jsx)("div",{className:(0,m.Y1)($.sectionValue,d&&$.sectionValueV2),children:`${v.loanDuration} Months`})]}),(!s||v.maxLoanDuration>1)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:$.sliderWrapper,children:on}),(0,L.jsxs)("div",{className:$.sliderRange,children:[(0,L.jsxs)("div",{className:(0,m.Y1)($.rangeValue,d&&$.sliderRangeV2),children:[de.min," Months"]}),(0,L.jsxs)("div",{className:(0,m.Y1)($.rangeValue,d&&$.sliderRangeV2),children:[de.max," Months"]})]}),!s&&(0,L.jsxs)("div",{className:(0,m.Y1)($.errorContainer,xe?.loanDuration?.isError&&$.visibleError),ref:ye.current.loanDuration,children:[(0,L.jsx)(x.Z,{height:"12px",width:"12px"})," ",xe?.loanDuration?.message]})]})]}),s&&h&&(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(N.Z,{showLoader:Q.isLeadSubmiting,label:"check eligibilty",text:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(T.Z,{}),"Check eligibility"]}),onClick:nn,className:(0,m.Y1)($.financeBtn,t.Z.darkPurple,$.btn)})})]}),s&&h&&(0,L.jsxs)("div",{className:$.bottomContainer,children:[e&&(0,L.jsxs)("div",{className:$.processingFeeText,children:[(0,L.jsx)("sup",{children:"*"}),"Processing fee and other loan charges are not included."]}),(0,L.jsx)("span",{children:"Disclaimer:"})," Applicable rate of interest can vary subject to credit profile. Loan approval is at the sole discretion of the finance partner."]})]}),(0,L.jsxs)("div",{className:(0,m.Y1)($.emiResultContainer,e&&$.emiResultCarChoosen),children:[(0,L.jsx)("div",{className:(0,m.Y1)($.emiTopSection,e&&$.emiResultCarChoosen),children:(0,L.jsxs)("div",{className:$.emiResult,children:[(0,L.jsxs)("div",{className:(0,m.Y1)($.emi,d&&$.emiV2,l&&$.pdpModalEmi,J&&$.stripMargin),children:[s&&h&&(0,L.jsx)("div",{className:$.modalheading,children:"EMI starting from"}),(0,L.jsxs)("div",{className:(0,m.Y1)(d&&$.emiAmount),children:[d&&(0,L.jsx)("span",{className:(0,m.Y1)($.preText),children:"EMI: "}),(0,L.jsx)("i",{className:(0,m.Y1)(t.Z.currencySymbolIconMedium,$.currency),children:(0,L.jsx)(M.Z,{height:h?"18px":"14px",width:"12px",fill:Z.Z.vibePurple100})}),(0,m.b)(v.emiResult),(0,L.jsxs)("span",{className:(0,m.Y1)(d&&$.postText),children:[" ","per month"]})]}),s&&!!v.savings&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:$.modalheading,children:"Savings"}),(0,L.jsxs)("div",{className:(0,m.Y1)($.savings),children:["₹",(0,m.b)(v.savings),(0,L.jsx)("span",{children:" per month"})]}),(0,L.jsxs)("div",{className:$.limitedPeriodOffer,children:["Enjoy the limited period offer for this car on financing",(0,L.jsx)("sup",{children:"#"})]})]})]}),J&&!be&&(0,L.jsx)(C.Z,{isLoanDuration:!0,isDesktop:h,className:$.signalBasedFlipStrip,children:(0,L.jsx)(F.Z,{className:$.signalBasedFlip,children:[J&&(0,L.jsx)(W,{totalSavings:(0,m.b)(Ae.totalEmiSavings),loanDuration:Ae.loanDuration,savingsPerMonth:Ae.emiSavingsPerMonth}),Re&&De&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(P.Z,{height:"14",width:"14",fill:"#2E054E"}),(0,L.jsxs)("span",{style:{color:"#2e054e"},children:["You have a ",(0,L.jsx)("b",{children:"pre-approved"})," offer of up to"," ",(0,L.jsx)("b",{children:`₹${Se}`})]})]}),Re&&ke&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(P.Z,{height:"14",width:"14",fill:"#2E054E"}),(0,L.jsxs)("span",{style:{color:"#2e054e"},children:["You're ",(0,L.jsxs)("b",{children:[Fe,"%"]})," likely to get pre-approved up to"," ",(0,L.jsx)("b",{children:`₹${Se}`})]})]}
1)].filter(Boolean)})}),!n&&!h&&(0,L.jsxs)("div",{className:(0,m.Y1)($.loanBreakUp,d&&$.loanBreakUpV2,!v.emiResult&&$.disableLoanBreakUp,e&&$.loanBreakUpCar),onClick:Ye,role:"none","data-id":"view-loan-breakup",children:[(0,L.jsx)(V.Z,{}),(0,L.jsxs)("span",{className:(0,m.Y1)(d&&$.text),children:["View Loan Breakup",(0,L.jsx)(B.Z,{})]})]}),!n&&h&&(0,L.jsx)(y,{data:v,sucessGreen:!0,isDesktop:h&&!s,pdpDesktop:s&&h,handleViewLoanTnc:$e}),s&&!h&&(0,L.jsx)(N.Z,{showLoader:Q.isLeadSubmiting,label:"check eligibility",text:u||(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(T.Z,{}),"Check eligibility"]}),onClick:nn,className:(0,m.Y1)($.financeBtn,t.Z.darkPurple,$.btn),dataId:"check-eligibility",largeBorderRadius:!0,noTextTransform:!0})]})}),!(s&&h)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:(0,m.Y1)($.bottomContainer,d&&$.bottomContainerV2),children:sn(d)}),s&&!!v.savings&&v.savings>0&&(0,L.jsxs)("div",{className:$.tncContainer,children:[(0,L.jsx)("sup",{children:"#"}),(0,L.jsx)("button",{onClick:$e,type:"button",children:"T&C apply."})]})]})]})]}),sn=(n=!1)=>(0,L.jsxs)("div",{className:(0,m.Y1)(n&&$.bottomText),children:[(0,L.jsx)("span",{className:(0,m.Y1)(n&&$.disclaimer),children:"Disclaimer: "}),(0,L.jsx)("span",{className:(0,m.Y1)(n&&$.text),children:"Applicable rate of interest can vary subject to credit profile. Loan approval is at the sole discretion of the finance partner."}),e&&(0,L.jsx)("span",{children:"**Processing fee and other loan charges are not included."})]});return b?(0,L.jsx)(L.Fragment,{children:s?(0,L.jsx)("div",{className:(0,m.Y1)($.emiFormContainer,h&&$.loanEmiFormContainerDesktop,s&&$.emiPDP,s&&!h&&$.emiPDPMobile),ref:_e,children:rn()}):(0,L.jsx)("div",{className:(0,m.Y1)($.emiFormContainer,h&&$.loanEmiFormContainerDesktop),ref:_e,children:rn()})}):null};let W=({totalSavings:e,loanDuration:n,savingsPerMonth:a})=>{let{campaignDataForPage:o}=(0,b.Z)("DEMAND","pdp"),i=o?.discountPillTextColor||"",{backgroundColor:t}=(0,m.jL)(o?.discountPillBgColor||"");return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(P.Z,{height:"14",width:"14",ruppeeIconColor:t??"",fill:i??""}),(0,L.jsxs)("span",{style:{color:i},children:["Save"," ",(0,L.jsxs)("b",{children:[(0,L.jsx)(M.Z,{fill:i}),e," (",(0,L.jsx)(M.Z,{fill:i}),a,"/m)"]})," ","in interest over ",n," months"]})]})};var q=a(70933),z=a(85798),J=a(18390),K=a(45001),Q=a(35958),X={loanEstimateFormContainer:"LoanEstimateForm__loanEstimateFormContainer",sliderSectionLoanEstimate:"LoanEstimateForm__sliderSectionLoanEstimate",inputBox:"LoanEstimateForm__inputBox",errorContainer:"LoanEstimateForm__errorContainer",showAnimation:"LoanEstimateForm__showAnimation",fadeOut:"LoanEstimateForm__fadeOut",visibleError:"LoanEstimateForm__visibleError",calContainer:"LoanEstimateForm__calContainer",downpayment:"LoanEstimateForm__downpayment",financeIcon:"LoanEstimateForm__financeIcon",loanEstimateContainer:"LoanEstimateForm__loanEstimateContainer",formHeading:"LoanEstimateForm__formHeading",inputContainer:"LoanEstimateForm__inputContainer",profession:"LoanEstimateForm__profession",radioSection:"LoanEstimateForm__radioSection",radio:"LoanEstimateForm__radio",radioActive:"LoanEstimateForm__radioActive",sliderSectionWrapper:"LoanEstimateForm__sliderSectionWrapper",sliderSection:"LoanEstimateForm__sliderSection",topSection:"LoanEstimateForm__topSection",sectionHeading:"LoanEstimateForm__sectionHeading",sectionValue:"LoanEstimateForm__sectionValue",sliderRange:"LoanEstimateForm__sliderRange",amount:"LoanEstimateForm__amount",emiResultContainer:"LoanEstimateForm__emiResultContainer",emi:"LoanEstimateForm__emi",emiResult:"LoanEstimateForm__emiResult",emiValue:"LoanEstimateForm__emiValue",downpaymentValue:"LoanEstimateForm__downpaymentValue",emiDescription:"LoanEstimateForm__emiDescription",editIcon:"LoanEstimateForm__editIcon",loanBreakUp:"LoanEstimateForm__loanBreakUp",disableLoanBreakUp:"LoanEstimateForm__disableLoanBreakUp",bottomContainer:"LoanEstimateForm__bottomContainer",editROIContainer:"LoanEstimateForm__editROIContainer",roi:"LoanEstimateForm__roi",textRoi:"LoanEstimateForm__textRoi",textPercentage:"LoanEstimateForm__textPercentage",inputdivContainer:"LoanEstimateForm__inputdivContainer",inputIconContainer:"LoanEstimateForm__inputIconContainer",inputOfRoi:"LoanEstimateForm__inputOfRoi",loanEstimateContainerDesktop:"LoanEstimateForm__loanEstimateContainerDesktop",contentSection:"LoanEstimateForm__contentSection",emiVal:"LoanEstimateForm__emiVal",emiResultCarChoosen:"LoanEstimateForm__emiResultCarChoosen",sliders:"LoanEstimateForm__sliders",backgroundIcon:"LoanEstimateForm__backgroundIcon",loanEstimateContainerCarChoosen:"LoanEstimateForm__loanEstimateContainerCarChoosen",loanEstimateContainerCarNotEligible:"LoanEstimateForm__loanEstimateContainerCarNotEligible"},ee=({isCarChoosen:e=!1,carNotEligible:n=!1,...a})=>{let{isDesktop:i,maxITRValue:t,updateLoanEstimateDetails:s,loanEstimateDetails:l,setProfession:c,profession:d,loanBoundries:u,customDimension:p,fromPDP:_}=a,{loanDuration:h}=u,[v,g]=(0,o.useState)(!1),[y,f]=(0,o.useState)(l.roi),[b,j]=(0,o.useState)({loanDuration:{isError:!1,message:`Sorry! Ma
1ximum tenure possible on\n      this car is ${l.maxLoanDuration} years.`,errorId:(0,o.createRef)(),animationId:(0,o.createRef)()},roi:{isError:!1,message:"Please enter a valid value",errorId:(0,o.createRef)(),animationId:(0,o.createRef)()}}),C=(0,E.Z)("genericGA4Event",{eventName:"used_car_loan_calc_loanestimatetab_seen",eventCategory:"section_seen",componentTitle:"loan_calculator",componentSubTitle:""}),w=(0,o.useRef)(b);w.current=b;let A="loan-page",D=(0,o.useRef)({loanDuration:(0,o.createRef)(),roi:(0,o.createRef)()}),k=(e,n,a=!1)=>{(0,r.sendGAEvent)(A,a?`${(0,G.Le)(e)}-input-error`:`${(0,G.Le)(e)}-input`,n,p)},N=(0,o.useCallback)((0,Y.Rq)(k,2e3),[]),F=(0,o.useCallback)((0,Y.Rq)(k,2e3),[]),S=(0,o.useCallback)((0,Y.Rq)(k,2e3),[]),I=(0,o.useCallback)((0,Y.Rq)(k,2e3),[]),V=e=>{w.current[e].isError&&(w.current[e].animationId&&clearInterval(w.current[e].animationId),w.current[e].errorId&&clearInterval(w.current[e].errorId),j({...w.current,[e]:{...w.current[e],isError:!1}}))},T=(e,n,a=!1)=>{(0,r.sendGAEvent)(A,a?`${(0,G.Le)(e)}-slider-error`:`${(0,G.Le)(e)}-slider`,n,p)},B=e=>{e&&(w.current[e].errorId&&clearInterval(b[e].errorId),w.current[e].animationId&&clearInterval(b[e].animationId),j({...w.current,[e]:{...w.current[e],isError:!0,errorId:setTimeout(()=>{D.current[e]&&D.current[e].current?.classList?.remove(X.showAnimation),j({...w.current,[e]:{...b[e],isError:!1}})},5e3),animationId:setTimeout(()=>{D.current[e]&&D.current[e].current?.classList?.add(X.showAnimation)},4e3)}}))},M=e=>{e&&Number(e)>u.emiFactor*("self-employed"===d?l.ITRValue/12:l.monthlyIncome)?(s(e,"runningEmi",!1,!0),S("runningEmi",e,!0)):("0"===e?s(e,"runningEmi",!0):s(e,"runningEmi"),S("runningEmi",e,!1)),(0,r.pushIntoGA4)({eventName:"used_car_loan_le_running_emi_input",eventCategory:"value_entered",componentTitle:"loan_calculator",componentSubTitle:"loan_estimate_tab",eventValue:e},"genericProductGA4Event")},P=e=>{e?s(0,"runningEmi"):s(0,"runningEmi",!0)},O=(n,a)=>{l.maxLoanDuration&&n>l.maxLoanDuration&&e?(a&&T("loanDuration",n,!0),B("loanDuration"),n===l.maxLoanDuration||a||s(l.maxLoanDuration,"loanDuration")):a?T
1("loanDuration",n):(V("loanDuration"),s(n,"loanDuration"))},U=()=>{s(u.defaultROI,"roi"),V("roi"),g(!1),(0,r.sendGAEvent)(A,"loan-click","roi-restore",p)},$=(e,n)=>{(0,r.pushIntoGA4)({eventName:"used_car_loan_le_monthly_income_input",eventCategory:"value_entered",componentTitle:"loan_calculator",componentSubTitle:"loan_estimate_tab",eventValue:e},"genericProductGA4Event"),s(e,"monthlyIncome"),n||N("monthlyIncome",e,!1)},H=e=>{s(0,"monthlyIncome"),N("runningEmi",e,!1)},W=(e,n)=>{s(e,"ITRValue"),n||F("ITRValue",e,!1)},ee=e=>{s(0,"ITRValue"),F("runningEmi",e,!0)},ne=()=>{(0,r.pushIntoGA4)({eventName:"used_car_loan_le_duration_slider_click",eventCategory:"cta_click",componentTitle:"loan_calculator",componentSubTitle:"loan_estimate_tab",eventValue:l.loanDuration},"genericProductGA4Event"),O(l.loanDuration,!0)},ae=()=>{(0,r.pushIntoGA4)({eventName:"used_car_loan_le_interest_edit_click",eventCategory:"cta_click",componentTitle:"loan_calculator",componentSubTitle:"loan_estimate_tab",eventValue:l.roi},"genericProductGA4Event"),g(!0),(0,r.sendGAEvent)(A,"loan-click","roi-edit",p)},oe=e=>{let n="salaried"===e?"used_car_loan_le_salaried_check_click":"used_car_loan_le_self_employ_check_click";(0,r.pushIntoGA4)({eventName:n,eventCategory:"cta_click",componentTitle:"loan_calculator",componentSubTitle:"loan_estimate_tab"},"genericProductGA4Event"),c(e),(0,r.sendGAEvent)(A,"radio-btn",e,p)},ie=(0,o.useMemo)(()=>(0,L.jsx)(Q.Z,{isDesktop:i,classname:X.editIcon,onClick:U,toolTipData:"Reset Interest Rate",Icon:(0,L.jsx)(J.Z,{fill:Z.Z.secondaryPurple100,stroke:Z.Z.secondaryPurple100,height:"14px",width:"14px"})}),[d]),te=(0,o.useMemo)(()=>(0,L.jsx)(Q.Z,{isDesktop:i,toolTipData:"Edit Interest Rate",onClick:ae,classname:X.editIcon,Icon:(0,L.jsx)(z.Z,{pencilFill:Z.Z.secondaryPurple100,noCircle:!0,height:"14px",width:"14px",viewBox:"0 0 18 10"})}),[d]),re=(0,o.useMemo)(()=>(0,L.jsx)(q.Z,{onSuccess:W,onUnSuccess:ee,inputValue:l.ITRValue>0?l.ITRValue.toString():"",type:"amount",name:"itrValue",labelValue:"Annual ITR Value",labelFocusValue:"Annual ITR Value",errorMessage:"Enter a valid value",showForceError:!1,isFocus:!1,maxLength:20}),[l.ITRValue,d]),se=(0,o.useMemo)(()=>(0,L.jsx)(q.Z,{onSuccess:$,onUnSuccess:H,inputValue:l.monthlyIncome>0?l.monthlyIncome.toString():"",type:"amount",name:"monthly_income",labelValue:"Monthly Income",labelFocusValue:"Monthly Income",errorMessage:"Enter a valid value",showForceError:!1,isFocus:!1,maxLength:10}),[l.monthlyIncome,d]),le=(0,o.useMemo)(()=>(0,L.jsx)(q.Z,{onSuccess:M,onUnSuccess:P,handleOnClose:()=>{s(0,"runningEmi",!0)},inputValue:l.runningEmi>0?l.runningEmi.toString():"",type:"amount",name:"runningEmi",labelValue:"Already Running EMI",labelFocusValue:"Already Running EMI",errorMessage:"Enter a Valid Value",isFocus:!1,maxLength:10,validateOnChange:!0,showForceError:0!==l.runningEmi&&l.runningEmi>t}),[l.runningEmi,d,t]),me=(0,o.useMemo)(()=>(0,L.jsx)(R.Z,{isLoan:!0,onMouseUp:i?ne:null,onTouchEnd:i?null:ne,name:"product-emi-loan-duration",maxvalue:l.maxLoanDuration,min:h.min,max:h.max,step:1,value:l.loanDuration,theme:"purpleBackgound",handleOnChange:O}),[l.loanDuration,h.min,h.max,l.maxLoanDuration,d]);return(0,L.jsx)("div",{className:(0,m.Y1)(X.loanEstimateFormContainer,i&&X.loanEstimateContainerDesktop,_&&X.updatedPDPEMISection),ref:C,children:(0,L.jsxs)("div",{className:X.contentSection,children:[(0,L.jsxs)("div",{className:(0,m.Y1)(X.loanEstimateContainer,e&&X.loanEstimateContainerCarChoosen,e&&l.maxLoanDuration<=0&&X.loanEstimateContainerCarNotEligible),children:[(0,L.jsxs)("div",{className:X.sliders,children:[(0,L.jsxs)("div",{className:X.profession,children:[(0,L.jsxs)("div",{className:X.radioSection,onClick:()=>oe("salaried"),role:"none",children:["salaried"===d?(0,L.jsx)("div",{className:(0,m.Y1)(X.radioActive),children:(0,L.jsx)(K.Z,{fill:Z.Z.spinnyWhite,stroke:Z.Z.spinnyWhite,width:"14px"})}):(0,L.jsx)("div",{className:X.radio}),"Salaried"]}),(0,L.jsxs)("div",{className:X.radioSection,onClick:()=>oe("self-employed"),role:"none",children:["self-employed"===d?(0,L.jsx)("div",{className:(0,m.Y1)(X.radioActive),children:(0,L.jsx)(K.Z,{fill:Z.Z.spinnyWhite,stroke:Z.Z.spinnyWhite,width:"14px"})}):(0,L.jsx)("div",{className:X.radio}),"Self-Employed"]})]}),(0,L.jsxs)("div",{className:X.inputBox,children:[(0,L.jsxs)("div",{className:X.inputContainer,children:["salaried"===d&&se,"self-employed"===d&&re]}),(0,L.jsx)("div",{className:X.inputContainer,children:le})]}),(0,L.jsxs)("div",{className:(0,m.Y1)(X.sliderSection,X.sliderSectionLoanEstimate),children:[(0,L.jsxs)("div",{className:X.topSection,children:[(0,L.jsx)("div",{className:X.sectionHeading,children:"Duration of Loan"}),(0,L.jsx)("div",{className:X.sectionValue,children:`${l.loanDuration} Months`})]}),(0,L.jsx)("div",{className:X.sliderWrapper,children:me}),(0,L.jsxs)("div",{className:X.sliderRange,children:[(0,L.jsxs)("div",{className:X.rangeValue,children:[h.min," Months"]}),(0,L.jsxs)("div",{className:X.rangeValue,children:[h.max," Months"]})]}),(0,L.jsxs)("div",{className:(0,m.Y1)(X.errorContainer,b?.loanDuration?.isError&&X.visibleError),ref:D.current.loanDuration,children:[(0,L.jsx)(x.Z,{height:"12px",width:"12px"})," ",b?.loanDuration?.message]})]})]}),(0,L.jsxs)("div",{className:(0,m.Y1)(X.sliderSection),children:[(0,L.jsxs)("div",{className:X.topSection,children:[(0,L.jsxs)("div",{className:X.sectionHeading,children:["Interest Rate",(0,L.jsx)("sup",{children:"*"})]}),(0,L.jsx)("div",{className:X.editROIContainer,children:v?(0,L.jsxs)("div",{className:X.roi,children:[(0,L.jsxs)("div",{className:X.inputdivContainer,children:[(0,L.jsx)("input",{className:X.inputOfRoi,value:y,onChange:e=>{e.target.value?e.target.value&&/^\d+(\.\d{0,1})?$/g.exec(e.target.value)&&(0!==Math.ceil(parseFloat(e.target.value))&&30>=Math.ceil(parseFloat(e.target.value))&&G.IP.exec(parseFloat(e.target.value).toString())?(V("roi"),f(e.target.value),s(parseFloat(e.target.value),"roi"),I("loan-roi",e.target.value,!1)):B("roi")):(s(0,"roi"),f(e.target.value))}}),(0,L.jsx)("div",{className:X.inputIconContainer,children:"%"})]}),ie]}):(0,L.jsxs)("div",{className:X.roi,children:[(0,L.jsx)("div",{className:X.inputdivContainer,children:(0,L.jsxs)("div",{className:(0,m.Y1)(X.textRoi,X.inputOfRoi),children:[l.roi,(0,L.jsx)("span",{className:X.inputIconContainer,children:"%"})]})}),te]})})]}),(0,L.jsxs)("div",{className:(0,m.Y1)(X.errorContainer,b?.roi?.isError&&X.visibleError),ref:D.current.roi,children:[(0,L.jsx)(x.Z,{height:"12px",width:"12px"})," ",b?.roi?.message]})]})]}),(0,L.jsxs)("div",{className:X.emiResultContainer,children:[(0,L.jsxs)("div",{className:(0,m.Y1)(X.emiResult,e&&X.emiResultCarChoosen),children:[(0,L.jsx)("div",{className:X.emi,children:(0,L.jsxs)("div",{className:X.emiVal,children:[(0,L.jsx)("span",{children:"₹"}),(0,m.b)(l.loanAmount),(0,L.jsx)("span",{children:" max loan amount"})]})}),(0,L.jsxs)("div",{className:(0,m.Y1)(X.calContainer),children:[(0,L.jsxs)("div",{className:X.emiValue,children:["Max EMI"," ",(0,L.jsxs)("div",{className:X.amount,children:["₹",(0,m.b)(l.emiResult)," /-"]})]}),e&&!n&&(0,L.jsx)("div",{className:(0,m.Y1)(X.downpayment),children:(0,L.jsxs)("div",{className:X.downpaymentValue,children:["Down Payment**",(0,L.jsxs)("div",{className:X.amount,children:["₹",(0,m.b)(l.downpayment)," /-"]})]})})]})]}),(0,L.jsxs)("div",{className:X.bottomContainer,children:[(0,L.jsx)("span",{children:"Disclaimer: "}),"Applicable rate of interest can vary subject to credit profile. Loan approval is at the sole discretion of the finance partner.",(0,L.jsx)("br",{}),e&&!n&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("sup",{children:"**"}),"Processing fee and other loan charges are not included."]})]})]})]})})},ne={loanOfferTnc:"LoanOfferTnc__loanOfferTnc",header:"LoanOfferTnc__header",heading:"LoanOfferTnc__heading",body:"LoanOfferTnc__body",footer
1:"LoanOfferTnc__footer",loanOfferTncPdpDesktop:"LoanOfferTnc__loanOfferTncPdpDesktop"};let ae=["Offer applicable only on availing car loan through Spinny on the specific cars on which offer is visible","Offer will be applied on EMI offered after loan approval by our finance partner","Valid only for a limited period","Spinny reserves the right to change these terms and conditions at any time without prior notice"];var oe=({setHideTncOverlay:e,fromPdpDesktop:n=!1})=>(0,L.jsxs)("div",{className:(0,m.Y1)(ne.loanOfferTnc,n&&ne.loanOfferTncPdpDesktop),children:[(0,L.jsx)("div",{className:ne.header,children:(0,L.jsx)("div",{className:ne.heading,children:"Terms & Conditions"})}),(0,L.jsx)("div",{className:ne.body,children:(0,L.jsx)("ol",{children:ae.map((e,n)=>(0,L.jsx)("li",{children:e},n))})}),!n&&(0,L.jsx)("div",{className:ne.footer,children:(0,L.jsx)(N.Z,{className:ne.button,label:"Done",onClick:()=>{(0,r.sendGAEvent)("loan","button-click","loan_t&c_done",{CD45:"loan_offer"}),e(!0)},color:"darkPurple",text:"Done"})})]}),ie="LoanSubmitForm__tab",te="LoanSubmitForm__tabContent",re="LoanSubmitForm__activeTab",se=({isDesktop:e=!1,carData:n=null,isCarChoosen:a=!1,fromPDP:v=!1,heading:g="",className:f="",isModal:E=!1,setModalOverflow:b=null,isUsedCarLoanV2:j=!1,pdpCtaText:C,pdpCtaEventAttributes:w,...A})=>{let{loanBoundries:D,isLoading:k,customDimension:N}=A,{defaultLoanAmount:F,defaultLoanDuration:S,defaultROI:I,loanAmountFactor:R,emiFactor:V,deafaultMonthlyIncome:T,defaultITR:B,defaultRunningEmi:M,maxCarLoanDuration:P,emiFactorSelfEmployed:Z}=D||{},[O,U]=(0,o.useState)(!1),[G,Y]=(0,o.useState)(0),[$,W]=(0,o.useState)(!1),[q,z]=(0,o.useState)(!1),J=v?"pdp-page":"loan-page",{finance:K}=(0,i.v9)(e=>({finance:e.product.pageData.productDetail.finance}),i.wU),{isBothLoanSaleActive:Q}=(0,s.Z)(),X=K?.best?.details?.emi?.best,ne=K?.best?.details?.old_emi?.best,ae=Q&&X!==ne,se=()=>{let e={loanAmount:F,loanDuration:S,emiResult:(0,l.Zf)(F,I,S),roi:I};return v?{...e,maxLoanAmount:D.loanAmount.max,maxLoanDuration:D.loanDuration.max,downpayment:n.price-F,maxDownpayment:D.downpayment.max,minDownpayment:D.downpayment.min,oldRoi:D.oldROI,offerApplicable:D.offerApplicable,savings:ae?(0,l.Zf)(F,D.oldROI,S)-e.emiResult:0}:{...e,maxLoanAmount:0,maxLoanDuration:0,downpayment:0,maxDownpayment:0,minDownpayment:0}},[le,me]=(0,o.useState)(se()),ce=(0,o.useRef)(le);ce.current=le;let[de,ue]=(0,o.useState)("emi"),[pe,_e]=(0,o.useState)("salaried"),[he,xe]=(0,o.useState)({monthlyIncome:T,ITRValue:B,runningEmi:M??0,loanDuration:S,loanAmount:0,emiResult:0,roi:I,maxLoanDuration:0,downpayment:0}),ve=(0,o.useRef)(he);ve.current=he,(0,o.useEffect)(()=>{me(se())},[D.offerApplicable]);let ge=(e,n,a,o,i=0)=>{if(e<=0)me(e=>({...e,downpayment:n,[a]:o,emiResult:0,savings:0}));else{let t=isNaN(e)?0:e;me(e=>({...e,downpayment:n,[a]:o,emiResult:t,savings:i}))}},Le=(e,a,o=0)=>{if(e<=0)me(e=>({...e,loanAmount:n.price-a,emiResult:0,downpayment:a,savings:0}));else{let i=isNaN(e)?0:e;me(e=>({...e,downpayment:a,loanAmount:n.price-a,emiResult:i,savings:o}))}},ye=(e,o,i=!1)=>{let t=e,{loanAmount:r,loanDuration:s,roi:m,oldRoi:c,offerApplicable:d=!1}=ce.current;if("string"==typeof t&&(t=parseInt(t,10)),(0!==t||0===t&&["loanAmount","downpayment"].includes(o)&&v)&&!i){let e=(0,l.Zf)(r,m,s),i=d?(0,l.Zf)(r,c,s)-e:0,u=a&&n?n.price-r:0;switch(o){case"loanAmount":e=(0,l.Zf)(t,m,s),i=d?(0,l.Zf)(t,c,s)-e:0,u=a&&n?n.price-t:0;break;case"loanDuration":e=(0,l.Zf)(r,m,t),i=d?(0,l.Zf)(r,c,t)-e:0;break;case"downpayment":e=(0,l.Zf)(a&&n?n.price-t:0,m,s),i=d?(0,l.Zf)(a&&n?n.price-t:0,c,s)-e:0}"downpayment"===o&&a&&n?Le(e,t,i):ge(e,a&&n?u:0,o,t,i)}else if(i){var u;u=t,a&&n&&"loanAmount"===o?ge(0,n.price-u,o,u):a&&n&&"downpayment"===o?Le(0,u):ge(0,ce.current.downpayment,o,u)}else ge(0,0,o,t,0)},fe=(e,o,i,t)=>{let r=0;a&&n&&(r=n.price-e),xe(i?n=>({...n,loanAmount:e,emiResult:o,downpayment:r,[i]:t}):n=>({...n,loanAmount:e,downpayment:r,emiResult:o}))},Ee=(e,o,i,t)=>{let r=e;if("string"==typeof r&&(r=parseInt(r,10)),("salaried"===pe?ve.current.monthlyIncome||"monthlyIncome"===o:ve.current.ITRValue||"ITRValue"===o)&&(r>0||i)&&!t&&(ve.current.roi||"roi"===o)){let e=ve.current.roi/1200,i=12*ve.current.loanDuration,t=("salaried"===pe?V:Z)*("salaried"===pe?ve.current.monthlyIncome:ve.current.ITRValue/12)-ve.current.runningEmi;switch(o){case"monthlyIncome":t=V*r-ve.current.runningEmi;break;case"loanDuration":i=12*r;break;case"ITRValue":t=r/12*Z-ve.current.runningEmi;break;case"runningEmi":t=("salaried"===pe?V:Z)*("salaried"===pe?ve.current.monthlyIncome:ve.current.ITRValue/12)-r;break;case"roi":e=r/1200}let s=Math.floor(((1+e)**i-1)/(1+e)**i*t/e);a&&n&&n.id&&(s=Math.min(R*n.price,s));let l=Math.floor(s*e*(1+e)**i/((1+e)**i-1));s<=0||l<=0?fe(0,0,o,r):fe(s,l,o,r)}else fe(0,0,o,r)};(0,o.useEffect)(()=>
1{if(!v)if(a&&n&&n.id){let e=n&&n.id?10-((new Date).getFullYear()-n.make_year):0,a=Math.min(S,e),o=Math.min(P,e),i=n?.price,t=he.roi/1200,r=12*a,s=Math.floor(((1+t)**r-1)/(1+t)**r*(("salaried"===pe?V:Z)*("salaried"===pe?he.monthlyIncome:he.ITRValue/12)-he.runningEmi)/t),l=Math.floor(s*t*(1+t)**r/((1+t)**r-1));o<=0?Ee(0,"",!0):xe({...he,maxLoanDuration:o,loanDuration:a,downpayment:i,loanAmount:s,emiResult:l})}else Ee(0,"",!0);if(a&&n&&n.id&&!v){let e=n&&n.id?10-((new Date).getFullYear()-n.make_year):0,a=R*n.price,o=Math.min(S,e),i=Math.min(P,e),t=(0,l.Zf)(a,I,o),r=n.price-a,s=n.price;me(i<=0?{...le,loanAmount:0,loanDuration:0,emiResult:0,downpayment:n?.price,minDownpayment:0,maxDownpayment:s}:{...le,maxLoanAmount:a,maxLoanDuration:i,loanAmount:a,loanDuration:o,emiResult:t,downpayment:r,maxDownpayment:s,minDownpayment:0})}},[n]),(0,o.useEffect)(()=>{v||Y("self-employed"===pe?Z*(he.ITRValue/12):V*he.monthlyIncome)},[pe,he]),(0,o.useEffect)(()=>{v||Ee(0,"",!0)},[pe]);let be=()=>{U(!1),(0,r.sendGAEvent)(J,"button-click","loan-breakup-close",N),v&&b&&E&&b(!1)},je=()=>{W(!1),z(!1),v&&b&&E&&b(!1)},Ce=e=>{(0,r.sendGAEvent)(J,"button-click",`${e}-tab`,N),(0,r.pushIntoGA4)({eventName:"loan-estimate"===e?"used_car_loan_calc_loanestimatetab_click":"used_car_loan_calc_emi_tab_click",eventCategory:"cta_click",componentTitle:"loan_calculator"},"genericGA4TdEvent"),ue(e)},we=(0,o.useMemo)(()=>(0,L.jsx)(p.Z,{cardIndex:0,category:"",...n,label:"home",noBorder:!0,desktop:e,addBadge:!0}),[n]);return D?j?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(H,{isModal:E,carNotEligible:a&&le.maxLoanDuration<=0,isCarChoosen:a,loanBoundries:D,updateEmiDetails:ye,isDesktop:!!e,emiDetails:le,setShowLoanBreakUp:U,carData:n,fromPDP:v,customDimension:N,setModalOverflow:b,setShowTnc:W,pdpCtaText:C,pdpCtaEventAttributes:w,isUsedCarLoanV2:!0}),O&&!e&&(0,L.jsx)(u.default,{bottomSheetType:"loanBreakup",hideBottomSheetOverlay:()=>be(),rightAlignClose:!0,forceHideLine:!0,children:(0,L.jsx)(y,{data:"loan-estimate"!==de||v?le:he,sucessGreen:v})})]}):(0,L.jsxs)("div",{className:(0,m.Y1)("LoanSubmitForm__LoanRenewContainer",!e&&!v&&t.Z.mainBox,t.Z.borderView,e&&"LoanSubmitForm__LoanRenewContainerDesktop",f&&f,v&&"LoanSubmitForm__pdpContainer",!v&&"LoanSubmitForm__addMarginTop"),children:[!v&&(0,L.jsxs)("div",{className:"LoanSubmitForm__topSectionHeading",children:[(0,L.jsx)("div",{className:"LoanSubmitForm__heading","data-id":g,children:g}),n&&!v&&(0,L.jsxs)("div",{className:"LoanSubmitForm__carContainer",children:[(0,L.jsx)("div",{className:(0,m.Y1)("LoanSubmitForm__carCardContainer",he.maxLoanDuration<=0&&"LoanSubmitForm__carCardDisable"),children:we}),a&&he.maxLoanDuration<=0&&(0,L.jsxs)("div",{className:"LoanSubmitForm__errorWrapper",children:[(0,L.jsx)(x.Z,{height:"12px",width:"12px"})," Sorry Loan Is not possible on this Car."]})]}),!k&&!v&&(0,L.jsxs)("div",{className:"LoanSubmitForm__tabsWrapper",children:[(0,L.jsxs)("div",{className:(0,m.Y1)(ie,"emi"===de&&re),onClick:()=>Ce("emi"),role:"none",children:[" ",(0,L.jsx)("div",{className:te,children:"EMI"})," "]}),(0,L.jsx)("div",{className:(0,m.Y1)(ie,"loan-estimate"===de&&re),onClick:()=>Ce("loan-estimate"),role:"none",children:(0,L.jsx)("div",{className:te,children:"Loan Estimate"})})]}),k&&!v&&(0,L.jsxs)("div",{className:"LoanSubmitForm__loadingContainer",children:[(0,L.jsx)(_.Z,{noShadow:!0,whiteBack:!0}),[void 0,void 0].map((e,n)=>(0,L.jsxs)("div",{className:`${t.Z.mainBox}\n                     LoanSubmitForm__loading ${t.Z.borderView}`,children:[(0,L.jsx)("div",{className:`${t.Z.animate} ${t.Z.list1}`}),(0,L.jsx)("div",{className:`${t.Z.animate} ${t.Z.list2}`})]},n))]})]}),v&&d.nl&&(0,L.jsx)(c.Z,{interestRate:"10.99%"}),!k&&(0,L.jsxs)(L.Fragment,{children:["emi"===de&&(0,L.jsx)(H,{isModal:E,carNotEligible:a&&le.maxLoanDuration<=0,isCarChoosen:a,loanBoundries:D,updateEmiDetails:ye,isDesktop:!!e,emiDetails:le,setShowLoanBreakUp:U,carData:n,fromPDP:v,customDimension:N,setModalOverflow:b,setShowTnc:W,pdpCtaText:C,pdpCtaEventAttributes:w,isBothLoanSaleActive:ae}),"loan-estimate"===de&&(0,L.jsx)(ee,{carNotEligible:a&&he.maxLoanDuration<=0,isCarChoosen:a,isDesktop:!!e,loanEstimateDetails:he,loanBoundries:D,updateLoanEstimateDetails:Ee,setProfession:_e,profession:pe,maxITRValue:G,customDimension:N})]}),O&&!e&&(0,L.jsx)(u.default,{bottomSheetType:"loanBreakup",hideBottomSheetOverlay:()=>be(),rightAlignClose:!0,forceHideLine:!0,children:(0,L.jsx)(y,{data:"loan-estimate"!==de||v?le:he,sucessGreen:v})}),e&&O&&(0,L.jsx)(h.default,{hideModal:()=>be(),size:"fitContent",align:"center",hideOverflow:!0,children:(0,L.jsx)(y,{isDesktop:!0,data:"loan-estimate"===de?he:le})}),$&&!e&&(0,L.jsx)(u.default,{closeIconInCircle:!0,bottomSheetType:"loanOfferTnc",hideBottomSheetOverlay:je,forceHideLine:!0,rightAlignClose:!0,forceHide:q,children:(0,L.jsx)(oe,{setHideTncOverlay:z})}),e&&$&&(0,L.jsx)(h.default,{zIndex:100,hideModal:je,size:"smallWidth",align:"center",hideOverflow:!0,compactWidth:!0,closeButtonColor:"darkPurple",children:(0,L.jsx)(oe,{fromPdpDesktop:v&&e,setHideTncOverlay:z})})]}):null}}}]);

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.