1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1170],{71170:function(e,t,r){var n,i;function o(e,t){return Array.from(e.getElementsByTagName(t))}function l(e){return"#"===e[0]?e:`#${e}`}function u(e){return e?.normalize(),e?.textContent||""}function s(e,t,r){let n=e.getElementsByTagName(t),i=n.length?n[0]:null;return i&&r&&r(i),i}function a(e,t,r){let n={};if(!e)return n;let i=e.getElementsByTagName(t),o=i.length?i[0]:null;return o&&r?r(o,n):n}function c(e,t,r){let n=u(s(e,t));return n&&r&&r(n)||{}}function f(e,t,r){let n=Number.parseFloat(u(s(e,t)));if(!Number.isNaN(n))return n&&r&&r(n)||{}}function p(e,t,r){let n=Number.parseFloat(u(s(e,t)));if(!Number.isNaN(n))return r&&r(n),n}function g(e,t){let r={};for(let n of t)c(e,n,e=>{r[n]=e});return r}function m(e){return e?.nodeType===1}function y(e){let t=[Number.parseFloat(e.getAttribute("lon")||""),Number.parseFloat(e.getAttribute("lat")||"")];if(Number.isNaN(t[0])||Number.isNaN(t[1]))return null;p(e,"ele",e=>{t.push(e)});let r=s(e,"time");return{coordinates:t,time:r?u(r):null,extendedValues:function e(t){let r=[];if(null===t)return r;for(let i of Array.from(t.childNodes)){var n;if(!m(i))continue;let t=["heart","gpxtpx:hr","hr"].includes(n=i.nodeName)?"heart":n;if("gpxtpx:TrackPointExtension"===t)r=r.concat(e(i));else{let e=u(i);r.push([t,function(e){let t=Number.parseFloat(e);return Number.isNaN(t)?e:t}(e)])}}return r}(s(e,"extensions"))}}function d(e){return a(e,"line",e=>Object.assign({},c(e,"color",e=>({stroke:`#${e}`})),f(e,"opacity",e=>({"stroke-opacity":e})),f(e,"width",e=>({"stroke-width":96*e/25.4}))))}function b(e,t){let r=g(t,["name","cmt","desc","type","time","keywords"]);for(let[n,i]of e)for(let e of Array.from(t.getElementsByTagNameNS(i,"*")))r[e.tagName.replace(":","_")]=u(e)?.trim();let n=o(t,"link");return n.length&&(r.links=n.map(e=>Object.assign({href:e.getAttribute("href")},g(e,["text","type"])))),r}function h(e,t){let r=o(e,t),n=[],i=[],l={};for(let e=0;e<r.length;e++){let t=y(r[e]);if(t)for(let[o,u]of(n.push(t.coordinates),t.time&&i.push(t.time),t.extendedValues)){let t="heart"===o?o:`${o.replace("gpxtpx:","")}s`;l[t]||(l[t]=Array(r.length).fill(null)),l[t][e]=u}}if(!(n.length<2))return{line:n,times:i,extendedValues:l}}function N(e){return{type:"FeatureCollection",features:Array.from(function*(e){let t="http://www.garmin.com/xmlschemas/GpxExtensions/v3",r=[["gpxx",t]],n=e.getElementsByTagName("gpx")[0]?.attributes;if(n)for(let e of Array.from(n))e.name?.startsWith("xmlns:")&&e.value!==t&&r.push([e.name,e.value]);for(let t of o(e,"trk")){let e=function(e,t){let r=o(t,"trkseg"),n=[],i=[],l=[];for(let e of r){let t=h(e,"trkpt");t&&(l.push(t),t.times?.length&&i.push(t.times))}if(0===l.length)return null;let u=l.length>1,a=Object.assign({_gpxType:"trk"},b(e,t),d(s(t,"extensions")),i.length?{coordinateProperties:{times:u?i:i[0]}}:{});for(let e=0;e<l.length;e++){let t=l[e];n.push(t.line),a.coordinateProperties||(a.coordinateProperties={});let r=a.coordinateProperties;for(let[n,i]of Object.entries(t.extendedValues))u?(r[n]||(r[n]=l.map(e=>Array(e.line.length).fill(null))),r[n][e]=i):r[n]=i}return{type:"Feature",properties:a,geometry:u?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}(r,t);e&&(yield e)}for(let t of o(e,"rte")){let e=function(e,t){let r=h(t,"rtept");if(r)return{type:"Feature",properties:Object.assign({_gpxType:"rte"},b(e,t),d(s(t,"extensions"))),geometry:{type:"LineString",coordinates:r.line}}}(r,t);e&&(yield e)}for(let t of o(e,"wpt")){let e=function(e,t){let r=Object.assign(b(e,t),g(t,["sym"])),n=y(t);return n?{type:"Feature",properties:r,geometry:{type:"Point",coordinates:n.coordinates}}:null}(r,t);e&&(yield e)}}(e))}}function x(e,t){let r={},n="stroke"===t||"fill"===t?t:`${t}-color`;return"#"===e[0]&&(e=e.substring(1)),6===e.length||3===e.length?r[n]=`#${e}`:8===e.length&&(r[`${t}-opacity`]=Number.parseInt(e.substring(0,2),16)/255,r[n]=`#${e.substring(6,8)}${e.substring(4,6)}${e.substring(2,4)}`),r}function A(e,t,r){let n={};return p(e,t,e=>{n[r]=e}),n}function O(e,t){return a(e,"color",e=>x(u(e),t))}function T(e){return a(e,"Icon",(e,t)=>(c(e,"href",e=>{t.icon=e}),t))}function L(e){return Object.assign({},a(e,"PolyStyle",(e,t)=>Object.assign(t,a(e,"color",e=>x(u(e),"fill")),c(e,"fill",e=>{if("0"===e)return{"fill-opacity":0}}),c(e,"outline",e=>{if("0"===e)return{"stroke-opacity":0}}))),a(e,"LineStyle",e=>Object.assign(O(e,"stroke"),A(e,"width","stroke-width"))),a(e,"LabelStyle",e=>Object.assign(O(e,"label"),A(e,"scale","label-scale"))),a(e,"IconStyle",e=>Object.assign(O(e,"icon"),A(e,"scale","icon-scale"),A(e,"heading","icon-heading"),a(e,"hotSpot",e=>{let t=Number.parseFloat(e.getAttribute("x")||""),r=Number.parseFloat(e.getAttribute("y")||""),n=e.getAttribute("xunits")||"",i=e.getAttribute("yunits")||"";return Number.isNaN(t)||Number.isNaN(r)?{}:{"icon-offset":[t,r],"icon-offset-units":[n,i]}}
1),T(e))))}r.d(t,{DS:function(){return V},ng:function(){return N}});let k=/\s*/g,E=/^\s*|\s*$/g,v=/\s+/;function S(e){return e.replace(k,"").split(",").map(Number.parseFloat).filter(e=>!Number.isNaN(e)).slice(0,3)}function _(e){return e.replace(E,"").split(v).map(S).filter(e=>e.length>=2)}function F(e){if(0===e.length)return e;let t=e[0],r=e[e.length-1],n=!0;for(let e=0;e<Math.max(t.length,r.length);e++)if(t[e]!==r[e]){n=!1;break}return n?e:e.concat([e[0]])}function P(e){return u(s(e,"coordinates"))}let w=e=>Number(e),R={string:e=>e,int:w,uint:w,short:w,ushort:w,float:w,double:w,bool:e=>!!e};function M(e,t){return a(e,"ExtendedData",(e,r)=>{for(let t of o(e,"Data"))r[t.getAttribute("name")||""]=u(s(t,"value"));for(let n of o(e,"SimpleData")){let e=n.getAttribute("name")||"",i=t[e]||R.string;r[e]=i(u(n))}return r})}function G(e){let t=s(e,"description");for(let e of Array.from(t?.childNodes||[]))if(4===e.nodeType)return{description:{"@type":"html",value:u(e)}};return{}}function j(e){return a(e,"TimeSpan",e=>({timespan:{begin:u(s(e,"begin")),end:u(s(e,"end"))}}))}function B(e){return a(e,"TimeStamp",e=>({timestamp:u(s(e,"when"))}))}function C(e,t){return c(e,"styleUrl",e=>t[e=l(e)]?Object.assign({styleUrl:e},t[e]):{styleUrl:e})}(i=n||(n={})).ABSOLUTE="absolute",i.RELATIVE_TO_GROUND="relativeToGround",i.CLAMP_TO_GROUND="clampToGroun
1d",i.CLAMP_TO_SEAFLOOR="clampToSeaFloor",i.RELATIVE_TO_SEAFLOOR="relativeToSeaFloor";let U=Math.PI/180;function V(e,t={skipNullGeometry:!1}){return{type:"FeatureCollection",features:Array.from(function*(e,t={skipNullGeometry:!1}){let r=function(e){let t={};for(let r of o(e,"Style"))t[function(e){let t=e.getAttribute("id"),r=e.parentNode;return!t&&m(r)&&"CascadingStyle"===r.localName&&(t=r.getAttribute("kml:id")||r.getAttribute("id")),l(t||"")}(r)]=L(r);for(let r of o(e,"StyleMap")){let e=l(r.getAttribute("id")||"");c(r,"styleUrl",r=>{t[r=l(r)]&&(t[e]=t[r])})}return t}(e),i=function(e){let t={};for(let r of o(e,"SimpleField"))t[r.getAttribute("name")||""]=R[r.getAttribute("type")||""]||R.string;return t}(e);for(let n of o(e,"Placemark")){let e=function(e,t,r,n){let{coordTimes:i,geometries:l}=function e(t){let r=[],n=[];for(let i=0;i<t.childNodes.length;i++){let l=t.childNodes.item(i);if(m(l))switch(l.tagName){case"MultiGeometry":case"MultiTrack":case"gx:MultiTrack":{let t=e(l);r=r.concat(t.geometries),n=n.concat(t.coordTimes);break}case"Point":{let e=S(P(l));e.length>=2&&r.push({type:"Point",coordinates:e});break}case"LinearRing":case"LineString":{let e=_(P(l));e.length>=2&&r.push({type:"LineString",coordinates:e});break}case"Polygon":{let e=[];for(let t of o(l,"LinearRing")){let r=F(_(P(t)));r.length>=4&&e.push(r)}e.length&&r.push({type:"Polygon",coordinates:e});break}case"Track":case"gx:Track":{let e=function(e){let t=o(e,"coord");if(0===t.length){var r;r="coord",t=Array.from(e.getElementsByTagNameNS("*",r))}let n=t.map(e=>u(e).split(" ").map(Number.parseFloat));return 0===n.length?null:{geometry:n.length>2?{type:"LineString",coordinates:n}:{type:"Point",coordinates:n[0]},times:o(e,"when").map(e=>u(e))}}(l);if(!e)break;let{times:t,geometry:i}=e;r.push(i),t.length&&n.push(t)}}}return{geometries:r,coordTimes:n}}(e),s=0===l.length?null:1===l.length?l[0]:{type:"GeometryCollection",geometries:l};if(!s&&n.skipNullGeometry)return null;let a={type:"Feature",geometry:s,properties:Object.assign(g(e,["name","address","visibility","open","phoneNumber","description"]),G(e),C(e,t),L(e),M(e,r),j(e),B(e),i.length?{coordinateProperties:{times:1===i.length?i[0]:i}}:{})};a.properties?.visibility!==void 0&&(a.properties.visibility="0"!==a.properties.visibility);let c=e.getAttribute("id");return null!==c&&""!==c&&(a.id=c),a}(n,r,i,t);e&&(yield e)}for(let n of o(e,"GroundOverlay")){let e=function(e,t,r,n){let i=s(e,"gx:LatLonQuad")?{geometry:{type:"Polygon",coordinates:[F(_(P(e)))]}}:function(e){let t=s(e,"LatLonBox");if(t){let e=p(t,"north"),r=p(t,"west"),n=p(t,"east"),i=p(t,"south"),o=p(t,"rotation");if("number"==typeof e&&"number"==typeof i&&"number"==typeof r&&"number"==typeof n){let t=[r,i,n,e],l=[[[r,e],[n,e],[n,i],[r,i],[r,e]]];return"number"==typeof o&&(l=function(e,t,r){let n=[(e[0]+e[2])/2,(e[1]+e[3])/2];return[t[0].map(e=>{let t=e[1]-n[1],i=e[0]-n[0],o=Math.sqrt(t**2+i**2),l=Math.atan2(t,i)+r*U;return[n[0]+Math.cos(l)*o,n[1]+Math.sin(l)*o]})]}(t,l,o)),{bbox:t,geometry:{type:"Polygon",coordinates:l}}}}return null}(e),o=i?.geometry||null;if(!o&&n.skipNullGeometry)return null;let l={type:"Feature",geometry:o,properties:Object.assign({"@geometry-type":"groundoverlay"},g(e,["name","address","visibility","open","phoneNumber","description"]),G(e),C(e,t),L(e),T(e),M(e,r),j(e),B(e))};i?.bbox&&(l.bbox=i.bbox),l.properties?.visibility!==void 0&&(l.properties.visibility="0"!==l.properties.visibility);let u=e.getAttribute("id");return null!==u&&""!==u&&(l.id=u),l}(n,r,i,t);e&&(yield e)}for(let l of o(e,"NetworkLink")){let e=function(e,t,r,i){let o=function(e){let t=s(e,"Region");return t?{coordinateBox:function(e){let t=s(e,"LatLonAltBox");if(t){let e=p(t,"north"),r=p(t,"west"),i=p(t,"east"),o=p(t,"south");if(function(e){switch(e?.textContent){case n.ABSOLUTE:return n.ABSOLUTE;case n.CLAMP_TO_GROUND:return n.CLAMP_TO_GROUND;case n.CLAMP_TO_SEAFLOOR:return n.CLAMP_TO_SEAFLOOR;case n.RELATIVE_TO_GROUND:return n.RELATIVE_TO_GROUND;case n.RELATIVE_TO_SEAFLOOR:return n.RELATIVE_TO_SEAFLOOR}return null}(s(t,"altitudeMode")||s(t,"gx:altitudeMode"))&&console.debug("Encountered an unsupported feature of KML for togeojson: please contact developers for support of altitude mode."),"number"==typeof e&&"number"==typeof o&&"number"==typeof r&&"number"==typeof i)return{bbox:[r,o,i,e],geometry:{type:"Polygon",coordinates:[[[r,e],[i,e],[i,o],[r,o],[r,e]]]}}}return null}(t),lod:function(e){let t=s(e,"Lod");return t?[p(t,"minLodPixels")??-1,p(t,"maxLodPixels")??-1,p(t,"minFadeExtent")??null,p(t,"maxFadeExtent")??null]:null}(e)}:null}(e),l=o?.coordinateBox?.geometry||null;if(!l&&i.skipNullGeometry)return null;let u={type:"Feature",geometry:l,properties:Object.assign({"@geometry-type":"networklink"},g(e,["name","address","visibility","open","phoneNumber","styleUrl","refreshVisibility","flyToView","description"]),G(e),C(e,t),L(e),T(e),M(e,r),j(e),B(e),function(e){let t=s(e,"Link");return t?g(t,["href","refreshMode","refreshInterval","viewRefreshMode","viewRefreshTime","viewBoundScale","viewFormat","httpQuery"]):{}}(e),o?.lod?{lod:o.lod}:{})};o?.coordinateBox?.bbox&&(u.bbox=o.coordinateBox.bbox),u.properties?.visibility!==void 0&&(u.properties.visibility="0"!==u.properties.visibility);let a=e.getAttribute("id");return null!==a&&""!==a&&(u.id=a),u}(l,r,i,t);e&&(yield e)}}(e,t))}}}}]);
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.