PageSourceSearch

https://www.raychapmanmotors.co.uk/_nuxt/Cd1n-fjc.js

js raychapmanmotors.co.uk collected 2026-10-06 18:09:53 UTC 10,380 bytes, 1 lines download raw bytes

1import{d as w,a as s,o as i,n as I,h as a,k as ie,t as v,p as A,b as l,F as q,j as z,ab as ne,g,m as le,w as C,f as x,e as d,i as $,a9 as se,q as oe,E as D,c as o,V as re,s as ce,v as ue,O as me,_ as de,R as _e,P as ve,l as fe}from"#entry";import{_ as he}from"./DSD-IOfi.js";import{_ as W}from"./C7OhwvXU.js";import{_ as pe}from"./BkcCyD6I.js";import{u as ge}from"./CYKzeav_.js";import{f as P}from"./B07LBJeR.js";import{u as ye}from"./DKHjeM5U.js";import{p as Ce}from"./DJ1auS_n.js";import{f as be}from"./BkB2h1wC.js";const ke=w({__name:"LabelTag",props:{label:{},variant:{}},setup(e){return(t,u)=>(i(),s("div",{class:I(["vehicleLabelTag",[e.variant&&`vehicleLabelTag--${("toCamelCase"in t?t.toCamelCase:a(ie))(e.variant)}`]])},v(e.label),3))}}),xe=A(ke,[["__scopeId","data-v-7dd10ebf"]]),Se={key:0,class:"vehicleFpaKeyMetrics"},Le={key:0,class:"vehicleFpaKeyMetrics__item vehicleFpaKeyMetrics__item--new"},Me={key:1,class:"vehicleFpaKeyMetrics__item vehicleFpaKeyMetrics__item--new"},$e=w({__name:"KeyMetrics",props:{items:{},isNew:{type:Boolean,default:!1},isExDemo:{type:Boolean,default:!1}},setup(e){return(t,u)=>e.items?.length?(i(),s("ul",Se,[(i(!0),s(q,null,z(e.items,(f,h)=>(i(),s("li",{key:h,class:I(["vehicleFpaKeyMetrics__item",{"vehicleFpaKeyMetrics__item--isGreen":typeof f=="string"&&f.toLowerCase()==="electric"}])},v(f),3))),128)),e.isNew?(i(),s("li",Le," New ")):l("",!0),e.isExDemo?(i(),s("li",Me," Ex-Demo ")):l("",!0)])):l("",!0)}}),Ee=A($e,[["__scopeId","data-v-23d209d2"]]),Fe={class:"vehicleFinanceExample"},Ve={key:1,class:"vehicleFinanceExample__list"},Ie={class:"vehicleFinanceExample__listItemLabel"},Be={class:"vehicleFinanceExample__listItemValue"},Ne=w({__name:"FinanceExampleModal",props:{financeExample:{},isOpen:{type:Boolean,default:!1}},emits:["modal:close"],setup(e,{emit:t}){const u=e,f=t,{formattedFinanceExample:h,financeExampleTitle:p}
1=ge(ne(u,"financeExample"));return(E,b)=>{const S=W,L=pe,M=le;return i(),g(M,null,{default:C(()=>[x(L,{"is-open":e.isOpen,"onModal:close":b[0]||(b[0]=y=>f("modal:close"))},{default:C(()=>[d("div",Fe,[a(p)?(i(),g(S,{key:0,level:2,class:"vehicleFinanceExample__title"},{default:C(()=>[$(v(a(p)),1)]),_:1})):l("",!0),a(h)&&a(h).length?(i(),s("ul",Ve,[(i(!0),s(q,null,z(a(h),(y,r)=>(i(),s("li",{key:`vehicleFinanceExampleItem-${r}`,class:"vehicleFinanceExample__listItem"},[d("span",Ie,v(y.label)+":",1),d("span",Be,v(y.value),1)]))),128))])):l("",!0)])]),_:1},8,["is-open"])]),_:1})}}}),Pe=A(Ne,[["__scopeId","data-v-c0769a71"]]),we=se("vehicle-compare",()=>{const{$autonomyApi:e}=oe(),t=D([]),u=D([]),f=4,h=o(()=>u.value.length),p=D(f),E=o(()=>h.value===0?"Compare vehicles":`Compare ${h.value}/${p.value} Vehicles`),b=o(()=>t.value.length>=p.value),S=o(()=>Math.max(0,p.value-t.value.length)),L=o(()=>u.value?.length?u.value.some(c=>c.type==="lcv"):!1);function M(c){u.value=u.value.filter(k=>k.slug!==c),t.value=t.value.filter(k=>k!==c),F()}async function y(c){r(c)||(t.value.push(c),F()),await m()}function r(c){return u.value.some(k=>k.slug===c)}async function m(){const{data:c}=await e.vehicle.compare({"slugs[]":t.value});c&&(u.value=c)}function V(){const c=sessionStorage.getItem("vehicle-compare-slugs");return c?JSON.parse(c):[]}function T(){t.value=V()}function F(){sessionStorage.setItem("vehicle-compare-slugs",JSON.stringify(t.value))}return re(async()=>{T(),t.value.length&&m()}),{removeBySlug:M,addBySlug:y,vehicles:u,total:h,maxVehicles:p,totalContext:E,fetchCompare:m,isMaxLimitReached:b,placeholders:S,isSlugAdded:r,isVans:L}}),Ae=e=>{const t=o(()=>{if(e)return Ce.locations.url});return{dealershipUrl:o(()=>t.value?e?`${t.value}/${e}`:t.value:null)}},H=["Ray Chapman Motors Approved Used","Chery Approved Used"];function Te(e,t=!1,u=!1,f=!1,h=!1,p){const E=o(()=>{if(f)return"Sold";if(u)return"Reserved";if(e&&e.length){const r=e.find(m=>m.name==="Just Arrived");return r?r.name==="Just Arrived"?"New in":r.name:null}return null}),b=o(()=>f?"sold":u?"reserved":null),S=o(()=>{if(e?.length){const r=e.filter(m=>m.category!=="attention-grabber"&&m.name!=="Just Arrived"&&!H.includes(m.name));if(r.length)return r[0].name}}),L=o(()=>{if(e?.length){const r=e.find(m=>m.category==="attention-grabber");if(r)return r.name}return null}),M=o(()=>{if(e?.length){const r=e.find(m=>H.includes(m.name));if(r)return r.name}return null}),y=o(()=>t&&p!=="volvo"?"Brand New":h?"Ex-Demo":null);return{tag:E,tagStyle:b,label:S,attentionGrabberLabel:L,approvedUsedLabel:M,conditionLabel:y}}const Re={class:"vehicleCard"},Ue={class:"vehicleCard__inner"},De={key:1,class:"vehicleCard__tagContainer"},Oe={class:"vehicleCard__body"},Ke={key:0,class:"vehicleCard__topLabelContainer"},Ge={class:"vehicleCard__details"},Je={class:"vehicleCard__header"},je={class:"vehicleCard__titleWrap"},He={class:"vehicleCard__footer"},qe={class:"vehicleCard__price"},ze={key:0,class:"vehicleCard__priceItem vehicleCard__priceItem--cash"},We={key:0,class:"vehicleCard__priceItemOriginalValue"},Xe={key:1,class:"vehicleCard__priceItemVat"},Qe={key:1,class:"vehicleCard__priceItemLabel vehicleCard__priceItemLabel--sale"},Ye={key:1,class:"vehicleCard__priceItem vehicleCard__priceItem--finance"},Ze={class:"vehicleCard__priceItemValue"},et={class:"vehicleCard__priceItemLabel"},tt={class:"vehicleCard__actions"},at={key:0,class:"vehicleCard__meta vehicleCard__meta--grid"},it={class:"vehicleCard__iconLink"},nt=w({__name:"Card",props:{id:{},title:{},make:{},model:{},derivative:{},isComingSoon:{type:Boolean},image:{},year:{},mileage:{},fuelType:{},transmission:{},colour:{},price:{},originalPrice:{},monthlyPrice:{},monthlyPriceType:{},slug:{},dealership:{},financeExample:{},labels:{},isVatApplicable:{type:Boolean},isReserved:{type:Boolean},isNew:{type:Boolean},isSold:{type:Boolean},isExDemo:{type:Boolean},vehicleType:{},attentionGrabber:{},firstRegistrationDate:{},ageIdentifier:{},filterFeatures:{}},setup(e){const t=e,{isModalOpen:u,onModalToggle:f}=ye(),{dealershipUrl:h}=Ae(t.dealership?.slug??""),p=we(),{addBySlug:E,removeBySlug:b,isSlugAdded:S}=p,{isMaxLimitReached:L}=ce(p),M=ue();function y(n){return n==null?!1:typeof n=="number"?!0:typeof n=="string"?n.trim()!=="":!1}const r=o(()=>{const n=[];if(t.firstRegistrationDate){let _=t.firstRegistrationDate?t.firstRegistrationDate.split("-")[0]:"";t.ageIdentifier&&(_=`${_} (${t.ageIdentifier})`),n.push(_)}return t.mileage&&n.push(`${be(Number(t.mileage))} miles`),t.fuelType&&n.push(t.fuelType),t.transmission&&n.push(t.transmission),t.colour&&n.push(t.colour),t.filterFeatures&&t.filterFeatures.length&&t.filterFeatures.forEac
1h(_=>{n.push(_.name)}),n.filter(y)}),m=o(()=>{const n="/vehicle-details";let _="make",N="model";return t.make?.slug&&(_=t.make.slug),t.model&&typeof t.model=="object"&&t.model?.slug&&(N=t.model.slug),`${n}/${_}/${N}/${t.slug}`}),{tag:V,tagStyle:T,conditionLabel:F,label:c,approvedUsedLabel:k}=Te(t.labels,t.isNew,t.isReserved,t.isSold,t.isExDemo,t.make?.slug),O=o(()=>t.attentionGrabber||k.value),X=o(()=>!t.attentionGrabber&&!!k.value),B=o(()=>S(t.slug)),Q=o(()=>["UsedSearchResultsPage"].includes(String(M.name))),Y=o(()=>!L.value&&Q.value||B.value),K=o(()=>t.price&&t.originalPrice&&t.originalPrice>t.price?Number(t.originalPrice)-Number(t.price):null);return(n,_)=>{const N=_e,R=xe,Z=he,U=de,G=W,ee=Ee,J=me("Fa"),te=Pe,ae=fe;return i(),s("div",Re,[d("div",Ue,[x(U,{to:a(m),class:"vehicleCard__figure"},{default:C(()=>[e.image?(i(),g(N,{key:0,src:e.image,alt:`${e.title} Listing Image`,class:"vehicleCard__image"},null,8,["src","alt"])):l("",!0),a(V)||a(c)||a(F)?(i(),s("div",De,[a(V)?(i(),g(R,{key:0,label:a(V),variant:a(T)},null,8,["label","variant"])):l("",!0),a(c)?(i(),g(R,{key:1,label:a(c)},null,8,["label"])):l("",!0),a(F)?(i(),g(R,{key:2,label:a(F),variant:"condition"},null,8,["label"])):l("",!0)])):l("",!0),a(Y)?(i(),s("button",{key:2,class:I(["vehicleCard__compare vehicleCompareButton",{"vehicleCompareButton--active":a(B)}]),type:"button",onClick:_[0]||(_[0]=ve(j=>a(B)?a(b)(e.slug):a(E)(e.slug),["prevent"]))},[x(Z,{name:"compare",directory:"icons"}),$(" "+v(a(B)?"Remove":"Compare"),1)],2)):l("",!0)]),_:1},8,["to"]),d("div",Oe,[a(O)?(i(),s("div",Ke,[d("span",{class:I(["vehicleCard__topLabel",{"vehicleCard__topLabel--approvedUsed":a(X)}])},v(a(O)),3)])):l("",!0),d("div",Ge,[d("div",Je,[d("div",je,[x(U,{to:a(m)},{default:C(()=>[e.title?(i(),g(G,{key:0,level:2,class:"vehicleCard__title"},{default:C(()=>[$(v(e.title),1)]),_:1})):l("",!0)]),_:1},8,["to"]),e.derivative?(i(),g(G,{key:0,level:3,class:"vehicleCard__subtitle"},{default:C(()=>[$(v(e.derivative),1)]),_:1})):l("",!0)])]),a(r)?.length?(i(),g(ee,{key:0,items:a(r),class:"vehicleCard__keyMetrics"},null,8,["items"])):l("",!0)])]),d("div",He,[d("div",qe,[e.price||e.originalPrice?(i(),s("div",ze,[e.price?(i(),s("div",{key:0,class:I(["vehicleCard__priceItemValue vehicleCard__priceItemValue--cash",{"vehicleCard__priceItemValue--sale":e.originalPrice&&e.price&&e.originalPrice>e.price}])},[d("span",null,v(("formatCurrency"in n?n.formatCurrency:a(P))(e.price)),1),e.originalPrice&&e.price&&e.originalPrice>e.price?(i(),s("div",We,v(("formatCurrency"in n?n.formatCurrency:a(P))(e.originalPrice)),1)):l("",!0),e.isVatApplicable?l("",!0):(i(),s("small",Xe," + VAT "))],2)):l("",!0),a(K)?(i(),s("span",Qe," Save "+v(("formatCurrency"in n?n.formatCurrency:a(P))(a(K))),1)):l("",!0)])):l("",!0),e.monthlyPrice&&e.monthlyPrice>0?(i(),s("div",Ye,[d("div",Ze,v(("formatCurrency"in n?n.formatCurrency:a(P))(e.monthlyPrice,"GBP",{maximumFractionDigits:2})),1),d("span",et,[$("  P/M "+v(e.monthlyPriceType)+" ",1),e.finance
1Example?(i(),s("button",{key:0,type:"button",class:"vehicleCard__infoButton","aria-label":"Show finance example",onClick:_[1]||(_[1]=(...j)=>a(f)&&a(f)(...j))},[x(J,{icon:["fas","circle-info"]})])):l("",!0),e.financeExample?(i(),g(te,{key:1,"is-open":a(u),"finance-example":e.financeExample,"onModal:close":a(f)},null,8,["is-open","finance-example","onModal:close"])):l("",!0)])])):l("",!0)]),d("div",tt,[x(ae,{as:"NuxtLink",href:a(m),variant:"primary",class:"vehicleCard__action"},{default:C(()=>[..._[2]||(_[2]=[$(" View details ",-1)])]),_:1},8,["href"])]),e.dealership&&a(h)?(i(),s("div",at,[d("div",it,[x(J,{icon:["fas","location-dot"]}),x(U,{to:a(h)},{default:C(()=>[$(v(e.dealership.name),1)]),_:1},8,["to"])])])):l("",!0)])])])}}}),vt=A(nt,[["__scopeId","data-v-bb21e7ae"]]);export{vt as _,Pe as a,Ae as b,Ee as c,Te as d,xe as e,we as u};

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.