1import{h as a,V as o,o as c,j as e,e as m,x,y as p,a4 as h,B as t,Q as u,ay as f,s as g}from"./index-C9eIxKIh.js";import{S as j}from"./SEOHead-DTuOMYN7.js";import{M as N}from"./MembershipCTA-DqIcgWoS.js";import{A as b}from"./arrow-left-MwtEYdYD.js";import{D as y}from"./download-cK6-lwa3.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const v=a("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const w=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"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const _=a("Droplet",[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]]);/** 17 * @license lucide-react v0.462.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const l=a("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 22 * @license lucide-react v0.462.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const k=a("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);function S(){const{id:r}=o(),{data:s,isLoading:i}=c({queryKey:["route",r],queryFn:async()=>{const{data:d,error:n}=await g.from("routes").select("*").eq("id",r).single();if(n)throw n;return d}});return i?e.jsx("div",{className:"container py-16 text-center",children:"Loading route..."}):s?e.jsxs("div",{className:"container max-w-3xl py-8",children:[e.jsx(j,{title:s.name,description:s.description||`View route details for ${s.name}`}),e.jsxs(m,{to:"/routes",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-6",children:[e.jsx(b,{className:"h-4 w-4"})," Back to Library"]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[s.is_cpw_classic&&e.jsx("span",{className:"bg-primary/10 text-primary text-xs font-bold uppercase tracking-wider px-2.5 py-1 rounded",children:"CPW Classic"}),e.jsx("span",{className:"bg-muted text-muted-foreground text-xs font-medium uppercase tracking-wider px-2.5 py-1 rounded capitalize",children:s.surface_type}),e.jsx("span",{className:"bg-muted text-muted-foreground text-xs font-medium uppercase tracking-wider px-2.5 py-1 rounded capitalize",children:s.difficulty_level})]}),e.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-4",children:s.name}),e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[s.distance&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(x,{className:"h-4 w-4"})," ",s.distance," miles"]}),s.elevation_gain&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(p,{className:"h-4 w-4"})," ",s.elevation_gain.toLocaleString()," ft gain"]}),s.start_location&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(l,{className:"h-4 w-4"})," Starts from: ",s.start_location]})]})]}),s.start_lat&&s.start_lng&&e.jsx("div",{className:"mb-8",children:e.jsx(h,{startLat:s.start_lat,startLng:s.start_lng,routeName:s.name,polyline:s.polyline||void 0,className:"w-full h-80 rounded-xl overflow-hidden border border-border"})}),e.jsxs("div",{className:"flex flex-wrap gap-3 mb-8",children:[s.strava_link&&e.jsx(t,{asChild:!0,className:"gap-1.5",children:e.jsxs("a",{href:s.strava_link,target:"_blank",rel:"noopener noreferrer",children:["View on Strava ",e.jsx(v,{className:"h-4 w-4"})]})}),s.file_url&&e.jsx(t,{asChild:!0,variant:"outline",className:"gap-1.5",children:e.jsxs("a",{href:s.file_url,download:!0,children:[e.jsx(y,{className:"h-4 w-4"})," Download GPX"]})})]}),s.description&&e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"font-heading text-xl font-bold mb-3",children:"About this route"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.description})]}),s.safety_notes&&e.jsxs("div",{className:"rounded-lg bg-status-needs-leader/10 border border-status-needs-leader/20 p-4 mb-8",children:[e.jsx("h3",{className:"font-semibold text-status-needs-leader mb-1 flex items-center gap-2",children:"Safety Notes"}
26),e.jsx("p",{className:"text-sm text-foreground/80",children:s.safety_notes})]}),s.start_location&&e.jsxs("div",{className:"mb-8 rounded-xl border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"p-6 border-b border-border",children:[e.jsxs("h2",{className:"font-heading text-xl font-bold mb-1 flex items-center gap-2",children:[e.jsx(l,{className:"h-5 w-5 text-primary"})," Start Location Profile"]}),e.jsx("h3",{className:"text-lg font-semibold",children:s.start_location}),s.start_address&&e.jsx("p",{className:"text-muted-foreground mb-4",children:s.start_address}),e.jsxs("div",{className:"flex flex-wrap gap-4 mt-4",children:[s.has_parking&&e.jsxs("span",{className:"flex items-center gap-1.5 text-sm bg-muted px-2.5 py-1 rounded-md",children:[e.jsx(w,{className:"h-4 w-4"})," Parking"]}),s.has_restrooms&&e.jsxs("span",{className:"flex items-center gap-1.5 text-sm bg-muted px-2.5 py-1 rounded-md",children:[e.jsx(u,{className:"h-4 w-4"})," Restrooms"]}),s.has_water&&e.jsxs("span",{className:"flex items-center gap-1.5 text-sm bg-muted px-2.5 py-1 rounded-md",children:[e.jsx(_,{className:"h-4 w-4"})," Water"]})]}),s.start_amenities&&e.jsxs("div",{className:"mt-4 pt-4 border-t border-border/50",children:[e.jsxs("h4",{className:"text-sm font-semibold flex items-center gap-1.5 mb-1",children:[e.jsx(f,{className:"h-4 w-4"})," Nearby Amenities"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.start_amenities})]})]}),s.start_lat&&s.start_lng&&e.jsx("div",{className:"p-4 bg-muted/30 flex justify-end",children:e.jsx(t,{asChild:!0,className:"gap-2",children:e.jsxs("a",{href:`https://maps.apple.com/?daddr=${s.start_lat},${s.start_lng}`,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(k,{className:"h-4 w-4"})," Navigate to Start"]})})})]}),e.jsx("div",{className:"mt-10",children:e.jsx(N,{headline:"Love this route?",description:"Club members get 15% off gear, priority service, and weekly coffee.",variant:"inline"})})]}):e.jsx("div",{className:"container py-16 text-center",children:"Route not found"})}export{S as default};
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.