PageSourceSearch

https://hanttrail-8fwxhbgl.manus.space/assets/GpxLibrary-CCGIoQ8j.js

js hanttrail-8fwxhbgl.manus.space collected 2026-10-03 05:04:40 UTC 41,857 bytes, 13 lines download raw bytes

1import{H as fe,q as je,r as p,s as u,t as h,j as e,U as I,K as E,G as U,Y as ae,N as Le,O as Ge,Q as ve,S as Ne}from"./index-CqGqwWKp.js";import{I as F}from"./input-C-dhHZfz.js";import{A as we}from"./arrow-left-BstHR7w2.js";import{R as H}from"./route-COkx8K1a.js";import{T as Ce}from"./trophy-BsR5xVEW.js";import{B as k}from"./book-marked-BjrFGQIL.js";import{S as re}from"./search-X9xeeq-b.js";import{P as ke}from"./plus-CfHDN4Y3.js";import{S as le}from"./star-QJljQarw.js";import{M as W}from"./map-pin-DifvMV2M.js";import{R as X}from"./ruler-DoQFTYtX.js";import{C as ce}from"./clock-Sbq_3bEj.js";import{M as Se}from"./mountain-D3M_wSpQ.js";import{N as $}from"./navigation-DjckAfzu.js";import{P as ze}from"./palette-fgbXAbrT.js";import"./useComposition-CjDhl5L8.js";import"./usePersistFn-DaDCSoQ3.js";const $e="https://files.manuscdn.com/user_upload_by_module/session_file/310519663548498135/CJDmoVdWlGKpaLiD.jpg";async function Ie(t,r){if(t)try{const o=JSON.parse(t).map(d=>{const b=d.ele!=null?`
2        <ele>${d.ele}</ele>`:"";return`      <trkpt lat="${d.lat}" lon="${d.lng}">${b}
3      </trkpt>`}).join(`
4`),i=`<?xml version="1.0" encoding="UTF-8"?>
5<gpx version="1.1" creator="HANT Trail Curator">
6  <trk>
7    <name>${r}</name>
8    <trkseg>
9${o}
10    </trkseg>
11  </trk>
12</gpx>`,g=`HANT_${r.replace(/[^\w\uAC00-\uD7A3]/g,"_")}.gpx`,l=new Blob([i],{type:"application/gpx+xml"}),a=URL.createObjectURL(l),c=document.createElement("a");c.href=a,c.download=g,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(a),h.success("GPX 파일이 다운로드되었습니다")}catch{h.error("다운로드 실패")}}function Ee(t){return t>=1?`${t.toFixed(1)}km`:`${Math.round(t*1e3)}m`}function Me(t,r,n){const o=Number(t);if(!o||o<=0)return"";let i=3.5;n==="mountain"?i=2.5:n==="trail"||n==="forest"?i=3:(n==="road"||n==="flat")&&(i=4);const g=r?Number(r)/100*10:0,l=o/i*60,a=Math.round((l+g)/5)*5,c=Math.floor(a/60),d=a%60;return c===0?`약 ${d}분`:d===0?`약 ${c}시간`:`약 ${c}시간 ${d}분`}function B(t){const r=["","text-gray-500","text-green-600","text-blue-600","text-purple-600","text-amber-500","text-red-600"];return r[Math.min(t,r.length-1)]||"text-gray-500"}function J(t){const r=["","bg-gray-100","bg-green-100","bg-blue-100","bg-purple-100","bg-amber-100","bg-red-100"];return r[Math.min(t,r.length-1)]||"bg-gray-100"}const ie=[{label:"전체",value:""},{label:"서울",value:"서울"},{label:"경기",value:"경기"},{label:"인천",value:"인천"},{label:"강원",value:"강원"},{label:"충북",value:"충북"},{label:"충남",value:"충남"},{label:"대전",value:"대전"},{label:"세종",value:"세종"},{label:"전북",value:"전북"},{label:"전남",value:"전남"},{label:"광주",value:"광주"},{label:"경북",value:"경북"},{label:"경남",value:"경남"},{label:"대구",value:"대구"},{label:"울산",value:"울산"},{label:"부산",value:"부산"},{label:"제주",value:"제주"}],De=[{value:"#2d6a4f",label:"숲 초록"},{value:"#1b4332",label:"짙은 초록"},{value:"#1d3557",label:"깊은 파랑"},{value:"#457b9d",label:"하늘 파랑"},{value:"#6d4c41",label:"흙 갈색"},{value:"#4a4e69",label:"보라 회색"},{value:"#b5451b",label:"붉은 토양"},{value:"#3d405b",label:"어두운 남색"}];function Pe({item:t,isAuthenticated:r,onFollow:n,onDownload:o,isFollowPending:i,isMineTab:g,onUnshare:l}){return e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:145",className:"bg-card border border-border rounded-2xl overflow-hidden hover:border-green-300 hover:shadow-sm transition-all",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:146",className:"p-4 pb-3",children:[t.curator&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:148",className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:149",className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:e.jsx(E,{"data-loc":"client/src/pages/GpxLibrary.tsx:150",size:12,className:"text-muted-foreground"})}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:152",className:"text-xs font-bold text-foreground",children:t.curator.nickname||"익명"}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:153",className:`text-[10px] font-bold px-1.5 py-0.5 rounded-full ${J(t.curator.level)} ${B(t.curator.level)}`,children:t.curator.levelName})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:158",className:"flex items-center gap-2 mb-2",children:[t.courseId&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:160",className:"text-[10px] font-bold px-1.5 py-0.5 rounded bg-primary text-primary-foreground flex-shrink-0",children:[t.courseId,"구간"]}),e.jsx("h3",{"data-loc":"client/src/pages/GpxLibrary.tsx:164",className:"font-semibold text-sm",children:t.title})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:166",className:"flex flex-wrap items-center gap-x-3 gap-y-1 mb-2",children:[t.region&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:168",className:"flex items-center gap-1 text-xs text-blue-600 font-medium",children:[e.jsx(W,{"data-loc":"client/src/pages/GpxLibrary.tsx:169",size:10,
12className:"text-blue-400"}),t.region]}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:173",className:"flex items-center gap-1 text-xs font-bold text-green-600",children:[e.jsx(X,{"data-loc":"client/src/pages/GpxLibrary.tsx:174",size:11}),Ee(Number(t.distanceKm))]}),(()=>{const a=Number(t.distanceKm),c=t.durationSeconds??0,d=c>0&&a>0?a/c*3600:0;if(c>0&&d<15){const y=Math.floor(c/3600),x=Math.floor(c%3600/60),M=y===0?`${x}분`:x===0?`${y}시간`:`${y}시간 ${x}분`;return e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:186",className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(ce,{"data-loc":"client/src/pages/GpxLibrary.tsx:187",size:10}),M]})}const b=Me(a,t.totalAscent?Number(t.totalAscent):null,t.trailTag);return b?e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:194",className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(ce,{"data-loc":"client/src/pages/GpxLibrary.tsx:195",size:10}),b]}):null})()]}),t.totalAscent&&Number(t.totalAscent)>0||t.maxElevation?e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:202",className:"flex flex-wrap items-center gap-x-3 gap-y-1 mb-2",children:[t.totalAscent&&Number(t.totalAscent)>0&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:204",className:"flex items-center gap-1 text-xs text-orange-600",children:[e.jsx(Se,{"data-loc":"client/src/pages/GpxLibrary.tsx:205",size:10}),"총획득고도 +",Math.round(Number(t.totalAscent)),"m"]}),t.maxElevation&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:210",className:"flex items-center gap-1 text-xs text-muted-foreground",children:["최고해발 ",Math.round(Number(t.maxElevation)),"m"]}),t.minElevation&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:215",className:"flex items-center gap-1 text-xs text-muted-foreground",children:["최저해발 ",Math.round(Number(t.minElevation)),"m"]})]}):null,t.showComment===1&&t.comment&&e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:222",className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:t.comment}),(t.followWalkCount>0||t.viewCount>0)&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:225",className:"flex items-center gap-3 mb-1",children:[t.followWalkCount>0&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:227",className:"flex items-center gap-1",children:[e.jsx($,{"data-loc":"client/src/pages/GpxLibrary.tsx:228",size:11,className:"text-green-600"}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:229",className:"text-xs text-green-700 font-semibold",children:[t.followWalkCount,"명 따라걸음"]})]}),t.viewCount>0&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:233",className:"flex items-center gap-1",children:[e.jsx(I,{"data-loc":"client/src/pages/GpxLibrary.tsx:234",size:11,className:"text-amber-500"}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:235",className:"text-xs text-amber-600",children:["관심 ",t.viewCount,"명"]})]})]}),t.collections&&t.collections.length>0&&e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:241",className:"flex flex-wrap gap-1 mt-1",children:t.collections.map(a=>e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:243",className:"inline-flex items-center gap-0.5 text-[10px] font-bold px-1.5 py-0.5 rounded-full bg-amber-100 text-amber-700 border border-amber-200",children:[e.jsx(k,{"data-loc":"client/src/pages/GpxLibrary.tsx:244",size:9}),a.collectionTitle]},a.collectionId))})]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:251",className:"flex border-t border-border",children:g?e.jsxs(e.Fragment,{children:[e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:254",className:"flex-1 flex items-center justify-center gap-1.5 py-3 text-sm font-bold text-white bg-green-600 hover:bg-green-700 active:bg-green-800 transition-colors",disabled:i,onClick:a=>{a.stopPropagation(),n(t.id)},children:[e.jsx($,{"data-loc":"client/src/pages/GpxLibrary.tsx:259",size:15}),i?"준비 중...":"따라걷기 시작"]}),e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:262",className:"flex items-center justify-center gap-1 px-4 py-3 text-sm font-semibold text-white bg-blue-500 hover:bg-blue-600 transition-colors border-l border-border",onClick:a=>{a.stopPropagation(),o(t.id,t.title)},children:[e.jsx(ae,{"data-loc":"client/src/pages/GpxLibrary.tsx:266",size:15}),"GPX"]}),e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:269",className:"flex items-center justify-center gap-1 px-4 py-3 text-xs font-bold text-red-600 bg-red-50 hover:bg-red-100 transition-colors border-l border-border",onClick:a=>{a.stopPropagation(),l?.(t.id)},children:"철회"})]}):r?e.jsxs(e.Fragment,{children:[e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:278",className:"flex-1 flex items-center justify-center gap-1.5 py-3 text-sm font-bold text-white bg-green-600 hover:bg-green-700 active:bg-green-800 transition-colors",disabled:i,onClick:a=>{a.stopPropagation(),n(t.id)},children:[e.jsx($,{"data-loc":"client/src/pages/GpxLibrary.tsx:283",size:15}),i?"준비 중...":"따라걷기 시작"]}),e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:286",className:"flex items-center justify-center gap-1.5 px-4 py-3 text-sm font-semibold text-white bg-blue-500 hover:bg-blue-600 active:bg-blue-700 transition-colors border-l border-border",onClick:a=>{a.stopPropagation(),o(t.id,t.title)},children:[e.jsx(ae,{"data-loc":"client/src/pages/GpxLibrary.tsx:290",size:15}),"GPX"]})]}):e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:295",className:"flex-1 flex items-center justify-center gap-1.5 py-3 text-sm text-muted-foreground bg-muted/50",children:[e.jsx($,{"data-loc":"client/src/pages/GpxLibrary.tsx:296",size:15}),"로그인 후 따라걷기 가능"]})})]})}function _e({col:t,onOpen:r}){const n=t.coverColor||"#2d6a4f",o=t.authorNickname||t.authorName||"익명",i=t.curatorLevel??1,g=t.curatorLevelName??"새싹 큐레이터",l=!!t.isPremium;return l&&!!t.premiumCoverImageUrl?e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:323",className:"rounded-2xl overflow-hidden cursor-pointer hover:shadow-lg transition-all active:scale-[0.98] ring-2 ring-amber-400",onClick:()=>r(t.id),children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:328",className:"relative",style:{minHeight:110},children:[e.jsx("img",{"data-loc":"client/src/pages/GpxLibrary.tsx:329",src:t.premiumCoverImageUrl,alt:t.title,className:"absolute inset-0 w-full h-full object-cover",onError:c=>{c.target.style.display="none"}}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:336",className:"absolute inset-0",style:{background:`linear-gradient(160deg, rgba(0,0,0,0.35) 0%, ${n}dd 100%)`}}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:338",className:"absolute left-0 top-0 bottom-0 w-3 flex flex-col justify-around py-2",children:[...Array(5)].map((c,d)=>e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:340",className:"w-3 h-1.5 rounded-r-full bg-white/20"},d))}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:344",className:"relative px-5 pt-4 pb-4 pl-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:345",className:"flex items-start justify-between gap-2 mb-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:346",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:347",className:"flex items-center gap-1 bg-amber-400/90 text-amber-900 text-[10px] font-black px-2 py-0.5 rounded-full w-fit mb-1.5",children:[e.jsx(le,{"data-loc":"client/src/pages/GpxLibrary.tsx:348",size:9,fill:"
12currentColor"}),"PREMIUM"]}),e.jsx("h3",{"data-loc":"client/src/pages/GpxLibrary.tsx:351",className:"text-white font-black text-base leading-tight line-clamp-2",style:{textShadow:"0 1px 3px rgba(0,0,0,0.5)"},children:t.title})]}),e.jsx(k,{"data-loc":"client/src/pages/GpxLibrary.tsx:353",size:18,className:"text-white/70 flex-shrink-0 mt-0.5"})]}),t.description&&e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:356",className:"text-white/85 text-xs line-clamp-1 mb-1.5",style:{textShadow:"0 1px 2px rgba(0,0,0,0.4)"},children:t.description}),t.region&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:359",className:"flex items-center gap-1 text-white/80 text-xs mb-1",children:[e.jsx(W,{"data-loc":"client/src/pages/GpxLibrary.tsx:360",size:10}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:361",children:t.region})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:364",className:"flex items-center gap-3 text-white/80 text-xs",children:[e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:365",className:"flex items-center gap-1",children:[e.jsx(H,{"data-loc":"client/src/pages/GpxLibrary.tsx:366",size:10}),e.jsx("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:367",className:"text-white",children:t.itemCount}),"개 루트"]}),t.totalDistanceKm>0&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:370",className:"flex items-center gap-1",children:[e.jsx(X,{"data-loc":"client/src/pages/GpxLibrary.tsx:371",size:10}),"열 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:372",className:"text-white",children:[Number(t.totalDistanceKm).toFixed(1),"km"]})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:379",className:"bg-card px-5 py-2.5 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:380",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:381",className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:e.jsx(E,{"data-loc":"client/src/pages/GpxLibrary.tsx:382",size:12,className:"text-muted-foreground"})}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:384",className:"text-xs font-bold text-foreground",children:o}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:385",className:`text-[10px] font-bold px-1.5 py-0.5 rounded-full ${J(i)} ${B(i)}`,children:g})]}),t.viewCount>0&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:390",className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(I,{"data-loc":"client/src/pages/GpxLibrary.tsx:391",size:10}),t.viewCount]})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:401",className:`rounded-2xl overflow-hidden cursor-pointer hover:shadow-md transition-all active:scale-[0.98] ${l?"ring-2 ring-amber-400":""}`,onClick:()=>r(t.id),style:{border:l?void 0:`2px solid ${n}22`},children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:407",className:"relative px-5 pt-5 pb-4",style:{background:`linear-gradient(135deg, ${n} 0%, ${n}cc 100%)`,minHeight:100},children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:415",className:"absolute left-0 top-0 bottom-0 w-3 flex flex-col justify-around py-2",children:[...Array(5)].map((c,d)=>e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:417",className:"w-3 h-1.5 rounded-r-full bg-white/20"},d))}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:420",className:"pl-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:421",className:"flex items-start justify-between gap-2 mb-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:422",className:"flex-1 min-w-0",children:[l&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:424",className:"flex items-center gap-1 bg-amber-400/90 text-amber-900 text-[10px] font-black px-2 py-0.5 rounded-full w-fit mb-1.5",children:[e.jsx(le,{"data-loc":"client/src/pages/GpxLibrary.tsx:425",size:9,fill:"currentColor"}),"PREMIUM"]}),e.jsx("h3",{"data-loc":"client/src/pages/GpxLibrary.tsx:429",className:"text-white font-black text-base leading-tight line-clamp-2",children:t.title})]}),e.jsx(k,{"data-loc":"client/src/pages/GpxLibrary.tsx:431",size:18,className:"text-white/60 flex-shrink-0 mt-0.5"})]}),t.description&&e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:434",className:"text-white/75 text-xs line-clamp-2 mb-2",children:t.description}),t.region&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:438",className:"flex items-center gap-1 text-white/70 text-xs mb-1",children:[e.jsx(W,{"data-loc":"client/src/pages/GpxLibrary.tsx:439",size:10}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:440",children:t.regi
12on})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:444",className:"flex items-center gap-3 text-white/80 text-xs",children:[e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:445",className:"flex items-center gap-1",children:[e.jsx(H,{"data-loc":"client/src/pages/GpxLibrary.tsx:446",size:10}),e.jsx("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:447",className:"text-white",children:t.itemCount}),"개 루트"]}),t.totalDistanceKm>0&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:450",className:"flex items-center gap-1",children:[e.jsx(X,{"data-loc":"client/src/pages/GpxLibrary.tsx:451",size:10}),"열 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:452",className:"text-white",children:[Number(t.totalDistanceKm).toFixed(1),"km"]})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:460",className:"bg-card px-5 py-3 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:461",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:462",className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:e.jsx(E,{"data-loc":"client/src/pages/GpxLibrary.tsx:463",size:12,className:"text-muted-foreground"})}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:465",className:"text-xs font-bold text-foreground",children:o}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:466",className:`text-[10px] font-bold px-1.5 py-0.5 rounded-full ${J(i)} ${B(i)}`,children:g})]}),t.viewCount>0&&e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:471",className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(I,{"data-loc":"client/src/pages/GpxLibrary.tsx:472",size:10}),t.viewCount]})]})]})}function Ae({open:t,onClose:r,onCreated:n}){const[o,i]=p.useState(""),[g,l]=p.useState(""),[a,c]=p.useState("#2d6a4f"),d=u.useUtils(),b=u.collection.create.useMutation({onSuccess:x=>{h.success("컬렉션이 만들어졌습니다!"),d.collection.getPublicList.invalidate(),d.collection.getMine.invalidate(),i(""),l(""),c("#2d6a4f"),n(x.id)},onError:()=>h.error("컬렉션 생성에 실패했습니다.")}),y=()=>{if(!o.trim()){h.error("제목을 입력해주세요.");return}b.mutate({title:o.trim(),description:g.trim()||void 0,coverColor:a,isPublic:!0})};return e.jsx(Le,{"data-loc":"client/src/pages/GpxLibrary.tsx:513",open:t,onOpenChange:x=>!x&&r(),children:e.jsxs(Ge,{"data-loc":"client/src/pages/GpxLibrary.tsx:514",className:"max-w-sm mx-auto",children:[e.jsx(ve,{"data-loc":"client/src/pages/GpxLibrary.tsx:515",children:e.jsxs(Ne,{"data-loc":"client/src/pages/GpxLibrary.tsx:516",className:"flex items-center gap-2",children:[e.jsx(U,{"data-loc":"client/src/pages/GpxLibrary.tsx:517",size:18,className:"text-green-600"}),"새 컬렉션 만들기"]})}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:521",className:"space-y-4 pt-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:522",children:[e.jsx("label",{"data-loc":"client/src/pages/GpxLibrary.tsx:523",className:"text-sm font-semibold text-foreground mb-1.5 block",children:"컬렉션 제목 *"}),e.jsx(F,{"data-loc":"client/src/pages/GpxLibrary.tsx:524",value:o,onChange:x=>i(x.target.value),placeholder:"예: 강원도 둘레길 모음",maxLength:128})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:531",children:[e.jsx("label",{"data-loc":"client/src/pages/GpxLibrary.tsx:532",className:"text-sm font-semibold text-foreground mb-1.5 block",children:"소개 (선택)"}),e.jsx("textarea",{"data-loc":"client/src/pages/GpxLibrary.tsx:533",className:"w-full border border-border rounded-lg px-3 py-2 text-sm bg-background text-foreground resize-none focus:outline-none focus:ring-2 focus:ring-green-500",value:g,onChange:x=>l(x.target.value),placeholder:"이 컬렉션에 대해 간단히 소개해주세요...",rows:3,maxLength:500})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:542",children:[e.jsxs("label",{"data-loc":"client/src/pages/GpxLibrary.tsx:543",className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-1.5",children:[e.jsx(ze,{"data-loc":"client/src/pages/GpxLibrary.tsx:544",size:14,className:"text-muted-foreground"}),"커버 색상"]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:547",className:"flex flex-wrap gap-2",children:De.map(x=>e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:549",type:"button",className:`w-8 h-8 rounded-lg transition-all ${a===x.value?"ring-2 ring-offset-2 ring-foreground scale-110":"hover:scale-105"}`,style:{backgroundColor:x.value},title:x.label,onClick:()=>c(x.value)},x.value))}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:560",className:"mt-3 rounded-xl overflow-hidden",style:{border:`2px solid ${a}33`},children:e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:561",className:"px-4 py-3 flex items-center gap-2",style:{background:`linear-gradient(135deg, ${a} 0%, ${a}cc 100%)`},children:[e.jsx(k,{"data-loc":"client/src/pages/GpxLibrary.tsx:562",size:14,className:"text-white/70"}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:563",className:"text-white font-bold text-sm truncate",children:o||"컬렉션 제목"})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:567",className:"flex gap-2 pt-1",children:[e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:568",className:"flex-1 py-2.5 rounded-xl border border-border text-sm font-semibold text-muted-foreground hover:bg-muted transition-colors",onClick:r,children:"취소"}),e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:572",className:"flex-1 py-2.5 rounded-xl bg-green-600 text-white text-sm font-bold hover:bg-green-700 transition-colors disabled:opacity-50",onClick:y,disabled:b.isPending||!o.trim(),children:b.isPending?"만드는 중...":"컬렉션 만들기"})]})]})]})})}const O="hant_gpx_library_cache",T="hant_my_shared_gpx_cache",K="hant_collections_cache",Re=300*1e3;function L(t){try{const r=localStorage.getItem(t);if(!r)return;const{data:n,ts:o}=JSON.parse(r);return Date.now()-o>Re?void 0:n}catch{return}}function at(){const[,t]=fe(),{isAuthenticated:r}=je(),[n,o]=p.useState(""),[i,g]=p.useState(""),[l,a]=p.useState("all"),[c,d]=p.useState(""),[b,y]=p.useState(""),[x,M]=p.useState(""),[G,ne]=p.useState(""),[S,D]=p.useState(null),[oe,P]=p.useState(!1),[j,Q]=p.useState("routes"),{data:z,isLoading:xe}=u.curator.getLibrary.useQuery({trailTag:void 0},{placeholderData:()=>L(O),staleTime:0}),{data:v,isLoading:de}=u.curator.getMyShared.useQuery(void 0,{enabled:r,placeholderData:()=>L(T),staleTime:0}),{data:f}=u.curator.getMyScore.useQuery(void 0,{enabled:r,staleTime:600*1e3}),{data:N,isLoading:Y}=u.collection.getPublicList.useQuery({limit:50,offset:0},{enabled:l==="collection",placeholderData:()=>L(K),staleTime:0}),{data:w,error:V}=u.curator.getSharedGpx.useQuery({id:S},{enabled:!!S});p.useEffect(()=>{S&&(w&&(w?.gpxPoints?Ie(w.gpxPoints,w.title||"루트"):h.error("GPX 데이터가 없습니다"),D(null)),V&&(h.error("다운로드 실패"),D(null)))},[w,V,S]);const _=s=>({id:s.id,userId:s.userId,title:s.title,comment:s.comment,showComment:s.showComment,distanceKm:String(s.distanceKm),totalAscent:s.totalAscent?String(s.totalAscent):null,maxElevation:s.maxElevation?String(s.maxElevation):null,minElevation:s.minElevation?String(s.minElevation):null,durationSeconds:s.durationSeconds??null,durationRange:s.durationRange??null,trailTag:s.trailTag,courseId:s.courseId,courseName:s.courseName,gpxPoints:null,followWalkCount:s.followWalkCount,viewCount:s.viewCount??0,region:s.region??null,photos:[],curator:s.nickname?{id:s.userId,nickname:s.nickname,level:s.curatorLevel??1,levelName:s.curatorLevelName??"새싹 큐레이터",totalScore:0}:null}),A=(z??[]).map(_),q=(v??[]).filter(s=>
12s.isActive===1&&s.collectionOnly!==1).map(_),Z=(v??[]).filter(s=>s.isActive===1&&s.collectionOnly===1).map(_),ee=(l==="all"?A:j==="routes"?q:Z).filter(s=>{const m=!n||s.title.includes(n)||(s.courseName??"").includes(n),R=!c||(s.region??"").includes(c);return m&&R}),pe=!!L(O),ge=!!L(T),te=l==="all"?xe&&!pe:de&&!ge,se=(N??[]).filter(s=>{const m=!b||(s.title??"").includes(b)||(s.description??"").includes(b),R=!G||(s.region??"").includes(G);return m&&R}),be=A.length,me=A.reduce((s,m)=>s+m.followWalkCount,0);N?.length,p.useEffect(()=>{z&&localStorage.setItem(O,JSON.stringify({data:z,ts:Date.now()}))},[z]),p.useEffect(()=>{v&&localStorage.setItem(T,JSON.stringify({data:v,ts:Date.now()}))},[v]),p.useEffect(()=>{N&&localStorage.setItem(K,JSON.stringify({data:N,ts:Date.now()}))},[N]);const ue=s=>{t(`/track?sharedGpxId=${s}`)},he=(s,m)=>{D(s)},C=u.useUtils(),ye=u.curator.unshareGpx.useMutation({onSuccess:()=>{h.success("공개가 철회되었습니다. 내 기록은 그대로 유지됩니다."),C.curator.getMyShared.invalidate(),C.curator.getLibrary.invalidate(),C.curator.getMyScore.invalidate(),C.collection.getPublicList.invalidate(),C.collection.getMine.invalidate()},onError:()=>h.error("철회 중 오류가 발생했습니다.")});return e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:744",className:"min-h-screen bg-background pb-20",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:746",className:"relative overflow-hidden",style:{minHeight:260},children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:747",className:"absolute inset-0",children:[e.jsx("img",{"data-loc":"client/src/pages/GpxLibrary.tsx:748",src:$e,alt:"트레일",className:"w-full h-full object-cover"}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:749",className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(5,25,12,0.55) 0%, rgba(8,35,18,0.60) 40%, rgba(5,25,12,0.92) 100%)"}})]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:753",className:"relative px-4 pt-4",children:e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:754",onClick:()=>t(-1),className:"w-9 h-9 rounded-full bg-white/20 flex items-center justify-center active:bg-white/30",children:e.jsx(we,{"data-loc":"client/src/pages/GpxLibrary.tsx:758",size:18,className:"text-white"})})}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:761",className:"relative px-4 pt-2 pb-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:762",className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:763",className:"h-px flex-1 bg-white/20"}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:764",className:"text-white/60 text-[10px] font-semibold tracking-widest uppercase",children:"Trail Curator"}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:765",className:"h-px flex-1 bg-white/20"})]}),e.jsx("h1",{"data-loc":"client/src/pages/GpxLibrary.tsx:767",className:"text-2xl font-black text-white mb-1 tracking-tight",children:"트레일 큐레이터"}),e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:768",className:"text-white/75 text-sm mb-4",children:"함께 걷는 길, 서로의 발자국을 따라"}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:769",className:"flex gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:770",className:"flex items-center gap-1.5 text-white/85 text-xs",children:[e.jsx(H,{"data-loc":"client/src/pages/GpxLibrary.tsx:771",size:12,className:"text-green-300"}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:772",children:["공개 루트 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:772",className:"text-white",children:[be,"개"]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:774",className:"w-px h-3 bg-white/30 self-center"}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:775",className:"flex items-center gap-1.5 text-white/85 text-xs",children:[e.jsx(I,{"data-loc":"client/src/pages/GpxLibrary.tsx:776",size:12,className:"text-green-300"}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:777",children:["따라걷기 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:777",className:"text-white",children:[me,"회"]})]})]}),f&&e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:781",className:"w-px h-3 bg-white/30 self-center"}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:782",className:"flex items-center gap-1 text-xs font-bold px-2 py-0.5 rounded-full bg-white/20 text-white",children:[e.jsx(Ce,{"data-loc":"client/src/pages/GpxLibrary.tsx:783",size:11}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:784",children:f.levelName})]})]})]})]})]}),r&&f&&e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:794",className:"mx-4 mt-4 bg-gradient-to-r from-green-600 to-emerald-700 rounded-2xl p-4 shadow-md",children:e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:795",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:796",className:"w-11 h-11 rounded-full bg-white/20 flex items-center justify-center",children:e.jsx(E,{"data-loc":"client/src/pages/GpxLibrary.tsx:797",size:20,className:"text-white"})}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:799",className:"flex-1",children:[e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:800",className:"flex items-center gap-2 mb-0.5",children:e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:801",className:"text-white font-bold text-sm",children:f.levelName})}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:803",className:"flex items-center gap-3 text-xs text-white/80",children:[e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:804",children:["총점 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:804",className:"text-white",children:[f.totalScore,"점"]})]}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:805",children:["공개 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:805",className:"text-white",children:[f.sharedCount,"개"]})]}),e.jsxs("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:806",children:["따라걷기 ",e.jsxs("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:806",className:"text-white",children:[f.totalFollowWalks,"회"]})]})]})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:814",className:"flex gap-2 px-4 mt-4",children:[e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:815",className:`flex-1 py-2 rounded-xl text-sm font-semibold transition-colors ${l==="all"?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>a("all"),children:"공유 루트"}),e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:821",className:`flex-1 py-2 rounded-xl text-sm font-semibold transition-colors flex items-center justify-center gap-1 ${l==="collection"?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>a("collection"),children:[e.jsx(k,{"data-loc":"client/src/pages/GpxLibrary.tsx:825",size:14}),"컬렉션"]}),r&&e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:829",className:`flex-1 py-2 rounded-xl text-sm font-semibold transition-colors ${l==="mine"?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>a("mine"),children:"내가 공개한"})]}),l==="collection"&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:840",className:"px-4 mt-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:842",className:"space-y-2 mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:843",className:"flex gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:844",className:"relative flex-1",children:[e.jsx(re,{"data-loc":"client/src/pages/GpxLibrary.tsx:845",size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(F,{"data-loc":"client/src/pages/GpxLibrary.tsx:846",value:x,onChange:s=>M(s.target.value),onKeyDown:s=>s.key==="Enter"&&y(x),placeholder:"콘렉션 제목, 설명으로 검색...",className:"pl-9"})]}),e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:854",className:"px-4 py-2 rounded-xl bg-green-600 text-white text-sm font-semibold flex-shrink-0",onClick:()=>y(x),children:"검색"})]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:859",className:"flex gap-2 overflow-x-auto pb-1 scrollbar-none",children:ie.map(s=>e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:861",className:`flex-shrink-0 px-3 py-1.5 rounded-full text-xs font-semibold transition-colors ${G===s.value?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>
12ne(G===s.value?"":s.value),children:s.label},s.value))})]}),r&&e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:874",className:"w-full mb-4 py-3 rounded-2xl border-2 border-dashed border-green-400 text-green-600 font-bold text-sm flex items-center justify-center gap-2 hover:bg-green-50 dark:hover:bg-green-950/30 transition-colors",onClick:()=>P(!0),children:[e.jsx(ke,{"data-loc":"client/src/pages/GpxLibrary.tsx:878",size:18}),"새 콘렉션 만들기"]}),Y&&!L(K)&&e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:884",className:"text-center py-12 text-muted-foreground text-sm",children:"불러오는 중..."}),!Y&&se.length===0&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:888",className:"text-center py-16",children:[e.jsx(U,{"data-loc":"client/src/pages/GpxLibrary.tsx:889",size:40,className:"mx-auto text-muted-foreground/40 mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:890",className:"text-muted-foreground text-sm",children:"조건에 맞는 콘렉션이 없습니다."}),r&&!b&&!G&&e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:892",className:"text-muted-foreground/70 text-xs mt-1",children:"첫 번째 콘렉션을 만들어 보세요!"})]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:897",className:"space-y-3",children:se.map(s=>e.jsx(_e,{"data-loc":"client/src/pages/GpxLibrary.tsx:899",col:s,onOpen:m=>t(`/collection/${m}`)},s.id))}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:908",className:"mt-8 mb-4 rounded-2xl border border-border bg-muted/30 p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:909",className:"flex items-center gap-2 mb-2",children:[e.jsx(U,{"data-loc":"client/src/pages/GpxLibrary.tsx:910",size:15,className:"text-green-600 flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:911",className:"text-sm font-bold text-foreground",children:"컬렉션이란?"})]}),e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:913",className:"text-xs text-muted-foreground leading-relaxed mb-3",children:"내가 직접 걸은 루트들을 테마별로 묶어 소개하는 공간입니다. “설악산 능선 3일 코스”, “서울 근교 당일 산행 5선”처럼 나만의 큐레이션으로 다른 사람들에게 길을 안내해 보세요."}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:918",className:"border-t border-border pt-3",children:[e.jsx("p",{"data-loc":"client/src/pages/GpxLibrary.tsx:919",className:"text-xs font-semibold text-foreground mb-1.5",children:"만드는 방법"}),e.jsxs("ol",{"data-loc":"client/src/pages/GpxLibrary.tsx:920",className:"text-xs text-muted-foreground space-y-1 leading-relaxed",children:[e.jsxs("li",{"data-loc":"client/src/pages/GpxLibrary.tsx:921",children:[e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:921",className:"text-green-600 font-bold",children:"①"})," 위 ",e.jsx("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:921",className:"text-foreground",children:"새 콜렉션 만들기"})," 버튼으로 제목·설명·커버 색상을 설정합니다."]}),e.jsxs("li",{"data-loc":"client/src/pages/GpxLibrary.tsx:922",children:[e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:922",className:"text-green-600 font-bold",children:"②"})," 콜렉션 상세에서 ",e.jsx("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:922",className:"text-foreground",children:"루트 추가"}),"를 누르면 내 걷기 기록 목록이 표시됩니다."]}),e.jsxs("li",{"data-loc":"client/src/pages/GpxLibrary.tsx:923",children:[e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:923",className:"text-green-600 font-bold",children:"③"})," 기록을 선택하면 콜렉션에 추가되며 ",e.jsx("strong",{"data-loc":"client/src/pages/GpxLibrary.tsx:923",className:"text-foreground",children:"공유 루트에 자동 등록"}),"됩니다. (이미 공유 중인 기록은 그대로 연결)"]}),e.jsxs("li",{"data-loc":"client/src/pages/GpxLibrary.tsx:924",children:[e.jsx("span",{"data-loc":"client/src/pages/GpxLibrary.tsx:924",className:"text-green-600 font-bold",children:"④"})," 완성된 콜렉션은 모든 사람에게 공개되어 함께 따라걸을 수 있습니다."]})]})]})]})]}),l!=="collection"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:935",className:"px-4 mt-3 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:937",className:"flex gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:938",className:"relative flex-1",children:[e.jsx(re,{"data-loc":"client/src/pages/GpxLibrary.tsx:939",size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(F,{"data-loc":"client/src/pages/GpxLibrary.tsx:940",value:i,onChange:s=>g(s.target.value),onKeyDown:s=>s.key==="Enter"&&o(i),placeholder:"루트 제목, 구간명으로 검색...",className:"pl-9"})]}),e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:948",className:"px-4 py-2 rounded-xl bg-green-600 text-white text-sm font-semibold flex-shrink-0",onClick:()=>o(i),children:"검색"})]}),e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:954",className:"flex gap-2 overflow-x-auto pb-1 scrollbar-none",children:ie.map(s=>e.jsx("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:956",className:`flex-shrink-0 px-3 py-1.5 rounded-full text-xs font-semibold transition-colors ${c===s.value?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>
12d(c===s.value?"":s.value),children:s.label},s.value))})]}),l==="mine"&&e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:969",className:"px-4 mt-3 flex gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:970",className:`flex-1 py-2 rounded-xl text-sm font-semibold transition-colors ${j==="routes"?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>Q("routes"),children:["공유 루트 (",q.length,")"]}),e.jsxs("button",{"data-loc":"client/src/pages/GpxLibrary.tsx:976",className:`flex-1 py-2 rounded-xl text-sm font-semibold transition-colors ${j==="collections"?"bg-green-600 text-white":"bg-muted text-muted-foreground"}`,onClick:()=>Q("collections"),children:["컬렉션 루트 (",Z.length,")"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:986",className:"px-4 mt-4 space-y-3",children:[te&&e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:988",className:"text-center py-12 text-muted-foreground text-sm",children:"불러오는 중..."}),!te&&ee.length===0&&e.jsx("div",{"data-loc":"client/src/pages/GpxLibrary.tsx:991",className:"text-center py-12 text-muted-foreground text-sm whitespace-pre-line",children:l==="mine"&&j==="routes"?`아직 공개한 루트가 없습니다.
13기록 탭에서 GPX를 공개해 보세요!`:l==="mine"&&j==="collections"?"콜렉션에 추가한 루트가 없습니다.":"검색 결과가 없습니다."}),ee.map(s=>e.jsx(Pe,{"data-loc":"client/src/pages/GpxLibrary.tsx:998",item:s,isAuthenticated:r,onFollow:ue,onDownload:he,isFollowPending:!1,isMineTab:l==="mine",onUnshare:l==="mine"&&j==="routes"?m=>{confirm("공개를 철회하시겠습니까? 라이브러리에서 삭제되지만 내 기록은 유지됩니다.")&&ye.mutate({sharedGpxId:m})}:void 0},s.id))]})]}),e.jsx(Ae,{"data-loc":"client/src/pages/GpxLibrary.tsx:1018",open:oe,onClose:()=>P(!1),onCreated:s=>{P(!1),t(`/collection/${s}`)}})]})}export{at 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.