1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8714],{8714:(e,t,l)=>{l.d(t,{Ay:()=>A});var n=l(37876),s=l(14232),i=l(48230),a=l.n(i),r=l(29053),c=l(28419),o=l(68827),d=l.n(o),m=l(89099),u=l(7156),x=l(6507),h=l(61907),p=l(53814),g=l(86144),f=l(75195);let v=e=>{var t,l,i;let{carModels:a,planType:r,carModel:c}=e,o=(0,m.useRouter)(),{t:v}=(0,u.B)(),y=c||(null==a?void 0:a.length)>0&&(null==a||null==(t=a[0])?void 0:t.attributes),b=r===p.OL.ShortTerm,j=(0,s.useCallback)(()=>{var e,t;let l="";l=b?null==y||null==(e=y.daily_price)?void 0:e.plan_term_id:null==y||null==(t=y.monthly_price)?void 0:t.plan_term_id;let n=(0,h.zg)().format("YYYY-MM-DD"),s=(0,g.Wq)(n),i={car_type_id:null==y?void 0:y.id,plan_term_id:l,product_price_ids:[],start_date:n,end_date:r===p.OL.ShortTerm?s:p.go,location:{},plan_type:(0,x.rY)(r),payment_frequency:r===p.OL.ShortTerm?p.lY.PayOneTime:p.lY.PayMonthly};r===p.OL.LongTerm?o.push({pathname:"/cars/v2/".concat(null==y?void 0:y.slug),query:{...i}}):o.push({pathname:"/checkout-v3/booking-details",query:{data:btoa(JSON.stringify(i))}})},[o]);return(0,n.jsx)("div",{onClick:j,children:(0,n.jsxs)("div",{className:"mx-auto bg-white rounded-xl border border-gray-200 shadow-sm p-4 flex flex-col !gap-4 h-full",children:[(0,n.jsx)(f.A,{carModel:y}),(0,n.jsx)("div",{className:"flex-1"}),(0,n.jsx)(d(),{width:1280,height:655,layout:"responsive",objectFit:"contain",src:(null==y?void 0:y.image_url)||"/car_placeholder.png",alt:"Car Model",className:"w-full h-auto object-contain"}),(0,n.jsxs)("div",{className:"flex justify-between items-start",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("h2",{className:"text-base font-semibold text-black",children:r===p.OL.LongTerm?(0,x.eN)(y,!0):(0,x.QW)(y)}),(0,n.jsx)("p",{className:"text-sm text-gray-700",children:r===p.OL.LongTerm?(0,x.$J)(y):(0,x.P$)(y)}),(0,n.jsx)("p",{className:"text-xs text-gray-500",children:"".concat(null==y?void 0:y.fuel_type_name," \xb7 ").concat(null==y?void 0:y.seat_capacity," ").concat(v("carModelCard.label.seat")," \xb7 ").concat(null==y?void 0:y.transmission)})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1 items-end text-right",children:[(()=>{var e,t,l,s,i,a,r,c,o,d,m,u;return b?(0,n.jsx)(n.Fragment,{children:(null==y||null==(e=y.daily_price)?void 0:e.discount_applied)?(0,n.jsxs)("p",{className:"text-sm font-medium text-black text-right",children:[(0,n.jsx)("span",{className:"line-through text-base",children:"$".concat(null==y||null==(t=y.daily_price)?void 0:t.price)})," ",(0,n.jsx)("span",{children:"".concat(null==y||null==(s=y.daily_price)||null==(l=s.formatted)?void 0:l.discounted_price)})," ",(0,n.jsx)("span",{className:"text-sm font-normal text-gray-600",children:"/day"})]}):(0,n.jsxs)("p",{className:"text-sm font-medium text-black",children:["".concat(null==y||null==(a=y.daily_price)||null==(i=a.formatted)?void 0:i.discounted_price," "),(0,n.jsx)("span",{className:"text-sm font-normal text-gray-600",children:"/day"})]})}):(0,n.jsx)(n.Fragment,{children:(null==y||null==(r=y.monthly_price)?void 0:r.discount_applied)?(0,n.jsxs)("p",{className:"text-sm font-medium text-black text-right",children:[(0,n.jsx)("span",{className:"line-through text-sm",children:"$".concat(null==y||null==(c=y.monthly_price)?void 0:c.price)})," ",(0,n.jsx)("span",{children:"".concat(null==y||null==(d=y.monthly_price)||null==(o=d.formatted)?void 0:o.discounted_price)})," ",(0,n.jsx)("span",{className:"text-sm font-normal text-gray-600",children:"/month"})]}):(0,n.jsxs)("p",{className:"text-sm font-medium text-black",children:["".concat(null==y||null==(u=y.monthly_price)||null==(m=u.formatted)?void 0:m.discounted_price," "),(0,n.jsx)("span",{className:"text-sm font-normal text-gray-600",children:"/month"})]})})})(),b?(0,n.jsx)("p",{className:"text-sm text-gray-900 text-right",children:""}):(0,n.jsx)("p",{className:"text-sm text-gray-900 text-right",children:"Pay monthly"}),(0,n.jsx)("p",{className:"text-xs text-gray-500 text-right",children:"Excl. add-ons, taxes"})]})]}),r===p.OL.LongTerm&&(null==y?void 0:y.enrollment_options)&&(null==y||null==(l=y.enrollment_options)?void 0:l.length)>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm mb-1 font-medium",children:"Enrollment fee options"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:null==y||null==(i=y.enrollment_options)?void 0:i.map(e=>(0,n.jsx)("div",{className:"rounded-full border text-sm px-3 py-0.5",children:e.enrollment_fee}))})]}),(0,n.jsx)("button",{className:"w-full bg-black text-white text-sm font-medium mt
1-2 py-2 rounded",children:"Select â"})]})})};function y(e){let{carModels:t,planType:l}=e;return(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)("div",{className:"mx-auto w-full max-w-7xl pt-[45px]",children:(0,n.jsx)("div",{className:"grid grid-cols-1 gap-10 md:grid-cols-2 md:gap-[25px] min-[1089px]:grid-cols-3 min-[1089px]:gap-10",children:t&&t.length>0&&t.map(e=>(0,n.jsx)(v,{carModel:Object.keys(e).includes("attributes")?e.attributes:e,planType:l},e.id))})})})}var b=l(78901),j=l(13806),w=l(33190),N=l(21257);let _=["promote"];function A(e){let{title:t="Clean, new vehicles from top brands",subTitle:l="Drive the latest models from top brands, equipped with the newest tech. Every vehicle is professionally maintained and cleaned by Roam so it feels new every time.",titleWhenEmpty:i,subTitleWhenEmpty:o,planType:d=p.OL.LongTerm,perPage:m=6,tags:u=_,fleetSearchQuery:x,fleetFetchUrl:h,initialCarModels:g,carModels:f,sectionBg:v="white",allowClientFleetFetch:A=!0}=e,k=Array.isArray(g)&&g.length>0?g:Array.isArray(f)&&f.length>0?f:[],M=k.length>0,[C,S]=(0,s.useState)(k),[L,E]=(0,s.useState)(void 0),z=Array.isArray(C)&&C.length>0;(0,s.useEffect)(()=>{let e=Array.isArray(g)&&g.length>0?g:Array.isArray(f)&&f.length>0?f:[],t=Array.isArray(g)&&g.length>0||Array.isArray(f)&&f.length>0;if(!A)return void S(e);t&&S(e)},[g,f,A]);let O=(0,s.useMemo)(()=>{let e=["per_page=".concat(encodeURIComponent(String(m)))];return u.forEach(t=>{e.push("tags[]=".concat(encodeURIComponent(t)))}),e.join("&")},[m,u]),T=null!=x&&""!==x?x:O;(0,s.useEffect)(()=>{if(M||!A)return;let e=!1,t="https://api.curbo.io/api",l=h||(t?"".concat(t,"/v1/web/car_types/search_car_models?").concat(T):null);if(l)return(async()=>{try{let t=await fetch(l);if(!t.ok)throw Error("Fleet fetch failed: ".concat(t.status));let n=await t.json(),s=Array.isArray(null==n?void 0:n.data)?n.data:[];e||S(s)}catch(t){console.error("FleetSection: failed to load fleet cars",t),e||S([])}})(),()=>{e=!0}},[h,T,M]);let R=!z&&"string"==typeof i&&i.trim().length>0&&"string"==typeof o&&o.trim().length>0,H=R?i.trim():t,Z=R?o.trim():l;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("section",{"aria-labelledby":"fleet-section-heading",className:(0,N.cn)("w-full py-16 md:py-20","muted"===v?"bg-muted":"bg-white"),children:(0,n.jsxs)("div",{className:"mx-auto max-w-6xl px-6",children:[(0,n.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-pink-700",children:"Roam's fleet"}),(0,n.jsx)("h2",{id:"fleet-section-heading",className:"mt-3 text-3xl font-bold tracking-tight text-foreground md:text-4xl",children:H}),(0,n.jsx)("p",{className:"mt-4 max-w-4xl text-base leading-relaxed text-muted-foreground",children:Z}),(0,n.jsxs)("button",{type:"button",onClick:()=>E(w.X.ROAM_FLEET_STANDARDS),className:"mt-3 inline-flex min-h-[40px] items-center gap-1 py-2 text-sm font-medium text-foreground underline underline-offset-4 hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-zinc-950",children:["See Roam's fleet standards",(0,n.jsx)(r.A,{className:"mt-0.5 h-4 w-4","aria-hidden":"true"})]}),z?(0,n.jsx)("div",{className:"mt-10",children:(0,n.jsx)(y,{carModels:C,planType:d})}):(0,n.jsx)(b.A,{}),(0,n.jsx)("div",{className:"mt-10 flex justify-center",children:(0,n.jsxs)(a(),{href:"/cars",className:"inline-flex items-center gap-2 rounded-lg bg-zinc-950 px-8 py-3 text-sm font-semibold text-white transition-colors hover:bg-zinc-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-white focus-visible:ring-offset-zinc-950",children:["Browse all cars",(0,n.jsx)(c.A,{className:"h-4 w-4","aria-hidden":"true"})]})})]})}),(0,n.jsx)(j.A,{contentId:L,onClose:()=>E(void 0)})]})}},29053:(e,t,l)=>{l.d(t,{A:()=>n});let n=(0,l(17963).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},75195:(e,t,l)=>{l.d(t,{A:()=>a});var n=l(37876);l(14232);var s=l(61907),i=l(91815);function a(e){var t,l,a,r,c,o;let{carModel:d}=e,m=(null==d||null==(t=d.fixed_price)?void 0:t.enrollment_fee_highlight)||(null==d||null==(l=d.monthly_price)?void 0:l.enrollment_fee_highlight),u=null==d||null==(a=d.plan)?void 0:a.offer_label;return(0,n.jsx)("div",{className:"flex flex-wrap justify-between gap-2 items-center",children:(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[((null==d||null==(r=d.tags)?void 0:r.includes("new_arrival"))||(null==d||null==(c=d.tags)?void 0:c.includes("new")))&&(0,n.jsx)("span",{className:"inline-flex items-center rounded-full bg-black px-3 py-1 text-xs font-medium text-white",children:"New"}),(null==d||null==(o=d.tags)?void 0:o.includes("sale"))&&(0,n.jsx)("span",{className:"inline-flex items-center rounded-full bg-pink-700/10 px-3 py-1 text-xs font-medium text-pink-700",children:"On Sale"}),!!(null==d?void 0:d.quantity_left)&&(0,n.jsx)("span",{className:"inline-flex items-center rounded-full bg-amber-100 px-3 py-1 text-xs font-medium text-amber-800",children:"Only ".concat(null==d?void 0:d.quantity_left," left")}),(u||m)&&(0,n.jsx)("span",{className:"inline-flex items-center rounded-full bg-green-100 px-3 py-1 text-xs font-medium text-green-700 whitespace-nowrap",children:u||m}),(0,s.CR)(null==d?void 0:d.available_from)&&(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-700",children:[(0,n.jsx)(i.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}),(0,s.jY)(null==d?void 0:d.available_from)]}),(null==d?void 0:d.electric_fuel_type)&&(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-white/90 text-zinc-700 backdrop-blur-sm",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-3 w-3 shrink-0","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"})}),"Electric"]})]})})}},78901:(e,t,l)=>{l.d(t,{A:()=>d});var n=l(37876),s=l(48230),i=l.n(s),a=l(54587),r=l.n(a),c=l(84288);let o=[{title:"Compact Sedan",subtitle:"Corolla, Elantra, Forte & more",href:"/cars",image:"/images/car-cards/compact-sedan-wide-generic.png"},{title:"Compact SUV",subtitle:"RAV4, Sportage, Rogue & more",href:"/cars",image:"/images/car-cards/compact-suv-wide-generic.png"},{title:"Midsize Sedan",subtitle:"Camry, Jetta, Mazda 3 & more",href:"/cars",image:"/images/car-cards/midsize-sedan-wide-generic.png"},{title:"Midsize SUV",subtitle:"Tucson, Santa Fe, Grand Cherokee & more",href:"/cars",image:"/images/car-cards/midsize-suv-wide-generic.png"},{title:"Electric & Hybrid",subtitle:"Tesla Model 3, RAV4 Hybrid & more",href:"/cars",image:"/images/car-cards/ev-sedan-wide-generic.png"},{title:"Luxury",subtitle:"BMW X1, Audi Q5 & more",href:"/cars",image:"/images/car-cards/luxury-suv-wide-generic.png"}];function d(){return(0,n.jsx)("div",{className:"mt-10 grid gap-6 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:o.map(e=>(0,n.jsxs)(i(),{href:e.href,className:"group overflow-hidden rounded-2xl border border-border bg-background transition-colors hover:border-zinc-400",children:[(0,n.jsx)("div",{className:"relative aspect-[16/10] bg-muted",children:e.image?(0,n.jsx)(r(),{src:e.image,alt:e.title,fill:!0,sizes:"(max-width: 640px) 100v
1w, (max-width: 1024px) 50vw, 33vw",className:"object-contain p-3",loading:"eager"}):(0,n.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,n.jsx)(c.A,{className:"h-12 w-12 text-muted-foreground/30","aria-hidden":"true"})})}),(0,n.jsxs)("div",{className:"p-5",children:[(0,n.jsx)("h3",{className:"text-base font-semibold text-foreground",children:e.title}),(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.subtitle}),(0,n.jsxs)("span",{className:"mt-3 inline-flex w-full items-center justify-center rounded-lg bg-zinc-950 px-4 py-2.5 text-sm font-semibold text-white transition-colors group-hover:bg-zinc-800",children:["Browse ",e.title]})]})]},e.title))})}},84288:(e,t,l)=>{l.d(t,{A:()=>n});let n=(0,l(17963).A)("car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]])},91815:(e,t,l)=>{l.d(t,{A:()=>s});var n=l(14232);let s=n.forwardRef(function(e,t){let{title:l,titleId:s,...i}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},i),l?n.createElement("title",{id:s},l):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"}))})}}]);
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.