1"use strict";(globalThis.webpackChunkdawarich_app=globalThis.webpackChunkdawarich_app||[]).push([[2181],{774(e,t,o){o.d(t,{A:()=>y});var r=o(96540);const n="converter_CI3l",a="uploadSection_boI0",l="dropZone_mRVK",i="dragActive_fkJq",s="hasFile_n5hO",c="uploadIcon_GD69",m="dropText_vIFO",p="fileInput_JQ7W",d="fileInfo_jrul",h="fileIcon_t5TV",g="fileName_St9V",f="fileSize_X_uE",u="clearButton_Qfzi",v="convertButton_s07C",x="spinner_QerZ",b="spinnerCircle_kmir";var k=o(74848);function y({fromFormat:e,toFormat:t,onConvert:o,isConverting:y=!1}){const[j,S]=(0,r.useState)(null),[G,M]=(0,r.useState)(!1),C=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?M(!0):"dragleave"===e.type&&M(!1)},[]),P=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),M(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&N(e.dataTransfer.files[0])},[]),w=(0,r.useCallback)(e=>{e.preventDefault(),e.target.files&&e.target.files[0]&&N(e.target.files[0])},[]),N=e=>{S(e)};return(0,k.jsx)("div",{className:n,children:(0,k.jsxs)("div",{className:a,children:[(0,k.jsx)("div",{className:`${l} ${G?i:""} ${j?s:""}`,onDragEnter:C,onDragLeave:C,onDragOver:C,onDrop:P,children:j?(0,k.jsxs)("div",{className:d,children:[(0,k.jsx)("svg",{className:h,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,k.jsxs)("div",{children:[(0,k.jsx)("p",{className:g,children:j.name}),(0,k.jsxs)("p",{className:f,children:[(j.size/1024).toFixed(2)," KB"]})]}),(0,k.jsx)("button",{onClick:()=>{S(null)},className:u,type:"button",children:(0,k.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("svg",{className:c,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),(0,k.jsxs)("p",{className:m,children:["Drag and drop your ",e," file here, or click to browse"]}),(0,k.jsx)("input",{"aria-label":"Choose files to process",type:"file",className:p,accept:{GPX:".gpx",GeoJSON:".geojson,.json",KML:".kml",KMZ:".kmz",FIT:".fit",TCX:".tcx"}[e],onChange:w})]})}),j&&(0,k.jsx)("button",{onClick:()=>{j&&o&&o(j)},className:v,disabled:y,children:y?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("svg",{className:x,viewBox:"0 0 24 24",children:(0,k.jsx)("circle",{className:b,cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"})}),"Converting..."]}):(0,k.jsxs)(k.Fragment,{children:["Convert to ",t,(0,k.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,k.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})})]})})}},3616(e,t,o){o.d(t,{A:()=>g});o(96540);const r="wrapper_EAMR",n="container_kpj0",a="pills_ica5",l="pill_ZeQE",i="pillValue_ubLw",s="pillLabel_de_w",c="headline_In1q",m="body_XuAA",p="button_Olhu";var d=o(74848);function h(e){return`https://my.dawarich.app/users/sign_up?utm_source=tool&utm_medium=personalized-cta&utm_campaign=${e}`}function g({toolName:e,headline:t,stats:o}){return(0,d.jsx)("div",{className:r,children:(0,d.jsxs)("div",{className:n,children:[o&&o.length>0&&(0,d.jsx)("div",{className:a,children:o.map((e,t)=>(0,d.jsxs)("span",{className:l,children:[(0,d.jsx)("span",{className:i,children:e.value}),(0,d.jsx)("span",{className:s,children:e.label})]},t))}),(0,d.jsx)("h3",{className:c,dangerouslySetInnerHTML:{__html:t}}),(0,d.jsx)("p",{className:m,children:"Self-hosted or cloud. Cancel anytime."}),(0,d.jsx)("a",{href:h(e),className:p,target:"_blank",rel:"noopener noreferrer",children:"Start Your Free Trial"})]})})}},46672(e,t,o){o.d(t,{A:()=>d});o(96540);const r={"gpx-to-kml":[{href:"/tools/kml-to-gpx/",label:"KML to GPX",note:"Reverse direction"},{href:"/tools/gpx-to-geojson/",label:"GPX to GeoJSON",note:"Same source, web-mapping target"},{href:"/tools/gpx-merger/",label:"GPX Merger",note:"Combine multiple GPX files first"}],"kml-to-gpx":[{href:"/tools/gpx-to-kml/",label:"GPX to KML",note:"Reverse direction"},{href:"/tools/kml-to-geojson/",label:"KML to GeoJSON",note:"Same source, web-mapping target"},{href:"/tools/kmz-to-gpx/",label:"KMZ to GPX",note:"Compressed KML version"}],"gpx-to-geojson":[{href:"/tools/geojson-to-gpx/",label:"GeoJSON to GPX",note:"Reverse direction"},{href:"/tools/gpx-to-kml/",label:"GPX to KML",note:"Same source, Google Earth target"},{href:"/interactive-map/",label:"Interactive Map",note:"Visualize GeoJSON in Dawarich"}],"geojson-to-gpx":[{href:"/tools/gpx-to-geojson/",label:"GPX to GeoJSON",note:"Reverse direction"},{href:"/tools/geojson-to-kml/",label:"GeoJSON to KML",note:"Same source, Google Earth target"},{href:"/tools/geojson-to-kmz/",label:"GeoJSON to KMZ",note:"Compressed Google Earth format"}],"geojson-to-kml":[{href:"/tools/kml-to-geojson/",label:"KML to GeoJSON",note:"Reverse direction"},{href:"/tools/geojson-to-gpx/",label:"GeoJSON to GPX",note:"Same source, GPS-device target"},{href:"/tools/geojson-to-kmz/",label:"GeoJSON to KMZ",note:"Compressed Google Earth format"}],"kml-to-geojson":[{href:"/tools/geojson-to-kml/",label:"GeoJSON to KML",note:"Reverse direction"},{href:"/tools/kml-to-gpx/",label:"KML to GPX",note:"Same source, GPS-device target"},{href:"/tools/kmz-to-geojson/",label:"KMZ to GeoJSON",note:"Compressed KML version"}
1],"gpx-to-kmz":[{href:"/tools/kmz-to-gpx/",label:"KMZ to GPX",note:"Reverse direction"},{href:"/tools/gpx-to-kml/",label:"GPX to KML",note:"Uncompressed equivalent"},{href:"/tools/gpx-merger/",label:"GPX Merger",note:"Combine GPX files first"}],"kmz-to-gpx":[{href:"/tools/gpx-to-kmz/",label:"GPX to KMZ",note:"Reverse direction"},{href:"/tools/kml-to-gpx/",label:"KML to GPX",note:"Uncompressed equivalent"},{href:"/tools/kmz-to-kml/",label:"KMZ to KML",note:"Decompress for editing"}],"kml-to-kmz":[{href:"/tools/kmz-to-kml/",label:"KMZ to KML",note:"Reverse direction (decompress)"},{href:"/tools/kml-to-gpx/",label:"KML to GPX",note:"Same source, GPS-device target"},{href:"/tools/kml-to-geojson/",label:"KML to GeoJSON",note:"Same source, web-mapping target"}],"kmz-to-kml":[{href:"/tools/kml-to-kmz/",label:"KML to KMZ",note:"Reverse direction (compress)"},{href:"/tools/kmz-to-gpx/",label:"KMZ to GPX",note:"Same source, GPS-device target"},{href:"/tools/kmz-to-geojson/",label:"KMZ to GeoJSON",note:"Same source, web-mapping target"}],"kmz-to-geojson":[{href:"/tools/geojson-to-kmz/",label:"GeoJSON to KMZ",note:"Reverse direction"},{href:"/tools/kml-to-geojson/",label:"KML to GeoJSON",note:"Uncompressed equivalent"},{href:"/tools/kmz-to-kml/",label:"KMZ to KML",note:"Decompress for editing"}],"geojson-to-kmz":[{href:"/tools/kmz-to-geojson/",label:"KMZ to GeoJSON",note:"Reverse direction"},{href:"/tools/geojson-to-kml/",label:"GeoJSON to KML",note:"Uncompressed equivalent"},{href:"/tools/geojson-to-gpx/",label:"GeoJSON to GPX",note:"Same source, GPS-device target"}],"fit-to-gpx":[{href:"/tools/fit-to-kml/",label:"FIT to KML",note:"Same source, Google Earth target"},{href:"/tools/fit-to-geojson/",label:"FIT to GeoJSON",note:"Same source, web-mapping target"},{href:"/docs/comparisons/vs-strava/",label:"Dawarich vs Strava",note:"Where to keep your activities"}],"fit-to-kml":[{href:"/tools/fit-to-gpx/",label:"FIT to GPX",note:"Most-compatible GPS format"},{href:"/tools/fit-to-geojson/",label:"FIT to GeoJSON",note:"Web-mapping target"},{href:"/tools/heatmap-generator/",label:"Heatmap Generator",note:"Visualize FIT activities"}],"fit-to-geojson":[{href:"/tools/fit-to-gpx/",label:"FIT to GPX",note:"Most-compatible GPS format"},{href:"/tools/fit-to-kml/",label:"FIT to KML",note:"Google Earth target"},{href:"/tools/heatmap-generator/",label:"Heatmap Generator",note:"Visualize FIT activities"}],"tcx-to-gpx":[{href:"/tools/tcx-to-kml/",label:"TCX to KML",note:"Same source, Google Earth target"},{href:"/tools/tcx-to-geojson/",label:"TCX to GeoJSON",note:"Web-mapping target"},{href:"/tools/fit-to-gpx/",label:"FIT to GPX",note:"Newer Garmin format"}],"tcx-to-kml":[{href:"/tools/tcx-to-gpx/",label:"TCX to GPX",note:"Most-compatible GPS format"},{href:"/tools/tcx-to-geojson/",label:"TCX to GeoJSON",note:"Web-mapping target"},{href:"/tools/heatmap-generator/",label:"Heatmap Generator",note:"Visualize TCX activities"}],"tcx-to-geojson":[{href:"/tools/tcx-to-gpx/",label:"TCX to GPX",note:"Most-compatible GPS format"},{href:"/tools/tcx-to-kml/",label:"TCX to KML",note:"Google Earth target"},{href:"/tools/fit-to-geojson/",label:"FIT to GeoJSON",note:"Newer Garmin format"}],"google-timeline-converter":[{href:"/tools/route-video-maker/",label:"Route Video Maker",note:"Turn your Timeline into a travel video"},{href:"/tools/google-timeline-splitter/",label:"Timeline Splitter",note:"Split a giant Takeout export"},{href:"/tools/timeline-merger/",label:"Timeline Merger",note:"Combine multiple exports"},{href:"/blog/migrating-from-google-location-history-to-dawarich/",label:"Migration guide",note:"Step-by-step move to Dawarich"}],"google-timeline-splitter":[{href:"/tools/google-timeline-converter/",label:"Timeline Converter",note:"Convert split files to GPX/KML/CSV"},{href:"/tools/timeline-format-detector/",label:"Format Detector",note:"Identify what kind of export you have"},{href:"/blog/whats-inside-your-google-timeline-export/",label:"What's in a Timeline export",note:"Understand the formats"}],"timeline-merger":[{href:"/tools/google-timeline-converter/",label:"Timeline Converter",note:"Convert merged file to GPX/KML/CSV"},{href:"/tools/timeline-statistics/",label:"Timeline Statistics",note:"Analyze your merged history"},{href:"/tools/google-timeline-splitter/",label:"Timeline Splitter",note:"Reverse direction"}],"timeline-format-detector":[{href:"/tools/google-timeline-converter/",label:"Timeline Converter",note:"Convert once you know the format"},{href:"/tools/google-timeline-splitter/",label:"Timeline Splitter",note:"Split large exports"},{href:"/blog/whats-inside-your-google-timeline-export/",label:"What's in a Timeline export",note:"Format reference"}],"timeline-visualizer":[{href:"/tools/route-video-maker/",label:"Route Video Maker",note:"Turn the same file into a video"},{href:"/interactive-map/",label:"Interactive Map",note:"Full visualization in Dawarich"},{href:"/tools/map-poster-maker/",label:"Map Poster Maker",note:"Turn the same file into wall art"},{href:"/tools/timeline-statistics/",label:"Timeline Statistics",note:"Numbers behind the map"}],"timeline-statistics":[{href:"/tools/timeline-mileage-calculator/",label:"Mileage Calculator",note:"Distance-only quick stat"},{href:"/tools/timeline-visualizer/",label:"Timeline Visualizer",note:"See the same data on a map"},{href:"/statistics/",label:"Dawarich Statistics",note:"Persistent dashboards"}],"timeline-mileage-calculator":[{href:"/tools/timeline-statistics/",label:"Timeline Statistics",note:"Full stats breakdown"},{href:"/tools/timeline-visualizer/",label:"Timeline Visualizer",note:"Map view of the same data"},{href:"/statistics/",label:"Dawarich Statistics",note:"Track mileage over time"}],"gpx-merger":[{href:"/tools/gps-file-splitter/",label:"GPS File Splitter",note:"Reverse direction"},{href:"/tools/map-poster-maker/",label:"Map Poster Maker",note:"Print the merged track"},{href:"/import-export/",label:"Import & Export",note:"Bring merged data into Dawarich"}],"gps-file-splitter":[{href:"/tools/gpx-merger/",label:"GPX Merger",note:"Reverse direction"},{href:"/tools/google-timeline-splitter/",label:"Timeline Splitter",note:"Split Google Takeout exports"},{href:"/tools/timeline-format-detector/",label:"Format Detector",note:"Identify a file before splitting"}],"heatmap-generator":[{href:"/interactive-map/",label:"Interactive Map",note:"Heatmap layer + tracks + visits"},{href:"/tools/timeline-visualizer/",label:"Timeline Visualizer",note:"Per-track view"},{href:"/tools/map-poster-maker/",label:"Map Poster Maker",note:"Same file, printable poster"}],"map-poster-maker":[{href:"/poster-studio/",label:"Poster Studio in Dawarich",note:"Print any month of your history"},{href:"/tools/route-video-maker/",label:"Route Video Maker",note:"Same file, animated video"},{href:"/tools/heatmap-generator/",label:"Heatmap Generator",note:"Density view of the same file"},{href:"/tools/gpx-merger/",label:"GPX Merger",note:"Combine tracks into one poster"}],"route-video-maker":[{href:"/tools/map-poster-maker/",label:"Map Poster Maker",note:"Same file, printable poster"},{href:"/tools/heatmap-generator/",label:"Heatmap Generator",note:"Density view of the same file"},{href:"/tools/gpx-merger/",label:"GPX Merger",note:"Combine tracks into one video"}],"photo-geotagging":[{href:"/integrations/",label:"Photo Integrations",note:"Immich & PhotoPrism geodata import"},{href:"/docs/features/photos/",label:"Photos in Dawarich",note:"How photos work in the app"},{href:"/docs/tools/phototagger/",label:"PhotoTagger CLI",note:"Bulk geotagging on the command line"}]},n="container_ddlj",a="heading_g38U",l="list_s9U9",i="item_gOl4",s="link_lmvz",c="label_ECgr",m="note_ldWT";var p=o(74848);function d({slug:e}){const t=r[e];return t&&0!==t.length?(0,p.jsxs)("nav",{"aria-label":"Related tools and pages",className:n,children:[(0,p.jsx)("h2",{className:a,children:"Related tools & pages"}),(0,p.jsx)("ul",{className:l,children:t.map(e=>(0,p.jsx)("li",{className:i,children:(0,p.jsxs)("a",{href:e.href,className:s,children:[(0,p.jsx)("span",{className:c,children:e.label}),e.note&&(0,p.jsx)("span",{className:m,children:e.note})]})},e.href))})]}):null}},98036(e,t,o){o.r(t),o.d(t,{default:()=>u});var r=o(96540),n=o(54644),a=o(5260),l=o(774),i=o(21448),s=o(63091),c=o(3616),m=o(46672),p=o(9172),d=o(74848);const h="Free KML to GPX Converter - Convert Google Earth Files Online",g="Convert KML files to GPX format instantly. Free, privacy-first online converter for geographic data. Works entirely in your browser - n
1o upload required.",f="https://dawarich.app/tools/kml-to-gpx/";function u(){const[e,t]=(0,r.useState)(!1),[o,u]=(0,r.useState)(!1),v=(0,r.useCallback)(async e=>{t(!0),u(!1);try{const t=await e.text(),o=(0,i._4)(t),r=(0,s.n1)(o,{name:e.name.replace(/\.kml$/i,"")}),n=new Blob([r],{type:"application/gpx+xml"}),a=URL.createObjectURL(n),l=document.createElement("a");l.href=a,l.download=e.name.replace(/\.kml$/i,".gpx"),document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a),u(!0)}catch(o){console.error("Conversion error:",o),alert("Error converting file. Please ensure it is a valid KML file.")}finally{t(!1)}},[]);return(0,d.jsxs)(n.A,{title:h,description:g,children:[(0,d.jsxs)(a.A,{children:[(0,d.jsx)("meta",{name:"title",content:h}),(0,d.jsx)("meta",{name:"description",content:g}),(0,d.jsx)("meta",{name:"keywords",content:"KML to GPX, KML converter, GPX converter, Google Earth to GPS, geographic data converter"}),(0,d.jsx)("link",{rel:"canonical",href:f}),(0,d.jsx)("meta",{property:"og:type",content:"website"}),(0,d.jsx)("meta",{property:"og:url",content:f}),(0,d.jsx)("meta",{property:"og:title",content:h}),(0,d.jsx)("meta",{property:"og:description",content:g}),(0,d.jsx)("meta",{property:"og:image",content:"https://dawarich.app/img/meta-image.png"}),(0,d.jsx)("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"WebApplication",name:"KML to GPX Converter",url:f,description:g,applicationCategory:"UtilityApplication",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"}})})]}),(0,d.jsxs)("main",{children:[(0,d.jsx)("div",{className:p.A.container,children:(0,d.jsxs)("div",{className:p.A.contentWrapper,children:[(0,d.jsxs)("div",{className:p.A.header,children:[(0,d.jsx)("h1",{children:"KML to GPX Converter"}),(0,d.jsx)("p",{children:"Convert your KML files to GPX format instantly. All processing happens in your browser - your data never leaves your device."})]}),(0,d.jsxs)("div",{className:p.A.mainContent,children:[(0,d.jsxs)("div",{className:p.A.converterSection,children:[(0,d.jsx)(l.A,{fromFormat:"KML",toFormat:"GPX",onConvert:v,isConverting:e}),o&&(0,d.jsxs)("div",{className:p.A.successMessage,children:[(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,d.jsx)("p",{children:"File converted successfully! Your download should start automatically."})]})]}),(0,d.jsxs)("div",{className:p.A.infoSection,children:[(0,d.jsxs)("div",{className:p.A.infoCard,children:[(0,d.jsx)("h2",{children:"About KML Format"}),(0,d.jsx)("p",{children:"KML (Keyhole Markup Language) is an XML format used by Google Earth and Google Maps for displaying geographic data."})]}),(0,d.jsxs)("div",{className:p.A.infoCard,children:[(0,d.jsx)("h2",{children:"About GPX Format"}),(0,d.jsx)("p",{children:"GPX (GPS Exchange Format) is the standard format for GPS data, supported by most GPS devices and fitness trackers."})]}),(0,d.jsxs)("div",{className:p.A.infoCard,children:[(0,d.jsx)("h2",{children:"Why Convert KML to GPX?"}),(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:"Import Google Earth data into GPS devices"}),(0,d.jsx)("li",{children:"Use with fitness tracking apps (Strava, Garmin Connect)"}),(0,d.jsx)("li",{children:"Compatible with hiking and navigation apps"}),(0,d.jsx)("li",{children:"Standard format for outdoor activities"})]})]}),(0,d.jsxs)("div",{className:p.A.privacyCard,children:[(0,d.jsx)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("strong",{children:"Privacy First"}),(0,d.jsx)("p",{children:"All conversion happens entirely in your browser. Your data never leaves your device."})]})]})]})]}),(0,d.jsx)(c.A,{toolName:"kml-to-gpx",headline:"Your file is converted. Dawarich handles all formats automatically \u2014 import from Google, Strava, Garmin, and more. No manual conversions needed."})]})}),(0,d.jsx)(m.A,{slug:"kml-to-gpx"})]})]})}},63091(e,t,o){o.d(t,{Jx:()=>l,kd:()=>i,mH:()=>c,mT:()=>s,n1:()=>a});var r=o(71710),n=o.n(r);function a(e,t={}){const{name:o="Converted Track",description:r="Converted from other format"}=t;let n=`<?xml version="1.0" encoding="UTF-8"?>\n<gpx version="1.1" creator="Dawarich Converter" xmlns="http://www.topografix.com/GPX/1/1">\n <metadata>\n <name>${m(o)}</name>\n <desc>${m(r)}</desc>\n </metadata>`;const a=e.filter(e=>"waypoint"===e.type||"placemark"===e.type||"point"===e.type),l=e.filter(e=>"trackpoint"===e.type||"linepoint"===e.type);
1return a.forEach(e=>{n+=`\n <wpt lat="${e.lat}" lon="${e.lon}">`,e.name&&(n+=`\n <name>${m(e.name)}</name>`),void 0!==e.elevation&&(n+=`\n <ele>${e.elevation}</ele>`),e.time&&(n+=`\n <time>${e.time}</time>`),n+="\n </wpt>"}),l.length>0&&(n+=`\n <trk>\n <name>${m(o)}</name>\n <trkseg>`,l.forEach(e=>{n+=`\n <trkpt lat="${e.lat}" lon="${e.lon}">`,void 0!==e.elevation&&(n+=`\n <ele>${e.elevation}</ele>`),e.time&&(n+=`\n <time>${e.time}</time>`),n+="\n </trkpt>"}),n+="\n </trkseg>\n </trk>"),n+="\n</gpx>",n}function l(e){const t=[],o=e.filter(e=>"trackpoint"===e.type||"linepoint"===e.type);o.length>0&&t.push({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:o.map(e=>[e.lon,e.lat,e.elevation].filter(e=>void 0!==e))}});return e.filter(e=>"waypoint"===e.type||"placemark"===e.type||"point"===e.type).forEach(e=>{t.push({type:"Feature",properties:{name:e.name,description:e.description,...e.properties},geometry:{type:"Point",coordinates:[e.lon,e.lat,e.elevation].filter(e=>void 0!==e)}})}),JSON.stringify({type:"FeatureCollection",features:t},null,2)}function i(e,t={}){const{name:o="Converted Data",description:r="Converted from other format"}=t;let n=`<?xml version="1.0" encoding="UTF-8"?>\n<kml xmlns="http://www.opengis.net/kml/2.2">\n <Document>\n <name>${m(o)}</name>\n <description>${m(r)}</description>`;e.filter(e=>"waypoint"===e.type||"placemark"===e.type||"point"===e.type).forEach(e=>{n+=`\n <Placemark>\n <name>${m(e.name||"Point")}</name>`,e.description&&(n+=`\n <description>${m(e.description)}</description>`),n+=`\n <Point>\n <coordinates>${e.lon},${e.lat}${void 0!==e.elevation?","+e.elevation:""}</coordinates>\n </Point>\n </Placemark>`});const a=e.filter(e=>"trackpoint"===e.type||"linepoint"===e.type);return a.length>0&&(n+="\n <Placemark>\n <name>Track</name>\n <LineString>\n <coordinates>",a.forEach((e,t)=>{n+=`${t>0?" ":""}${e.lon},${e.lat}${void 0!==e.elevation?","+e.elevation:""}`}),n+="</coordinates>\n </LineString>\n </Placemark>"),n+="\n </Document>\n</kml>",n}async function s(e,t={}){const o=i(e,t),r=new(n());return r.file("doc.kml",o),await r.generateAsync({type:"blob"})}async function c(e){const t=(await n().loadAsync(e)).file(/\.kml$/i)[0];if(!t)throw new Error("No KML file found in KMZ archive");return await t.async("string")}function m(e){return e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}},21448(e,t,o){function r(e){const t=(new DOMParser).parseFromString(e,"text/xml"),o=[];t.querySelectorAll("wpt").forEach(e=>{const t=parseFloat(e.getAttribute("lat")),r=parseFloat(e.getAttribute("lon")),n=e.querySelector("name")?.textContent||"",a=e.querySelector("ele")?.textContent||"",l=e.querySelector("time")?.textContent||"";o.push({type:"waypoint",lat:t,lon:r,name:n,elevation:a?parseFloat(a):void 0,time:l||void 0})});t.querySelectorAll("trkpt").forEach(e=>{const t=parseFloat(e.getAttribute("lat")),r=parseFloat(e.getAttribute("lon")),n=e.querySelector("ele")?.textContent||"",a=e.querySelector("time")?.textContent||"";o.push({type:"trackpoint",lat:t,lon:r,elevation:n?parseFloat(n):void 0,time:a||void 0})});return t.querySelectorAll("rtept").forEach(e=>{const t=parseFloat(e.getAttribute("lat")),r=parseFloat(e.getAttribute("lon")),n=e.querySelector("name")?.textContent||"",a=e.querySelector("ele")?.textContent||"";o.push({type:"routepoint",lat:t,lon:r,name:n,elevation:a?parseFloat(a):void 0})}),o}function n(e){const t=JSON.parse(e),o=[],r=e=>{if("Point"===e.geometry.type){const[t,r,n]=e.geometry.coordinates;o.push({type:"point",lat:r,lon:t,elevation:n,properties:e.properties||{}})}else"LineString"===e.geometry.type&&e.geometry.coordinates.forEach(t=>{const[r,n,a]=t;o.push({type:"linepoint",lat:n,lon:r,elevation:a,properties:e.properties||{}})})};return"FeatureCollection"===t.type?t.features.forEach(r):"Feature"===t.type&&r(t),o}function a(e){const t=(new DOMParser).parseFromString(e,"text/xml"),o=[];
1return t.querySelectorAll("Placemark").forEach(e=>{const t=e.querySelector("name")?.textContent||"",r=e.querySelector("description")?.textContent||"",n=e.querySelector("Point coordinates");if(n){const e=n.textContent.trim().split(","),a=parseFloat(e[0]),l=parseFloat(e[1]),i=e[2]?parseFloat(e[2]):void 0;o.push({type:"placemark",lat:l,lon:a,elevation:i,name:t,description:r})}const a=e.querySelector("LineString coordinates");if(a){a.textContent.trim().split(/\s+/).forEach(e=>{const n=e.split(","),a=parseFloat(n[0]),l=parseFloat(n[1]),i=n[2]?parseFloat(n[2]):void 0;o.push({type:"linepoint",lat:l,lon:a,elevation:i,name:t,description:r})})}}),o}o.d(t,{R8:()=>r,_4:()=>a,l3:()=>n})},9172(e,t,o){o.d(t,{A:()=>r});const r={container:"container_YUdL",contentWrapper:"contentWrapper_rpvC",header:"header_XOJD",mainContent:"mainContent_SJlR",converterSection:"converterSection_p_t7",infoSection:"infoSection_PaqN",infoCard:"infoCard_eNqC",privacyCard:"privacyCard_LiwL",successMessage:"successMessage_3P_z",slideDown:"slideDown_YK0t"}}}]);
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.